All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jeff Xu" <jeffxu@chromium.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"David Hildenbrand" <david@kernel.org>,
	"Vlastimil Babka" <vbabka@kernel.org>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Andrey Ryabinin" <ryabinin.a.a@gmail.com>
Cc: "Lorenzo Stoakes" <ljs@kernel.org>,
	"Liam R . Howlett" <liam@infradead.org>,
	"Mike Rapoport" <rppt@kernel.org>,
	"Suren Baghdasaryan" <surenb@google.com>,
	"Michal Hocko" <mhocko@suse.com>,
	"Brendan Jackman" <brendan.jackman@linux.dev>,
	"Zi Yan" <ziy@nvidia.com>,
	"Alexander Potapenko" <glider@google.com>,
	"Andrey Konovalov" <andreyknvl@gmail.com>,
	"Dmitry Vyukov" <dvyukov@google.com>,
	"Vincenzo Frascino" <vincenzo.frascino@arm.com>,
	"Marco Elver" <elver@google.com>,
	"Boris Brezillon" <boris.brezillon@collabora.com>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Chia-I Wu" <olvaffe@gmail.com>, "Dev Jain" <dev.jain@arm.com>,
	"Evgenii Stepanov" <eugenis@google.com>,
	"Ian Rickards" <ian.rickards@arm.com>,
	"Jann Horn" <jannh@google.com>,
	"Jeff Vander Stoep" <jeffv@google.com>,
	"Jeff Xu" <jeffxu@google.com>, "Kees Cook" <kees@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Peter Collingbourne" <peter@pcc.me.uk>,
	"Pierre-Clément Tosi" <ptosi@google.com>,
	"Ryan Roberts" <ryan.roberts@arm.com>,
	"Tomasz Figa" <tfiga@chromium.org>,
	"Will Deacon" <will@kernel.org>,
	"Alexander Viro" <viro@zeniv.linux.org.uk>,
	"Christian Brauner" <brauner@kernel.org>,
	"Jan Kara" <jack@suse.cz>, "Miklos Szeredi" <miklos@szeredi.hu>,
	"Baoquan He" <baoquan.he@linux.dev>,
	"Pasha Tatashin" <pasha.tatashin@soleen.com>,
	"Pratyush Yadav" <pratyush@kernel.org>,
	"Allison Henderson" <achender@kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@kernel.org>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Simon Horman" <horms@kernel.org>,
	kasan-dev@googlegroups.com, kexec@lists.infradead.org,
	linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com
Subject: Re: [PATCH v1 1/7] mm: add GFP_HIGHUSER_KASAN
Date: Mon, 16 Nov 2026 23:15:19 +0000	[thread overview]
Message-ID: <sashiko-outbox-217862@kernel.org> (raw)
In-Reply-To: <20261116230627.3537051-2-jeffxu@chromium.org>

> 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.
> 
> 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.
> 
> 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.
> 
> 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.
> 
> No functional change. The kernel-doc describes GFP_HIGHUSER as it will
> be once it skips KASAN tagging.
> 
> Assisted-by: LLM
> Signed-off-by: Jeff Xu <jeffxu@chromium.org>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261116230627.3537051-1-jeffxu@chromium.org?part=1


  reply	other threads:[~2026-11-16 23:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16 23:06 [PATCH v1 0/7] mm: kasan: skip KASAN for GFP_HIGHUSER Jeff Xu
2026-11-16 23:06 ` [PATCH v1 1/7] mm: add GFP_HIGHUSER_KASAN Jeff Xu
2026-11-16 23:15   ` sashiko-bot [this message]
2026-11-16 23:06 ` [PATCH v1 2/7] pipe, fuse: use GFP_HIGHUSER_KASAN for pipe buffer pages Jeff Xu
2026-11-16 23:15   ` sashiko-bot
2026-11-16 23:06 ` [PATCH v1 3/7] kexec: use GFP_HIGHUSER_KASAN for segment pages Jeff Xu
2026-11-16 23:15   ` sashiko-bot
2026-11-16 23:06 ` [PATCH v1 4/7] net/rds: use GFP_HIGHUSER_KASAN for message pages Jeff Xu
2026-11-16 23:15   ` sashiko-bot
2026-11-16 23:06 ` [PATCH v1 5/7] mm: kasan: skip KASAN for GFP_HIGHUSER Jeff Xu
2026-11-16 23:15   ` sashiko-bot
2026-11-17 10:21   ` Lorenzo Stoakes (ARM)
2026-11-17 12:06     ` David Hildenbrand (Arm)
2026-11-17 12:21       ` Lorenzo Stoakes (ARM)
2026-11-18  1:29     ` Jeff Xu
2026-11-16 23:06 ` [PATCH v1 6/7] mm/kasan/kunit: add page_alloc_skip_kasan test Jeff Xu
2026-11-16 23:15   ` sashiko-bot
2026-11-16 23:06 ` [PATCH v1 7/7] mm/kasan/kunit: add page_alloc_highuser_kasan test Jeff Xu
2026-11-16 23:15   ` sashiko-bot
2026-11-17 10:10 ` [PATCH v1 0/7] mm: kasan: skip KASAN for GFP_HIGHUSER David Hildenbrand (Arm)
2026-11-17 14:11   ` Tomasz Figa
2026-11-18  1:28     ` Jeff Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-217862@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=achender@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@gmail.com \
    --cc=baoquan.he@linux.dev \
    --cc=boris.brezillon@collabora.com \
    --cc=brauner@kernel.org \
    --cc=brendan.jackman@linux.dev \
    --cc=catalin.marinas@arm.com \
    --cc=davem@davemloft.net \
    --cc=david@kernel.org \
    --cc=dev.jain@arm.com \
    --cc=dvyukov@google.com \
    --cc=edumazet@kernel.org \
    --cc=elver@google.com \
    --cc=eugenis@google.com \
    --cc=glider@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=horms@kernel.org \
    --cc=ian.rickards@arm.com \
    --cc=jack@suse.cz \
    --cc=jannh@google.com \
    --cc=jeffv@google.com \
    --cc=jeffxu@chromium.org \
    --cc=jeffxu@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=kees@kernel.org \
    --cc=kexec@lists.infradead.org \
    --cc=kuba@kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=ljs@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mhocko@suse.com \
    --cc=miklos@szeredi.hu \
    --cc=olvaffe@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=peter@pcc.me.uk \
    --cc=pratyush@kernel.org \
    --cc=ptosi@google.com \
    --cc=rds-devel@oss.oracle.com \
    --cc=rppt@kernel.org \
    --cc=ryabinin.a.a@gmail.com \
    --cc=ryan.roberts@arm.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=surenb@google.com \
    --cc=tfiga@chromium.org \
    --cc=vbabka@kernel.org \
    --cc=vincenzo.frascino@arm.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=will@kernel.org \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.