This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Enable kernel address and memory sanitizers on FreeBSD
ClosedPublic

Authored by markj on Mar 9 2021, 12:51 PM.

Details

Summary

Test Plan: using kernel ASAN and MSAN implementations in FreeBSD

Diff Detail

Event Timeline

markj created this revision.Mar 9 2021, 12:51 PM
markj requested review of this revision.Mar 9 2021, 12:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2021, 12:51 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
markj retitled this revision from [Driver] Enable the kernel address sanitizer on FreeBSD to [Driver] Enable kernel address and memory sanitizers on FreeBSD.Mar 24 2021, 7:06 AM
markj edited the summary of this revision. (Show Details)
markj updated this revision to Diff 332974.Mar 24 2021, 7:07 AM

Enable the memory sanitizer too.

arichardson accepted this revision.Mar 24 2021, 7:10 AM

Does it also work on AArch64?

This revision is now accepted and ready to land.Mar 24 2021, 7:10 AM
markj added a comment.Mar 24 2021, 7:14 AM

Does it also work on AArch64?

Not yet, I haven't yet ported the sanitizer runtimes (though it's on my todo list). ASAN requires that we specify the relative offset of the shadow map to the kernel map (see D98285), which will be different on arm64. But, I guess there's no harm in declaring arm64 support in this commit?

dim accepted this revision.Mar 24 2021, 11:26 AM

LGTM, but this would probably need some sort of test, at least that it correctly accepts the flag(s) now?

markj added a comment.Mar 24 2021, 1:09 PM
In D98286#2648449, @dim wrote:

LGTM, but this would probably need some sort of test, at least that it correctly accepts the flag(s) now?

Working on it, I see some examples.

markj updated this revision to Diff 333106.Mar 24 2021, 1:33 PM
  • Add a couple of regression tests.
emaste accepted this revision.Mar 27 2021, 6:21 PM
This revision was landed with ongoing or failed builds.Apr 15 2021, 9:49 AM
This revision was automatically updated to reflect the committed changes.