]> git.baikalelectronics.ru Git - kernel.git/commit
efi: Register efi_secret platform device if EFI secret area is declared
authorDov Murik <dovmurik@linux.ibm.com>
Tue, 12 Apr 2022 21:21:26 +0000 (21:21 +0000)
committerArd Biesheuvel <ardb@kernel.org>
Wed, 13 Apr 2022 17:11:20 +0000 (19:11 +0200)
commitcae9f63cba807453fe9b2457e746ab5c1737d2e3
treeac5b80804d72393998b4fd017c23cffea7ed772a
parent37b0e813d3e596deba875d91b97260424ee6b1b9
efi: Register efi_secret platform device if EFI secret area is declared

During efi initialization, check if coco_secret is defined in the EFI
configuration table; in such case, register platform device
"efi_secret".  This allows udev to automatically load the efi_secret
module (platform driver), which in turn will populate the
<securityfs>/secrets/coco directory in guests into which secrets were
injected.

Note that a declared address of an EFI secret area doesn't mean that
secrets where indeed injected to that area; if the secret area is not
populated, the driver will not load (but the platform device will still
be registered).

Signed-off-by: Dov Murik <dovmurik@linux.ibm.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://lore.kernel.org/r/20220412212127.154182-4-dovmurik@linux.ibm.com
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/efi.c