[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNAQyAYahxRakc6tivsxqVOVhXkyCweM8VDKZhP7vWPJpJw@mail.gmail.com>
Date: Mon, 15 Jul 2024 22:59:17 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Mark Rutland <mark.rutland@....com>
Cc: Anshuman Khandual <anshuman.khandual@....com>, linux-kbuild@...r.kernel.org,
Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm64: remove redundant 'if HAVE_ARCH_KASAN' in Kconfig
On Mon, Jul 15, 2024 at 10:44 PM Mark Rutland <mark.rutland@....com> wrote:
>
> On Mon, Jul 15, 2024 at 08:11:08AM +0530, Anshuman Khandual wrote:
> > On 7/14/24 16:28, Masahiro Yamada wrote:
> > > The condition 'select HAVE_ARCH_KASAN' is always true because
> > > there is 'select HAVE_ARCH_KASAN' statement above.
> > >
> > > Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> > > ---
> > >
> > > arch/arm64/Kconfig | 6 +++---
> > > 1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> > > index c87d16b12e9b..d37cbfc3031e 100644
> > > --- a/arch/arm64/Kconfig
> > > +++ b/arch/arm64/Kconfig
> > > @@ -167,9 +167,9 @@ config ARM64
> > > select HAVE_ARCH_JUMP_LABEL
> > > select HAVE_ARCH_JUMP_LABEL_RELATIVE
> > > select HAVE_ARCH_KASAN
> > > - select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN
> > > - select HAVE_ARCH_KASAN_SW_TAGS if HAVE_ARCH_KASAN
> > > - select HAVE_ARCH_KASAN_HW_TAGS if (HAVE_ARCH_KASAN && ARM64_MTE)
> > > + select HAVE_ARCH_KASAN_VMALLOC
> > > + select HAVE_ARCH_KASAN_SW_TAGS
> > > + select HAVE_ARCH_KASAN_HW_TAGS if ARM64_MTE
> > > # Some instrumentation may be unsound, hence EXPERT
> > > select HAVE_ARCH_KCSAN if EXPERT
> > > select HAVE_ARCH_KFENCE
> >
> > There is another similar instance with HAVE_FUNCTION_GRAPH_TRACER as well.
> > Just wondering if the following change should be folded in here ?
> >
> > --- a/arch/arm64/Kconfig
> > +++ b/arch/arm64/Kconfig
> > @@ -210,8 +210,8 @@ config ARM64
> > select HAVE_FTRACE_MCOUNT_RECORD
> > select HAVE_FUNCTION_TRACER
> > select HAVE_FUNCTION_ERROR_INJECTION
> > - select HAVE_FUNCTION_GRAPH_RETVAL if HAVE_FUNCTION_GRAPH_TRACER
> > select HAVE_FUNCTION_GRAPH_TRACER
> > + select HAVE_FUNCTION_GRAPH_RETVAL
> > select HAVE_GCC_PLUGINS
> > select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && \
> > HW_PERF_EVENTS && HAVE_PERF_EVENTS_NMI
>
> That looks like a sensible cleanup, but I think it'd be better as a
> separate patch.
>
> It looks like that has always been redundant since it was introduced in
> commit
>
> 3646970322464c21 ("arm64: ftrace: Enable HAVE_FUNCTION_GRAPH_RETVAL")
>
> ... would you mind spinning a patch?
>
> Mark.
Agree.
We can have a separate patch.
I can see more redundant 'if' and 'depends on'.
For example, KERNEL_MODE_NEON is always 'y'.
config KERNEL_MODE_NEON
def_bool y
So, I can see redundancy in
select ARCH_HAS_KERNEL_FPU_SUPPORT if KERNEL_MODE_NEON
and
config EFI
bool "UEFI runtime support"
depends on OF && !CPU_BIG_ENDIAN
depends on KERNEL_MODE_NEON
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists