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: <6426b779-bd4d-4c85-b99d-4ddedf75d837@amd.com>
Date: Wed, 9 Oct 2024 14:31:45 +0200
From: Christian König <christian.koenig@....com>
To: Mohammed Anees <pvmohammedanees2003@...il.com>,
 alexander.deucher@....com, Xinhui.Pan@....com, airlied@...il.com,
 simona@...ll.ch, srinivasan.shanmugam@....com, David.Wu3@....com,
 felix.kuehling@....com, YuanShang.Mao@....com,
 pierre-eric.pelloux-prayer@....com
Cc: amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
 linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v2] drm/amdgpu: prevent BO_HANDLES error from being
 overwritten

Am 09.10.24 um 14:28 schrieb Mohammed Anees:
> Before this patch, if multiple BO_HANDLES chunks were submitted,
> the error -EINVAL would be correctly set but could be overwritten
> by the return value from amdgpu_cs_p1_bo_handles(). This patch
> ensures that if there are multiple BO_HANDLES, we stop.
>
> Cc: stable@...r.kernel.org
> Fixes: fec5f8e8c6bc ("drm/amdgpu: disallow multiple BO_HANDLES chunks in one submit")
> Signed-off-by: Mohammed Anees <pvmohammedanees2003@...il.com>

Reviewed-by: Christian König <christian.koenig@....com>

@Pierre-Eric can you pick that one up and push to amd-staging-drm-next?

Alex is currently on XDC and I'm a bit busy as well.

Thanks,
Christian.

> ---
> v2:
> - Switched to goto free_partial_kdata for error handling, following the existing pattern.
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> index 1e475eb01417..d891ab779ca7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -265,7 +265,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p,
>   
>   			/* Only a single BO list is allowed to simplify handling. */
>   			if (p->bo_list)
> -				ret = -EINVAL;
> +				goto free_partial_kdata;
>   
>   			ret = amdgpu_cs_p1_bo_handles(p, p->chunks[i].kdata);
>   			if (ret)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ