From nobody Sat Dec 7 13:12:56 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 4Y57pd5kG9z4kvRJ for ; Sat, 07 Dec 2024 13:12:57 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y57pc3mTMz4dfF for ; Sat, 7 Dec 2024 13:12:56 +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=1733577176; 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=nzW9/UTYo+p7OyRSjV0c9mfeCYifxs/wIX9k5Ojp8eo=; b=haAgIti8l3r7p9VctPGmYhZK1yZe+EAUgn9lpXxKB8xMYMAeTTXIW/Sx6Brr22V2Q/NtZk eB+4oYFrVKc3tQQrQMKkLMBf9G52g9fyQ5/KwGZ/jVkdDjeI55ISDcmj8xMyV9L9S0ojSS JD1F0quaZED2OmYVtGQ1+1zYaV/4qznbQRJD5s77SIS205S7GS1E42nfK6lMPHPik45FzP 8jZ0KkWur5M/VjLd69Vrs6TSpT1FGDI48NHfGduk23XknnVAkUrn9sHzdQXGAdh39wRPgr ClAE7cybnpwGrdjscpuuE+3ht4HxGMiJkwpC73uwCHQYdf7Z+5BxI/dA7NbWyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733577176; a=rsa-sha256; cv=none; b=JMm6Ksf+PnLIESTHpW6YHyXG2ArWc8ccz6BIKPA3gpIdAltMzEQHenUaTbFC5m7q5vvCS2 9tHEmhsF0TUZpJukmtNd401QjcYYp3PahcjJxW9+oQyQZZ215RIWiWQERF4/aVLk4MYD3W Bt0zqARjEZ+VS157Gcnnh7Pf0mLUkvRDKzGWXUlznkYqQG7RFwQTt52qi5Uw+FzY39VAu1 vV5WdqEd5K84pKpiPjNtyHBOhVDiO95YAKthw/IUxJgH0LbMpLRtPwjsWKr2R3qr3i1Eco iXJ2mw+WPtqxsIOmw0GOl0x1iW0CxmNrSWyTumo3WWqcy7ijrLJF09wXdhCa+A== 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 4Y57pc26FNz1MwR for ; Sat, 7 Dec 2024 13:12:56 +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 4B7DCukD001724 for ; Sat, 7 Dec 2024 13:12:56 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 4B7DCuBC001723 for bugs@FreeBSD.org; Sat, 7 Dec 2024 13:12:56 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 283179] Support O_TMPFILE in open() Date: Sat, 07 Dec 2024 13:12:56 +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: 15.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: vini.ipsmaker@gmail.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-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=3D283179 Bug ID: 283179 Summary: Support O_TMPFILE in open() Product: Base System Version: 15.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: vini.ipsmaker@gmail.com Linux supports the creation of unlinked inodes (unnamed temporary regular files) that can later be linked in the filesystem with linkat(): https://www.mankier.com/2/open#Description-O_TMPFILE > Create an unnamed temporary regular file. The pathname argument specifies= a directory; an unnamed inode will be created in that directory's filesyst= em. Anything written to the resulting file will be lost when the last file = descriptor is closed, unless the file is given a name. I believe OpenZFS already supports this feature given the history of fixed = bug reports such as . Could FreeBSD just expose this feature already supported by OpenZFS? The main use cases: > * Improved tmpfile(3) functionality: race-free creation of temporary file= s that (1) are automatically deleted when closed; (2) can never be reached = via any pathname; (3) are not subject to symlink attacks; and (4) do not re= quire the caller to devise unique names. > > * Creating a file that is initially invisible, which is then populated wi= th data and adjusted to have appropriate filesystem attributes (fchown(2), = fchmod(2), fsetxattr(2), etc.) before being atomically linked into the file= system in a fully formed state (using linkat(2) as described above). --=20 You are receiving this mail because: You are the assignee for the bug.=