Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp794235imm; Mon, 21 May 2018 14:35:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrCWBZiRGpg7Fci1WjoR91blJT5N5tNZvrqKD50//hKgJKlWKu/D41q8i94vtEOhmsA1J7b X-Received: by 2002:a65:4282:: with SMTP id j2-v6mr10521328pgp.189.1526938539448; Mon, 21 May 2018 14:35:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526938539; cv=none; d=google.com; s=arc-20160816; b=Rw0XT4mu2v+8/emljEw0Q6vJ2CufnuOx7TD4MZr85muKwobD6upeiB4cWIcQv/S6yF Ogvqpg8pXjCuM/bli3Wqzj6gHkz4cOgF50bfTSgmo41BxEN9TCNlrbZmm8Hs0aCeh6Ib Ieodlo0WpWt3keO0PmfRPdrtcqaLrTrz9pA1unKeiylJdZIpbqDrkMCoF6BtWZ+n9ho2 nJVOWNeBgUczmEC/0V5bM58+Ti3Z3UZNvON5ujHxdnbYQzql965xORrcK6VasV2RvZEk /9MUp9yFGIkW1XuzKWmaYv8SkpA1DKUhfRkcz02CdHqXqVOwA4+knSdPp9HTtOqrIjEb iVmA== 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:dkim-signature :arc-authentication-results; bh=wLTyQXI+WMKGdmzm+z7UZ7ym9jMYUfvKOG/YujwPtmE=; b=wYRPr/64zJdN779RlntCmhbh7TZSNEiNBgI60J3NeQq3jr4YGHq5NKmq1atQibBF1D VJoWPdYNh6zyi36R9j9kX6ZXyyLwqbxCloNri0KeTrXgTMIvbg5iHOVr7WQCKUDHmASg rn08WhW+7zJc7UxzNcam5OTRj/ExBYGjn+So78YIGMA4ThuRqAcMrA/oEXGLZgr407Q+ Yxn/B10/Hu7rM93kWViKZlnqNF0mqn5D6aBRHpeF9S2FsCBQy6VjlLJeCn8FgiHsyBuV SjAdkhaJCsdaDLCHkrEugNsjvSn4I+eI5E6IydymdZRgqKCL/lZCvlFm5lZg2bcqIjMo thIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VROeeg8B; 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 a34-v6si14969326pld.281.2018.05.21.14.35.24; Mon, 21 May 2018 14:35:39 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=VROeeg8B; 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 S932479AbeEUVZu (ORCPT + 99 others); Mon, 21 May 2018 17:25:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:40460 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754310AbeEUVZh (ORCPT ); Mon, 21 May 2018 17:25:37 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CC73420875; Mon, 21 May 2018 21:25:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1526937937; bh=F+QaOZ0/0mi8hnX2bFWBaF+FjaXv+By8jYktH/Ff//c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VROeeg8BUQdq81NplLH+cn1O8xMfv2ODDUvDT5+wLpC+e15YxfTVzj78sQkH9J5M9 hCRYUaKDcYqfL69x3O59nuKRSxpGmJdbgDfcF/qdN3CIBk8i90rnbpOyKw/ALMi2Gs gUNIDxR5y9Oi5/8X7d4eMFkhVSH9HsXboD2uVbKU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kees Cook , Thomas Gleixner Subject: [PATCH 4.16 081/110] x86/bugs: Make boot modes __ro_after_init Date: Mon, 21 May 2018 23:12:18 +0200 Message-Id: <20180521210513.417039784@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180521210503.823249477@linuxfoundation.org> References: <20180521210503.823249477@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.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kees Cook commit f9544b2b076ca90d887c5ae5d74fab4c21bb7c13 upstream There's no reason for these to be changed after boot. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/cpu/bugs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -129,7 +129,8 @@ static const char *spectre_v2_strings[] #undef pr_fmt #define pr_fmt(fmt) "Spectre V2 : " fmt -static enum spectre_v2_mitigation spectre_v2_enabled = SPECTRE_V2_NONE; +static enum spectre_v2_mitigation spectre_v2_enabled __ro_after_init = + SPECTRE_V2_NONE; void x86_spec_ctrl_set(u64 val) { @@ -407,7 +408,7 @@ retpoline_auto: #undef pr_fmt #define pr_fmt(fmt) "Speculative Store Bypass: " fmt -static enum ssb_mitigation ssb_mode = SPEC_STORE_BYPASS_NONE; +static enum ssb_mitigation ssb_mode __ro_after_init = SPEC_STORE_BYPASS_NONE; /* The kernel command line selection */ enum ssb_mitigation_cmd {