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 7D107C433EF for ; Wed, 6 Apr 2022 06:21:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 12D766B0074; Wed, 6 Apr 2022 02:20:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0DCF46B0075; Wed, 6 Apr 2022 02:20:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE6436B0078; Wed, 6 Apr 2022 02:20:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0112.hostedemail.com [216.40.44.112]) by kanga.kvack.org (Postfix) with ESMTP id DB7C76B0074 for ; Wed, 6 Apr 2022 02:20:58 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 88858183CF8B5 for ; Wed, 6 Apr 2022 06:20:48 +0000 (UTC) X-FDA: 79325455776.27.147157B Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by imf26.hostedemail.com (Postfix) with ESMTP id 749A0140029 for ; Wed, 6 Apr 2022 06:20:47 +0000 (UTC) Received: from pps.filterd (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 2365XrT0013557; Wed, 6 Apr 2022 08:20:38 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=pWA9rhfIvXi7xQfjs4g7YC0QlPKyAhkJQh/gCQIhuSQ=; b=3ae4B4bsrbgI+RMWdVXpkMVfL6X7hfGzUxfB/h6a+ge23AUTQuieyQQF4LRK0R5o856b m//EtojJyA74H64+/uXZBc2LXfyhNKrOymAUrLFCTgxQPmREo/3K2GV21xzj+5w/zmmk 6GfonvT7x3CvOezuQyv5ZK4FbdbBG7d2QxyQQbqxwCEqgVF3pcCm4uneKQ8B0MIqV2nP ZeJy/EnOjsmf81aPqltE4iDGq1fBJimV9PyjCMU9k9XHrD9uRnZgqreJTyP//lDCkUw6 k9zHPMErHezC0pp3tSpYlgZDKxxyA2/tRjgV3yG01KGzzxeqQaV/PjB1tnygnOSdwFb5 hA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3f6bwk3np1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Apr 2022 08:20:38 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B8556100034; Wed, 6 Apr 2022 08:20:36 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id A3BC921FE86; Wed, 6 Apr 2022 08:20:36 +0200 (CEST) Received: from [10.201.21.201] (10.75.127.48) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.20; Wed, 6 Apr 2022 08:20:36 +0200 Message-ID: <30882dc7-c187-9d7c-726e-117a22dca4e9@foss.st.com> Date: Wed, 6 Apr 2022 08:20:35 +0200 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: Hugh Dickins CC: , , , , , , , , Alexandre TORGUE - foss , Valentin CARON - foss , , Linux Kernel Mailing List , , References: <481a13f8-d339-f726-0418-ab4258228e91@foss.st.com> <95a0d1dd-bcce-76c7-97b9-8374c9913321@google.com> From: Patrice CHOTARD In-Reply-To: <95a0d1dd-bcce-76c7-97b9-8374c9913321@google.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.48] X-ClientProxiedBy: SFHDAG2NODE1.st.com (10.75.127.4) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-04-06_02,2022-04-05_01,2022-02-23_01 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 749A0140029 X-Rspam-User: Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=foss.st.com header.s=selector1 header.b=3ae4B4bs; dmarc=pass (policy=none) header.from=foss.st.com; spf=pass (imf26.hostedemail.com: domain of "prvs=00953bb0fc=patrice.chotard@foss.st.com" designates 185.132.182.106 as permitted sender) smtp.mailfrom="prvs=00953bb0fc=patrice.chotard@foss.st.com" X-Stat-Signature: try89uacd937jy1cufa586sc3tem37sm X-HE-Tag: 1649226047-76019 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 Hugh On 4/5/22 21:59, Hugh Dickins wrote: > On Tue, 5 Apr 2022, Patrice CHOTARD wrote: >> >> We found an issue with last kernel tag v5.18-rc1 on stm32f746-disco and >> stm32h743-disco boards (ARMV7-M SoCs). >> >> Kernel hangs when executing SetPageUptodate(ZERO_PAGE(0)); in mm/filemap.c. >> >> By reverting commit 56a8c8eb1eaf ("tmpfs: do not allocate pages on read"), >> kernel boots without any issue. > > Sorry about that, thanks a lot for finding. > > I see that arch/arm/configs/stm32_defconfig says CONFIG_MMU is not set: > please confirm that is the case here. Yes i confirm, CONFIG_MMU is not set. > > Yes, it looks as if NOMMU platforms are liable to have a bogus (that's my > reading, but it may be unfair) definition for ZERO_PAGE(vaddr), and I was > walking on ice to touch it without regard for !CONFIG_MMU. > > CONFIG_SHMEM depends on CONFIG_MMU, so that PageUptodate is only needed > when CONFIG_MMU. > > Easily fixed by an #ifdef CONFIG_MMU there in mm/filemap.c, but I'll hunt > around (again) for a better place to do it - though I won't want to touch > all the architectures for it. I'll post later today. I did a quick test on my side, and yes, adding #ifdef CONFIG_MMU around SetPageUptodate(ZERO_PAGE(0)); allows to boot the boards. Thanks Patrice > > Hugh