From nobody Fri Jun 7 15:19:53 2024 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 4VwlHZ3zT3z5Nfb8 for ; Fri, 07 Jun 2024 15:19:54 +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 4VwlHZ1Zx0z4jTj for ; Fri, 7 Jun 2024 15:19:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717773594; a=rsa-sha256; cv=none; b=l+FylJi0ucmE7/ceT+424MlKosT1XfsEZwHpKsMTCeMLfPrc+khJKOhxhoWfuPTa1lZS1V pjG/lPLcYBa0HxNsJUko7dlk6JYIkNp4fZL94gOhWpjJxotNvOv9B7/LUYBdsgXj985rbR p8nzBfsTi5FsyX8hPrZGMqQzQufJnZfAD9MccuEZLVgV2BCUMXFxLBOhfXjsp1aFmey2w7 Fpg9U6Uw8g9aoit69fTxLmgONfxrJZHdQz7vTjOVQjhZm+RIHXj1+zWjPZRYU2OF0GULTT dUjg+KUer1YESTNSPEFVZWsXv1670ax67MAJakoUUdUm8Wv/j5EtNCUWnUnytw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717773594; 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; bh=t0fnH63o18bU8B5hz5T/rBiJYxiR24fC7CphynCkmuY=; b=dI5oJlTQJ73vbfzmy/R+PW88nCDFogO/+Qc+oscjxteUsOpE0S5MWsVrl4/XSxhjp47Y8B UZf+7iVQmABW8Ee7/54yx37LLYPz6uuTq0sHGBOzOk6gzOjKg9OLAH69TYB67t8LdSdyuL jm5wQl1+xB4PPnoQMkId53bGoOtmVGox6Ai6R8tJuQU6SJH6F9bT2vIjp9q4TA0hxaydRN huBdrbPMxctkmCJZfeQprJyvVu68sVeSexP1Y/nBBLWemS4/Sl02btNQVVdY78o/qfgopJ ukhCwwP+kViZMHCBpk9SnCYWiBg14znYoh9diMpB5nZOvw0pB5VMYzx1ZhRJsA== 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 4VwlHZ0yhTzKPw for ; Fri, 7 Jun 2024 15:19:54 +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 457FJsCB014596 for ; Fri, 7 Jun 2024 15:19:54 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 457FJsUF014595 for bugs@FreeBSD.org; Fri, 7 Jun 2024 15:19:54 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 279570] linuxulator: linux_mkdir returns EACCES instead of EEXIST for mountpoints Date: Fri, 07 Jun 2024 15:19:53 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 14.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kempe@lysator.liu.se X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279570 Bug ID: 279570 Summary: linuxulator: linux_mkdir returns EACCES instead of EEXIST for mountpoints Product: Base System Version: 14.0-STABLE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: kempe@lysator.liu.se The Linux version of Planescape Torment Enhanced Edition crashed when tryin= g to save games. I have traced the issue to linux_mkdir returning EACCES instead= of the expected EEXIST when traversing the file system hierarchy. /bin is a directory on the ZFS root dataset, running mkdir and linux_mkdir gives the exected behaviour: ~> truss /bin/mkdir /bin &| grep mkdir mkdir("/bin",0777) ERR#17 'File exists' mkdir: write(2,"mkdir: ",7) =3D 7 (0x7) ~> truss /compat/linux/bin/mkdir /bin &| grep mkdir linux_mkdir("/bin",511) ERR#-17 'File exists' /compat/linux/bin/mkdir: linux_write(0x2,0x7fffffff96b0,0x19) = =3D 25 (0x19) /usr/home is a ZFS dataset mounted on /usr, mounted on the root ZFS dataset= . It gives the unexpected behaviour: ~> truss /bin/mkdir /usr/home &| grep mkdir mkdir("/usr/home",0777) ERR#17 'File exists' mkdir: write(2,"mkdir: ",7) =3D 7 (0x7) ~> truss /compat/linux/bin/mkdir /usr/home &| grep mkdir linux_mkdir("/usr/home",511) ERR#-13 'Permission denied' /compat/linux/bin/mkdir: linux_write(0x2,0x7fffffff96b0,0x19) = =3D 25 (0x19) As can be seen, FreeBSD mkdir returns file exists as expected, but Linux mk= dir returns permission denied. Setting compat.linux.emul_path=3D/ and getting m= kdir to work with environment variables makes it have the correct behaviour. # sysctl compat.linux.emul_path=3D/ compat.linux.emul_path: /compat/linux -> / ~> env LD_LIBRARY_PATH=3D/compat/linux/usr/lib64 truss /compat/linux/bin/mk= dir /usr/home &| grep mkdir linux_mkdir("/usr/home",511) ERR#-17 'File exists' /compat/linux/bin/mkdir: linux_write(0x2,0x7fffffff9680,0x19) = =3D 25 (0x19) Indicating that there seems to be an issue with how the file system objects= are being resolved. --=20 You are receiving this mail because: You are the assignee for the bug.=