Skip to content

[PW_SID:959015] rust: Add bug/warn abstractions#366

Closed
linux-riscv-bot wants to merge 5 commits into
workflow__riscv__fixesfrom
pw959015
Closed

[PW_SID:959015] rust: Add bug/warn abstractions#366
linux-riscv-bot wants to merge 5 commits into
workflow__riscv__fixesfrom
pw959015

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 959015 applied to workflow__riscv__fixes

Name: rust: Add bug/warn abstractions
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=959015
Version: 6

Linux RISC-V bot and others added 5 commits April 30, 2025 11:41
Add new ARCH_WARN_ASM macro for BUG/WARN assembly code sharing with
Rust to avoid the duplication.

No functional changes.

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
… Rust

Add new ARCH_WARN_ASM macro for BUG/WARN assembly code sharing with
Rust to avoid the duplication.

No functional changes.

Acked-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
… Rust

Add new ARCH_WARN_ASM macro for BUG/WARN assembly code sharing with
Rust to avoid the duplication.

No functional changes.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add warn_on macro, uses the BUG/WARN feature (lib/bug.c) via assembly
for x86_64/arm64/riscv.

The current Rust code simply wraps BUG() macro but doesn't provide the
proper debug information. The BUG/WARN feature can only be used from
assembly.

This uses the assembly code exported by the C side via ARCH_WARN_ASM
macro. To avoid duplicating the assembly code, this approach follows
the same strategy as the static branch code: it generates the assembly
code for Rust using the C preprocessor at compile time.

Similarly, ARCH_WARN_REACHABLE is also used at compile time to
generate the assembly code; objtool's reachable annotation code. It's
used for only architectures that use objtool.

For now, Loongarch and arm just use a wrapper for WARN macro.

UML doesn't use the assembly BUG/WARN feature; just wrapping generic
BUG/WARN functions implemented in C works.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v6,1/4] x86/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 105.81 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v6,1/4] x86/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 879.33 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v6,1/4] x86/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1143.43 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v6,1/4] x86/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.51 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v6,1/4] x86/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.50 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v6,1/4] x86/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.48 seconds
Result: WARNING
Output:

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#28: FILE: arch/x86/include/asm/bug.h:35:
+# define __BUG_REL(val)	".long " val

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#31: FILE: arch/x86/include/asm/bug.h:37:
+# define __BUG_REL(val)	".long " val " - ."

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#35: FILE: arch/x86/include/asm/bug.h:41:
+#define __BUG_ENTRY(file, line, flags)					\

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#36: FILE: arch/x86/include/asm/bug.h:42:
+	"2:\t" __BUG_REL("1b") "\t# bug_entry::bug_addr\n"		\

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#37: FILE: arch/x86/include/asm/bug.h:43:
+	"\t" __BUG_REL(file)   "\t# bug_entry::file\n"			\

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#41: FILE: arch/x86/include/asm/bug.h:47:
+#define __BUG_ENTRY(file, ine, flags)					\

WARNING: Argument 'file' is not used in function-like macro
#41: FILE: arch/x86/include/asm/bug.h:47:
+#define __BUG_ENTRY(file, ine, flags)					\
+	"2:\t" __BUG_REL("1b") "\t# bug_entry::bug_addr\n"		\
+	"\t.word " flags       "\t# bug_entry::flags\n"

WARNING: Argument 'ine' is not used in function-like macro
#41: FILE: arch/x86/include/asm/bug.h:47:
+#define __BUG_ENTRY(file, ine, flags)					\
+	"2:\t" __BUG_REL("1b") "\t# bug_entry::bug_addr\n"		\
+	"\t.word " flags       "\t# bug_entry::flags\n"

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#42: FILE: arch/x86/include/asm/bug.h:48:
+	"2:\t" __BUG_REL("1b") "\t# bug_entry::bug_addr\n"		\

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#46: FILE: arch/x86/include/asm/bug.h:52:
+#define _BUG_FLAGS_ASM(ins, file, line, flags, size, extra)		\

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#49: FILE: arch/x86/include/asm/bug.h:55:
+	__BUG_ENTRY(file, line, flags)					\

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#65: FILE: arch/x86/include/asm/bug.h:62:
+	asm_inline volatile(_BUG_FLAGS_ASM(ins, "%c0",			\

WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst
#65: FILE: arch/x86/include/asm/bug.h:62:
+	asm_inline volatile(_BUG_FLAGS_ASM(ins, "%c0",			\

WARNING: function definition argument 'struct bug_entry' should also have an identifier name
#65: FILE: arch/x86/include/asm/bug.h:62:
+	asm_inline volatile(_BUG_FLAGS_ASM(ins, "%c0",			\

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#89: FILE: arch/x86/include/asm/bug.h:70:
+	_BUG_FLAGS_ASM(ASM_UD2, file, line, flags, size, "")

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#105: FILE: arch/x86/include/asm/bug.h:99:
+	_BUG_FLAGS(ASM_UD2, __flags, ARCH_WARN_REACHABLE);	\

total: 0 errors, 16 warnings, 0 checks, 84 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 9e4fa30c0926 ("x86/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 16 warnings, 0 checks, 84 lines checked
WARNING: Argument 'file' is not used in function-like macro
WARNING: Argument 'ine' is not used in function-like macro
WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst
WARNING: function definition argument 'struct bug_entry' should also have an identifier name


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v6,1/4] x86/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 66.96 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v6,1/4] x86/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.65 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v6,1/4] x86/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
kdoc
Desc: Detects for kdoc errors
Duration: 0.88 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v6,1/4] x86/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
module-param
Desc: Detect module_param changes
Duration: 1.39 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v6,1/4] x86/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v6,1/4] x86/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v6,2/4] riscv/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 104.79 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v6,2/4] riscv/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1923.43 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v6,2/4] riscv/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 2451.05 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v6,2/4] riscv/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.57 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v6,2/4] riscv/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.72 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v6,2/4] riscv/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.52 seconds
Result: WARNING
Output:

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#28: FILE: arch/riscv/include/asm/bug.h:34:
+#define __BUG_ENTRY_FILE(file)	RISCV_INT " " file " - ."

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#32: FILE: arch/riscv/include/asm/bug.h:37:
+#define __BUG_ENTRY_FILE(file)	RISCV_PTR " " file

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#37: FILE: arch/riscv/include/asm/bug.h:41:
+#define __BUG_ENTRY(file, line, flags)	\

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#42: FILE: arch/riscv/include/asm/bug.h:43:
+	__BUG_ENTRY_FILE(file) "\n\t"	\

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#49: FILE: arch/riscv/include/asm/bug.h:47:
+#define __BUG_ENTRY(file, line, flags)		\

WARNING: Argument 'file' is not used in function-like macro
#49: FILE: arch/riscv/include/asm/bug.h:47:
+#define __BUG_ENTRY(file, line, flags)		\
+	__BUG_ENTRY_ADDR "\n\t"			\
+	RISCV_SHORT " " flags

WARNING: Argument 'line' is not used in function-like macro
#49: FILE: arch/riscv/include/asm/bug.h:47:
+#define __BUG_ENTRY(file, line, flags)		\
+	__BUG_ENTRY_ADDR "\n\t"			\
+	RISCV_SHORT " " flags

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#67: FILE: arch/riscv/include/asm/bug.h:59:
+		__BUG_ENTRY(file, line, flags) "\n\t"		\

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#71: FILE: arch/riscv/include/asm/bug.h:63:
+#define __BUG_FLAGS(flags)					\

WARNING: Single statement macros should not use a do {} while (0) loop
#71: FILE: arch/riscv/include/asm/bug.h:63:
+#define __BUG_FLAGS(flags)					\
+do {								\
+	__asm__ __volatile__ (					\
+		ARCH_WARN_ASM("%0", "%1", "%2", "%3")		\
 		:						\
 		: "i" (__FILE__), "i" (__LINE__),		\
 		  "i" (flags),					\
 		  "i" (sizeof(struct bug_entry)));              \
 } while (0)

total: 0 errors, 10 warnings, 0 checks, 68 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 091d3a80ff53 ("riscv/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 10 warnings, 0 checks, 68 lines checked
WARNING: Argument 'file' is not used in function-like macro
WARNING: Argument 'line' is not used in function-like macro
WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
WARNING: Single statement macros should not use a do {} while (0) loop


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v6,2/4] riscv/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 66.57 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v6,2/4] riscv/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v6,2/4] riscv/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
kdoc
Desc: Detects for kdoc errors
Duration: 0.85 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v6,2/4] riscv/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v6,2/4] riscv/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v6,2/4] riscv/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v6,3/4] arm64/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 105.42 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v6,3/4] arm64/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 879.72 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v6,3/4] arm64/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1146.54 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v6,3/4] arm64/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.48 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v6,3/4] arm64/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v6,3/4] arm64/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.47 seconds
Result: ERROR
Output:

WARNING: macros should not use a trailing semicolon
#29: FILE: arch/arm64/include/asm/asm-bug.h:24:
+#define __BUG_ENTRY_START				\
 		.pushsection __bug_table,"aw";		\
 		.align 2;				\
 	14470:	.long 14471f - .;			\
+

ERROR: Macros with multiple statements should be enclosed in a do - while loop
#36: FILE: arch/arm64/include/asm/asm-bug.h:29:
+#define __BUG_ENTRY_END					\
 		.align 2;				\
 		.popsection;				\
 	14471:

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#41: FILE: arch/arm64/include/asm/asm-bug.h:34:
+#define __BUG_ENTRY(flags)				\

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#54: FILE: arch/arm64/include/asm/asm-bug.h:50:
+#define __BUG_LOCATION_STRING(file, line)		\

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#58: FILE: arch/arm64/include/asm/asm-bug.h:54:
+#define __BUG_LOCATION_STRING(file, line)

WARNING: Argument 'file' is not used in function-like macro
#58: FILE: arch/arm64/include/asm/asm-bug.h:54:
+#define __BUG_LOCATION_STRING(file, line)

WARNING: Argument 'line' is not used in function-like macro
#58: FILE: arch/arm64/include/asm/asm-bug.h:54:
+#define __BUG_LOCATION_STRING(file, line)

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#61: FILE: arch/arm64/include/asm/asm-bug.h:57:
+#define __BUG_ENTRY_STRING(file, line, flags)		\

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#63: FILE: arch/arm64/include/asm/asm-bug.h:59:
+		__BUG_LOCATION_STRING(file, line)	\

ERROR: Macros with complex values should be enclosed in parentheses
#67: FILE: arch/arm64/include/asm/asm-bug.h:63:
+#define ARCH_WARN_ASM(file, line, flags, size)		\
+	__BUG_ENTRY_STRING(file, line, flags)		\
+	__stringify(brk BUG_BRK_IMM)

WARNING: Argument 'size' is not used in function-like macro
#67: FILE: arch/arm64/include/asm/asm-bug.h:63:
+#define ARCH_WARN_ASM(file, line, flags, size)		\
+	__BUG_ENTRY_STRING(file, line, flags)		\
+	__stringify(brk BUG_BRK_IMM)

WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
#68: FILE: arch/arm64/include/asm/asm-bug.h:64:
+	__BUG_ENTRY_STRING(file, line, flags)		\

total: 2 errors, 10 warnings, 0 checks, 49 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 49c8fc04f83b ("arm64/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
ERROR: Macros with complex values should be enclosed in parentheses
ERROR: Macros with multiple statements should be enclosed in a do - while loop
WARNING: Argument 'file' is not used in function-like macro
WARNING: Argument 'line' is not used in function-like macro
WARNING: Argument 'size' is not used in function-like macro
WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants
WARNING: macros should not use a trailing semicolon


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v6,3/4] arm64/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 67.00 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v6,3/4] arm64/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v6,3/4] arm64/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
kdoc
Desc: Detects for kdoc errors
Duration: 0.88 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v6,3/4] arm64/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v6,3/4] arm64/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v6,3/4] arm64/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v6,4/4] rust: Add warn_on macro"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 105.47 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v6,4/4] rust: Add warn_on macro"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 879.92 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v6,4/4] rust: Add warn_on macro"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1146.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v6,4/4] rust: Add warn_on macro"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.31 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v6,4/4] rust: Add warn_on macro"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.40 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v6,4/4] rust: Add warn_on macro"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 3.19 seconds
Result: WARNING
Output:

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#91: 
new file mode 100644

WARNING: line length of 104 exceeds 100 columns
#133: FILE: rust/kernel/bug.rs:38:
+                    include!(concat!(env!("OBJTREE"), "/rust/kernel/generated_arch_reachable_asm.rs")));

WARNING: line length of 104 exceeds 100 columns
#161: FILE: rust/kernel/bug.rs:66:
+                    include!(concat!(env!("OBJTREE"), "/rust/kernel/generated_arch_reachable_asm.rs")));

total: 0 errors, 3 warnings, 0 checks, 178 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit cf494b9e5959 ("rust: Add warn_on macro") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 3 warnings, 0 checks, 178 lines checked
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
WARNING: line length of 104 exceeds 100 columns


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v6,4/4] rust: Add warn_on macro"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 67.07 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v6,4/4] rust: Add warn_on macro"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v6,4/4] rust: Add warn_on macro"
kdoc
Desc: Detects for kdoc errors
Duration: 0.90 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v6,4/4] rust: Add warn_on macro"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v6,4/4] rust: Add warn_on macro"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v6,4/4] rust: Add warn_on macro"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot force-pushed the workflow__riscv__fixes branch 2 times, most recently from 625be03 to 472f050 Compare May 8, 2025 16:53
@linux-riscv-bot linux-riscv-bot deleted the pw959015 branch May 8, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants