platform_system_core/libmodprobe
Will McVicker 87b2ef0edf libmodprobe: refactor blocklist functionality
Remove the function EnableBlocklist() and add a constructor argument to
enable/disable the use of modules.blocklist. In all cases, the
enabling/disabling of the blocklist happens immediately after creating
the Modprobe object. So this simplies libmodprobe.

Additionally, the use of the blocklist by libmodprobe should be enabled
by default unless explicitly disabled during creation of the Modprobe
object. Currently, only modprobe(8) defaults to not using the blocklist
and includes the argument -b BLOCKLIST for enabling it. That
functionality remains.

This refactor allows us to use the blocklist during first stage init.
However, additional logic is needed to not return an error for the
blocked non-aliased modules during first stage init; otherwise, the
error would result in an init crash leading to a device reboot. So fixup
LoadListedModules() to allow blocking modules without returning an
error.

Bug: 182582036
Test: boot test on pixel 5 with a module in modules.blocklist
Change-Id: I394b5aa98fa98821011982cfe693749010c381f7
2021-03-31 09:34:47 -07:00
..
include/modprobe libmodprobe: refactor blocklist functionality 2021-03-31 09:34:47 -07:00
Android.bp [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
libmodprobe.cpp libmodprobe: refactor blocklist functionality 2021-03-31 09:34:47 -07:00
libmodprobe_ext.cpp Merge "libmodprobe: improve error reporting." 2020-06-16 22:22:13 +00:00
libmodprobe_ext_test.cpp modprobe: Use more inclusive language for modprobe and libmodprobe 2020-06-15 12:51:38 -07:00
libmodprobe_test.cpp libmodprobe: refactor blocklist functionality 2021-03-31 09:34:47 -07:00
libmodprobe_test.h libmodprobe: parse kernel command line for module options 2019-12-27 13:39:23 -08:00
OWNERS Update libmodprobe's OWNERS. 2021-03-23 17:53:08 -07:00