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] [thread-next>] [day] [month] [year] [list]
Message-ID: <b2f4a70f-62ff-41c7-b0bd-ad8723f70ba0@amd.com>
Date: Tue, 26 Aug 2025 11:50:42 -0500
From: Mario Limonciello <mario.limonciello@....com>
To: Lizhi Hou <lizhi.hou@....com>, ogabbay@...nel.org,
 quic_jhugo@...cinc.com, jacek.lawrynowicz@...ux.intel.com,
 dri-devel@...ts.freedesktop.org
Cc: linux-kernel@...r.kernel.org, max.zhen@....com, sonal.santan@....com,
 kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] accel/amdxdna: Fix incorrect type used for a local
 variable

On 8/26/2025 11:03 AM, Lizhi Hou wrote:
> drivers/accel/amdxdna/aie2_pci.c:794:13: sparse: sparse: incorrect type in assignment (different address spaces)
> 
> Fixes: c8cea4371e5e ("accel/amdxdna: Add a function to walk hardware contexts")
> Reported-by: kernel test robot <lkp@...el.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202508230855.0b9efFl6-lkp@intel.com/
> Signed-off-by: Lizhi Hou <lizhi.hou@....com>
> ---
>   drivers/accel/amdxdna/aie2_pci.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/accel/amdxdna/aie2_pci.c b/drivers/accel/amdxdna/aie2_pci.c
> index 16ac0cab4f44..2885a3c17e89 100644
> --- a/drivers/accel/amdxdna/aie2_pci.c
> +++ b/drivers/accel/amdxdna/aie2_pci.c
> @@ -785,7 +785,7 @@ static int aie2_get_clock_metadata(struct amdxdna_client *client,
>   
>   static int aie2_hwctx_status_cb(struct amdxdna_hwctx *hwctx, void *arg)
>   {
> -	struct amdxdna_drm_query_hwctx __user *buf, *tmp __free(kfree) = NULL;
> +	struct amdxdna_drm_query_hwctx *tmp __free(kfree) = NULL, __user *buf;

IMO it would be better to just split these into two separate 
declarations so that we don't have to worry about nuance of order of 
operations resolving the type.

>   	struct amdxdna_drm_get_info *get_info_args = arg;
>   
>   	if (get_info_args->buffer_size < sizeof(*tmp))


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ