[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240624172031.407921-3-yutingtseng@google.com>
Date: Mon, 24 Jun 2024 10:20:32 -0700
From: Yu-Ting Tseng <yutingtseng@...gle.com>
To: cmllamas@...gle.com, tkjos@...gle.com, gregkh@...uxfoundation.org
Cc: arve@...roid.com, maco@...roid.com, joel@...lfernandes.org,
brauner@...nel.org, surenb@...gle.com, aliceryhl@...gle.com,
kernel-team@...roid.com, linux-kernel@...r.kernel.org,
Yu-Ting Tseng <yutingtseng@...gle.com>
Subject: [PATCH v3] binder: frozen notification
Yu-Ting Tseng (1):
binder: frozen notification
drivers/android/binder.c | 300 +++++++++++++++++++++++++++-
drivers/android/binder_internal.h | 23 ++-
include/uapi/linux/android/binder.h | 35 ++++
3 files changed, 354 insertions(+), 4 deletions(-)
> freeze was allocated with kzalloc(), you could drop the "= false".
Done.
> If !node->proc then process is dead. Do we really need to continue?
Update the code to return an error early if the process is already dead.
> This access to node->proc->* doesn't seem safe
Added locking.
> Why do we queue this notification?
Yes, this is to get the current state back to userspace. The userspace API delivers an initial event for the current state upon a listener registration, which makes it easier to track what the latest state is.
> I'm looking at the death notification code and it seems it only queues a
BR_ERROR after failing to allocate a "death" and that other errors are
silently ignored?
Sure. Please let me know if you think we need a change here.
> these could be just bitfields.
Done
> freeze->work.type = BINDER_WORK_CLEAR_DEATH_NOTIFICATION
Fixed. Working on a userspace test. Will post a link when it's ready.
base-commit: 14d7c92f8df9c0964ae6f8b813c1b3ac38120825
--
2.45.2.741.gdbec12cfda-goog
Powered by blists - more mailing lists