[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrVeWE8NOry6-wiy1q7C0cT8JXSAJvg8T7pwV=Vubu27bw@mail.gmail.com>
Date: Wed, 5 Dec 2018 15:36:10 -0800
From: Andy Lutomirski <luto@...nel.org>
To: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Steven Rostedt <rostedt@...dmis.org>, X86 ML <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Andrew Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Jason Baron <jbaron@...mai.com>, Jiri Kosina <jkosina@...e.cz>,
David Laight <David.Laight@...lab.com>,
Borislav Petkov <bp@...en8.de>, julia@...com, jeyu@...nel.org,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v2 0/4] Static calls
>> On Dec 5, 2018, at 7:04 AM, Josh Poimboeuf <jpoimboe@...hat.com> wrote:
>
>
>> Anyway, I have a new objection to Josh’s create_gap proposal: what on
>> Earth will kernel CET do to it? Maybe my longjmp-like hack is
>> actually better.
>
> Does CET even care about iret? I assumed it didn't. If it does, your
> proposal would have the same problem, no?
I think it doesn’t, but it doesn’t really matter. The shadow stack looks like:
retaddr of function being poked
call do_int3 + 5
And, to emulate a call, you need to stick a new frame right in the
middle. At least with a longjmp-like approach, you can clobber the
“call do_int3 + 5” part and then INCSSP on the way out. To be fair, I
think this also sucks.
PeterZ, can we abuse NMI to make this problem go away? I don't
suppose that we have some rule that NMI handlers never wait for other
CPUs to finish doing anything?
Powered by blists - more mailing lists