platform_system_core/toolbox
Will Deacon c991c3dbed toolbox/modprobe: Filter module directories based on kernel page size
When modules for multiple kernels with the same major/minor versions
are installed on a device, modprobe will search the module directories
based on whatever order scandir() returned them. In this case, it is
possible that we will try to load modules with the wrong page size for
the running kernel, which can lead to obscure symbol CRC mismatches and
ultimately a system crash.

Adjust the scandir() filtering function so that the kernel page size is
taken into account in addition to the major/minor versions returned by
utsname(). The general rule is that module directories ending in "_Nk"
contain modules for a page-size of N KiB, whilst the absence of such
a suffix implies the default of 4 KiB.

Bug: 343971855
Test: Verified that _16k module directory is excluded by modprobe when running in userspace fastboot with 4k pages.
Change-Id: I78a0a249028bbb0bcdd78eb14de36e631e233be0
2024-06-06 11:22:07 +00:00
..
Android.bp toolbox/libmodprobe: add toolbox to vendor_ramdisk 2024-03-18 17:35:26 +09:00
generate-input.h-labels.py toolbox/generate-input.h-labels.py: python3. 2021-08-17 14:34:55 -07:00
getevent.c getevent: print error message when failing to get event 2024-04-04 15:14:26 +00:00
getprop.cpp newfs_msdos: switch to external/newfs_msdos. 2018-06-13 13:21:24 -07:00
modprobe.cpp toolbox/modprobe: Filter module directories based on kernel page size 2024-06-06 11:22:07 +00:00
MODULE_LICENSE_APACHE2 newfs_msdos: switch to external/newfs_msdos. 2018-06-13 13:21:24 -07:00
NOTICE newfs_msdos: switch to external/newfs_msdos. 2018-06-13 13:21:24 -07:00
OWNERS getevent: add Framework Input team as owners 2024-04-04 15:14:26 +00:00
setprop.cpp setprop: check if not setprop value but setprop name starts with "ro." 2024-04-22 08:07:52 +00:00
start.cpp iorap: Remove toggling iorapd on/off when using 'start' command. 2020-11-16 18:45:47 +00:00
toolbox.c Fix toolbox failure return to match similar tools. 2016-04-12 08:40:43 -07:00
tools.h toolbox: add modprobe 2019-08-06 13:58:13 -07:00