* Rust PROC FILESYSTEM abstractions
@ 2023-01-07 10:36 Finn Behrens
2023-01-07 10:43 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Finn Behrens @ 2023-01-07 10:36 UTC (permalink / raw)
To: rust-for-linux, linux-fsdevel
Hi,
I’v started to implement the proc filesystem abstractions in rust, as I want to use it for a driver written in rust. Currently this requires some rust code that is only in the rust branch, so does not apply onto 6.2-rc2.
My current work can be found here: https://github.com/Rust-for-Linux/linux/pull/948
I plan to send a proper RFC patch, once I’v got a driver dependent on that, to make sure the abstractions are actually useful and correctly designed.
Finn
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Rust PROC FILESYSTEM abstractions
2023-01-07 10:36 Rust PROC FILESYSTEM abstractions Finn Behrens
@ 2023-01-07 10:43 ` Greg KH
2023-01-07 10:44 ` Finn Behrens
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2023-01-07 10:43 UTC (permalink / raw)
To: Finn Behrens; +Cc: rust-for-linux, linux-fsdevel
On Sat, Jan 07, 2023 at 11:36:27AM +0100, Finn Behrens wrote:
> Hi,
>
> I’v started to implement the proc filesystem abstractions in rust, as
> I want to use it for a driver written in rust. Currently this requires
> some rust code that is only in the rust branch, so does not apply onto
> 6.2-rc2.
Please no, no new driver should ever be using /proc at all. Please
stick with the sysfs api which is what a driver should always be using
instead.
/proc is for processes, not devices or drivers at all. We learned from
our mistakes 2 decades ago, please do not forget the lessons of the
past.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Rust PROC FILESYSTEM abstractions
2023-01-07 10:43 ` Greg KH
@ 2023-01-07 10:44 ` Finn Behrens
2023-01-07 11:02 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Finn Behrens @ 2023-01-07 10:44 UTC (permalink / raw)
To: Greg KH; +Cc: rust-for-linux, linux-fsdevel
On 7 Jan 2023, at 11:43, Greg KH wrote:
> On Sat, Jan 07, 2023 at 11:36:27AM +0100, Finn Behrens wrote:
>> Hi,
>>
>> I’v started to implement the proc filesystem abstractions in rust, as
>> I want to use it for a driver written in rust. Currently this requires
>> some rust code that is only in the rust branch, so does not apply onto
>> 6.2-rc2.
>
> Please no, no new driver should ever be using /proc at all. Please
> stick with the sysfs api which is what a driver should always be using
> instead.
Oh did not know that, only translated a C driver from my work to rust, and there procfs was used. But okay, will change it to sysfs.
>
> /proc is for processes, not devices or drivers at all. We learned from
> our mistakes 2 decades ago, please do not forget the lessons of the
> past.
>
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Rust PROC FILESYSTEM abstractions
2023-01-07 10:44 ` Finn Behrens
@ 2023-01-07 11:02 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2023-01-07 11:02 UTC (permalink / raw)
To: Finn Behrens; +Cc: rust-for-linux, linux-fsdevel
On Sat, Jan 07, 2023 at 11:44:51AM +0100, Finn Behrens wrote:
>
>
> On 7 Jan 2023, at 11:43, Greg KH wrote:
>
> > On Sat, Jan 07, 2023 at 11:36:27AM +0100, Finn Behrens wrote:
> >> Hi,
> >>
> >> I’v started to implement the proc filesystem abstractions in rust, as
> >> I want to use it for a driver written in rust. Currently this requires
> >> some rust code that is only in the rust branch, so does not apply onto
> >> 6.2-rc2.
> >
> > Please no, no new driver should ever be using /proc at all. Please
> > stick with the sysfs api which is what a driver should always be using
> > instead.
>
> Oh did not know that, only translated a C driver from my work to rust,
> and there procfs was used. But okay, will change it to sysfs.
Please do, and please work to get your driver upstream, odds are if this
type of issue is present in it, it could use a good review from others.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-07 11:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-07 10:36 Rust PROC FILESYSTEM abstractions Finn Behrens
2023-01-07 10:43 ` Greg KH
2023-01-07 10:44 ` Finn Behrens
2023-01-07 11:02 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).