]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: fix PKRU and swapout interaction
authorKonstantin Belousov <kib@FreeBSD.org>
Thu, 13 Apr 2023 11:37:35 +0000 (14:37 +0300)
committerKonstantin Belousov <kib@FreeBSD.org>
Fri, 14 Apr 2023 23:53:59 +0000 (02:53 +0300)
commit1e0e335b0f0dbae8ce49307377b23ef3673bd402
treee6a853777ca45ce852413407af9779d759e720ab
parent485f783f882ed026cdbfede89aa7bddad3fffdf3
amd64: fix PKRU and swapout interaction

When vm_map_remove() is called from vm_swapout_map_deactivate_pages()
due to swapout, PKRU attributes for the removed range must be kept
intact.  Provide a variant of pmap_remove(), pmap_map_delete(), to
allow pmap to distinguish between real removes of the UVA mappings
and any other internal removes, e.g. swapout.

For non-amd64, pmap_map_delete() is stubbed by define to pmap_remove().

Reported by: andrew
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D39556
sys/amd64/amd64/pmap.c
sys/amd64/include/pmap.h
sys/arm/include/pmap.h
sys/arm64/include/pmap.h
sys/i386/include/pmap.h
sys/powerpc/include/pmap.h
sys/riscv/include/pmap.h
sys/vm/vm_map.c