From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x227rNlJHBWMOCse2xZCOscz0lnW+Uhb3r6adOrkbOvVFM8jbWcxiJ27DIjJFmx7vRv9t9rXp ARC-Seal: i=1; a=rsa-sha256; t=1517391981; cv=none; d=google.com; s=arc-20160816; b=LMGhVISstzu7Jr3fKjC1YzFbdLkKiDDTwPvInLT7lgWhG/PTpHv3weLxCU+cQEldcP kwxmZ0YdFnos6ROPxisNi+uPupLwrqw11FJNNSetlVOodKcP5/naijuYD3Yw0sN4Sc4e ADSBr4O+eK1d6Xv7080L9FdOl2fE1vkMY6c2fRgpUXLTH2zYcaGgEOZTuf3D+ASMBu2v DbxFywUlayU8hhZsa7B73HlmDweVKZaZ5OIeevpOl4QC7eAuHiVmyRMX/Ux9OibPzp+C DnkkpbZB303IgZGQVakLmk9Ln+FKjEEFgFR79BGl5mLRN378YEq7KuhWzEKWEjoQCIaU 25MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=precedence:content-disposition:content-transfer-encoding :mime-version:robot-unsubscribe:robot-id:git-commit-id:subject:to :references:in-reply-to:reply-to:cc:message-id:from:sender:date :arc-authentication-results; bh=IVj5XdU234fX0qEHycZisuZu749sGq4KmT53Dx0YaFs=; b=QGACQp8cFnJZ5l2PqCcDFF9enw2DSjInSuoWwJgllqEjlz5wTNUZxPmVcru2SKUjkS RFhrnLuUpYz5768bBTWhWn/XxtkPm8gxXxEddi1jECJEhYUjFqerL4NDS/NJHrOE67QD kqYu88wXXGboai+ERHB/qOFsT2Xxmeo0KLHn8jge82LoyBACpc15M/bpyUK0Xr84F1c2 9m1ODlpjXNXTA4tcuqbKfVY2j+zGlvW4Czjq/Z5s5sAv+hti2CGY07FOJvVFWlvqfgCH +F8+hzp3jL+t3G2FpWzoff+/2eLYfwzNiY/OP/7ojPwG3d8LsSWn4kXUBNQHa7jkWgLX Px2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of tipbot@zytor.com designates 65.50.211.136 as permitted sender) smtp.mailfrom=tipbot@zytor.com Authentication-Results: mx.google.com; spf=pass (google.com: domain of tipbot@zytor.com designates 65.50.211.136 as permitted sender) smtp.mailfrom=tipbot@zytor.com Date: Wed, 31 Jan 2018 01:42:53 -0800 Sender: tip tree robot From: tip-bot for Josh Poimboeuf Message-ID: Cc: torvalds@linux-foundation.org, jun.nakajima@intel.com, pbonzini@redhat.com, tglx@linutronix.de, jbaron@akamai.com, mingo@kernel.org, asit.k.mallick@intel.com, gregkh@linuxfoundation.org, tim.c.chen@linux.intel.com, arjan.van.de.ven@intel.com, linux-kernel@vger.kernel.org, jpoimboe@redhat.com, dan.j.williams@intel.com, hpa@zytor.com, dave.hansen@intel.com, rusty@rustcorp.com.au, jgross@suse.com, akataria@vmware.com, ashok.raj@intel.com, aarcange@redhat.com, ak@linux.intel.com, luto@kernel.org, dwmw2@infradead.org, peterz@infradead.org Reply-To: luto@kernel.org, dwmw2@infradead.org, peterz@infradead.org, aarcange@redhat.com, ak@linux.intel.com, jgross@suse.com, akataria@vmware.com, ashok.raj@intel.com, tim.c.chen@linux.intel.com, arjan.van.de.ven@intel.com, rusty@rustcorp.com.au, dave.hansen@intel.com, hpa@zytor.com, jpoimboe@redhat.com, dan.j.williams@intel.com, linux-kernel@vger.kernel.org, pbonzini@redhat.com, jun.nakajima@intel.com, torvalds@linux-foundation.org, asit.k.mallick@intel.com, gregkh@linuxfoundation.org, jbaron@akamai.com, tglx@linutronix.de, mingo@kernel.org In-Reply-To: <20180131041333.2x6blhxirc2kclrq@treble> References: <20180131041333.2x6blhxirc2kclrq@treble> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/pti] x86/paravirt: Remove 'noreplace-paravirt' cmdline option Git-Commit-ID: 12c69f1e94c89d40696e83804dd2f0965b5250cd X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1591079879723595372?= X-GMAIL-MSGID: =?utf-8?q?1591100814771909484?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: Commit-ID: 12c69f1e94c89d40696e83804dd2f0965b5250cd Gitweb: https://git.kernel.org/tip/12c69f1e94c89d40696e83804dd2f0965b5250cd Author: Josh Poimboeuf AuthorDate: Tue, 30 Jan 2018 22:13:33 -0600 Committer: Thomas Gleixner CommitDate: Wed, 31 Jan 2018 10:37:45 +0100 x86/paravirt: Remove 'noreplace-paravirt' cmdline option 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 Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Cc: Andrea Arcangeli Cc: Peter Zijlstra Cc: Andi Kleen Cc: Ashok Raj Cc: Greg KH Cc: Jun Nakajima Cc: Tim Chen Cc: Rusty Russell Cc: Dave Hansen Cc: Asit Mallick Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Jason Baron Cc: Paolo Bonzini Cc: Alok Kataria Cc: Arjan Van De Ven Cc: David Woodhouse Cc: Dan Williams Link: https://lkml.kernel.org/r/20180131041333.2x6blhxirc2kclrq@treble --- Documentation/admin-guide/kernel-parameters.txt | 2 -- arch/x86/kernel/alternative.c | 14 -------------- 2 files changed, 16 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 46b26bf..1e762c2 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -2742,8 +2742,6 @@ 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 diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index 30571fd..a481763 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -46,17 +46,6 @@ static int __init setup_noreplace_smp(char *str) } __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) \ @@ -599,9 +588,6 @@ void __init_or_module apply_paravirt(struct paravirt_patch_site *start, struct paravirt_patch_site *p; char insnbuf[MAX_PATCH_LEN]; - if (noreplace_paravirt) - return; - for (p = start; p < end; p++) { unsigned int used;