tpmdd-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>,
	Stefan Berger <stefanb@linux.vnet.ibm.com>,
	linux-integrity@vger.kernel.org,
	David Howells <dhowells@redhat.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"open list:INTEGRITY MEASUREMENT ARCHITECTURE IMA"
	<linux-ima-user@lists.sourceforge.net>,
	Dmitry Kasatkin <dmitry.kasatkin@gmail.com>,
	open list <linux-kernel@vger.kernel.org>,
	linux-security-module@vger.kernel.org,
	"moderated list:TPM DEVICE DRIVER"
	<tpmdd-devel@lists.sourceforge.net>,
	"open list:KEYS-TRUSTED" <keyrings@vger.kernel.org>,
	"open list:HARDWARE RANDOM NUMBER GENERATOR CORE"
	<linux-crypto@vger.kernel.org>,
	James Morris <james.l.morris@oracle.com>,
	Matt Mackall <mpm@selenic.c>
Subject: Re: [tpmdd-devel] [PATCH] tpm: remove chip_num parameter from in-kernel API
Date: Tue, 24 Oct 2017 20:15:12 +0200	[thread overview]
Message-ID: <20171024181512.iaxtzgxexhki7aqr@linux.intel.com> (raw)
In-Reply-To: <CAKdAkRT9sLux6S1qdd=j0nbXSBdnYGG_hvjny=ic0YJLVNnxzA@mail.gmail.com>

On Tue, Oct 24, 2017 at 10:02:00AM -0700, Dmitry Torokhov wrote:
> On Tue, Oct 24, 2017 at 9:11 AM, Jason Gunthorpe
> <jgunthorpe@obsidianresearch.com> wrote:
> > On Tue, Oct 24, 2017 at 09:37:33PM +0530, PrasannaKumar Muralidharan wrote:
> >> Hi Jason,
> >>
> >> On 24 October 2017 at 21:25, Jason Gunthorpe
> >> <jgunthorpe@obsidianresearch.com> wrote:
> >> > On Tue, Oct 24, 2017 at 09:21:15PM +0530, PrasannaKumar Muralidharan wrote:
> >> >
> >> >> Please check the RFC [1]. It does use chip id. The rfc has issues and
> >> >> has to be fixed but still there could be users of the API.
> >> >>
> >> >> 1. https://www.spinics.net/lists/linux-crypto/msg28282.html
> >> >
> >> > That patch isn't safe at all. You need to store a kref to th chip in
> >> > the hwrng, not parse a string.
> >>
> >> The drivers/char/hw_random/tpm-rng.c module does not store the chip
> >> reference so I guess the usage is safe.
> >
> > It is using the default TPM, it is always safe to use the default tpm.
> 
> tpm-rng is abomination that should be kicked out as soon as possible.
> It wrecks havoc with the power management (TPM chip drivers may go
> into suspend state, but tpm_rng does not do any power management and
> happily forwards requests to suspended hardware) and may be available
> when there is no TPM at all yet (the drivers have not been probed yet,
> or have gotten a deferral, etc).
> 
> TPM core should register HWRNGs when chips are ready.
> 
> Thanks.
> 
> -- 
> Dmitry

I'm fine to review a two patch set where:

1. Patch 1 removes the existing TPM rng driver
2. Patch 2 makes the TPM driver as rng producer

Unrelate to patch that I'm proposing now but this sounds sensible.

/Jarkko

  parent reply	other threads:[~2017-10-24 18:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-23 12:38 [PATCH] tpm: remove chip_num parameter from in-kernel API Jarkko Sakkinen
2017-10-23 14:07 ` [tpmdd-devel] " Stefan Berger
2017-10-23 16:31   ` Jason Gunthorpe
2017-10-24 15:44     ` Jarkko Sakkinen
     [not found]       ` <20171024154440.3jeupmus43jcgbbz-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-10-24 15:51         ` PrasannaKumar Muralidharan
2017-10-24 15:55           ` [tpmdd-devel] " Jason Gunthorpe
2017-10-24 16:07             ` PrasannaKumar Muralidharan
2017-10-24 16:11               ` Jason Gunthorpe
2017-10-24 16:14                 ` PrasannaKumar Muralidharan
2017-10-24 17:46                   ` Jason Gunthorpe
2017-10-24 17:56                     ` PrasannaKumar Muralidharan
2017-10-24 17:02                 ` Dmitry Torokhov
2017-10-24 17:37                   ` Jason Gunthorpe
2017-10-24 17:44                     ` PrasannaKumar Muralidharan
     [not found]                     ` <20171024173757.GA1806-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-10-24 18:04                       ` Dmitry Torokhov
2017-10-24 18:15                   ` Jarkko Sakkinen [this message]
     [not found]                     ` <20171024181512.iaxtzgxexhki7aqr-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-10-24 18:40                       ` Peter Huewe
2017-10-24 16:23           ` [tpmdd-devel] " Jarkko Sakkinen
2017-10-24 16:35             ` PrasannaKumar Muralidharan
     [not found]               ` <CANc+2y4vtr+kbhC_7Rv=rHA2LgEVBHLFEu+DYYK1UmpU63PCgQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-24 18:22                 ` Jarkko Sakkinen
     [not found]                   ` <20171024182235.d7b3oajc5zcjs57v-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-10-25 14:51                     ` PrasannaKumar Muralidharan
2017-10-25 19:11                       ` [tpmdd-devel] " Jarkko Sakkinen
2017-10-26 16:23                         ` PrasannaKumar Muralidharan
2017-10-24 14:04   ` 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=20171024181512.iaxtzgxexhki7aqr@linux.intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=dhowells@redhat.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=james.l.morris@oracle.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-ima-user@lists.sourceforge.net \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mpm@selenic.c \
    --cc=prasannatsmkumar@gmail.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 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).