Thread (15 messages) 15 messages, 7 authors, 2026-01-30

Re: [RFC PATCH 2/2] kbuild: rust: use klint to provide CONFIG_FRAME_WARN

From: Miguel Ojeda <hidden>
Date: 2026-01-27 23:12:55
Also in: linux-kbuild, lkml

On Tue, Jan 27, 2026 at 11:51 PM Gary Guo [off-list ref] wrote:
Lints in Rust do not take arguments, so there's no way to represent something
similar to `-Wframe-larger-than=foo`. However, I've made klint search [1] for
`CONFIG_FRAME_WARN` and use whatever value is there.

Link: https://github.com/Rust-for-Linux/klint/blob/168031d93c3aa538c8ef71d1e448ae77c2cef7a7/src/binary_analysis/stack_size.rs#L70-L82 [1]
I would have suggested a `.klint.toml` like Clippy, but with Clippy we
also want to eventually have a flag-based configuration instead of a
static file (or attributes in the source code which means probably
using conditional compilation in some cases).

So, even if the lint is toggled with `-[AWDF]` style flags, could the
limit be configured in a separate non-`-W` Klint-only flag? Or doesn't
`register_tool` allow for that?

Thanks!

Cheers,
Miguel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help