]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
UBUNTU: SAUCE: Revert "efi: random: refresh non-volatile random seed when RNG is...
authorAndrea Righi <andrea.righi@canonical.com>
Wed, 15 Mar 2023 22:22:59 +0000 (23:22 +0100)
committerAndrea Righi <andrea.righi@canonical.com>
Wed, 15 Mar 2023 22:38:35 +0000 (23:38 +0100)
BugLink: https://bugs.launchpad.net/bugs/2011748
This reverts commit e7b813b32a42a3a6281a4fd9ae7700a0257c1d50 that seems
to introduce a boot regression on physical arm64 boards.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/firmware/efi/efi.c

index 4fbe8e8ea82a531585c05a63e2ade232defe5e84..73184c2701335f77888ffc851b63716f873535fe 100644 (file)
@@ -340,24 +340,6 @@ static void __init efi_debugfs_init(void)
 static inline void efi_debugfs_init(void) {}
 #endif
 
-static void refresh_nv_rng_seed(struct work_struct *work)
-{
-       u8 seed[EFI_RANDOM_SEED_SIZE];
-
-       get_random_bytes(seed, sizeof(seed));
-       efi.set_variable(L"RandomSeed", &LINUX_EFI_RANDOM_SEED_TABLE_GUID,
-                        EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS |
-                        EFI_VARIABLE_RUNTIME_ACCESS, sizeof(seed), seed);
-       memzero_explicit(seed, sizeof(seed));
-}
-static int refresh_nv_rng_seed_notification(struct notifier_block *nb, unsigned long action, void *data)
-{
-       static DECLARE_WORK(work, refresh_nv_rng_seed);
-       schedule_work(&work);
-       return NOTIFY_DONE;
-}
-static struct notifier_block refresh_nv_rng_seed_nb = { .notifier_call = refresh_nv_rng_seed_notification };
-
 /*
  * We register the efi subsystem with the firmware subsystem and the
  * efivars subsystem with the efi subsystem, if the system was booted with
@@ -430,7 +412,6 @@ static int __init efisubsys_init(void)
                platform_device_register_simple("efi_secret", 0, NULL, 0);
 #endif
 
-       execute_with_initialized_rng(&refresh_nv_rng_seed_nb);
        return 0;
 
 err_remove_group: