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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 357A0C433EF for ; Wed, 15 Dec 2021 14:03:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QbsYa3jQmD11L82Amh92vzFp5GRYU5qL1YIfDKsazHg=; b=yfOGhnpyUDdLMB AYGg5rzj5WdAM95B2wxQxH2TIzNR417ktd88V9kOW/iBrFQfEyoE6jCa5SBu0quDoXHY5VAhh7q/z Z+7dmZWwpbOHnif1UsbSmkuvXWEIne6WAIzE75Uye/DLCeoa7MZWzkxIf6rP3foPR2ftOUGWiLKho jNzEOEKsuHqs0cXAgnh0brZWuYxA8XPacuAsI1+deUzkjjbRqkH2kkhGmhtkePxPDf+eWL/Pi4uhV 30R1OrG1Zd5OcdeImCEepy5wA49VeAhKQvXd4yNvv06EZ8m2CwGDztIM3UNryv+U3yCYipyl8yh8z Oxqb2oWgniWTngxhYbRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxUrS-0011D3-3w; Wed, 15 Dec 2021 14:02:26 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxUrO-0011Br-5n for linux-arm-kernel@lists.infradead.org; Wed, 15 Dec 2021 14:02:23 +0000 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 dfw.source.kernel.org (Postfix) with ESMTPS id BB8156191A; Wed, 15 Dec 2021 14:02:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3B76C34604; Wed, 15 Dec 2021 14:02:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1639576940; bh=gjJDfN4/cwB6Q6D83aEK1EKtI3r4pBKQK7vK6fns9kk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PoOscxMO+sVvikJP4LXu4/0jpqIWAE5DP2d35uAR1yZrRBvK/Cffyq+NujzUeKLfQ ifPtaJrL/6qTapFVRUrwgO8eVYHrMWwa/rL9vD2/vZqdvtzx9xyAOzSN6+UIKpnjLo Rr3MxilQmtuxcjhBr17n4CJ/roYV70fmX783KWnE= Date: Wed, 15 Dec 2021 15:02:17 +0100 From: Greg KH To: Mark-PK Tsai Cc: stable@vger.kernel.org, rppt@kernel.org, akpm@linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux@armlinux.org.uk, rppt@linux.ibm.com, tony@atomide.com, wangkefeng.wang@huawei.com, yj.chiang@mediatek.com Subject: Re: [PATCH 5.4 0/5] memblock, arm: fixes for freeing of the memory map Message-ID: References: <20211213085710.28962-1-mark-pk.tsai@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211215_060222_276707_B3192562 X-CRM114-Status: GOOD ( 22.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Dec 13, 2021 at 10:07:40AM +0100, Greg KH wrote: > On Mon, Dec 13, 2021 at 04:57:05PM +0800, Mark-PK Tsai wrote: > > When linux memory is not aligned with page block size and have hole in zone, > > the 5.4-lts arm kernel might crash in move_freepages() as Kefen Wang reported in [1]. > > Backport the upstream fix commits by Mike Rapoport [2] to 5.4 can fix this issue. > > > > And free_unused_memmap() of arm and arm64 are moved to generic mm/memblock in > > the below upstream commit, so I applied the first two patches to free_unused_memmap() > > in arch/arm/mm/init.c. > > > > (4f5b0c178996 arm, arm64: move free_unused_memmap() to generic mm) > > > > [1] https://lore.kernel.org/lkml/2a1592ad-bc9d-4664-fd19-f7448a37edc0@huawei.com/ > > [2] https://lore.kernel.org/lkml/20210630071211.21011-1-rppt@kernel.org/#t > > > > Mike Rapoport (5): > > memblock: free_unused_memmap: use pageblock units instead of MAX_ORDER > > memblock: align freed memory map on pageblock boundaries with > > SPARSEMEM > > memblock: ensure there is no overflow in memblock_overlaps_region() > > arm: extend pfn_valid to take into account freed memory map alignment > > arm: ioremap: don't abuse pfn_valid() to check if pfn is in RAM > > > > arch/arm/mm/init.c | 37 +++++++++++++++++++++++++------------ > > arch/arm/mm/ioremap.c | 4 +++- > > mm/memblock.c | 3 ++- > > 3 files changed, 30 insertions(+), 14 deletions(-) > > > > -- > > 2.18.0 > > > > These look like they also are required in 5.10.y as well, right? Please > also provide a backported series for that tree, we can not have users > moving to a newer kernel version and having regressions. > > I can't take this series until then, sorry. Ah, now I see your 5.10 series, thanks. I'll go queue both of these series up now, thanks for the backports. greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 496FDC433EF for ; Wed, 15 Dec 2021 14:02:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 75C916B0071; Wed, 15 Dec 2021 09:02:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 70BCF6B0073; Wed, 15 Dec 2021 09:02:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 621F76B0074; Wed, 15 Dec 2021 09:02:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 540D86B0071 for ; Wed, 15 Dec 2021 09:02:42 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 167E3894AC for ; Wed, 15 Dec 2021 14:02:32 +0000 (UTC) X-FDA: 78920193744.30.1D8B5B9 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf17.hostedemail.com (Postfix) with ESMTP id BA70F40034 for ; Wed, 15 Dec 2021 14:02:16 +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 dfw.source.kernel.org (Postfix) with ESMTPS id BB8156191A; Wed, 15 Dec 2021 14:02:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3B76C34604; Wed, 15 Dec 2021 14:02:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1639576940; bh=gjJDfN4/cwB6Q6D83aEK1EKtI3r4pBKQK7vK6fns9kk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PoOscxMO+sVvikJP4LXu4/0jpqIWAE5DP2d35uAR1yZrRBvK/Cffyq+NujzUeKLfQ ifPtaJrL/6qTapFVRUrwgO8eVYHrMWwa/rL9vD2/vZqdvtzx9xyAOzSN6+UIKpnjLo Rr3MxilQmtuxcjhBr17n4CJ/roYV70fmX783KWnE= Date: Wed, 15 Dec 2021 15:02:17 +0100 From: Greg KH To: Mark-PK Tsai Cc: stable@vger.kernel.org, rppt@kernel.org, akpm@linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux@armlinux.org.uk, rppt@linux.ibm.com, tony@atomide.com, wangkefeng.wang@huawei.com, yj.chiang@mediatek.com Subject: Re: [PATCH 5.4 0/5] memblock, arm: fixes for freeing of the memory map Message-ID: References: <20211213085710.28962-1-mark-pk.tsai@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: BA70F40034 X-Stat-Signature: pbdr8kumo18qdkrbkpjutb5i66gnt675 Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=PoOscxMO; spf=pass (imf17.hostedemail.com: domain of gregkh@linuxfoundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org X-HE-Tag: 1639576936-237664 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: On Mon, Dec 13, 2021 at 10:07:40AM +0100, Greg KH wrote: > On Mon, Dec 13, 2021 at 04:57:05PM +0800, Mark-PK Tsai wrote: > > When linux memory is not aligned with page block size and have hole in zone, > > the 5.4-lts arm kernel might crash in move_freepages() as Kefen Wang reported in [1]. > > Backport the upstream fix commits by Mike Rapoport [2] to 5.4 can fix this issue. > > > > And free_unused_memmap() of arm and arm64 are moved to generic mm/memblock in > > the below upstream commit, so I applied the first two patches to free_unused_memmap() > > in arch/arm/mm/init.c. > > > > (4f5b0c178996 arm, arm64: move free_unused_memmap() to generic mm) > > > > [1] https://lore.kernel.org/lkml/2a1592ad-bc9d-4664-fd19-f7448a37edc0@huawei.com/ > > [2] https://lore.kernel.org/lkml/20210630071211.21011-1-rppt@kernel.org/#t > > > > Mike Rapoport (5): > > memblock: free_unused_memmap: use pageblock units instead of MAX_ORDER > > memblock: align freed memory map on pageblock boundaries with > > SPARSEMEM > > memblock: ensure there is no overflow in memblock_overlaps_region() > > arm: extend pfn_valid to take into account freed memory map alignment > > arm: ioremap: don't abuse pfn_valid() to check if pfn is in RAM > > > > arch/arm/mm/init.c | 37 +++++++++++++++++++++++++------------ > > arch/arm/mm/ioremap.c | 4 +++- > > mm/memblock.c | 3 ++- > > 3 files changed, 30 insertions(+), 14 deletions(-) > > > > -- > > 2.18.0 > > > > These look like they also are required in 5.10.y as well, right? Please > also provide a backported series for that tree, we can not have users > moving to a newer kernel version and having regressions. > > I can't take this series until then, sorry. Ah, now I see your 5.10 series, thanks. I'll go queue both of these series up now, thanks for the backports. greg k-h