> Hi everybody!
>
> Could somebody direct me to the texts explaining a bit more
> about kernel debugging. I can always use printfs and I understand
> how to debug a crash dump, i.e. to find from symbol map and EIP
> the place using gdb the offending lines of code. However I can't
> find any FAQa/HOWTOs on how to debug live kernel, or at least to
> force it to crash. Could something like /dev/kmem be used?
A user is not supposed to be able to crash the kernel. However, there
are some hooks put in so a kernel-programmer can do a few things, some
of which could crash the kernel. Loading an invalid module is one of
the things that can crash the kernel.
You can add a new kernel function-code that will do whatever you want
after the trap to kernel-mode occurs.
Of course, if you just want to randomly mess things up....
become root:
execute cp /dev/random /dev/port
I'd suggest you unmount your hard-disk(s) first...
kill -TERM -1
sync
kill -KILL -1
umount -a
... Then play ....
Cheers,
Dick Johnson
Richard B. Johnson
Project Engineer
Analogic Corporation
Penguin : Linux version 2.1.70 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.