Page MenuHomeFreeBSD

linuxkpi: Move LINUXKPI_PROT_VALID higher
Needs ReviewPublic

Authored by andrew on Jul 1 2026, 10:10 AM.
Referenced Files
Unknown Object (File)
Sun, Oct 4, 4:19 AM
Unknown Object (File)
Fri, Oct 2, 9:19 PM
Unknown Object (File)
Thu, Oct 1, 10:05 PM
Unknown Object (File)
Thu, Oct 1, 2:09 AM
Unknown Object (File)
Wed, Sep 30, 10:42 PM
Unknown Object (File)
Mon, Sep 28, 3:46 AM
Unknown Object (File)
Sat, Sep 26, 10:31 AM
Unknown Object (File)
Fri, Sep 11, 3:20 PM

Details

Reviewers
None
Group Reviewers
arm64
linuxkpi
Summary

Move LINUXKPI_PROT_VALID and LINUXKPI_CACHE_MODE_SHIFT out of the
bottom 8 bits. This allows the entire vm_prot_t to be stored in the
LinuxKPI pgprot_t.

This will be needed when we add more flags to vm_prot_t, e.g. for MTE
on arm64.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74453
Build 71336: arc lint + arc unit

Event Timeline

Is anyone who knows about LinuxKPI able to check this? I don't have anything that uses it, but need to move the value for MTE.

This came from 1ea4c85781e94 and was revised in ebf854802d83a.

@ashafer has an open review ( https://reviews.freebsd.org/D59436 ) and I was trying to understand some of this recently.
If you can give me a few days I'll try to fully wrap my head around this.

I assume @ashafer and @dumbbell can test this for nvidia and i915/amdgpu.

I still do not get how this is supposed to fully work but I assume the shortcut from before remains right. I'd say for me you can add:

OKed: bz