Skip to content

Commit 7031a38

Browse files
committed
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
2 parents 151167d + 145ac10 commit 7031a38

File tree

6 files changed

+7
-23
lines changed

6 files changed

+7
-23
lines changed

drivers/firmware/efi/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,6 @@ config EFI_ZBOOT
7676
bool "Enable the generic EFI decompressor"
7777
depends on EFI_GENERIC_STUB && !ARM
7878
select HAVE_KERNEL_GZIP
79-
select HAVE_KERNEL_LZ4
80-
select HAVE_KERNEL_LZMA
81-
select HAVE_KERNEL_LZO
82-
select HAVE_KERNEL_XZ
8379
select HAVE_KERNEL_ZSTD
8480
help
8581
Create the bootable image as an EFI application that carries the

drivers/firmware/efi/esrt.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ static LIST_HEAD(entry_list);
7575
struct esre_attribute {
7676
struct attribute attr;
7777
ssize_t (*show)(struct esre_entry *entry, char *buf);
78-
ssize_t (*store)(struct esre_entry *entry,
79-
const char *buf, size_t count);
8078
};
8179

8280
static struct esre_entry *to_entry(struct kobject *kobj)

drivers/firmware/efi/libstub/Makefile.zboot

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,16 @@ quiet_cmd_copy_and_pad = PAD $@
1212
$(obj)/vmlinux.bin: $(obj)/$(EFI_ZBOOT_PAYLOAD) FORCE
1313
$(call if_changed,copy_and_pad)
1414

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-
2215
# in GZIP, the appended le32 carrying the uncompressed size is part of the
2316
# format, but in other cases, we just append it at the end for convenience,
2417
# 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
2821

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
3125

3226
$(obj)/vmlinuz: $(obj)/vmlinux.bin FORCE
3327
$(call if_changed,$(zboot-method-y))

fs/efivarfs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ struct inode *efivarfs_get_inode(struct super_block *sb,
5151
*
5252
* VariableName-12345678-1234-1234-1234-1234567891bc
5353
*/
54-
bool efivarfs_valid_name(const char *str, int len)
54+
static bool efivarfs_valid_name(const char *str, int len)
5555
{
5656
const char *s = str + len - EFI_VARIABLE_GUID_LEN;
5757

fs/efivarfs/internal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ bool efivar_variable_is_removable(efi_guid_t vendor, const char *name,
6060

6161
extern const struct file_operations efivarfs_file_operations;
6262
extern const struct inode_operations efivarfs_dir_inode_operations;
63-
extern bool efivarfs_valid_name(const char *str, int len);
6463
extern struct inode *efivarfs_get_inode(struct super_block *sb,
6564
const struct inode *dir, int mode, dev_t dev,
6665
bool is_removable);

fs/efivarfs/super.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,6 @@ static int efivarfs_d_hash(const struct dentry *dentry, struct qstr *qstr)
144144
const unsigned char *s = qstr->name;
145145
unsigned int len = qstr->len;
146146

147-
if (!efivarfs_valid_name(s, len))
148-
return -EINVAL;
149-
150147
while (len-- > EFI_VARIABLE_GUID_LEN)
151148
hash = partial_name_hash(*s++, hash);
152149

0 commit comments

Comments
 (0)