Hallo,
Ich bin MacKenzie Scott, Ex-Frau des CEO und Gründers von Amazon. Ich spende 4 Milliarden US-Dollar von Scotts Stiftung an Wohltätigkeitsorganisationen, Einzelpersonen und Hochschulen auf der ganzen Welt, um Menschen, die wirtschaftlich unter der COVID-19-Pandemie leiden, und Ihnen sofortige Unterstützung zu leisten Sind Sie einer der glücklichen Gewinner, ich habe einen Spendenzuschuss im Wert von 100.800.000,00 Dollar für Sie, Sie können mich für weitere Informationen kontaktieren, wenn Sie interessiert sind.
Grüße,
MacKenzie Scott.
In commit 0aa698787aa2 ("tpm: Add Upgrade/Reduced mode support for
TPM2 modules") it was said that:
"If the TPM is in Failure mode, it will successfully respond to both
tpm2_do_selftest() and tpm2_startup() calls. Although, will fail to
answer to tpm2_get_cc_attrs_tbl(). Use this fact to conclude that TPM
is in Failure mode."
But a check was never added in the commit when calling
tpm2_get_cc_attrs_tbl() to conclude that the TPM is in Failure mode.
This commit corrects this by adding a check.
Fixes: 0aa698787aa2 ("tpm: Add Upgrade/Reduced mode support for TPM2 modules")
Cc: stable(a)vger.kernel.org # v5.17+
Signed-off-by: Mårten Lindahl <marten.lindahl(a)axis.com>
Reviewed-by: Jarkko Sakkinen <jarkko(a)kernel.org>
---
v3:
- Add Jarkkos Reviewed-by tag.
- Add Fixes tag and Cc.
v2:
- Add missed check for TPM error code.
drivers/char/tpm/tpm2-cmd.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
index c1eb5d223839..65d03867e114 100644
--- a/drivers/char/tpm/tpm2-cmd.c
+++ b/drivers/char/tpm/tpm2-cmd.c
@@ -752,6 +752,12 @@ int tpm2_auto_startup(struct tpm_chip *chip)
}
rc = tpm2_get_cc_attrs_tbl(chip);
+ if (rc == TPM2_RC_FAILURE || (rc < 0 && rc != -ENOMEM)) {
+ dev_info(&chip->dev,
+ "TPM in field failure mode, requires firmware upgrade\n");
+ chip->flags |= TPM_CHIP_FLAG_FIRMWARE_UPGRADE;
+ rc = 0;
+ }
out:
/*
--
2.30.2
This patchset backports basically upstream commit 9287aed2
(selinux: Convert isec->lock into a spinlock). This
"fixes a deadlock between selinux and GFS2 when GFS2 invalidates a security label",
see the original discussion at
https://lore.kernel.org/all/1478812710-17190-2-git-send-email-agruenba@redh…
It also contains the follow-up fixes to make this correct.
The first 3 commits (by Andreas) are valuable on their own too as
they fix a documentation bug, avoid partially initialized structs
and (slightly) improve performance while making the code cleaner.
Andreas Gruenbacher (4):
selinux: Minor cleanups
proc: Pass file mode to proc_pid_make_inode
selinux: Clean up initialization of isec->sclass
selinux: Convert isec->lock into a spinlock
Paul Moore (1):
selinux: fix inode_doinit_with_dentry() LABEL_INVALID error handling
Tianyue Ren (1):
selinux: fix error initialization in inode_doinit_with_dentry()
fs/proc/base.c | 23 +++---
fs/proc/fd.c | 6 +-
fs/proc/internal.h | 2 +-
fs/proc/namespaces.c | 3 +-
security/selinux/hooks.c | 123 +++++++++++++++++++-----------
security/selinux/include/objsec.h | 5 +-
security/selinux/selinuxfs.c | 4 +-
7 files changed, 96 insertions(+), 70 deletions(-)
--
2.25.1