From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f74.google.com (mail-wr1-f74.google.com [209.85.221.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3BA173624C0 for ; Fri, 16 Jan 2026 10:52:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768560770; cv=none; b=JxmQN7AAnFw91ZNqflIMHxE1+ulDTOBjc5lDAa5rn7CRxHwbioXyP+hDmJumO0TT1/F05E6HI2M22z74yuuR4y0ZV9pLSDZ0XO3AgS/AfU6l5PflAYFgMq4UtvnidWn0BEEok2HgijSH4o3IKdMgVcmOZrbrWEbtBsrFs4nMhxo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768560770; c=relaxed/simple; bh=C66uJVocYUJjKr0mwaM/f45zGz0xfrJa0G7hI1SS4B4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ZuZyFVYFgx7PYw12u/W5Y8HhX0PGv/GVAUy4YUNI0ng7tFoV7010h27Idix6VwzDiOoYpJdb5VZErOQkSW9xH+uK8fU8sr744V3fIH+bkc3mrh0nTq3d4AhLVes/soA/FhIaXTTqpyg5S5Y6oIWrfmeFhk606YOusqcbBaEZ57k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=sjaT6x7t; arc=none smtp.client-ip=209.85.221.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="sjaT6x7t" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-431026b6252so1612580f8f.1 for ; Fri, 16 Jan 2026 02:52:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1768560765; x=1769165565; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=PO49biFtxL/BCMFZxRFR8I4cP/8xBV2jVArmgIj79YY=; b=sjaT6x7teUWfuoCJMN72yIrTorI42oqGGPs7ow1mGDMsvuxgegB85qnYpw1xLHVAbj ETOTcWfU5DK7ZMMVaWps0XiTYfb4DnZXJUE2wZyRdvmrDv2dmcpjvoQZ9sedG9677F8S XNDn2mjki2UT5XUMNysJDImGgcoFm5XV/W8xfsvTd3HRojwcNKfTnPabbG5SL2ZcQgLW xpgiuaASYZ9HgK3U4w384a3btd3O0ONtW5oSoBeSnotr2nZHt0/j0GREJ1nk/X4l0GQV CH1UStk3tvbThdG/Y+EPz/VMnhA20MEycLwpPu5738qVjjUU7bcrIsVYLJWpjODylVj+ DpAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768560765; x=1769165565; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PO49biFtxL/BCMFZxRFR8I4cP/8xBV2jVArmgIj79YY=; b=KGuAOAAJdEqC/XE0p8W2qj2HJPAvEtoMh5m/ueggf899/xMCpKmDZIm/Q3D2SIwOD0 mMI+gRf9BPA8hbP/q/eo1IGSi8HotXWBXPGlgPM+kAtRRDexwlpPvEayMWBEZS3Cj3Hq qhDLoCF60B9+afRd2VhI7Fm/agbqQsyl2yeuLSwxTL3713bSdqwEF3EfFsN93eRwME20 Iww7dkOUcWAiAiaXFS0XR1UDz+wSuaUDsu3mKuPwGcwZHSKxo0+529qEqqd0jMLNqpky nzcwf4L5TxAiYURdY7qXBktIk33P40mSt1z26CWXdsOVy7R/Mh0Y0l6nsvkXv7632o1X EuoA== X-Forwarded-Encrypted: i=1; AJvYcCU3wUBSpiGg5N6RkmhX5wgK/MIMgDKXzMhpSRzhvhRhHGagHJ2YrIQpHCF4ZUt3TKYr77xzY3bWJhnZ+RY=@vger.kernel.org X-Gm-Message-State: AOJu0Yxw7fclssQQckJ7NJhbXFPRlz7wGLnuRxson5Oo7pYyk5JLNiDF ISAxgFNM9koo2xUQ1BAlxlLZQ7Hgm/2gDTdlmyZy5u19FFL3ojGeel7vEsEnAnenxyCfAZOuEji 0Yx69X76XkPSNxtbpZg== X-Received: from wrbdw6.prod.google.com ([2002:a05:6000:dc6:b0:432:5c34:fb29]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:18a8:b0:431:864:d48f with SMTP id ffacd0b85a97d-4356a04aa5cmr3336988f8f.27.1768560764834; Fri, 16 Jan 2026 02:52:44 -0800 (PST) Date: Fri, 16 Jan 2026 10:52:41 +0000 In-Reply-To: <20260116055222.6069-1-jongan.kim@lge.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260116055222.6069-1-jongan.kim@lge.com> Message-ID: Subject: Re: [PATCH RESEND] binder: handle PID namespace conversion for freeze operation From: Alice Ryhl 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 Content-Type: text/plain; charset="utf-8" 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