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: <51AC60AA.8010107@asianux.com>
Date:	Mon, 03 Jun 2013 17:23:54 +0800
From:	Chen Gang <gang.chen@...anux.com>
To:	Andy Shevchenko <andy.shevchenko@...il.com>
CC:	edumazet@...gle.com, Pravin Shelar <pshelar@...ira.com>,
	mgorman@...e.de, David Miller <davem@...emloft.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	netdev <netdev@...r.kernel.org>,
	Ben Hutchings <bhutchings@...arflare.com>
Subject: Re: [PATCH] include/linux/skbuff.h: using '0xffff' instead of '~0U'

On 06/01/2013 05:05 AM, Andy Shevchenko wrote:
> On Thu, May 30, 2013 at 9:03 AM, Chen Gang <gang.chen@...anux.com> wrote:
>> >
>> > Both 'transport_header' and 'mac_header' are u16, which are never equal
>> > to '~0U'.
>> >
>> > So need use '0xffff' instead of '~0U'.
> Why not "(u16)~0" ?
> Or even better "!= USHORT_MAX"?
> 
> Or mac_header + 1 == 0, though it less clear.

It seems they are just the same as '0xffff' (are all 'magic' number).

We'd better to give a meaningful name to it just like Ben said.


Thanks.
-- 
Chen Gang

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