From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com ([192.55.52.88]:47691 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728415AbeIRCwh (ORCPT ); Mon, 17 Sep 2018 22:52:37 -0400 Date: Tue, 18 Sep 2018 00:23:14 +0300 From: Jarkko Sakkinen To: James Bottomley Cc: Martin Galvan , linux-integrity@vger.kernel.org Subject: Re: Question about the TPM driver Message-ID: <20180917212314.GF6716@linux.intel.com> References: <20180916191605.GB7473@linux.intel.com> <1537195532.4198.11.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 In-Reply-To: <1537195532.4198.11.camel@HansenPartnership.com> Sender: linux-integrity-owner@vger.kernel.org List-ID: On Mon, Sep 17, 2018 at 07:45:32AM -0700, James Bottomley wrote: > On Mon, 2018-09-17 at 10:32 -0300, Martin Galvan wrote: > > El dom., 16 sept. 2018 a las 16:16, Jarkko Sakkinen > > () escribio: > > > I understand your concerns but without a concrete workload there is > > > no > > > problem with this behavior. > > > > IMHO it's a bit excessive to allocate 4k to end up storing than 100 > > bytes. Beyond that, it's a pretty big gotcha for someone who's > > writing software which talks to the driver :) > > It's what we do in the kernel, which is one of our most memory > constrained environments. > > You have to remember that sub page size buffers aren't always managed > the best at any level (they usually fragment the heap) so even in a > constrained memory environment, a 4k buffer (4k aligned) is usually > preferable. > > James If the commit is not too interfering I still could consider merging it as even if only for simplifying implementing a TPM user space. /Jarkko