Re: [PATCH v4 2/8] x86/fpu: Drop @perm from guest pseudo FPU container

From: Chao Gao
Date: Tue Apr 01 2025 - 21:56:54 EST


On Tue, Apr 01, 2025 at 10:16:47AM -0700, Chang S. Bae wrote:
>On 3/18/2025 8:31 AM, Chao Gao wrote:
>> -static void fpu_init_guest_permissions(struct fpu_guest *gfpu)
>> +static void fpu_lock_guest_permissions(struct fpu_guest *gfpu)
>> {
>> struct fpu_state_perm *fpuperm;
>> u64 perm;
>> @@ -218,8 +218,6 @@ static void fpu_init_guest_permissions(struct fpu_guest *gfpu)
>> WRITE_ONCE(fpuperm->__state_perm, perm | FPU_GUEST_PERM_LOCKED);
>> spin_unlock_irq(&current->sighand->siglock);
>> -
>> - gfpu->perm = perm & ~FPU_GUEST_PERM_LOCKED;
>> }
>
>With the removal, the function no longer requires a struct fpu_guest argument
>as it now operates solely on the group leader's FPU state.

Good catch! I will drop the fpu_guest argument.

>
>Thanks,
>Chang