Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Suren Baghdasaryan and committed by
Andrew Morton
d2917ff1 326c34ef

+4 -2
+4 -2
lib/dump_stack.c
··· 54 54 */ 55 55 void dump_stack_print_info(const char *log_lvl) 56 56 { 57 - printk("%sCPU: %d PID: %d Comm: %.20s %s%s %s %.*s" BUILD_ID_FMT "\n", 58 - log_lvl, raw_smp_processor_id(), current->pid, current->comm, 57 + printk("%sCPU: %d UID: %u PID: %d Comm: %.20s %s%s %s %.*s" BUILD_ID_FMT "\n", 58 + log_lvl, raw_smp_processor_id(), 59 + __kuid_val(current_real_cred()->euid), 60 + current->pid, current->comm, 59 61 kexec_crash_loaded() ? "Kdump: loaded " : "", 60 62 print_tainted(), 61 63 init_utsname()->release,