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: <20200508060611.GF24789@gondor.apana.org.au>
Date:   Fri, 8 May 2020 16:06:11 +1000
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     linux-kernel@...r.kernel.org,
        "David S. Miller" <davem@...emloft.net>,
        Eric Biggers <ebiggers@...gle.com>,
        Ard Biesheuvel <ardb@...nel.org>, linux-crypto@...r.kernel.org
Subject: Re: [PATCH 01/15] crypto - Avoid free() namespace collision

On Thu, Apr 30, 2020 at 11:30:43PM +0200, Arnd Bergmann wrote:
> gcc-10 complains about using the name of a standard library
> function in the kernel, as we are not building with -ffreestanding:
> 
> crypto/xts.c:325:13: error: conflicting types for built-in function 'free'; expected 'void(void *)' [-Werror=builtin-declaration-mismatch]
>   325 | static void free(struct skcipher_instance *inst)
>       |             ^~~~
> crypto/lrw.c:290:13: error: conflicting types for built-in function 'free'; expected 'void(void *)' [-Werror=builtin-declaration-mismatch]
>   290 | static void free(struct skcipher_instance *inst)
>       |             ^~~~
> crypto/lrw.c:27:1: note: 'free' is declared in header '<stdlib.h>'
> 
> The xts and lrw cipher implementations run into this because they do
> not use the conventional namespaced function names.
> 
> It might be better to rename all local functions in those files to
> help with things like 'ctags' and 'grep', but just renaming these two
> avoids the build issue. I picked the more verbose crypto_xts_free()
> and crypto_lrw_free() names for consistency with several other drivers
> that do use namespaced function names.
> 
> Fixes: f1c131b45410 ("crypto: xts - Convert to skcipher")
> Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  crypto/lrw.c | 6 +++---
>  crypto/xts.c | 6 +++---
>  2 files changed, 6 insertions(+), 6 deletions(-)

Patch applied.  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