[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260203065928.4736-1-jongan.kim@lge.com>
Date: Tue, 3 Feb 2026 15:59:25 +0900
From: jongan.kim@....com
To: a.hindborg@...nel.org,
aliceryhl@...gle.com,
arve@...roid.com,
bjorn3_gh@...tonmail.com,
boqun.feng@...il.com,
brauner@...nel.org,
cmllamas@...gle.com,
dakr@...nel.org,
daniel.almeida@...labora.com,
gary@...yguo.net,
gregkh@...uxfoundation.org,
tamird@...il.com,
tkjos@...roid.com,
tmgross@...ch.edu,
viresh.kumar@...aro.org,
vitaly.wool@...sulko.se,
yury.norov@...il.com,
lossin@...nel.org,
ojeda@...nel.org
Cc: jongan.kim@....com,
heesu0025.kim@....com,
ht.hong@....com,
jungsu.hwang@....com,
kernel-team@...roid.com,
linux-kernel@...r.kernel.org,
rust-for-linux@...r.kernel.org,
sanghun.lee@....com,
seulgi.lee@....com,
sunghoon.kim@....com
Subject: [PATCH v3 0/3] binder: handle PID namespace conversion for freeze operation
From: JongAn Kim <jongan.kim@....com>
This patch series fixes PID namespace handling in binder's freeze operation
for both C and Rust implementations.
Changes in v3
1. Patch 1/3
- change to use task->tgid instead of task_tgid_nr_ns()
2. Patch 2/3
- Add Send/Sync traits for Pid
- Add AlwaysRefCounted for Pid with rust_helper_get_pid
- Add from_raw() constructor to Pid and Task
- Rename find_vpid_with_guard -> find_vpid
- Rename pid_task_with_guard -> pid_task
- Convert init_pid_ns() to PidNamespace::init_ns()
- Add PartialEq/Eq for PidNamespace (Alice)
- Add rust/helpers/pid.c for get_pid() wrapper
3. Patch 3/3
- Use task::Pid typedef instead of u32/i32
- Use PidNamespace::init_ns() instead of init_pid_ns()
- Compare PidNamespace directly with == instead of raw pointers
- Use Pid::find_vpid() and pid.pid_task() (dropped _with_guard suffix)
- Fix rustfmt import ordering (rcu before Arc)
- Rename TaskPid alias to PidT for clearer pid_t type indication
- Use task.group_leader().pid() instead of tgid_nr_ns() for consistency
with C
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
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 | 53 +++++++++++-
drivers/android/binder/process.rs | 37 +++++++-
rust/helpers/helpers.c | 1 +
rust/helpers/pid.c | 9 ++
rust/kernel/lib.rs | 1 +
rust/kernel/pid.rs | 138 ++++++++++++++++++++++++++++++
rust/kernel/pid_namespace.rs | 17 ++++
rust/kernel/task.rs | 13 +++
8 files changed, 262 insertions(+), 7 deletions(-)
create mode 100644 rust/helpers/pid.c
create mode 100644 rust/kernel/pid.rs
--
2.25.1
Powered by blists - more mailing lists