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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94FC3C433EF for ; Thu, 21 Oct 2021 16:52:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 071E6611C7 for ; Thu, 21 Oct 2021 16:52:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 071E6611C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=quicinc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 9566A6B006C; Thu, 21 Oct 2021 12:52:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 905E66B0071; Thu, 21 Oct 2021 12:52:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7F4E9900002; Thu, 21 Oct 2021 12:52:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0057.hostedemail.com [216.40.44.57]) by kanga.kvack.org (Postfix) with ESMTP id 6ABB56B006C for ; Thu, 21 Oct 2021 12:52:06 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 297452BC18 for ; Thu, 21 Oct 2021 16:52:06 +0000 (UTC) X-FDA: 78721037052.29.A6CE64E Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by imf02.hostedemail.com (Postfix) with ESMTP id A7DA17001779 for ; Thu, 21 Oct 2021 16:52:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1634835125; x=1666371125; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=C2USpOaQOuMhe1S62pB1CHZMA8ULxI2Wj/wPcLVsRyQ=; b=ybS8NOSmMoqeCZUJvbhBCf4GUMTcfMt2/psgfLfbkq/NOvcKtbXzb9Xv jgm7bb6mcqEgXrjObgWmY6WIaO1tP6wpz9wqC5pSFq5nTtDJxw/RplVCr hJr7/9Tk8eiaa5jOxtyQNSMCO6t94YgU4GYD8tB11dAyXW+hcu+TwPK/L A=; Received: from ironmsg08-lv.qualcomm.com ([10.47.202.152]) by alexa-out.qualcomm.com with ESMTP; 21 Oct 2021 09:52:04 -0700 X-QCInternal: smtphost Received: from nalasex01a.na.qualcomm.com ([10.47.209.196]) by ironmsg08-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2021 09:52:03 -0700 Received: from [10.110.35.33] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.7; Thu, 21 Oct 2021 09:52:02 -0700 Subject: Re: [PATCH v2 0/2] memblock: exclude MEMBLOCK_NOMAP regions from kmemleak To: Mike Rapoport , CC: Andrew Morton , Catalin Marinas , Linus Torvalds , Mike Rapoport , Vladimir Zapolskiy , References: <20211021070929.23272-1-rppt@kernel.org> From: Qian Cai Message-ID: <0599ae1a-e00b-b69c-6ad0-b741ddc291b2@quicinc.com> Date: Thu, 21 Oct 2021 12:52:01 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211021070929.23272-1-rppt@kernel.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Stat-Signature: wx96ja3ku6wmnpxaa4xx387q83dee3mn X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: A7DA17001779 Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcdkim header.b=ybS8NOSm; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf02.hostedemail.com: domain of quic_qiancai@quicinc.com designates 129.46.98.28 as permitted sender) smtp.mailfrom=quic_qiancai@quicinc.com X-HE-Tag: 1634835122-118063 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 10/21/21 3:09 AM, Mike Rapoport wrote: > From: Mike Rapoport > > Hi, > > This is take 2 to fix interaction between MEMBLOCK_NOMAP and kmemleak. > > The previous version caused boot failures Qian Cai reported here: > > https://lore.kernel.org/all/c30ff0a2-d196-c50d-22f0-bd50696b1205@quicinc.com > > The failures happened because calling kmemleak_free_part_phys() (or any > kmemleak phys APIs for that matter) too early means it cannot use __va() on > arm64. > > This late in the cycle I can only think of reverting kmemleak wavier from > memblock_mark_nomap() and putting it in the only two callers that set > MEMBLOCK_NOMAP to an allocated chunk rather than marking NOMAP "unusable" > memory reported by firmware. > > The first patch here is the revert of v1 and the second patch is actual v2 > implementation. > > Vladimir and Qian, I'd appreciate if you could verify that v2 works for > you. FYI, this passed the regression tests here. > > v2: > * move kmemleak waiver from memblock_mark_nomap() to callers that need it > * use kmemleak_ignore_phys() rather than kmemleak_free_part_phys() as > Catalin suggested. > > v1: https://lore.kernel.org/all/20211013054756.12177-1-rppt@kernel.org > > Mike Rapoport (2): > Revert "memblock: exclude NOMAP regions from kmemleak" > memblock: exclude MEMBLOCK_NOMAP regions from kmemleak > > drivers/acpi/tables.c | 3 +++ > drivers/of/of_reserved_mem.c | 2 ++ > mm/memblock.c | 10 ++++------ > 3 files changed, 9 insertions(+), 6 deletions(-) > > > base-commit: 519d81956ee277b4419c723adfb154603c2565ba >