public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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 v4] binder: frozen notification
Date: Mon,  1 Jul 2024 11:23:05 -0700	[thread overview]
Message-ID: <20240701182305.1001156-2-yutingtseng@google.com> (raw)
In-Reply-To: <CAN5Drs06fbditeSaVLc6i6wEY+A47HHzQmhCS1rzJgacNs1Tjw@mail.gmail.com>

> I believe the external link would be https://r.android.com/3070045
Fixed

> BR_ERROR and binder_debug
Removed

> Are we ok modifying the ref->freeze->* space here without the
inner_lock?
Good catch. Moved freeze->* access earlier before it's assigned to ref->freeze so that's safe without locking.

> I'm not entirely sure why we attempt to queue this as thread work
Was mimicking how it's done with death notification. Removed.

> We set the work type to CLEAR regardless, might as well factor it out.
Done

> It seems the freeze->* space is protected by the proc->inner_lock right
Yes, freeze->* is protected by the proc inner lock. ref->freeze is protected by the node lock.

> I believe you should zero the 'info' before copy_to_user()
Done.

> So we traverse every single reference of every single node in this proc
looking for references subscribed to freeze, correct? 
That's correct.

> What if there a EAGAIN error following this below?
Fixed. Moved binder_add_freeze_work(target_proc, true) near the end of the function where we know whether freezing is successful.

> any reason why is_frozen didn't make it to the bitfields?
Fixed

> No need for a struct
Fixed

> You could still keep the original bool for bitfields too if you want.
Sure. Done.


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(-)


base-commit: 14d7c92f8df9c0964ae6f8b813c1b3ac38120825
-- 
2.45.2.803.g4e1b14247a-goog


  parent reply	other threads:[~2024-07-01 18:23 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] binder: frozen notification 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           ` [PATCH v3] " Yu-Ting Tseng
2024-06-25  3:01             ` 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           ` Yu-Ting Tseng [this message]
2024-07-01 18:27           ` [PATCH v4] " 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=20240701182305.1001156-2-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