Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A Linux Kernel module written in Rust that creates a device which outputs foxes 🦊

License

NotificationsYou must be signed in to change notification settings

Lymkwi/rust-foxes-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This basic module creates a single virtual device called/dev/foxes that continuously outputs the Unicode fox emoji when read. 🦊

It is originally based on theRust for Linux out-of-tree-module template andJackOS' Rust for Kernel development tutorial.

Adding the Necessary Abstractions

Because therust branch is no longer maintained on RFL's tree, the abstractions this driver relied on are not yet present.

In order to add them, applymissing-abstractions.patch over RFL'srust-next.

It is very likely that the patch will not apply, especially as further abstractions are added.

Build Instructions After Update

All warnings and considerations from the Rust for Linux foudation's repository apply here. For the sake of efficacy, here are the instructions to build this module on a kernel with Rust support:

$ make KDIR=.../linux-with-rust-support LLVM=1make -C .../linux-with-rust-support M=$PWDmake[1]: Entering directory'.../linux-with-rust-support'  RUSTC [M] .../rust-foxes-module/rust_foxes.o  MODPOST .../rust-foxes-module/Module.symvers  CC [M]  .../rust-foxes-module/rust_foxes.mod.o  LD [M]  .../rust-foxes-module/rust_foxes.komake[1]: Leaving directory'.../linux-with-rust-support'

Changelog

  • 2024-09-04
    • Update abstraction patch for split rust helpers
    • Update abstraction patch to usekernel::uaccess in place of legacykernel::user_ptr
    • Updatekernel::file abstractions consequently
    • Up-to-date withrust-next
    • Fixed a bug where having a block size below 4 incorrectly decreased the remaining fox count even if a fox could not be entirely written
    • Add a global count of foxes, the module has to be unloaded and reloaded for it to be reset
    • Turn the diff file into a proper patch of the abstraction commit

About

A Linux Kernel module written in Rust that creates a device which outputs foxes 🦊

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

[8]ページ先頭

©2009-2025 Movatter.jp