Messages in this thread | | | From | "Jason A. Donenfeld" <> | Date | Mon, 20 Apr 2020 22:25:33 -0600 | Subject | Re: FPU register granularity [Was: Re: [PATCH crypto-stable] crypto: arch/lib - limit simd usage to PAGE_SIZE chunks] |
| |
On Mon, Apr 20, 2020 at 10:14 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > Hi David, > > On Mon, Apr 20, 2020 at 2:32 AM David Laight <David.Laight@aculab.com> wrote: > > Maybe kernel_fp_begin() should be passed the address of somewhere > > the address of an fpu save area buffer can be written to. > > Then the pre-emption code can allocate the buffer and save the > > state into it. > > Interesting idea. It looks like `struct xregs_state` is only 576 > bytes. That's not exactly small, but it's not insanely huge either, > and maybe we could justifiably stick that on the stack, or even > reserve part of the stack allocation for that that the function would > know about, without needing to specify any address.
Hah-hah, nevermind here. extended_state_area is of course huge, bringing the whole structure to a whopping 3k with avx512. :)
| |