Received: by 10.223.176.5 with SMTP id f5csp712419wra; Fri, 9 Feb 2018 06:05:40 -0800 (PST) X-Google-Smtp-Source: AH8x227iC+lqWyzUfHOODTg20TFLnlOaxPPPw8JswPw/08labHgEtTEaW1KJHDw9HgW0INF/zzVy X-Received: by 2002:a17:902:7789:: with SMTP id o9-v6mr2700348pll.84.1518185140458; Fri, 09 Feb 2018 06:05:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518185140; cv=none; d=google.com; s=arc-20160816; b=RhdA5W1yfCPudtNQn5WnRsUEdaIe2e7lvD0ecZrDCoEM8mvzFZ67yscccc6OXRzVjR Hts1/EQkOErcLNpvJtAEIzRqEOnRoF0+warPbBO05d3dOXtXkF2RvIolGQGuwtd4riSM Nq24LQLMd3tTvBnxW2LE8dQyPcVKq/XyfwpoDyHehcPEwhnAbVPqpygxqU6EZ60EX895 RE0tCXrOHYDuOA3Y3M1RK1aXQb2AP+I74nzV5syJxs9+vJeb0KwLd047hczZCUlYbf4s 15JcCZNUXBnd0WWEyktkfAl9EgLVHuZMHw88+63WRHGOG9oDTt2tIOG4wlYXJFReNgCV 9bsA== 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=/50I5DHxo0EhjPy/JEi09EoyDIJuygkXn93erxeozKE=; b=syKSXdgiif7aIRyXS1KLi75d94OJJwhCLMvgTQNwVDJfMYYAlEk6ulQttKmMWgVitt glG6qiwRpxz4g6cj07skTcocDwkZV0uMKW4BdY1ms0ji1eYi72O/oZkuTJn585/LUTbz 6Ws4OlvufzOZDlJX6O17uskvv7oiHIqIqkmrAfuZv1t+MFBa39fsgw/IOZS51q8aPzwy KjQ41ih3+70+tFnICx0i6f36YHGid1QRFxBksaRRkwtQiZqzgBJktrj8UcNoXC1FXJoq fPGuioXjVsEe6HxcrOMQ1Niw2BMsp+gm2epLw2NerMkI+1oB/aazzIJmQpOZ7aqzAnyN zwUg== 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 m37-v6si1559397plg.195.2018.02.09.06.05.25; Fri, 09 Feb 2018 06:05:40 -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 S1753481AbeBIODS (ORCPT + 99 others); Fri, 9 Feb 2018 09:03:18 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:50924 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753266AbeBINni (ORCPT ); Fri, 9 Feb 2018 08:43:38 -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 9179C1081; Fri, 9 Feb 2018 13:43:29 +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 Subject: [PATCH 4.9 70/92] x86/paravirt: Remove noreplace-paravirt cmdline option Date: Fri, 9 Feb 2018 14:39:39 +0100 Message-Id: <20180209133936.302304490@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180209133931.211869118@linuxfoundation.org> References: <20180209133931.211869118@linuxfoundation.org> User-Agent: quilt/0.65 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.9-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 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 @@ -2805,8 +2805,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 @@ -46,17 +46,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) \ @@ -588,9 +577,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;