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] [day] [month] [year] [list]
Message-ID: <20130524170644.GB22600@arm.com>
Date:	Fri, 24 May 2013 18:06:44 +0100
From:	Catalin Marinas <catalin.marinas@....com>
To:	majianpeng <majianpeng@...il.com>
Cc:	linux-mm <linux-mm@...ck.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] mm/kmemleak.c: Merge the consecutive scan-areas.

On Tue, May 14, 2013 at 12:49:51PM +0100, majianpeng wrote:
> If the scan-areas are adjacent,it can merge in order to reduce memomy.

Have you found any significant reduction in the memory size?

What we miss though is removing an area (and I found a use-case for it).

> +    hlist_for_each_entry(area, &object->area_list, node) {
> +        if (ptr + size == area->start) {
> +            area->start = ptr;
> +            area->size += size;
> +            goto out_unlock;
> +        } else if (ptr == area->start + area->size) {
> +            area->size += size;
> +            goto out_unlock;

I prefer to keep 'goto' only for the error path. You could add a 'bool
merged' and another 'if' block for area allocation.

I'll pick the other too patches.

Thanks.

-- 
Catalin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ