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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdW6jCbB80JhUVjBPnMCAXn5Amdr6KM48jvnd+VnMR40gg@mail.gmail.com>
Date: Mon, 6 Oct 2025 10:23:21 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Olivia Mackall <olivia@...enic.com>, Herbert Xu <herbert@...dor.apana.org.au>, 
	Cai Huoqing <cai.huoqing@...ux.dev>, Arnd Bergmann <arnd@...db.de>, Dragan Simic <dsimic@...jaro.org>, 
	Francesco Dolcini <francesco.dolcini@...adex.com>, Daniel Golle <daniel@...rotopia.org>, 
	Christian Marangi <ansuelsmth@...il.com>, Aurelien Jarno <aurelien@...el32.net>, 
	Markus Mayer <mmayer@...adcom.com>, Lukas Bulwahn <lukas.bulwahn@...hat.com>, 
	Nicolas Frattaroli <nicolas.frattaroli@...labora.com>, linux-crypto@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hwrng: nomadik: add ARM_AMBA dependency

Hi Arnd,

On Tue, 29 Jul 2025 at 17:28, Arnd Bergmann <arnd@...nel.org> wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> Compile-testing this driver is only possible when the AMBA bus driver is
> available in the kernel:
>
> x86_64-linux-ld: drivers/char/hw_random/nomadik-rng.o: in function `nmk_rng_remove':
> nomadik-rng.c:(.text+0x67): undefined reference to `amba_release_regions'
> x86_64-linux-ld: drivers/char/hw_random/nomadik-rng.o: in function `nmk_rng_probe':
> nomadik-rng.c:(.text+0xee): undefined reference to `amba_request_regions'
> x86_64-linux-ld: nomadik-rng.c:(.text+0x18d): undefined reference to `amba_release_regions'
>
> The was previously implied by the 'depends on ARCH_NOMADIK', but needs to be
> specified for the COMPILE_TEST case.
>
> Fixes: d5e93b3374e4 ("hwrng: Kconfig - Add helper dependency on COMPILE_TEST")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Thanks for your patch, which is now commit efaa2d815a0e4d1c ("hwrng:
nomadik - add ARM_AMBA dependency") upstream.

> --- a/drivers/char/hw_random/Kconfig
> +++ b/drivers/char/hw_random/Kconfig
> @@ -312,6 +312,7 @@ config HW_RANDOM_INGENIC_TRNG
>  config HW_RANDOM_NOMADIK
>         tristate "ST-Ericsson Nomadik Random Number Generator support"
>         depends on ARCH_NOMADIK || COMPILE_TEST
> +       depends on ARM_AMBA
>         default HW_RANDOM
>         help
>           This driver provides kernel-side support for the Random Number

After seeing CONFIG_HW_RANDOM_NOMADIK disappear from m68k
all{mod,yes}config, I became intrigued, as it did build fine before?
If CONFIG_ARM_AMBA is not enabled, both __amba_driver_register() and
amba_driver_unregister() become static inline dummies, and the rest
of the code and data is not referenced, thus optimized away by the
compiler.  I verified this is the case on amd64 allmodconfig, too.
How come this failed for you?

Gr{oetje,eeting}s,

                        Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ