public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 2/2] IMA: Add a test to verify importing a certificate into keyring
Date: Tue, 14 Jul 2020 14:10:34 +0200	[thread overview]
Message-ID: <20200714121034.GA8020@dell5510> (raw)
In-Reply-To: <1593028963.27152.153.camel@linux.ibm.com>

Hi Mimi, Lachlan,

> > >> +`ima_keys.sh` requires an x509 key to be generated and placed
> > >> +at `/etc/keys/x509_ima.der`.
> > > The filename "/etc/keys/x509_ima.der" is configurable. ?It's based on
> > > CONFIG_IMA_X509_PATH Kconfig option. ?Perhaps extract it from the
> > > running kernel's Kconfig?
> > I didn't think pulling it from the kernel config. Will try this. I 
> > assume `grep "..." /boot/config-$(uname -r)` is the right way to grab a 
> > line from the config?

> Try using scripts/extract-ikconfig.
For now I'd just try to grep /boot/config-$(uname -r), but allow to run the test
with the default value if kconfig not presented / readable (when running without
root).

I'm not sure if extract-ikconfig as external dependency would be suitable for
LTP (understand it's great for kselftest as it's already presented).

BTW there is a ticket for adding kernel config related helpers into the LTP
shell API [1], I'll also note extract-ikconfig there.

LTP refused for long time working with kernel config, because it it's
requirement meant that SUT without it could not be tested. Always try to not
make kernel config as hard dependency (various embedded or old android will be
disabled; some linux distros require root for reading the config).
Design in [1] also suggest to have possibility to run the test even without config.

[1] https://github.com/linux-test-project/ltp/issues/700

> Mimi

Kind regards,
Petr

      reply	other threads:[~2020-07-14 12:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17 23:49 [LTP] [PATCH v3 0/2] IMA: Verify measurement of certificates Lachlan Sneff
2020-06-17 23:49 ` [LTP] [PATCH v3 1/2] IMA: Add a test to verify measurment of keys Lachlan Sneff
2020-06-18 20:28   ` Petr Vorel
2020-06-24 13:21   ` Mimi Zohar
2020-06-24 15:27     ` Mimi Zohar
2020-06-17 23:49 ` [LTP] [PATCH v3 2/2] IMA: Add a test to verify importing a certificate into keyring Lachlan Sneff
2020-06-18 20:14   ` Petr Vorel
2020-06-24 16:41   ` Mimi Zohar
2020-06-24 19:59     ` Lachlan Sneff
2020-06-24 20:02       ` Mimi Zohar
2020-07-14 12:10         ` Petr Vorel [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=20200714121034.GA8020@dell5510 \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /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