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: <Z8All3G80gGXzfaU@gondor.apana.org.au>
Date: Thu, 27 Feb 2025 16:43:03 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Arnd Bergmann <arnd@...db.de>
Cc: Arnd Bergmann <arnd@...nel.org>, Will Deacon <will@...nel.org>,
	"David S . Miller" <davem@...emloft.net>,
	Catalin Marinas <catalin.marinas@....com>,
	Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
	Harald Freudenberger <freude@...ux.ibm.com>,
	Holger Dengler <dengler@...ux.ibm.com>,
	Heiko Carstens <hca@...ux.ibm.com>,
	Vasily Gorbik <gor@...ux.ibm.com>,
	Alexander Gordeev <agordeev@...ux.ibm.com>,
	Christian Borntraeger <borntraeger@...ux.ibm.com>,
	Sven Schnelle <svens@...ux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@...cle.com>,
	Ard Biesheuvel <ardb@...nel.org>,
	Eric Biggers <ebiggers@...gle.com>,
	"James E . J . Bottomley" <James.Bottomley@...senpartnership.com>,
	Jarkko Sakkinen <jarkko@...nel.org>, linux-crypto@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	linux-mips@...r.kernel.org, linux-s390@...r.kernel.org
Subject: Re: [v3 PATCH] crypto: lib/Kconfig - Hide arch options from user

On Thu, Feb 27, 2025 at 09:32:51AM +0100, Arnd Bergmann wrote:
>
> This looks like a good approach. Once it works correctly,
> it should be possible to clean up the 'select' statements
> in wireguard as well and just 'select CRYPTO_LIB_CHACHA' etc.

Yes that's the idea.

> I think the more common style is to put the 'default'
> lines before 'select'.

It is the customary place in the crypto tree.

> It appears that the two above are missing a
> 'depends on KERNEL_MODE_NEON' line. There is still
> a runtime check that prevents it from being used on
> non-neon machines, but I think you should add these
> lines here since it's no longer possible to turn
> them off individually when building a kernel for a
> non-NEON target.

Good catch.  But I think this was deliberate as it also includes
a non-NEON implementation:

commit b36d8c09e710c71f6a9690b6586fea2d1c9e1e27
Author: Ard Biesheuvel <ardb@...nel.org>
Date:   Fri Nov 8 13:22:14 2019 +0100

    crypto: arm/chacha - remove dependency on generic ChaCha driver
    
    Instead of falling back to the generic ChaCha skcipher driver for
    non-SIMD cases, use a fast scalar implementation for ARM authored
    by Eric Biggers. This removes the module dependency on chacha-generic
    altogether, which also simplifies things when we expose the ChaCha
    library interface from this module.
    
    Signed-off-by: Ard Biesheuvel <ardb@...nel.org>
    Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
 
> I'm not sure why we need the extra "_INTERNAL" symbols, but I
> may be missing something here. What problem does this solve
> for you?

Without them Kconfig will bomb out because of a loop centering
on CONFIG_CRYPTO.

Cheers,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ