lkml.org 
[lkml]   [2018]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 02/12] x86/retpoline: Add initial retpoline support
From
Date
On Sat, 2018-01-06 at 11:49 +0000, David Woodhouse wrote:
>
> +#if defined(CONFIG_X86_64) && defined(RETPOLINE)
> +/*
> + * Since the inline asm uses the %V modifier which is only in newer GCC,
> + * the 64-bit one is dependent on RETPOLINE not CONFIG_RETPOLINE.
> + */
> +# define NOSPEC_CALL ALTERNATIVE(                              \
> +       "call *%[thunk_target]\n",                              \
> +       "call __x86.indirect_thunk.%V[thunk_target]\n",         \
> +       X86_FEATURE_RETPOLINE)
> +# define THUNK_TARGET(addr) [thunk_target] "r" (addr)
> +#elif defined(CONFIG_X86_64) && defined(CONFIG_RETPOLINE)

                 ^^^^^^^^^^^^^ 

Arse. That'll invalidate my 32-bit test runs somewhat. I knew I should
have also repeated the "deliberately break the ASM and check it
crashes" tests. V6 coming in a little while, with 32-bit fixed
properly...

> +/*
> + * For i386 we use the original ret-equivalent retpoline, because
> + * otherwise we'll run out of registers. We don't care about CET
> + * here, anyway.
> + */[unhandled content-type:application/x-pkcs7-signature]
\
 
 \ /
  Last update: 2018-01-06 18:33    [W:0.107 / U:3.068 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site