From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f74.google.com (mail-ed1-f74.google.com [209.85.208.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 EAF74274B3B for ; Wed, 17 Dec 2025 20:43:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766004184; cv=none; b=YgmnY35H3VT8txLG2cL5PtGTyqCa24IGDCiJw45r1hGxA/Pt3AaN11Z25v/GpnJJd4DPSzh5Lx/Nqul9rYdbtPxFoljbHlYPh4y1xYio+PacsiClD8b+4crX3ZkiMhWqUAQCXRDwaH+DFq6CNxdqbj9OLzfx3Tnm7v45vvjX4JQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766004184; c=relaxed/simple; bh=WvIsm9Ts1GOtGesBER07J5XxEkESIKKSLK1zH6DbMH4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=jLlZaRuT1UQWoW7LUFE2SUeq5qFGOI/1mjfuPp0cP2/GePUaAFKsWcZ7HOjerlXKRXLUKpc4xfR4uOuHoyKsqSMd86s8eKBCTtXAl6sMrZxiWoW+bqqp0YRs+w+uI83YhsCbv0LU0I9QMPSohyc0zMyaMRjudcE73O+7czmpwSI= 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=xiFORPs5; arc=none smtp.client-ip=209.85.208.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="xiFORPs5" Received: by mail-ed1-f74.google.com with SMTP id 4fb4d7f45d1cf-64165abd7ffso4819833a12.0 for ; Wed, 17 Dec 2025 12:43:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1766004181; x=1766608981; 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=zxM8P91nck09baF595qtFNKaj3BBSzgoCkg0IuYMMWU=; b=xiFORPs5P96/BsJL2FU/3thv7J4okpfm2Hr+BIOms6ZHfbuS8sRflB9iMgnH+2FxHg RpbXoAe2SK8SY84BSGYG1yWNhp1byqTrp9ebmtYPbJ9+TfXevJKYD5P8UwB6djPT0lHG blkXvgnYLdmlVGVOuNz4QHvLqajFUChBgBFJAA6n84qFcOax9H1NvQHzy8WMj7HqZSgS Fyo2UmmuolbjYFG/OV4hKFXIg0bY+J0QCmezfldIgck6XWv3aAPXKgRHKaVns+AJEfUb FWaHlr0hQNzoZPD3sCBfvMqmSp95bukZJtP6DZQLuJbAfy+EKYCYyWK2sUVy3npUiJxw jtuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766004181; x=1766608981; 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=zxM8P91nck09baF595qtFNKaj3BBSzgoCkg0IuYMMWU=; b=pz0D0Wfz0DRYFWI5TaQru1REb/NyqPaXr0YArph28W85z+Y3KGf413omwCJMAWFSzG U5DWDVxy8+alSl3YzTsxkiYgqHc1jOtlICYgbBu1/7s2XtR6FqX0HCYDGy40sNf9/fDz 8sbF50V/qznbONCGph3bfnNdWqK428nVPiSS/nERJsVFR91Y6e586iMeSd3CnyGfRHid Z279nlLRVxqxdiB2ZrjEBzvDCd70uhmWgqIEMfRQ9hlPhEGmVVh1FdY66P/rPcsbpvTE 7tKfBVqkhPgpNwow+FXCJX7EKF06Hisqz30zlWfVQmCbROrgCgilLeboZTp1pvSueC1o fnWg== X-Forwarded-Encrypted: i=1; AJvYcCVEsswD2MX2Y/F7GGU22WgMvWEOlzylgpzbGPPlJaQGYc4PqM/BRvpe9475L3G5ZV40WjvBgxY9EoF6sxc=@vger.kernel.org X-Gm-Message-State: AOJu0YwgZ/lV5+RzsTbz8dZk32foK+1xguG8LZozq/p/GvwdPZTgbXTi 0Mz4vxfbp2I5qFrEaSmHbz/VAOyZ1qlBeiTNKIx+sbzb6wB2qcoy09xQjt32CT5TflhvS0PwGwX YOHL4DUpF3Tr1gtm3XQ== X-Google-Smtp-Source: AGHT+IEHn+5dMA/dhqLl6+hD7/4zkjabNvhiWZjj3mt9ZED0Q5AU2GNgdIy73akIVyHBMcnCHoSvDeEuiqgO6uQ= X-Received: from edi6-n2.prod.google.com ([2002:a05:6402:3046:20b0:647:6b41:2249]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6402:1ed1:b0:647:532f:8efc with SMTP id 4fb4d7f45d1cf-6499b31266bmr19226748a12.33.1766004181208; Wed, 17 Dec 2025 12:43:01 -0800 (PST) Date: Wed, 17 Dec 2025 20:43:00 +0000 In-Reply-To: <20251215194541.19425-1-pl.schoeman@pocketlaw.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251215194541.19425-1-pl.schoeman@pocketlaw.net> Message-ID: Subject: Re: [PATCH] binder: rust: pin zero-to-one ref increments to initiating thread From: Alice Ryhl To: Pieter-Louis Schoeman Cc: arve@android.com, brauner@kernel.org, cmllamas@google.com, gregkh@linuxfoundation.org, tkjos@android.com, linux-kernel@vger.kernel.org, ojeda@kernel.org, paul@paul-moore.com, tamird@gmail.com, vitaly.wool@konsulko.se, wedsonaf@gmail.com, yury.norov@gmail.com Content-Type: text/plain; charset="utf-8" On Mon, Dec 15, 2025 at 09:45:41PM +0200, Pieter-Louis Schoeman wrote: > The refcount update path must use the zero-to-one aware API on the first > increment to preserve correct delivery semantics. > > Pass the initiating thread through Process::update_ref() and NodeRef so > zero->one increments are pinned when available, while keeping decrement > behavior unchanged. > > Also harden update_refcount_locked() to reject increments. > > Signed-off-by: Pieter-Louis Schoeman Currently the zero-to-one aware API is used only when a process sends an outgoing transaction containing a node owned by the sender. Can you explain what other scenario requires the zero-to-one aware API? Alice