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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D45EDC433EF for ; Tue, 31 May 2022 17:03:29 +0000 (UTC) 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=XyWcMncxLJ9SfuazR2C4ATk52RbgcmPpWqquMYJ/lII=; b=zhGvyTPVUstFf0 0aQjPNk1Fzn/1UWQiag4cRc9dk5vHpxeirKos5zqrL8fqpB778SQXAufWTL4I9GUsPPoI7QBxx36U LfrpifiEA3MmdnizjYVsk3lMj1yNmXA0fnzlHyDRHubb/n5a/eytWUQQZ9V/uYMsqsX2UqGHF6a3v gBYc+cBs4E0k0wugagFUAL5kdGwlS59q7dUyJOeVmYK++Lq0vCPM/oJbfgIolZnJe72lzDP6buVD+ AmkOZc7U1Tb3NozbLHtun7NEusxzcJny2viS5NVLf9YkbcXshxSLMuDwWsNtiM0gDsU4JNe2YShmr 5KGvcpXXjqLV7EY7IEJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nw5Fv-00BxT3-8N; Tue, 31 May 2022 17:02:07 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nw5Fs-00BxSZ-HV for linux-arm-kernel@lists.infradead.org; Tue, 31 May 2022 17:02:05 +0000 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 BE60F60DDE; Tue, 31 May 2022 17:02:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FB68C385A9; Tue, 31 May 2022 17:02:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654016523; bh=djguEZZRDPP3prGCOje7q6bgq4eAd52mgC9VJE+UvZo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=u8LXi8TrTLqG5iEZu55P2t2fyZ7OD8tsnQ5PXBbTHF/LgZ7Gi/yTmdTg35xoBS1iF kPWVMEi0YCNM3eiemsEVp4EWCKCcBMPir39ZJGsRQAiXvhi47LZTtJIz5CnwwL+BCC itAMIVSohp4iS+gL8uhbPTelu0YU8Tmf5gErzxEd7PqW/ikfvH/Nd1XUPACMS3Imf9 KytTjEIc588n91CXJVh98FTVqVQQZ2/k/hHrC/O9VTR0YgOVWOc6xBnSEYwTmVv49V L3TY/sY3bxouJIpPcwL6yYLVMiIsCRS3RfMNniPc4lETv9a6GNBVMmERdniNJycG7o FnXOpjXSYq6BQ== Date: Tue, 31 May 2022 18:01:58 +0100 From: Will Deacon To: Qian Cai Cc: Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org Subject: Re: [PATCH] KVM: arm64: Fix memory leaks from stage2 pagetable Message-ID: <20220531170157.GC25631@willie-the-truck> References: <20220526203956.143873-1-quic_qiancai@quicinc.com> <20220531165710.GB25631@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220531165710.GB25631@willie-the-truck> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220531_100204_662247_C5582DE3 X-CRM114-Status: GOOD ( 14.91 ) 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 Tue, May 31, 2022 at 05:57:11PM +0100, Will Deacon wrote: > On Thu, May 26, 2022 at 04:39:56PM -0400, Qian Cai wrote: > > Running some SR-IOV workloads could trigger some leak reports from > > kmemleak. > > > > unreferenced object 0xffff080243cef500 (size 128): > > comm "qemu-system-aar", pid 179935, jiffies 4298359506 (age 1629.732s) > > hex dump (first 32 bytes): > > 28 00 00 00 01 00 00 00 00 e0 4c 52 03 08 ff ff (.........LR.... > > e0 af a4 7f 7c d1 ff ff a8 3c b3 08 00 80 ff ff ....|....<...... > > backtrace: > > kmem_cache_alloc_trace > > kvm_init_stage2_mmu > > Hmm, I can't spot a 128-byte allocation in here so this is pretty cryptic. > I don't really like the idea of papering over the report; we'd be better off > trying to reproduce it. ... although the hexdump does look like {u32; u32; ptr; ptr; ptr}, which would match 'struct kvm_pgtable'. I guess the allocation is aligned to ARCH_DMA_MINALIGN, which could explain the size? Have you spotted any pattern for when the leak occurs? How are you terminating the guest? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel