lkml.org 
[lkml]   [2020]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 9/9] x86/speculation: Remove all ANNOTATE_NOSPEC_ALTERNATIVE directives
On Tue, Apr 07, 2020 at 07:01:43PM +0200, Alexandre Chartre wrote:

> I think that's the case with smap_save:
>
> static __always_inline unsigned long smap_save(void)
> {
> unsigned long flags;
>
> asm volatile (ALTERNATIVE("", "pushf; pop %0; " __ASM_CLAC,
> X86_FEATURE_SMAP)
> : "=rm" (flags) : : "memory", "cc");
>
> return flags;
> }
>
> The alternative does change the stack but objtool won't complain
> because it handles the pushf and pop instruction.

Oh bugger; indeed! That'll wreck unwinding.

\
 
 \ /
  Last update: 2020-04-07 19:27    [W:0.060 / U:2.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site