lkml.org 
[lkml]   [2015]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [regression] x86/signal/64: Fix SS handling for signals delivered to 64-bit programs breaks dosemu
From
On Thu, Aug 13, 2015 at 9:34 AM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> Are you sure? From the description by Stas, the problem is literally
> the *restoring* action of the sigcontext, and trying to restore a SS
> value that is no longer valid.
>
> "The crash happens when DOS program terminates.
> At that point dosemu subverts the execution flow by
> replacing segregs and cs/ip ss/sp in sigcontext with its own.
> But __pad0 still has DOS SS, which crash because (presumably)
> the DOS LDT have been just removed"

Side note: if this is the main issue, and the problem is the "iret"
faulting when trying to restore SS (and causing an unexpected SIGSEGV
that dosemu crashes on), then an alternate model might be to keep the
save/restore SS code, but do a "VERW" on the SS descriptor in
restore_sigcontext(), and silently just replacing it with __USER_DS if
that fails.

Linus


\
 
 \ /
  Last update: 2015-08-13 19:01    [W:0.144 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site