Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: filesystems: add info about efivars content

When an EFI variable is reading from:

/sys/firmware/efi/efivars

(for example using "hexdump"), the first 4 bytes of the
output are not the real EFI variable data, but the variable
attributes (in little-endian format).

Signed-off-by: Flavio Suligoi <f.suligoi@asem.it>
Link: https://lore.kernel.org/r/20200519084128.12756-1-f.suligoi@asem.it
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Flavio Suligoi and committed by
Jonathan Corbet
2dcc51b3 e2d467de

+17
+17
Documentation/filesystems/efivarfs.rst
··· 24 24 as immutable files. This doesn't prevent removal - "chattr -i" will work - 25 25 but it does prevent this kind of failure from being accomplished 26 26 accidentally. 27 + 28 + .. warning :: 29 + When a content of an UEFI variable in /sys/firmware/efi/efivars is 30 + displayed, for example using "hexdump", pay attention that the first 31 + 4 bytes of the output represent the UEFI variable attributes, 32 + in little-endian format. 33 + 34 + Practically the output of each efivar is composed of: 35 + 36 + +-----------------------------------+ 37 + |4_bytes_of_attributes + efivar_data| 38 + +-----------------------------------+ 39 + 40 + *See also:* 41 + 42 + - Documentation/admin-guide/acpi/ssdt-overlays.rst 43 + - Documentation/ABI/stable/sysfs-firmware-efi-vars