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: <4A2686F2.3050508@trash.net>
Date:	Wed, 03 Jun 2009 16:21:38 +0200
From:	Patrick McHardy <kaber@...sh.net>
To:	Sergey Lapin <slapin@...fans.org>
CC:	Johannes Berg <johannes@...solutions.net>,
	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	David Miller <davem@...emloft.net>,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	linux-wireless@...r.kernel.org, sfr@...b.auug.org.au
Subject: Re: [PATCH 4/6] net: add NL802154 interface for configuration of
 802.15.4 devices

Sergey Lapin wrote:
>>> +#define IEEE802154_ATTR_MAX (__IEEE802154_ATTR_MAX - 1)
>>> +#define NLA_HW_ADDR	NLA_U64
>>> +#define NLA_GET_HW_ADDR(attr, addr) do { u64 _temp = nla_get_u64(attr); memcpy(addr, &_temp, 8); } while (0)
>>> +#define NLA_PUT_HW_ADDR(msg, attr, addr) do { u64 _temp; memcpy(&_temp, addr, 8); NLA_PUT_U64(msg, attr, _temp); } while (0)
> 
> What would you propose here? adding prefix will add length to macro,
> IEEE802154_NL_PUT_HW_ADDR is damn long name. Using repeated code
> sequence is not better (it is error-prone and unreadable).
> 
> Any ideas?

Kill it and use nla_put(skb, attr, addr, 8);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ