linux kernel classify all kernel address that is "NOT PRESENT" as general protection fault: In arch/x86/mm/fault.c:do_page_fault(): tsk->thread.cr2 = address; /* Kernel addresses are always protection faults */ tsk->thread.error_code = error_code | (address >= TASK_SIZE); tsk->thread.trap_no = 14; force_sig_info_fault(SIGSEGV, si_code, address, tsk); Ie, so long as the ptr (which is pointing into the kernel range: ">= TASK_SIZE") is not a valid memory address (__PAGE_PRESENT flag set to 0 for the page's PTE) - it is illegitimate and will fault. On Mon, Nov 3, 2008 at 6:31 AM, taraniteja vishwanatha <taraniteja@xxxxxxxxx> wrote: > Hey, > > when do we get a general fault protection in the kernel? I am trying to > lookup in for some data pointer and when its not present , I return 0. > I am getting this error. > > Can anybody help?? > > -Tarani > -- Regards, Peter Teoh -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ