[all-commits] [llvm/llvm-project] 231d3e: [HWASan] Delete the print-memory-usage-android.c t...
Mitch Phillips via All-commits
all-commits at lists.llvm.org
Fri Sep 15 14:26:01 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 231d3e50be32bdc37e46de7ea0cd3faf18ef7b1c
https://github.com/llvm/llvm-project/commit/231d3e50be32bdc37e46de7ea0cd3faf18ef7b1c
Author: Mitch Phillips <31459023+hctim at users.noreply.github.com>
Date: 2023-09-15 (Fri, 15 Sep 2023)
Changed paths:
R compiler-rt/test/hwasan/TestCases/print-memory-usage-android.c
Log Message:
-----------
[HWASan] Delete the print-memory-usage-android.c test (#66550)
This test asserts that HWASan memory usage can be gathered from
/proc/$PID/maps. This worked because the old Android-specific versions
of the anonymous mmap patches functioned by providing a userland cstring
pointer to the kernel, and the underlying cstring was collected from
that pointer address dynamically when /proc/$PID/maps was being
decorated. This had some obvious flaws, you had to keep the string
around for the lifetime of the program.
Now, the official kernel implementation of this is to copy the string
into a kernel struct at prctl()-time. Thus, the name that you give at
prctl()-time sticks around and can't be changed by userspace outside of
another prctl call. This breaks the feature, but this is fine, it's not
like anyone's really relying on it anyway. So, let's make sure we don't
continue failing the test on new versions of Android where the kernel
has the upstream version of the named-anonymous-mappings work.
More information about the All-commits
mailing list