Le 08/12/2019 à 14:22, Martin Husemann a écrit :
On Sun, Dec 08, 2019 at 12:58:20PM +0100, Maxime Villard wrote:
kMSan has special constraints which, in this specific case, come down to: each
function called from a KCOV instrumentation callback must be a static inline
tagged with __nomsan.

This was not the case with the updated in_interrupt(), but also still isn't the
case with the lwp_getspecific() call, which will have to be dropped.

This does not sound like a good reason to introduce MD code in sys/kern to
me. Could should not be made worse to deal with sanitizer restrictions.

Are there any alternatives?

The clean way of doing this is having an MD kcov.h included from subr_kcov.c,
like kASan.

However, I expect that we will want a per-lwp kcov flag to indicate the current
context (in exception, in interrupt, in nmi, etc), and when that happens, I
don't expect that we will need in_interrupt anymore.

Therefore, I wouldn't bother adding kcov.h headers, and rolling back to the
previous version of in_interrupt for now is fine, considering that kcov
currently has no use outside of amd64.

Reply via email to