From: JongAn Kim <jongan.kim@lge.com>
This patch series fixes PID namespace handling in binder's freeze operation
for both C and Rust implementations.
Changes in v4
1. Patch 1/3
- change subject name more clearly
- comapre task_struct pointers directly instead of PID.
2. Patch 2/3
- Add __rust_helper annotation to rust_helper_get_pid
3. Patch 3/3
- change subject name more clearly
- Use Task pointer comparison instead of PID number comparison (Gary, Alice)
- Remove PidNamespace dependency entirely
- Use &mut KVec parameter to avoid intermediate allocation (Gary)
- Merge context.rs and process.rs changes into single patch
History
v1 : https://lore.kernel.org/lkml/20251203024140.175952-1-jongan.kim@lge.com/T/#u
v2 : https://lore.kernel.org/lkml/20260129084119.32994-1-jongan.kim@lge.com/T/#u
- add two more patches to implement the same logic in Rust binder
v3 : https://lore.kernel.org/lkml/20260203065928.4736-2-jongan.kim@lge.com/
Test
- basic binder freeze test : OK
- binder freeze collision test in seperated namespace : OK
HeeSu Kim (2):
rust: pid: add Pid abstraction and init_ns helper
rust_binder: handle PID namespace conversion for freeze operation
JongAn Kim (1):
binder: handle PID namespace conversion for freeze operation
drivers/android/binder.c | 22 ++++-
drivers/android/binder/context.rs | 16 +++-
drivers/android/binder/process.rs | 25 ++++--
rust/helpers/helpers.c | 1 +
rust/helpers/pid.c | 13 +++
rust/kernel/lib.rs | 1 +
rust/kernel/pid.rs | 138 ++++++++++++++++++++++++++++++
rust/kernel/pid_namespace.rs | 17 ++++
rust/kernel/task.rs | 13 +++
9 files changed, 236 insertions(+), 10 deletions(-)
create mode 100644 rust/helpers/pid.c
create mode 100644 rust/kernel/pid.rs
--
2.25.1