From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966396AbdACVdl (ORCPT ); Tue, 3 Jan 2017 16:33:41 -0500 Received: from quartz.orcorp.ca ([184.70.90.242]:51619 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758810AbdACVdg (ORCPT ); Tue, 3 Jan 2017 16:33:36 -0500 Date: Tue, 3 Jan 2017 14:32:34 -0700 From: Jason Gunthorpe To: James Bottomley Cc: Jarkko Sakkinen , tpmdd-devel@lists.sourceforge.net, linux-security-module@vger.kernel.org, open list Subject: Re: [tpmdd-devel] [PATCH RFC 0/4] RFC: in-kernel resource manager Message-ID: <20170103213234.GB29656@obsidianresearch.com> References: <20170102132213.22880-1-jarkko.sakkinen@linux.intel.com> <1483374980.2458.13.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1483374980.2458.13.camel@HansenPartnership.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.156 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 02, 2017 at 08:36:20AM -0800, James Bottomley wrote: > On Mon, 2017-01-02 at 15:22 +0200, Jarkko Sakkinen wrote: > > This patch set adds support for TPM spaces that provide a context > > for isolating and swapping transient objects. This patch set does > > not yet include support for isolating policy and HMAC sessions but > > it is trivial to add once the basic approach is settled (and that's > > why I created an RFC patch set). > > The approach looks fine to me. The only basic query I have is about > the default: shouldn't it be with resource manager on rather than off? > I can't really think of a use case that wants the RM off (even if > you're running your own, having another doesn't hurt anything, and it's > still required to share with in-kernel uses). I haven't looked too closely at TPM 2.0 stuff, but at least for 1.2 we should have a kernel white-list of allowed commands within a RM context, so having the RM on by default would break all of the user space. I really think the only way forward here is a new char dev that is safe for unprivileged/concurrent use and migrate the user space stack to use it instead. > And with that, I've TPM 2 enabled both gnome-keyring and openssl: > > https://build.opensuse.org/package/show/home:jejb1:Tumbleweed/gnome-keyring > https://build.opensuse.org/package/show/home:jejb1:Tumbleweed/openssl_tpm_engine > I'm running them in production on my day to day laptop and so far > everything's working nicely (better than 1.2, in fact, since tcsd > periodically crashes necessitating a restart of everything). You granted your unprivileged user access to /dev/tpm0 then? FYI I think that is a dangerous idea.. Jason