public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Corentin Labbe <clabbe.montjoie@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Chen-Yu Tsai <wens@kernel.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	Eric Biggers <ebiggers@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Ovidiu Panait <ovidiu.panait.oss@gmail.com>,
	linux-crypto@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: sun8i-ss - avoid hash and rng references
Date: Tue, 5 May 2026 17:24:01 +0800	[thread overview]
Message-ID: <afm3MTvlJUKv87AN@gondor.apana.org.au> (raw)
In-Reply-To: <20260423065600.2081989-1-arnd@kernel.org>

On Thu, Apr 23, 2026 at 08:55:42AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> While the sun4i-ss and sun8i-ce drivers started selecting CRYPTO_RNG,
> the sun8i-ss variant does not, and causes a link failure:
> 
> aarch64-linux-ld: drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.o: in function `sun8i_ss_unregister_algs':
> sun8i-ss-core.c:(.text.sun8i_ss_unregister_algs+0x94): undefined reference to `crypto_unregister_rng'
> aarch64-linux-ld: drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.o: in function `sun8i_ss_probe':
> sun8i-ss-core.c:(.text.sun8i_ss_probe+0x40c): undefined reference to `crypto_register_rng'
> 
> Looking more closely, I see that all of the allwinner crypto drivers have the
> same logic where the rng and hash parts of the driver are optional, but then the
> generic code is still selected, which is a bit inconsistent, aside from the
> missing CRYPTO_RNG select on sun8i-ss.
> 
> Change the approach so only the bits that are actually used are built, using
> ifdef checks around the optional portions that match the optional references
> to the sub-drivers.
> 
> Ideally the drivers would get reworked in a way that keeps all the bits
> related to the skcipher/ahash/rng codecs in the respective sub-drivers,
> rather than having a common driver that knows about all of these.
> 
> Fixes: cdadc1435937 ("crypto: cryptomgr - Select algorithm types only when CRYPTO_SELFTESTS")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> The simpler approach would be to add even more 'select' statements
> ---
>  drivers/crypto/allwinner/Kconfig                  |  2 --
>  drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c |  8 ++++++++
>  drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 12 ++++++++++++
>  drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 12 ++++++++++++
>  4 files changed, 32 insertions(+), 2 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


      parent reply	other threads:[~2026-05-05  9:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-23  6:55 [PATCH] crypto: sun8i-ss - avoid hash and rng references Arnd Bergmann
2026-04-23  9:00 ` Herbert Xu
2026-04-23  9:25   ` Arnd Bergmann
2026-04-23  9:27     ` Herbert Xu
2026-04-23 10:26       ` Arnd Bergmann
2026-04-23 11:09         ` Herbert Xu
2026-05-05  9:24 ` Herbert Xu [this message]

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=afm3MTvlJUKv87AN@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=clabbe.montjoie@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ebiggers@kernel.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=ovidiu.panait.oss@gmail.com \
    --cc=samuel@sholland.org \
    --cc=wens@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