Date: Fri, 11 Oct 2024 13:06:26 +0000 From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 281990] offset of sa_family in sockaddr_ib inconsistent with sockaddr Message-ID: <bug-281990-7501-mnMU9XCJYe@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-281990-7501@https.bugs.freebsd.org/bugzilla/> References: <bug-281990-7501@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281990 --- Comment #5 from Mark Johnston <markj@FreeBSD.org> --- (In reply to Konstantin Belousov from comment #4) In general, our generic system calls do not require userspace to fill out sa_len. Consumers should use getsockaddr(), which fills it in. The kernel's use of sockaddr_ib appears to be mostly contained within the r= dma connection manager, where the sockaddr length can be inferred from sa_famil= y.=20 So it may not even be necessary to fill out the length anywhere, just reser= ve the first byte of the struct as a pad byte. I do not see why it would be source-incompatible with Linux, all of the references to sib_family in the = tree are just assignments. It shouldn't matter whether the field is a uint8_t v= s. a uint16_t, so I don't see code changes are required. Alternately, OFED code could be compiled with a sockaddr definition that is compatible with Linux. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-281990-7501-mnMU9XCJYe>