Re: [PATCH] x86/ptrace: Clean up PTRACE_GETREGS/PTRACE_PUTREGS regset selection

2021-02-02 Thread Borislav Petkov
On Thu, Jan 28, 2021 at 05:41:21PM -0800, Andy Lutomirski wrote: > task_user_regset_view() is fundamentally broken, but it's ABI for > PTRACE_GETREGSET and PTRACE_SETREGSET. > > We shouldn't be using it for PTRACE_GETREGS or PTRACE_SETREGS, No "We" etc pls. > though. A native 64-bit ptrace()

[PATCH] x86/ptrace: Clean up PTRACE_GETREGS/PTRACE_PUTREGS regset selection

2021-01-28 Thread Andy Lutomirski
task_user_regset_view() is fundamentally broken, but it's ABI for PTRACE_GETREGSET and PTRACE_SETREGSET. We shouldn't be using it for PTRACE_GETREGS or PTRACE_SETREGS, though. A native 64-bit ptrace() call and an x32 ptrace() call should use the 64-bit regset views, and a 32-bit ptrace() call