Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Which gccs support new kernel option CONFIG_RETPOLINE?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
NightMonkey
Guru
Guru


Joined: 21 Mar 2003
Posts: 328
Location: Pittsburgh, PA

PostPosted: Wed Jan 17, 2018 11:48 pm    Post subject: Which gccs support new kernel option CONFIG_RETPOLINE? Reply with quote

Code:
Avoid speculative indirect branches in kernel (RETPOLINE) [Y/n/?] (NEW) ?
                                                                 
CONFIG_RETPOLINE:                                                       
                                                                                   
Compile kernel with the retpoline compiler options to guard against
kernel-to-user data leaks by avoiding speculative indirect                                                                                       
branches. Requires a compiler with -mindirect-branch=thunk-extern                                                                                 
support for full protection. The kernel may run slower.                                                                                           
                                                                                                                                                 
Without compiler support, at least indirect branches in assembler       
code are eliminated. Since this includes the syscall entry path,                                                                       
it is not entirely pointless.                                                                                                         
                                                                                                                                       
Symbol: RETPOLINE [=y]                                                                                                 
Type  : boolean                                                                                                                                   
Prompt: Avoid speculative indirect branches in kernel                                                             
  Location:                                                                                                                                       
    -> Processor type and features                                                                                 
  Defined at arch/x86/Kconfig:432                                 


Thanks! :D
_________________
I like Linux. :D
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1294
Location: Frankfurt, Germany

PostPosted: Thu Jan 18, 2018 1:41 am    Post subject: Reply with quote

Any recent GCC (5, 6, 7) compiler will compile your kernel if you set CONFIG_RETPOLINE=Y.

But only "indirect branches in assembler code" will be eliminated.

To get full protection, you'll need a GCC compiler with -mindirect-branch=thunk-extern support. So far no such compiler has been released.

GCC 7.3.0 will probably be released next week. It will be the first GCC compiler to support -mindirect-branch=thunk-extern.

If you're lion-hearted, you could also try the latest GCC 7 or 8 snapshots from GCC git server. They already contain support for -mindirect-branch=thunk-extern.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum