Received: by 10.223.176.46 with SMTP id f43csp3805145wra; Mon, 22 Jan 2018 22:38:14 -0800 (PST) X-Google-Smtp-Source: AH8x224VRaQxfIrjBmlxoox/Vor+/sMZ0ZFgW7nFGU6CMm8mM/PUAHtxS000ncghsgLyjXQXFBn8 X-Received: by 2002:a17:902:9348:: with SMTP id g8-v6mr4617505plp.102.1516689494405; Mon, 22 Jan 2018 22:38:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516689494; cv=none; d=google.com; s=arc-20160816; b=SKMuXVtUSltpq9Cj+tyNeyTw2ELjyK2Q2KYt0yORzZ6DHPH//SskRb+DuSue1SOPNZ 0XmkMmhBqJfr++nGN7OknbBIkLsdEc8VgD77AxCM7K02yhJwy7T5QY71Qbebd5ohNrQ1 rHgLQZ/nSTq4gP2sG6+lUzM/BcTQP4FJHW5Agh29cNJlQ5QUO5AZ7ikp91UhKP5M2FXJ +/Uaoi6WaRpka36TbAiTza7q8zNORsd13mQJDhgUrEWxk/9HjbYMX2oIsIiPmz2mr0aO X8C5k57BDn/gykQAp4wTFRGW5Oosunyv5yNVkoLiZpbNvPr7bhufKCZNLk2REjGdHL1D qc4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date:arc-authentication-results; bh=aTKpASoc5U11B+Q/xEnG0o0ybdFbjt/Sur6KjR/LGqE=; b=p8OSPlT7P0lKWouUVtXP8/mzNeO4Ron2NXNXGgUKHPdKBiK65AsqgUNwa7wU9Ko+Cb i3eySFR5vmx+MNE9Jk2g7VocNP+ROAYLqcLae5qXxP0F6J6JtxdG1Hm0HyMP+Oepepts NXF5PRdruZA2CP+fL9kuPj4rCS8dau68jbhM/IubrP68JkKnKFFa3Cl6jeORyYqj4xyq bS3K8BUQEa4NI/jn8zIEaZs/jy+wnW6fXSnqrUQpVwZjMxiV4uwX8ZCBjpJ+bBi4Mpdw NDIgjYFhm3I3dL37AyLuhD4swRgUaKa4eocqjycX1ejtg53TGPaZNDjQl6txqOSCmnx0 h4KQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10-v6si3383093plm.86.2018.01.22.22.38.00; Mon, 22 Jan 2018 22:38:14 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751478AbeAWGh2 (ORCPT + 99 others); Tue, 23 Jan 2018 01:37:28 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58104 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751444AbeAWGhY (ORCPT ); Tue, 23 Jan 2018 01:37:24 -0500 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0N6afwG048938 for ; Tue, 23 Jan 2018 01:37:24 -0500 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fnyqxge1a-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 23 Jan 2018 01:37:23 -0500 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 23 Jan 2018 06:37:20 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 23 Jan 2018 06:37:15 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w0N6bFiE47448292; Tue, 23 Jan 2018 06:37:15 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 39BE511C066; Tue, 23 Jan 2018 06:30:53 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CDC6711C050; Tue, 23 Jan 2018 06:30:48 +0000 (GMT) Received: from ram.oc3035372033.ibm.com (unknown [9.80.208.248]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 23 Jan 2018 06:30:48 +0000 (GMT) Date: Mon, 22 Jan 2018 22:37:03 -0800 From: Ram Pai To: akpm@linux-foundation.org Cc: linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, x86@kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, dave.hansen@intel.com, 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, mpe@ellerman.id.au, mingo@redhat.com, corbet@lwn.net, arnd@arndb.de Subject: Re: [PATCH v10 01/27] mm, powerpc, x86: define VM_PKEY_BITx bits if CONFIG_ARCH_HAS_PKEYS is enabled Reply-To: Ram Pai References: <1516326648-22775-1-git-send-email-linuxram@us.ibm.com> <1516326648-22775-2-git-send-email-linuxram@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516326648-22775-2-git-send-email-linuxram@us.ibm.com> User-Agent: Mutt/1.5.20 (2009-12-10) X-TM-AS-GCONF: 00 x-cbid: 18012306-0040-0000-0000-00000407BE20 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18012306-0041-0000-0000-0000260B3E69 Message-Id: <20180123063703.GA5661@ram.oc3035372033.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-23_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801230092 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andrew, Please apply the following two patches to your tree. [PATCH v10 01/27] mm, powerpc, x86: define VM_PKEY_BITx bits if CONFIG_ARCH_HAS_PKEYS is enabled [PATCH v10 02/27] mm, powerpc, x86: introduce an additional vma bit for powerpc pkey I have not heard any complaints on these changes. Dave Hansen had comments/suggestions in the initial revisions, which have been incorporated. Michael Ellermen has accepted the rest of the powerpc related patches in this series. Thanks, RP On Thu, Jan 18, 2018 at 05:50:22PM -0800, Ram Pai wrote: > VM_PKEY_BITx are defined only if CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS > is enabled. Powerpc also needs these bits. Hence lets define the > VM_PKEY_BITx bits for any architecture that enables > CONFIG_ARCH_HAS_PKEYS. > > Signed-off-by: Ram Pai > --- > fs/proc/task_mmu.c | 4 ++-- > include/linux/mm.h | 9 +++++---- > 2 files changed, 7 insertions(+), 6 deletions(-) > > diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c > index 339e4c1..b139617 100644 > --- a/fs/proc/task_mmu.c > +++ b/fs/proc/task_mmu.c > @@ -674,13 +674,13 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma) > [ilog2(VM_MERGEABLE)] = "mg", > [ilog2(VM_UFFD_MISSING)]= "um", > [ilog2(VM_UFFD_WP)] = "uw", > -#ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS > +#ifdef CONFIG_ARCH_HAS_PKEYS > /* These come out via ProtectionKey: */ > [ilog2(VM_PKEY_BIT0)] = "", > [ilog2(VM_PKEY_BIT1)] = "", > [ilog2(VM_PKEY_BIT2)] = "", > [ilog2(VM_PKEY_BIT3)] = "", > -#endif > +#endif /* CONFIG_ARCH_HAS_PKEYS */ > }; > size_t i; > > diff --git a/include/linux/mm.h b/include/linux/mm.h > index ea818ff..01381d3 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -228,15 +228,16 @@ extern int overcommit_kbytes_handler(struct ctl_table *, int, void __user *, > #define VM_HIGH_ARCH_4 BIT(VM_HIGH_ARCH_BIT_4) > #endif /* CONFIG_ARCH_USES_HIGH_VMA_FLAGS */ > > -#if defined(CONFIG_X86) > -# define VM_PAT VM_ARCH_1 /* PAT reserves whole VMA at once (x86) */ > -#if defined (CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS) > +#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_BIT2 VM_HIGH_ARCH_2 > # define VM_PKEY_BIT3 VM_HIGH_ARCH_3 > -#endif > +#endif /* CONFIG_ARCH_HAS_PKEYS */ > + > +#if defined(CONFIG_X86) > +# define VM_PAT VM_ARCH_1 /* PAT reserves whole VMA at once (x86) */ > #elif defined(CONFIG_PPC) > # define VM_SAO VM_ARCH_1 /* Strong Access Ordering (powerpc) */ > #elif defined(CONFIG_PARISC) > -- > 1.7.1 > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. For more info on Linux MM, > see: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.linux-2Dmm.org_&d=DwIBAg&c=jf_iaSHvJObTbx-siA1ZOg&r=m-UrKChQVkZtnPpjbF6YY99NbT8FBByQ-E-ygV8luxw&m=PsCrC-HVeq8M98fNireZs4GUBJvMwNZme7wZ1YdjMqs&s=V90akzFmL1g-sNEcgmcUn_XJgJ8EaYmmsAS3AcVYScw&e= . > Don't email: email@kvack.org -- Ram Pai