linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pascal Van Leeuwen <pvanleeuwen@verimatrix.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Antoine Tenart <antoine.tenart@bootlin.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Kees Cook <keescook@chromium.org>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 1/2] crypto: inside-secure - fix uninitialized-variable warning
Date: Fri, 6 Sep 2019 20:18:41 +0000	[thread overview]
Message-ID: <MN2PR20MB29731C08A41B4018E9C2146FCABA0@MN2PR20MB2973.namprd20.prod.outlook.com> (raw)
In-Reply-To: <CAK8P3a13Ebqd51SWx9svUyvFxV4MKDJKOwKEozzKyga9azBqJA@mail.gmail.com>

> -----Original Message-----
> From: Arnd Bergmann <arnd@arndb.de>
> Sent: Friday, September 6, 2019 8:40 PM
> To: Pascal Van Leeuwen <pvanleeuwen@verimatrix.com>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>; David S. Miller <davem@davemloft.net>; Antoine
> Tenart <antoine.tenart@bootlin.com>; Ard Biesheuvel <ard.biesheuvel@linaro.org>; Kees Cook
> <keescook@chromium.org>; linux-crypto@vger.kernel.org; linux-kernel@vger.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@verimatrix.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.
> 
You are entirely correct. Because of the COMPILE_TEST it could be compiled
without either OF or PCI support, which makes no sense whatsoever ...

> > >       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
>
Yes, I agree.


Regards,
Pascal van Leeuwen
Silicon IP Architect, Multi-Protocol Engines @ Verimatrix
www.insidesecure.com


      reply	other threads:[~2019-09-06 20:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06 15:22 [PATCH 1/2] crypto: inside-secure - fix uninitialized-variable warning Arnd Bergmann
2019-09-06 15:22 ` [PATCH 2/2] crypto: hisilicon - avoid unused function warning Arnd Bergmann
2019-09-13  9:17   ` Herbert Xu
2019-09-19  8:11     ` Zhou Wang
2019-09-19 13:48       ` Herbert Xu
2019-09-19 14:07         ` Arnd Bergmann
2019-09-06 16:08 ` [PATCH 1/2] crypto: inside-secure - fix uninitialized-variable warning Pascal Van Leeuwen
2019-09-06 18:39   ` Arnd Bergmann
2019-09-06 20:18     ` Pascal Van Leeuwen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR20MB29731C08A41B4018E9C2146FCABA0@MN2PR20MB2973.namprd20.prod.outlook.com \
    --to=pvanleeuwen@verimatrix.com \
    --cc=antoine.tenart@bootlin.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=keescook@chromium.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).