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]
Date:	Fri, 15 Mar 2013 17:39:30 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	weiyang@...ux.vnet.ibm.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] net core: optimize netdev_create_hash()

From: Wei Yang <weiyang@...ux.vnet.ibm.com>
Date: Sat, 16 Mar 2013 00:32:11 +0800

> netdev_create_hash() is divded into two steps:
> 1. allocate space for hash_head
> 2. initialize hash_head->first to NULL for each hash_head
> 
> This patch merge the two steps into one step.
> 
> When allocating the space for hash_head, it will use kzalloc() instead of
> kmalloc(). Then hash_head->first is set to NULL during the allocation step,
> which means it is not necessary to call INIT_HLIST_HEAD() for each hash_head.
> 
> This will:
> 1. reduce the code size
> 2. reduce the run time of iteration on initializing hash_head array

Please do not ever post changes like this.

This makes assumtions about the list head implementation that
we should not make.  If someone adds a debugging facility that
causes lists to be initialized differently, it will be broken
for this hash table now.

The reason the abstractions exist is so that people do not
do things like you are trying to do.

If you want to add an interface in the generic list facilities which
performs this simplifcation, fine.  Implement it and post such a
suggestion to linux-kernel, and then once such a facility is present
in Linus's tree we can start using it in the networkng code.
--
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