forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'tpm-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel…
…/git/jarkko/linux-tpmdd Pull tpm updates from Jarkko Sakkinen: "In additon to bug fixes, these are noteworthy changes: - In TPM I2C drivers, migrate from probe() to probe_new() (a new driver model in I2C). - TPM CRB: Pluton support - Add duplicate hash detection to the blacklist keyring in order to give more meaningful klog output than e.g. [1]" Link: https://askubuntu.com/questions/1436856/ubuntu-22-10-blacklist-problem-blacklisting-hash-13-message-on-boot [1] * tag 'tpm-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm: add vendor flag to command code validation tpm: Add reserved memory event log tpm: Use managed allocation for bios event log tpm: tis_i2c: Convert to i2c's .probe_new() tpm: tpm_i2c_nuvoton: Convert to i2c's .probe_new() tpm: tpm_i2c_infineon: Convert to i2c's .probe_new() tpm: tpm_i2c_atmel: Convert to i2c's .probe_new() tpm: st33zp24: Convert to i2c's .probe_new() KEYS: asymmetric: Fix ECDSA use via keyctl uapi certs: don't try to update blacklist keys KEYS: Add new function key_create() certs: make blacklisted hash available in klog tpm_crb: Add support for CRB devices based on Pluton crypto: certs: fix FIPS selftest dependency
- Loading branch information
Showing
19 changed files
with
293 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
* Thiebaud Weksteen <[email protected]> | ||
*/ | ||
|
||
#include <linux/device.h> | ||
#include <linux/efi.h> | ||
#include <linux/tpm_eventlog.h> | ||
|
||
|
@@ -55,7 +56,7 @@ int tpm_read_log_efi(struct tpm_chip *chip) | |
} | ||
|
||
/* malloc EventLog space */ | ||
log->bios_event_log = kmemdup(log_tbl->log, log_size, GFP_KERNEL); | ||
log->bios_event_log = devm_kmemdup(&chip->dev, log_tbl->log, log_size, GFP_KERNEL); | ||
if (!log->bios_event_log) { | ||
ret = -ENOMEM; | ||
goto out; | ||
|
@@ -76,7 +77,7 @@ int tpm_read_log_efi(struct tpm_chip *chip) | |
MEMREMAP_WB); | ||
if (!final_tbl) { | ||
pr_err("Could not map UEFI TPM final log\n"); | ||
kfree(log->bios_event_log); | ||
devm_kfree(&chip->dev, log->bios_event_log); | ||
ret = -ENOMEM; | ||
goto out; | ||
} | ||
|
@@ -91,11 +92,11 @@ int tpm_read_log_efi(struct tpm_chip *chip) | |
* Allocate memory for the 'combined log' where we will append the | ||
* 'final events log' to. | ||
*/ | ||
tmp = krealloc(log->bios_event_log, | ||
log_size + final_events_log_size, | ||
GFP_KERNEL); | ||
tmp = devm_krealloc(&chip->dev, log->bios_event_log, | ||
log_size + final_events_log_size, | ||
GFP_KERNEL); | ||
if (!tmp) { | ||
kfree(log->bios_event_log); | ||
devm_kfree(&chip->dev, log->bios_event_log); | ||
ret = -ENOMEM; | ||
goto out; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.