linux-next/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
adiantum.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
aead.c
aegis128-core.c
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
ahash.c
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
algif_aead.c
algif_hash.c
algif_rng.c
algif_skcipher.c
ansi_cprng.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
anubis.c
api.c
arc4.c
aria_generic.c
authenc.c
authencesn.c
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
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
cbc.c
ccm.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
chacha20poly1305.c
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
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_engine.c
crypto_null.c
crypto_user.c
ctr.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
cts.c
curve25519-generic.c
deflate.c
des_generic.c
dh_helper.c
dh.c
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
ecc.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
ecdh_helper.c
ecdh.c
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
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
gcm.c
geniv.c
ghash-generic.c
hash_info.c
hash.h
hctr2.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
hmac.c
internal.h crypto: akcipher - Drop sign/verify operations 2024-10-05 13:22:04 +08:00
jitterentropy-kcapi.c
jitterentropy-testing.c crypto: jitter - output full sample from test interface 2024-10-19 08:44:30 +08:00
jitterentropy.c
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
lrw.c
lskcipher.c
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
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
rsapubkey.asn1
rsassa-pkcs1.c crypto: rsassa-pkcs1 - Reinstate support for legacy protocols 2024-11-10 11:50:54 +08:00
scatterwalk.c
scompress.c
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
sig.c crypto: sig - Fix oops on KEYCTL_PKEY_QUERY for RSA keys 2024-10-26 14:41:59 +08:00
simd.c
skcipher.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
skcipher.h
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
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
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