Unverified Commit 231d3e50 authored by Mitch Phillips's avatar Mitch Phillips Committed by GitHub
Browse files

[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.
parent 5ed94c6e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment