HomeFreeBSD

pkru: Fix handling of 1GB largepage mappings

Description

pkru: Fix handling of 1GB largepage mappings

pmap_pkru_update_range() did not handle the case where a PDPE has PG_PS
set. More generally, the SET_PKRU and CLEAR_PKRU sysarch
implementations did not check whether the request covers a "boundary" vm
map entry. Fix this, add the missing PG_PS test, and add some tests.

Approved by: so
Security: FreeBSD-SA-26:11.amd64
Security: CVE-2026-6386
Reported by: Nicholas Carlini <npc@anthropic.com>
Reviewed by: kib, alc
Differential Revision: https://reviews.freebsd.org/D56184

Details

Provenance
markjAuthored on Mar 31 2026, 1:37 PM
Reviewer
kib
Differential Revision
Restricted Differential Revision
Parents
rG093903a8d4c0: tty: Avoid leaving dangling pointers in tty_drop_ctty()
Branches
Unknown
Tags
Unknown