From: Jarkko Sakkinen
This commit is based on a commit by Nayna Jain. Replaced dynamically
allocated bios_dir with a static array as the size is always constant.
Suggested-by: Jason Gunthorpe
Signed-off-by: Nayna Jain
Currently, read_log() has two implementations: one for ACPI platforms
and the other for device tree(OF) based platforms. The proper one is
selected at compile time using Kconfig and #ifdef in the Makefile,
which is not the recommended approach.
This patch removes the #ifdef in the Makefile by
Using the device of_node property is a better way to refer to the
device tree node rather than of_find_node_by_name().
Suggested-by: Jason Gunthorpe
Signed-off-by: Nayna Jain
Reviewed-by: Jarkko Sakkinen
open() method for event log ascii and binary bios measurements file
operations are very similar. This patch refactors the code into a
single open() call by passing seq_operations as i_node->private data.
Suggested-by: Jason Gunthorpe
Signed-off-by: Nayna Jain
From: Jarkko Sakkinen
Check for TPM2 chip in tpm_sysfs_add_device, tpm_bios_log_setup and
tpm_bios_log_teardown in order to make code flow cleaner and to enable
to implement TPM 2.0 support later on. This is partially derived from
the commit by Nayna Jain with
Currently, the event log file operations are not serialized with
tpm_chip_unregister(), which can possibly cause a race condition.
This patch fixes the race condition by:
- moving read_log() from fops to chip register.
- disallowing event log file operations when chip unregister is in
This patch set includes the cleanup and bug fixes patches, previously
part of the "tpm: add the securityfs pseudo files support for TPM 2.0
firmware event log" patch set, in order to upstream them more quickly.
Changelog History
v5:
- Moved cleanup/fixes patches into this patch set.
- Patch
On 10/14/2016 12:21 AM, Nayna wrote:
>
>
> On 10/01/2016 05:31 PM, Jarkko Sakkinen wrote:
>> On Wed, Sep 28, 2016 at 04:34:37AM -0400, Nayna Jain wrote:
>>> Currently, the securityfs pseudo files for obtaining the firmware
>>> event log are created whether the event log properties exist or not.