Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp582442imm; Wed, 3 Oct 2018 23:16:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV61Mt4GQB3IxEUXrfaBVvEE66pYv3zAml/ya/yLEPg/mvvJt6C+55MZXqqalZr+IwUeiJNtD X-Received: by 2002:a62:85cb:: with SMTP id m72-v6mr5110960pfk.173.1538633792240; Wed, 03 Oct 2018 23:16:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538633792; cv=none; d=google.com; s=arc-20160816; b=N3Cu8gMCJVlE1luaRjT/uaLcNjgolx3V52ConajKEpZpaCcRjgY+j6UEOM4ZmMC0IX 2bbA2+c8+bnXpxT/fBJbisxc2PGVPZK0taoNH6pdB2oEk0k0K36XtoOJH7FwRxv5OcnC uSXgNdnqB916F721R9gbHQhu5/jKd6JU+u/QiXhP22Zsfkgcf8wik4SdOI0R4/aH9O4m WJVVjSBgtBMrPydWNYFqkTPgZbNn/IdM1G1SK/RHaLSAkoEWw/cf1/YPY2zEjvk/GUuv hY6fXk69ecRCRWcmvMNPtRaiBPNmzA53lczoOuvCaqGmpJs4Uuw4w+qaEnYjAETttG3O 3qsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:subject:cc:from:to :in-reply-to; bh=I8FR4Jnw8d6E4Io2CpE0AzgC7OJ3Mh/jgzZni4/TNz8=; b=q1/wr5xff6kcuhMQL3Ad3BCg4qz8bT1xIgVJiPvm3Ukq8GECWWV/Efik9UDF4Dy5ik K9E7Wt8jKL5t6mCEbZzpGed1jVtp/t9vfEV26/q/L4A8yWevaayL6bhiKm+UIJY5t7a+ q5fN7rI19Wns+LAjknK26hVQOXDdA2iicGFJiG9OukIccFYPqrmGFrF2LKqrsQNTibit URddWYb3Co66xE05SNUtoleCm8Yfpx1bC2wyhjOJWGiAluJ3BaO/g5O5Jz8oTv2whvJB 2lU4T4gWF+Fw4H/OAXXoddjK/FK4/CnRUQ0DUsVRvd7Mh+zjOtQ1PGs1Z0O6hxDnqEGU AUkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9-v6si4031189plt.111.2018.10.03.23.16.16; Wed, 03 Oct 2018 23:16:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727627AbeJDNHC (ORCPT + 99 others); Thu, 4 Oct 2018 09:07:02 -0400 Received: from ozlabs.org ([203.11.71.1]:45619 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726438AbeJDNGP (ORCPT ); Thu, 4 Oct 2018 09:06:15 -0400 Received: by ozlabs.org (Postfix, from userid 1034) id 42QjK73m02z9s8J; Thu, 4 Oct 2018 16:14:35 +1000 (AEST) X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 803d690e68f0c5230183f1a42c7d50a41d16e380 In-Reply-To: To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras From: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: powerpc/mm: Don't report hugepage tables as memory leaks when using kmemleak Message-Id: <42QjK73m02z9s8J@ozlabs.org> Date: Thu, 4 Oct 2018 16:14:35 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-08-13 at 13:19:52 UTC, Christophe Leroy wrote: > When a process allocates a hugepage, the following leak is > reported by kmemleak. This is a false positive which is > due to the pointer to the table being stored in the PGD > as physical memory address and not virtual memory pointer. > > unreferenced object 0xc30f8200 (size 512): > comm "mmap", pid 374, jiffies 4872494 (age 627.630s) > hex dump (first 32 bytes): > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > backtrace: > [] huge_pte_alloc+0xdc/0x1f8 > [<9e0df1e1>] hugetlb_fault+0x560/0x8f8 > [<7938ec6c>] follow_hugetlb_page+0x14c/0x44c > [] __get_user_pages+0x1c4/0x3dc > [] __mm_populate+0xac/0x140 > [<3215421e>] vm_mmap_pgoff+0xb4/0xb8 > [] ksys_mmap_pgoff+0xcc/0x1fc > [<4fcd760f>] ret_from_syscall+0x0/0x38 > > See commit a984506c542e2 ("powerpc/mm: Don't report PUDs as > memory leaks when using kmemleak") for detailed explanation. > > To fix that, this patch tells kmemleak to ignore the allocated > hugepage table. > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/803d690e68f0c5230183f1a42c7d50 cheers