|
Message-ID: <CA+55aFwBL5ArLXZ0+YggTbp6Qon+OM+Foihe0yrQOmRRvu96VQ@mail.gmail.com> Date: Thu, 23 Jun 2016 09:30:52 -0700 From: Linus Torvalds <torvalds@...ux-foundation.org> To: Oleg Nesterov <oleg@...hat.com> Cc: Andy Lutomirski <luto@...capital.net>, Andy Lutomirski <luto@...nel.org>, "the arch/x86 maintainers" <x86@...nel.org>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>, Borislav Petkov <bp@...en8.de>, Nadav Amit <nadav.amit@...il.com>, Kees Cook <keescook@...omium.org>, Brian Gerst <brgerst@...il.com>, "kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com>, Josh Poimboeuf <jpoimboe@...hat.com>, Jann Horn <jann@...jh.net>, Heiko Carstens <heiko.carstens@...ibm.com> Subject: Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) On Thu, Jun 23, 2016 at 7:31 AM, Oleg Nesterov <oleg@...hat.com> wrote: > > I didn't see the patches yet, quite possibly I misunderstood... But no, > I don't this we can do this (if we are not going to move ti->flags to > task_struct at least). Argh. Yes, ti->flags is used by others. Everything else should be thread-synchronous, but there's ti->flags. (And if we get scheduled, the thread-synchronous things will matter, of course): > Yes, but the problem is that a zombie thread can do its last schedule > before it is reaped. Worse, the wait sequence will definitely look at it. But that does bring up another possibility: do it at wait() time, when we do release_thread(). That's when we *used* to synchronously free it, before we did the lockless RCU walks. At that point, it has been removed from all the thread lists. So the only way to find it is through the RCU walks. Do any of *those* touch ti->flags? I'm not seeing it, and it sounds fixable if any do. If we could release the thread stack in release_thread(), that would be good. Andy - I bet you can at least test it. Linus
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.