Received: by 10.223.185.116 with SMTP id b49csp1117323wrg; Fri, 23 Feb 2018 12:13:25 -0800 (PST) X-Google-Smtp-Source: AH8x225OcW5vbJEDAhZb3tHf+lfkq8JuNwRDv7z+1JAoRzgGHqElaNrZ4rZOQGlzPIdu/eyq5lMd X-Received: by 10.99.143.13 with SMTP id n13mr2352845pgd.105.1519416805042; Fri, 23 Feb 2018 12:13:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519416805; cv=none; d=google.com; s=arc-20160816; b=JnbLG9mq7+p4+UPLnnWzP3g7243NYmyWV42JNqMdd49H2/j4N8YcyPRmCyXAfQpFD+ /UrMy5zYZMgZitDaiVLsbWH6R/ldPzv2lLy8JrsC7OqEjluNgD4CJeKA7zSo1W0YRAEN /OGMk6fn5cNo2lUQg9ib3lrwMOLucrCXiFRnNJukBo1vLfmcjRaIqK4/KE579pCzhGgl vl3oHZakrLj7Yh7D1EGPmJOE6bl7RqlANG6O5rqTQNVaAc/7vboDgrrsf6Tdfhbkzk9M /XF30jytXu4v5rGZ7C8uPaTQ/IHsLTI8vT8xSBZ4oU05whMLKCpq5L0cdlM/uriMtDvV kuzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=keKZfa0/yTQRKDzj+UDb+be0Tgy/vH89DnL+/r2fENw=; b=XdMi4xZTYBUT+o/ney2GPGAyWtdJmW3t+YZ7qouxHtdP2Dadgn96yL3f/rC7bdnN6R xCGAC+OBf+FmQqz7ATHn9YmQuGcK2rXpGF6dZARCJIOzIqLOVoEAioayJp5RRz2dovVY yOg/27kiL0gxFPVcnh7MbgHcGZPvgJS/aOChDuuOHCKksINkCGd0nqg3GfIRvd8umfx+ Yjip0Y/r0wNvg/Eha5Bjo+AJ2k5tuTXsdBJfm8hr4on8O78kYt4YmH1YejKhJ8QMPu/P 1yO6NZmmFH7TahEtcYaCSdpGIci2PB4W0VpmteQcB4EPKnOfmX15D82SE1kPda4KHnK1 1/Tw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l10si2298972pfc.203.2018.02.23.12.13.09; Fri, 23 Feb 2018 12:13:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932989AbeBWUMf (ORCPT + 99 others); Fri, 23 Feb 2018 15:12:35 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:40576 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932407AbeBWSl0 (ORCPT ); Fri, 23 Feb 2018 13:41:26 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id F214E1225; Fri, 23 Feb 2018 18:41:24 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Josh Poimboeuf , Thomas Gleixner , Juergen Gross , Andrea Arcangeli , Peter Zijlstra , Andi Kleen , Ashok Raj , Jun Nakajima , Tim Chen , Rusty Russell , Dave Hansen , Asit Mallick , Andy Lutomirski , Linus Torvalds , Jason Baron , Paolo Bonzini , Alok Kataria , Arjan Van De Ven , David Woodhouse , Dan Williams , David Woodhouse , Jack Wang Subject: [PATCH 4.4 183/193] x86/paravirt: Remove noreplace-paravirt cmdline option Date: Fri, 23 Feb 2018 19:26:56 +0100 Message-Id: <20180223170354.863131368@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Josh Poimboeuf (cherry picked from commit 12c69f1e94c89d40696e83804dd2f0965b5250cd) 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 Signed-off-by: David Woodhouse [jwang: chery pick to 4.4] Signed-off-by: Jack Wang Signed-off-by: Greg Kroah-Hartman --- 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 @@ -2565,8 +2565,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 @@ -45,17 +45,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) \ @@ -587,9 +576,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;