Re: [PATCH v5] um: switch to regset API and depend on XSTATE

2024-12-16 Thread Brian Norris
(+ kasan-dev; leaving most of this thread intact) On Sat, Dec 14, 2024 at 01:25:59PM +0100, Benjamin Berg wrote: > Hi, > > On Sat, 2024-12-14 at 00:08 +0100, Benjamin Berg wrote: > > outch. It is doing a memcpy of init_task. Now, struct task_struct is > > variably sized, but init_struct is static

Re: [PATCH v5] um: switch to regset API and depend on XSTATE

2024-12-14 Thread Benjamin Berg
Hi, On Sat, 2024-12-14 at 00:08 +0100, Benjamin Berg wrote: > outch. It is doing a memcpy of init_task. Now, struct task_struct is > variably sized, but init_struct is statically allocated, which could > explain why the memcpy is not permitted to read the larger memory (for > the FP register space

Re: [PATCH v5] um: switch to regset API and depend on XSTATE

2024-12-13 Thread Benjamin Berg
Hi Brian, outch. It is doing a memcpy of init_task. Now, struct task_struct is variably sized, but init_struct is statically allocated, which could explain why the memcpy is not permitted to read the larger memory (for the FP register space). I can reproduce it with the kunit.py script, but didn't

Re: [PATCH v5] um: switch to regset API and depend on XSTATE

2024-12-13 Thread Brian Norris
Hi Benjamin, On Wed, Oct 23, 2024 at 11:41:20AM +0200, Benjamin Berg wrote: > From: Benjamin Berg > > The PTRACE_GETREGSET API has now existed since Linux 2.6.33. The XSAVE > CPU feature should also be sufficiently common to be able to rely on it. > > With this, define our internal FP state to

Re: [PATCH v5] um: switch to regset API and depend on XSTATE

2024-12-03 Thread SeongJae Park
On Tue, 03 Dec 2024 18:07:36 +0100 Benjamin Berg wrote: > On Tue, 2024-12-03 at 07:56 -0800, SeongJae Park wrote: > > On Tue, 03 Dec 2024 07:01:09 SeongJae Park wrote: > > > > > On Tue, 03 Dec 2024 09:40:34 +0100 Benjamin Berg > > > wrote: > > > > > > > Hi, > > > > > > > > that probably mea

Re: [PATCH v5] um: switch to regset API and depend on XSTATE

2024-12-03 Thread Benjamin Berg
On Tue, 2024-12-03 at 07:56 -0800, SeongJae Park wrote: > On Tue, 03 Dec 2024 07:01:09 SeongJae Park wrote: > > > On Tue, 03 Dec 2024 09:40:34 +0100 Benjamin Berg > > wrote: > > > > > Hi, > > > > > > that probably means the size detection for the FPU state (i.e. > > > PTRACE_GETREGSET for NT_X

Re: [PATCH v5] um: switch to regset API and depend on XSTATE

2024-12-03 Thread SeongJae Park
On Tue, 03 Dec 2024 07:01:09 SeongJae Park wrote: > On Tue, 03 Dec 2024 09:40:34 +0100 Benjamin Berg > wrote: > > > Hi, > > > > that probably means the size detection for the FPU state (i.e. > > PTRACE_GETREGSET for NT_X86_XSTATE is incorrect on a 32bit host in some > > way. > > > > Is there

Re: [PATCH v5] um: switch to regset API and depend on XSTATE

2024-12-03 Thread SeongJae Park
On Tue, 03 Dec 2024 09:40:34 +0100 Benjamin Berg wrote: > Hi, > > that probably means the size detection for the FPU state (i.e. > PTRACE_GETREGSET for NT_X86_XSTATE is incorrect on a 32bit host in some > way. > > Is there anything special about the qemu setup or it is just a default > qemu-x8

Re: [PATCH v5] um: switch to regset API and depend on XSTATE

2024-12-03 Thread Benjamin Berg
Hi, that probably means the size detection for the FPU state (i.e. PTRACE_GETREGSET for NT_X86_XSTATE is incorrect on a 32bit host in some way. Is there anything special about the qemu setup or it is just a default qemu-x86? Benjamin On Mon, 2024-12-02 at 23:02 -0800, SeongJae Park wrote: > Hel

Re: [PATCH v5] um: switch to regset API and depend on XSTATE

2024-12-02 Thread SeongJae Park
Hello, On Wed, 23 Oct 2024 11:41:20 +0200 Benjamin Berg wrote: > From: Benjamin Berg > > The PTRACE_GETREGSET API has now existed since Linux 2.6.33. The XSAVE > CPU feature should also be sufficiently common to be able to rely on it. > > With this, define our internal FP state to be the ho