[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <189cfb08-2593-4ff1-a3fa-3c7957cb6b60@kernel.org>
Date: Mon, 17 Nov 2025 18:53:37 +0100
From: "David Hildenbrand (Red Hat)" <david@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: David Wang <00107082@....com>, catalin.marinas@....com,
lance.yang@...ux.dev, b-padhi@...com, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, Jan Polensky <japo@...ux.ibm.com>
Subject: Re: Linux 6.18-rc6
On 17.11.25 18:28, Linus Torvalds wrote:
> On Mon, 17 Nov 2025 at 06:08, David Hildenbrand (Red Hat)
> <david@...nel.org> wrote:
>>
>> To not lose too much time, I just pushed the following patch to
>>
>> https://github.com/davidhildenbrand/linux.git zerotags
>
> Hmm. Why isn't the fix for this simply this (intentionally
> whitespace-damaged - don't apply mindlessly) one-liner:
>
> --- a/include/linux/highmem.h
> +++ b/include/linux/highmem.h
> @@ -253,5 +253,6 @@ static inline void
> clear_highpage_kasan_tagged(struct page *page)
>
> static inline void tag_clear_highpage(struct page *page)
> {
> + clear_highpage(page);
> }
>
> because even when the *real* tag_clear_highpage() triggers, it falls down to
>
> if (!system_supports_mte()) {
> clear_highpage(page);
> return;
> }
>
> so basically I think the fundamental bug here is that our fallback
> tag_clear_highpage() was just buggy and didn't do what it was supposed
> to do.
>
> That one-liner would seem to be a lot simpler and more robust than
> making this configuration-dependent. Just make the fallback do the
> right thing - blammo, problem solved.
>
> Am I missing something?
I had the same in mind for a second, but then I looked at
kernel_init_pages() with the kasan_disable_current() handling and
concluded that it's clearer to just disallow tag_clear_highpage() being
abused in the first place and reduce the effective code footprint of
post_alloc_hook().
--
Cheers
David
Powered by blists - more mailing lists