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]
Date:	Mon, 13 Jun 2016 22:52:47 +0000
From:	"Deucher, Alexander" <Alexander.Deucher@....com>
To:	'David Binderman' <linuxdev.baldrick@...il.com>,
	"Koenig, Christian" <Christian.Koenig@....com>,
	"airlied@...ux.ie" <airlied@...ux.ie>,
	"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"dcb314@...mail.com" <dcb314@...mail.com>
Subject: RE: linux-4.7-rc3/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:4836: wierd
 condition ?

> -----Original Message-----
> From: David Binderman [mailto:linuxdev.baldrick@...il.com]
> Sent: Monday, June 13, 2016 4:16 AM
> To: Deucher, Alexander; Koenig, Christian; airlied@...ux.ie; dri-
> devel@...ts.freedesktop.org; linux-kernel@...r.kernel.org;
> dcb314@...mail.com
> Subject: linux-4.7-rc3/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:4836:
> wierd condition ?
> 
> Hello there,
> 
> linux-4.7-rc3/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:4836]: (style)
> Boolean result is used in bitwise operation. Clarify expression with
> parentheses.
> 
> Source code is
> 
>             if ((ring->me == me_id) & (ring->pipe == pipe_id))
> 
> Maybe better code
> 
>             if ((ring->me == me_id) && (ring->pipe == pipe_id))
> 

Good catch.  Fixed in the attached patch.

> Also in the same file:
> 
> [drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:3866]: (style) Variable 'data'
> is assigned a value that is never used.

The readback of the register here is needed to wake up the block after disabling powergating.

> [drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:4321]: (style) Variable
> 'mc_shared_chmap' is assigned a value that is never used.

I think this one can be dropped.

> [drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:4657]: (style) Variable 'tmp'
> is assigned a value that is never used.
> 

This operation requires a posted write (i.e., a read back of the register to make sure the write has completed).

Thanks!

Alex

> Regards
> 
> David Binderman

Download attachment "0001-drm-amdgpu-gfx7-fix-broken-condition-check.patch" of type "application/octet-stream" (1036 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ