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

Commit 1d79a075 authored by Florian Mayer's avatar Florian Mayer
Browse files

[MTE] add link to SAC docs to tombstones

Test: m, flash, look at tombstone
Change-Id: I091d3dc9207d0ba7e692dcc28adc04aec33cf336
parent 8b91862b
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -392,6 +392,7 @@ static void print_main_thread(CallbackType callback, const Tombstone& tombstone,
  }
  }


  bool is_async_mte_crash = false;
  bool is_async_mte_crash = false;
  bool is_mte_crash = false;
  if (!tombstone.has_signal_info()) {
  if (!tombstone.has_signal_info()) {
    CBL("signal information missing");
    CBL("signal information missing");
  } else {
  } else {
@@ -408,6 +409,8 @@ static void print_main_thread(CallbackType callback, const Tombstone& tombstone,
        sender_desc.c_str(), fault_addr_desc.c_str());
        sender_desc.c_str(), fault_addr_desc.c_str());
#ifdef SEGV_MTEAERR
#ifdef SEGV_MTEAERR
    is_async_mte_crash = signal_info.number() == SIGSEGV && signal_info.code() == SEGV_MTEAERR;
    is_async_mte_crash = signal_info.number() == SIGSEGV && signal_info.code() == SEGV_MTEAERR;
    is_mte_crash = is_async_mte_crash ||
                   (signal_info.number() == SIGSEGV && signal_info.code() == SEGV_MTESERR);
#endif
#endif
  }
  }


@@ -458,6 +461,12 @@ static void print_main_thread(CallbackType callback, const Tombstone& tombstone,


  print_tag_dump(callback, tombstone);
  print_tag_dump(callback, tombstone);


  if (is_mte_crash) {
    CBS("");
    CBL("Learn more about MTE reports: "
        "https://source.android.com/docs/security/test/memory-safety/mte-reports");
  }

  print_thread_memory_dump(callback, tombstone, thread);
  print_thread_memory_dump(callback, tombstone, thread);


  CBS("");
  CBS("");