Received: by 10.223.176.5 with SMTP id f5csp412779wra; Thu, 1 Feb 2018 23:23:10 -0800 (PST) X-Google-Smtp-Source: AH8x2273qovLU8kj8wR4+NHk9sqra1Epch+U8cIjA/5uxhjwibM6VvzG/ZrI2+dyuanr7BrbdI1S X-Received: by 2002:a17:902:3064:: with SMTP id u91-v6mr33987943plb.421.1517556190440; Thu, 01 Feb 2018 23:23:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517556190; cv=none; d=google.com; s=arc-20160816; b=Ru8lTLhGK7kYXqnEmBIILYf1vFILGIzmWbtTdXqQObbjSoIPQCVHOB+CjYGZmE+YmU 2ShHiW8sqBCVlUB7hF6jTrfmBab5/DB3vz3uEqJ0NEG76S2Hiu37BjiFYT0/dx4bG8zv dbtiijMny/NWKRHP8ocJ3dRPQidHOwbygjJoGbIrfpFINCtKYoGMCeDUIc7zszQ38RfW 3wJT+/JYOea2x3czwzXk35ZVbyY01OwNWOVIehx8csCS5Ilyx+k2tHJNTeVC1zp9vAm8 eW9b456W3lRqLbQTviIqqrvoLB8NP5k7mt41jBhv91S0qtDHMMBx/HWRsEW1+rPqFEQz ntyg== 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=KSaQa094I5PJVAD7t8VfK6Lx97Bgnb7IiCRebEH8hJw=; b=qFK3+mxkYKhpPc/BQcHvewidCZIjw0yT0GxKgT3vo1SJDx3mjryog+UYqb7A1fsUij Tr8nphmcbWWSOwAsUQWZdZyOQyX7pny5+Jqgr6AWuz9Tq7NfRJUg1QECyVBLu6cshELr otcK8lYFeulRg8juFQ+oVmm0IwUSK4HWNH2NinVAUQJRho0/qdMpSBJUK0mGTJBhhn96 3BCvovowfFoZrBlfeJTF3VdI9zumxTty14MTZDDi1jaUjnbC7as5medDJSOaAPuN8xsc b0AKkpFzfZqgfD9Mn4JbFPEOWHL9tv+M6MheY6lQIWd4+L5ZSOhUfL1EXJ37TqoPWkCj nxZw== 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 a5-v6si1231846plp.416.2018.02.01.23.22.55; Thu, 01 Feb 2018 23:23:10 -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 S1751469AbeBBHWC (ORCPT + 99 others); Fri, 2 Feb 2018 02:22:02 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:33914 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750735AbeBBHV4 (ORCPT ); Fri, 2 Feb 2018 02:21:56 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w127IhYP167070 for ; Fri, 2 Feb 2018 02:21:55 -0500 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0b-001b2d01.pphosted.com with ESMTP id 2fvfww7tj9-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 02 Feb 2018 02:21:55 -0500 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 2 Feb 2018 07:21:53 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 2 Feb 2018 07:21:48 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w127LlFE14483490; Fri, 2 Feb 2018 07:21:48 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 96DD74C04E; Fri, 2 Feb 2018 07:15:43 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C0FE44C044; Fri, 2 Feb 2018 07:15:38 +0000 (GMT) Received: from ram.oc3035372033.ibm.com (unknown [9.85.206.98]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Fri, 2 Feb 2018 07:15:38 +0000 (GMT) Date: Thu, 1 Feb 2018 23:21:39 -0800 From: Ram Pai To: kbuild test robot Cc: kbuild-all@01.org, mpe@ellerman.id.au, mingo@redhat.com, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, x86@kernel.org, linux-arch@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, corbet@lwn.net, arnd@arndb.de, fweimer@redhat.com, msuchanek@suse.com Subject: Re: [PATCH v11 3/3] mm, x86: display pkey in smaps only if arch supports pkeys Reply-To: Ram Pai References: <1517341452-11924-4-git-send-email-linuxram@us.ibm.com> <201802021225.JPjLbdCs%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201802021225.JPjLbdCs%fengguang.wu@intel.com> User-Agent: Mutt/1.5.20 (2009-12-10) X-TM-AS-GCONF: 00 x-cbid: 18020207-0016-0000-0000-0000051EA4FB X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18020207-0017-0000-0000-0000285B4C27 Message-Id: <20180202072139.GD5411@ram.oc3035372033.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-02_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 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-1802020085 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 02, 2018 at 12:27:27PM +0800, kbuild test robot wrote: > Hi Ram, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on linus/master] > [also build test ERROR on v4.15 next-20180201] > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] > > url: https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_0day-2Dci_linux_commits_Ram-2DPai_mm-2Dx86-2Dpowerpc-2DEnhancements-2Dto-2DMemory-2DProtection-2DKeys_20180202-2D120004&d=DwIBAg&c=jf_iaSHvJObTbx-siA1ZOg&r=m-UrKChQVkZtnPpjbF6YY99NbT8FBByQ-E-ygV8luxw&m=Fv3tEHet1bTUrDjOnzEhXvGM_4tGlkYhJHPBnWNWgVA&s=Z1W6CV2tfPmLYU8lVv1oDRl2cAyQA76KE2P064A2CQY&e= > config: x86_64-randconfig-x005-201804 (attached as .config) > compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025 > reproduce: > # save the attached .config to linux build tree > make ARCH=x86_64 > > All error/warnings (new ones prefixed by >>): > > In file included from arch/x86/include/asm/mmu_context.h:8:0, > from arch/x86/events/core.c:36: > >> include/linux/pkeys.h:16:23: error: expected identifier or '(' before numeric constant > #define vma_pkey(vma) 0 > ^ > >> arch/x86/include/asm/mmu_context.h:298:19: note: in expansion of macro 'vma_pkey' > static inline int vma_pkey(struct vm_area_struct *vma) > ^~~~~~~~ > > vim +16 include/linux/pkeys.h > > 7 > 8 #ifdef CONFIG_ARCH_HAS_PKEYS > 9 #include > 10 #else /* ! CONFIG_ARCH_HAS_PKEYS */ > 11 #define arch_max_pkey() (1) > 12 #define execute_only_pkey(mm) (0) > 13 #define arch_override_mprotect_pkey(vma, prot, pkey) (0) > 14 #define PKEY_DEDICATED_EXECUTE_ONLY 0 > 15 #define ARCH_VM_PKEY_FLAGS 0 > > 16 #define vma_pkey(vma) 0 Oops. Thanks for catching the issue. The following fix will resolve the error. diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h index 6d16d15..c1aeb19 100644 --- a/arch/x86/include/asm/mmu_context.h +++ b/arch/x86/include/asm/mmu_context.h @@ -238,11 +238,6 @@ static inline int vma_pkey(struct vm_area_struct *vma) return (vma->vm_flags & vma_pkey_mask) >> VM_PKEY_SHIFT; } -#else -static inline int vma_pkey(struct vm_area_struct *vma) -{ - return 0; -} #endif RP