ANDROID: rust_binder: add BINDER_TYPE_PTR support
Implement support for the scatter-gather feature of binder, which lets you embed pointers in binder transactions and have them be translated so that the recipient gets a pointer that also works for them. This works by adding a second kind of object to the offset array, namely the BINDER_TYPE_PTR object. This object has a pointer and length embedded. The kernel will copy the data behind the pointer, and update the address of the pointer so that the recipient will be able to follow the pointer and see the same data. These objects are supported recursively. Other than the pointer in the main transaction buffer, each buffer may be pointed at by a pointer in one of the other buffers. This can be used to build arbitrary trees of buffers. Link: https://lore.kernel.org/rust-for-linux/20231101-rust-binder-v1-12-08ba9197f637@google.com/ Change-Id: I8bae5afbe9b989009fdc48cd28a76a0f2fe065ff Signed-off-by:Alice Ryhl <aliceryhl@google.com> Bug: 278052745
Loading
Please sign in to comment