* Re: [Linux-ia64] Exception handling and recovery
2002-03-13 3:53 [Linux-ia64] Exception handling and recovery Keith Owens
@ 2002-03-13 4:51 ` David Mosberger
2002-03-13 5:22 ` Keith Owens
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: David Mosberger @ 2002-03-13 4:51 UTC (permalink / raw)
To: linux-ia64
>>>>> On Wed, 13 Mar 2002 14:53:31 +1100, Keith Owens <kaos@sgi.com> said:
Keith> Unlike i386, the ia64 exception table code only recovers from
Keith> invalid user space addresses. kdb can get other faults which
Keith> EX() does not currently allow recovery from. Is there any
Keith> reason why I should not add exception table handling to
Keith> ia64_fault(), to generalize the fault recovery mechanism?
You mean kdb would do get_user() on a bad pointer, which triggers
ia64_fault() and then you want to search the exception table in
ia64_fault()? I think it would be ok to do this (in the KDB patch).
--david
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Linux-ia64] Exception handling and recovery
2002-03-13 3:53 [Linux-ia64] Exception handling and recovery Keith Owens
2002-03-13 4:51 ` David Mosberger
@ 2002-03-13 5:22 ` Keith Owens
2002-03-13 5:32 ` David Mosberger
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Keith Owens @ 2002-03-13 5:22 UTC (permalink / raw)
To: linux-ia64
On Tue, 12 Mar 2002 20:51:13 -0800,
David Mosberger <davidm@napali.hpl.hp.com> wrote:
>>>>>> On Wed, 13 Mar 2002 14:53:31 +1100, Keith Owens <kaos@sgi.com> said:
>
> Keith> Unlike i386, the ia64 exception table code only recovers from
> Keith> invalid user space addresses. kdb can get other faults which
> Keith> EX() does not currently allow recovery from. Is there any
> Keith> reason why I should not add exception table handling to
> Keith> ia64_fault(), to generalize the fault recovery mechanism?
>
>You mean kdb would do get_user() on a bad pointer, which triggers
>ia64_fault() and then you want to search the exception table in
>ia64_fault()? I think it would be ok to do this (in the KDB patch).
Exactly. IMHO ia64_fault should always search_exception_table(), even
if kdb is not installed. Other architectures use exception tables to
detect if the hardware supports extra instructions, registers, MSR
values etc., exception recovery should be general purpose.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Linux-ia64] Exception handling and recovery
2002-03-13 3:53 [Linux-ia64] Exception handling and recovery Keith Owens
2002-03-13 4:51 ` David Mosberger
2002-03-13 5:22 ` Keith Owens
@ 2002-03-13 5:32 ` David Mosberger
2002-03-13 13:58 ` Jack Steiner
2002-03-13 14:08 ` Keith Owens
4 siblings, 0 replies; 6+ messages in thread
From: David Mosberger @ 2002-03-13 5:32 UTC (permalink / raw)
To: linux-ia64
>>>>> On Wed, 13 Mar 2002 16:22:45 +1100, Keith Owens <kaos@sgi.com> said:
Keith> Exactly. IMHO ia64_fault should always
Keith> search_exception_table(), even if kdb is not installed.
Keith> Other architectures use exception tables to detect if the
Keith> hardware supports extra instructions, registers, MSR values
IA-64 has CPUID, PAL, SAL, and ACPI for such purposes.
Keith> etc., exception recovery should be general purpose.
Generality for the sake of generality only results in bloat. The
exception handling should be used where it makes sense. Outside of
debugging, there is no good reason to search the exception tables in
ia64_fault(). In fact, it might only end up hiding real kernel bugs.
--david
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Linux-ia64] Exception handling and recovery
2002-03-13 3:53 [Linux-ia64] Exception handling and recovery Keith Owens
` (2 preceding siblings ...)
2002-03-13 5:32 ` David Mosberger
@ 2002-03-13 13:58 ` Jack Steiner
2002-03-13 14:08 ` Keith Owens
4 siblings, 0 replies; 6+ messages in thread
From: Jack Steiner @ 2002-03-13 13:58 UTC (permalink / raw)
To: linux-ia64
>
> On Tue, 12 Mar 2002 20:51:13 -0800,
> David Mosberger <davidm@napali.hpl.hp.com> wrote:
> >>>>>> On Wed, 13 Mar 2002 14:53:31 +1100, Keith Owens <kaos@sgi.com> said:
> >
> > Keith> Unlike i386, the ia64 exception table code only recovers from
> > Keith> invalid user space addresses. kdb can get other faults which
> > Keith> EX() does not currently allow recovery from. Is there any
> > Keith> reason why I should not add exception table handling to
> > Keith> ia64_fault(), to generalize the fault recovery mechanism?
> >
> >You mean kdb would do get_user() on a bad pointer, which triggers
> >ia64_fault() and then you want to search the exception table in
> >ia64_fault()? I think it would be ok to do this (in the KDB patch).
>
> Exactly. IMHO ia64_fault should always search_exception_table(), even
> if kdb is not installed. Other architectures use exception tables to
> detect if the hardware supports extra instructions, registers, MSR
> values etc., exception recovery should be general purpose.
>
I may have missed the context of the question, but on IA64 if kdb
makes a reference to a bad region 6 or 7 pointer, it may trigger an MCA.
MCAs are not recoverable via search_exception_table().
--
Thanks
Jack Steiner (651-683-5302) (vnet 233-5302) steiner@sgi.com
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Linux-ia64] Exception handling and recovery
2002-03-13 3:53 [Linux-ia64] Exception handling and recovery Keith Owens
` (3 preceding siblings ...)
2002-03-13 13:58 ` Jack Steiner
@ 2002-03-13 14:08 ` Keith Owens
4 siblings, 0 replies; 6+ messages in thread
From: Keith Owens @ 2002-03-13 14:08 UTC (permalink / raw)
To: linux-ia64
On Wed, 13 Mar 2002 07:58:32 -0600 (CST),
Jack Steiner <steiner@sgi.com> wrote:
>I may have missed the context of the question, but on IA64 if kdb
>makes a reference to a bad region 6 or 7 pointer, it may trigger an MCA.
>MCAs are not recoverable via search_exception_table().
Agreed, but some recoverable errors are not currently checking the
exception table. For example, sys_query_module = 0xe000000000a64000,
id 0xc000000000a64000 (same address, but region 6) fails with 'General
Exception: IA-64 Reserved Register/Field fault (data access)'. The
more resilient I can make kdb, the better I like it, hence my wish to
add recovery to ia64_fault().
^ permalink raw reply [flat|nested] 6+ messages in thread