lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNARrkM7fAN8h792fFz8R3EEcLBJ74XXhP7ZKaATBy9KsrA@mail.gmail.com>
Date:   Tue, 3 Aug 2021 14:14:53 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] trace: remove redundant dependency from IRQSOFF_TRACER

On Mon, Aug 2, 2021 at 10:29 PM Steven Rostedt <rostedt@...dmis.org> wrote:
>
> On Sat, 31 Jul 2021 14:22:33 +0900
> Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> > IRQSOFF_TRACE is already guarded by a stronger condition,
> > TRACING_SUPPORT.
> >
> > 'depends on TRACE_IRQFLAGS_SUPPORT' is redundant.
>
> I'm fine with the other two patches, but this one concerns me. I'm not
> sure TRACING_SUPPORT really needs to depend on TRACE_IRQFLAGS_SUPPORT.
> When tracing was first introduced, the main use case was the irqsoff
> tracer. Today, with function graph tracing and events being introduced,
> it's one of the minor use cases of tracing support.
>
> I believe the only thing that requires the TRACE_IRQFLAGS_SUPPORT is
> the irqsoff tracer (and friends), so if anything, we should remove that
> dependency from TRACING_SUPPORT, not here.


OK.
The first two are more trivial, so please pick up
1/3 and 2/3, then drop this one.



BTW, I personally prefer HAVE_* to *_SUPPORT.

Maybe renaming as follows makes the code more consistent.

   STACKTRACE_SUPPORT      -> HAVE_STACKTRACE
   TRACE_IRQFLAGS_SUPPORT  -> HAVE_TRACE_IRQFLAGS



Documentation/kbuild/kconfig-language.rst says
HAVE_* style is the recommended way.



It is a common idiom to implement a feature/functionality that are
relevant for some architectures but not all.
The recommended way to do so is to use a config variable named HAVE_*
that is defined in a common Kconfig file and selected by the relevant
architectures.
An example is the generic IOMAP functionality.

We would in lib/Kconfig see::

  # Generic IOMAP is used to ...
  config HAVE_GENERIC_IOMAP

  config GENERIC_IOMAP
       depends on HAVE_GENERIC_IOMAP && FOO






> -- Steve
>
>
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> > ---
> >
> >  kernel/trace/Kconfig | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
> > index 9d3f918b5867..b39e67db644e 100644
> > --- a/kernel/trace/Kconfig
> > +++ b/kernel/trace/Kconfig
> > @@ -265,7 +265,6 @@ config TRACE_PREEMPT_TOGGLE
> >  config IRQSOFF_TRACER
> >       bool "Interrupts-off Latency Tracer"
> >       default n
> > -     depends on TRACE_IRQFLAGS_SUPPORT
> >       select TRACE_IRQFLAGS
> >       select GENERIC_TRACER
> >       select TRACER_MAX_TRACE
>


--
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ