[lkml]   [2018]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 20/35] x86: Force asm-goto
On Thu, 2018-01-18 at 14:48 +0100, Peter Zijlstra wrote:
> Now that we have objtool to validate the correctness of asm-goto
> constructs we can start using it to guarantee the absence of dynamic
> branches (and thus speculation).
> A primary prerequisite for this is of course that the compiler
> supports asm-goto. This effecively lifts the minimum GCC version to
> build an x86 kernel to gcc-4.5.
> Signed-off-by: Peter Zijlstra (Intel) <>

This is cute, but it's the wrong way round. We *know* people will be
immediately backporting this to every stable kernel they're still

Let's put it in using alternatives (or the 'else lfence' version,
even), and then clean it up with static_cpu_has() on *top* of that, so
that the latter doesn't have to be backported.[unhandled content-type:application/x-pkcs7-signature]
 \ /
  Last update: 2018-01-18 17:26    [W:0.104 / U:1.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site