lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e2a2f8a6-b9d8-502e-dcbd-d6598ea40f52@amd.com>
Date: Fri, 24 Oct 2025 13:09:50 -0700
From: Lizhi Hou <lizhi.hou@....com>
To: "Mario Limonciello (AMD) (kernel.org)" <superm1@...nel.org>,
	<ogabbay@...nel.org>, <quic_jhugo@...cinc.com>,
	<maciej.falkowski@...ux.intel.com>, <dri-devel@...ts.freedesktop.org>
CC: <linux-kernel@...r.kernel.org>, <max.zhen@....com>, <sonal.santan@....com>
Subject: Re: [PATCH] accel/amdxdna: Fix uninitialized return value

Applied to drm-misc-next.

On 10/24/25 11:07, Mario Limonciello (AMD) (kernel.org) wrote:
>
>
> On 10/24/2025 11:55 AM, Lizhi Hou wrote:
>> In aie2_get_hwctx_status() and aie2_query_ctx_status_array(), the
>> functions could return an uninitialized value in some cases. Update them
>> to always return 0. The amount of valid results is indicated by the
>> returned buffer_size, element_size, and num_element fields.
>>
>> Fixes: 2f509fe6a42c ("accel/amdxdna: Add ioctl 
>> DRM_IOCTL_AMDXDNA_GET_ARRAY")
>> Signed-off-by: Lizhi Hou <lizhi.hou@....com>
> Reviewed-by: Mario Limonciello (AMD) <superm1@...nel.org>> ---
>>   drivers/accel/amdxdna/aie2_pci.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/accel/amdxdna/aie2_pci.c 
>> b/drivers/accel/amdxdna/aie2_pci.c
>> index f48045318dc0..f1a8112b080f 100644
>> --- a/drivers/accel/amdxdna/aie2_pci.c
>> +++ b/drivers/accel/amdxdna/aie2_pci.c
>> @@ -822,7 +822,7 @@ static int aie2_get_hwctx_status(struct 
>> amdxdna_client *client,
>>       }
>>         args->buffer_size -= (u32)(array_args.buffer - args->buffer);
>> -    return ret;
>> +    return 0;
>>   }
>>     static int aie2_get_info(struct amdxdna_client *client, struct 
>> amdxdna_drm_get_info *args)
>> @@ -904,7 +904,7 @@ static int aie2_query_ctx_status_array(struct 
>> amdxdna_client *client,
>>       args->num_element = (u32)((array_args.buffer - args->buffer) /
>>                     args->element_size);
>>   -    return ret;
>> +    return 0;
>>   }
>>     static int aie2_get_array(struct amdxdna_client *client,
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ