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: <CANiq72muPYoPGLrb7jYWMqbWgknMuWJSPMdFPRQMFduFsDTs0Q@mail.gmail.com>
Date: Thu, 19 Jun 2025 09:32:05 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Abhinav Ananthu <abhinav.ogl@...il.com>, "Rafael J . Wysocki" <rafael@...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 <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>, 
	Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, 
	Danilo Krummrich <dakr@...nel.org>, linux-pm@...r.kernel.org, rust-for-linux@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] rust: cpufreq: Ensure C ABI compatibility in all unsafe

On Thu, Jun 19, 2025 at 8:57 AM Viresh Kumar <viresh.kumar@...aro.org> wrote:
>
> I think the one in prelude points to core::ffi::* instead, while we
> want to use kernel::ffi::* ?
>
> Miguel ?

The one in the `kernel` prelude points to the kernel ones (the core
ones should not be used anymore).

> Also why does prelude use ::ffi::* instead of kernel::ffi::* ? I was always a
> bit confused about it.

It is because we define them in a crate called `ffi`, not in the
`kernel` one; and we also re-export it in `kernel`.

In any case, from now on, one should just refer to them directly as
`c_*` (please use the `kernel` prelude for that) -- please see:

    https://docs.kernel.org/rust/coding-guidelines.html#c-ffi-types

I hope that helps!

Cheers,
Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ