[lkml]   [2005]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 1/3] x86_64: Add a notify_die() call to the "no context" part of do_page_fault()
Tom Rini wrote:
> On Tue, Aug 30, 2005 at 12:33:25AM -0700, George Anzinger wrote:
>>Tom Rini wrote:
>>>CC: Andi Kleen <>
>>>This adds a call to notify_die() in the "no context" portion of
>>>do_page_fault() as someone on the chain might care and want to do a fixup.
>>>linux-2.6.13-trini/arch/x86_64/mm/fault.c | 4 ++++
>>>1 files changed, 4 insertions(+)
>>>diff -puN arch/x86_64/mm/fault.c~x86_64-no_context_hook
>>>--- linux-2.6.13/arch/x86_64/mm/fault.c~x86_64-no_context_hook 2005-08-29
>>>11:09:13.000000000 -0700
>>>+++ linux-2.6.13-trini/arch/x86_64/mm/fault.c 2005-08-29
>>>11:09:13.000000000 -0700
>>>@@ -514,6 +514,10 @@ no_context:
>>> if (is_errata93(regs, address))
>>> return;
>>>+ if (notify_die(DIE_PAGE_FAULT, "no context", regs, error_code, 14,
>>>+ return;
>>> * Oops. The kernel tried to access some bad page. We'll have to
>>> * terminate things with extreme prejudice.
>>Please use a more descriptive text than "no context". This bit of info
>>SHOULD be available to the gdb/kgdb user and should indicate why kgdb
>>was entered. It thus should be something like "bad kernel address" or
>>"illegal kernel address".
> "no context" is the label we're in, in the code. What it's actually
> used for is "hey, we (== kgdb) tried to read/write a very very bogus
> addr, time to longjmp". If it's not true that kgdb is at fault then we
> drop to the debugger anyhow, and the user can see where they came from.
No. What the user sees is the offending code (i.e. prior to the trap to
page_fault), NOT how kgdb happend to be called. The "no_context" is IN
the _context_ of page_fault, but that is lost by the time you get to
kgdb and ask to see _why_ (via, hint, hint: "p kgdb_info").

George Anzinger
HRT (High-res-timers):
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-08-30 16:53    [W:0.080 / U:0.720 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site