Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33783fc2 authored by Ravi Kumar Siddojigari's avatar Ravi Kumar Siddojigari Committed by Jeff Vander Stoep
Browse files

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
parent 3bd09415
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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> {