public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alice Ryhl <aliceryhl@google.com>
To: jongan.kim@lge.com
Cc: gregkh@linuxfoundation.org, arve@android.com, brauner@kernel.org,
	 cmllamas@google.com, heesu0025.kim@lge.com, ht.hong@lge.com,
	 jungsu.hwang@lge.com, kernel-team@android.com,
	linux-kernel@vger.kernel.org,  sanghun.lee@lge.com,
	seulgi.lee@lge.com, sunghoon.kim@lge.com,  tkjos@android.com
Subject: Re: [PATCH RESEND] binder: handle PID namespace conversion for freeze operation
Date: Fri, 16 Jan 2026 10:52:41 +0000	[thread overview]
Message-ID: <aWoYeQcg-OYcglIf@google.com> (raw)
In-Reply-To: <20260116055222.6069-1-jongan.kim@lge.com>

On Fri, Jan 16, 2026 at 02:52:22PM +0900, jongan.kim@lge.com wrote:
> Alice Ryhl @ 2026-01-15  8:41 UTC wrote:
> > On Thu, Jan 15, 2026 at 05:06:19PM +0900, jongan.kim@lge.com wrote:
> > > As Alice mentioned, since only the freeze operation takes a pid as input, it
> > > receives the local pid of the namespace. This patch converts this pid to the
> > > global pid of the init namespace for matching pid of binder_procs properly.
> > > (binder_procs has `task->group_leader->pid`). Are there any concerns or 
> > > problems for this logic?
> >
> > This isn't new with your changes ... but it does have a race where the
> > target process dies and gets replaced by a new process with the same pid
> > just before you invoke the freeze ioctl.
> 
> Thanks for sharing! Has this issue been encountered before? I think there may
> be a potential problem, although it is very unlikely to occur. (It is also very
> hard to fix and verify the problem I guess...)
> For now I want to focus on the patch submitted regarding the PID namespace on
> this thread. Please check if there are any issues with merging this patch into
> the binder driver.

I do think it makes sense for freeze to convert pids like this. The Rust
driver should also be updated with the same change at the same time.

Alice

  reply	other threads:[~2026-01-16 10:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-03  2:41 [PATCH] binder: handle PID namespace conversion for freeze operation jongan.kim
2026-01-08  1:10 ` [PATCH RESEND] " jongan.kim
2026-01-08  5:37   ` Greg KH
     [not found]     ` <696087cf.050a0220.9a5fe.0a86SMTPIN_ADDED_BROKEN@mx.google.com>
2026-01-09  7:50       ` Greg KH
2026-01-09  8:39         ` Alice Ryhl
2026-01-15  8:06           ` jongan.kim
2026-01-15  8:41             ` Alice Ryhl
2026-01-16  5:52               ` jongan.kim
2026-01-16 10:52                 ` Alice Ryhl [this message]
2026-01-19  0:56                   ` jongan.kim
2026-01-09  4:44   ` jongan.kim

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=aWoYeQcg-OYcglIf@google.com \
    --to=aliceryhl@google.com \
    --cc=arve@android.com \
    --cc=brauner@kernel.org \
    --cc=cmllamas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heesu0025.kim@lge.com \
    --cc=ht.hong@lge.com \
    --cc=jongan.kim@lge.com \
    --cc=jungsu.hwang@lge.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sanghun.lee@lge.com \
    --cc=seulgi.lee@lge.com \
    --cc=sunghoon.kim@lge.com \
    --cc=tkjos@android.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