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

Configure Feed

Select the types of activity you want to include in your feed.

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

+7 -23
-4
drivers/firmware/efi/Kconfig
··· 76 76 bool "Enable the generic EFI decompressor" 77 77 depends on EFI_GENERIC_STUB && !ARM 78 78 select HAVE_KERNEL_GZIP 79 - select HAVE_KERNEL_LZ4 80 - select HAVE_KERNEL_LZMA 81 - select HAVE_KERNEL_LZO 82 - select HAVE_KERNEL_XZ 83 79 select HAVE_KERNEL_ZSTD 84 80 help 85 81 Create the bootable image as an EFI application that carries the
-2
drivers/firmware/efi/esrt.c
··· 75 75 struct esre_attribute { 76 76 struct attribute attr; 77 77 ssize_t (*show)(struct esre_entry *entry, char *buf); 78 - ssize_t (*store)(struct esre_entry *entry, 79 - const char *buf, size_t count); 80 78 }; 81 79 82 80 static struct esre_entry *to_entry(struct kobject *kobj)
+6 -12
drivers/firmware/efi/libstub/Makefile.zboot
··· 12 12 $(obj)/vmlinux.bin: $(obj)/$(EFI_ZBOOT_PAYLOAD) FORCE 13 13 $(call if_changed,copy_and_pad) 14 14 15 - comp-type-$(CONFIG_KERNEL_GZIP) := gzip 16 - comp-type-$(CONFIG_KERNEL_LZ4) := lz4 17 - comp-type-$(CONFIG_KERNEL_LZMA) := lzma 18 - comp-type-$(CONFIG_KERNEL_LZO) := lzo 19 - comp-type-$(CONFIG_KERNEL_XZ) := xzkern 20 - comp-type-$(CONFIG_KERNEL_ZSTD) := zstd22 21 - 22 15 # in GZIP, the appended le32 carrying the uncompressed size is part of the 23 16 # format, but in other cases, we just append it at the end for convenience, 24 17 # causing the original tools to complain when checking image integrity. 25 - # So disregard it when calculating the payload size in the zimage header. 26 - zboot-method-y := $(comp-type-y)_with_size 27 - zboot-size-len-y := 4 18 + comp-type-y := gzip 19 + zboot-method-y := gzip 20 + zboot-size-len-y := 0 28 21 29 - zboot-method-$(CONFIG_KERNEL_GZIP) := gzip 30 - zboot-size-len-$(CONFIG_KERNEL_GZIP) := 0 22 + comp-type-$(CONFIG_KERNEL_ZSTD) := zstd 23 + zboot-method-$(CONFIG_KERNEL_ZSTD) := zstd22_with_size 24 + zboot-size-len-$(CONFIG_KERNEL_ZSTD) := 4 31 25 32 26 $(obj)/vmlinuz: $(obj)/vmlinux.bin FORCE 33 27 $(call if_changed,$(zboot-method-y))
+1 -1
fs/efivarfs/inode.c
··· 51 51 * 52 52 * VariableName-12345678-1234-1234-1234-1234567891bc 53 53 */ 54 - bool efivarfs_valid_name(const char *str, int len) 54 + static bool efivarfs_valid_name(const char *str, int len) 55 55 { 56 56 const char *s = str + len - EFI_VARIABLE_GUID_LEN; 57 57
-1
fs/efivarfs/internal.h
··· 60 60 61 61 extern const struct file_operations efivarfs_file_operations; 62 62 extern const struct inode_operations efivarfs_dir_inode_operations; 63 - extern bool efivarfs_valid_name(const char *str, int len); 64 63 extern struct inode *efivarfs_get_inode(struct super_block *sb, 65 64 const struct inode *dir, int mode, dev_t dev, 66 65 bool is_removable);
-3
fs/efivarfs/super.c
··· 144 144 const unsigned char *s = qstr->name; 145 145 unsigned int len = qstr->len; 146 146 147 - if (!efivarfs_valid_name(s, len)) 148 - return -EINVAL; 149 - 150 147 while (len-- > EFI_VARIABLE_GUID_LEN) 151 148 hash = partial_name_hash(*s++, hash); 152 149