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]
Date:	Tue, 27 Mar 2012 19:35:33 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Djalal Harouni <tixxdz@...ndz.org>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Al Viro <viro@...iv.linux.org.uk>, netdev@...r.kernel.org
Subject: Re: [PATCH] net: reference the ipv4 sysctl table header

Djalal Harouni <tixxdz@...ndz.org> writes:

> On Mon, Mar 26, 2012 at 03:50:30PM -0700, Eric W. Biederman wrote:
>> Djalal Harouni <tixxdz@...ndz.org> writes:
>> 
>> > I've been analysing some kmemleak reports of an internal module, and
>> > found that there are false positive reports of unreferenced objects.
>> >
>> > The following patch is just a clean up for one of those false positives,
>> > this is for the /proc/sys/net/ipv4 sysctl table.
>> > As I've said there are other reports but don't know if it is worth to
>> > write patches for them.
>> 
>> So the problem here is that you register a sysctl and don't keep a
>> pointer to the returned sysctl_header?  So kmemleak complains?
> Right.
>
>> I would expect the other sysctl data structures to have such a pointer,
>> so I don't know why kmemleak would complain.
>> 
>> Does my recent sysctl rewrite affect when this kmemleak is reported?
> Actually yes, after a recent pull (which includes your recent sysctl work),
> some of these false positive reports started to appear.
>
>
> Anyway they seem false positive ones, since keeping a reference to
> sysctl_header as in my previous (ugly) patch will quiet the last two
> ones.

Ok thanks. If that is what it is.  Then clean way to quite this will
ultimately be converting these table to be compatible with my brand
new register_sysctl() and using that to register them.

In fact I am pretty certain we can just do:
register_sysctl("net/ipv4/route", ipv4_route_table);
register_sysctl("net/ipv4/neigh", empty);

instead of:
register_sysctl_paths(ipv4_path, ipv4_skeleton);

And kill ipv4_skeleton and ipv4_path as they are now unused.

There was a tremendous cleanup and speed up that came with not allowing
sysctl tables to support .child entries in the core, and the older
registration routines break apart the tables and return a compatilibty
sysctl_table_header if we do that, and I believe we are just
leaking that compatibility sysctl_table_header.

Eric
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ