Re: [PATCH rdma-rc 05/15] IB/uverbs: Use u64_to_user_ptr() not a union

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

 



On 2/13/2018 5:18 AM, Leon Romanovsky wrote:
From: Jason Gunthorpe <jgg@xxxxxxxxxxxx>

The union approach will get the endianness wrong sometimes if the kernel's
pointer size is 32 bits resulting in EFAULTs when trying to copy to/from
user.

Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
Signed-off-by: Leon Romanovsky <leon@xxxxxxxxxx>
---
  drivers/infiniband/core/uverbs_std_types.c |  4 ++--
  include/rdma/uverbs_ioctl.h                | 10 ++++------
  2 files changed, 6 insertions(+), 8 deletions(-)

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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