Re: [regression] x86/signal/64: Fix SS handling for signals delivered to 64-bit programs breaks dosemu

From: Andy Lutomirski
Date: Thu Aug 13 2015 - 14:41:39 EST


On Thu, Aug 13, 2015 at 11:35 AM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Thu, Aug 13, 2015 at 10:51 AM, Stas Sergeev <stsp@xxxxxxx> wrote:
>>
>> Hello Linus, I verified that patch-minimal.diff is enough
>> to fix the problem, BUT! dosemu is in fact using the .fs and
>> .gs fields of sigcontext as a placeholders. Why the minimal
>> patch alone helps is simply because the kernel headers
>> installed in a system do not yet represent the newer kernel
>> developments and have the .fs and .gs fields in.
>
> Ok. So I'm inclined to do the bigger revert, just to fix the compile
> issue. It would be crazy to force some silly autoconf script for
> random header info.
>
> Of course, we could also just let the uabi version go out of sync with
> the internal version, but that sounds even worse. I think we'd be
> better off just leaving the old names, and just having big comments
> about this..
>
> Andy? I agree that we should strive to improve in this area, and this
> should be worked on, but that would seem to be a 4.3 issue (and mark
> that too for stable once it actually works). No?

Yeah, probably makes sense, but one of us should explicitly test CRIU
(both new and old versions) on the result. CRIU does interesting
things involving sigcontext and protocol buffers.

We can do something a bit silly wrt UABI in the long run:

union { unsigned long __pad0; unsigned long ss; };

I have half-written patches to do better, but I don't think they're
4.2 material. I'm already vastly over my quota for late-arriving 4.2
things.

Stas: I think uc_flags is okay. We don't currently read it during
sigreturn, but I see no reason that we can't start reading it.

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/