[scudo] Change header tagging for the secondary allocator (#182487)
When secondary allocator allocates a new chunk, the allocation is
prepended with a chunk header (common with the primary allocator)
and large header (only used for secondary).
Only the headers are tagged, the data is not, and the headers are
tagged individually as different tags are used for them.
In the current implementation while tagging the large header the unused
area is tagged with it, so the allocator can tag up to a page size (in
worst case), which is costly and does not bring security benefit (as the
area is unused).
With the current fix we can get rid of around 97-98% of the tagging for
the secondary allocator, measured with random benchmarks.
Co-authored-by: Christopher Ferris <cferris1000@users.noreply.github.com>
GitOrigin-RevId: e55945556a1e99a7d6618735873d513a0239b2a0
1 file changed