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: <AE90C24D6B3A694183C094C60CF0A2F6026B7258@saturn3.aculab.com>
Date:	Thu, 30 May 2013 12:18:13 +0100
From:	"David Laight" <David.Laight@...LAB.COM>
To:	"Cong Wang" <amwang@...hat.com>, <netdev@...r.kernel.org>
Cc:	"Ben Hutchings" <bhutchings@...arflare.com>,
	"David S. Miller" <davem@...emloft.net>,
	"Simon Horman" <horms@...ge.net.au>
Subject: RE: [Patch net-next v3] net: clean up skb headers code 

> commit 1a37e412a0225fcba5587 (net: Use 16bits for *_headers
> fields of struct skbuff) converts skb->*_header to u16,
> some #if NET_SKBUFF_DATA_USES_OFFSET are now useless,
> and to be safe, we could just use "X = ~(typeof(X))0;"
> as suggested by David and Ben.

IIRC ~(unsigned short)0 is the same as ~0 and will be -1.
define an actual constant with value 0xffff

	David



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