Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp719268ybb; Wed, 8 Apr 2020 08:37:27 -0700 (PDT) X-Google-Smtp-Source: APiQypIB4EKMSZyJPjXehuZGNSc+GBCLe4RpWe+cFoO2LurU52yLepy7ylKtuQAD3+Zcshy44WVe X-Received: by 2002:a05:6830:1159:: with SMTP id x25mr6345354otq.110.1586360247637; Wed, 08 Apr 2020 08:37:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586360247; cv=none; d=google.com; s=arc-20160816; b=VLW4vQ0JpjYWZxcA337L3TTVXgd04kWWgpluAJflmeFt1jrl6xwnk8fWJ3i8QnF4rP pWWCAx5ojxJNcxcDg2wAaOUdxGYzCY3ogdnc4WnbCPYS/xvyoEbZW+zUq2axUPfr3Dp8 49gVHJF3dp6/qHOVTWxf+C5dUNLVfQkZCjRXYq9GaTWLViIuvZJE94q3L61KqkndrP2t w56NBBOZMCuony/Qf41WVtLvPmKzaKKI0EXdGDL+f5UXkVXkeZcdYsYDADIC5kgCJIwf 52O+CZUWLcaOvan+h6d9nxv7fHuGuAAlncWXdxf9hTS2KOrirBAdI0aju9z1T5co/GWR ESrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=fnY7jLDFmLQEM5ki4JK+x4wwSB8SGSy86i33Aib8zb8=; b=Txx1xSZi4nKazPJIcoFC7V6t5jRDpQtRsXiorQwbbfVrRQ9CcaCd0PhReuNF9ZKLpR 3JbeoEFNopYNdAeH+OqcKTAIbfdxC5V1Kb+JaBjMTaOGgEgouKhI9ZfFonfMDTR0HHdr pveMuRqPpiqyElNUKW13my3WCamUmY7fHaqXm6bo/stmEpaAFvbZncG7UY/sC7EpcYte D8gmW2/pA+HBtt+GRepATPL5fijSSn9VlsjObYOWqFyZFJ83uzIZMTRTTLgal89+EzPs nL0Yh1d4ioZd2KcpuTdau0Uu4e/Kh73CzEyTf2m00Ntrtf9IyFL6V5j3IYrOTsYEnizb /HDw== 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 j14si2525414otq.271.2020.04.08.08.36.48; Wed, 08 Apr 2020 08:37:27 -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 S1728895AbgDHPcy (ORCPT + 99 others); Wed, 8 Apr 2020 11:32:54 -0400 Received: from verein.lst.de ([213.95.11.211]:42854 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727049AbgDHPcy (ORCPT ); Wed, 8 Apr 2020 11:32:54 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 7D40368CEC; Wed, 8 Apr 2020 17:32:45 +0200 (CEST) Date: Wed, 8 Apr 2020 17:32:44 +0200 From: Christoph Hellwig To: Mark Rutland Cc: Christoph Hellwig , Andrew Morton , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , x86@kernel.org, David Airlie , Daniel Vetter , Laura Abbott , Sumit Semwal , Sakari Ailus , Minchan Kim , Nitin Gupta , Robin Murphy , Christophe Leroy , Peter Zijlstra , linuxppc-dev@lists.ozlabs.org, linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Will Deacon , Catalin marinas Subject: Re: [PATCH 18/28] mm: enforce that vmap can't map pages executable Message-ID: <20200408153244.GA27818@lst.de> References: <20200408115926.1467567-1-hch@lst.de> <20200408115926.1467567-19-hch@lst.de> <20200408123835.GB36478@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200408123835.GB36478@lakrids.cambridge.arm.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 08, 2020 at 01:38:36PM +0100, Mark Rutland wrote: > > +static inline pgprot_t pgprot_nx(pgprot_t prot) > > +{ > > + return __pgprot(pgprot_val(prot) | _PAGE_NX); > > +} > > +#define pgprot_nx pgprot_nx > > + > > #ifdef CONFIG_X86_PAE > > I reckon for arm64 we can do similar in our : > > #define pgprot_nx(pgprot_t prot) \ > __pgprot_modify(prot, 0, PTE_PXN) > > ... matching the style of our existing pgprot_*() modifier helpers. I've added that for the next version with attribution to you.