Files
linux/rust
Sami Tolvanen 39fe6892fd rust: hrtimer: declare cfi_encoding for hrtimer_restart
The hrtimer callbacks return bindings::hrtimer_restart, which bindgen
generates as c_uint. C calls them through hrtimer->function, which
returns enum hrtimer_restart. kCFI encodes enum types by name even with
integer normalization, so the type ids never match and every call fails
the CFI check.

Generate hrtimer_restart as a newtype with a cfi_encoding, as is done
for lru_status, and adapt HrTimerRestart to the newtype.

Fixes: 8a8afe9349 ("rust: hrtimer: introduce hrtimer support")
Signed-off-by: Sami Tolvanen <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: FUJITA Tomonori <[email protected]>
Tested-by: FUJITA Tomonori <[email protected]>
Acked-by: Andreas Hindborg <[email protected]>
Reviewed-by: Gary Guo <[email protected]>
Acked-by: Danilo Krummrich <[email protected]>
Cc: [email protected]
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
2026-10-22 15:36:01 +02:00
..
2025-11-24 17:15:43 +01:00
2025-11-24 17:15:47 +01:00
2025-03-19 23:22:21 +01:00
2025-10-22 07:47:27 +02:00