Created attachment 870709 [details] Systemtap script to reproduce RDMA header compile bug Description of problem: Version-Release number of selected component (if applicable): Fedora 19 and RHEL How reproducible: Steps to Reproduce: 1. Install systemtap-devel, kernel-headers and kernel-debuginfo packages. 2. Create a systemtap script (attached) which references an rdma user structure. 3. Run the script with the following "verbose" flags. $ stap --vp 04 foo.stp Actual results: stap exits with an error. The output includes this message: In file included from <command-line>:0:0: include/uapi/rdma/rdma_user_cm.h:112:26: error: field ‘addr’ has incomplete type struct sockaddr_storage addr; ^ Expected results: stap starts without error. (use Ctrl-C to stop it.) Additional info: The error occurs because include/uapi/rdma/rdma_user_cm.h does not include linux/socket.h, which defines struct sockaddr_storage. The error is also present in RHEL 6.5 (RPM kernel-headers-2.6.32-431.3.1.el6.x86_64, file include/rdma/rdma_user_cm.h). The immediate problem can be fixed by adding the include. The more general problem is this: No process verifies that include files (with some exceptions) compile by themselves (or equivalently, are included as the first non-whitespace in a file which compiles.) If there were such a process, it would have caught the bug.
Further, for user-mode use, instances of instances of "struct sockaddr_storage" should change to "struct __kernel_sockaddr_storage". That is the name exposed in include/uapi/linux/socket.h.
A patch for the include file has been sent upstream and should be picked up and eventually make its way back into the Fedora kernels.