Skip to contentSkip to conversation

uml: Fix SKAS sig-handler reentrancy [before 2.6.11]

PATCH New [email protected] 1 participant 1 message Feb 4, 2005 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

PATCH 3/8 uml: Fix SKAS sig-handler reentrancy [before 2.6.11]

From: Jeff Dike <[email protected]>, Paolo 'Blaisorblade' Giarrusso <[email protected]>
CC: uml-devel <[email protected]>

This adds code which enables SIGSEGV reception to the SKAS sig_handler_common, which matches the tt code.

I still need to figure out why the SA_NODEFER flag was backed out in favor of this.

---

 linux-2.6.11-paolo/arch/um/kernel/skas/trap_user.c |    8 ++++++++
 1 files changed, 8 insertions(+)
arch/um/kernel/skas/trap_user.c renamed from arch/um/kernel/skas/trap_user.c~uml-no-defer +8 -0
diff -puN arch/um/kernel/skas/trap_user.c~uml-no-defer arch/um/kernel/skas/trap_user.c
@@ -20,6 +20,14 @@ void sig_handler_common_skas(int sig, vo
 	int save_errno = errno;
 	int save_user;
 
+	/* This is done because to allow SIGSEGV to be delivered inside a SEGV
+	 * handler.  This can happen in copy_user, and if SEGV is disabled,
+	 * the process will die.
+	 * XXX Figure out why this is better than SA_NODEFER
+	 */
+	if(sig == SIGSEGV)
+		change_sig(SIGSEGV, 1);
+
 	r = &TASK_REGS(get_current())->skas;
 	save_user = r->is_user;
 	r->is_user = 0;

_

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel