RE: [PATCH] siw: fix 64/32bit pointer inconsistency.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----"Jason Gunthorpe" <jgg@xxxxxxxx> wrote: -----

>To: "Bernard Metzler" <bmt@xxxxxxxxxxxxxx>
>From: "Jason Gunthorpe" <jgg@xxxxxxxx>
>Date: 08/20/2019 03:23PM
>Cc: linux-rdma@xxxxxxxxxxxxxxx, geert@xxxxxxxxxxxxxx
>Subject: [EXTERNAL] Re: [PATCH] siw: fix 64/32bit pointer
>inconsistency.
>
>On Tue, Aug 20, 2019 at 03:14:42PM +0200, Bernard Metzler wrote:
>>  		} else if (c_tx->in_syscall) {
>> -			if (copy_from_user((void *)paddr,
>> -					   (const void __user *)sge->laddr,
>> -					   bytes))
>> +			if (copy_from_user(paddr,
>> +				(const void __user *)(uintptr_t)sge->laddr,
>> +				bytes))
>
>This pattern should be written u64_to_user_ptr(), in fact every
>place that treats a user sourced u64 should use it.
>
>

Thanks Jason,
I will re-post.




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux