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  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:	Mon, 05 May 2014 13:41:46 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	hannes@...essinduktion.org
Cc:	lorenzo@...gle.com, netdev@...r.kernel.org,
	yoshifuji@...ux-ipv6.org, david.laight@...lab.com,
	eric.dumazet@...il.com
Subject: Re: [PATCH v6 1/2] net: ipv6: Unduplicate UDP, raw, and L2TP
 sendmsg

From: Hannes Frederic Sowa <hannes@...essinduktion.org>
Date: Mon, 05 May 2014 04:15:57 -0700

> Hi!
> 
> On Fri, May 2, 2014, at 12:11, Lorenzo Colitti wrote:
>> +
>> +struct ip6_output_opts {
>> +       int hlimit: 9;
>> +       int tclass: 9;
>> +       int dontfrag: 2;
>> +       unsigned connected: 1;
>> +       struct ipv6_txoptions *opt;
>> +};
> 
> I don't think the bitfields are useful, they can cause more RMW cycles
> and at least on 64-bit systems the structure does not shrink in size if
> you instead just use s16 and bool types because of the padding needed
> for the pointer. On 32-bit it does save 4 bytes on the stack, but I
> don't think it is worth it.
> 
> If you put the pointer above the other members, newly added fields at
> the bottom can eat into padding space instead of leaving padding holes
> in it.

Furthermore, some architectures are just going to pass this in via two
registers anyways, so it doesn't save argument count in practice.

I apologize, but I still don't like these changes :-/
--
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