This is an archive of the discontinued LLVM Phabricator instance.

[MSAN] extend prctl interceptor to support PR_SCHED_CORE
ClosedPublic

Authored by kda on Mar 31 2022, 2:51 PM.

Diff Detail

Event Timeline

kda created this revision.Mar 31 2022, 2:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 31 2022, 2:51 PM
kda requested review of this revision.Mar 31 2022, 2:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 31 2022, 2:51 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
kda updated this revision to Diff 419588.Mar 31 2022, 4:29 PM

narrow intercept by checking second parameter.

vitalybuka added inline comments.Apr 1 2022, 5:14 PM
compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
1368

Can you add a trivial test in test/sanitizer_common?

kda updated this revision to Diff 421247.Apr 7 2022, 9:39 AM

added unit test

kda marked an inline comment as done.Apr 7 2022, 9:39 AM
kda updated this revision to Diff 421250.Apr 7 2022, 9:40 AM

trim includes from unit test

eugenis accepted this revision.Apr 7 2022, 3:18 PM

LGTM

compiler-rt/test/sanitizer_common/TestCases/Linux/prctl.cpp
23

I don't understand the api well enough to know if cookie value of 0 is invalid, or just merely very unlikely.

This revision is now accepted and ready to land.Apr 7 2022, 3:18 PM
kda marked an inline comment as done.Apr 7 2022, 4:47 PM
kda added inline comments.
compiler-rt/test/sanitizer_common/TestCases/Linux/prctl.cpp
23
This revision was automatically updated to reflect the committed changes.
kda marked an inline comment as done.
kda added a comment.Apr 8 2022, 9:48 AM

gasp. I missed one symbol.
Should be fixed now. I hope.

https://reviews.llvm.org/rGb401d2a43cf6ba9b2c8b87a58e8d78099bce828f