linux-stable/crypto
Peter Zijlstra cdd30ebb1b module: Convert symbol namespace to string literal
Clean up the existing export namespace code along the same lines of
commit 33def8498f ("treewide: Convert macro and uses of __section(foo)
to __section("foo")") and for the same reason, it is not desired for the
namespace argument to be a macro expansion itself.

Scripted using

  git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
  do
    awk -i inplace '
      /^#define EXPORT_SYMBOL_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /^#define MODULE_IMPORT_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /MODULE_IMPORT_NS/ {
        $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g");
      }
      /EXPORT_SYMBOL_NS/ {
        if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) {
  	if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ &&
  	    $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ &&
  	    $0 !~ /^my/) {
  	  getline line;
  	  gsub(/[[:space:]]*\\$/, "");
  	  gsub(/[[:space:]]/, "", line);
  	  $0 = $0 " " line;
  	}

  	$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
  		    "\\1(\\2, \"\\3\")", "g");
        }
      }
      { print }' $file;
  done

Requested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc
Acked-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-12-02 11:34:44 -08:00
..
asymmetric_keys crypto: rsassa-pkcs1 - Reinstate support for legacy protocols 2024-11-10 11:50:54 +08:00
async_tx
842.c
acompress.c crypto: remove CONFIG_CRYPTO_STATS 2024-04-02 10:49:38 +08:00
adiantum.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
aead.c crypto: aead,cipher - zeroize key buffer after use 2024-04-26 17:26:09 +08:00
aegis128-core.c crypto: aegis128 - Fix indentation issue in crypto_aegis128_process_crypt() 2024-09-13 18:26:52 +08:00
aegis128-neon-inner.c
aegis128-neon.c
aegis-neon.h
aegis.h
aes_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
aes_ti.c
af_alg.c crypto: Add missing MODULE_DESCRIPTION() macros 2024-05-31 17:34:56 +08:00
ahash.c crypto: remove CONFIG_CRYPTO_STATS 2024-04-02 10:49:38 +08:00
akcipher.c crypto: akcipher - Drop sign/verify operations 2024-10-05 13:22:04 +08:00
algapi.c This update includes the following changes: 2024-11-19 10:28:41 -08:00
algboss.c crypto: algboss - Pass instance creation error up 2024-09-06 14:50:46 +08:00
algif_aead.c
algif_hash.c crypto: Add missing MODULE_DESCRIPTION() macros 2024-05-31 17:34:56 +08:00
algif_rng.c
algif_skcipher.c crypto: Add missing MODULE_DESCRIPTION() macros 2024-05-31 17:34:56 +08:00
ansi_cprng.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
anubis.c
api.c crypto: api - Fix generic algorithm self-test races 2024-09-06 14:50:46 +08:00
arc4.c crypto: arc4 - Add internal state 2023-12-08 11:59:46 +08:00
aria_generic.c
authenc.c crypto: authenc - stop using alignmask of ahash 2023-10-27 18:04:29 +08:00
authencesn.c crypto: authencesn - stop using alignmask of ahash 2023-10-27 18:04:29 +08:00
blake2b_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
blowfish_common.c
blowfish_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
bpf_crypto_skcipher.c bpf: crypto: add skcipher to bpf crypto 2024-04-24 16:01:10 -07:00
camellia_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cast5_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cast6_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cast_common.c crypto: Add missing MODULE_DESCRIPTION() macros 2024-05-31 17:34:56 +08:00
cbc.c crypto: cbc - Ensure statesize is zero 2024-02-02 18:08:12 +08:00
ccm.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
chacha20poly1305.c crypto: chacha20poly1305 - Annotate struct chachapoly_ctx with __counted_by() 2024-08-17 13:55:49 +08:00
chacha_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cipher.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
cmac.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
compress.c
compress.h crypto: remove CONFIG_CRYPTO_STATS 2024-04-02 10:49:38 +08:00
crc32_generic.c This update includes the following changes: 2024-11-19 10:28:41 -08:00
crc32c_generic.c This update includes the following changes: 2024-11-19 10:28:41 -08:00
crc64_rocksoft_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
crct10dif_common.c
crct10dif_generic.c
cryptd.c crypto: cryptd - Only access common skcipher fields on spawn 2023-10-13 18:27:26 +08:00
crypto_engine.c
crypto_null.c
crypto_user.c crypto: remove CONFIG_CRYPTO_STATS 2024-04-02 10:49:38 +08:00
ctr.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
cts.c crypto: cts - Only access common skcipher fields on spawn 2023-10-13 18:27:27 +08:00
curve25519-generic.c crypto: Add missing MODULE_DESCRIPTION() macros 2024-05-31 17:34:56 +08:00
deflate.c crypto: deflate - Add aliases to deflate 2024-06-28 11:35:47 +10:00
des_generic.c
dh_helper.c
dh.c crypto: dh - Check mpi_rshift errors 2024-08-17 13:55:50 +08:00
drbg.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
ecb.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
ecc_curve_defs.h crypto: ecc - Add NIST P521 curve parameters 2024-04-12 15:07:52 +08:00
ecc.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
ecdh_helper.c
ecdh.c crypto: ecdh - Initialize ctx->private_key in proper byte order 2024-04-26 17:26:09 +08:00
ecdsa-p1363.c crypto: ecdsa - Support P1363 signature decoding 2024-10-05 13:22:05 +08:00
ecdsa-x962.c crypto: ecdsa - Move X9.62 signature size calculation into template 2024-10-05 13:22:04 +08:00
ecdsa.c crypto: ecdsa - Support P1363 signature decoding 2024-10-05 13:22:05 +08:00
ecdsasignature.asn1
echainiv.c
ecrdsa_defs.h crypto: ecc - Add nbits field to ecc_curve structure 2024-04-12 15:07:52 +08:00
ecrdsa_params.asn1
ecrdsa_pub_key.asn1
ecrdsa.c crypto: ecrdsa - Fix signature size calculation 2024-10-05 13:22:05 +08:00
essiv.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
fcrypt.c
fips.c crypto: fips - Remove the now superfluous sentinel element from ctl_table array 2024-04-05 15:46:33 +08:00
gcm.c crypto: gcm - stop using alignmask of ahash 2023-10-27 18:04:29 +08:00
geniv.c
ghash-generic.c
hash_info.c crypto: FIPS 202 SHA-3 register in hash info for IMA 2023-10-27 18:04:30 +08:00
hash.h crypto: remove CONFIG_CRYPTO_STATS 2024-04-02 10:49:38 +08:00
hctr2.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
hmac.c crypto: hmac - remove unnecessary alignment logic 2023-10-27 18:04:24 +08:00
internal.h crypto: akcipher - Drop sign/verify operations 2024-10-05 13:22:04 +08:00
jitterentropy-kcapi.c crypto: jitter - Use kvfree_sensitive() to fix Coccinelle warning 2024-04-05 15:46:33 +08:00
jitterentropy-testing.c crypto: jitter - output full sample from test interface 2024-10-19 08:44:30 +08:00
jitterentropy.c crypto: jitter - Use min() to simplify jent_read_entropy() 2024-08-30 18:22:30 +08:00
jitterentropy.h crypto: jitter - output full sample from test interface 2024-10-19 08:44:30 +08:00
Kconfig crypto: ecdsa - Update Kconfig help text for NIST P521 2024-10-28 18:32:28 +08:00
kdf_sp800108.c
keywrap.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
khazad.c
kpp.c crypto: remove CONFIG_CRYPTO_STATS 2024-04-02 10:49:38 +08:00
lrw.c crypto: lrw - Only access common skcipher fields on spawn 2023-10-13 18:27:27 +08:00
lskcipher.c crypto: remove CONFIG_CRYPTO_STATS 2024-04-02 10:49:38 +08:00
lz4.c
lz4hc.c
lzo-rle.c
lzo.c
Makefile crypto: crc32c - Provide crc32c-arch driver for accelerated library code 2024-10-28 18:33:10 +08:00
md4.c
md5.c
michael_mic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
nhpoly1305.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
pcbc.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
pcrypt.c crypto: pcrypt - Call crypto layer directly when padata_do_parallel() return -EBUSY 2024-10-28 18:32:36 +08:00
poly1305_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
polyval-generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
proc.c
ripemd.h
rmd160.c
rng.c crypto: remove CONFIG_CRYPTO_STATS 2024-04-02 10:49:38 +08:00
rsa_helper.c
rsa-pkcs1pad.c crypto: rsassa-pkcs1 - Migrate to sig_alg backend 2024-10-05 13:22:04 +08:00
rsa.c crypto: rsassa-pkcs1 - Migrate to sig_alg backend 2024-10-05 13:22:04 +08:00
rsaprivkey.asn1 treewide: Add SPDX identifier to IETF ASN.1 modules 2023-10-27 18:04:28 +08:00
rsapubkey.asn1 treewide: Add SPDX identifier to IETF ASN.1 modules 2023-10-27 18:04:28 +08:00
rsassa-pkcs1.c crypto: rsassa-pkcs1 - Reinstate support for legacy protocols 2024-11-10 11:50:54 +08:00
scatterwalk.c
scompress.c crypto: remove CONFIG_CRYPTO_STATS 2024-04-02 10:49:38 +08:00
seed.c
seqiv.c
serpent_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
sha1_generic.c
sha3_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
sha256_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
sha512_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
shash.c crypto: remove CONFIG_CRYPTO_STATS 2024-04-02 10:49:38 +08:00
sig.c crypto: sig - Fix oops on KEYCTL_PKEY_QUERY for RSA keys 2024-10-26 14:41:59 +08:00
simd.c crypto: simd - Do not call crypto_alloc_tfm during registration 2024-08-24 21:39:15 +08:00
skcipher.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
skcipher.h crypto: remove CONFIG_CRYPTO_STATS 2024-04-02 10:49:38 +08:00
sm3_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
sm3.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
sm4_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
sm4.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
streebog_generic.c
tcrypt.c crypto: tcrypt - add skcipher speed for given alg 2024-06-28 11:35:46 +10:00
tcrypt.h
tea.c
testmgr.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
testmgr.h crypto: rsassa-pkcs1 - Reinstate support for legacy protocols 2024-11-10 11:50:54 +08:00
twofish_common.c
twofish_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
vmac.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
wp512.c
xcbc.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
xctr.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
xor.c crypto: xor - fix template benchmarking 2024-08-02 20:53:25 +08:00
xts.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
xxhash_generic.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
zstd.c