RE: [PATCH v2 18/19] crypto: x86 - standardize not loaded prints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> The positive messages about which optional features are
> engaged could be reported as read-only module parameters.

I've experimented with this approach.

There are two constructions for the modules:
1. modules that enable different behavior in the drivers
  (e.g., aesni_intel enabling avx or avx2 within each driver)

  I named these parameters "engaged_<feature>"
 
2. modules that register separate drivers for different behavior
  (e.g., sha1 registering separate drivers for avx2, avx, and ssse3)

  I named these parameters "registered_<feature>"

It looks like this:

$ grep -Hs . /sys/module/*/parameters/engaged*
/sys/module/aesni_intel/parameters/engaged_avx:1
/sys/module/aesni_intel/parameters/engaged_avx2:1
/sys/module/aria_aesni_avx_x86_64/parameters/engaged_gfni:0
/sys/module/chacha_x86_64/parameters/engaged_avx2:1
/sys/module/chacha_x86_64/parameters/engaged_avx512:1
/sys/module/crc32c_intel/parameters/engaged_pclmulqdq:1
/sys/module/curve25519_x86_64/parameters/engaged_adx:1
/sys/module/libblake2s_x86_64/parameters/engaged_avx512:1
/sys/module/libblake2s_x86_64/parameters/engaged_ssse3:1
/sys/module/poly1305_x86_64/parameters/engaged_avx:1
/sys/module/poly1305_x86_64/parameters/engaged_avx2:1
/sys/module/poly1305_x86_64/parameters/engaged_avx512:0

with modinfo descriptions like:
parm:           engaged_avx2:Using x86 instruction set extensions: AVX2 (for GCM mode) (int)
parm:           engaged_avx:Using x86 instruction set extensions: AVX (for CTR and GCM modes) (int)

$ grep -Hs . /sys/module/*/parameters/registered*
/sys/module/sha1_ssse3/parameters/registered_avx:1
/sys/module/sha1_ssse3/parameters/registered_avx2:1
/sys/module/sha1_ssse3/parameters/registered_shani:0
/sys/module/sha1_ssse3/parameters/registered_ssse3:1
/sys/module/sha256_ssse3/parameters/registered_avx:1
/sys/module/sha256_ssse3/parameters/registered_avx2:1
/sys/module/sha256_ssse3/parameters/registered_shani:0
/sys/module/sha256_ssse3/parameters/registered_ssse3:1
/sys/module/sha512_ssse3/parameters/registered_avx:1
/sys/module/sha512_ssse3/parameters/registered_avx2:1
/sys/module/sha512_ssse3/parameters/registered_ssse3:1

with modinfo descriptions like:
parm:           registered_shani:Registered crypto driver using x86 instruction set extensions: SHA-NI (int)
parm:           registered_ssse3:Registered crypto driver using x86 instruction set extensions: SSSE3 (int)
parm:           registered_avx:Registered crypto driver using x86 instruction set extensions: AVX (int)
parm:           registered_avx2:Registered crypto driver using x86 instruction set extensions: AVX2 (int)

That would eliminate these prints in aesni_intel, so all the
modules load silently (but you can figure out what they're
doing if needed).

	pr_info("AVX2 version of gcm_enc/dec engaged.\n");
	pr_info("AVX version of gcm_enc/dec engaged.\n");
	pr_info("SSE version of gcm_enc/dec engaged.\n");
	pr_info("AES CTR mode by8 optimization enabled\n");






[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux