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:   Thu, 24 Jan 2019 17:27:44 +0000
From:   Colin Ian King <colin.king@...onical.com>
To:     Ben Skeggs <bskeggs@...hat.com>, David Airlie <airlied@...ux.ie>,
        dri-devel@...ts.freedesktop.org, nouveau@...ts.freedesktop.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/nouveau/bios/ramcfg: fix missing parentheses when
 calculating RON

ping?

On 25/11/2018 17:09, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> Currently, the expression for calculating RON is always going to result
> in zero no matter the value of ram->mr[1] because the ! operator has
> higher precedence than the shift >> operator.  I believe the missing
> parentheses around the expression before appying the ! operator will
> result in the desired result.
> 
> [ Note, not tested ]
> 
> Detected by CoveritScan, CID#1324005 ("Operands don't affect result")
> 
> Fixes: c25bf7b6155c ("drm/nouveau/bios/ramcfg: Separate out RON pull value")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr3.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr3.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr3.c
> index 60ece0a8a2e1..1d2d6bae73cd 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr3.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr3.c
> @@ -87,7 +87,7 @@ nvkm_gddr3_calc(struct nvkm_ram *ram)
>  		WR  = (ram->next->bios.timing[2] & 0x007f0000) >> 16;
>  		/* XXX: Get these values from the VBIOS instead */
>  		DLL = !(ram->mr[1] & 0x1);
> -		RON = !(ram->mr[1] & 0x300) >> 8;
> +		RON = !((ram->mr[1] & 0x300) >> 8);
>  		break;
>  	default:
>  		return -ENOSYS;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ