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>
Loading
Please sign in to comment