All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Stefan Berger
	<stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Cc: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] tpm: vtpm_proxy: Do not access host's event log
Date: Wed, 16 Nov 2016 13:07:59 -0700	[thread overview]
Message-ID: <20161116200759.GA19593@obsidianresearch.com> (raw)
In-Reply-To: <65f392b6-5141-c726-dacb-a1649ea215de-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>

On Wed, Nov 16, 2016 at 12:07:23PM -0500, Stefan Berger wrote:
> The culprit seems to be 'tpm: fix the missing .owner in
> tpm_bios_measurements_ops'

That is unlikely, it is probably the patch before which calls read_log
unconditionally now. That suggests the crashing is a little random..

tpm_read_log_acpi should check if the chip has a acpi_dev_handle
before running, but it also shouldn't crash - so there are two bugs
here I guess.. Please do that instead of the checking the virual flag.

Jarkko, you know acpi better, we switched ppi to search starting from
the acpi_dev_handle for its data - can we do the same for event log?

> The crash looks like this:

> [  173.608722]  [<ffffffff8140ca11>] dump_stack+0x63/0x82
> [  173.608722]  [<ffffffff8106b99f>] iounmap.part.1+0x7f/0x90
> [  173.608722]  [<ffffffff8106b9dc>] iounmap+0x2c/0x30
> [  173.608722]  [<ffffffff81496c75>] acpi_os_map_cleanup.part.10+0x31/0x3e
> [  173.608722]  [<ffffffff8179629c>] acpi_os_unmap_iomem+0xcb/0xd2
> [  173.608722]  [<ffffffffa00e1b28>] read_log+0xc8/0x19e [tpm]

This seems really strange ACPI should not crash like this - yes it
will wrongly read the log for the system into the vtpm, but that
*should* work.

Are you doing anything special with this test like high parallism or
something?  Any chance you can look at little more? The tpm code looks
OK to me, the map and unmap are properly paired - but the bad address
from the iounmap suggests the refcounting in acpi is not working or
something along those lines?

Jason

------------------------------------------------------------------------------

  parent reply	other threads:[~2016-11-16 20:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16 14:24 [PATCH] tpm: vtpm_proxy: Do not access host's event log Stefan Berger
     [not found] ` <1479306245-14456-1-git-send-email-stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-11-16 15:37   ` Jarkko Sakkinen
     [not found]     ` <20161116153731.pmmnxiai7ouuj6qf-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-11-16 15:41       ` Stefan Berger
     [not found]         ` <3a38ddc6-1758-ae82-3df3-9cc55906880d-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-11-16 17:07           ` Stefan Berger
     [not found]             ` <65f392b6-5141-c726-dacb-a1649ea215de-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-11-16 20:07               ` Jason Gunthorpe [this message]
     [not found]                 ` <20161116200759.GA19593-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-11-17 12:35                   ` Stefan Berger
     [not found]                     ` <ef1f954d-fc52-0522-01f7-b0e31ea14c59-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-11-17 18:10                       ` Jason Gunthorpe
     [not found]                         ` <20161117181006.GA26039-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-11-17 18:25                           ` Stefan Berger
     [not found]                             ` <c6e84bc7-151c-e698-e269-0ef1ebf3897b-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-11-17 18:33                               ` Jason Gunthorpe
     [not found]                                 ` <20161117183328.GC26039-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-11-17 23:15                                   ` Stefan Berger
2016-11-17 23:43                                     ` Jarkko Sakkinen
     [not found]                                     ` <513da75c-6221-39ce-2718-19290c216ff1-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-11-19 18:32                                       ` Jason Gunthorpe
     [not found]                                         ` <20161119183255.GB22775-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-11-20 14:46                                           ` Stefan Berger
2016-11-22  6:07                                           ` Jarkko Sakkinen
     [not found]                                             ` <20161122060742.mtknarperpxdtqxv-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-11-22  6:09                                               ` Jarkko Sakkinen
2016-11-18 12:23                                   ` Nayna
2016-11-17 20:37                     ` Jarkko Sakkinen
2016-11-18 14:11                       ` Stefan Berger
     [not found]                         ` <abef96f0-97e3-22e6-c63b-4be5622b4fc2-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-11-18 14:15                           ` Stefan Berger
     [not found]                             ` <77bf7806-5007-feb4-e4a0-fc94775a5271-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-11-18 16:58                               ` Stefan Berger
2016-11-21 18:32                                 ` Jason Gunthorpe
2016-11-17 20:34                   ` 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=20161116200759.GA19593@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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.