3.16.56-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Josh Poimboeuf <jpoim...@redhat.com>

commit 12c69f1e94c89d40696e83804dd2f0965b5250cd upstream.

The 'noreplace-paravirt' option disables paravirt patching, leaving the
original pv indirect calls in place.

That's highly incompatible with retpolines, unless we want to uglify
paravirt even further and convert the paravirt calls to retpolines.

As far as I can tell, the option doesn't seem to be useful for much
other than introducing surprising corner cases and making the kernel
vulnerable to Spectre v2.  It was probably a debug option from the early
paravirt days.  So just remove it.

Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
Signed-off-by: Thomas Gleixner <t...@linutronix.de>
Reviewed-by: Juergen Gross <jgr...@suse.com>
Cc: Andrea Arcangeli <aarca...@redhat.com>
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Andi Kleen <a...@linux.intel.com>
Cc: Ashok Raj <ashok....@intel.com>
Cc: Greg KH <gre...@linuxfoundation.org>
Cc: Jun Nakajima <jun.nakaj...@intel.com>
Cc: Tim Chen <tim.c.c...@linux.intel.com>
Cc: Rusty Russell <ru...@rustcorp.com.au>
Cc: Dave Hansen <dave.han...@intel.com>
Cc: Asit Mallick <asit.k.mall...@intel.com>
Cc: Andy Lutomirski <l...@kernel.org>
Cc: Linus Torvalds <torva...@linux-foundation.org>
Cc: Jason Baron <jba...@akamai.com>
Cc: Paolo Bonzini <pbonz...@redhat.com>
Cc: Alok Kataria <akata...@vmware.com>
Cc: Arjan Van De Ven <arjan.van.de....@intel.com>
Cc: David Woodhouse <dw...@infradead.org>
Cc: Dan Williams <dan.j.willi...@intel.com>
Link: https://lkml.kernel.org/r/20180131041333.2x6blhxirc2kclrq@treble
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings <b...@decadent.org.uk>
---
 Documentation/kernel-parameters.txt |  2 --
 arch/x86/kernel/alternative.c       | 14 --------------
 2 files changed, 16 deletions(-)

--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2271,8 +2271,6 @@ bytes respectively. Such letter suffixes
        norandmaps      Don't use address space randomization.  Equivalent to
                        echo 0 > /proc/sys/kernel/randomize_va_space
 
-       noreplace-paravirt      [X86,IA-64,PV_OPS] Don't patch paravirt_ops
-
        noreplace-smp   [X86-32,SMP] Don't replace SMP instructions
                        with UP alternatives
 
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -41,17 +41,6 @@ static int __init setup_noreplace_smp(ch
 }
 __setup("noreplace-smp", setup_noreplace_smp);
 
-#ifdef CONFIG_PARAVIRT
-static int __initdata_or_module noreplace_paravirt = 0;
-
-static int __init setup_noreplace_paravirt(char *str)
-{
-       noreplace_paravirt = 1;
-       return 1;
-}
-__setup("noreplace-paravirt", setup_noreplace_paravirt);
-#endif
-
 #define DPRINTK(fmt, args...)                                          \
 do {                                                                   \
        if (debug_alternative)                                          \
@@ -574,9 +563,6 @@ void __init_or_module apply_paravirt(str
        struct paravirt_patch_site *p;
        char insnbuf[MAX_PATCH_LEN];
 
-       if (noreplace_paravirt)
-               return;
-
        for (p = start; p < end; p++) {
                unsigned int used;
 

Reply via email to