You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've compiled a kernel on Gentoo with genkernel and saved a version of it with debugging symbols (and even its System.map but it doesn't seem to be needed for 'crash' because the output is identical with/without the map) then,
I booted into this kernel with nokaslr kernel cmdline and triggered a manual crash (via sysrq+s,u,s then c), which triggered kexec to make a dump via makedumpfile and when done it rebooted back into the normal system.
(Same kernel was used for normal and kexec: the stripped symbols version of it from /boot.)
click me to expand
-rw-r--r-- 1 root root 6181973 Mar 4 15:10 /boot/System.map-6.7.6-gentoo-x86_64
lrwxrwxrwx 1 root root 30 Mar 4 15:11 /boot/System.map -> System.map-6.7.6-gentoo-x86_64
...
-rw-r--r-- 1 root root 11858944 Mar 4 15:11 /boot/vmlinuz-6.7.6-gentoo-x86_64
lrwxrwxrwx 1 root root 27 Mar 4 15:11 /boot/kernel -> vmlinuz-6.7.6-gentoo-x86_64
...
-rw-r--r-- 1 root root 542623392 Mar 4 15:10 vmlinux-6.7.6-gentoo-x86_64-2024-03-04-15_14_26
-rw------- 1 root root 62402000856 Mar 4 17:37 crashdump-2024-03-04-17_36_29
Now I try to examine the crash dump like this:
click me to expand (to see output of this command)
(if I don't specify nokaslr that error looks like: crash: invalid kernel virtual address: 19 type: "module gpl symbols", although, this was same version kernel it was a different compilation of it, maybe that's why 'gpl' is extra, unsure. I haven't tested without nokaslr in cmdline in this recompiled kernel that this whole issue is about)
that 'crash' I used was compiled on Gentoo from latest commit 5977936 and had a little patch(why the extra output):
show 'crash' args and stuff at startup, helps knowing what it sees.
Index: /var/tmp/portage/dev-util/crash-9999/work/crash-9999/main.c
===================================================================--- .orig/var/tmp/portage/dev-util/crash-9999/work/crash-9999/main.c+++ crash-9999/main.c@@ -713,6 +713,7 @@ main(int argc, char **argv)
machdep_init(PRE_GDB);
datatype_init();
+ dump_program_context();
/*
* gdb_main_loop() modifies "command_loop_hook" to point to the
* main_loop() function below, and then calls gdb's main() function.
I'm not sure if --mod dir is required, but the modules are here:
click to expand
/lib/modules/6.7.6-gentoo-x86_64/:
total 560
drwxr-xr-x 1 root root 68 Mar 4 15:11 kernel
drwxr-xr-x 1 root root 2786 Mar 4 15:14 ..
drwxr-xr-x 1 root root 72 Mar 4 15:15 misc
drwxr-xr-x 1 root root 460 Mar 4 15:15 .
-rw-r--r-- 1 root root 4876 Mar 4 15:11 modules.order
-rw-r--r-- 1 root root 236449 Mar 4 15:11 modules.builtin.modinfo
-rw-r--r-- 1 root root 26143 Mar 4 15:11 modules.builtin
lrwxrwxrwx 1 root root 21 Mar 4 15:11 build -> /tmp/genkernel.outdir
-rw-r--r-- 1 root root 61961 Mar 4 15:15 modules.symbols
-rw-r--r-- 1 root root 269 Mar 4 15:15 modules.softdep
-rw-r--r-- 1 root root 15400 Mar 4 15:15 modules.dep.bin
-rw-r--r-- 1 root root 9759 Mar 4 15:15 modules.dep
-rw-r--r-- 1 root root 31304 Mar 4 15:15 modules.alias.bin
-rw-r--r-- 1 root root 27328 Mar 4 15:15 modules.alias
-rw-r--r-- 1 root root 69065 Mar 4 15:15 modules.symbols.bin
-rw-r--r-- 1 root root 30997 Mar 4 15:15 modules.builtin.bin
-rw-r--r-- 1 root root 25146 Mar 4 15:15 modules.builtin.alias.bin
-rw-r--r-- 1 root root 126 Mar 4 15:15 modules.devname
autoexec file contents:
bt
quit
To get rid of the error, I've found that I can add --no_modules but this is just a mitigation, doesn't solve the problem, and it shows that the issue isn't just for the modules, as bt shows another similar error about something else:
I've compiled a kernel on Gentoo with genkernel and saved a version of it with debugging symbols (and even its System.map but it doesn't seem to be needed for 'crash' because the output is identical with/without the map) then,
I booted into this kernel with
nokaslr
kernel cmdline and triggered a manual crash (via sysrq+s,u,s then c), which triggered kexec to make a dump viamakedumpfile
and when done it rebooted back into the normal system.(Same kernel was used for normal and kexec: the stripped symbols version of it from
/boot
.)click me to expand
Now I try to examine the crash dump like this:
click me to expand (to see output of this command)
(if I don't specify
nokaslr
that error looks like:crash: invalid kernel virtual address: 19 type: "module gpl symbols"
, although, this was same version kernel it was a different compilation of it, maybe that's why 'gpl' is extra, unsure. I haven't tested withoutnokaslr
in cmdline in this recompiled kernel that this whole issue is about)that 'crash' I used was compiled on Gentoo from latest commit 5977936 and had a little patch(why the extra output):
I'm not sure if
--mod dir
is required, but the modules are here:click to expand
autoexec
file contents:To get rid of the error, I've found that I can add
--no_modules
but this is just a mitigation, doesn't solve the problem, and it shows that the issue isn't just for the modules, asbt
shows another similar error about something else:click me to expand
The text was updated successfully, but these errors were encountered: