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]
Date:	Sat, 22 Feb 2014 13:09:46 +0100
From:	Daniel Borkmann <dborkman@...hat.com>
To:	Jan Beulich <JBeulich@...e.com>
CC:	mingo@...e.hu, tglx@...utronix.de, hpa@...or.com,
	davem@...emloft.net, ffusco@...hat.com, tgraf@...hat.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] x86/hash: swap parameters of crc32_u32()

On 02/21/2014 11:33 AM, Jan Beulich wrote:
> ... to match its two callers (i.e. the alternative would have been to
> swap the arguments at the call sites).
>
> Signed-off-by: Jan Beulich <jbeulich@...e.com>
> Cc: Francesco Fusco <ffusco@...hat.com>
> Cc: Daniel Borkmann <dborkman@...hat.com>
> Cc: Thomas Graf <tgraf@...hat.com>
> Cc: David S. Miller <davem@...emloft.net>
> ---
>   arch/x86/lib/hash.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- 3.14-rc3-x86-hash-crc32.orig/arch/x86/lib/hash.c
> +++ 3.14-rc3-x86-hash-crc32/arch/x86/lib/hash.c
> @@ -37,7 +37,7 @@
>   #include <asm/cpufeature.h>
>   #include <asm/hash.h>
>
> -static inline u32 crc32_u32(u32 crc, u32 val)
> +static inline u32 crc32_u32(u32 val, u32 crc)
>   {
>   #ifdef CONFIG_AS_CRC32
>   	asm ("crc32l %1,%0\n" : "+r" (crc) : "rm" (val));

Can you elaborate?

Sorry, I need to ask here (even if it's a stupid question ;)) if this
change is safe to do; are referring to a cleanup or fixing a concrete
bug? The code is a modified version of the DPDK hash which you can find
in [1]. Arguments of the caller are in the correct order, afaik.

   [1] http://dpdk.org/browse/dpdk/tree/lib/librte_hash/rte_hash_crc.h
--
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