ANDROID: GKI: Completely disable module autoloading
Android's SELinux policy prohibits module autoloading, so init(1) disables the kernel's module loader using the sysctl interface during its early-init phase (see aosp/1254748). However, this leaves a window of time between when the SELinux policy is loaded and when the init script is processed where the kernel can try and fail to autoload a module. This failure was observed on some SiFive platforms, where an Ethernet controller driver is loaded from the vendor ramdisk, and the kernel later attempts to autoload a PHY driver module based on its MDIO ID. If the module loading attempt occurs during the race window, it is denied by SELinux, and PHY initialization fails instead of falling back to the generic PHY driver. This prevents the Ethernet driver from probing. Fix the race by disabling module autoloading statically, instead of during boot. This is achieved by using an empty string for the module loader path, as in aosp/1254748. Bug: 327245884 Change-Id: I0d140695baf451885148d61b2e38f09b63ad40d0 Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
This commit is contained in:
committed by
Treehugger Robot
parent
0150010856
commit
a6080762a6
@@ -87,6 +87,7 @@ CONFIG_MODVERSIONS=y
|
||||
CONFIG_MODULE_SCMVERSION=y
|
||||
CONFIG_MODULE_SIG=y
|
||||
CONFIG_MODULE_SIG_PROTECT=y
|
||||
CONFIG_MODPROBE_PATH=""
|
||||
CONFIG_BLK_DEV_ZONED=y
|
||||
CONFIG_BLK_CGROUP_IOPRIO=y
|
||||
CONFIG_BLK_INLINE_ENCRYPTION=y
|
||||
|
||||
@@ -72,6 +72,7 @@ CONFIG_MODVERSIONS=y
|
||||
CONFIG_MODULE_SCMVERSION=y
|
||||
CONFIG_MODULE_SIG=y
|
||||
CONFIG_MODULE_SIG_PROTECT=y
|
||||
CONFIG_MODPROBE_PATH=""
|
||||
CONFIG_BLK_DEV_ZONED=y
|
||||
CONFIG_BLK_CGROUP_IOPRIO=y
|
||||
CONFIG_BLK_INLINE_ENCRYPTION=y
|
||||
|
||||
@@ -84,6 +84,7 @@ CONFIG_MODVERSIONS=y
|
||||
CONFIG_MODULE_SCMVERSION=y
|
||||
CONFIG_MODULE_SIG=y
|
||||
CONFIG_MODULE_SIG_PROTECT=y
|
||||
CONFIG_MODPROBE_PATH=""
|
||||
CONFIG_BLK_DEV_ZONED=y
|
||||
CONFIG_BLK_CGROUP_IOPRIO=y
|
||||
CONFIG_BLK_INLINE_ENCRYPTION=y
|
||||
|
||||
Reference in New Issue
Block a user