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:	Wed, 7 Oct 2015 10:00:05 -0400
From:	Alex Deucher <alexdeucher@...il.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Christian König <christian.koenig@....com>,
	Marek Olšák <marek.olsak@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Maling list - DRI developers 
	<dri-devel@...ts.freedesktop.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Alex Deucher <alexander.deucher@....com>,
	"monk. liu" <monk.liu@....com>
Subject: Re: [PATCH] drm/amdgpu: fix 32-bit compiler warning

On Wed, Oct 7, 2015 at 5:18 AM, Arnd Bergmann <arnd@...db.de> wrote:
> On Wednesday 07 October 2015 10:57:11 Christian König wrote:
>> On 07.10.2015 09:41, Arnd Bergmann wrote:
>> > The new amdgpu driver passes a user space pointer in a 64-bit structure
>> > member, which is the correct way to do it, but it attempts to
>> > directly cast it to a __user pointer in the kernel, which causes
>> > a warning in three places:
>> >
>> > drm/amd/amdgpu/amdgpu_cs.c: In function 'amdgpu_cs_parser_init':
>> > drm/amd/amdgpu/amdgpu_cs.c:180:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>> >    chunk_array_user = (uint64_t __user *)(cs->in.chunks);
>> >
>> > This changes all three to add an intermediate cast to 'unsigned long'
>> > as other drivers do. This avoids the warning and works correctly on
>> > both 32-bit and 64-bit architectures.
>> >
>> > Signed-off-by: Arnd Bergmann <arnd@...db.de>
>>
>> Well if I'm not completely mistaken this is the second time we need to
>> fix this because somebody thought the cast was unnecessary.
>>
>> Anyway the patch is Reviewed-by: Christian König
>> <christian.koenig@....com> and I'm going to keep an eye open for the
>> next time somebody tries to remove this.
>>
>
> Ok, thanks.
>
> I guess I should have added
>
> Fixes: e60b344f6c0eff ("drm/amdgpu: optimize amdgpu_parser_init")

Applied this that comment added.

Thanks!

Alex

>
>         Arnd
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ