Page MenuHomeFreeBSD

Don't sanitize linker_set
AcceptedPublic

Authored by matthew.bryan_isilon.com on Tue, Nov 5, 3:23 AM.

Details

Summary

The assumptions of linker_set don't play nicely with AddressSanitizer. AddressSanitizer adds a 'redzone' of zeros around globals (including those in named sections), whereas linker_set assumes they are all packed consecutively like a pointer array. So: let's annotate linker_set so that AddressSanitizer ignores it.

Adding Konstantin to the review as somebody who touched linker_set recently.

Test Plan

Manual testing to demonstrate that linker_set pointers are consecutive with no redzone. Compiled and ran the kernel and ran few kyua tests for sanity.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

rang_acm.org accepted this revision.Tue, Nov 5, 5:55 AM
This revision is now accepted and ready to land.Tue, Nov 5, 5:55 AM
kib accepted this revision.Tue, Nov 5, 8:24 AM
kib added inline comments.
sys/sys/linker_set.h
65

I prefer that you put the new attribute after __used.