Rust-for-Linux-tech
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Meeting 2026-02-18 <!-- Leave your topic starting with ### in the relevant sections below --> ## Critical <!-- bugs, soundness issues, urgent patches/reviews etc. --> ## Status Reports <!-- You want to report on something you are working on/request reviews. Or you want to know the status of something someone else is doing --> - Rust null block series [is out](https://lore.kernel.org/rust-for-linux/20260216-rnull-v6-19-rc5-send-v1-0-de9a7af4b469@kernel.org/T/#t) :partying_face: Bug reports, Tested-by tags, reviews, etc. are very welcome. ## Discussion Questions <!-- Anything that requires lengthy discussion/more general questions also fit here --> Copy from/to maybe user mapped pages: - [Use Rust intrinsics or kernel `memcpy`?](https://lore.kernel.org/r/aZWI9zGIO6rtlCCg@google.com) [boqun] I'm writing down my understanding of the abstract of the problem: Basically we need a `memcpy()` that can 1) not data race and 2) work with external accesses (e.g. from userspace). In my opinion, there are two directions we should go: 1. Using `bindings::memcpy()` to implement a volatile `atomic_bytewise_memcpy()`. <- the approach that we are taking currently in the patch. 2. Using `core::ptr::copy()` or `intrinsics::volatile_copy_nonoverlapping_memory()` in Rust and pretend it won't data race or be mis-optimized and ask for a special case. * Reduce the necessity of FFI calling. * Work in practice. * Extra benefit, we can have an optimizable API that [copy/read/write "at most" ONCE](https://lore.kernel.org/llvm/CAHk-=wgQ8DOxaNY5cBWg+sUkM5Kk6rKYGRHXsZQLtknO_UX+QA@mail.gmail.com/). [Tyr: implement reset logic](https://gitlab.freedesktop.org/panfrost/linux/-/issues/28) design: - Do we have a concerete API in mind or we should try to mirror the Panthor side logic? - I guess we only need to cover soft-reset, right? I couldn't find hard-reset handler anywhere on the Panthor side. - Should this work implement only the API or also include using the API? - Where should I submit my initial work, ML or send a PR to the gl repo? ### Safe `fn_cast!` and Project Safe Transmute https://github.com/rust-lang/rust/issues/140803 Miguel: would Project Safe Transmute consider making `fn_cast!` safe for certain subsets, and if so, should we ask upstream Rust to rename to `unsafe_fn_cast!` in that case? ### Roadmap Benno: categorize, keep the big ones in the roadmap file. Two kinds: the automatically generated roadmap (from other project goals) and the "further roadmap". Boqun: following Benno's suggestion, it's better we can group "external" goals (project goals that "point of contact" is not us) that we care most into a prioritized wishlist for example ("Const traits" and "generic const"). #### Already tracked - In-place initialization. - Field projections. + Recently, we again encountered field projections with `dma_read!` and the need to generalize it for general IO. - Arbitrary self types - ... #### Existing Goals We're Interested in - `Forget` and `Move`. + We want unforgettable guard types for our locks and could take advantage of a `Move` trait to make our types `!Move`. - Const traits. - More const generics. + Always helps. #### Wishlist - `rustfmt`: removing the `//` hack inside imports ("kernel vertical style"). + Essentially being able to trigger the logic that currently gets triggered when `rustfmt` detects a comment. - Coherence domains. + Not just for the orphan rule, but also to e.g. define inherent methods on a dependency like `core` and `std` do to each other. - Niche optimizations. + At least for Rust `enum`s that contain pointers to aligned objects (e.g. 4 byte alignment in XArray, or to a page, etc.). - Clippy: `// PANIC: ...`, `// CAST: ...` and `// ORDERING: ...` comments. - `extern` types. + Currently we use `Opaque` (a `UnsafeCell<MaybeUninit<T>>` + `PhantomPinned` for avoiding uniqueness for mutable references), but we need to be careful with `mem::swap` and forces us to take `&self` in certain cases we wouldn't want. - `-Coverflow-checks=report`. + i.e. a new mode that allows to "report and continue" (wrapping), like UBSan and similar tools. - CFI related improvements. + `fn_cast!` macro and `bindgen` improvements to generate the annotation for CFI encoding on structs. - Support packed types to be aligned or to contain aligned members. + And `bindgen` support for it. - Custom prelude. - `build_assert!`. + Especially ways to fail earlier and/or improve the error messages, similar to [GCC's](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-error-function-attribute) and [Clang's](https://clang.llvm.org/docs/AttributeReference.html#error-warning) `error`/`warning` attribute. - Specialization for improving the performance of our `alloc` types. + And generally leveraging any remaining magic `Box` may have. - `--emit=noreturn`. + We may be able to improve `objtool`, but having that at least as a unstable option for the time being would significantly improve the situation. - Safe transumations. + We may vendor `zerocopy` for now, but long-term we are interested in seeing parts of it make it into the standard library. + TODO: Can `fn_cast!` be safe in some cases? It would seem like it, in which case, should we split it into `fn_cast!` vs. `unsafe_fn_cast!`? - Contracts/better safety comment tools. + Perhaps served by external tools. #### Extra things - `bindgen` + Markus: A solution to convert headers like `include/uapi/linux/input-event-codes.h`. * Miguel: We would likely need to give extra information to `bindgen`, either via flags on annotations on the C header. But if we need to give annotations in the C header, it may be that it is just better to convert it to an `enum`. * Danilo: for uAPI headers, changing from macros to `enum` may break C or C++ or other languages using the header. - Better Macros (maybe just a nice to have) + Macro-public-only items (so items that can only be used from *our* macro, but not outside) ## Miscellaneous <!-- stuff that does not fit into other categories -->

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully