From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4418329B8FE for ; Mon, 17 Nov 2025 17:53:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763402023; cv=none; b=PTsNP0olswve7gEsyjhBSIT3Gex/7iSNbZsqMH2XEAzenfkQq8TZR6c5ogatiwVl5r8ALC2WeXnMkd/NJxKAkkrnZ2C6Nf91cD5iNqm5dKoRSrsfHgQoNfb+jviULaWgvN6Tp8iW5+LAeWe9azl8MAwpKyIjDaqBemlRSoUVk3Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763402023; c=relaxed/simple; bh=NbY/WbINz/YOHpBbO5XbGBgeL1wmro0wva/JxCEyTx0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=BCSCTTpwnorywjGaxMPn/TaeRERsHjWPEkWRFQTSyoUPQBhifJoX9bjv/3LWUKYzxlEkQ1G0fADLq6SbB98Cb6Y100IFzdCJs93di8I+HS5DXAuJrGVc/aHS5X71d+gfbDTK2xoU6KKdYYwSzVdpt0+mP1AoNM13QqLFAKADeZc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eRdeBUBP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eRdeBUBP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57C87C2BC9E; Mon, 17 Nov 2025 17:53:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763402023; bh=NbY/WbINz/YOHpBbO5XbGBgeL1wmro0wva/JxCEyTx0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=eRdeBUBPuBqDppOYH3vXVXbDT7pOJU+S4EjBCKMS7o68fq/6yAyzANxYQ+XlhVUCb 07IdxIqtS0WLpNcj5PEuDnZyOubWZnvsVYYtKSAs9y+vYu7PzmSRXu9jZtkua8+s4O 9WlGPlXgCiLihM/pAiEevhREWaGAtF2Mre4uIFCJhrlonII5SEFj8GnxaCbF+XcQef 9BS0wXt9xA2haxhA3C4MhfMlE855uzfQAusKuyU7sQy2k5v0ccFftd+xVEaxIZqk5m JPxKEiNlC1bGzVAhx6hM5T05pMicDBaJaOug2/eoNDPqLjbXWeXioGfRq1azx2nUUv kW92XvG7dDzkQ== Message-ID: <189cfb08-2593-4ff1-a3fa-3c7957cb6b60@kernel.org> Date: Mon, 17 Nov 2025 18:53:37 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Linux 6.18-rc6 To: Linus Torvalds Cc: David Wang <00107082@163.com>, catalin.marinas@arm.com, lance.yang@linux.dev, b-padhi@ti.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, Jan Polensky References: <20251117082023.90176-1-00107082@163.com> <6c09aaea.aa4a.19a91e379ab.Coremail.00107082@163.com> <37bad560-a8f3-4ae2-aa34-1edc635062c0@kernel.org> <1c14c47e.ab83.19a92102b26.Coremail.00107082@163.com> <25e4c75c-097d-44bb-8739-136a0238d5bf@kernel.org> From: "David Hildenbrand (Red Hat)" Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 17.11.25 18:28, Linus Torvalds wrote: > On Mon, 17 Nov 2025 at 06:08, David Hildenbrand (Red Hat) > 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