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] [day] [month] [year] [list]
Date:   Fri, 28 May 2021 22:51:33 +0900
From:   Austin Kim <austindh.kim@...il.com>
To:     Eric Biggers <ebiggers@...nel.org>
Cc:     herbert@...dor.apana.org.au, davem@...emloft.net,
        catalin.marinas@....com, will@...nel.org,
        John Johansen <john.johansen@...onical.com>, jmorris@...ei.org,
        serge@...lyn.com, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-security-module@...r.kernel.org,
        linux-crypto@...r.kernel.org,
        김동현 <austin.kim@....com>
Subject: Re: [PATCH] crypto: arm64/gcm - remove Wunused-const-variable ghash_cpu_feature

2021년 5월 28일 (금) 오전 2:46, Eric Biggers <ebiggers@...nel.org>님이 작성:
>
> On Thu, May 27, 2021 at 07:28:09AM +0100, Austin Kim wrote:
> >
> > The variable with MODULE_DEVICE_TABLE() is registered as platform_driver.
>
> What does this mean?  There is no platform_driver involved here at all.
>

What I would like to say is "in many cases, MODULE_DEVICE_TABLE is
registered as struct of platform_driver"
ex) [drivers/char/hw_random/meson-rng.c]
MODULE_DEVICE_TABLE(of, meson_rng_of_match);

static struct platform_driver meson_rng_driver = {
.probe = meson_rng_probe,
.driver = {
.name = "meson-rng",
.of_match_table = meson_rng_of_match,
},
};

> > But ghash_cpu_feature is not used, so remove ghash_cpu_feature.
>
> It is used when the file is built as a module.
>

Thanks for the information. But it looks like this file is compiled
as built-in with 'CONFIG_CRYPTO_GHASH_ARM64_CE=y' by default.

> > diff --git a/arch/arm64/crypto/ghash-ce-glue.c b/arch/arm64/crypto/ghash-ce-glue.c
> > index 720cd3a58da3..c3f27d0d5329 100644
>>[...]
>
> Probably adding __maybe_unused to ghash_cpu_feature[] is the right thing to do.
> That's what module_cpu_feature_match() does.
>
> (Note that module_cpu_feature_match() can't be used here, as it seems the intent
> is for this module to be autoloaded when PMULL is detected, but still be
> loadable without it.  So, that's apparently the reason for using
> MODULE_DEVICE_TABLE() directly.)

Thanks for the valuable idea and feedback.

>
> - Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ