From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Stefan Berger <stefanb@linux.ibm.com>
Cc: linux-integrity@vger.kernel.org,
James Bottomley <James.Bottomley@HansenPartnership.com>,
Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jerry Snitselaar <jsnitsel@redhat.com>,
Sumit Garg <sumit.garg@linaro.org>,
Alexey Klimov <aklimov@redhat.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tpm: tpm2-space: Resize session and context buffers dynamically
Date: Fri, 26 Jun 2020 00:24:53 +0300 [thread overview]
Message-ID: <20200625212453.GB20341@linux.intel.com> (raw)
In-Reply-To: <2f8a0127-d2ba-21aa-75b3-2dfccfb52eab@linux.ibm.com>
On Thu, Jun 25, 2020 at 08:13:09AM -0400, Stefan Berger wrote:
> On 6/25/20 12:24 AM, Jarkko Sakkinen wrote:
> > Re-allocate context and session buffers when needed. Scale them in page
> > increments so that the reallocation is only seldomly required, and thus
> > causes minimal stress to the system. Add a static maximum limit of four
> > pages for buffer sizes.
> >
> > Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
> > Suggested-by: Stefan Berger <stefanb@linux.ibm.com>
> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > ---
> > Tested only for compilation.
> > drivers/char/tpm/tpm2-space.c | 80 ++++++++++++++++++++++++-----------
> > include/linux/tpm.h | 6 ++-
> > 2 files changed, 59 insertions(+), 27 deletions(-)
> >
> > diff --git a/drivers/char/tpm/tpm2-space.c b/drivers/char/tpm/tpm2-space.c
> > index 982d341d8837..acb9e82bf9e8 100644
> > --- a/drivers/char/tpm/tpm2-space.c
> > +++ b/drivers/char/tpm/tpm2-space.c
> > @@ -15,6 +15,8 @@
> > #include <asm/unaligned.h>
> > #include "tpm.h"
> > +#define TPM2_SPACE_MAX_BUFFER_SIZE (4 * PAGE_SIZE)
>
> PAGE_SIZE is 64k on ppc64. Rather use 4 * 4096?
Better to then just put it as 16384.
/Jarkko
prev parent reply other threads:[~2020-06-25 21:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-25 4:24 [PATCH] tpm: tpm2-space: Resize session and context buffers dynamically Jarkko Sakkinen
2020-06-25 4:33 ` Jarkko Sakkinen
2020-06-25 12:13 ` Stefan Berger
2020-06-25 21:24 ` Jarkko Sakkinen [this message]
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=20200625212453.GB20341@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=aklimov@redhat.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=jgg@ziepe.ca \
--cc=jsnitsel@redhat.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=stefanb@linux.ibm.com \
--cc=sumit.garg@linaro.org \
/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).