Re: [PATCH v2] kmemleak: skip scanning holes in the .bss section

2019-03-20 Thread Michael Ellerman
Catalin Marinas writes: > On Thu, Mar 21, 2019 at 12:15:46AM +1100, Michael Ellerman wrote: >> Catalin Marinas writes: >> > On Wed, Mar 13, 2019 at 10:57:17AM -0400, Qian Cai wrote: >> >> @@ -1531,7 +1547,14 @@ static void kmemleak_scan(void) >> >> >> >> /* data/bss scanning */ >> >> scan_l

Re: [PATCH v2] kmemleak: skip scanning holes in the .bss section

2019-03-20 Thread Qian Cai
On Wed, 2019-03-20 at 18:16 +, 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

Re: [PATCH v2] kmemleak: skip scanning holes in the .bss section

2019-03-20 Thread Catalin Marinas
On Thu, Mar 21, 2019 at 12:15:46AM +1100, Michael Ellerman wrote: > Catalin Marinas writes: > > On Wed, Mar 13, 2019 at 10:57:17AM -0400, Qian Cai wrote: > >> @@ -1531,7 +1547,14 @@ static void kmemleak_scan(void) > >> > >>/* data/bss scanning */ > >>scan_large_block(_sdata, _edata); > >

Re: [PATCH v2] kmemleak: skip scanning holes in the .bss section

2019-03-20 Thread Michael Ellerman
Catalin Marinas writes: > Hi Qian, > > On Wed, Mar 13, 2019 at 10:57:17AM -0400, Qian Cai wrote: >> @@ -1531,7 +1547,14 @@ static void kmemleak_scan(void) >> >> /* data/bss scanning */ >> scan_large_block(_sdata, _edata); >> -scan_large_block(__bss_start, __bss_stop); >> + >> +

Re: [PATCH v2] kmemleak: skip scanning holes in the .bss section

2019-03-19 Thread Catalin Marinas
Hi Qian, On Wed, Mar 13, 2019 at 10:57:17AM -0400, Qian Cai wrote: > @@ -1531,7 +1547,14 @@ static void kmemleak_scan(void) > > /* data/bss scanning */ > scan_large_block(_sdata, _edata); > - scan_large_block(__bss_start, __bss_stop); > + > + if (bss_hole_start) { > +

[PATCH v2] kmemleak: skip scanning holes in the .bss section

2019-03-13 Thread Qian Cai
The commit 2d4f567103ff ("KVM: PPC: Introduce kvm_tmp framework") adds kvm_tmp[] into the .bss section and then free the rest of unused spaces back to the page allocator. kernel_init kvm_guest_init kvm_free_tmp free_reserved_area free_unref_page free_unref_page_prepar