Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Bernard Metzler <bmt@zurich.ibm.com>
Cc: linux-rdma@vger.kernel.org, geert@linux-m68k.org
Subject: Re: [PATCH] siw: fix 64/32bit pointer inconsistency.
Date: Tue, 20 Aug 2019 10:22:55 -0300	[thread overview]
Message-ID: <20190820132255.GD29246@ziepe.ca> (raw)
In-Reply-To: <20190820131442.26466-1-bmt@zurich.ibm.com>

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.

Jason

  reply	other threads:[~2019-08-20 13:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-20 13:14 [PATCH] siw: fix 64/32bit pointer inconsistency Bernard Metzler
2019-08-20 13:22 ` Jason Gunthorpe [this message]
2019-08-20 17:18   ` Bernard Metzler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190820132255.GD29246@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=bmt@zurich.ibm.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-rdma@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox