aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorAndreas Hindborg <[email protected]>2025-06-12 13:09:43 +0000
committerMiguel Ojeda <[email protected]>2025-07-14 21:55:24 +0000
commit12717ebeffcf3e34063dbc1e1b7f34924150c7c9 (patch)
treecc9818d02cff1adcc0c3029b5e8f522a8d126116 /rust/helpers/helpers.c
parentrust: rbtree: simplify finding `current` in `remove_current` (diff)
downloadkernel-12717ebeffcf3e34063dbc1e1b7f34924150c7c9.tar.gz
kernel-12717ebeffcf3e34063dbc1e1b7f34924150c7c9.zip
rust: types: add FOREIGN_ALIGN to ForeignOwnable
The current implementation of `ForeignOwnable` is leaking the type of the opaque pointer to consumers of the API. This allows consumers of the opaque pointer to rely on the information that can be extracted from the pointer type. To prevent this, change the API to the version suggested by Maira Canal (link below): Remove `ForeignOwnable::PointedTo` in favor of a constant, which specifies the alignment of the pointers returned by `into_foreign`. With this change, `ArcInner` no longer needs `pub` visibility, so change it to private. Suggested-by: Alice Ryhl <[email protected]> Suggested-by: MaĆ­ra Canal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Danilo Krummrich <[email protected]> Reviewed-by: Benno Lossin <[email protected]> Signed-off-by: Andreas Hindborg <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions