aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorYeoreum Yun <[email protected]>2025-07-19 10:27:46 +0000
committerJarkko Sakkinen <[email protected]>2025-07-22 23:23:18 +0000
commit746d9e9f62a6e8ba0eba2b83fc61cfe7fa8797ce (patch)
treedfa6569c704eef0d522400318c8ac798813759f9 /net/unix/af_unix.c
parentfirmware: arm_ffa: Change initcall level of ffa_init() to rootfs_initcall (diff)
downloadkernel-746d9e9f62a6e8ba0eba2b83fc61cfe7fa8797ce.tar.gz
kernel-746d9e9f62a6e8ba0eba2b83fc61cfe7fa8797ce.zip
tpm: tpm_crb_ffa: try to probe tpm_crb_ffa when it's built-in
To generate the boot_aggregate log in the IMA subsystem using TPM PCR values, the TPM driver must be built as built-in and must be probed before the IMA subsystem is initialized. However, when the TPM device operates over the FF-A protocol using the CRB interface, probing fails and returns -EPROBE_DEFER if the tpm_crb_ffa device — an FF-A device that provides the communication interface to the tpm_crb driver — has not yet been probed. This issue occurs because both crb_acpi_driver_init() and tpm_crb_ffa_driver_init() are registered with device_initcall. As a result, crb_acpi_driver_init() may be invoked before tpm_crb_ffa_driver_init(), which is responsible for probing the tpm_crb_ffa device. When this happens, IMA fails to detect the TPM device and logs the following message: | ima: No TPM chip found, activating TPM-bypass! Consequently, it cannot generate the boot_aggregate log with the PCR values provided by the TPM. To resolve this issue, the tpm_crb_ffa_init() function explicitly attempts to probe the tpm_crb_ffa by register tpm_crb_ffa driver so that when tpm_crb_ffa device is created before tpm_crb_ffa_init(), probe the tpm_crb_ffa device in tpm_crb_ffa_init() to finish probe the TPM device completely. This ensures that the TPM device using CRB over FF-A can be successfully probed, even if crb_acpi_driver_init() is called first. [ jarkko: reformatted some of the paragraphs because they were going past the 75 character boundary. ] Signed-off-by: Yeoreum Yun <[email protected]> Reviewed-by: Mimi Zohar <[email protected]> Reviewed-by: Sudeep Holla <[email protected]> Reviewed-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Jarkko Sakkinen <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions