ANDROID: rust_binder: add BINDER_TYPE_FD support
Add support for sending fds over binder. Unlike the other object types, file descriptors are not translated until the transaction is actually received by the recipient. Until that happens, we store `u32::MAX` as the fd. Translating fds is done in a two-phase process. First, the file descriptors are allocated and written to the allocation. Then, once we have allocated all of them, we commit them to the files in question. Using this strategy, we are able to guarantee that we either send all of the fds, or none of them. Link: https://lore.kernel.org/rust-for-linux/20231101-rust-binder-v1-13-08ba9197f637@google.com/ Change-Id: Ia57fa9f732b7363c4a75fe49a48baef6ebfa8de2 Co-developed-by:Wedson Almeida Filho <wedsonaf@gmail.com> Signed-off-by:
Wedson Almeida Filho <wedsonaf@gmail.com> Signed-off-by:
Alice Ryhl <aliceryhl@google.com> Bug: 278052745
Loading
Please sign in to comment