public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] RSA depends on DM
Date: Wed, 4 Feb 2015 08:47:32 +0100	[thread overview]
Message-ID: <20150204084732.4af362d0@lilith> (raw)
In-Reply-To: <CAPnjgZ1wXyFKhZAvJNQdUjekayoFKF4MjVo3+9ugQYmyE2qv+A@mail.gmail.com>

Hello Simon,

On Tue, 3 Feb 2015 18:01:49 -0700, Simon Glass <sjg@chromium.org> wrote:
> Hi Chris,
> 
> On 3 February 2015 at 17:57, Chris Kuethe <chris.kuethe@gmail.com> wrote:
> > On Tue, Feb 3, 2015 at 4:38 PM, Simon Glass <sjg@chromium.org> wrote:
> >> +Masahiro
> >>
> >> Hi Chris,
> >>
> >> On 3 February 2015 at 00:42, Chris Kuethe <chris.kuethe@gmail.com> wrote:
> >>> Discovered while experimenting with signature checking on vexpress
> >>> which doesn't typically use DM. Rather than complaining about unmet
> >>> dependencies it might be better to enable those them.
> >>>
> >>> ---
> >>>  lib/rsa/Kconfig | 1 +
> >>>  1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/lib/rsa/Kconfig b/lib/rsa/Kconfig
> >>> index 1268a1b..4db5da4 100644
> >>> --- a/lib/rsa/Kconfig
> >>> +++ b/lib/rsa/Kconfig
> >>> @@ -2,6 +2,7 @@ config RSA
> >>>   bool "Use RSA Library"
> >>>   select RSA_FREESCALE_EXP if FSL_CAAM
> >>>   select RSA_SOFTWARE_EXP if !RSA_FREESCALE_EXP
> >>> + select DM
> >>>   help
> >>>    RSA support. This enables the RSA algorithm used for FIT image
> >>>    verification in U-Boot.
> >>
> >> I wonder whether 'depends on DM' might be better? It seems odd to have
> >> the tail wagging the dog.
> >>
> >> Regards,
> >> Simon
> >
> > No, that would not be better because a few lines down,
> > RSA_SOFTWARE_EXP and RSA_FREESCALE_EXP both say "depends on DM" but
> > they don't actually enable it if they need it.
> >
> > As a user, my expectation is that when I turn on some high level
> > feature, that will enable all of its lower level dependencies. Would
> > it be less strange to make FIT_SIGNATURE turn on DM instead of RSA?
> 
> We certainly must avoid the build break.
> 
> My concern is that CONFIG_DM may introduce a run-time break.

I can tell it does. :)

> For example if you don't have pre-relocation malloc() available the
> board may not boot. Driver model is a fundamental core feature, and we
> are working to move everything over to it, but I'm not quite comfortable
> with forcing it on when someone changes a feature. It feel it would be
> better to not offer it.
> 
> I'm interested to hear other viewpoints though.

Agreed for me: no board should have DM enabled 'behind its back'.

If RSA depends on DM, then the make menuconfig user should be unable to
select RSA unless and until (s)he has selected DM (and the RSA help
should make it clear that the board must support DM, and that just
enabling CONFIG_DM probably won't be enough).

> Perhaps soon we can enable CONFIG_DM globally but we are not there yet.
>
> Regards,
> Simon

Amicalement,
-- 
Albert.

  parent reply	other threads:[~2015-02-04  7:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03  7:42 [U-Boot] [PATCH] RSA depends on DM Chris Kuethe
2015-02-04  0:38 ` Simon Glass
2015-02-04  0:57   ` Chris Kuethe
2015-02-04  1:01     ` Simon Glass
2015-02-04  1:12       ` Chris Kuethe
2015-02-04  5:41       ` Robert Moskowitz
2015-02-04  7:47       ` Albert ARIBAUD [this message]
2015-02-04 20:07         ` Simon Glass
2015-02-05  3:16           ` Chris Kuethe
2015-02-05  3:26             ` Simon Glass
2015-02-06 21:46               ` Simon Glass

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=20150204084732.4af362d0@lilith \
    --to=albert.u.boot@aribaud.net \
    --cc=u-boot@lists.denx.de \
    /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