On Jan 26, 2021, at 12:17, Borislav Petkov <[email protected]> wrote:
> On Wed, Dec 23, 2020 at 07:57:03AM -0800, Chang S. Bae wrote:
>> 
>> +int alloc_xstate_buffer(struct fpu *fpu, u64 mask)

<snip>

>> +    if (newsz > fpu_kernel_xstate_max_size) {
>> +            pr_warn_once("x86/fpu: xstate buffer too large (%u > %u 
>> bytes)\n",
>> +                         newsz, fpu_kernel_xstate_max_size);
>> +            XSTATE_WARN_ON(1);
>> +            return 0;
> 
> return 0?!? On an error?!?

With more discussions, I now think it is too much to check like this. This
function (merely) allocates the requested size. So, going to remove it.

Thanks,
Chang

Reply via email to