Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3652687ybf; Tue, 3 Mar 2020 09:50:36 -0800 (PST) X-Google-Smtp-Source: ADFU+vvkN2fArzbmha2xlPcnJ5sgUQ01nlnmsBczAKNiRYpfA8aRCZL84LKqT38xtnBfd2lPsXIz X-Received: by 2002:a54:4006:: with SMTP id x6mr3281042oie.145.1583257835993; Tue, 03 Mar 2020 09:50:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583257835; cv=none; d=google.com; s=arc-20160816; b=YrQPvC4DeO67SQC7KtIbV7yHrE2qkVqvEdIJKTnhtNPrI1i85VyO/zLy+cjIgAJoA8 yaOkZIDhCIZuqxvokFngYRUvm4xerg1sQaDCv1ubh0uqivrTdR8SVpQXNC2lWJUJtwxr zpDzsJQot2pb77NSWogIu3M+DQV9t9sBFUSgzQa9NzdDzg28aG5YJtbX/ftK7H+eV3YV 7m7kxyMvrjRq41w2p6iLtk+h5inMjOTvBQDsKzdGUje9zYC5BIhMx/O7EyDTmFFeX/OU YiBUXAgh1Rq/Wpuhn2ZwkJUdWhKPzXwi49a2pDVfK75bWqIL3KXUpxeY1n+r3arpg1+7 4gcQ== 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:references:cc:to:subject; bh=jLAqox2YbzRm6/Gr2No63u32wU7EKbc2myJ6H9u3u9w=; b=lOpI/4FxxhEGRHPSdPc7I0obTzXuB9ql5+3IxK0do1+x2ioSy7VUhLgbaEl9I25EA3 Aih+Z9IKm/qAPEGpNmQxH1dl9/DIJN5oq3KpOUu/led0FBYyDJ8bmU4ru5bJA6XP4aaS ybz8QXodZNLns9FeZH/PwiSEp+UvPx0Taa6/vFN79N9I2Zr/tJ/i5Rv/FZbSxiEQgv7z meaOBAlxLImjJosUkHwbprKqUoVXRtaFdwcYNN+Uv28feQkCesFWaEoXU27W0im/f77i 1rHVDXOsB2Lo2WJ/d6Cd8k5WungL7oUrvLOVvR2PJzaz3AGqhmaa+akbwWDnbbqpO5Sg YFcg== 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 s15si7043984otq.216.2020.03.03.09.50.24; Tue, 03 Mar 2020 09:50:35 -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 S1731644AbgCCRsY (ORCPT + 99 others); Tue, 3 Mar 2020 12:48:24 -0500 Received: from mx2.suse.de ([195.135.220.15]:52552 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731591AbgCCRsU (ORCPT ); Tue, 3 Mar 2020 12:48:20 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 54EB5AC9A; Tue, 3 Mar 2020 17:48:17 +0000 (UTC) Subject: Re: [RFC 2/3] mm/vma: Introduce VM_ACCESS_FLAGS To: Anshuman Khandual , linux-mm@kvack.org Cc: Russell King , Catalin Marinas , Mark Salter , Nick Hu , Ley Foon Tan , Michael Ellerman , Heiko Carstens , Yoshinori Sato , Guan Xuetao , Dave Hansen , Thomas Gleixner , Rob Springer , Greg Kroah-Hartman , Andrew Morton , linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, nios2-dev@lists.rocketboards.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <1583131666-15531-1-git-send-email-anshuman.khandual@arm.com> <1583131666-15531-3-git-send-email-anshuman.khandual@arm.com> From: Vlastimil Babka Message-ID: <52b4565f-2dab-c3e5-ead8-d76258f43a10@suse.cz> Date: Tue, 3 Mar 2020 18:48:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <1583131666-15531-3-git-send-email-anshuman.khandual@arm.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 3/2/20 7:47 AM, Anshuman Khandual wrote: > There are many places where all basic VMA access flags (read, write, exec) > are initialized or checked against as a group. One such example is during > page fault. Existing vma_is_accessible() wrapper already creates the notion > of VMA accessibility as a group access permissions. Hence lets just create > VM_ACCESS_FLAGS (VM_READ|VM_WRITE|VM_EXEC) which will not only reduce code > duplication but also extend the VMA accessibility concept in general. > > Cc: Russell King > CC: Catalin Marinas > CC: Mark Salter > Cc: Nick Hu > CC: Ley Foon Tan > Cc: Michael Ellerman > Cc: Heiko Carstens > Cc: Yoshinori Sato > Cc: Guan Xuetao > Cc: Dave Hansen > Cc: Thomas Gleixner > Cc: Rob Springer > Cc: Greg Kroah-Hartman > Cc: Andrew Morton > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-c6x-dev@linux-c6x.org > Cc: nios2-dev@lists.rocketboards.org > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux-s390@vger.kernel.org > Cc: linux-sh@vger.kernel.org > Cc: devel@driverdev.osuosl.org > Cc: linux-mm@kvack.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Anshuman Khandual Dunno. Such mask seems ok for testing flags, but it's a bit awkward when initializing flags, where it covers just one of many combinations that seem used. But no strong opinions, patch looks correct.