Messages in this thread | | | Date | Wed, 24 Nov 1999 12:27:08 +0530 | From | Raju K V <> | Subject | I get panic rather than oops |
| |
hi,
What is the simplest method for generating an Oops? Browsing thru the kernel mailing list archive, I came across a thread saying *(int *)0=0; generates on Oops. I wrote a program with this line in init_module. compiled it as a module. On doing insmod, I got a panic. Is there a way by which I can get it generate Oops rather than panic?
The reason is, on my machinee, when loading a kernel module with some bugs, I get a panic rather than Oops. The two most common messages that I get are "Unable to handle kernel NULL pointer dereference at virtual address" and "Unable to handle kernel paging request at virtual address"
After doing a search in linux-kernel mailing list archive, I found that everybody gets these messages with Oops whereas I get it with panic. In fact, I have never got an Oops on my machine. Any particular reason?
Thanks in advance, Raju
Some info 1. cat /proc/version Linux version 2.2.10 (root@linpqs) (gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release))6 Wed Nov 24 14:31:38 IST 1999
2. /usr/src/linux/scripts/ver_linux -- Versions installed: (if some fields are empty or looks -- unusual then possibly you have very old versions) Linux linpqs 2.2.106 Wed Nov 24 14:31:38 IST 1999 i586 unknown Kernel modules 2.1.121 Gnu C egcs-2.91.66 Binutils 2.9.4.0.6 Linux C Library 2.1.2 Dynamic linker ldd (GNU libc) 2.1.2 Procps 2.0.6 Mount 2.8a Net-tools 1.50 Kbd 0.96 Sh-utils 1.16 Modules Loaded
3. cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 5 model : 2 model name : Pentium 75 - 200 stepping : 11 cpu MHz : 132.634331 fdiv_bug : no hlt_bug : no sep_bug : no f00f_bug : yes coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr mce cx8 bogomips : 52.84
4. cat /proc/modules empty
5. program which I wrote to simulate Oops:
#include <linux/kernel.h> #include <linux/module.h> #if CONFIG_MODVERSIONS==1 #define MODVERSIONS #include #<linux/modversions.h> #endif int init_module() { *(int *)0 = 0; return 0; }
void cleanup_module() { printk("removed module\n"); }
It was compiled as gcc -Wall -DMODULE -D__KERNEL__ -DLINUX -O2 -c tempmod.c
insmod tempmod.o
caused panic with message Unable to handle kernel NULL pointer dereference at virtual address 00000000
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |