Page MenuHomePhabricator

[hwasan] Fix kernel instrumentation of stack.
ClosedPublic

Authored by eugenis on Feb 5 2018, 5:51 PM.

Details

Summary

Kernel addresses have 0xFF in the most significant byte.
A tag can not be pushed there with OR (tag << 56);
use AND ((tag << 56) | 0x00FF..FF) instead.

Diff Detail

Repository
rL LLVM

Event Timeline

eugenis created this revision.Feb 5 2018, 5:51 PM
kcc accepted this revision.Feb 5 2018, 5:56 PM

LGTM with a nit

llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
446 ↗(On Diff #132925)

please add a comment, similar to the commit message.

This revision is now accepted and ready to land.Feb 5 2018, 5:56 PM
andreyknvl accepted this revision.Feb 6 2018, 9:02 AM

Thanks!

I'll send my patch with more khwasan related changes, once this is committed.

eugenis updated this revision to Diff 133537.Feb 8 2018, 4:48 PM

add a comment

This revision was automatically updated to reflect the committed changes.