]> git.baikalelectronics.ru Git - kernel.git/commit
efi: Add pstore variables to the deletion whitelist
authorMatt Fleming <matt@codeblueprint.co.uk>
Mon, 15 Feb 2016 10:34:05 +0000 (10:34 +0000)
committerMatt Fleming <matt@codeblueprint.co.uk>
Tue, 16 Feb 2016 12:48:18 +0000 (12:48 +0000)
commite1f562b76c3c7b9307054320199feabdfce9a9f4
tree370afd77aa3621bfd8fe11139951d5c729bcbc68
parent5b2de10a13c89b7e76c46660e2620da7b2362da8
efi: Add pstore variables to the deletion whitelist

Laszlo explains why this is a good idea,

 'This is because the pstore filesystem can be backed by UEFI variables,
  and (for example) a crash might dump the last kilobytes of the dmesg
  into a number of pstore entries, each entry backed by a separate UEFI
  variable in the above GUID namespace, and with a variable name
  according to the above pattern.

  Please see "drivers/firmware/efi/efi-pstore.c".

  While this patch series will not prevent the user from deleting those
  UEFI variables via the pstore filesystem (i.e., deleting a pstore fs
  entry will continue to delete the backing UEFI variable), I think it
  would be nice to preserve the possibility for the sysadmin to delete
  Linux-created UEFI variables that carry portions of the crash log,
  *without* having to mount the pstore filesystem.'

There's also no chance of causing machines to become bricked by
deleting these variables, which is the whole purpose of excluding
things from the whitelist.

Use the LINUX_EFI_CRASH_GUID guid and a wildcard '*' for the match so
that we don't have to update the string in the future if new variable
name formats are created for crash dump variables.

Reported-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Peter Jones <pjones@redhat.com>
Tested-by: Peter Jones <pjones@redhat.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: "Lee, Chun-Yi" <jlee@suse.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
drivers/firmware/efi/vars.c