Message ID | 20230530114247.21821-12-alexander.shishkin@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2127686vqr; Tue, 30 May 2023 05:05:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4jzQblIzFh+hwaO8aDzWQCRXxL8ib+pqvQ4j63YZfsUy6QZ4Kg/Ui0m/CMhOxq7KF1GjHs X-Received: by 2002:a17:902:e9d5:b0:1b0:f31:a386 with SMTP id 21-20020a170902e9d500b001b00f31a386mr11366429plk.26.1685448351493; Tue, 30 May 2023 05:05:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685448351; cv=none; d=google.com; s=arc-20160816; b=AlDSqEuV2ilvPscCILABZYquCt82HiHUrTLcrFiA4zVCSAGQK1Oy9AVRgBi3vXC97x N0+gegqcljoNrKnPRawIMmKz2YpCM8+gFHb+6CFan1lAJLeROdtEf8tbHV8vtDvCGyO4 Qcnyf14gSoTsUdFwoUnZxeOtUOk2HObwLe9J7EbiQkfR+h1qwxPGhMBzejWs+OPpsKP6 VfhMevgXIYkfEleZ5wocCn0whlQHNhn9uRIfX6NvlzafDpnScO0D22tuR4vaB1Qx+E2u /Z5TKgXiebCuCXgN1GxUJb6rJLF/SJVgHbGZvy8xtgMVExVa9hEiAPWwTNAX8+OvYk1N ItGw== 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:cc:to:from :dkim-signature; bh=ycQEFFGLuxnpqXJw5mOryq2h+r1BaFBym+2z7nuifkE=; b=hpeXCmQH3dViO1OdZHlk1r9TKgJwWAPkvOweqPX3X5YLmH5S4EO+fVq9HEv0DKVuOC 63Xfy36fvVmgtZzGyI10tcgU0cOf7FIehLTvN0p6FivMUbcT2ubSFuPBRIaz+s/JIc4P +aLjOWxUWSepNlWJO9Q+BI0b+uu2wntujDGhFkjvgTOz5DK0/V+KAlxxEkUk74FVkaEU fnR7bw2P9TUqcAkFOmmAXT03XAFGDYScDbMpvvolwpV/BLlmh0gQbmVaHW+DPJuFjqA1 TaB5cU3pCYi72VTG5AHP91nc/xrERxLq0ucx5VdaMjqtem7saDiRebkpR4pzn6CNhuNp utGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CzYZiatX; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 19-20020a631753000000b0053592069d66si10831429pgx.467.2023.05.30.05.05.28; Tue, 30 May 2023 05:05:51 -0700 (PDT) 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=CzYZiatX; 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 S231549AbjE3Loi (ORCPT <rfc822;andrewvogler123@gmail.com> + 99 others); Tue, 30 May 2023 07:44:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231724AbjE3Lny (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 30 May 2023 07:43:54 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABAD1114 for <linux-kernel@vger.kernel.org>; Tue, 30 May 2023 04:43:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685447028; x=1716983028; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fuR9qvQ94ZrjBMln22ybuTxen7mUs7UOMBAmFKJPRd4=; b=CzYZiatXillWh7c2WpvGmGX9s1Y2pWPVGRjdNhO3VRunwljkt5YrBdRE Juk27X+ebc8VDFDG6ZKGm1Hv825vDCmjNzCKThanXgDR4+eGD/pMGSBHq RXfeJUQY5rIrA+DlNrsWSZT5Jya38dFMccf3E9Ik0MaiyE6nwX8bi1DHe 0rAXIwUUDraq1rscvxkQRdn8cpmxPOd3+DKhVf1BFzLBNLuvWCtztTk9N U+IZXO5WgsWJmIgG+BWrX2+MnrPTkjv9CNEmx5Zf96q782UgtEL38FxqG oHa03y7Z8s2zUjEYCcbAQp8upmkKFtz/wvigh+WbwOUXVOwJzUYNadHWh A==; X-IronPort-AV: E=McAfee;i="6600,9927,10725"; a="383145407" X-IronPort-AV: E=Sophos;i="6.00,204,1681196400"; d="scan'208";a="383145407" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2023 04:43:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10725"; a="700588776" X-IronPort-AV: E=Sophos;i="6.00,204,1681196400"; d="scan'208";a="700588776" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 30 May 2023 04:43:23 -0700 From: Alexander Shishkin <alexander.shishkin@linux.intel.com> To: linux-kernel@vger.kernel.org, x86@kernel.org, Andy Lutomirski <luto@kernel.org>, Dave Hansen <dave.hansen@linux.intel.com>, Ravi Shankar <ravi.v.shankar@intel.com>, Tony Luck <tony.luck@intel.com>, Sohil Mehta <sohil.mehta@intel.com>, Paul Lai <paul.c.lai@intel.com> Cc: Yian Chen <yian.chen@intel.com> Subject: [PATCH v2 11/12] x86/cpu: Set LASS CR4 bit as pinning sensitive Date: Tue, 30 May 2023 14:42:46 +0300 Message-Id: <20230530114247.21821-12-alexander.shishkin@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230530114247.21821-1-alexander.shishkin@linux.intel.com> References: <20230530114247.21821-1-alexander.shishkin@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767320690790081883?= X-GMAIL-MSGID: =?utf-8?q?1767320690790081883?= |
Series |
Enable Linear Address Space Separation support
|
|
Commit Message
Alexander Shishkin
May 30, 2023, 11:42 a.m. UTC
From: Yian Chen <yian.chen@intel.com> Security features such as LASS are not expected to be disabled once initialized. Add LASS to the CR4 pinned mask. Signed-off-by: Yian Chen <yian.chen@intel.com> Reviewed-by: Tony Luck <tony.luck@intel.com> --- 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 f26c56fe9963..9ddc19c8832d 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -422,7 +422,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;