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

Commit eeff2cf7 authored by Evgenii Stepanov's avatar Evgenii Stepanov
Browse files

Enable gwp-asan in system_server.

Enables gwp-asan in system_server with a small probability, same as any
native process or system app.

Bug: 149991821
Test: kill system_server in a loop - find "GWP" in /proc/$PID/maps
      eventually
Change-Id: I3900f5d277d28987883a918d62fe9390c780ac30
(cherry picked from commit 2bb1dba5)
parent 6b7b2300
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -761,6 +761,10 @@ public class ZygoteInit {
             * this is present in all ARMv8 CPUs; this flag has no effect on other platforms. */
            parsedArgs.mRuntimeFlags |= Zygote.MEMORY_TAG_LEVEL_TBI;

            /* Enable gwp-asan on the system server with a small probability. This is the same
             * policy as applied to native processes and system apps. */
            parsedArgs.mRuntimeFlags |= Zygote.GWP_ASAN_LEVEL_LOTTERY;

            if (shouldProfileSystemServer()) {
                parsedArgs.mRuntimeFlags |= Zygote.PROFILE_SYSTEM_SERVER;
            }