Re: Linux 6.18-rc6
From: David Hildenbrand (Red Hat)
Date: Mon Nov 17 2025 - 12:54:00 EST
On 17.11.25 18:28, Linus Torvalds wrote:
On Mon, 17 Nov 2025 at 06:08, David Hildenbrand (Red Hat)
<david@xxxxxxxxxx> 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