x86: Support arbitrary fs/gs base in getregs
The ptrace code for fs/gs base made some assumptions on
the state of fs/gs which are not true anymore on kernels
running with FSGSBASE.
With the new instructions it is very easy to access
the values, and they are always stored in the thread
struct. So just implement the straight forward code
to access it directly.
Note the direct access code path is only used for core dumps,
as with real ptrace the process is always blocked
and the state can be read from memory.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
3 files changed