All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Roberto Sassu <roberto.sassu@huaweicloud.com>, dmitry.kasatkin@gmail.com
Cc: linux-integrity@vger.kernel.org, vt@altlinux.org, pvorel@suse.cz,
	stefanb@linux.ibm.com, Roberto Sassu <roberto.sassu@huawei.com>
Subject: Re: [PATCH ima-evm-utils v2 6/9] Add tests for EVM portable signatures
Date: Mon, 23 Jan 2023 10:43:46 -0500	[thread overview]
Message-ID: <4237c8d0c61038abfce21aa461611305bbe19adc.camel@linux.ibm.com> (raw)
In-Reply-To: <724585556e02178d0b9ce29af057a93ac72f0a87.camel@huaweicloud.com>

On Mon, 2023-01-23 at 16:31 +0100, Roberto Sassu wrote:
> On Mon, 2023-01-23 at 09:40 -0500, Mimi Zohar wrote:
> > Hi Roberto,
> > 
> > On Thu, 2023-01-12 at 13:24 +0100, Roberto Sassu wrote:
> > > +
> > > +key_path="/lib/modules/$(uname -r)/source/certs/signing_key.pem"
> > > +if [ -f "$PWD/../signing_key.pem" ]; then
> > > +       key_path=$PWD/../signing_key.pem
> > > +fi
> > > +
> > 
> > For testing locally, how about first checking the file exists, before
> > setting key_path?  On not finding it, perhaps check whether
> > "/lib/modules/$(uname -r)/build/certs/signing_key.pem" exists.
> 
> The precedence is:
> 
> TST_KEY_PATH -> ../signing_key.pem -> /lib/modules...

This is still /lib/modules, just not "source/", but "build/".

-key_path="/lib/modules/$(uname -r)/source/certs/signing_key.pem"
+if [ -f "/lib/modules/$(uname -r)/source/certs/signing_key.pem" ]; then
+       key_path="/lib/modules/$(uname -r)/source/certs/signing_key.pem"
+elif [ -f "/lib/modules/$(uname -r)/build/certs/signing_key.pem" ]; then
+       key_path="/lib/modules/$(uname -r)/build/certs/signing_key.pem"
+fi
+

Mimi

> 
> If TST_KEY_PATH is not found, probably it is a good idea to not
> fallback to the other alternatives, as it is user input.




  reply	other threads:[~2023-01-23 15:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 12:24 [PATCH ima-evm-utils v2 0/9] Support testing with UML kernel Roberto Sassu
2023-01-12 12:24 ` [PATCH ima-evm-utils v2 1/9] Fix error messages and mdlen init in calc_evm_hmac() Roberto Sassu
2023-01-12 14:16   ` Stefan Berger
2023-01-12 12:24 ` [PATCH ima-evm-utils v2 2/9] Add config for UML kernel Roberto Sassu
2023-01-12 14:18   ` Stefan Berger
2023-01-12 12:24 ` [PATCH ima-evm-utils v2 3/9] Compile the UML kernel and download it in Github Actions Roberto Sassu
2023-01-12 12:24 ` [PATCH ima-evm-utils v2 4/9] Add support for UML in functions.sh Roberto Sassu
2023-01-12 15:00   ` Stefan Berger
2023-01-12 15:01     ` Roberto Sassu
2023-01-12 12:24 ` [PATCH ima-evm-utils v2 5/9] Introduce TST_LIST variable to select a test to execute Roberto Sassu
2023-01-12 15:07   ` Stefan Berger
2023-01-12 12:24 ` [PATCH ima-evm-utils v2 6/9] Add tests for EVM portable signatures Roberto Sassu
2023-01-12 15:22   ` Stefan Berger
2023-01-12 15:38     ` Roberto Sassu
2023-01-23 14:40   ` Mimi Zohar
2023-01-23 15:31     ` Roberto Sassu
2023-01-23 15:43       ` Mimi Zohar [this message]
2023-01-23 15:46         ` Roberto Sassu
2023-01-12 12:24 ` [PATCH ima-evm-utils v2 7/9] Adapt fsverity.test to work with UML kernel Roberto Sassu
2023-01-12 12:24 ` [PATCH ima-evm-utils v2 8/9] Use in-place built fsverity binary instead of installing it Roberto Sassu
2023-01-12 16:11   ` Stefan Berger
2023-01-12 16:20     ` Roberto Sassu
2023-01-12 16:26       ` Stefan Berger
2023-01-12 16:28         ` Roberto Sassu
2023-01-19 11:51           ` Mimi Zohar
2023-01-12 12:24 ` [PATCH ima-evm-utils v2 9/9] ci: haveged requires EPEL on CentOS stream:8 Roberto Sassu
2023-01-12 16:08   ` Stefan Berger
2023-01-12 14:32 ` [PATCH ima-evm-utils v2 0/9] Support testing with UML kernel Mimi Zohar

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=4237c8d0c61038abfce21aa461611305bbe19adc.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=pvorel@suse.cz \
    --cc=roberto.sassu@huawei.com \
    --cc=roberto.sassu@huaweicloud.com \
    --cc=stefanb@linux.ibm.com \
    --cc=vt@altlinux.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 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.