All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	tpmdd-devel@lists.sourceforge.net, nayna@linux.vnet.ibm.com,
	linux-security-module@vger.kernel.org
Subject: Re: [PATCH] tpm: vtpm_proxy: Do not access host's event log
Date: Thu, 17 Nov 2016 15:43:20 -0800	[thread overview]
Message-ID: <20161117234320.bla4cvabblnfxgth@intel.com> (raw)
In-Reply-To: <513da75c-6221-39ce-2718-19290c216ff1@linux.vnet.ibm.com>

On Thu, Nov 17, 2016 at 06:15:20PM -0500, Stefan Berger wrote:
> On 11/17/2016 01:33 PM, Jason Gunthorpe wrote:
> > On Thu, Nov 17, 2016 at 01:25:54PM -0500, Stefan Berger wrote:
> > > In the case of x86, tpm_read_log_of() is a stub return -ENODEV, which in
> > > turn fails the whole device:
> > Somehow this got screwed up during the lengthy review. ENODEV is the
> > right return from the leaf routines but the tests in tpm_eventlog di
> > not get fixed:
> > 
> > > http://git.infradead.org/users/jjs/linux-tpmdd.git/blob/4d388433e85f8257f5a9344a7acf6f499ba2b29e:/drivers/char/tpm/tpm_eventlog.h#l87
> > Is wrong, should be:
> > 
> > if (rc != -ENODEV)
> >     return rc;
> > 
> > And the one in tpm_bios_log_setup should be
> > 
> > if (rc != 0 && rc != -ENODEV)
> >      return rc;
> 
> 
> Can you show a patch that shows where to place these two?

The disasterous error handling for cases that you mentioned:

http://git.infradead.org/users/jjs/linux-tpmdd.git/commitdiff/d660a91a1b9dd80f5c2c973e3369400d3c9f9848

I'm sorry I let these slip in the code review.

/Jarkko

  reply	other threads:[~2016-11-17 23:43 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
     [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 [this message]
     [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=20161117234320.bla4cvabblnfxgth@intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-security-module@vger.kernel.org \
    --cc=nayna@linux.vnet.ibm.com \
    --cc=stefanb@linux.vnet.ibm.com \
    --cc=tpmdd-devel@lists.sourceforge.net \
    /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.