Page MenuHomeFreeBSD

x86: Add a NT_X86_SEGBASES register set.
ClosedPublic

Authored by jhb on Mar 24 2022, 12:05 AM.
Tags
None
Referenced Files
F98201571: D34650.diff
Wed, Oct 2, 4:24 PM
F97924068: D34650.diff
Tue, Oct 1, 6:11 PM
F97919794: D34650.diff
Tue, Oct 1, 5:45 PM
Unknown Object (File)
Sun, Sep 29, 2:56 PM
Unknown Object (File)
Sun, Sep 29, 9:43 AM
Unknown Object (File)
Sat, Sep 28, 5:35 AM
Unknown Object (File)
Fri, Sep 27, 5:50 AM
Unknown Object (File)
Wed, Sep 25, 8:52 AM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable