From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 DC69632C923; Thu, 28 May 2026 06:15:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779948913; cv=none; b=S9/5cD8OBi/Djp65N9G3XLF5NMcNBy80mE+Yb0MA4jGMHoFmV8lkg3UiJHAdy4s6ERNrjW7C9qUAoEHoJ9FHvBFQAG9Ix+lYETHdZLkdk9XwWzybxmI411TCnuTzEwOEfSHAmybaSVljQneIRjDXGi3ThclWnpU3J/6EI7Xh44c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779948913; c=relaxed/simple; bh=RR6GEdH7P1865Opff4zo+adcY1veMNkXdid8t0FaQUQ=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=C4cWLmkabCIEJ1cWL6HAadR1/HAig3+5Wl1bnZGwzwG4ZADuATVR28XGRW5bO1bZ5SMMkVcNpZLlv5vj6hYNSopeTpapxEi7iXBavwGuTLAkz0Z4sCn0Jf3AMRCJwFxZyYWs+36/F6w+/U0Vtc7BbB1osQbA2IUTenLVDd+ep88= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a1PiQ5PN; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a1PiQ5PN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 278351F00A3A; Thu, 28 May 2026 06:15:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779948912; bh=sRKrhgIJK76DvhKc8lDcKP3ib2MuR8el2Ira7SHuRmM=; h=Date:From:To:Cc:In-Reply-To:References:Subject; b=a1PiQ5PNbkQnWnC30lpTKTrwQYadp2w2p0U8B2MzUZ5lWlCEg0QyM8AMQpzycZygv FvaONnp6/lnAoptcCj+C4fhPqVxWAHoPwlT2PsIAhUY7XxdXfxfB7r0gxJ/EkklHqh U5ndV9vAuvynZvJxFqWjKIjjunTWrj5iQNfFfCbCVeDwjPS+jZvG6up2mqiawURVp1 10h8wkyHeYvVGogUukL9e+Tvhycvo9j0HJvcM0FO4shNmUGfNCdJHV4IA//H0sJ6Ur z6ppWdUCbsjcN346iIBfcyHHa989xSLwor4KttyXLXjlad1+MJkD93DFKd1s+u05h5 GEt+TdRSegiSA== Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfauth.phl.internal (Postfix) with ESMTP id 16194F40079; Thu, 28 May 2026 02:15:11 -0400 (EDT) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-01.internal (MEProxy); Thu, 28 May 2026 02:15:11 -0400 X-ME-Sender: X-ME-Proxy-Cause: dmFkZTFYpebslvMFokJoFBZEvhS0RRgsf2rUv7/D81FLAhtEAxXQxJWExaQNrYQvlunXOY BzXZlDOzIwICfsvp+wnolkeo3xWaLn/+d/N1LoUHlWUfIIXpugElRdYZZhTKKZLx2NpaJJ PyWtUJneOFaEFjJXOZDovXcM+hcpCMkINXksgmiCh7FrU123DTD0mHWjBUvKOYhD8/JeTN TgPCJc7dtiYEtEx5zWv39oFWvBCiqMAXb7+6RwUz8fhWr3X8lIaHUIuBBnsPFiQvXo+j77 IGXF3FavQsXan91HQUIjAEhEyd81hdiEOEQ6SWdmeeaV3xzlrbmsV5pyW87rxFO1TjRYav e5AhKyOc6w3NP2RJAbo6/Tvbd2Rovf/EbsfYc68imA924zqCOVWKi2MaPL5udgbalieRsA M/2Nqck6HrqAjYKDfE8dPO+thC/pusJd1m1kFl1hUMvXnbBzG6J0BR34+LSR0y1Tvrl2+B uxLxG3/KyN+eD08+3YAizm1p6ZaI8JM/3kES/5hVqTZUNaQnVyEpq1aF8mkaWJh0yN0R+O gF5o6cRko4vpi2DVE4lbi6sZ7pZSVT/Uil+xYbx06cpSUDfB9YPcSHustlMlrkIsF06PpB /0BqrViHB5NhSI7arFBkuGzWRFGbbY6KrbjEkCFwH78CDaDP+qSFu/R6R54g X-ME-Proxy: Feedback-ID: ice86485a:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id E26E4182007A; Thu, 28 May 2026 02:15:10 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Thu, 28 May 2026 08:14:50 +0200 From: "Ard Biesheuvel" To: "Mike Rapoport" , "Ard Biesheuvel" Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Will Deacon" , "Catalin Marinas" , "Mark Rutland" , "Ryan Roberts" , "Anshuman Khandual" , "Liz Prucka" , "Seth Jenkins" , "Kees Cook" , "David Hildenbrand" , "Andrew Morton" , "Jann Horn" , linux-mm@kvack.org, linux-hardening@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, "Yoshinori Sato" , "Rich Felker" , "John Paul Adrian Glaubitz" Message-Id: <87fbe311-5657-4e36-8a33-7404980a9df6@app.fastmail.com> In-Reply-To: References: <20260526175846.2694125-17-ardb+git@google.com> <20260526175846.2694125-30-ardb+git@google.com> Subject: Re: [PATCH v6 13/15] sh: cast away constness from the zero page when flushing it from the cache Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi Mike, On Thu, 28 May 2026, at 07:46, Mike Rapoport wrote: > On Tue, May 26, 2026 at 07:59:00PM +0200, Ard Biesheuvel wrote: >> From: Ard Biesheuvel >> >> SH performs cache maintenance on the zero page during boot, presumably >> to ensure that any clearing of BSS that has occurred at startup is >> visible to other CPUs and DMA devices. > > It flushes the cache there because before 6215d9f4470f ("arch, mm: > consolidate empty_zero_page") empty_zero_page used was for boot parameters > at the very early boot. > > I removed memset(empty_zero_page, 0, PAGE_SIZE) that was a line above but > missed the cache flush. > > This whole "clear zero-page" can be removed IMO. > Good point.