linux/crypto
Linus Torvalds dca0ae3900 gcc-10: avoid shadowing standard library 'free()' in crypto
commit 1a263ae60b upstream.

gcc-10 has started warning about conflicting types for a few new
built-in functions, particularly 'free()'.

This results in warnings like:

   crypto/xts.c:325:13: warning: conflicting types for built-in function ‘free’; expected ‘void(void *)’ [-Wbuiltin-declaration-mismatch]

because the crypto layer had its local freeing functions called
'free()'.

Gcc-10 is in the wrong here, since that function is marked 'static', and
thus there is no chance of confusion with any standard library function
namespace.

But the simplest thing to do is to just use a different name here, and
avoid this gcc mis-feature.

[ Side note: gcc knowing about 'free()' is in itself not the
  mis-feature: the semantics of 'free()' are special enough that a
  compiler can validly do special things when seeing it.

  So the mis-feature here is that gcc thinks that 'free()' is some
  restricted name, and you can't shadow it as a local static function.

  Making the special 'free()' semantics be a function attribute rather
  than tied to the name would be the much better model ]

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-20 08:20:29 +02:00
..
asymmetric_keys
async_tx
842.c
Kconfig crypto: essiv - fix AEAD capitalization and preposition use in help text 2020-02-24 08:36:50 +01:00
Makefile
ablkcipher.c
acompress.c
adiantum.c
aead.c
aegis.h
aegis128-core.c
aegis128-neon-inner.c
aegis128-neon.c
aes_generic.c
aes_ti.c
af_alg.c
ahash.c
akcipher.c
algapi.c crypto: api - Fix race condition in crypto_spawn_alg 2020-02-11 04:35:31 -08:00
algboss.c
algif_aead.c
algif_hash.c
algif_rng.c
algif_skcipher.c
ansi_cprng.c
anubis.c
api.c crypto: api - Fix race condition in crypto_spawn_alg 2020-02-11 04:35:31 -08:00
arc4.c
authenc.c
authencesn.c
blkcipher.c
blowfish_common.c
blowfish_generic.c
camellia_generic.c
cast5_generic.c
cast6_generic.c
cast_common.c
cbc.c
ccm.c
cfb.c
chacha20poly1305.c
chacha_generic.c
cipher.c
cmac.c
compress.c
crc32_generic.c
crc32c_generic.c
crct10dif_common.c
crct10dif_generic.c
cryptd.c
crypto_engine.c
crypto_null.c
crypto_user_base.c
crypto_user_stat.c
ctr.c
cts.c
deflate.c
des_generic.c
dh.c
dh_helper.c
drbg.c
ecb.c
ecc.c
ecc.h
ecc_curve_defs.h
ecdh.c
ecdh_helper.c
echainiv.c
ecrdsa.c
ecrdsa_defs.h
ecrdsa_params.asn1
ecrdsa_pub_key.asn1
essiv.c
fcrypt.c
fips.c
gcm.c
gf128mul.c
ghash-generic.c
hash_info.c crypto: rename sm3-256 to sm3 in hash_algo_name 2020-02-28 17:22:26 +01:00
hmac.c
internal.h crypto: api - Fix race condition in crypto_spawn_alg 2020-02-11 04:35:31 -08:00
jitterentropy-kcapi.c
jitterentropy.c
keywrap.c
khazad.c
kpp.c
lrw.c gcc-10: avoid shadowing standard library 'free()' in crypto 2020-05-20 08:20:29 +02:00
lz4.c
lz4hc.c
lzo-rle.c
lzo.c
md4.c
md5.c
memneq.c
michael_mic.c
nhpoly1305.c
ofb.c
pcbc.c
pcrypt.c crypto: pcrypt - Do not clear MAY_SLEEP flag in original request 2020-02-11 04:35:31 -08:00
poly1305_generic.c
proc.c
ripemd.h
rmd128.c
rmd160.c
rmd256.c
rmd320.c
rng.c crypto: rng - Fix a refcounting bug in crypto_rng_reset() 2020-04-17 10:50:16 +02:00
rsa-pkcs1pad.c
rsa.c
rsa_helper.c
rsaprivkey.asn1
rsapubkey.asn1
salsa20_generic.c
scatterwalk.c
scompress.c
seed.c
seqiv.c
serpent_generic.c
sha1_generic.c
sha3_generic.c
sha256_generic.c
sha512_generic.c
shash.c
simd.c
skcipher.c
sm3_generic.c
sm4_generic.c
streebog_generic.c
tcrypt.c
tcrypt.h
tea.c
testmgr.c crypto: testmgr - don't try to decrypt uninitialized buffers 2020-02-14 16:34:18 -05:00
testmgr.h
tgr192.c
twofish_common.c
twofish_generic.c
vmac.c
wp512.c
xcbc.c
xor.c
xts.c gcc-10: avoid shadowing standard library 'free()' in crypto 2020-05-20 08:20:29 +02:00
xxhash_generic.c
zstd.c