* [PATCH] Makefile.kcov: apply needed compiler option unconditionally in CFLAGS_KCOV
@ 2025-05-07 13:30 Lukas Bulwahn
2025-05-08 16:44 ` Nathan Chancellor
0 siblings, 1 reply; 6+ messages in thread
From: Lukas Bulwahn @ 2025-05-07 13:30 UTC (permalink / raw)
To: Masahiro Yamada, Nathan Chancellor, Nicolas Schier, Dmitry Vyukov,
Andrey Konovalov, Arnd Bergmann, linux-kbuild, kasan-dev
Cc: kernel-janitors, linux-kernel, Lukas Bulwahn
From: Lukas Bulwahn <lukas.bulwahn@redhat.com>
Commit 852faf805539 ("gcc-plugins: remove SANCOV gcc plugin") removes the
config CC_HAS_SANCOV_TRACE_PC, as all supported compilers include the
compiler option '-fsanitize-coverage=trace-pc' by now.
The commit however misses the important use of this config option in
Makefile.kcov to add '-fsanitize-coverage=trace-pc' to CFLAGS_KCOV.
Include the compiler option '-fsanitize-coverage=trace-pc' unconditionally
to CFLAGS_KCOV, as all compilers provide that option now.
Fixes: 852faf805539 ("gcc-plugins: remove SANCOV gcc plugin")
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com>
---
scripts/Makefile.kcov | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/Makefile.kcov b/scripts/Makefile.kcov
index 67de7942b3e7..01616472f43e 100644
--- a/scripts/Makefile.kcov
+++ b/scripts/Makefile.kcov
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
-kcov-flags-$(CONFIG_CC_HAS_SANCOV_TRACE_PC) += -fsanitize-coverage=trace-pc
+kcov-flags-y += -fsanitize-coverage=trace-pc
kcov-flags-$(CONFIG_KCOV_ENABLE_COMPARISONS) += -fsanitize-coverage=trace-cmp
export CFLAGS_KCOV := $(kcov-flags-y)
--
2.49.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] Makefile.kcov: apply needed compiler option unconditionally in CFLAGS_KCOV 2025-05-07 13:30 [PATCH] Makefile.kcov: apply needed compiler option unconditionally in CFLAGS_KCOV Lukas Bulwahn @ 2025-05-08 16:44 ` Nathan Chancellor 2025-05-20 14:56 ` Dmitry Vyukov 0 siblings, 1 reply; 6+ messages in thread From: Nathan Chancellor @ 2025-05-08 16:44 UTC (permalink / raw) To: Lukas Bulwahn Cc: Masahiro Yamada, Nicolas Schier, Dmitry Vyukov, Andrey Konovalov, Arnd Bergmann, linux-kbuild, kasan-dev, kernel-janitors, linux-kernel, Lukas Bulwahn On Wed, May 07, 2025 at 03:30:43PM +0200, Lukas Bulwahn wrote: > From: Lukas Bulwahn <lukas.bulwahn@redhat.com> > > Commit 852faf805539 ("gcc-plugins: remove SANCOV gcc plugin") removes the > config CC_HAS_SANCOV_TRACE_PC, as all supported compilers include the > compiler option '-fsanitize-coverage=trace-pc' by now. > > The commit however misses the important use of this config option in > Makefile.kcov to add '-fsanitize-coverage=trace-pc' to CFLAGS_KCOV. > Include the compiler option '-fsanitize-coverage=trace-pc' unconditionally > to CFLAGS_KCOV, as all compilers provide that option now. > > Fixes: 852faf805539 ("gcc-plugins: remove SANCOV gcc plugin") > Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com> Good catch. Reviewed-by: Nathan Chancellor <nathan@kernel.org> > --- > scripts/Makefile.kcov | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/Makefile.kcov b/scripts/Makefile.kcov > index 67de7942b3e7..01616472f43e 100644 > --- a/scripts/Makefile.kcov > +++ b/scripts/Makefile.kcov > @@ -1,5 +1,5 @@ > # SPDX-License-Identifier: GPL-2.0-only > -kcov-flags-$(CONFIG_CC_HAS_SANCOV_TRACE_PC) += -fsanitize-coverage=trace-pc > +kcov-flags-y += -fsanitize-coverage=trace-pc > kcov-flags-$(CONFIG_KCOV_ENABLE_COMPARISONS) += -fsanitize-coverage=trace-cmp > > export CFLAGS_KCOV := $(kcov-flags-y) > -- > 2.49.0 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Makefile.kcov: apply needed compiler option unconditionally in CFLAGS_KCOV 2025-05-08 16:44 ` Nathan Chancellor @ 2025-05-20 14:56 ` Dmitry Vyukov 2025-05-21 10:02 ` Alexander Potapenko 0 siblings, 1 reply; 6+ messages in thread From: Dmitry Vyukov @ 2025-05-20 14:56 UTC (permalink / raw) To: Nathan Chancellor Cc: Lukas Bulwahn, Masahiro Yamada, Nicolas Schier, Andrey Konovalov, Arnd Bergmann, linux-kbuild, kasan-dev, kernel-janitors, linux-kernel, Lukas Bulwahn On Thu, 8 May 2025 at 18:44, Nathan Chancellor <nathan@kernel.org> wrote: > > On Wed, May 07, 2025 at 03:30:43PM +0200, Lukas Bulwahn wrote: > > From: Lukas Bulwahn <lukas.bulwahn@redhat.com> > > > > Commit 852faf805539 ("gcc-plugins: remove SANCOV gcc plugin") removes the > > config CC_HAS_SANCOV_TRACE_PC, as all supported compilers include the > > compiler option '-fsanitize-coverage=trace-pc' by now. > > > > The commit however misses the important use of this config option in > > Makefile.kcov to add '-fsanitize-coverage=trace-pc' to CFLAGS_KCOV. > > Include the compiler option '-fsanitize-coverage=trace-pc' unconditionally > > to CFLAGS_KCOV, as all compilers provide that option now. > > > > Fixes: 852faf805539 ("gcc-plugins: remove SANCOV gcc plugin") > > Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com> > > Good catch. > > Reviewed-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Dmitry Vyukov <dvyukov@google.com> Thanks for fixing this! > > --- > > scripts/Makefile.kcov | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/scripts/Makefile.kcov b/scripts/Makefile.kcov > > index 67de7942b3e7..01616472f43e 100644 > > --- a/scripts/Makefile.kcov > > +++ b/scripts/Makefile.kcov > > @@ -1,5 +1,5 @@ > > # SPDX-License-Identifier: GPL-2.0-only > > -kcov-flags-$(CONFIG_CC_HAS_SANCOV_TRACE_PC) += -fsanitize-coverage=trace-pc > > +kcov-flags-y += -fsanitize-coverage=trace-pc > > kcov-flags-$(CONFIG_KCOV_ENABLE_COMPARISONS) += -fsanitize-coverage=trace-cmp > > > > export CFLAGS_KCOV := $(kcov-flags-y) > > -- > > 2.49.0 > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Makefile.kcov: apply needed compiler option unconditionally in CFLAGS_KCOV 2025-05-20 14:56 ` Dmitry Vyukov @ 2025-05-21 10:02 ` Alexander Potapenko 2025-05-21 14:10 ` Arnd Bergmann 0 siblings, 1 reply; 6+ messages in thread From: Alexander Potapenko @ 2025-05-21 10:02 UTC (permalink / raw) To: Linux Memory Management List, Andrew Morton Cc: Nathan Chancellor, Lukas Bulwahn, Masahiro Yamada, Nicolas Schier, Andrey Konovalov, Arnd Bergmann, linux-kbuild, kasan-dev, kernel-janitors, linux-kernel, Lukas Bulwahn, Dmitry Vyukov On Tue, May 20, 2025 at 4:57 PM 'Dmitry Vyukov' via kasan-dev <kasan-dev@googlegroups.com> wrote: > > On Thu, 8 May 2025 at 18:44, Nathan Chancellor <nathan@kernel.org> wrote: > > > > On Wed, May 07, 2025 at 03:30:43PM +0200, Lukas Bulwahn wrote: > > > From: Lukas Bulwahn <lukas.bulwahn@redhat.com> > > > > > > Commit 852faf805539 ("gcc-plugins: remove SANCOV gcc plugin") removes the > > > config CC_HAS_SANCOV_TRACE_PC, as all supported compilers include the > > > compiler option '-fsanitize-coverage=trace-pc' by now. > > > > > > The commit however misses the important use of this config option in > > > Makefile.kcov to add '-fsanitize-coverage=trace-pc' to CFLAGS_KCOV. > > > Include the compiler option '-fsanitize-coverage=trace-pc' unconditionally > > > to CFLAGS_KCOV, as all compilers provide that option now. > > > > > > Fixes: 852faf805539 ("gcc-plugins: remove SANCOV gcc plugin") > > > Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com> > > > > Good catch. > > > > Reviewed-by: Nathan Chancellor <nathan@kernel.org> > > Reviewed-by: Dmitry Vyukov <dvyukov@google.com> > > Thanks for fixing this! @akpm, could you please take this patch at your convenience? ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Makefile.kcov: apply needed compiler option unconditionally in CFLAGS_KCOV 2025-05-21 10:02 ` Alexander Potapenko @ 2025-05-21 14:10 ` Arnd Bergmann 2025-05-22 8:18 ` Alexander Potapenko 0 siblings, 1 reply; 6+ messages in thread From: Arnd Bergmann @ 2025-05-21 14:10 UTC (permalink / raw) To: Alexander Potapenko, Linux Memory Management List, Andrew Morton Cc: Nathan Chancellor, Lukas Bulwahn, Masahiro Yamada, Nicolas Schier, Andrey Konovalov, linux-kbuild, kasan-dev, kernel-janitors, linux-kernel, Lukas Bulwahn, Dmitry Vyukov On Wed, May 21, 2025, at 12:02, Alexander Potapenko wrote: > On Tue, May 20, 2025 at 4:57 PM 'Dmitry Vyukov' via kasan-dev > <kasan-dev@googlegroups.com> wrote: >> >> On Thu, 8 May 2025 at 18:44, Nathan Chancellor <nathan@kernel.org> wrote: >> > >> > On Wed, May 07, 2025 at 03:30:43PM +0200, Lukas Bulwahn wrote: >> > > From: Lukas Bulwahn <lukas.bulwahn@redhat.com> >> > > >> > > Commit 852faf805539 ("gcc-plugins: remove SANCOV gcc plugin") removes the >> > > config CC_HAS_SANCOV_TRACE_PC, as all supported compilers include the >> > > compiler option '-fsanitize-coverage=trace-pc' by now. >> > > >> > > The commit however misses the important use of this config option in >> > > Makefile.kcov to add '-fsanitize-coverage=trace-pc' to CFLAGS_KCOV. >> > > Include the compiler option '-fsanitize-coverage=trace-pc' unconditionally >> > > to CFLAGS_KCOV, as all compilers provide that option now. >> > > >> > > Fixes: 852faf805539 ("gcc-plugins: remove SANCOV gcc plugin") >> > > Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com> >> > >> > Good catch. >> > >> > Reviewed-by: Nathan Chancellor <nathan@kernel.org> >> >> Reviewed-by: Dmitry Vyukov <dvyukov@google.com> >> >> Thanks for fixing this! > > @akpm, could you please take this patch at your convenience? I have applied it on the asm-generic tree now, as this contains the original broken commit. Sorry for missing it earlier. Arnd ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Makefile.kcov: apply needed compiler option unconditionally in CFLAGS_KCOV 2025-05-21 14:10 ` Arnd Bergmann @ 2025-05-22 8:18 ` Alexander Potapenko 0 siblings, 0 replies; 6+ messages in thread From: Alexander Potapenko @ 2025-05-22 8:18 UTC (permalink / raw) To: Arnd Bergmann Cc: Linux Memory Management List, Andrew Morton, Nathan Chancellor, Lukas Bulwahn, Masahiro Yamada, Nicolas Schier, Andrey Konovalov, linux-kbuild, kasan-dev, kernel-janitors, linux-kernel, Lukas Bulwahn, Dmitry Vyukov On Wed, May 21, 2025 at 4:11 PM Arnd Bergmann <arnd@arndb.de> wrote: > > On Wed, May 21, 2025, at 12:02, Alexander Potapenko wrote: > > On Tue, May 20, 2025 at 4:57 PM 'Dmitry Vyukov' via kasan-dev > > <kasan-dev@googlegroups.com> wrote: > >> > >> On Thu, 8 May 2025 at 18:44, Nathan Chancellor <nathan@kernel.org> wrote: > >> > > >> > On Wed, May 07, 2025 at 03:30:43PM +0200, Lukas Bulwahn wrote: > >> > > From: Lukas Bulwahn <lukas.bulwahn@redhat.com> > >> > > > >> > > Commit 852faf805539 ("gcc-plugins: remove SANCOV gcc plugin") removes the > >> > > config CC_HAS_SANCOV_TRACE_PC, as all supported compilers include the > >> > > compiler option '-fsanitize-coverage=trace-pc' by now. > >> > > > >> > > The commit however misses the important use of this config option in > >> > > Makefile.kcov to add '-fsanitize-coverage=trace-pc' to CFLAGS_KCOV. > >> > > Include the compiler option '-fsanitize-coverage=trace-pc' unconditionally > >> > > to CFLAGS_KCOV, as all compilers provide that option now. > >> > > > >> > > Fixes: 852faf805539 ("gcc-plugins: remove SANCOV gcc plugin") > >> > > Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com> > >> > > >> > Good catch. > >> > > >> > Reviewed-by: Nathan Chancellor <nathan@kernel.org> > >> > >> Reviewed-by: Dmitry Vyukov <dvyukov@google.com> > >> > >> Thanks for fixing this! > > > > @akpm, could you please take this patch at your convenience? > > I have applied it on the asm-generic tree now, as this contains > the original broken commit. Sorry for missing it earlier. Thanks! ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-05-22 8:19 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-05-07 13:30 [PATCH] Makefile.kcov: apply needed compiler option unconditionally in CFLAGS_KCOV Lukas Bulwahn 2025-05-08 16:44 ` Nathan Chancellor 2025-05-20 14:56 ` Dmitry Vyukov 2025-05-21 10:02 ` Alexander Potapenko 2025-05-21 14:10 ` Arnd Bergmann 2025-05-22 8:18 ` Alexander Potapenko
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox