Pull rdma fixes from Jason Gunthorpe: "Several significant bug fixes of pre-existing issues: - Missing validation on ucap fd types passed from userspace - Missing validation of HW DMA space vs userpace expected sizes in EFA queue setup - DMA corruption when using DMA block sizes >= 4G when setting up MRs in all drivers - Missing validation of CPU IDs when setting up dma handles - Missing validation of IB_MR_REREG_ACCESS when changing writability of a MR - Missing validation of received message/packet size in ISER and SRP" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/srp: bound SRP_RSP sense copy by the received length IB/isert: Reject login PDUs shorter than ISER_HEADERS_LEN RDMA: During rereg_mr ensure that REREG_ACCESS is compatible RDMA/core: Validate cpu_id against nr_cpu_ids in DMAH alloc RDMA/umem: Fix truncation for block sizes >= 4G RDMA/efa: Validate SQ ring size against max LLQ size RDMA/core: Validate the passed in fops for ib_get_ucaps()
Showing the changes to include (1 of 13 files). Show all
Unified · Split
| @@ -156,6 +156,8 @@ void ib_umem_dmabuf_revoke_lock(struct ib_umem_dmabuf *umem_dmabuf); · 155 unmodified lines | |||
| 156 | void ib_umem_dmabuf_revoke_unlock(struct ib_umem_dmabuf *umem_dmabuf); | 156 | void ib_umem_dmabuf_revoke_unlock(struct ib_umem_dmabuf *umem_dmabuf); |
| 157 | void ib_umem_dmabuf_revoke(struct ib_umem_dmabuf *umem_dmabuf); | 157 | void ib_umem_dmabuf_revoke(struct ib_umem_dmabuf *umem_dmabuf); |
| 158 | 158 | ||
| 159 | int ib_umem_check_rereg(struct ib_umem *umem, int flags, int new_access_flags); | ||
| 160 | |||
| 159 | #else /* CONFIG_INFINIBAND_USER_MEM */ | 161 | #else /* CONFIG_INFINIBAND_USER_MEM */ |
| 160 | 162 | ||
| 161 | #include <linux/err.h> | 163 | #include <linux/err.h> |
| @@ -230,5 +232,11 @@ static inline void ib_umem_dmabuf_revoke_lock(struct ib_umem_dmabuf *umem_dmabuf · 68 unmodified lines | |||
| 230 | static inline void ib_umem_dmabuf_revoke_unlock(struct ib_umem_dmabuf *umem_dmabuf) {} | 232 | static inline void ib_umem_dmabuf_revoke_unlock(struct ib_umem_dmabuf *umem_dmabuf) {} |
| 231 | static inline void ib_umem_dmabuf_revoke(struct ib_umem_dmabuf *umem_dmabuf) {} | 233 | static inline void ib_umem_dmabuf_revoke(struct ib_umem_dmabuf *umem_dmabuf) {} |
| 232 | 234 | ||
| 235 | static inline int ib_umem_check_rereg(struct ib_umem *umem, int flags, | ||
| 236 | int new_access_flags) | ||
| 237 | { | ||
| 238 | return -EOPNOTSUPP; | ||
| 239 | } | ||
| 240 | |||
| 233 | #endif /* CONFIG_INFINIBAND_USER_MEM */ | 241 | #endif /* CONFIG_INFINIBAND_USER_MEM */ |
| 234 | #endif /* IB_UMEM_H */ | 242 | #endif /* IB_UMEM_H */ |