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 7F0D1C88E72 for ; Mon, 14 Sep 2026 22:18:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BA7D110E213; Mon, 14 Sep 2026 22:18:10 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="Gw/HuIB2"; 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 2AA7F10E213 for ; Mon, 14 Sep 2026 22:18:10 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 101BA41A9B; Mon, 14 Sep 2026 22:18:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D10C1F000FF; Mon, 14 Sep 2026 22:18:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1789424289; bh=PBWZLje+EORDwYwarmdW9X/dW/jhJnmDYRf+A9Aw42o=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Gw/HuIB2124mJePNmCxr6OmGBWn8lOVcq8aYG+E3PBPBjy6+FZbkDn1Cw4N5AvD9c mNxvsww/0ZKIqPFy8/+I/HORpU5TB483GBv1INMk0g2ei3VsLnWPMYlPxrgDLR7NGg EP+qUP4mn00J9dPxrebqDONQxmsJKtPwKlJp1VhM40uol3Yj/K7Q92obZ/HRCyUyGz uqEz+yVYeKq4uUS6m2QoC+8khl2zgs1SiiGdA40PniclG1Ch8KucucPjFZ5tJHpij6 jooW57260512gOftkN2mMgVPaA4v7JoSnA+HY+7OlQd+OUXY783QMqmSa51TddGHgt hlO/8kEPaoxpg== From: sashiko-bot@kernel.org Subject: Re: [PATCH v2 33/40] mm/madvise: use predicates for madvise(..., MADV_DOFORK) To: =?utf-8?b?TG9yZW56byBTdG9ha2VzIChBUk0p?= Cc: linux-trace-kernel@vger.kernel.org, "Christian Borntraeger" , selinux@vger.kernel.org, linux-s390@vger.kernel.org, "Marc Zyngier" , kvmarm@lists.linux.dev, "Oliver Upton" , dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, "Vasily Gorbik" , "Alexander Gordeev" , bpf@vger.kernel.org, linux-scsi@vger.kernel.org, kvm@vger.kernel.org, "Heiko Carstens" , linux-perf-users@vger.kernel.org In-Reply-To: <20260914-b4-mmap-prepare-vma-flag-sanify-v2-33-7d9781ed5361@kernel.org> References: <20260914-b4-mmap-prepare-vma-flag-sanify-v2-0-7d9781ed5361@kernel.org> <20260914-b4-mmap-prepare-vma-flag-sanify-v2-33-7d9781ed5361@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 14 Sep 2026 22:18:08 +0000 Message-Id: <20260914221809.1D10C1F000FF@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" > Make it clear what we're blocking in MADV_DOFORK. Previously we simply > disallowed VM_SPECIAL i.e. kernel-owned mappings, fixed mappings and > VMA_IO_BIT. >=20 > Now the invariant is established that only kernel-owned mappings can set > VMA_IO_BIT, the VMA_IO_BIT check is redundant. >=20 > The rest is equivalent to testing for a kernel-owned or fixed mapping, > i.e. exactly the same check as whether the VMA is permitted to be merged. >=20 > This was established by commit 0b2758f48f22 ("Require (reasonably) normal > mappings for MADV_DOFORK") containing my hands-down favourite call out of > all time. >=20 > Express the same thing differently - if we wouldn't be allowed to merge i= t, > then we aren't allowed to manipulate CoW behaviour on fork. >=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/20260914-b4-mmap-pr= epare-vma-flag-sanify-v2-0-7d9781ed5361@kernel.org?part=3D33