Re: [PATCH 3/3] x86: avoid copying dynamic FP state from init_task

2025-02-26 Thread Benjamin Berg
On Wed, 2025-02-26 at 14:08 +0100, Ingo Molnar wrote: > > * Benjamin Berg wrote: > > > From: Benjamin Berg > > > > The init_task instance of struct task_struct is statically allocated and > > may not contain the full FP state for userspace. As such, limit the copy > > to the valid area of init

Re: [PATCH 3/3] x86: avoid copying dynamic FP state from init_task

2025-02-26 Thread Ingo Molnar
* Benjamin Berg wrote: > > Note that this patch, while it still applies cleanly, crashes/hangs > > the x86-64 defconfig kernel bootup in the early boot phase in a KVM > > guest bootup. > > Oh, outch. It seems that arch_task_struct_size can actually become > smaller than sizeof(init_task) if

Re: [PATCH 3/3] x86: avoid copying dynamic FP state from init_task

2025-02-26 Thread Ingo Molnar
* Benjamin Berg wrote: > From: Benjamin Berg > > The init_task instance of struct task_struct is statically allocated and > may not contain the full FP state for userspace. As such, limit the copy > to the valid area of init_task and fill the rest with zero. > > Note that the FP state is onl

[PATCH 3/3] x86: avoid copying dynamic FP state from init_task

2024-12-17 Thread Benjamin Berg
From: Benjamin Berg The init_task instance of struct task_struct is statically allocated and may not contain the full FP state for userspace. As such, limit the copy to the valid area of init_task and fill the rest with zero. Note that the FP state is only needed for userspace, and as such it is