]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
x86, modpost: Replace last remnants of RETPOLINE with CONFIG_RETPOLINE
authorWANG Chao <chao.wang@ucloud.cn>
Mon, 10 Dec 2018 16:37:25 +0000 (00:37 +0800)
committerBrian Maly <brian.maly@oracle.com>
Mon, 4 Feb 2019 23:39:52 +0000 (18:39 -0500)
Commit

  4cd24de3a098 ("x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support")

replaced the RETPOLINE define with CONFIG_RETPOLINE checks. Remove the
remaining pieces.

 [ bp: Massage commit message. ]

Fixes: 4cd24de3a098 ("x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support")
Signed-off-by: WANG Chao <chao.wang@ucloud.cn>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jessica Yu <jeyu@kernel.org>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Kees Cook <keescook@chromium.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: linux-kbuild@vger.kernel.org
Cc: srinivas.eeda@oracle.com
Cc: stable <stable@vger.kernel.org>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20181210163725.95977-1-chao.wang@ucloud.cn
(cherry picked from commit e4f358916d528d479c3c12bd2fd03f2d5a576380)

Orabug: 29211617

Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Conflicts:
arch/x86/kernel/cpu/bugs.c
include/linux/compiler-gcc.h
include/linux/module.h
UEK4 either implements the changes in different files
or it does not have the patches that introduce the
lines changed by this cherry-picked commit.

Signed-off-by: Brian Maly <brian.maly@oracle.com>
arch/x86/kernel/cpu/spec_ctrl.c
kernel/module.c
scripts/mod/modpost.c

index bbc18f59da463d4cc02e8068ac7d0dab439eab2c..58472598e22db317d5998e16ab2e498d9a96ea32 100644 (file)
@@ -237,7 +237,7 @@ static int __init debugfs_spec_ctrl(void)
 }
 late_initcall(debugfs_spec_ctrl);
 
-#ifdef RETPOLINE
+#ifdef CONFIG_RETPOLINE
 /*
  * RETPOLINE does not protect against indirect speculation
  * in firmware code.  Enable IBRS to protect firmware execution.
index fb8953dd95117467e2f8e7e4deb0b5b635da438e..e06c4e4a5d76fd71f7c5f4c4a95ca51fd7ce5092 100644 (file)
@@ -63,7 +63,7 @@
 #include <uapi/linux/module.h>
 #include "module-internal.h"
 
-#ifdef RETPOLINE
+#ifdef CONFIG_RETPOLINE
 #include <asm/spec_ctrl.h>
 #endif
 
@@ -2724,7 +2724,7 @@ static int check_modinfo(struct module *mod, struct load_info *info, int flags)
        if (!get_modinfo(info, "intree"))
                add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
 
-#ifdef RETPOLINE
+#ifdef CONFIG_RETPOLINE
        if (!get_modinfo(info, "retpoline")) {
                if (retpoline_modules_only)
                        return -ENOEXEC;
index a767c895aa6cc3611ee621815526bee0e0418c45..85132eb02a64327d3dfd67538d5df56440210bd7 100644 (file)
@@ -2142,7 +2142,7 @@ static void add_intree_flag(struct buffer *b, int is_intree)
 /* Cannot check for assembler */
 static void add_retpoline(struct buffer *b)
 {
-       buf_printf(b, "\n#ifdef RETPOLINE\n");
+       buf_printf(b, "\n#ifdef CONFIG_RETPOLINE\n");
        buf_printf(b, "MODULE_INFO(retpoline, \"Y\");\n");
        buf_printf(b, "#endif\n");
 }