lkml.org 
[lkml]   [2018]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] retpoline/module: Taint kernel for missing retpoline in module
Date
From: Andi Kleen
> Sent: 12 January 2018 17:55
>
> There's a risk that a kernel that has full retpoline mitigations
> becomes vulnerable when a module gets loaded that hasn't been
> compiled with the right compiler or the right option.
>
> We cannot fix it, but should at least warn the user when that
> happens.
>
> Add a flag to each module if it has been compiled with RETPOLINE
>
> When the a module hasn't been compiled with a retpoline
> aware compiler, print a warning and set a taint flag.
>
> For modules it is checked at compile time, however it cannot
> check assembler or other non compiled objects used in the module link.

It is not unlikely that most of a module's code is released as a
binary 'blob', with only the part that needs to match the kernel ABI
compiled on the target system.
(This allows a single binary driver be loaded onto different Linux
kernel versions.)
Such code is unlikely to be compiled with the latest compiler.
Indeed, doing so may stop the module loading on old kernels.

David

\
 
 \ /
  Last update: 2018-01-15 13:48    [W:0.082 / U:4.796 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site