From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75821253932; Mon, 23 Mar 2026 15:49:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774280998; cv=none; b=ocQe78PDBlIlzUQy2xrG8/fuQ6ovbqO/1DluBltT25U0+giDKgmsaw25xXOAXneRHIVVmzn/bCYnnYe/brxyhDwpv1CypMvbbyKWjud12yglUaI8jRlaVMY39VKW4DXdIM6urirWZiZiILvgzZUYBDuspHb55OSELN3cANE9P6Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774280998; c=relaxed/simple; bh=PE+T0jq3B8ZtYRDz678LEyuTz6jmDPCQy5RpPTYrDcc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ilerMIv5lykSCqmaVgORz011dvitCJborCFezyVm+m+b9DM+5z3wHHhssjyWGgr+uXWqSmJXPtYqlAKxI8YrCHULlgKIO2LZy0j9Sg4b+Te1t3B0AVqu26T/t1w18b+BI/09/zMYFP0bjrodtA999iMJBZRNXPeYh7m19bYj7qE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XdKC0tlg; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XdKC0tlg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79346C4CEF7; Mon, 23 Mar 2026 15:49:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774280998; bh=PE+T0jq3B8ZtYRDz678LEyuTz6jmDPCQy5RpPTYrDcc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=XdKC0tlgf1MZ9+nFlKePnzFurNne6QPx1E6YWyTEqc5Cy4/MJ7viljpcXJeeYfD84 LwWQhNPsI2I9K0v1c33u+VAYFjbd8O5XNRv7oB6hk9aWRLevlIqBhXTN/OJlKMwQKf P5Vz/q+wIiOUnPmbE+gPP+1XyMVrMVU51S9pyTagqqIblZpcRImI+DCS0rQGs9Ppmv uI4cbcMRaN1v0kgvKPt9I+2sGELYGp/hsRsweEovyazf3HWaMCdkqf89a80XhZaKnl owytQQeI/86OfShIGnWbjgDPLE70BmD03V3uE7cRvQ8417IfFC5O/o3RDSK2/SzDZz cVIvEtMGRKwxg== Message-ID: <3945a9c5-565f-4126-8d46-1db584b09e79@kernel.org> Date: Mon, 23 Mar 2026 16:49:44 +0100 Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 24/25] mm/vma: convert __mmap_region() to use vma_flags_t To: "Lorenzo Stoakes (Oracle)" , Andrew Morton Cc: David Hildenbrand , "Liam R . Howlett" , Jann Horn , Pedro Falcato , Mike Rapoport , Suren Baghdasaryan , Kees Cook , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Brian Cain , Huacai Chen , WANG Xuerui , Thomas Bogendoerfer , Dinh Nguyen , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Richard Weinberger , Anton Ivanov , Johannes Berg , Alexander Viro , Christian Brauner , Jan Kara , Xu Xin , Chengming Zhou , Michal Hocko , Paul Moore , Stephen Smalley , Ondrej Mosnacek , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-um@lists.infradead.org, linux-fsdevel@vger.kernel.org, selinux@vger.kernel.org References: <1fc33a404c962f02da778da100387cc19bd62153.1774034900.git.ljs@kernel.org> From: "Vlastimil Babka (SUSE)" Content-Language: en-US In-Reply-To: <1fc33a404c962f02da778da100387cc19bd62153.1774034900.git.ljs@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/20/26 8:38 PM, Lorenzo Stoakes (Oracle) wrote: > Update the mmap() implementation logic implemented in __mmap_region() and > functions invoked by it. The mmap_region() function converts its input > vm_flags_t parameter to a vma_flags_t value which it then passes to > __mmap_region() which uses the vma_flags_t value consistently from then > on. > > As part of the change, we convert map_deny_write_exec() to using > vma_flags_t (it was incorrectly using unsigned long before), and place it > in vma.h, as it is only used internal to mm. > > With this change, we eliminate the legacy is_shared_maywrite_vm_flags() > helper function which is now no longer required. > > We are also able to update the MMAP_STATE() and VMG_MMAP_STATE() macros to > use the vma_flags_t value. > > Finally, we update the VMA tests to reflect the change. > > Signed-off-by: Lorenzo Stoakes (Oracle) Acked-by: Vlastimil Babka (SUSE) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 242E5F4613C for ; Mon, 23 Mar 2026 15:50:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ppi685GRpbzjDzJ4UBCJB0NoO4TYcx0fXf8tgIRlHao=; b=JWlIP/A4mcKCXm 13AhrtKkTBajdBSUHY5XyxoTT+u5H+wVxYPoBw7D2h6CKQb8ERuspdUXhld84VxrOsmgtyhDiMu8T 9Xu5n+DYCK+3aqm1BgozkkvozdwALfKplrDLj5g5NC80ubM7DE314YRHMY3lRpMDCHl17FvCHbOE+ t7bWJqWNXZNklGL3HVrbbyK2eXcq9KrP0gd7mnXcs8xZAtLPRbG3mDLffrw7YsIjG9b0VPJU/Zrm2 Ragf+YAgQY8enD4VmBBqqbaxHZcM2NilPBIF0Bp871uoTBKQDIogF9aCSTHniU+55y8YxYVdnmt0l B2ZmMS05dqYCoohXqyIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1w4hXV-0000000H45C-2w3I; Mon, 23 Mar 2026 15:50:01 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1w4hXT-0000000H44O-0tyL; Mon, 23 Mar 2026 15:50:00 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 30C9443D7C; Mon, 23 Mar 2026 15:49:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79346C4CEF7; Mon, 23 Mar 2026 15:49:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774280998; bh=PE+T0jq3B8ZtYRDz678LEyuTz6jmDPCQy5RpPTYrDcc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=XdKC0tlgf1MZ9+nFlKePnzFurNne6QPx1E6YWyTEqc5Cy4/MJ7viljpcXJeeYfD84 LwWQhNPsI2I9K0v1c33u+VAYFjbd8O5XNRv7oB6hk9aWRLevlIqBhXTN/OJlKMwQKf P5Vz/q+wIiOUnPmbE+gPP+1XyMVrMVU51S9pyTagqqIblZpcRImI+DCS0rQGs9Ppmv uI4cbcMRaN1v0kgvKPt9I+2sGELYGp/hsRsweEovyazf3HWaMCdkqf89a80XhZaKnl owytQQeI/86OfShIGnWbjgDPLE70BmD03V3uE7cRvQ8417IfFC5O/o3RDSK2/SzDZz cVIvEtMGRKwxg== Message-ID: <3945a9c5-565f-4126-8d46-1db584b09e79@kernel.org> Date: Mon, 23 Mar 2026 16:49:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 24/25] mm/vma: convert __mmap_region() to use vma_flags_t To: "Lorenzo Stoakes (Oracle)" , Andrew Morton Cc: David Hildenbrand , "Liam R . Howlett" , Jann Horn , Pedro Falcato , Mike Rapoport , Suren Baghdasaryan , Kees Cook , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Brian Cain , Huacai Chen , WANG Xuerui , Thomas Bogendoerfer , Dinh Nguyen , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Richard Weinberger , Anton Ivanov , Johannes Berg , Alexander Viro , Christian Brauner , Jan Kara , Xu Xin , Chengming Zhou , Michal Hocko , Paul Moore , Stephen Smalley , Ondrej Mosnacek , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-um@lists.infradead.org, linux-fsdevel@vger.kernel.org, selinux@vger.kernel.org References: <1fc33a404c962f02da778da100387cc19bd62153.1774034900.git.ljs@kernel.org> From: "Vlastimil Babka (SUSE)" Content-Language: en-US In-Reply-To: <1fc33a404c962f02da778da100387cc19bd62153.1774034900.git.ljs@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260323_084959_299701_32339A7C X-CRM114-Status: GOOD ( 14.97 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On 3/20/26 8:38 PM, Lorenzo Stoakes (Oracle) wrote: > Update the mmap() implementation logic implemented in __mmap_region() and > functions invoked by it. The mmap_region() function converts its input > vm_flags_t parameter to a vma_flags_t value which it then passes to > __mmap_region() which uses the vma_flags_t value consistently from then > on. > > As part of the change, we convert map_deny_write_exec() to using > vma_flags_t (it was incorrectly using unsigned long before), and place it > in vma.h, as it is only used internal to mm. > > With this change, we eliminate the legacy is_shared_maywrite_vm_flags() > helper function which is now no longer required. > > We are also able to update the MMAP_STATE() and VMG_MMAP_STATE() macros to > use the vma_flags_t value. > > Finally, we update the VMA tests to reflect the change. > > Signed-off-by: Lorenzo Stoakes (Oracle) Acked-by: Vlastimil Babka (SUSE) _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3E03FF4613F for ; Mon, 23 Mar 2026 15:50:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gkcrx3T0CXz2li3OqtvZ2+YqfLmm/dQgw/7ec6itbrU=; b=t9wPN4c+yZPztk YIWWwpegGuqgvNTGhDsMIBJeztpOmm3qCXyXfYl2kTzSb0ig/hX7VmJ8Or8ng1QtZ0N9JGKppWvXI GLo/DVSGzQqIX/lEtPAKtnGqMuDZiEcSSl5WHtE+N5DxJYjqd9gD2GwZ0I5Z3oQUaw2zOaDHDNVBL EnS5xu14e7HBZzMmiYXdoMhkqRDTR3H+pjZDGtHS7T+ckVo1WTUVLSEQ07+k8hoAFKsUr8SN49sq5 y4PDSPpi/Zs5/yfLkqTn95TbdPYsIkGJLQ64JPW4mLsVnJByQq5gs7/PgN81nRlQIWzkH61fDwBXA GIGxTRPsGql1NaMQrw7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1w4hXV-0000000H45G-45kg; Mon, 23 Mar 2026 15:50:01 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1w4hXT-0000000H44O-0tyL; Mon, 23 Mar 2026 15:50:00 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 30C9443D7C; Mon, 23 Mar 2026 15:49:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79346C4CEF7; Mon, 23 Mar 2026 15:49:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774280998; bh=PE+T0jq3B8ZtYRDz678LEyuTz6jmDPCQy5RpPTYrDcc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=XdKC0tlgf1MZ9+nFlKePnzFurNne6QPx1E6YWyTEqc5Cy4/MJ7viljpcXJeeYfD84 LwWQhNPsI2I9K0v1c33u+VAYFjbd8O5XNRv7oB6hk9aWRLevlIqBhXTN/OJlKMwQKf P5Vz/q+wIiOUnPmbE+gPP+1XyMVrMVU51S9pyTagqqIblZpcRImI+DCS0rQGs9Ppmv uI4cbcMRaN1v0kgvKPt9I+2sGELYGp/hsRsweEovyazf3HWaMCdkqf89a80XhZaKnl owytQQeI/86OfShIGnWbjgDPLE70BmD03V3uE7cRvQ8417IfFC5O/o3RDSK2/SzDZz cVIvEtMGRKwxg== Message-ID: <3945a9c5-565f-4126-8d46-1db584b09e79@kernel.org> Date: Mon, 23 Mar 2026 16:49:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 24/25] mm/vma: convert __mmap_region() to use vma_flags_t To: "Lorenzo Stoakes (Oracle)" , Andrew Morton Cc: David Hildenbrand , "Liam R . Howlett" , Jann Horn , Pedro Falcato , Mike Rapoport , Suren Baghdasaryan , Kees Cook , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Brian Cain , Huacai Chen , WANG Xuerui , Thomas Bogendoerfer , Dinh Nguyen , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Richard Weinberger , Anton Ivanov , Johannes Berg , Alexander Viro , Christian Brauner , Jan Kara , Xu Xin , Chengming Zhou , Michal Hocko , Paul Moore , Stephen Smalley , Ondrej Mosnacek , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-um@lists.infradead.org, linux-fsdevel@vger.kernel.org, selinux@vger.kernel.org References: <1fc33a404c962f02da778da100387cc19bd62153.1774034900.git.ljs@kernel.org> From: "Vlastimil Babka (SUSE)" Content-Language: en-US In-Reply-To: <1fc33a404c962f02da778da100387cc19bd62153.1774034900.git.ljs@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260323_084959_299701_32339A7C X-CRM114-Status: GOOD ( 14.97 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org On 3/20/26 8:38 PM, Lorenzo Stoakes (Oracle) wrote: > Update the mmap() implementation logic implemented in __mmap_region() and > functions invoked by it. The mmap_region() function converts its input > vm_flags_t parameter to a vma_flags_t value which it then passes to > __mmap_region() which uses the vma_flags_t value consistently from then > on. > > As part of the change, we convert map_deny_write_exec() to using > vma_flags_t (it was incorrectly using unsigned long before), and place it > in vma.h, as it is only used internal to mm. > > With this change, we eliminate the legacy is_shared_maywrite_vm_flags() > helper function which is now no longer required. > > We are also able to update the MMAP_STATE() and VMG_MMAP_STATE() macros to > use the vma_flags_t value. > > Finally, we update the VMA tests to reflect the change. > > Signed-off-by: Lorenzo Stoakes (Oracle) Acked-by: Vlastimil Babka (SUSE) _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc