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

Pull modules updates from Luis Chamberlain:
"Nothing exciting at all for modules for v6.3.

The biggest change is just the change of INSTALL_MOD_DIR from "extra"
to "updates" which I found lingered for ages for no good reason while
testing the CXL mock driver [0].

The CXL mock driver has no kconfig integration and requires building
an external module... and re-building the *rest* of the production
drivers. This mock driver when loaded but not the production ones will
crash.

All this can obviously be fixed by integrating kconfig semantics into
such test module, however that's not desirable by the maintainer, and
so sensible defaults must be used to ensure a default "make
modules_install" will suffice for most distros which do not have a
file like /etc/depmod.d/dist.conf with something like `search updates
extra built-in`.

Since most distros rely on kmod and since its inception the "updates"
directory is always in the search path it makes more sense to use that
than the "extra" which only *some* RH based systems rely on.

All this stuff has been on linux-next for a while"

[0] https://lkml.kernel.org/r/20221209062919.1096779-1-mcgrof@kernel.org

* tag 'modules-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
Documentation: livepatch: module-elf-format: Remove local klp_modinfo definition
module.h: Document klp_modinfo struct using kdoc
module: Use kstrtobool() instead of strtobool()
kernel/params.c: Use kstrtobool() instead of strtobool()
test_kmod: stop kernel-doc warnings
kbuild: Modify default INSTALL_MOD_DIR from extra to updates

+20 -18
+2 -9
Documentation/livepatch/module-elf-format.rst
··· 298 298 Since apply_relocate_add() requires access to a module's section headers, 299 299 symbol table, and relocation section indices, Elf information is preserved for 300 300 livepatch modules and is made accessible by the module loader through 301 - module->klp_info, which is a klp_modinfo struct. When a livepatch module loads, 302 - this struct is filled in by the module loader. Its fields are documented below:: 303 - 304 - struct klp_modinfo { 305 - Elf_Ehdr hdr; /* Elf header */ 306 - Elf_Shdr *sechdrs; /* Section header table */ 307 - char *secstrings; /* String table for the section headers */ 308 - unsigned int symndx; /* The symbol table section index */ 309 - }; 301 + module->klp_info, which is a :c:type:`klp_modinfo` struct. When a livepatch module 302 + loads, this struct is filled in by the module loader.
+8
include/linux/module.h
··· 352 352 }; 353 353 354 354 #ifdef CONFIG_LIVEPATCH 355 + /** 356 + * struct klp_modinfo - Elf information preserved from the livepatch module 357 + * 358 + * @hdr: Elf header 359 + * @sechdrs: Section header table 360 + * @secstrings: String table for the section headers 361 + * @symndx: The symbol table section index 362 + */ 355 363 struct klp_modinfo { 356 364 Elf_Ehdr hdr; 357 365 Elf_Shdr *sechdrs;
+2 -1
kernel/module/main.c
··· 17 17 #include <linux/fs.h> 18 18 #include <linux/kernel.h> 19 19 #include <linux/kernel_read_file.h> 20 + #include <linux/kstrtox.h> 20 21 #include <linux/slab.h> 21 22 #include <linux/vmalloc.h> 22 23 #include <linux/elf.h> ··· 2676 2675 int ret; 2677 2676 2678 2677 if (strcmp(param, "async_probe") == 0) { 2679 - if (strtobool(val, &mod->async_probe_requested)) 2678 + if (kstrtobool(val, &mod->async_probe_requested)) 2680 2679 mod->async_probe_requested = true; 2681 2680 return 0; 2682 2681 }
+2 -1
kernel/params.c
··· 4 4 5 5 */ 6 6 #include <linux/kernel.h> 7 + #include <linux/kstrtox.h> 7 8 #include <linux/string.h> 8 9 #include <linux/errno.h> 9 10 #include <linux/module.h> ··· 311 310 if (!val) val = "1"; 312 311 313 312 /* One of =[yYnN01] */ 314 - return strtobool(val, kp->arg); 313 + return kstrtobool(val, kp->arg); 315 314 } 316 315 EXPORT_SYMBOL(param_set_bool); 317 316
+5 -6
lib/test_kmod.c
··· 51 51 52 52 /** 53 53 * enum kmod_test_case - linker table test case 54 - * 55 - * If you add a test case, please be sure to review if you need to se 56 - * @need_mod_put for your tests case. 57 - * 58 54 * @TEST_KMOD_DRIVER: stress tests request_module() 59 55 * @TEST_KMOD_FS_TYPE: stress tests get_fs_type() 56 + * 57 + * If you add a test case, please be sure to review if you need to set 58 + * @need_mod_put for your tests case. 60 59 */ 61 60 enum kmod_test_case { 62 61 __TEST_KMOD_INVALID = 0, ··· 77 78 struct kmod_test_device; 78 79 79 80 /** 80 - * kmod_test_device_info - thread info 81 + * struct kmod_test_device_info - thread info 81 82 * 82 83 * @ret_sync: return value if request_module() is used, sync request for 83 84 * @TEST_KMOD_DRIVER ··· 100 101 }; 101 102 102 103 /** 103 - * kmod_test_device - test device to help test kmod 104 + * struct kmod_test_device - test device to help test kmod 104 105 * 105 106 * @dev_idx: unique ID for test device 106 107 * @config: configuration for the test
+1 -1
scripts/Makefile.modinst
··· 14 14 ifeq ($(KBUILD_EXTMOD),) 15 15 dst := $(MODLIB)/kernel 16 16 else 17 - INSTALL_MOD_DIR ?= extra 17 + INSTALL_MOD_DIR ?= updates 18 18 dst := $(MODLIB)/$(INSTALL_MOD_DIR) 19 19 endif 20 20