[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrWB6Xfyg7Z49tQ9M3+HadWaCaf5gexRyQYNNQso796yyQ@mail.gmail.com>
Date: Thu, 13 Aug 2015 11:05:46 -0700
From: Andy Lutomirski <luto@...capital.net>
To: Stas Sergeev <stsp@...t.ru>
Cc: Ingo Molnar <mingo@...nel.org>, X86 ML <x86@...nel.org>,
Linux kernel <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
"H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Brian Gerst <brgerst@...il.com>,
Borislav Petkov <bp@...en8.de>,
Stas Sergeev <stsp@...rs.sourceforge.net>
Subject: Re: [regression] x86/signal/64: Fix SS handling for signals delivered
to 64-bit programs breaks dosemu
On Thu, Aug 13, 2015 at 11:00 AM, Stas Sergeev <stsp@...t.ru> wrote:
> 13.08.2015 20:17, Andy Lutomirski пишет:
>>
>> On Thu, Aug 13, 2015 at 10:13 AM, Stas Sergeev <stsp@...t.ru> wrote:
>>
>>> Ah, I see your point now.
>>> But that's not what I mean, as it doesn't cover fs/gs, which
>>> is what Linus is looking to revert now too (I am building the
>>> testing kernels now).
>>> So you obviously don't want the flag that will control all 3
>>> things together without any lar heuristics, but I don't understand why...
>>> Yes, your heuristic+uc_flag may work, but IMHO far from
>>> perfection and TLS problem is not covered. I can test such
>>> a patch but I don't understand why you don't want the flag
>>> that will just control all things together.
>>
>> The fs/gs patch doesn't change anything, so there's nothing to
>> control. It just renamed fields that did nothing. (It turns out they
>> did something back before arch_prctl existed, but there's only a
>> narrow range of kernels like that, and I'm not at all convinced that
>> those kernels are ABI-compatible with modern kernels at all. This is
>> all pre-git.)
>
> The problem is that dosemu existed back then too.
> It still uses these fields as a place-holders. Well, this is a
> compile-time breakage only, so perhaps not as important
> as the run-time one, but still, you broke it in yet another way.
Great. What exactly is DOSEMU sticking in those fields? Are we now
stuck ignoring the contents in sigreturn because DOSEMU coopts them
for its own purposes?
>
>> Sure, it might make sense to change TLS behavior in signals at some
>> point, but I don't think we're there yet. We need to deal with
>> fsgsbase first, and that's a *huge* can of worms.
>
> My point is not when to fix TLS or how.
> But you can get the flag ready, for now controlling only SS
> and fixing the regression, but it will define the course of the
> further developments. When the time will come, it will cover
> also TLS, but why not to get such a flag ready now, without
> yet fixing TLS?
I think that if we create a flag to change semantics, we shouldn't
introduce the flag and make it look like it works without actually
changing the semantics.
--Andy
--
Andy Lutomirski
AMA Capital Management, LLC
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists