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 00AFEC433EF for ; Tue, 19 Oct 2021 15:06:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 76FA16115A for ; Tue, 19 Oct 2021 15:06:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 76FA16115A 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 A1A086B006C; Tue, 19 Oct 2021 11:06:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C8C96B0071; Tue, 19 Oct 2021 11:06:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8B80B900002; Tue, 19 Oct 2021 11:06:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0006.hostedemail.com [216.40.44.6]) by kanga.kvack.org (Postfix) with ESMTP id 7ED316B006C for ; Tue, 19 Oct 2021 11:06:16 -0400 (EDT) Received: from smtpin34.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 3E9DB82499A8 for ; Tue, 19 Oct 2021 15:06:16 +0000 (UTC) X-FDA: 78713512752.34.19BC4C2 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by imf27.hostedemail.com (Postfix) with ESMTP id 4367A70000B4 for ; Tue, 19 Oct 2021 15:06:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1634655975; x=1666191975; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=YOqugBjrGNKINf9YHs8xoM1f5/rJiPP2cQDPU1Vulu8=; b=sBKcqpdy9ArhUhl+k+8PSqEvMXV805VgMTCJeZSC5YFLi1jv3LfhwyiQ f/ld5Ra+wA+XIgBCpMOfTXeGJsa6t+IPWOyEA4srCbnavj359lZhECAaG 9noIKRbIw5TcleBmTBB6GsZRUWzocvIHNDqJRN9DviBGNVOqFLmVmaaDT I=; Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 19 Oct 2021 08:06:14 -0700 X-QCInternal: smtphost Received: from nalasex01a.na.qualcomm.com ([10.47.209.196]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2021 08:06:14 -0700 Received: from [10.111.162.88] (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; Tue, 19 Oct 2021 08:06:12 -0700 Message-ID: <089478ad-3755-b085-d9aa-c68e9792895c@quicinc.com> Date: Tue, 19 Oct 2021 11:06:11 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH] memblock: exclude NOMAP regions from kmemleak Content-Language: en-US To: Catalin Marinas , Mike Rapoport CC: , Andrew Morton , Mike Rapoport , Vladimir Zapolskiy , , Linus Torvalds References: <20211013054756.12177-1-rppt@kernel.org> From: Qian Cai In-Reply-To: Content-Type: text/plain; charset="UTF-8" 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-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 4367A70000B4 X-Stat-Signature: z9rwfqn4dj49bdqtmkhz9fcquyyum5gz Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcdkim header.b=sBKcqpdy; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf27.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: 1634655974-977973 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/19/2021 7:37 AM, Catalin Marinas wrote: >>> I could help to confirm if it hangs right in the early boot somewhere if needed. >> >> The kernel config and a log of working kernel would help to start with. http://lsbug.org/tmp/ > > I don't think there's much in the log other than the EFI stub above. > >>> start_kernel() >>> setup_arch() >>> paging_init() >>> map_mem() >>> memblock_mark_nomap( > > Is this actual trace? It would be good to know where exactly it got > stuck. No, I did not confirm anything yet. There is going to take a while to figure out the exactly location that hang since even the early console was not initialized yet. Any suggestion on how to debug in this case? > >> So we have kmemleak_free_part_phys() here. > > I wonder whether the memblock_mark_nomap() here is too early for > kmemleak. We don't have the linear map created, though it shouldn't be > an issue as the kernel sections are mapped. Also I think > delete_object_part() in kmemleak.c would bail out early as there > shouldn't be any prior memblock_alloc for this range. >