1
0
Fork 0
remarkable-linux/scripts/mod
Andi Kleen a1745ad92f module/retpoline: Warn about missing retpoline in module
(cherry picked from commit caf7501a1b)

There's a risk that a kernel which has full retpoline mitigations becomes
vulnerable when a module gets loaded that hasn't been compiled with the
right compiler or the right option.

To enable detection of that mismatch at module load time, add a module info
string "retpoline" at build time when the module was compiled with
retpoline support. This only covers compiled C source, but assembler source
or prebuilt object files are not checked.

If a retpoline enabled kernel detects a non retpoline protected module at
load time, print a warning and report it in the sysfs vulnerability file.

[ tglx: Massaged changelog ]

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: gregkh@linuxfoundation.org
Cc: torvalds@linux-foundation.org
Cc: jeyu@kernel.org
Cc: arjan@linux.intel.com
Link: https://lkml.kernel.org/r/20180125235028.31211-1-andi@firstfloor.org
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-13 12:35:58 +01:00
..
.gitignore kbuild: trivial - remove trailing empty lines 2014-06-10 00:04:06 +02:00
Makefile objtool: Mark non-standard object files and directories 2016-02-29 08:35:02 +01:00
devicetable-offsets.c staging: fsl-mc: add support for device table matching 2016-06-26 17:14:03 -07:00
empty.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
file2alias.c staging: fsl-mc: add support for device table matching 2016-06-26 17:14:03 -07:00
mk_elfconfig.c kbuild: trivial - remove trailing empty lines 2014-06-10 00:04:06 +02:00
modpost.c module/retpoline: Warn about missing retpoline in module 2018-02-13 12:35:58 +01:00
modpost.h Avoid conflict with host definitions when cross-compiling 2015-08-20 14:55:54 +02:00
sumversion.c kbuild: trivial - use tabs for code indent where possible 2014-06-10 14:00:53 +02:00