Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <A671F14F-3E03-4A97-9F54-426533077E0C@gmail.com>
Date: Mon, 11 Feb 2019 11:09:25 -0800
From: Nadav Amit <nadav.amit@...il.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 Carlson Accardi <kristen@...ux.intel.com>,
 "Dock, Deneen T" <deneen.t.dock@...el.com>,
 Kees Cook <keescook@...omium.org>,
 Dave Hansen <dave.hansen@...el.com>,
 Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [PATCH v2 10/20] x86: avoid W^X being broken during modules
 loading

> On Feb 11, 2019, at 11:01 AM, Borislav Petkov <bp@...en8.de> wrote:
> 
> On Mon, Feb 11, 2019 at 10:45:26AM -0800, Nadav Amit wrote:
>> Are you sure about that? This path is still used when modules are loaded.
> 
> Yes, I'm sure. Loading a module does a gazillion things so saving a
> couple of insns - yes, boot_cpu_has() is usually a RIP-relative MOV and a
> TEST - doesn't show even as a blip on any radar.

I fully agree, if that is the standard.

It is just that I find the use of static_cpu_has()/boot_cpu_has() to be very
inconsistent. I doubt that show_cpuinfo_misc(), copy_fpstate_to_sigframe(),
or i915_memcpy_init_early() that use static_cpu_has() are any hotter than
text_poke_early().

Anyhow, I’ll use boot_cpu_has() as you said.

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.