From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752091AbdA0WGz (ORCPT ); Fri, 27 Jan 2017 17:06:55 -0500 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:38748 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751728AbdA0WGr (ORCPT ); Fri, 27 Jan 2017 17:06:47 -0500 Message-ID: <1485554355.3229.15.camel@HansenPartnership.com> Subject: Re: [tpmdd-devel] [RFC] tpm2-space: add handling for global session exhaustion From: James Bottomley To: Ken Goldman , tpmdd-devel@lists.sourceforge.net Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 27 Jan 2017 13:59:15 -0800 In-Reply-To: References: <1484772489.2396.2.camel@HansenPartnership.com> <20170119122533.d7h5rgatpwl3qmcl@intel.com> <20170119124101.nw7a7m735zhiivfo@intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2017-01-27 at 16:20 -0500, Ken Goldman wrote: > On 1/19/2017 7:41 AM, Jarkko Sakkinen wrote: > > > > I actually think that the very best solution would be such that > > sessions would be *always* lease based. So when you create a > > session you would always loose within a time limit. > > > > There would not be any special victim selection mechanism. You > > would just loose your session within a time limit. > > I worry about the time limit. > > I have a proposed use case (policy signed) where the user sends the > session nonce along with a "payment" to a vendor and receives back a > signature authorization over the nonce. > > The time could be minutes or even hours. So the problem is that sessions are a limited resource and we need a way to allocate them when under resource pressure. Leasing is the fairest way I can think of but I'm open to other mechanisms if you propose them. Note that the lease mechanism doesn't mean every session expires after the limit, it just means that every session becomes eligible for reclaim after the limit. If there's no-one else waiting, you can keep your session for hours. James