Proper fields initializations
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest9 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | ibv_cmd_create_ah(): initialize reserved fields in various structuressrc/ | +3 | 0 replies | |
| 2/9 | ibv_cmd_post_recv(): initialize reserved field in struct ibv_kern_recv_wrsrc/ | +1 | 0 replies | |
| 3/9 | ibv_cmd_post_send(): initialize reserved field in struct ibv_kern_send_wrsrc/ | +10 | 0 replies | |
| 4/9 | ibv_cmd_create_srq_ex(): set reserved field in struct ibv_create_xsrqsrc/ | +1 | 0 replies | |
| 5/9 | kern-abi: remove unused qp_type union in struct ibv_kern_send_wrinclude/ | +0 | 0 replies | |
| 6/9 | ibv_cmd_open_qp(): initialize reserved field in struct ibv_open_qpsrc/ | +1 | 0 replies | |
| 7/9 | ibv_cmd_create_flow(): explicitly clear fieldssrc/ | +4 | 0 replies | |
| 8/9 | ibv_cmd_create_flow(): initialize flow_id->comp_masksrc/ | +1 | 0 replies | |
| 9/9 | ibv_cmd_destroy_flow(): initialize comp_mask explicitlysrc/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH libibverbs 0/9] Proper fields initializations
Hi,
Following discussions in '[PATCH for-next 1/2] IB/uverbs: Add QP creation flags, allow blocking UD multicast loopback' thread[1], I've reviewed libibverbs and how it's handling "reserved" fields.
I have identified portion of data structures not initialized but sent to the kernel.
That means the kernel doesn't check the value of those non-initialized fields. In turn, this means such fields cannot be used for future extension, or it cannot be used for extension without an other mean to declare the presence of the extension.
Please have a look to this patchset where I tried to have proper handling of reserved field, padding, etc. just like following commits did it before:
commit 00042559262a Add Valgrind annotations
(same as commit 0e0604213ed7 Add Valgrind annotations) commit d5052fa0bf81 Initialize reserved attributes in modify QP command commit 9eb2125b2027 Fix several valgrind false positives
As I haven't tested, nor benchmarked the code with my patches, think about it before applying them.
BTW, I think it's time to use valgrind again.
[1] http://marc.info/?i=1410799972.7830.25.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/[email protected]
Yann Droneaud (9):
ibv_cmd_create_ah(): initialize reserved fields in various structures ibv_cmd_post_recv(): initialize reserved field in struct
ibv_kern_recv_wr
ibv_cmd_post_send(): initialize reserved field in struct
ibv_kern_send_wr
ibv_cmd_create_srq_ex(): set reserved field in struct ibv_create_xsrq
kern-abi: remove unused qp_type union in struct ibv_kern_send_wr ibv_cmd_open_qp(): initialize reserved field in struct ibv_open_qp ibv_cmd_create_flow(): explicitly clear fields ibv_cmd_create_flow(): initialize flow_id->comp_mask ibv_cmd_destroy_flow(): initialize comp_mask explicitly
include/infiniband/kern-abi.h | 5 ----- src/cmd.c | 24 ++++++++++++++++++++++-- 2 files changed, 22 insertions(+), 7 deletions(-)
Signature · 6 lines
1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html