From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
linux-integrity <linux-integrity@vger.kernel.org>,
Peter Jones <pjones@redhat.com>,
linux-efi <linux-efi@vger.kernel.org>,
stable <stable@vger.kernel.org>, Lyude Paul <lyude@redhat.com>,
Matthew Garrett <mjg59@google.com>,
Roberto Sassu <roberto.sassu@huawei.com>,
Bartosz Szczepanek <bsz@semihalf.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] efi+tpm: Don't access event->count when it isn't mapped.
Date: Fri, 27 Sep 2019 18:29:38 +0300 [thread overview]
Message-ID: <20190927152938.GB10545@linux.intel.com> (raw)
In-Reply-To: <20190925164133.nmzzhwgagpqvwclu@cantor>
On Wed, Sep 25, 2019 at 09:41:33AM -0700, Jerry Snitselaar wrote:
> On Wed Sep 25 19, Jerry Snitselaar wrote:
> > On Wed Sep 25 19, Jarkko Sakkinen wrote:
> > > On Wed, Sep 25, 2019 at 12:25:05PM +0200, Ard Biesheuvel wrote:
> > > > On Wed, 25 Sep 2019 at 12:16, Jarkko Sakkinen
> > > > <jarkko.sakkinen@linux.intel.com> wrote:
> > > > >
> > > > > From: Peter Jones <pjones@redhat.com>
> > > > >
> > > > > Some machines generate a lot of event log entries. When we're
> > > > > iterating over them, the code removes the old mapping and adds a
> > > > > new one, so once we cross the page boundary we're unmapping the page
> > > > > with the count on it. Hilarity ensues.
> > > > >
> > > > > This patch keeps the info from the header in local variables so we don't
> > > > > need to access that page again or keep track of if it's mapped.
> > > > >
> > > > > Fixes: 44038bc514a2 ("tpm: Abstract crypto agile event size calculations")
> > > > > Cc: linux-efi@vger.kernel.org
> > > > > Cc: linux-integrity@vger.kernel.org
> > > > > Cc: stable@vger.kernel.org
> > > > > Signed-off-by: Peter Jones <pjones@redhat.com>
> > > > > Tested-by: Lyude Paul <lyude@redhat.com>
> > > > > Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > > > > Acked-by: Matthew Garrett <mjg59@google.com>
> > > > > Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > > > > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > > >
> > > > Thanks Jarkko.
> > > >
> > > > Shall I take these through the EFI tree?
> > >
> > > Would be great, if you could because I already sent one PR with fixes for
> > > v5.4-rc1 yesterday.
> > >
> > > /Jarkko
> >
> > My patch collides with this, so I will submit a v3 that applies on top of
> > these once I've run a test with all 3 applied on this t480s.
>
> Tested with Peter's patches, and that was the root cause on this 480s.
>
> I think there should still be a check for tbl_size to make sure we
> aren't sticking -1 into efi_tpm_final_log_size though, which will be
> the case right now if it fails to parse an event.
You could sent a follow up patch for that I think. The current
ones are kind of already "went through the process" and do right
things but I do agree that a sanity check would make sense just
in case.
/Jarkko
next prev parent reply other threads:[~2019-09-27 15:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-25 10:16 [PATCH v2 1/2] efi+tpm: Don't access event->count when it isn't mapped Jarkko Sakkinen
2019-09-25 10:16 ` [PATCH v2 2/2] efi+tpm: don't traverse an event log with no events Jarkko Sakkinen
2019-09-25 10:25 ` [PATCH v2 1/2] efi+tpm: Don't access event->count when it isn't mapped Ard Biesheuvel
2019-09-25 14:50 ` Jarkko Sakkinen
2019-09-25 15:16 ` Jerry Snitselaar
2019-09-25 16:41 ` Jerry Snitselaar
2019-09-27 15:29 ` Jarkko Sakkinen [this message]
2019-09-27 15:28 ` Jarkko Sakkinen
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=20190927152938.GB10545@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=ard.biesheuvel@linaro.org \
--cc=bsz@semihalf.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=mjg59@google.com \
--cc=pjones@redhat.com \
--cc=roberto.sassu@huawei.com \
--cc=stable@vger.kernel.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.