mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH] rust_binder: rollback node refcount state on return command write failure
       [not found] ` <20261128175715.28169-1-adhyanshverma2010@gmail.com>
@ 2026-11-29 10:35   ` Alice Ryhl
  0 siblings, 0 replies; only message in thread
From: Alice Ryhl @ 2026-11-29 10:35 UTC (permalink / raw)
  To: Adhyansh Verma
  Cc: Alice Ryhl, Carlos Llamas, Greg Kroah-Hartman, rust-for-linux,
	linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-29 10:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20261128154512.145762-1-adhyanshverma2010@gmail.com>
     [not found] ` <20261128175715.28169-1-adhyanshverma2010@gmail.com>
2026-11-29 10:35   ` [PATCH] rust_binder: rollback node refcount state on return command write failure Alice Ryhl

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®