Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7331413rwl; Mon, 9 Jan 2023 22:29:30 -0800 (PST) X-Google-Smtp-Source: AMrXdXuJYuRqrUmpiAAnAFfD0NCAIWz95YymuDkhUKnTaDlaYRTFcqVW0CmolSaPYXPxZlnyBwUG X-Received: by 2002:aa7:8152:0:b0:587:d491:995f with SMTP id d18-20020aa78152000000b00587d491995fmr7074622pfn.20.1673332170464; Mon, 09 Jan 2023 22:29:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673332170; cv=none; d=google.com; s=arc-20160816; b=b3LVUNSlBZKfPYgtVBcEYklo5jxqHgiMOvAqXjLB9Zn9YMMrqYyfjYey6VmEQOZdV0 28anw2SzhiqzEcw0055AZkDgTp42n1eMlNk8gi6mTvLMbiSA7KJPZNx8Hqm0KxqTdfhN G4W/XpeMhcEK4H+NudmTyXDQer25WTUqAs4+AeXPOdDqzMNyB5VjUxXCPt4MLzJ9Zg1c aoFcDdJYI5do5t+5h9KEStB/48ogBZOSesqDOvWEuMfYbZkLMXIAANmf+bwNP0sQvPwD EyOAnJ83/hHaunnHSoQadK8VMJ0Q71JYLk1SxcgsEfpYKSepisE4eIvLJv+iVb7rRa6+ 14+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=N1lZmqb4Gh8vjBme817UpOuzscAJYaPvU415Qizywvs=; b=pQ2M2uDsbcf7CD23ycewbyo8ZrDw6CRfm2iviBma/k/fhb6GvknrDNMLX8KXxP03MP 70LDl5Dd25xlEMY/m/U4zYzsp5w07oU39zcFn5QA3iloJr+xA4qhS1WScc0mNyKI/Kx3 cPkGOjBIal5iqSG+mK9xrSWwjFlZdK+42D+LGwuFcNK1H1A0AIjGA+jh9DWvm1UvM0YO mCnukPQ8T5kZduLRdArcIICWtcy1RtmwpZah3AhRVxJPVYqpSYVD1rYYJT5GEXQKXT71 JI9qsQaGitF1IsH9vs1o5mGUKjPoxZnBns+iqxiyn5Eh0a7XCPejANlOGzfPhbboPW5Q Hibg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=I3YHNNZ6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g17-20020a056a0023d100b0058320580dfbsi11212450pfc.38.2023.01.09.22.29.22; Mon, 09 Jan 2023 22:29:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=I3YHNNZ6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229659AbjAJF55 (ORCPT + 53 others); Tue, 10 Jan 2023 00:57:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235319AbjAJF4a (ORCPT ); Tue, 10 Jan 2023 00:56:30 -0500 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28A076309 for ; Mon, 9 Jan 2023 21:55:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673330156; x=1704866156; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=PgZ+tC6s+LeyPcVLVfrm/1TfwJMKnT9ckR2VquXmX5s=; b=I3YHNNZ68EJDaoIK8CQRvswPdAfWWrngU5vTLu+25N36hRk3SzbgL+Qm sNWise+0fN8jUcEmhSs7xzPH9RP2oxzNDkF/+egUMmVca16x6hLpBrpKI m4NvbJI9L3kp5B8fEOypiQIOFNpNOeLnTbuL8L46v85KJkLEJHzfUvKke fga+eQ2men2O1P6r+tiYYMMhXsXbT4P38CeU5fYVITO8UTL31p+IHTt5v wkc67S2g5cRqjneeS/EQdMBkhJ6KoVTRP+YgLVU1l/PQqWVwnNx5rpVIj 3pl2Vs/tOMhVlUYDxj4i3665I6i2dV22n5jukycuYp0EHgzmYP9XF3UdK w==; X-IronPort-AV: E=McAfee;i="6500,9779,10585"; a="350289969" X-IronPort-AV: E=Sophos;i="5.96,314,1665471600"; d="scan'208";a="350289969" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2023 21:55:41 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10585"; a="634483753" X-IronPort-AV: E=Sophos;i="5.96,314,1665471600"; d="scan'208";a="634483753" Received: from oux.sc.intel.com ([10.3.52.57]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2023 21:55:40 -0800 From: Yian Chen To: linux-kernel@vger.kernel.org, x86@kernel.org, Andy Lutomirski , Dave Hansen , Ravi Shankar , Tony Luck , Sohil Mehta , Paul Lai , Yian Chen Subject: [PATCH 6/7] x86/cpu: Set LASS as pinning sensitive CR4 bit Date: Mon, 9 Jan 2023 21:52:03 -0800 Message-Id: <20230110055204.3227669-7-yian.chen@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230110055204.3227669-1-yian.chen@intel.com> References: <20230110055204.3227669-1-yian.chen@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Security protection features are pinning sensitive. LASS comes with an effort for security concerns. Therefore, add it to the set of pinning sensitive bits Signed-off-by: Yian Chen Reviewed-by: Tony Luck --- arch/x86/kernel/cpu/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index efc7c7623968..e224cbaf7866 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -432,7 +432,7 @@ static __always_inline void setup_lass(struct cpuinfo_x86 *c) /* These bits should not change their value after CPU init is finished. */ static const unsigned long cr4_pinned_mask = X86_CR4_SMEP | X86_CR4_SMAP | X86_CR4_UMIP | - X86_CR4_FSGSBASE | X86_CR4_CET; + X86_CR4_FSGSBASE | X86_CR4_CET | X86_CR4_LASS; static DEFINE_STATIC_KEY_FALSE_RO(cr_pinning); static unsigned long cr4_pinned_bits __ro_after_init; -- 2.34.1