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-next>] [day] [month] [year] [list]
Message-ID: <a68fca00-666a-bbf4-b4d3-acd409dd69d2@gmail.com>
Date:   Sat, 29 Apr 2023 22:02:44 +0900
From:   Ryo Munakata <ryomnktml@...il.com>
To:     rust-for-linux@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org,
        FUJITA Tomonori <fujita.tomonori@...il.com>
Subject: Rust ENC28J60 ethernet driver working on Raspberry Pi

Hi all,

I've written an ethernet driver for ENC28J60, a stand-alone ethernet 
controller with a SPI interface, in Rust.
It works fine on Raspberry Pi 4B with Raspbian AArch64.
You can connect to the internet and play some videos on YouTube with it 
(10BASE-T though).
I hope it will be an example of real-world drivers in Rust.

* ENC28J60 ethernet driver in Rust
enc28j60rs: https://github.com/pfpacket/enc28j60rs
`impl Sync/Send`, mostly because of raw pointers, and the initialization 
of `workqueue::Work` and `sync::Spinlock`
require a tiny bit of "unsafe" code, but otherwise no unsafe code used.

* The forked kernel with Rust support for SPI and netdev
https://github.com/pfpacket/linux-rpi-rust/tree/rust-netdev
Forked from the Raspberry Pi tree and merged Rust-for-Linux `rust` 
branch into it.
(BTW are there any easier way to get Rust-for-Linux work on Raspberry 
Pi? If so please let me know.)
Then I added the SPI support referencing rust/kernel/platform.rs and 
netdev support.
The netdev support is based on the following GitHub PR from Fujita-san:
https://github.com/Rust-for-Linux/linux/pull/908

Regards,
Ryo Munakata

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ