[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190208191710.GA30645@linux.intel.com>
Date: Fri, 8 Feb 2019 21:17:10 +0200
From: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To: Stefan Berger <stefanb@...ux.ibm.com>
Cc: linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org,
Peter Huewe <PeterHuewe@....de>,
Jason Gunthorpe <jgg@...pe.ca>,
Stefan Berger <stefanb@...ux.vnet.ibm.com>,
Alexander Steffen <Alexander.Steffen@...ineon.com>,
stable@...r.kernel.org
Subject: Re: [PATCH v4 1/2] tpm: Unify the send callback behaviourä
On Fri, Feb 08, 2019 at 09:00:57PM +0200, Jarkko Sakkinen wrote:
> It all looks now legit, but just in case I'll add a check for the return
> value to tpm_try_transmit() and a warning if it is not zero in the
> success case (and after that zeroing of rc).
Now the commits are applied both master and next, and these are
the checks for send():
rc = chip->ops->send(chip, buf, count);
if (rc < 0) {
if (rc != -EPIPE)
dev_err(&chip->dev,
"%s: send(): error %d\n", __func__, rc);
return rc;
}
/* A sanity check. send() should just return zero on success e.g.
* not the command length.
*/
if (rc > 0) {
dev_warn(&chip->dev,
"%s: send(): invalid value %d\n", __func__, rc);
rc = 0;
}
Should be fairly safe play now.
/Jarkko
Powered by blists - more mailing lists