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: <20070517212641.GU4095@ftp.linux.org.uk>
Date:	Thu, 17 May 2007 22:26:41 +0100
From:	Al Viro <viro@....linux.org.uk>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	dedekind@...radead.org, linux-kernel@...r.kernel.org,
	Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] ubi: kill homegrown endian macros

On Thu, May 17, 2007 at 09:42:34PM +0100, Al Viro wrote:
> Ahem...  So what does
> 	x |= y;
> turns into with that approach?

Another case is

#define FLAG1 cpu_to_be32(2)
#define FLAG2 cpu_to_be32(0x400)

	if (packet_header->field & (FLAG1 | FLAG2))
		....

which is a bloody common idiom in net/* and it happens on some pretty hot
paths.  Approaches that would require converting it to something like
	if (be32_to_cpu(packet_header->field) & (FLAG1 | FLAG2))
would be not just obnoxious, they would actually generate worse code.
-
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