[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wgQR1RfjA9V70cL-vTrhYBF9FWhPRaZahQuDaSazL+kAQ@mail.gmail.com>
Date: Fri, 11 Jan 2019 11:34:34 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Peter Anvin <hpa@...or.com>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>,
Nadav Amit <namit@...are.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
"the arch/x86 maintainers" <x86@...nel.org>,
Linux List Kernel Mailing <linux-kernel@...r.kernel.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
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 Cartwright <julia@...com>, Jessica Yu <jeyu@...nel.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Edward Cree <ecree@...arflare.com>,
Daniel Bristot de Oliveira <bristot@...hat.com>
Subject: Re: [PATCH v3 0/6] Static calls
On Fri, Jan 11, 2019 at 11:24 AM <hpa@...or.com> wrote:
>
> I still don't see why can't simply spin in the #BP handler until the patch is complete.
So here's at least one problem:
text_poke_bp()
text_poke(addr, &int3, sizeof(int3));
*interrupt*
interrupt has a static call
*BP*
poke_int3_handler
*BOOM*
Note how at BOOM we cannot just spin (or return) to wait for the
'int3' to be switched back. Becuase it never will. Because we are
interrupting the thing that would do that switch-back.
So we'd have to do the 'text_poke_bp()' sequence with interrupts
disabled. Which we can't do right now at least, because part of that
sequence involves that on_each_cpu(do_sync_core) thing, which needs
interrupts enabled.
See?
Or am I missing something?
Linus
Powered by blists - more mailing lists