Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1002189iog; Wed, 29 Jun 2022 15:01:56 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vU+IBJW3rDKqNTGcz//nk43l8Z2WasG/TfKuAJ36Q9RtshiGdmUGOWyhGRjxXzqWP08ptH X-Received: by 2002:a17:90b:3cd:b0:1ec:a6a0:9c1b with SMTP id go13-20020a17090b03cd00b001eca6a09c1bmr8231159pjb.215.1656540116384; Wed, 29 Jun 2022 15:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656540116; cv=none; d=google.com; s=arc-20160816; b=lSiHEdrGqMPg88dj/2+Sn52lgILn5Mj4AlKRZjZFlikQgE1QOEq0HS6mBKSa71smAy aunKxiT69cynA8cDQRVCeW4xuJ7qA3WhVim8ReFOj+kJfea23GC/c0WNGDANmSNNElPl H7SrzMYyLvTHIdSEXCrFYmjjUwYvUip2izzrNy92TVoVRCbIoVK6Phzj5PcgdcpZ2dlm 5hnmXeo6TuT6b2VW0Y26mMoSolnq4aioOZt/9ZpYU9lXlegt95K++42LE8QvkzabRqHf 7sQQ0TSRuBXlxYSolHhE9BzMy++DOQT4TjwVqMBFB4F9xrShBlDFRxOdLAtMeavuQxY8 8i7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=bslPby+Ydb7eJ2PfH2XQCc1VYqpL9TKCaQhHZ8Wf9gU=; b=CFR1ZWcvnvU+ADfZn6qf8JUoab8SfymJH2lJqg+5rqM4Hq+kcMBbiDRHQs0YYqoQSu 8iEfR5stTxPmEiECh7BsgfbnfxDHDUHceZ2TPIDPtLN08kssbBJP4N6LWfPIODTvMeRq xiUHGnNNopRB9Frn5MaUoSr3q0Yx0euPLGHnJM82DkKNO4Q1rfbht8+Q8ZL2JIl85lrd VdMR12v8lONn5swEtL/E8+efPTcevJtFNl2/3EyfG8mPE4z03VpN8iuMZ9VAgB1wErJW 0Td6U1jJui+GT4BECLZ3Gcq0pUE7Xn2jGIiePN2Xf10Vf81ACUQ+psTVnbrta1Sr8C4B bnTg== 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=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 77-20020a630050000000b003fc51453576si4615063pga.545.2022.06.29.15.01.44; Wed, 29 Jun 2022 15:01:56 -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=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230072AbiF2Vjm (ORCPT + 99 others); Wed, 29 Jun 2022 17:39:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229915AbiF2Vjl (ORCPT ); Wed, 29 Jun 2022 17:39:41 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8E9D34676 for ; Wed, 29 Jun 2022 14:39:40 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 9E12BB82759 for ; Wed, 29 Jun 2022 21:39:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41930C341C8; Wed, 29 Jun 2022 21:39:36 +0000 (UTC) Date: Wed, 29 Jun 2022 22:39:33 +0100 From: Catalin Marinas To: yee.lee@mediatek.com Cc: linux-kernel@vger.kernel.org, Alexander Potapenko , Marco Elver , Dmitry Vyukov , Andrew Morton , Matthias Brugger , "open list:KFENCE" , "open list:MEMORY MANAGEMENT" , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" Subject: Re: [PATCH v2 1/1] mm: kfence: apply kmemleak_ignore_phys on early allocated pool Message-ID: References: <20220628113714.7792-1-yee.lee@mediatek.com> <20220628113714.7792-2-yee.lee@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220628113714.7792-2-yee.lee@mediatek.com> X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,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 Tue, Jun 28, 2022 at 07:37:11PM +0800, yee.lee@mediatek.com wrote: > From: Yee Lee > > This patch solves two issues. > > (1) The pool allocated by memblock needs to unregister from > kmemleak scanning. Apply kmemleak_ignore_phys to replace the > original kmemleak_free as its address now is stored in the phys tree. > > (2) The pool late allocated by page-alloc doesn't need to unregister. > Move out the freeing operation from its call path. > > Suggested-by: Catalin Marinas > Suggested-by: Marco Elver > Signed-off-by: Yee Lee Reviewed-by: Catalin Marinas