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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 20 Mar 2015 18:17:15 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	herbert@...dor.apana.org.au
Cc:	tgraf@...g.ch, eric.dumazet@...il.com, kaber@...sh.net,
	netdev@...r.kernel.org
Subject: Re: [v1 PATCH 0/7] rhashtable: Introduce inlined interface

From: Herbert Xu <herbert@...dor.apana.org.au>
Date: Sat, 21 Mar 2015 08:28:44 +1100

> On Fri, Mar 20, 2015 at 04:17:43PM -0400, David Miller wrote:
>>
>> Why do you need that trailer[] think in the new netlink code?
>> You only use it in an offsetof() expression and wouldn't sizeof
>> the structure work just fine for that?  This also makes the
>> memset() superfluous in the initializer function.
> 
> Aha I was wating for someone to ask :) Without the trailer it
> gets padded to 16 bytes on x86-64.  I found this out because
> netlink was mysteriously failing due to the extra padding not
> getting zeroed. Designated initializers do not zero padding bytes,
> so you'd need an explicit memset.  Besides, hashing another
> four bytes with jhash that always contained zero seemed wasteful.

Then "offsetof(struct netlink_compare_arg, portid) + sizeof(u32)"?
--
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