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

Commit ec37ba83 authored by Alexander Potapenko's avatar Alexander Potapenko
Browse files

Restrict creation of bootreceiver tracing instance to 64-bit systems.

The main users of this instance are KFENCE and MTE-aided KASAN, which are only supported on arm64.
Skip creation of this tracing instance on 32-bit systems to save ~6Mb memory on low-end devices.

Bug: 195089948
Bug: 194719088
Bug: 194156700
Change-Id: Icaf762715fed7a282b1ad738c10bcb45dc848f4d
parent c90b7273
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -591,9 +591,10 @@ on late-fs
    # Load trusted keys from dm-verity protected partitions
    # Load trusted keys from dm-verity protected partitions
    exec -- /system/bin/fsverity_init --load-verified-keys
    exec -- /system/bin/fsverity_init --load-verified-keys


on late-fs && property:ro.product.cpu.abilist64=*
    # Set up a tracing instance for system_server to monitor error_report_end events.
    # Set up a tracing instance for system_server to monitor error_report_end events.
    # These are sent by kernel tools like KASAN and KFENCE when a memory corruption
    # These are sent by kernel tools like KASAN and KFENCE when a memory corruption
    # is detected.
    # is detected. This is only needed for 64-bit systems.
    mkdir /sys/kernel/tracing/instances/bootreceiver 0700 system system
    mkdir /sys/kernel/tracing/instances/bootreceiver 0700 system system
    restorecon_recursive /sys/kernel/tracing/instances/bootreceiver
    restorecon_recursive /sys/kernel/tracing/instances/bootreceiver
    write /sys/kernel/tracing/instances/bootreceiver/buffer_size_kb 1
    write /sys/kernel/tracing/instances/bootreceiver/buffer_size_kb 1