Received: by 10.192.165.148 with SMTP id m20csp591984imm; Fri, 4 May 2018 15:58:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqSHxzZzvrVsjYm3c2VIemEFYKDVp1iIIjl4rSYGJl1Sfe36/7jGtSPZIrdN8+Y/3b5weov X-Received: by 2002:a17:902:7487:: with SMTP id h7-v6mr28885419pll.154.1525474712016; Fri, 04 May 2018 15:58:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525474711; cv=none; d=google.com; s=arc-20160816; b=CuCmljUQlNq3NyuzrgNwB+RG132gojf98uaxxojTI5nzzCi/le2AB4+NaR6/BSiLfe Q+lQpU+rMApEIBjXG8tYwTUbidYiMJIDMD2TAnAVUYdtD94ZJXGLKEhmRidEUpUhDpFC fpIwmBbc1S4UbjK/FDr4QslzPfmbYX5j8GIqvMPuLvuokN7H062a3JqrDQIacEp5FeEN EJjmI0GwDkfFMmGDGGIJBK9yLfrNkoADpfAp75ZU5OqZT8xOqaIrb8pEOdrP40VkZmPz CGvopW8P/oqoy6lsIuX/IeV9waseJ/w/jCN5/Ac6E+Tk0urZ9xwfKxd5t4rPitNUqS1B Gdug== 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:openpgp:from:cc:references:to:subject :arc-authentication-results; bh=bBcAdcNqdtszvAYhA8C6TkmQr491M0D6apuFRelJp5Y=; b=e3VhosH3ztT/N6j/WiI0dMBJMKuFRlRNGyZuGPmKMtYODf0ptmz3SCOp5t0JOnFzbr ojS9qVRFvzJNDwFRrsjLHEOCwStmj5H6gGkKpc+a7xahJMghAprFMyguSiPIvm8SfEQu aNSUvkg9/yZLs2VYqOc6R4kh+44RVsS07VgySvGJ7QQfLOLQRzdCErrZTZGB9dbKxG1d /BxttGP4mG4PpQipDeaqR+0kZekoaFrFHQ7395Yxo0jfFfvcwXhDptivf5y0rvtZB/vR X0OaM7cY6n2oGDJDJWa8qk3tTMditkJSqRlxnPbDfJ+3Gu3Sw66eXtu9mqKs2xizPuz6 hARQ== 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 a1-v6si16714862plt.39.2018.05.04.15.58.17; Fri, 04 May 2018 15:58:31 -0700 (PDT) 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 S1751811AbeEDW5f (ORCPT + 99 others); Fri, 4 May 2018 18:57:35 -0400 Received: from mga07.intel.com ([134.134.136.100]:12410 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751731AbeEDW5e (ORCPT ); Fri, 4 May 2018 18:57:34 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 May 2018 15:57:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,363,1520924400"; d="scan'208";a="38787712" Received: from ray.jf.intel.com (HELO [10.7.201.133]) ([10.7.201.133]) by orsmga008.jf.intel.com with ESMTP; 04 May 2018 15:57:33 -0700 Subject: Re: [PATCH v13 3/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: <1525471183-21277-1-git-send-email-linuxram@us.ibm.com> <1525471183-21277-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 From: Dave Hansen Openpgp: preference=signencrypt Message-ID: <1e37895e-5a18-11c1-58f1-834f96dfd4d5@intel.com> Date: Fri, 4 May 2018 15:57:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1525471183-21277-3-git-send-email-linuxram@us.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c > index 0c9e392..3ddddc7 100644 > --- a/fs/proc/task_mmu.c > +++ b/fs/proc/task_mmu.c > @@ -679,6 +679,7 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma) > [ilog2(VM_PKEY_BIT1)] = "", > [ilog2(VM_PKEY_BIT2)] = "", > [ilog2(VM_PKEY_BIT3)] = "", > + [ilog2(VM_PKEY_BIT4)] = "", > #endif /* CONFIG_ARCH_HAS_PKEYS */ ... > +#if defined(CONFIG_PPC) > +# define VM_PKEY_BIT4 VM_HIGH_ARCH_4 > +#else > +# define VM_PKEY_BIT4 0 > +#endif > #endif /* CONFIG_ARCH_HAS_PKEYS */ That new line boils down to: [ilog2(0)] = "", on x86. It wasn't *obvious* to me that it is OK to do that. The other possibly undefined bits (VM_SOFTDIRTY for instance) #ifdef themselves out of this array. I would just be a wee bit worried that this would overwrite the 0 entry ("??") with "".