Skip to content

Commit ad368e5

Browse files
jpoimboegregkh
authored andcommitted
x86/paravirt: Remove 'noreplace-paravirt' cmdline option
commit 12c69f1 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 <jpoimboe@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Juergen Gross <jgross@suse.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ashok Raj <ashok.raj@intel.com> Cc: Greg KH <gregkh@linuxfoundation.org> Cc: Jun Nakajima <jun.nakajima@intel.com> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Asit Mallick <asit.k.mallick@intel.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Jason Baron <jbaron@akamai.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Alok Kataria <akataria@vmware.com> Cc: Arjan Van De Ven <arjan.van.de.ven@intel.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Dan Williams <dan.j.williams@intel.com> Link: https://lkml.kernel.org/r/20180131041333.2x6blhxirc2kclrq@treble Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7a3f122 commit ad368e5

2 files changed

Lines changed: 0 additions & 16 deletions

File tree

‎Documentation/admin-guide/kernel-parameters.txt‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2718,8 +2718,6 @@
27182718
norandmaps Don't use address space randomization. Equivalent to
27192719
echo 0 > /proc/sys/kernel/randomize_va_space
27202720

2721-
noreplace-paravirt [X86,IA-64,PV_OPS] Don't patch paravirt_ops
2722-
27232721
noreplace-smp [X86-32,SMP] Don't replace SMP instructions
27242722
with UP alternatives
27252723

‎arch/x86/kernel/alternative.c‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,6 @@ static int __init setup_noreplace_smp(char *str)
4646
}
4747
__setup("noreplace-smp", setup_noreplace_smp);
4848

49-
#ifdef CONFIG_PARAVIRT
50-
static int __initdata_or_module noreplace_paravirt = 0;
51-
52-
static int __init setup_noreplace_paravirt(char *str)
53-
{
54-
noreplace_paravirt = 1;
55-
return 1;
56-
}
57-
__setup("noreplace-paravirt", setup_noreplace_paravirt);
58-
#endif
59-
6049
#define DPRINTK(fmt, args...) \
6150
do { \
6251
if (debug_alternative) \
@@ -599,9 +588,6 @@ void __init_or_module apply_paravirt(struct paravirt_patch_site *start,
599588
struct paravirt_patch_site *p;
600589
char insnbuf[MAX_PATCH_LEN];
601590

602-
if (noreplace_paravirt)
603-
return;
604-
605591
for (p = start; p < end; p++) {
606592
unsigned int used;
607593

0 commit comments

Comments
 (0)