From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lgeamrelo12.lge.com (lgeamrelo12.lge.com [156.147.23.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F6B41339B1 for ; Mon, 19 Jan 2026 01:26:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.147.23.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768785975; cv=none; b=UeYRAdDTcJ66oDhTKy1jWolXeyx0IFpoAsftugIEAalGkZAo1QC8sSbpgCk9XjTU3aNgYpR4IPc7+BF2bdfOBPqre71jzXsHr/oXnIPy3Nq3yrBeKqoh6BBEqxEKMzfe3Ul8IpX3IKj6CPLLMyblxPwk7b1xzToRH6B5WYwPJ40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768785975; c=relaxed/simple; bh=LtLIh9fuXhhuj4dvJk1NGDyWdpoAlJh/bQh7iHGFcDc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Ae5hpvou2UrvHJqMOHwOOLNvGc4tOnuqvK2SCJoM50rqPZfWWNqjZkkC73yCUZqeUF9fdj9GV9RXJfW+g5wGm4xrt/xiMC0NpYy/8xnIkge3kd1Hb8ejF7HWibUvHll9rMxglvwZtILntSVbcFSm8LmxZJ/RMEl8p+kVgC9BgqQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lge.com; spf=pass smtp.mailfrom=lge.com; arc=none smtp.client-ip=156.147.23.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lge.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lge.com Received: from unknown (HELO lgemrelse6q.lge.com) (156.147.1.121) by 156.147.23.52 with ESMTP; 19 Jan 2026 09:56:08 +0900 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: jongan.kim@lge.com Received: from unknown (HELO jongan-kim-nissan-cdc.bee-live.svc.cluster.local) (10.159.44.26) by 156.147.1.121 with ESMTP; 19 Jan 2026 09:56:07 +0900 X-Original-SENDERIP: 10.159.44.26 X-Original-MAILFROM: jongan.kim@lge.com From: jongan.kim@lge.com To: aliceryhl@google.com Cc: arve@android.com, brauner@kernel.org, cmllamas@google.com, gregkh@linuxfoundation.org, heesu0025.kim@lge.com, ht.hong@lge.com, jongan.kim@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: Mon, 19 Jan 2026 09:56:07 +0900 Message-Id: <20260119005607.11352-1-jongan.kim@lge.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Alice Ryhl @ 2026-01-16 10:52 UTC wrote: > 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. Thanks for confirmation. I will update the patch after changing and verifying the rust driver. Thanks. // JongAn, Kim