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: <20111226.150720.932661578734898837.davem@davemloft.net>
Date:	Mon, 26 Dec 2011 15:07:20 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	alex.bluesman.smirnov@...il.com
Cc:	dbaryshkov@...il.com, linux-zigbee-devel@...ts.sourceforge.net,
	netdev@...r.kernel.org
Subject: Re: [PATCH 01/14 v2] mac802154: basic ieee802.15.4 device
 structures

From: Alexander Smirnov <alex.bluesman.smirnov@...il.com>
Date: Mon, 26 Dec 2011 20:02:33 +0300

> +enum ieee802154_hw_addr_filt_flags {
> +	IEEE802515_SADDR_CHANGED	= 1 << 0,
> +	IEEE802515_IEEEADDR_CHANGED	= 1 << 1,
> +	IEEE802515_PANID_CHANGED	= 1 << 2,
> +	IEEE802515_PANC_CHANGED		= 1 << 3,
> +};

These enumeration definitions for flags are undesriable for several
reasons.

First you do not even indicate what datastructure member these flags
are used in.  And because you use an enumeration you can't just indicate
this by using "enum ieee802154_hw_addr_filt_flags" as the type in the
datastructure.

Forget all the enum crap, at the datastructure where the flags are defined
do something like:

	u32	flags;
#define IEEE802154_AFILT_SADDR_CHANGED		0x00000001
#define IEEE802154_AFILT_IEEEADDR_CHANGED	0x00000002
#define IEEE802154_AFILT_PANID_CHANGED		0x00000004
#define IEEE802154_AFILT_PANC_CHANGED		0x00000008

There is then no confusion whatsoever where these flag bits are meant
to be applied and used, and the spurious data type definition is eliminated.
--
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