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]
Date:	Sun, 29 Jun 2014 07:07:19 +0200
From:	Stephan Mueller <smueller@...onox.de>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
Cc:	Herbert Xu <herbert@...dor.apana.org.au>,
	kbuild test robot <fengguang.wu@...el.com>, kbuild@...org,
	Dan Carpenter <dan.carpenter@...cle.com>,
	linux-crypto@...r.kernel.org, Randy Dunlap <rdunlap@...radead.org>,
	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] DRBG: cleanup of preprocessor macros

Am Sonntag, 29. Juni 2014, 12:20:15 schrieb Stephen Rothwell:

Hi Stephen,

> Hi Stephan,
> 
> On Sat, 28 Jun 2014 22:00:07 +0200 Stephan Mueller <smueller@...onox.de> 
wrote:
> > diff --git a/crypto/drbg.c b/crypto/drbg.c
> > index 6679a26..03a230e 100644
> > --- a/crypto/drbg.c
> > +++ b/crypto/drbg.c
> > @@ -102,8 +102,13 @@
> > 
> >  #if !defined(CONFIG_CRYPTO_DRBG_HASH) && \
> >  
> >  	!defined(CONFIG_CRYPTO_DRBG_HMAC) && \
> >  	!defined(CONFIG_CRYPTO_DRBG_CTR)
> > 
> > -#warning "The DRBG code is useless without compiling at least one DRBG
> > type" -#endif
> > +#define CRYPTO_DRBG_NONE_STRING "none "
> > +static int __init drbg_init(void)
> > +{
> > +	pr_warn("DRBG: no DRBG core was compiled!\n");
> > +	return -EFAULT;
> > +}
> > +#else
> 
> Wouldn't this be better handled by Kconfig so that we don't even try to
> build this unless one of the required core modules is chosen?

I tried that, but it seems that my Kconfig Foo is not too well: adding the 
DRBG cores to the depends line of CRYPTO_DRBG as indicated in the following, I 
have a circular dependency. With that circular dependency, the DRBG entries do 
not show up in make menuconfig.

menuconfig CRYTPO_DRBG
        tristate "NIST SP800-90A DRBG"
        depends on CRYPTO && (CRYPTO_DRBG_HMAC || CRYPTO_DRBG_CTR || 
CRYPTO_DRBG_HASH)
...

if CRYTPO_DRBG

config CRYPTO_DRBG_HMAC
        bool "Enable HMAC DRBG"
        default y
        depends on CRYTPO_DRBG

Do you have a working solution in mind? The goal is that once CRYPTO_DRBG is 
selected, at least one of the DRBG cores must be selected.

Thanks
Stephan
-- 
| Cui bono? |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ