|
Message-ID: <BEFCBDFB-F08F-441D-8BCC-07E5F448D9D2@vmware.com> Date: Fri, 25 Jan 2019 18:28:04 +0000 From: Nadav Amit <namit@...are.com> To: Borislav Petkov <bp@...en8.de> CC: Rick Edgecombe <rick.p.edgecombe@...el.com>, Andy Lutomirski <luto@...nel.org>, Ingo Molnar <mingo@...hat.com>, LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>, "H. Peter Anvin" <hpa@...or.com>, Thomas Gleixner <tglx@...utronix.de>, Dave Hansen <dave.hansen@...ux.intel.com>, Peter Zijlstra <peterz@...radead.org>, Damian Tometzki <linux_dti@...oud.com>, linux-integrity <linux-integrity@...r.kernel.org>, LSM List <linux-security-module@...r.kernel.org>, Andrew Morton <akpm@...ux-foundation.org>, Kernel Hardening <kernel-hardening@...ts.openwall.com>, Linux-MM <linux-mm@...ck.org>, Will Deacon <will.deacon@....com>, Ard Biesheuvel <ard.biesheuvel@...aro.org>, "kristen@...ux.intel.com" <kristen@...ux.intel.com>, "deneen.t.dock@...el.com" <deneen.t.dock@...el.com>, Kees Cook <keescook@...omium.org>, Dave Hansen <dave.hansen@...el.com>, Masami Hiramatsu <mhiramat@...nel.org> Subject: Re: [PATCH 01/17] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()" > On Jan 25, 2019, at 1:30 AM, Borislav Petkov <bp@...en8.de> wrote: > > On Wed, Jan 16, 2019 at 04:32:43PM -0800, Rick Edgecombe wrote: >> From: Nadav Amit <namit@...are.com> >> >> text_mutex is currently expected to be held before text_poke() is >> called, but we kgdb does not take the mutex, and instead *supposedly* >> ensures the lock is not taken and will not be acquired by any other core >> while text_poke() is running. >> >> The reason for the "supposedly" comment is that it is not entirely clear >> that this would be the case if gdb_do_roundup is zero. > > I guess that variable name is "kgdb_do_roundup” ? Yes. Will fix. > >> This patch creates two wrapper functions, text_poke() and > > Avoid having "This patch" or "This commit" in the commit message. It is > tautologically useless. > > Also, do > > $ git grep 'This patch' Documentation/process > > for more details. Ok. >> >> +void *text_poke_kgdb(void *addr, const void *opcode, size_t len) > > text_poke_unlocked() I guess. I don't think kgdb is that special that it > needs its own function flavor. Tglx suggested this naming to prevent anyone from misusing text_poke_kdgb(). This is a very specific use-case that nobody else should need. Regards, Nadav
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.