init: set SetKptrRestrict before early-init
As part of debugging long run issue we are enabling module info as part of debug build under the config key DEBUG_MODULE_LOAD_INFO , But doing so can lead to info leak as modules/dlkm are loaded in early-init and setting the kptr_restriction is done after early-init. So moving setting of kptr_restrict much before early-init. Bug: 138641073 Change-Id: Ic3c0ca57a94c8b20136a15331dd646bd8825b625
This commit is contained in:
parent
3bd09415a3
commit
33783fc29c
|
@ -771,6 +771,7 @@ int SecondStageMain(int argc, char** argv) {
|
|||
|
||||
am.QueueBuiltinAction(SetupCgroupsAction, "SetupCgroups");
|
||||
|
||||
am.QueueBuiltinAction(SetKptrRestrictAction, "SetKptrRestrict");
|
||||
am.QueueEventTrigger("early-init");
|
||||
|
||||
// Queue an action that waits for coldboot done so we know ueventd has set up all of /dev...
|
||||
|
@ -778,7 +779,6 @@ int SecondStageMain(int argc, char** argv) {
|
|||
// ... so that we can start queuing up actions that require stuff from /dev.
|
||||
am.QueueBuiltinAction(MixHwrngIntoLinuxRngAction, "MixHwrngIntoLinuxRng");
|
||||
am.QueueBuiltinAction(SetMmapRndBitsAction, "SetMmapRndBits");
|
||||
am.QueueBuiltinAction(SetKptrRestrictAction, "SetKptrRestrict");
|
||||
Keychords keychords;
|
||||
am.QueueBuiltinAction(
|
||||
[&epoll, &keychords](const BuiltinArguments& args) -> Result<void> {
|
||||
|
|
Loading…
Reference in New Issue