lp://qastaging/kmod
- Get this branch:
- bzr branch lp://qastaging/kmod
Branch information
Import details
This branch is an import of the HEAD branch of the Git repository at git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git.
Last successful import was .
Updating branch...
Launchpad is processing new changes to this branch which will be available in a few minutes. Reload to see the changes.
Recent revisions
- 1313. By Dimitri John Ledkov
-
libkmod: remove pkcs7 obj_to_hash_algo()
Switch to using OBJ_obj2txt() to calculate and print the pkcs7
signature hash name. This eliminates the need to duplicate libcrypto
NID to name mapping, detect SM3 openssl compile-time support, and
enables using any hashes that openssl and kernel know about. For
example SHA3 are being added for v6.7 and with this patch are
automatically supported.Signed-off-by: Dimitri John Ledkov <email address hidden>
Link: https://<email address hidden> - 1312. By Sam James <email address hidden>
-
tools: depmod: fix -Walloc-size
GCC 14 introduces a new -Walloc-size included in -Wextra which gives:
```
tools/depmod.c:192:14: warning: allocation of insufficient size ‘1’ for type ‘struct index_node’ with size ‘1048’ [-Walloc-size]
tools/depmod.c:255:11: warning: allocation of insufficient size ‘1’ for type ‘struct index_value’ with size ‘16’ [-Walloc-size]
tools/depmod.c:286:35: warning: allocation of insufficient size ‘1’ for type ‘struct index_node’ with size ‘1048’ [-Walloc-size]
tools/depmod.c:315:44: warning: allocation of insufficient size ‘1’ for type ‘struct index_node’ with size ‘1048’ [-Walloc-size]
```The calloc prototype is:
```
void *calloc(size_t nmemb, size_t size);
```So, just swap the number of members and size arguments to match the prototype, as
we're initialising 1 struct of size `sizeof(struct ...)`. GCC then sees we're not
doing anything wrong.Signed-off-by: Sam James <email address hidden>
- 1311. By Michal Suchanek
-
kmod: Add pkgconfig file with kmod compile time configuration
Show distconfdir (where system configuration files are searched/to be
installed), sysconfdir (where user configuration files are searched),
module compressions, and module signatures supported.Signed-off-by: Michal Suchanek <email address hidden>
Link: https://lore.kernel. org/r/468b3f572 d3b84f25bb53ec8 fcb15ed4871914d 4<email address hidden>
Signed-off-by: Lucas De Marchi <email address hidden> - 1310. By Michal Suchanek
-
libkmod, depmod: Load modprobe.d, depmod.d from ${prefix}/lib.
There is an ongoing effort to limit use of files outside of /usr (or
${prefix} on general). Currently all modprobe.d paths are hardcoded to
outside of $prefix. Teach kmod to load modprobe.d from ${prefix}/lib.On some distributions /usr/lib and /lib are the same directory because
of a compatibility symlink, and it is possible to craft configuration
files with sideeffects that would behave differently when loaded twice.
However, the override semantic ensures that one 'overrides' the other,
and only one configuration file of the same name is loaded from any of
the search directories.Signed-off-by: Michal Suchanek <email address hidden>
Link: https://lore.kernel. org/r/a290343ce 32e2a3c25b134e4 f27c13b26e06c9e 0<email address hidden>
Signed-off-by: Lucas De Marchi <email address hidden> - 1309. By Michal Suchanek
-
man/depmod.d: Fix incorrect /usr/lib search path
depmod searches /lib/depmod.d but the man page says /usr/lib/depmod.d is
searched. Align the documentation with the code.Signed-off-by: Michal Suchanek <email address hidden>
Link: https://lore.kernel. org/r/9c5a6356b 1a111eb6e17ddb1 10494b7f1d1b44c 0<email address hidden>
Signed-off-by: Lucas De Marchi <email address hidden> - 1308. By Michal Suchanek
-
configure: Detect openssl sm3 support
Older openssl versions do not support sm3. The code has an option to
disable the sm3 hash but the lack of openssl support is not detected
automatically.Signed-off-by: Michal Suchanek <email address hidden>
Link: https://lore.kernel. org/r/b97e20faa 07e9e31c6eaf966 83011aa24e80760 c<email address hidden>
Signed-off-by: Lucas De Marchi <email address hidden> - 1306. By Emil Velikov <email address hidden>
-
libkmod: add fallback MODULE_
INIT_COMPRESSED _FILE define The symbol was somewhat recently introduced by the kernel and not all
distributions may be have available.The number is part of the ABI, so we can add a local fallback define.
Closes: https:/
/github. com/kmod- project/ kmod/issues/ 29
Signed-off-by: Emil Velikov <email address hidden>
Signed-off-by: Lucas De Marchi <email address hidden> - 1305. By Lucas De Marchi
-
libkmod: Use kernel decompression when available
With the recent changes to bypass loading the file it's possible to
reduce the work in userspace and delegating it to the kernel. Without
any compression to illustrate:Before:
read(3, "\177ELF\2\1", 6) = 6
lseek(3, 0, SEEK_SET) = 0
newfstatat(3, "", {st_mode=S_IFREG| 0644, st_size=238592, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 238592, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd85cbd1000
finit_module(3, "", 0) = 0
munmap(0x7fd85cbd1000, 238592) = 0
close(3) = 0After:
read(3, "\177ELF\2\1", 6) = 6
lseek(3, 0, SEEK_SET) = 0
finit_module(3, "", 0) = 0
close(3) = 0When using kernel compression now it's also possible to direct libkmod
to take the finit_module() path, avoiding the decompression in userspace
and just delegating it to the kernel.Before:
read(3, "(\265/\375\244\0", 6) = 6
lseek(3, 0, SEEK_SET) = 0
read(3, "(\265/\375\244", 5) = 5
mmap(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x7f3fa431e000
read(3, "\0\244\3\0\\y\6", 7) = 7
mmap(NULL, 372736, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x7f3fa414f000
brk(0x55944c6a1000) = 0x55944c6a1000
read(3, "\356|\6G\27U\20 \312\260s\211\335\ 333\263\ 326\330\ 336\273O\ 211\356\ 306K\360Z\ 341\374U6\ 342\221" ..., 53038) = 53038
mremap(0x7f3fa431e000, 135168, 266240, MREMAP_MAYMOVE) = 0x7f3fa410e000
read(3, ",;\3\nqf\311\362\ 325\211\ 7\341\375A\ 355\221\ 371L\\\ 5\7\375 \32\246< (\258=K\ 304"... , 20851) = 20851
mremap(0x7f3fa410e000, 266240, 397312, MREMAP_MAYMOVE) = 0x7f3fa40ad000
read(3, ")\36\250\213", 4) = 4
read(3, "", 4) = 0
munmap(0x7f3fa414f000, 372736) = 0
init_module(0x7f3fa40ad010, 238592, "") = 0
munmap(0x7f3fa40ad000, 397312) = 0
close(3) = 0After:
read(3, "(\265/\375\244P", 6) = 6
lseek(3, 0, SEEK_SET) = 0
finit_module(3, "", 0x4 /* MODULE_INIT_??? */) = 0
close(3) = 0Signed-off-by: Lucas De Marchi <email address hidden>
- 1304. By Lucas De Marchi
-
libkmod: Keep track of in-kernel compression support
When creating the context, read /sys/kernel/
compression to check what's
the compression type supported by the kernel. This will later be used
when loading modules to check if the decompression step has to happen in
userspace or if it can be delegated to the kernel.Reviewed-by: Luis Chamberlain <email address hidden>
Signed-off-by: Lucas De Marchi <email address hidden>
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)