This is a note to let you know that I've just added the patch titled

    kdb: make "mdr" command repeat

to the 4.9-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     kdb-make-mdr-command-repeat.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <sta...@vger.kernel.org> know about it.


>From foo@baz Sun May 27 17:33:38 CEST 2018
From: Randy Dunlap <rdun...@infradead.org>
Date: Fri, 8 Dec 2017 10:19:19 -0800
Subject: kdb: make "mdr" command repeat

From: Randy Dunlap <rdun...@infradead.org>

[ Upstream commit 1e0ce03bf142454f38a5fc050bf4fd698d2d36d8 ]

The "mdr" command should repeat (continue) when only Enter/Return
is pressed, so make it do so.

Signed-off-by: Randy Dunlap <rdun...@infradead.org>
Cc: Daniel Thompson <daniel.thomp...@linaro.org>
Cc: Jason Wessel <jason.wes...@windriver.com>
Cc: kgdb-bugreport@lists.sourceforge.net
Signed-off-by: Jason Wessel <jason.wes...@windriver.com>
Signed-off-by: Sasha Levin <alexander.le...@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
 kernel/debug/kdb/kdb_main.c |   27 +++++++++++++++++++++------
 1 file changed, 21 insertions(+), 6 deletions(-)

--- a/kernel/debug/kdb/kdb_main.c
+++ b/kernel/debug/kdb/kdb_main.c
@@ -1564,6 +1564,7 @@ static int kdb_md(int argc, const char *
        int symbolic = 0;
        int valid = 0;
        int phys = 0;
+       int raw = 0;
 
        kdbgetintenv("MDCOUNT", &mdcount);
        kdbgetintenv("RADIX", &radix);
@@ -1573,9 +1574,10 @@ static int kdb_md(int argc, const char *
        repeat = mdcount * 16 / bytesperword;
 
        if (strcmp(argv[0], "mdr") == 0) {
-               if (argc != 2)
+               if (argc == 2 || (argc == 0 && last_addr != 0))
+                       valid = raw = 1;
+               else
                        return KDB_ARGCOUNT;
-               valid = 1;
        } else if (isdigit(argv[0][2])) {
                bytesperword = (int)(argv[0][2] - '0');
                if (bytesperword == 0) {
@@ -1611,7 +1613,10 @@ static int kdb_md(int argc, const char *
                radix = last_radix;
                bytesperword = last_bytesperword;
                repeat = last_repeat;
-               mdcount = ((repeat * bytesperword) + 15) / 16;
+               if (raw)
+                       mdcount = repeat;
+               else
+                       mdcount = ((repeat * bytesperword) + 15) / 16;
        }
 
        if (argc) {
@@ -1628,7 +1633,10 @@ static int kdb_md(int argc, const char *
                        diag = kdbgetularg(argv[nextarg], &val);
                        if (!diag) {
                                mdcount = (int) val;
-                               repeat = mdcount * 16 / bytesperword;
+                               if (raw)
+                                       repeat = mdcount;
+                               else
+                                       repeat = mdcount * 16 / bytesperword;
                        }
                }
                if (argc >= nextarg+1) {
@@ -1638,8 +1646,15 @@ static int kdb_md(int argc, const char *
                }
        }
 
-       if (strcmp(argv[0], "mdr") == 0)
-               return kdb_mdr(addr, mdcount);
+       if (strcmp(argv[0], "mdr") == 0) {
+               int ret;
+               last_addr = addr;
+               ret = kdb_mdr(addr, mdcount);
+               last_addr += mdcount;
+               last_repeat = mdcount;
+               last_bytesperword = bytesperword; // to make REPEAT happy
+               return ret;
+       }
 
        switch (radix) {
        case 10:


Patches currently in stable-queue which might be from rdun...@infradead.org are

queue-4.9/kdb-make-mdr-command-repeat.patch
queue-4.9/swap-divide-by-zero-when-zero-length-swap-file-on-ssd.patch
queue-4.9/alsa-hda-use-is_reachable-for-dependency-on-input.patch
queue-4.9/integrity-security-fix-digsig.c-build-error-with-header-file.patch

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Kgdb-bugreport mailing list
Kgdb-bugreport@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to