lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190423151708.GB16353@zn.tnic>
Date:   Tue, 23 Apr 2019 17:17:09 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Catalin Marinas <catalin.marinas@....com>
Cc:     Qian Cai <cai@....pw>, dave.hansen@...ux.intel.com,
        luto@...nel.org, peterz@...radead.org, tglx@...utronix.de,
        mingo@...hat.com, x86@...nel.org, linux-kernel@...r.kernel.org,
        Brijesh Singh <brijesh.singh@....com>
Subject: Re: [PATCH] x86/mm/mem_encrypt: fix a crash with kmemleak_scan

On Tue, Apr 23, 2019 at 03:02:56PM +0100, Catalin Marinas wrote:
> The .bss/.data used to be root until recently when commit 298a32b13208
> ("kmemleak: powerpc: skip scanning holes in the .bss section") changed
> this to accommodate a similar problem on powerpc. With this commit,
> .bss/.data are traced objects but painted "grey" by default so that they
> will be always scanned, pretty much like the root (and they can't
> "leak").

I see.

> In Qian's splat, the unmapped area was actually in the .bss which is now
> a traced object (no longer a root one).

Right, makes sense.

> Object freeing is tracked in general via the corresponding kfree(),
> vfree() etc. and don't need special handling. The .bss doesn't have this
> alloc/free symmetry and not freeing it all either, hence this
> workaround to register it as a traced object and allow partial freeing.
> 
> Anyway, I agree with you. As I mentioned in the previous email,
> kmemleak_free_part() is tolerant to unknown objects (not tracked by
> kmemleak), so I'm fine with calling it from free_init_pages() even if
> not all address ranges passed to this function are known to kmemleak.

Cool.

> I took a note to improve this when I get some time.

Thanks. That would be helpful, I think, for people like me who'd like to
get a short intro on kmemleak in order to understand what is being fixed
when a patch lands in their mbox. :)

> There are probably some academic papers published somewhere ;). But
> wikipedia makes things much easier (and free).

Yap :-)

Thanks.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ