Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28373422rwd; Tue, 4 Jul 2023 18:40:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlEgGodOAbm+YFAzZJsunBveuM/Wrm7KimCGsyDzx8laJD3+R8FvnwaDlA3m2M6VQs/8qacK X-Received: by 2002:a17:903:40ce:b0:1b8:10a:d925 with SMTP id t14-20020a17090340ce00b001b8010ad925mr13914651pld.5.1688521242234; Tue, 04 Jul 2023 18:40:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688521242; cv=none; d=google.com; s=arc-20160816; b=UhMyxH4QKef8VPP4m4mrqOeyoqqwBHYl5d32B7e/H3lzKeHJU1CZmEiL7AZWUMsSCE aIOTJMydkbzLrnS6c61FRZWzlmCL/JxDrOCcdNtKHdW5VTgPm5atY84RkidqhqFfp+YY C0uojmIT09fNAm64Yg9hyI5Z1aVwZacGfyOG7cvVFO4ONCVbcGyG/X/7smvDDvROYhMH cdKZJTz0lSgwHuWz9UF3My+TJGdc8UwE4uBOWqTn/JrSDQpRsxGHDjO1VMwr0WkAHOyg H5iH/1DrVxJdyehv2AJ42ry7sgPPLR/gYRgr1JrMHX8fTdWlGdu1Ux2YVV48K1plV9Zb xIFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=Tn3DbcEYLwF21GWyA3uzft2QHOVr9qLGZ/aAy+PKFyo=; fh=h4hnztftjs5t919MYK7KjlNwNqQb6+itUoMZhF9Mxa0=; b=tm5cu+ecTZjhjnzz21dlQAo2mgRVijsvWZ9vb3ldYCf2CcVaBPXSc5UdPrMch4l5Ol xTYWKN6SV7scf40O7Ca8gYeHLD0ywiEfldR+Oi00LDwQ220ZXI7zMXAsvz40ZNFGeO0u J3EisXmby88/ujgrQ+li8VvK1T607Sqz/Fy2BhSO25UNAVkrMerAqpqcAxnTf5Zo5MEf OhGha8grH9Erq6KyCJLWoRiXlFIrnnWNslugMLjwveox2X14uwv6x+4ZO/hCvNoaG1rO sXUK8/NEXugygcvgLufflThIenAKSQIcCrkw4sBX2pl6Im0FDaPjyX+Ef7DYqmPFxz9w gF/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v18-20020a170902d09200b001b7fdf1c5a3si17652117plv.263.2023.07.04.18.40.24; Tue, 04 Jul 2023 18:40:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230361AbjGEBRs (ORCPT + 99 others); Tue, 4 Jul 2023 21:17:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbjGEBRr (ORCPT ); Tue, 4 Jul 2023 21:17:47 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59FBF10CF for ; Tue, 4 Jul 2023 18:17:45 -0700 (PDT) Received: from dggpemm500009.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QwhZd1cZZzTm3l; Wed, 5 Jul 2023 09:16:41 +0800 (CST) Received: from [10.174.179.24] (10.174.179.24) by dggpemm500009.china.huawei.com (7.185.36.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 5 Jul 2023 09:17:42 +0800 Subject: Re: [PATCH] bootmem: remove the vmemmap pages from kmemleak in free_bootmem_page To: Andrew Morton References: <20230704101942.2819426-1-liushixin2@huawei.com> <20230704092841.2e71a21ee1149ec662c73744@linux-foundation.org> CC: Muchun Song , Matthew Wilcox , Mike Kravetz , Oscar Salvador , , From: Liu Shixin Message-ID: Date: Wed, 5 Jul 2023 09:17:42 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20230704092841.2e71a21ee1149ec662c73744@linux-foundation.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.24] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500009.china.huawei.com (7.185.36.225) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/7/5 0:28, Andrew Morton wrote: > On Tue, 4 Jul 2023 18:19:42 +0800 Liu Shixin wrote: > >> commit dd0ff4d12dd2 ("bootmem: remove the vmemmap pages from kmemleak in >> put_page_bootmem") fix an overlaps existing problem of kmemleak. But the >> problem still existed when HAVE_BOOTMEM_INFO_NODE is disabled, because in >> this case, free_bootmem_page() will call free_reserved_page() directly. > So I take it that with CONFIG_HAVE_BOOTMEM_INFO_NODE=n, the issue > described in dd0ff4d12dd2 still occurs? That kmemleak reports an error > and stops working? Yes, you're right. > > So we want a cc:stable on this fix, yes? Yes. > >> Fix the problem by adding kmemleak_free_part() in free_bootmem_page() >> when HAVE_BOOTMEM_INFO_NODE is disabled. >> >> Fixes: f41f2ed43ca5 ("mm: hugetlb: free the vmemmap pages associated with each HugeTLB page") >> ... > . >