From: "Arnd Bergmann" <arnd@arndb.de>
To: "Herbert Xu" <herbert@gondor.apana.org.au>
Cc: "Arnd Bergmann" <arnd@kernel.org>,
"Will Deacon" <will@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
"Catalin Marinas" <catalin.marinas@arm.com>,
"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
"Harald Freudenberger" <freude@linux.ibm.com>,
"Holger Dengler" <dengler@linux.ibm.com>,
"Heiko Carstens" <hca@linux.ibm.com>,
"Vasily Gorbik" <gor@linux.ibm.com>,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
"Sven Schnelle" <svens@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"Ard Biesheuvel" <ardb@kernel.org>,
"Eric Biggers" <ebiggers@google.com>,
"James E . J . Bottomley" <James.Bottomley@hansenpartnership.com>,
"Jarkko Sakkinen" <jarkko@kernel.org>,
linux-crypto@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
linux-s390@vger.kernel.org
Subject: Re: [v3 PATCH] crypto: lib/Kconfig - Hide arch options from user
Date: Fri, 28 Feb 2025 18:10:28 +0100 [thread overview]
Message-ID: <ca6ebfce-1969-4e13-94de-96702540a967@app.fastmail.com> (raw)
In-Reply-To: <Z8E3gjfvG3eFoLxR@gondor.apana.org.au>
On Fri, Feb 28, 2025, at 05:11, Herbert Xu wrote:
> On Thu, Feb 27, 2025 at 12:56:30PM +0100, Arnd Bergmann wrote:
>>
>> I've tried to undo that portion here and don't run into a
>> dependency loop so far with the patch below on top of yours
>> (around 100 randconfigs in). I'll keep testing and will let
>> you know when something goes wrong.
>
> That's because you removed 'select CRYPTO', which can cause the
> arch code to silently disappear just like my original patch.
>
> It's pretty much difficult to disable CRYPTO because so many
> random things select it. But I managed to turn CRYPTO off with
> some effort and indeed with your patch the arch code disappears.
>
> In the following config file, CONFIG_CRYPTO_LIB_CHACHA is modular but
> the X86 option for it is not selected, because CRYPTO itself is off.
I see. So the case of building lib/crypto code but not CONFIG_CRYPTO
is something I would normally expect to work, including the
architecture specific optimizations, and it's probably not
too hard to get there, but it's also unclear if there is really a
point in doing that.
For design purity, I think we would need to split the architecture
specific code the same way as the generic ones: library functions
that always get selected by their users to export functions and
the front-ends that are user-selectable and register the algorithm
with the crypto API.
Keeping the 'select CRYPTO' is clearly less effor if you prefer
that.
Arnd
next prev parent reply other threads:[~2025-02-28 17:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 16:42 [PATCH] crypto: lib/Kconfig - fix chacha/poly1305 dependencies more more Arnd Bergmann
2025-02-25 21:33 ` Will Deacon
2025-02-25 21:40 ` Arnd Bergmann
2025-02-25 21:50 ` Arnd Bergmann
2025-02-26 1:40 ` Herbert Xu
2025-02-26 4:36 ` [PATCH] crypto: lib/Kconfig - Select and hide arch options Herbert Xu
2025-02-26 6:07 ` Eric Biggers
2025-02-26 8:31 ` Herbert Xu
2025-02-26 9:08 ` [v2 PATCH] crypto: lib/Kconfig - Hide arch options from user Herbert Xu
2025-02-27 7:48 ` [v3 " Herbert Xu
2025-02-27 8:32 ` Arnd Bergmann
2025-02-27 8:43 ` Herbert Xu
2025-02-27 11:56 ` Arnd Bergmann
2025-02-27 12:04 ` Ard Biesheuvel
[not found] ` <Z8E3gjfvG3eFoLxR@gondor.apana.org.au>
2025-02-28 17:10 ` Arnd Bergmann [this message]
2025-02-27 5:57 ` [PATCH] crypto: lib/Kconfig - Select and hide arch options kernel test robot
2025-02-27 6:29 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ca6ebfce-1969-4e13-94de-96702540a967@app.fastmail.com \
--to=arnd@arndb.de \
--cc=James.Bottomley@hansenpartnership.com \
--cc=agordeev@linux.ibm.com \
--cc=ardb@kernel.org \
--cc=arnd@kernel.org \
--cc=borntraeger@linux.ibm.com \
--cc=catalin.marinas@arm.com \
--cc=davem@davemloft.net \
--cc=dengler@linux.ibm.com \
--cc=ebiggers@google.com \
--cc=freude@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=herbert@gondor.apana.org.au \
--cc=jarkko@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=svens@linux.ibm.com \
--cc=tsbogend@alpha.franken.de \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).