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:   Tue, 8 Oct 2019 09:35:23 +0200
From:   Ard Biesheuvel <ard.biesheuvel@...aro.org>
To:     Pascal Van Leeuwen <pvanleeuwen@...imatrix.com>
Cc:     YueHaibing <yuehaibing@...wei.com>,
        "herbert@...dor.apana.org.au" <herbert@...dor.apana.org.au>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "pascalvanl@...il.com" <pascalvanl@...il.com>,
        "antoine.tenart@...tlin.com" <antoine.tenart@...tlin.com>,
        "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] crypto: inside-secure - Fix randbuild error

On Tue, 8 Oct 2019 at 09:32, Pascal Van Leeuwen
<pvanleeuwen@...imatrix.com> wrote:
>
> > -----Original Message-----
> > From: linux-crypto-owner@...r.kernel.org <linux-crypto-owner@...r.kernel.org> On Behalf Of
> > YueHaibing
> > Sent: Tuesday, October 8, 2019 9:15 AM
> > To: herbert@...dor.apana.org.au; davem@...emloft.net; pascalvanl@...il.com;
> > antoine.tenart@...tlin.com
> > Cc: linux-crypto@...r.kernel.org; linux-kernel@...r.kernel.org; YueHaibing
> > <yuehaibing@...wei.com>
> > Subject: [PATCH -next] crypto: inside-secure - Fix randbuild error
> >
> > If CRYPTO_DEV_SAFEXCEL is y but CRYPTO_SM3 is m,
> > building fails:
> >
> > drivers/crypto/inside-secure/safexcel_hash.o: In function `safexcel_ahash_final':
> > safexcel_hash.c:(.text+0xbc0): undefined reference to `sm3_zero_message_hash'
> >
> > Select CRYPTO_SM3 to fix this.
> >
> > Reported-by: Hulk Robot <hulkci@...wei.com>
> > Fixes: 0f2bc13181ce ("crypto: inside-secure - Added support for basic SM3 ahash")
> > Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> > ---
> >  drivers/crypto/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
> > index 3e51bae..5af17db 100644
> > --- a/drivers/crypto/Kconfig
> > +++ b/drivers/crypto/Kconfig
> > @@ -751,6 +751,7 @@ config CRYPTO_DEV_SAFEXCEL
> >       select CRYPTO_SHA512
> >       select CRYPTO_CHACHA20POLY1305
> >       select CRYPTO_SHA3
> > +     select CRYPTO_SM3
> >       help
> >         This driver interfaces with the SafeXcel EIP-97 and EIP-197 cryptographic
> >         engines designed by Inside Secure. It currently accelerates DES, 3DES and
> > --
> > 2.7.4
> >
> But ... I don't really want to build SM3 into the kernel for all Inside
> Secure drivers, since in the majority of cases, the HW will not actually
> support SM3 and I don't want to bloat the kernel image in that case.
>
> So maybe it's better to #ifdef out the failing part of the driver if
> CONFIG_SM3 is not set?
>

Since you are only using the zero length message hash, can we just
copy that into your driver instead?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ