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, 03 Mar 2009 14:14:50 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	nhorman@...driver.com
Cc:	zbr@...emap.net, netdev@...r.kernel.org, kuznet@....inr.ac.ru,
	pekkas@...core.fi, jmorris@...ei.org, yoshfuji@...ux-ipv6.org,
	kaber@...sh.net
Subject: Re: [Patch 4/5] Network Drop Monitor: Adding drop monitor
 implementation & Netlink protocol

From: Neil Horman <nhorman@...driver.com>
Date: Tue, 3 Mar 2009 14:21:07 -0500

> On Tue, Mar 03, 2009 at 09:19:09PM +0300, Evgeniy Polyakov wrote:
> > Hi Neil.
> > 
> > On Tue, Mar 03, 2009 at 12:04:35PM -0500, Neil Horman (nhorman@...driver.com) wrote:
> > > +typedef enum {
> > > +	NET_DM_CFG_VERSION = 0,
> > > +	NET_DM_CFG_ALERT_COUNT,
> > > +	NET_DM_CFG_ALERT_DELAY,
> > > +	NET_DM_CFG_MAX,
> > > +} config_type_t;
> > > +
> > > +struct net_dm_config_entry {
> > > +	config_type_t type;
> > > +	uint64_t data;
> > > +};
> > > +
> > 
> > Ugh, please add either some comments about its alignment or some padding
> > fields.
> > 
> Yeah, I probably should align that to 64 bit boundaries for performance, thanks!

Actually you should use "aligned_u64" otherwise there will be
compat issues on 32-bit x86 on x86_64/ia64 since 32-bit x86
only 4-byte aligns 64-bit objects unless told otherwise.

And using anon-fixed type like an enum for "type" is also
likely not such a good idea.  I would just use a __u32
and some defines instead.
--
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