On Thu, Mar 07, 2019 at 12:02:13PM -0800, Andy Lutomirski wrote:
> Should we maybe rename these functions? static_cpu_has() is at least
> reasonably obvious. But cpu_feature_enabled() is different for
> reasons I've never understood, and boot_cpu_has() is IMO terribly
> named. It's not about the
On Thu, Mar 7, 2019 at 9:06 AM Borislav Petkov wrote:
>
> On Thu, Mar 07, 2019 at 08:53:34AM -0800, h...@zytor.com wrote:
> > If we *do*, what is the issue here? Although boot_cpu_has() isn't
> > slow (it should in general be possible to reduce to one testb
> > instruction followed by a conditiona
On Thu, Mar 07, 2019 at 08:53:34AM -0800, h...@zytor.com wrote:
> If we *do*, what is the issue here? Although boot_cpu_has() isn't
> slow (it should in general be possible to reduce to one testb
> instruction followed by a conditional jump) it seems that "avoiding an
> alternatives slot" *should*
On March 6, 2019 11:29:47 PM PST, Borislav Petkov wrote:
>On Mon, Feb 11, 2019 at 08:42:51PM +0100, Borislav Petkov wrote:
>> On Mon, Feb 11, 2019 at 11:27:03AM -0800, Nadav Amit wrote:
>> > Is there any comment over static_cpu_has()? ;-)
>>
>> Almost:
>>
>> /*
>> * Static testing of CPU featur
On Mon, Feb 11, 2019 at 08:42:51PM +0100, Borislav Petkov wrote:
> On Mon, Feb 11, 2019 at 11:27:03AM -0800, Nadav Amit wrote:
> > Is there any comment over static_cpu_has()? ;-)
>
> Almost:
>
> /*
> * Static testing of CPU features. Used the same as boot_cpu_has().
> * These will statically p
> On Feb 11, 2019, at 11:42 AM, Borislav Petkov wrote:
>
> On Mon, Feb 11, 2019 at 11:27:03AM -0800, Nadav Amit wrote:
>> Is there any comment over static_cpu_has()? ;-)
>
> Almost:
>
> /*
> * Static testing of CPU features. Used the same as boot_cpu_has().
> * These will statically patch the
On Mon, Feb 11, 2019 at 11:27:03AM -0800, Nadav Amit wrote:
> Is there any comment over static_cpu_has()? ;-)
Almost:
/*
* 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 __
> On Feb 11, 2019, at 11:10 AM, Borislav Petkov wrote:
>
> On Mon, Feb 11, 2019 at 11:09:25AM -0800, Nadav Amit wrote:
>> 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_i
On Mon, Feb 11, 2019 at 11:09:25AM -0800, Nadav Amit wrote:
> 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
> On Feb 11, 2019, at 11:01 AM, Borislav Petkov 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, boo
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
> On Feb 11, 2019, at 10:29 AM, Borislav Petkov wrote:
>
>> diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
>> index 76d482a2b716..69f3e650ada8 100644
>> --- a/arch/x86/kernel/alternative.c
>> +++ b/arch/x86/kernel/alternative.c
>> @@ -667,15 +667,29 @@ void __init alte
> Subject: Re: [PATCH v2 10/20] x86: avoid W^X being broken during modules
> loading
For your next submission, please fix all your subjects:
The tip tree preferred format for patch subject prefixes is
'subsys/component:', e.g. 'x86/apic:', 'x86/mm/fault:', &
From: Nadav Amit
When modules and BPF filters are loaded, there is a time window in
which some memory is both writable and executable. An attacker that has
already found another vulnerability (e.g., a dangling pointer) might be
able to exploit this behavior to overwrite kernel code.
Prevent havi
14 matches
Mail list logo