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: <MW5PR84MB18428853F001C480C989761BAB019@MW5PR84MB1842.NAMPRD84.PROD.OUTLOOK.COM>
Date:   Thu, 10 Nov 2022 22:06:25 +0000
From:   "Elliott, Robert (Servers)" <elliott@....com>
To:     "Elliott, Robert (Servers)" <elliott@....com>,
        "herbert@...dor.apana.org.au" <herbert@...dor.apana.org.au>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "Jason A. Donenfeld" <Jason@...c4.com>
CC:     "tim.c.chen@...ux.intel.com" <tim.c.chen@...ux.intel.com>,
        "ap420073@...il.com" <ap420073@...il.com>,
        "ardb@...nel.org" <ardb@...nel.org>,
        "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 18/19] crypto: x86 - standardize not loaded prints


> 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");


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ