Skip to content

rustix::mm::Advice is missing MADV_GUARD_INSTALL & MADV_GUARD_REMOVE, added in Linux 6.13 #1641

Description

@ds84182

Ideally this should rustix::mm::Advice should not be an enum (or madvise should take impl Into<RawAdvice> where RawAdvice is an escape hatch for values not present in rustix).

Docs:

       MADV_GUARD_INSTALL (since Linux 6.13)
              Install a lightweight guard region into the range specified
              by addr and size, causing any read or write in the range to
              result in a SIGSEGV signal being raised.

       MADV_GUARD_REMOVE (since Linux 6.13)
              Remove any lightweight guard regions which exist in the
              range specified by addr and size.

I may get off my ass and send out a PR. 🤷🏾‍♂️

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions