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 'modules-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux

Pull modules updates from Luis Chamberlain:
"The only thing worth highligthing is that gzip moves to use vmalloc()
instead of kmalloc just as we had a fix for this for zstd on v6.6-rc1.

The rest is regular house keeping, keeping things neat, tidy, and
boring"

[ The kmalloc -> vmalloc conversion is not the right approach.

Unless you know you need huge areas or know you need to use virtual
mappings for some reason (playing with protection bits or whatever),
you should use kvmalloc()/kvfree, which automatically picks the right
allocation model - Linus ]

* tag 'modules-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
module: Annotate struct module_notes_attrs with __counted_by
module: Fix comment typo
module: Make is_valid_name() return bool
module: Make is_mapping_symbol() return bool
module/decompress: use vmalloc() for gzip decompression workspace
MAINTAINERS: add include/linux/module*.h to modules
module: Clarify documentation of module_param_call()

+13 -9
+1 -1
MAINTAINERS
··· 14527 14527 S: Maintained 14528 14528 T: git git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git modules-next 14529 14529 F: include/linux/kmod.h 14530 - F: include/linux/module.h 14530 + F: include/linux/module*.h 14531 14531 F: kernel/module/ 14532 14532 F: lib/test_kmod.c 14533 14533 F: scripts/module*
+1 -1
include/linux/module_symbol.h
··· 3 3 #define _LINUX_MODULE_SYMBOL_H 4 4 5 5 /* This ignores the intensely annoying "mapping symbols" found in ELF files. */ 6 - static inline int is_mapping_symbol(const char *str) 6 + static inline bool is_mapping_symbol(const char *str) 7 7 { 8 8 if (str[0] == '.' && str[1] == 'L') 9 9 return true;
+5 -1
include/linux/moduleparam.h
··· 293 293 = { __param_str_##name, THIS_MODULE, ops, \ 294 294 VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } 295 295 296 - /* Obsolete - use module_param_cb() */ 296 + /* 297 + * Useful for describing a set/get pair used only once (i.e. for this 298 + * parameter). For repeated set/get pairs (i.e. the same struct 299 + * kernel_param_ops), use module_param_cb() instead. 300 + */ 297 301 #define module_param_call(name, _set, _get, arg, perm) \ 298 302 static const struct kernel_param_ops __param_ops_##name = \ 299 303 { .flags = 0, .set = _set, .get = _get }; \
+2 -2
kernel/module/decompress.c
··· 100 100 s.next_in = buf + gzip_hdr_len; 101 101 s.avail_in = size - gzip_hdr_len; 102 102 103 - s.workspace = kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL); 103 + s.workspace = vmalloc(zlib_inflate_workspacesize()); 104 104 if (!s.workspace) 105 105 return -ENOMEM; 106 106 ··· 138 138 out_inflate_end: 139 139 zlib_inflateEnd(&s); 140 140 out: 141 - kfree(s.workspace); 141 + vfree(s.workspace); 142 142 return retval; 143 143 } 144 144 #elif defined(CONFIG_MODULE_COMPRESS_XZ)
+1 -1
kernel/module/stats.c
··· 126 126 * These typically should not happen unless your system is under memory 127 127 * pressure. 128 128 * * invalid_becoming_bytes: total number of bytes allocated and freed used 129 - * used to read the kernel module userspace wants us to read before we 129 + * to read the kernel module userspace wants us to read before we 130 130 * promote it to be processed to be added to our @modules linked list. These 131 131 * failures can happen if we had a check in between a successful kernel_read_file_from_fd() 132 132 * call and right before we allocate the our private memory for the module
+1 -1
kernel/module/sysfs.c
··· 143 143 struct module_notes_attrs { 144 144 struct kobject *dir; 145 145 unsigned int notes; 146 - struct bin_attribute attrs[]; 146 + struct bin_attribute attrs[] __counted_by(notes); 147 147 }; 148 148 149 149 static ssize_t module_notes_read(struct file *filp, struct kobject *kobj,
+2 -2
scripts/mod/modpost.c
··· 1059 1059 * only by merging __exit and __init sections into __text, bloating 1060 1060 * the kernel (which is especially evil on embedded platforms). 1061 1061 */ 1062 - static inline int is_valid_name(struct elf_info *elf, Elf_Sym *sym) 1062 + static inline bool is_valid_name(struct elf_info *elf, Elf_Sym *sym) 1063 1063 { 1064 1064 const char *name = elf->strtab + sym->st_name; 1065 1065 1066 1066 if (!name || !strlen(name)) 1067 - return 0; 1067 + return false; 1068 1068 return !is_mapping_symbol(name); 1069 1069 } 1070 1070