Re: [PATCH] kcov: fix generic Kconfig dependencies if ARCH_WANTS_NO_INSTR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 02, 2021 at 06:38:13PM +0100, Marco Elver wrote:
> On Thu, 2 Dec 2021 at 18:30, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:

> > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> > > index 9ef7ce18b4f5..589c8aaa2d5b 100644
> > > --- a/lib/Kconfig.debug
> > > +++ b/lib/Kconfig.debug
> > > @@ -1977,6 +1977,8 @@ config KCOV
> > >       bool "Code coverage for fuzzing"
> > >       depends on ARCH_HAS_KCOV
> > >       depends on CC_HAS_SANCOV_TRACE_PC || GCC_PLUGINS
> > > +     depends on !ARCH_WANTS_NO_INSTR || STACK_VALIDATION || \
> > > +                GCC_VERSION >= 120000 || CLANG_VERSION >= 130000
> >
> > Can we write that as something like:
> >
> >         $(cc-attribute,__no_sanitize_coverage)
> >
> > instead? Other than that, yes totally.
> 
> That'd be nice, but I think we don't have that cc-attribute helper? I

Nah indeed, I made that up on the spot.

> checked how e.g. CC_HAS_NO_PROFILE_FN_ATTR does it, but it won't work
> like that because gcc and clang define the attribute differently and
> it becomes a mess. That's also what Nathan pointed out here I think:
> https://lkml.kernel.org/r/Yaet8x/1WYiADlPh@archlinux-ax161


Urgh, that's one of them MsgIDs with a '/' in..

/me substitues with %2f and magic...

Hurmph yeah... so if we can somehow do that it would allow back porting
those fixes to older compiler versions and have things magically work.
Not sure how realistic that is, but still.. A well. I'll go do something
useful then :-)





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux