lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y0y5t46k.fsf@kernel.org>
Date: Mon, 17 Feb 2025 08:34:43 +0100
From: Andreas Hindborg <a.hindborg@...nel.org>
To: "Tamir Duberstein" <tamird@...il.com>
Cc: "Danilo Krummrich" <dakr@...nel.org>,  "Miguel Ojeda"
 <ojeda@...nel.org>,  "Alex Gaynor" <alex.gaynor@...il.com>,  "Boqun Feng"
 <boqun.feng@...il.com>,  "Gary Guo" <gary@...yguo.net>,  Björn Roy Baron
 <bjorn3_gh@...tonmail.com>,  "Benno Lossin" <benno.lossin@...ton.me>,
  "Alice Ryhl" <aliceryhl@...gle.com>,  "Trevor Gross" <tmgross@...ch.edu>,
  "Joel Becker" <jlbec@...lplan.org>,  "Christoph Hellwig" <hch@....de>,
  "Peter Zijlstra" <peterz@...radead.org>,  "Ingo Molnar"
 <mingo@...hat.com>,  "Will Deacon" <will@...nel.org>,  "Waiman Long"
 <longman@...hat.com>,  "Fiona Behrens" <me@...enk.dev>,  "Charalampos
 Mitrodimas" <charmitro@...teo.net>,  <rust-for-linux@...r.kernel.org>,
  <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/3] rust: sync: change `<Arc<T> as
 ForeignOwnable>::PointedTo` to `T`

"Tamir Duberstein" <tamird@...il.com> writes:

> On Fri, Feb 7, 2025 at 9:50 AM Andreas Hindborg <a.hindborg@...nel.org> wrote:
>>
>> Using `ArcInner` as `PoinedTo` in the `ForeignOwnable` implementation for
>> `Arc` is a bit unfortunate. Using `T` as `PointedTo` does not remove any
>> functionality, but allows `ArcInner` to be private. Further, it allows
>> downstream users to write code that is generic over `Box` and `Arc`, when
>> downstream users need access to `T` after calling `into_foreign`.
>
> I stumbled upon https://github.com/Rust-for-Linux/linux/pull/1036 the
> other day. Boqun, are there any plans to revive this work? It might
> obviate the need for _this_ patch.

I don't think it would help configfs. The configfs patches rely on
getting access to a `T` pointer from `ForeignOwnable::into_foreign`.

In fact, thinking about this, I should probably mandate this in
`ForeignOwnable` API requirements in order to not have soundness hinge
on the implementation of `ForeignOwnable`.

Also I would appreciate that if we want to use a reference to `ArcInner`
rather than a special borrow type, maybe let's do it down the line and
not stall this series on that work.


Best regards,
Andreas Hindborg




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ