Patch "dyndbg: let query-modname override actual module name" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    dyndbg: let query-modname override actual module name

to the 5.15-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:
     dyndbg-let-query-modname-override-actual-module-name.patch
and it can be found in the queue-5.15 subdirectory.

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



commit f62f95640b73c3b66c6b6c17652412bc2ba5b5c5
Author: Jim Cromie <jim.cromie@xxxxxxxxx>
Date:   Sun Sep 4 15:40:44 2022 -0600

    dyndbg: let query-modname override actual module name
    
    [ Upstream commit e75ef56f74965f426dd819a41336b640ffdd8fbc ]
    
    dyndbg's control-parser: ddebug_parse_query(), requires that search
    terms: module, func, file, lineno, are used only once in a query; a
    thing cannot be named both foo and bar.
    
    The cited commit added an overriding module modname, taken from the
    module loader, which is authoritative.  So it set query.module 1st,
    which disallowed its use in the query-string.
    
    But now, its useful to allow a module-load to enable classes across a
    whole (or part of) a subsystem at once.
    
      # enable (dynamic-debug in) drm only
      modprobe drm dyndbg="class DRM_UT_CORE +p"
    
      # get drm_helper too
      modprobe drm dyndbg="class DRM_UT_CORE module drm* +p"
    
      # get everything that knows DRM_UT_CORE
      modprobe drm dyndbg="class DRM_UT_CORE module * +p"
    
      # also for boot-args:
      drm.dyndbg="class DRM_UT_CORE module * +p"
    
    So convert the override into a default, by filling it only when/after
    the query-string omitted the module.
    
    NB: the query class FOO handling is forthcoming.
    
    Fixes: 8e59b5cfb9a6 dynamic_debug: add modname arg to exec_query callchain
    Acked-by: Jason Baron <jbaron@xxxxxxxxxx>
    Acked-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
    Signed-off-by: Jim Cromie <jim.cromie@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20220904214134.408619-8-jim.cromie@xxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 00e6507972d8..60d453974155 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -380,10 +380,6 @@ static int ddebug_parse_query(char *words[], int nwords,
 		return -EINVAL;
 	}
 
-	if (modname)
-		/* support $modname.dyndbg=<multiple queries> */
-		query->module = modname;
-
 	for (i = 0; i < nwords; i += 2) {
 		char *keyword = words[i];
 		char *arg = words[i+1];
@@ -424,6 +420,13 @@ static int ddebug_parse_query(char *words[], int nwords,
 		if (rc)
 			return rc;
 	}
+	if (!query->module && modname)
+		/*
+		 * support $modname.dyndbg=<multiple queries>, when
+		 * not given in the query itself
+		 */
+		query->module = modname;
+
 	vpr_info_dq(query, "parsed");
 	return 0;
 }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux