public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* What is i386 thread.trapno?
@ 2001-06-03  2:31 Jeff Dike
  2001-06-03  2:42 ` Keith Owens
  2001-06-03 11:16 ` Alan Cox
  0 siblings, 2 replies; 4+ messages in thread
From: Jeff Dike @ 2001-06-03  2:31 UTC (permalink / raw)
  To: linux-kernel

With a normal segfault, the handler gets a trapno == 14 in the sigcontext.  
With UML, I can make a process infinitely segfault with trapno == 1.  The page 
being accessed is correctly mapped in according to /proc/<pid>/maps, so the 
odd trapno is the only clue that I can see that something is different.

The i386 page fault handler sets trap_no to 14, so the fault isn't coming from 
there, but I can't see where a SIGSEGV is being delivered to a process with 
thread.trap_no == 1.

So:
	What do these trap numbers mean?
	Where can I read about them?
and
	Where's this segfault coming from?

				Jeff



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

* Re: What is i386 thread.trapno?
  2001-06-03  2:31 What is i386 thread.trapno? Jeff Dike
@ 2001-06-03  2:42 ` Keith Owens
  2001-06-03 11:16 ` Alan Cox
  1 sibling, 0 replies; 4+ messages in thread
From: Keith Owens @ 2001-06-03  2:42 UTC (permalink / raw)
  To: Jeff Dike; +Cc: linux-kernel

On Sat, 02 Jun 2001 21:31:42 -0500, 
Jeff Dike <jdike@karaya.com> wrote:
>The i386 page fault handler sets trap_no to 14, so the fault isn't coming from 
>there, but I can't see where a SIGSEGV is being delivered to a process with 
>thread.trap_no == 1.
>
>So:
>	What do these trap numbers mean?
>	Where can I read about them?

Intel Architecture Software Developer's Manual Volume 3: System
Programming.  Interrupt and Exception Handling, table 5.1 (postscript
extract of that table has been copied in separate private mail).
intel-ia32-arch-vol3-24319202.pdf.

>and
>	Where's this segfault coming from?

Probably do_debug() which sets trapno = 1 and also uses
handle_vm86_trap(,,1).


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

* Re: What is i386 thread.trapno?
  2001-06-03  2:31 What is i386 thread.trapno? Jeff Dike
  2001-06-03  2:42 ` Keith Owens
@ 2001-06-03 11:16 ` Alan Cox
  2001-06-03 17:32   ` Jeff Dike
  1 sibling, 1 reply; 4+ messages in thread
From: Alan Cox @ 2001-06-03 11:16 UTC (permalink / raw)
  To: Jeff Dike; +Cc: linux-kernel

> The i386 page fault handler sets trap_no to 14, so the fault isn't coming from 
> there, but I can't see where a SIGSEGV is being delivered to a process with 
> thread.trap_no == 1.

include/asm-i386/siginfo.h

	

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

* Re: What is i386 thread.trapno?
  2001-06-03 11:16 ` Alan Cox
@ 2001-06-03 17:32   ` Jeff Dike
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Dike @ 2001-06-03 17:32 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

alan@lxorguk.ukuu.org.uk said:
> include/asm-i386/siginfo.h 

Using SA_INFO would be nice, but it doesn't look like the siginfo will tell me 
whether the faulting operation is a read or write.

				Jeff



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

end of thread, other threads:[~2001-06-03 17:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-03  2:31 What is i386 thread.trapno? Jeff Dike
2001-06-03  2:42 ` Keith Owens
2001-06-03 11:16 ` Alan Cox
2001-06-03 17:32   ` Jeff Dike

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