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: <d2333f2e-1227-3f37-ac22-4a2a0a02acb4@postmarketos.org>
Date:   Sun, 3 Jan 2021 21:01:02 +0300
From:   Alexey Minnekhanov <alexeymin@...tmarketos.org>
To:     Iskren Chernev <iskren.chernev@...il.com>,
        Rob Clark <robdclark@...il.com>
Cc:     ~postmarketos/upstreaming@...ts.sr.ht, Sean Paul <sean@...rly.run>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Jordan Crouse <jcrouse@...eaurora.org>,
        linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        freedreno@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/msm: Fix MSM_INFO_GET_IOVA with carveout

I've tested all recent GPU bring-up patches on msm8974pro samsung-klte 
(a330v2) and with this patch everything is OK. But without this we're 
getting the following in dmesg while running kmscube (which is rendering 
nothing except black screen):

[   94.969272] msm fd900000.mdss: [drm:hangcheck_handler [msm]] *ERROR* 
A330: hangcheck detected gpu lockup rb 0!
[   94.970184] msm fd900000.mdss: [drm:hangcheck_handler [msm]] *ERROR* 
A330:     completed fence: 0
[   94.970873] msm fd900000.mdss: [drm:hangcheck_handler [msm]] *ERROR* 
A330:     submitted fence: 1
[   94.971600] msm fd900000.mdss: [drm:recover_worker [msm]] *ERROR* 
A330: hangcheck recover!
[   94.972329] msm fd900000.mdss: [drm:recover_worker [msm]] *ERROR* 
A330: offending task: kmscube (kmscube)
[   94.974101] revision: 330 (3.3.0.2)
[   94.974117] rb 0: fence:    0/1
[   94.974129] rptr:     36
[   94.974139] rb wptr:  36
[   94.974148] CP_SCRATCH_REG0: 0
[   94.974159] CP_SCRATCH_REG1: 0
[   94.974169] CP_SCRATCH_REG2: 0
[   94.974178] CP_SCRATCH_REG3: 0
[   94.974188] CP_SCRATCH_REG4: 0
[   94.974198] CP_SCRATCH_REG5: 0
[   94.974208] CP_SCRATCH_REG6: 10
[   94.974218] CP_SCRATCH_REG7: 12

So indeed partial revert of "if" condition fixes gpu at least on msm8974.

Tested-by: Alexey Minnekhanov <alexeymin@...tmarketos.org>

On 1/2/21 11:24 PM, Iskren Chernev wrote:
> The msm_gem_get_iova should be guarded with gpu != NULL and not aspace
> != NULL, because aspace is NULL when using vram carveout.
> 
> Fixes: 933415e24bd0d ("drm/msm: Add support for private address space instances")
> 
> Signed-off-by: Iskren Chernev <iskren.chernev@...il.com>
> ---
>   drivers/gpu/drm/msm/msm_drv.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index c5e61cb3356df..c1953fb079133 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -775,9 +775,10 @@ static int msm_ioctl_gem_info_iova(struct drm_device *dev,
>   		struct drm_file *file, struct drm_gem_object *obj,
>   		uint64_t *iova)
>   {
> +	struct msm_drm_private *priv = dev->dev_private;
>   	struct msm_file_private *ctx = file->driver_priv;
>   
> -	if (!ctx->aspace)
> +	if (!priv->gpu)
>   		return -EINVAL;
>   
>   	/*
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ