Re: [PATCH 2/6] rust: binder: transmute transaction data

From: Alice Ryhl

Date: Tue May 26 2026 - 08:33:25 EST


On Fri, May 22, 2026 at 07:12:47PM +0200, Tamir Duberstein wrote:
> `BinderTransactionData` is a transparent wrapper around
> `binder_transaction_data`. Use a transmute to view the transaction data in
> `BinderTransactionDataSecctx` through that wrapper, matching the safety
> argument at the conversion site and avoiding the raw pointer round trip.
>
> Signed-off-by: Tamir Duberstein <tamird@xxxxxxxxxx>

I think it is an anti-pattern to transmute references. Please keep the
raw pointer cast.

Alice