From nobody Wed Jun 21 13:58:47 2023 X-Original-To: bugs@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 4QmQ8R4XmGz4gSR9 for ; Wed, 21 Jun 2023 13:58:47 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QmQ8R2tNfz41W2 for ; Wed, 21 Jun 2023 13:58:47 +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=1687355927; 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=/QVQc8xbF9oK4argd1BlczJsJtr5zlzANKZTAsrLbRo=; b=XcDp+m/RaS6mHokRRktre7+oA3cuAiyC/QGXc0Vqc/R2Y94hvW8A2VUnnInWADcjYqqJ9h FUM1FeuRUeAwJXWume1AhWVL7MQ4FgI4eniUvq2DkptLpSnigmigcnCmvOj1pGqKdJa34/ yvDdM+jgvXErsj7MYE5ZowJ3V+HVtgMY2fC+DoIhgFqH8QOu2/cztBIbXDGkpP6Ams5Prt lxrLSpiEKfAij8u6YRf7AyEgXWbum1H5/ryoQ5Jg38EoX+j8+FcVg27Kz7B82ZCSENjoyL 6i8b34xGm+LbRckEdVPCm55l24BWhK0bjdcaIsSks+BaC3NSEKq/8IC3IM3AiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687355927; a=rsa-sha256; cv=none; b=glXiVGYkBhVgNB+Yr/Fyor0AjVFup6Q0TIyPPYa1WOqhtSB+hduJ37WJyBHEsjtO2Bp7L9 63wxV/Ort/th4LIIFrECfBXA7RzIF35bjnHQyv8sR536tfqv9vIpOkBk3jNULKcJn1YYNc F1ON8fiGStsF6cIArirV4k+WiSsM6aUwHOxUrAcjIe+sqDWFWpim65Df/rZC14S1lSs06J IJlfM5wEAjTZIts00HzIrLa7/P6JJWLYM/wzJSUsphex2q11k1Vdqc+GkQHtlf3hOXFELO n/m8jRsHMCkug7RaLYxvw+3DC3B4sfDx4W9OXH1gzvzvZtPHKp9eZGJ3fSgAIQ== 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 4QmQ8R1zbhzkYw for ; Wed, 21 Jun 2023 13:58:47 +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 35LDwlkv030572 for ; Wed, 21 Jun 2023 13:58:47 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 35LDwlNY030571 for bugs@FreeBSD.org; Wed, 21 Jun 2023 13:58:47 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: bugs@FreeBSD.org Subject: [Bug 272127] fdescfs with linkrdlnk fails openat with O_DIRECTORY unless "ls -l" done in fdescfs dir first... Date: Wed, 21 Jun 2023 13:58:47 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: pen@lysator.liu.se X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272127 --- Comment #2 from Peter Eriksson --- It's not just related to O_DIRECTORY but a more general problem with fdescf= s... root@runur00:/export/build/samba # umount /compat/linux/dev/fd root@runur00:/export/build/samba # mount /compat/linux/dev/fd root@runur00:/export/build/samba # ./t -d /home/peter86 RUNUR00 open("/home/peter86", O_PATH) -> 3 facl(3, ACE_GETACLCNT) -> -1 [errno=3D9 (Bad file descriptor)] openat(3, "RUNUR00", O_RDONLY) -> 4 facl(4, ACE_GETACLCNT) -> 3 acl("/compat/linux/dev/fd/4", ACE_GETACLCNT) -> -1 [errno=3D78 (Functio= n not implemented)] openat(3, "RUNUR00", O_PATH) -> 4 facl(4, ACE_GETACLCNT) -> -1 [errno=3D9 (Bad file descriptor)] acl("/compat/linux/dev/fd/4", ACE_GETACLCNT) -> -1 [errno=3D78 (Functio= n not implemented)] openat(4, "", O_EMPTY_PATH) -> 5 facl(5, ACE_GETACLCNT) -> 3 open("/compat/linux/dev/fd/4", O_RDONLY) -> -1 [errno=3D20 (Not a direc= tory)] root@runur00:/export/build/samba # ls -ld /home/peter86/RUNUR00 drwx------+ 2 peter86 employee-liu.se 2 Jun 20 10:52 /home/peter86/RUNUR00 root@runur00:/export/build/samba # ./t -ssd /home/peter86 RUNUR00 open("/home/peter86", O_PATH) -> 3 facl(3, ACE_GETACLCNT) -> -1 [errno=3D9 (Bad file descriptor)] openat(3, "RUNUR00", O_RDONLY) -> 4 facl(4, ACE_GETACLCNT) -> 3 stat("/compat/linux/dev/fd/4") -> 0 [type=3Dsymlink, size=3D0, uid=3D0,= gid=3D0] readlink("/compat/linux/dev/fd/4") -> 28 [path=3D/export/home/peter86/RUNUR00] stat("/compat/linux/dev/fd/4") -> 0 [type=3Ddir, size=3D2, uid=3D100325= 8, gid=3D100001000] acl("/compat/linux/dev/fd/4", ACE_GETACLCNT) -> 3 openat(3, "RUNUR00", O_PATH) -> 4 facl(4, ACE_GETACLCNT) -> -1 [errno=3D9 (Bad file descriptor)] stat("/compat/linux/dev/fd/4") -> 0 [type=3Ddir, size=3D2, uid=3D100325= 8, gid=3D100001000] stat("/compat/linux/dev/fd/4") -> 0 [type=3Ddir, size=3D2, uid=3D100325= 8, gid=3D100001000] acl("/compat/linux/dev/fd/4", ACE_GETACLCNT) -> 3 openat(4, "", O_EMPTY_PATH) -> 5 facl(5, ACE_GETACLCNT) -> 3 open("/compat/linux/dev/fd/4", O_RDONLY) -> 5 facl(5, ACE_GETACLCNT) -> 3 root@runur00:/export/build/samba # ./t -d /home/peter86 RUNUR00 open("/home/peter86", O_PATH) -> 3 facl(3, ACE_GETACLCNT) -> -1 [errno=3D9 (Bad file descriptor)] openat(3, "RUNUR00", O_RDONLY) -> 4 facl(4, ACE_GETACLCNT) -> 3 acl("/compat/linux/dev/fd/4", ACE_GETACLCNT) -> 3 openat(3, "RUNUR00", O_PATH) -> 4 facl(4, ACE_GETACLCNT) -> -1 [errno=3D9 (Bad file descriptor)] acl("/compat/linux/dev/fd/4", ACE_GETACLCNT) -> 3 openat(4, "", O_EMPTY_PATH) -> 5 facl(5, ACE_GETACLCNT) -> 3 open("/compat/linux/dev/fd/4", O_RDONLY) -> 5 facl(5, ACE_GETACLCNT) -> 3 See how the first stat() call to a fd in the fdescfs also gives invalid siz= e, uid & gid data but as soon as that stat call has pulled in the information about the target things work fine. --=20 You are receiving this mail because: You are the assignee for the bug.=