diff options
author | Jim Cromie <jim.cromie@gmail.com> | 2022-09-04 23:40:54 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-09-07 17:04:49 +0200 |
commit | a4a2a427413e350bd01505f1f698b80545e1be58 (patch) | |
tree | b630a137c2daab135d992b0bfb629ac9b171cc8f /Documentation/admin-guide/dynamic-debug-howto.rst | |
parent | dyndbg: add ddebug_attach_module_classes (diff) | |
download | linux-a4a2a427413e350bd01505f1f698b80545e1be58.tar.xz linux-a4a2a427413e350bd01505f1f698b80545e1be58.zip |
dyndbg: validate class FOO by checking with module
Add module-to-class validation:
#> echo class DRM_UT_KMS +p > /proc/dynamic_debug/control
If a query has "class FOO", then ddebug_find_valid_class(), called
from ddebug_change(), requires that FOO is known to module X,
otherwize the query is skipped entirely for X. This protects each
module's class-space, other than the default:31.
The authors' choice of FOO is highly selective, giving isolation
and/or coordinated sharing of FOOs. For example, only DRM modules
should know and respond to DRM_UT_KMS.
So this, combined with module's opt-in declaration of known classes,
effectively privatizes the .class_id space for each module (or
coordinated set of modules).
Notes:
For all "class FOO" queries, ddebug_find_valid_class() is called, it
returns the map matching the query, and sets valid_class via an
*outvar).
If no "class FOO" is supplied, valid_class = _CLASS_DFLT. This
insures that legacy queries do not trample on new class'd callsites,
as they get added.
Also add a new column to control-file output, displaying non-default
class-name (when found) or the "unknown _id:", if it has not been
(correctly) declared with one of the declarator macros.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Link: https://lore.kernel.org/r/20220904214134.408619-18-jim.cromie@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/admin-guide/dynamic-debug-howto.rst')
0 files changed, 0 insertions, 0 deletions