Re: [PATCH 1/2] KVM: SVM: Fix UBSAN warning when reading avic parameter
From: Gal Pressman
Date: Tue Feb 24 2026 - 04:19:22 EST
On 23/02/2026 18:38, Naveen N Rao wrote:
> On Tue, Feb 10, 2026 at 08:46:20AM +0200, Gal Pressman wrote:
>>
>> +static int avic_param_get(char *buffer, const struct kernel_param *kp)
>> +{
>> + int val = *(int *)kp->arg;
>> +
>> + if (val == AVIC_AUTO_MODE)
>> + return sysfs_emit(buffer, "auto\n");
>
> My preference would be to return 'N' here, so that this continues to
> return a boolean value when read.
I guess the boolean conversion used to return 'Y' before this patch, why
is 'N' better?