lkml.org 
[lkml]   [2018]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/8] tpm: factor out tpm1_get_random into tpm1-cmd.c
On Thu, Mar 15, 2018 at 11:24:23PM +0000, Winkler, Tomas wrote:
> >
> > On Sat, 2018-03-10 at 10:24 +0200, Tomas Winkler wrote:
> > > + rlength = be32_to_cpu(tpm_cmd.header.out.length);
> > > + if (rlength < offsetof(struct tpm_getrandom_out, rng_data) +
> > > + recd) {
> > > + total = -EFAULT;
> > > + break;
> > > + }
> > > + memcpy(dest, tpm_cmd.params.getrandom_out.rng_data,
> > recd);
> >
> > This rlength stuff can be handled with tpm_buf_length() as I do in my
> > pendig-for-review patch set:
> >
> > https://patchwork.kernel.org/patch/10259331/
>
> Right, as I wrote before not sure it's good to move and change the code more than necessary at the same time.
> I would leave the tpm_buf_ changes after this series.

Right, this is a valid point. I'll ack this as it is. Thanks for
pointing this out.

/Jarkko

\
 
 \ /
  Last update: 2018-03-16 15:03    [W:0.078 / U:1.968 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site