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] [day] [month] [year] [list]
Date:   Mon, 8 Oct 2018 13:47:54 +0800
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Srikanth Jampala <Jampala.Srikanth@...ium.com>,
        linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] crypto: cavium/nitrox - Fix format strings

On Tue, Oct 02, 2018 at 11:00:03PM +0200, Arnd Bergmann wrote:
> The return type of atomic64_read() is unfortunately architecture
> specific, it can be 'long', 'long long', or 's64'. When it is 'long',
> we get a build warning:
> 
> drivers/crypto/cavium/nitrox/nitrox_debugfs.c: In function 'stats_show':
> drivers/crypto/cavium/nitrox/nitrox_debugfs.c:62:30: error: format '%lld' expects argument of type 'long long int', but argument 3 has type 'long int' [-Werror=format=]
>   seq_printf(s, "  Posted: %lld\n", atomic64_read(&ndev->stats.posted));
>                            ~~~^
>                            %ld
> drivers/crypto/cavium/nitrox/nitrox_debugfs.c:63:33: error: format '%lld' expects argument of type 'long long int', but argument 3 has type 'long int' [-Werror=format=]
>   seq_printf(s, "  Completed: %lld\n",
>                               ~~~^
>                               %ld
> drivers/crypto/cavium/nitrox/nitrox_debugfs.c:65:31: error: format '%lld' expects argument of type 'long long int', but argument 3 has type 'long int' [-Werror=format=]
> 
> Add an explicit cast to 's64' to get a consistent behavior on all
> architectures here during compile testing.
> 
> Fixes: 2a8780be9c26 ("crypto: cavium/nitrox - updated debugfs information.")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

This patch doesn't apply to cryptodev because the bug has already
been fixed by another patch.

Thanks,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ