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:	Wed, 17 Apr 2013 11:40:23 -0400
From:	Neil Horman <nhorman@...driver.com>
To:	Vlad Yasevich <vyasevich@...il.com>
Cc:	Daniel Borkmann <dborkman@...hat.com>,
	David Laight <David.Laight@...LAB.COM>, davem@...emloft.net,
	netdev@...r.kernel.org, linux-sctp@...r.kernel.org
Subject: Re: [PATCH net-next 4/9] net: sctp: sctp_outq: consolidate chars
 into bitfield

On Wed, Apr 17, 2013 at 11:35:49AM -0400, Vlad Yasevich wrote:
> On 04/17/2013 11:27 AM, Neil Horman wrote:
> >On Wed, Apr 17, 2013 at 11:26:21AM +0200, Daniel Borkmann wrote:
> >>On 04/17/2013 10:43 AM, David Laight wrote:
> >>>>  	__u32 outstanding_bytes;
> >>>>
> >>>>-	/* Are we doing fast-rtx on this queue */
> >>>>-	char fast_rtx;
> >>>>-
> >>>>-	/* Corked? */
> >>>>-	char cork;
> >>>>-
> >>>>-	/* Is this structure empty?  */
> >>>>-	char empty;
> >>>>+	__u8 fast_rtx:1,	/* Are we doing fast-rtx on this queue */
> >>>>+	     cork:1,		/* Corked? */
> >>>>+	     empty:1;		/* Is this structure empty?  */
> >>>>  };
> >>>
> >>>Use of bitfields just makes the code slower.
> >>>The only real excuse for using them is to reduce the size
> >>>of a structure that is allocated a lot.
> >>
> >>sctp_outq is _embedded_ into an sctp_association structure, which
> >>has [size: 2280, cachelines: 36, members: 76]! A next step would be
> >>to try to reorder its elements carefully and see if we can reduce
> >>the size by filling some holes.
> >Unrelated note: How did you get pahole to give you that information?  For some
> >reason pahole can never glean any useful information about struct
> >sctp_association for me, despite having dwarf info embedded into the cu.
> >
> 
> pahole -C sctp_association <sctp object file>  works for me.
> 
> -vlad
> 
Strange, that doesn't work for me, and the DW_TAG_structure_type entry is in
place in the debug_info section (though interestingly no byte offsets are noted
for any members). I'll have to look at that further.

Thanks
Neil

> >Neil
> >
> >>--
> >>To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> >>the body of a message to majordomo@...r.kernel.org
> >>More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>
> >--
> >To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> >the body of a message to majordomo@...r.kernel.org
> >More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
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