From nobody Mon May 25 08:49:31 2026 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 4gP8hD33f3z6dxYW for ; Mon, 25 May 2026 08:49:32 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gP8hD2MTxz3sxK for ; Mon, 25 May 2026 08:49:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779698972; 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=WgmH3jKE1WVnVuDrRWhsj3IH+t5es3nuA1KMofFCNaE=; b=CTIhaIEn3flyC4ZMim7sLYcYslMaPPHso3ca7CUeIdT9nZdyCXgae8v+Fygk9WxSB5H2Ah 1s/NXFoUi3s59ZwRkm981JteIsxop60vhI9NcLxLpRfCRSrNSnUx9w29nDBHY6cQynRPl3 bME1wjfUbfnSuGwvd8zl6TsO5Bdrh5NznBc+0iaIvu+Io3ZpMoGwsTeZ31hBdlGAu2kKgF olWVDVOaiqvyRl9EkElsB/o86EbVNBkNC5SdflYpPt156ua+y30U251gU/US01OsZBCPBF XzxJLzDXPRKsocgDSIZ8F4rSLapr+2tin4MnUeZsnGsuObNvSMWLnzplUdURkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779698972; a=rsa-sha256; cv=none; b=wISgwL79mtK3GumMhX32SvgJS/3rKjFluSunTa9xdQgxbGwuXxzTrAnTNQurnBgWEMhw+R v5NBB9tk6x88JUSJd2HLCoGrQQSeaaXVSHO7k414gEyKDHvUNHLIHoWMAL/50x53MRgjfy gWKJs3VDwQ8mu4CZY3z6Ie1PyxXjlic/3ZycW+BxL07EtWgKjmZWnyNX2WO8SitRNxOhFp eOk1XSbga177KBxVyZaONfuBOYAK3nPCtQKy3e3dnmEAbGQOQ/G02mUdyl1pbPHBd9Ac3y Y4PQ0wEVGxNz5GshVv2ILnQXtqChfNEJpUMWStfR73aDvzmuy8jKbYsM3Gd0Lg== 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=1779698972; 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=WgmH3jKE1WVnVuDrRWhsj3IH+t5es3nuA1KMofFCNaE=; b=OHdI4isBrxFYHcFoBIXaEAna1laZxu2PyC5ZUn4aTskWmYgEDGo0BwRJC6YubO5vvMhx7B FvTMBjytYPe6CWImru6DG1NVInKD8VhC/Ctsw219eLSPcW4YI5tXTaHDGmGD3HakojKwwi vrizZQMH0D9oD2DvxF7ye0VvdKUxdpHsZIFCUDiW5DsMcYcphjyxVJ92b77YswjsOek0fJ ip2YqiCp0fWTumQPyXEXEazftMXkzGIvYbw6F0FvmhzIrDqDqusgXmSl3CjnoItxub1WKh p9TiuqdjZJ70eWoeuqovkYIvHC6DzbyLTEOiMs0e3rcGjVtaYwpzsHAME2BCdA== 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 4gP8hD1ZbhzZb3 for ; Mon, 25 May 2026 08:49:32 +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 64P8nWd0061573 for ; Mon, 25 May 2026 08:49:32 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 64P8nWbl061572 for bugs@FreeBSD.org; Mon, 25 May 2026 08:49:32 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 295571] compat/linux: return EBADF for O_PATH mmap() Date: Mon, 25 May 2026 08:49:31 +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: 16.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: mr.yaoxin@outlook.com 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-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D295571 Bug ID: 295571 Summary: compat/linux: return EBADF for O_PATH mmap() Product: Base System Version: 16.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: mr.yaoxin@outlook.com The Linuxulator currently returns incorrect error codes when some file-descriptor based operations are attempted on an O_PATH descriptor. In particular, LTP open13 expects these operations to fail with EBADF, matc= hing Linux behavior, but FreeBSD currently returns different errors: - mmap() on an O_PATH fd returns EACCES - fgetxattr() on an O_PATH fd returns EOPNOTSUPP The same issue also affects other fd-based xattr operations, which should follow the same O_PATH semantics for consistency: - fsetxattr() - fremovexattr() - flistxattr() This appears to be a Linux compatibility bug rather than a functional limitation. For mmap(), the Linuxulator does not currently reject path_fileops descript= ors early with EBADF. For xattr operations, the code reaches the extattr path a= nd=20 returns the underlying FreeBSD error instead of recognizing that an O_PATH = fd is not a valid data-access descriptor for these operations. This is only to track the fix for mmap()=20 See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D295537 --=20 You are receiving this mail because: You are the assignee for the bug.=