Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2474pxb; Mon, 31 Jan 2022 03:48:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnlqoWuXFE3cyWS/JBqZz4bPPsmAtkCy8ViCXkIKChxt1UG2Pa46BVqUNkomNj4d8GXqM8 X-Received: by 2002:a05:6a00:2283:: with SMTP id f3mr19853198pfe.24.1643629730159; Mon, 31 Jan 2022 03:48:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643629730; cv=none; d=google.com; s=arc-20160816; b=T3+KdxoAki0/XK1WwTmN36A1aqD1P5S5VT8MVOZHObQaYSMGL7QHUnIFHYz+sMVJxJ YzPEcLpsBOC62f5IdE1lz4AkfhzjqhROAyDH7MCRqhnOGJqEeNWIpknvlf1cgdj0u7a4 9vowsccqojG8TTryww4GiIKUYXk+o/SA+vU/28YBZktcQTgI8SVkEbrJY9NWjNlHH50r 93rxzEfwZxGNnUoEk0in5qIlBiwE+AtATckR+TP1eNhM0QK9mYGnPq0eQE9LclGFtIRv 6Z2TBGVqo5mSi1XSva8IdjvSrNdtWxuJiYjWqX4WX+qAlUSy8D4ML/OwuGk0zp6V5YuZ CS/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:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=/XU9YtvNnIavTI++OCK6jzZKOXUB7e7NedlkOocRcFc=; b=oFP9arXbkeev6GtqKDbutDTyQF2R/sKAjZ+nF8mnzk449hy4kGeGR6W4GS4Fprflnz U6Lu9IDttkKGz840pUlb/rdoSrRlxpoWGOKch74ItoOtAlPidm6Qk66XjxtW34DKbPNW 7xO/MM7suy84wkVfRtQ4tkvmPdP79JfgrSio1YL8roJQgrS1uvkLspYmXlt4ttFBAW5w iZ3XJI+16m1uXrNgyAVO//aIajxqHijGyQJ+7rkV0+dxK4pWDB8npjnV57Br3PC4HAar 6qxtu8LFnnfeO/cGgt09eltynnF+U1T4/wx1Eomy2OfxyZjLpTd2a0QTHVclF28wKcR0 UKxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dGj07XLd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t20si3523793pjr.80.2022.01.31.03.48.38; Mon, 31 Jan 2022 03:48:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dGj07XLd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S244111AbiA1XFq (ORCPT + 99 others); Fri, 28 Jan 2022 18:05:46 -0500 Received: from mga07.intel.com ([134.134.136.100]:45265 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241816AbiA1XFl (ORCPT ); Fri, 28 Jan 2022 18:05:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643411141; x=1674947141; h=message-id:date:mime-version:to:cc:references:from: subject:in-reply-to:content-transfer-encoding; bh=AIvUvS81DfKAf+cWFUoQoNAn7ZSmlY1td647YN0yrAw=; b=dGj07XLdCfxPp28xQAWqqXnG+pTreZRtZT7IeHRitYer8RFxunz+TTQd 270w+QBIrucFgf5LPCZ5pmbDk70VdWxB5ymdTexL/7iFn4G+RH7uif2z2 Q9He5XxQakHX7R2EGm5szg9ZEd6553iXnQzv5X/TwYNYZzNi+VSDoL1Zz BNATnlNSsxZGIxTMCUWnagsuYRpvQObeoRGsEl28FMISXKokQBTtrAcyl cSV+Cikya5CxjMgrjWphUurCJ3N+31z5rk2EOfhLqdvV4MQeu3Oyb9JEg HOWU/EysoL8isVcjrcG8ByMk+1ZAqI29U75zhx2fOHnGvVRwOR6OMWuvk w==; X-IronPort-AV: E=McAfee;i="6200,9189,10241"; a="310525683" X-IronPort-AV: E=Sophos;i="5.88,325,1635231600"; d="scan'208";a="310525683" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2022 15:05:39 -0800 X-IronPort-AV: E=Sophos;i="5.88,325,1635231600"; d="scan'208";a="697244952" Received: from zhenkuny-mobl2.amr.corp.intel.com (HELO [10.209.84.59]) ([10.209.84.59]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2022 15:05:39 -0800 Message-ID: <63950211-4244-3f85-0fb3-eb5a38d4ed50@intel.com> Date: Fri, 28 Jan 2022 15:05:36 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.2 Content-Language: en-US To: ira.weiny@intel.com, Dave Hansen , "H. Peter Anvin" , Dan Williams Cc: Fenghua Yu , Rick Edgecombe , linux-kernel@vger.kernel.org References: <20220127175505.851391-1-ira.weiny@intel.com> <20220127175505.851391-8-ira.weiny@intel.com> From: Dave Hansen Subject: Re: [PATCH V8 07/44] x86/pkeys: Add PKS CPU feature bit In-Reply-To: <20220127175505.851391-8-ira.weiny@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/27/22 09:54, ira.weiny@intel.com wrote: > From: Ira Weiny > > Protection Keys for Supervisor pages (PKS) enables fast, hardware thread > specific, manipulation of permission restrictions on supervisor page Nit: should be "hardware-thread-specific". > mappings. It uses the same mechanism of Protection Keys as those on > User mappings but applies that mechanism to supervisor mappings using a > supervisor specific MSR. "supervisor-specific" Memory Protection Keys (pkeys) provides a mechanism for enforcing page-based protections, but without requiring modification of the page tables when an application changes protection domains. The kernel currently supports the pkeys for userspace (PKU) architecture. That architecture has been extended to additionally support supervisor mappings. The supervisor support is referred to as PKS. I probably wouldn't mention the MSR unless you want to say: The main difference between PKU and PKS is that PKS does not introduce any new instructions to write to its register. The register is exposed as a normal MSR and is accessed with the normal MSR instructions. > The CPU indicates support for PKS in bit 31 of the ECX register after a > cpuid instruction. I'd just remove this sentence. We don't need to rehash each tiny morsel of the architecture in a commit message.