* [uml-devel] [patch] fix fault handling
@ 2004-05-17 17:21 Gerd Knorr
2004-05-20 0:26 ` [uml-devel] " Jeff Dike
0 siblings, 1 reply; 2+ messages in thread
From: Gerd Knorr @ 2004-05-17 17:21 UTC (permalink / raw)
To: Jeff Dike, uml devel
Hi,
skas has a design bug: PTRACE_FAULTINFO doesn't pass enougth
informations. Specifically the trap_no is missing, so you
don't know for sure whenever the SIGSEGV was a page fault or
a general protection fault. I think that should be fixed in
skas4 (where we'll break backward compatibility anyway).
For the time being I've tried to fix that with the patch below,
which makes the uml kernel pass through general protection SEGV
to the app and seems to have no ill side effects.
Gerd
--- linux-2.6.5/arch/um/kernel/skas/process.c.segv 2004-05-14 18:40:36.155621129 +0200
+++ linux-2.6.5/arch/um/kernel/skas/process.c 2004-05-14 19:49:00.762159068 +0200
@@ -54,6 +54,17 @@
panic("handle_segv - PTRACE_FAULTINFO failed, errno = %d\n",
errno);
+ if (!(fault.is_write & 4)) {
+ /*
+ kernel fault -- likely that was general
+ protection fault (trap_no = 13), not a
+ page fault (trap_no = 14). But we don't
+ know for sure as PTRACE_FAULTINFO doesn't
+ tell us :-/
+ */
+ bad_segv(fault.addr, 0, fault.is_write);
+ return;
+ }
segv(fault.addr, 0, FAULT_WRITE(fault.is_write), 1, NULL);
}
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [uml-devel] Re: [patch] fix fault handling
2004-05-17 17:21 [uml-devel] [patch] fix fault handling Gerd Knorr
@ 2004-05-20 0:26 ` Jeff Dike
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2004-05-20 0:26 UTC (permalink / raw)
To: Gerd Knorr; +Cc: uml devel
kraxel@bytesex.org said:
> skas has a design bug: PTRACE_FAULTINFO doesn't pass enougth
> informations.
Yeah, this is the biggest technical mistake in skas3. I left it because I
didn't really want to touch the skas3 patch again, and instead fix it in
skas4.
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-05-19 23:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-17 17:21 [uml-devel] [patch] fix fault handling Gerd Knorr
2004-05-20 0:26 ` [uml-devel] " Jeff Dike
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.