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: <f02e0c3f-1e24-4ecc-8729-81d99f7543fc@proton.me>
Date: Thu, 25 Apr 2024 15:54:27 +0000
From: Benno Lossin <benno.lossin@...ton.me>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Miguel Ojeda <miguel.ojeda.sandonis@...il.com>, Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>, Wedson Almeida Filho <wedsonaf@...il.com>, Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>, Andreas Hindborg <a.hindborg@...sung.com>, Alice Ryhl <aliceryhl@...gle.com>, linux-pm@...r.kernel.org, Vincent Guittot <vincent.guittot@...aro.org>, Stephen Boyd <sboyd@...nel.org>, Nishanth Menon <nm@...com>, rust-for-linux@...r.kernel.org, Manos Pitsidianakis <manos.pitsidianakis@...aro.org>, Erik Schilling <erik.schilling@...aro.org>, Alex Bennée <alex.bennee@...aro.org>, Joakim Bech <joakim.bech@...aro.org>, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 3/3] cpufreq: Add Rust based cpufreq-dt driver

On 22.04.24 12:30, Viresh Kumar wrote:
> On 07-04-24, 10:17, Benno Lossin wrote:
>> On 07.04.24 11:54, Benno Lossin wrote:
>>> On 05.04.24 13:09, Viresh Kumar wrote:
>>>> +// Finds exact supply name from the OF node.
>>>> +fn find_supply_name_exact(np: *mut bindings::device_node, name: &str) -> Option<CString> {
>>>> +    let sname = CString::try_from_fmt(fmt!("{}-supply", name)).ok()?;
>>>> +
>>>> +    // SAFETY: The OF node is guaranteed by the C code to be valid.
>>>> +    let pp = unsafe { bindings::of_find_property(np, sname.as_ptr() as *mut _, ptr::null_mut()) };
>>>
>>> Drivers should avoid calling `unsafe` code as much as possible. They
>>> also should not be calling `bindings` code directly. Please write (or
>>> find) abstractions for these `unsafe` calls.
>>
>> Having re-read the cover letter, I see that you are already aware of
>> this. If you need any help with creating the abstractions, feel free to
>> reach out!
> 
> Thanks Benno. I am not sure what's the right approach here as there
> are so many missing things (frameworks) I need. Though I don't need
> full support for them but just a handful of APIs.
> 
> And then there is dependency on the generic support for device/driver,
> platform device/driver, etc.

I don't know exactly what you are referring to, but you can try to reach
out to other people on our zulip. Splitting the work with others could
help you :)

Also if the frameworks that you need are particularly difficult to
upstream, because they have a lot of dependencies, then you can try to
create something similar to [1].

[1]: https://github.com/Rust-for-Linux/linux/issues/1004

-- 
Cheers,
Benno


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ