aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorPetr Mladek <[email protected]>2019-04-17 13:53:42 +0200
committerPetr Mladek <[email protected]>2019-04-26 16:19:04 +0200
commit1ac2f9789c4b76ad749870c25ffae0cbcd1f510f (patch)
tree10a66ef497bf3100996fbc09cb6f231f98ac8456 /tools/perf/scripts/python/exported-sql-viewer.py
parent6eea242f9bcdf828bb56334d8ee5c7cb466e4bcd (diff)
vsprintf: Consistent %pK handling for kptr_restrict == 0
restricted_pointer() pretends that it prints the address when kptr_restrict is set to zero. But it is never called in this situation. Instead, pointer() falls back to ptr_to_id() and hashes the pointer. This patch removes the potential confusion. klp_restrict is checked only in restricted_pointer(). It actually fixes a small race when the address might get printed unhashed: CPU0 CPU1 pointer() if (!kptr_restrict) /* for example set to 2 */ restricted_pointer() /* echo 0 >/proc/sys/kernel/kptr_restrict */ proc_dointvec_minmax_sysadmin() klpr_restrict = 0; switch(kptr_restrict) case 0: break: number() Fixes: ef0010a30935de4e0211 ("vsprintf: don't use 'restricted_pointer()' when not restricting") Link: http://lkml.kernel.org/r/[email protected] To: Andy Shevchenko <[email protected]> To: Rasmus Villemoes <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: "Tobin C . Harding" <[email protected]> Cc: Joe Perches <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Sergey Senozhatsky <[email protected]> Cc: [email protected] Cc: Kees Cook <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Steven Rostedt (VMware) <[email protected]> Reviewed-by: Sergey Senozhatsky <[email protected]> Signed-off-by: Petr Mladek <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions