[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFxjs6D_C8hg4dBTbk5jfg+dVN1=c_i5sTDF-7LgjupY=g@mail.gmail.com>
Date: Tue, 17 May 2016 10:21:08 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>,
Ingo Molnar <mingo@...nel.org>,
Matt Fleming <matt@...eblueprint.co.uk>,
Alex Thorlton <athorlton@....com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Borislav Petkov <bp@...en8.de>,
Andy Lutomirski <luto@...nel.org>,
Denys Vlasenko <dvlasenk@...hat.com>
Subject: Re: [PATCH] x86/asm/entry: fix stack return address retrieval in thunk
On Tue, May 17, 2016 at 9:51 AM, Steven Rostedt <rostedt@...dmis.org> wrote:
>
> And did we only get this wrong in two places? That is, do we really
> know how little our brains really are?
Doing some grepping seems to imply that was it.
There's a fair number of cases in
arch/x86/crypto/aesni-intel_asm.S
but they actually use the proper FRAME_OFFSET.
Here's my grep pattern:
git grep -Elw 'FRAME_((BEGIN)|(END))' |
xargs grep --color=always -E
'(FRAME_((BEGIN)|(END)))|(\(.*%[er]sp.*\))' |
less -SFRX
I'm not going to guarantee anything, but both
arch/x86/entry/thunk_64.S and arch/x86/platform/efi/efi_stub_64.S
stood out with this grep as having stack pointer accesses between a
FRAME_BEGIN and FRAME_END, so at least that pattern ends up finding
the two known problem cases.
Yeah, I know, I should have used 'awk' for this. Sue me. It's been too
long since I did awk state machines. There's a reason there's a "git
grep" but not a "git awk" command.
Linus
Powered by blists - more mailing lists