Re: [PATCH v4 2/7] x86/fsgsbase/64: Make ptrace read FS/GS base accurately
From: Thomas Gleixner
Date: Fri Jun 22 2018 - 10:37:27 EST
On Wed, 20 Jun 2018, Chang S. Bae wrote:
> From: Andy Lutomirski <luto@xxxxxxxxxx>
>
> ptrace can read FS/GS base using the register access API
> (PTRACE_PEEKUSER, etc) or PTRACE_ARCH_PRCTL. Make both of these
> mechanisms return the actual FS/GS base.
That's the 'BUG' fix, right? Ok, not something which needs to be urgently
backported it seems. It's surely a correctness issue, which improved
debugability, but surely not something crucial.
So the right ordering of the patches is:
1) Introduce task_seg_base() as a standalong patch w/o using it.
2) Add the new fsgs helpers and use task_seg_base() right away instead
of adding this misleading 'preserve bug' comment just to remove it
one patch later.
.....
Thanks,
tglx