qd564GCojZHh0iq835HJzXDhOoCM8OSTSaQ@mail.gmail.com> Subject: Re: git: 453968c78d27 - main - uipc_usrreq: revert addition of EMPTYPATH for bindat(2) To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000574e000653c31544" --000000000000574e000653c31544 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Konstantin. I'm geting a testunit failure on devel/aws-c-io reported at https://github.com/awslabs/aws-c-io/issues/803 that might be related to this change. Any clues how to deal with it? Thanks, Konstantin Belousov escreveu (quinta, 4/06/2026 =C3=A0(s) 18:55): > The branch main has been updated by kib: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D453968c78d27ed5c90562a1178f34fe= 8d616bf40 > > commit 453968c78d27ed5c90562a1178f34fe8d616bf40 > Author: Konstantin Belousov > AuthorDate: 2026-06-04 17:26:09 +0000 > Commit: Konstantin Belousov > CommitDate: 2026-06-04 17:55:11 +0000 > > uipc_usrreq: revert addition of EMPTYPATH for bindat(2) > > The caller wants the parent vnode, which cannot be provided for > emptypath > lookups. > > Reported and reviewed by: markj > Fixes: 12c590a9abd7 ("bindat(2)/connectat(2): allow implicit > EMPTYPATH for unix domain sockets") > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D57448 > --- > lib/libsys/open.2 | 4 +--- > sys/kern/uipc_usrreq.c | 5 ++--- > 2 files changed, 3 insertions(+), 6 deletions(-) > > diff --git a/lib/libsys/open.2 b/lib/libsys/open.2 > index defc593b15ce..7915f7e8ef0a 100644 > --- a/lib/libsys/open.2 > +++ b/lib/libsys/open.2 > @@ -447,11 +447,9 @@ The other functionality of the returned file > descriptor is limited to > the following descriptor-level operations: > .Pp > .Bl -tag -width __acl_aclcheck_fd -offset indent -compact > -.It Xr bindat 2 > -for unix domain socket > -.Pq see Xr unix 4 > .It Xr connectat 2 > for unix domain socket > +.Pq see Xr unix 4 > .It Xr fcntl 2 > but advisory locking is not allowed > .It Xr dup 2 > diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c > index a798aaf4f871..920588627914 100644 > --- a/sys/kern/uipc_usrreq.c > +++ b/sys/kern/uipc_usrreq.c > @@ -612,9 +612,8 @@ uipc_bindat(int fd, struct socket *so, struct sockadd= r > *nam, struct thread *td) > buf[namelen] =3D 0; > > restart: > - NDINIT_ATRIGHTS(&nd, CREATE, NOFOLLOW | LOCKPARENT | NOCACHE | > - EMPTYPATH, UIO_SYSSPACE, buf, fd, cap_rights_init_one(&rights= , > - CAP_BINDAT)); > + NDINIT_ATRIGHTS(&nd, CREATE, NOFOLLOW | LOCKPARENT | NOCACHE, > + UIO_SYSSPACE, buf, fd, cap_rights_init_one(&rights, > CAP_BINDAT)); > /* SHOULD BE ABLE TO ADOPT EXISTING AND wakeup() ALA FIFO's */ > error =3D namei(&nd); > if (error) > > --=20 Nuno Teixeira FreeBSD UNIX: Web: https://FreeBSD.org --000000000000574e000653c31544 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Konstantin.

I'm geti= ng a testunit failure on devel/aws-c-io reported at https://github.com/awslabs/aws-c-io/iss= ues/803 that might be related to this change.

Any clues ho= w to deal with it?

Thanks,

Konstantin Bel= ousov <kib@freebsd.org> escrev= eu (quinta, 4/06/2026 =C3=A0(s) 18:55):
The branch main has been updated by kib:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3D453968c78d27ed5c90562a1178f34fe8d616bf40
commit 453968c78d27ed5c90562a1178f34fe8d616bf40
Author:=C2=A0 =C2=A0 =C2=A0Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-06-04 17:26:09 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-06-04 17:55:11 +0000

=C2=A0 =C2=A0 uipc_usrreq: revert addition of EMPTYPATH for bindat(2)

=C2=A0 =C2=A0 The caller wants the parent vnode, which cannot be provided f= or emptypath
=C2=A0 =C2=A0 lookups.

=C2=A0 =C2=A0 Reported and reviewed by:=C2=A0 =C2=A0 =C2=A0 =C2=A0markj
=C2=A0 =C2=A0 Fixes:=C2=A0 12c590a9abd7 ("bindat(2)/connectat(2): allo= w implicit EMPTYPATH for unix domain sockets")
=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0The FreeBSD Foundation
=C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 =C2=A0 1 week
=C2=A0 =C2=A0 Differential revision:=C2=A0 https://reviews.freebsd= .org/D57448
---
=C2=A0lib/libsys/open.2=C2=A0 =C2=A0 =C2=A0 | 4 +---
=C2=A0sys/kern/uipc_usrreq.c | 5 ++---
=C2=A02 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/lib/libsys/open.2 b/lib/libsys/open.2
index defc593b15ce..7915f7e8ef0a 100644
--- a/lib/libsys/open.2
+++ b/lib/libsys/open.2
@@ -447,11 +447,9 @@ The other functionality of the returned file descripto= r is limited to
=C2=A0the following descriptor-level operations:
=C2=A0.Pp
=C2=A0.Bl -tag -width __acl_aclcheck_fd -offset indent -compact
-.It Xr bindat 2
-for unix domain socket
-.Pq see Xr unix 4
=C2=A0.It Xr connectat 2
=C2=A0for unix domain socket
+.Pq see Xr unix 4
=C2=A0.It Xr fcntl 2
=C2=A0but advisory locking is not allowed
=C2=A0.It Xr dup 2
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index a798aaf4f871..920588627914 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -612,9 +612,8 @@ uipc_bindat(int fd, struct socket *so, struct sockaddr = *nam, struct thread *td)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 buf[namelen] =3D 0;

=C2=A0restart:
-=C2=A0 =C2=A0 =C2=A0 =C2=A0NDINIT_ATRIGHTS(&nd, CREATE, NOFOLLOW | LOC= KPARENT | NOCACHE |
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0EMPTYPATH, UIO_SYSSPACE, buf, fd,= cap_rights_init_one(&rights,
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CAP_BINDAT));
+=C2=A0 =C2=A0 =C2=A0 =C2=A0NDINIT_ATRIGHTS(&nd, CREATE, NOFOLLOW | LOC= KPARENT | NOCACHE,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0UIO_SYSSPACE, buf, fd, cap_rights= _init_one(&rights, CAP_BINDAT));
=C2=A0/* SHOULD BE ABLE TO ADOPT EXISTING AND wakeup() ALA FIFO's */ =C2=A0 =C2=A0 =C2=A0 =C2=A0 error =3D namei(&nd);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (error)



--
Nuno Teixeira
=
FreeBSD UNIX:=C2=A0 <eduardo@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 https://Fr= eeBSD.org
--000000000000574e000653c31544--