HomeFreeBSD

x86: Add a NT_X86_SEGBASES register set.

Description

x86: Add a NT_X86_SEGBASES register set.

This register set contains the values of the fsbase and gsbase
registers. Note that these registers can already be controlled
individually via ptrace(2) via MD operations, so the main reason for
adding this is to include these register values in core dumps. In
particular, this will enable looking up the value of TLS variables
from core dumps in gdb.

The value of NT_X86_SEGBASES was chosen to match the value of
NT_386_TLS on Linux. The notes serve similar purposes, but FreeBSD
will never dump a note equivalent to NT_386_TLS (which dumps a single
segment descriptor rather than a pair of addresses) and picking a
currently-unused value in the NT_X86_* range could result in a future
conflict.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D34650

Details

Provenance
jhbAuthored on Mar 24 2022, 6:36 PM
Reviewer
markj
Differential Revision
D34650: x86: Add a NT_X86_SEGBASES register set.
Parents
rG196cfd0b2eb6: LinuxKPI: 802.11: improve hw_scan fallback to sw_scan
Branches
Unknown
Tags
Unknown