Received: by 10.223.185.116 with SMTP id b49csp4212214wrg; Mon, 26 Feb 2018 13:17:09 -0800 (PST) X-Google-Smtp-Source: AH8x227EyzVY3uznrVTlqFxInk1f/C0rBXwupBod07P0jx1NDWqPVqSs2s2ERqfF2KKiUNVq2Ypz X-Received: by 2002:a17:902:12d:: with SMTP id 42-v6mr12107938plb.141.1519679829480; Mon, 26 Feb 2018 13:17:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519679829; cv=none; d=google.com; s=arc-20160816; b=mTQvRrpWUxl5SUQZtzYL+CGj9DJH7hHpMXwBiiJynexpFBhylGULCvHZNtId0Y9F2K 4HWSv+aUg9K7LYLoX/Q8ivOq/BLxodpSGB0L2oQ+jguqIsR2QMXeur5sbXrtpKFBOTxM lt0WfXSMF7Q/lNQgSHD7HzEymMrRbke7nG7v2+A8p0uPJnKwhLiFbaITDtF6eGLS5wu3 IcefApDq/yRLZ2ytzdkYXKMBzlkdOG4GSpAMIdb8M+HnUEXu0YDvkOnrXWAwo1j0LC3a pwGqX73xWcRUtjc5nnyBRRI0U9TzXfG8w/+zC0owF+54KHy9iPH/ZblXLsUWxBPwxAq1 Kknw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:cc:references:to:subject:arc-authentication-results; bh=AbwfkH8J4PY122hDeUolhobpsorBrImjELPkqQ43H7A=; b=miNqOxse+3Qf9HePm33I6HPQBMuUEpRBdN0HESgxSZDxxCSSsO8VHyntu5ppUNvWaY LSgW7nGAteddVOVenmPLsGz42L9MyKTAK9QBWhNbIH7RI4F+DFfgsfDCieoi9xXYPris bEnpqNGFL4cMolrrcSYJa5L/Sq9SVdMYKPult5n9eS35L+NdMm1hBFDi8nt/pPZu4wev hLkrTTsAJrB8L7ca8Y+C4AeutvVMMF1AtoJ3vztuNUVvYzFINytWB4fcxcIq7q8r3K7p lA9h+20I9r2UMluEJpVlygh4hJDpoKKigCi5Prx2SMUdk3/3yTY+x2eGZLrdK8GCE+Ox Kewg== ARC-Authentication-Results: i=1; mx.google.com; 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 v68si1687631pgv.722.2018.02.26.13.16.52; Mon, 26 Feb 2018 13:17:09 -0800 (PST) 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; 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 S1751794AbeBZVOj (ORCPT + 99 others); Mon, 26 Feb 2018 16:14:39 -0500 Received: from mga12.intel.com ([192.55.52.136]:4570 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751499AbeBZVOh (ORCPT ); Mon, 26 Feb 2018 16:14:37 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2018 13:14:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,398,1515484800"; d="scan'208";a="20475014" Received: from ray.jf.intel.com (HELO [10.7.201.16]) ([10.7.201.16]) by orsmga007.jf.intel.com with ESMTP; 26 Feb 2018 13:14:36 -0800 Subject: Re: [PATCH v12 2/3] mm, powerpc, x86: introduce an additional vma bit for powerpc pkey To: Ram Pai , mpe@ellerman.id.au, mingo@redhat.com, akpm@linux-foundation.org References: <1519257138-23797-1-git-send-email-linuxram@us.ibm.com> <1519257138-23797-3-git-send-email-linuxram@us.ibm.com> Cc: linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, x86@kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, benh@kernel.crashing.org, paulus@samba.org, khandual@linux.vnet.ibm.com, aneesh.kumar@linux.vnet.ibm.com, bsingharora@gmail.com, hbabu@us.ibm.com, mhocko@kernel.org, bauerman@linux.vnet.ibm.com, ebiederm@xmission.com, corbet@lwn.net, arnd@arndb.de, fweimer@redhat.com, msuchanek@suse.com From: Dave Hansen Message-ID: Date: Mon, 26 Feb 2018 13:14:34 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1519257138-23797-3-git-send-email-linuxram@us.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/21/2018 03:52 PM, Ram Pai wrote: > diff --git a/include/linux/mm.h b/include/linux/mm.h > index ad207ad..d534f46 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -231,9 +231,10 @@ extern int overcommit_kbytes_handler(struct ctl_table *, int, void __user *, > #ifdef CONFIG_ARCH_HAS_PKEYS > # define VM_PKEY_SHIFT VM_HIGH_ARCH_BIT_0 > # define VM_PKEY_BIT0 VM_HIGH_ARCH_0 /* A protection key is a 4-bit value */ > -# define VM_PKEY_BIT1 VM_HIGH_ARCH_1 > +# define VM_PKEY_BIT1 VM_HIGH_ARCH_1 /* on x86 and 5-bit value on ppc64 */ > # define VM_PKEY_BIT2 VM_HIGH_ARCH_2 > # define VM_PKEY_BIT3 VM_HIGH_ARCH_3 > +# define VM_PKEY_BIT4 VM_HIGH_ARCH_4 > #endif /* CONFIG_ARCH_HAS_PKEYS */ I think I would prefer if VM_PKEY_BIT4 was unusable on x86, or #defined to 0. We don't want folks using a bit that can not be programmed into the hardware.