linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Mimi Zohar <zohar@linux.ibm.com>
Cc: "Markku Savela" <msa@moth.iki.fi>,
	linux-integrity <linux-integrity@vger.kernel.org>,
	"Peter Hüwe" <PeterHuewe@gmx.de>
Subject: Re: IMA fails to see TPM chip (rpi3, linaro optee)
Date: Tue, 26 Feb 2019 13:38:58 +0100	[thread overview]
Message-ID: <CAKv+Gu9H=yP8McwmsBP5nk-Fc3YHG2GF2zU+00gB4sqtfafyeg@mail.gmail.com> (raw)
In-Reply-To: <1551183277.27819.66.camel@linux.ibm.com>

On Tue, 26 Feb 2019 at 13:14, Mimi Zohar <zohar@linux.ibm.com> wrote:
>
> On Tue, 2019-02-26 at 10:12 +0200, Markku Savela wrote:
> > In case anyone is interested, I got IMA to accept TPM chip in my special
> > case (linaro optee kernel) by changing
> >
> >    clk-bcm2835.c: core_initcall -> susbsys_initcall
> >    raspberrypi.c: subsys_initcall -> core_initcall
> >
> > At first check, the system seems to be ok. Maybe some combination of
> > initcalls could work, but this is enough for me.
>
> Thank you for sharing this!
>
> Mimi
>

Hi Mimi, Markku,

I am not sure why I am being cc'ed on this thread, or if there is
anything particular you would like my opinion on.

In general, having to juggle initcall ordering like this is horrid, so
while useful as a data point, I'd prefer fixing it properly instead.
I.e., if the firmware driver relies on a clock having been enabled,
this should be reflected in the DT, and supported in the firmware
driver by deferring the probe until the clock becomes available.



> >
> > diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
> > index d6caac9c3..7cdd597f1 100644
> > --- a/drivers/clk/bcm/clk-bcm2835.c
> > +++ b/drivers/clk/bcm/clk-bcm2835.c
> > @@ -2330,7 +2330,7 @@ static int __init __bcm2835_clk_driver_init(void)
> >   {
> >          return platform_driver_register(&bcm2835_clk_driver);
> >   }
> > -core_initcall(__bcm2835_clk_driver_init);
> > +subsys_initcall(__bcm2835_clk_driver_init);
> >
> >   MODULE_AUTHOR("Eric Anholt <eric@anholt.net>");
> >   MODULE_DESCRIPTION("BCM2835 clock driver");
> > diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c
> > index a82819a78..dfa362e1c 100644
> > --- a/drivers/firmware/raspberrypi.c
> > +++ b/drivers/firmware/raspberrypi.c
> > @@ -457,7 +457,7 @@ static int __init rpi_firmware_init(void)
> >   out1:
> >          return ret;
> >   }
> > -subsys_initcall(rpi_firmware_init);
> > +core_initcall(rpi_firmware_init);
> >
> >   static void __init rpi_firmware_exit(void)
> >   {
>

  reply	other threads:[~2019-02-26 12:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-18  9:36 IMA fails to see TPM chip (rpi3, linaro optee) Markku Savela
2019-02-18 10:13 ` Markku Savela
2019-02-20  8:14   ` Markku Savela
2019-02-21  9:08     ` Markku Savela
2019-02-21 12:49       ` Mimi Zohar
2019-02-21 13:17         ` Markku Savela
2019-02-21 13:23           ` Markku Savela
2019-02-26  8:12             ` Markku Savela
2019-02-26 12:14               ` Mimi Zohar
2019-02-26 12:38                 ` Ard Biesheuvel [this message]
2019-02-26 14:04                   ` Mimi Zohar
2019-02-26 18:09                     ` Jarkko Sakkinen
2019-02-26 19:05                       ` Mimi Zohar
2019-03-07 17:15                 ` James Bottomley

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='CAKv+Gu9H=yP8McwmsBP5nk-Fc3YHG2GF2zU+00gB4sqtfafyeg@mail.gmail.com' \
    --to=ard.biesheuvel@linaro.org \
    --cc=PeterHuewe@gmx.de \
    --cc=linux-integrity@vger.kernel.org \
    --cc=msa@moth.iki.fi \
    --cc=zohar@linux.ibm.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 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).