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] [day] [month] [year] [list]
Message-ID: <92df9bdd-734b-461c-bf98-070e4fc59d50@kernel.org>
Date: Mon, 16 Jun 2025 11:04:08 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: Andrew Ballance <andrewjballance@...il.com>, a.hindborg@...nel.org,
 airlied@...il.com, akpm@...ux-foundation.org, alex.gaynor@...il.com,
 andriy.shevchenko@...ux.intel.com, arnd@...db.de, benno.lossin@...ton.me,
 bhelgaas@...gle.com, bjorn3_gh@...tonmail.com, boqun.feng@...il.com,
 daniel.almeida@...labora.com, fujita.tomonori@...il.com, gary@...yguo.net,
 gregkh@...uxfoundation.org, kwilczynski@...nel.org, me@...enk.dev,
 ojeda@...nel.org, raag.jadav@...el.com, rafael@...nel.org, simona@...ll.ch,
 tmgross@...ch.edu, dri-devel@...ts.freedesktop.org,
 linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
 nouveau@...ts.freedesktop.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v2 0/6] rust: add support for port io

On 6/16/25 10:03 AM, Alice Ryhl wrote:
> On Wed, May 14, 2025 at 12:58 PM Andrew Ballance
> <andrewjballance@...il.com> wrote:
>>
>> currently the rust `Io` type maps to the c read{b, w, l, q}/write{b, w, l, q}
>> functions and have no support for port io. this can be a problem for pci::Bar
>> because the pointer returned by pci_iomap can be either PIO or MMIO [0].
>>
>> this patch series splits the `Io` type into `Io`, and `MMIo`. `Io` can be
>> used to access PIO or MMIO. `MMIo` can only access memory mapped IO but
>> might, depending on the arch, be faster than `Io`. and updates pci::Bar,
>> so that it is generic over Io and, a user can optionally give a compile
>> time hint about the type of io.
>>
>> Link: https://docs.kernel.org/6.11/driver-api/pci/pci.html#c.pci_iomap [0]
> 
> This series seems to try and solve parts of the same problems as
> Daniel's patchset:
> https://lore.kernel.org/rust-for-linux/20250603-topics-tyr-platform_iomem-v9-0-a27e04157e3e@collabora.com/#r
> 
> We should probably align these two patchsets so that they do not add
> incompatible abstractions for the same thing.

AFAICS, they solve different problems, i.e.

   1) Add Port I/O support to the generic I/O abstractions.
   2) Add an abstraction for generic ioremap() used to map a struct resource
      obtained from a platform device.

The patch series will conflict though, I think it would be best to rebase this
one onto Daniel's patch series, since it is close to land.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ