<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 20, 2017 at 9:43 PM, Adam Jackson <span dir="ltr"><<a href="mailto:ajax@redhat.com" target="_blank">ajax@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The only consumer of this is the Linux vm86 backend for int10 (which you<br>
should not use), and there all it serves to do is make signals generated<br>
by the vm86 task non-fatal. In practice this error appears never to<br>
happen, and marching ahead with root privileges after arbitrary code has<br>
raised a signal seems like a poor plan.<br>
<br>
Remove the usage in the vm86 code, making this error fatal.<br>
<br>
Signed-off-by: Adam Jackson <<a href="mailto:ajax@redhat.com">ajax@redhat.com</a>><br>
---<br>
 hw/xfree86/common/xf86.h                            |  1 -<br>
 hw/xfree86/common/xf86Events.c                      | 14 --------------<br>
 hw/xfree86/os-support/linux/<wbr>int10/vm86/linux_vm86.c | 13 +------------<br>
 3 files changed, 1 insertion(+), 27 deletions(-)<br>
<br>
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h<br>
index db6e299b31..43b693143e 100644<br>
--- a/hw/xfree86/common/xf86.h<br>
+++ b/hw/xfree86/common/xf86.h<br>
@@ -215,7 +215,6 @@ extern _X_EXPORT void xf86DisableGeneralHandler(void *handler);<br>
 extern _X_EXPORT void xf86EnableGeneralHandler(void *handler);<br>
 extern _X_EXPORT InputHandlerProc xf86SetConsoleHandler(<wbr>InputHandlerProc<br>
                                                         handler, void *data);<br>
-extern _X_EXPORT void xf86InterceptSignals(int *signo);<br>
 extern _X_EXPORT void xf86ProcessActionEvent(<wbr>ActionEvent action, void *arg);<br>
 extern _X_EXPORT void xf86PrintBacktrace(void);<br>
 extern _X_EXPORT Bool xf86VTOwner(void);<br>
diff --git a/hw/xfree86/common/<wbr>xf86Events.c b/hw/xfree86/common/<wbr>xf86Events.c<br>
index e2e6ca7691..a27c7ff1b0 100644<br>
--- a/hw/xfree86/common/<wbr>xf86Events.c<br>
+++ b/hw/xfree86/common/<wbr>xf86Events.c<br>
@@ -267,15 +267,6 @@ xf86RemoveEnabledDevice(<wbr>InputInfoPtr pInfo)<br>
     InputThreadUnregisterDev(<wbr>pInfo->fd);<br>
 }<br>
<br>
-static int *xf86SignalIntercept = NULL;<br>
-<br>
-void<br>
-xf86InterceptSignals(int *signo)<br>
-{<br>
-    if ((xf86SignalIntercept = signo))<br>
-        *signo = -1;<br>
-}<br>
-<br>
 /*<br>
  * xf86SigWrapper --<br>
  *    Catch unexpected signals and exit or continue cleanly.<br>
@@ -283,11 +274,6 @@ xf86InterceptSignals(int *signo)<br>
 int<br>
 xf86SigWrapper(int signo)<br>
 {<br>
-    if (xf86SignalIntercept && (*xf86SignalIntercept < 0)) {<br>
-        *xf86SignalIntercept = signo;<br>
-        return 0;               /* continue */<br>
-    }<br>
-<br>
     xf86Info.caughtSignal = TRUE;<br>
     return 1;                   /* abort */<br>
 }<br>
diff --git a/hw/xfree86/os-support/linux/<wbr>int10/vm86/linux_vm86.c b/hw/xfree86/os-support/linux/<wbr>int10/vm86/linux_vm86.c<br>
index 1876983991..134809814f 100644<br>
--- a/hw/xfree86/os-support/linux/<wbr>int10/vm86/linux_vm86.c<br>
+++ b/hw/xfree86/os-support/linux/<wbr>int10/vm86/linux_vm86.c<br>
@@ -231,20 +231,9 @@ vm86_GP_fault(xf86Int10InfoPtr pInt)<br>
 static int<br>
 do_vm86(xf86Int10InfoPtr pInt)<br>
 {<br>
-    int retval, signo;<br>
+    int retval;<br>
<br>
-    xf86InterceptSignals(&signo);<br>
     retval = vm86_rep(VM86S);<br>
-    xf86InterceptSignals(NULL);<br>
-<br>
-    if (signo >= 0) {<br>
-        xf86DrvMsg(pInt->pScrn-><wbr>scrnIndex, X_ERROR,<br>
-                   "vm86() syscall generated signal %d.\n", signo);<br>
-        dump_registers(pInt);<br>
-        dump_code(pInt);<br>
-        stack_trace(pInt);<br>
-        return 0;<br>
-    }<br>
<br>
     switch (VM86_TYPE(retval)) {<br>
     case VM86_UNKNOWN:<br>
<span class="gmail-HOEnZb"><font color="#888888">--<br>
2.14.3<br>
<br>
______________________________<wbr>_________________<br>
<a href="mailto:xorg-devel@lists.x.org">xorg-devel@lists.x.org</a>: X.Org development<br>
Archives: <a href="http://lists.x.org/archives/xorg-devel" rel="noreferrer" target="_blank">http://lists.x.org/archives/<wbr>xorg-devel</a><br>
Info: <a href="https://lists.x.org/mailman/listinfo/xorg-devel" rel="noreferrer" target="_blank">https://lists.x.org/mailman/<wbr>listinfo/xorg-devel</a></font></span></blockquote></div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">I can't tell whether or not this happens in practice, but for the code part, this is:<br></div><div class="gmail_extra"><br></div>Reviewed-by: Olivier Fourdan <<a href="mailto:ofourdan@redhat.com" target="_blank">ofourdan@redhat.com</a>></div></div>