From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794870923; b=csVVPGd4uAFuMd8+zjtvMIgAJur7/yxKHcI1e+c9e5VF5dCuRL+BAkOuT4ul1nmqBUUM u6dNfzL+FYwnucJ1murzcpFTcR9rt5JF+954MqXza3tI83HBu8HI2mjPeMX0WWaqCU7yO /gfkrjhjXIaBO10z+RINmd5ccAFnUXtZdcwAgnd2KsBqznLuLjActY7enGgqg9WS3dF// VuANS6G4dfcx6vOO+zFffv89tFM+0JS6JzoXjPBA5K3jmGcD1o9Ss8zSvhp7Hs4ac+FgV 9BNsEMy1IS7dxWy7czg9ownIHTSygBBOTgS3RBcGsSa3UppfgAZ18oe1A/lqBXtr5TQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794870923; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=8Y/jmGHmDr5CDQdtNZLzYKMbpKH9Akbhi8ylVWwM4IM=; b=Qy7Seq6uSTRLij9Jt2yfrwC9CEByknvtR0ibNRYZJ2EClgrI7uC8zMFdCgirPZOBSRG0 pO+hbDO44OAVFTFVepCs/+jMvUgyHer0NGs3Co78K1BzZj5s2zHeEVzOQ9gNFlqU3BFBq OmwcSeglB++p16+zdVUj+me4Q6rpztdMB2OOStSt10olc3LXDczc/Y1t8En7QC2kDC24Z ytWDjstXVrk40T5gyl9hZKQLXzHC+k+wSxOQpqgUkA2a5J25XUSTX0HkUk1c4O5glDqjX ldxWJ/t9mCd7q77t/GQ3QXnGXBWMrxi0EZRGQsaKg7RSAiu44jr1uQE3kQpiwUlP/ow== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FEDmK3yu; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2FC3D606A330 for ; Mon, 16 Nov 2026 23:15:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FEDmK3yu Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5311A1F000C4; Mon, 16 Nov 2026 23:15:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794870922; bh=8Y/jmGHmDr5CDQdtNZLzYKMbpKH9Akbhi8ylVWwM4IM=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=FEDmK3yumbhiSrIrQBbD1KaUdpW47MZ7zm/FNLiW8bkO16EVPYUHoVhf1egtRYQdN mOs7U6ZQvOzk6wqcSbKaN7U7uguDipNddrqHPfPMfCbOJUmZhP4SUO3NQaGRUUm0Fy I3y1EHs2jkvz8z8fo8jI7bcqNAbuwM3ZRtdgQMXEQgm1XqKhGqe8pfWE8rz2uSf2Wi FSlYp0/XXlkNrS3dtnF3kavnt1HLu+WdZRqOaQ1liKtyjNv8z0tIDr61xGIyBGQkOn tcjy3u+0HaVirk02JefNMIACpHiVK7mNHkAs2KXeaXdttYrgewNhj9vJ7AhTAdt9Vr +VuUuA54+wDRA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v1 1/7] mm: add GFP_HIGHUSER_KASAN Reply-To: sashiko-reviews@lists.linux.dev To: "Jeff Xu" , "Andrew Morton" , "David Hildenbrand" , "Vlastimil Babka" , "Johannes Weiner" , "Andrey Ryabinin" Cc: "Lorenzo Stoakes" , "Liam R . Howlett" , "Mike Rapoport" , "Suren Baghdasaryan" , "Michal Hocko" , "Brendan Jackman" , "Zi Yan" , "Alexander Potapenko" , "Andrey Konovalov" , "Dmitry Vyukov" , "Vincenzo Frascino" , "Marco Elver" , "Boris Brezillon" , "Catalin Marinas" , "Chia-I Wu" , "Dev Jain" , "Evgenii Stepanov" , "Ian Rickards" , "Jann Horn" , "Jeff Vander Stoep" , "Jeff Xu" , "Kees Cook" , "Mark Rutland" , "Peter Collingbourne" , =?utf-8?b?UGllcnJlLUNsw6ltZW50IFRvc2k=?= , "Ryan Roberts" , "Tomasz Figa" , "Will Deacon" , "Alexander Viro" , "Christian Brauner" , "Jan Kara" , "Miklos Szeredi" , "Baoquan He" , "Pasha Tatashin" , "Pratyush Yadav" , "Allison Henderson" , "David S . Miller" , "Eric Dumazet" , "Jakub Kicinski" , "Paolo Abeni" , "Simon Horman" , kasan-dev@googlegroups.com, kexec@lists.infradead.org, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com In-Reply-To: <20261116230627.3537051-2-jeffxu@chromium.org> References: <20261116230627.3537051-1-jeffxu@chromium.org> <20261116230627.3537051-2-jeffxu@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 16 Nov 2026 23:15:19 +0000 X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > A later patch in this series adds __GFP_SKIP_KASAN to GFP_HIGHUSER, so > that with CONFIG_KASAN_HW_TAGS its pages are neither tagged on > allocation nor poisoned on free. That suits pages whose contents belong > to userspace and are mapped there. >=20 > Some GFP_HIGHUSER users allocate buffers that the kernel itself fills > and drains through kmap_local_page(), such as pipe buffers. While such > pages are tagged, KASAN can report a linear overflow out of the page > and an access to it while it is free. >=20 > Add GFP_HIGHUSER_KASAN for these users, so that they can be converted > before GFP_HIGHUSER changes. It has the value GFP_HIGHUSER has today > and will not gain __GFP_SKIP_KASAN. The two stay identical without > CONFIG_KASAN_HW_TAGS, where __GFP_SKIP_KASAN is 0. >=20 > GFP_HIGHUSER_KASAN must not be used for memory that userspace can map > with PROT_MTE (anonymous, shmem and hugetlb pages). Userspace sets the > memory tags of such a page, while the kernel keeps accessing it through > page_address() with the KASAN tag from page->flags. The two do not > match, and kernel accesses are reported as KASAN faults. arm64 does not > reset the tag in page->flags when the page is mapped; it relies on the > page having been allocated with __GFP_SKIP_KASAN. Nothing checks for > misuse at allocation or mapping time. >=20 > No functional change. The kernel-doc describes GFP_HIGHUSER as it will > be once it skips KASAN tagging. >=20 > Assisted-by: LLM > Signed-off-by: Jeff Xu Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261116230627.3537= 051-1-jeffxu@chromium.org?part=3D1