From nobody Tue Jun 23 15:51:52 2026 X-Original-To: dev-commits-src-main@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 4gl8h85B5Fz6hdFR for ; Tue, 23 Jun 2026 15:51:52 +0000 (UTC) (envelope-from git@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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gl8h83nBbz3Dt3 for ; Tue, 23 Jun 2026 15:51:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782229912; 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=6jFN55Fe36d9YuTZDWYL7lRFN2umtnS7sAoaTJLzCl4=; b=Ao5baeiIYREvBReHdS1xwWfWJxQEjtGnuPgxVgeRwUvv0EbInkQbjaiWkJUmRXdgUt6eiY s/3CIbjnUBEG+qVeiMCDOOk69OVdNSNyPJbXh2kkVt42vkEmR31T436FgTFwsIVODEiT0B DA4lyBodfPFPS4dLqrmSZgPTd7uX1R9m7Bhw6pfWEv4gDUcfhUhxTzc9zn3Bh7+xaldmX4 pnqKrE2PzKv9jwGqI/fSqFNvZtuNyR03hgch1QIP1/P73skpPp0gTQbIgCjZ0oSWrWwSeZ T3mY8jHG1gCU7EQS4Cgn+PB5xh7DzGOA4nt0/GZr3Ua68cAQL8VQfAtLQndSMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782229912; a=rsa-sha256; cv=none; b=TSYBFGI2uVljc0XCWdSoYs+3Sqa8GpI1s46vbvKHgQ6UsNEc+pH82xZA/kGelgZtzjbIZw eZiL1Fc3TCL9eBJ2Y3Uo5MLnyiRx55uhnZP6P0p9jZ6onTnuinw2k5X3jwg9lvOunRkcf5 18cN3DkdMgquvBOUI+LzaNuQ5/6L8YckFYzw4N8uUMFLw5l3ElsNx828WYZL6nlJOVwZH7 NEjtGNGL1Sn/reOPrUepswQVr3eEeIc4xEhw49cATyRWxaKhPhDBKmmmevBFnoHKpNy/OU Wq0B5noHaG4CCasxPU/byXlQqivydldbZ2xhFdzmoNsMIs9rHKv0/TqKsP5Wzw== 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=1782229912; 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=6jFN55Fe36d9YuTZDWYL7lRFN2umtnS7sAoaTJLzCl4=; b=ZGFyj9IEN2y1HlHGvc3ZTs+4lPc+HGQ0fHeV6a0sFiabUmUOT1myvQ+z5EBq3UdYISTVTO gkckrdGWXGsMmM2l9pbiRIjlJmLtKlT3oDMU22SVt6PhgyCOCTFK4WAs09KhVD5dZZrjAM shZGuJGSKjifC+UXpmmgRAYSYFSUadKyXtEfmlEqq/aEThXxPVb698EHLZcShgsnaXuyhP UjOhUT/H2gVCcwpdSx9+4m5AzddCsjuzdQBRh59nKHM4le8zN3efM/8A3f89qwmlY8VVuU uWQCDVG6O9UuXXJdrgT92p9gIzZqgKgeKOAOz2rlTBVlq4+NyCPqIpEWhzEz3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gl8h82nxyzgtb for ; Tue, 23 Jun 2026 15:51:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23a96 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 23 Jun 2026 15:51:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f6dd01b417dc - main - cd9660: Adjust parsing of timestamps in the extended atttributes record List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f6dd01b417dcf247904b4653063f5fb7f22a0878 Auto-Submitted: auto-generated Date: Tue, 23 Jun 2026 15:51:52 +0000 Message-Id: <6a3aab98.23a96.365d4f6b@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f6dd01b417dcf247904b4653063f5fb7f22a0878 commit f6dd01b417dcf247904b4653063f5fb7f22a0878 Author: John Baldwin AuthorDate: 2026-06-23 15:51:43 +0000 Commit: John Baldwin CommitDate: 2026-06-23 15:51:43 +0000 cd9660: Adjust parsing of timestamps in the extended atttributes record The extended attribute record includes four different timestamps: file creation, file modification, file expiration, and file effective date. Only the first two are meaningful for stat(2). The latter two (if handled) would presumably affect if a file is visible for not. Previously, the logic here was a bit contorted and made use of the effective time. It also seemed to treat the creation time as a change time timestamp. Instead, simplify the logic such that the modification time is set to either the modification time (if present), or the creation time. The access and change times are then set to the modification time. NB: This is not used if RockRidge extensions are present, and makefs does not generate the extended attributes record. Differential Revision: https://reviews.freebsd.org/D57748 --- sys/fs/cd9660/cd9660_node.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/sys/fs/cd9660/cd9660_node.c b/sys/fs/cd9660/cd9660_node.c index ce6ec3aa7a1c..747536042ccc 100644 --- a/sys/fs/cd9660/cd9660_node.c +++ b/sys/fs/cd9660/cd9660_node.c @@ -177,12 +177,22 @@ cd9660_deftstamp(struct iso_directory_record *isodir, struct iso_node *inop, if (ftype != ISO_FTYPE_HIGH_SIERRA && isonum_711(ap->version) == 1) { - if (!cd9660_tstamp_conv17(ap->ftime,&inop->inode.iso_atime)) - cd9660_tstamp_conv17(ap->ctime,&inop->inode.iso_atime); - if (!cd9660_tstamp_conv17(ap->ctime,&inop->inode.iso_ctime)) - inop->inode.iso_ctime = inop->inode.iso_atime; - if (!cd9660_tstamp_conv17(ap->mtime,&inop->inode.iso_mtime)) - inop->inode.iso_mtime = inop->inode.iso_ctime; + /* + * The extended attributes include create + * (ctime), modify (mtime), expiration + * (xtime), and effective (ftime) timstamps. + * Only the first two are meaningful for struct + * stat. + */ + struct timespec birthtime; + + if (!cd9660_tstamp_conv17(ap->ctime, &birthtime)) + memset(&birthtime, 0, sizeof(birthtime)); + if (!cd9660_tstamp_conv17(ap->mtime, + &inop->inode.iso_mtime)) + inop->inode.iso_mtime = birthtime; + inop->inode.iso_ctime = inop->inode.iso_mtime; + inop->inode.iso_atime = inop->inode.iso_mtime; } else ap = NULL; }