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 9EFCFC433EF for ; Wed, 29 Jun 2022 21:39:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2B5D86B0071; Wed, 29 Jun 2022 17:39:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 265CF8E0003; Wed, 29 Jun 2022 17:39:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 154F88E0002; Wed, 29 Jun 2022 17:39:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 085C26B0071 for ; Wed, 29 Jun 2022 17:39:41 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id D6ACF6098C for ; Wed, 29 Jun 2022 21:39:40 +0000 (UTC) X-FDA: 79632590520.20.C0450F0 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf16.hostedemail.com (Postfix) with ESMTP id DF24C18004A for ; Wed, 29 Jun 2022 21:39:39 +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 F2058616B2; Wed, 29 Jun 2022 21:39:38 +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> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656538780; a=rsa-sha256; cv=none; b=BXJtstLl+t4eTKfrC5QlZM/yuzEhoQZKM3iH9kaaX1P/+IIfnGZWDiJhnzs/LpMP1Y9Sa9 9LaUe3PUfI9aqgAsx1PM/+dpXAqp5HYOntvWOm5oBQIRTYhE+MqeFoWJBtEsil8u1Nv39t tUsc+tR78g3pjZ7O+i/nyKiMap3Aq8s= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=none; spf=pass (imf16.hostedemail.com: domain of cmarinas@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cmarinas@kernel.org; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656538780; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bslPby+Ydb7eJ2PfH2XQCc1VYqpL9TKCaQhHZ8Wf9gU=; b=xVB/ku/RKXISojw+UeijKmo35bQmNnW98v5ZuleX4u01yHeGOw9xJ+ZyY5OpPHXQuh2LEE R8YyTdBB0CHC/F/1IyZNJ1wlIUGsv5jLzH6fn4pSNdhveXWToiVn+BjdY9uR80w34kb1dH ZRnV3WBqw9t0M9vqeouTQr4Jov7vD1s= X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: DF24C18004A X-Rspam-User: X-Stat-Signature: 7beh7xfdwf3pf9mnoxpkbjnhus3ygjbz Authentication-Results: imf16.hostedemail.com; dkim=none; spf=pass (imf16.hostedemail.com: domain of cmarinas@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cmarinas@kernel.org; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none) X-HE-Tag: 1656538779-609791 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 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