HomePhabricator

[MSan] another take at instrumenting inline assembly - now with calls

Description

[MSan] another take at instrumenting inline assembly - now with calls

Turns out it's not always possible to figure out whether an asm()
statement argument points to a valid memory region.
One example would be per-CPU objects in the Linux kernel, for which the
addresses are calculated using the FS register and a small offset in the
.data..percpu section.
To avoid pulling all sorts of checks into the instrumentation, we replace
actual checking/unpoisoning code with calls to
msan_instrument_asm_load(ptr, size) and
msan_instrument_asm_store(ptr, size) functions in the runtime.

This patch doesn't implement the runtime hooks in compiler-rt, as there's
been no demand in assembly instrumentation for userspace apps so far.

Details

Committed
gliderOct 31 2018, 2:32 AM
Parents
rL345701: [ARM64] [Windows] Exception handling support in frame lowering
Branches
Unknown
Tags
Unknown