From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: mm-commits@vger.kernel.org, stable@vger.kernel.org,
senozhatsky@chromium.org, minchan@kernel.org,
mark-pk.tsai@mediatek.com, syoshida@redhat.com
Subject: Re: + mm-zsmalloc-copy-kmsan-metadata-in-zs_page_migrate.patch added to mm-new branch
Date: Wed, 25 Mar 2026 10:46:26 +0900 [thread overview]
Message-ID: <acM-RcQ89TkxDhCo@google.com> (raw)
In-Reply-To: <20260321175018.5B0E7C19421@smtp.kernel.org>
On (26/03/21 10:50), Andrew Morton wrote:
> This patch will shortly appear at
> https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-zsmalloc-copy-kmsan-metadata-in-zs_page_migrate.patch
>
[..]
> ------------------------------------------------------
> From: Shigeru Yoshida <syoshida@redhat.com>
> Subject: mm/zsmalloc: copy KMSAN metadata in zs_page_migrate()
> Date: Sat, 21 Mar 2026 22:29:11 +0900
>
> zs_page_migrate() uses copy_page() to copy the contents of a zspage page
> during migration. However, copy_page() is not instrumented by KMSAN, so
> the shadow and origin metadata of the destination page are not updated.
>
> As a result, subsequent accesses to the migrated page are reported as
> use-after-free by KMSAN, despite the data being correctly copied.
>
> Add a kmsan_copy_page_meta() call after copy_page() to propagate the KMSAN
> metadata to the new page, matching what copy_highpage() does internally.
>
> Link: https://lkml.kernel.org/r/20260321132912.93434-1-syoshida@redhat.com
> Fixes: afb2d666d025 ("zsmalloc: use copy_page for full page copy")
> Signed-off-by: Shigeru Yoshida <syoshida@redhat.com>
> Cc: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
> Cc: Minchan Kim <minchan@kernel.org>
> Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
prev parent reply other threads:[~2026-03-25 1:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 17:50 + mm-zsmalloc-copy-kmsan-metadata-in-zs_page_migrate.patch added to mm-new branch Andrew Morton
2026-03-25 1:46 ` Sergey Senozhatsky [this message]
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=acM-RcQ89TkxDhCo@google.com \
--to=senozhatsky@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=mark-pk.tsai@mediatek.com \
--cc=minchan@kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=syoshida@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox