public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.13] x86_64: Add notify_die() to another spot in do_page_fault()
@ 2005-09-08 16:38 Tom Rini
  2005-09-09  8:01 ` Andi Kleen
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2005-09-08 16:38 UTC (permalink / raw)
  To: Andrew Morton, Kernel Mailing List; +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 arch/x86_64/mm/fault.c
--- linux-2.6.13/arch/x86_64/mm/fault.c~x86_64-no_context_hook	2005-09-01 12:00:43.000000000 -0700
+++ linux-2.6.13-trini/arch/x86_64/mm/fault.c	2005-09-01 12:00:43.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,
+				SIGSEGV) == NOTIFY_STOP)
+		return;
+
 /*
  * Oops. The kernel tried to access some bad page. We'll have to
  * terminate things with extreme prejudice.

-- 
Tom Rini
http://gate.crashing.org/~trini/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2.6.13] x86_64: Add notify_die() to another spot in do_page_fault()
  2005-09-08 16:38 [PATCH 2.6.13] x86_64: Add notify_die() to another spot in do_page_fault() Tom Rini
@ 2005-09-09  8:01 ` Andi Kleen
  2005-09-09 12:47   ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2005-09-09  8:01 UTC (permalink / raw)
  To: Tom Rini; +Cc: Andrew Morton, Kernel Mailing List

On Thursday 08 September 2005 18:38, Tom Rini wrote:
> 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
> arch/x86_64/mm/fault.c ---
> linux-2.6.13/arch/x86_64/mm/fault.c~x86_64-no_context_hook	2005-09-01
> 12:00:43.000000000 -0700 +++
> linux-2.6.13-trini/arch/x86_64/mm/fault.c	2005-09-01 12:00:43.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,
> +				SIGSEGV) == NOTIFY_STOP)
> +		return;
> +

But how would the chain users distingush this from the DIE_PAGE_FAULT
reported at the beginning of the page fault handler? I don't see how
it can work. If anything you would need a DIE_NO_CONTEXT or somesuch, no? 

-Andi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2.6.13] x86_64: Add notify_die() to another spot in do_page_fault()
  2005-09-09  8:01 ` Andi Kleen
@ 2005-09-09 12:47   ` Tom Rini
  2005-09-09 12:52     ` Andi Kleen
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2005-09-09 12:47 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Andrew Morton, Kernel Mailing List

On Fri, Sep 09, 2005 at 10:01:00AM +0200, Andi Kleen wrote:
> On Thursday 08 September 2005 18:38, Tom Rini wrote:
> > 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
> > arch/x86_64/mm/fault.c ---
> > linux-2.6.13/arch/x86_64/mm/fault.c~x86_64-no_context_hook	2005-09-01
> > 12:00:43.000000000 -0700 +++
> > linux-2.6.13-trini/arch/x86_64/mm/fault.c	2005-09-01 12:00:43.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,
> > +				SIGSEGV) == NOTIFY_STOP)
> > +		return;
> > +
> 
> But how would the chain users distingush this from the DIE_PAGE_FAULT
> reported at the beginning of the page fault handler? I don't see how
> it can work. If anything you would need a DIE_NO_CONTEXT or somesuch, no? 

"no context" is passed to the functions as well, and in KGDB we strcmp
on that.

-- 
Tom Rini
http://gate.crashing.org/~trini/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2.6.13] x86_64: Add notify_die() to another spot in do_page_fault()
  2005-09-09 12:47   ` Tom Rini
@ 2005-09-09 12:52     ` Andi Kleen
  0 siblings, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2005-09-09 12:52 UTC (permalink / raw)
  To: Tom Rini; +Cc: Andrew Morton, Kernel Mailing List

On Friday 09 September 2005 14:47, Tom Rini wrote:

> "no context" is passed to the functions as well, and in KGDB we strcmp
> on that.

Please define a new DIE code instead.

-Andi




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-09-09 12:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-08 16:38 [PATCH 2.6.13] x86_64: Add notify_die() to another spot in do_page_fault() Tom Rini
2005-09-09  8:01 ` Andi Kleen
2005-09-09 12:47   ` Tom Rini
2005-09-09 12:52     ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox