Re: [PATCH] kcov: add __no_sanitize_coverage to fix noinstr for all architectures

From: Miguel Ojeda
Date: Tue May 25 2021 - 21:54:04 EST


On Tue, May 25, 2021 at 9:13 PM Marco Elver <elver@xxxxxxxxxx> wrote:
>
> Long story short: this is not fixable without more Clang changes. The
> only way to do it without a version check would be to introduce
> no_sanitize_coverage attr to Clang, which we probably shouldn't do,
> and I didn't want to fight it. ;-)

I am not sure I followed why you would not want to support querying
for the attributes (if they are intended to be used separately).

But regardless of that, why not the feature flag at least then, to be
consistent with the others?

Going back to version checks seems bad -- they should be reserved for
e.g. known broken versions and things like that. New compiler features
should come with new feature flags...

In fact, for Clang, I do not see any version checks in code at the
moment, so this would be the first :(

Cheers,
Miguel