From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.70 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795948512; b=ZNahb4prIZ0HK5DYu+i/jwMi82kT8Kszys9o6T3wDG0Dzlz2gMNNHD7SWJ/S8yzowZ5M /H2fhY6yCHrpY6uldoa2qLDtnittj1n/SXgK/gPfHGCxdHmLo0k5khYeGSg8tN/wHy4En TBPMrOEuBB5QzzSrifDhF8kym3OmQsECajh5y3K0o1TaOUF/0IHAeuNm35cAdKfKjHWVb iZnvjI5A5L3IATfrWGRZxUMtJZ7/ConAWrZpNti6mI9UJCRTskfNh2jfUUXiZgas4qpK4 +HDnH+qhvcRmopJQ8iCqTs7U//6L3NSRGkNh0ZoYJmYkU3kMdpUWeHYiBJhZ9sOf4rg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795948512; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:X-Mailer:Message-ID:Subject:From:To:Cc: Content-Type; bh=FV9sMeWDBe+ioxfj+Mldy9DgK6toPnhzOuMBGxdLR7U=; b=PwDD3zVGqmXRa7k6xcW5ZZfUAdTldnvFkLuVM/2RygixKud7WmrHXygN159WZ+Eurajf oUI4eNqa8fWEZNI+zN8vasObiN6w6YvuuRPJ6z/RDoUxRgLhXJx/nJZ2P7P6N0of+wYh9 FYrQR2L0AterNGXsW0nWZYJbfAY2XwhWz3m0wt+WYdJtrOf011rAcIBIVPdYfWUc+LLQx mGHKsbrDv7lSpA05G3MHRHdLC71DasYSKUafqzGF4S9Dutzw4BwlizGRDHLuSyZF7OeZG 5H9avH4WLyFGM/pRw8ZY+a4ei7DJGOD63rbiVCo+4ev1C2t/k7RABpwnsHj7NuDS30Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=CdC13hqS; arc=none smtp.remote-ip=209.85.128.70 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A262C606A325 for ; Sun, 29 Nov 2026 10:35:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A262C606A325 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, unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=CdC13hqS Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4a35e1d2dddso77352275e9.0 for ; Sun, 29 Nov 2026 02:35:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1795948510; x=1796553310; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=FV9sMeWDBe+ioxfj+Mldy9DgK6toPnhzOuMBGxdLR7U=; b=CdC13hqSC/SSdz+m7WC4GMxXPn0jyFQMvaj2U/V9WPf6g8eGt+8+NX7+bC9VTc3eaW EAQOswvMHZhvxM0TmiGgVKcX7ypQbS6RGe/M6cVYB/SBzKqogjZ3rsTBkK30Yw8lIDQZ TOwHdL3HbjsE5DIQ4fNsB2Qs0c+GaQiTCkkgiXUAX0XJfapyLCwJ/ZxtNZnsHtKU+Rcx 6u3VGI0hnHcnzgpdgWq4osxDbt6B8g1J/EOT0jV1ePiTBzU2AdmHb71yJ9ZKD267arYY BWQ52ZUAlU2M7w6sRZryrJq19c3yFqmugZx2wLNJ6Om0FUOR2CB8ZYfCAO+jrJbxXUTh Xcyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795948510; x=1796553310; h=content-type: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:content-type; bh=FV9sMeWDBe+ioxfj+Mldy9DgK6toPnhzOuMBGxdLR7U=; b=ROKPj07YWcn8dudJh8bbmdz7xwqe3LQTNcwGSlGfQlW/+FtuSkKptgr8yfCLHzpoGT i6ktOU0lG68wJluLy1FzTAx8pQE+ym6gK8KTboNnm2yV7A7nvXnySmPlsE9+KGQPybG9 T2LrNnm3VAcoQvu7tJi0Opnf+T3KNtT6+17CtHX69OY9icw83/qYgKYL7SoTCroC3NPy zDtlrw+S5a4MEQQNx2KhA+bGjF8YYhepLwjiIW4myBeiAc2Gks/oY0r2SIuY2DYdtjAR qwXOy0zrC85SR69xqyJSsWOxhu4emSjMtoFRk1Cbyq12TQiYXR6CFTuito2BwoC1vw3+ iN3g== X-Forwarded-Encrypted: i=1; AL+hErEA6SKyAkEN/qTpp34UJEpPtDEkMa+GNHlaQui3zkYu1lvYM9hQoYFtZ+7cFftpl0oLEQqZCQGslTJ4SBQ=@vger.kernel.org X-Gm-Message-State: APuU4Z93cKDXrNzte+DjKU553A2TGsIGxlAiei9LR3OujAv0mqJJmKwz FQKLd9AhqQWmPujRAAYBXE3hOn/zVE9U7nAcL95qcaetlG17fRHWpk81MRBPffHXkpfQTE/xNHV bjNNiwJGNDrbo6US3WQ== X-Received: from wmbje17.prod.google.com ([2002:a05:600c:1f91:b0:4bb:5e69:8177]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:4584:b0:4b8:4af2:88b3 with SMTP id 5b1f17b1804b1-4bb88817aa2mr619331185e9.22.1795948509826; Sun, 29 Nov 2026 02:35:09 -0800 (PST) Date: Sun, 29 Nov 2026 10:35:08 +0000 In-Reply-To: <20261128175715.28169-1-adhyanshverma2010@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 References: <20261128154512.145762-1-adhyanshverma2010@gmail.com> <20261128175715.28169-1-adhyanshverma2010@gmail.com> X-Mailer: git-send-email 2.56.1.839.g22a8290db9-goog Message-ID: <20261129103508.897811-1-aliceryhl@google.com> Subject: Re: [PATCH] rust_binder: rollback node refcount state on return command write failure From: Alice Ryhl To: Adhyansh Verma Cc: Alice Ryhl , Carlos Llamas , Greg Kroah-Hartman , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Sat, Nov 28, 2026 at 11:27:15PM +0530, Adhyansh Verma wrote: > 3. In Binder architecture, an -EFAULT on writing return commands to > userspace indicates userspace memory corruption or process termination, > matching the upstream C Binder behavior which does not roll back refcounts > on return code write failures. > > Please discard this patch. Agreed. In general, if userspace passes an illegal buffer and gets an -EFAULT, that's fatal and we don't need to be able to recover (as long as kernel state is still cleaned up safely when the process exits, which Process::deferred_release() already handles). The same applies to your other three BR_* write-failure rollback patches: - rust_binder: decrement requested_thread_count on BR_SPAWN_LOOPER write failure https://lore.kernel.org/r/20261128153719.143637-1-adhyanshverma2010@gmail.com (Note also that C Binder does not decrement proc->requested_threads on put_user(BR_SPAWN_LOOPER) failure either, and this write can only fail if userspace concurrently unmaps/protects the buffer after BR_NOOP was written.) - rust_binder: rollback freeze listener state on BR_FROZEN_BINDER write failure https://lore.kernel.org/r/20261128194856.53717-1-adhyanshverma2010@gmail.com - rust_binder: rollback delivered_deaths and requeue on death notification write failure https://lore.kernel.org/r/20261128172738.11747-1-adhyanshverma2010@gmail.com So I don't think we should take those three patches either. Alice