HomeFreeBSD

amd64: do not handle fs/gs bases conditionally on the selector

Description

amd64: do not handle fs/gs bases conditionally on the selector

For machines with RDFSBASE support, we only saved and restored fs and gs
base registers when corresponding segment register contained the
predefined value. This breaks some valid uses of the LDT together with
WR{F,G}SBASE.

Unconditionally save bases, and restore them on return to usermode. The
PCB_FULL_IRET optimization is still in place.

Reviewed by: markj, olce
Reported and tested: Alex S <iwtcex@gmail.com>
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D50414

Details

Provenance
kibAuthored on May 19 2025, 1:30 AM
Reviewer
markj
Differential Revision
D50414: amd64: do not handle fs/gs bases conditionally on the selector
Parents
rG08471a76e3d2: ifconfig: 802.11: fix a warning message
Branches
Unknown
Tags
Unknown