c991c3dbed
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 |
||
---|---|---|
.. | ||
Android.bp | ||
generate-input.h-labels.py | ||
getevent.c | ||
getprop.cpp | ||
modprobe.cpp | ||
MODULE_LICENSE_APACHE2 | ||
NOTICE | ||
OWNERS | ||
setprop.cpp | ||
start.cpp | ||
toolbox.c | ||
tools.h |