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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 9B6D7C79F82 for ; Tue, 8 Sep 2026 20:28:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E7FB010ED5F; Tue, 8 Sep 2026 20:28:46 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="QIcU+TT4"; dkim-atps=neutral Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id C0E2410ED5F for ; Tue, 8 Sep 2026 20:28:44 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 74663433B9; Tue, 8 Sep 2026 20:28:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89CE71F00A3A; Tue, 8 Sep 2026 20:28:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1788899324; bh=S6tE0uEfipTaQVVjMdd6O5/Vs/dJ9VaNo2fdl5bbGRQ=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=QIcU+TT4km55OlwvKPUi/HitbxQoemt2pIlAm9eZzSCggpxtY6fmb3BUKG59Q72IB roECK+TdtDGYxye1yC29XAQ9+MzdmocReFcJ4r4tkNnSykIC8SHbjqGCZINuNM37nr D2cSbqXmgDXRHbQp6RXTDcp0qGYYvoYppIzA5IJLdET/4qNPAqpeGujkjtV5M8ijU0 jAgJV0g1Pg+/PxM1JxabtVAg9sq/mcdHPEUqxJ1sbpDaqWrteDOjFNaHFUoGVN9Gz6 J4bR4d6653K+x88nBNyS0gA3sZ1XVPnzJdLwYpOE5U7mle36yWXGlWIYkJfPfZ9kaL rCccthO2hghKQ== From: sashiko-bot@kernel.org Subject: Re: [PATCH 14/39] mm/vma: add vma[_flags]_is_kernel_owned() predicates To: =?utf-8?b?TG9yZW56byBTdG9ha2VzIChBUk0p?= Cc: linux-trace-kernel@vger.kernel.org, "Oliver Upton" , linux-scsi@vger.kernel.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, bpf@vger.kernel.org, "Vasily Gorbik" , selinux@vger.kernel.org, "Christian Borntraeger" , "Heiko Carstens" , linux-perf-users@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.linux.dev, "Alexander Gordeev" , "Marc Zyngier" In-Reply-To: <20260908-b4-mmap-prepare-vma-flag-sanify-v1-14-dacf19cce22b@kernel.org> References: <20260908-b4-mmap-prepare-vma-flag-sanify-v1-0-dacf19cce22b@kernel.org> <20260908-b4-mmap-prepare-vma-flag-sanify-v1-14-dacf19cce22b@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 08 Sep 2026 20:28:43 +0000 Message-Id: <20260908202843.89CE71F00A3A@smtp.kernel.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" > Rather than referring to VMA flags with uncertain meaning, add a new > predicate that explicitly describes what possession of the VMA_PFNMAP_BIT > or VMA_MIXEDMAP_BIT flags mean, and then refer to that function for > determining VMA mergeability. >=20 > Either flag means the contents of the mapping are owned by the kernel, > usually a driver, rather than by the core mm: the memory may be MMIO, > kernel-allocated pages or even ordinary pages the driver maps itself, but > the core must not populate, reclaim, migrate, copy-on-write or merge the > range on its own initiative. >=20 > We initially also include VMA_IO_BIT here, as by implication, these must = be > kernel-owned. (mlock() also sets VMA_IO_BIT transiently on ordinary VMAs > while locking them, which is addressed later in this series.) >=20 > However the intent is to in future remove this, as no mapping should be > marked as an I/O mapping without also being marked with VMA_PFNMAP_BIT. >=20 > This forms the basis of further work intended to improve how we express V= MA > properties such as this. >=20 > Also update the VMA userland tests to reflect the change. >=20 > No functional change intended. >=20 > Signed-off-by: Lorenzo Stoakes (ARM) Sashiko has reviewed this patch and found no issues. It looks great! --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260908-b4-mmap-pr= epare-vma-flag-sanify-v1-0-dacf19cce22b@kernel.org?part=3D14