Skip to contentSkip to conversation

FAILED: patch "[PATCH] tpm: remove invalid min length check from tpm_do_selftest()" failed to apply to 4.8-stable tree

PATCH [email protected] 2 participants 3 messages Nov 8, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.8-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From befd99656c5eb765fe9d96045c4cba099fd938db Mon Sep 17 00:00:00 2001

From: Jarkko Sakkinen <[email protected]>
Date: Tue, 4 Oct 2016 09:49:47 +0300
Subject: [PATCH] tpm: remove invalid min length check from tpm_do_selftest()

Removal of this check was not properly amended to the original commit.

Fixes 0c541332231e ("tpm: use tpm_pcr_read_dev() in tpm_do_selftest()")
drivers/char/tpm/tpm-interface.c +0 -3
index 8de61876f633..3a9149cf0110 100644
@@ -813,9 +813,6 @@ int tpm_do_selftest(struct tpm_chip *chip)
 			continue;
 		}
 
-		if (rc < TPM_HEADER_SIZE)
-			return -EFAULT;
-
 		if (rc == TPM_ERR_DISABLED || rc == TPM_ERR_DEACTIVATED) {
 			dev_info(&chip->dev,
 				 "TPM is disabled/deactivated (0x%X)\n", rc);
#1 lore raw

Hi

This is needed only for 4.9.

BR
/Jarkko

Quoted 39 lines · On Tue, Nov 08, 2016 at 05:18:29PM +0100, [email protected] wrote:

The patch below does not apply to the 4.8-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From befd99656c5eb765fe9d96045c4cba099fd938db Mon Sep 17 00:00:00 2001
From: Jarkko Sakkinen <[email protected]>
Date: Tue, 4 Oct 2016 09:49:47 +0300
Subject: [PATCH] tpm: remove invalid min length check from tpm_do_selftest()

Removal of this check was not properly amended to the original commit.

Fixes 0c541332231e ("tpm: use tpm_pcr_read_dev() in tpm_do_selftest()")
drivers/char/tpm/tpm-interface.c +0 -3
index 8de61876f633..3a9149cf0110 100644
@@ -813,9 +813,6 @@ int tpm_do_selftest(struct tpm_chip *chip)
 			continue;
 		}
 
-		if (rc < TPM_HEADER_SIZE)
-			return -EFAULT;
-
 		if (rc == TPM_ERR_DISABLED || rc == TPM_ERR_DEACTIVATED) {
 			dev_info(&chip->dev,
 				 "TPM is disabled/deactivated (0x%X)\n", rc);
#2 lore raw

Adding [email protected] to this patch was human error from my side. Sorry about that.

/Jarkko

Quoted 47 lines · Jarkko Sakkinen

Hi

This is needed only for 4.9.

BR
/Jarkko

Quoted 39 lines · On Tue, Nov 08, 2016 at 05:18:29PM +0100, [email protected] wrote:

The patch below does not apply to the 4.8-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From befd99656c5eb765fe9d96045c4cba099fd938db Mon Sep 17 00:00:00 2001
From: Jarkko Sakkinen <[email protected]>
Date: Tue, 4 Oct 2016 09:49:47 +0300
Subject: [PATCH] tpm: remove invalid min length check from tpm_do_selftest()

Removal of this check was not properly amended to the original commit.

Fixes 0c541332231e ("tpm: use tpm_pcr_read_dev() in tpm_do_selftest()")
drivers/char/tpm/tpm-interface.c +0 -3
index 8de61876f633..3a9149cf0110 100644
@@ -813,9 +813,6 @@ int tpm_do_selftest(struct tpm_chip *chip)
 			continue;
 		}
 
-		if (rc < TPM_HEADER_SIZE)
-			return -EFAULT;
-
 		if (rc == TPM_ERR_DISABLED || rc == TPM_ERR_DEACTIVATED) {
 			dev_info(&chip->dev,
 				 "TPM is disabled/deactivated (0x%X)\n", rc);