-----"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.