From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: [PATCH v2 10/20] x86: avoid W^X being broken during modules loading From: Nadav Amit In-Reply-To: <20190211194251.GS19618@zn.tnic> Date: Mon, 11 Feb 2019 12:32:41 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20190129003422.9328-1-rick.p.edgecombe@intel.com> <20190129003422.9328-11-rick.p.edgecombe@intel.com> <20190211182956.GN19618@zn.tnic> <1533F2BB-2284-499B-9912-6D74D0B87BC1@gmail.com> <20190211190108.GP19618@zn.tnic> <20190211191059.GR19618@zn.tnic> <3996E3F9-92D2-4561-84E9-68B43AC60F43@gmail.com> <20190211194251.GS19618@zn.tnic> To: Borislav Petkov Cc: Rick Edgecombe , Andy Lutomirski , Ingo Molnar , LKML , X86 ML , "H. Peter Anvin" , Thomas Gleixner , Dave Hansen , Peter Zijlstra , Damian Tometzki , linux-integrity , LSM List , Andrew Morton , Kernel Hardening , Linux-MM , Will Deacon , Ard Biesheuvel , Kristen Carlson Accardi , "Dock, Deneen T" , Kees Cook , Dave Hansen , Masami Hiramatsu List-ID: > On Feb 11, 2019, at 11:42 AM, Borislav Petkov wrote: >=20 > On Mon, Feb 11, 2019 at 11:27:03AM -0800, Nadav Amit wrote: >> Is there any comment over static_cpu_has()? ;-) >=20 > Almost: >=20 > /* > * Static testing of CPU features. Used the same as boot_cpu_has(). > * These will statically patch the target code for additional > * performance. > */ > static __always_inline __pure bool _static_cpu_has(u16 bit) Oh, I missed this comment. BTW: the =E2=80=9C__pure=E2=80=9D attribute is useless when = =E2=80=9C__always_inline=E2=80=9D is used. Unless it is intended to be some sort of comment, of course.