Commit 7031a38a authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'efi-fixes-for-v6.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi

Pull EFI fixes from Ard Biesheuvel:

 - Limit EFI zboot to GZIP and ZSTD before it comes in wider use

 - Fix inconsistent error when looking up a non-existent file in
   efivarfs with a name that does not adhere to the NAME-GUID format

 - Drop some unused code

* tag 'efi-fixes-for-v6.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
  efi/esrt: remove esre_attribute::store()
  efivarfs: Fix error on non-existent file
  efi/zboot: Limit compression options to GZIP and ZSTD
parents 151167d8 145ac100
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -76,10 +76,6 @@ config EFI_ZBOOT
	bool "Enable the generic EFI decompressor"
	depends on EFI_GENERIC_STUB && !ARM
	select HAVE_KERNEL_GZIP
	select HAVE_KERNEL_LZ4
	select HAVE_KERNEL_LZMA
	select HAVE_KERNEL_LZO
	select HAVE_KERNEL_XZ
	select HAVE_KERNEL_ZSTD
	help
	  Create the bootable image as an EFI application that carries the
+0 −2
Original line number Diff line number Diff line
@@ -75,8 +75,6 @@ static LIST_HEAD(entry_list);
struct esre_attribute {
	struct attribute attr;
	ssize_t (*show)(struct esre_entry *entry, char *buf);
	ssize_t (*store)(struct esre_entry *entry,
			 const char *buf, size_t count);
};

static struct esre_entry *to_entry(struct kobject *kobj)
+6 −12
Original line number Diff line number Diff line
@@ -12,22 +12,16 @@ quiet_cmd_copy_and_pad = PAD $@
$(obj)/vmlinux.bin: $(obj)/$(EFI_ZBOOT_PAYLOAD) FORCE
	$(call if_changed,copy_and_pad)

comp-type-$(CONFIG_KERNEL_GZIP)		:= gzip
comp-type-$(CONFIG_KERNEL_LZ4)		:= lz4
comp-type-$(CONFIG_KERNEL_LZMA)		:= lzma
comp-type-$(CONFIG_KERNEL_LZO)		:= lzo
comp-type-$(CONFIG_KERNEL_XZ)		:= xzkern
comp-type-$(CONFIG_KERNEL_ZSTD)		:= zstd22

# in GZIP, the appended le32 carrying the uncompressed size is part of the
# format, but in other cases, we just append it at the end for convenience,
# causing the original tools to complain when checking image integrity.
# So disregard it when calculating the payload size in the zimage header.
zboot-method-y                         := $(comp-type-y)_with_size
zboot-size-len-y                       := 4
comp-type-y				:= gzip
zboot-method-y				:= gzip
zboot-size-len-y			:= 0

zboot-method-$(CONFIG_KERNEL_GZIP)     := gzip
zboot-size-len-$(CONFIG_KERNEL_GZIP)   := 0
comp-type-$(CONFIG_KERNEL_ZSTD)		:= zstd
zboot-method-$(CONFIG_KERNEL_ZSTD)	:= zstd22_with_size
zboot-size-len-$(CONFIG_KERNEL_ZSTD)	:= 4

$(obj)/vmlinuz: $(obj)/vmlinux.bin FORCE
	$(call if_changed,$(zboot-method-y))
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ struct inode *efivarfs_get_inode(struct super_block *sb,
 *
 *	VariableName-12345678-1234-1234-1234-1234567891bc
 */
bool efivarfs_valid_name(const char *str, int len)
static bool efivarfs_valid_name(const char *str, int len)
{
	const char *s = str + len - EFI_VARIABLE_GUID_LEN;

+0 −1
Original line number Diff line number Diff line
@@ -60,7 +60,6 @@ bool efivar_variable_is_removable(efi_guid_t vendor, const char *name,

extern const struct file_operations efivarfs_file_operations;
extern const struct inode_operations efivarfs_dir_inode_operations;
extern bool efivarfs_valid_name(const char *str, int len);
extern struct inode *efivarfs_get_inode(struct super_block *sb,
			const struct inode *dir, int mode, dev_t dev,
			bool is_removable);
Loading