mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
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]>