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: <20070929094852.GA7715@osiris.boeblingen.de.ibm.com>
Date:	Sat, 29 Sep 2007 11:48:52 +0200
From:	Heiko Carstens <heiko.carstens@...ibm.com>
To:	Kyle McMartin <kyle@...artin.ca>
Cc:	linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [COMPAT] Add compat_merge64 helper

On Fri, Sep 28, 2007 at 06:33:51PM -0400, Kyle McMartin wrote:
> To be used when endianness matters for argument ordering when reassembling
> a 64-bit value out of two register halves.
> 
> Signed-off-by: Kyle McMartin <kyle@...artin.ca>
>
> +static inline u64 compat_merge64(u32 left, u32 right)
> +{
> +#if defined(__BIG_ENDIAN)
> +	return ((u64)left << 32) | right;
> +#else /* defined (__LITTLE_ENDIAN) */

Could you change that to an #elif please and #error out if none is defined?
Should safe us from subtle bugs caused by missing includes.
-
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