Re: [PATCH 1/2] compat32: translate userland PT_* request values into kernel

2019-05-29 Thread Michał Górny
On Thu, 2019-05-30 at 03:15 +1000, matthew green wrote: > thanks for working on this. > > > + case PT_FIRSTMACH + 0: > > + return PT_STEP; > > + case PT_FIRSTMACH + 1: > > + return PT_GETREGS; > [ ... ] > > these magic numbers are a little ugly. can you avoid them? I

re: [PATCH 1/2] compat32: translate userland PT_* request values into kernel

2019-05-29 Thread matthew green
thanks for working on this. > + case PT_FIRSTMACH + 0: > + return PT_STEP; > + case PT_FIRSTMACH + 1: > + return PT_GETREGS; [ ... ] these magic numbers are a little ugly. can you avoid them? is there a way to have amd64 have direct access to the i386 values? >

Re: [PATCH 1/2] compat32: translate userland PT_* request values into kernel

2019-05-28 Thread Kamil Rytarowski
On 27.05.2019 21:03, Michał Górny wrote: > Currently, the compat32 passes PT_* request values to kernel functions > without translation. This works fine for low PT_* requests that happen > to have the same values both on i386 and amd64. However, for requests > higher than PT_SETFPREGS, the value

[PATCH 1/2] compat32: translate userland PT_* request values into kernel

2019-05-27 Thread Michał Górny
Currently, the compat32 passes PT_* request values to kernel functions without translation. This works fine for low PT_* requests that happen to have the same values both on i386 and amd64. However, for requests higher than PT_SETFPREGS, the value passed from userland (matching i386 const) does