Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3877pxb; Mon, 31 Jan 2022 03:51:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJzTD2Z1JN8dI/LLLem0/Ff7RejIXEZFf5Ybre4odZBg3awnCm/JSWZvb/BgEiC1r8jEdSxr X-Received: by 2002:a17:90b:4f4e:: with SMTP id pj14mr24257229pjb.220.1643629869965; Mon, 31 Jan 2022 03:51:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643629869; cv=none; d=google.com; s=arc-20160816; b=I5PERMC6OW+RiRgGXyeOHjcykxQEzF7AsinXhEJ0rLMzxVteUeiFzWtfiqO361QZ48 /V0ws5VKjJIP/aZ4s5sp0mui/vdB3laoys9jA8tlmmK8JA3p2SVroSl1E4/DQY9crtDe JpiiLFw6+RLIoN4tY/3yDWz7b5817F1qnsnqlZwwYMDP+F8lQ3q9H0EDkiHDZcl/GpRg ixbWcjHnobmGaIG84T37DdcBCUP0uzrMgBNwRkGK6tbHouXPLhvdi1pTSOSXUCaYSfEs HG2KuqTjLuXsYrm+d6PKziW+pGoUT0Ng1Kfxy1IlF41pIa2tN1uS51N4FseX7rbmmI+I dpzg== 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=ckiXaGbTZwTzeqbcY0ADRwJuikjwMUV+Fo/KZd4JNOo=; b=iFUlz452OkMkt+VCdnKFpjS9S1zU0g8ZxrNvTlGcjd7LiCxZYpg5O6rFU9DhP4R/BR 6YVt8vn1qOnLpqtosjMXoRzhi5IvlfckGmh7SeD/ObL6DMY84yr5L95vFbDVISjrUUlE S1tWv68f5YImmS3rOmfvQtooONYRSQiARFvugEGkvdacC8Q0FDeCOcRMCOmAppTb+cfV zAj0RseiIIw6bMHtuoHt3ZUubvU0AWk2Cs7dp4iTEw3jMPDDvuUgAM51Ro2e5GycJo5Z ckP+4bteOdMQSqmagvD3Hi5BF5SNEg87JzQ90z1qVuYZ7wUU1lXKShWvsOcGrqo7+TCW x9gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BC9tQmgw; 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 k5si15345365plk.64.2022.01.31.03.50.59; Mon, 31 Jan 2022 03:51:09 -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=BC9tQmgw; 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 S1344485AbiA1XxM (ORCPT + 99 others); Fri, 28 Jan 2022 18:53:12 -0500 Received: from mga09.intel.com ([134.134.136.24]:46226 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351878AbiA1XwA (ORCPT ); Fri, 28 Jan 2022 18:52:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643413920; x=1674949920; h=message-id:date:mime-version:to:cc:references:from: subject:in-reply-to:content-transfer-encoding; bh=hfvER/Y5/Pa8WlFEj567GqBFmOXKBuevJD08dUwAxpQ=; b=BC9tQmgwgM432UzRISR1x2Lt9Ba0W33MGAbaUYZLJJd2oUE3WmT8pl05 dOdz63C4ZhJmcFCUwIbo0SROAk/zilTlCRXG+ABhvNn0uoGU2EYkpDZhD QhyaZHWzo7kwneSV9acsfJk9akhFj2bmdFLnnO545AxnjyR8lx2v6afv5 X2I3sBtd8MF+LfKEi78CJ40NtILapF5FjJTMBLZ6YWIj3dfYirvK8ikHw 9I846Rd2ocPmNTWQu2nK+rstg+YJcJbwVGIA5gc4GuJFWDV/ytmZ8mGSl mJzggUs/7QcsCBGBGzJOzAfMI5ahahi1CrMhrn5+VQ3AxkgUdqMmvb2qr w==; X-IronPort-AV: E=McAfee;i="6200,9189,10241"; a="246989638" X-IronPort-AV: E=Sophos;i="5.88,325,1635231600"; d="scan'208";a="246989638" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2022 15:51:59 -0800 X-IronPort-AV: E=Sophos;i="5.88,325,1635231600"; d="scan'208";a="697255156" 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:51:59 -0800 Message-ID: Date: Fri, 28 Jan 2022 15:51:56 -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 Cc: Dave Hansen , "H. Peter Anvin" , Dan Williams , Fenghua Yu , Rick Edgecombe , linux-kernel@vger.kernel.org References: <20220127175505.851391-1-ira.weiny@intel.com> <20220127175505.851391-7-ira.weiny@intel.com> <9c4a8275-236d-67b6-07f9-5e46f66396c0@intel.com> <20220128231015.GK785175@iweiny-DESK2.sc.intel.com> From: Dave Hansen Subject: Re: [PATCH V8 06/44] mm/pkeys: Add Kconfig options for PKS In-Reply-To: <20220128231015.GK785175@iweiny-DESK2.sc.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/28/22 15:10, Ira Weiny wrote: > This issue is that because PKS users are in kernel only and are not part of the > architecture specific code there needs to be 2 mechanisms within the Kconfig > structure. One to communicate an architectures support PKS such that the user > who needs it can depend on that config as well as a second to allow that user > to communicate back to the architecture to enable PKS. I *think* the point here is to ensure that PKS isn't compiled in unless it is supported *AND* needed. You have to have architecture support (ARCH_HAS_SUPERVISOR_PKEYS) to permit features that depend on PKS to be enabled. Then, once one ore more of *THOSE* is enabled, ARCH_ENABLE_SUPERVISOR_PKEYS comes into play and actually compiles the feature in. In other words, there are two things that must happen before the code gets compiled in: 1. Arch support 2. One or more features to use the arch support