Skip to content

Introduce Owned type and Ownable trait (was: "rust: page: Add support for vmalloc_to_page")

Abdiel Janulgue lkml rust-for-linux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest5 patches 21 repliesIn review

Changes since v2 from the cover letter

- Use Owned and Ownable types for constructing Page as suggested in [1] instad of using ptr::read().

[0] https://lore.kernel.org/rust-for-linux/[email protected]/
[1] https://lore.kernel.org/rust-for-linux/ZwUYmunVpzpexGV8@boqun-archlinux/

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5rust: types: add `Owned` type and `Ownable` traitrust/kernel/types.rs+62 -010 replies
2/5rust: page: Make ownership of the page pointer explicit.rust/kernel/page.rs+16 -90 replies
3/5rust: page: Extend support to vmalloc_to_pagerust/kernel/page.rs+30 -24 replies
4/5rust: page: Add page_slice_to_pagerust/kernel/page.rs+58 -10 replies
5/5rust: firmware: implement `Ownable` for Firmwarerust/kernel/firmware.rs+18 -134 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/5] Introduce Owned type and Ownable trait (was: "rust: page: Add support for vmalloc_to_page")

Hi all,

This series introduces the Owned type and Ownable trait which is the v2 of "rust: page: Add support for vmalloc_to_page" [0]. This series includes changes for firmware as well to make use of the new wrapper.

Changes since v2:
- Use Owned and Ownable types for constructing Page as suggested in [1] instad of using ptr::read().

[0] https://lore.kernel.org/rust-for-linux/[email protected]/
[1] https://lore.kernel.org/rust-for-linux/ZwUYmunVpzpexGV8@boqun-archlinux/

Abdiel Janulgue (5):
rust: types: add Owned type and Ownable trait
rust: page: Make ownership of the page pointer explicit.
rust: page: Extend support to vmalloc_to_page
rust: page: Add page_slice_to_page
rust: firmware: implement Ownable for Firmware

 rust/kernel/firmware.rs |  31 ++++++-----
 rust/kernel/page.rs     | 116 +++++++++++++++++++++++++++++++++++-----
 rust/kernel/types.rs    |  62 +++++++++++++++++++++
 3 files changed, 184 insertions(+), 25 deletions(-)

base-commit: 15541c9263ce34ff95a06bc68f45d9bc5c990bcd

Signature · 1 line
2.43.0