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]
Message-ID: <CAK8P3a13Ebqd51SWx9svUyvFxV4MKDJKOwKEozzKyga9azBqJA@mail.gmail.com>
Date:   Fri, 6 Sep 2019 20:39:55 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Pascal Van Leeuwen <pvanleeuwen@...imatrix.com>
Cc:     Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>,
        Antoine Tenart <antoine.tenart@...tlin.com>,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>,
        Kees Cook <keescook@...omium.org>,
        "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] crypto: inside-secure - fix uninitialized-variable warning

On Fri, Sep 6, 2019 at 6:08 PM Pascal Van Leeuwen
<pvanleeuwen@...imatrix.com> wrote:

> >
> >  config CRYPTO_DEV_SAFEXCEL
> >       tristate "Inside Secure's SafeXcel cryptographic engine driver"
> > -     depends on OF || PCI || COMPILE_TEST
> > +     depends on OF || PCI
> >
>
> This seems like it just ignores the problem by not allowing compile testing
> anymore? Somehow that does not feel right ...

No, it just ignores the uninteresting case. You can compile-test this on
any architecture by turning on OF.

> >       select CRYPTO_LIB_AES
> >       select CRYPTO_AUTHENC
> >       select CRYPTO_BLKCIPHER
> > diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-
> > secure/safexcel.c
> > index e12a2a3a5422..9c0bce77de14 100644
> > --- a/drivers/crypto/inside-secure/safexcel.c
> > +++ b/drivers/crypto/inside-secure/safexcel.c
> > @@ -938,6 +938,7 @@ static int safexcel_request_ring_irq(void *pdev, int irqid,
> >       struct device *dev;
> >
> >       if (IS_ENABLED(CONFIG_PCI) && is_pci_dev) {
> > +#ifdef CONFIG_PCI
> >
>
> The whole point was NOT to use regular #ifdefs such that the code can
> be compile tested without needing to switch configurations.
> There is already a different solution in the works involving some empty
> inline stubs for those pci routines, please see an earlier mail by Herbert
> titled "PCI: Add stub pci_irq_vector and others".

Ah, good. That should take care of most of the problems. I think
we still need the Kconfig change, unless the safexcel_init()
function is also changed to use if(IS_ENABLED()) checks
instead of #if.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ