linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Lachlan Sneff <t-josne@linux.microsoft.com>,
	pvorel@suse.cz, ltp@lists.linux.it
Cc: nramas@linux.microsoft.com, balajib@linux.microsoft.com,
	linux-integrity@vger.kernel.org
Subject: Re: [PATCH 1/2] IMA: Verify that the kernel cmdline is passed and measured correctly through the kexec barrier.
Date: Wed, 15 Jul 2020 15:40:52 -0400	[thread overview]
Message-ID: <1594842052.12900.337.camel@linux.ibm.com> (raw)
In-Reply-To: <53323968-55b9-68ae-dc3f-de9cbd223ff1@linux.microsoft.com>

On Wed, 2020-07-15 at 15:38 -0400, Lachlan Sneff wrote:
> On 7/14/20 8:58 PM, Mimi Zohar wrote:
> > On Thu, 2020-07-02 at 11:35 -0400, Lachlan Sneff wrote:
> >> Add a testcase that verifies that kexec correctly logs the
> >> kernel command line to the IMA buffer and that the command
> >> line is then correctly measured.
> >>
> >> This test must be run standalone, since it runs kexec
> >> multiple times (and therefore reboots several times).
> > Verifying the kexec boot command line doesn't require rebooting.  Just
> > loading the kexec kernel image should be enough (kexec -s -l).
> >   Verifying that the measurement list, including the kexec boot command
> > line, is carried across kexec could be a separate test.
> 
> This is true. However, it only appends to the IMA log once, even if you 
> unload (`kexec -u`) the kexec kernel after `kexec -s -l ...`.
> 
> Therefore, the test would only be able to check kexec with the cmdline 
> supplied in one way.
> 
> I will have to check internally if that's the right way to go. If it 
> didn't need to reboot, then the test could be integrated into the normal 
> IMA tests,
> which would definitely be a good thing.

For files, there is a single measurement unless the file changes.  I
would assume that would be the same for the kexec command line as
well.  You could modify the command line a bit to force it to be re-
measured.

Mimi

  reply	other threads:[~2020-07-15 19:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02 15:35 [PATCH 0/2] Test cmdline measurement and IMA buffer passing through kexec Lachlan Sneff
2020-07-02 15:35 ` [PATCH 1/2] IMA: Verify that the kernel cmdline is passed and measured correctly through the kexec barrier Lachlan Sneff
2020-07-15  0:58   ` Mimi Zohar
2020-07-15  8:03     ` Petr Vorel
2020-07-15 19:38     ` Lachlan Sneff
2020-07-15 19:40       ` Mimi Zohar [this message]
2020-07-15  8:18   ` Petr Vorel
2020-07-15 19:46     ` Lachlan Sneff
2020-07-02 15:35 ` [PATCH 2/2] IMA: Verify IMA buffer passing " Lachlan Sneff
2020-07-15  1:41   ` 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=1594842052.12900.337.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=balajib@linux.microsoft.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=ltp@lists.linux.it \
    --cc=nramas@linux.microsoft.com \
    --cc=pvorel@suse.cz \
    --cc=t-josne@linux.microsoft.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).