[all-commits] [llvm/llvm-project] 993555: [compiler-rt][scudo] Check for failing prctl call

PiJoules via All-commits all-commits at lists.llvm.org
Mon Oct 4 13:14:47 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 993555beb8ff33aa35773af01cb3821ae45e6e39
      https://github.com/llvm/llvm-project/commit/993555beb8ff33aa35773af01cb3821ae45e6e39
  Author: Leonard Chan <leonardchan at google.com>
  Date:   2021-10-04 (Mon, 04 Oct 2021)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/memtag.h

  Log Message:
  -----------
  [compiler-rt][scudo] Check for failing prctl call

A bunch of MTE tests like ./ScudoUnitTest-aarch64-Test/MemtagTest.StoreTags
can fail on aarch64-linux if the kernel doesn't support the tagged address ABI. It looks like
the call to prctl(PR_GET_TAGGED_ADDR_CTRL, 0, 0, 0, 0) can return -1, which
casted to an unsigned int and masked will return a value not equal to
PR_MTE_TCF_NONE, meaning systemDetectsMemoryTagFaultsTestOnly can return an incorrect value.

This updates the check to account for a failing prctl call.

Differential Revision: https://reviews.llvm.org/D110888




More information about the All-commits mailing list