From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3408C433EF for ; Thu, 21 Apr 2022 12:02:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 662886B0071; Thu, 21 Apr 2022 08:02:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5EC306B0073; Thu, 21 Apr 2022 08:02:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 48ACF6B0074; Thu, 21 Apr 2022 08:02:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 35A836B0071 for ; Thu, 21 Apr 2022 08:02:37 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id F0AB62093A for ; Thu, 21 Apr 2022 12:02:36 +0000 (UTC) X-FDA: 79380749112.05.27807E2 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf05.hostedemail.com (Postfix) with ESMTP id BC583100036 for ; Thu, 21 Apr 2022 12:02:33 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 32F34B82448; Thu, 21 Apr 2022 12:02:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CB4BC385A5; Thu, 21 Apr 2022 12:02:27 +0000 (UTC) Message-ID: <7d576466-0004-f644-7973-844c997a1503@linux-m68k.org> Date: Thu, 21 Apr 2022 22:02:24 +1000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: Regression with v5.18-rc1 tag on STM32F7 and STM32H7 based boards Content-Language: en-US To: Geert Uytterhoeven Cc: Hugh Dickins , Patrice CHOTARD , Arnd Bergmann , Mikulas Patocka , Lukas Czerner , "Darrick J . Wong" , Christoph Hellwig , zkabelac@redhat.com, Miklos Szeredi , Borislav Petkov , Andrew Morton , Alexandre TORGUE - foss , Valentin CARON - foss , linux-stm32@st-md-mailman.stormreply.com, Linux Kernel Mailing List , Linux FS Devel , Linux MM , Linux-Arch , Linux ARM , "moderated list:H8/300 ARCHITECTURE" , linux-m68k , Yoshinori Sato , Russell King References: <481a13f8-d339-f726-0418-ab4258228e91@foss.st.com> <95a0d1dd-bcce-76c7-97b9-8374c9913321@google.com> <7f2993a9-adc5-2b90-9218-c4ca8239c3e@google.com> <3695dc2a-7518-dee4-a647-821c7cda4a0f@foss.st.com> <2a462b23-5b8e-bbf4-ec7d-778434a3b9d7@google.com> <6f56d0d6-6d0d-f0c9-87df-f3ff25b26fc5@linux-m68k.org> From: Greg Ungerer In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: BC583100036 X-Stat-Signature: 5zj4jzkixab41dhfy9qw661ho87r6d67 Authentication-Results: imf05.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf05.hostedemail.com: domain of "SRS0=Op6a=U7=linux-m68k.org=gerg@kernel.org" designates 145.40.68.75 as permitted sender) smtp.mailfrom="SRS0=Op6a=U7=linux-m68k.org=gerg@kernel.org" X-HE-Tag: 1650542553-754320 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Geert, On 21/4/22 00:44, Geert Uytterhoeven wrote: > On Wed, Apr 20, 2022 at 3:53 PM Greg Ungerer wrote: >> On 16/4/22 10:58, Hugh Dickins wrote: >>> Just to wrap up this thread: the tentative arch/ patches below did not >>> go into 5.18-rc2, but 5.18-rc3 will contain >>> 1bdec44b1eee ("tmpfs: fix regressions from wider use of ZERO_PAGE") >>> which fixes a further issue, and deletes the line which gave you trouble. >>> >>> With arch/h8300 removed from linux-next, and arch/arm losing a page by >>> the patch below, I don't think it's worth my arguing for those changes. >>> I'd still prefer arch/m68k to expose its empty_zero_page in ZERO_PAGE(), >>> or else not allocate it; but I won't be pursuing this further. >> >> Thanks for pointing this out. It certainly does look wrong to me for >> the m68k nommu case. I am not aware of any existing issues caused by >> this - but there is no good reason not to fix it. >> >> So I propose this change. Build and run tested on my m68knommu targets. >> >> Regards >> Greg >> >> >> From f809fb8fbca9e5e637b8fda380955bd799bb3926 Mon Sep 17 00:00:00 2001 >> From: Greg Ungerer >> Date: Wed, 20 Apr 2022 23:27:47 +1000 >> Subject: [PATCH] m68knommu: set ZERO_PAGE() allocated zeroed page >> >> The non-MMU m68k pagetable ZERO_PAGE() macro is being set to the >> somewhat non-sensical value of "virt_to_page(0)". The zeroth page >> is not in any way guaranteed to be a page full of "0". So the result >> is that ZERO_PAGE() will almost certainly contain random values. >> >> We already allocate a real "empty_zero_page" in the mm setup code shared >> between MMU m68k and non-MMU m68k. It is just not hooked up to the >> ZERO_PAGE() macro for the non-MMU m68k case. >> >> Fix ZERO_PAGE() to use the allocated "empty_zero_page" pointer. >> >> I am not aware of any specific issues caused by the old code. >> >> Link: https://lore.kernel.org/linux-m68k/2a462b23-5b8e-bbf4-ec7d-778434a3b9d7@google.com/T/#t >> Reported-by: Hugh Dickens >> Signed-off-by: Greg Ungerer >> --- >> arch/m68k/include/asm/pgtable_no.h | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/arch/m68k/include/asm/pgtable_no.h b/arch/m68k/include/asm/pgtable_no.h >> index 87151d67d91e..bce5ca56c388 100644 >> --- a/arch/m68k/include/asm/pgtable_no.h >> +++ b/arch/m68k/include/asm/pgtable_no.h >> @@ -42,7 +42,8 @@ extern void paging_init(void); >> * ZERO_PAGE is a global shared page that is always zero: used >> * for zero-mapped memory areas etc.. >> */ >> -#define ZERO_PAGE(vaddr) (virt_to_page(0)) >> +extern void *empty_zero_page; >> +#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) >> >> /* >> * All 32bit addresses are effectively valid for vmalloc... > > And after that (or combined with this?), this can be factored > out from arch/m68k/include/asm/pgtable_{mm,no}.h into > arch/m68k/include/asm/pgtable.h. I think a new patch to do that work on top of this one would be best. I will work on that. Regards Greg > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds