>>>>> "Marco" == Marco Shaw <marco@xxxxxxxxxxx> writes:
Marco> I want to run through some crash scenarios during an upcoming
Marco> presentation. So I need to crash my system and produce a good
Marco> dump.
Marco> How could I produce such results with the 2.2.13 SGI-enhanced
Marco> kernel?
No idea about the SGI-enhanced kernel. Besides from the things in the
LKCD FAQ, I tried these (but not on LKCD, since it doesn't support IDE
on 2.2 kernels):
+ a magic SysRq for crash: doesn't work reliably, since it is being
called inside the keyboard interrupt handler -- this leads to the
interrupt handler being killed most of the time, nothing will be
written to disk afterwards. Might work with the "in memory" dump
facilities of mclinux, didn't try these. The mclinux crash dump
patch already contains this sysrq.
+ a dummy module that calls panic: works for me. Just compile and
insmod. Please share your experiences.
Regards
Jan
/* crash.c
* adapted from hello.c ("Hello, world" module) by Ori Pomerantz
*/
/* The necessary header files */
/* Standard in kernel modules */
#include <linux/kernel.h> /* We're doing kernel work */
#include <linux/module.h> /* Specifically, a module */
#include <linux/types.h>
/* Deal with CONFIG_MODVERSIONS */
#if CONFIG_MODVERSIONS==1
#define MODVERSIONS
#include <linux/modversions.h>
#endif
/* Initialize the module */
int init_module()
{
printk("Goodbye, World: calling panic()\n");
panic("poisoned module");
/* shouldn't reach this point */
return 0;
}
/* Cleanup - undid whatever init_module did */
void cleanup_module()
{
printk("Short is the life of a kernel module\n");
}
|