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.
Why test for InsertCheck here?
It is done in insertShadowCheck already, and unpoisoning of stores should be done even in blacklisted functions.