linux/rust
FUJITA Tomonori 951d09ca45 rust: bug: pass TAINT_WARN to warn_slowpath_fmt() on UML
On UML, `warn_flags!` calls `warn_slowpath_fmt()` directly. Its third
argument is a taint number, but `warn_on!` passes its bug flags there.

As a result, `add_taint()` gets 2304 instead of 9 (`TAINT_WARN`). The
warning is not recorded: `/proc/sys/kernel/tainted` stays 0 after
`warn_on!` fires, where it should be 512. It also causes an
out-of-bounds write in `add_taint()`.

Pass `TAINT_WARN` directly, as C does on UML.

Cc: stable@vger.kernel.org
Fixes: dff64b0727 ("rust: Add warn_on macro")
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Link: https://patch.msgid.link/20261001123103.2198104-1-tomo@flapping.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2026-10-01 21:52:45 +02:00
..
bindings rust: bindings: fix VM_MAYSHARE value 2026-09-30 14:31:13 +02:00
helpers Char/Misc/IIO/etc driver update for 7.3-rc1 2026-08-25 09:38:50 -07:00
kernel rust: bug: pass TAINT_WARN to warn_slowpath_fmt() on UML 2026-10-01 21:52:45 +02:00
macros rust: macros: allow non-ASCII characters in authors 2026-10-01 21:19:43 +02:00
pin-init rust: pin-init: use irrefutable pattern for stack_pin_init 2026-09-01 01:27:55 +02:00
proc-macro2 rust: proc-macro2: rebuild if the version text changes 2026-01-23 10:44:27 +01:00
quote rust: quote: add README.md 2025-11-24 17:15:43 +01:00
syn rust: syn: add README.md 2025-11-24 17:15:47 +01:00
uapi rust: allow unknown_lints in generated bindings for Rust < 1.88 2026-09-08 23:29:18 +02:00
zerocopy rust: zerocopy: update to v0.8.54 2026-07-11 13:46:02 +02:00
zerocopy-derive rust: zerocopy: update to v0.8.54 2026-07-11 13:46:02 +02:00
.gitignore rust: support running Rust documentation tests as KUnit ones 2023-07-19 09:32:53 -06:00
.kunitconfig rust: add kunitconfig 2025-03-19 23:22:21 +01:00
bindgen_parameters rust: bindings: fix VM_MAYSHARE blocklist entry 2026-09-30 16:41:24 +02:00
build_error.rs rust: add build_error crate 2022-12-04 01:59:16 +01:00
compiler_builtins.rs rust: Make __udivdi3() and __umoddi3() panic 2026-07-31 16:57:48 +05:30
exports.c kbuild: rust: provide an option to inline C helpers into Rust 2026-03-30 02:03:52 +02:00
ffi.rs rust: replace CStr with core::ffi::CStr 2025-10-22 07:47:27 +02:00
Makefile Rust fixes for v7.3 2026-08-30 09:47:39 -07:00