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]
Message-ID: <f78e798b-259a-53bb-f49b-8bb29d88a356@vodafone.de>
Date:	Tue, 2 Aug 2016 15:37:31 +0200
From:	Christian König <deathsimple@...afone.de>
To:	Nicolai Hähnle <nhaehnle@...il.com>,
	"Deucher, Alexander" <Alexander.Deucher@....com>,
	'Sean Paul' <seanpaul@...gle.com>,
	Wei Yongjun <weiyj.lk@...il.com>
Cc:	"Jiang, Sonny" <Sonny.Jiang@....com>,
	"Zhou, Jammy" <Jammy.Zhou@....com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	dri-devel <dri-devel@...ts.freedesktop.org>,
	"Nath, Arindam" <Arindam.Nath@....com>,
	"Liu, Leo" <Leo.Liu@....com>,
	"Koenig, Christian" <Christian.Koenig@....com>,
	"Liu, Monk" <Monk.Liu@....com>
Subject: Re: [PATCH -next] drm/amdgpu: use kmemdup rather than duplicating its
 implementation

Am 01.08.2016 um 14:16 schrieb Nicolai Hähnle:
> On 29.07.2016 20:38, Deucher, Alexander wrote:
>>> -----Original Message-----
>>> From: Sean Paul [mailto:seanpaul@...gle.com]
>>> Sent: Friday, July 29, 2016 3:35 PM
>>> To: Wei Yongjun
>>> Cc: Deucher, Alexander; Koenig, Christian; Dave Airlie; Jiang, 
>>> Sonny; Liu, Leo;
>>> Nath, Arindam; Zhou, David(ChunMing); Zhou, Jammy; Liu, Monk; 
>>> dri-devel;
>>> Linux Kernel Mailing List
>>> Subject: Re: [PATCH -next] drm/amdgpu: use kmemdup rather than
>>> duplicating its implementation
>>>
>>> On Thu, Jul 28, 2016 at 12:18 PM, Wei Yongjun <weiyj.lk@...il.com> 
>>> wrote:
>>>> Use kmemdup rather than duplicating its implementation.
>>>>
>>>> Generated by: scripts/coccinelle/api/memdup.cocci
>>>>
>>>> Signed-off-by: Wei Yongjun <weiyj.lk@...il.com>
>>>
>>>
>>> Thanks for the patch. I'll apply this to -misc once the merge window 
>>> is closed.
>>>
>>> Acked-by: Sean Paul <seanpaul@...omium.org>
>>
>> Unless you've already applied this to the misc tree, I'd prefer to 
>> take it via the amdgpu tree.
>
> I recall Christian NAKing an almost identical patch some time ago. 
> Something about needing memcpy_fromio()?
>
> Yup, it's here: https://lkml.org/lkml/2016/5/19/235

Yes, exactly. We need memcpy_fromio() and memcpy_toio() in the 
suspend/resume functions instead of memcpy.

I just didn't had time to test that yet (and that was unfortunately a 
few month ago already).

So please drop this patch,
Christian.

>
> Cheers,
> Nicolai
>
>>
>> Alex
>>
>>>
>>>
>>>> ---
>>>>  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 +---
>>>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>>>> index a46a64c..b779b5f 100644
>>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
>>>> @@ -296,12 +296,10 @@ int amdgpu_uvd_suspend(struct amdgpu_device
>>> *adev)
>>>>         size = amdgpu_bo_size(adev->uvd.vcpu_bo);
>>>>         ptr = adev->uvd.cpu_addr;
>>>>
>>>> -       adev->uvd.saved_bo = kmalloc(size, GFP_KERNEL);
>>>> +       adev->uvd.saved_bo = kmemdup(ptr, size, GFP_KERNEL);
>>>>         if (!adev->uvd.saved_bo)
>>>>                 return -ENOMEM;
>>>>
>>>> -       memcpy(adev->uvd.saved_bo, ptr, size);
>>>> -
>>>>         return 0;
>>>>  }
>>>>
>>>>
>>>>
>>>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@...ts.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ