From nobody Fri Oct 11 13:06:26 2024 X-Original-To: net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XQ6MR175fz5Ys3X for ; Fri, 11 Oct 2024 13:06:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XQ6MQ63mkz4YWG for ; Fri, 11 Oct 2024 13:06:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728651986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vY9yY65mwnfNdFrvRT7gJ47Jy19Ri06F1aAnpV8dyNA=; b=ZkSbDUFbuJzrSgdALtuMlKY8MwKcOr4Q9Y0buK+LA7EJ48Kwk9MuLUZEZeCjfHGVaeWAV8 DZ1IgkzzHKW7lyA8Wp/q7St9QHrsiRXXN9L2gTciEmQJWBsHedNOA1TWsDSOPAYecgVQI2 T8YtFpfrTPfjDL5Zbl91/Yj20zEHdg2+Jy236yxULHfNjNwYzzgdpxh8sX6EEldGutj+H5 vWPLWXMPDQGAyvyM3xPVnlYF8+25DrHcnp+IQ+W554wNNq3kKyIUa7jxEHTImZbB/guqll /uWb775M07hbwwIpMd12iiwU7C3RhUHDO2R+a8AlKo6yQm4BbAySjHhk0NO5jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728651986; a=rsa-sha256; cv=none; b=OhRvJm/i1clJfJUimhGu7928NBNad923yaQE/uFQ/15S9EUz8QY2dBfjnyURQHPJGVnJLf 8eMvIsFDowvuGorszVPEa//E1g4XRzyGK6JhJRlBlAuCj8BWTt0lDEfBCvDP3D6DpyZlXh ePXyq3z6oqZUXKd+2Aw9p17XF2xeAFEu3OZMw4CJuAXuFzU8qE2fv69iFXEXrvjkg8F5uD t/6ACUrguuMlM05rHZ/n4TY1+q/M9H3tbJJaU5GK6+AwlctYtv3ZXq/l3eu9HH+sKUHtYT nPgPbNFvY0Ey8Exc1jwZNJzr/H49ktdhyw5sEoCBeqJ70s7x34XgD8M/GM0rMw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XQ6MQ5gGHzjqc for ; Fri, 11 Oct 2024 13:06:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 49BD6QGg019968 for ; Fri, 11 Oct 2024 13:06:26 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 49BD6QTu019967 for net@FreeBSD.org; Fri, 11 Oct 2024 13:06:26 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 281990] offset of sa_family in sockaddr_ib inconsistent with sockaddr Date: Fri, 11 Oct 2024 13:06:26 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 14.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: markj@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281990 --- Comment #5 from Mark Johnston --- (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.=