* [PATCH] TPM: fix pcrread
@ 2009-09-30 15:26 Rajiv Andrade
2009-09-30 20:27 ` Mimi Zohar
0 siblings, 1 reply; 3+ messages in thread
From: Rajiv Andrade @ 2009-09-30 15:26 UTC (permalink / raw
To: linux-kernel; +Cc: Jason Gunthorpe, debora, m.selhorst, akpm, tpmdd-devel
The previously sent patch:
http://marc.info/?l=tpmdd-devel&m=125208945007834&w=2
Had its first hunk cropped when merged, submitting only this first hunk
again.
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Debora Velarde <debora@linux.vnet.ibm.com>
Cc: Marcel Selhorst <m.selhorst@sirrix.com>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
---
drivers/char/tpm/tpm.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
index 45d5800..47c2d27 100644
--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
@@ -696,8 +696,7 @@ int __tpm_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf)
cmd.header.in = pcrread_header;
cmd.params.pcrread_in.pcr_idx = cpu_to_be32(pcr_idx);
- BUG_ON(cmd.header.in.length > READ_PCR_RESULT_SIZE);
- rc = transmit_cmd(chip, &cmd, cmd.header.in.length,
+ rc = transmit_cmd(chip, &cmd, READ_PCR_RESULT_SIZE,
"attempting to read a pcr value");
if (rc == 0)
--
1.6.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] TPM: fix pcrread
2009-09-30 15:26 [PATCH] TPM: fix pcrread Rajiv Andrade
@ 2009-09-30 20:27 ` Mimi Zohar
2009-09-30 22:32 ` James Morris
0 siblings, 1 reply; 3+ messages in thread
From: Mimi Zohar @ 2009-09-30 20:27 UTC (permalink / raw
To: Rajiv Andrade
Cc: linux-kernel, James Morris, linux-security-module, Jan Beulich
On Wed, 2009-09-30 at 12:26 -0300, Rajiv Andrade wrote:
> The previously sent patch:
>
> http://marc.info/?l=tpmdd-devel&m=125208945007834&w=2
>
> Had its first hunk cropped when merged, submitting only this first hunk
> again.
>
> Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> Cc: Debora Velarde <debora@linux.vnet.ibm.com>
> Cc: Marcel Selhorst <m.selhorst@sirrix.com>
> Cc: James Morris <jmorris@namei.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
> ---
> drivers/char/tpm/tpm.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
> index 45d5800..47c2d27 100644
> --- a/drivers/char/tpm/tpm.c
> +++ b/drivers/char/tpm/tpm.c
> @@ -696,8 +696,7 @@ int __tpm_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf)
>
> cmd.header.in = pcrread_header;
> cmd.params.pcrread_in.pcr_idx = cpu_to_be32(pcr_idx);
> - BUG_ON(cmd.header.in.length > READ_PCR_RESULT_SIZE);
> - rc = transmit_cmd(chip, &cmd, cmd.header.in.length,
> + rc = transmit_cmd(chip, &cmd, READ_PCR_RESULT_SIZE,
> "attempting to read a pcr value");
>
> if (rc == 0)
Compiled and tested patch.
Acked-by: Mimi Zohar <zohar@us.ibm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] TPM: fix pcrread
2009-09-30 20:27 ` Mimi Zohar
@ 2009-09-30 22:32 ` James Morris
0 siblings, 0 replies; 3+ messages in thread
From: James Morris @ 2009-09-30 22:32 UTC (permalink / raw
To: Mimi Zohar
Cc: Rajiv Andrade, linux-kernel, linux-security-module, Jan Beulich
On Wed, 30 Sep 2009, Mimi Zohar wrote:
> On Wed, 2009-09-30 at 12:26 -0300, Rajiv Andrade wrote:
> > + rc = transmit_cmd(chip, &cmd, READ_PCR_RESULT_SIZE,
> > "attempting to read a pcr value");
> >
> > if (rc == 0)
>
> Compiled and tested patch.
>
> Acked-by: Mimi Zohar <zohar@us.ibm.com>
Thanks.
Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next
--
James Morris <jmorris@namei.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-30 22:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-30 15:26 [PATCH] TPM: fix pcrread Rajiv Andrade
2009-09-30 20:27 ` Mimi Zohar
2009-09-30 22:32 ` James Morris
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 read-only IMAP folder(s) and NNTP newsgroup(s).