All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antoine Tenart <antoine.tenart@bootlin.com>
To: Pascal Van Leeuwen <pvanleeuwen@insidesecure.com>
Cc: Antoine Tenart <antoine.tenart@bootlin.com>,
	Pascal van Leeuwen <pascalvanl@gmail.com>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
	"davem@davemloft.net" <davem@davemloft.net>
Subject: Re: [PATCH 3/3] crypto: inside-secure - add support for using the EIP197 without firmware images
Date: Thu, 20 Jun 2019 15:15:12 +0200	[thread overview]
Message-ID: <20190620131512.GB4642@kwain> (raw)
In-Reply-To: <AM6PR09MB3523D2FEC3A543FF037812DCD2E50@AM6PR09MB3523.eurprd09.prod.outlook.com>

Hi Pascal,

On Wed, Jun 19, 2019 at 02:37:44PM +0000, Pascal Van Leeuwen wrote:
> > From: Antoine Tenart <antoine.tenart@bootlin.com>
> > On Tue, Jun 18, 2019 at 07:56:24AM +0200, Pascal van Leeuwen wrote:
> 
> > In addition to this, the direction the kernel has taken was to *remove*
> > binary firmwares from its source code. I'm afraid adding this is a
> > no-go.
> 
> For a HW engineer, there really is no fundamental difference between
> control register contents or an instruction word. They can both have
> the exact same effects internal to the HW.
> If I had disguised this as a handful of config reg writes writing 
> some #define'd magic values, probably no one would have even noticed.

I do not fully agree. If this is comparable to configuring h/w
registers, then you could probably have defines explaining why each bit
is set and what it's doing. Which would be fine.

> By that same definition, the tokens the driver generates for
> processing could be considered "firmware" as well (as they are used by
> the hardware in a very similar way) ...

Right. The main difference here is we do have a clear definition of what
the tokens are doing. Thanks to your explanation, if this firmware is
really looking like the token we're using, the words have a defined
structure and the magic values could be generated with proper defines
and macros. And I think it's the main issue here: it's not acceptable to
have an array of magic values. If you can give a meaning to those bits,
I see no reason why it couldn't be added to the driver.

(And I'm all for what you're trying to achieve here :)).

> > The proper solution I believe would be to support loading this "MiniFW",
> > which (depending on the license) could be either distributed in the
> > rootfs and loaded (like what's done currently), or through
> > CONFIG_EXTRA_FIRMWARE.
> > 
> That seems total overkill for just a handful of words though.

Given your explanation, I agree. (If those bits can have meaning).

Thanks!
Antoine

-- 
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2019-06-20 13:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-18  5:56 [PATCH 0/3] crypto: inside-secure - broaden driver scope Pascal van Leeuwen
2019-06-18  5:56 ` [PATCH 1/3] crypto: inside-secure - make driver selectable for non-Marvell hardware Pascal van Leeuwen
2019-06-19 12:29   ` Antoine Tenart
2019-06-18  5:56 ` [PATCH 2/3] crypto: inside-secure - add support for PCI based FPGA development board Pascal van Leeuwen
2019-06-19 12:15   ` Antoine Tenart
2019-06-19 12:30     ` Antoine Tenart
2019-06-19 14:22     ` Pascal Van Leeuwen
2019-06-20 13:06       ` Antoine Tenart
2019-06-20 14:47         ` Pascal Van Leeuwen
2019-06-20 15:36           ` Antoine Tenart
2019-06-18  5:56 ` [PATCH 3/3] crypto: inside-secure - add support for using the EIP197 without firmware images Pascal van Leeuwen
2019-06-19 12:27   ` Antoine Tenart
2019-06-19 14:37     ` Pascal Van Leeuwen
2019-06-20 13:15       ` Antoine Tenart [this message]
2019-06-20 14:59         ` Pascal Van Leeuwen
2019-06-20 15:42           ` Antoine Tenart
2019-06-24 14:20             ` Herbert Xu
2019-06-25  6:41               ` Pascal Van Leeuwen

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=20190620131512.GB4642@kwain \
    --to=antoine.tenart@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=pascalvanl@gmail.com \
    --cc=pvanleeuwen@insidesecure.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.