|
Message-ID: <CA+55aFwJ1=pyr9fP_UzDjnyX2qJ4mpxg_DTTiOJTv9PFW4dHgg@mail.gmail.com> Date: Fri, 24 Jun 2016 10:21:50 -0700 From: Linus Torvalds <torvalds@...ux-foundation.org> To: Brian Gerst <brgerst@...il.com> Cc: Peter Zijlstra <peterz@...radead.org>, Oleg Nesterov <oleg@...hat.com>, 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>, "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 Fri, Jun 24, 2016 at 5:25 AM, Brian Gerst <brgerst@...il.com> wrote: > * > * rdi: prev task we switched from > + * rsi: task we're switching to > */ > ENTRY(ret_from_fork) > - LOCK ; btr $TIF_FORK, TI_flags(%r8) > + LOCK ; btr $TIF_FORK, TI_flags(%rsi) /* rsi: this newly forked task */ > > call schedule_tail /* rdi: 'prev' task parameter */ > > I think you forgot GET_THREAD_INFO() here. RSI is the task, not the > thread_info. FYI, this goes away with my switch_to() rewrite, which > removes TIF_FORK. The point of that patch series is to make the thread_info and the task_struct pointer have the same value on x86 - we hide the thread_info inside the task_struct itself, and in fact at the beginning of it. That allows for the above kinds of simplification - use the task struct pointer and thread info interchangably in the asm code. But as mentioned, I must have missed something. There were a number of places where the code used the task_stack_page() and task_thread_info() interchangably, which used to work and is no longer true. There might simply be cases I missed. Or there might simply be cases I screwed up. 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.