Re: [PATCH v5 1/5] bug/kunit: Core support for suppressing warning backtraces

2025-05-31 Thread Alessandro Carminati
On Thu, May 29, 2025 at 12:36:55PM +0200, Alessandro Carminati wrote: > > > > Like I said before; you need to do this on the report_bug() size of > > > things. > > > > > I fully understand your concerns, and I truly appreciate both yours > > and Josh’s fee

Re: [PATCH v5 1/5] bug/kunit: Core support for suppressing warning backtraces

2025-05-29 Thread Alessandro Carminati
Hi Peter, Thank you for your follow-up and for reiterating your point. On Thu, May 29, 2025 at 11:01 AM Peter Zijlstra wrote: > > On Mon, May 26, 2025 at 01:27:51PM +, Alessandro Carminati wrote: > > > #define __WARN() __WARN_FLAGS(BUGFLAG_TAINT(TAINT_WARN

[PATCH v5 0/5] kunit: Add support for suppressing warning backtraces

2025-05-26 Thread Alessandro Carminati
Rebased to v6.15-rc7 - Dropped all code in __report_bug() - Moved all checks in WARN*() macros. - Dropped all architecture specific code. - Made __kunit_is_suppressed_warning nice to noinstr functions. Alessandro Carminati (2): bug/kunit: Core support for suppressing warning backtraces bug/kunit:

[PATCH v5 4/5] drm: Suppress intentional warning backtraces in scaling unit tests

2025-05-26 Thread Alessandro Carminati
clogging the kernel log and distraction from real problems. Tested-by: Linux Kernel Functional Testing Acked-by: Dan Carpenter Acked-by: Maíra Canal Cc: Maarten Lankhorst Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Guenter Roeck Signed-off-by: Alessandro Carminati --- drivers/gpu/drm

[PATCH v5 2/5] bug/kunit: Suppressing warning backtraces reduced impact on WARN*() sites

2025-05-26 Thread Alessandro Carminati
e the runtime impact of this patch. To that end, this patch introduces a counter for the number of suppressed symbols and skips execution of __kunit_is_suppressed_warning() entirely when no symbols are currently being suppressed. Signed-off-by: Alessandro Carminati --- include/asm-generic/bug.h

[PATCH v5 5/5] kunit: Add documentation for warning backtrace suppression API

2025-05-26 Thread Alessandro Carminati
From: Guenter Roeck Document API functions for suppressing warning backtraces. Tested-by: Linux Kernel Functional Testing Acked-by: Dan Carpenter Reviewed-by: Kees Cook Signed-off-by: Guenter Roeck Reviewed-by: David Gow Signed-off-by: Alessandro Carminati --- Documentation/dev-tools

[PATCH v5 3/5] Add unit tests to verify that warning backtrace suppression works.

2025-05-26 Thread Alessandro Carminati
Functional Testing Acked-by: Dan Carpenter Reviewed-by: Kees Cook Signed-off-by: Guenter Roeck Signed-off-by: Alessandro Carminati --- lib/kunit/Makefile | 3 + lib/kunit/backtrace-suppression-test.c | 105 + 2 files changed, 108 insertions

[PATCH v5 1/5] bug/kunit: Core support for suppressing warning backtraces

2025-05-26 Thread Alessandro Carminati
optimizations to preserve portability. Since this mechanism compares function names and is intended for test usage only, performance is not a primary concern. Signed-off-by: Guenter Roeck Signed-off-by: Alessandro Carminati --- include/asm-generic/bug.h | 41 -- include/kunit

[PATCH] kunit: fixes backtrace suppression test module description

2025-03-29 Thread Alessandro Carminati
Adds module description to the backtrace suppression test Fixes: ("19f3496") kunit: add test cases for backtrace warning suppression Signed-off-by: Alessandro Carminati --- lib/kunit/backtrace-suppression-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/kunit

[PATCH] kunit: fixes Compilation error on s390

2025-03-29 Thread Alessandro Carminati
d for compilation, and support for this scenario is available in GCC 11 and later. Fixes: d8b14a2 ("bug/kunit: core support for suppressing warning backtraces") Signed-off-by: Alessandro Carminati --- lib/kunit/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/kunit/Kcon

Re: [PATCH v4 10/14] s390: Add support for suppressing warning backtraces

2025-03-21 Thread Alessandro Carminati
Hello Guenter, Sorry for being late to the party. On Fri, Mar 21, 2025 at 6:06 PM Guenter Roeck wrote: > > On 3/13/25 04:43, Alessandro Carminati wrote: > > From: Guenter Roeck > > > > Add name of functions triggering warning backtraces to the __bug_table > > ob

Re: [PATCH v4 07/14] arm64: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
Hello Will, On Thu, Mar 13, 2025 at 1:25 PM Will Deacon wrote: > > On Thu, Mar 13, 2025 at 11:43:22AM +, Alessandro Carminati wrote: > > diff --git a/arch/arm64/include/asm/bug.h b/arch/arm64/include/asm/bug.h > > index 28be048db3f6..044c5e24a17d 100644 > > --- a/arch

[PATCH v4 02/14] kunit: bug: Count suppressed warning backtraces

2025-03-13 Thread Alessandro Carminati
integer for now. Acked-by: Dan Carpenter Reviewed-by: Kees Cook Tested-by: Linux Kernel Functional Testing Signed-off-by: Guenter Roeck Reviewed-by: David Gow Signed-off-by: Alessandro Carminati --- include/kunit/bug.h | 7 ++- lib/kunit/bug.c | 4 +++- 2 files changed, 9 insertions

[PATCH v4 11/14] sh: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
Functional Testing Acked-by: Dan Carpenter Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz Signed-off-by: Guenter Roeck Signed-off-by: Alessandro Carminati --- arch/sh/include/asm/bug.h | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff

[PATCH v4 12/14] sh: Move defines needed for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
above the kerneldoc entry for _EMIT_BUG_ENTRY to make kerneldoc happy. Reported-by: Simon Horman Cc: Simon Horman Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz Signed-off-by: Guenter Roeck Signed-off-by: Alessandro Carminati --- arch/sh/include/asm/bug.h | 16 +-

[PATCH v4 08/14] loongarch: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
Functional Testing Acked-by: Dan Carpenter Cc: Huacai Chen Signed-off-by: Guenter Roeck Signed-off-by: Alessandro Carminati --- arch/loongarch/include/asm/bug.h | 42 ++-- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/arch/loongarch/include/asm/bug.h

[PATCH v4 03/14] kunit: Add test cases for backtrace warning suppression

2025-03-13 Thread Alessandro Carminati
Functional Testing Acked-by: Dan Carpenter Reviewed-by: Kees Cook Signed-off-by: Guenter Roeck Signed-off-by: Alessandro Carminati --- lib/kunit/Makefile | 7 +- lib/kunit/backtrace-suppression-test.c | 104 + 2 files changed, 109 insertions(+), 2

[PATCH v4 13/14] riscv: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
-by: Guenter Roeck Reviewed-by: Charlie Jenkins Signed-off-by: Alessandro Carminati --- arch/riscv/include/asm/bug.h | 38 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/arch/riscv/include/asm/bug.h b/arch/riscv/include/asm/bug.h index

[PATCH v4 14/14] powerpc: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
Functional Testing Acked-by: Dan Carpenter Cc: Michael Ellerman Signed-off-by: Guenter Roeck Acked-by: Michael Ellerman Signed-off-by: Alessandro Carminati --- arch/powerpc/include/asm/bug.h | 37 +- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a

[PATCH v4 10/14] s390: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
Functional Testing Acked-by: Dan Carpenter Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Signed-off-by: Guenter Roeck Signed-off-by: Alessandro Carminati --- arch/s390/include/asm/bug.h | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/arch

[PATCH v4 09/14] parisc: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
assembler parameters as constants where possible. Refine .blockz instructions to calculate the necessary padding instead of using fixed values. Tested-by: Linux Kernel Functional Testing Acked-by: Dan Carpenter Acked-by: Helge Deller Signed-off-by: Guenter Roeck Signed-off-by: Alessandro Carminati

[PATCH v4 07/14] arm64: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
Functional Testing Acked-by: Dan Carpenter Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Guenter Roeck Signed-off-by: Alessandro Carminati --- arch/arm64/include/asm/asm-bug.h | 27 ++- arch/arm64/include/asm/bug.h | 8 +++- 2 files changed, 25 insertions

[PATCH v4 05/14] drm: Suppress intentional warning backtraces in scaling unit tests

2025-03-13 Thread Alessandro Carminati
clogging the kernel log and distraction from real problems. Tested-by: Linux Kernel Functional Testing Acked-by: Dan Carpenter Acked-by: Maíra Canal Cc: Maarten Lankhorst Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Guenter Roeck Signed-off-by: Alessandro Carminati --- drivers/gpu

[PATCH v4 06/14] x86: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
Functional Testing Acked-by: Dan Carpenter Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Signed-off-by: Guenter Roeck Signed-off-by: Alessandro Carminati --- arch/x86/include/asm/bug.h | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff

[PATCH v4 01/14] bug/kunit: Core support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
. Cc: Dan Carpenter Cc: Daniel Diaz Cc: Naresh Kamboju Cc: Kees Cook Tested-by: Linux Kernel Functional Testing Acked-by: Dan Carpenter Reviewed-by: Kees Cook Signed-off-by: Guenter Roeck Signed-off-by: Alessandro Carminati --- include/asm-generic/bug.h | 16 +--- include/k

[PATCH v4 04/14] kunit: Add documentation for warning backtrace suppression API

2025-03-13 Thread Alessandro Carminati
From: Guenter Roeck Document API functions for suppressing warning backtraces. Tested-by: Linux Kernel Functional Testing Acked-by: Dan Carpenter Reviewed-by: Kees Cook Signed-off-by: Guenter Roeck Reviewed-by: David Gow Signed-off-by: Alessandro Carminati --- Documentation/dev-tools

[PATCH v4 00/14] Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
Some unit tests intentionally trigger warning backtraces by passing bad parameters to kernel API functions. Such unit tests typically check the return value from such calls, not the existence of the warning backtrace. Such intentionally generated warning backtraces are neither desirable nor useful