• Ard Biesheuvel's avatar
    efi: vars: Add thin wrapper around EFI get/set variable interface · 472831d4
    Ard Biesheuvel authored
    The current efivars layer is a jumble of list iterators, shadow data
    structures and safe variable manipulation helpers that really belong in
    the efivarfs pseudo file system once the obsolete sysfs access method to
    EFI variables is removed.
    
    So split off a minimal efivar get/set variable API that reuses the
    existing efivars_lock semaphore to mediate access to the various runtime
    services, primarily to ensure that performing a SetVariable() on one CPU
    while another is calling GetNextVariable() in a loop to enumerate the
    contents of the EFI variable store does not result in surprises.
    Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
    472831d4
vars.c 34.4 KB