summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSuren Baghdasaryan <surenb@google.com>2024-06-14 21:13:58 -0700
committerAndrew Morton <akpm@linux-foundation.org>2024-06-24 22:25:11 -0700
commitd2917ff19962951399bc33f596648836cc5a0be4 (patch)
tree670e82ab2841820a4251ca203e03b72460bb133a /lib
parent326c34efe3d1761686c385ff774b00012f1e1fc0 (diff)
downloadlinux-d2917ff19962951399bc33f596648836cc5a0be4.tar.gz
linux-d2917ff19962951399bc33f596648836cc5a0be4.tar.bz2
linux-d2917ff19962951399bc33f596648836cc5a0be4.zip
lib/dump_stack: report process UID in dump_stack_print_info()
To make it easier to identify the crashing process, report effective UID when dumping the stack. Link: https://lkml.kernel.org/r/20240615041358.103791-1-surenb@google.com Signed-off-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/dump_stack.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/dump_stack.c b/lib/dump_stack.c
index 8b6b70eaf949..1a996fbbf50a 100644
--- a/lib/dump_stack.c
+++ b/lib/dump_stack.c
@@ -54,8 +54,10 @@ void __init dump_stack_set_arch_desc(const char *fmt, ...)
*/
void dump_stack_print_info(const char *log_lvl)
{
- printk("%sCPU: %d PID: %d Comm: %.20s %s%s %s %.*s" BUILD_ID_FMT "\n",
- log_lvl, raw_smp_processor_id(), current->pid, current->comm,
+ printk("%sCPU: %d UID: %u PID: %d Comm: %.20s %s%s %s %.*s" BUILD_ID_FMT "\n",
+ log_lvl, raw_smp_processor_id(),
+ __kuid_val(current_real_cred()->euid),
+ current->pid, current->comm,
kexec_crash_loaded() ? "Kdump: loaded " : "",
print_tainted(),
init_utsname()->release,