From: Qian Cai Date: Wed, 20 Mar 2019 20:04:32 +0000 Subject: Re: [PATCH v2] kmemleak: skip scanning holes in the .bss section Message-Id: <1553112272.26196.9.camel@lca.pw> List-Id: References: <20190313145717.46369-1-cai@lca.pw> <20190319115747.GB59586@arrakis.emea.arm.com> <87lg19y9dp.fsf@concordia.ellerman.id.au> <20190320181656.GB38229@arrakis.emea.arm.com> In-Reply-To: <20190320181656.GB38229@arrakis.emea.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Catalin Marinas , Michael Ellerman Cc: akpm@linux-foundation.org, paulus@ozlabs.org, benh@kernel.crashing.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org On Wed, 2019-03-20 at 18:16 +0000, Catalin Marinas wrote: > I think I have a simpler idea. Kmemleak allows punching holes in > allocated objects, so just turn the data/bss sections into dedicated > kmemleak objects. This happens when kmemleak is initialised, before the > initcalls are invoked. The kvm_free_tmp() would just free the > corresponding part of the bss. > > Patch below, only tested briefly on arm64. Qian, could you give it a try > on powerpc? Thanks. It works great so far!