Message ID | 20180310161637.7723-1-jarkko.sakkinen@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sat, Mar 10, 2018 at 06:16:37PM +0200, Jarkko Sakkinen wrote: > TCPA log are can be empty when the TPM is disabled. This commit changes the > behavior of tpm_read_log_acpi() to return successfully in this case. > > Cc: stable@vger.kernel.org > Fixes: 55a82ab3181b ("[PATCH] tpm: add bios measurement log") > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Already applied to my master (bleeding edge) branch in order to facilitate testing: git://git.infradead.org/users/jjs/linux-tpmdd.git /Jarkko -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sat, Mar 10, 2018 at 06:16:37PM +0200, Jarkko Sakkinen wrote: > TCPA log are can be empty when the TPM is disabled. This commit changes the > behavior of tpm_read_log_acpi() to return successfully in this case. The commit should explain why we'd want this.. eg Why does it matter to create the extra sysfs files to report an empty log? Jason -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Mar 12, 2018 at 09:02:32AM -0600, Jason Gunthorpe wrote: > On Sat, Mar 10, 2018 at 06:16:37PM +0200, Jarkko Sakkinen wrote: > > TCPA log are can be empty when the TPM is disabled. This commit changes the > > behavior of tpm_read_log_acpi() to return successfully in this case. > > The commit should explain why we'd want this.. > > eg Why does it matter to create the extra sysfs files to report an empty > log? > > Jason The initialization of the driver will fail otherwise. Not sure if I understand your question. /Jarkko -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Mar 16, 2018 at 02:55:25PM +0200, Jarkko Sakkinen wrote: > On Mon, Mar 12, 2018 at 09:02:32AM -0600, Jason Gunthorpe wrote: > > On Sat, Mar 10, 2018 at 06:16:37PM +0200, Jarkko Sakkinen wrote: > > > TCPA log are can be empty when the TPM is disabled. This commit changes the > > > behavior of tpm_read_log_acpi() to return successfully in this case. > > > > The commit should explain why we'd want this.. > > > > eg Why does it matter to create the extra sysfs files to report an empty > > log? > > > > Jason > > The initialization of the driver will fail otherwise. Not sure if I > understand your question. Well, I mean in the sense of what is broken and why is this the right fix. Why not return -ENODEV? Jason -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sun, Mar 18, 2018 at 08:13:23PM -0600, Jason Gunthorpe wrote: > On Fri, Mar 16, 2018 at 02:55:25PM +0200, Jarkko Sakkinen wrote: > > On Mon, Mar 12, 2018 at 09:02:32AM -0600, Jason Gunthorpe wrote: > > > On Sat, Mar 10, 2018 at 06:16:37PM +0200, Jarkko Sakkinen wrote: > > > > TCPA log are can be empty when the TPM is disabled. This commit changes the > > > > behavior of tpm_read_log_acpi() to return successfully in this case. > > > > > > The commit should explain why we'd want this.. > > > > > > eg Why does it matter to create the extra sysfs files to report an empty > > > log? > > > > > > Jason > > > > The initialization of the driver will fail otherwise. Not sure if I > > understand your question. > > Well, I mean in the sense of what is broken and why is this the right > fix. Why not return -ENODEV? Well, because then the device initialization would fail. Just noticed that this is missing: Reported-by: Sahil Rihan <srihan@fb.com> Sahil, would you care to try if this fixes the issue that you are having or not? /Jarkko -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
PiBPbiAzLzE5LzE4LCAyOjI1IFBNLCAiSmFya2tvIFNha2tpbmVuIiA8amFya2tvLnNha2tpbmVu QGxpbnV4LmludGVsLmNvbT4gd3JvdGU6DQo+ICAgICANCj4gICAgU2FoaWwsIHdvdWxkIHlvdSBj YXJlIHRvIHRyeSBpZiB0aGlzIGZpeGVzIHRoZSBpc3N1ZSB0aGF0IHlvdSBhcmUNCj4gICAgaGF2 aW5nIG9yIG5vdD8NCg0KWWVzLCB3ZSBjYW4gdGVzdCB0aGlzIG91dC4gTWlnaHQgdGFrZSBhIGRh eSBvciB0d28uDQoNClNhaGlsDQoNCiANCg0K -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 2018-03-20 at 22:29 +0000, Sahil Rihan wrote: > > On 3/19/18, 2:25 PM, "Jarkko Sakkinen" <jarkko.sakkinen@linux.intel.com> > > wrote: > > > > Sahil, would you care to try if this fixes the issue that you are > > having or not? > > Yes, we can test this out. Might take a day or two. Awesome, thank you. I'll add Reported-by: Sahil Rihan <srihan@fb.com> if that is OK for you? /Jarkko -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> On 3/22/18, 7:20 AM, "Jarkko Sakkinen" <jarkko.sakkinen@linux.intel.com> wrote: > > On Tue, 2018-03-20 at 22:29 +0000, Sahil Rihan wrote: > > > On 3/19/18, 2:25 PM, "Jarkko Sakkinen" <jarkko.sakkinen@linux.intel.com> > > > wrote: > > > > > > Sahil, would you care to try if this fixes the issue that you are > > > having or not? > > > > Yes, we can test this out. Might take a day or two. > > Awesome, thank you. I'll add > > Reported-by: Sahil Rihan <srihan@fb.com> > > if that is OK for you? Jarkko, We applied your patch to a 4.11 kernel (unfortunately not the latest upstream) and were able to confirm that the char device is now being created correctly. The sysfs enabled node is also present. And yes, please add the "Reported-by" line. Thanks, Sahil
On Tue, Mar 27, 2018 at 12:07:14AM +0000, Sahil Rihan wrote: > > On 3/22/18, 7:20 AM, "Jarkko Sakkinen" <jarkko.sakkinen@linux.intel.com> wrote: > > > > On Tue, 2018-03-20 at 22:29 +0000, Sahil Rihan wrote: > > > > On 3/19/18, 2:25 PM, "Jarkko Sakkinen" <jarkko.sakkinen@linux.intel.com> > > > > wrote: > > > > > > > > Sahil, would you care to try if this fixes the issue that you are > > > > having or not? > > > > > > Yes, we can test this out. Might take a day or two. > > > > Awesome, thank you. I'll add > > > > Reported-by: Sahil Rihan <srihan@fb.com> > > > > if that is OK for you? > > Jarkko, > > We applied your patch to a 4.11 kernel (unfortunately not the latest upstream) and were able to confirm that the char device is now being created correctly. The sysfs enabled node is also present. > > And yes, please add the "Reported-by" line. > > Thanks, > Sahil And also Tested-by: Sahil Rihan <srihan@fb.com> ? /Jarkko -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> And also > > Tested-by: Sahil Rihan <srihan@fb.com> Sure!
diff --git a/drivers/char/tpm/tpm_eventlog_acpi.c b/drivers/char/tpm/tpm_eventlog_acpi.c index 66f19e93c216..f5f66dcd6f30 100644 --- a/drivers/char/tpm/tpm_eventlog_acpi.c +++ b/drivers/char/tpm/tpm_eventlog_acpi.c @@ -84,8 +84,8 @@ int tpm_read_log_acpi(struct tpm_chip *chip) break; } if (!len) { - dev_warn(&chip->dev, "%s: TCPA log area empty\n", __func__); - return -EIO; + dev_info(&chip->dev, "TCPA log area is empty\n"); + return 0; } /* malloc EventLog space */
TCPA log are can be empty when the TPM is disabled. This commit changes the behavior of tpm_read_log_acpi() to return successfully in this case. Cc: stable@vger.kernel.org Fixes: 55a82ab3181b ("[PATCH] tpm: add bios measurement log") Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> --- drivers/char/tpm/tpm_eventlog_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)