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 Sep 2011 11:23:29 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	christoph.paasch@...ouvain.be
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
	hkchu@...gle.com, ilpo.jarvinen@...sinki.fi, jhs@...atatu.com
Subject: Re: [PATCH net-next] tcp: unalias tcp_skb_cb flags and ip_dsfield

Le mardi 27 septembre 2011 à 11:38 +0300, Christoph Paasch a écrit :
> On Tuesday 27 September 2011 wrote David Miller:
> > From: Christoph Paasch <christoph.paasch@...ouvain.be>
> > Date: Tue, 27 Sep 2011 10:37:38 +0300
> > 
> > > However, (as far as I can see) before Eric's change it was 42 bytes long
> > > and now it became 43 bytes.
> > 
> > Then, I suggest that you go buy a pair of glasses. :-)
> 
> Yeah, maybe it's time to... ;-)
> 
> This two-byte hole, is it because "flags" and "sacked" are both __u8 and 
> fields are aligned to 32-bit ?

Not exactly.

Reason for the hole is the following :

struct whatever {
	u8   first;
	u8   second;
	u32  third;
};

"third" field has an alignement requirement of 4 bytes on most arches.

Compiler inserts a 2 bytes hole before "third" to respect this
requirement.

There is no hole between "first" and "second", since second has no
alignment requirement.

sizeof(struct whatever) = 8


--
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