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 57475C433F5 for ; Fri, 5 Nov 2021 10:09:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1B46F611EE for ; Fri, 5 Nov 2021 10:09:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1B46F611EE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0igmlK7sS/0y/T+pUyzygg7SHhD30yF6VpgKwQVP0qw=; b=PmoYNPMVYqK6sR DAkc5QKwx6tPO0SZBi2JhuI2NDQHn3wCTSrrfiaB7MXjb+d/t8gy/plpSFV1dK9cPpavD9Mv3QLTX /bhiQuhriaKVK9zYT6vOyvfsBD1JX0r+k6ZB1oxUw3qDuNgbNgwMC5ZSVSY5a9jZ2R2U49JmUiRAo 5FuRaYCvEMbFen+ckYmZUDNkdc4TjLwm0ZI+qNgwZbHd9qtPUMPRXPUZKyCDXrzZyHEzR1anwOuF7 lNw55AyfE9ycJnf96C/njaGc2sIrfziaKk0yw3ht9Qmza6puce1U/jdHHkxdfqdj1INWwr72mPVMC jZf7R+XoPMk5tfygnVSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1miw8r-00B3pW-C4; Fri, 05 Nov 2021 10:08:13 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1miw8o-00B3oz-9O for linux-arm-kernel@lists.infradead.org; Fri, 05 Nov 2021 10:08:11 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 902CC611EE; Fri, 5 Nov 2021 10:08:08 +0000 (UTC) Date: Fri, 5 Nov 2021 10:08:05 +0000 From: Catalin Marinas To: Qian Cai Cc: Mike Rapoport , Will Deacon , Andrew Morton , linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: Track no early_pgtable_alloc() for kmemleak Message-ID: References: <20211104155623.11158-1-quic_qiancai@quicinc.com> <9bb6fe11-c10a-a373-9288-d44a5ba976fa@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <9bb6fe11-c10a-a373-9288-d44a5ba976fa@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211105_030810_372654_7D453FC7 X-CRM114-Status: GOOD ( 20.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 04, 2021 at 01:57:03PM -0400, Qian Cai wrote: > On 11/4/21 1:06 PM, Mike Rapoport wrote: > > I think I'll be better to rename MEMBLOCK_ALLOC_KASAN to, say, > > MEMBLOCK_ALLOC_NOKMEMLEAK and use that for both KASAN and page table cases. > > Okay, that would look a bit nicer. Or MEMBLOCK_ALLOC_ACCESSIBLE_NOLEAKTRACE to match SLAB_NOLEAKTRACE and also hint that it's accessible memory. > > But more generally, we are going to hit this again and again. > > Couldn't we add a memblock allocation as a mean to get more memory to > > kmemleak::mem_pool_alloc()? > > For the last 5 years, this is the second time I am ware of this kind of > issue just because of the 64KB->4KB switch on those servers, although I > agree it could happen again in the future due to some new debugging > features etc. I don't feel a strong need to rewrite it now though. Not > sure if Catalin saw things differently. Anyway, Mike, do you agree that > we could rewrite that separately in the future? I was talking to Mike on IRC last night and I think you still need a flag, otherwise you could get a recursive memblock -> kmemleak -> memblock call (that's why we have SLAB_NOLEAKTRACE). So for the time being, a new MEMBLOCK_* definition would do. I wonder whether we could actually use the bottom bits in the end/limit as actual flags so one can do (MEMBLOCK_ALLOC_ACCESSIBLE | MEMBLOCK_NOLEAKTRACE). But that could be for a separate clean-up. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel