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]
Message-ID: <1375325311.7780.9.camel@cr0>
Date:	Thu, 01 Aug 2013 10:48:31 +0800
From:	Cong Wang <amwang@...hat.com>
To:	David Miller <davem@...emloft.net>
Cc:	eric.dumazet@...il.com, netdev@...r.kernel.org,
	edumazet@...gle.com, ycheng@...gle.com, ncardwell@...gle.com
Subject: Re: [Patch net-next] tcp_metrics: rearrange fields to avoid holes

On Tue, 2013-07-30 at 23:26 -0700, David Miller wrote:
> From: Cong Wang <amwang@...hat.com>
> Date: Wed, 31 Jul 2013 11:13:22 +0800
> 
> > I know saving 8 bytes is not interesting for you, but it is for me,
> > since I need some room in struct tcp_metrics_block for union inet_addr.
> > With this patch, I don't have to make struct tcp_metrics_block expand to
> > 3 cachelines. :)
> 
> Cong, please.
> 
> Instead of making code accomodate an unnecessarily large "union
> inet_addr", make a small version of it that accomodates this use case
> and doesn't have the extra fields.

Please teach me how to do that?

The fields not used by inetpeer are sin_port and scope_id etc., and
sin_port is in the middle of sockaddr* structs.

Hmm, maybe just define a new struct by kicking the last field from
struct sockaddr_{in,in6}, so that we can at least shrink 4 bytes.

Except this, I have no idea how to do that.

Thanks!

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