From: Alice Ryhl <aliceryhl@google.com>
To: Adhyansh Verma <adhyanshverma2010@gmail.com>
Cc: Alice Ryhl <aliceryhl@google.com>,
Carlos Llamas <cmllamas@google.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rust_binder: rollback node refcount state on return command write failure
Date: Sun, 29 Nov 2026 10:35:08 +0000 [thread overview]
Message-ID: <20261129103508.897811-1-aliceryhl@google.com> (raw)
In-Reply-To: <20261128175715.28169-1-adhyanshverma2010@gmail.com>
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
parent reply other threads:[~2026-11-29 10:35 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20261128175715.28169-1-adhyanshverma2010@gmail.com>]
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=20261129103508.897811-1-aliceryhl@google.com \
--to=aliceryhl@google.com \
--cc=adhyanshverma2010@gmail.com \
--cc=cmllamas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rust-for-linux@vger.kernel.org \
/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
all inboxes | Powered by JetHome®