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: <AANLkTikX0jxdkyYgPoqjvC5HzY8VydTbFh_gFDzM8zJ7@mail.gmail.com>
Date:	Wed, 30 Mar 2011 15:52:57 +0300
From:	Daniel Baluta <daniel.baluta@...il.com>
To:	Catalin Marinas <catalin.marinas@....com>
Cc:	Maxin John <maxin.john@...il.com>,
	naveen yadav <yad.naveen@...il.com>, linux-mips@...ux-mips.org,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: kmemleak for MIPS

On Wed, Mar 30, 2011 at 3:27 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> Le mercredi 30 mars 2011 à 13:17 +0100, Maxin John a écrit :
>> A quick observation from dmesg after placing printks in
>> "net/ipv4/udp.c" for MIPS-malta
>>
>> CONFIG_BASE_SMALL : 0
>> table->mask : 127
>> UDP_HTABLE_SIZE_MIN :  256
>>
>> dmesg:
>> ....
>> ...
>> TCP: Hash tables configured (established 8192 bind 8192)
>> TCP reno registered
>> CONFIG_BASE_SMALL : 0
>> UDP hash table entries: 128 (order: 0, 4096 bytes)
>> table->mask, UDP_HTABLE_SIZE_MIN : 127 256
>> CONFIG_BASE_SMALL : 0
>> UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)
>> table->mask, UDP_HTABLE_SIZE_MIN : 127 256
>> NET: Registered protocol family 1
>> ....
>> ....
>>
>> printk(s) are placed in udp.c as listed below:
>>
>> diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
>> index 588f47a..ca7f6c6 100644
>> --- a/net/ipv4/udp.c
>> +++ b/net/ipv4/udp.c
>> @@ -2162,7 +2162,7 @@ __setup("uhash_entries=", set_uhash_entries);
>>  void __init udp_table_init(struct udp_table *table, const char *name)
>>  {
>>         unsigned int i;
>> -
>> +       printk("CONFIG_BASE_SMALL : %d \n", CONFIG_BASE_SMALL);
>>         if (!CONFIG_BASE_SMALL)
>>                 table->hash = alloc_large_system_hash(name,
>>                         2 * sizeof(struct udp_hslot),
>> @@ -2175,6 +2175,8 @@ void __init udp_table_init(struct udp_table
>> *table, const char *name)
>>         /*
>>          * Make sure hash table has the minimum size
>>          */
>> +       printk("table->mask, UDP_HTABLE_SIZE_MIN : %d %d
>> \n",table->mask,UDP_HTABLE_SIZE_MIN);
>> +
>>         if (CONFIG_BASE_SMALL || table->mask < UDP_HTABLE_SIZE_MIN - 1) {
>>                 table->hash = kmalloc(UDP_HTABLE_SIZE_MIN *
>>                                       2 * sizeof(struct udp_hslot), GFP_KERNEL);
>> ~
>
>
> How much memory do you have exactly on this machine ?
>
> alloc_large_system_hash() has no parameter to specify a minimum hash
> table, and UDP needs one.
>
> If you care about losing 8192 bytes of memory, you could boot with

I can live with this, but is bad practice to have leaks even small ones.
Our concern was, to see if kmemleak with Maxin's patch
generates false positives.

So, I guess everything is fine regarding udp_init_table. We can move on,
integrating MIPS support for kmemleak :).

thanks,
Daniel.
--
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