From: Yu-Ting Tseng <yutingtseng@google.com>
To: cmllamas@google.com, tkjos@google.com, gregkh@linuxfoundation.org
Cc: arve@android.com, maco@android.com, joel@joelfernandes.org,
brauner@kernel.org, surenb@google.com, aliceryhl@google.com,
kernel-team@android.com, linux-kernel@vger.kernel.org,
Yu-Ting Tseng <yutingtseng@google.com>
Subject: [PATCH v3] binder: frozen notification
Date: Mon, 24 Jun 2024 10:20:32 -0700 [thread overview]
Message-ID: <20240624172031.407921-3-yutingtseng@google.com> (raw)
In-Reply-To: <CAN5Drs06fbditeSaVLc6i6wEY+A47HHzQmhCS1rzJgacNs1Tjw@mail.gmail.com>
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
next prev parent reply other threads:[~2024-06-24 17:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240618221347.106627-1-yutingtseng@google.com>
2024-06-22 3:16 ` [PATCH v2] " Yu-Ting Tseng
2024-06-22 3:16 ` Yu-Ting Tseng
2024-06-24 14:24 ` Alice Ryhl
2024-06-24 15:50 ` Yu-Ting Tseng
2024-06-24 15:53 ` Carlos Llamas
2024-06-24 15:56 ` Yu-Ting Tseng
2024-06-24 17:20 ` Yu-Ting Tseng [this message]
2024-06-25 3:01 ` [PATCH v3] " Yu-Ting Tseng
2024-06-24 17:20 ` [PATCH v3 1/1] " Yu-Ting Tseng
2024-06-28 18:42 ` Carlos Llamas
2024-07-01 18:23 ` [PATCH v4] " Yu-Ting Tseng
2024-07-01 18:27 ` Yu-Ting Tseng
2024-07-03 4:18 ` Carlos Llamas
2024-07-03 17:08 ` [PATCH v5] " Yu-Ting Tseng
2024-07-03 17:08 ` Yu-Ting Tseng
2024-07-03 17:58 ` [PATCH v6 0/2] " Yu-Ting Tseng
2024-07-04 13:00 ` Greg KH
2024-07-03 17:58 ` [PATCH v6 1/2] " Yu-Ting Tseng
2024-07-03 17:58 ` [PATCH v6 2/2] binder: frozen notification binder_features flag Yu-Ting Tseng
2024-06-24 15:10 ` [PATCH v2] binder: frozen notification Carlos Llamas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240624172031.407921-3-yutingtseng@google.com \
--to=yutingtseng@google.com \
--cc=aliceryhl@google.com \
--cc=arve@android.com \
--cc=brauner@kernel.org \
--cc=cmllamas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=joel@joelfernandes.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maco@android.com \
--cc=surenb@google.com \
--cc=tkjos@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®