From nobody Sat Aug 26 19:12:40 2023 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 4RY6091pynz4qtRC; Sat, 26 Aug 2023 19:12:41 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RY6086pfgz4JVF; Sat, 26 Aug 2023 19:12:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693077161; 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=+X/XxVSRDpHW5ddojTfQlfsilgscs1SHmizM0QyRHRM=; b=H4hdT5nqE9huyx0/t2RKtiFG2EYMZFiDjWjbDSpP4JsDv97egsbOyZdin+YR/y5lsh7gmE bBjNuDE+Dgbs+51iUbuX6FZpyj7aYNjoyx0w5ly5h5qwVdiumaG/cuAn/bUpNYBYOGIJ7F HTZPo/gjaAlXuUsOp1H5dMmmWnuQkmI/cX9g1OjiwPmSdzYxn/rKAMKrv+Y+VEaHNXM/pu CsS7Ap/WFScvEf2o7vP7U570kP3hI3+554PStc5jwv//YRNURiDp8CgW/2z1FjT3JsM9R5 APkYkHErbx/G1p0UaiMNZp91cUMWeE2SOg7/MYti7ApoePuTvZ3Ne9uWeRBMuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693077161; 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=+X/XxVSRDpHW5ddojTfQlfsilgscs1SHmizM0QyRHRM=; b=TjBrIHCHaZ8I+fkUfw5vGQJpEmVGbAqLLcHm7+wsXPz6yjA4Z9EJ/LU7ZwVRo/CHGjlDAu gdI4eb/UMTL/O+pW5v72ppkhN1RnC0mrLbHb3qL2Nx1MCY/vrxfV2OTSAKodtdJZIOy3BF 6aCj2pOsh6x/TVeAdGUnRx87qZYoUOAvA/79faAG8h33uqpHrYgcRvn6KM1oUQt9zU5HD9 kPADNW8n1qAZFIhHiiSNUzFrW/P8WDP9wfNvA6jEprKMm29u5hBEisYIPtCAa+kvJP4GC1 pPNoMxTgKOMp9FMbTMFfryJ5q+Hvuk9CB21TS5ADSymHrpDZ0UBuCO2nqzWgLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693077161; a=rsa-sha256; cv=none; b=iDnIMG7Y9u3A2Z9Q9WBj7+Bg0C90bFVO7nUpNpHqSSwxcM2D2Agsqf1coomTLIQMKEk6fp uPNBs3m7pp2iAPBbZwzyC35L+mUtqRoJb6LIZ5ea2MWCTti/ZKHYKu2O4rkEL75UR7uZLf l1i738U7vGulgz9Fz9ZAXwpA0AmBypvTrmapKvddmpF9UapI72lajhJjqDibmF50vYNzWL jzUTjzxdG4iUpAFAxZ69oPeAy0t5QQ7zVj9V9stzjQivIWzGvKpvdf6SvPme/o+rAgI0H/ 7uqPEvbSDfa5mkM7h7mzg4IRgnUpHYCf+GuvFB/Okonlzmz5fHa37z4fDHXhwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RY6085tvtzn00; Sat, 26 Aug 2023 19:12:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37QJCevN063966; Sat, 26 Aug 2023 19:12:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37QJCesb063964; Sat, 26 Aug 2023 19:12:40 GMT (envelope-from git) Date: Sat, 26 Aug 2023 19:12:40 GMT Message-Id: <202308261912.37QJCesb063964@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: b3a714652ff0 - main - kqueue(9): sweep references to knlist_remove_inevent() 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3a714652ff00f83b2072caaa1fd8b9699c93789 Auto-Submitted: auto-generated The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=b3a714652ff00f83b2072caaa1fd8b9699c93789 commit b3a714652ff00f83b2072caaa1fd8b9699c93789 Author: Robert Wing AuthorDate: 2023-08-26 19:11:50 +0000 Commit: Robert Wing CommitDate: 2023-08-26 19:11:50 +0000 kqueue(9): sweep references to knlist_remove_inevent() knlist_remove_inevent() gone in 9e590ff04b687e910579a5851d95cedf9eb10bfd --- ObsoleteFiles.inc | 3 +++ share/man/man9/Makefile | 1 - share/man/man9/kqueue.9 | 17 ++--------------- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 47709c00667d..c2780a84eb6d 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20230826: +OLD_FILES+=usr/share/man/man9/knlist_remove_inevent.9.gz + # 20230825: caroot bundle updated OLD_FILES+=usr/share/certs/trusted/E-Tugra_Certification_Authority.pem OLD_FILES+=usr/share/certs/trusted/E-Tugra_Global_Root_CA_ECC_v3.pem diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index eb670c924077..07a107b4bd7d 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1394,7 +1394,6 @@ MLINKS+=kqueue.9 knlist_add.9 \ kqueue.9 knlist_init.9 \ kqueue.9 knlist_init_mtx.9 \ kqueue.9 knlist_remove.9 \ - kqueue.9 knlist_remove_inevent.9 \ kqueue.9 knote_fdclose.9 \ kqueue.9 KNOTE_LOCKED.9 \ kqueue.9 KNOTE_UNLOCKED.9 \ diff --git a/share/man/man9/kqueue.9 b/share/man/man9/kqueue.9 index 28a948481e3e..ddd834bb1807 100644 --- a/share/man/man9/kqueue.9 +++ b/share/man/man9/kqueue.9 @@ -30,7 +30,7 @@ .Nm kqfd_register , .Nm knote_fdclose , .Nm knlist_init , knlist_init_mtx , -.Nm knlist_add , knlist_remove , knlist_remove_inevent , knlist_empty , +.Nm knlist_add , knlist_remove , knlist_empty , .Nm knlist_clear , knlist_delete , knlist_destroy , .Nm KNOTE_LOCKED , KNOTE_UNLOCKED .Nd "event delivery subsystem" @@ -58,8 +58,6 @@ .Fn knlist_add "struct knlist *knl" "struct knote *kn" "int islocked" .Ft void .Fn knlist_remove "struct knlist *knl" "struct knote *kn" "int islocked" -.Ft void -.Fn knlist_remove_inevent "struct knlist *knl" "struct knote *kn" .Ft int .Fn knlist_empty "struct knlist *knl" .Ft void @@ -157,8 +155,7 @@ function will be called to detach the if the .Vt knote has not already been detached by a call to -.Fn knlist_remove , -.Fn knlist_remove_inevent +.Fn knlist_remove or .Fn knlist_delete . The list @@ -186,16 +183,6 @@ The .Va kn_data value should be updated as necessary to reflect the current value, such as number of bytes available for reading, or buffer space available for writing. -If the note needs to be removed, -.Fn knlist_remove_inevent -must be called. -The function -.Fn knlist_remove_inevent -will remove the note from the list, the -.Va f_detach -function will not be called and the -.Vt knote -will not be returned as an event. .Pp Locks .Em must not From nobody Sun Aug 27 05:09:06 2023 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 4RYMDS3hXSz4rT6F; Sun, 27 Aug 2023 05:09:12 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RYMDS2XhGz3g79; Sun, 27 Aug 2023 05:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693112952; 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=C61jZIyzR2Olsfr/g8YZR1JY1FSTpSyKQlSVzNnVrH0=; b=ughtBbb8AdFgZSeqKSrGGOHVf2DwGXav/KUxY2tJvytTHcEYkshNIAxkxKbdKzFFtIk4/E VpxhvG2Z/D3/TGAqhyds3MrzOv7XOPT5hWGRBfr/VhZjMz3kzN2dceZNpiGEBRyxx/w0TZ qgHvHGT+ToIhiD86lLc2Xbl6wudlbVDSuhZMfLXXoPPHQP2paTriuS16uD7gf//OeHODCz 6ag2p1Jjbql9Eus5lT0XBrD6Ynh72p8L7vzhbKOKl7KOjHuhJE91tm9AZtvwZEG5dYjNaz twjbKGdq4r9oSVYSY7FGoBzlaf7bTr2RicvwNOjxJAqfpzpmlj416HWmeqo/Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693112952; 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=C61jZIyzR2Olsfr/g8YZR1JY1FSTpSyKQlSVzNnVrH0=; b=bKl3Nfc4eV46pb+ODZHvs4IwVIK2TXLOMxIjgveEHBw0J91pMnFSDBvd+CE9iMEBtnhnPj 23oBV4VpKpZBjqZ1pgWEieqNzWCuRuNjVeUIoDzSp79j/4NXYH4ckM3HAknGXcXUuu9E7D W7eWn06QoHrCQaWh8jrvDSrFrB0hM4H+EgVpJIZEBbqvoEsy07hC899FTkh9fMMzloAHO1 TpVMbpA7es62XgctNqk7Tk+a/6JGTujKQSX6kEmJh2f3XIJzneaHzWkUc5aghFsPcuInz4 n6VqzG/c/i6jSaRbzSRo1FIXfU/JsPlivfq7yJYZj2rs/h0GuLHbVIDUzBrYHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693112952; a=rsa-sha256; cv=none; b=RwOh+xe0zZWEmVzOy2Gt3yWlsUjKstkp20X73J3rJHAX4HBiNf4jTsFUqFTOZfYvkIP937 V3LkP7u8TV2RgYw1ngy8L70373iXhckKcq8IL39WBWA6iKnI8dXpHGdHE1ltf9DFawH0PC 3WSCClDCEsmeWbQvPiHzm0xoOxHsqvokd1Hvn3AVzVC84viOx/XWn+ItIpOBCO1O/k4Eum tmfDEkWjaGi7IqTaSqesZXtPU1aQVIuhgUQqFSUQs4IB2H3MP06A4KMcv/jeeyI0b7a9N3 xHlzLkG+YdR7yjbebxiJAJ2lRAA/6VPAkJcObdR6rluB5MSkSeNRgjt9QNghsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RYMDS1cDmz13Yy; Sun, 27 Aug 2023 05:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37R59CIX048318; Sun, 27 Aug 2023 05:09:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37R596B5048298; Sun, 27 Aug 2023 05:09:06 GMT (envelope-from git) Date: Sun, 27 Aug 2023 05:09:06 GMT Message-Id: <202308270509.37R596B5048298@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 315ee00fa9616b0a192b6834911f98bcf5316a6b Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=315ee00fa9616b0a192b6834911f98bcf5316a6b commit 315ee00fa9616b0a192b6834911f98bcf5316a6b Merge: b3a714652ff0 804414aad224 Author: Martin Matuska AuthorDate: 2023-08-26 21:20:04 +0000 Commit: Martin Matuska CommitDate: 2023-08-26 21:51:42 +0000 zfs: merge openzfs/zfs@804414aad Notable upstream pull request merges: #15024 Add missed DMU_PROJECTUSED_OBJECT prefetch #15029 Do not request data L1 buffers on scan prefetch #15036 FreeBSD: catch up to __FreeBSD_version 1400093 #15039 Fix raw receive with different indirect block size #15047 FreeBSD: Fix build on stable/13 after 1302506 #15049 Fix the ZFS checksum error histograms with larger record sizes #15052 Reduce bloat in ereport.fs.zfs.checksum events #15056 Avoid extra snprintf() in dsl_deadlist_merge() #15061 Ignore pool ashift property during vdev attachment #15063 Don't panic if setting vdev properties is unsupported for this vdev type #15067 spa_min_alloc should be GCD, not min #15071 Add explicit prefetches to bpobj_iterate() #15072 Adjust prefetch parameters #15076 Refactor dmu_prefetch() #15079 set autotrim default to 'off' everywhere #15080 ZIL: Fix config lock deadlock #15088 metaslab: tuneable to better control force ganging #15096 Avoid waiting in dmu_sync_late_arrival() #15097 BRT should return EOPNOTSUPP #15103 Remove zl_issuer_lock from zil_suspend() #15107 Remove fastwrite mechanism #15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1 #15122 ZIL: Second attempt to reduce scope of zl_issuer_lock #15129 zpool_vdev_remove() should handle EALREADY error return #15132 ZIL: Replay blocks without next block pointer #15148 zfs_clone_range should return descriptive error codes #15153 ZIL: Avoid dbuf_read() before dmu_sync() #15172 copy_file_range: fix fallback when source create on same txg #15180 Update outdated assertion from zio_write_compress Obtained from: OpenZFS OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13 Makefile.inc1 | 5 +- cddl/lib/libzfs/Makefile | 1 + cddl/lib/libzfs/Makefile.depend | 1 + rescue/rescue/Makefile | 2 +- rescue/rescue/Makefile.depend | 1 + share/mk/src.libnames.mk | 2 +- sys/contrib/openzfs/META | 6 +- sys/contrib/openzfs/cmd/zdb/zdb.c | 77 ++- sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c | 2 - sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c | 5 + .../openzfs/cmd/zed/zed.d/statechange-slot_off.sh | 61 ++ sys/contrib/openzfs/cmd/zed/zed.d/zed.rc | 5 + sys/contrib/openzfs/cmd/ztest.c | 2 +- sys/contrib/openzfs/config/Shellcheck.am | 3 +- sys/contrib/openzfs/config/kernel-blkdev.m4 | 138 +++- .../config/kernel-block-device-operations.m4 | 35 +- .../openzfs/config/kernel-filemap-splice-read.m4 | 25 + .../openzfs/config/kernel-register_sysctl_table.m4 | 27 + .../config/kernel-vfs-extended-file_range.m4 | 50 ++ .../openzfs/config/kernel-vfs-file_range.m4 | 164 +++++ sys/contrib/openzfs/config/kernel-vfs-iov_iter.m4 | 26 +- sys/contrib/openzfs/config/kernel.m4 | 16 + sys/contrib/openzfs/contrib/debian/changelog | 6 + .../contrib/debian/openzfs-zfs-test.install | 2 - .../contrib/debian/openzfs-zfsutils.install | 2 + .../contrib/dracut/90zfs/zfs-env-bootfs.service.in | 11 +- .../dracut/90zfs/zfs-rollback-bootfs.service.in | 2 +- .../openzfs/include/os/freebsd/spl/sys/vnode.h | 6 +- .../include/os/linux/kernel/linux/blkdev_compat.h | 17 + .../openzfs/include/os/linux/spl/sys/kmem_cache.h | 8 + .../openzfs/include/os/linux/spl/sys/types.h | 2 +- sys/contrib/openzfs/include/os/linux/spl/sys/uio.h | 12 + sys/contrib/openzfs/include/os/linux/zfs/sys/zpl.h | 53 ++ sys/contrib/openzfs/include/sys/bpobj.h | 2 +- sys/contrib/openzfs/include/sys/brt.h | 1 + sys/contrib/openzfs/include/sys/dmu.h | 5 + sys/contrib/openzfs/include/sys/dmu_impl.h | 2 - sys/contrib/openzfs/include/sys/dmu_zfetch.h | 2 - sys/contrib/openzfs/include/sys/fm/fs/zfs.h | 4 - sys/contrib/openzfs/include/sys/metaslab.h | 3 - sys/contrib/openzfs/include/sys/metaslab_impl.h | 6 +- sys/contrib/openzfs/include/sys/spa_impl.h | 1 + sys/contrib/openzfs/include/sys/vdev_impl.h | 2 +- sys/contrib/openzfs/include/sys/zil_impl.h | 44 +- sys/contrib/openzfs/include/sys/zio.h | 1 - sys/contrib/openzfs/include/sys/zio_checksum.h | 2 - sys/contrib/openzfs/lib/libzfs/Makefile.am | 2 +- sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 6 + sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 95 ++- sys/contrib/openzfs/man/man4/zfs.4 | 10 +- sys/contrib/openzfs/man/man8/zfs-send.8 | 18 +- sys/contrib/openzfs/man/man8/zpool-events.8 | 23 +- sys/contrib/openzfs/module/Kbuild.in | 1 + .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 10 +- sys/contrib/openzfs/module/os/linux/spl/spl-proc.c | 26 +- .../openzfs/module/os/linux/zfs/vdev_disk.c | 65 +- .../openzfs/module/os/linux/zfs/zfs_ctldir.c | 26 +- .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 7 + .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 9 +- .../openzfs/module/os/linux/zfs/zfs_znode.c | 8 + .../openzfs/module/os/linux/zfs/zpl_ctldir.c | 2 +- sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 44 +- .../openzfs/module/os/linux/zfs/zpl_file_range.c | 272 ++++++++ .../openzfs/module/os/linux/zfs/zpl_super.c | 39 +- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 28 +- sys/contrib/openzfs/module/zfs/bpobj.c | 49 +- sys/contrib/openzfs/module/zfs/brt.c | 43 +- sys/contrib/openzfs/module/zfs/dbuf.c | 11 +- sys/contrib/openzfs/module/zfs/dmu.c | 127 ++-- sys/contrib/openzfs/module/zfs/dmu_recv.c | 22 +- sys/contrib/openzfs/module/zfs/dmu_zfetch.c | 12 +- sys/contrib/openzfs/module/zfs/dnode.c | 31 +- sys/contrib/openzfs/module/zfs/dsl_deadlist.c | 14 +- sys/contrib/openzfs/module/zfs/dsl_scan.c | 17 +- sys/contrib/openzfs/module/zfs/metaslab.c | 83 +-- sys/contrib/openzfs/module/zfs/spa_log_spacemap.c | 4 +- sys/contrib/openzfs/module/zfs/spa_misc.c | 1 + sys/contrib/openzfs/module/zfs/vdev.c | 90 ++- sys/contrib/openzfs/module/zfs/vdev_indirect.c | 2 +- sys/contrib/openzfs/module/zfs/vdev_raidz.c | 2 +- sys/contrib/openzfs/module/zfs/zfs_fm.c | 33 +- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 46 +- sys/contrib/openzfs/module/zfs/zil.c | 719 +++++++++------------ sys/contrib/openzfs/module/zfs/zio.c | 45 +- sys/contrib/openzfs/module/zfs/zio_checksum.c | 2 - sys/contrib/openzfs/module/zfs/zvol.c | 8 +- sys/contrib/openzfs/tests/runfiles/linux.run | 11 + .../openzfs/tests/test-runner/bin/zts-report.py.in | 18 + sys/contrib/openzfs/tests/zfs-tests/cmd/.gitignore | 1 + .../openzfs/tests/zfs-tests/cmd/Makefile.am | 1 + .../openzfs/tests/zfs-tests/cmd/clonefile.c | 333 ++++++++++ sys/contrib/openzfs/tests/zfs-tests/cmd/readmmap.c | 1 + .../openzfs/tests/zfs-tests/include/commands.cfg | 1 + .../openzfs/tests/zfs-tests/tests/Makefile.am | 14 + .../functional/block_cloning/block_cloning.kshlib | 54 ++ .../block_cloning/block_cloning_copyfilerange.ksh | 60 ++ .../block_cloning_copyfilerange_cross_dataset.ksh | 65 ++ .../block_cloning_copyfilerange_fallback.ksh | 86 +++ ...ock_cloning_copyfilerange_fallback_same_txg.ksh | 66 ++ .../block_cloning_copyfilerange_partial.ksh | 68 ++ .../block_cloning_disabled_copyfilerange.ksh | 60 ++ .../block_cloning_disabled_ficlone.ksh | 50 ++ .../block_cloning_disabled_ficlonerange.ksh | 50 ++ .../block_cloning/block_cloning_ficlone.ksh | 56 ++ .../block_cloning/block_cloning_ficlonerange.ksh | 56 ++ .../block_cloning_ficlonerange_partial.ksh | 64 ++ .../tests/functional/block_cloning/cleanup.ksh | 34 + .../tests/functional/block_cloning/setup.ksh | 36 ++ .../cli_root/zpool_attach/attach-o_ashift.ksh | 30 +- .../cli_root/zpool_replace/replace-o_ashift.ksh | 32 +- .../cli_root/zpool_replace/replace_prop_ashift.ksh | 24 +- sys/modules/zfs/zfs_config.h | 53 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 113 files changed, 3322 insertions(+), 906 deletions(-) diff --cc Makefile.inc1 index 8838d31c795a,000000000000..f740cc5abcca mode 100644,000000..100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@@ -1,3692 -1,0 +1,3695 @@@ +# +# +# Make command line options: +# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir +# -DNO_CLEAN do not clean at all +# -DDB_FROM_SRC use the user/group databases in src/etc instead of +# the system database when installing. +# -DNO_SHARE do not go into share subdir +# -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,OBJ} +# -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel +# -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel +# -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} buildkernel +# -DNO_ROOT install without using root privilege +# -DWITHOUT_CTF do not run the DTrace CTF conversion tools on built objects +# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list +# LOCAL_ITOOLS="list of tools" to add additional tools to the ITOOLS list +# LOCAL_LIB_DIRS="list of dirs" to add additional dirs to libraries target +# LOCAL_MTREE="list of mtree files" to process to allow local directories +# to be created before files are installed +# LOCAL_LEGACY_DIRS="list of dirs" to add additional dirs to the legacy +# target +# LOCAL_BSTOOL_DIRS="list of dirs" to add additional dirs to the +# bootstrap-tools target +# LOCAL_TOOL_DIRS="list of dirs" to add additional dirs to the build-tools +# target +# LOCAL_XTOOL_DIRS="list of dirs" to add additional dirs to the +# cross-tools target +# METALOG="path to metadata log" to write permission and ownership +# when NO_ROOT is set. (default: ${DESTDIR}/${DISTDIR}/METALOG, +# check /etc/make.conf for DISTDIR) +# TARGET="machine" to crossbuild world for a different machine type +# TARGET_ARCH= may be required when a TARGET supports multiple endians +# BUILDENV_SHELL= shell to launch for the buildenv target (def:${SHELL}) +# WORLD_FLAGS= additional flags to pass to make(1) during buildworld +# KERNEL_FLAGS= additional flags to pass to make(1) during buildkernel +# SUBDIR_OVERRIDE="list of dirs" to build rather than everything. +# All libraries and includes, and some build tools will still build. + +# +# The intended user-driven targets are: +# buildworld - rebuild *everything*, including glue to help do upgrades +# installworld- install everything built by "buildworld" +# checkworld - run test suite on installed world +# doxygen - build API documentation of the kernel +# +# Standard targets (not defined here) are documented in the makefiles in +# /usr/share/mk. These include: +# obj depend all install clean cleandepend cleanobj + +.if !defined(TARGET) || !defined(TARGET_ARCH) +.error Both TARGET and TARGET_ARCH must be defined. +.endif + +.if make(showconfig) || make(test-system-*) +_MKSHOWCONFIG= t +.endif + +SRCDIR?= ${.CURDIR} +LOCALBASE?= /usr/local +TIME_ENV ?= time env + +.include "share/mk/src.tools.mk" + +# Cross toolchain changes must be in effect before bsd.compiler.mk +# so that gets the right CC, and pass CROSS_TOOLCHAIN to submakes. +.if defined(CROSS_TOOLCHAIN) +.if exists(${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk) +.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" +.elif exists(${CROSS_TOOLCHAIN}) +.include "${CROSS_TOOLCHAIN}" +.else +.error CROSS_TOOLCHAIN ${CROSS_TOOLCHAIN} not found +.endif +CROSSENV+=CROSS_TOOLCHAIN="${CROSS_TOOLCHAIN}" +.elif defined(UNIVERSE_TOOLCHAIN) +UNIVERSE_TOOLCHAIN_PATH?=${HOST_OBJTOP}/tmp/usr/bin +XCC?="${UNIVERSE_TOOLCHAIN_PATH}/cc" +XCXX?="${UNIVERSE_TOOLCHAIN_PATH}/c++" +XCPP?="${UNIVERSE_TOOLCHAIN_PATH}/cpp" +XLD?="${UNIVERSE_TOOLCHAIN_PATH}/ld" +.endif +.if defined(CROSS_TOOLCHAIN_PREFIX) +CROSS_COMPILER_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} +.endif + +XCOMPILERS= CC CXX CPP +.for COMPILER in ${XCOMPILERS} +.if defined(CROSS_COMPILER_PREFIX) +X${COMPILER}?= ${CROSS_COMPILER_PREFIX}${${COMPILER}} +.else +X${COMPILER}?= ${${COMPILER}} +.endif +.endfor +# If a full path to an external cross compiler is given, don't build +# a cross compiler. +.if ${XCC:N${CCACHE_BIN}:M/*} +MK_CLANG_BOOTSTRAP= no +# Make sure sub-makes see the option as disabled so the hack in bsd.sys.mk to +# work around incompatible headers in Clang's resource directory is enabled. +.MAKEOVERRIDES+= MK_CLANG_BOOTSTRAP +.endif + +# Pull in compiler metadata from buildworld/toolchain if possible to avoid +# running CC from bsd.compiler.mk. +.if make(installworld) || make(install) || make(distributeworld) || \ + make(stageworld) +.-include "${OBJTOP}/toolchain-metadata.mk" +.if !defined(_LOADED_TOOLCHAIN_METADATA) +.error A build is required first. You may have the wrong MAKEOBJDIRPREFIX set. +.endif +.endif + +# Pull in COMPILER_TYPE and COMPILER_FREEBSD_VERSION early. Pull it from the +# tree to be friendlier to foreign OS builds. It's safe to do so unconditionally +# here since we will always have the right make, unlike in src/Makefile +# Don't include bsd.linker.mk yet until XBINUTILS is handled (after src.opts.mk) +_NO_INCLUDE_LINKERMK= t +# We also want the X_COMPILER* variables if we are using an external toolchain. +_WANT_TOOLCHAIN_CROSS_VARS= t +.include "share/mk/bsd.compiler.mk" +.undef _NO_INCLUDE_LINKERMK +.undef _WANT_TOOLCHAIN_CROSS_VARS +# src.opts.mk depends on COMPILER_FEATURES +.include "share/mk/src.opts.mk" + +.if ${TARGET} == ${MACHINE} +TARGET_CPUTYPE?=${CPUTYPE} +.else +TARGET_CPUTYPE?= +.endif +.if !empty(TARGET_CPUTYPE) +_TARGET_CPUTYPE=${TARGET_CPUTYPE} +.else +_TARGET_CPUTYPE=dummy +.endif +.if ${TARGET} == "arm" +.if ${TARGET_CPUTYPE:M*soft*} == "" +TARGET_TRIPLE_ABI= gnueabihf +.else +TARGET_TRIPLE_ABI= gnueabi +.endif +.endif +MACHINE_TRIPLE_ABI?= unknown +MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/}-${MACHINE_TRIPLE_ABI}-freebsd${OS_REVISION} +TARGET_TRIPLE_ABI?= unknown +TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/}-${TARGET_TRIPLE_ABI}-freebsd${OS_REVISION} +KNOWN_ARCHES?= aarch64/arm64 \ + amd64 \ + armv6/arm \ + armv7/arm \ + i386 \ + powerpc \ + powerpc64/powerpc \ + powerpc64le/powerpc \ + powerpcspe/powerpc \ + riscv64/riscv + +.if ${TARGET} == ${TARGET_ARCH} +_t= ${TARGET} +.else +_t= ${TARGET_ARCH}/${TARGET} +.endif +.for _t in ${_t} +.if empty(KNOWN_ARCHES:M${_t}) +.error Unknown target ${TARGET_ARCH}:${TARGET}. +.endif +.endfor + +.if ${TARGET_ARCH} == "amd64" +LIBCOMPAT_INCLUDE_DIRS+= i386 +.elif ${TARGET_ARCH} == "aarch64" +LIBCOMPAT_INCLUDE_DIRS+= arm +.endif + +.if ${.MAKE.OS} != "FreeBSD" +CROSSBUILD_HOST=${.MAKE.OS} +.if ${.MAKE.OS} != "Linux" && ${.MAKE.OS} != "Darwin" +.warning Unsupported crossbuild system: ${.MAKE.OS}. Build will probably fail! +.endif +# We need to force NO_ROOT/DB_FROM_SRC builds when building on other operating +# systems since the BSD.foo.dist specs contain users and groups that do not +# exist by default on a Linux/MacOS system. +NO_ROOT:= 1 +DB_FROM_SRC:= 1 +.export NO_ROOT +.endif + +# If all targets are disabled for system llvm then don't expect it to work +# for cross-builds. +.if !defined(TOOLS_PREFIX) && ${MK_LLVM_TARGET_ALL} == "no" && \ + ${MACHINE} != ${TARGET} && ${MACHINE_ARCH} != ${TARGET_ARCH} && \ + !make(showconfig) +MK_SYSTEM_COMPILER= no +MK_SYSTEM_LINKER= no +.endif + +# Handle external binutils. +.if defined(CROSS_TOOLCHAIN_PREFIX) +CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} +.endif +XBINUTILS= AS AR ELFCTL LD NM OBJCOPY RANLIB SIZE STRINGS STRIPBIN +.for BINUTIL in ${XBINUTILS} +.if defined(CROSS_BINUTILS_PREFIX) && \ + exists(${CROSS_BINUTILS_PREFIX}/${${BINUTIL}}) +X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX:C,/*$,,}/${${BINUTIL}} +.else +X${BINUTIL}?= ${${BINUTIL}} +.endif +.endfor + +# If a full path to an external linker is given, don't build lld. +.if ${XLD:M/*} +MK_LLD_BOOTSTRAP= no +.endif + +# We also want the X_LINKER* variables if we are using an external toolchain. +_WANT_TOOLCHAIN_CROSS_VARS= t +.include "share/mk/bsd.linker.mk" +.undef _WANT_TOOLCHAIN_CROSS_VARS + +# Begin WITH_SYSTEM_COMPILER / WITH_SYSTEM_LD + +# WITH_SYSTEM_COMPILER - Pull in needed values and make a decision. + +# Check if there is a local compiler that can satisfy as an external compiler. +# Which compiler is expected to be used? +.if ${MK_CLANG_BOOTSTRAP} == "yes" +WANT_COMPILER_TYPE= clang +.else +WANT_COMPILER_TYPE= +.endif + +.if !defined(WANT_COMPILER_FREEBSD_VERSION) && !make(showconfig) && \ + !make(test-system-linker) +.if ${WANT_COMPILER_TYPE} == "clang" +WANT_COMPILER_FREEBSD_VERSION_FILE= lib/clang/freebsd_cc_version.h +WANT_COMPILER_FREEBSD_VERSION!= \ + awk '$$2 == "FREEBSD_CC_VERSION" {printf("%d\n", $$3)}' \ + ${SRCDIR}/${WANT_COMPILER_FREEBSD_VERSION_FILE} || echo unknown +WANT_COMPILER_VERSION_FILE= lib/clang/include/clang/Basic/Version.inc +WANT_COMPILER_VERSION!= \ + awk '$$2 == "CLANG_VERSION" {split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \ + ${SRCDIR}/${WANT_COMPILER_VERSION_FILE} || echo unknown +.endif +.export WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_VERSION +.endif # !defined(WANT_COMPILER_FREEBSD_VERSION) + +# It needs to be the same revision as we would build for the bootstrap. +# If the expected vs CC is different then we can't skip. +# GCC cannot be used for cross-arch yet. For clang we pass -target later if +# TARGET_ARCH!=MACHINE_ARCH. +.if ${MK_SYSTEM_COMPILER} == "yes" && \ + defined(WANT_COMPILER_FREEBSD_VERSION) && \ + ${MK_CLANG_BOOTSTRAP} == "yes" && \ + !make(xdev*) && \ + ${X_COMPILER_TYPE} == ${WANT_COMPILER_TYPE} && \ + (${X_COMPILER_TYPE} == "clang" || ${TARGET_ARCH} == ${MACHINE_ARCH}) && \ + ${X_COMPILER_VERSION} == ${WANT_COMPILER_VERSION} && \ + ${X_COMPILER_FREEBSD_VERSION} == ${WANT_COMPILER_FREEBSD_VERSION} +# Everything matches, disable the bootstrap compiler. +MK_CLANG_BOOTSTRAP= no +USING_SYSTEM_COMPILER= yes +.endif # ${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} + +# WITH_SYSTEM_LD - Pull in needed values and make a decision. + +# Check if there is a local linker that can satisfy as an external linker. +# Which linker is expected to be used? +.if ${MK_LLD_BOOTSTRAP} == "yes" +WANT_LINKER_TYPE= lld +.else +WANT_LINKER_TYPE= +.endif + +.if !defined(WANT_LINKER_FREEBSD_VERSION) && !make(showconfig) && \ + !make(test-system-compiler) +.if ${WANT_LINKER_TYPE} == "lld" +WANT_LINKER_FREEBSD_VERSION_FILE= lib/clang/include/lld/Common/Version.inc +WANT_LINKER_FREEBSD_VERSION!= \ + awk '$$2 == "LLD_FREEBSD_VERSION" {print $$3}' \ + ${SRCDIR}/${WANT_LINKER_FREEBSD_VERSION_FILE} || echo unknown +WANT_LINKER_VERSION_FILE= lib/clang/include/lld/Common/Version.inc +WANT_LINKER_VERSION!= \ + awk '$$2 == "LLD_VERSION_STRING" {gsub("\"", "", $$3); split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \ + ${SRCDIR}/${WANT_LINKER_VERSION_FILE} || echo unknown +.else +WANT_LINKER_FREEBSD_VERSION_FILE= +WANT_LINKER_FREEBSD_VERSION= +.endif +.export WANT_LINKER_FREEBSD_VERSION WANT_LINKER_VERSION +.endif # !defined(WANT_LINKER_FREEBSD_VERSION) + +.if ${MK_SYSTEM_LINKER} == "yes" && \ + defined(WANT_LINKER_FREEBSD_VERSION) && \ + (${MK_LLD_BOOTSTRAP} == "yes") && \ + !make(xdev*) && \ + ${X_LINKER_TYPE} == ${WANT_LINKER_TYPE} && \ + ${X_LINKER_VERSION} == ${WANT_LINKER_VERSION} && \ + ${X_LINKER_FREEBSD_VERSION} == ${WANT_LINKER_FREEBSD_VERSION} +# Everything matches, disable the bootstrap linker. +MK_LLD_BOOTSTRAP= no +USING_SYSTEM_LINKER= yes +.endif # ${WANT_LINKER_TYPE} == ${LINKER_TYPE} + +# WITH_SYSTEM_COMPILER / WITH_SYSTEM_LINKER - Handle defaults and debug. +USING_SYSTEM_COMPILER?= no +USING_SYSTEM_LINKER?= no + +TEST_SYSTEM_COMPILER_VARS= \ + USING_SYSTEM_COMPILER MK_SYSTEM_COMPILER \ + MK_CROSS_COMPILER MK_CLANG_BOOTSTRAP \ + WANT_COMPILER_TYPE WANT_COMPILER_VERSION WANT_COMPILER_VERSION_FILE \ + WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_FREEBSD_VERSION_FILE \ + CC COMPILER_TYPE COMPILER_FEATURES COMPILER_VERSION \ + COMPILER_FREEBSD_VERSION \ + XCC X_COMPILER_TYPE X_COMPILER_FEATURES X_COMPILER_VERSION \ + X_COMPILER_FREEBSD_VERSION +TEST_SYSTEM_LINKER_VARS= \ + USING_SYSTEM_LINKER MK_SYSTEM_LINKER \ + MK_LLD_BOOTSTRAP \ + WANT_LINKER_TYPE WANT_LINKER_VERSION WANT_LINKER_VERSION_FILE \ + WANT_LINKER_FREEBSD_VERSION WANT_LINKER_FREEBSD_VERSION_FILE \ + LD LINKER_TYPE LINKER_FEATURES LINKER_VERSION \ + LINKER_FREEBSD_VERSION \ + XLD X_LINKER_TYPE X_LINKER_FEATURES X_LINKER_VERSION \ + X_LINKER_FREEBSD_VERSION + +.for _t in compiler linker +test-system-${_t}: .PHONY +.for v in ${TEST_SYSTEM_${_t:tu}_VARS} + ${_+_}@printf "%-35s= %s\n" "${v}" "${${v}}" +.endfor +.endfor +.if (make(buildworld) || make(buildkernel) || make(kernel-toolchain) || \ + make(toolchain) || make(_cross-tools)) +.if ${USING_SYSTEM_COMPILER} == "yes" +.info SYSTEM_COMPILER: Determined that CC=${CC} matches the source tree. Not bootstrapping a cross-compiler. +.elif ${MK_CLANG_BOOTSTRAP} == "yes" +.info SYSTEM_COMPILER: libclang will be built for bootstrapping a cross-compiler. +.endif +.if ${USING_SYSTEM_LINKER} == "yes" +.info SYSTEM_LINKER: Determined that LD=${LD} matches the source tree. Not bootstrapping a cross-linker. +.elif ${MK_LLD_BOOTSTRAP} == "yes" +.info SYSTEM_LINKER: libclang will be built for bootstrapping a cross-linker. +.endif +.endif + +# End WITH_SYSTEM_COMPILER / WITH_SYSTEM_LD + +# Store some compiler metadata for use in installworld where we don't +# want to invoke CC at all. +_TOOLCHAIN_METADATA_VARS= COMPILER_VERSION \ + COMPILER_TYPE \ + COMPILER_FEATURES \ + COMPILER_FREEBSD_VERSION \ + COMPILER_RESOURCE_DIR \ + LINKER_VERSION \ + LINKER_FEATURES \ + LINKER_TYPE \ + LINKER_FREEBSD_VERSION +toolchain-metadata.mk: .PHONY .META + @: > ${.TARGET} + @echo ".info Using cached toolchain metadata from build at $$(hostname) on $$(date)" \ + > ${.TARGET} + @echo "_LOADED_TOOLCHAIN_METADATA=t" >> ${.TARGET} +.for v in ${_TOOLCHAIN_METADATA_VARS} + @echo "${v}=${${v}}" >> ${.TARGET} + @echo "X_${v}=${X_${v}}" >> ${.TARGET} +.endfor + @echo ".export ${_TOOLCHAIN_METADATA_VARS}" >> ${.TARGET} + @echo ".export ${_TOOLCHAIN_METADATA_VARS:C,^,X_,}" >> ${.TARGET} + + +# We must do lib/ and libexec/ before bin/ in case of a mid-install error to +# keep the users system reasonably usable. For static->dynamic root upgrades, +# we don't want to install a dynamic binary without rtld and the needed +# libraries. More commonly, for dynamic root, we don't want to install a +# binary that requires a newer library version that hasn't been installed yet. +# This ordering is not a guarantee though. The only guarantee of a working +# system here would require fine-grained ordering of all components based +# on their dependencies. +.if !empty(SUBDIR_OVERRIDE) +SUBDIR= ${SUBDIR_OVERRIDE} +.else +SUBDIR= lib libexec +# Add LOCAL_LIB_DIRS, but only if they will not be picked up as a SUBDIR +# of a LOCAL_DIRS directory. This allows LOCAL_DIRS=foo and +# LOCAL_LIB_DIRS=foo/lib to behave as expected. +.for _DIR in ${LOCAL_DIRS:M*/} ${LOCAL_DIRS:N*/:S|$|/|} +_REDUNDANT_LIB_DIRS+= ${LOCAL_LIB_DIRS:M${_DIR}*} +.endfor +.for _DIR in ${LOCAL_LIB_DIRS} +.if ${_DIR} == ".WAIT" || (empty(_REDUNDANT_LIB_DIRS:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile)) +SUBDIR+= ${_DIR} +.endif +.endfor +.if !defined(NO_ROOT) && (make(installworld) || make(install)) +# Ensure libraries are installed before progressing. +SUBDIR+=.WAIT +.endif +SUBDIR+=bin +.if ${MK_CDDL} != "no" +SUBDIR+=cddl +.endif +SUBDIR+=gnu include +.if ${MK_KERBEROS} != "no" +SUBDIR+=kerberos5 +.endif +.if ${MK_RESCUE} != "no" +SUBDIR+=rescue +.endif +SUBDIR+=sbin +.if ${MK_CRYPT} != "no" +SUBDIR+=secure +.endif +.if !defined(NO_SHARE) +SUBDIR+=share +.endif +.if ${MK_BOOT} != "no" +SUBDIR+=stand +.endif +SUBDIR+=sys usr.bin usr.sbin +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + +# Local directories are built in parallel with the base system directories. +# Users may insert a .WAIT directive at the beginning or elsewhere within +# the LOCAL_DIRS and LOCAL_LIB_DIRS lists as needed. +.for _DIR in ${LOCAL_DIRS} +.if ${_DIR} == ".WAIT" || exists(${.CURDIR}/${_DIR}/Makefile) +SUBDIR+= ${_DIR} +.endif +.endfor + +# We must do etc/ last as it hooks into building the man whatis file +# by calling 'makedb' in share/man. This is only relevant for +# install/distribute so they build the whatis file after every manpage is +# installed. +.if make(installworld) || make(install) +SUBDIR+=.WAIT +.endif +SUBDIR+=etc + +.endif # !empty(SUBDIR_OVERRIDE) + +.if defined(NOCLEAN) +.warning The src.conf WITHOUT_CLEAN option can now be used instead of NOCLEAN. +MK_CLEAN:= no +.endif +.if defined(NO_CLEAN) +.info The src.conf WITHOUT_CLEAN option can now be used instead of NO_CLEAN. +MK_CLEAN:= no +.endif +.if defined(NO_CLEANDIR) +CLEANDIR= clean cleandepend +.else +CLEANDIR= cleandir +.endif + +.if defined(WORLDFAST) +MK_CLEAN:= no +NO_OBJWALK= t +.endif + +.if ${MK_META_MODE} == "yes" +# If filemon is used then we can rely on the build being incremental-safe. +# The .meta files will also track the build command and rebuild should +# it change. +.if empty(.MAKE.MODE:Mnofilemon) +MK_CLEAN:= no +.endif +.endif +.if defined(NO_OBJWALK) || ${MK_AUTO_OBJ} == "yes" +NO_OBJWALK= t +NO_KERNELOBJ= t +.endif +.if !defined(NO_OBJWALK) +_obj= obj +.endif + +LOCAL_TOOL_DIRS?= +PACKAGEDIR?= ${DESTDIR}/${DISTDIR} + +.if empty(SHELL:M*csh*) +BUILDENV_SHELL?=${SHELL} +.else +BUILDENV_SHELL?=/bin/sh +.endif + +.if !defined(_MKSHOWCONFIG) +.if !defined(VCS_REVISION) || empty(VCS_REVISION) +.if !defined(SVNVERSION_CMD) || empty(SVNVERSION_CMD) +. for _D in ${PATH:S,:, ,g} +. if exists(${_D}/svnversion) +SVNVERSION_CMD?=${_D}/svnversion +. endif +. if exists(${_D}/svnliteversion) +SVNVERSION_CMD?=${_D}/svnliteversion +. endif +. endfor +.endif +.if defined(SVNVERSION_CMD) && !empty(SVNVERSION_CMD) +_VCS_REVISION?= $$(eval ${SVNVERSION_CMD} ${SRCDIR}) +. if !empty(_VCS_REVISION) +VCS_REVISION= $$(echo r${_VCS_REVISION}) +.export VCS_REVISION +. endif +.endif +.endif + +.if !defined(GIT_CMD) || empty(GIT_CMD) +. for _P in /usr/bin /usr/local/bin +. if exists(${_P}/git) +GIT_CMD= ${_P}/git +. endif +. endfor +.export GIT_CMD +.endif + +.if !defined(OSRELDATE) +.if exists(/usr/include/osreldate.h) +OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ + /usr/include/osreldate.h +.else +OSRELDATE= 0 +.endif +.export OSRELDATE +.endif + +# Set VERSION for CTFMERGE to use via the default CTFFLAGS=-L VERSION. +.for _V in BRANCH REVISION TYPE +.if !defined(_${_V}) +_${_V}!= eval $$(awk '/^${_V}=/{print}' ${SRCTOP}/sys/conf/newvers.sh); echo $$${_V} +.export _${_V} +.endif +.endfor +.if !defined(SRCRELDATE) +SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ + ${SRCDIR}/sys/sys/param.h +.export SRCRELDATE +.endif +.if !defined(VERSION) +VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE} +.export VERSION +.endif +MAJOR_REVISION= ${_REVISION:R} + +.if !defined(PKG_VERSION) +_STRTIMENOW= %Y%m%d%H%M%S +_TIMENOW= ${_STRTIMENOW:gmtime} +.if ${_BRANCH:MCURRENT*} || ${_BRANCH:MSTABLE*} || ${_BRANCH:MPRERELEASE*} +EXTRA_REVISION= .snap${_TIMENOW} +.elif ${_BRANCH:MALPHA*} +EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/}.${_TIMENOW} +.elif ${_BRANCH:MBETA*} +EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/}.${_TIMENOW} +.elif ${_BRANCH:MRC*} +EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/}.${_TIMENOW} +.elif ${_BRANCH:M*-p*} +EXTRA_REVISION= p${_BRANCH:C/.*-p([0-9]+$)/\1/} +.endif +PKG_VERSION:= ${MAJOR_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} +.endif +.endif # !defined(PKG_VERSION) + +.if !defined(PKG_TIMESTAMP) +TIMEEPOCHNOW= %s +SOURCE_DATE_EPOCH= ${TIMEEPOCHNOW:gmtime} +.else +SOURCE_DATE_EPOCH= ${PKG_TIMESTAMP} +.endif + +PKG_NAME_PREFIX?= FreeBSD +PKG_MAINTAINER?= re@FreeBSD.org +PKG_WWW?= https://www.FreeBSD.org +.export PKG_NAME_PREFIX +.export PKG_MAINTAINER +.export PKG_WWW + +.if !defined(_MKSHOWCONFIG) +_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} -f /dev/null \ + -m ${.CURDIR}/share/mk MK_AUTO_OBJ=no -V CPUTYPE +.if ${_CPUTYPE} != ${_TARGET_CPUTYPE} +.error CPUTYPE global should be set with ?=. +.endif +.endif +.if make(buildworld) +BUILD_ARCH!= uname -p +# On some Linux systems uname -p returns "unknown" so skip this check there. +# This check only exists to tell people to use TARGET_ARCH instead of +# MACHINE_ARCH so skipping it when crossbuilding on non-FreeBSD should be fine. +.if ${MACHINE_ARCH} != ${BUILD_ARCH} && ${.MAKE.OS} == "FreeBSD" +.error To cross-build, set TARGET_ARCH. +.endif +.endif +WORLDTMP?= ${OBJTOP}/tmp +BPATH= ${CCACHE_WRAPPER_PATH_PFX}${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin:${WORLDTMP}/legacy/usr/libexec +XPATH= ${WORLDTMP}/bin:${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin + +# When building we want to find the cross tools before the host tools in ${BPATH}. +# We also need to add UNIVERSE_TOOLCHAIN_PATH so that we can find the shared +# toolchain files (clang, lld, etc.) during make universe/tinderbox +STRICTTMPPATH= ${XPATH}:${BPATH}:${UNIVERSE_TOOLCHAIN_PATH} +# We should not be using tools from /usr/bin accidentally since this could cause +# the build to break on other systems that don't have that tool. For now we +# still allow using the old behaviour (inheriting $PATH) if +# BUILD_WITH_STRICT_TMPPATH is set to 0 but this will eventually be removed. + +# Currently strict $PATH can cause build failures. Once the remaining issues +# have been resolved it will be turned on by default. +BUILD_WITH_STRICT_TMPPATH?=0 +.if defined(CROSSBUILD_HOST) +# When building on non-FreeBSD we can't rely on the tools in /usr/bin being compatible +# with what FreeBSD expects. Therefore we only use tools from STRICTTMPPATH +# during the world build stage. We build most tools during the bootstrap-tools +# phase but symlink host tools that are known to work instead of building them +BUILD_WITH_STRICT_TMPPATH:=1 +.endif +.if ${BUILD_WITH_STRICT_TMPPATH} != 0 +TMPPATH= ${STRICTTMPPATH} +.else +TMPPATH= ${STRICTTMPPATH}:${PATH} +.endif + +# +# Avoid running mktemp(1) unless actually needed. +# It may not be functional, e.g., due to new ABI +# when in the middle of installing over this system. +# +.if make(distributeworld) || make(installworld) || make(stageworld) +.if ${BUILD_WITH_STRICT_TMPPATH} != 0 +MKTEMP=${WORLDTMP}/legacy/usr/bin/mktemp +.if !exists(${MKTEMP}) +.error mktemp binary doesn't exist in expected location: ${MKTEMP} +.endif +.else +MKTEMP=mktemp +.endif +INSTALLTMP!= ${MKTEMP} -d -u -t install + +.if ${.MAKE.OS} == "FreeBSD" +# When building on FreeBSD we always copy the host tools instead of linking +# into INSTALLTMP to avoid issues with incompatible libraries (see r364030). +# Note: we could create links if we don't intend to update the current machine. +INSTALLTMP_COPY_HOST_TOOL=cp +.else +# However, this is not necessary on Linux/macOS. Additionally, copying the host +# tools to another directory with cp results in AMFI Launch Constraint +# Violations on macOS Ventura as part of its System Integrity Protection. +INSTALLTMP_COPY_HOST_TOOL=ln -s +.endif +.endif + +.if make(stagekernel) || make(distributekernel) +TAGS+= kernel +PACKAGE= kernel +.endif + +# +# Building a world goes through the following stages +# +# 1. legacy stage [BMAKE] +# This stage is responsible for creating compatibility +# shims that are needed by the bootstrap-tools, +# build-tools and cross-tools stages. These are generally +# APIs that tools from one of those three stages need to +# build that aren't present on the host. +# 1. bootstrap-tools stage [BMAKE] +# This stage is responsible for creating programs that +# are needed for backward compatibility reasons. They +# are not built as cross-tools. +# 2. build-tools stage [TMAKE] +# This stage is responsible for creating the object +# tree and building any tools that are needed during +# the build process. Some programs are listed during +# this phase because they build binaries to generate +# files needed to build these programs. This stage also +# builds the 'build-tools' target rather than 'all'. +# 3. cross-tools stage [XMAKE] +# This stage is responsible for creating any tools that +# are needed for building the system. A cross-compiler is one +# of them. This differs from build tools in two ways: +# 1. the 'all' target is built rather than 'build-tools' +# 2. these tools are installed into TMPPATH for stage 4. +# 4. world stage [WMAKE] +# This stage actually builds the world. +# 5. install stage (optional) [IMAKE] +# This stage installs a previously built world. +# + +BOOTSTRAPPING?= 0 +# Keep these in sync +MINIMUM_SUPPORTED_OSREL?= 1104001 +MINIMUM_SUPPORTED_REL?= 11.4 + +# Common environment for world related stages +CROSSENV+= \ + MACHINE_ARCH=${TARGET_ARCH} \ + MACHINE=${TARGET} \ + CPUTYPE=${TARGET_CPUTYPE} +.if ${MK_META_MODE} != "no" +# Don't rebuild build-tools targets during normal build. +CROSSENV+= BUILD_TOOLS_META=.NOMETA +.endif +.if defined(TARGET_CFLAGS) +CROSSENV+= ${TARGET_CFLAGS} +.endif +.if (${TARGET} != ${MACHINE} && !defined(WITH_LOCAL_MODULES)) || \ + defined(WITHOUT_LOCAL_MODULES) +CROSSENV+= LOCAL_MODULES= +.endif + +BOOTSTRAPPING_OSRELDATE?=${OSRELDATE} + +# bootstrap-tools stage +BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ + TOOLS_PREFIX=${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \ + PATH=${BPATH:Q}:${PATH:Q} \ + WORLDTMP=${WORLDTMP} \ + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" +# need to keep this in sync with targets/pseudo/bootstrap-tools/Makefile +BSARGS= DESTDIR= \ + OBJTOP='${WORLDTMP}/obj-tools' \ + OBJROOT='$${OBJTOP}/' \ + UNIVERSE_TOOLCHAIN_PATH=${UNIVERSE_TOOLCHAIN_PATH} \ + MAKEOBJDIRPREFIX= \ + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ + BWPHASE=${.TARGET:C,^_,,} \ + -DNO_CPU_CFLAGS \ + -DNO_LINT \ + -DNO_PIC \ + -DNO_SHARED \ + MK_ASAN=no \ + MK_CTF=no \ + MK_CLANG_EXTRAS=no \ + MK_CLANG_FORMAT=no \ + MK_CLANG_FULL=no \ + MK_HTML=no \ + MK_MAN=no \ + MK_PROFILE=no \ + MK_RETPOLINE=no \ + MK_SSP=no \ + MK_TESTS=no \ + MK_UBSAN=no \ + MK_WERROR=no \ + MK_INCLUDES=yes \ + MK_MAN_UTILS=yes + +BMAKE= \ + ${TIME_ENV} ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ + ${BSARGS} +.if empty(.MAKEOVERRIDES:MMK_LLVM_TARGET_ALL) +BMAKE+= MK_LLVM_TARGET_ALL=no +.endif + +# build-tools stage +TMAKE= \ + ${TIME_ENV} ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + DESTDIR= \ + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ + BWPHASE=${.TARGET:C,^_,,} \ + -DNO_CPU_CFLAGS \ + -DNO_LINT \ + MK_ASAN=no \ + MK_CTF=no \ + MK_CLANG_EXTRAS=no \ + MK_CLANG_FORMAT=no \ + MK_CLANG_FULL=no \ + MK_LLDB=no \ + MK_RETPOLINE=no \ + MK_SSP=no \ + MK_TESTS=no \ + MK_UBSAN=no \ + MK_WERROR=no + +# cross-tools stage +# TOOLS_PREFIX set in BMAKE +XMAKE= ${BMAKE} \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + MK_LLDB=no \ + MK_LLVM_BINUTILS=no \ + MK_TESTS=no + +# kernel-tools stage +KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ + PATH=${BPATH:Q}:${PATH:Q} \ + WORLDTMP=${WORLDTMP} \ + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" + +KTMAKE= ${TIME_ENV} \ + TOOLS_PREFIX=${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \ + ${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ + DESTDIR= \ + OBJTOP='${WORLDTMP}/obj-kernel-tools' \ + OBJROOT='$${OBJTOP}/' \ + UNIVERSE_TOOLCHAIN_PATH=${UNIVERSE_TOOLCHAIN_PATH} \ + MAKEOBJDIRPREFIX= \ + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ + -DNO_CPU_CFLAGS \ + -DNO_LINT \ + -DNO_PIC \ + -DNO_SHARED \ + MK_CTF=no \ + MK_HTML=no \ + MK_MAN=no \ + MK_PROFILE=no \ + MK_SSP=no \ + MK_RETPOLINE=no \ + MK_WERROR=no + +# world stage +WMAKEENV= ${CROSSENV} \ + INSTALL="${INSTALL_CMD} -U" \ + PATH=${TMPPATH:Q} \ + SYSROOT=${WORLDTMP} + +# make hierarchy *** 5431 LINES SKIPPED *** From nobody Sun Aug 27 05:58:46 2023 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 4RYNLV3b1Kz4rWsk; Sun, 27 Aug 2023 05:59:30 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from smtp052.goneo.de (smtp052.goneo.de [85.220.129.60]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4RYNLT36YHz4Rrf; Sun, 27 Aug 2023 05:59:29 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Authentication-Results: mx1.freebsd.org; none Received: from hub1.goneo.de (hub1.goneo.de [IPv6:2001:1640:5::8:52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp5.goneo.de (Postfix) with ESMTPS id 0AB5210A32CA; Sun, 27 Aug 2023 07:59:21 +0200 (CEST) Received: from hub1.goneo.de (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPS id D4581105C5E0; Sun, 27 Aug 2023 07:59:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walstatt-de.de; s=DKIM001; t=1693115954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RVQxwOqW9IJrWhR7XztaUeOtPSzQCl9Cc7CUxSZ+DKM=; b=BJMlMszTCZcFLcNBu9QRuvvbwxUyCqC3R2l3Yd38tVWhvoWoK5RIGtRt+XKRdsqyEguiGL cbrT7i3jhPxC1A21ME61SjPhnlpVm15gUMTq0XLWrUDswV2ogDH/LGYIUdhvcoRcwzMc5I MoP47JGlpoo5uZ15BQa2LbtZlLb+NE0eAbaxgHQUVGUmOlgwWBGRkF9Od6tgBEsEgKWDSQ EwuX7kmxdcquwcl4CheXP86md7oJW98XWk9SoFj0MrRl5RuG8GqR3yorYu6DBHPoNs2UOI 9wq6Prbu9wZl059XpbS/bx7jIY2eLDJ2N3p470PLs/CxNcC7raK/nTlahFcdoA== Received: from thor.intern.walstatt.dynvpn.de (dynamic-077-191-035-139.77.191.pool.telefonica.de [77.191.35.139]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPSA id 879B8105C5C1; Sun, 27 Aug 2023 07:59:14 +0200 (CEST) Date: Sun, 27 Aug 2023 07:58:46 +0200 From: FreeBSD User To: Martin Matuska Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad Message-ID: <20230827075913.36151ef6@thor.intern.walstatt.dynvpn.de> In-Reply-To: <202308270509.37R596B5048298@gitrepo.freebsd.org> References: <202308270509.37R596B5048298@gitrepo.freebsd.org> Organization: walstatt-de.de 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-UID: 4fa149 X-Rspamd-UID: e18779 X-Rspamd-Queue-Id: 4RYNLT36YHz4Rrf X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:25394, ipnet:85.220.128.0/17, country:DE] Am Sun, 27 Aug 2023 05:09:06 GMT Martin Matuska schrieb: After updating my CURRENT with this new ZFS code, on reboot all pools do not import automatically anymore as it has been before. Did I miss something? Kind regrads, oh > The branch main has been updated by mm: > > URL: https://cgit.FreeBSD.org/src/commit/?id=315ee00fa9616b0a192b6834911f98bcf5316a6b > > commit 315ee00fa9616b0a192b6834911f98bcf5316a6b > Merge: b3a714652ff0 804414aad224 > Author: Martin Matuska > AuthorDate: 2023-08-26 21:20:04 +0000 > Commit: Martin Matuska > CommitDate: 2023-08-26 21:51:42 +0000 > > zfs: merge openzfs/zfs@804414aad > > Notable upstream pull request merges: > #15024 Add missed DMU_PROJECTUSED_OBJECT prefetch > #15029 Do not request data L1 buffers on scan prefetch > #15036 FreeBSD: catch up to __FreeBSD_version 1400093 > #15039 Fix raw receive with different indirect block size > #15047 FreeBSD: Fix build on stable/13 after 1302506 > #15049 Fix the ZFS checksum error histograms with larger record sizes > #15052 Reduce bloat in ereport.fs.zfs.checksum events > #15056 Avoid extra snprintf() in dsl_deadlist_merge() > #15061 Ignore pool ashift property during vdev attachment > #15063 Don't panic if setting vdev properties is unsupported for this vdev type > #15067 spa_min_alloc should be GCD, not min > #15071 Add explicit prefetches to bpobj_iterate() > #15072 Adjust prefetch parameters > #15076 Refactor dmu_prefetch() > #15079 set autotrim default to 'off' everywhere > #15080 ZIL: Fix config lock deadlock > #15088 metaslab: tuneable to better control force ganging > #15096 Avoid waiting in dmu_sync_late_arrival() > #15097 BRT should return EOPNOTSUPP > #15103 Remove zl_issuer_lock from zil_suspend() > #15107 Remove fastwrite mechanism > #15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1 > #15122 ZIL: Second attempt to reduce scope of zl_issuer_lock > #15129 zpool_vdev_remove() should handle EALREADY error return > #15132 ZIL: Replay blocks without next block pointer > #15148 zfs_clone_range should return descriptive error codes > #15153 ZIL: Avoid dbuf_read() before dmu_sync() > #15172 copy_file_range: fix fallback when source create on same txg > #15180 Update outdated assertion from zio_write_compress > > Obtained from: OpenZFS > OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13 > > Makefile.inc1 | 5 +- > cddl/lib/libzfs/Makefile | 1 + > cddl/lib/libzfs/Makefile.depend | 1 + > rescue/rescue/Makefile | 2 +- > rescue/rescue/Makefile.depend | 1 + > share/mk/src.libnames.mk | 2 +- > sys/contrib/openzfs/META | 6 +- > sys/contrib/openzfs/cmd/zdb/zdb.c | 77 ++- > sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c | 2 - > sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c | 5 + > .../openzfs/cmd/zed/zed.d/statechange-slot_off.sh | 61 ++ > sys/contrib/openzfs/cmd/zed/zed.d/zed.rc | 5 + > sys/contrib/openzfs/cmd/ztest.c | 2 +- > sys/contrib/openzfs/config/Shellcheck.am | 3 +- > sys/contrib/openzfs/config/kernel-blkdev.m4 | 138 +++- > .../config/kernel-block-device-operations.m4 | 35 +- > .../openzfs/config/kernel-filemap-splice-read.m4 | 25 + > .../openzfs/config/kernel-register_sysctl_table.m4 | 27 + > .../config/kernel-vfs-extended-file_range.m4 | 50 ++ > .../openzfs/config/kernel-vfs-file_range.m4 | 164 +++++ > sys/contrib/openzfs/config/kernel-vfs-iov_iter.m4 | 26 +- > sys/contrib/openzfs/config/kernel.m4 | 16 + > sys/contrib/openzfs/contrib/debian/changelog | 6 + > .../contrib/debian/openzfs-zfs-test.install | 2 - > .../contrib/debian/openzfs-zfsutils.install | 2 + > .../contrib/dracut/90zfs/zfs-env-bootfs.service.in | 11 +- > .../dracut/90zfs/zfs-rollback-bootfs.service.in | 2 +- > .../openzfs/include/os/freebsd/spl/sys/vnode.h | 6 +- > .../include/os/linux/kernel/linux/blkdev_compat.h | 17 + > .../openzfs/include/os/linux/spl/sys/kmem_cache.h | 8 + > .../openzfs/include/os/linux/spl/sys/types.h | 2 +- > sys/contrib/openzfs/include/os/linux/spl/sys/uio.h | 12 + > sys/contrib/openzfs/include/os/linux/zfs/sys/zpl.h | 53 ++ > sys/contrib/openzfs/include/sys/bpobj.h | 2 +- > sys/contrib/openzfs/include/sys/brt.h | 1 + > sys/contrib/openzfs/include/sys/dmu.h | 5 + > sys/contrib/openzfs/include/sys/dmu_impl.h | 2 - > sys/contrib/openzfs/include/sys/dmu_zfetch.h | 2 - > sys/contrib/openzfs/include/sys/fm/fs/zfs.h | 4 - > sys/contrib/openzfs/include/sys/metaslab.h | 3 - > sys/contrib/openzfs/include/sys/metaslab_impl.h | 6 +- > sys/contrib/openzfs/include/sys/spa_impl.h | 1 + > sys/contrib/openzfs/include/sys/vdev_impl.h | 2 +- > sys/contrib/openzfs/include/sys/zil_impl.h | 44 +- > sys/contrib/openzfs/include/sys/zio.h | 1 - > sys/contrib/openzfs/include/sys/zio_checksum.h | 2 - > sys/contrib/openzfs/lib/libzfs/Makefile.am | 2 +- > sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 6 + > sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 95 ++- > sys/contrib/openzfs/man/man4/zfs.4 | 10 +- > sys/contrib/openzfs/man/man8/zfs-send.8 | 18 +- > sys/contrib/openzfs/man/man8/zpool-events.8 | 23 +- > sys/contrib/openzfs/module/Kbuild.in | 1 + > .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 10 +- > sys/contrib/openzfs/module/os/linux/spl/spl-proc.c | 26 +- > .../openzfs/module/os/linux/zfs/vdev_disk.c | 65 +- > .../openzfs/module/os/linux/zfs/zfs_ctldir.c | 26 +- > .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 7 + > .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 9 +- > .../openzfs/module/os/linux/zfs/zfs_znode.c | 8 + > .../openzfs/module/os/linux/zfs/zpl_ctldir.c | 2 +- > sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 44 +- > .../openzfs/module/os/linux/zfs/zpl_file_range.c | 272 ++++++++ > .../openzfs/module/os/linux/zfs/zpl_super.c | 39 +- > sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 28 +- > sys/contrib/openzfs/module/zfs/bpobj.c | 49 +- > sys/contrib/openzfs/module/zfs/brt.c | 43 +- > sys/contrib/openzfs/module/zfs/dbuf.c | 11 +- > sys/contrib/openzfs/module/zfs/dmu.c | 127 ++-- > sys/contrib/openzfs/module/zfs/dmu_recv.c | 22 +- > sys/contrib/openzfs/module/zfs/dmu_zfetch.c | 12 +- > sys/contrib/openzfs/module/zfs/dnode.c | 31 +- > sys/contrib/openzfs/module/zfs/dsl_deadlist.c | 14 +- > sys/contrib/openzfs/module/zfs/dsl_scan.c | 17 +- > sys/contrib/openzfs/module/zfs/metaslab.c | 83 +-- > sys/contrib/openzfs/module/zfs/spa_log_spacemap.c | 4 +- > sys/contrib/openzfs/module/zfs/spa_misc.c | 1 + > sys/contrib/openzfs/module/zfs/vdev.c | 90 ++- > sys/contrib/openzfs/module/zfs/vdev_indirect.c | 2 +- > sys/contrib/openzfs/module/zfs/vdev_raidz.c | 2 +- > sys/contrib/openzfs/module/zfs/zfs_fm.c | 33 +- > sys/contrib/openzfs/module/zfs/zfs_vnops.c | 46 +- > sys/contrib/openzfs/module/zfs/zil.c | 719 +++++++++------------ > sys/contrib/openzfs/module/zfs/zio.c | 45 +- > sys/contrib/openzfs/module/zfs/zio_checksum.c | 2 - > sys/contrib/openzfs/module/zfs/zvol.c | 8 +- > sys/contrib/openzfs/tests/runfiles/linux.run | 11 + > .../openzfs/tests/test-runner/bin/zts-report.py.in | 18 + > sys/contrib/openzfs/tests/zfs-tests/cmd/.gitignore | 1 + > .../openzfs/tests/zfs-tests/cmd/Makefile.am | 1 + > .../openzfs/tests/zfs-tests/cmd/clonefile.c | 333 ++++++++++ > sys/contrib/openzfs/tests/zfs-tests/cmd/readmmap.c | 1 + > .../openzfs/tests/zfs-tests/include/commands.cfg | 1 + > .../openzfs/tests/zfs-tests/tests/Makefile.am | 14 + > .../functional/block_cloning/block_cloning.kshlib | 54 ++ > .../block_cloning/block_cloning_copyfilerange.ksh | 60 ++ > .../block_cloning_copyfilerange_cross_dataset.ksh | 65 ++ > .../block_cloning_copyfilerange_fallback.ksh | 86 +++ > ...ock_cloning_copyfilerange_fallback_same_txg.ksh | 66 ++ > .../block_cloning_copyfilerange_partial.ksh | 68 ++ > .../block_cloning_disabled_copyfilerange.ksh | 60 ++ > .../block_cloning_disabled_ficlone.ksh | 50 ++ > .../block_cloning_disabled_ficlonerange.ksh | 50 ++ > .../block_cloning/block_cloning_ficlone.ksh | 56 ++ > .../block_cloning/block_cloning_ficlonerange.ksh | 56 ++ > .../block_cloning_ficlonerange_partial.ksh | 64 ++ > .../tests/functional/block_cloning/cleanup.ksh | 34 + > .../tests/functional/block_cloning/setup.ksh | 36 ++ > .../cli_root/zpool_attach/attach-o_ashift.ksh | 30 +- > .../cli_root/zpool_replace/replace-o_ashift.ksh | 32 +- > .../cli_root/zpool_replace/replace_prop_ashift.ksh | 24 +- > sys/modules/zfs/zfs_config.h | 53 +- > sys/modules/zfs/zfs_gitrev.h | 2 +- > 113 files changed, 3322 insertions(+), 906 deletions(-) > > diff --cc Makefile.inc1 > index 8838d31c795a,000000000000..f740cc5abcca > mode 100644,000000..100644 > --- a/Makefile.inc1 > +++ b/Makefile.inc1 > @@@ -1,3692 -1,0 +1,3695 @@@ > +# > +# > +# Make command line options: > +# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir > +# -DNO_CLEAN do not clean at all > +# -DDB_FROM_SRC use the user/group databases in src/etc instead of > +# the system database when installing. > +# -DNO_SHARE do not go into share subdir > +# -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,OBJ} > +# -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel > +# -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel > +# -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} buildkernel > +# -DNO_ROOT install without using root privilege > +# -DWITHOUT_CTF do not run the DTrace CTF conversion tools on built objects > +# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list > +# LOCAL_ITOOLS="list of tools" to add additional tools to the ITOOLS list > +# LOCAL_LIB_DIRS="list of dirs" to add additional dirs to libraries target > +# LOCAL_MTREE="list of mtree files" to process to allow local directories > +# to be created before files are installed > +# LOCAL_LEGACY_DIRS="list of dirs" to add additional dirs to the legacy > +# target > +# LOCAL_BSTOOL_DIRS="list of dirs" to add additional dirs to the > +# bootstrap-tools target > +# LOCAL_TOOL_DIRS="list of dirs" to add additional dirs to the build-tools > +# target > +# LOCAL_XTOOL_DIRS="list of dirs" to add additional dirs to the > +# cross-tools target > +# METALOG="path to metadata log" to write permission and ownership > +# when NO_ROOT is set. (default: ${DESTDIR}/${DISTDIR}/METALOG, > +# check /etc/make.conf for DISTDIR) > +# TARGET="machine" to crossbuild world for a different machine type > +# TARGET_ARCH= may be required when a TARGET supports multiple endians > +# BUILDENV_SHELL= shell to launch for the buildenv target (def:${SHELL}) > +# WORLD_FLAGS= additional flags to pass to make(1) during buildworld > +# KERNEL_FLAGS= additional flags to pass to make(1) during buildkernel > +# SUBDIR_OVERRIDE="list of dirs" to build rather than everything. > +# All libraries and includes, and some build tools will still build. > + > +# > +# The intended user-driven targets are: > +# buildworld - rebuild *everything*, including glue to help do upgrades > +# installworld- install everything built by "buildworld" > +# checkworld - run test suite on installed world > +# doxygen - build API documentation of the kernel > +# > +# Standard targets (not defined here) are documented in the makefiles in > +# /usr/share/mk. These include: > +# obj depend all install clean cleandepend cleanobj > + > +.if !defined(TARGET) || !defined(TARGET_ARCH) > +.error Both TARGET and TARGET_ARCH must be defined. > +.endif > + > +.if make(showconfig) || make(test-system-*) > +_MKSHOWCONFIG= t > +.endif > + > +SRCDIR?= ${.CURDIR} > +LOCALBASE?= /usr/local > +TIME_ENV ?= time env > + > +.include "share/mk/src.tools.mk" > + > +# Cross toolchain changes must be in effect before bsd.compiler.mk > +# so that gets the right CC, and pass CROSS_TOOLCHAIN to submakes. > +.if defined(CROSS_TOOLCHAIN) > +.if exists(${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk) > +.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" > +.elif exists(${CROSS_TOOLCHAIN}) > +.include "${CROSS_TOOLCHAIN}" > +.else > +.error CROSS_TOOLCHAIN ${CROSS_TOOLCHAIN} not found > +.endif > +CROSSENV+=CROSS_TOOLCHAIN="${CROSS_TOOLCHAIN}" > +.elif defined(UNIVERSE_TOOLCHAIN) > +UNIVERSE_TOOLCHAIN_PATH?=${HOST_OBJTOP}/tmp/usr/bin > +XCC?="${UNIVERSE_TOOLCHAIN_PATH}/cc" > +XCXX?="${UNIVERSE_TOOLCHAIN_PATH}/c++" > +XCPP?="${UNIVERSE_TOOLCHAIN_PATH}/cpp" > +XLD?="${UNIVERSE_TOOLCHAIN_PATH}/ld" > +.endif > +.if defined(CROSS_TOOLCHAIN_PREFIX) > +CROSS_COMPILER_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} > +.endif > + > +XCOMPILERS= CC CXX CPP > +.for COMPILER in ${XCOMPILERS} > +.if defined(CROSS_COMPILER_PREFIX) > +X${COMPILER}?= ${CROSS_COMPILER_PREFIX}${${COMPILER}} > +.else > +X${COMPILER}?= ${${COMPILER}} > +.endif > +.endfor > +# If a full path to an external cross compiler is given, don't build > +# a cross compiler. > +.if ${XCC:N${CCACHE_BIN}:M/*} > +MK_CLANG_BOOTSTRAP= no > +# Make sure sub-makes see the option as disabled so the hack in bsd.sys.mk to > +# work around incompatible headers in Clang's resource directory is enabled. > +.MAKEOVERRIDES+= MK_CLANG_BOOTSTRAP > +.endif > + > +# Pull in compiler metadata from buildworld/toolchain if possible to avoid > +# running CC from bsd.compiler.mk. > +.if make(installworld) || make(install) || make(distributeworld) || \ > + make(stageworld) > +.-include "${OBJTOP}/toolchain-metadata.mk" > +.if !defined(_LOADED_TOOLCHAIN_METADATA) > +.error A build is required first. You may have the wrong MAKEOBJDIRPREFIX set. > +.endif > +.endif > + > +# Pull in COMPILER_TYPE and COMPILER_FREEBSD_VERSION early. Pull it from the > +# tree to be friendlier to foreign OS builds. It's safe to do so unconditionally > +# here since we will always have the right make, unlike in src/Makefile > +# Don't include bsd.linker.mk yet until XBINUTILS is handled (after src.opts.mk) > +_NO_INCLUDE_LINKERMK= t > +# We also want the X_COMPILER* variables if we are using an external toolchain. > +_WANT_TOOLCHAIN_CROSS_VARS= t > +.include "share/mk/bsd.compiler.mk" > +.undef _NO_INCLUDE_LINKERMK > +.undef _WANT_TOOLCHAIN_CROSS_VARS > +# src.opts.mk depends on COMPILER_FEATURES > +.include "share/mk/src.opts.mk" > + > +.if ${TARGET} == ${MACHINE} > +TARGET_CPUTYPE?=${CPUTYPE} > +.else > +TARGET_CPUTYPE?= > +.endif > +.if !empty(TARGET_CPUTYPE) > +_TARGET_CPUTYPE=${TARGET_CPUTYPE} > +.else > +_TARGET_CPUTYPE=dummy > +.endif > +.if ${TARGET} == "arm" > +.if ${TARGET_CPUTYPE:M*soft*} == "" > +TARGET_TRIPLE_ABI= gnueabihf > +.else > +TARGET_TRIPLE_ABI= gnueabi > +.endif > +.endif > +MACHINE_TRIPLE_ABI?= unknown > +MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/}-${MACHINE_TRIPLE_ABI}-freebsd${OS_REVISION} > +TARGET_TRIPLE_ABI?= unknown > +TARGET_TRIPLE?= > ${TARGET_ARCH:S/amd64/x86_64/}-${TARGET_TRIPLE_ABI}-freebsd${OS_REVISION} > +KNOWN_ARCHES?= aarch64/arm64 \ > + amd64 \ > + armv6/arm \ > + armv7/arm \ > + i386 \ > + powerpc \ > + powerpc64/powerpc \ > + powerpc64le/powerpc \ > + powerpcspe/powerpc \ > + riscv64/riscv > + > +.if ${TARGET} == ${TARGET_ARCH} > +_t= ${TARGET} > +.else > +_t= ${TARGET_ARCH}/${TARGET} > +.endif > +.for _t in ${_t} > +.if empty(KNOWN_ARCHES:M${_t}) > +.error Unknown target ${TARGET_ARCH}:${TARGET}. > +.endif > +.endfor > + > +.if ${TARGET_ARCH} == "amd64" > +LIBCOMPAT_INCLUDE_DIRS+= i386 > +.elif ${TARGET_ARCH} == "aarch64" > +LIBCOMPAT_INCLUDE_DIRS+= arm > +.endif > + > +.if ${.MAKE.OS} != "FreeBSD" > +CROSSBUILD_HOST=${.MAKE.OS} > +.if ${.MAKE.OS} != "Linux" && ${.MAKE.OS} != "Darwin" > +.warning Unsupported crossbuild system: ${.MAKE.OS}. Build will probably fail! > +.endif > +# We need to force NO_ROOT/DB_FROM_SRC builds when building on other operating > +# systems since the BSD.foo.dist specs contain users and groups that do not > +# exist by default on a Linux/MacOS system. > +NO_ROOT:= 1 > +DB_FROM_SRC:= 1 > +.export NO_ROOT > +.endif > + > +# If all targets are disabled for system llvm then don't expect it to work > +# for cross-builds. > +.if !defined(TOOLS_PREFIX) && ${MK_LLVM_TARGET_ALL} == "no" && \ > + ${MACHINE} != ${TARGET} && ${MACHINE_ARCH} != ${TARGET_ARCH} && \ > + !make(showconfig) > +MK_SYSTEM_COMPILER= no > +MK_SYSTEM_LINKER= no > +.endif > + > +# Handle external binutils. > +.if defined(CROSS_TOOLCHAIN_PREFIX) > +CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} > +.endif > +XBINUTILS= AS AR ELFCTL LD NM OBJCOPY RANLIB SIZE STRINGS STRIPBIN > +.for BINUTIL in ${XBINUTILS} > +.if defined(CROSS_BINUTILS_PREFIX) && \ > + exists(${CROSS_BINUTILS_PREFIX}/${${BINUTIL}}) > +X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX:C,/*$,,}/${${BINUTIL}} > +.else > +X${BINUTIL}?= ${${BINUTIL}} > +.endif > +.endfor > + > +# If a full path to an external linker is given, don't build lld. > +.if ${XLD:M/*} > +MK_LLD_BOOTSTRAP= no > +.endif > + > +# We also want the X_LINKER* variables if we are using an external toolchain. > +_WANT_TOOLCHAIN_CROSS_VARS= t > +.include "share/mk/bsd.linker.mk" > +.undef _WANT_TOOLCHAIN_CROSS_VARS > + > +# Begin WITH_SYSTEM_COMPILER / WITH_SYSTEM_LD > + > +# WITH_SYSTEM_COMPILER - Pull in needed values and make a decision. > + > +# Check if there is a local compiler that can satisfy as an external compiler. > +# Which compiler is expected to be used? > +.if ${MK_CLANG_BOOTSTRAP} == "yes" > +WANT_COMPILER_TYPE= clang > +.else > +WANT_COMPILER_TYPE= > +.endif > + > +.if !defined(WANT_COMPILER_FREEBSD_VERSION) && !make(showconfig) && \ > + !make(test-system-linker) > +.if ${WANT_COMPILER_TYPE} == "clang" > +WANT_COMPILER_FREEBSD_VERSION_FILE= lib/clang/freebsd_cc_version.h > +WANT_COMPILER_FREEBSD_VERSION!= \ > + awk '$$2 == "FREEBSD_CC_VERSION" {printf("%d\n", $$3)}' \ > + ${SRCDIR}/${WANT_COMPILER_FREEBSD_VERSION_FILE} || echo unknown > +WANT_COMPILER_VERSION_FILE= lib/clang/include/clang/Basic/Version.inc > +WANT_COMPILER_VERSION!= \ > + awk '$$2 == "CLANG_VERSION" {split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + > a[3]}' \ > + ${SRCDIR}/${WANT_COMPILER_VERSION_FILE} || echo unknown > +.endif > +.export WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_VERSION > +.endif # !defined(WANT_COMPILER_FREEBSD_VERSION) > + > +# It needs to be the same revision as we would build for the bootstrap. > +# If the expected vs CC is different then we can't skip. > +# GCC cannot be used for cross-arch yet. For clang we pass -target later if > +# TARGET_ARCH!=MACHINE_ARCH. > +.if ${MK_SYSTEM_COMPILER} == "yes" && \ > + defined(WANT_COMPILER_FREEBSD_VERSION) && \ > + ${MK_CLANG_BOOTSTRAP} == "yes" && \ > + !make(xdev*) && \ > + ${X_COMPILER_TYPE} == ${WANT_COMPILER_TYPE} && \ > + (${X_COMPILER_TYPE} == "clang" || ${TARGET_ARCH} == ${MACHINE_ARCH}) && \ > + ${X_COMPILER_VERSION} == ${WANT_COMPILER_VERSION} && \ > + ${X_COMPILER_FREEBSD_VERSION} == ${WANT_COMPILER_FREEBSD_VERSION} > +# Everything matches, disable the bootstrap compiler. > +MK_CLANG_BOOTSTRAP= no > +USING_SYSTEM_COMPILER= yes > +.endif # ${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} > + > +# WITH_SYSTEM_LD - Pull in needed values and make a decision. > + > +# Check if there is a local linker that can satisfy as an external linker. > +# Which linker is expected to be used? > +.if ${MK_LLD_BOOTSTRAP} == "yes" > +WANT_LINKER_TYPE= lld > +.else > +WANT_LINKER_TYPE= > +.endif > + > +.if !defined(WANT_LINKER_FREEBSD_VERSION) && !make(showconfig) && \ > + !make(test-system-compiler) > +.if ${WANT_LINKER_TYPE} == "lld" > +WANT_LINKER_FREEBSD_VERSION_FILE= lib/clang/include/lld/Common/Version.inc > +WANT_LINKER_FREEBSD_VERSION!= \ > + awk '$$2 == "LLD_FREEBSD_VERSION" {print $$3}' \ > + ${SRCDIR}/${WANT_LINKER_FREEBSD_VERSION_FILE} || echo unknown > +WANT_LINKER_VERSION_FILE= lib/clang/include/lld/Common/Version.inc > +WANT_LINKER_VERSION!= \ > + awk '$$2 == "LLD_VERSION_STRING" {gsub("\"", "", $$3); split($$3, a, "."); print > a[1] * 10000 + a[2] * 100 + a[3]}' \ > + ${SRCDIR}/${WANT_LINKER_VERSION_FILE} || echo unknown > +.else > +WANT_LINKER_FREEBSD_VERSION_FILE= > +WANT_LINKER_FREEBSD_VERSION= > +.endif > +.export WANT_LINKER_FREEBSD_VERSION WANT_LINKER_VERSION > +.endif # !defined(WANT_LINKER_FREEBSD_VERSION) > + > +.if ${MK_SYSTEM_LINKER} == "yes" && \ > + defined(WANT_LINKER_FREEBSD_VERSION) && \ > + (${MK_LLD_BOOTSTRAP} == "yes") && \ > + !make(xdev*) && \ > + ${X_LINKER_TYPE} == ${WANT_LINKER_TYPE} && \ > + ${X_LINKER_VERSION} == ${WANT_LINKER_VERSION} && \ > + ${X_LINKER_FREEBSD_VERSION} == ${WANT_LINKER_FREEBSD_VERSION} > +# Everything matches, disable the bootstrap linker. > +MK_LLD_BOOTSTRAP= no > +USING_SYSTEM_LINKER= yes > +.endif # ${WANT_LINKER_TYPE} == ${LINKER_TYPE} > + > +# WITH_SYSTEM_COMPILER / WITH_SYSTEM_LINKER - Handle defaults and debug. > +USING_SYSTEM_COMPILER?= no > +USING_SYSTEM_LINKER?= no > + > +TEST_SYSTEM_COMPILER_VARS= \ > + USING_SYSTEM_COMPILER MK_SYSTEM_COMPILER \ > + MK_CROSS_COMPILER MK_CLANG_BOOTSTRAP \ > + WANT_COMPILER_TYPE WANT_COMPILER_VERSION WANT_COMPILER_VERSION_FILE \ > + WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_FREEBSD_VERSION_FILE \ > + CC COMPILER_TYPE COMPILER_FEATURES COMPILER_VERSION \ > + COMPILER_FREEBSD_VERSION \ > + XCC X_COMPILER_TYPE X_COMPILER_FEATURES X_COMPILER_VERSION \ > + X_COMPILER_FREEBSD_VERSION > +TEST_SYSTEM_LINKER_VARS= \ > + USING_SYSTEM_LINKER MK_SYSTEM_LINKER \ > + MK_LLD_BOOTSTRAP \ > + WANT_LINKER_TYPE WANT_LINKER_VERSION WANT_LINKER_VERSION_FILE \ > + WANT_LINKER_FREEBSD_VERSION WANT_LINKER_FREEBSD_VERSION_FILE \ > + LD LINKER_TYPE LINKER_FEATURES LINKER_VERSION \ > + LINKER_FREEBSD_VERSION \ > + XLD X_LINKER_TYPE X_LINKER_FEATURES X_LINKER_VERSION \ > + X_LINKER_FREEBSD_VERSION > + > +.for _t in compiler linker > +test-system-${_t}: .PHONY > +.for v in ${TEST_SYSTEM_${_t:tu}_VARS} > + ${_+_}@printf "%-35s= %s\n" "${v}" "${${v}}" > +.endfor > +.endfor > +.if (make(buildworld) || make(buildkernel) || make(kernel-toolchain) || \ > + make(toolchain) || make(_cross-tools)) > +.if ${USING_SYSTEM_COMPILER} == "yes" > +.info SYSTEM_COMPILER: Determined that CC=${CC} matches the source tree. Not > bootstrapping a cross-compiler. +.elif ${MK_CLANG_BOOTSTRAP} == "yes" > +.info SYSTEM_COMPILER: libclang will be built for bootstrapping a cross-compiler. > +.endif > +.if ${USING_SYSTEM_LINKER} == "yes" > +.info SYSTEM_LINKER: Determined that LD=${LD} matches the source tree. Not bootstrapping > a cross-linker. +.elif ${MK_LLD_BOOTSTRAP} == "yes" > +.info SYSTEM_LINKER: libclang will be built for bootstrapping a cross-linker. > +.endif > +.endif > + > +# End WITH_SYSTEM_COMPILER / WITH_SYSTEM_LD > + > +# Store some compiler metadata for use in installworld where we don't > +# want to invoke CC at all. > +_TOOLCHAIN_METADATA_VARS= COMPILER_VERSION \ > + COMPILER_TYPE \ > + COMPILER_FEATURES \ > + COMPILER_FREEBSD_VERSION \ > + COMPILER_RESOURCE_DIR \ > + LINKER_VERSION \ > + LINKER_FEATURES \ > + LINKER_TYPE \ > + LINKER_FREEBSD_VERSION > +toolchain-metadata.mk: .PHONY .META > + @: > ${.TARGET} > + @echo ".info Using cached toolchain metadata from build at $$(hostname) on > $$(date)" \ > + > ${.TARGET} > + @echo "_LOADED_TOOLCHAIN_METADATA=t" >> ${.TARGET} > +.for v in ${_TOOLCHAIN_METADATA_VARS} > + @echo "${v}=${${v}}" >> ${.TARGET} > + @echo "X_${v}=${X_${v}}" >> ${.TARGET} > +.endfor > + @echo ".export ${_TOOLCHAIN_METADATA_VARS}" >> ${.TARGET} > + @echo ".export ${_TOOLCHAIN_METADATA_VARS:C,^,X_,}" >> ${.TARGET} > + > + > +# We must do lib/ and libexec/ before bin/ in case of a mid-install error to > +# keep the users system reasonably usable. For static->dynamic root upgrades, > +# we don't want to install a dynamic binary without rtld and the needed > +# libraries. More commonly, for dynamic root, we don't want to install a > +# binary that requires a newer library version that hasn't been installed yet. > +# This ordering is not a guarantee though. The only guarantee of a working > +# system here would require fine-grained ordering of all components based > +# on their dependencies. > +.if !empty(SUBDIR_OVERRIDE) > +SUBDIR= ${SUBDIR_OVERRIDE} > +.else > +SUBDIR= lib libexec > +# Add LOCAL_LIB_DIRS, but only if they will not be picked up as a SUBDIR > +# of a LOCAL_DIRS directory. This allows LOCAL_DIRS=foo and > +# LOCAL_LIB_DIRS=foo/lib to behave as expected. > +.for _DIR in ${LOCAL_DIRS:M*/} ${LOCAL_DIRS:N*/:S|$|/|} > +_REDUNDANT_LIB_DIRS+= ${LOCAL_LIB_DIRS:M${_DIR}*} > +.endfor > +.for _DIR in ${LOCAL_LIB_DIRS} > +.if ${_DIR} == ".WAIT" || (empty(_REDUNDANT_LIB_DIRS:M${_DIR}) && > exists(${.CURDIR}/${_DIR}/Makefile)) +SUBDIR+= ${_DIR} > +.endif > +.endfor > +.if !defined(NO_ROOT) && (make(installworld) || make(install)) > +# Ensure libraries are installed before progressing. > +SUBDIR+=.WAIT > +.endif > +SUBDIR+=bin > +.if ${MK_CDDL} != "no" > +SUBDIR+=cddl > +.endif > +SUBDIR+=gnu include > +.if ${MK_KERBEROS} != "no" > +SUBDIR+=kerberos5 > +.endif > +.if ${MK_RESCUE} != "no" > +SUBDIR+=rescue > +.endif > +SUBDIR+=sbin > +.if ${MK_CRYPT} != "no" > +SUBDIR+=secure > +.endif > +.if !defined(NO_SHARE) > +SUBDIR+=share > +.endif > +.if ${MK_BOOT} != "no" > +SUBDIR+=stand > +.endif > +SUBDIR+=sys usr.bin usr.sbin > +.if ${MK_TESTS} != "no" > +SUBDIR+= tests > +.endif > + > +# Local directories are built in parallel with the base system directories. > +# Users may insert a .WAIT directive at the beginning or elsewhere within > +# the LOCAL_DIRS and LOCAL_LIB_DIRS lists as needed. > +.for _DIR in ${LOCAL_DIRS} > +.if ${_DIR} == ".WAIT" || exists(${.CURDIR}/${_DIR}/Makefile) > +SUBDIR+= ${_DIR} > +.endif > +.endfor > + > +# We must do etc/ last as it hooks into building the man whatis file > +# by calling 'makedb' in share/man. This is only relevant for > +# install/distribute so they build the whatis file after every manpage is > +# installed. > +.if make(installworld) || make(install) > +SUBDIR+=.WAIT > +.endif > +SUBDIR+=etc > + > +.endif # !empty(SUBDIR_OVERRIDE) > + > +.if defined(NOCLEAN) > +.warning The src.conf WITHOUT_CLEAN option can now be used instead of NOCLEAN. > +MK_CLEAN:= no > +.endif > +.if defined(NO_CLEAN) > +.info The src.conf WITHOUT_CLEAN option can now be used instead of NO_CLEAN. > +MK_CLEAN:= no > +.endif > +.if defined(NO_CLEANDIR) > +CLEANDIR= clean cleandepend > +.else > +CLEANDIR= cleandir > +.endif > + > +.if defined(WORLDFAST) > +MK_CLEAN:= no > +NO_OBJWALK= t > +.endif > + > +.if ${MK_META_MODE} == "yes" > +# If filemon is used then we can rely on the build being incremental-safe. > +# The .meta files will also track the build command and rebuild should > +# it change. > +.if empty(.MAKE.MODE:Mnofilemon) > +MK_CLEAN:= no > +.endif > +.endif > +.if defined(NO_OBJWALK) || ${MK_AUTO_OBJ} == "yes" > +NO_OBJWALK= t > +NO_KERNELOBJ= t > +.endif > +.if !defined(NO_OBJWALK) > +_obj= obj > +.endif > + > +LOCAL_TOOL_DIRS?= > +PACKAGEDIR?= ${DESTDIR}/${DISTDIR} > + > +.if empty(SHELL:M*csh*) > +BUILDENV_SHELL?=${SHELL} > +.else > +BUILDENV_SHELL?=/bin/sh > +.endif > + > +.if !defined(_MKSHOWCONFIG) > +.if !defined(VCS_REVISION) || empty(VCS_REVISION) > +.if !defined(SVNVERSION_CMD) || empty(SVNVERSION_CMD) > +. for _D in ${PATH:S,:, ,g} > +. if exists(${_D}/svnversion) > +SVNVERSION_CMD?=${_D}/svnversion > +. endif > +. if exists(${_D}/svnliteversion) > +SVNVERSION_CMD?=${_D}/svnliteversion > +. endif > +. endfor > +.endif > +.if defined(SVNVERSION_CMD) && !empty(SVNVERSION_CMD) > +_VCS_REVISION?= $$(eval ${SVNVERSION_CMD} ${SRCDIR}) > +. if !empty(_VCS_REVISION) > +VCS_REVISION= $$(echo r${_VCS_REVISION}) > +.export VCS_REVISION > +. endif > +.endif > +.endif > + > +.if !defined(GIT_CMD) || empty(GIT_CMD) > +. for _P in /usr/bin /usr/local/bin > +. if exists(${_P}/git) > +GIT_CMD= ${_P}/git > +. endif > +. endfor > +.export GIT_CMD > +.endif > + > +.if !defined(OSRELDATE) > +.if exists(/usr/include/osreldate.h) > +OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ > + /usr/include/osreldate.h > +.else > +OSRELDATE= 0 > +.endif > +.export OSRELDATE > +.endif > + > +# Set VERSION for CTFMERGE to use via the default CTFFLAGS=-L VERSION. > +.for _V in BRANCH REVISION TYPE > +.if !defined(_${_V}) > +_${_V}!= eval $$(awk '/^${_V}=/{print}' ${SRCTOP}/sys/conf/newvers.sh); echo $$${_V} > +.export _${_V} > +.endif > +.endfor > +.if !defined(SRCRELDATE) > +SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ > + ${SRCDIR}/sys/sys/param.h > +.export SRCRELDATE > +.endif > +.if !defined(VERSION) > +VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE} > +.export VERSION > +.endif > +MAJOR_REVISION= ${_REVISION:R} > + > +.if !defined(PKG_VERSION) > +_STRTIMENOW= %Y%m%d%H%M%S > +_TIMENOW= ${_STRTIMENOW:gmtime} > +.if ${_BRANCH:MCURRENT*} || ${_BRANCH:MSTABLE*} || ${_BRANCH:MPRERELEASE*} > +EXTRA_REVISION= .snap${_TIMENOW} > +.elif ${_BRANCH:MALPHA*} > +EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/}.${_TIMENOW} > +.elif ${_BRANCH:MBETA*} > +EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/}.${_TIMENOW} > +.elif ${_BRANCH:MRC*} > +EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/}.${_TIMENOW} > +.elif ${_BRANCH:M*-p*} > +EXTRA_REVISION= p${_BRANCH:C/.*-p([0-9]+$)/\1/} > +.endif > +PKG_VERSION:= ${MAJOR_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} > +.endif > +.endif # !defined(PKG_VERSION) > + > +.if !defined(PKG_TIMESTAMP) > +TIMEEPOCHNOW= %s > +SOURCE_DATE_EPOCH= ${TIMEEPOCHNOW:gmtime} > +.else > +SOURCE_DATE_EPOCH= ${PKG_TIMESTAMP} > +.endif > + > +PKG_NAME_PREFIX?= FreeBSD > +PKG_MAINTAINER?= re@FreeBSD.org > +PKG_WWW?= https://www.FreeBSD.org > +.export PKG_NAME_PREFIX > +.export PKG_MAINTAINER > +.export PKG_WWW > + > +.if !defined(_MKSHOWCONFIG) > +_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} -f /dev/null \ > + -m ${.CURDIR}/share/mk MK_AUTO_OBJ=no -V CPUTYPE > +.if ${_CPUTYPE} != ${_TARGET_CPUTYPE} > +.error CPUTYPE global should be set with ?=. > +.endif > +.endif > +.if make(buildworld) > +BUILD_ARCH!= uname -p > +# On some Linux systems uname -p returns "unknown" so skip this check there. > +# This check only exists to tell people to use TARGET_ARCH instead of > +# MACHINE_ARCH so skipping it when crossbuilding on non-FreeBSD should be fine. > +.if ${MACHINE_ARCH} != ${BUILD_ARCH} && ${.MAKE.OS} == "FreeBSD" > +.error To cross-build, set TARGET_ARCH. > +.endif > +.endif > +WORLDTMP?= ${OBJTOP}/tmp > +BPATH= > ${CCACHE_WRAPPER_PATH_PFX}${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin:${WORLDTMP}/legacy/usr/libexec > +XPATH= ${WORLDTMP}/bin:${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin + > +# When building we want to find the cross tools before the host tools in ${BPATH}. > +# We also need to add UNIVERSE_TOOLCHAIN_PATH so that we can find the shared > +# toolchain files (clang, lld, etc.) during make universe/tinderbox > +STRICTTMPPATH= ${XPATH}:${BPATH}:${UNIVERSE_TOOLCHAIN_PATH} > +# We should not be using tools from /usr/bin accidentally since this could cause > +# the build to break on other systems that don't have that tool. For now we > +# still allow using the old behaviour (inheriting $PATH) if > +# BUILD_WITH_STRICT_TMPPATH is set to 0 but this will eventually be removed. > + > +# Currently strict $PATH can cause build failures. Once the remaining issues > +# have been resolved it will be turned on by default. > +BUILD_WITH_STRICT_TMPPATH?=0 > +.if defined(CROSSBUILD_HOST) > +# When building on non-FreeBSD we can't rely on the tools in /usr/bin being compatible > +# with what FreeBSD expects. Therefore we only use tools from STRICTTMPPATH > +# during the world build stage. We build most tools during the bootstrap-tools > +# phase but symlink host tools that are known to work instead of building them > +BUILD_WITH_STRICT_TMPPATH:=1 > +.endif > +.if ${BUILD_WITH_STRICT_TMPPATH} != 0 > +TMPPATH= ${STRICTTMPPATH} > +.else > +TMPPATH= ${STRICTTMPPATH}:${PATH} > +.endif > + > +# > +# Avoid running mktemp(1) unless actually needed. > +# It may not be functional, e.g., due to new ABI > +# when in the middle of installing over this system. > +# > +.if make(distributeworld) || make(installworld) || make(stageworld) > +.if ${BUILD_WITH_STRICT_TMPPATH} != 0 > +MKTEMP=${WORLDTMP}/legacy/usr/bin/mktemp > +.if !exists(${MKTEMP}) > +.error mktemp binary doesn't exist in expected location: ${MKTEMP} > +.endif > +.else > +MKTEMP=mktemp > +.endif > +INSTALLTMP!= ${MKTEMP} -d -u -t install > + > +.if ${.MAKE.OS} == "FreeBSD" > +# When building on FreeBSD we always copy the host tools instead of linking > +# into INSTALLTMP to avoid issues with incompatible libraries (see r364030). > +# Note: we could create links if we don't intend to update the current machine. > +INSTALLTMP_COPY_HOST_TOOL=cp > +.else > +# However, this is not necessary on Linux/macOS. Additionally, copying the host > +# tools to another directory with cp results in AMFI Launch Constraint > +# Violations on macOS Ventura as part of its System Integrity Protection. > +INSTALLTMP_COPY_HOST_TOOL=ln -s > +.endif > +.endif > + > +.if make(stagekernel) || make(distributekernel) > +TAGS+= kernel > +PACKAGE= kernel > +.endif > + > +# > +# Building a world goes through the following stages > +# > +# 1. legacy stage [BMAKE] > +# This stage is responsible for creating compatibility > +# shims that are needed by the bootstrap-tools, > +# build-tools and cross-tools stages. These are generally > +# APIs that tools from one of those three stages need to > +# build that aren't present on the host. > +# 1. bootstrap-tools stage [BMAKE] > +# This stage is responsible for creating programs that > +# are needed for backward compatibility reasons. They > +# are not built as cross-tools. > +# 2. build-tools stage [TMAKE] > +# This stage is responsible for creating the object > +# tree and building any tools that are needed during > +# the build process. Some programs are listed during > +# this phase because they build binaries to generate > +# files needed to build these programs. This stage also > +# builds the 'build-tools' target rather than 'all'. > +# 3. cross-tools stage [XMAKE] > +# This stage is responsible for creating any tools that > +# are needed for building the system. A cross-compiler is one > +# of them. This differs from build tools in two ways: > +# 1. the 'all' target is built rather than 'build-tools' > +# 2. these tools are installed into TMPPATH for stage 4. > +# 4. world stage [WMAKE] > +# This stage actually builds the world. > +# 5. install stage (optional) [IMAKE] > +# This stage installs a previously built world. > +# > + > +BOOTSTRAPPING?= 0 > +# Keep these in sync > +MINIMUM_SUPPORTED_OSREL?= 1104001 > +MINIMUM_SUPPORTED_REL?= 11.4 > + > +# Common environment for world related stages > +CROSSENV+= \ > + MACHINE_ARCH=${TARGET_ARCH} \ > + MACHINE=${TARGET} \ > + CPUTYPE=${TARGET_CPUTYPE} > +.if ${MK_META_MODE} != "no" > +# Don't rebuild build-tools targets during normal build. > +CROSSENV+= BUILD_TOOLS_META=.NOMETA > +.endif > +.if defined(TARGET_CFLAGS) > +CROSSENV+= ${TARGET_CFLAGS} > +.endif > +.if (${TARGET} != ${MACHINE} && !defined(WITH_LOCAL_MODULES)) || \ > + defined(WITHOUT_LOCAL_MODULES) > +CROSSENV+= LOCAL_MODULES= > +.endif > + > +BOOTSTRAPPING_OSRELDATE?=${OSRELDATE} > + > +# bootstrap-tools stage > +BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ > + TOOLS_PREFIX=${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \ > + PATH=${BPATH:Q}:${PATH:Q} \ > + WORLDTMP=${WORLDTMP} \ > + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" > +# need to keep this in sync with targets/pseudo/bootstrap-tools/Makefile > +BSARGS= DESTDIR= \ > + OBJTOP='${WORLDTMP}/obj-tools' \ > + OBJROOT='$${OBJTOP}/' \ > + UNIVERSE_TOOLCHAIN_PATH=${UNIVERSE_TOOLCHAIN_PATH} \ > + MAKEOBJDIRPREFIX= \ > + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ > + BWPHASE=${.TARGET:C,^_,,} \ > + -DNO_CPU_CFLAGS \ > + -DNO_LINT \ > + -DNO_PIC \ > + -DNO_SHARED \ > + MK_ASAN=no \ > + MK_CTF=no \ > + MK_CLANG_EXTRAS=no \ > + MK_CLANG_FORMAT=no \ > + MK_CLANG_FULL=no \ > + MK_HTML=no \ > + MK_MAN=no \ > + MK_PROFILE=no \ > + MK_RETPOLINE=no \ > + MK_SSP=no \ > + MK_TESTS=no \ > + MK_UBSAN=no \ > + MK_WERROR=no \ > + MK_INCLUDES=yes \ > + MK_MAN_UTILS=yes > + > +BMAKE= \ > + ${TIME_ENV} ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ > + ${BSARGS} > +.if empty(.MAKEOVERRIDES:MMK_LLVM_TARGET_ALL) > +BMAKE+= MK_LLVM_TARGET_ALL=no > +.endif > + > +# build-tools stage > +TMAKE= \ > + ${TIME_ENV} ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ > + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ > + DESTDIR= \ > + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ > + BWPHASE=${.TARGET:C,^_,,} \ > + -DNO_CPU_CFLAGS \ > + -DNO_LINT \ > + MK_ASAN=no \ > + MK_CTF=no \ > + MK_CLANG_EXTRAS=no \ > + MK_CLANG_FORMAT=no \ > + MK_CLANG_FULL=no \ > + MK_LLDB=no \ > + MK_RETPOLINE=no \ > + MK_SSP=no \ > + MK_TESTS=no \ > + MK_UBSAN=no \ > + MK_WERROR=no > + > +# cross-tools stage > +# TOOLS_PREFIX set in BMAKE > +XMAKE= ${BMAKE} \ > + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ > + MK_LLDB=no \ > + MK_LLVM_BINUTILS=no \ > + MK_TESTS=no > + > +# kernel-tools stage > +KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ > + PATH=${BPATH:Q}:${PATH:Q} \ > + WORLDTMP=${WORLDTMP} \ > + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" > + > +KTMAKE= ${TIME_ENV} \ > + TOOLS_PREFIX=${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \ > + ${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ > + DESTDIR= \ > + OBJTOP='${WORLDTMP}/obj-kernel-tools' \ > + OBJROOT='$${OBJTOP}/' \ > + UNIVERSE_TOOLCHAIN_PATH=${UNIVERSE_TOOLCHAIN_PATH} \ > + MAKEOBJDIRPREFIX= \ > + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ > + -DNO_CPU_CFLAGS \ > + -DNO_LINT \ > + -DNO_PIC \ > + -DNO_SHARED \ > + MK_CTF=no \ > + MK_HTML=no \ > + MK_MAN=no \ > + MK_PROFILE=no \ > + MK_SSP=no \ > + MK_RETPOLINE=no \ > + MK_WERROR=no > + > +# world stage > +WMAKEENV= ${CROSSENV} \ > + INSTALL="${INSTALL_CMD} -U" \ > + PATH=${TMPPATH:Q} \ > + SYSROOT=${WORLDTMP} > + > +# make hierarchy > *** 5431 LINES SKIPPED *** > -- O. Hartmann From nobody Sun Aug 27 16:30:23 2023 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 4RYfLV01FYz4rNtG; Sun, 27 Aug 2023 16:30:26 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RYfLT557Dz4Mgg; Sun, 27 Aug 2023 16:30:25 +0000 (UTC) (envelope-from mavbsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb2d.google.com with SMTP id 3f1490d57ef6-d7260fae148so2447807276.1; Sun, 27 Aug 2023 09:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693153825; x=1693758625; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=gzjNbc1Zw8j6/qN1r3FRIdnilMssxcPdK4CkNnE9g9A=; b=iQD2gha/Ccv8yDGxKeFSt8L6PMIkdF2bylP9tHH0cKNjT9zwkdbIGEPbd7Uuaspgg2 FMOUu3hmvDoRCvfi4aGqCT+iZesvRXQanE8rGG/0zRgr+7U1BFBy+2Ry4zhcET4u2N+H oIwllk3kypkE4LmtFdz7wKLV08ihXLgjQRaB4G7q7svFKY8NmLIap8s/32x6dTN3z59Z bb7exGhREmNeMeuXO22eHG9FgioOKVAGRDgn/5hCe4I0C34q+6bYXzQTCmM4ABgYWJyO P4tJuyJ+/I4Knf01on1j9IjDeleL5DcmQjEE8AyX4Dgccn//jE5KFmM8nsaTfO5eBnSd ViFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693153825; x=1693758625; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gzjNbc1Zw8j6/qN1r3FRIdnilMssxcPdK4CkNnE9g9A=; b=jEst6PsFU9I9b+eUmZN2GuwBwGCHfejS4YEJ81ZyDEBXHYPrUD3yKM9NNbyk88DYz+ er74h7JZbl6bojwhOIMrJKI9d2484RP0o18lkIpxR5rX5BEKrQqirRSe2xIF8qq3E4MA 0sN+6HfsIngzpreaqFoSW/MoUxDq4u7crCVj/Cx/W/CPwUeDPIvRnn/nMBb1Ufu1XXF8 HiA0zdbzzOSkwJ40r9nMcEIom5pAbOza9T7UP4NESQPMVmuGmDS+LpxMtnQbcS0/w8B/ llS0kE/hGEUEbTQvBuqL5ZbQY7161qaE5+vY6yY31PMHkzQhf5zycod3rVA8RqjGgCfP lDpA== X-Gm-Message-State: AOJu0YzThyIPfLtFvi/dMz1/aNZdKIID4srcNTPLaQ/N94yBwxHXmN5I cBB4odmO8rIVQWAUVk7fbSy33ck+pTk= X-Google-Smtp-Source: AGHT+IE3Nj3n1SYx/Ce7F27SJdTTld9tBP9O1SK2qd7wVUtWPONtCtjggJHe6V7AtnqXzq30BYPBlw== X-Received: by 2002:a25:d64d:0:b0:d23:1417:115f with SMTP id n74-20020a25d64d000000b00d231417115fmr23581042ybg.10.1693153824813; Sun, 27 Aug 2023 09:30:24 -0700 (PDT) Received: from [192.168.1.66] (104-55-12-234.lightspeed.knvltn.sbcglobal.net. [104.55.12.234]) by smtp.gmail.com with ESMTPSA id b19-20020a25cb13000000b00d20d4ffbbdbsm1333570ybg.0.2023.08.27.09.30.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Aug 2023 09:30:24 -0700 (PDT) Message-ID: <5520d4cf-076c-9a06-7000-9ef608d21470@gmail.com> Date: Sun, 27 Aug 2023 12:30:23 -0400 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad Content-Language: en-US To: FreeBSD User , Martin Matuska Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <20230827075913.36151ef6@thor.intern.walstatt.dynvpn.de> From: Alexander Motin In-Reply-To: <20230827075913.36151ef6@thor.intern.walstatt.dynvpn.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4RYfLT557Dz4Mgg X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] Hi, I've just updated my test system and it happily imported everything. Could you give more details? Does "all pools do not import" means that no pools were imported or that some pools were not imported? Where they imported before reboot and had default cachefile pool property value? Generally on boot ZFS does not import all the pools. Aside of the boot pool ZFS on boot imports only pools that were imported before reboot and used default cachefile, which is /etc/zfs/zpool.cache. Do you see any errors related to import? Anything suspicious can be seen in sysctl kstat.zfs.misc.dbgmsg ? On 27.08.2023 01:58, FreeBSD User wrote: > Am Sun, 27 Aug 2023 05:09:06 GMT > Martin Matuska schrieb: > > After updating my CURRENT with this new ZFS code, on reboot all pools do not import > automatically anymore as it has been before. > > Did I miss something? > > Kind regrads, > > oh > >> The branch main has been updated by mm: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=315ee00fa9616b0a192b6834911f98bcf5316a6b >> >> commit 315ee00fa9616b0a192b6834911f98bcf5316a6b >> Merge: b3a714652ff0 804414aad224 >> Author: Martin Matuska >> AuthorDate: 2023-08-26 21:20:04 +0000 >> Commit: Martin Matuska >> CommitDate: 2023-08-26 21:51:42 +0000 >> >> zfs: merge openzfs/zfs@804414aad >> >> Notable upstream pull request merges: >> #15024 Add missed DMU_PROJECTUSED_OBJECT prefetch >> #15029 Do not request data L1 buffers on scan prefetch >> #15036 FreeBSD: catch up to __FreeBSD_version 1400093 >> #15039 Fix raw receive with different indirect block size >> #15047 FreeBSD: Fix build on stable/13 after 1302506 >> #15049 Fix the ZFS checksum error histograms with larger record sizes >> #15052 Reduce bloat in ereport.fs.zfs.checksum events >> #15056 Avoid extra snprintf() in dsl_deadlist_merge() >> #15061 Ignore pool ashift property during vdev attachment >> #15063 Don't panic if setting vdev properties is unsupported for this vdev type >> #15067 spa_min_alloc should be GCD, not min >> #15071 Add explicit prefetches to bpobj_iterate() >> #15072 Adjust prefetch parameters >> #15076 Refactor dmu_prefetch() >> #15079 set autotrim default to 'off' everywhere >> #15080 ZIL: Fix config lock deadlock >> #15088 metaslab: tuneable to better control force ganging >> #15096 Avoid waiting in dmu_sync_late_arrival() >> #15097 BRT should return EOPNOTSUPP >> #15103 Remove zl_issuer_lock from zil_suspend() >> #15107 Remove fastwrite mechanism >> #15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1 >> #15122 ZIL: Second attempt to reduce scope of zl_issuer_lock >> #15129 zpool_vdev_remove() should handle EALREADY error return >> #15132 ZIL: Replay blocks without next block pointer >> #15148 zfs_clone_range should return descriptive error codes >> #15153 ZIL: Avoid dbuf_read() before dmu_sync() >> #15172 copy_file_range: fix fallback when source create on same txg >> #15180 Update outdated assertion from zio_write_compress >> >> Obtained from: OpenZFS >> OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13 -- Alexander Motin From nobody Mon Aug 28 02:33:59 2023 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 4RYvkz12Z4z4rwCN; Mon, 28 Aug 2023 02:34:03 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RYvky63tCz4Cw8; Mon, 28 Aug 2023 02:34:02 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTP id aJAjqHHK6LAoIaS4nq9o93; Mon, 28 Aug 2023 02:34:01 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPA id aS4lqYxCJyAOeaS4mqLsCj; Mon, 28 Aug 2023 02:34:01 +0000 X-Authority-Analysis: v=2.4 cv=e5oV9Il/ c=1 sm=1 tr=0 ts=64ec0799 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=UttIx32zK-AA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=pGLkceISAAAA:8 a=bXE17IqNP0uhLRuafVwA:9 a=CjuIK1q_8ugA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 6A49C2D95; Sun, 27 Aug 2023 19:33:59 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 55C214A2; Sun, 27 Aug 2023 19:33:59 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Alexander Motin cc: FreeBSD User , Martin Matuska , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad In-reply-to: <5520d4cf-076c-9a06-7000-9ef608d21470@gmail.com> References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <20230827075913.36151ef6@thor.intern.walstatt.dynvpn.de> <5520d4cf-076c-9a06-7000-9ef608d21470@gmail.com> Comments: In-reply-to Alexander Motin message dated "Sun, 27 Aug 2023 12:30:23 -0400." 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 27 Aug 2023 19:33:59 -0700 Message-Id: <20230828023359.55C214A2@slippy.cwsent.com> X-CMAE-Envelope: MS4xfEmLSV+fon+1fh+nrEw2l6LEi20GkkrLcGhEw7IlsKnRDlv97K3TPSqS1XQPJmHqkltn0iqzEI0gMoplL+EtlAvv/8W9psvNNjzF1WAkfRvBEAgDiOaK B6A+HfxPfhIkjZ4ikiL6yNnApa9k6iZ0Yeb/9aQ8bvtCDeOIAV/a3Pw05owccEiXh0mrW8tL6rePG/7CkUi7sOKDT9eKQNHL2gR+i3aH2J60NCEhe0tAybbd zSp5IhM3Gq7o/vh+0wmM5gmtW4oDZBQtZgSMzvoRKa2fkdcb/6FmfbKfaLE1AN9ewuoVejW0gJkLGy3U3utjQ9KvHG8OtifGqHJItv27iGJSPJPVZvWAx3Ek tkHmy3JS0QdnrZqXNGv62ZGrYCIY0qZfayBSZyLzEpigxrXkF2o= X-Rspamd-Queue-Id: 4RYvky63tCz4Cw8 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] And, /etc/rc.d/zpool does the import. Could the O/P's rc script be inconsistent with base FreeBSD? -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 In message <5520d4cf-076c-9a06-7000-9ef608d21470@gmail.com>, Alexander Motin wr ites: > Hi, > > I've just updated my test system and it happily imported everything. > Could you give more details? Does "all pools do not import" means that > no pools were imported or that some pools were not imported? Where they > imported before reboot and had default cachefile pool property value? > Generally on boot ZFS does not import all the pools. Aside of the boot > pool ZFS on boot imports only pools that were imported before reboot and > used default cachefile, which is /etc/zfs/zpool.cache. Do you see any > errors related to import? Anything suspicious can be seen in sysctl > kstat.zfs.misc.dbgmsg ? > > On 27.08.2023 01:58, FreeBSD User wrote: > > Am Sun, 27 Aug 2023 05:09:06 GMT > > Martin Matuska schrieb: > > > > After updating my CURRENT with this new ZFS code, on reboot all pools do no > t import > > automatically anymore as it has been before. > > > > Did I miss something? > > > > Kind regrads, > > > > oh > > > >> The branch main has been updated by mm: > >> > >> URL: https://cgit.FreeBSD.org/src/commit/?id=315ee00fa9616b0a192b6834911f9 > 8bcf5316a6b > >> > >> commit 315ee00fa9616b0a192b6834911f98bcf5316a6b > >> Merge: b3a714652ff0 804414aad224 > >> Author: Martin Matuska > >> AuthorDate: 2023-08-26 21:20:04 +0000 > >> Commit: Martin Matuska > >> CommitDate: 2023-08-26 21:51:42 +0000 > >> > >> zfs: merge openzfs/zfs@804414aad > >> > >> Notable upstream pull request merges: > >> #15024 Add missed DMU_PROJECTUSED_OBJECT prefetch > >> #15029 Do not request data L1 buffers on scan prefetch > >> #15036 FreeBSD: catch up to __FreeBSD_version 1400093 > >> #15039 Fix raw receive with different indirect block size > >> #15047 FreeBSD: Fix build on stable/13 after 1302506 > >> #15049 Fix the ZFS checksum error histograms with larger record siz > es > >> #15052 Reduce bloat in ereport.fs.zfs.checksum events > >> #15056 Avoid extra snprintf() in dsl_deadlist_merge() > >> #15061 Ignore pool ashift property during vdev attachment > >> #15063 Don't panic if setting vdev properties is unsupported for th > is vdev type > >> #15067 spa_min_alloc should be GCD, not min > >> #15071 Add explicit prefetches to bpobj_iterate() > >> #15072 Adjust prefetch parameters > >> #15076 Refactor dmu_prefetch() > >> #15079 set autotrim default to 'off' everywhere > >> #15080 ZIL: Fix config lock deadlock > >> #15088 metaslab: tuneable to better control force ganging > >> #15096 Avoid waiting in dmu_sync_late_arrival() > >> #15097 BRT should return EOPNOTSUPP > >> #15103 Remove zl_issuer_lock from zil_suspend() > >> #15107 Remove fastwrite mechanism > >> #15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUS > R1 > >> #15122 ZIL: Second attempt to reduce scope of zl_issuer_lock > >> #15129 zpool_vdev_remove() should handle EALREADY error return > >> #15132 ZIL: Replay blocks without next block pointer > >> #15148 zfs_clone_range should return descriptive error codes > >> #15153 ZIL: Avoid dbuf_read() before dmu_sync() > >> #15172 copy_file_range: fix fallback when source create on same txg > >> #15180 Update outdated assertion from zio_write_compress > >> > >> Obtained from: OpenZFS > >> OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13 > > -- > Alexander Motin > From nobody Mon Aug 28 03:23:14 2023 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 4RYwqp2rWwz4ryYr; Mon, 28 Aug 2023 03:23:18 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RYwqp0Trbz4JM6; Mon, 28 Aug 2023 03:23:18 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTP id aEqzqAjrM6NwhaSqTqzdY6; Mon, 28 Aug 2023 03:23:17 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPA id aSqRqDlvxHFsOaSqSqDeL4; Mon, 28 Aug 2023 03:23:17 +0000 X-Authority-Analysis: v=2.4 cv=XZqaca15 c=1 sm=1 tr=0 ts=64ec1325 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=UttIx32zK-AA:10 a=pGLkceISAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=DuKYE1eaPsNFi1I-MfAA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id C83C02DE7; Sun, 27 Aug 2023 20:23:14 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id BE584A7; Sun, 27 Aug 2023 20:23:14 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Alexander Motin cc: FreeBSD User , Martin Matuska , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad In-reply-to: <5520d4cf-076c-9a06-7000-9ef608d21470@gmail.com> References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <20230827075913.36151ef6@thor.intern.walstatt.dynvpn.de> <5520d4cf-076c-9a06-7000-9ef608d21470@gmail.com> Comments: In-reply-to Alexander Motin message dated "Sun, 27 Aug 2023 12:30:23 -0400." 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 27 Aug 2023 20:23:14 -0700 Message-Id: <20230828032314.BE584A7@slippy.cwsent.com> X-CMAE-Envelope: MS4xfJBFWe+HQjZxSkpsUhvkOKTKbyrkIsCnlQJXxoQhXsbAGCnX7Ovjl9YBpc88cTe3NduYXZUTIz6J9yBE1kbblhqQBoqU+b7QiD1zy/2v5GsIDTkJnRnX HO0ZDaG4+9B1MvwvstFOwFoY3pDad25EDdiZyWD5EPIdjwGfqPgGUfdwNHgaNuf4ynOSAjLqnyQAwyyv9ZmYtqgpQbQ5rNd0j8wjqVEa5BnkXJmiW9HOq7nO xmmFgFklo2+RRVVAOxwULDnFjCEpV7n/yY+bXD92zx+6XgoUKpr/WigW7ZmlYEod2l5EY+APvZT0dMqAumDDSBxi6oH7u69c/1AMZFTczAMxt/SePjLyA8AP YKyFMbqnHCkiZXQpjjQ+CY8MmxBrwTO6TVRh5+T+aznj8AYm3l4= X-Rspamd-Queue-Id: 4RYwqp0Trbz4JM6 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] In message <5520d4cf-076c-9a06-7000-9ef608d21470@gmail.com>, Alexander Motin wr ites: > Hi, > > I've just updated my test system and it happily imported everything. > Could you give more details? Does "all pools do not import" means that > no pools were imported or that some pools were not imported? Where they > imported before reboot and had default cachefile pool property value? > Generally on boot ZFS does not import all the pools. Aside of the boot > pool ZFS on boot imports only pools that were imported before reboot and > used default cachefile, which is /etc/zfs/zpool.cache. Do you see any > errors related to import? Anything suspicious can be seen in sysctl > kstat.zfs.misc.dbgmsg ? Confirmed. This is a regression for users whose /usr is in a separate filesystem than root (/). If you have a rootfs that includes /usr, you are OK. But, if your /usr is on a different filesystem your computer will fail to boot and will need the following patch: >From 3a79eb11e8912621d5f6200c7fc22466a27807fc Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Sun, 27 Aug 2023 20:02:17 -0700 Subject: [PATCH] librt: Chase 315ee00fa961, fixing boot libzfs uses librt as a dependency. Systems with a separate / and /usr will fail to load the libzfs.so library because librt.so is not available due to the fact that /usr is not mounted yet. Install librt in /lib making it available to libzfs. Fixes: 315ee00fa961 --- lib/librt/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librt/Makefile b/lib/librt/Makefile index 9a54c3ea2812..8b880c41ec44 100644 --- a/lib/librt/Makefile +++ b/lib/librt/Makefile @@ -3,6 +3,7 @@ PACKAGE=clibs LIB=rt +SHLIBDIR=/lib SHLIB_MAJOR= 1 CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR} .ifndef NO_THREAD_STACK_UNWIND -- 2.41.0 This patch should work for you as it did for me. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 > > On 27.08.2023 01:58, FreeBSD User wrote: > > Am Sun, 27 Aug 2023 05:09:06 GMT > > Martin Matuska schrieb: > > > > After updating my CURRENT with this new ZFS code, on reboot all pools do no > t import > > automatically anymore as it has been before. > > > > Did I miss something? > > > > Kind regrads, > > > > oh > > > >> The branch main has been updated by mm: > >> > >> URL: https://cgit.FreeBSD.org/src/commit/?id=315ee00fa9616b0a192b6834911f9 > 8bcf5316a6b > >> > >> commit 315ee00fa9616b0a192b6834911f98bcf5316a6b > >> Merge: b3a714652ff0 804414aad224 > >> Author: Martin Matuska > >> AuthorDate: 2023-08-26 21:20:04 +0000 > >> Commit: Martin Matuska > >> CommitDate: 2023-08-26 21:51:42 +0000 > >> > >> zfs: merge openzfs/zfs@804414aad > >> > >> Notable upstream pull request merges: > >> #15024 Add missed DMU_PROJECTUSED_OBJECT prefetch > >> #15029 Do not request data L1 buffers on scan prefetch > >> #15036 FreeBSD: catch up to __FreeBSD_version 1400093 > >> #15039 Fix raw receive with different indirect block size > >> #15047 FreeBSD: Fix build on stable/13 after 1302506 > >> #15049 Fix the ZFS checksum error histograms with larger record siz > es > >> #15052 Reduce bloat in ereport.fs.zfs.checksum events > >> #15056 Avoid extra snprintf() in dsl_deadlist_merge() > >> #15061 Ignore pool ashift property during vdev attachment > >> #15063 Don't panic if setting vdev properties is unsupported for th > is vdev type > >> #15067 spa_min_alloc should be GCD, not min > >> #15071 Add explicit prefetches to bpobj_iterate() > >> #15072 Adjust prefetch parameters > >> #15076 Refactor dmu_prefetch() > >> #15079 set autotrim default to 'off' everywhere > >> #15080 ZIL: Fix config lock deadlock > >> #15088 metaslab: tuneable to better control force ganging > >> #15096 Avoid waiting in dmu_sync_late_arrival() > >> #15097 BRT should return EOPNOTSUPP > >> #15103 Remove zl_issuer_lock from zil_suspend() > >> #15107 Remove fastwrite mechanism > >> #15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUS > R1 > >> #15122 ZIL: Second attempt to reduce scope of zl_issuer_lock > >> #15129 zpool_vdev_remove() should handle EALREADY error return > >> #15132 ZIL: Replay blocks without next block pointer > >> #15148 zfs_clone_range should return descriptive error codes > >> #15153 ZIL: Avoid dbuf_read() before dmu_sync() > >> #15172 copy_file_range: fix fallback when source create on same txg > >> #15180 Update outdated assertion from zio_write_compress > >> > >> Obtained from: OpenZFS > >> OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13 > > -- > Alexander Motin > From nobody Mon Aug 28 09:17:38 2023 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 4RZ4hg114nz4rLR9; Mon, 28 Aug 2023 09:17:39 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZ4hg0V5Jz3NsT; Mon, 28 Aug 2023 09:17:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693214259; 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=QWfE2tKDjVyDkAyoNl9hvIWyRzQdsrm9Tb0KT5gyGEw=; b=lmPLlekbxdBSvJ3Q7r0i6pFzQ38iazWnl+NA9RmlhZO7Qg6ToTEXU+KwWGHpyu5t6C6F59 O4lDJcgllabP20GdlUmn/uW3YhSFg3c400ArULyrrinVZZGJB5WSh34jyO11aX8XH1lHiU kXkba/gvi4i/uOrDNMZlk48fSRlbNd7WCUtUNVMJPq3sPOLxfHqfVP2pgtr6Dmp9xt89EC bh3DtxFsVGkzETmR6ZYQQXE+fvUQ++Egca8/gpn48fm20Fxr3H/K7a54QNEUj7lvVjGp+K nL+0nFptUoSa/+CW1iKDNXLtIuE0iGHf+Qah80Ui+Cs1WI2ZUcs1TJGhLEYgTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693214259; 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=QWfE2tKDjVyDkAyoNl9hvIWyRzQdsrm9Tb0KT5gyGEw=; b=sF+APpM8Yqmw0wWzYiABBPj9dUuADqnae1aTi/nlaRv0ukCVA366OHiq+vsCUqxcgBREoC wvPoum5DfQLMziW0bvXtEuYPpJIJeCdSLu26j7mQvY0qIQuajagS3Zxbczuc77B+OytLY+ 6kj78G+kG9xDGTXoynwSafbiPk4WjnILjmTLMy8Oxj3dFH5umoImk7TObv5JVh6mo7UuXG 1g990u32uNi5F6U2oy+8RUurAA5lDce/t4iEjPr3u65i0i5BtkQfNatmF9xY5OkM3UAIZl 9JaY0HJWZxD2uQWvAEFfhHdKjj4z8m1j2PTveYr12CWncBbCPKpyE2IDcvoirw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693214259; a=rsa-sha256; cv=none; b=TPYP9m6bVOp9Qy5vftKTYReo3b7mtqkYeNy7aIhqububg87+gqirEm9jm4fcJ9Dek+HMLE VS+fIRYVegRgUhGui8xHP7ENdkEgR8ZITFlHdihRt2EtF2YaQIiZhC39+vqG9yOCx8d5HU MMKgB8NATOm9IGChs6wIksWlHPFbWlVC904AqjkfaPYCXs03E5zZTNbgnUQydlVqCdqHMi dpetYKfOG/ioBtwHGLPg7zE7QLnoHCsHdvSjiD+3J8hv72645jhT4I2ajsZ2jWJW0Dr3Ux /Eus4TQh5nOk56fW9SA5hdtKUO9Y5gpklCo8L21mfXNHurFusEJlH9WMdlFRZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZ4hf6dg7z13K2; Mon, 28 Aug 2023 09:17:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37S9Hcjl049289; Mon, 28 Aug 2023 09:17:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37S9HcuQ049286; Mon, 28 Aug 2023 09:17:38 GMT (envelope-from git) Date: Mon, 28 Aug 2023 09:17:38 GMT Message-Id: <202308280917.37S9HcuQ049286@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wei Hu Subject: git: e4e11c1d07f5 - main - mana: batch ringing RX queue doorbell on receiving packets 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4e11c1d07f5d58ff8cf4e07ac8f61eecbbb5417 Auto-Submitted: auto-generated The branch main has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=e4e11c1d07f5d58ff8cf4e07ac8f61eecbbb5417 commit e4e11c1d07f5d58ff8cf4e07ac8f61eecbbb5417 Author: Wei Hu AuthorDate: 2023-08-28 09:15:16 +0000 Commit: Wei Hu CommitDate: 2023-08-28 09:15:16 +0000 mana: batch ringing RX queue doorbell on receiving packets It's inefficient to ring the doorbell page every time a WQE is posted to the received queue. Excessive MMIO writes result in CPU spending more time waiting on LOCK instructions (atomic operations), resulting in poor scaling performance. Move the code for ringing doorbell page to where after we have posted all WQEs to the receive queue in mana_poll_rx_cq(). In addition, use the correct WQE count for ringing RQ doorbell. The hardware specification specifies that WQE_COUNT should set to 0 for the Receive Queue. Although currently the hardware doesn't enforce the check, in the future releases it may check on this value. Tested by: whu MFC after: 1 week Sponsored by: Microsoft --- sys/dev/mana/gdma_main.c | 2 +- sys/dev/mana/mana_en.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/dev/mana/gdma_main.c b/sys/dev/mana/gdma_main.c index 2de606d54957..a601873876cb 100644 --- a/sys/dev/mana/gdma_main.c +++ b/sys/dev/mana/gdma_main.c @@ -471,7 +471,7 @@ void mana_gd_wq_ring_doorbell(struct gdma_context *gc, struct gdma_queue *queue) { mana_gd_ring_doorbell(gc, queue->gdma_dev->doorbell, queue->type, - queue->id, queue->head * GDMA_WQE_BU_SIZE, 1); + queue->id, queue->head * GDMA_WQE_BU_SIZE, 0); } void diff --git a/sys/dev/mana/mana_en.c b/sys/dev/mana/mana_en.c index 49558cdc97c6..fa49e06e4862 100644 --- a/sys/dev/mana/mana_en.c +++ b/sys/dev/mana/mana_en.c @@ -1524,7 +1524,7 @@ mana_post_pkt_rxq(struct mana_rxq *rxq) recv_buf_oob = &rxq->rx_oobs[curr_index]; - err = mana_gd_post_and_ring(rxq->gdma_rq, &recv_buf_oob->wqe_req, + err = mana_gd_post_work_request(rxq->gdma_rq, &recv_buf_oob->wqe_req, &recv_buf_oob->wqe_inf); if (err) { mana_err(NULL, "WARNING: rxq %u post pkt err %d\n", @@ -1757,6 +1757,13 @@ mana_poll_rx_cq(struct mana_cq *cq) mana_process_rx_cqe(cq->rxq, cq, &comp[i]); } + if (comp_read > 0) { + struct gdma_context *gc = + cq->rxq->gdma_rq->gdma_dev->gdma_context; + + mana_gd_wq_ring_doorbell(gc, cq->rxq->gdma_rq); + } + tcp_lro_flush_all(&cq->rxq->lro); } From nobody Mon Aug 28 10:06:23 2023 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 4RZ5mz5q48z4rMnL; Mon, 28 Aug 2023 10:06:27 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4RZ5my3bWYz3TB1; Mon, 28 Aug 2023 10:06:26 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of dchagin@heemeyer.club has no SPF policy when checking 195.93.173.158) smtp.mailfrom=dchagin@heemeyer.club; dmarc=none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.2/8.16.1) with ESMTP id 37SA6NUC066316; Mon, 28 Aug 2023 13:06:23 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.2/8.16.1/Submit) id 37SA6Njl066315; Mon, 28 Aug 2023 13:06:23 +0300 (MSK) (envelope-from dchagin) Date: Mon, 28 Aug 2023 13:06:23 +0300 From: Dmitry Chagin To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: af93fea71038 - main - timerfd: Move implementation from linux compat to sys/kern Message-ID: References: <202308242029.37OKTmVs091755@gitrepo.freebsd.org> 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202308242029.37OKTmVs091755@gitrepo.freebsd.org> X-Spamd-Result: default: False [-1.76 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.96)[-0.957]; FORGED_SENDER(0.30)[dchagin@freebsd.org,dchagin@heemeyer.club]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FREEFALL_USER(0.00)[dchagin]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[dchagin@freebsd.org,dchagin@heemeyer.club]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Spamd-Bar: - X-Rspamd-Queue-Id: 4RZ5my3bWYz3TB1 On Thu, Aug 24, 2023 at 08:29:48PM +0000, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=af93fea710385b2b11f0cabd377e7ed6f3d97c34 > > commit af93fea710385b2b11f0cabd377e7ed6f3d97c34 > Author: Jake Freeland > AuthorDate: 2023-08-24 04:39:54 +0000 > Commit: Warner Losh > CommitDate: 2023-08-24 20:28:56 +0000 > > timerfd: Move implementation from linux compat to sys/kern > > Move the timerfd impelemntation from linux compat code to sys/kern. Use > it to implement the new system calls for timerfd. Add a hook to kern_tc > to allow timerfd to know when the system time has stepped. Add kqueue > support to timerfd. Adjust a few names to be less Linux centric. > > RelNotes: YES > Reviewed by: markj (on irc), imp, kib (with reservations), jhb (slack) > Differential Revision: https://reviews.freebsd.org/D38459 > --- glibc misc/tst-timerfd test fails now under Linux emulation From nobody Mon Aug 28 11:25:23 2023 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 4RZ7X41292z4rRmd; Mon, 28 Aug 2023 11:25:24 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZ7X40WzQz3Zrv; Mon, 28 Aug 2023 11:25:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693221924; 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=h47qERu0OEIgecRtepS2otfO5Qh4i7ZUacDyJt5e4fo=; b=oY3VGXTYlLYosC9U6YpUSmutR8QYt2OuKN2ZXFyLJPLItEuc5IUoLJe0XcBsM6itoVXf7P 5Lr2XYWmqw83AJW97aRy0bhrp/2sEOdEoUixXVixBIoAOsKQcXHdfm365BYEt1Q5Ou6O1R E84JhYWelS8JtDxh4enUDQV5D+Vx3+qUuja1iapGHgVmnWCI5wTxksDddQJx0mbIbmcOYW M7/i5rGz2OWfqqJEiwePLpFxkJMHPOmXH5YKXvMAPnEJXdzVjKr27qxF+Ee9zmcQaxs0Ax 5ommINPGqURmwBXvqm+P1RxJ/SB4eTjtUiFKbdGWrXKYS6p/2R1LxSF4bkDM9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693221924; 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=h47qERu0OEIgecRtepS2otfO5Qh4i7ZUacDyJt5e4fo=; b=EgIZiFfsTcIvbq88pLuSzbPe9lPwOHo4mrJ4CD0bvHm+u4HlRTbfHMFmKfk2ocZgzuOITK 9OQGGmtx7kOpFNGqHuVOuwK7s7uosf0aY0U31FikMeHPHwGqJpSeK4f6rNNQPSz3vo8UCf OCBg7HCOxwe3sptb1YCJm6FKAko6HymJZ8N7sU8nh9pXdo//QVRj+jCuwf/z9ZGaW9ynZY A6ITRVh68+spPJ+paCRtdTfeF+nrdtO1uiJ7CAPQkTk5ZsJ8ZRwqH31fRkEcUjLUisC372 9IcRboFDEGCIJzvTMxMaSIGiy2JPvDMdPDf99gcaxy1U1mAs6GPC/+J+U4QT+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693221924; a=rsa-sha256; cv=none; b=ZBpouunPKj5yTOO9ToTq2fO0Wzudo2cl2NqA8bSBj87ue3bc7XDz6wDNnWxBPmp5NB0fYn 5+CG3PwQ8+R2dPPIjw6sQ4KyzpIHrodexW9RsmZvGVLE53IMODDerLPcYadhez5ccIDGa8 dIm5JhxcSH99qKgC9ENZZhSQpdm/nA4ImnT1405ru0acexAvnUVu/KuyyE0rKFqc0tu3r1 QbUd0sG/Fcpqmn9CoKh1iHuSuORcDjTKu1o+2fbSuu0TJXlmvJxLtO+N47hxf0eLUrMiZH 467Glk366mBD0sqC4FUiD8V408xhFJX0aiv76uUaz8fvO0jKmOYoJ4BrR8Byyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZ7X36hxKz16QT; Mon, 28 Aug 2023 11:25:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SBPNkM064066; Mon, 28 Aug 2023 11:25:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SBPNjq064063; Mon, 28 Aug 2023 11:25:23 GMT (envelope-from git) Date: Mon, 28 Aug 2023 11:25:23 GMT Message-Id: <202308281125.37SBPNjq064063@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pietro Cerutti Subject: git: d4b3aefdf94f - main - netcat: add --crlf to convert LF into CRLF 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gahr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d4b3aefdf94fe401f6bfc93a33b69e21dd7a634a Auto-Submitted: auto-generated The branch main has been updated by gahr: URL: https://cgit.FreeBSD.org/src/commit/?id=d4b3aefdf94fe401f6bfc93a33b69e21dd7a634a commit d4b3aefdf94fe401f6bfc93a33b69e21dd7a634a Author: Pietro Cerutti AuthorDate: 2023-08-17 11:42:23 +0000 Commit: Pietro Cerutti CommitDate: 2023-08-28 10:58:17 +0000 netcat: add --crlf to convert LF into CRLF This adds the --crlf option to netcat, which triggers translation of \n characters into \r\n sequences in the input -> network direction. The Linux version of nc also supports this functionality with --crlf and -C. The OpenBSD version uses -C to specify client certificates. Our version is too old and doesn't have it, but I avoided adding -C anyway to ease future syncs with upstream. Attempts to upstream the feature were unsuccessful: https://marc.info/?t=169282068500001 Differential Revision: https://reviews.freebsd.org/D41489 --- contrib/netcat/nc.1 | 3 +++ contrib/netcat/netcat.c | 50 ++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/contrib/netcat/nc.1 b/contrib/netcat/nc.1 index 9f8696135f35..2e34cdc586c3 100644 --- a/contrib/netcat/nc.1 +++ b/contrib/netcat/nc.1 @@ -42,6 +42,7 @@ .Op Fl i Ar interval .Op Fl -no-tcpopt .Op Fl -sctp +.Op Fl -crlf .Op Fl O Ar length .Op Fl P Ar proxy_username .Op Fl p Ar source_port @@ -104,6 +105,8 @@ to use IPv4 addresses only. Forces .Nm to use IPv6 addresses only. +.It Fl -crlf +Convert LF into CRLF when sending data over the network. .It Fl D Enable debugging on the socket. .It Fl d diff --git a/contrib/netcat/netcat.c b/contrib/netcat/netcat.c index 65266b99c28e..279489a45e92 100644 --- a/contrib/netcat/netcat.c +++ b/contrib/netcat/netcat.c @@ -94,6 +94,7 @@ int Nflag; /* shutdown() network socket */ int nflag; /* Don't do name look up */ int FreeBSD_Oflag; /* Do not use TCP options */ int FreeBSD_sctp; /* Use SCTP */ +int FreeBSD_crlf; /* Convert LF to CRLF */ char *Pflag; /* Proxy username */ char *pflag; /* Localport flag */ int rflag; /* Random ports flag */ @@ -136,7 +137,8 @@ void set_common_sockopts(int, int); int map_tos(char *, int *); void report_connect(const struct sockaddr *, socklen_t); void usage(int); -ssize_t drainbuf(int, unsigned char *, size_t *); +ssize_t write_wrapper(int, const void *, size_t); +ssize_t drainbuf(int, unsigned char *, size_t *, int); ssize_t fillbuf(int, unsigned char *, size_t *); #ifdef IPSEC @@ -165,6 +167,7 @@ main(int argc, char *argv[]) struct addrinfo proxyhints; char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE]; struct option longopts[] = { + { "crlf", no_argument, &FreeBSD_crlf, 1 }, { "no-tcpopt", no_argument, &FreeBSD_Oflag, 1 }, { "sctp", no_argument, &FreeBSD_sctp, 1 }, { "tun", required_argument, NULL, FREEBSD_TUN }, @@ -972,7 +975,7 @@ readwrite(int net_fd) /* try to write to network */ if (pfd[POLL_NETOUT].revents & POLLOUT && stdinbufpos > 0) { ret = drainbuf(pfd[POLL_NETOUT].fd, stdinbuf, - &stdinbufpos); + &stdinbufpos, FreeBSD_crlf); if (ret == -1) pfd[POLL_NETOUT].fd = -1; /* buffer empty - remove self from polling */ @@ -1007,7 +1010,7 @@ readwrite(int net_fd) /* try to write to stdout */ if (pfd[POLL_STDOUT].revents & POLLOUT && netinbufpos > 0) { ret = drainbuf(pfd[POLL_STDOUT].fd, netinbuf, - &netinbufpos); + &netinbufpos, 0); if (ret == -1) pfd[POLL_STDOUT].fd = -1; /* buffer empty - remove self from polling */ @@ -1037,17 +1040,41 @@ readwrite(int net_fd) } ssize_t -drainbuf(int fd, unsigned char *buf, size_t *bufpos) +write_wrapper(int fd, const void *buf, size_t buflen) { - ssize_t n; + ssize_t n = write(fd, buf, buflen); + /* don't treat EAGAIN, EINTR as error */ + return (n == -1 && (errno == EAGAIN || errno == EINTR)) ? -2 : n; +} + +ssize_t +drainbuf(int fd, unsigned char *buf, size_t *bufpos, int crlf) +{ + ssize_t n = *bufpos, n2 = 0; ssize_t adjust; + unsigned char *lf = NULL; + + if (crlf) { + lf = memchr(buf, '\n', *bufpos); + if (lf && (lf == buf || *(lf - 1) != '\r')) + n = lf - buf; + else + lf = NULL; + } + + if (n != 0) { + n = write_wrapper(fd, buf, n); + if (n <= 0) + return n; + } + + if (lf) { + n2 = write_wrapper(fd, "\r\n", 2); + if (n2 <= 0) + return n2; + n += 1; + } - n = write(fd, buf, *bufpos); - /* don't treat EAGAIN, EINTR as error */ - if (n == -1 && (errno == EAGAIN || errno == EINTR)) - n = -2; - if (n <= 0) - return n; /* adjust buffer */ adjust = *bufpos - n; if (adjust > 0) @@ -1440,6 +1467,7 @@ help(void) fprintf(stderr, "\tCommand Summary:\n\ \t-4 Use IPv4\n\ \t-6 Use IPv6\n\ + \t--crlf Convert LF into CRLF when sending data over the network\n\ \t-D Enable the debug socket option\n\ \t-d Detach from stdin\n"); #ifdef IPSEC From nobody Mon Aug 28 12:17:06 2023 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 4RZ8gk4Hrqz4rVFf; Mon, 28 Aug 2023 12:17:06 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (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 "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZ8gk3nXnz3fxd; Mon, 28 Aug 2023 12:17:06 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693225026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SZnESIQF0+l2aDE5jK1mGXyG/HfbbX7GplWn5TH+gEA=; b=Zk6g7ELOSs6g5yunyv9xCi4A8l8VcSuh3DScop/PBD2DGNyldjZDxXeftUuECrUJO8emgX y2tdlIXKqd5ucmlL4FHd5LvbOVCJOkXxxewuYFZJy8aNwsRtg22lmb68slv1+vmpvasA5L gMedil3Bam90hJkSgrBCTZjXyWx7IjEdf3RQNZar4MWqymIcs6cnstC1+4OTUa5wO59xUk 735x/SiXGfOh9KMAWjpe+xOWQQWI7FHvU1CkupRjvt1bx4c03k+WktycIufYdzcHEFwbdl 3F34183jnM1mygv5FaqiWik4Quw7iKgEKWlpPhRerFfCawu3+UyQqzsvjpj7vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693225026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SZnESIQF0+l2aDE5jK1mGXyG/HfbbX7GplWn5TH+gEA=; b=kkFO3CGEU0DmqSQZuTZIu+9F35DxN3ny0X9RZoMGPP92NaTy7jHCOqgdnLqUwhYag+Q5nC J8N9WfqGt3TsQHeW7LFrf0/n/0cFnNALbHmdKM7m0mapXoAeLXyLfx/lnlOJqxnBflK0rG YItHYbdivarmQiQCzqojIf+Hck9SatA9rfI5G6+HVVz/AdsIjJ38VuyCLWrjvyrNrK4OY9 BPL2IBCiHgARK/t9roKIhbG14AQZ487XtGbVnnVauCr9ttSz/GA6ekYivEGk+Ow5/ikTdc dkfsG/0Jfr0tXF1ZUYX9+vkJh/p7Uwl42qEHUa8vMIyGQLHF4bmwnoOiHRB1gQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693225026; a=rsa-sha256; cv=none; b=FY2BfLbwcFCi/Ln1JtLBqB3sgM0d0LK6i7zV9CdfA/mkptsDS0cnGTmwAx/zu6eEHiVz4n j/3Mdrr64130UJWnjgXsQY0GVM3h64s/z4IMHDCHoT/sO0wwG0MlaMru6/PIm6meUzGFLk LE6qsayjRBrzfRgRe+dT26Ows/+a6Gz4QeKjJr5OVCZgQWHZe94besjt5i7Qjjjmt+z+pj ASRJN/5zF2dmD4cf17V8Ju4biDhFFnoD16oUafBbF28X22R22pFkB46XH9xnkEJNFu7mLS tXODF4ttJ9fwpZuv6jbTpMIEgwwdzxQr+nvlpvHWaeNEUNPG1Snm/bjaxQFIag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: by freefall.freebsd.org (Postfix, from userid 1033) id 66BC413720; Mon, 28 Aug 2023 12:17:06 +0000 (UTC) Date: Mon, 28 Aug 2023 12:17:06 +0000 From: Alexey Dokuchaev To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: af93fea71038 - main - timerfd: Move implementation from linux compat to sys/kern Message-ID: References: <202308242029.37OKTmVs091755@gitrepo.freebsd.org> 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202308242029.37OKTmVs091755@gitrepo.freebsd.org> On Thu, Aug 24, 2023 at 08:29:48PM +0000, Warner Losh wrote: > commit af93fea710385b2b11f0cabd377e7ed6f3d97c34 > > timerfd: Move implementation from linux compat to sys/kern > > Move the timerfd impelemntation from linux compat code to sys/kern. Could you quickly summarize why we need these linuxish bits in FreeBSD? We've lived for years without it. Had expected to find the rationale in DR but alas. :( Thanks, ./danfe From nobody Mon Aug 28 13:31:38 2023 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 4RZBKk30M5z4rYhL; Mon, 28 Aug 2023 13:31:38 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZBKk2TTpz4KH2; Mon, 28 Aug 2023 13:31:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693229498; 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=0EILsmz8sn9Q7+i2aGqMimfZ8fESIRWqOh05TBdKgdw=; b=RxpxycyVFpvRt3dSn3TRDokuzzrVSQEaoagihYhLqGWe3tE5HjbtvKEQiFX/kz8dvHrziW Owuv+UQKz2jvBib7Dzphdy/qAy1P7G3rhkIT0k6i1Pow51ELTcNvtb7NYjHx+7SpIqMlTN ZKe2d9FW6RM7tohQkx2iuPoHBkaznTG+FOZw2DE5aNnD/E+phN0EVxIz0bEBKevCxlr4ZL qzIBLevzlG0c43puQSU4lVCQ0chgKyi4a01XatYrwzwjjg+U+3ZuihaFn2SW/IoU4qPoD6 npPrmeiTAkKUgM8w9s4guGYjChBZ/0lZHsLRPtHUZ4EjAjiB/Ohbn1LlqPxPOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693229498; a=rsa-sha256; cv=none; b=r12Cit4G8ewbMTBySfwzsLwQTM1lQ1JZEkRzRHspl6jNjs6RqbVHYPZLq955tt7R/9XEhQ 5vJSZWd9yEwMuSq5nkv+Cd32vKjZ5y6YIP/It8xK1qfSHHkcglcAlg325VJTqCTPQ1jK9b MRx78MCcz34QkZK0CSDS4Y6+3pAn9Aw4DC++MTZOfQBay0EuQ8dw93TkBd3U8Apg3Nu2RA AX/GXXDBU2+CLBZy9Kstik/c5CuhSZ3vcBrIxRYjX5o4F/7BE2siQVZrtUO7DauhoAqzkd QZ6+JBesi3Op8w9cA1sMg/x7Q1ACdvHiwwhjg7mhrXAnqIRnsu/aoPvAIDcFTw== 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=1693229498; 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=0EILsmz8sn9Q7+i2aGqMimfZ8fESIRWqOh05TBdKgdw=; b=Eh0X0PhSzgGnTBrw5IQbEdU6xjfN4ti6Lj/cEa2s6dzvNuT/0zUsnciibUEArJwdtkHdt0 dhnCRXluE6AbkkYGD3UZ6YJta2RDd95IkhAoU1ZXSYQZIp30nFygv7ag+Z4m3vCvcqvTzk j4oeEryeh3JnNCCNdn7d+x4GJ8x/FxnEsgiZssIKH41bGINbrk5WgjkW8GYMCik6HYBKmY 3NmtRMZ1LOV1lPAhMCRIVq+AhY7O36YmSW5tIB07TunJGxc0POHkvfEt6+hQZ3/GmxinB9 G3YddKD3PpdCzqU1nSk7p1ECmXP25yaBgGf29Afkrhu+ORVHgJ8toRMRnWwSNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZBKk1VJZz19Kr; Mon, 28 Aug 2023 13:31:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SDVcDV073644; Mon, 28 Aug 2023 13:31:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SDVcKW073639; Mon, 28 Aug 2023 13:31:38 GMT (envelope-from git) Date: Mon, 28 Aug 2023 13:31:38 GMT Message-Id: <202308281331.37SDVcKW073639@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: f006023b2281 - main - librt: Chase 315ee00fa961, fixing boot 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f006023b2281e179374b56db196d03911fad3680 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=f006023b2281e179374b56db196d03911fad3680 commit f006023b2281e179374b56db196d03911fad3680 Author: Cy Schubert AuthorDate: 2023-08-28 03:02:17 +0000 Commit: Cy Schubert CommitDate: 2023-08-28 13:31:02 +0000 librt: Chase 315ee00fa961, fixing boot libzfs uses librt as a dependency. Following 315ee00fa961 systems with a separate / and /usr will fail to load the libzfs.so library because librt.so is not available due to the fact that /usr is not mounted yet. Install librt in /lib making it available to libzfs. Reported by: emaste, imp Fixes: 315ee00fa961 Differential Revision: https://reviews.freebsd.org/D41612 --- ObsoleteFiles.inc | 3 +++ lib/librt/Makefile | 1 + 2 files changed, 4 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index c2780a84eb6d..b901dd2874c1 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20230828 +MOVED_LIBS+=usr/lib/librt.so.1 + # 20230826: OLD_FILES+=usr/share/man/man9/knlist_remove_inevent.9.gz diff --git a/lib/librt/Makefile b/lib/librt/Makefile index 9a54c3ea2812..8b880c41ec44 100644 --- a/lib/librt/Makefile +++ b/lib/librt/Makefile @@ -3,6 +3,7 @@ PACKAGE=clibs LIB=rt +SHLIBDIR=/lib SHLIB_MAJOR= 1 CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR} .ifndef NO_THREAD_STACK_UNWIND From nobody Mon Aug 28 13:36:57 2023 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 4RZBSX3sCKz4rYtg; Mon, 28 Aug 2023 13:37:32 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from smtp6.goneo.de (smtp6.goneo.de [IPv6:2001:1640:5::8:31]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4RZBSX1b1zz4L7H; Mon, 28 Aug 2023 13:37:32 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Authentication-Results: mx1.freebsd.org; none Received: from hub1.goneo.de (hub1.goneo.de [85.220.129.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp6.goneo.de (Postfix) with ESMTPS id 2695010A330D; Mon, 28 Aug 2023 15:37:29 +0200 (CEST) Received: from hub1.goneo.de (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPS id 44E1E104FD9C; Mon, 28 Aug 2023 15:37:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walstatt-de.de; s=DKIM001; t=1693229846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eonPDeHJ+sWCl1SUvRt6tMBBoI7T64Lnjs49Km8v128=; b=H831gOVgqEJPbr8q6oaG5YUVJr+PrdXUZMaCfAQoS5RdiH6hEwaNW+saXxYXTynnPYOeWL 2yh31MDn1GQk2N3ces7okD2IFjEUk+3dzIoIcDEtBuG6Y+5U9gij8/oceYai70b5dqhQ9E rJdFVqnjrKoFoXHcE7uuREjaqImJWl1t9hQ3KPtCjxbtoT8+HCLUuyuFd0Gqgire9cZb24 Y3nuO7SeiLQ0z+A0xVaCFSAP/9v5g+BhF/t8K5QVZWmQxpSWh1nKYHB7YC9lzMbQvU1HCq 3CjJi3WU88NV32FOWYAeQ+j5Q6HGEUGhGmluwq5Bm/IaiVpeNvAlMGUkS2ayYg== Received: from thor.intern.walstatt.dynvpn.de (dynamic-077-011-080-050.77.11.pool.telefonica.de [77.11.80.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPSA id 744D7105C659; Mon, 28 Aug 2023 15:37:25 +0200 (CEST) Date: Mon, 28 Aug 2023 15:36:57 +0200 From: FreeBSD User To: Cy Schubert Cc: Alexander Motin , Martin Matuska , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad Message-ID: <20230828153724.3babbe59@thor.intern.walstatt.dynvpn.de> In-Reply-To: <20230828032314.BE584A7@slippy.cwsent.com> References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <20230827075913.36151ef6@thor.intern.walstatt.dynvpn.de> <5520d4cf-076c-9a06-7000-9ef608d21470@gmail.com> <20230828032314.BE584A7@slippy.cwsent.com> Organization: walstatt-de.de 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-UID: 59a97d X-Rspamd-UID: 48772a X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:25394, ipnet:2001:1640::/32, country:DE] X-Rspamd-Queue-Id: 4RZBSX1b1zz4L7H Am Sun, 27 Aug 2023 20:23:14 -0700 Cy Schubert schrieb: > In message <5520d4cf-076c-9a06-7000-9ef608d21470@gmail.com>, Alexander > Motin wr > ites: > > Hi, > > > > I've just updated my test system and it happily imported everything. > > Could you give more details? Does "all pools do not import" means that > > no pools were imported or that some pools were not imported? Where they > > imported before reboot and had default cachefile pool property value? > > Generally on boot ZFS does not import all the pools. Aside of the boot > > pool ZFS on boot imports only pools that were imported before reboot and > > used default cachefile, which is /etc/zfs/zpool.cache. Do you see any > > errors related to import? Anything suspicious can be seen in sysctl > > kstat.zfs.misc.dbgmsg ? > > Confirmed. This is a regression for users whose /usr is in a separate > filesystem than root (/). If you have a rootfs that includes /usr, you are > OK. But, if your /usr is on a different filesystem your computer will fail > to boot and will need the following patch: That's it! Thanks for the hint. On all failing systems the base/OS is on an UFS SSD with "/usr" being a dedicated partition. > > From 3a79eb11e8912621d5f6200c7fc22466a27807fc Mon Sep 17 00:00:00 2001 > From: Cy Schubert > Date: Sun, 27 Aug 2023 20:02:17 -0700 > Subject: [PATCH] librt: Chase 315ee00fa961, fixing boot > > libzfs uses librt as a dependency. Systems with a separate / and /usr > will fail to load the libzfs.so library because librt.so is not > available due to the fact that /usr is not mounted yet. Install librt > in /lib making it available to libzfs. > > Fixes: 315ee00fa961 > --- > lib/librt/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/librt/Makefile b/lib/librt/Makefile > index 9a54c3ea2812..8b880c41ec44 100644 > --- a/lib/librt/Makefile > +++ b/lib/librt/Makefile > @@ -3,6 +3,7 @@ > > PACKAGE=clibs > LIB=rt > +SHLIBDIR=/lib > SHLIB_MAJOR= 1 > CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR} > .ifndef NO_THREAD_STACK_UNWIND -- O. Hartmann From nobody Mon Aug 28 14:29:32 2023 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 4RZCcb6Z50z4rc48; Mon, 28 Aug 2023 14:29:35 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZCcb5cdBz4S12; Mon, 28 Aug 2023 14:29:35 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693232975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XOB+QLflC8uVmOLwn8gleJOEodIRAKJHjonOMV7zPjQ=; b=kDV4BenfZzElYszPE+qw4Ciy5SNGmfheNIB7CBBT6ODFkLWjAm2jZcp5ZrRw/bWfVRnHYn 07OIpUrSVbrW+IVOo72N1qc7RJVv1gUpnZvDgA18qNbj2/kEf1qGtaPYxyiuvoHr0l6OLY OUpyva0zmScqt7ii/GuKvM9rYmHt6DI6rwY4IVL3HnPByyjL3HI9PeGdk4xa4OFf2j/0dC YRgrq98ae5ITvsvxk1OOiSb6Fwxjuz0vnlBpgtqNbsKiIrjiUpbTZDzerEOm3VyatxCmD7 bz65BCUHH7EsA0hDFBLYo3fMggmr5UbqYEIopXho3fFFdYu7IR1cDv0hWqx4wg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693232975; a=rsa-sha256; cv=none; b=bMBxH9zeiejByaFoNiooRFvXFG9Jeo3bh8qozvomVS/kR9J7naMcp4p2yhbjFaCJCep4yf hbsFF5mE/z/8GAP1/MyqwUtcARrmTyBr6jI0CeFEciMMHmhl+UKPdP6/0hxEiGiOMRIGVX VrTuUsHDG32xzkT1bYkZ5nLnIptSfR/AYhJytYwS4QjjQ5wpLsJZGeqJpm0Jmemp9+FhAT 3PHmihgGVS2PKWtA/0dwFHVPrBxYev7NFRNNLt3j5mgoDoPExhqEZYSnjqUuoxxOJsz4GQ GPFiyIzkQtaGurerRM1bURRCNWEnzbcagmiXUAv9IniV8s80mE+0ZiVX6S0isA== 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=1693232975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XOB+QLflC8uVmOLwn8gleJOEodIRAKJHjonOMV7zPjQ=; b=H3/TXuuxHFKyXgx/SWMqDQ3ZHxEdEs3xJtWZunC2M5sdU9zcuL5FnS8nzVnHde5T03AAKF CQK7nTBgsHPC5St5sFqLh8LqEypxRvGQTIenGc0/0th7EfES8L0ts0ngUfx412CW3aeO2Q jr0gipabbmH7URfQbYK61Sih0NxaaOL9mRX8FVUTKOLhb7HPbgp80fJX8ovAcsPBbRZ1IR 8nvNh6V9yYnu0Uz2jwmFqf2LqXYI4JIXhkB/UL56ahUNvELoGrgB+n2aU8oupWlgW7xvrR AjA7w9+yqTO1D09b6ZfLAMYVmVvWo7Q2UbW5UngYlUgwmdObJu+VPNfSE2lzSg== Received: from ltc.des.no (ti0187a400-1976.bb.online.no [85.166.95.197]) (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) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RZCcb3XwRz68r; Mon, 28 Aug 2023 14:29:35 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.no (Postfix, from userid 1001) id 567A9108A9; Mon, 28 Aug 2023 16:29:32 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Cy Schubert Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: f006023b2281 - main - librt: Chase 315ee00fa961, fixing boot In-Reply-To: <202308281331.37SDVcKW073639@gitrepo.freebsd.org> (Cy Schubert's message of "Mon, 28 Aug 2023 13:31:38 GMT") References: <202308281331.37SDVcKW073639@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Mon, 28 Aug 2023 16:29:32 +0200 Message-ID: <86o7ir2qb7.fsf@ltc.des.no> 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cy Schubert writes: > --- a/lib/librt/Makefile > +++ b/lib/librt/Makefile > @@ -3,6 +3,7 @@ >=20=20 > PACKAGE=3Dclibs > LIB=3Drt > +SHLIBDIR=3D/lib > SHLIB_MAJOR=3D 1 > CFLAGS+=3D-I${SRCTOP}/lib/libc/include -I${.CURDIR} > .ifndef NO_THREAD_STACK_UNWIND Have we learned nothing from the libdtrace debacle? This breaks the build if WITH_LIB32 is set (which is still the default on amd64, aarch64 and powerpc64). DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Mon Aug 28 15:07:49 2023 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 4RZDSj69jyz4rf2r; Mon, 28 Aug 2023 15:07:49 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZDSj5QrCz4WGQ; Mon, 28 Aug 2023 15:07:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693235269; 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=hechLCFA8tOJPriJQOKDC+N3psFrTf5y8+EmtyaOnTo=; b=iypicSsb0ogsl3NGmPIPJkXO4WpLAzpMeOK9WLJuhDJTUJ2YStP6LXlVF4SJaH2GXq2s7Z bF6ARgiGjtRCUnSFVoW6iWSfU0J7vHB45HM3eEq2r22U0m5JqnA+XTOXoBaQPiGNiQ2ezS 0OggjPatl/M4LAzP9kp4sDLyKdIwYxySBv44IoskWr7ads0Q3C0nlE7C58sI7K4u0jsvlJ eEwlTpssmoUu+mczX+HtuqnXIBWWvGh1HBLAeXgKU3LECWVsPwAFeQTks31up4WHejgemX 7i/ZWteRa0X8c4q0XeC2lbsBxmz7aNsAVokVsT9qVFtkKs2pglVTdjoDk6mGkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693235269; a=rsa-sha256; cv=none; b=PYbPygBshJKffGEJY9VH6F2gre3SuKpnQUg9Xvsy9ZLu0nq4Q9znCq0bg9LcE7lgvgYkH9 K9A0FCFKGTsLMeH37OYZnzVTG01rc+IDehFgGqT3ODfBICRp63YfGphReWhhWVRtRJCzAy NRqY7t5YlUJbLFqplNy453w409WHnI0cd6Ab41WQYFJfKQm0/4DY/JRqsRxi4RbcK0Zgoc UoTxQMgxZY3ei8TKuuL+U57gyADefSIKLaAVTwhc7wrWux0XqLGDA1vUit0JNDCobE2K2h tQMXz7o7DUpYG0lcOJx96xjM2iXd+Wf21xageOTYbdYLJNkCBkNeCPxiOr/KjQ== 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=1693235269; 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=hechLCFA8tOJPriJQOKDC+N3psFrTf5y8+EmtyaOnTo=; b=ah+Bpp7NwWX8zNDu0yUk7SR9Eas0PWppcxCGHeyM81NKHDgwQfiLBXfalNsvLnMH3xma4H lSgtTYWyfQ5j1VgjLhfXWs7U+3s3pqGlPKEsMrK0bhVktRbQ7OsVCWaeH9gJNbBgAc+Ibi qSywjG5xj57fR2zU4sLaqxUq81fWmIgbGqPqPhhFrLPvjwn2nMOag6Gcs1wRo89fjwkMLu LkfKikwFe+aMD+BA49iei/ynDdSINeMqwRmokw3oDh57LSaGyWPBRmsI63LLb7+EhgOHcT 1GMkyEmE09x9FPj9HaPsix+EGEe7Jao5eyLz3pKjXO7V4QBayX7cWjK0NkyIIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZDSj4V2Kz1CbK; Mon, 28 Aug 2023 15:07:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SF7nZZ029029; Mon, 28 Aug 2023 15:07:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SF7nS9029026; Mon, 28 Aug 2023 15:07:49 GMT (envelope-from git) Date: Mon, 28 Aug 2023 15:07:49 GMT Message-Id: <202308281507.37SF7nS9029026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 88d13bf33754 - main - geli: Fix geli setkey -J for detached providers 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 88d13bf33754bd4b0c5df92eef83d6fadb9b4944 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=88d13bf33754bd4b0c5df92eef83d6fadb9b4944 commit 88d13bf33754bd4b0c5df92eef83d6fadb9b4944 Author: Arjan de Vet AuthorDate: 2023-08-28 14:54:18 +0000 Commit: Mark Johnston CommitDate: 2023-08-28 15:03:55 +0000 geli: Fix geli setkey -J for detached providers Clear cached_passphrase before generating a new key, otherwise the operation nonsensically tries to reuse the old passphrase. PR: 254966 Pull Request: https://github.com/freebsd/freebsd-src/pull/780 MFC after: 1 week --- lib/geom/eli/geom_eli.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/geom/eli/geom_eli.c b/lib/geom/eli/geom_eli.c index 6cbb23230fa5..1efb760830c4 100644 --- a/lib/geom/eli/geom_eli.c +++ b/lib/geom/eli/geom_eli.c @@ -1421,6 +1421,12 @@ eli_setkey_detached(struct gctl_req *req, const char *prov, bcopy(mkey, mkeydst, sizeof(mkey)); explicit_bzero(mkey, sizeof(mkey)); + /* + * The previous eli_genkey() set cached_passphrase, we do not want to + * use that for the new passphrase so always prompt for it + */ + explicit_bzero(cached_passphrase, sizeof(cached_passphrase)); + /* Generate key for Master Key encryption. */ if (eli_genkey_single(req, md, key, true) == NULL) { explicit_bzero(key, sizeof(key)); From nobody Mon Aug 28 15:07:50 2023 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 4RZDSl004Pz4rf77; Mon, 28 Aug 2023 15:07:50 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZDSk6gSLz4WGl; Mon, 28 Aug 2023 15:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693235270; 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=x25Yvo+q1j+WbaK/HyJdHtXyIl8oJrky81l2a2NE7kg=; b=URbBdVyT9GHvjLxUzhcPIyepGUzoQAA1iU3AMX7cwA1J+6IvwzL7wQ/IBDvfvjTcyIbL5n h0einiAbOXXi9sywkp0t9GdARXfrz4JpHcU4Vjwj4hDHddf6ICcRQzDLsSESmnPWTcBZho QNV4sY7j96QwNVDz9c5+edI4l7d/MMo9B6ZJp0O6H0Z9UeFky66C9Mn3vo+13FOxMtW/Pj GEwjh7rZ0mNfKY61RFaup38hMOtCclmo91puMQVrDK0YbbuybeidH5MxLCRU+UqH54Olvr 1GnAQNeLitmQrA9EogPBuIrftpV5hcfq4d7sIjyuKt0woAEkqwRhHv568F+azg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693235270; a=rsa-sha256; cv=none; b=HuOQiS75BgHOFRiIvAhAwKihiA4SbubpDdAYtPY9y1vaHkpUoA2MHfP5l6bPnb5m7ssq24 Se3pddxl2b46ziwQvPqfcwmrbY4WIzzSUhS5P+WlPVVxckEaDCOtL6Yj0HdqWxHxXHEryN XmaLh6vsRTz1vQpay+GV948sWerntVejjxaRmPFU7D0pWIL8rnBgOoNQCqBg5/YTWCijKp mhQcQPnU/4cUP+YPtIgcTl5/ya8bRuOPxcgLzPULay9akOQQEezAqDeOKhrP9hY/9dxoqW CruFK/P1TnvlznQXN5f5FxkHO0xdAGJlVCTEMxhK1ayJ7IFrUw+CC3rQ5pdtHw== 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=1693235270; 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=x25Yvo+q1j+WbaK/HyJdHtXyIl8oJrky81l2a2NE7kg=; b=x1JlC9VubyKtcCqh8hivHJ8LC5j8ZgxUT1ctsa9RcaPIG/sK+ZRiDhu/D9VGrJYu09r8Zn VU0YNbdu2GgqhM2Q1FoV12PIzhBIh9oRur11gPqmi1jmyUWTgtwLuLxFUc3RXIHlGBDm3m c9QQh3wOAHimUwCP2RIDLadiJTgwLQKMo5sPNCJmxuGPhod+mOef7V5Qk0+aFzIqFQhzxL Lmt1M8AyDeC6GrbO6V+yY/Eumu80rdRI3rqw08/icxTC6nfWqB8+CkieSHbdqcT3ynjbcl YfBMnDJFX3yOZ55jEYwo/ZSBZTy1OalIm8FiT2gSCrlQfLe71Mag65E5N151JQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZDSk5TG2z1C25; Mon, 28 Aug 2023 15:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SF7oR6029086; Mon, 28 Aug 2023 15:07:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SF7oAY029083; Mon, 28 Aug 2023 15:07:50 GMT (envelope-from git) Date: Mon, 28 Aug 2023 15:07:50 GMT Message-Id: <202308281507.37SF7oAY029083@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 2b7b09ac9675 - main - geli tests: Add a regression test for geli setkey -J 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2b7b09ac9675023869fddbae4911c9b674b1155a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2b7b09ac9675023869fddbae4911c9b674b1155a commit 2b7b09ac9675023869fddbae4911c9b674b1155a Author: Mark Johnston AuthorDate: 2023-08-28 14:58:43 +0000 Commit: Mark Johnston CommitDate: 2023-08-28 15:06:42 +0000 geli tests: Add a regression test for geli setkey -J Make sure that it can be used to change the passphrase of both attached and detached providers. PR: 254966 MFC after: 1 week Sponsored by: The FreeBSD Foundation --- tests/sys/geom/class/eli/setkey_test.sh | 59 +++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/tests/sys/geom/class/eli/setkey_test.sh b/tests/sys/geom/class/eli/setkey_test.sh index c981b6fc266b..ce3833f5fe0c 100644 --- a/tests/sys/geom/class/eli/setkey_test.sh +++ b/tests/sys/geom/class/eli/setkey_test.sh @@ -92,6 +92,64 @@ setkey_cleanup() geli_test_cleanup } +atf_test_case setkey_passphrase cleanup +setkey_passphrase_head() +{ + atf_set "descr" "geli setkey can change the passphrase for a provider" + atf_set "require.user" "root" +} +setkey_passphrase_body() +{ + geli_test_setup + + sectors=100 + md=$(attach_md -t malloc -s `expr $sectors + 1`) + + atf_check dd if=/dev/random of=rnd bs=512 count=${sectors} status=none + hash1=`dd if=rnd bs=512 count=${sectors} status=none | md5` + atf_check_equal 0 $? + atf_check dd if=/dev/random of=pass1 bs=512 count=32 status=none + atf_check dd if=/dev/random of=pass2 bs=512 count=32 status=none + atf_check dd if=/dev/random of=pass3 bs=512 count=32 status=none + + atf_check geli init -B none -J pass1 ${md} + atf_check geli attach -j pass1 ${md} + + atf_check \ + dd if=rnd of=/dev/${md}.eli bs=512 count=${sectors} status=none + hash2=`dd if=/dev/${md}.eli bs=512 count=${sectors} 2>/dev/null | md5` + atf_check_equal 0 $? + + atf_check geli detach ${md} + + # Change from passphrase 1 to passphrase 2 for the detached provider. + atf_check -s exit:0 -o ignore geli setkey -j pass1 -J pass2 ${md} + + # Make sure that we can attach with passphrase 2 but not with + # passphrase 1. + atf_check -s not-exit:0 -e match:"Wrong key" \ + geli attach -j pass1 ${md} + atf_check -s exit:0 geli attach -j pass2 ${md} + hash3=`dd if=/dev/${md}.eli bs=512 count=${sectors} 2>/dev/null | md5` + + # Change from passphrase 2 to passphrase 3 for the attached provider. + atf_check -s exit:0 -o ignore geli setkey -j pass2 -J pass3 ${md} + hash4=`dd if=/dev/${md}.eli bs=512 count=${sectors} 2>/dev/null | md5` + atf_check geli detach ${md} + + # Make sure that we cannot attach with passphrase 2 anymore. + atf_check -s not-exit:0 -e match:"Wrong key" \ + geli attach -j pass2 ${md} + + atf_check_equal ${hash1} ${hash2} + atf_check_equal ${hash1} ${hash3} + atf_check_equal ${hash1} ${hash4} +} +setkey_passphrase_cleanup() +{ + geli_test_cleanup +} + atf_test_case setkey_readonly cleanup setkey_readonly_head() { @@ -157,6 +215,7 @@ nokey_cleanup() atf_init_test_cases() { atf_add_test_case setkey + atf_add_test_case setkey_passphrase atf_add_test_case setkey_readonly atf_add_test_case nokey } From nobody Mon Aug 28 15:11:55 2023 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 4RZDYR2CRsz4rfL7; Mon, 28 Aug 2023 15:11:55 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZDYR1lCgz4Yfs; Mon, 28 Aug 2023 15:11:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693235515; 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=UbUeBTKxlm1wgQaYdbwXvFZ2gk+0XxfYVnIDOgI1PP8=; b=n54Bq43A84Kgp07SOu0sFNYflnR9YfPp73pT76xP04iltk2BcoF0V+Ng1FnZxrVDq0rDh9 drY3AnPxp8F5D33JXzF0++rTYsbBwaYxqTWdvHQV0EbRIYz3k+O3tZ8V80lES6GDd01vZo XERrWtue20TSC66Of33wBe8RxSKptdVRlM9jir3Tae3MyVTmyUPG6Pv+2xtZyhTxFfnJX2 ddNQ8pKaEQdzyZXyOZlNqQY3PKoRwS0Ht2apM43YvbakmS4kzLRNa8lr3Gjlr10DNtVxXZ ozaS5/C1BfiAt70II7STVXARGO1lZ6Ecuk/bE63Fg38oSwyxf3mgrlLfa+XD8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693235515; a=rsa-sha256; cv=none; b=iU5soPLuMto/ybzCAy4OxkLvgc5LBWLLXebghmrO9UlL38T7TsiYTSf3ImuzKfR6c88UuR 85YxeNjeCnaK60KkbBq0K+AZlx96YZyDK2PQG8Tk9fin4QQXOdaPnoYak06TeftLB+Au5n Mboo4AZsJWOBWBgjWCO3+4wa4SEKDNGk5Fznc5juJ/hI/3Z2p6WWAvavNG8mL6YocM9B6x PRB+vHmxVuQMZ+oeO8Efzcw/EYQB3bExZ/WM4TcadTpzcvV58CvTu81SWsOqDgBRzD0YVk zXXsBZodApU7Ps5q6eE8tYlyZaNZl0YEg5SWzW/H0CekIQsAW3s1cacfjd+IGQ== 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=1693235515; 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=UbUeBTKxlm1wgQaYdbwXvFZ2gk+0XxfYVnIDOgI1PP8=; b=fulfh1oACmYDDhvUi8bzF97XjIBRVdIf8/vHRIhBsik3tfzqWbk0L/JDAQzJKxOG5QD2CY GSSgdajBJdNrx9gUB72qnGevhyxAult17MtiMJUHAbOHYJgHsQdfa7VXz7jwoNPfCVGieY FmuQSvKE4wdtouckRBWym2jqCYq1pU0Nw74NaJOJR1auuGllDSOF+MuPCGzoYiGgm3LUVv sxqWki70yNl2PZF5GnDzsOxco8b7mGmDPOhbXILCaA1l8D8wVmzR+SNA8rAhOdpXrLo65x FScyzWk1UX0Ba9ghDIIjMmLW/OjcJ4I5YYq1O06ZhSOeCTtAEkt52AjkNCN9Jg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZDYR0p92z1C2Z; Mon, 28 Aug 2023 15:11:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SFBtft043964; Mon, 28 Aug 2023 15:11:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SFBt5L043961; Mon, 28 Aug 2023 15:11:55 GMT (envelope-from git) Date: Mon, 28 Aug 2023 15:11:55 GMT Message-Id: <202308281511.37SFBt5L043961@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 2964804ef95c - main - librt: unbreak LIB32 build 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2964804ef95cb4fbf315dd1999a844af7786e3aa Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2964804ef95cb4fbf315dd1999a844af7786e3aa commit 2964804ef95cb4fbf315dd1999a844af7786e3aa Author: Dag-Erling Smørgrav AuthorDate: 2023-08-28 15:11:32 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-08-28 15:11:32 +0000 librt: unbreak LIB32 build Fixes: f006023b2281 Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D41616 --- lib/librt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librt/Makefile b/lib/librt/Makefile index 8b880c41ec44..2c8eb1400fb9 100644 --- a/lib/librt/Makefile +++ b/lib/librt/Makefile @@ -3,7 +3,7 @@ PACKAGE=clibs LIB=rt -SHLIBDIR=/lib +SHLIBDIR?=/lib SHLIB_MAJOR= 1 CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR} .ifndef NO_THREAD_STACK_UNWIND From nobody Mon Aug 28 15:38:21 2023 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 4RZF7x1dTCz4rgYS; Mon, 28 Aug 2023 15:38:21 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZF7x1R47z4cFP; Mon, 28 Aug 2023 15:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693237101; 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=TCGH6yLMTkJncRRrJvWl18aFnr03SwbZuaWPo3Nv8h4=; b=EDHSoVt39E7IGdNwHP8sRnoKDu9YT8fwEUX6gSStV9GPZf5n34vcbQli5x7gGWFYHJ1whW Vo1Dyv1o9Vgez68g4v91chmneXz5vH2QRLVO/IM+UgjzRnwQFSqkhX6u+nHol5d5y7OFOH HEW31H7MeHdh0fFwXsQ+wfs24eScl/buXm4XfZouZCuo8f8OAV8i3lih5Q1cBPJSX4R00Z iN7s+6GuvOG2PhJCGERtSvfao5PdfQpTCvArCJ7rNgJ+mAxS+9NwVNDITjy75MDjzawcUl MDo7khooG1FSGv2VssQISr65487mg0ri93c70jBoV3k+N3RfdsrFzQEI1KnzpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693237101; a=rsa-sha256; cv=none; b=VzacO83Jc+HWbGyAuCa5TT7HUQe/7hWXuQ+3rL/EJEkziiku8BzsCxQx7n4+TLvJ/n6Z9u egj1UsbjZ+/B3juD29EwX1ufPaObnMw7vSOAoK1YACkTdPfdyXbyJw3jKjP1QpkLv8cTKe 7ULgbVl1B6V5RbIwOkJyaT5NVN9b2n0Ow/7F/TwQJvA39OeXxPHVWN+PD1qYxpoA6JyfSY XjfENohRUfUWD2Y7TKkeoWsv+qxaD/1iXTFIpABqHFUr5TVOVxSOgkC2Hx1F2tszCKCuTb oew5n20JkxiAkrPb3IxtnZ6PhWH/yzteAug/3gVwu4xqQgCyNuMLT8Z1KvNCew== 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=1693237101; 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=TCGH6yLMTkJncRRrJvWl18aFnr03SwbZuaWPo3Nv8h4=; b=gymocTbSRkdIOe1kFqUs68NlhZOmPIqL18YIC5d0Gkh8syCTJGvZHQtnllEBxJh9Y63Kcb Lu4OA5J6vIMXzmg72y5qxM5q94qv//GgSDaaWRaTp4RN5dSFgpYDuv/nFioTJ+sBsY6Txk i/gOv/fUNcKi5tPHpmNY5cgVvZsNFyouPQzwq6h3fKkG/GSqm1rNrGOGM+ROdEFmarJyq8 vSWToliY6dsiMacINdq3b6/tOQZ0l4ikjukc98DrlOhdoRx/TF0/blmJ66TKX61vbP8OwD fnMtMdQYdn2XlGajZ6WyZ5+Zjtn0xze81EO3GWAzY1MhDYOG6+hBG7hogPfAMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZF7x0W1KzNp; Mon, 28 Aug 2023 15:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SFcLPD077831; Mon, 28 Aug 2023 15:38:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SFcLKk077828; Mon, 28 Aug 2023 15:38:21 GMT (envelope-from git) Date: Mon, 28 Aug 2023 15:38:21 GMT Message-Id: <202308281538.37SFcLKk077828@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: d9dc1603d6e4 - main - libc: Implement N2630. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9dc1603d6e48cca84cad3ebe859129131b8387c Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d9dc1603d6e48cca84cad3ebe859129131b8387c commit d9dc1603d6e48cca84cad3ebe859129131b8387c Author: Dag-Erling Smørgrav AuthorDate: 2023-08-28 15:32:23 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-08-28 15:33:51 +0000 libc: Implement N2630. This adds formatted input/output of binary integer numbers to the printf(), scanf(), and strtol() families, including their wide-character counterparts. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41511 --- lib/libc/iconv/_strtol.h | 7 ++ lib/libc/iconv/_strtoul.h | 7 ++ lib/libc/locale/wcstoimax.c | 7 ++ lib/libc/locale/wcstol.c | 7 ++ lib/libc/locale/wcstoll.c | 7 ++ lib/libc/locale/wcstoul.c | 7 ++ lib/libc/locale/wcstoull.c | 7 ++ lib/libc/locale/wcstoumax.c | 7 ++ lib/libc/stdio/printfcommon.h | 14 +++ lib/libc/stdio/vfprintf.c | 13 ++ lib/libc/stdio/vfscanf.c | 267 +++++++++++++++++++++++------------------- lib/libc/stdio/vfwprintf.c | 13 ++ lib/libc/stdio/vfwscanf.c | 263 +++++++++++++++++++++++------------------ lib/libc/stdlib/strtoimax.c | 7 ++ lib/libc/stdlib/strtol.c | 7 ++ lib/libc/stdlib/strtoll.c | 12 +- lib/libc/stdlib/strtoul.c | 7 ++ lib/libc/stdlib/strtoull.c | 7 ++ lib/libc/stdlib/strtoumax.c | 7 ++ 19 files changed, 436 insertions(+), 237 deletions(-) diff --git a/lib/libc/iconv/_strtol.h b/lib/libc/iconv/_strtol.h index d183edbe8c3a..94a13c56db98 100644 --- a/lib/libc/iconv/_strtol.h +++ b/lib/libc/iconv/_strtol.h @@ -91,6 +91,13 @@ _FUNCNAME(const char *nptr, char **endptr, int base) s += 2; base = 16; } + if ((base == 0 || base == 2) && + c == '0' && (*s == 'b' || *s == 'B') && + (s[1] >= '0' && s[1] <= '1')) { + c = s[1]; + s += 2; + base = 2; + } if (base == 0) base = (c == '0' ? 8 : 10); diff --git a/lib/libc/iconv/_strtoul.h b/lib/libc/iconv/_strtoul.h index eade72e9c2e6..4944e1fb06e0 100644 --- a/lib/libc/iconv/_strtoul.h +++ b/lib/libc/iconv/_strtoul.h @@ -87,6 +87,13 @@ _FUNCNAME(const char *nptr, char **endptr, int base) s += 2; base = 16; } + if ((base == 0 || base == 2) && + c == '0' && (*s == 'b' || *s == 'B') && + (s[1] >= '0' && s[1] <= '1')) { + c = s[1]; + s += 2; + base = 2; + } if (base == 0) base = (c == '0' ? 8 : 10); diff --git a/lib/libc/locale/wcstoimax.c b/lib/libc/locale/wcstoimax.c index 259faa2b011c..5ed949cd0531 100644 --- a/lib/libc/locale/wcstoimax.c +++ b/lib/libc/locale/wcstoimax.c @@ -86,6 +86,13 @@ wcstoimax_l(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, s += 2; base = 16; } + if ((base == 0 || base == 2) && + c == L'0' && (*s == L'b' || *s == L'B') && + (s[1] >= L'0' && s[1] <= L'1')) { + c = s[1]; + s += 2; + base = 2; + } if (base == 0) base = c == L'0' ? 8 : 10; acc = any = 0; diff --git a/lib/libc/locale/wcstol.c b/lib/libc/locale/wcstol.c index b0b787384f39..1678b615ca1c 100644 --- a/lib/libc/locale/wcstol.c +++ b/lib/libc/locale/wcstol.c @@ -80,6 +80,13 @@ wcstol_l(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, int s += 2; base = 16; } + if ((base == 0 || base == 2) && + c == L'0' && (*s == L'b' || *s == L'B') && + (s[1] >= L'0' && s[1] <= L'1')) { + c = s[1]; + s += 2; + base = 2; + } if (base == 0) base = c == L'0' ? 8 : 10; acc = any = 0; diff --git a/lib/libc/locale/wcstoll.c b/lib/libc/locale/wcstoll.c index ac07d6c6adbf..ef1e6ef58861 100644 --- a/lib/libc/locale/wcstoll.c +++ b/lib/libc/locale/wcstoll.c @@ -86,6 +86,13 @@ wcstoll_l(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, s += 2; base = 16; } + if ((base == 0 || base == 2) && + c == L'0' && (*s == L'b' || *s == L'B') && + (s[1] >= L'0' && s[1] <= L'1')) { + c = s[1]; + s += 2; + base = 2; + } if (base == 0) base = c == L'0' ? 8 : 10; acc = any = 0; diff --git a/lib/libc/locale/wcstoul.c b/lib/libc/locale/wcstoul.c index 9f58db799c0e..2c9c8820b1f6 100644 --- a/lib/libc/locale/wcstoul.c +++ b/lib/libc/locale/wcstoul.c @@ -80,6 +80,13 @@ wcstoul_l(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, s += 2; base = 16; } + if ((base == 0 || base == 2) && + c == L'0' && (*s == L'b' || *s == L'B') && + (s[1] >= L'0' && s[1] <= L'1')) { + c = s[1]; + s += 2; + base = 2; + } if (base == 0) base = c == L'0' ? 8 : 10; acc = any = 0; diff --git a/lib/libc/locale/wcstoull.c b/lib/libc/locale/wcstoull.c index cbc7253f884d..692eb90eef6b 100644 --- a/lib/libc/locale/wcstoull.c +++ b/lib/libc/locale/wcstoull.c @@ -86,6 +86,13 @@ wcstoull_l(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, s += 2; base = 16; } + if ((base == 0 || base == 2) && + c == L'0' && (*s == L'b' || *s == L'B') && + (s[1] >= L'0' && s[1] <= L'1')) { + c = s[1]; + s += 2; + base = 2; + } if (base == 0) base = c == L'0' ? 8 : 10; acc = any = 0; diff --git a/lib/libc/locale/wcstoumax.c b/lib/libc/locale/wcstoumax.c index 4380cccf2424..c4f2ec3aaf41 100644 --- a/lib/libc/locale/wcstoumax.c +++ b/lib/libc/locale/wcstoumax.c @@ -86,6 +86,13 @@ wcstoumax_l(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr, s += 2; base = 16; } + if ((base == 0 || base == 2) && + c == L'0' && (*s == L'b' || *s == L'B') && + (s[1] >= L'0' && s[1] <= L'1')) { + c = s[1]; + s += 2; + base = 2; + } if (base == 0) base = c == L'0' ? 8 : 10; acc = any = 0; diff --git a/lib/libc/stdio/printfcommon.h b/lib/libc/stdio/printfcommon.h index ac5aed0a5fcd..411b778dc234 100644 --- a/lib/libc/stdio/printfcommon.h +++ b/lib/libc/stdio/printfcommon.h @@ -194,6 +194,13 @@ __ultoa(u_long val, CHAR *endp, int base, int octzero, const char *xdigs) } while (sval != 0); break; + case 2: + do { + *--cp = to_char(val & 1); + val >>= 1; + } while (val); + break; + case 8: do { *--cp = to_char(val & 7); @@ -244,6 +251,13 @@ __ujtoa(uintmax_t val, CHAR *endp, int base, int octzero, const char *xdigs) } while (sval != 0); break; + case 2: + do { + *--cp = to_char(val & 1); + val >>= 1; + } while (val); + break; + case 8: do { *--cp = to_char(val & 7); diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index ad655c5d78d4..5e5a9b5e31c1 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -613,6 +613,19 @@ reswitch: switch (ch) { case 'z': flags |= SIZET; goto rflag; + case 'B': + case 'b': + if (flags & INTMAX_SIZE) + ujval = UJARG(); + else + ulval = UARG(); + base = 2; + /* leading 0b/B only if non-zero */ + if (flags & ALT && + (flags & INTMAX_SIZE ? ujval != 0 : ulval != 0)) + ox[1] = ch; + goto nosign; + break; case 'C': flags |= LONGINT; /*FALLTHROUGH*/ diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c index cc2e1e428321..b4db62c216ed 100644 --- a/lib/libc/stdio/vfscanf.c +++ b/lib/libc/stdio/vfscanf.c @@ -6,6 +6,8 @@ * * Copyright (c) 2011 The FreeBSD Foundation * + * Copyright (c) 2023 Dag-Erling Smørgrav + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * @@ -80,16 +82,6 @@ static char sccsid[] = "@(#)vfscanf.c 8.1 (Berkeley) 6/4/93"; #define SHORTSHORT 0x4000 /* hh: char */ #define UNSIGNED 0x8000 /* %[oupxX] conversions */ -/* - * The following are used in integral conversions only: - * SIGNOK, NDIGITS, PFXOK, and NZDIGITS - */ -#define SIGNOK 0x40 /* +/- is (still) legal */ -#define NDIGITS 0x80 /* no digits detected */ -#define PFXOK 0x100 /* 0x prefix is (still) legal */ -#define NZDIGITS 0x200 /* no zero digits detected */ -#define HAVESIGN 0x10000 /* sign detected */ - /* * Conversion types. */ @@ -307,129 +299,160 @@ convert_wstring(FILE *fp, wchar_t *wcp, int width, locale_t locale) return (n); } +enum parseint_state { + begin, + havesign, + havezero, + haveprefix, + any, +}; + +static __inline int +parseint_fsm(int c, enum parseint_state *state, int *base) +{ + switch (c) { + case '+': + case '-': + if (*state == begin) { + *state = havesign; + return 1; + } + break; + case '0': + if (*state == begin || *state == havesign) { + *state = havezero; + } else { + *state = any; + } + return 1; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + if (*state == havezero && *base == 0) { + *base = 8; + } + /* FALL THROUGH */ + case '8': + case '9': + if (*state == begin || + *state == havesign) { + if (*base == 0) { + *base = 10; + } + } + if (*state == begin || + *state == havesign || + *state == havezero || + *state == haveprefix || + *state == any) { + if (*base > c - '0') { + *state = any; + return 1; + } + } + break; + case 'b': + if (*state == havezero) { + if (*base == 0 || *base == 2) { + *state = haveprefix; + *base = 2; + return 1; + } + } + /* FALL THROUGH */ + case 'a': + case 'c': + case 'd': + case 'e': + case 'f': + if (*state == begin || + *state == havesign || + *state == havezero || + *state == haveprefix || + *state == any) { + if (*base > c - 'a' + 10) { + *state = any; + return 1; + } + } + break; + case 'B': + if (*state == havezero) { + if (*base == 0 || *base == 2) { + *state = haveprefix; + *base = 2; + return 1; + } + } + /* FALL THROUGH */ + case 'A': + case 'C': + case 'D': + case 'E': + case 'F': + if (*state == begin || + *state == havesign || + *state == havezero || + *state == haveprefix || + *state == any) { + if (*base > c - 'A' + 10) { + *state = any; + return 1; + } + } + break; + case 'x': + case 'X': + if (*state == havezero) { + if (*base == 0 || *base == 16) { + *state = haveprefix; + *base = 16; + return 1; + } + } + break; + } + return 0; +} + /* - * Read an integer, storing it in buf. The only relevant bit in the - * flags argument is PFXOK. + * Read an integer, storing it in buf. * * Return 0 on a match failure, and the number of characters read * otherwise. */ static __inline int -parseint(FILE *fp, char * __restrict buf, int width, int base, int flags) +parseint(FILE *fp, char * __restrict buf, int width, int base) { - /* `basefix' is used to avoid `if' tests */ - static const short basefix[17] = - { 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; + enum parseint_state state = begin; char *p; int c; - flags |= SIGNOK | NDIGITS | NZDIGITS; for (p = buf; width; width--) { - c = *fp->_p; - /* - * Switch on the character; `goto ok' if we accept it - * as a part of number. - */ - switch (c) { - - /* - * The digit 0 is always legal, but is special. For - * %i conversions, if no digits (zero or nonzero) have - * been scanned (only signs), we will have base==0. - * In that case, we should set it to 8 and enable 0x - * prefixing. Also, if we have not scanned zero - * digits before this, do not turn off prefixing - * (someone else will turn it off if we have scanned - * any nonzero digits). - */ - case '0': - if (base == 0) { - base = 8; - flags |= PFXOK; - } - if (flags & NZDIGITS) - flags &= ~(SIGNOK|NZDIGITS|NDIGITS); - else - flags &= ~(SIGNOK|PFXOK|NDIGITS); - goto ok; - - /* 1 through 7 always legal */ - case '1': case '2': case '3': - case '4': case '5': case '6': case '7': - base = basefix[base]; - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* digits 8 and 9 ok iff decimal or hex */ - case '8': case '9': - base = basefix[base]; - if (base <= 8) - break; /* not legal here */ - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* letters ok iff hex */ - case 'A': case 'B': case 'C': - case 'D': case 'E': case 'F': - case 'a': case 'b': case 'c': - case 'd': case 'e': case 'f': - /* no need to fix base here */ - if (base <= 10) - break; /* not legal here */ - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* sign ok only as first character */ - case '+': case '-': - if (flags & SIGNOK) { - flags &= ~SIGNOK; - flags |= HAVESIGN; - goto ok; - } + c = __sgetc(fp); + if (c == EOF) break; - - /* - * x ok iff flag still set & 2nd char (or 3rd char if - * we have a sign). - */ - case 'x': case 'X': - if (flags & PFXOK && p == - buf + 1 + !!(flags & HAVESIGN)) { - base = 16; /* if %i */ - flags &= ~PFXOK; - goto ok; - } + if (!parseint_fsm(c, &state, &base)) break; - } - - /* - * If we got here, c is not a legal character for a - * number. Stop accumulating digits. - */ - break; - ok: - /* - * c is legal: store it and look at the next. - */ *p++ = c; - if (--fp->_r > 0) - fp->_p++; - else if (__srefill(fp)) - break; /* EOF */ } /* - * If we had only a sign, it is no good; push back the sign. - * If the number ends in `x', it was [sign] '0' 'x', so push - * back the x and treat it as [sign] '0'. + * If we only had a sign, push it back. If we only had a 0b or 0x + * prefix (possibly preceded by a sign), we view it as "0" and + * push back the letter. In all other cases, if we stopped + * because we read a non-number character, push it back. */ - if (flags & NDIGITS) { - if (p > buf) - (void) __ungetc(*(u_char *)--p, fp); - return (0); - } - c = ((u_char *)p)[-1]; - if (c == 'x' || c == 'X') { - --p; + if (state == havesign) { + p--; + (void) __ungetc(*(u_char *)p, fp); + } else if (state == haveprefix) { + p--; + (void) __ungetc(c, fp); + } else if (c != EOF) { (void) __ungetc(c, fp); } return (p - buf); @@ -554,6 +577,13 @@ literal: /* * Conversions. */ + case 'B': + case 'b': + c = CT_INT; + flags |= UNSIGNED; + base = 2; + break; + case 'd': c = CT_INT; base = 10; @@ -578,7 +608,6 @@ literal: case 'X': case 'x': - flags |= PFXOK; /* enable 0x prefixing */ c = CT_INT; flags |= UNSIGNED; base = 16; @@ -613,7 +642,7 @@ literal: break; case 'p': /* pointer format is like hex */ - flags |= POINTER | PFXOK; + flags |= POINTER; c = CT_INT; /* assumes sizeof(uintmax_t) */ flags |= UNSIGNED; /* >= sizeof(uintptr_t) */ base = 16; @@ -738,7 +767,7 @@ literal: width = sizeof(buf) - 2; width++; #endif - nr = parseint(fp, buf, width, base, flags); + nr = parseint(fp, buf, width, base); if (nr == 0) goto match_failure; if ((flags & SUPPRESS) == 0) { diff --git a/lib/libc/stdio/vfwprintf.c b/lib/libc/stdio/vfwprintf.c index fc681e8d0575..259a86467ea7 100644 --- a/lib/libc/stdio/vfwprintf.c +++ b/lib/libc/stdio/vfwprintf.c @@ -684,6 +684,19 @@ reswitch: switch (ch) { case 'z': flags |= SIZET; goto rflag; + case 'B': + case 'b': + if (flags & INTMAX_SIZE) + ujval = UJARG(); + else + ulval = UARG(); + base = 2; + /* leading 0b/B only if non-zero */ + if (flags & ALT && + (flags & INTMAX_SIZE ? ujval != 0 : ulval != 0)) + ox[1] = ch; + goto nosign; + break; case 'C': flags |= LONGINT; /*FALLTHROUGH*/ diff --git a/lib/libc/stdio/vfwscanf.c b/lib/libc/stdio/vfwscanf.c index 1a28ff665247..3300751eafb6 100644 --- a/lib/libc/stdio/vfwscanf.c +++ b/lib/libc/stdio/vfwscanf.c @@ -9,6 +9,8 @@ * * Copyright (c) 2011 The FreeBSD Foundation * + * Copyright (c) 2023 Dag-Erling Smørgrav + * * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * @@ -78,16 +80,6 @@ static char sccsid[] = "@(#)vfscanf.c 8.1 (Berkeley) 6/4/93"; #define SHORTSHORT 0x4000 /* hh: char */ #define UNSIGNED 0x8000 /* %[oupxX] conversions */ -/* - * The following are used in integral conversions only: - * SIGNOK, NDIGITS, PFXOK, and NZDIGITS - */ -#define SIGNOK 0x40 /* +/- is (still) legal */ -#define NDIGITS 0x80 /* no digits detected */ -#define PFXOK 0x100 /* 0x prefix is (still) legal */ -#define NZDIGITS 0x200 /* no zero digits detected */ -#define HAVESIGN 0x10000 /* sign detected */ - /* * Conversion types. */ @@ -289,128 +281,161 @@ convert_wstring(FILE *fp, wchar_t *wcp, int width, locale_t locale) return (nread); } +enum parseint_state { + begin, + havesign, + havezero, + haveprefix, + any, +}; + +static __inline int +parseint_fsm(wchar_t c, enum parseint_state *state, int *base) +{ + switch (c) { + case '+': + case '-': + if (*state == begin) { + *state = havesign; + return 1; + } + break; + case '0': + if (*state == begin || *state == havesign) { + *state = havezero; + } else { + *state = any; + } + return 1; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + if (*state == havezero && *base == 0) { + *base = 8; + } + /* FALL THROUGH */ + case '8': + case '9': + if (*state == begin || + *state == havesign) { + if (*base == 0) { + *base = 10; + } + } + if (*state == begin || + *state == havesign || + *state == havezero || + *state == haveprefix || + *state == any) { + if (*base > c - '0') { + *state = any; + return 1; + } + } + break; + case 'b': + if (*state == havezero) { + if (*base == 0 || *base == 2) { + *state = haveprefix; + *base = 2; + return 1; + } + } + /* FALL THROUGH */ + case 'a': + case 'c': + case 'd': + case 'e': + case 'f': + if (*state == begin || + *state == havesign || + *state == havezero || + *state == haveprefix || + *state == any) { + if (*base > c - 'a' + 10) { + *state = any; + return 1; + } + } + break; + case 'B': + if (*state == havezero) { + if (*base == 0 || *base == 2) { + *state = haveprefix; + *base = 2; + return 1; + } + } + /* FALL THROUGH */ + case 'A': + case 'C': + case 'D': + case 'E': + case 'F': + if (*state == begin || + *state == havesign || + *state == havezero || + *state == haveprefix || + *state == any) { + if (*base > c - 'A' + 10) { + *state = any; + return 1; + } + } + break; + case 'x': + case 'X': + if (*state == havezero) { + if (*base == 0 || *base == 16) { + *state = haveprefix; + *base = 16; + return 1; + } + } + break; + } + return 0; +} + /* - * Read an integer, storing it in buf. The only relevant bit in the - * flags argument is PFXOK. + * Read an integer, storing it in buf. * * Return 0 on a match failure, and the number of characters read * otherwise. */ static __inline int -parseint(FILE *fp, wchar_t *buf, int width, int base, int flags, +parseint(FILE *fp, wchar_t * __restrict buf, int width, int base, locale_t locale) { - /* `basefix' is used to avoid `if' tests */ - static const short basefix[17] = - { 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; + enum parseint_state state = begin; wchar_t *wcp; int c; - flags |= SIGNOK | NDIGITS | NZDIGITS; for (wcp = buf; width; width--) { c = __fgetwc(fp, locale); - /* - * Switch on the character; `goto ok' if we accept it - * as a part of number. - */ - switch (c) { - - /* - * The digit 0 is always legal, but is special. For - * %i conversions, if no digits (zero or nonzero) have - * been scanned (only signs), we will have base==0. - * In that case, we should set it to 8 and enable 0x - * prefixing. Also, if we have not scanned zero - * digits before this, do not turn off prefixing - * (someone else will turn it off if we have scanned - * any nonzero digits). - */ - case '0': - if (base == 0) { - base = 8; - flags |= PFXOK; - } - if (flags & NZDIGITS) - flags &= ~(SIGNOK|NZDIGITS|NDIGITS); - else - flags &= ~(SIGNOK|PFXOK|NDIGITS); - goto ok; - - /* 1 through 7 always legal */ - case '1': case '2': case '3': - case '4': case '5': case '6': case '7': - base = basefix[base]; - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* digits 8 and 9 ok iff decimal or hex */ - case '8': case '9': - base = basefix[base]; - if (base <= 8) - break; /* not legal here */ - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* letters ok iff hex */ - case 'A': case 'B': case 'C': - case 'D': case 'E': case 'F': - case 'a': case 'b': case 'c': - case 'd': case 'e': case 'f': - /* no need to fix base here */ - if (base <= 10) - break; /* not legal here */ - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* sign ok only as first character */ - case '+': case '-': - if (flags & SIGNOK) { - flags &= ~SIGNOK; - flags |= HAVESIGN; - goto ok; - } + if (c == WEOF) break; - - /* - * x ok iff flag still set & 2nd char (or 3rd char if - * we have a sign). - */ - case 'x': case 'X': - if (flags & PFXOK && wcp == - buf + 1 + !!(flags & HAVESIGN)) { - base = 16; /* if %i */ - flags &= ~PFXOK; - goto ok; - } + if (!parseint_fsm(c, &state, &base)) break; - } - - /* - * If we got here, c is not a legal character for a - * number. Stop accumulating digits. - */ - if (c != WEOF) - __ungetwc(c, fp, locale); - break; - ok: - /* - * c is legal: store it and look at the next. - */ *wcp++ = (wchar_t)c; } /* - * If we had only a sign, it is no good; push back the sign. - * If the number ends in `x', it was [sign] '0' 'x', so push - * back the x and treat it as [sign] '0'. + * If we only had a sign, push it back. If we only had a 0b or 0x + * prefix (possibly preceded by a sign), we view it as "0" and + * push back the letter. In all other cases, if we stopped + * because we read a non-number character, push it back. */ - if (flags & NDIGITS) { - if (wcp > buf) - __ungetwc(*--wcp, fp, locale); - return (0); - } - c = wcp[-1]; - if (c == 'x' || c == 'X') { - --wcp; + if (state == havesign) { + wcp--; + __ungetwc(*wcp, fp, locale); + } else if (state == haveprefix) { + wcp--; + __ungetwc(c, fp, locale); + } else if (c != WEOF) { __ungetwc(c, fp, locale); } return (wcp - buf); @@ -536,6 +561,13 @@ literal: /* * Conversions. */ + case 'B': + case 'b': + c = CT_INT; + flags |= UNSIGNED; + base = 2; + break; + case 'd': c = CT_INT; base = 10; @@ -560,7 +592,6 @@ literal: case 'X': case 'x': - flags |= PFXOK; /* enable 0x prefixing */ c = CT_INT; flags |= UNSIGNED; base = 16; @@ -606,7 +637,7 @@ literal: break; case 'p': /* pointer format is like hex */ - flags |= POINTER | PFXOK; + flags |= POINTER; c = CT_INT; /* assumes sizeof(uintmax_t) */ flags |= UNSIGNED; /* >= sizeof(uintptr_t) */ base = 16; @@ -716,7 +747,7 @@ literal: sizeof(*buf) - 1) width = sizeof(buf) / sizeof(*buf) - 1; - nr = parseint(fp, buf, width, base, flags, locale); + nr = parseint(fp, buf, width, base, locale); if (nr == 0) goto match_failure; if ((flags & SUPPRESS) == 0) { diff --git a/lib/libc/stdlib/strtoimax.c b/lib/libc/stdlib/strtoimax.c index 894d801940fd..5309b7d4305c 100644 --- a/lib/libc/stdlib/strtoimax.c +++ b/lib/libc/stdlib/strtoimax.c @@ -87,6 +87,13 @@ strtoimax_l(const char * __restrict nptr, char ** __restrict endptr, int base, s += 2; base = 16; } + if ((base == 0 || base == 2) && + c == '0' && (*s == 'b' || *s == 'B') && + (s[1] >= '0' && s[1] <= '1')) { + c = s[1]; + s += 2; + base = 2; + } if (base == 0) base = c == '0' ? 8 : 10; acc = any = 0; diff --git a/lib/libc/stdlib/strtol.c b/lib/libc/stdlib/strtol.c index 360bb7efc8be..1ca95918ef12 100644 --- a/lib/libc/stdlib/strtol.c +++ b/lib/libc/stdlib/strtol.c @@ -87,6 +87,13 @@ strtol_l(const char * __restrict nptr, char ** __restrict endptr, int base, s += 2; base = 16; } + if ((base == 0 || base == 2) && + c == '0' && (*s == 'b' || *s == 'B') && + (s[1] >= '0' && s[1] <= '1')) { + c = s[1]; + s += 2; + base = 2; + } if (base == 0) base = c == '0' ? 8 : 10; acc = any = 0; diff --git a/lib/libc/stdlib/strtoll.c b/lib/libc/stdlib/strtoll.c index 51a523e51fb8..6845776c5f03 100644 --- a/lib/libc/stdlib/strtoll.c +++ b/lib/libc/stdlib/strtoll.c @@ -63,8 +63,9 @@ strtoll_l(const char * __restrict nptr, char ** __restrict endptr, int base, /* * Skip white space and pick up leading +/- sign if any. - * If base is 0, allow 0x for hex and 0 for octal, else - * assume decimal; if base is already 16, allow 0x. + * If base is 0, allow 0b for binary, 0x for hex, and 0 for + * octal, else assume decimal; if base is already 2, allow + * 0b; if base is already 16, allow 0x. */ s = nptr; do { @@ -87,6 +88,13 @@ strtoll_l(const char * __restrict nptr, char ** __restrict endptr, int base, *** 67 LINES SKIPPED *** From nobody Mon Aug 28 15:38:22 2023 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 4RZF7y2jplz4rgT9; Mon, 28 Aug 2023 15:38:22 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZF7y2QJLz4cWF; Mon, 28 Aug 2023 15:38:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693237102; 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=r2CPRwEQm8EmtSWl7E604v+3QXQVE7M7OusFlqmny88=; b=mnemUw1OxX55ANg1iXompspzu6h5Ic/bgUdGIITqkAn/m9wd2js7dCnSnN1VZr3Cy/qGCY hV5tU78vfEHHyWN1UZemZIU2q6lbk7mAq4dyKZ1lNCFRacLwkXzFdCWpcxvstKJ6r/w0my OL7iv+/8irAIlvoeV9hVSwqEtGsjSsy4Xnis08T2nB5G/0mvev0jvBhDc9g4cXymVxBY3f XlZ47iQ8gXH/zmhgBfjTzsbFITlA+GT74EzPnsOEA4OiClVEspUX4ToCRfSHp2MYv+h9Pl zTDyYcp+3ZY/mxSvtCqiQxOElcSN0M1QZrsonWFRkalpsBv0bFYNQJPzd7LcSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693237102; a=rsa-sha256; cv=none; b=jNAJoOVtYCFEFJFR6N6ZWdZxVIi/BuLK2q9QxztSN7FDLl6FstML2TptvacdXKd63OwXUy KxgzluTIA4XwZZJFDY8/bgRptZHd7Iv4mdeCgRQngu7b5fY87laCAkQOqEcNiuvVNbWLVS ZeQPgxEP++rwOlU4y5Vqu3/HX9NC9yDjJOJHHIAW/P1DRompdyFzXBWTH04jJnPJHbwZ3y lTG4YXtLUij5/0XWy5FDlUFHQBj+VZQNJB4JXFK11PVDCdazPmzbZv+sq/ByGDN42iN5O7 TcuCCuAvC47Ti15FSMnYyci8sSXejkJakAJIGgWJXNysygulrHetpG4RkTMlNA== 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=1693237102; 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=r2CPRwEQm8EmtSWl7E604v+3QXQVE7M7OusFlqmny88=; b=yLYjZpJykmQVFXZ2Lt2y9pWmbdvjStP9oqGA0hP+4fru2szOWF96cQ+/KQr8l3YwaljBYQ Qk6FqxCMVzrlzCsl7xFHBOY4F7Le7tQpJgO/qnNG0VHb8djeUq4o/Bgz+MguugDLvrRXgE td/HhrFD3j/86ULBh3fGUQny0hJgQMlxoTyLdt0Z0Mm+YcNk3G6IAdNVsmgAKdwrLtvcZX wvBQcxPMPpGq00Bnw1P4ADHfHBbZhVDqD76Ni76/kHtThUnpcr9dhQ0+xTqOXPw7esBZfQ bZ+tAGMfBJONKYwG/9WyIh86tQgeU4LVXTFdKVZsDjiAXanjVJjnGfLTmuQtRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZF7y1JvSzMC; Mon, 28 Aug 2023 15:38:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SFcMZX077894; Mon, 28 Aug 2023 15:38:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SFcMas077891; Mon, 28 Aug 2023 15:38:22 GMT (envelope-from git) Date: Mon, 28 Aug 2023 15:38:22 GMT Message-Id: <202308281538.37SFcMas077891@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: b9385720f34b - main - libc: Add unit tests for N2630 and possible collateral damage. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9385720f34b536ef2568a642e8b1fad0450056f Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b9385720f34b536ef2568a642e8b1fad0450056f commit b9385720f34b536ef2568a642e8b1fad0450056f Author: Dag-Erling Smørgrav AuthorDate: 2023-08-28 15:34:05 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-08-28 15:34:05 +0000 libc: Add unit tests for N2630 and possible collateral damage. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41512 --- contrib/netbsd-tests/lib/libc/stdlib/t_strtol.c | 6 + lib/libc/tests/stdio/Makefile | 3 + lib/libc/tests/stdio/snprintf_test.c | 138 +++++++++++++ lib/libc/tests/stdio/sscanf_test.c | 249 +++++++++++++++++++++++ lib/libc/tests/stdio/swscanf_test.c | 250 ++++++++++++++++++++++++ 5 files changed, 646 insertions(+) diff --git a/contrib/netbsd-tests/lib/libc/stdlib/t_strtol.c b/contrib/netbsd-tests/lib/libc/stdlib/t_strtol.c index 54e190760656..d1027fcc7bb1 100644 --- a/contrib/netbsd-tests/lib/libc/stdlib/t_strtol.c +++ b/contrib/netbsd-tests/lib/libc/stdlib/t_strtol.c @@ -94,6 +94,12 @@ ATF_TC_BODY(strtol_base, tc) { "01234567", 342391, 0, NULL }, { "0123456789", 123456789, 10, NULL }, { "0x75bcd15", 123456789, 0, NULL }, +#ifdef __FreeBSD__ + { "0x", 0, 0, "x" }, + { "0b111010110111100110100010101", 123456789, 0, NULL }, + { "0b0123", 1, 0, "23" }, + { "0b", 0, 0, "b" }, +#endif }; long long int lli; diff --git a/lib/libc/tests/stdio/Makefile b/lib/libc/tests/stdio/Makefile index 12ae44855da5..f7383e5b3ef4 100644 --- a/lib/libc/tests/stdio/Makefile +++ b/lib/libc/tests/stdio/Makefile @@ -16,6 +16,9 @@ ATF_TESTS_C+= print_positional_test ATF_TESTS_C+= printbasic_test ATF_TESTS_C+= printfloat_test ATF_TESTS_C+= scanfloat_test +ATF_TESTS_C+= snprintf_test +ATF_TESTS_C+= sscanf_test +ATF_TESTS_C+= swscanf_test SRCS.fopen2_test= fopen_test.c diff --git a/lib/libc/tests/stdio/snprintf_test.c b/lib/libc/tests/stdio/snprintf_test.c new file mode 100644 index 000000000000..0c335bc1a512 --- /dev/null +++ b/lib/libc/tests/stdio/snprintf_test.c @@ -0,0 +1,138 @@ +/*- + * Copyright (c) 2023 Dag-Erling Smørgrav + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include +#include +#include + +#include + +#define SNPRINTF_TEST(output, format, ...) \ + do { \ + char buf[256]; \ + assert(output == NULL || strlen(output) < sizeof(buf)); \ + int ret = snprintf(buf, sizeof(buf), format, __VA_ARGS__); \ + if (output == NULL) { \ + ATF_CHECK_EQ(-1, ret); \ + } else { \ + ATF_CHECK_EQ(strlen(output), ret); \ + if (ret > 0) { \ + ATF_CHECK_STREQ(output, buf); \ + } \ + } \ + } while (0) + +ATF_TC_WITHOUT_HEAD(snprintf_b); +ATF_TC_BODY(snprintf_b, tc) +{ + SNPRINTF_TEST("0", "%b", 0); + SNPRINTF_TEST(" 0", "%12b", 0); + SNPRINTF_TEST("000000000000", "%012b", 0); + SNPRINTF_TEST("1", "%b", 1); + SNPRINTF_TEST(" 1", "%12b", 1); + SNPRINTF_TEST("000000000001", "%012b", 1); + SNPRINTF_TEST("1111111111111111111111111111111", "%b", INT_MAX); + SNPRINTF_TEST("0", "%#b", 0); + SNPRINTF_TEST(" 0", "%#12b", 0); + SNPRINTF_TEST("000000000000", "%#012b", 0); + SNPRINTF_TEST("0b1", "%#b", 1); + SNPRINTF_TEST(" 0b1", "%#12b", 1); + SNPRINTF_TEST("0b0000000001", "%#012b", 1); + SNPRINTF_TEST("0b1111111111111111111111111111111", "%#b", INT_MAX); +} + +ATF_TC_WITHOUT_HEAD(snprintf_B); +ATF_TC_BODY(snprintf_B, tc) +{ + SNPRINTF_TEST("0", "%B", 0); + SNPRINTF_TEST(" 0", "%12B", 0); + SNPRINTF_TEST("000000000000", "%012B", 0); + SNPRINTF_TEST("1", "%B", 1); + SNPRINTF_TEST(" 1", "%12B", 1); + SNPRINTF_TEST("000000000001", "%012B", 1); + SNPRINTF_TEST("1111111111111111111111111111111", "%B", INT_MAX); + SNPRINTF_TEST("0", "%#B", 0); + SNPRINTF_TEST(" 0", "%#12B", 0); + SNPRINTF_TEST("000000000000", "%#012B", 0); + SNPRINTF_TEST("0B1", "%#B", 1); + SNPRINTF_TEST(" 0B1", "%#12B", 1); + SNPRINTF_TEST("0B0000000001", "%#012B", 1); + SNPRINTF_TEST("0B1111111111111111111111111111111", "%#B", INT_MAX); +} + +ATF_TC_WITHOUT_HEAD(snprintf_d); +ATF_TC_BODY(snprintf_d, tc) +{ + SNPRINTF_TEST("0", "%d", 0); + SNPRINTF_TEST(" 0", "%12d", 0); + SNPRINTF_TEST("000000000000", "%012d", 0); + SNPRINTF_TEST("1", "%d", 1); + SNPRINTF_TEST(" 1", "%12d", 1); + SNPRINTF_TEST("000000000001", "%012d", 1); + SNPRINTF_TEST("2147483647", "%d", INT_MAX); + SNPRINTF_TEST(" 2147483647", "%12d", INT_MAX); + SNPRINTF_TEST("002147483647", "%012d", INT_MAX); + SNPRINTF_TEST("2,147,483,647", "%'d", INT_MAX); +} + +ATF_TC_WITHOUT_HEAD(snprintf_x); +ATF_TC_BODY(snprintf_x, tc) +{ + SNPRINTF_TEST("0", "%x", 0); + SNPRINTF_TEST(" 0", "%12x", 0); + SNPRINTF_TEST("000000000000", "%012x", 0); + SNPRINTF_TEST("1", "%x", 1); + SNPRINTF_TEST(" 1", "%12x", 1); + SNPRINTF_TEST("000000000001", "%012x", 1); + SNPRINTF_TEST("7fffffff", "%x", INT_MAX); + SNPRINTF_TEST(" 7fffffff", "%12x", INT_MAX); + SNPRINTF_TEST("00007fffffff", "%012x", INT_MAX); + SNPRINTF_TEST("0", "%#x", 0); + SNPRINTF_TEST(" 0", "%#12x", 0); + SNPRINTF_TEST("000000000000", "%#012x", 0); + SNPRINTF_TEST("0x1", "%#x", 1); + SNPRINTF_TEST(" 0x1", "%#12x", 1); + SNPRINTF_TEST("0x0000000001", "%#012x", 1); + SNPRINTF_TEST("0x7fffffff", "%#x", INT_MAX); + SNPRINTF_TEST(" 0x7fffffff", "%#12x", INT_MAX); + SNPRINTF_TEST("0x007fffffff", "%#012x", INT_MAX); +} + +ATF_TC_WITHOUT_HEAD(snprintf_X); +ATF_TC_BODY(snprintf_X, tc) +{ + SNPRINTF_TEST("0", "%X", 0); + SNPRINTF_TEST(" 0", "%12X", 0); + SNPRINTF_TEST("000000000000", "%012X", 0); + SNPRINTF_TEST("1", "%X", 1); + SNPRINTF_TEST(" 1", "%12X", 1); + SNPRINTF_TEST("000000000001", "%012X", 1); + SNPRINTF_TEST("7FFFFFFF", "%X", INT_MAX); + SNPRINTF_TEST(" 7FFFFFFF", "%12X", INT_MAX); + SNPRINTF_TEST("00007FFFFFFF", "%012X", INT_MAX); + SNPRINTF_TEST("0", "%#X", 0); + SNPRINTF_TEST(" 0", "%#12X", 0); + SNPRINTF_TEST("000000000000", "%#012X", 0); + SNPRINTF_TEST("0X1", "%#X", 1); + SNPRINTF_TEST(" 0X1", "%#12X", 1); + SNPRINTF_TEST("0X0000000001", "%#012X", 1); + SNPRINTF_TEST("0X7FFFFFFF", "%#X", INT_MAX); + SNPRINTF_TEST(" 0X7FFFFFFF", "%#12X", INT_MAX); + SNPRINTF_TEST("0X007FFFFFFF", "%#012X", INT_MAX); +} + +ATF_TP_ADD_TCS(tp) +{ + setlocale(LC_NUMERIC, "en_US.UTF-8"); + ATF_TP_ADD_TC(tp, snprintf_b); + ATF_TP_ADD_TC(tp, snprintf_B); + ATF_TP_ADD_TC(tp, snprintf_d); + ATF_TP_ADD_TC(tp, snprintf_x); + ATF_TP_ADD_TC(tp, snprintf_X); + return (atf_no_error()); +} diff --git a/lib/libc/tests/stdio/sscanf_test.c b/lib/libc/tests/stdio/sscanf_test.c new file mode 100644 index 000000000000..24226f3b3a8d --- /dev/null +++ b/lib/libc/tests/stdio/sscanf_test.c @@ -0,0 +1,249 @@ +/*- + * Copyright (c) 2023 Dag-Erling Smørgrav + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +#include + +static const struct sscanf_test_case { + char input[8]; + struct { + int ret, val, len; + } b, o, d, x, i; +} sscanf_test_cases[] = { +// input binary octal decimal hexadecimal automatic + // all digits + { "0", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, }, + { "1", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, }, + { "2", { 0, 0, 0 }, { 1, 2, 1 }, { 1, 2, 1 }, { 1, 2, 1 }, { 1, 2, 1 }, }, + { "3", { 0, 0, 0 }, { 1, 3, 1 }, { 1, 3, 1 }, { 1, 3, 1 }, { 1, 3, 1 }, }, + { "4", { 0, 0, 0 }, { 1, 4, 1 }, { 1, 4, 1 }, { 1, 4, 1 }, { 1, 4, 1 }, }, + { "5", { 0, 0, 0 }, { 1, 5, 1 }, { 1, 5, 1 }, { 1, 5, 1 }, { 1, 5, 1 }, }, + { "6", { 0, 0, 0 }, { 1, 6, 1 }, { 1, 6, 1 }, { 1, 6, 1 }, { 1, 6, 1 }, }, + { "7", { 0, 0, 0 }, { 1, 7, 1 }, { 1, 7, 1 }, { 1, 7, 1 }, { 1, 7, 1 }, }, + { "8", { 0, 0, 0 }, { 0, 0, 0 }, { 1, 8, 1 }, { 1, 8, 1 }, { 1, 8, 1 }, }, + { "9", { 0, 0, 0 }, { 0, 0, 0 }, { 1, 9, 1 }, { 1, 9, 1 }, { 1, 9, 1 }, }, + { "A", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 10, 1 }, { 0, 0, 0 }, }, + { "B", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 11, 1 }, { 0, 0, 0 }, }, + { "C", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 12, 1 }, { 0, 0, 0 }, }, + { "D", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 13, 1 }, { 0, 0, 0 }, }, + { "E", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 14, 1 }, { 0, 0, 0 }, }, + { "F", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 15, 1 }, { 0, 0, 0 }, }, + { "X", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, }, + { "a", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 10, 1 }, { 0, 0, 0 }, }, + { "b", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 11, 1 }, { 0, 0, 0 }, }, + { "c", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 12, 1 }, { 0, 0, 0 }, }, + { "d", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 13, 1 }, { 0, 0, 0 }, }, + { "e", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 14, 1 }, { 0, 0, 0 }, }, + { "f", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 15, 1 }, { 0, 0, 0 }, }, + { "x", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, }, + // all digits with leading zero + { "00", { 1, 0, 2 }, { 1, 0, 2 }, { 1, 0, 2 }, { 1, 0, 2 }, { 1, 0, 2 }, }, + { "01", { 1, 1, 2 }, { 1, 1, 2 }, { 1, 1, 2 }, { 1, 1, 2 }, { 1, 1, 2 }, }, + { "02", { 1, 0, 1 }, { 1, 2, 2 }, { 1, 2, 2 }, { 1, 2, 2 }, { 1, 2, 2 }, }, + { "03", { 1, 0, 1 }, { 1, 3, 2 }, { 1, 3, 2 }, { 1, 3, 2 }, { 1, 3, 2 }, }, + { "04", { 1, 0, 1 }, { 1, 4, 2 }, { 1, 4, 2 }, { 1, 4, 2 }, { 1, 4, 2 }, }, + { "05", { 1, 0, 1 }, { 1, 5, 2 }, { 1, 5, 2 }, { 1, 5, 2 }, { 1, 5, 2 }, }, + { "06", { 1, 0, 1 }, { 1, 6, 2 }, { 1, 6, 2 }, { 1, 6, 2 }, { 1, 6, 2 }, }, + { "07", { 1, 0, 1 }, { 1, 7, 2 }, { 1, 7, 2 }, { 1, 7, 2 }, { 1, 7, 2 }, }, + { "08", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 8, 2 }, { 1, 8, 2 }, { 1, 0, 1 }, }, + { "09", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 9, 2 }, { 1, 9, 2 }, { 1, 0, 1 }, }, + { "0A", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 10, 2 }, { 1, 0, 1 }, }, + { "0B", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 11, 2 }, { 1, 0, 1 }, }, + { "0C", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 12, 2 }, { 1, 0, 1 }, }, + { "0D", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 13, 2 }, { 1, 0, 1 }, }, + { "0E", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 14, 2 }, { 1, 0, 1 }, }, + { "0F", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 15, 2 }, { 1, 0, 1 }, }, + { "0X", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, }, + { "0a", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 10, 2 }, { 1, 0, 1 }, }, + { "0b", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 11, 2 }, { 1, 0, 1 }, }, + { "0c", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 12, 2 }, { 1, 0, 1 }, }, + { "0d", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 13, 2 }, { 1, 0, 1 }, }, + { "0e", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 14, 2 }, { 1, 0, 1 }, }, + { "0f", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 15, 2 }, { 1, 0, 1 }, }, + { "0x", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, }, + // all digits with leading one + { "10", { 1, 2, 2 }, { 1, 8, 2 }, { 1, 10, 2 }, { 1, 16, 2 }, { 1, 10, 2 }, }, + { "11", { 1, 3, 2 }, { 1, 9, 2 }, { 1, 11, 2 }, { 1, 17, 2 }, { 1, 11, 2 }, }, + { "12", { 1, 1, 1 }, { 1, 10, 2 }, { 1, 12, 2 }, { 1, 18, 2 }, { 1, 12, 2 }, }, + { "13", { 1, 1, 1 }, { 1, 11, 2 }, { 1, 13, 2 }, { 1, 19, 2 }, { 1, 13, 2 }, }, + { "14", { 1, 1, 1 }, { 1, 12, 2 }, { 1, 14, 2 }, { 1, 20, 2 }, { 1, 14, 2 }, }, + { "15", { 1, 1, 1 }, { 1, 13, 2 }, { 1, 15, 2 }, { 1, 21, 2 }, { 1, 15, 2 }, }, + { "16", { 1, 1, 1 }, { 1, 14, 2 }, { 1, 16, 2 }, { 1, 22, 2 }, { 1, 16, 2 }, }, + { "17", { 1, 1, 1 }, { 1, 15, 2 }, { 1, 17, 2 }, { 1, 23, 2 }, { 1, 17, 2 }, }, + { "18", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 18, 2 }, { 1, 24, 2 }, { 1, 18, 2 }, }, + { "19", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 19, 2 }, { 1, 25, 2 }, { 1, 19, 2 }, }, + { "1A", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 26, 2 }, { 1, 1, 1 }, }, + { "1B", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 27, 2 }, { 1, 1, 1 }, }, + { "1C", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 28, 2 }, { 1, 1, 1 }, }, + { "1D", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 29, 2 }, { 1, 1, 1 }, }, + { "1E", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 30, 2 }, { 1, 1, 1 }, }, + { "1F", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 31, 2 }, { 1, 1, 1 }, }, + { "1X", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, }, + { "1a", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 26, 2 }, { 1, 1, 1 }, }, + { "1b", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 27, 2 }, { 1, 1, 1 }, }, + { "1c", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 28, 2 }, { 1, 1, 1 }, }, + { "1d", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 29, 2 }, { 1, 1, 1 }, }, + { "1e", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 30, 2 }, { 1, 1, 1 }, }, + { "1f", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 31, 2 }, { 1, 1, 1 }, }, + { "1x", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, }, + // all digits with leading binary prefix + { "0b0", { 1, 0, 3 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 176, 3 }, { 1, 0, 3 }, }, + { "0b1", { 1, 1, 3 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 177, 3 }, { 1, 1, 3 }, }, + { "0b2", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 178, 3 }, { 1, 0, 1 }, }, + { "0b3", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 179, 3 }, { 1, 0, 1 }, }, + { "0b4", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 180, 3 }, { 1, 0, 1 }, }, + { "0b5", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 181, 3 }, { 1, 0, 1 }, }, + { "0b6", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 182, 3 }, { 1, 0, 1 }, }, + { "0b7", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 183, 3 }, { 1, 0, 1 }, }, + { "0b8", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 184, 3 }, { 1, 0, 1 }, }, + { "0b9", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 185, 3 }, { 1, 0, 1 }, }, + { "0bA", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 186, 3 }, { 1, 0, 1 }, }, + { "0bB", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 187, 3 }, { 1, 0, 1 }, }, + { "0bC", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 188, 3 }, { 1, 0, 1 }, }, + { "0bD", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 189, 3 }, { 1, 0, 1 }, }, + { "0bE", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 190, 3 }, { 1, 0, 1 }, }, + { "0bF", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 191, 3 }, { 1, 0, 1 }, }, + { "0bX", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 11, 2 }, { 1, 0, 1 }, }, + { "0ba", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 186, 3 }, { 1, 0, 1 }, }, + { "0bb", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 187, 3 }, { 1, 0, 1 }, }, + { "0bc", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 188, 3 }, { 1, 0, 1 }, }, + { "0bd", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 189, 3 }, { 1, 0, 1 }, }, + { "0be", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 190, 3 }, { 1, 0, 1 }, }, + { "0bf", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 191, 3 }, { 1, 0, 1 }, }, + { "0bx", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 11, 2 }, { 1, 0, 1 }, }, + // all digits with leading hexadecimal prefix + { "0x0", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 3 }, { 1, 0, 3 }, }, + { "0x1", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 1, 3 }, { 1, 1, 3 }, }, + { "0x2", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 2, 3 }, { 1, 2, 3 }, }, + { "0x3", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 3, 3 }, { 1, 3, 3 }, }, + { "0x4", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 4, 3 }, { 1, 4, 3 }, }, + { "0x5", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 5, 3 }, { 1, 5, 3 }, }, + { "0x6", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 6, 3 }, { 1, 6, 3 }, }, + { "0x7", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 7, 3 }, { 1, 7, 3 }, }, + { "0x8", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 8, 3 }, { 1, 8, 3 }, }, + { "0x9", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 9, 3 }, { 1, 9, 3 }, }, + { "0xA", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 10, 3 }, { 1, 10, 3 }, }, + { "0xB", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 11, 3 }, { 1, 11, 3 }, }, + { "0xC", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 12, 3 }, { 1, 12, 3 }, }, + { "0xD", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 13, 3 }, { 1, 13, 3 }, }, + { "0xE", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 14, 3 }, { 1, 14, 3 }, }, + { "0xF", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 15, 3 }, { 1, 15, 3 }, }, + { "0xX", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, }, + { "0xa", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 10, 3 }, { 1, 10, 3 }, }, + { "0xb", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 11, 3 }, { 1, 11, 3 }, }, + { "0xc", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 12, 3 }, { 1, 12, 3 }, }, + { "0xd", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 13, 3 }, { 1, 13, 3 }, }, + { "0xe", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 14, 3 }, { 1, 14, 3 }, }, + { "0xf", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 15, 3 }, { 1, 15, 3 }, }, + { "0xX", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, }, + // terminator + { "" } +}; + +#define SSCANF_TEST(string, format, expret, expval, explen) \ + do { \ + int ret = 0, val = 0, len = 0; \ + ret = sscanf(string, format "%n", &val, &len); \ + ATF_CHECK_EQ(expret, ret); \ + if (expret && ret) { \ + ATF_CHECK_EQ(expval, val); \ + ATF_CHECK_EQ(explen, len); \ + } \ + } while (0) + +ATF_TC_WITHOUT_HEAD(sscanf_b); +ATF_TC_BODY(sscanf_b, tc) +{ + const struct sscanf_test_case *stc; + char input[16]; + + for (stc = sscanf_test_cases; *stc->input; stc++) { + strcpy(input + 1, stc->input); + SSCANF_TEST(input + 1, "%b", stc->b.ret, stc->b.val, stc->b.len); + input[0] = '+'; + SSCANF_TEST(input, "%b", stc->b.ret, stc->b.val, stc->b.len ? stc->b.len + 1 : 0); + input[0] = '-'; + SSCANF_TEST(input, "%b", stc->b.ret, -stc->b.val, stc->b.len ? stc->b.len + 1 : 0); + } +} + +ATF_TC_WITHOUT_HEAD(sscanf_o); +ATF_TC_BODY(sscanf_o, tc) +{ + const struct sscanf_test_case *stc; + char input[16]; + + for (stc = sscanf_test_cases; *stc->input; stc++) { + strcpy(input + 1, stc->input); + SSCANF_TEST(input + 1, "%o", stc->o.ret, stc->o.val, stc->o.len); + input[0] = '+'; + SSCANF_TEST(input, "%o", stc->o.ret, stc->o.val, stc->o.len ? stc->o.len + 1 : 0); + input[0] = '-'; + SSCANF_TEST(input, "%o", stc->o.ret, -stc->o.val, stc->o.len ? stc->o.len + 1 : 0); + } +} + +ATF_TC_WITHOUT_HEAD(sscanf_d); +ATF_TC_BODY(sscanf_d, tc) +{ + const struct sscanf_test_case *stc; + char input[16]; + + for (stc = sscanf_test_cases; *stc->input; stc++) { + strcpy(input + 1, stc->input); + SSCANF_TEST(input + 1, "%d", stc->d.ret, stc->d.val, stc->d.len); + input[0] = '+'; + SSCANF_TEST(input, "%d", stc->d.ret, stc->d.val, stc->d.len ? stc->d.len + 1 : 0); + input[0] = '-'; + SSCANF_TEST(input, "%d", stc->d.ret, -stc->d.val, stc->d.len ? stc->d.len + 1 : 0); + } +} + +ATF_TC_WITHOUT_HEAD(sscanf_x); +ATF_TC_BODY(sscanf_x, tc) +{ + const struct sscanf_test_case *stc; + char input[16]; + + for (stc = sscanf_test_cases; *stc->input; stc++) { + strcpy(input + 1, stc->input); + SSCANF_TEST(input + 1, "%x", stc->x.ret, stc->x.val, stc->x.len); + input[0] = '+'; + SSCANF_TEST(input, "%x", stc->x.ret, stc->x.val, stc->x.len ? stc->x.len + 1 : 0); + input[0] = '-'; + SSCANF_TEST(input, "%x", stc->x.ret, -stc->x.val, stc->x.len ? stc->x.len + 1 : 0); + } +} + +ATF_TC_WITHOUT_HEAD(sscanf_i); +ATF_TC_BODY(sscanf_i, tc) +{ + const struct sscanf_test_case *stc; + char input[16]; + + for (stc = sscanf_test_cases; *stc->input; stc++) { + strcpy(input + 1, stc->input); + SSCANF_TEST(input + 1, "%i", stc->i.ret, stc->i.val, stc->i.len); + input[0] = '+'; + SSCANF_TEST(input, "%i", stc->i.ret, stc->i.val, stc->i.len ? stc->i.len + 1 : 0); + input[0] = '-'; + SSCANF_TEST(input, "%i", stc->i.ret, -stc->i.val, stc->i.len ? stc->i.len + 1 : 0); + } +} + +ATF_TP_ADD_TCS(tp) +{ + setlocale(LC_NUMERIC, "en_US.UTF-8"); + ATF_TP_ADD_TC(tp, sscanf_b); + ATF_TP_ADD_TC(tp, sscanf_o); + ATF_TP_ADD_TC(tp, sscanf_d); + ATF_TP_ADD_TC(tp, sscanf_x); + ATF_TP_ADD_TC(tp, sscanf_i); + return (atf_no_error()); +} diff --git a/lib/libc/tests/stdio/swscanf_test.c b/lib/libc/tests/stdio/swscanf_test.c new file mode 100644 index 000000000000..391a54e0ed5e --- /dev/null +++ b/lib/libc/tests/stdio/swscanf_test.c @@ -0,0 +1,250 @@ +/*- + * Copyright (c) 2023 Dag-Erling Smørgrav + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include +#include + +#include + +static const struct swscanf_test_case { + wchar_t input[8]; + struct { + int ret, val, len; + } b, o, d, x, i; +} swscanf_test_cases[] = { +// input binary octal decimal hexadecimal automatic + // all digits + { L"0", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, }, + { L"1", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, }, + { L"2", { 0, 0, 0 }, { 1, 2, 1 }, { 1, 2, 1 }, { 1, 2, 1 }, { 1, 2, 1 }, }, + { L"3", { 0, 0, 0 }, { 1, 3, 1 }, { 1, 3, 1 }, { 1, 3, 1 }, { 1, 3, 1 }, }, + { L"4", { 0, 0, 0 }, { 1, 4, 1 }, { 1, 4, 1 }, { 1, 4, 1 }, { 1, 4, 1 }, }, + { L"5", { 0, 0, 0 }, { 1, 5, 1 }, { 1, 5, 1 }, { 1, 5, 1 }, { 1, 5, 1 }, }, + { L"6", { 0, 0, 0 }, { 1, 6, 1 }, { 1, 6, 1 }, { 1, 6, 1 }, { 1, 6, 1 }, }, + { L"7", { 0, 0, 0 }, { 1, 7, 1 }, { 1, 7, 1 }, { 1, 7, 1 }, { 1, 7, 1 }, }, + { L"8", { 0, 0, 0 }, { 0, 0, 0 }, { 1, 8, 1 }, { 1, 8, 1 }, { 1, 8, 1 }, }, + { L"9", { 0, 0, 0 }, { 0, 0, 0 }, { 1, 9, 1 }, { 1, 9, 1 }, { 1, 9, 1 }, }, + { L"A", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 10, 1 }, { 0, 0, 0 }, }, + { L"B", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 11, 1 }, { 0, 0, 0 }, }, + { L"C", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 12, 1 }, { 0, 0, 0 }, }, + { L"D", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 13, 1 }, { 0, 0, 0 }, }, + { L"E", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 14, 1 }, { 0, 0, 0 }, }, + { L"F", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 15, 1 }, { 0, 0, 0 }, }, + { L"X", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, }, + { L"a", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 10, 1 }, { 0, 0, 0 }, }, + { L"b", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 11, 1 }, { 0, 0, 0 }, }, + { L"c", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 12, 1 }, { 0, 0, 0 }, }, + { L"d", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 13, 1 }, { 0, 0, 0 }, }, + { L"e", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 14, 1 }, { 0, 0, 0 }, }, + { L"f", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 1, 15, 1 }, { 0, 0, 0 }, }, + { L"x", { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, }, + // all digits with leading zero + { L"00", { 1, 0, 2 }, { 1, 0, 2 }, { 1, 0, 2 }, { 1, 0, 2 }, { 1, 0, 2 }, }, + { L"01", { 1, 1, 2 }, { 1, 1, 2 }, { 1, 1, 2 }, { 1, 1, 2 }, { 1, 1, 2 }, }, + { L"02", { 1, 0, 1 }, { 1, 2, 2 }, { 1, 2, 2 }, { 1, 2, 2 }, { 1, 2, 2 }, }, + { L"03", { 1, 0, 1 }, { 1, 3, 2 }, { 1, 3, 2 }, { 1, 3, 2 }, { 1, 3, 2 }, }, + { L"04", { 1, 0, 1 }, { 1, 4, 2 }, { 1, 4, 2 }, { 1, 4, 2 }, { 1, 4, 2 }, }, + { L"05", { 1, 0, 1 }, { 1, 5, 2 }, { 1, 5, 2 }, { 1, 5, 2 }, { 1, 5, 2 }, }, + { L"06", { 1, 0, 1 }, { 1, 6, 2 }, { 1, 6, 2 }, { 1, 6, 2 }, { 1, 6, 2 }, }, + { L"07", { 1, 0, 1 }, { 1, 7, 2 }, { 1, 7, 2 }, { 1, 7, 2 }, { 1, 7, 2 }, }, + { L"08", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 8, 2 }, { 1, 8, 2 }, { 1, 0, 1 }, }, + { L"09", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 9, 2 }, { 1, 9, 2 }, { 1, 0, 1 }, }, + { L"0A", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 10, 2 }, { 1, 0, 1 }, }, + { L"0B", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 11, 2 }, { 1, 0, 1 }, }, + { L"0C", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 12, 2 }, { 1, 0, 1 }, }, + { L"0D", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 13, 2 }, { 1, 0, 1 }, }, + { L"0E", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 14, 2 }, { 1, 0, 1 }, }, + { L"0F", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 15, 2 }, { 1, 0, 1 }, }, + { L"0X", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, }, + { L"0a", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 10, 2 }, { 1, 0, 1 }, }, + { L"0b", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 11, 2 }, { 1, 0, 1 }, }, + { L"0c", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 12, 2 }, { 1, 0, 1 }, }, + { L"0d", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 13, 2 }, { 1, 0, 1 }, }, + { L"0e", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 14, 2 }, { 1, 0, 1 }, }, + { L"0f", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 15, 2 }, { 1, 0, 1 }, }, + { L"0x", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, }, + // all digits with leading one + { L"10", { 1, 2, 2 }, { 1, 8, 2 }, { 1, 10, 2 }, { 1, 16, 2 }, { 1, 10, 2 }, }, + { L"11", { 1, 3, 2 }, { 1, 9, 2 }, { 1, 11, 2 }, { 1, 17, 2 }, { 1, 11, 2 }, }, + { L"12", { 1, 1, 1 }, { 1, 10, 2 }, { 1, 12, 2 }, { 1, 18, 2 }, { 1, 12, 2 }, }, + { L"13", { 1, 1, 1 }, { 1, 11, 2 }, { 1, 13, 2 }, { 1, 19, 2 }, { 1, 13, 2 }, }, + { L"14", { 1, 1, 1 }, { 1, 12, 2 }, { 1, 14, 2 }, { 1, 20, 2 }, { 1, 14, 2 }, }, + { L"15", { 1, 1, 1 }, { 1, 13, 2 }, { 1, 15, 2 }, { 1, 21, 2 }, { 1, 15, 2 }, }, + { L"16", { 1, 1, 1 }, { 1, 14, 2 }, { 1, 16, 2 }, { 1, 22, 2 }, { 1, 16, 2 }, }, + { L"17", { 1, 1, 1 }, { 1, 15, 2 }, { 1, 17, 2 }, { 1, 23, 2 }, { 1, 17, 2 }, }, + { L"18", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 18, 2 }, { 1, 24, 2 }, { 1, 18, 2 }, }, + { L"19", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 19, 2 }, { 1, 25, 2 }, { 1, 19, 2 }, }, + { L"1A", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 26, 2 }, { 1, 1, 1 }, }, + { L"1B", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 27, 2 }, { 1, 1, 1 }, }, + { L"1C", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 28, 2 }, { 1, 1, 1 }, }, + { L"1D", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 29, 2 }, { 1, 1, 1 }, }, + { L"1E", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 30, 2 }, { 1, 1, 1 }, }, + { L"1F", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 31, 2 }, { 1, 1, 1 }, }, + { L"1X", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, }, + { L"1a", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 26, 2 }, { 1, 1, 1 }, }, + { L"1b", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 27, 2 }, { 1, 1, 1 }, }, + { L"1c", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 28, 2 }, { 1, 1, 1 }, }, + { L"1d", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 29, 2 }, { 1, 1, 1 }, }, + { L"1e", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 30, 2 }, { 1, 1, 1 }, }, + { L"1f", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 31, 2 }, { 1, 1, 1 }, }, + { L"1x", { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, }, + // all digits with leading binary prefix + { L"0b0", { 1, 0, 3 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 176, 3 }, { 1, 0, 3 }, }, + { L"0b1", { 1, 1, 3 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 177, 3 }, { 1, 1, 3 }, }, + { L"0b2", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 178, 3 }, { 1, 0, 1 }, }, + { L"0b3", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 179, 3 }, { 1, 0, 1 }, }, + { L"0b4", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 180, 3 }, { 1, 0, 1 }, }, + { L"0b5", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 181, 3 }, { 1, 0, 1 }, }, + { L"0b6", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 182, 3 }, { 1, 0, 1 }, }, + { L"0b7", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 183, 3 }, { 1, 0, 1 }, }, + { L"0b8", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 184, 3 }, { 1, 0, 1 }, }, + { L"0b9", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 185, 3 }, { 1, 0, 1 }, }, + { L"0bA", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 186, 3 }, { 1, 0, 1 }, }, + { L"0bB", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 187, 3 }, { 1, 0, 1 }, }, + { L"0bC", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 188, 3 }, { 1, 0, 1 }, }, + { L"0bD", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 189, 3 }, { 1, 0, 1 }, }, + { L"0bE", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 190, 3 }, { 1, 0, 1 }, }, + { L"0bF", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 191, 3 }, { 1, 0, 1 }, }, + { L"0bX", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 11, 2 }, { 1, 0, 1 }, }, + { L"0ba", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 186, 3 }, { 1, 0, 1 }, }, + { L"0bb", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 187, 3 }, { 1, 0, 1 }, }, + { L"0bc", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 188, 3 }, { 1, 0, 1 }, }, + { L"0bd", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 189, 3 }, { 1, 0, 1 }, }, + { L"0be", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 190, 3 }, { 1, 0, 1 }, }, + { L"0bf", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 191, 3 }, { 1, 0, 1 }, }, + { L"0bx", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 11, 2 }, { 1, 0, 1 }, }, + // all digits with leading hexadecimal prefix + { L"0x0", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 3 }, { 1, 0, 3 }, }, + { L"0x1", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 1, 3 }, { 1, 1, 3 }, }, + { L"0x2", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 2, 3 }, { 1, 2, 3 }, }, + { L"0x3", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 3, 3 }, { 1, 3, 3 }, }, + { L"0x4", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 4, 3 }, { 1, 4, 3 }, }, + { L"0x5", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 5, 3 }, { 1, 5, 3 }, }, + { L"0x6", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 6, 3 }, { 1, 6, 3 }, }, + { L"0x7", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 7, 3 }, { 1, 7, 3 }, }, + { L"0x8", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 8, 3 }, { 1, 8, 3 }, }, + { L"0x9", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 9, 3 }, { 1, 9, 3 }, }, + { L"0xA", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 10, 3 }, { 1, 10, 3 }, }, + { L"0xB", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 11, 3 }, { 1, 11, 3 }, }, + { L"0xC", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 12, 3 }, { 1, 12, 3 }, }, + { L"0xD", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 13, 3 }, { 1, 13, 3 }, }, + { L"0xE", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 14, 3 }, { 1, 14, 3 }, }, + { L"0xF", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 15, 3 }, { 1, 15, 3 }, }, + { L"0xX", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, }, + { L"0xa", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 10, 3 }, { 1, 10, 3 }, }, + { L"0xb", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 11, 3 }, { 1, 11, 3 }, }, + { L"0xc", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 12, 3 }, { 1, 12, 3 }, }, + { L"0xd", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 13, 3 }, { 1, 13, 3 }, }, + { L"0xe", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 14, 3 }, { 1, 14, 3 }, }, + { L"0xf", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 15, 3 }, { 1, 15, 3 }, }, + { L"0xX", { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, { 1, 0, 1 }, }, + // terminator + { L"" } +}; + +#define SWSCANF_TEST(string, format, expret, expval, explen) \ + do { \ + int ret = 0, val = 0, len = 0; \ + ret = swscanf(string, format "%n", &val, &len); \ + ATF_CHECK_EQ(expret, ret); \ + if (expret && ret) { \ + ATF_CHECK_EQ(expval, val); \ + ATF_CHECK_EQ(explen, len); \ + } \ + } while (0) + +ATF_TC_WITHOUT_HEAD(swscanf_b); +ATF_TC_BODY(swscanf_b, tc) +{ + const struct swscanf_test_case *stc; + wchar_t input[16]; + + for (stc = swscanf_test_cases; *stc->input; stc++) { + wcscpy(input + 1, stc->input); + SWSCANF_TEST(input + 1, L"%b", stc->b.ret, stc->b.val, stc->b.len); + input[0] = L'+'; + SWSCANF_TEST(input, L"%b", stc->b.ret, stc->b.val, stc->b.len ? stc->b.len + 1 : 0); + input[0] = L'-'; + SWSCANF_TEST(input, L"%b", stc->b.ret, -stc->b.val, stc->b.len ? stc->b.len + 1 : 0); + } +} + +ATF_TC_WITHOUT_HEAD(swscanf_o); +ATF_TC_BODY(swscanf_o, tc) +{ + const struct swscanf_test_case *stc; + wchar_t input[16]; + + for (stc = swscanf_test_cases; *stc->input; stc++) { + wcscpy(input + 1, stc->input); + SWSCANF_TEST(input + 1, L"%o", stc->o.ret, stc->o.val, stc->o.len); + input[0] = L'+'; + SWSCANF_TEST(input, L"%o", stc->o.ret, stc->o.val, stc->o.len ? stc->o.len + 1 : 0); + input[0] = L'-'; + SWSCANF_TEST(input, L"%o", stc->o.ret, -stc->o.val, stc->o.len ? stc->o.len + 1 : 0); + } +} + +ATF_TC_WITHOUT_HEAD(swscanf_d); +ATF_TC_BODY(swscanf_d, tc) +{ + const struct swscanf_test_case *stc; + wchar_t input[16]; + + for (stc = swscanf_test_cases; *stc->input; stc++) { + wcscpy(input + 1, stc->input); + SWSCANF_TEST(input + 1, L"%d", stc->d.ret, stc->d.val, stc->d.len); + input[0] = L'+'; + SWSCANF_TEST(input, L"%d", stc->d.ret, stc->d.val, stc->d.len ? stc->d.len + 1 : 0); + input[0] = L'-'; + SWSCANF_TEST(input, L"%d", stc->d.ret, -stc->d.val, stc->d.len ? stc->d.len + 1 : 0); + } +} + +ATF_TC_WITHOUT_HEAD(swscanf_x); +ATF_TC_BODY(swscanf_x, tc) +{ + const struct swscanf_test_case *stc; + wchar_t input[16]; + + for (stc = swscanf_test_cases; *stc->input; stc++) { + wcscpy(input + 1, stc->input); + SWSCANF_TEST(input + 1, L"%x", stc->x.ret, stc->x.val, stc->x.len); + input[0] = L'+'; + SWSCANF_TEST(input, L"%x", stc->x.ret, stc->x.val, stc->x.len ? stc->x.len + 1 : 0); + input[0] = L'-'; + SWSCANF_TEST(input, L"%x", stc->x.ret, -stc->x.val, stc->x.len ? stc->x.len + 1 : 0); + } +} + +ATF_TC_WITHOUT_HEAD(swscanf_i); +ATF_TC_BODY(swscanf_i, tc) +{ + const struct swscanf_test_case *stc; + wchar_t input[16]; + + for (stc = swscanf_test_cases; *stc->input; stc++) { + wcscpy(input + 1, stc->input); + SWSCANF_TEST(input + 1, L"%i", stc->i.ret, stc->i.val, stc->i.len); + input[0] = L'+'; + SWSCANF_TEST(input, L"%i", stc->i.ret, stc->i.val, stc->i.len ? stc->i.len + 1 : 0); + input[0] = L'-'; + SWSCANF_TEST(input, L"%i", stc->i.ret, -stc->i.val, stc->i.len ? stc->i.len + 1 : 0); + } +} + +ATF_TP_ADD_TCS(tp) +{ + setlocale(LC_NUMERIC, "en_US.UTF-8"); + ATF_TP_ADD_TC(tp, swscanf_b); + ATF_TP_ADD_TC(tp, swscanf_o); + ATF_TP_ADD_TC(tp, swscanf_d); + ATF_TP_ADD_TC(tp, swscanf_x); + ATF_TP_ADD_TC(tp, swscanf_i); + return (atf_no_error()); +} From nobody Mon Aug 28 15:38:23 2023 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 4RZF7z495dz4rgHp; Mon, 28 Aug 2023 15:38:23 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZF7z3RQmz4cWj; Mon, 28 Aug 2023 15:38:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693237103; 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=i40K6M7gmwHgT0Ds9dv/bHsfNSEEZaA19JbFVg8UBCM=; b=ruJddITkR7+Oo5pYrW2I52P88h6YKaz73ilHu78bkX4SQn7hCpMgmxMJLweTNYKiiC+jFu 7zpnZ/JINQ5EaLjI+kU2Cl9Q93+jabjYxStgD1soIsEDH9nxxb28v7V+Bp6HN65fSNLHaW VqZX+mUS7z1wpW0W/JdYa1h6X2YIFBDbo/2G0SoBJohnnrOFAj6Mmm5XYH1rbjlbW7ofue VmCSD6z2nyDMzQzQ+ExWrLC8lJCil/sLYvlCIuvNZOudsKeHYYZKjEmIZeYt/v5rsI4HtD I6CVhHFVZCJZBJmq9+hP2JjdkEOPOT4ggMYEpNq2Ku/8xzE8MVU2hSb+f5cAYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693237103; a=rsa-sha256; cv=none; b=B7fWjvk0T0JiPQEluAPbmUXObw8C1YSSIrX8GqVUevMRQHMSxfQ823NceO8NMHzEfATRIM 4EaTfbsmf75KhQWlFW8j8dRFwFF69CytQgZeDBqlD8ilXCc7jBhVWWoViwqeW/dkH0qPAK WV9LnVztxE23kWozKihvquIIDzuBzZiTaB4YkAt8FV1c+Vq2upVF2QdpRrXNmw0TgGZapw m8Drja/UbREv/2GH4YKJpe83FhG96nNbpdcZ+SYrGiOu8gHbTUkdvmWJ4NapAG89FSYXao AwSm7Kn7JLhNHYZUq71RYMZrGcDzcEv+P1VQuOJJc45agsGYaEXIeWKeRbV0ww== 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=1693237103; 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=i40K6M7gmwHgT0Ds9dv/bHsfNSEEZaA19JbFVg8UBCM=; b=lGM/BJG5OuJnXeKWB9Wxt8CHuLSVzayKv2sCkdZV+Xg7ppBLZd/5EOTicKKiAYBG4Oh35X 42xFQoS72r/t/LUdca+iK1/WV1PQrSSYJHF5fjIqXbuxlwGWwZI6zr30CB+vjJl8NK/Qdy FV8H3IgQ7f61sSx01u9cRrj74hjCIS0+BhZPaPVDW9GtdSJw+F5ApKbTt4h9WiPHTETuEe fRMZXrf3fvtVekCAUy0meShGvnDzilFn9hXuNdqN6mUmw+ehm/bG7IUBHRB6934xTeCOx5 6wHPO5Pbhg+TZsu6hnql1j8e/jrngKLUvQGhGHbXn4OBKYoYYFJAmzjBOoknTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZF7z2CJ9zNq; Mon, 28 Aug 2023 15:38:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SFcNV9077948; Mon, 28 Aug 2023 15:38:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SFcNNm077945; Mon, 28 Aug 2023 15:38:23 GMT (envelope-from git) Date: Mon, 28 Aug 2023 15:38:23 GMT Message-Id: <202308281538.37SFcNNm077945@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 76edfabbecde - main - libc: Document support for binary integers. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76edfabbecdec686a570b8e009d5ea4112f943e0 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=76edfabbecdec686a570b8e009d5ea4112f943e0 commit 76edfabbecdec686a570b8e009d5ea4112f943e0 Author: Dag-Erling Smørgrav AuthorDate: 2023-08-28 15:34:17 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-08-28 15:34:17 +0000 libc: Document support for binary integers. Reviewed by: debdrup, emaste Differential Revision: https://reviews.freebsd.org/D41522 --- lib/libc/stdio/printf.3 | 34 +++++++++++++++++++++++++--------- lib/libc/stdio/scanf.3 | 29 +++++++++++++++++++---------- lib/libc/stdlib/strtol.3 | 4 +++- lib/libc/stdlib/strtoul.3 | 4 +++- 4 files changed, 50 insertions(+), 21 deletions(-) diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index 3e5c6ca23511..110851e2a421 100644 --- a/lib/libc/stdio/printf.3 +++ b/lib/libc/stdio/printf.3 @@ -31,7 +31,7 @@ .\" .\" @(#)printf.3 8.1 (Berkeley) 6/4/93 .\" -.Dd May 22, 2018 +.Dd August 21, 2023 .Dt PRINTF 3 .Os .Sh NAME @@ -212,6 +212,17 @@ and .Cm u conversions, this option has no effect. For +.Cm b +and +.Cm B +conversions, a non-zero result has the string +.Ql 0b +(or +.Ql 0B +for +.Cm B +conversions) prepended to it. +For .Cm o conversions, the precision of the number is increased to force the first character of the output string to a zero. @@ -245,7 +256,7 @@ For all conversions except .Cm n , the converted value is padded on the left with zeros rather than blanks. If a precision is given with a numeric conversion -.Cm ( d , i , o , u , i , x , +.Cm ( b , B , d , i , o , u , i , x , and .Cm X ) , the @@ -301,7 +312,7 @@ followed by an optional digit string. If the digit string is omitted, the precision is taken as zero. This gives the minimum number of digits to appear for -.Cm d , i , o , u , x , +.Cm b , B , d , i , o , u , x , and .Cm X conversions, the number of digits to appear after the decimal-point for @@ -319,12 +330,12 @@ conversions. .It An optional length modifier, that specifies the size of the argument. The following length modifiers are valid for the -.Cm d , i , n , o , u , x , +.Cm b , B , d , i , n , o , u , x , or .Cm X conversion: .Bl -column ".Cm q Em (deprecated)" ".Vt signed char" ".Vt unsigned long long" ".Vt long long *" -.It Sy Modifier Ta Cm d , i Ta Cm o , u , x , X Ta Cm n +.It Sy Modifier Ta Cm d , i Ta Cm b , B , o , u , x , X Ta Cm n .It Cm hh Ta Vt "signed char" Ta Vt "unsigned char" Ta Vt "signed char *" .It Cm h Ta Vt short Ta Vt "unsigned short" Ta Vt "short *" .It Cm l No (ell) Ta Vt long Ta Vt "unsigned long" Ta Vt "long *" @@ -339,7 +350,7 @@ Note: the .Cm t modifier, when applied to a -.Cm o , u , x , +.Cm b , B , o , u , x , or .Cm X conversion, indicates that the argument is of an unsigned type @@ -403,11 +414,16 @@ If a single format directive mixes positional and non-positional arguments, the results are undefined. .Pp The conversion specifiers and their meanings are: -.Bl -tag -width ".Cm diouxX" -.It Cm diouxX +.Bl -tag -width ".Cm bBdiouxX" +.It Cm bBdiouxX The .Vt int -(or appropriate variant) argument is converted to signed decimal +(or appropriate variant) argument is converted to +unsigned binary +.Cm ( b +and +.Cm B ) , +signed decimal .Cm ( d and .Cm i ) , diff --git a/lib/libc/stdio/scanf.3 b/lib/libc/stdio/scanf.3 index b1c50e10a795..6cefdb133983 100644 --- a/lib/libc/stdio/scanf.3 +++ b/lib/libc/stdio/scanf.3 @@ -31,7 +31,7 @@ .\" .\" @(#)scanf.3 8.2 (Berkeley) 12/11/93 .\" -.Dd April 2, 2022 +.Dd August 21, 2023 .Dt SCANF 3 .Os .Sh NAME @@ -141,7 +141,7 @@ The conversion that follows occurs as usual, but no pointer is used; the result of the conversion is simply discarded. .It Cm hh Indicates that the conversion will be one of -.Cm dioux +.Cm bdioux or .Cm n and the next pointer is a pointer to a @@ -150,7 +150,7 @@ and the next pointer is a pointer to a .Vt int ) . .It Cm h Indicates that the conversion will be one of -.Cm dioux +.Cm bdioux or .Cm n and the next pointer is a pointer to a @@ -159,7 +159,7 @@ and the next pointer is a pointer to a .Vt int ) . .It Cm l No (ell) Indicates that the conversion will be one of -.Cm dioux +.Cm bdioux or .Cm n and the next pointer is a pointer to a @@ -185,7 +185,7 @@ and the next pointer is a pointer to an array of .Vt char ) . .It Cm ll No (ell ell) Indicates that the conversion will be one of -.Cm dioux +.Cm bdioux or .Cm n and the next pointer is a pointer to a @@ -201,7 +201,7 @@ and the next pointer is a pointer to .Vt "long double" . .It Cm j Indicates that the conversion will be one of -.Cm dioux +.Cm bdioux or .Cm n and the next pointer is a pointer to a @@ -210,7 +210,7 @@ and the next pointer is a pointer to a .Vt int ) . .It Cm t Indicates that the conversion will be one of -.Cm dioux +.Cm bdioux or .Cm n and the next pointer is a pointer to a @@ -219,7 +219,7 @@ and the next pointer is a pointer to a .Vt int ) . .It Cm z Indicates that the conversion will be one of -.Cm dioux +.Cm bdioux or .Cm n and the next pointer is a pointer to a @@ -229,7 +229,7 @@ and the next pointer is a pointer to a .It Cm q (deprecated.) Indicates that the conversion will be one of -.Cm dioux +.Cm bdioux or .Cm n and the next pointer is a pointer to a @@ -273,6 +273,10 @@ matches a single input .Ql % character. No conversion is done, and assignment does not occur. +.It Cm b , B +Matches an optionally signed binary integer; +the next pointer must be a pointer to +.Vt "unsigned int" . .It Cm d Matches an optionally signed decimal integer; the next pointer must be a pointer to @@ -281,7 +285,12 @@ the next pointer must be a pointer to Matches an optionally signed integer; the next pointer must be a pointer to .Vt int . -The integer is read in base 16 if it begins +The integer is read +in base 2 if it begins with +.Ql 0b +or +.Ql 0B , +in base 16 if it begins with .Ql 0x or diff --git a/lib/libc/stdlib/strtol.3 b/lib/libc/stdlib/strtol.3 index 9656ba546915..e2c5ff7ae3cb 100644 --- a/lib/libc/stdlib/strtol.3 +++ b/lib/libc/stdlib/strtol.3 @@ -31,7 +31,7 @@ .\" .\" @(#)strtol.3 8.1 (Berkeley) 6/4/93 .\" -.Dd November 28, 2001 +.Dd August 21, 2023 .Dt STRTOL 3 .Os .Sh NAME @@ -108,6 +108,8 @@ If .Fa base is zero or 16, the string may then include a +.Dq Li 0b +prefix, and the number will be read in base 2; or it may include a .Dq Li 0x prefix, and the number will be read in base 16; otherwise, a zero diff --git a/lib/libc/stdlib/strtoul.3 b/lib/libc/stdlib/strtoul.3 index e05d7a7728cd..41b3b2c578bc 100644 --- a/lib/libc/stdlib/strtoul.3 +++ b/lib/libc/stdlib/strtoul.3 @@ -31,7 +31,7 @@ .\" .\" @(#)strtoul.3 8.1 (Berkeley) 6/4/93 .\" -.Dd November 28, 2001 +.Dd August 21, 2023 .Dt STRTOUL 3 .Os .Sh NAME @@ -108,6 +108,8 @@ If .Fa base is zero or 16, the string may then include a +.Dq Li 0b +prefix, and the number will be read in base 2; or it may include a .Dq Li 0x prefix, and the number will be read in base 16; otherwise, a zero From nobody Mon Aug 28 16:19:26 2023 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 4RZG3b6XQJz4rhyF for ; Mon, 28 Aug 2023 16:19:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZG3b38rnz3GMg for ; Mon, 28 Aug 2023 16:19:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-99c136ee106so439353366b.1 for ; Mon, 28 Aug 2023 09:19:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1693239577; x=1693844377; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fSAEgjSGQUxN9UVhXUQhm9BhVwNck+dmt4bOnKKm2mY=; b=kXb0iEbEjyrd8y6ScV8b9NTcgjhp1pXHpNMLgmSSbHUTI5nky07nFrJu0Y683T3NPJ F3S+Oi2QpYlSHpacXi6FVIJ2P4dphUqXcZ81kIR6bbIxODrKn9xyEx92XlrFxT2HuhDb Q5QuZVL4wINpO6gtVUeWIy/gdsUQWQmrrtjo0WI3WvMTTGMWJaepi0WHRKeAYXkrLUTw 2Oo1NSmrtYRG5CC8TUoEv8Oquw63sFn1g8TmkpbSP61MPht4uQRO+65KWiH4IWgWJHWI sDl/BCqbWcQicQ70P7z7QuUHGA0PYQWZPa6k0nwsxJamO4c+wA1bvgUHCnRBoqFbEhux JnbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693239577; x=1693844377; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fSAEgjSGQUxN9UVhXUQhm9BhVwNck+dmt4bOnKKm2mY=; b=eOIVzhVXAdX+Pj7go5OhXrlk7EQ/8fAbo3T8DfyndGiZ0zYKcH9MKZrSBD/Sa1/9vx HmwrYzKh6EiSBXOPdhOS73JHALBkV6ioQgLNQFlQSg8+nNT2LDSqLieQm+BwHNFHehI/ c4m3GrXDEcCOWet++PYBcaxxOdJrLNqNfBYqEjFdoCagtoAQi4XIEpUjlzW6Kyj+lqyL LoV+crOju/5rLCVI2YxbY9kJ636MUxoJG1ydSFTyic75oG3OpeDrd6tGZmE44ZUv6+xR lASkI5DJv0zBqaDIBmKzbDal4+8AqPDxhEW2Y7OBxhq9pnOnfqqhzbRUtdEOiDtxyCuQ QW1A== X-Gm-Message-State: AOJu0YwCCPlNTIg4t4iGIKJDF7ZORpRhv8uqMrCoDRmu5TgRhpKztwLm 9y0bCVx5okHtENc6LnANgVQi+M8Jna8jo7ZI3uZbaznosUBO+wv9u7w= X-Google-Smtp-Source: AGHT+IFQHoxIFw4EfsInHa4h+l/2EoDaN54vCovqQ+0nixeQWcI8E6xNljIA0bJUzKu+7UEZbpNZXkVaFrbVWPWCffw= X-Received: by 2002:a17:907:b1a:b0:99c:6692:7f76 with SMTP id h26-20020a1709070b1a00b0099c66927f76mr21621323ejl.16.1693239577396; Mon, 28 Aug 2023 09:19:37 -0700 (PDT) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202308242029.37OKTmVs091755@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Mon, 28 Aug 2023 10:19:26 -0600 Message-ID: Subject: Re: git: af93fea71038 - main - timerfd: Move implementation from linux compat to sys/kern To: Alexey Dokuchaev , Jake Freeland Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000087d9d90603fe0fe6" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4RZG3b38rnz3GMg --00000000000087d9d90603fe0fe6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Added cc for Jake On Mon, Aug 28, 2023 at 6:17=E2=80=AFAM Alexey Dokuchaev wrote: > On Thu, Aug 24, 2023 at 08:29:48PM +0000, Warner Losh wrote: > > commit af93fea710385b2b11f0cabd377e7ed6f3d97c34 > > > > timerfd: Move implementation from linux compat to sys/kern > > > > Move the timerfd impelemntation from linux compat code to sys/kern. > > Could you quickly summarize why we need these linuxish bits in FreeBSD? > We've lived for years without it. Had expected to find the rationale > in DR but alas. :( Thanks, > I'll let Jake answer this and > glibc misc/tst-timerfd test fails now under Linux emulation I think his new review https://reviews.freebsd.org/D41600 addresses this issue maybe Warner --00000000000087d9d90603fe0fe6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Added cc for Jake

On Mon, Aug 28, 2023 at 6:17=E2=80= =AFAM Alexey Dokuchaev <danfe@freeb= sd.org> wrote:
On Thu, Aug 24, 2023 at 08:29:48PM +0000, Warner Losh wrote:
> commit af93fea710385b2b11f0cabd377e7ed6f3d97c34
>
>=C2=A0 =C2=A0timerfd: Move implementation from linux compat to sys/kern=
>
>=C2=A0 =C2=A0Move the timerfd impelemntation from linux compat code to = sys/kern.

Could you quickly summarize why we need these linuxish bits in FreeBSD?
We've lived for years without it.=C2=A0 Had expected to find the ration= ale
in DR but alas. :(=C2=A0 Thanks,

I'= ll let Jake answer this and

> glibc misc/tst-ti= merfd test fails now under Linux emulation
=
I think his new review=C2=A0https://reviews.freebsd.org/D41600 addresses this issue = maybe

Warner
--00000000000087d9d90603fe0fe6-- From nobody Mon Aug 28 17:18:58 2023 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 4RZHN25yh9z4rm0g; Mon, 28 Aug 2023 17:18:58 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZHN25K2rz3N1X; Mon, 28 Aug 2023 17:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693243138; 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=oJOSDi3rE2mDRN3+rVSb99X1Vs3jCrnECowGPWBtb0E=; b=i8GZKpAC3Z60Zj1jdThRyU88LEYroGOVthQtWKisSp5SzxDCPRmIEQsc0BLgv98w5LSfYJ fy/a7jNKN6AyRSmZaXhrAgGuE1DTa4bQi0x2JXv2fkQ+eH6sh9PpsioX6/GWDSVmJcx/L+ fnqgIbq7L4hyws4LKRdZ/Vg+hEdQjMIPQ140B/HijOOhkbPIU8fm4rtc5Jlk7fB3N7Z5dy 5OtFdMCTzhsmbBCIwN+6f+1AaFJ0Z4yx5exz4JwWg7ShNwnYZqO7ZVb0eGtbP9SoYwBZ5i 3bag42W4lutICDPVdrS5n2y3K+86LCyvsiQabrr/XSVOThUqsrrtOFP78ubfWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693243138; a=rsa-sha256; cv=none; b=TjRCTlyr3pOvm6XMMuV1zK8W6Qs1J9GBNXdRej6JADaeQdcO2AKOj+mkHlniZ4d3fC1Axa v7C85pQr5TOFZpuNqcOKzprolZe381J+LmBLA9tGPrJZEC+6HUFP6YBdbVrd1QJJ9EFG08 7Uj+Sd3A2GGEkCmcbcsChd9z0daDkqTMzJEvgOXOZ1yzVnT2zq2Df+0ZLoPujTLIVf9Fsu KL8H6eQZ6+K0/qpYcMmcKhXWzM0ybOx5+LBEa0Z7GvhrmtP+j0qPQ7OaSetyt7N+9tE36C BDZ1NkuHgm1vvRYNrz0h8iboufr4thPFItQ1ZTf+jH2+fBMOIyhN0ZP24HIuOw== 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=1693243138; 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=oJOSDi3rE2mDRN3+rVSb99X1Vs3jCrnECowGPWBtb0E=; b=I0RDo6M9wrAwnvWbahS6eVjB36hCijG2tMCtuaGaeOTUaEurJ1Pm2TfTm5RwVG+SHJwqCY iHDxQuld0Kb7UQWPkS5j4soCmG7C22Wa5NIG7REWsZO/s1g9HYogWXXHtJM/+uYg9WyfrI qLs8/DNoCMi5j9btdJK3sLLK2PDHP1wc6+o24zCdFoLjoFM+wcVODCSh3O2OE/NVBBMASg 1+jf3R8bqT9prxysGLuLSl/Mzjww5HbAmJj9ZL0OhHFUjrL+crQT0IL5FE8vzjejrwiQD+ FCuCByo52zA06wnGFxfB3xqzLLF1QwTkF1YQnziqGxrp3H/UGJ/RsFeUz1uz1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZHN24Fvlz2mN; Mon, 28 Aug 2023 17:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SHIwfB045581; Mon, 28 Aug 2023 17:18:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SHIwNe045578; Mon, 28 Aug 2023 17:18:58 GMT (envelope-from git) Date: Mon, 28 Aug 2023 17:18:58 GMT Message-Id: <202308281718.37SHIwNe045578@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: e0752f431b01 - main - Revert "libc/locale tests: temporarily skip lib.libc.locale.c16rtomb_test.c16rtomb_utf_8_test" 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e0752f431b01f44c50df01f54f1c2c278304a899 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=e0752f431b01f44c50df01f54f1c2c278304a899 commit e0752f431b01f44c50df01f54f1c2c278304a899 Author: Li-Wen Hsu AuthorDate: 2023-08-28 17:18:42 +0000 Commit: Li-Wen Hsu CommitDate: 2023-08-28 17:18:42 +0000 Revert "libc/locale tests: temporarily skip lib.libc.locale.c16rtomb_test.c16rtomb_utf_8_test" This reverts commit b80572fe3b3a93e0490c90901c7e5336f0210303. This has been fixed in e2030ca246a777c50a7aacb3a35f88addded21cf. PR: 265871 --- lib/libc/tests/locale/c16rtomb_test.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/libc/tests/locale/c16rtomb_test.c b/lib/libc/tests/locale/c16rtomb_test.c index 85c7c3584962..df9fbcf61711 100644 --- a/lib/libc/tests/locale/c16rtomb_test.c +++ b/lib/libc/tests/locale/c16rtomb_test.c @@ -125,9 +125,6 @@ ATF_TC_WITHOUT_HEAD(c16rtomb_utf_8_test); ATF_TC_BODY(c16rtomb_utf_8_test, tc) { - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/265871"); - require_lc_ctype("en_US.UTF-8"); /* Unicode character 'Pile of poo'. */ From nobody Mon Aug 28 18:25:39 2023 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 4RZJs01Slsz4rq20; Mon, 28 Aug 2023 18:25:40 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZJs00zKsz3WZ3; Mon, 28 Aug 2023 18:25:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693247140; 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=sFH3XmF4maRhpZULmepBdHu3EvBchSEVxcUpSSBbdiM=; b=mg20jaKoQBVGScMUJbr1HrprcqVk3srdqBw5KzOjaB/iiZ6+W9V25HCB/+vlselwKO9xiH RZ0vzH0p5bz9XZptXbjpVntdtu3aHeRMqSSgGvW8rOQDdWnWGFfd5xCS7y/ENqvXyvJh4E hPkI0vk/xkSAWIdjheXfHqYh7f1tFc/przFMouHlwd/mRGDCAQzi9dvmMoxBwKcSNklEL9 wfXGzN7ME1vCo09/erXHi1ih5aGecVTo3lbwh474u1fkuuDulq7FmOb4B8gyStwKvsvn2X UMW/DZxz5WpG1+Ok3iAEgduc1LoIICcHmYa6tmCcK9sMx00mbHe0e+1JzbyVvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693247140; a=rsa-sha256; cv=none; b=vLdpBM6YjP0Oh3HPUo6Zuzm9J7RjwCUfphj2cgUmk0u6tO/2gPAQf48WfzWjI740WUd6W/ e4oT2j5JAbPl7zQX3DJSB4qWEfgRGSKi5PPv7HKPELuTHnAQfxYR76qusPy2YQXEmTGwDk 8wgtrZxm/f501WNDEWt4zCjhod0bXaNIwCY/tEODOkOSfNq1yMPDuv+R4ZRAyUNIQrlOlA C23sCaQ+gg+sHmZcywxiNZmuFJzzygaBC3GbkaN964EKC5E84X5K3ch/jD6Suzu9b+Db43 0De64Y+3OCTCoISLYeibNBGKPL1ruTBGN51TxqswPDmpAshjJns6IqvGXuRWCA== 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=1693247140; 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=sFH3XmF4maRhpZULmepBdHu3EvBchSEVxcUpSSBbdiM=; b=sL18JqMiN0FgJPgGf/UF4ENaY54qa8+xytKFbyamRhnwB09L4RHdTqa0BIiHVxSc8/7EYv JtF0q9X5EB11tUn2mNE1k28+sGeDkOvmwT2t80dSgYHu9z54O9T0C1iI0OhoNldYpVKzjA Wh8SEfzwOokcvmQZHQRaIgIza4YWGlxySzWbucSn2Uro1Nz1RtYyhE2UzVEfEnX52eB2iP FGKSU3mqvImPh88Gg7A/CSgY5uGvyOFuYAfpOaRDmcsvb7+pQVtTUV2EB6AaqPPXq2d0JD yhD3T2bE/+01qYfLPlXtg4Q6THZqU4pE84mlgxXEfS4JSu2KB3/aYW33IxJCNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZJs002p4z4Nr; Mon, 28 Aug 2023 18:25:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SIPdje061577; Mon, 28 Aug 2023 18:25:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SIPdaI061574; Mon, 28 Aug 2023 18:25:39 GMT (envelope-from git) Date: Mon, 28 Aug 2023 18:25:39 GMT Message-Id: <202308281825.37SIPdaI061574@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jamie Gritton Subject: git: dab7fc49e7a6 - main - jail: make jail(8) man page more readable and more correct 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dab7fc49e7a65379a0050e8cab0b50afacdc0fc5 Auto-Submitted: auto-generated The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=dab7fc49e7a65379a0050e8cab0b50afacdc0fc5 commit dab7fc49e7a65379a0050e8cab0b50afacdc0fc5 Author: Jamie Gritton AuthorDate: 2023-08-28 18:22:36 +0000 Commit: Jamie Gritton CommitDate: 2023-08-28 18:22:36 +0000 jail: make jail(8) man page more readable and more correct The synopsis section of jail(8) is fine at showing everything that could be on the command line, but doesn't make much sense. Add some sub- ections for the different uses of the command. Also fix up the paragraph about command-line parameter specification, including removing some clearly erroneous information. Reviewed by: dvl MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41606 --- usr.sbin/jail/jail.8 | 52 +++++++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index ef071aae863e..6fb5fdfa0623 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -23,32 +23,47 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 12, 2023 +.\" $FreeBSD$ +.\" +.Dd August 26, 2023 .Dt JAIL 8 .Os .Sh NAME .Nm jail .Nd "manage system jails" .Sh SYNOPSIS +.Ss From Configuration File .Nm -.Op Fl dhilqv -.Op Fl J Ar jid_file -.Op Fl u Ar username -.Op Fl U Ar username -.Op Fl cmr -.Ar param Ns = Ns Ar value ... -.Op Cm command Ns = Ns Ar command ... -.Nm +.Op Fl cm .Op Fl dqv .Op Fl f Ar conf_file .Op Fl p Ar limit -.Op Fl cmr .Op Ar jail .Nm +.Op Fl r .Op Fl qv .Op Fl f Ar conf_file +.Op Fl p Ar limit +.Op Cm * | Ar jail ... +.Ss Without Configuration File +.Nm +.Op Fl cm +.Op Fl dhilqv +.Op Fl J Ar jid_file +.Op Fl u Ar username +.Op Fl U Ar username +.Ar param Ns = Ns Ar value ... +.Op Cm command Ns = Ns Ar command ... +.Nm .Op Fl rR +.Op Fl qv .Op Cm * | Ar jail ... +.Ss Show Parameters +.Nm +.Op Fl f Ar conf_file +.Fl e +.Ar separator +.Ss Backward Compatibility .Nm .Op Fl dhilqv .Op Fl J Ar jid_file @@ -58,10 +73,6 @@ .Op Fl s Ar securelevel .Ar path hostname ip Ns Op Cm \&, Ns Ar ... .Ar command ... -.Nm -.Op Fl f Ar conf_file -.Fl e -.Ar separator .Sh DESCRIPTION The .Nm @@ -238,10 +249,10 @@ would apply to jails with names like and .Dq foo.bar.baz . .Pp -A jail may be specified with parameters directly on the command line. -In this case, the -.Xr jail.conf 5 -file will not be used. +A jail may also be specified via parameters directly on the command line in +.Dq name=value +form, ignoring the contents of +.Xr jail.conf 5 . For backward compatibility, the command line may also have four fixed parameters, without names: .Ar path , @@ -249,11 +260,6 @@ parameters, without names: .Ar ip , and .Ar command . -This mode will always create a new jail, and the -.Fl c -and -.Fl m -options do not apply (and must not be present). .Ss Jail Parameters Parameters in the .Xr jail.conf 5 From nobody Mon Aug 28 19:01:41 2023 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 4RZKfk651xz4rs0p; Mon, 28 Aug 2023 19:01:50 +0000 (UTC) (envelope-from vishwin@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZKfk30h6z3ZZr; Mon, 28 Aug 2023 19:01:50 +0000 (UTC) (envelope-from vishwin@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693249310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jBJRr1XYYvhZsX3J125gOlC3y4XQWzeApaQRwhW8Xu4=; b=xFssul3fG14tvSKUjyv3iMdpQqIUj9LP1eulI65qHLBDyW5UAvaL4N939+bghoZdZz4S03 RNt9FArognEjqEx/wb8KyLcCGxLFydJkUzCnVl3DxtwE7h7KUWKWxmEtDp7aVzZnrv2bD1 heVy9tcDrXpFzfX34RQAozs+OhXF6+SLJbgzCU/4DD0zKBul9aMUkO5VJfpdc0W0hh1Ffu 3/UIvMNmXLip/mNsTyxNm7zZ4fzXkHT09zvXYGD4XlTufRqZU+66OyyEYWGV/jAQMp/yg5 RvL/HJ11JZayMX+xU7eMA6ZKqTHYi86F2hZeZ8qjJ6DY28i/WktAWCObjzskNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693249310; a=rsa-sha256; cv=none; b=Ca8cELUJSoWYGgKS3EFX1kS+Q66VBGtxiKwUQ4WMPwqjOZncYLpVNwmPLQrdogv14os2tG iG01Rkx6YRA9Yn5z54P5OAPzUMkBXEW3fD7dXKBUicLRTD+qMz0QcY+/2rXDQbrFGb/hFj X75bAptcVknv96UFpNA3ls1+yoAnGuIE0BKo2AWJXQdPPuxoMxRlI0vTnHUHHPba2J9xND n40CCu91+9KoZTuLqzZaTNM743qOOMXkl0y8rABdXzcl3Ly5j35SYoLxkvUMqF20T0b80K 7LgPiHSHAbPTk9gj2O2oQgtbq1ws8qsK/O89niW4Ol7SmHHmjEb5aG7q9TfeTQ== 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=1693249310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jBJRr1XYYvhZsX3J125gOlC3y4XQWzeApaQRwhW8Xu4=; b=e8oWUJsJTml5nN4oVEKXd2lz+0+KiBJlsMHQzxGS/s2eUbYx1IQFOS2ZuJ6/fTZa49cdpm pprT7SmHtbypj3jqDS7f4qb3vw3rtB3uapN4gXN+xfNznYtCE2qhbRlvgv2TCL2P0mXkQh T9tzd+rCLSCqy21bqd7BudWoeKo1H6MUiic2exjUVCaRDfGTgQ5GmVHcokl5kAiigPiB1o gu7nljnjc0ArYD9RzMPt7LntdDjDUQjpWS7hKx8JpmfvFOE/9U+eSdyBRKojZzE0Aqsni+ vS6GBbEgQTr9RGyrNXuSPEG5hNtO0+0P0Fa9t6lEt2qE+dx8htLBBuaTF5PPLA== Received: from [IPV6:2601:98a:d80:d0:56ee:75ff:fe50:69b5] (unknown [IPv6:2601:98a:d80:d0:56ee:75ff:fe50:69b5]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: vishwin/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RZKfk0KM0zCW8; Mon, 28 Aug 2023 19:01:49 +0000 (UTC) (envelope-from vishwin@freebsd.org) Message-ID: Date: Mon, 28 Aug 2023 15:01:41 -0400 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 To: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202308281511.37SFBt5L043961@gitrepo.freebsd.org> Content-Language: en-GB Cc: cy@freebsd.org From: Charlie Li Organization: FreeBSD Project Subject: Re: git: 2964804ef95c - main - librt: unbreak LIB32 build In-Reply-To: <202308281511.37SFBt5L043961@gitrepo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------IMU21rJxFhroSjpATIJOAqc4" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------IMU21rJxFhroSjpATIJOAqc4 Content-Type: multipart/mixed; boundary="------------ecwI4qHBS80MmZZzyO1ejThg"; protected-headers="v1" From: Charlie Li To: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: cy@freebsd.org Message-ID: Subject: Re: git: 2964804ef95c - main - librt: unbreak LIB32 build References: <202308281511.37SFBt5L043961@gitrepo.freebsd.org> In-Reply-To: <202308281511.37SFBt5L043961@gitrepo.freebsd.org> --------------ecwI4qHBS80MmZZzyO1ejThg Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 RGFnLUVybGluZyBTbcO4cmdyYXYgd3JvdGU6DQo+ICAgICAgRml4ZXM6ICAgICAgICAgIGYw MDYwMjNiMjI4MQ0KPiAgICAgIFJldmlld2VkIGJ5OiAgICBpbXANCj4gICAgICBEaWZmZXJl bnRpYWwgUmV2aXNpb246ICBodHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvRDQxNjE2DQo+ IC0tLQ0KPiAgIGxpYi9saWJydC9NYWtlZmlsZSB8IDIgKy0NCj4gICAxIGZpbGUgY2hhbmdl ZCwgMSBpbnNlcnRpb24oKyksIDEgZGVsZXRpb24oLSkNCj4gDQo+IGRpZmYgLS1naXQgYS9s aWIvbGlicnQvTWFrZWZpbGUgYi9saWIvbGlicnQvTWFrZWZpbGUNCj4gaW5kZXggOGI4ODBj NDFlYzQ0Li4yYzhlYjE0MDBmYjkgMTAwNjQ0DQo+IC0tLSBhL2xpYi9saWJydC9NYWtlZmls ZQ0KPiArKysgYi9saWIvbGlicnQvTWFrZWZpbGUNCj4gQEAgLTMsNyArMyw3IEBADQo+ICAg DQo+ICAgUEFDS0FHRT1jbGlicw0KPiAgIExJQj1ydA0KPiAtU0hMSUJESVI9L2xpYg0KPiAr U0hMSUJESVI/PS9saWINCj4gICBTSExJQl9NQUpPUj0gMQ0KPiAgIENGTEFHUys9LUkke1NS Q1RPUH0vbGliL2xpYmMvaW5jbHVkZSAtSSR7LkNVUkRJUn0NCj4gICAuaWZuZGVmIE5PX1RI UkVBRF9TVEFDS19VTldJTkQNCj4gDQo+IA0KVGhpcyByZXN1bHRzIGluIG5vIGxpYnJ0LnNv LjEgaW5zdGFsbGVkIGFueXdoZXJlLg0KDQotLSANCkNoYXJsaWUgTGkNCuKApm5vcGUsIHN0 aWxsIGRvbid0IGhhdmUgYW4gZXhpdCBsaW5lLg0KDQo= --------------ecwI4qHBS80MmZZzyO1ejThg-- --------------IMU21rJxFhroSjpATIJOAqc4 Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wnsEABYIACMWIQRTQA7vBfo8y1zE1rpnj5NgWEFcygUCZOzvFQUDAAAAAAAKCRBnj5NgWEFcynbd AQC6CsdkGaYaD4tWo0dahDgD4z+Naz0evmqrLVuKFUhwegEAuca28XgV8xAEp1mupP71XcRGTERD w059z3jDmiIGjww= =wmKN -----END PGP SIGNATURE----- --------------IMU21rJxFhroSjpATIJOAqc4-- From nobody Mon Aug 28 19:21:41 2023 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 4RZL6L0wMfz4rsZ1; Mon, 28 Aug 2023 19:22:18 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from smtp052.goneo.de (smtp5.goneo.de [IPv6:2001:1640:5::8:30]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4RZL6K14vkz3cf4; Mon, 28 Aug 2023 19:22:16 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=walstatt-de.de header.s=DKIM001 header.b=bsQAXf3L; spf=none (mx1.freebsd.org: domain of freebsd@walstatt-de.de has no SPF policy when checking 2001:1640:5::8:30) smtp.mailfrom=freebsd@walstatt-de.de; dmarc=none Received: from hub1.goneo.de (hub1.goneo.de [IPv6:2001:1640:5::8:52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp5.goneo.de (Postfix) with ESMTPS id CBDA810A32E1; Mon, 28 Aug 2023 21:22:12 +0200 (CEST) Received: from hub1.goneo.de (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPS id 6F41710557CC; Mon, 28 Aug 2023 21:22:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walstatt-de.de; s=DKIM001; t=1693250530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dNoqo3chgs4Q3CrOQh7jpYc0bCwpMVdEpAu3msZl390=; b=bsQAXf3LMfuaZqmr3yPSveqTLV6cjl5LiAAHosPo/ldRcyhEhrew5BGPPnQCIiXh4j1cAu JZUOXMTcy4WVPyvOcIK2hHrC883+cw4OIN3xhM7Pn+ryEcJ+NoXQQ9TrVC17rwm3rsjNgZ I7rlk1/Em4ikyD8QDGV6KUqXZIyXBG9qFV1EU0BRXnMW3tJeH0vgXGvXqW97mSllDERuGK HZl2d0GZmXEeLW85E12aFyMdTxNusASJCbIG28npcuFGjfSuZjp7rX3v4+rUzags7deTMn fe078J3ePBehTSiq4gIYUGou8EfguyLccwMt4cgp0USKVuz1/s3d0ByDtwPNMw== Received: from thor.intern.walstatt.dynvpn.de (dynamic-077-011-080-050.77.11.pool.telefonica.de [77.11.80.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPSA id 72886105C581; Mon, 28 Aug 2023 21:22:09 +0200 (CEST) Date: Mon, 28 Aug 2023 21:21:41 +0200 From: FreeBSD User To: Cy Schubert Cc: Alexander Motin , Martin Matuska , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad Message-ID: <20230828212208.696aabe3@thor.intern.walstatt.dynvpn.de> In-Reply-To: <20230828153724.3babbe59@thor.intern.walstatt.dynvpn.de> References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <20230827075913.36151ef6@thor.intern.walstatt.dynvpn.de> <5520d4cf-076c-9a06-7000-9ef608d21470@gmail.com> <20230828032314.BE584A7@slippy.cwsent.com> <20230828153724.3babbe59@thor.intern.walstatt.dynvpn.de> Organization: walstatt-de.de 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-UID: dafbd1 X-Rspamd-UID: 221aa8 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.40 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; R_DKIM_ALLOW(-0.20)[walstatt-de.de:s=DKIM001]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[2001:1640:5::8:30:from]; FREEMAIL_CC(0.00)[gmail.com,FreeBSD.org]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; MIME_TRACE(0.00)[0:+]; R_SPF_NA(0.00)[no SPF record]; ASN(0.00)[asn:25394, ipnet:2001:1640::/32, country:DE]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[walstatt-de.de:+]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; DMARC_NA(0.00)[walstatt-de.de]; HAS_ORG_HEADER(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 4RZL6K14vkz3cf4 Am Mon, 28 Aug 2023 15:36:57 +0200 FreeBSD User schrieb: > Am Sun, 27 Aug 2023 20:23:14 -0700 > Cy Schubert schrieb: > > > In message <5520d4cf-076c-9a06-7000-9ef608d21470@gmail.com>, Alexander > > Motin wr > > ites: > > > Hi, > > > > > > I've just updated my test system and it happily imported everything. > > > Could you give more details? Does "all pools do not import" means that > > > no pools were imported or that some pools were not imported? Where they > > > imported before reboot and had default cachefile pool property value? > > > Generally on boot ZFS does not import all the pools. Aside of the boot > > > pool ZFS on boot imports only pools that were imported before reboot and > > > used default cachefile, which is /etc/zfs/zpool.cache. Do you see any > > > errors related to import? Anything suspicious can be seen in sysctl > > > kstat.zfs.misc.dbgmsg ? > > > > Confirmed. This is a regression for users whose /usr is in a separate > > filesystem than root (/). If you have a rootfs that includes /usr, you are > > OK. But, if your /usr is on a different filesystem your computer will fail > > to boot and will need the following patch: > > That's it! Thanks for the hint. > > On all failing systems the base/OS is on an UFS SSD with "/usr" being a dedicated partition. > > > > > From 3a79eb11e8912621d5f6200c7fc22466a27807fc Mon Sep 17 00:00:00 2001 > > From: Cy Schubert > > Date: Sun, 27 Aug 2023 20:02:17 -0700 > > Subject: [PATCH] librt: Chase 315ee00fa961, fixing boot > > > > libzfs uses librt as a dependency. Systems with a separate / and /usr > > will fail to load the libzfs.so library because librt.so is not > > available due to the fact that /usr is not mounted yet. Install librt > > in /lib making it available to libzfs. > > > > Fixes: 315ee00fa961 > > --- > > lib/librt/Makefile | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/lib/librt/Makefile b/lib/librt/Makefile > > index 9a54c3ea2812..8b880c41ec44 100644 > > --- a/lib/librt/Makefile > > +++ b/lib/librt/Makefile > > @@ -3,6 +3,7 @@ > > > > PACKAGE=clibs > > LIB=rt > > +SHLIBDIR=/lib > > SHLIB_MAJOR= 1 > > CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR} > > .ifndef NO_THREAD_STACK_UNWIND > > > I'm on CURRENT (FreeBSD 15.0-CURRENT amd64 1500000 #0 main-n265062-76edfabbecde: Mon Aug 28 19:20:05 CEST 2023 amd64). Assuming the patch above has been commited since "make delete-old-libs" is already killing /usr/lib/librt.so.1: THERE IS NO /lib/librt.so.1 ! After a clean/from scratch buildworld buildkernel and installworld/installkernel, rebooting, perfomring "make delete-old-libs" leaves me with a dead system behind! Luckily, I got access to other boxes for copying the missing librt.so.1 (out build system is on ZFS) regards oh -- O. Hartmann From nobody Mon Aug 28 19:30:00 2023 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 4RZLHF2J9pz4rsgH; Mon, 28 Aug 2023 19:30:01 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZLHF1p8bz3dRl; Mon, 28 Aug 2023 19:30:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693251001; 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=mqUqVtXuImYc+I/n+67jrGGmVZJZB9/s+HNcFjeQ94U=; b=U8+FvEiEJ5Z3P1KprxCOQ2GOoIdBwCN1AnnBdbqkOp2JmHwdbqFvFBHSgy8reT3O2qSodc QB/UPYLZnSx6d9zdWf5SVp0DvDmt5rhnGTE6jPLxVkvDRTYDuCaezzz+rCmtwRpSl44q0f cWiJ8YprVvGYxZb/O78HKKP16VwMYsQG0pmiSPg8/qsEJB/sq/HbvBVdLA0HQbTwlL5Vrx pKJQadic5ZfoOQNRA0WVDkHmUQFP1grcTq1kX7EjsvIaIlFgyuTpBMTiLcbIsuQ4XnH9IW 0RNZACpDNkr3oPkGh2x84BIbxyZxg5Xjh81FhaCKicnyNO24KlM+DY/hJJSVng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693251001; a=rsa-sha256; cv=none; b=m42KGwcJqjtQo9cnhVyq8u/xGPWKWrG87qqdg/bA+3uohDWTb4RbVRoL15emJbbxNS0c6b 7iT8Cj1DzUZdOx+xQ49UWrO7O1jP5dknFd2PnrM4eAOo75uaEOfcEMj1eHQJZDj9mcsBjQ L6Yl/CpYXQCDB2CSeSuEyOx/42ktSxLpXnCZG5AhXZHOma1XvNbjwDdgL4LE12eCdjLuXW bPhSB5/HPK2ajVukDZmYchrELEC1f2vQEq6O8+QhLMwEFSgCSnrKKPqhVnaH+J/tGAO4j0 ln+VRvxX1Rfzs6fkBMVUt+WlSR03cuusCuoHwK3VplWsv8xGXYxQb8ahDJGKIA== 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=1693251001; 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=mqUqVtXuImYc+I/n+67jrGGmVZJZB9/s+HNcFjeQ94U=; b=ltQSbGppxW5JBMSV2ydxBTzw5b163nJ7aLcWYAj4dbA6wOYHKEhzCuC+pDCjkdD8Z7GGVj 9Tz5NvTC5PH+Aruo7Wu6s3O5alWVpOQRuTGUs0ugRqYnDwf6D3Ele0UkWMDwrfuHXxA0mT JcxWnekvlBh4zm89dlFhcAhmSrayzKUTGcWyXbMG9wnzOlwrtA7e+deOrK05HbDlKbe+uL oh25ZXix8msMJyv1edD5EL98F8t5kavot4FALiG0qfH1EZKvR/RWxS1a0YyDuoUA03crsl 2+PfqNfTkIpMTL4VRcdZoA/rfClMybcJJAcVivsbnA+zgdCHOwJzZm9pi113pQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZLHF0lcCz6Bh; Mon, 28 Aug 2023 19:30:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SJU0mx064798; Mon, 28 Aug 2023 19:30:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SJU0i6064774; Mon, 28 Aug 2023 19:30:00 GMT (envelope-from git) Date: Mon, 28 Aug 2023 19:30:00 GMT Message-Id: <202308281930.37SJU0i6064774@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: bba950fcaffc - main - librt: Hoist SHLIBDIR?= so it actually works 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bba950fcaffc648d931da9dc07aeb85a1bf86cfc Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=bba950fcaffc648d931da9dc07aeb85a1bf86cfc commit bba950fcaffc648d931da9dc07aeb85a1bf86cfc Author: Jessica Clarke AuthorDate: 2023-08-28 19:27:50 +0000 Commit: Jessica Clarke CommitDate: 2023-08-28 19:27:50 +0000 librt: Hoist SHLIBDIR?= so it actually works src.opts.mk includes bsd.own.mk, which sets SHLIBDIR, so having this line after it does nothing. Hoist it like other libraries so it takes effect. Reported by: vishwin Fixes: 2964804ef95c ("librt: unbreak LIB32 build") --- lib/librt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librt/Makefile b/lib/librt/Makefile index 2c8eb1400fb9..c755bb123c73 100644 --- a/lib/librt/Makefile +++ b/lib/librt/Makefile @@ -1,9 +1,9 @@ +SHLIBDIR?=/lib .include PACKAGE=clibs LIB=rt -SHLIBDIR?=/lib SHLIB_MAJOR= 1 CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR} .ifndef NO_THREAD_STACK_UNWIND From nobody Mon Aug 28 21:12:49 2023 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 4RZNZ63Nh3z4ryLV for ; Mon, 28 Aug 2023 21:13:02 +0000 (UTC) (envelope-from jake@technologyfriends.net) Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZNZ62qzZz4M2g for ; Mon, 28 Aug 2023 21:13:02 +0000 (UTC) (envelope-from jake@technologyfriends.net) Authentication-Results: mx1.freebsd.org; none Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2bcde83ce9fso55806631fa.1 for ; Mon, 28 Aug 2023 14:13:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=technologyfriends.net; s=google; t=1693257180; x=1693861980; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=r9/lBr9dM7Pk2AQ83NybRe15Ask64r/6FTpTRckdZc4=; b=KEBr80cE1ZeGySMKaBpIbmMEMns6Lr8drAk94t6cM+HYtiIcrF3tDmNVwVa2w/M08F RRHQ3q9WiIef5I2yZCCOkP5VZSC3LuX+1hicuMQ3N82qXVrQZrbDvsCZRv3/GQSlXcnt 93UWKBSDSj4I/lXUNBUk+4icaolD+zi1EPcrkd4mEcyTl0XSWgzuDIGPLWMpHNPjfByE Cqb59VUiJ3DiXpQOVWBe3SHEuMEIwpmnq19GvcrPwpZbqT9k6nOFaxYMrE3J0YttUOjt Qgmnr9FnzQp0BUG0eJH4ehFeVNSvJ0jUrjk+Ekahg0/7nQVCYcFPFOgv1bgF5M4Yu5CI Gluw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693257180; x=1693861980; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=r9/lBr9dM7Pk2AQ83NybRe15Ask64r/6FTpTRckdZc4=; b=X6gSLKqjcmH0SHdZ1hDqGs2wz4EEvflvj5Ng0sQqGMLBkqWfzQyxmJYEfLM7Cue953 +lZQ+u4J2kNnEfjpnypDD6y6hPtX1cI4vunos3FsYrVI8gslGe918bZawAge8cE5RCBU LS73dgE2sySVC7C5SaYKdNRurZf9GYe7CfpiffJ4Ti6ObJJDZCsRdbBlTetX+hRbQKAa dta5KVnjXLs0jd8Jr024nFzQ4e1Vq9r5eSOj4uOR3Bixo52+fjy4R8qNsI+hKowkynZs FN9QZ3RVqOejiYta3ajOlq7wJNSMiRo7NLmi7iMaEkZ5yKtcgJS+pW4e1zTfzvm1BnOM u9dQ== X-Gm-Message-State: AOJu0Yzlc8c5tM0fqjQj8YFm6bEH0rrtwgMnKbV95lsBWtq+GOzgmq0j CmQ45fSm+isIxN/EAJn4aMXODhUpt7SP4hj4T+SktA== X-Google-Smtp-Source: AGHT+IF84wcQQsk/bMfyN4E60a3C0IHKndHQ721daCuvkL/xatqa/PlFktGxCJQizuACTSn4O5pLhBwiLsb0/YaZob8= X-Received: by 2002:a2e:b710:0:b0:2b5:80e0:f18e with SMTP id j16-20020a2eb710000000b002b580e0f18emr20583900ljo.3.1693257180449; Mon, 28 Aug 2023 14:13:00 -0700 (PDT) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202308242029.37OKTmVs091755@gitrepo.freebsd.org> In-Reply-To: From: Jake Freeland Date: Mon, 28 Aug 2023 16:12:49 -0500 Message-ID: Subject: Re: git: af93fea71038 - main - timerfd: Move implementation from linux compat to sys/kern To: Warner Losh Cc: Alexey Dokuchaev , Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000c1239e0604022875" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4RZNZ62qzZz4M2g --000000000000c1239e0604022875 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Aug 28, 2023 at 11:19=E2=80=AFAM Warner Losh wrote= : > Added cc for Jake > > On Mon, Aug 28, 2023 at 6:17=E2=80=AFAM Alexey Dokuchaev > wrote: > >> On Thu, Aug 24, 2023 at 08:29:48PM +0000, Warner Losh wrote: >> > commit af93fea710385b2b11f0cabd377e7ed6f3d97c34 >> > >> > timerfd: Move implementation from linux compat to sys/kern >> > >> > Move the timerfd impelemntation from linux compat code to sys/kern. >> >> Could you quickly summarize why we need these linuxish bits in FreeBSD? >> We've lived for years without it. Had expected to find the rationale >> in DR but alas. :( Thanks, >> > The amount of software designed exclusively for Linux grows every day. Support for FreeBSD is almost always done on behalf of FreeBSD contributors, not the program developers. I do not want to play the cat-and-mouse game of constantly updating shims so we can support Linux software. I would rather take the sensible* parts of Linux and integrate them into core FreeBSD. My goal is not to turn FreeBSD into Linux, but rather to stay relevant in an age where most younger developers don't even know what BSD is. We should spend more resources on Linux program support, so younger audiences can use their Discord web apps natively on FreeBSD. Absorbing "linuxish" bits is controversial and I think that is a tragedy. In my eyes, having "linuxish" features is one of the best ways to ease the jump between Linux and FreeBSD, and minimize the maintenance needed for FreeBSD support. * https://ariadne.space/2021/06/06/actually-bsd-kqueue-is-a-mountain-of-techn= ical-debt/ Jake Freeland > I'll let Jake answer this and > > > glibc misc/tst-timerfd test fails now under Linux emulation > > I think his new review https://reviews.freebsd.org/D41600 addresses this > issue maybe > > Warner > --000000000000c1239e0604022875 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Aug 28, 2023 at 11:19=E2=80=AFAM = Warner Losh <imp@bsdimp.com> wr= ote:
Added cc for Jake

On Mon, Aug 28, 2023= at 6:17=E2=80=AFAM Alexey Dokuchaev <danfe@freebsd.org> wrote:
On Thu, Aug 24, 2023 at 08:29:48PM +0= 000, Warner Losh wrote:
> commit af93fea710385b2b11f0cabd377e7ed6f3d97c34
>
>=C2=A0 =C2=A0timerfd: Move implementation from linux compat to sys/kern=
>
>=C2=A0 =C2=A0Move the timerfd impelemntation from linux compat code to = sys/kern.

Could you quickly summarize why we need these linuxish bits in FreeBSD?
We've lived for years without it.=C2=A0 Had expected to find the ration= ale
in DR but alas. :(=C2=A0 Thanks,
<= div>
The amount of software designed exclusively=C2=A0fo= r Linux grows every day. Support for FreeBSD is almost always done on behal= f of FreeBSD contributors, not the program developers.

=
I do not want to play the cat-and-mouse game of constantly updating sh= ims so we can support Linux software. I would rather take the sensible* par= ts of Linux and integrate them into core FreeBSD.

= My goal is not to turn FreeBSD into Linux, but rather to stay relevant in a= n age where most younger developers don't even know what BSD is. We sho= uld spend more resources on Linux program support, so younger audiences can= use their Discord web apps natively on FreeBSD.

A= bsorbing "linuxish" bits is controversial and I think that is a t= ragedy. In my eyes, having "linuxish" features is one of the best= ways to ease the jump between Linux and FreeBSD, and minimize the maintena= nce needed for FreeBSD support.

=C2=A0
Jake Freeland


I'll let Jake answer this= and

> glibc misc/tst-timerfd test fails now un= der Linux emulation

I think his new review=C2=A0https://revi= ews.freebsd.org/D41600 addresses this issue maybe

<= div>Warner
--000000000000c1239e0604022875-- From nobody Mon Aug 28 21:17:34 2023 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 4RZNgc0kPgz4ryNW for ; Mon, 28 Aug 2023 21:17:48 +0000 (UTC) (envelope-from jake@technologyfriends.net) Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZNgb4RTVz4MfV for ; Mon, 28 Aug 2023 21:17:47 +0000 (UTC) (envelope-from jake@technologyfriends.net) Authentication-Results: mx1.freebsd.org; dkim=none ("invalid DKIM record") header.d=technologyfriends.net header.s=google header.b=gElWU3kF; spf=pass (mx1.freebsd.org: domain of jake@technologyfriends.net designates 2a00:1450:4864:20::22d as permitted sender) smtp.mailfrom=jake@technologyfriends.net; dmarc=none Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2b95d5ee18dso54808241fa.1 for ; Mon, 28 Aug 2023 14:17:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=technologyfriends.net; s=google; t=1693257466; x=1693862266; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=gXX6EgHJw6f7lfB1gkxQzWpZbhfGRKPABLvASoqs8MQ=; b=gElWU3kFFjqtdosgicxcSvay8m7hctA7WmwwHyUS/mPAeAWOL+8I5c6Fcg/YvfxNrK nVPvc8WkbqMB8nOsNQbIUuzVUx8M2UA4OVoYnLvMSonQ7pmEqeodaQbxfJpT8HWfhJZu 8LLpsCgWZ0bIiu6HhcjExDhKsF1tX5AKeSYw6NvCi47R5HEsYx9ohYoKBOP1+u29xEe0 3Fpzi8UchG4uvd6VGcV2J0jNFjdzKP05KZZpDU4hquSLh63jSI/8VtTQxyF8su23tjSP sC4Go886+o6eLMxXrEcE8po5KMpdn54E4/rBKBgKXMISDshkWdVCWwJNgnDQkiQBYywN pfIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693257466; x=1693862266; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gXX6EgHJw6f7lfB1gkxQzWpZbhfGRKPABLvASoqs8MQ=; b=CgiXVDQveMdDzkI++hplbrDP6e+iyPb9iP2tOb/Vx+3U546LYs+XfKB22MgTnmGwp1 4X/eHo0B/KKxrbuCttznupJgl0m5LWI6dkEoBiWG0qx7+f278ksWdFMRyOQsThGEj0GL MrZ41MkOh5TRHctDD+/FDzLP62cU9U7HZMhF4NcQgrBg1snTAiEFGiihl5sC/6j/PEzW uj1NM9cHMOi8O5lksCSHSxEv+k6mMBh1jhmXlx2/j1bN7Z3fZx//8Cla14TIVrc7DPFa lt63Jsp/+2sUpelXDqvZVBW1u1QnM7kxIMkjejnnr08pEL0cMo6y1q4XGvggJR3Z77h9 tfOg== X-Gm-Message-State: AOJu0YxmeQkR7LZ5/HK/GHrS8Y0B/aatPAcHKej6U3kEbkV8x9NU6Qq+ jKIrB4IKJOOhg+VXBT8uCbVT2KKOhgN105HtRLXrwQ== X-Google-Smtp-Source: AGHT+IECvV5G1/QvRSw1uwzJqnr6rukY1PLw5L+7FrK8iDJXgCpAibRyBffqP80mceXPwIM0pb3wpA/YnnzcPmQrvgQ= X-Received: by 2002:a2e:95ce:0:b0:2b6:da1e:d063 with SMTP id y14-20020a2e95ce000000b002b6da1ed063mr18236583ljh.45.1693257465756; Mon, 28 Aug 2023 14:17:45 -0700 (PDT) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202308242029.37OKTmVs091755@gitrepo.freebsd.org> In-Reply-To: From: Jake Freeland Date: Mon, 28 Aug 2023 16:17:34 -0500 Message-ID: Subject: Re: git: af93fea71038 - main - timerfd: Move implementation from linux compat to sys/kern To: Warner Losh Cc: Alexey Dokuchaev , Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000c2976806040239ae" X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.17 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.87)[-0.868]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; R_DKIM_PERMFAIL(0.00)[technologyfriends.net:s=google]; ARC_NA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::22d:from]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_EQ_ENVFROM(0.00)[]; BLOCKLISTDE_FAIL(0.00)[2a00:1450:4864:20::22d:server fail]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[jake]; DKIM_TRACE(0.00)[technologyfriends.net:~]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[technologyfriends.net]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; RCPT_COUNT_FIVE(0.00)[6]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4RZNgb4RTVz4MfV --000000000000c2976806040239ae Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Aug 28, 2023 at 4:12=E2=80=AFPM Jake Freeland wrote: > On Mon, Aug 28, 2023 at 11:19=E2=80=AFAM Warner Losh wro= te: > >> Added cc for Jake >> >> On Mon, Aug 28, 2023 at 6:17=E2=80=AFAM Alexey Dokuchaev >> wrote: >> >>> On Thu, Aug 24, 2023 at 08:29:48PM +0000, Warner Losh wrote: >>> > commit af93fea710385b2b11f0cabd377e7ed6f3d97c34 >>> > >>> > timerfd: Move implementation from linux compat to sys/kern >>> > >>> > Move the timerfd impelemntation from linux compat code to sys/kern. >>> >>> Could you quickly summarize why we need these linuxish bits in FreeBSD? >>> We've lived for years without it. Had expected to find the rationale >>> in DR but alas. :( Thanks, >>> >> > The amount of software designed exclusively for Linux grows every day. > Support for FreeBSD is almost always done on behalf of FreeBSD > contributors, not the program developers. > > I do not want to play the cat-and-mouse game of constantly updating shims > so we can support Linux software. I would rather take the sensible* parts > of Linux and integrate them into core FreeBSD. > > My goal is not to turn FreeBSD into Linux, but rather to stay relevant in > an age where most younger developers don't even know what BSD is. We shou= ld > spend more resources on Linux program support, so younger audiences can u= se > their Discord web apps natively on FreeBSD. > Sorry, this should say "Discord desktop apps", not "web apps". Jake Freeland > > Absorbing "linuxish" bits is controversial and I think that is a tragedy. > In my eyes, having "linuxish" features is one of the best ways to ease th= e > jump between Linux and FreeBSD, and minimize the maintenance needed for > FreeBSD support. > > * > https://ariadne.space/2021/06/06/actually-bsd-kqueue-is-a-mountain-of-tec= hnical-debt/ > > Jake Freeland > > >> I'll let Jake answer this and >> >> > glibc misc/tst-timerfd test fails now under Linux emulation >> >> I think his new review https://reviews.freebsd.org/D41600 addresses this >> issue maybe >> >> Warner >> > --000000000000c2976806040239ae Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Aug 28, 2023 at 4:12=E2=80=AFPM J= ake Freeland <jake@technol= ogyfriends.net> wrote:
= On Mon, Aug 28, 2023 at 11:19=E2=80=AFAM Warner Losh <imp@bsdimp.com> wrote:
=
Added cc for Jake

On Mon, Aug 28, 2023 at 6:17=E2=80= =AFAM Alexey Dokuchaev <danfe@freebsd.org> wrote:
On Thu, Aug 24, 2023 at 08:29:48PM +0000, Warner Lo= sh wrote:
> commit af93fea710385b2b11f0cabd377e7ed6f3d97c34
>
>=C2=A0 =C2=A0timerfd: Move implementation from linux compat to sys/kern=
>
>=C2=A0 =C2=A0Move the timerfd impelemntation from linux compat code to = sys/kern.

Could you quickly summarize why we need these linuxish bits in FreeBSD?
We've lived for years without it.=C2=A0 Had expected to find the ration= ale
in DR but alas. :(=C2=A0 Thanks,
<= div>
The amount of software designed exclusively=C2=A0fo= r Linux grows every day. Support for FreeBSD is almost always done on behal= f of FreeBSD contributors, not the program developers.

=
I do not want to play the cat-and-mouse game of constantly updating sh= ims so we can support Linux software. I would rather take the sensible* par= ts of Linux and integrate them into core FreeBSD.

= My goal is not to turn FreeBSD into Linux, but rather to stay relevant in a= n age where most younger developers don't even know what BSD is. We sho= uld spend more resources on Linux program support, so younger audiences can= use their Discord web apps natively on FreeBSD.

Sorry, this should say "Discord desktop = apps", not "web apps".

Jake Freelan= d
=C2=A0
<= div dir=3D"ltr">

Absorbi= ng "linuxish" bits is controversial and I think that is a tragedy= . In my eyes, having "linuxish" features is one of the best ways = to ease the jump between Linux and FreeBSD, and minimize the maintenance ne= eded for FreeBSD support.

=C2=A0
Jak= e Freeland


I'll let Jake= answer this and

> glibc misc/tst-timerfd test = fails now under Linux emulation

I think his new re= view=C2=A0= https://reviews.freebsd.org/D41600 addresses this issue maybe

Warner
--000000000000c2976806040239ae-- From nobody Mon Aug 28 21:27:22 2023 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 4RZNtk5xkwz4s05T; Mon, 28 Aug 2023 21:27:26 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZNtk5Fpfz4NnC; Mon, 28 Aug 2023 21:27:26 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693258046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AslePBb9TFQRJ6jwtJ1wBuT//lKlZ9EBpn4TpqTm0J8=; b=UnmkBRlPjT9WY+zpAywMkspLmwfJvfcJ3OuMIADxw7JQHv2WSKtkUNB3GmApUaJc/nMCmm tXQ43avSzw5XV3DkRQwai/hfb/jI4PWCGQRFtu1GQQGOyR8NBeqE8As2xCLWopsUztsHth +LwX+3TY6etSSBCsfTzpZteDip6m1pz30DzwgFgdDffPCKiXXwU504omZmj1JhlWOehWnT Vgsc1NjqtiA/2rrIQUUpizjdA5ojDUntk7MEZuBRp5dGQGiLGXAVjTj1u/+g4mv3+l1G4x 0zhcaC57CUi6SW6OtE0Z+GPH3ekdxsQ/H3nrYfIPHd6EMywzdCsZg/YjDP7VbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693258046; a=rsa-sha256; cv=none; b=ZGfrghoWQuH27pY17EF4Nw6gkdcY3dh3mwBX6DP0vQydn83lySI2Vur26M3upzwUkdmFI7 Rh3jrol+UzmiJVSN47AVvvwH7Z0zjyxj4Np9Qv5HJQkYEtK02KORMqMxRpnrh5a3y5hke8 qUjEm6vEU/i9TfKUQWAfOlbWaFwuc4tCvcElz4oHjmw1j0JbvArXYZ6y78uyg+MA8drr8H daOnPNa96kCZwyylrFXbSY3kddPqrRsJamrt+1NsuXr/CoowH+bXf5Y18dCK4am592LHxI iKw/zM0lbDMH8MBuozTm0odohP2bgIFVoivvClyqe25/76BnT+a0ii9Cbn7WvQ== 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=1693258046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AslePBb9TFQRJ6jwtJ1wBuT//lKlZ9EBpn4TpqTm0J8=; b=FqaM53ykimFHhzQadrap1G9lwWuV3rjPR6uQEDkOkIVcDF45z46Zk3fLzMKUcmPXza4CAf x4hRJcM38vYu9fvY0uN+P6SgSPPKTHKxljgkgrMxnac6aNO1yZgSl3E+wMlSi3hvwMOoxr RzDo2vC8vxbai34n54AwzAU0r7C05ORSEMyf6bL3uG3TU+nAF+dw0NPc4cxrnBbSC3xvq/ hMFzwXaVtd+dCcKBk5WyYsycDEhSRxux9Hu4u/7MbgKZegv2J3bnGLBa2HJyAvRS32p7kH KBNo8DHOIzQkAOOECDfQKJAijGAPrcLMBcvPg9HI3fFJdBN0EvlXASg/M9/znA== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RZNtj4t1VzD2q; Mon, 28 Aug 2023 21:27:25 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <92544c55-853c-5ab8-720b-b066e9cad5b0@FreeBSD.org> Date: Mon, 28 Aug 2023 16:27:22 -0500 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: git: af93fea71038 - main - timerfd: Move implementation from linux compat to sys/kern Content-Language: en-US To: Jake Freeland , Warner Losh Cc: Alexey Dokuchaev , Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202308242029.37OKTmVs091755@gitrepo.freebsd.org> From: Kyle Evans In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 8/28/23 16:12, Jake Freeland wrote: > On Mon, Aug 28, 2023 at 11:19 AM Warner Losh > wrote: > > Added cc for Jake > > On Mon, Aug 28, 2023 at 6:17 AM Alexey Dokuchaev > wrote: > > On Thu, Aug 24, 2023 at 08:29:48PM +0000, Warner Losh wrote: > > commit af93fea710385b2b11f0cabd377e7ed6f3d97c34 > > > >   timerfd: Move implementation from linux compat to sys/kern > > > >   Move the timerfd impelemntation from linux compat code to > sys/kern. > > Could you quickly summarize why we need these linuxish bits in > FreeBSD? > We've lived for years without it.  Had expected to find the > rationale > in DR but alas. :(  Thanks, > > > The amount of software designed exclusively for Linux grows every day. > Support for FreeBSD is almost always done on behalf of FreeBSD > contributors, not the program developers. > > I do not want to play the cat-and-mouse game of constantly updating > shims so we can support Linux software. I would rather take the > sensible* parts of Linux and integrate them into core FreeBSD. > > My goal is not to turn FreeBSD into Linux, but rather to stay relevant > in an age where most younger developers don't even know what BSD is. We > should spend more resources on Linux program support, so younger > audiences can use their Discord web apps natively on FreeBSD. > > Absorbing "linuxish" bits is controversial and I think that is a > tragedy. In my eyes, having "linuxish" features is one of the best ways > to ease the jump between Linux and FreeBSD, and minimize the maintenance > needed for FreeBSD support. > +1. We're not in the game of adopting Linuxisms for the sake of it, but rather where they make sense (either they're obviously a good thing, or they simply make it easier to write portable scripts/code without damaging the quality of our code, like long options). Remaining different for the sake of remaining different is way more silly than adopting sensible features. > * > https://ariadne.space/2021/06/06/actually-bsd-kqueue-is-a-mountain-of-technical-debt/ > Jake Freeland > Thanks, Kyle Evans From nobody Mon Aug 28 21:48:10 2023 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 4RZPLg0JSZz4s0Tv; Mon, 28 Aug 2023 21:48:11 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (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 "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZPLf6xjzz4QJX; Mon, 28 Aug 2023 21:48:10 +0000 (UTC) (envelope-from pstef@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693259291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+7G3rJUuYDq779GzOxI/byAnpdVVGe1oDTex3+sZlRA=; b=f82sa9l4HpkK9AOLqS8ega27npvZ0YedpLlU5tELQksJchZ3uKrSZ9ADBTB4UzUeXmBcBz JUP4d4shBsuWoiLYiuRuOyyvDm036ndVXbxWzmoXh/mUrrt38eL+rLFsJ6/JCPsBxscfCb MWsUbRtaLhjlSJ7BkdKcjVoJhpHsxhfg5ng66sGI9JtfRLkU2qMt7L4qdvGmXqTs/sdKDR mOHWkmrPENVlf5dPhs/Jb0PXrSEc9asJKwPRPj8yFdlskPdszSqM+8s1KFZgsWnrT6MZtH bB7DyK7fg74LQtyUuCh1lH1GmebuBzIHic2BszX42LmGYwel2IbTwp62+6YHtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693259291; a=rsa-sha256; cv=none; b=EuHiuP0mpcaBdMARKuvNua2YUHr8HBHoc0/RO9jMrlBDTaNe98i/4zHRC0O46mO0hDaRW6 mU/vVs83sJrjzbb4q2XC68HZR8qt1JnOtnkZGSHeVqGUiCiBVJdiGjV4q2+X9jV8u+p7wa epdqdqIVNAMYA4GOivcp0QJlWDI5wkoXz7AeUTxr3oLfBN5UnZiDDbq3SrTcMQ47GcZhhh Xlcf9L6U2+4yAXD+9vjtGs1ZahGwqAPMyOTNBnuqhwKBGOKzu0jd/xR4N+MCze/ch2712F gGOiU0+qBPhbIrU1PaRYVI9Y413fuogt4dtzQvSPRs/hsZdde3zvqR8eR8AxoQ== 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=1693259291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+7G3rJUuYDq779GzOxI/byAnpdVVGe1oDTex3+sZlRA=; b=OaehgVZuQsBhsSayPnisl06kHW2z/v1rdZmkilbuSiObWQZes3s6usu7Lwi0Ub8EdmjGWj gjnCquwgGi2FIpYNjICp0F7unZXS42H+Jt32IVPCh7RzV3oCP/IVY2FqRlApJ9uMwht+AX Nky9xRqTvxnZPb5sqy1zxUSChzE5pIAEV829LjK278TBSckkw+z3lEpQKnBGWIOYkHcK6n AoWgbpW4PtR6K5BpBpev2kvfZv+YxdovOg+9d7ZIe9Rv23rN6r7erRaJ/06qS741+kUqo1 PCIxUtnOPC4M3kgPneI498IAvUTah/ofpvyqE8Va2PmcUXkCfMJxMnw6hfDuHA== Received: by freefall.freebsd.org (Postfix, from userid 1403) id BDE0114F42; Mon, 28 Aug 2023 21:48:10 +0000 (UTC) Date: Mon, 28 Aug 2023 21:48:10 +0000 From: "Piotr P. Stefaniak" To: Alexey Dokuchaev Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: af93fea71038 - main - timerfd: Move implementation from linux compat to sys/kern Message-ID: References: <202308242029.37OKTmVs091755@gitrepo.freebsd.org> 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: On 2023-08-28 12:17:06, Alexey Dokuchaev wrote: >Could you quickly summarize why we need these linuxish bits in FreeBSD? >We've lived for years without it. Had expected to find the rationale >in DR but alas. :( Thanks, I'm more concerned about the IRIX and SysV bits :(( Piotr From nobody Mon Aug 28 21:49:16 2023 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 4RZPNB3Yg1z4s10L for ; Mon, 28 Aug 2023 21:49:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZPNB0VYNz4Qr3 for ; Mon, 28 Aug 2023 21:49:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-4fe61ae020bso5636884e87.2 for ; Mon, 28 Aug 2023 14:49:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1693259368; x=1693864168; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=l0odLDy+Lf6olE7tYrh62OFN1OmPAEc7Lu9r4pAzlVc=; b=zftfxVxnqzes7Cyk8HxgZUMefGvBpduVn2ezvTq/EmILfkhQXQhgc0nDcFiywIVnrh P9IXacjR0imHUIkGKJeBgQRKvSdtdG1e/VdSdlXmwnkgxMJ59obB20oYbjEWpGF74wAm DIcLvsqmCjqc8mTmHSOwHAx8yXuzIOQ2JXlfxwgqX7ZTQpcdyYv64Fi9N8wXqMqZXxud +E6QWYpS/9O4wRIEFY7UKmtLlK+Y7kTdiA9eUgWDkHiIp+Nj4LvY2PZxUoalzdIT21k2 UqdRFqKVAg+nldYyp/5Wtq+JE5q2Ydau0FbzpezkZq7DxRu/7smEeg/s55PQVhW/fNYO ewiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693259368; x=1693864168; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=l0odLDy+Lf6olE7tYrh62OFN1OmPAEc7Lu9r4pAzlVc=; b=DPRVsNrA2FwWXx1mdD2ZorGVfcOh58rhcD/VZhuC2+L8OnABIGtJBJRk3X2M0az88d gkQQGhLiHTgGxqiQRGt8lnXQnch8k1Z/LEndCAvJQJAaKB9LKFSynGdorZoWouJ9879m MjgFeRuW76Evxmd26ZFNjCCMm9XomFB60FxZQ95dwftXuq9M9t0kbLMHuEggM+F2bDdi 11BeGU9qtelSq9hhM/7kDuhr0sDOGi1qDWye8jY18EjWMOcnmWO0elDiYDHyyfirz3CJ DqDp3x8myy34kOAr0qrN/GbjRwpWREmcMZmLHyhkmuC3A/ub6lOh3TUM9E19KRBGTgYZ C5Eg== X-Gm-Message-State: AOJu0YzNkxLc2vtGB4hrgnq29hpkf6Iu3LAouo5YHq6PAUgs0269fmND rXdfSjzvo1YDLzkwbdnQwnrvTN6E9D8A8feU3J/ePQ== X-Google-Smtp-Source: AGHT+IHFcgWnZIv603W8YcJ2/jCvdxm8pusfueUNQhc3iXX9OHVoBmmZX90y/DZWWFQcLbvYF/4YjXFvwtssA5EUkgI= X-Received: by 2002:a05:6512:3189:b0:4f7:6453:f3f1 with SMTP id i9-20020a056512318900b004f76453f3f1mr25325364lfe.15.1693259368375; Mon, 28 Aug 2023 14:49:28 -0700 (PDT) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202308242029.37OKTmVs091755@gitrepo.freebsd.org> <92544c55-853c-5ab8-720b-b066e9cad5b0@FreeBSD.org> In-Reply-To: <92544c55-853c-5ab8-720b-b066e9cad5b0@FreeBSD.org> From: Warner Losh Date: Mon, 28 Aug 2023 15:49:16 -0600 Message-ID: Subject: Re: git: af93fea71038 - main - timerfd: Move implementation from linux compat to sys/kern To: Kyle Evans Cc: Jake Freeland , Alexey Dokuchaev , Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000002a3e31060402abb7" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4RZPNB0VYNz4Qr3 --0000000000002a3e31060402abb7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Aug 28, 2023 at 3:27=E2=80=AFPM Kyle Evans wro= te: > On 8/28/23 16:12, Jake Freeland wrote: > > On Mon, Aug 28, 2023 at 11:19=E2=80=AFAM Warner Losh > > wrote: > > > > Added cc for Jake > > > > On Mon, Aug 28, 2023 at 6:17=E2=80=AFAM Alexey Dokuchaev > > wrote: > > > > On Thu, Aug 24, 2023 at 08:29:48PM +0000, Warner Losh wrote: > > > commit af93fea710385b2b11f0cabd377e7ed6f3d97c34 > > > > > > timerfd: Move implementation from linux compat to sys/kern > > > > > > Move the timerfd impelemntation from linux compat code to > > sys/kern. > > > > Could you quickly summarize why we need these linuxish bits in > > FreeBSD? > > We've lived for years without it. Had expected to find the > > rationale > > in DR but alas. :( Thanks, > > > > > > The amount of software designed exclusively for Linux grows every day. > > Support for FreeBSD is almost always done on behalf of FreeBSD > > contributors, not the program developers. > > > > I do not want to play the cat-and-mouse game of constantly updating > > shims so we can support Linux software. I would rather take the > > sensible* parts of Linux and integrate them into core FreeBSD. > > > > My goal is not to turn FreeBSD into Linux, but rather to stay relevant > > in an age where most younger developers don't even know what BSD is. We > > should spend more resources on Linux program support, so younger > > audiences can use their Discord web apps natively on FreeBSD. > > > > Absorbing "linuxish" bits is controversial and I think that is a > > tragedy. In my eyes, having "linuxish" features is one of the best ways > > to ease the jump between Linux and FreeBSD, and minimize the maintenanc= e > > needed for FreeBSD support. > > > > +1. We're not in the game of adopting Linuxisms for the sake of it, but > rather where they make sense (either they're obviously a good thing, or > they simply make it easier to write portable scripts/code without > damaging the quality of our code, like long options). > > Remaining different for the sake of remaining different is way more > silly than adopting sensible features. > I agree with both points. In the early days (1.x-4.x) days we were rather proud we were NOT Linux. However, it set a bad precedent. Most of the new items that POSIX is standardizing, for example, come from Linux. Much of the software out there depends on these Linuxisms. In large part, over the past 5-10 or so years I've noticed the project has generally been more accepting of including Native version of Linux APIs (command line, system calls, glibc extentions, etc) to make it easier to just take a random bit of code off the net and use it. It's pragmatic more than anything else. It'= s motivated in large part for high-demand items (like Discord client), but it has the effect of lowering barriers to entry for people using FreeBSD. timerfd is one of these things that makes a lot of the 'special case' code for things that aren't file descriptors less half-baked. In many ways, this is very Unixy (old-school everything is a fd). While there are issues with everything as a 'fd' at times, there's many times, like event propagation, where the ability to view anything as a fd is quite powerful. That won't mean the onl= y way to do timer things are via a fd (dodging much of the objection to peopl= e trying to make everything a fd: it's too artificial). In this case, it bridges the domain rather than imposes a dogmatic view that everything has to *BE* a fd. Just convertible to a FD. timerfd is one of many ways to do this. As someone that wrote This also doesn't interfere with the old FreeBSD ways... So that's why I went ahead and committed this. It's a de-facto standard tha= t things need/want and it's nice to have some of the same tools that Linux has natively in FreeBSD. Linux stole Unix's system calls in the old days and created a fork of the Unix way. It's innovated, and it would be silly to ignore that innovation just because it was in Linux. And I totally acknowledge there were some issues with the import. I accept responsibility for not catching them. thankfully, Jake is working to address them and we have enough time before 14.0. I'm also making notes for what to do differently next time. One is clearly to loop Alexey into the process: I didn't think about it before the commit, but in hindsight it's really something I should have done. Warner > > * > > > https://ariadne.space/2021/06/06/actually-bsd-kqueue-is-a-mountain-of-tec= hnical-debt/ > < > https://ariadne.space/2021/06/06/actually-bsd-kqueue-is-a-mountain-of-tec= hnical-debt/ > > > > Jake Freeland > > > > Thanks, > > Kyle Evans > > --0000000000002a3e31060402abb7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Aug 28, 2023 at 3:27=E2=80=AF= PM Kyle Evans <kevans@freebsd.org<= /a>> wrote:
O= n 8/28/23 16:12, Jake Freeland wrote:
> On Mon, Aug 28, 2023 at 11:19=E2=80=AFAM Warner Losh <
imp@bsdimp.com
> <mailto:imp@bsd= imp.com>> wrote:
>
>=C2=A0 =C2=A0 =C2=A0Added cc for Jake
>
>=C2=A0 =C2=A0 =C2=A0On Mon, Aug 28, 2023 at 6:17=E2=80=AFAM Alexey Doku= chaev <danfe@free= bsd.org
>=C2=A0 =C2=A0 =C2=A0<mailto:danfe@freebsd.org>> wrote:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0On Thu, Aug 24, 2023 at 08:29:48PM +0= 000, Warner Losh wrote:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 > commit af93fea710385b2b11f0cabd= 377e7ed6f3d97c34
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0timerfd: Move imple= mentation from linux compat to sys/kern
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0Move the timerfd im= pelemntation from linux compat code to
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sys/kern.
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Could you quickly summarize why we ne= ed these linuxish bits in
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0FreeBSD?
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0We've lived for years without it.= =C2=A0 Had expected to find the
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rationale
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0in DR but alas. :(=C2=A0 Thanks,
>
>
> The amount of software designed exclusively=C2=A0for Linux grows every= day.
> Support for FreeBSD is almost always done on behalf of FreeBSD
> contributors, not the program developers.
>
> I do not want to play the cat-and-mouse game of constantly updating > shims so we can support Linux software. I would rather take the
> sensible* parts of Linux and integrate them into core FreeBSD.
>
> My goal is not to turn FreeBSD into Linux, but rather to stay relevant=
> in an age where most younger developers don't even know what BSD i= s. We
> should spend more resources on Linux program support, so younger
> audiences can use their Discord web apps natively on FreeBSD.
>
> Absorbing "linuxish" bits is controversial and I think that = is a
> tragedy. In my eyes, having "linuxish" features is one of th= e best ways
> to ease the jump between Linux and FreeBSD, and minimize the maintenan= ce
> needed for FreeBSD support.
>

+1. We're not in the game of adopting Linuxisms for the sake of it, but=
rather where they make sense (either they're obviously a good thing, or=
they simply make it easier to write portable scripts/code without
damaging the quality of our code, like long options).

Remaining different for the sake of remaining different is way more
silly than adopting sensible features.

= I agree with both points. In the early days (1.x-4.x) days we were rather
proud we were NOT Linux. However, it set a bad precedent. Most of = the
new items that POSIX is standardizing, for example, come from= Linux. Much
of the software out there depends on these Linuxisms= . In large part, over
the past 5-10 or so years I've noticed = the project has generally been more
accepting=C2=A0of including N= ative version of Linux APIs (command line, system
calls, glibc ex= tentions, etc) to make it easier to just take a random bit
of cod= e off the net and use it. It's pragmatic more than anything else. It= 9;s
motivated in large part for high-demand items (like Discord c= lient), but
it has the effect of lowering barriers to entry for p= eople using FreeBSD.

timerfd is one of these thing= s that makes a lot of the 'special case' code
for things = that aren't file descriptors less half-baked. In many ways, this is
very Unixy (old-school everything is a fd). While there are issues w= ith everything
as a 'fd' at times, there's many times= , like event propagation, where the
ability to view anything as a= fd is quite powerful. That won't mean the only
way to do tim= er things are via a fd (dodging much of the objection to people
t= rying to make everything a fd: it's too artificial). In this case, it b= ridges the
domain rather than imposes a dogmatic view that everyt= hing has to *BE* a
fd. Just convertible to a FD. timerfd is one o= f many ways to do this. As someone
that wrote=C2=A0
This also doesn't interfere with the old FreeBSD ways...

So that's why I went ahead and committed this. I= t's a de-facto standard that
things need/want and it's ni= ce to have some of the same tools that Linux
has natively in Free= BSD. Linux stole Unix's system calls in the old days
and crea= ted a fork of the Unix way. It's innovated, and it would be silly
=
to ignore that innovation just because it was in Linux.

=
And I totally acknowledge there were some issues with the import= . I
accept responsibility for not catching them. thankfully, Jake= is working
to address them and we have enough time before 14.0. = I'm also making
notes for what to do differently next time. O= ne is clearly to loop Alexey
into the process: I didn't think= about it before the commit, but in hindsight
it's really som= ething I should have done.

Warner
=C2=A0=
> *
> https://ar= iadne.space/2021/06/06/actually-bsd-kqueue-is-a-mountain-of-technical-debt/= <https:= //ariadne.space/2021/06/06/actually-bsd-kqueue-is-a-mountain-of-technical-d= ebt/>
> Jake Freeland
>

Thanks,

Kyle Evans

--0000000000002a3e31060402abb7-- From nobody Mon Aug 28 21:49:49 2023 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 4RZPNp2gSGz4s0Hq for ; Mon, 28 Aug 2023 21:50:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZPNp0Tkhz4RGp for ; Mon, 28 Aug 2023 21:50:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-52bcd4db4cbso332630a12.1 for ; Mon, 28 Aug 2023 14:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1693259400; x=1693864200; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PmmF+9WL/ab2iR4PUblbkaoUJC3ouOcLD5TPNJNaD2g=; b=S/n6JbCJsI1c6PXPiQ+86QAzxf5yyRl/0n0goz1uZVJeIPON0e/bCjrHNOMLsOr0nt GNyWL6loy18eQSqO0aoFVrR2MbScYZKNiruJNFm4ZnEW+mzkS3JldKsdxRDq4/T2peEJ bH/BcjA2SkbJfveKUmvZVnqC+25WbQ05LnwDU5IkAE2OWWjdGJrvGiE9mb2Wiks/JE8U E9J2x7kDb3uObifDWgjPoi6TIpq9Au4Zgs0/IUlSfRTxfScERdwv0Eyf+j7R3uVZkR5T UH7PMbs1G8ySo7ygKMRdzfJeRaoPb3oJBcRDTQgh5iWfz+DcGrEouwiKLfEti3mP1rG0 JutA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693259400; x=1693864200; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PmmF+9WL/ab2iR4PUblbkaoUJC3ouOcLD5TPNJNaD2g=; b=CudAUpPNwpvrab4qv9XPqOXYH8lUpP33gVtl7Hhm6xd63fIjTvlz/ODhieP0fpDDI7 j0LzcPzXsmBLCRxuHPFlINMmPcTLUufBmlcIa/2zAmtX1L12n5fo9iKezUcXHvzu4/LC mQjvkrMTSLWFn6/vzshcajECO/DvrF7CQgKLpLYy8rgZE35RpL+Ud9npDoRsKkcUs0wq LkL0AquH6p+93w853WM9tKE2gO+ko+7B6U7qRhpu7KRNVlyDtSvxUug9L4Lrbyiohomm 3vPKL4fvH97uv+gbOylADS8BdG7GI1BD0ZgQb4xhAsFowSNU3eM6eWIH+elDi0BUJLO/ WvDw== X-Gm-Message-State: AOJu0Yx6evbPZoV5PxxlwQTWjzO8joa4VOOKrrbZyqh1yjPi0h62G6q9 3LVD7Q/W1FrFjmN1RucjaUK35sKuYZFLyyiPwNxczA== X-Google-Smtp-Source: AGHT+IFoDEao8H36Sy6s8ATQ+l3yJ5Q41aQO8IZOoJrbx8QYOjc9VhIF4Zn2N0s74Mzb99QSrcKQbETw6D5AQ667uvo= X-Received: by 2002:a17:906:d14d:b0:9a5:8eab:49da with SMTP id br13-20020a170906d14d00b009a58eab49damr6013904ejb.19.1693259400393; Mon, 28 Aug 2023 14:50:00 -0700 (PDT) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202308242029.37OKTmVs091755@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Mon, 28 Aug 2023 15:49:49 -0600 Message-ID: Subject: Re: git: af93fea71038 - main - timerfd: Move implementation from linux compat to sys/kern To: "Piotr P. Stefaniak" Cc: Alexey Dokuchaev , Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000012cebb060402ad91" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4RZPNp0Tkhz4RGp --00000000000012cebb060402ad91 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Aug 28, 2023 at 3:48=E2=80=AFPM Piotr P. Stefaniak wrote: > On 2023-08-28 12:17:06, Alexey Dokuchaev wrote: > >Could you quickly summarize why we need these linuxish bits in FreeBSD? > >We've lived for years without it. Had expected to find the rationale > >in DR but alas. :( Thanks, > > I'm more concerned about the IRIX and SysV bits :(( > Those run great in qemu-system-mips64. :) Warner --00000000000012cebb060402ad91 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Aug 28, 2023 at 3:48=E2=80=AF= PM Piotr P. Stefaniak <pstef@freebs= d.org> wrote:
On 2023-08-28 12:17:06, Alexey Dokuchaev wrote:
>Could you quickly summarize why we need these linuxish bits in FreeBSD?=
>We've lived for years without it.=C2=A0 Had expected to find the ra= tionale
>in DR but alas. :(=C2=A0 Thanks,

I'm more concerned about the IRIX and SysV bits :((

Those run great in qemu-system-mips64. :)

Warner=C2=A0
--00000000000012cebb060402ad91-- From nobody Mon Aug 28 22:36:45 2023 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 4RZQR41vghz4s2rj for ; Mon, 28 Aug 2023 22:37:04 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-21.consmr.mail.gq1.yahoo.com (sonic306-21.consmr.mail.gq1.yahoo.com [98.137.68.84]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZQR32l7bz4W9Y for ; Mon, 28 Aug 2023 22:37:03 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=iBzqu5C7; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.68.84 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1693262220; bh=zoygIAjWbuMVoqQsn1RBjzSWlMTglH5DFUhZpooTZ+w=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=iBzqu5C7SiX7UrDeDHlILyNrCraJ/5s7FvQly22qH5VqSfsozfHAyMZClP0eF3OX7jMV9vFIn4TTEtP0bPKkbpLsO/1hk7sC/TzvN8nB0hmUpDk2Y74V7yphMrhF/ZYM8HxTtsMhtMD8E01ypeS5jhuOSULAH/NuWrLJYHy/TXExYFSPPsQwdFLMsT+L2/JRjrkQmcQkNCaV1or55apa/nVn7vMJJNCcKT4k+ink1gha1yBEzXn3a++z6V5EkJ5pT1mtSzdR1roS85YQzyX8K+xpgrJ9pZT4drdfSfiqOgs5QJOmAyq4TzIakVZNrDc+X6et3+UQ5INKvqDjHW6y1g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1693262220; bh=TPVT0WqNbTt3H4UDDzMNYKD3rE0jvIErobAvXAHcvED=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=VSrCsjXWrHlyf6wGpSImBLM1QZ7WG2XkX55YrdRDmjFk/ZEsurFwSI3pRV7oEIrMzO+E0ePznfy1GC0lVVfLF/CgEY+tUqKQvo5zfSokQXakN9xwGXUPPhZ81ye7KHf9JEc+NGBDnGNWHzi6e7WdRBfIs39sDcNiOHI6SvNbguk8EET9HdM4Zff0Ssud9nUQ2OFG5Afzi8yqoB6+NR2veDkgakaHSuQLAyT8xld0DpjPy1d+8ZCxzr9wY/jFMU1DnVviw+aR6bztmiO2zqdwpVSSrbKZrq4mAzkgz2TuTsrKmmlD8ekreJ0CO+82/JJjOwK5JFaumv0LLdGcAuycRg== X-YMail-OSG: XpE0gksVM1mkIJw12v8f6HQjNhyM1Vz3fznl3QCnLIlhcUMjhHsKV1_HJ_XCLRQ rhntid_YiK9W0R0ljxSfdnIsdQ2bpYHcOI3Mx0DeqQpNO3VqCTEgXJy_d89oMc2yXBo.PzVWBZpN yuah_d5Hjm7lHs53cT3E95w9ZSLnMhvva9yvvZhvD8bKQHEixsa6momjde1.fyXZbOy7t2ChYwSD 75qH.SPl1DqZRl1RZkLUIGOivdNytftnuyw3m4855egnGBeLOvB.EV7NhMM1jFG4CZgTwnIV5P7V KUCKPlc9fODDTYwGmlmuaLRwpfiZ60MNK.fuLk2a5SWmzEIR53MPjNWc9D.rpMk15.gJ1Ig7DJ_w sVJVY6iUnSkphjGVRNgT8fkI7Xk.qPZsM07Dg9T713lhE8RdusJ1VNpSId2UxM.j4wj3eOByUHqd Ic3Ho1FqASqXr94U.4zVyPYRyftJBJVMTHopzZvw4gzOdN0TeFFjqXzLmrTQBltcdcmq28tU0s46 8Fvv_gnQodg.RXHxShbhh5IznZJ7mpSVovEmcrkldz94uGqtQVIjuAIOMOArdrpPdqZ18Ja1TYeI 7DpCkLGErUZskbNhCS5DNbO9E3cUYCfaO6R3wc2cZDN5VqBsiTTEPLoaEXTDTjfEtLPt_A1jcU0K IASSzUJgtzUlNneP2iwoNvZzZ9YzSU2l_pbKKZ2Lnnd1KZQ9AbxG_IaY09nqC9qu6Lx_H9GyQVxC QqUn3VmQ9PNRQ3SEAoFp_J4T9l9pIsW.2Kk.zdfYMVaYj4zzHEaaIcfwDAE2z5tyTrIBQDmrAh_v BoPJw_QVmWAfK.tvhqrzrHpEPLimDEvAnPQ0ebPauH8EojsWwDMeb7DnneCOjoRxmR71xYX6iRlp _IDZxGQz11n02Ne.oIsOTsMSEPcNs5LnDx8t9bqEMBgq3vA5WrhmsP2OSfWYvGFnT7RG1MyG7LS6 P9x.ZZ7vpyoTN0EN_SWTwZD1h9iLV2S91OG3tAJkgPnhgjweGMHu5aLIVN9XryWJ56mvCAF9R_Fj yDJGsaBDNxiOb3R0gsDh56wpYkCY7gxDv5Ou5QPTcODhBmrbvuLm1HycNGNq7BjqeSS0c3gwzsJg eoq0aPPbpIsSZ_yKyTgO8GVUoKBvUMA1B6hfOoqnPN5HC849UBMaFicxQ1FfU8iPgccjjih8w6jH HOTlSeoK3ItWfQK4hvVzuyZYmrFtf4N_dujuDbb6xFWd8JiPyRKJ0d5rl.hdNnepSwOXVlnFmKMN qcdFdbaeK_4o1wsgy7rqPe1Is2j73xTwvIb9SFxbeNJZ7WKlB8wrNT1sJUNYI1tRirP9ERVMJoVf AjVTOYxrcAyeMHMoSyLr7lhcm1OcyhZNZmGkm4gi34OVIaBypPH5qdqawy_nJP36HBGR.BvX9QyA tWe0n3gPIwI2oSsaxNNFBhEwjOJGD.LkZIMYhyjpcbTDqEBekNSm3fqhT87cz0sPBxUaOkJddret AH.zmKAuTx4fq0xQZJsGCFgvmDlHrcPlt3ZkAFhJkrVTr1pKY_4YYYXPjhbnv27unGwfLdu5WwJx bRRRpZVEqDJS0eXBBmksI68EiaD_zR_EmxrDkrwNG4GBBg.ksBve7.DPes156jII0GYuzBGOeFwH EbnWz50Li.Bkk3Rz7u7aPLxDY8Vuy7vU2rTWKAmzVoerAUNL6OtLaOAgQk_uUEnk2n9DmSj4avCX RfhZsFPHLAaTkey5pAMXxCl0AXtO0nByCaEePkSwAZyVeAcOv1Q.hV8J.gaz5eVjuMf30VzIqecv gg9iUKLaVPGLS415CYIvvNWT9.k10adKHTL.uc8dyO5DccpdNTQKqrH8nzUrzSaWXTEPQyX9iX5b 8MfUUiDFbETDVvhdt1jX1KFHBXvPLjOPFodMIyyk_N_rEHvevW_ak2ER3SEWFpRvvk_LUEhsdrub 8qfmeiv6twxb89VpcLgi7HX9QFRdr1WV4440czxuXP5geLUR0mtSp2YKPNqzKBHQENZ5.r4Cvbpk TCpL7ZBTJ0bfmr5pkMI9jhv5lKxPukXBha.MGkvNQAHbr7rLKttv_jlEEwOQl.nr_0sKfAVoM0VR af8l.dh4MgDIJGIEz.x0aMnPsh4XyNWhcWeweJ2vFbeI9XlB8aje2sVxni0qoyaNjeV4yROy.pyk Y.fsknCqDddoyGfwaudenjNQFCC12.04np8ahAGACukZIX6B183nRRFj7jdi5kku4DzR3yRmVmYp qWAyYct8X3A2K1v2Qs_rJHfEQjPjpV58KiqTwOyepyFRPcnvYxxiHlqAC16uCgmMPd_dsMIfLAPg S X-Sonic-MF: X-Sonic-ID: 0cfd3046-b273-4c2d-b309-a89508718164 Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Mon, 28 Aug 2023 22:37:00 +0000 Received: by hermes--production-bf1-865889d799-x5klk (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID cd0a7bed49066813b0ff6bd0598a3992; Mon, 28 Aug 2023 22:36:58 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: af93fea71038 - main - timerfd: Move implementation from linux compat to sys/kern Message-Id: <8874149F-C8FF-4EDD-AECC-23E95D3A1C62@yahoo.com> Date: Mon, 28 Aug 2023 15:36:45 -0700 To: Warner Losh , dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3731.700.6) References: <8874149F-C8FF-4EDD-AECC-23E95D3A1C62.ref@yahoo.com> X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.84:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.84:from]; DKIM_TRACE(0.00)[yahoo.com:+]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4RZQR32l7bz4W9Y Warner Losh wrote on Date: Mon, 28 Aug 2023 21:49:16 UTC : > On Mon, Aug 28, 2023 at 3:27=E2=80=AFPM Kyle Evans = wrote: >=20 > > . . . > > >=20 > . . . >=20 > And I totally acknowledge there were some issues with the import. I > accept responsibility for not catching them. thankfully, Jake is = working > to address them and we have enough time before 14.0. I'm also making > notes for what to do differently next time. One is clearly to loop = Alexey > into the process: I didn't think about it before the commit, but in > hindsight > it's really something I should have done. >=20 I'll note that https://www.freebsd.org/releases/14.0R/schedule/ makes no distinction for KBI breakage types of changes vs. KBI changes in general for its listed KBI restriction: QUOTE Code slush begins / KBI freeze 4 August 2023 3 August 2023 . . . Additionally, there can be no changes to the KBI until main is branched to stable/14. END QUOTE I'd not know if the wording is stronger than the intent. It is difficult to word things for a complicated intent. But, for all I know, the wording could match the intent. =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Mon Aug 28 22:54:10 2023 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 4RZQq508Tsz4s37D for ; Mon, 28 Aug 2023 22:54:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZQq44jmQz4Xj1 for ; Mon, 28 Aug 2023 22:54:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-50078e52537so5726880e87.1 for ; Mon, 28 Aug 2023 15:54:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1693263262; x=1693868062; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=QLObXTKqUP7/oR4qjk6lbWXe5tUDb6T0DR7Afa5m1t8=; b=Oi9GPh55mDPCUq94HWfYNkOwo1s9e3pVOLg77OS38RPNCosN5RzcmOcdpehf5rgZ3u soxAQBpeSJVOZhXygTEiE2+itaaVfDHerF/pRMzP3eWGMACuJlZBWwW9B3t2aelHbLXN 0ZtDZbx9E5LgAmp5p5ssAKrm5Dtlvjxc++ydId2RRrZ9PubG5MdbWNl8kLbAYxQp/YW/ erRua7N4X4Nhfs1fDq5MNBmQAM5cOH93LP88RpFOix6ci5sK7irhJ8fOCAskHr8jvThJ tu5P6ZUUAh9JWHj3sP0zvhr68SMNoIBDfa8GQag2DFbCv7GesRGIORCO/z/oAN4JgRPG Q+SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693263262; x=1693868062; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QLObXTKqUP7/oR4qjk6lbWXe5tUDb6T0DR7Afa5m1t8=; b=hSeMrO8VqVhTykQDqr5LMJJjhjZOe/LBOM54o9dhVHa0UotuFBa7h+6WV+XfJO64+3 wbFRGLB8A+IpL2ReEbNIZHJRtFC5wbLvtJ9a9HNYz9deXyG7TE743QnHsDXjpR9hlQNp BOwKuc+cFbKgpnsyoW3x/DDuG8zhyWT7efQr4DoTWezd2rtJhx8UGESGe+rfB7K2aO3G d1lyuacgIz5y3NoBuOZBT2SxhzMaSVpUwLk48M9/H+65o8GWBoYMNjz589dp0EilS7Ad sDM9UdlGBvUUC+QfPfFlOY4cxXMpwxNzdHijC5ilxytpU0p3tHBqcC8S7lIn66iD+CMB +5/g== X-Gm-Message-State: AOJu0Yyd8+C2fHsiVzua2sDWv1K3Z4MIQUiMYFRrXNiwESKu9kq6fY0R 6NcELjbJwtVuirpsLG1J+lgeT5O/Cos9BBS90RDWA3qUnQP06qlo X-Google-Smtp-Source: AGHT+IGu6sVFPxIX7SUsZ+6swrmC1Bdh8OqS4uhPBwgBaouJjphb07MQYuYYUwrIxx4Xb40V3jaDHqShj7WCGcRGdEE= X-Received: by 2002:a05:6512:3da7:b0:4fe:3724:fdae with SMTP id k39-20020a0565123da700b004fe3724fdaemr24876374lfv.66.1693263262212; Mon, 28 Aug 2023 15:54:22 -0700 (PDT) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <8874149F-C8FF-4EDD-AECC-23E95D3A1C62.ref@yahoo.com> <8874149F-C8FF-4EDD-AECC-23E95D3A1C62@yahoo.com> In-Reply-To: <8874149F-C8FF-4EDD-AECC-23E95D3A1C62@yahoo.com> From: Warner Losh Date: Mon, 28 Aug 2023 16:54:10 -0600 Message-ID: Subject: Re: git: af93fea71038 - main - timerfd: Move implementation from linux compat to sys/kern To: Mark Millard Cc: "" Content-Type: multipart/alternative; boundary="000000000000417cdc0604039384" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4RZQq44jmQz4Xj1 --000000000000417cdc0604039384 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Aug 28, 2023, 4:37 PM Mark Millard wrote: > Warner Losh wrote on > Date: Mon, 28 Aug 2023 21:49:16 UTC : > > > On Mon, Aug 28, 2023 at 3:27=E2=80=AFPM Kyle Evans = wrote: > > > > > . . . > > > > > > > . . . > > > > And I totally acknowledge there were some issues with the import. I > > accept responsibility for not catching them. thankfully, Jake is workin= g > > to address them and we have enough time before 14.0. I'm also making > > notes for what to do differently next time. One is clearly to loop Alex= ey > > into the process: I didn't think about it before the commit, but in > > hindsight > > it's really something I should have done. > > > > > I'll note that https://www.freebsd.org/releases/14.0R/schedule/ > makes no distinction for KBI breakage types of changes vs. KBI > changes in general for its listed KBI restriction: > > QUOTE > Code slush begins / KBI freeze 4 August 2023 3 August 2023 > . . . Additionally, there can be no changes to the KBI > until main is branched to stable/14. > END QUOTE > > I'd not know if the wording is stronger than the intent. It is > difficult to word things for a complicated intent. But, for > all I know, the wording could match the intent. > Several other additions happened in that time frame. I've always read it as "to established" before KBIs. But this is really more an ABI addition to userland. No K involved. Warner =3D=3D=3D > Mark Millard > marklmi at yahoo.com > > --000000000000417cdc0604039384 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Aug 28, 2023, 4:37 PM Mark Millard <marklmi@yahoo.com> wrote:
Warner Losh <imp_at_bsdimp.com= > wrote on
Date: Mon, 28 Aug 2023 21:49:16 UTC :

> On Mon, Aug 28, 2023 at 3:27=E2=80=AFPM Kyle Evans <kevans@freebsd.= org> wrote:
>
> > . . .
> >
>
> . . .
>
> And I totally acknowledge there were some issues with the import. I > accept responsibility for not catching them. thankfully, Jake is worki= ng
> to address them and we have enough time before 14.0. I'm also maki= ng
> notes for what to do differently next time. One is clearly to loop Ale= xey
> into the process: I didn't think about it before the commit, but i= n
> hindsight
> it's really something I should have done.
>


I'll note that https://www.freebsd.or= g/releases/14.0R/schedule/
makes no distinction for KBI breakage types of changes vs. KBI
changes in general for its listed KBI restriction:

QUOTE
Code slush begins / KBI freeze 4 August 2023 3 August 2023
. . . Additionally, there can be no changes to the KBI
until main is branched to stable/14.
END QUOTE

I'd not know if the wording is stronger than the intent. It is
difficult to word things for a complicated intent. But, for
all I know, the wording could match the intent.

Several other additions happ= ened in that time frame. I've always read it as "to established&qu= ot; before KBIs.

But thi= s is really more an ABI addition to userland.=C2=A0 No K involved.

Warner
=3D=3D=3D
Mark Millard
marklmi at yahoo.com

--000000000000417cdc0604039384-- From nobody Mon Aug 28 23:24:54 2023 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 4RZRVH29WGz4s4Sl; Mon, 28 Aug 2023 23:24:55 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZRVH1Vtxz4YdP; Mon, 28 Aug 2023 23:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693265095; 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=CNa/QKHXzIBWLF8wJzA6cMxAqE4+uQ6WUjcYie3Di8Q=; b=hXyrVZMtdhawsQ9tSZMZpZYKVUlwVTYyOluq0RBeke3hxuAJVRNBE+0XPZ6RuZcd45x3Pr mv0XUHfF/85Kf7zB9aXWrCAPB0QR/vVfwY7VOlU57O5EaWxa11n2LDKemyBGid9giFu39j BpnK0Qr513eBn3huJPWIxKefKSVfRGxaig6jm3jm3QSi1MMkYiNGrSwm1BQTghuumBP40S YIEYRDfzrtQ2unbe1bacPIW2psIsbTlvvJ/S/Y5ttMVoeMmMj22MUGfL/292rqFn+r64cn l3JQCGGzDvZGCrG+arGe9oFOE7oZm/XOX3uU7RP1cUqF6igQQJkcCS1943QJLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693265095; a=rsa-sha256; cv=none; b=Ijp/MbIthLdariRq+IMg1pPj07f11wuj8AiTX92zeolmpnCVNwBBHx4oLbuJTWKBGVIX54 o7e/LoiF0vhmFW+JFyg7ZMbUUQSif9ye4XtL+zmxmxWcB1wB/UQXVkNSQgw5ApB/+0FDf1 nvD25RlAsXllrW+/fFVHBY+pQvCjb9GJHf2NpTmxY752o9X2z/i+Q+jUECg0oGasVWGXyN C9Pgz4bKucagYjSeefotv9GCTg+yYUD9ecSqOH9r5mR+Pgoe22MI7wqybChdyGG1A8M8M1 F4MjUggSqhGqxT97MXpRTYvMS1QcpwFkj0Yd6uo7W35T2DJKdbjdRGMuPAM1UA== 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=1693265095; 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=CNa/QKHXzIBWLF8wJzA6cMxAqE4+uQ6WUjcYie3Di8Q=; b=syClbxgJ47mq9G3AQqiKFqWULSdeROZKr1Zu9rV+V5qhWHcilIhwKwrD8mXvgEH+5e9eIJ X0sveAYR3g29SPUVDRY2LM/FLhtj0ybRsAviGJr43a/GdliC+gEvAJzyUSFjal4HFoXs4Y Zlkfoq3rmjzW2kTkDRPwV47ntGHKYrCasohlU89/z0kUH4nleVaEe48eUv4BCR7Cs6G+gL hio1fxms3+i/ur7FXFtR7uZ+iJDonR1KYjyYomjRC2vai9rsnE6Z0263TaIOe2+uVHbdPv J0ufUnC4DLHS14LQISpXQdoT0fC+RGY1kmCBLRyVlvGaiqD2aHT3PAyxyf7TXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZRVH0VcvzD8l; Mon, 28 Aug 2023 23:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SNOs5k060444; Mon, 28 Aug 2023 23:24:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SNOsc5060441; Mon, 28 Aug 2023 23:24:54 GMT (envelope-from git) Date: Mon, 28 Aug 2023 23:24:54 GMT Message-Id: <202308282324.37SNOsc5060441@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: d1e4c63d9e93 - main - efirt_machdep.c: Trim some unused includes 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org 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: d1e4c63d9e93b113f7ef5aef5e0e79a4d7dca144 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d1e4c63d9e93b113f7ef5aef5e0e79a4d7dca144 commit d1e4c63d9e93b113f7ef5aef5e0e79a4d7dca144 Author: John Baldwin AuthorDate: 2023-08-28 23:22:03 +0000 Commit: John Baldwin CommitDate: 2023-08-28 23:22:03 +0000 efirt_machdep.c: Trim some unused includes Reviewed by: imp, kib, markj Differential Revision: https://reviews.freebsd.org/D41596 --- sys/amd64/amd64/efirt_machdep.c | 3 --- sys/arm64/arm64/efirt_machdep.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/sys/amd64/amd64/efirt_machdep.c b/sys/amd64/amd64/efirt_machdep.c index 22d8cf963880..ffe2e2cf60a9 100644 --- a/sys/amd64/amd64/efirt_machdep.c +++ b/sys/amd64/amd64/efirt_machdep.c @@ -45,11 +45,8 @@ #include #include #include -#include #include -#include #include -#include #include #include #include diff --git a/sys/arm64/arm64/efirt_machdep.c b/sys/arm64/arm64/efirt_machdep.c index 26990f40ea0a..c51987625356 100644 --- a/sys/arm64/arm64/efirt_machdep.c +++ b/sys/arm64/arm64/efirt_machdep.c @@ -46,10 +46,7 @@ #include #include -#include -#include #include -#include #include #include From nobody Mon Aug 28 23:24:56 2023 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 4RZRVJ3qnDz4s4Gx; Mon, 28 Aug 2023 23:24:56 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZRVJ26CZz4YXT; Mon, 28 Aug 2023 23:24:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693265096; 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=Q/BwSm3KVIYnwHWKCtUX+8GgOAnNdk64rmegiFAEUbg=; b=XfTEGtOvE29d03lcAhfk5o49tEylVRHIAF3meaJN9t1Gb1vHdFXNS6SNLmZDkzKblISp7l sGX9EupppDg1Q2yrNnMDWX378nXlQ5yVdITcFEXnMoPYOma6uGZkTeawiAHkU3IgJb3obn JVLNq6peQSaEgoDBh+GuZZcctpNxE2yEM0DEa0dAhdO8+NeME2k1Koz25N9UIAdgmqqcw+ WwWjYs3Kk3OIJVSDSXtOYw3hDEFbThgAHqbm1nb0cgcj7H9WhpnDCNIWn6fwTiiPBzwXzH Ta4I+JUKW02aDQdHVBAbSb9CdERBTdr75Ljn7VDYJ5PLklsl5LksfiaaIgHTVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693265096; a=rsa-sha256; cv=none; b=mMbKilfDfzPsXg/5qqjgYJDsL6/ZY2iHP7zYGpFQTveK2xvL9emxaDq0CmYYQVx3IrmAfP jvNOWQF2qlKh+WOgyvKmefkb7QtHNtCBAVIuq4c0/RVMzHBVY0VU6U1tCaD0FxkOeRt9Kj SoVZJ1Sd2UWCUvNF7WNTf0PhzIPjp0Jm3OPgPT7RoGECP4bnnH2HBs1wTddq/M3c0JeYnw tZU791dUekxScUp5XLyStpu9gEAHrv6PYZW5moZl8ebw2gjQ+DAUWuMapA9m/oGIAu0f6C sAz4QKkgeAMVU+aH5+Rl5uDkcubVDLgKNjoODMNgHHDFvvcfuT3w7fGrDL8eIw== 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=1693265096; 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=Q/BwSm3KVIYnwHWKCtUX+8GgOAnNdk64rmegiFAEUbg=; b=eEd/EHSXnNEfSHZVMdMuue5JRbVcRp2JUlH8mFLNeeLR9vtv4lul9EBxsImplg0vkJfVIr kvjJCT4J5WqxfJigqKxYgCQdajdtTqMfz8zmXhgamb80gGjjNmkaBGu63UkMXSXhPAoYac /rkau3I7bArwb+o0fKg1yUQKww2vSfqllw+xL277STA4vD2Wqe0dBRfspoVOkcqghaq6fC qbfPm1vGS80cs9MMRSePufJ9coOmdsC5r1xNKkqsEbV6zOCb210bRKO8AnuBYFPYpCvi2x h5zDJLYtJxrVCyicGFHiSTlXHf404IU1bUDapsDbThKyOcItOldsIZ5p7M/Sew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZRVJ0xFvzChB; Mon, 28 Aug 2023 23:24:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SNOuQl060491; Mon, 28 Aug 2023 23:24:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SNOubN060488; Mon, 28 Aug 2023 23:24:56 GMT (envelope-from git) Date: Mon, 28 Aug 2023 23:24:56 GMT Message-Id: <202308282324.37SNOubN060488@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 937b4473be21 - main - aesni: Switch to using FPU_KERN_NOCTX. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org 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: 937b4473be2129a700689fe4c8ea0311ccfb17b8 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=937b4473be2129a700689fe4c8ea0311ccfb17b8 commit 937b4473be2129a700689fe4c8ea0311ccfb17b8 Author: John Baldwin AuthorDate: 2023-08-28 23:22:15 +0000 Commit: John Baldwin CommitDate: 2023-08-28 23:22:15 +0000 aesni: Switch to using FPU_KERN_NOCTX. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D41577 --- sys/crypto/aesni/aesni.c | 88 +++++------------------------------------------- 1 file changed, 9 insertions(+), 79 deletions(-) diff --git a/sys/crypto/aesni/aesni.c b/sys/crypto/aesni/aesni.c index 60e4a6e0f2fc..6d83743dece9 100644 --- a/sys/crypto/aesni/aesni.c +++ b/sys/crypto/aesni/aesni.c @@ -40,11 +40,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -63,28 +61,12 @@ #include #include -static struct mtx_padalign *ctx_mtx; -static struct fpu_kern_ctx **ctx_fpu; - struct aesni_softc { int32_t cid; bool has_aes; bool has_sha; }; -#define ACQUIRE_CTX(i, ctx) \ - do { \ - (i) = PCPU_GET(cpuid); \ - mtx_lock(&ctx_mtx[(i)]); \ - (ctx) = ctx_fpu[(i)]; \ - } while (0) -#define RELEASE_CTX(i, ctx) \ - do { \ - mtx_unlock(&ctx_mtx[(i)]); \ - (i) = -1; \ - (ctx) = NULL; \ - } while (0) - static int aesni_cipher_setup(struct aesni_session *ses, const struct crypto_session_params *csp); static int aesni_cipher_process(struct aesni_session *ses, struct cryptop *crp); @@ -136,30 +118,10 @@ aesni_probe(device_t dev) return (0); } -static void -aesni_cleanctx(void) -{ - int i; - - /* XXX - no way to return driverid */ - CPU_FOREACH(i) { - if (ctx_fpu[i] != NULL) { - mtx_destroy(&ctx_mtx[i]); - fpu_kern_free_ctx(ctx_fpu[i]); - } - ctx_fpu[i] = NULL; - } - free(ctx_mtx, M_AESNI); - ctx_mtx = NULL; - free(ctx_fpu, M_AESNI); - ctx_fpu = NULL; -} - static int aesni_attach(device_t dev) { struct aesni_softc *sc; - int i; sc = device_get_softc(dev); @@ -171,21 +133,6 @@ aesni_attach(device_t dev) return (ENOMEM); } - ctx_mtx = malloc(sizeof *ctx_mtx * (mp_maxid + 1), M_AESNI, - M_WAITOK|M_ZERO); - ctx_fpu = malloc(sizeof *ctx_fpu * (mp_maxid + 1), M_AESNI, - M_WAITOK|M_ZERO); - - CPU_FOREACH(i) { -#ifdef __amd64__ - ctx_fpu[i] = fpu_kern_alloc_ctx_domain( - pcpu_find(i)->pc_domain, FPU_KERN_NORMAL); -#else - ctx_fpu[i] = fpu_kern_alloc_ctx(FPU_KERN_NORMAL); -#endif - mtx_init(&ctx_mtx[i], "anifpumtx", NULL, MTX_DEF|MTX_NEW); - } - detect_cpu_features(&sc->has_aes, &sc->has_sha); return (0); } @@ -199,8 +146,6 @@ aesni_detach(device_t dev) crypto_unregister_all(sc->cid); - aesni_cleanctx(); - return (0); } @@ -551,9 +496,9 @@ static int aesni_cipher_setup(struct aesni_session *ses, const struct crypto_session_params *csp) { - struct fpu_kern_ctx *ctx; uint8_t *schedbase; - int kt, ctxidx, error; + int error; + bool kt; schedbase = (uint8_t *)roundup2((uintptr_t)ses->schedules, AES_SCHED_ALIGN); @@ -607,11 +552,10 @@ aesni_cipher_setup(struct aesni_session *ses, ses->mlen = csp->csp_auth_mlen; } - kt = is_fpu_kern_thread(0) || (csp->csp_cipher_alg == 0); + kt = (csp->csp_cipher_alg == 0); if (!kt) { - ACQUIRE_CTX(ctxidx, ctx); - fpu_kern_enter(curthread, ctx, - FPU_KERN_NORMAL | FPU_KERN_KTHR); + fpu_kern_enter(curthread, NULL, + FPU_KERN_NORMAL | FPU_KERN_NOCTX); } error = 0; @@ -620,8 +564,7 @@ aesni_cipher_setup(struct aesni_session *ses, csp->csp_cipher_klen); if (!kt) { - fpu_kern_leave(curthread, ctx); - RELEASE_CTX(ctxidx, ctx); + fpu_kern_leave(curthread, NULL); } return (error); } @@ -630,9 +573,7 @@ static int aesni_cipher_process(struct aesni_session *ses, struct cryptop *crp) { const struct crypto_session_params *csp; - struct fpu_kern_ctx *ctx; - int error, ctxidx; - bool kt; + int error; csp = crypto_get_params(crp->crp_session); switch (csp->csp_cipher_alg) { @@ -653,15 +594,7 @@ aesni_cipher_process(struct aesni_session *ses, struct cryptop *crp) break; } - ctx = NULL; - ctxidx = 0; - error = 0; - kt = is_fpu_kern_thread(0); - if (!kt) { - ACQUIRE_CTX(ctxidx, ctx); - fpu_kern_enter(curthread, ctx, - FPU_KERN_NORMAL | FPU_KERN_KTHR); - } + fpu_kern_enter(curthread, NULL, FPU_KERN_NORMAL | FPU_KERN_NOCTX); /* Do work */ if (csp->csp_mode == CSP_MODE_ETA) { @@ -679,10 +612,7 @@ aesni_cipher_process(struct aesni_session *ses, struct cryptop *crp) else error = aesni_cipher_crypt(ses, crp, csp); - if (!kt) { - fpu_kern_leave(curthread, ctx); - RELEASE_CTX(ctxidx, ctx); - } + fpu_kern_leave(curthread, NULL); return (error); } From nobody Mon Aug 28 23:24:57 2023 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 4RZRVK3WS2z4s457; Mon, 28 Aug 2023 23:24:57 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZRVK2rYTz4Z33; Mon, 28 Aug 2023 23:24:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693265097; 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=s6xV2n5gMUnlu1Msd9MKb6P7RTu08TlNgacaO8UCmGA=; b=aXy9yDSzGrpBYtmFmMbxO1xY2W3HgtGxQStejwncvWHZj5U+2cE6htlP4jLQYm7DNF/RwH P8pGP/9k/nDoTXi5YOfnxLkCRZtxQ7aCk8A/GtI6BxTf57Q9ZQDoTnEQ0nK4neYKiiNZ7n qCm9XkQFfsrAvRzKSXuAmPWjre4FKnUq7vAAbquyKZFz7peqlLfF14mtwwCxcFrjVbqeA5 jn8q7JlJ/yIyglN+uwR7g8/UZv+6AvIfQZurz1cL8o16qz1rfm3L89ZNHWNZKlWRpOap39 wq8ZhxISmQJqTC5aqxGJvzpoXmBgLvC+muwaaZP4tONXFstuc0JxI9ZDXPP+Sw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693265097; a=rsa-sha256; cv=none; b=bF6EARVnx5bZwqyd2+Bau92ghI0hzbgSl+MYGQYgjaGnN0X9cNjGVW3dU/45B/cCFBDbn2 hlKeeIK6r2fqFLf1+uk1fPcqCtlpdFqzL+Bu84QYbjDbP/DSwMTs7AFUfY6Q9vlJfdnj1Y LW2xrBT9vsuzQ7VBJOYyqm7Z9Jv8G/1lo+hBAcVumUI2FkupL94phvBmVyz0QXzaa4rR6r fE803vDPpEEq2+3sSWdR2gNb2zlnq/LP2Yb4TNO4S74T8PNx4yXqhaje4y5Bk15rvMIWyW W2ivLL10VSL+Ifdc7dvckJa/YixkGAaQ8SV4YMcZxnKduePgP98nvU/PI+JV8Q== 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=1693265097; 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=s6xV2n5gMUnlu1Msd9MKb6P7RTu08TlNgacaO8UCmGA=; b=uYPLb8cUvX8X7ac0YZ2GiQ8XZ3gJTfA0hf/vAKi945Mc3GOfWEsK/Xkq303It+TGMp+FgG 2zvzkQHxDM+O5ptEH9EF52WCpTWLC2YzgmUw7c5Yo+WiMxvv6mH6BHKO/8w++5Vi5BUAGf Z+KgBgdWTVuR4w5UeiXXP2Ih/fug08tU9GhB0gp8mo/lGukp5gryE6KeKu70n3HG7nk/8q o5Q2wBWAIrrqVwTFJcwxhbwEmkRE+LIKMJku3mtbakWUtRajYyxOgQryFSgp9SHvux0bXS 9ziIRrKmUEFnbsRmiAju1/56MBtuUksZ4ao45yh/tYu60lNDXJdvXG1Tejbztg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZRVK1xQszD8m; Mon, 28 Aug 2023 23:24:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SNOvW2060533; Mon, 28 Aug 2023 23:24:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SNOvjp060530; Mon, 28 Aug 2023 23:24:57 GMT (envelope-from git) Date: Mon, 28 Aug 2023 23:24:57 GMT Message-Id: <202308282324.37SNOvjp060530@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 6485286f536f - main - armv8_crypto: Switch to using FPU_KERN_NOCTX 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org 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: 6485286f536f1afb36d6d39e75fceabd114b082b Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6485286f536f1afb36d6d39e75fceabd114b082b commit 6485286f536f1afb36d6d39e75fceabd114b082b Author: John Baldwin AuthorDate: 2023-08-28 23:22:33 +0000 Commit: John Baldwin CommitDate: 2023-08-28 23:22:33 +0000 armv8_crypto: Switch to using FPU_KERN_NOCTX Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41578 --- sys/crypto/armv8/armv8_crypto.c | 85 +++++------------------------------------ 1 file changed, 9 insertions(+), 76 deletions(-) diff --git a/sys/crypto/armv8/armv8_crypto.c b/sys/crypto/armv8/armv8_crypto.c index a1a9d4dfcdcd..a8d88c31edc0 100644 --- a/sys/crypto/armv8/armv8_crypto.c +++ b/sys/crypto/armv8/armv8_crypto.c @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include @@ -69,22 +68,6 @@ struct armv8_crypto_softc { bool has_pmul; }; -static struct mtx *ctx_mtx; -static struct fpu_kern_ctx **ctx_vfp; - -#define AQUIRE_CTX(i, ctx) \ - do { \ - (i) = PCPU_GET(cpuid); \ - mtx_lock(&ctx_mtx[(i)]); \ - (ctx) = ctx_vfp[(i)]; \ - } while (0) -#define RELEASE_CTX(i, ctx) \ - do { \ - mtx_unlock(&ctx_mtx[(i)]); \ - (i) = -1; \ - (ctx) = NULL; \ - } while (0) - static int armv8_crypto_cipher_process(struct armv8_crypto_session *, struct cryptop *); @@ -134,7 +117,6 @@ armv8_crypto_attach(device_t dev) { struct armv8_crypto_softc *sc; uint64_t reg; - int i; sc = device_get_softc(dev); sc->dieing = 0; @@ -153,16 +135,6 @@ armv8_crypto_attach(device_t dev) rw_init(&sc->lock, "armv8crypto"); - ctx_mtx = malloc(sizeof(*ctx_mtx) * (mp_maxid + 1), M_ARMV8_CRYPTO, - M_WAITOK|M_ZERO); - ctx_vfp = malloc(sizeof(*ctx_vfp) * (mp_maxid + 1), M_ARMV8_CRYPTO, - M_WAITOK|M_ZERO); - - CPU_FOREACH(i) { - ctx_vfp[i] = fpu_kern_alloc_ctx(0); - mtx_init(&ctx_mtx[i], "armv8cryptoctx", NULL, MTX_DEF|MTX_NEW); - } - return (0); } @@ -170,7 +142,6 @@ static int armv8_crypto_detach(device_t dev) { struct armv8_crypto_softc *sc; - int i; sc = device_get_softc(dev); @@ -181,18 +152,6 @@ armv8_crypto_detach(device_t dev) rw_destroy(&sc->lock); - CPU_FOREACH(i) { - if (ctx_vfp[i] != NULL) { - mtx_destroy(&ctx_mtx[i]); - fpu_kern_free_ctx(ctx_vfp[i]); - } - ctx_vfp[i] = NULL; - } - free(ctx_mtx, M_ARMV8_CRYPTO); - ctx_mtx = NULL; - free(ctx_vfp, M_ARMV8_CRYPTO); - ctx_vfp = NULL; - return (0); } @@ -271,8 +230,6 @@ armv8_crypto_cipher_setup(struct armv8_crypto_session *ses, const struct crypto_session_params *csp, const uint8_t *key, int keylen) { __uint128_val_t H; - struct fpu_kern_ctx *ctx; - int kt, i; if (csp->csp_cipher_alg == CRYPTO_AES_XTS) keylen /= 2; @@ -286,12 +243,7 @@ armv8_crypto_cipher_setup(struct armv8_crypto_session *ses, return (EINVAL); } - kt = is_fpu_kern_thread(0); - if (!kt) { - AQUIRE_CTX(i, ctx); - fpu_kern_enter(curthread, ctx, - FPU_KERN_NORMAL | FPU_KERN_KTHR); - } + fpu_kern_enter(curthread, NULL, FPU_KERN_NORMAL | FPU_KERN_NOCTX); aes_v8_set_encrypt_key(key, keylen * 8, &ses->enc_schedule); @@ -312,10 +264,7 @@ armv8_crypto_cipher_setup(struct armv8_crypto_session *ses, gcm_init_v8(ses->Htable, H.u); } - if (!kt) { - fpu_kern_leave(curthread, ctx); - RELEASE_CTX(i, ctx); - } + fpu_kern_leave(curthread, NULL); return (0); } @@ -378,12 +327,10 @@ armv8_crypto_cipher_process(struct armv8_crypto_session *ses, { struct crypto_buffer_cursor fromc, toc; const struct crypto_session_params *csp; - struct fpu_kern_ctx *ctx; uint8_t *authbuf; uint8_t iv[AES_BLOCK_LEN], tag[GMAC_DIGEST_LEN]; - int authallocated, i; + int authallocated; int encflag; - int kt; int error; csp = crypto_get_params(crp->crp_session); @@ -391,7 +338,6 @@ armv8_crypto_cipher_process(struct armv8_crypto_session *ses, authallocated = 0; authbuf = NULL; - kt = 1; if (csp->csp_cipher_alg == CRYPTO_AES_NIST_GCM_16) { if (crp->crp_aad != NULL) @@ -399,10 +345,8 @@ armv8_crypto_cipher_process(struct armv8_crypto_session *ses, else authbuf = armv8_crypto_cipher_alloc(crp, crp->crp_aad_start, crp->crp_aad_length, &authallocated); - if (authbuf == NULL) { - error = ENOMEM; - goto out; - } + if (authbuf == NULL) + return (ENOMEM); } crypto_cursor_init(&fromc, &crp->crp_buf); crypto_cursor_advance(&fromc, crp->crp_payload_start); @@ -413,12 +357,7 @@ armv8_crypto_cipher_process(struct armv8_crypto_session *ses, crypto_cursor_copy(&fromc, &toc); } - kt = is_fpu_kern_thread(0); - if (!kt) { - AQUIRE_CTX(i, ctx); - fpu_kern_enter(curthread, ctx, - FPU_KERN_NORMAL | FPU_KERN_KTHR); - } + fpu_kern_enter(curthread, NULL, FPU_KERN_NORMAL | FPU_KERN_NOCTX); if (crp->crp_cipher_key != NULL) { armv8_crypto_cipher_setup(ses, csp, crp->crp_cipher_key, @@ -427,11 +366,12 @@ armv8_crypto_cipher_process(struct armv8_crypto_session *ses, crypto_read_iv(crp, iv); + error = 0; switch (csp->csp_cipher_alg) { case CRYPTO_AES_CBC: if ((crp->crp_payload_length % AES_BLOCK_LEN) != 0) { error = EINVAL; - goto out; + break; } if (encflag) armv8_aes_encrypt_cbc(&ses->enc_schedule, @@ -464,18 +404,11 @@ armv8_crypto_cipher_process(struct armv8_crypto_session *ses, error = armv8_aes_decrypt_gcm(&ses->enc_schedule, crp->crp_payload_length, &fromc, &toc, crp->crp_aad_length, authbuf, tag, iv, ses->Htable); - if (error != 0) - goto out; } break; } - error = 0; -out: - if (!kt) { - fpu_kern_leave(curthread, ctx); - RELEASE_CTX(i, ctx); - } + fpu_kern_leave(curthread, NULL); if (authallocated) zfree(authbuf, M_ARMV8_CRYPTO); From nobody Mon Aug 28 23:24:58 2023 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 4RZRVL4WDqz4s4mK; Mon, 28 Aug 2023 23:24:58 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZRVL3sWcz4Yjy; Mon, 28 Aug 2023 23:24:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693265098; 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=aw+pyfp9bUhO3yKHWM2Zm2taseMKRf/pHscM3OL4yfo=; b=oNYoUGysN7gnNr+LwipqztnL6xPLP7MlI4nfnJyQuGQXfETEPZi4UNIW2TKvJTxLhRuR2T ZoxtfkXHlTlGhMmK9Hk6WXX29n2vuE+0fBOeB/3jSJ7vOPtiFjvvL+85wHM5Cv3fAD5EIx yjJS2K084ahIxAMhNNY3fnVWXqoChEpquyMkvnU7tpPf/PVBhwmnu+5cA9IRNKFaotrZKF om2Im3KSGIDrUYX5Q8ahw8ksuY5Zuar/8ILVxNPSIuWo05lkyoMuH7WL7kK4d0wYw+rS26 lvpFjgq6tsDRYW1GeG4WUSZQw4dQeBYrru5SfUjFgn/thl0v3oJRVPe6kYxWVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693265098; a=rsa-sha256; cv=none; b=NkDQ2tg6E4PlyKLH90I0ZwBsGd1qDZE6w5muMaV4rn2Ix00uxM8owxCIE5m/saYNnioTS6 LJkL5m+7U2u/HmcHaCvDnqRK4id/iNls8+hR251FZBOMSrVWoghB6qnyd80U8AaUAyw501 3ax/gZyilXGrxKP+i65vAI45jdtKCI8jLSY9kxF7olvxNMMFJR4WHE3Z/+tJWmtvCihhG8 vzJ1XY5Og8i/QeKGKaRdFJKyKKxmDR57BPkoWeLAPVB4N1uYV7v46bhMu9rkDdDpaMNHuS F2l+QiMzkVidq2IWsgc+rwMPEhdo3ddFAQaFiEwbDyd4wpsi0VQt2BBTIYCK+Q== 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=1693265098; 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=aw+pyfp9bUhO3yKHWM2Zm2taseMKRf/pHscM3OL4yfo=; b=eCH8GnqX99xSy8iqTCig8oK9IAi2SHVSpqsZaO7PyqQvixwk1EeFs7I7dk3f/fAemvkNMO BapWanr+QkhXZQsDwwXrpnNStEgyd0FYBDJLDMghv+8DgO6u0VfJ+AIpIvIXHpylIGp8Tx YASBFhmDtZAtnUmOOk/W6FSOD/1mkzF1QUS+2M0+Cnu67O+CftO+3N2K1CKp+NeOdRXV1u jWNA62oLxQ06iRa8lkpASRW/SoGFYpXPgtkZOWcYkqP6ThiOEMOMs5gXazKaE80uxAZXGC R8yjKU/suNDVJCwzeo3Mw2gPYQzrO2yDmJEoh4SKBTeYwub4+bxGM3tex0t/pg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZRVL2yJ8zCyR; Mon, 28 Aug 2023 23:24:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SNOwJX060584; Mon, 28 Aug 2023 23:24:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SNOwfK060581; Mon, 28 Aug 2023 23:24:58 GMT (envelope-from git) Date: Mon, 28 Aug 2023 23:24:58 GMT Message-Id: <202308282324.37SNOwfK060581@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: fdd51760c278 - main - armv8_crypto: Remove dieing flag and rw lock 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org 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: fdd51760c278302773edbd2466d35b35b865f5d9 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fdd51760c278302773edbd2466d35b35b865f5d9 commit fdd51760c278302773edbd2466d35b35b865f5d9 Author: John Baldwin AuthorDate: 2023-08-28 23:23:43 +0000 Commit: John Baldwin CommitDate: 2023-08-28 23:23:43 +0000 armv8_crypto: Remove dieing flag and rw lock crypto_unregister_all already disables new sessions and waits for existing sessions to be destroyed before returning. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41579 --- sys/crypto/armv8/armv8_crypto.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/sys/crypto/armv8/armv8_crypto.c b/sys/crypto/armv8/armv8_crypto.c index a8d88c31edc0..fd1d845c29b0 100644 --- a/sys/crypto/armv8/armv8_crypto.c +++ b/sys/crypto/armv8/armv8_crypto.c @@ -44,12 +44,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include @@ -62,9 +60,7 @@ #include struct armv8_crypto_softc { - int dieing; int32_t cid; - struct rwlock lock; bool has_pmul; }; @@ -119,7 +115,6 @@ armv8_crypto_attach(device_t dev) uint64_t reg; sc = device_get_softc(dev); - sc->dieing = 0; reg = READ_SPECIALREG(id_aa64isar0_el1); @@ -133,8 +128,6 @@ armv8_crypto_attach(device_t dev) return (ENOMEM); } - rw_init(&sc->lock, "armv8crypto"); - return (0); } @@ -145,13 +138,8 @@ armv8_crypto_detach(device_t dev) sc = device_get_softc(dev); - rw_wlock(&sc->lock); - sc->dieing = 1; - rw_wunlock(&sc->lock); crypto_unregister_all(sc->cid); - rw_destroy(&sc->lock); - return (0); } @@ -273,21 +261,12 @@ static int armv8_crypto_newsession(device_t dev, crypto_session_t cses, const struct crypto_session_params *csp) { - struct armv8_crypto_softc *sc; struct armv8_crypto_session *ses; int error; - sc = device_get_softc(dev); - rw_wlock(&sc->lock); - if (sc->dieing) { - rw_wunlock(&sc->lock); - return (EINVAL); - } - ses = crypto_get_driver_session(cses); error = armv8_crypto_cipher_setup(ses, csp, csp->csp_cipher_key, csp->csp_cipher_klen); - rw_wunlock(&sc->lock); return (error); } From nobody Mon Aug 28 23:24:59 2023 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 4RZRVM5Nk1z4s4H7; Mon, 28 Aug 2023 23:24:59 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZRVM4cw5z4Z4M; Mon, 28 Aug 2023 23:24:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693265099; 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=QF7b4wWZdNcaKqPFJZdn2533j4bvqVTFIg7DZpbXzGw=; b=DDhno7SvdxgOiKo71s4ljUhP0RavH/cAjlQ1kIwdSAQxkkCnOgN6CTrSsqwkxFezeGr/l0 8jiRQaT8xo42nFEMKK9d59/6BKZfey61QyWdNFdxoQadeUcJHBxN3ksLKaHs/S2rgfFoma OvyHDZpKDxabldS1ir2gpGS2hKShAw/S6AIQskohqDQ5vsarLjntxQyh9W5MWR1K6opeui h47D3Kfx3prVPHuJcIJX+Lrmw8Wsv+cgaIK1KH8k8E5R+hPsUfIXLavEbJOr4JyoKDNxKj /nBkAo0nyVTJHxp8G3FZg5RLmYW/8UkWprOKHHEZPFkyPZBe3xPBNSJV3ErNsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693265099; a=rsa-sha256; cv=none; b=p5J52+p5RVNBjHJ2qquQngb1RJ5fFYMEoTdpDMGN0mxNOHtiq6TJZCCljRnGeoGTDFaV/F qwID1Kx6+P71ztzNeQdOZSLT+MBsvsEgVb10bivjCRkFYurPTguu88cU4bM0tdCelDg4Bq /VYvoGsDd953Nmvvtc6CNACWYdnjbOWV1FD2f8AvGo7r0LeO7TeD5A9yy6pLzR2CQFlL9n XODcGtuoHEtfCX+SIXlX+PSwmZVyikGB/hd+6SE/J5fVOhCLAMvYxrkoLR9DL4A51pCNEW s5GKna4ZkGNN8TROtJpJPA1RDCSV6/MLFlgmW7sjnLlX8g9HyFsApKmczi/ohQ== 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=1693265099; 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=QF7b4wWZdNcaKqPFJZdn2533j4bvqVTFIg7DZpbXzGw=; b=dARovqt5GOeg/iPDKwqWQtZJ7gahB1rwdRQDPZAFxtDfBFcTU8xSpDErxJNbAqjNwU6vU3 YXKDheGCaEfcEAp+LXqzFQTxWKFvkYjgGcVVVAoPvh9V/gkljJvSPy1yEefk1ix745098N LIB+8ohAqDc2kOvsiHWA8zegk2YZCNxL9MBAek1EYfkP0w65nnuZ4RJQjnqujV1CPhKuNd 5c86v/I1LgUrKXE/Sb4TWR8pqxEznndAtPt6PMdF+dQUAfTmjAbixOEUWHWk5lDr7tAwWF JbSnEW7T64JR8uULT5PKUF4X6RgMPeiPjO8mHux68LYJRw6rowO/faYqm8eN6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZRVM3kwJzCXb; Mon, 28 Aug 2023 23:24:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SNOxOU060627; Mon, 28 Aug 2023 23:24:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SNOxbs060624; Mon, 28 Aug 2023 23:24:59 GMT (envelope-from git) Date: Mon, 28 Aug 2023 23:24:59 GMT Message-Id: <202308282324.37SNOxbs060624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 3e912bdc31a9 - main - blake2: Switch to using FPU_KERN_NOCTX 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org 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: 3e912bdc31a9e5372d3cedf35c6f566871b8ede7 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3e912bdc31a9e5372d3cedf35c6f566871b8ede7 commit 3e912bdc31a9e5372d3cedf35c6f566871b8ede7 Author: John Baldwin AuthorDate: 2023-08-28 23:24:32 +0000 Commit: John Baldwin CommitDate: 2023-08-28 23:24:32 +0000 blake2: Switch to using FPU_KERN_NOCTX Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41580 --- sys/crypto/blake2/blake2_cryptodev.c | 108 +++++++---------------------------- 1 file changed, 22 insertions(+), 86 deletions(-) diff --git a/sys/crypto/blake2/blake2_cryptodev.c b/sys/crypto/blake2/blake2_cryptodev.c index 77f7abaefcf8..755ac12c5d78 100644 --- a/sys/crypto/blake2/blake2_cryptodev.c +++ b/sys/crypto/blake2/blake2_cryptodev.c @@ -54,22 +54,6 @@ struct blake2_softc { struct rwlock lock; }; -static struct mtx_padalign *ctx_mtx; -static struct fpu_kern_ctx **ctx_fpu; - -#define ACQUIRE_CTX(i, ctx) \ - do { \ - (i) = PCPU_GET(cpuid); \ - mtx_lock(&ctx_mtx[(i)]); \ - (ctx) = ctx_fpu[(i)]; \ - } while (0) -#define RELEASE_CTX(i, ctx) \ - do { \ - mtx_unlock(&ctx_mtx[(i)]); \ - (i) = -1; \ - (ctx) = NULL; \ - } while (0) - static int blake2_cipher_setup(struct blake2_session *ses, const struct crypto_session_params *csp); static int blake2_cipher_process(struct blake2_session *ses, @@ -94,30 +78,10 @@ blake2_probe(device_t dev) return (0); } -static void -blake2_cleanctx(void) -{ - int i; - - /* XXX - no way to return driverid */ - CPU_FOREACH(i) { - if (ctx_fpu[i] != NULL) { - mtx_destroy(&ctx_mtx[i]); - fpu_kern_free_ctx(ctx_fpu[i]); - } - ctx_fpu[i] = NULL; - } - free(ctx_mtx, M_BLAKE2); - ctx_mtx = NULL; - free(ctx_fpu, M_BLAKE2); - ctx_fpu = NULL; -} - static int blake2_attach(device_t dev) { struct blake2_softc *sc; - int i; sc = device_get_softc(dev); sc->dying = false; @@ -130,21 +94,6 @@ blake2_attach(device_t dev) return (ENOMEM); } - ctx_mtx = malloc(sizeof(*ctx_mtx) * (mp_maxid + 1), M_BLAKE2, - M_WAITOK | M_ZERO); - ctx_fpu = malloc(sizeof(*ctx_fpu) * (mp_maxid + 1), M_BLAKE2, - M_WAITOK | M_ZERO); - - CPU_FOREACH(i) { -#ifdef __amd64__ - ctx_fpu[i] = fpu_kern_alloc_ctx_domain( - pcpu_find(i)->pc_domain, FPU_KERN_NORMAL); -#else - ctx_fpu[i] = fpu_kern_alloc_ctx(FPU_KERN_NORMAL); -#endif - mtx_init(&ctx_mtx[i], "bl2fpumtx", NULL, MTX_DEF | MTX_NEW); - } - rw_init(&sc->lock, "blake2_lock"); return (0); @@ -164,8 +113,6 @@ blake2_detach(device_t dev) rw_destroy(&sc->lock); - blake2_cleanctx(); - return (0); } @@ -332,80 +279,69 @@ blake2_cipher_process(struct blake2_session *ses, struct cryptop *crp) } bctx; char res[BLAKE2B_OUTBYTES], res2[BLAKE2B_OUTBYTES]; const struct crypto_session_params *csp; - struct fpu_kern_ctx *ctx; const void *key; - int ctxidx; - bool kt; int error, rc; unsigned klen; - ctx = NULL; - ctxidx = 0; - error = EINVAL; - - kt = is_fpu_kern_thread(0); - if (!kt) { - ACQUIRE_CTX(ctxidx, ctx); - fpu_kern_enter(curthread, ctx, - FPU_KERN_NORMAL | FPU_KERN_KTHR); - } - csp = crypto_get_params(crp->crp_session); if (crp->crp_auth_key != NULL) key = crp->crp_auth_key; else key = csp->csp_auth_key; klen = csp->csp_auth_klen; + + fpu_kern_enter(curthread, NULL, FPU_KERN_NORMAL | FPU_KERN_NOCTX); + switch (csp->csp_auth_alg) { case CRYPTO_BLAKE2B: if (klen > 0) rc = blake2b_init_key(&bctx.sb, ses->mlen, key, klen); else rc = blake2b_init(&bctx.sb, ses->mlen); - if (rc != 0) - goto out; + if (rc != 0) { + error = EINVAL; + break; + } error = crypto_apply(crp, crp->crp_payload_start, crp->crp_payload_length, blake2b_applicator, &bctx.sb); if (error != 0) - goto out; + break; rc = blake2b_final(&bctx.sb, res, ses->mlen); - if (rc != 0) { + if (rc != 0) error = EINVAL; - goto out; - } break; case CRYPTO_BLAKE2S: if (klen > 0) rc = blake2s_init_key(&bctx.ss, ses->mlen, key, klen); else rc = blake2s_init(&bctx.ss, ses->mlen); - if (rc != 0) - goto out; + if (rc != 0) { + error = EINVAL; + break; + } error = crypto_apply(crp, crp->crp_payload_start, crp->crp_payload_length, blake2s_applicator, &bctx.ss); if (error != 0) - goto out; + break; rc = blake2s_final(&bctx.ss, res, ses->mlen); - if (rc != 0) { + if (rc != 0) error = EINVAL; - goto out; - } break; default: - panic("unreachable"); + __assert_unreachable(); } + fpu_kern_leave(curthread, NULL); + + if (error != 0) + return (error); + if (crp->crp_op & CRYPTO_OP_VERIFY_DIGEST) { crypto_copydata(crp, crp->crp_digest_start, ses->mlen, res2); if (timingsafe_bcmp(res, res2, ses->mlen) != 0) - return (EBADMSG); + error = EBADMSG; } else crypto_copyback(crp, crp->crp_digest_start, ses->mlen, res); -out: - if (!kt) { - fpu_kern_leave(curthread, ctx); - RELEASE_CTX(ctxidx, ctx); - } return (error); } From nobody Mon Aug 28 23:25:00 2023 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 4RZRVP0djkz4s4m2; Mon, 28 Aug 2023 23:25:01 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZRVN5mNdz4ZHG; Mon, 28 Aug 2023 23:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693265100; 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=1pDBiSk91nAFjvUE4GtSYdySVt3UDfueQxaAZY5PUHY=; b=Lky2pfgXiR8MA7NOJMnF3clf0j1+lDlzCOd/t9DSK1oFehw4MntMr/0BSAO396w7fFlXU4 BuMaipdR+1e+BcN8S66663jKOzpuOjAPC96/gasIMtM1dYHQikrQCeMSEJjafJw3393jQk ijPmgN9cpoCZ075VHo+a0sqzYliE70TlbTmQC0BsO7zdfrSN4evfGyfjhI/L4kzwwC3bcJ dyXant2vz8y4shAANqggGoGV6N0TfENokk3c0RxuS9tvkDZcklR4u34j3yT4sIcuhcU7w9 mVdq2eWgOUquI+nXEHaamerzZuGRZiltxNms3L9ozz1zd9k1JUJF8KB3l0eUvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693265100; a=rsa-sha256; cv=none; b=ciBkwfMq4YH/wu8SlD+pKSDY+canWdn2JAaeKcQofwr4Ih31Q2zIQ9xpIlpTWiiIZpBJjJ l+t74S6G4k3//CX29v83nzXEl4C0sGfykCILEnQZQByQVa7PooCLKFQRBbIpGxgTVwekVo OnL6j/rKwp4cEDlu7gBoEQoAuKAALe8FL7dVMPO5C5/L8JzLi+6mLhSrp0JXChA1RsUZLV DKSD7ZsHKt606Be0bgr6wGA1u+vXkQvRUrTodLoVF2+ECg+k73wiuz2Xg/Omg7zAHBoQQQ j4CFpzmcMg2CySq5kkaj0F4JtC+CB0fDOPCFYW2k1uXSdpTpw61VSMIPIUa7mg== 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=1693265100; 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=1pDBiSk91nAFjvUE4GtSYdySVt3UDfueQxaAZY5PUHY=; b=frDwDHSWQrI7uqlieqJ/blOVGpF0AwZ+Of/KgwEGBt+HumQaYu/d4LELjqlZ3lACc8kUmV AYP9HlUo4u8aKM0PMQXRnugY2o1h0WZl2bYLtmpDTJVkMA8uG507DfWALoHaGq8npz7iOL QtP0ycEehfYq01W5rMjH+0HWxhldECse81R1jWkN7DJRZf9xmWKMXsNT7FCxTifc1zcKyI yGNXFrXemsg1bsLOrMSQ/Joo/l3IJo75GPBYIUo8fEqSClXjtYpfhy2/jgtJGj3bI9ZmHu MPravNg6gK+lsmlEuP3+v8NZW3jlcnAXMW1XUGDsF4wSp0Cn2FsfD4LysoifQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZRVN4sRCzCXc; Mon, 28 Aug 2023 23:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SNP0Q1060701; Mon, 28 Aug 2023 23:25:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SNP0pZ060698; Mon, 28 Aug 2023 23:25:00 GMT (envelope-from git) Date: Mon, 28 Aug 2023 23:25:00 GMT Message-Id: <202308282325.37SNP0pZ060698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 79aeecc89f5c - main - blake2: Remove dieing flag and rw lock 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org 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: 79aeecc89f5c740f2a3b0c30238233d2a6bb7ec7 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=79aeecc89f5c740f2a3b0c30238233d2a6bb7ec7 commit 79aeecc89f5c740f2a3b0c30238233d2a6bb7ec7 Author: John Baldwin AuthorDate: 2023-08-28 23:24:42 +0000 Commit: John Baldwin CommitDate: 2023-08-28 23:24:42 +0000 blake2: Remove dieing flag and rw lock crypto_unregister_all already disables new sessions and waits for existing sessions to be destroyed before returning. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41581 --- sys/crypto/blake2/blake2_cryptodev.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/sys/crypto/blake2/blake2_cryptodev.c b/sys/crypto/blake2/blake2_cryptodev.c index 755ac12c5d78..5c3ec07d7de7 100644 --- a/sys/crypto/blake2/blake2_cryptodev.c +++ b/sys/crypto/blake2/blake2_cryptodev.c @@ -29,11 +29,9 @@ #include #include #include -#include #include #include #include -#include #include #include @@ -49,9 +47,7 @@ struct blake2_session { CTASSERT((size_t)BLAKE2B_KEYBYTES > (size_t)BLAKE2S_KEYBYTES); struct blake2_softc { - bool dying; int32_t cid; - struct rwlock lock; }; static int blake2_cipher_setup(struct blake2_session *ses, @@ -84,7 +80,6 @@ blake2_attach(device_t dev) struct blake2_softc *sc; sc = device_get_softc(dev); - sc->dying = false; sc->cid = crypto_get_driverid(dev, sizeof(struct blake2_session), CRYPTOCAP_F_SOFTWARE | CRYPTOCAP_F_SYNC | @@ -94,8 +89,6 @@ blake2_attach(device_t dev) return (ENOMEM); } - rw_init(&sc->lock, "blake2_lock"); - return (0); } @@ -106,13 +99,8 @@ blake2_detach(device_t dev) sc = device_get_softc(dev); - rw_wlock(&sc->lock); - sc->dying = true; - rw_wunlock(&sc->lock); crypto_unregister_all(sc->cid); - rw_destroy(&sc->lock); - return (0); } @@ -142,21 +130,11 @@ static int blake2_newsession(device_t dev, crypto_session_t cses, const struct crypto_session_params *csp) { - struct blake2_softc *sc; struct blake2_session *ses; int error; - sc = device_get_softc(dev); - ses = crypto_get_driver_session(cses); - rw_rlock(&sc->lock); - if (sc->dying) { - rw_runlock(&sc->lock); - return (EINVAL); - } - rw_runlock(&sc->lock); - error = blake2_cipher_setup(ses, csp); if (error != 0) { CRYPTDEB("setup failed"); From nobody Mon Aug 28 23:33:05 2023 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 4RZRgj3rgTz4s4sC; Mon, 28 Aug 2023 23:33:05 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZRgj3HSQz4c9Q; Mon, 28 Aug 2023 23:33:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693265585; 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=Nvd70PI/7Od0AhTw4JzScPe3psLCe27g4jj3VSG7PEY=; b=tEHsD9sANk4HsvNZ9dGOIQc772fJMn+FNFFstUc4Ub1o6vMbE9bB1IdF+I8+LEsCgHeMjn 3l4aJhx6Mz2VJyNuXe0y3qw9sgMiANzCsodfa2IbMSR1Or8svyM+P5rOhCbK4zcwTN8Pkh 1iAme9MjbVWGCvCdad0mCZpJWGP9aJ2j2Vo+XdGrre6YaFivcfCj3KFN0OZGTIPhEBIUkv vs+aSZUlANoIf03scVZ7o8F3kACgD1MAc2m20hILOfol1G1PguYVbRpNcA8EhXFNY+abvu k4551WUWipUZ9GJw3D/Xv616nprvuqBxSibCiU6hOgGUpEVMzZajMm3gYp0Esg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693265585; a=rsa-sha256; cv=none; b=H2vTq5CKj3WVGe/q3WONWpXlDdUET35DcBGumCRXuss+9Rr/WQNRB2rTxsxIp4hlCOzEvt HlPmmaXikgI7/vY4YD1zhMlgYd3P8VodT3+xoWMd5QWX7SNrpAIUbGr+TZWEESh57mZjvl Y8CDWyzXSqx1X3HnMTQizVS5tJR2N5p2ACTJXDHQsXwGksEhUEpmelCH0RTfCsTxcu3kKH oHogCMAW8ZBQ3LAfNou467eVm4SKjpoMO3Irw8j2PPrgQDc2IOPUsqRnzLcf5irhm4wdp8 VOPV6pDSi3r9zalQEk18gOTXOalw+Hgp8GCVcWkMRoXZiR9f7k3e290how2tgQ== 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=1693265585; 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=Nvd70PI/7Od0AhTw4JzScPe3psLCe27g4jj3VSG7PEY=; b=Xu8CZtkx4XgBPYdwf7TaseT8BMoiAEfha40g4aZlcVE2NsZJ14h01x5rLE4KPqnCytmcwP 1vpAe0kBW95VRCB91/jRsZdzR24n6WnBoX4jBGN3triQZ33Q0ujMShBlhflq7zr4EBPZnw F2pFDy/joOvZD8AYSe8MMKMo0yAbU0Zj4MggfFOZbjSdg9Wxd3hxJF2sSsusKEvYnkOi3e fzeC/yeb8OQnjRrNDWiagDczAALw411WYhT46HfnDkC4Sz2B5DABM+FwqwHfQTDi/hJmht CfaBpQcvY0F8RBY5KaHd5KMmGg/EL2094uX+skIYxpVkBnOQk8wIWNMAKegx4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZRgj2KdCzD0G; Mon, 28 Aug 2023 23:33:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SNX5hK076950; Mon, 28 Aug 2023 23:33:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SNX5YT076947; Mon, 28 Aug 2023 23:33:05 GMT (envelope-from git) Date: Mon, 28 Aug 2023 23:33:05 GMT Message-Id: <202308282333.37SNX5YT076947@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 570688f0a5c2 - main - spibus: Make ofw_spibus probe just a little more favored 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 570688f0a5c2db8e006a9f1f805103d7c407281f Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=570688f0a5c2db8e006a9f1f805103d7c407281f commit 570688f0a5c2db8e006a9f1f805103d7c407281f Author: Justin Hibbits AuthorDate: 2023-08-28 23:27:11 +0000 Commit: Justin Hibbits CommitDate: 2023-08-28 23:32:44 +0000 spibus: Make ofw_spibus probe just a little more favored With ade70a1ad(svn r332196) ofw_spibus probes at the BUS_PROBE_DEFAULT instead of 0. However, this races with spibus, resulting in ofw_spibus often times losing the race and the OFW node not being referenced. This in turn causes child device tree nodes to not be attached. Solve this by returning 1 higher than spibus, just like acpi_spibus. Sponsored by: Juniper Networks, Inc. MFC after: 1 week --- sys/dev/spibus/ofw_spibus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/spibus/ofw_spibus.c b/sys/dev/spibus/ofw_spibus.c index f9323ab342ee..9460b0cadfe8 100644 --- a/sys/dev/spibus/ofw_spibus.c +++ b/sys/dev/spibus/ofw_spibus.c @@ -69,7 +69,7 @@ ofw_spibus_probe(device_t dev) return (ENXIO); device_set_desc(dev, "OFW SPI bus"); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_DEFAULT + 1); } static int From nobody Mon Aug 28 23:38:31 2023 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 4RZRnz4HdWz4s55c; Mon, 28 Aug 2023 23:38:31 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZRnz3T4Zz4cfV; Mon, 28 Aug 2023 23:38:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693265911; 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=fzrBEcMVOt7Yia6KLpTI10Z5D2rxoHrqt/0/m+zSVJM=; b=QgWRxURKobk/Y6MGnmofZKkFkzJeDYB4XlHngnxBXgRRkf0d8Z0CasHCblbQSNF110ld+W 3PaaAidduBrrY6ZxU3o10aQ6w77R+6F8TlAYFZqSuYjdNKrZNi2q5h9oa5+Z5TepRBa/rb XOU7TxM1vh0Che5OmLlWlmNa/XioHC5CdOKIWaCm5mHQGNb3HYhpAml9emHG3O/md1EnKq AySngIme4kgQ4CVk2m+BLkV9zDOS7KuEyYKAYPqqi7EoJQPVT0AIXsDGBkfzULI5CAveJc Af94GdLEORKoqmAs981vSYbovArfzErZCVnT+XoY356kMg5dPa80v0zAzctTgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693265911; a=rsa-sha256; cv=none; b=yKxDZf+odFkn7nTWUGwWDo6PMEYB1aPEtIImIhIKTrSEf1xU5TWhKRZZZTwC8fK+WGMdaf C4skAx5jitYUbT60f2rZasAeKmOOmC6MO7H2IoFsEMYOPC+YdtXCdWepixSxJIUKiEgki9 et8arldfSYMREjOl+hTHigSfRZngPd67fuF2rnZ7EbeKj+g7IGNT4Pnv1V8b4gbT9jk2vE jUNPMXGWkNIiUIlm/n4eMWEquSC7AIOv+8Wd96esvLbOSLlLWAJe4y5LH1Hq34Vy5wZWsI BDCABaiQhSv+WvUa0jQXJIrGCgeEyFJbUfNyN/vEtlPW4VpU08rOOurCa7zgmQ== 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=1693265911; 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=fzrBEcMVOt7Yia6KLpTI10Z5D2rxoHrqt/0/m+zSVJM=; b=SiDkasZ2gPOK2mG8dbdFDLlXSITRdnbF6MgWXT2JfCc+XLluPmMpGr7qyqU/yil5oVG8pR S2vtwd2JNOs9ptMurKHyhY7JNEqNNB+CyY4x1ojYMbkE970kyxbJc+WF4Kf2Mexf+e41XP zZdI6IIR+DUchJCK20i3c0puSpA1HUOQam9nr7Zxy4ad/EHLJuZ3OJRFILTjDAb/Wlj/sW TpUh35IzXgNNieK/gFJlA4h7RpCmJvYIeZJ2e5CbVrqfYDtoaMoPpA5O37t7T9ME+4mqlc bZDJOHfm3ZdlDWcbAhb6y15GJ0/9dv5V8vNpv7ZWqvdvMGKsMQLysK2w4e1lgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZRnz2PzLzDHr; Mon, 28 Aug 2023 23:38:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37SNcVbR077813; Mon, 28 Aug 2023 23:38:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37SNcVx0077811; Mon, 28 Aug 2023 23:38:31 GMT (envelope-from git) Date: Mon, 28 Aug 2023 23:38:31 GMT Message-Id: <202308282338.37SNcVx0077811@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: aca3bd160257 - main - libc: Fix fixed-width case in the new integer parser. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aca3bd1602577591e5cd237c4bb0bb71b3be0c75 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=aca3bd1602577591e5cd237c4bb0bb71b3be0c75 commit aca3bd1602577591e5cd237c4bb0bb71b3be0c75 Author: Dag-Erling Smørgrav AuthorDate: 2023-08-28 23:38:09 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-08-28 23:38:19 +0000 libc: Fix fixed-width case in the new integer parser. Fixes: d9dc1603d6e4 Differential Revision: https://reviews.freebsd.org/D41622 --- lib/libc/stdio/vfscanf.c | 2 +- lib/libc/stdio/vfwscanf.c | 2 +- lib/libc/tests/stdio/sscanf_test.c | 17 +++++++++++++++++ lib/libc/tests/stdio/swscanf_test.c | 17 +++++++++++++++++ 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c index b4db62c216ed..9727c9e70c34 100644 --- a/lib/libc/stdio/vfscanf.c +++ b/lib/libc/stdio/vfscanf.c @@ -452,7 +452,7 @@ parseint(FILE *fp, char * __restrict buf, int width, int base) } else if (state == haveprefix) { p--; (void) __ungetc(c, fp); - } else if (c != EOF) { + } else if (width && c != EOF) { (void) __ungetc(c, fp); } return (p - buf); diff --git a/lib/libc/stdio/vfwscanf.c b/lib/libc/stdio/vfwscanf.c index 3300751eafb6..b03c9dba0699 100644 --- a/lib/libc/stdio/vfwscanf.c +++ b/lib/libc/stdio/vfwscanf.c @@ -435,7 +435,7 @@ parseint(FILE *fp, wchar_t * __restrict buf, int width, int base, } else if (state == haveprefix) { wcp--; __ungetwc(c, fp, locale); - } else if (c != WEOF) { + } else if (width && c != WEOF) { __ungetwc(c, fp, locale); } return (wcp - buf); diff --git a/lib/libc/tests/stdio/sscanf_test.c b/lib/libc/tests/stdio/sscanf_test.c index 24226f3b3a8d..462b4a6586da 100644 --- a/lib/libc/tests/stdio/sscanf_test.c +++ b/lib/libc/tests/stdio/sscanf_test.c @@ -237,6 +237,22 @@ ATF_TC_BODY(sscanf_i, tc) } } +/* + * Test termination cases: non-numeric character, fixed width, EOF + */ +ATF_TC_WITHOUT_HEAD(sscanf_termination); +ATF_TC_BODY(sscanf_termination, tc) +{ + int a = 0, b = 0, c = 0; + char d = 0; + + ATF_CHECK_EQ(4, sscanf("3.1415", "%d%c%2d%d", &a, &d, &b, &c)); + ATF_CHECK_EQ(3, a); + ATF_CHECK_EQ(14, b); + ATF_CHECK_EQ(15, c); + ATF_CHECK_EQ('.', d); +} + ATF_TP_ADD_TCS(tp) { setlocale(LC_NUMERIC, "en_US.UTF-8"); @@ -245,5 +261,6 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, sscanf_d); ATF_TP_ADD_TC(tp, sscanf_x); ATF_TP_ADD_TC(tp, sscanf_i); + ATF_TP_ADD_TC(tp, sscanf_termination); return (atf_no_error()); } diff --git a/lib/libc/tests/stdio/swscanf_test.c b/lib/libc/tests/stdio/swscanf_test.c index 391a54e0ed5e..10eaf786e5fa 100644 --- a/lib/libc/tests/stdio/swscanf_test.c +++ b/lib/libc/tests/stdio/swscanf_test.c @@ -238,6 +238,22 @@ ATF_TC_BODY(swscanf_i, tc) } } +/* + * Test termination cases: non-numeric character, fixed width, EOF + */ +ATF_TC_WITHOUT_HEAD(swscanf_termination); +ATF_TC_BODY(swscanf_termination, tc) +{ + int a = 0, b = 0, c = 0; + char d = 0; + + ATF_CHECK_EQ(4, swscanf(L"3.1415", L"%d%c%2d%d", &a, &d, &b, &c)); + ATF_CHECK_EQ(3, a); + ATF_CHECK_EQ(14, b); + ATF_CHECK_EQ(15, c); + ATF_CHECK_EQ(L'.', d); +} + ATF_TP_ADD_TCS(tp) { setlocale(LC_NUMERIC, "en_US.UTF-8"); @@ -246,5 +262,6 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, swscanf_d); ATF_TP_ADD_TC(tp, swscanf_x); ATF_TP_ADD_TC(tp, swscanf_i); + ATF_TP_ADD_TC(tp, swscanf_termination); return (atf_no_error()); } From nobody Tue Aug 29 01:37:01 2023 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 4RZVQj2h4Hz4s9gZ; Tue, 29 Aug 2023 01:37:01 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZVQj28rXz3Kfs; Tue, 29 Aug 2023 01:37:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693273021; 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=lr0WzqRtklYFAx7BMImNytrmupzjzCfUQozaXViqn50=; b=LOilol/VxkfHYwKcp2i6ZJX6y1Uo9WPgnRaLQ2Ty3VNohGc3H+4qiHVLvKncI2rpF1ymmD 20E1e2jJnX7+TYg0og4rFf0MQ8Iqop90Qt7RhzpnxbBvpCRt5Uo5NfPQZ8PD85QoBK7wi+ pU9mRV0tNCxfLDrOGB2eDIWr7MVBL+IxovbYp9GAmKo0gDbAVCViix/f1Yf5sioeOTyIJb 984eaX5S88YCvY1Nc60sRBkD6vUtTVHyl1z0ko72fLbQxl7M6echkvIurGcnB0POZ/jdZT lQrWHpDZShlKB41w5NU5Jax+VSi8xNS7m3UCzFttGhUVbrN0rQ4oa+/qT/ZPgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693273021; a=rsa-sha256; cv=none; b=AxfcV6pI17l4JItYsAYDTUUxQ1jWiR2R4WTjCn2SKGobC6t1JHE2WNIn4mqzdTab21ncMN 9/hSQno49mgRUr33kCJQXVjfWlucJl1ujmzRdiSjwIGJi74dEkx8rRzU1knX/mdkPFrSjP LUnjx4XqKBgtVhqFMeO7h0VxX8vc/M3U9ij56xN0akc5XAxBsq+kMApiizAzaE5t4ofCQc p9np7NM3KzNSt0uggmXjhatU5dteft9uyzQIO2cmBOK3/hg+ZI70L/MrJE2xyGhDlKV2Eu jLurFmAAGZE86p8uC1Xgr3+FC5v6JbpO91zJhknQ04u43M6o4RuaqmVJjwZvhg== 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=1693273021; 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=lr0WzqRtklYFAx7BMImNytrmupzjzCfUQozaXViqn50=; b=YNPgoKLKnmroOqDNUaDWReVWyCfqk5qeq0AdhbDrwjUFNsUs7YyXNEjwlw/xi6rMfpBxTD XxGWWSwpHWzSEc9eRTdJ3fJytaiW/jD0u+1YLfHof3cFHVklhN8f72x6rkiiLPA2U9xGiK WAPQJN40/T1t5goNclh+rLmV0uy3Sy3Z1TKoPl1V/hnNII109z7w5sreqXiSuPhnzPfiJ5 HTRuPmSf+KW3p0dDuY7TG6Xvovg6NKVVHCey4N5TQQXcuwc6KVrD+3fihcJsONyKLIblyk 6cf9Ax3lXGWpFyKtbmv16cOW2oHMLCsbeQ3T5keGl8guo4mxHlR40qOoyMRDsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZVQj0wk7zXYx; Tue, 29 Aug 2023 01:37:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37T1b1mJ075294; Tue, 29 Aug 2023 01:37:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37T1b17W075291; Tue, 29 Aug 2023 01:37:01 GMT (envelope-from git) Date: Tue, 29 Aug 2023 01:37:01 GMT Message-Id: <202308290137.37T1b17W075291@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 6b635c74fd41 - main - aesni: Push FPU sections down further 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b635c74fd4135eaae68970bfc5aad9ae905fec7 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6b635c74fd4135eaae68970bfc5aad9ae905fec7 commit 6b635c74fd4135eaae68970bfc5aad9ae905fec7 Author: Mark Johnston AuthorDate: 2023-08-29 01:26:53 +0000 Commit: Mark Johnston CommitDate: 2023-08-29 01:26:53 +0000 aesni: Push FPU sections down further After commit 937b4473be21 aesni_cipher_crypt() and aesni_cipher_mac() execute in a FPU_KERN_NOCTX section, which means that they must run with preemption disabled. These functions handle discontiguous I/O buffers by allocating a contiguous buffer and copying as necessary, but this allocation cannot happen with preemption disabled. Fix the problem by pushing the FPU section down into aesni_cipher_crypt() and aesni_cipher_mac(). In particular, encrypt-then-auth transforms need not be handled with a single FPU section. Reported by: syzbot+78258dbb02eb92157357@syzkaller.appspotmail.com Discussed with: jhb Fixes: 937b4473be21 ("aesni: Switch to using FPU_KERN_NOCTX.") --- sys/crypto/aesni/aesni.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/crypto/aesni/aesni.c b/sys/crypto/aesni/aesni.c index 6d83743dece9..5d5afd8aee41 100644 --- a/sys/crypto/aesni/aesni.c +++ b/sys/crypto/aesni/aesni.c @@ -594,8 +594,6 @@ aesni_cipher_process(struct aesni_session *ses, struct cryptop *crp) break; } - fpu_kern_enter(curthread, NULL, FPU_KERN_NORMAL | FPU_KERN_NOCTX); - /* Do work */ if (csp->csp_mode == CSP_MODE_ETA) { if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) { @@ -612,7 +610,6 @@ aesni_cipher_process(struct aesni_session *ses, struct cryptop *crp) else error = aesni_cipher_crypt(ses, crp, csp); - fpu_kern_leave(curthread, NULL); return (error); } @@ -677,6 +674,8 @@ aesni_cipher_crypt(struct aesni_session *ses, struct cryptop *crp, outcopy = allocated; } + fpu_kern_enter(curthread, NULL, FPU_KERN_NORMAL | FPU_KERN_NOCTX); + error = 0; encflag = CRYPTO_OP_IS_ENCRYPT(crp->crp_op); if (crp->crp_cipher_key != NULL) @@ -749,6 +748,9 @@ aesni_cipher_crypt(struct aesni_session *ses, struct cryptop *crp, } break; } + + fpu_kern_leave(curthread, NULL); + if (outcopy && error == 0) crypto_copyback(crp, CRYPTO_HAS_OUTPUT_BUFFER(crp) ? crp->crp_payload_output_start : crp->crp_payload_start, @@ -784,6 +786,8 @@ aesni_cipher_mac(struct aesni_session *ses, struct cryptop *crp, key = csp->csp_auth_key; keylen = csp->csp_auth_klen; + fpu_kern_enter(curthread, NULL, FPU_KERN_NORMAL | FPU_KERN_NOCTX); + if (ses->hmac) { uint8_t hmac_key[SHA1_BLOCK_LEN] __aligned(16); @@ -849,6 +853,8 @@ aesni_cipher_mac(struct aesni_session *ses, struct cryptop *crp, ses->hash_finalize(res, &sctx); } + fpu_kern_leave(curthread, NULL); + if (crp->crp_op & CRYPTO_OP_VERIFY_DIGEST) { uint32_t res2[SHA2_256_HASH_LEN / sizeof(uint32_t)]; From nobody Tue Aug 29 09:02:28 2023 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 4RZhJh2nDnz4rZ1Z; Tue, 29 Aug 2023 09:02:28 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZhJh1yYvz4WpH; Tue, 29 Aug 2023 09:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693299748; 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=rlDV3wN24v7Gi+DYIvzwK4h+S4Ot2HCKWRgcRNll8sE=; b=ySUJYca1oWS/sQmurcGaNqMbBOMhPHhylfnFMUzWGUoeC5ePonHyce2PFy7pyc+b5yE04Q kHa7LwnrnH9ddQrPzBHVWPfs6KRRIKnk1r0PZ/5kOqY5v267EohrcKLVpyO7Dl6Ikg15bM IpV/y5hfColA/SXGW8kGvIu7R/rcdT8f3xIuoc2czLSV7Vj9luoapR8+kFEHnJjuvlm2kP 9R7Bnc2JFNXVFd86hHEZ/HfamwXha3yygvLW9oe9plBs5Z44UP1WpXZpWbLHkI3Nc4s33R rOG8cWga6NNBz9/AnPHI0b95sIyY+rXOD0pAYMZJcLIX8nPaLoKsGidIp5HEQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693299748; a=rsa-sha256; cv=none; b=mMYDR6uUKBQBTQgkCBQ0mw9WJepTfkIigVwLfP3pFcs6tt9i+VIKwZYDHVh2HBBJeNLbvj kMvZgVB4zTfxmZaKZTu9c6kWHeHlh1wA0hpYqaJRC2gCuPhTUQoYoaUfHt5PmOWIWsn4Mh dlAU0Xf+azFZvjiRGGc3Gd34xD4oP/8qT9s1GOZoTgIWZGcasCoI69Ji6laaVix/Jt8FqX C/C4QjbbfF2WxqAxHEtuDZvek8t7VNrLGSddjst+CxF73oJamqI7ItEfjdeXceFTquqhD/ athVbZEPYLITa5OG2FjEpVlrVVxwDQKh2EVLphUG9sXmjFeJBMh6xzuq4TYLHA== 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=1693299748; 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=rlDV3wN24v7Gi+DYIvzwK4h+S4Ot2HCKWRgcRNll8sE=; b=xjjZvv2Jmc6BO7ThJ9HeKyzjRTEwPProqieJyvD93KKC6Z+xC5lQ7K8q2PwSSsmGQKqGTh zgc3pKwSY+YIdmkqEtQDxDVqnvO6ebznvn7zvDFvX0WEd9cBv2BDiyY0pYEVgc8Wgt0hTb LNLtQaKzPIs5QLJZKqtA/dDs19jTMcXSYRm9lHLNCuemep0b4s4YYOnM1gHquUBcG5cCBA v5KiZFvIN4HK8temhye0oWBDYOmrvJilgWKPDOfHnPWyZ/KTR4vQ/C/Qlvn+uGw/I9YWu+ nXUqOjv5HzwOVSSQ7m9cSgsZe4mHVqy3yU8GxNfR/6Pl+rk6RQ6nQMTJ/A2oUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZhJh11B1zlTn; Tue, 29 Aug 2023 09:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37T92SFA026551; Tue, 29 Aug 2023 09:02:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37T92S7T026548; Tue, 29 Aug 2023 09:02:28 GMT (envelope-from git) Date: Tue, 29 Aug 2023 09:02:28 GMT Message-Id: <202308290902.37T92S7T026548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 2e8edbc285cf - main - pf: Remove DIOCCLRSTATES and DIOCKILLSTATES 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e8edbc285cf1baff3f177c4bfc8c3564d394dad Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2e8edbc285cf1baff3f177c4bfc8c3564d394dad commit 2e8edbc285cf1baff3f177c4bfc8c3564d394dad Author: Kristof Provost AuthorDate: 2023-08-28 13:30:50 +0000 Commit: Kristof Provost CommitDate: 2023-08-29 09:01:51 +0000 pf: Remove DIOCCLRSTATES and DIOCKILLSTATES These now have nvlist based alternatives, so remove them. Reviewed by: mjg, Pau Amma (man page) MFC after: never Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30056 --- share/man/man4/pf.4 | 45 +++++++++++++++++++++++------------------- sys/net/pfvar.h | 2 -- sys/netpfil/pf/pf_ioctl.c | 50 ----------------------------------------------- 3 files changed, 25 insertions(+), 72 deletions(-) diff --git a/share/man/man4/pf.4 b/share/man/man4/pf.4 index 4055c66fbbce..0f7bde1031cb 100644 --- a/share/man/man4/pf.4 +++ b/share/man/man4/pf.4 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 12, 2023 +.Dd August 28, 2023 .Dt PF 4 .Os .Sh NAME @@ -338,35 +338,40 @@ and fields of the .Va state nvlist from the state table. -.It Dv DIOCKILLSTATES Fa "struct pfioc_state_kill *psk" +.It Dv DIOCKILLSTATESNV Fa "struct pfioc_nv nv" Remove matching entries from the state table. This ioctl returns the number of killed states in -.Va psk_killed . +.Va "killed" . .Bd -literal -struct pfioc_state_kill { - struct pf_state_cmp psk_pfcmp; - sa_family_t psk_af; - int psk_proto; - struct pf_rule_addr psk_src; - struct pf_rule_addr psk_dst; - char psk_ifname[IFNAMSIZ]; - char psk_label[PF_RULE_LABEL_SIZE]; - u_int psk_killed; +nvlist pf_state_cmp { + number id; + number creatorid; + number direction; +}; + +nvlist pf_kill { + nvlist pf_state_cmp cmp; + number af; + number proto; + nvlist pf_rule_addr src; + nvlist pf_rule_addr dst; + string ifname[IFNAMSIZ]; + string label[PF_RULE_LABEL_SIZE]; }; .Ed -.It Dv DIOCCLRSTATES Fa "struct pfioc_state_kill *psk" +.It Dv DIOCCLRSTATESNV Fa "struct pfioc_nv nv" Clear all states. It works like -.Dv DIOCKILLSTATES , +.Dv DIOCKILLSTATESNV , but ignores the -.Va psk_af , -.Va psk_proto , -.Va psk_src , +.Va af , +.Va proto , +.Va src , and -.Va psk_dst +.Va dst fields of the -.Vt pfioc_state_kill -structure. +.Vt pf_kill +nvlist. .It Dv DIOCSETSTATUSIF Fa "struct pfioc_if *pi" Specify the interface for which statistics are accumulated. .Bd -literal diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index f9cb45f696d3..d21ef1517bb6 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1924,7 +1924,6 @@ struct pfioc_iface { #define DIOCGETRULE _IOWR('D', 7, struct pfioc_rule) #define DIOCGETRULENV _IOWR('D', 7, struct pfioc_nv) /* XXX cut 8 - 17 */ -#define DIOCCLRSTATES _IOWR('D', 18, struct pfioc_state_kill) #define DIOCCLRSTATESNV _IOWR('D', 18, struct pfioc_nv) #define DIOCGETSTATE _IOWR('D', 19, struct pfioc_state) #define DIOCGETSTATENV _IOWR('D', 19, struct pfioc_nv) @@ -1943,7 +1942,6 @@ struct pfioc_iface { #define DIOCCLRRULECTRS _IO ('D', 38) #define DIOCGETLIMIT _IOWR('D', 39, struct pfioc_limit) #define DIOCSETLIMIT _IOWR('D', 40, struct pfioc_limit) -#define DIOCKILLSTATES _IOWR('D', 41, struct pfioc_state_kill) #define DIOCKILLSTATESNV _IOWR('D', 41, struct pfioc_nv) #define DIOCSTARTALTQ _IO ('D', 42) #define DIOCSTOPALTQ _IO ('D', 43) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 65bab7195d46..e5601710bce1 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2124,31 +2124,6 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) return (0); } -static int -pf_state_kill_to_kstate_kill(const struct pfioc_state_kill *psk, - struct pf_kstate_kill *kill) -{ - int ret; - - bzero(kill, sizeof(*kill)); - - bcopy(&psk->psk_pfcmp, &kill->psk_pfcmp, sizeof(kill->psk_pfcmp)); - kill->psk_af = psk->psk_af; - kill->psk_proto = psk->psk_proto; - bcopy(&psk->psk_src, &kill->psk_src, sizeof(kill->psk_src)); - bcopy(&psk->psk_dst, &kill->psk_dst, sizeof(kill->psk_dst)); - ret = pf_user_strcpy(kill->psk_ifname, psk->psk_ifname, - sizeof(kill->psk_ifname)); - if (ret != 0) - return (ret); - ret = pf_user_strcpy(kill->psk_label, psk->psk_label, - sizeof(kill->psk_label)); - if (ret != 0) - return (ret); - - return (0); -} - static int pf_ioctl_addrule(struct pf_krule *rule, uint32_t ticket, uint32_t pool_ticket, const char *anchor, const char *anchor_call, @@ -3694,36 +3669,11 @@ DIOCCHANGERULE_error: break; } - case DIOCCLRSTATES: { - struct pfioc_state_kill *psk = (struct pfioc_state_kill *)addr; - struct pf_kstate_kill kill; - - error = pf_state_kill_to_kstate_kill(psk, &kill); - if (error) - break; - - psk->psk_killed = pf_clear_states(&kill); - break; - } - case DIOCCLRSTATESNV: { error = pf_clearstates_nv((struct pfioc_nv *)addr); break; } - case DIOCKILLSTATES: { - struct pfioc_state_kill *psk = (struct pfioc_state_kill *)addr; - struct pf_kstate_kill kill; - - error = pf_state_kill_to_kstate_kill(psk, &kill); - if (error) - break; - - psk->psk_killed = 0; - pf_killstates(&kill, &psk->psk_killed); - break; - } - case DIOCKILLSTATESNV: { error = pf_killstates_nv((struct pfioc_nv *)addr); break; From nobody Tue Aug 29 17:23:59 2023 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 4RZvRN1R8tz4s1MN; Tue, 29 Aug 2023 17:24:00 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZvRN0v1Fz4DMX; Tue, 29 Aug 2023 17:24:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693329840; 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=uLgeYnWrf3xVMKWhWaVv0SEUEHA6yN+lDHQ7ZmglTvM=; b=V6gDgsIwCKmLXCp+sDvBLnQrz2ELNfpZT/IcYyiW2b5hysGOHJmien1cVQDEhWDJeWWflm 3A0qjlw+HApy0AJVEQujaPvx9XmzGBv6zOQNajF/ihrMeGVBKCDudpqGzxEoIFNqNapKrz VKCvWtmnGITb2qAp+1OTpSveHbzonrrDDmQXTihYaSoPfv0kW3HqTQ+QthYiAmo+PEXhZk 3kf302fS1RXHEwc9IxgWl5ARNcfOpeL1IGU60/p/sigZ8Dw5mYHUc4wPEujO0ma+/aP6pT PnX/qFQ1duHGMwXxWud4SxZdMYHcZ+h6sZTSy+JZTrXrLA+WgDbQVC4JoJQtdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693329840; a=rsa-sha256; cv=none; b=eLHiceJOHdCSJPGUhT1+c1zXVWygW/aJtFfs/bzQMZKX5mmXbnHRgg0JW4jvTTzANadZ8R uig/JNOI4m1MUhcuzzAIJ2vi9pexgC4xjuJptdVNq5TCwmOr1y50UwF/KSYTBF4n8LneZb pZrKaunNibgWfrCIYADdtLUXEyQAT1ADnrb2Zmcpy89oR/m5n5NIr4vUjiLgLn+J/mOdWv UqlPRo1jVphYspNtzOZQ+7Vyh0fyacH8loUczUu94yc5GDRdvmvEEVgDcZccoeHB3sKM9h Yk+1heTOjXj7Els9kmQDTh4AP0IUX8Q3AhD72zjk+dmIn0SxJjsFQqLomqKZ8w== 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=1693329840; 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=uLgeYnWrf3xVMKWhWaVv0SEUEHA6yN+lDHQ7ZmglTvM=; b=bU4mQ83As5OVKu1csDvv99UCZuvVMXoH4LiVuP42x8LtOVTbZNwv0T9ljjZ4ajze2T3McB uyqve+CHrFm3UDQS9h5N7/hqy6yWqO6QVxJcq1NnjT52AQ1ITGS3OuU0NsdqKh6pq3qWkd 9J38CfFeIvgdcD9BeG8cNtu7WqlW1mDnEQfjBSVTZi2ypveO0XY+OybIG9mLxKglBSoxyJ jcd66E+zMqiH1TTbzBy8ydcc4bnH2yOT/tngB+VtYAdkrNDlbsqvkeeMTqBLFPV2tzmOOc xytiUtsyehtjPYN0jVJYrV6GHLm9aaKMUxgMz1ZB7fCHLeE3PTdRRGJM73dJbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZvRM739bz10sp; Tue, 29 Aug 2023 17:23:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37THNx7L056728; Tue, 29 Aug 2023 17:23:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37THNxum056725; Tue, 29 Aug 2023 17:23:59 GMT (envelope-from git) Date: Tue, 29 Aug 2023 17:23:59 GMT Message-Id: <202308291723.37THNxum056725@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 28977cb9bc15 - main - wmistat: don't restrict reading to the pid that opened the fd. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28977cb9bc15a7f1fb7d28e14cd03f8dafd4e155 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=28977cb9bc15a7f1fb7d28e14cd03f8dafd4e155 commit 28977cb9bc15a7f1fb7d28e14cd03f8dafd4e155 Author: Dag-Erling Smørgrav AuthorDate: 2023-08-29 17:23:16 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-08-29 17:23:16 +0000 wmistat: don't restrict reading to the pid that opened the fd. PR: 273405 MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D41621 --- sys/dev/acpi_support/acpi_wmi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/acpi_support/acpi_wmi.c b/sys/dev/acpi_support/acpi_wmi.c index 1df7cc60a940..6601db4317cb 100644 --- a/sys/dev/acpi_support/acpi_wmi.c +++ b/sys/dev/acpi_support/acpi_wmi.c @@ -976,8 +976,7 @@ acpi_wmi_wmistat_read(struct cdev *dev, struct uio *buf, int flag) sc = dev->si_drv1; ACPI_SERIAL_BEGIN(acpi_wmi); - if (sc->wmistat_open_pid != buf->uio_td->td_proc->p_pid || - sc->wmistat_bufptr == -1) { + if (sc->wmistat_bufptr == -1) { ret = EBADF; } else { From nobody Tue Aug 29 17:24:01 2023 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 4RZvRP2Z8mz4s1dh; Tue, 29 Aug 2023 17:24:01 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZvRP214Xz4Dpq; Tue, 29 Aug 2023 17:24:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693329841; 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=Fj5dp5kf+fGA9EsJ0TNqz/W++KJnaEGN8Gj+XuraxZ0=; b=rJk9st9m4An/Fgto02FKAfz0MYe1IwcGypdvUVuc+wfJuCjA2kWbX6FLsdTuDVECfhNtI6 F9Cg8MLlYDJ/SrlweUvxymbF96YOKeCYfsFs2gKpQz96V4N97sFGwzC2CoIDnFTcL5gD/p I1DXJBPD/X9la9Ykkeq4aMepfKByUTkYkn7KB5dk/1PNYr94vBOaaCTiKmSXyawvXGdDqr oXZ8KKUXTYf3QT4xL/HMc1W58OPipbRQoq1so5jIWKTmDyNS6+oStj/O0Bz5ZnK2EiyOPU IVoW/37wnuIZQ8vRTaMy7TxizEJOcfrY3wf4iauTfDr+n/W1gLR1PWfIvlXvYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693329841; a=rsa-sha256; cv=none; b=g/QHq+7YS3AK4+WqPp5VaAVQgdaPYLbYLL3XRYHzq+psny9cyvcPW8MX4PaDlPLkV3hyGv hZ5NEvTGXFwro27swPKkY1MBPklBktYspTL21NDTv/ykwNEEuJe6qFjWSxkaO8+tNZJc0W AedM5la46WdQwK1hucwO0AbgZVdTEdXx5W3A+i/9+mTKkgywWKTDyu0yAloZHWGrPWh0d3 E0L0kGSgaipV4/WL8xzh8TriBfarENpRP2qYEKlYeZyofUoCLb33yfOp1VGdCyRCmnfkhx OHN8BMjX3PCXIus+xejf6Bos3GC+/7BHXsvqQkqFyqsnA22whf0A4wyD1JyKxg== 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=1693329841; 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=Fj5dp5kf+fGA9EsJ0TNqz/W++KJnaEGN8Gj+XuraxZ0=; b=kztdAv1K2S3on8BxsTmpXXsyTKZUnrlBvRxVHUjE2ZuqyAACaiInOgYkciGHyT1Fve87UZ szYk8JH5idY272WkkQVSkGUBycb+1izbaqsOHQzvWMmsHz25TewYiZPvik3ZKkPpBGWVut IsUGwPRj3aoAfwTXkcZn62LaMXb0WoDHOAS+ahGm6wKe9V5gdM5CC955Nw0+xFfIJH2vWZ WdLvGLubA4/B6cdsf3fnvVrghXRJ0zsEWuZiuv+pdUiB/4jFjlws0vK1t6XOgGo5wEKmgi kgZrHnB6F5NGD5u9NJPD1lj9F5eKpx8CLFChSfH6HKXFEn0425erhLSHUYLNDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZvRP0mGlz116n; Tue, 29 Aug 2023 17:24:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37THO1vR056780; Tue, 29 Aug 2023 17:24:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37THO1wj056777; Tue, 29 Aug 2023 17:24:01 GMT (envelope-from git) Date: Tue, 29 Aug 2023 17:24:01 GMT Message-Id: <202308291724.37THO1wj056777@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 09c45b089d2f - main - iostat: getopt() / usage() cleanup. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09c45b089d2f90ec04153a1b4621dd6bec142959 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=09c45b089d2f90ec04153a1b4621dd6bec142959 commit 09c45b089d2f90ec04153a1b4621dd6bec142959 Author: Dag-Erling Smørgrav AuthorDate: 2023-08-29 17:23:23 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-08-29 17:23:23 +0000 iostat: getopt() / usage() cleanup. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D41636 --- usr.sbin/iostat/iostat.8 | 40 +++++++++++++++++++--------------------- usr.sbin/iostat/iostat.c | 24 ++++++++++++------------ 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/usr.sbin/iostat/iostat.8 b/usr.sbin/iostat/iostat.8 index 17b73f0932c7..863f8ab8466c 100644 --- a/usr.sbin/iostat/iostat.8 +++ b/usr.sbin/iostat/iostat.8 @@ -54,7 +54,7 @@ .\" .\" @(#)iostat.8 8.1 (Berkeley) 6/6/93 .\" -.Dd May 22, 2015 +.Dd August 29, 2023 .Dt IOSTAT 8 .Os .Sh NAME @@ -64,7 +64,7 @@ statistics .Sh SYNOPSIS .Nm -.Op Fl CdhIKoTxz?\& +.Op Fl CdhIKoTxz .Op Fl c Ar count .Op Fl M Ar core .Op Fl n Ar devs @@ -90,6 +90,13 @@ averaged over that time. .Pp The options are as follows: .Bl -tag -width flag +.It Fl C +Display CPU statistics. +This is on by default, unless +.Fl d +or +.Fl x +is specified. .It Fl c Repeat the display .Ar count @@ -102,13 +109,6 @@ is specified. With .Fl w the default repeat count is infinity, otherwise it is 1. -.It Fl C -Display CPU statistics. -This is on by default, unless -.Fl d -or -.Fl x -is specified. .It Fl d Display only device statistics. If this flag is turned on, only device statistics will be displayed, unless @@ -136,6 +136,9 @@ then the device native block size. Extract values associated with the name list from the specified core instead of the default .Dq Pa /dev/kmem . +.It Fl N +Extract the name list from the specified system instead of the default +.Dq Pa /boot/kernel/kernel . .It Fl n Display up to .Ar devs @@ -145,9 +148,6 @@ The utility will display fewer devices if there are not .Ar devs devices present. -.It Fl N -Extract the name list from the specified system instead of the default -.Dq Pa /boot/kernel/kernel . .It Fl o Display old-style .Nm @@ -158,6 +158,13 @@ If .Fl I is specified, total blocks/sectors, total transfers, and milliseconds per seek are displayed. +.It Fl T +Display TTY statistics. +This is on by default, unless +.Fl d +or +.Fl x +is specified. .It Fl t Specify which types of devices to display. There are three different categories of devices: @@ -228,13 +235,6 @@ argument will be included in the .Nm output, up to the number of devices that can be displayed in 80 columns, or the maximum number of devices specified by the user. -.It Fl T -Display TTY statistics. -This is on by default, unless -.Fl d -or -.Fl x -is specified. .It Fl w Pause .Ar wait @@ -267,8 +267,6 @@ is also specified to enable the display of CPU or TTY statistics. If .Fl x is specified, omit lines for devices with no activity. -.It Fl ?\& -Display a usage statement and exit. .El .Pp The diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c index 17013b433917..d4f7a2519a1b 100644 --- a/usr.sbin/iostat/iostat.c +++ b/usr.sbin/iostat/iostat.c @@ -168,7 +168,7 @@ usage(void) * This isn't mentioned in the man page, or the usage statement, * but it is supported. */ - fprintf(stderr, "usage: iostat [-CdhIKoTxz?] [-c count] [-M core]" + fprintf(stderr, "usage: iostat [-CdhIKoTxz] [-c count] [-M core]" " [-n devs] [-N system]\n" "\t [-t type,if,pass] [-w wait] [drives]\n"); exit(1); @@ -198,17 +198,17 @@ main(int argc, char **argv) matches = NULL; maxshowdevs = 3; - while ((c = getopt(argc, argv, "c:CdhIKM:n:N:ot:Tw:xz?")) != -1) { - switch(c) { + while ((c = getopt(argc, argv, "Cc:dhIKM:N:n:oTt:w:xz")) != -1) { + switch (c) { + case 'C': + Cflag++; + break; case 'c': cflag++; count = atoi(optarg); if (count < 1) errx(1, "count %d is < 1", count); break; - case 'C': - Cflag++; - break; case 'd': dflag++; break; @@ -224,6 +224,9 @@ main(int argc, char **argv) case 'M': memf = optarg; break; + case 'N': + nlistf = optarg; + break; case 'n': nflag++; maxshowdevs = atoi(optarg); @@ -231,20 +234,17 @@ main(int argc, char **argv) errx(1, "number of devices %d is < 0", maxshowdevs); break; - case 'N': - nlistf = optarg; - break; case 'o': oflag++; break; + case 'T': + Tflag++; + break; case 't': if (devstat_buildmatch(optarg, &matches, &num_matches) != 0) errx(1, "%s", devstat_errbuf); break; - case 'T': - Tflag++; - break; case 'w': wflag++; f = atof(optarg); From nobody Tue Aug 29 17:25:54 2023 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 4RZvTZ5Czzz4s12F; Tue, 29 Aug 2023 17:25:54 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZvTZ4dRNz4FHc; Tue, 29 Aug 2023 17:25:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693329954; 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=H8Vqq+pJw4SXiK1rWsCLaPpev03VvWVsc6VM909w/vI=; b=SIz2md+UM1c9u2WESmMwV6A6+vfBhY8X0LV1jlRcgj9vLt3zZycor00Yb0fvBoly+M2/Ay p4LUWFdrDyXDUsyZ8FKioddo5Nk2lTOeglMwzyC2MlrIm3Egm0nAAjv61sVxaemICZFnrp 3GALKoNEqC703OGTghxMZzoX1GT852cqWnKAp94/c8X2IpSx3k3hnCWxVu//c3gYGYC4Tv 8J3lfTd88/HDlL4cMfCFKRpRywk7F38jPxWbQsQH6r+QZUp5kSN4W5zSJwhRhbCPjoXyoE 5K91QKDaKahRFp1KjlkfbPvIs0iH84zPTqzBNqLLBmTDU/rzgHUMrVyt0jz7mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693329954; a=rsa-sha256; cv=none; b=QL9PH4UZkKGyuGmZ/mFbv/eI6VMfzn2LpN0i7LjDgl1O36dhiWtDcRLb7vypAyLsUgvi3y 7yv3dixZJs4GrHORYRgS8NLOg8kUjB48L2FD271NQjzVVAdzzjt/un43CBlwhDsjUPtTlr EEnXzjojZBliKhjV+A4YCVrRbT+0BwRaBQJRoQRn3K6aXIwyA/A6kWvvVRmjxiRMXCEJ0p 8Z/V+3CTZ+mLfGX50/r18CWrt2SGpvGhjbn2Srbo1ag0E49vEhczIil8EtTYwd1rGcjMPh XCUKvwexeIImIECLCLm4zMMaUgudeOn4F9InOd0uoIZHXpsRftO7YT90E6FU2A== 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=1693329954; 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=H8Vqq+pJw4SXiK1rWsCLaPpev03VvWVsc6VM909w/vI=; b=WvRQn0GIYPdTDzI4nAhx3KsKs05VtYnV+Pkcu1dadtcv/YO5k54vA64Kkl2HcNZ1Pw0cR6 wvLnDdJedj0swKmSwtBpzwgbJFMCiQjKI4Rvp0b/JVZ2crUAyNcr2aqy8IXmXAK5dagabp a1U+KgkZI7zsHyhyDRZhfTlTiTRFpQqCjKOgVE0UdTyOyKIP0YIpYcxhZb2M8zIty9GDes jBwQdFx0EIL3LWF+vN0FoJnVCcHm6lSqy9iGpjyInxwSgb33/N+8dyqxRQw7MrJlwQlvDY 92ZZZtQzx4BCnITtelk6me90wv3UlEsAC9NnJ9+jIGRDDykNyKpqr8QpPn9oBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZvTZ3jsQz1172; Tue, 29 Aug 2023 17:25:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37THPsOW057205; Tue, 29 Aug 2023 17:25:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37THPsL9057202; Tue, 29 Aug 2023 17:25:54 GMT (envelope-from git) Date: Tue, 29 Aug 2023 17:25:54 GMT Message-Id: <202308291725.37THPsL9057202@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 0b029e9e8594 - main - x86: Introduce APIC ID limit by default on AMD hardware 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b029e9e85943d565c72aa58353538aeac68aa36 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0b029e9e85943d565c72aa58353538aeac68aa36 commit 0b029e9e85943d565c72aa58353538aeac68aa36 Author: Ed Maste AuthorDate: 2023-08-18 03:39:08 +0000 Commit: Ed Maste CommitDate: 2023-08-29 17:25:30 +0000 x86: Introduce APIC ID limit by default on AMD hardware Lack of an AMD IOMMU driver means we cannot successfully route interrupts to APIC IDs 255 and over. Do not add the corresponding CPUs to the per-domain lists of CPUs to which interrupts can be assigned. This change should be reverted (or, at least the APIC ID limit) once we have an AMD IOMMU / interrupt remapping driver. See also commits fa5f94140a83 ("msi: handle error from BUS_REMAP_INTR in msi_assign_cpu") and 4258eb5a0d97 ("x86: handle domains with no CPUs usable for intr delivery."). Reviewed by: markj, jhb Tested by: cperciva (earlier version) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41618 --- sys/x86/x86/mp_x86.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c index 76a1d14f371a..ddcb54b63d88 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -153,6 +153,11 @@ SYSCTL_INT(_machdep, OID_AUTO, hyperthreading_intr_allowed, CTLFLAG_RDTUN, &hyperthreading_intr_allowed, 0, "Allow interrupts on HTT logical CPUs"); +static int intr_apic_id_limit = -1; +SYSCTL_INT(_machdep, OID_AUTO, intr_apic_id_limit, CTLFLAG_RDTUN, + &intr_apic_id_limit, 0, + "Maximum permitted APIC ID for interrupt delivery (-1 is unlimited)"); + static struct topo_node topo_root; static int pkg_id_shift; @@ -258,6 +263,22 @@ topo_probe_amd(void) if ((amd_feature2 & AMDID2_CMP) == 0) return; + /* + * XXX Lack of an AMD IOMMU driver prevents use of APIC IDs above + * xAPIC_MAX_APIC_ID. This is a workaround so we boot and function on + * AMD systems with high thread counts, albeit with reduced interrupt + * performance. + * + * We should really set the limit to xAPIC_MAX_APIC_ID by default, and + * have the IOMMU driver increase it. That way if a driver is present + * but disabled, or is otherwise not able to route the interrupts, the + * system can fall back to a functional state. That will require a more + * substantial change though, including having the IOMMU initialize + * earlier. + */ + if (intr_apic_id_limit == -1) + intr_apic_id_limit = xAPIC_MAX_APIC_ID; + /* For families 10h and newer. */ pkg_id_shift = (cpu_procinfo2 & AMDID_COREID_SIZE) >> AMDID_COREID_SIZE_SHIFT; @@ -1170,6 +1191,8 @@ set_interrupt_apic_ids(void) continue; if (cpu_info[apic_id].cpu_disabled) continue; + if (intr_apic_id_limit >= 0 && apic_id > intr_apic_id_limit) + continue; /* Don't let hyperthreads service interrupts. */ if (cpu_info[apic_id].cpu_hyperthread && From nobody Tue Aug 29 17:43:12 2023 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 4RZvsX397Yz4s2FS; Tue, 29 Aug 2023 17:43:12 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZvsX2XQJz4Hs3; Tue, 29 Aug 2023 17:43:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693330992; 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=imPbfyfubeFsHWks+UyZ70Wm+jPmyfC7FvF98RjzkwA=; b=f/zJovFa12Pf8Ko0ftd5it/ZocJg6tXujCN73lnQI/jkz8+imkFRoGBv4Tai3sD6kVol1E M9W2ko4it1OWYfVjCZUTNus3QGfWxGFJ+qzpclz+m4qvutaDK/+PIUY1pJ7/QMop/2kK+e YEDtQSP5QW+sIGe7WXUjgU5hyYtBtpLPXBL6lihdYUmg3FMeNpyBes+lJzUYc0vu43WrsV 7jWoXm9ux9JA59Ic8SBfBjoFU4T1m083WBA1KJNMnVLApPmEgGtnYJK98dNv82vzWFlF3k HM7gg1jU5i3/sBuhZND63IxfcaEgPCCSxM+UOfyYlCDhCAOznQ3/IBnVUvT8ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693330992; a=rsa-sha256; cv=none; b=MtbsrMCSjKcqyAT7fSO73V+gPRChkOx8lJIEXpSVpe+DfhSzUtqfTL5m70/aK+SFwKOjOY f4pOPBx/qPXbbsjVMKfp57hwRhWJh7PthmhCNWOyx+u+b4WdfeQvdWLSQrn1kKgSranb0S sBs3Wfa6Echbv9aKKlrILImqm+4J/IOKZrE7+rkcFSkR5oql1l+wXrUVrbQP+8utFiJgHc 6Q+mqtgix/a401YCmO42W9CK8mL658kUDlAbrN5oVG1+JMqGGDphekKV0hfBZxxv23I9Qe TEVRHldmXhh4Mq79k6C83OYHhbPS8wGfwbD7ONgXdK270CWvM6xa1S7XumuguA== 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=1693330992; 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=imPbfyfubeFsHWks+UyZ70Wm+jPmyfC7FvF98RjzkwA=; b=RmxXNCvd7mTFdTjUpJSaVb/nKzJUy0MOpzyDAWeFaJWXYm4UD+TIW//7lxwXaU3R0FaynK kPoNp28+PitFTsKOsRIsoOhWwcUWP3zw8KXm3rPpJ5U8d0vlhCo/7pc/f08FHmLGyJqhyS TDsPEpKg1hIP5Gvlz5B9ZhWu5pZ75B1ep9EBBRxaGpYSsRm51GkT2hEw+SaqYcu6EZ1ga0 s/sVzz7BVB8nR4gNWSvjkD/jSchfOxmjupuin+GiwVvnMb/wHvF37T+SuLsexeGaQMH2XF Vx7i9tUuL7QvnW3q+eW8lZjOAeALz1R6lFbOmF8Aeb7MJncMRnSetv8Vz1sLQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZvsX1bltz11qY; Tue, 29 Aug 2023 17:43:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37THhCrD089415; Tue, 29 Aug 2023 17:43:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37THhCj9089412; Tue, 29 Aug 2023 17:43:12 GMT (envelope-from git) Date: Tue, 29 Aug 2023 17:43:12 GMT Message-Id: <202308291743.37THhCj9089412@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 0fe6998d8ad0 - main - releng-azure: Use port name to install Azure CLI 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0fe6998d8ad0bf54c237c8f513bf00cab547b561 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=0fe6998d8ad0bf54c237c8f513bf00cab547b561 commit 0fe6998d8ad0bf54c237c8f513bf00cab547b561 Author: Li-Wen Hsu AuthorDate: 2023-08-29 17:39:11 +0000 Commit: Li-Wen Hsu CommitDate: 2023-08-29 17:39:11 +0000 releng-azure: Use port name to install Azure CLI To overcome package name changing on default Python version updates. Approved by: gjb (re) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41453 --- release/Makefile.azure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/Makefile.azure b/release/Makefile.azure index ba996bc15ac6..528371ad076e 100644 --- a/release/Makefile.azure +++ b/release/Makefile.azure @@ -38,7 +38,7 @@ azure-check-depends: . if !exists(/usr/local/sbin/pkg-static) env ASSUME_ALWAYS_YES=yes pkg bootstrap -yf . endif - env ASSUME_ALWAYS_YES=yes pkg install -y py38-azure-cli + env ASSUME_ALWAYS_YES=yes pkg install -y sysutils/py-azure-cli . else env UNAME_r=${UNAME_r} make -C ${PORTSDIR}/sysutils/py-azure-cli BATCH=1 all install clean . endif From nobody Tue Aug 29 17:43:13 2023 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 4RZvsY6pmcz4s1v6; Tue, 29 Aug 2023 17:43:13 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZvsY3v7wz4HbT; Tue, 29 Aug 2023 17:43:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693330993; 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=hBJLNDsSjUtUY4B1i6GR4mSroY1vcVjQBv2qXbhE9dI=; b=GOMdnYbwQcj0a7qPSJGjGon2WbR0qnLq99YDtrwgQQEmVYQyyp/m+ldP6OsOCQNgqPtd/D sZKn6ULfPsidKk6OhNXCVlJMaYtacNAhKz5NBMLnLs1Fw8J/l55y2KMVifz9rtWozBPktY NwR04FQTxY1JoOvhLGHhBmrtholiBzqiujzdBjQFwV5FR4qz0CY2CXVy+6C6nTDoQBeNbW d6GR9U8Cnvv87/UBnDxA/PGDl5Wqe2/+cVtzHjjTBR2I7kFmadnV3bgG5wFbtwNHYDFvQ8 5pfqgnm4B6cyCns5jwsWnISfVfvZqjzyt3czL2iM3zKrHqtR+sfNyA9m8G4QSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693330993; a=rsa-sha256; cv=none; b=HBphR6beRVp6Tc5MCV7hOsIRDxwW1Si1Y6rdLp80T3ov8+fYiORCPJXCKzffBDHzhGP6sm z6yso1meeBgFcnnvwFgws+YrY0mjisqs9aLNeZfh7CbjPrhMrLfv7nZ5MgvPqSMaUiAeXs FJmk5J4vdO5eKJgSfC2GTYRpX3xi6plXS/jiSgHjrW7CB9nVV297yeZfu7MKdRmVaM2S2+ lEFiRb5BrymbL0fo5WRQnZ6O8+Xip6AQQBBMicDCELs0jyyWiedSmBpXGDYho1WMerAkWR V9wskwaAYPj1P3F70n3j9Jj/iSeaYPpoIg/uCwKsGKtAUMpnksCyFHmWoCacug== 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=1693330993; 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=hBJLNDsSjUtUY4B1i6GR4mSroY1vcVjQBv2qXbhE9dI=; b=j+m8gwD1OCbOU2FACfsTP7BkCoo1Ky/q01QBY6GSB0taFEYA1/6Akz2FB+b0tdP2iNupvN Wa5CIWFj1pCwNqdZKN03AnMI58SNwfFxVRC1sLI7bJ+65fpYMqjr1Z/LLV4LV2xLnShs/2 u0M4FE2IxwEMcp3HNvvOC9gbLteg5/4d+9a6f5iPgE1lk7DulmGozi6MLXFLqKaV7Lop5B c/EREmmE2AjM64LZ5o5jTZrg5oRFfTM5g+vK2z4ikZzUH6hblHskP2iMrN0spc0eeoppqj lq5lOPKAtsLGdDAsaWO4kQcDVtiR2bWQspNna6qy/VDMlJHt6LYxibxUTUuAAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZvsY2t1pz11fC; Tue, 29 Aug 2023 17:43:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37THhDdY089474; Tue, 29 Aug 2023 17:43:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37THhDUA089471; Tue, 29 Aug 2023 17:43:13 GMT (envelope-from git) Date: Tue, 29 Aug 2023 17:43:13 GMT Message-Id: <202308291743.37THhDUA089471@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 78f901dcbd84 - main - releng-azure: Add ZFS support to Azure image buliding and uploading 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 78f901dcbd84ccad3849a8029f2320cf97079856 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=78f901dcbd84ccad3849a8029f2320cf97079856 commit 78f901dcbd84ccad3849a8029f2320cf97079856 Author: Li-Wen Hsu AuthorDate: 2023-08-29 17:40:39 +0000 Commit: Li-Wen Hsu CommitDate: 2023-08-29 17:40:39 +0000 releng-azure: Add ZFS support to Azure image buliding and uploading Approved by: gjb (re) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41454 --- release/Makefile.azure | 18 +++++++++++------- release/Makefile.vm | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/release/Makefile.azure b/release/Makefile.azure index 528371ad076e..a8f59282a09c 100644 --- a/release/Makefile.azure +++ b/release/Makefile.azure @@ -4,7 +4,6 @@ # Makefile for uploading Microsoft Azure disk images. # -AZURE_IMG?= ${.OBJDIR}/azure.vhdf AZURE_UPLOAD_TGTS= azure-check-depends \ azure-do-upload CLEANFILES+= ${AZURE_UPLOAD_TGTS} @@ -19,8 +18,6 @@ AZURE${VAR}!= grep -E '^AZURE${VAR}' ${AZURE_UPLOAD_CONF} | awk -F ' ' '{print $ SNAPSHOT_DATE!= date +-${BUILDDATE} .endif -AZURE_TARGET:= ${OSRELEASE}${SNAPSHOT_DATE} - START_DATE!= date -v-1d -I -u EXPIRY_DATE!= date -v+1m -I -u @@ -44,14 +41,18 @@ azure-check-depends: . endif .endif -azure-do-upload: +.for _FS in ${AZURE_FSLIST} +AZURE_IMG_${_FS}= ${.OBJDIR}/azure.${_FS}.vhdf +AZURE_TARGET_${_FS}= ${OSRELEASE}-${_FS}${SNAPSHOT_DATE} + +azure-do-upload-${_FS}: /usr/local/bin/az storage blob upload \ --account-name ${AZURE_ACCOUNT} --account-key ${AZURE_KEY} \ --container-name ${AZURE_STORAGE} --type page \ - --file ${AZURE_IMG} --name ${AZURE_TARGET}.vhd + --file ${AZURE_IMG_${_FS}} --name ${AZURE_TARGET_${_FS}}.vhd @echo "The disk access URL with shared access signature is:" @echo - @echo -n https://${AZURE_ACCOUNT}.blob.core.windows.net/${AZURE_STORAGE}/${AZURE_TARGET}.vhd? + @echo -n https://${AZURE_ACCOUNT}.blob.core.windows.net/${AZURE_STORAGE}/${AZURE_TARGET_${_FS}}.vhd? @/usr/local/bin/az storage container generate-sas \ --account-name ${AZURE_ACCOUNT} --account-key ${AZURE_KEY} \ --name ${AZURE_STORAGE} \ @@ -67,5 +68,8 @@ azure-do-upload: @echo @echo /usr/local/bin/az storage blob delete \ --account-name ${AZURE_ACCOUNT} --account-key ${AZURE_KEY} \ - --container-name ${AZURE_STORAGE} --name ${AZURE_TARGET}.vhd + --container-name ${AZURE_STORAGE} --name ${AZURE_TARGET_${_FS}}.vhd @echo +.endfor + +azure-do-upload: azure-do-upload-${VMFS} diff --git a/release/Makefile.vm b/release/Makefile.vm index fb00804a81ec..a5d194cc2678 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -24,7 +24,7 @@ CLOUDWARE?= BASIC-CI \ VAGRANT-VIRTUALBOX \ VAGRANT-VMWARE AZURE_FORMAT= vhdf -AZURE_FSLIST= ufs +AZURE_FSLIST= ufs zfs AZURE_DESC= Microsoft Azure platform image AZURE_DISK= ${OSRELEASE}.${AZURE_FORMAT} BASIC-CI_FORMAT= raw From nobody Tue Aug 29 17:43:14 2023 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 4RZvsZ6cgBz4s2QL; Tue, 29 Aug 2023 17:43:14 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZvsZ4sXNz4HqK; Tue, 29 Aug 2023 17:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693330994; 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=8QTswiYkHS4iT8dKhgH2wYbtUN737ZH43eHFzZoEhPs=; b=VWqfFyPwtT06i43mcRMMxJ1kB3FkYzfNck5EKAvF7vmLGNYVQoVnuH72UyCOkcQiNjYfJi KSiiAWqgm2zebi4B7R+KKSqLg7fcWJV8Gn+cte365yQWJ79oylCLZ4f15uEAxc5JUr8g0u F6PorfaKR7+yUmcAUYZ0lrxKx2w9IxXaGpJjH8rAClreM1lb6UCpafZRRIdyv/1YtCX7eh IJrvtuzgTJPg21mDP4ESqoiDAk/xF53JmtZXZMcQ4pjNVMFD03ML3mbtZgiPalSiuMyceh 2M9ZOfEJkfc4IQ6GuicCoPQiKPt0xyguGFTUnoEVRYaX8ehDKv7/4KL8W1PY3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693330994; a=rsa-sha256; cv=none; b=hTnrZFszcROoLJq2IJXPLuM3H0nQPwpVJp4EyRyHp+V3aQ3jqbOPOcNkpTlRB9dlXw7zrS KGQ9LSRCptKhb/4PClkXnYI4fgRj60lVav5Ngrf/658PsPYHJM+imuiZD/9XZDtyKTH2k0 43z7oXK48mTqlw9UvQuWWWM97DwQ8swtowMfcJoIk8kQQGbAObheVL0xUhTLClrras0BuX +XgYijJQcX+AiqGFNbVDE+lkqJPumuYmipRMK1umdg8XLIJltoywJ61y2eMLiXGEwbAyS2 duzsxB5xzL+YAw/IrNV/bp0KCYfEr8SgOIC5VfR6hJZt2reQUI6NbIBKuvibWQ== 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=1693330994; 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=8QTswiYkHS4iT8dKhgH2wYbtUN737ZH43eHFzZoEhPs=; b=xnwQMhusMlEGup/iUlWFLcTvcA6imS8SqpX9yODAnk8sb0A3YzUglb6Y5ZncpFqTlu7HYy XaF3gVCZbsOvvRpHzKLlPHZmzo0DrPZsojVh9+wFnK3rz8qG/UKafNFMpe/ocW0HclKNYS ZO8I7EthHWtYSBB8bnZzUGMGyBHOqs4zlJE1sy2LbreEEGIH9ckejt46BjO53AxYADzQ8Z 8d8Qpn9CXoBhCOPvbMt1jMgi/X9RGPqG+dEGdadtCMxqcugB+pIsQz/jji77tFA9rMCF/f cZ7w6MSD2IasBw1pWNxet3LmKoIQ+klPcd0Pz4c7gWEqPh1wYtoU/eS1iVw9Qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RZvsZ3lhZz11N0; Tue, 29 Aug 2023 17:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37THhEbn089531; Tue, 29 Aug 2023 17:43:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37THhE14089528; Tue, 29 Aug 2023 17:43:14 GMT (envelope-from git) Date: Tue, 29 Aug 2023 17:43:14 GMT Message-Id: <202308291743.37THhE14089528@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 1b10bdf0e2fa - main - releng-gce: Add ZFS support to GCE image buliding and uploading 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1b10bdf0e2fa80a485980b783469687623d3f1c3 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=1b10bdf0e2fa80a485980b783469687623d3f1c3 commit 1b10bdf0e2fa80a485980b783469687623d3f1c3 Author: Li-Wen Hsu AuthorDate: 2023-08-29 17:41:43 +0000 Commit: Li-Wen Hsu CommitDate: 2023-08-29 17:41:43 +0000 releng-gce: Add ZFS support to GCE image buliding and uploading Approved by: delphij (re), gjb (re) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41527 --- release/Makefile.gce | 38 +++++++++++++++++++++----------------- release/Makefile.vm | 2 +- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/release/Makefile.gce b/release/Makefile.gce index bdf7b31ba302..f7fb0d8dc419 100644 --- a/release/Makefile.gce +++ b/release/Makefile.gce @@ -4,7 +4,6 @@ # Makefile for uploading Google Compute Engine disk images. # -GCE_IMG?= ${.OBJDIR}/gce.raw GCE_UPLOAD_TGTS= gce-check-depends \ gce-do-package \ gce-do-upload @@ -27,10 +26,6 @@ SNAPSHOT_DATE= -v${BUILDDATE} GCE_FAMILY_SUFX= -snap .endif -# Really? Uppercase characters are not allowed? Sigh... -# And don't even get me started on the '.'. -GCE_TARGET:= ${OSRELEASE:S,.raw,,:tl:S,.,-,g}${SNAPSHOT_DATE} - gce-upload: ${GCE_UPLOAD_TGTS} gce-check-depends: @@ -53,25 +48,34 @@ gce-check-depends: . endif .endif -gce-do-package: - @# Yes, really... Sigh. - cd ${.OBJDIR} && mv gce.raw disk.raw - cd ${.OBJDIR} && tar --format=gnutar -zcf \ - ${GCE_TARGET:S,${.OBJDIR}/,,}.tar.gz disk.raw - cd ${.OBJDIR} && mv disk.raw gce.raw - touch ${.OBJDIR}/${.TARGET} - gce-do-login: @echo "This requires human interaction, which is not yet supported." @true -gce-do-upload: +.for _FS in ${GCE_FSLIST} +GCE_IMG_${FS}= ${.OBJDIR}/gce.${_FS}.raw +# Really? Uppercase characters are not allowed? Sigh... +# And don't even get me started on the '.'. +GCE_TARGET_${_FS}= ${OSRELEASE:S,.raw,,:tl:S,.,-,g}-${_FS}${SNAPSHOT_DATE} + +gce-do-package-${_FS}: + @# Yes, really... Sigh. + cd ${.OBJDIR} && mv ${GCE_IMG_${_FS}} disk.raw + cd ${.OBJDIR} && tar --format=gnutar -zcf \ + ${GCE_TARGET_${_FS}:S,${.OBJDIR}/,,}.tar.gz disk.raw + cd ${.OBJDIR} && mv disk.raw ${GCE_IMG_${_FS}} + touch ${.OBJDIR}/${.TARGET} + +gce-do-upload-${_FS}: @# Fallthrough in case the bucket already exists. /usr/local/bin/gsutil mb gs://${GCE_BUCKET} || true - /usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET}.tar.gz \ + /usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET_${_FS}}.tar.gz \ gs://${GCE_BUCKET}/ - /usr/local/bin/gcloud compute images create ${GCE_TARGET} \ + /usr/local/bin/gcloud compute images create ${GCE_TARGET_${_FS}} \ --family=${GCE_FAMILY}${GCE_FAMILY_SUFX} ${GCE_LICENSE} \ - --source-uri gs://${GCE_BUCKET}/${GCE_TARGET}.tar.gz + --source-uri gs://${GCE_BUCKET}/${GCE_TARGET_${_FS}}.tar.gz touch ${.OBJDIR}/${.TARGET} +.endfor +gce-do-package: gce-do-package-${VMFS} +gce-do-upload: gce-do-upload-${VMFS} diff --git a/release/Makefile.vm b/release/Makefile.vm index a5d194cc2678..ad09f3ff6602 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -36,7 +36,7 @@ EC2_FSLIST= ufs zfs EC2_DESC= Amazon EC2 image EC2_DISK= ${OSRELEASE}.${EC2_FORMAT} GCE_FORMAT= raw -GCE_FSLIST= ufs +GCE_FSLIST= ufs zfs GCE_DESC= Google Compute Engine image GCE_DISK= disk.${GCE_FORMAT} OCI_FORMAT= qcow2 From nobody Tue Aug 29 21:47:20 2023 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 4Rb1HD229Rz4rFxS; Tue, 29 Aug 2023 21:47:20 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rb1HD1Xhvz3KD1; Tue, 29 Aug 2023 21:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693345640; 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=1boI6/Dti3GcY2X10sK8SewSNfkc7c3EmnKEFWh6ZUQ=; b=v6dj2vNcJ51iKvyLIFWFrpGDYjE21PbPr693tIVQd+cxMAXovNIzdgkK2P5t9DpfjN4kJm cqustNnKAhyK+r3Fx4LyVq76tZIojy+bgjWeHDfuMt53edFG4zlEEZKKElOtgT7ecQVLvz uRIq4QBQioTd6PPKQNCyukxTXwYBAjdSPRHKcCCYAN0DXAFdCAIKKX2nBPTM6+zbNq28qv qWhFQaGYJsPTtvGa00YhMznTOeFjNjlEKTYXzQqpjob+F5TpsuU91S8DmfdHG7J4ApSN52 me0gF/5PbHF3yZd8VEEYhZQf14nSQQKPMCopVm7trS32hEbuoe4BlqCMSMioNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693345640; a=rsa-sha256; cv=none; b=FCem5u88u14T3ZjGFsOIiOwV2DvtkChQ/Rv2lNGqfxIXI9WD3LneTEwnBTPHfrP789/mLm X0k4nUp31Gejx8YHBOmS8XVUqEg+Vc5d77apqIuxmeBOy3gkEEINmNMQCL9TGQCZlI7gQb Xw2MX1I9ID/+X2+2vJg14bu9f3y2xFdf3Dax28tZa1gobftv4q33UHObfP/WCcJ230ClAu JnDjcOkOootXp8PEoP/12ktFwmPDfAsfw6J3wDQU+aSbhXBLh3qq7W5HVI6kg3m8Q/7APm iHEZ1ScWDgpqU9zr0gHuqjaIEBuGwSwJliGlOjjRPec7MwHz/zF211EFM11pYQ== 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=1693345640; 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=1boI6/Dti3GcY2X10sK8SewSNfkc7c3EmnKEFWh6ZUQ=; b=dyqjYFgMM9llhwgzn1fgP1g7Lo0v0C996xbGmJ/qPnDHMYBgMk7vFe6p90wDSH7SCT3Lnt SbZX8mZCD8lDpL69jBKuAl8MB5mGd9fN2Ibtap50m6LsSFfU2neaHVe+YGZGJTIZX/6XJI lsBia/YbImKQGXOtAhtqql9WLEqsCP7CkUFvwboXz6fx/x9LwRy4pe8thsPbUcDmeg6uAm BtKs+STshYmiT7vaEhWwidOLCUHq5kTuwbtMfzVfbhf/+3ixScdDgk//e0AOFBOmcsl/iz z2JdDBRaBlDRBcaZFjp+nIrPb9YhtCpgGRlp4Jf1zBpz3sSs/DZAWnBS7me5ig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rb1HD0cBfz17hY; Tue, 29 Aug 2023 21:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37TLlKQW087542; Tue, 29 Aug 2023 21:47:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37TLlKHc087539; Tue, 29 Aug 2023 21:47:20 GMT (envelope-from git) Date: Tue, 29 Aug 2023 21:47:20 GMT Message-Id: <202308292147.37TLlKHc087539@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: eba6abafc198 - main - OpenSSL: Fix handling of the "0:" label in arm-xlate.pl 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org 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: eba6abafc1988dc8753b08822abff333d4810e75 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=eba6abafc1988dc8753b08822abff333d4810e75 commit eba6abafc1988dc8753b08822abff333d4810e75 Author: Tom Cosgrove AuthorDate: 2023-08-29 21:38:11 +0000 Commit: John Baldwin CommitDate: 2023-08-29 21:38:11 +0000 OpenSSL: Fix handling of the "0:" label in arm-xlate.pl When $label == "0", $label is not truthy, so `if ($label)` thinks there isn't a label. Correct this by looking at the result of the s/// command. Verified that there are no changes in the .S files created during a normal build, and that the "0:" labels appear in the translation given in the error report (and they are the only difference in the before and after output). Obtained from: OpenSSL commit 9607f5ccf285ac9988a86f95c5ad9f92b556a843 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41587 --- crypto/openssl/crypto/perlasm/arm-xlate.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crypto/openssl/crypto/perlasm/arm-xlate.pl b/crypto/openssl/crypto/perlasm/arm-xlate.pl index a90885905c0f..57b75c4e5dad 100755 --- a/crypto/openssl/crypto/perlasm/arm-xlate.pl +++ b/crypto/openssl/crypto/perlasm/arm-xlate.pl @@ -159,9 +159,8 @@ while(my $line=<>) { } { - $line =~ s|(^[\.\w]+)\:\s*||; - my $label = $1; - if ($label) { + if ($line =~ s|(^[\.\w]+)\:\s*||) { + my $label = $1; printf "%s:",($GLOBALS{$label} or $label); } } From nobody Tue Aug 29 21:47:21 2023 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 4Rb1HF3bwpz4rG32; Tue, 29 Aug 2023 21:47:21 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rb1HF2qJRz3Jlm; Tue, 29 Aug 2023 21:47:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693345641; 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=UdE0byb1P/sk/ZeA6/cxR1l0pdkFgfoce5P3ebqYDbY=; b=vSNA5a6MFfPZ/M9Q1HrETaEbpBRgftCQfwRvtkoTYA/arHyIBsE86gsTLQuDLJ31pvA4Ic mvE/9gglY+tCfrZtVMAjQrnIi3gK8JJodrm3yQyBddE8TX6x9L7B5rUfQoSRBilqzB7H3E Iikgto5sHLj/8jCWD16OQQ32CFMJ6/jm9Cf6WI97IyFH3fd+y7Z5sfS2lPyTCV4gxmWhxo 5NgpuWlWqwkKhSPn1OYKecIPSiyZu+FDkEdKmQxk8jE4Y7fpBEBf8uYARiu5eq/V57Cg9v Ha9o2rZ8rqGl+TAPEZbGsJvPMJfN0rDYlDLNLIo8+eKg0QaReMOc+T3hN5wrsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693345641; a=rsa-sha256; cv=none; b=c7+Gsq/D8OipuLRc6e2ANfM+QVmkQGpfQ7XLbnghoCYNxU+GEjSOpUXHKiw/TTOI6TLxQQ XmQSZ5795WmhoJZQgvhJ705Hiqs0o6FB9xCYuEkZt+Y/obW97P+pwgLWhH1rhW2RAR1sKL JVgPDUkY61VZjSUtf4wLFqHLRi7avtfPoUtLwhDF8cgZKZC48/tALXOP0zcBpu8uSo+CwK cq3KnXHX0ql6bvg9ZQdboE61CWQXZsIaA/cJdlAweVwBEwXYNHPm3QhP5OCToGd60LqDCH 9YBE4vROGux+qqLjCgfQ3sgxQUjtqe6gqqetp+fahPxRjNXk456kut04r/JcMg== 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=1693345641; 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=UdE0byb1P/sk/ZeA6/cxR1l0pdkFgfoce5P3ebqYDbY=; b=xRC3Vt75jiys+f5N8zFmKFZ75jfywTR8PBwv6T37Dhwik6NjPEwNs4IPH2zgtvCNr+711s Q6H+iW5UmbGJQSJnX6hta3jMo8tYDpcCteOAVqLd9p6JHjEsm+tHQjATHxYGMUfP4oHfvy SjhdqI+o0N5WCQAzpBodWaaK4M5N3n11hnTnp1ZIMamcUMGcYXw5UhmmwvDqPDk/BvFB0l FV+3zP+/OhIqkjwxB7s7XantJv8fznILCG0QPR05WH0atJQiy0mqjYxH5jZdtZ/BWnQBYE uCDLX4KeudP2w7VlejSTOe6WnPVyYauik/gBuOfbCvpKf9zlUDPmdRIzsBeh5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rb1HF1dCDz17Y5; Tue, 29 Aug 2023 21:47:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37TLlLaI087590; Tue, 29 Aug 2023 21:47:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37TLlLYW087587; Tue, 29 Aug 2023 21:47:21 GMT (envelope-from git) Date: Tue, 29 Aug 2023 21:47:21 GMT Message-Id: <202308292147.37TLlLYW087587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 7406b6f9761c - main - Makefile.asm: Simplify variable expansions in generated headers 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org 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: 7406b6f9761c35eb53f91f54d1a687d96d638907 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7406b6f9761c35eb53f91f54d1a687d96d638907 commit 7406b6f9761c35eb53f91f54d1a687d96d638907 Author: John Baldwin AuthorDate: 2023-08-29 21:38:27 +0000 Commit: John Baldwin CommitDate: 2023-08-29 21:38:27 +0000 Makefile.asm: Simplify variable expansions in generated headers The :R:S expressions removed the .pl extension only to add it back again, so just trim them to using :T alone. Reviewed by: Pierre Pronchery , markj, emaste Differential Revision: https://reviews.freebsd.org/D41588 --- secure/lib/libcrypto/Makefile.asm | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/secure/lib/libcrypto/Makefile.asm b/secure/lib/libcrypto/Makefile.asm index 1199dc830a50..0ee8c17369e9 100644 --- a/secure/lib/libcrypto/Makefile.asm +++ b/secure/lib/libcrypto/Makefile.asm @@ -51,12 +51,12 @@ CLEANFILES= ${ASM} ${SRCS:R:S/$/.s/} sha256-armv8.s sha256-armv8.S: sha512-armv8.pl env CC=cc perl ${.ALLSRC} linux64 ${.TARGET:R:S/$/.s/} - ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} .pl.S: env CC=cc perl ${.IMPSRC} linux64 ${.TARGET:R:S/$/.s/} - ( echo '/* Do not modify. This file is auto-generated from ${.IMPSRC:T:R:S/$/.pl/}. */' ;\ + ( echo '/* Do not modify. This file is auto-generated from ${.IMPSRC:T}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} .elif defined(ASM_amd64) @@ -192,7 +192,7 @@ aes-armv4.S: aes-armv4.pl .pl.S: env CC=cc perl ${.IMPSRC} linux32 ${.TARGET:R:S/$/.s/} - ( echo '/* Do not modify. This file is auto-generated from ${.IMPSRC:T:R:S/$/.pl/}. */' ;\ + ( echo '/* Do not modify. This file is auto-generated from ${.IMPSRC:T}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} .elif defined(ASM_i386) @@ -331,22 +331,22 @@ CLEANFILES= ${ASM} bn-ppc.S: ppc.pl env CC=cc perl ${.ALLSRC} linux32 ${.TARGET:R:S/$/.s/} - ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} sha256-ppc.S: sha512-ppc.pl env CC=cc perl ${.ALLSRC} linux32 ${.TARGET:R:S/$/.s/} - ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} sha256p8-ppc.S: sha512p8-ppc.pl env CC=cc perl ${.ALLSRC} linux32 ${.TARGET:R:S/$/.s/} - ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} .pl.S: env CC=cc perl ${.IMPSRC} linux32 ${.TARGET:R:S/$/.s/} - ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} .elif defined(ASM_powerpc64) @@ -398,22 +398,22 @@ CLEANFILES= ${ASM} bn-ppc.S: ppc.pl env CC=cc perl ${.ALLSRC} linux64v2 ${.TARGET:R:S/$/.s/} - ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} sha256-ppc.S: sha512-ppc.pl env CC=cc perl ${.ALLSRC} linux64v2 ${.TARGET:R:S/$/.s/} - ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} sha256p8-ppc.S: sha512p8-ppc.pl env CC=cc perl ${.ALLSRC} linux64v2 ${.TARGET:R:S/$/.s/} - ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} .pl.S: env CC=cc perl ${.IMPSRC} linux64v2 ${.TARGET:R:S/$/.s/} - ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} .elif defined(ASM_powerpc64le) @@ -465,22 +465,22 @@ CLEANFILES= ${ASM} bn-ppc.S: ppc.pl env CC=cc perl ${.ALLSRC} linux64le ${.TARGET:R:S/$/.s/} - ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} sha256-ppc.S: sha512-ppc.pl env CC=cc perl ${.ALLSRC} linux64le ${.TARGET:R:S/$/.s/} - ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} sha256p8-ppc.S: sha512p8-ppc.pl env CC=cc perl ${.ALLSRC} linux64le ${.TARGET:R:S/$/.s/} - ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} .pl.S: env CC=cc perl ${.IMPSRC} linux64le ${.TARGET:R:S/$/.s/} - ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} .endif From nobody Tue Aug 29 21:47:22 2023 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 4Rb1HG5Dpvz4rFrp; Tue, 29 Aug 2023 21:47:22 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rb1HG3MWnz3KBF; Tue, 29 Aug 2023 21:47:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693345642; 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=TD+ejg1PLrDYZUaNnea1mIaMXCKGEyXPgjE/Hi1Dlk8=; b=sE6tBOzDVBVmK7TYwXl9hmuCHeOK3T2fjgTaDu+HA1oktr+YH5ewvFZWGQPkeaRIGHtBIa mJ7H5IgaKYj/6C/SN2R7mCVJjZJp0XrB09/lR1GtBTCYooKw00dkwz9R4zwXYnDTtoYep9 gh71+jPuSPwZ9CQki74MhkQxIkVYuLv55FbuCz2TKVFCgbaDjXbm8Jfzb+D0AHjd+qNg4t 4Gv4ZV4mRNiIuH9pJBdrF8w38b2gh216XJKB4uUKpWqS7k1OhbDalX3lJn/nMHYm9ilWAt 8q+8sZRWZePC1bawCs2KOZKcwTHUMie09eBW02s4H4Wkb+Qf73Hv79F8DISV3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693345642; a=rsa-sha256; cv=none; b=kubuvDxQMXMgoh7goy1bBI4UxK6qNvJ19JZNmVGkfOSuR6WSl+v1aYxDHUjOu6eSqH3xjo qXkIV/Sy3WfgcJIUkbPobAwnvgUCiejbI3iKDh9GDZt1jEeNKjs2w3Hurdcqd+P/zLl9UI 1yEuWtp0pHby3BOa2XTSQBMUe25x+bqrjjvVhcMVSo3djxNhuDFhPGmj67QCrEVJXGSf4s gXBRkjw44YN2nMItjkIYK2S4T2nQ2nO+Eqh4NrwZmUZmFpWrF6fxxhUZ94l1cxc/NSSJOu ENlDCdhECGyAoBnvorZ3SflP9vGwqSFjGjUEbYnjT+hlLHuJuwoFWK1kzV9QvA== 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=1693345642; 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=TD+ejg1PLrDYZUaNnea1mIaMXCKGEyXPgjE/Hi1Dlk8=; b=pCJOgz6yqClZDn1f2YkQT6CRAEMCcs0paueAiZMYLJenX9MkKfG076f4xkdcvi/Cv/XxCK PSUtEGL/uAGFBAo72PH+pDzsoDajQve6MSnGk1HF+Nf3CPQmYQnibk/w2QycrJuutxsFuA 1KOFYpWZzY3GwrV46syY+rkE50hjaDLD5QgWbWyBZX0aCkayUXSB6AO0Jqz+MbiB2o6h1G hcl08IDPuwwOgbo+RURnKQwBhfF5q7zCAFJ1J76tHow3/4SIoPNVN+dqrOMEcjCUVMdKt/ lApQ5RDjYQzpUjGgRhWRL0Fkh7JT7pXhXgtGaVMLvH3KkqK56L1PDy/s2lGOvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rb1HG2DqRz17HH; Tue, 29 Aug 2023 21:47:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37TLlM6U087656; Tue, 29 Aug 2023 21:47:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37TLlMWe087653; Tue, 29 Aug 2023 21:47:22 GMT (envelope-from git) Date: Tue, 29 Aug 2023 21:47:22 GMT Message-Id: <202308292147.37TLlMWe087653@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: c0fe6b9d7506 - main - libcrypto: Refactor Makefile.asm so it can be run outside of buildenv 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org 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: c0fe6b9d7506d6ce6f9ec3688ee0cc5656a8707e Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c0fe6b9d7506d6ce6f9ec3688ee0cc5656a8707e commit c0fe6b9d7506d6ce6f9ec3688ee0cc5656a8707e Author: John Baldwin AuthorDate: 2023-08-29 21:39:36 +0000 Commit: John Baldwin CommitDate: 2023-08-29 21:39:36 +0000 libcrypto: Refactor Makefile.asm so it can be run outside of buildenv Currently Makefile.asm relies on the current buildenv to set CFLAGS for i386. The current approach also leaves various temporary *.s files around in the current directory. To make this a bit better: - Instead of using CFLAGS from buildenv for i386, define the actual flags the perl scripts need: -DOPENSSL_IA32_SSE2 to enable SSE2. - Change i386 to have the perl scripts write to /dev/stdout to avoid creating temporaries. Previously i386 was generating the temporary files in the OpenSSL contrib src. - Cleanup temporary *.s files in the all target after generating the real *.S files for architectures which need them. - Remove a duplicate rule for aes-armv4.S. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41589 --- secure/lib/libcrypto/Makefile.asm | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/secure/lib/libcrypto/Makefile.asm b/secure/lib/libcrypto/Makefile.asm index 0ee8c17369e9..d3243e5b20b8 100644 --- a/secure/lib/libcrypto/Makefile.asm +++ b/secure/lib/libcrypto/Makefile.asm @@ -45,8 +45,9 @@ SRCS+= keccak1600-armv8.pl sha1-armv8.pl sha512-armv8.pl ASM= ${SRCS:R:S/$/.S/} sha256-armv8.S all: ${ASM} + rm -f ${ASM:R:S/$/.s/} -CLEANFILES= ${ASM} ${SRCS:R:S/$/.s/} sha256-armv8.s +CLEANFILES= ${ASM} .SUFFIXES: .pl sha256-armv8.S: sha512-armv8.pl @@ -125,8 +126,9 @@ SHA_TMP= ${SHA_ASM:S/$/.s/} ASM= ${SRCS:R:S/$/.S/} ${SHA_ASM:S/$/.S/} all: ${ASM} + rm -f ${SHA_TMP} -CLEANFILES= ${ASM} ${SHA_ASM:S/$/.s/} +CLEANFILES= ${ASM} .SUFFIXES: .pl .pl.S: @@ -179,17 +181,14 @@ SRCS+= poly1305-armv4.pl # sha SRCS+= keccak1600-armv4.pl sha1-armv4-large.pl sha256-armv4.pl sha512-armv4.pl -ASM= aes-armv4.S ${SRCS:R:S/$/.S/} +ASM= ${SRCS:R:S/$/.S/} all: ${ASM} + rm -f ${ASM:R:S/$/.s/} -CLEANFILES= ${ASM} ${SRCS:R:S/$/.s/} +CLEANFILES= ${ASM} .SUFFIXES: .pl -aes-armv4.S: aes-armv4.pl - ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T}. */' ;\ - env CC=cc perl ${.ALLSRC} linux32 ) > ${.TARGET} - .pl.S: env CC=cc perl ${.IMPSRC} linux32 ${.TARGET:R:S/$/.s/} ( echo '/* Do not modify. This file is auto-generated from ${.IMPSRC:T}. */' ;\ @@ -217,6 +216,7 @@ aes-armv4.S: aes-armv4.pl ${LCRYPTO_SRC}/engines/asm #PERLPATH= -I${LCRYPTO_SRC}/crypto/des/asm -I${LCRYPTO_SRC}/crypto/perlasm +CFLAGS= -DOPENSSL_IA32_SSE2 # cpuid SRCS= x86cpuid.pl @@ -276,17 +276,15 @@ ASM= ${SRCS:R:S/$/.S/} all: ${ASM} -CLEANFILES= ${ASM} ${SRCS:R:S/$/.s/} +CLEANFILES= ${ASM} .SUFFIXES: .pl .pl.S: ( echo '/* Do not modify. This file is auto-generated from ${.IMPSRC:T}. */' ;\ echo '#ifdef PIC' ;\ - env CC=cc perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} -fpic -DPIC ${.IMPSRC:R:S/$/.s/} ;\ - cat ${.IMPSRC:R:S/$/.s/} ;\ + env CC=cc perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} -fpic /dev/stdout ;\ echo '#else' ;\ - env CC=cc perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} ${.IMPSRC:R:S/$/.s/} ;\ - cat ${.IMPSRC:R:S/$/.s/} ;\ + env CC=cc perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} /dev/stdout ;\ echo '#endif' ) > ${.TARGET} .elif defined(ASM_powerpc) @@ -325,6 +323,7 @@ SRCS+= poly1305-ppc.pl poly1305-ppcfp.pl ASM= ${SRCS:R:S/$/.S/} bn-ppc.S sha256-ppc.S sha256p8-ppc.S all: ${ASM} + rm -f ${ASM:R:S/$/.s/} CLEANFILES= ${ASM} .SUFFIXES: .pl @@ -392,6 +391,7 @@ SRCS+= keccak1600-ppc64.pl ASM= ${SRCS:R:S/$/.S/} bn-ppc.S sha256-ppc.S sha256p8-ppc.S all: ${ASM} + rm -f ${ASM:R:S/$/.s/} CLEANFILES= ${ASM} .SUFFIXES: .pl @@ -459,6 +459,7 @@ SRCS+= keccak1600-ppc64.pl ASM= ${SRCS:R:S/$/.S/} bn-ppc.S sha256-ppc.S sha256p8-ppc.S all: ${ASM} + rm -f ${ASM:R:S/$/.s/} CLEANFILES= ${ASM} .SUFFIXES: .pl From nobody Tue Aug 29 21:47:23 2023 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 4Rb1HH6qsbz4rFcH; Tue, 29 Aug 2023 21:47:23 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rb1HH4Rnbz3K8H; Tue, 29 Aug 2023 21:47:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693345643; 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=V/oSbCU639uIeDlf1zl7L4dOQ9VNY6rzrciuNpAE4yc=; b=QzEbrGDuX/nJvlhXWTgaawvbVEKPW9C7Kw27ZNeg7JjPh4NJ6nMaWWx+dBkBXQfUQT5kO9 zhy+lb8yxGfOD2y+vbjLlPi2lSM28zhQ9AsgOMAT3LgAQ68r5GMH8oRHMJ9eH94M+30gUw Jxup0dwRH602qVuDlc1ng/ulwW1PRU8KSVurYc2FmICcE1tqecrQqOyFW9iM06C6a2JPgS 8VsV9A8PWrGuG9wlw2SahfTCyb2xKqfFocr1lGqmp2AyczraHkwXWFLdEYknGF7LlBA6xd G/dg/iy5IlzLs8Q1tsDaKRcgMuoQDaDTje8L8YW0v139UtPbj8zZEygLco8t0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693345643; a=rsa-sha256; cv=none; b=t4zs7yudPBEgRa7NUcVpiCHzu0L2SNsfLrEqpZdlsp5jEGcM90lZl289PrtDFNb7C5nQIM pHHCc0DNEcKdNbyg38/Rqdxs4ilqDrGtifqSiBeXcmme2cA5T1w1L2RAfsrH+Tg1Nsf8yI +XIPlfGlIgy9QkkQHOV4eNOMkyx/BtFraSSef6Etq7kIhOZVKbrfuEfABjPOzxhdV8e5/f +0a/B2Smq92CgdZYG95J3C8mXdFjNviVp1bDIMWvEVva/TZAseL20lvD6Kg73c34mum2Ft r0EV+04QsSA4yMGaEXyyC3UUx90x9lBo9FPXdl89bfA1kAuB8LWnVNHLAu2Gfg== 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=1693345643; 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=V/oSbCU639uIeDlf1zl7L4dOQ9VNY6rzrciuNpAE4yc=; b=G38ksVkez0c6TNu4BM40vdNnJke9Aa0uUJGaKbxudV7T4lXhK8AkOF34ULog+RL2WiqQPl sj2thAH/JVQzJOpVEFsW8t/BsJqv7u6G79aN6UmJI48fWzR6AHFt+FXB09aneUjhte9PX5 3uURGMAlmXT1bsmJVOkPwW0oEkDzHyfrH0AlJKS4dJsL1rKbc40qtQpiezXQeVSQMI36UF kz+Vw7pGONHOD4RSZLYif64vmjoEr0g5PKDpJ9Od2CPfEC4JgYLKAFwJmm7zgNPgrEj9uC Aw6WZujcsipAkDo0HxFswKsSjnq1hf2e8G0wah09d2DrygYDn7AN8/nuMZrAjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rb1HH3CBRz17HJ; Tue, 29 Aug 2023 21:47:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37TLlNw5087704; Tue, 29 Aug 2023 21:47:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37TLlNBS087701; Tue, 29 Aug 2023 21:47:23 GMT (envelope-from git) Date: Tue, 29 Aug 2023 21:47:23 GMT Message-Id: <202308292147.37TLlNBS087701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 73653b72af65 - main - libcrypto: Add buildasm and cleanasm targets 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org 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: 73653b72af65e294dcfedc43a8ea09b2137d72ed Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=73653b72af65e294dcfedc43a8ea09b2137d72ed commit 73653b72af65e294dcfedc43a8ea09b2137d72ed Author: John Baldwin AuthorDate: 2023-08-29 21:39:54 +0000 Commit: John Baldwin CommitDate: 2023-08-29 21:43:51 +0000 libcrypto: Add buildasm and cleanasm targets These targets generate all the assembly files in sys/crypto/openssl. Reviewed by: markj, emaste (earlier version) Differential Revision: https://reviews.freebsd.org/D41590 --- secure/lib/libcrypto/Makefile | 7 +++++++ secure/lib/libcrypto/Makefile.common | 2 ++ 2 files changed, 9 insertions(+) diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index f4bd4a3247f3..ab9044ad67f9 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -606,6 +606,13 @@ buildinf.h: Makefile echo "static const char compiler_flags[] = \"compiler: ${COMPILER_TYPE}\";" ) \ > ${.TARGET} +buildasm cleanasm: +.for arch in aarch64 amd64 arm i386 powerpc powerpc64 powerpc64le + make MK_AUTO_OBJ=no -DWITHOUT_AUTO_ASM -DASM_${arch} \ + -f ${.CURDIR}/Makefile.asm -C ${SRCTOP}/sys/crypto/openssl/${arch} \ + ${.TARGET:S/build/all/:S/asm$//} +.endfor + .include PICFLAG+= -DOPENSSL_PIC diff --git a/secure/lib/libcrypto/Makefile.common b/secure/lib/libcrypto/Makefile.common index a52e2979060a..b109fd7f7f4f 100644 --- a/secure/lib/libcrypto/Makefile.common +++ b/secure/lib/libcrypto/Makefile.common @@ -7,6 +7,7 @@ CFLAGS+= -DL_ENDIAN CFLAGS+= -DB_ENDIAN .endif +.ifndef WITHOUT_AUTO_ASM .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" ASM_${MACHINE_CPUARCH}= @@ -14,6 +15,7 @@ ASM_${MACHINE_CPUARCH}= ${MACHINE_ARCH} == "powerpc64le" ASM_${MACHINE_ARCH}= .endif +.endif .if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) CFLAGS+= -DOPENSSL_CPUID_OBJ From nobody Tue Aug 29 21:47:24 2023 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 4Rb1HK0fVfz4rFcN; Tue, 29 Aug 2023 21:47:25 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rb1HK0D00z3KHV; Tue, 29 Aug 2023 21:47:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693345645; 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=s0YBa+TBmfbeNnUJCpPOzjiuYvWNFzY98sAEK39MwRw=; b=fcIFSSASuqu9GMZUq1a0kLKb3oOve5asHz9cjRwRvsTz6Wv9tENuHB1tkKZcNb1XcHeqRm 3GRZGZ668qRpCR2oDnePbFVo1cVeqfif0NkthFIfYRHc0tWiTLKi7+75dVhIzPhTu1XQ6I 0BDRyvXqIuSFao/gZmPRCtsm7LSj9+GXSm1amxxicOZOo3w5/kRNZtwkZfJYxPFSI8K1x0 HlEAkQpNbICWqiDLAB25OYqM8uWfyo0/X4fJQwmDEiTL7yDvzc75cEQctzQAF98iHgQ+ob ixauqkwPRDmjxuUogEWigWOTaDMX5COR2RemmMZCi/tAzTDenzgfnifibWARyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693345645; a=rsa-sha256; cv=none; b=yM9RvOKwnu5JuIi0QayZw8AhjMk43hUyOPX6NjOboQZIeN1VODpoHD6UZJwcSNGOGzWger ET9wgLAA8yfSt78l8vP0oGe+HW/cJwS8HS/E224KiYjVkeOs0bUyTJpv455ScD6wVr83wc 2q5VLlnLL7CJMfba39WqLQmCC1rfHkutMmOsMCe6EFlcBnfh7GXVUBy8Oba9w4Ze0xd59y 9CCtVpYEHEEuILe3UH1Ly25FwGC9nv+3RPe3VldE39b7HOgjSDq2BSS7EhomDtFOlNhd3O vkrjNRQ4BUkG1jn/VBsHXiBCo2mQz2jUP0R8dq73Wbw1CZ4GFCh+f1aSf5y53g== 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=1693345645; 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=s0YBa+TBmfbeNnUJCpPOzjiuYvWNFzY98sAEK39MwRw=; b=ml3B9D9q3vFtasXVuo7+4u4C9/k61Gowv2bgVguUjcJgJ8Z1OA0VpfMIGz5HY5jloD+9wE KatN3jSxs3mCtb/ofKGO4F1CX+3lg6qnPyW48hMd09e1dNFYf4AcC8vsPOl6yPyQZc+6Bx frMab3kd5uACPLtThutn+Qh4sZJfp/QliP4DHwal6o8ofdhAug66uCUoGsBLc3w4xsKnYs cbdWvO1U/R3PvRDggFf4fj2VecU0HGJU7C1cmjS9YDPmXiOmGazF/L73fRrzdADo0jHI2G MuzhJJF8DxLtKsUWifCLsT1Z5p+4tujgcFlUf4r5lO5KHsscmYhtVTZ/vztfZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rb1HJ6R18z17hZ; Tue, 29 Aug 2023 21:47:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37TLlOmN087763; Tue, 29 Aug 2023 21:47:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37TLlOcW087760; Tue, 29 Aug 2023 21:47:24 GMT (envelope-from git) Date: Tue, 29 Aug 2023 21:47:24 GMT Message-Id: <202308292147.37TLlOcW087760@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: c0855eaa3ee9 - main - ossl: Update the generated assembly files from OpenSSL 3.0. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org 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: c0855eaa3ee9614804b6bd6a255aa9f71e095f43 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c0855eaa3ee9614804b6bd6a255aa9f71e095f43 commit c0855eaa3ee9614804b6bd6a255aa9f71e095f43 Author: John Baldwin AuthorDate: 2023-08-29 21:44:15 +0000 Commit: John Baldwin CommitDate: 2023-08-29 21:44:15 +0000 ossl: Update the generated assembly files from OpenSSL 3.0. Tested with: cryptocheck -d ossl0 -a all -z on amd64 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41568 --- sys/crypto/openssl/aarch64/aes-gcm-armv8_64.S | 6390 +++++++++++++++++++ sys/crypto/openssl/aarch64/aesv8-armx.S | 3014 ++++++++- sys/crypto/openssl/aarch64/arm64cpuid.S | 7 + sys/crypto/openssl/aarch64/armv8-mont.S | 732 ++- sys/crypto/openssl/aarch64/chacha-armv8.S | 1553 ++--- sys/crypto/openssl/aarch64/ecp_nistz256-armv8.S | 8 +- sys/crypto/openssl/aarch64/ghashv8-armx.S | 1 + sys/crypto/openssl/aarch64/keccak1600-armv8.S | 190 +- sys/crypto/openssl/aarch64/poly1305-armv8.S | 31 +- sys/crypto/openssl/aarch64/sha1-armv8.S | 54 +- sys/crypto/openssl/aarch64/sha256-armv8.S | 28 +- sys/crypto/openssl/aarch64/sha512-armv8.S | 28 +- sys/crypto/openssl/aarch64/vpaes-armv8.S | 276 +- sys/crypto/openssl/amd64/aes-x86_64.S | 2680 ++++++++ sys/crypto/openssl/amd64/aesni-gcm-x86_64.S | 21 + sys/crypto/openssl/amd64/aesni-mb-x86_64.S | 102 + sys/crypto/openssl/amd64/aesni-sha1-x86_64.S | 21 + sys/crypto/openssl/amd64/aesni-sha256-x86_64.S | 21 + sys/crypto/openssl/amd64/aesni-x86_64.S | 32 + sys/crypto/openssl/amd64/bsaes-x86_64.S | 2619 ++++++++ sys/crypto/openssl/amd64/chacha-x86_64.S | 21 + sys/crypto/openssl/amd64/cmll-x86_64.S | 22 + sys/crypto/openssl/amd64/e_padlock-x86_64.S | 21 + sys/crypto/openssl/amd64/ecp_nistz256-x86_64.S | 21 + sys/crypto/openssl/amd64/ghash-x86_64.S | 27 + sys/crypto/openssl/amd64/keccak1600-x86_64.S | 21 + sys/crypto/openssl/amd64/md5-x86_64.S | 29 +- sys/crypto/openssl/amd64/poly1305-x86_64.S | 21 + sys/crypto/openssl/amd64/rc4-md5-x86_64.S | 21 + sys/crypto/openssl/amd64/rc4-x86_64.S | 24 + sys/crypto/openssl/amd64/rsaz-avx2.S | 21 + sys/crypto/openssl/amd64/rsaz-avx512.S | 902 +++ sys/crypto/openssl/amd64/rsaz-x86_64.S | 21 + sys/crypto/openssl/amd64/sha1-mb-x86_64.S | 57 + sys/crypto/openssl/amd64/sha1-x86_64.S | 21 + sys/crypto/openssl/amd64/sha256-mb-x86_64.S | 57 + sys/crypto/openssl/amd64/sha256-x86_64.S | 21 + sys/crypto/openssl/amd64/sha512-x86_64.S | 21 + sys/crypto/openssl/amd64/vpaes-x86_64.S | 26 + sys/crypto/openssl/amd64/wp-x86_64.S | 21 + sys/crypto/openssl/amd64/x25519-x86_64.S | 21 + sys/crypto/openssl/amd64/x86_64-gf2m.S | 21 + sys/crypto/openssl/amd64/x86_64-mont.S | 21 + sys/crypto/openssl/amd64/x86_64-mont5.S | 21 + sys/crypto/openssl/amd64/x86_64cpuid.S | 49 + sys/crypto/openssl/arm/aes-armv4.S | 7 +- sys/crypto/openssl/arm/aesv8-armx.S | 776 ++- sys/crypto/openssl/arm/armv4-gf2m.S | 13 +- sys/crypto/openssl/arm/armv4-mont.S | 17 +- sys/crypto/openssl/arm/armv4cpuid.S | 3 +- sys/crypto/openssl/arm/bsaes-armv7.S | 47 +- sys/crypto/openssl/arm/chacha-armv4.S | 11 +- sys/crypto/openssl/arm/ecp_nistz256-armv4.S | 4 +- sys/crypto/openssl/arm/ghash-armv4.S | 3 +- sys/crypto/openssl/arm/ghashv8-armx.S | 64 +- sys/crypto/openssl/arm/keccak1600-armv4.S | 34 +- sys/crypto/openssl/arm/poly1305-armv4.S | 37 +- sys/crypto/openssl/arm/sha1-armv4-large.S | 15 +- sys/crypto/openssl/arm/sha256-armv4.S | 17 +- sys/crypto/openssl/arm/sha512-armv4.S | 15 +- sys/crypto/openssl/i386/aes-586.S | 6644 ++++++++++++++++++++ sys/crypto/openssl/i386/aesni-x86.S | 254 + sys/crypto/openssl/i386/bf-586.S | 134 + sys/crypto/openssl/i386/bn-586.S | 104 + sys/crypto/openssl/i386/cast-586.S | 134 + sys/crypto/openssl/i386/chacha-x86.S | 64 + sys/crypto/openssl/i386/cmll-x86.S | 144 + sys/crypto/openssl/i386/co-586.S | 74 + sys/crypto/openssl/i386/crypt586.S | 44 + sys/crypto/openssl/i386/des-586.S | 254 + sys/crypto/openssl/i386/e_padlock-x86.S | 214 + sys/crypto/openssl/i386/ecp_nistz256-x86.S | 254 + sys/crypto/openssl/i386/ghash-x86.S | 104 + sys/crypto/openssl/i386/md5-586.S | 64 +- sys/crypto/openssl/i386/poly1305-x86.S | 114 + sys/crypto/openssl/i386/rc4-586.S | 64 + sys/crypto/openssl/i386/rc5-586.S | 134 + sys/crypto/openssl/i386/rmd-586.S | 44 + sys/crypto/openssl/i386/sha1-586.S | 74 + sys/crypto/openssl/i386/sha256-586.S | 44 + sys/crypto/openssl/i386/sha512-586.S | 44 + sys/crypto/openssl/i386/vpaes-x86.S | 164 + sys/crypto/openssl/i386/wp-mmx.S | 44 + sys/crypto/openssl/i386/x86-gf2m.S | 64 + sys/crypto/openssl/i386/x86-mont.S | 44 + sys/crypto/openssl/i386/x86cpuid.S | 154 + sys/crypto/openssl/powerpc/bn-ppc.S | 1855 ++++++ sys/crypto/openssl/powerpc/poly1305-ppc.S | 1091 +++- sys/crypto/openssl/powerpc/vpaes-ppc.S | 14 +- sys/crypto/openssl/powerpc64/bn-ppc.S | 1876 ++++++ sys/crypto/openssl/powerpc64/ecp_nistp521-ppc64.S | 354 ++ sys/crypto/openssl/powerpc64/keccak1600-ppc64.S | 32 +- sys/crypto/openssl/powerpc64/poly1305-ppc.S | 1011 ++- sys/crypto/openssl/powerpc64/vpaes-ppc.S | 14 +- sys/crypto/openssl/powerpc64le/bn-ppc.S | 1876 ++++++ .../openssl/powerpc64le/ecp_nistp521-ppc64.S | 354 ++ sys/crypto/openssl/powerpc64le/keccak1600-ppc64.S | 32 +- sys/crypto/openssl/powerpc64le/poly1305-ppc.S | 1002 ++- sys/crypto/openssl/powerpc64le/vpaes-ppc.S | 14 +- 99 files changed, 37489 insertions(+), 1910 deletions(-) diff --git a/sys/crypto/openssl/aarch64/aes-gcm-armv8_64.S b/sys/crypto/openssl/aarch64/aes-gcm-armv8_64.S new file mode 100644 index 000000000000..eb85dbc9f996 --- /dev/null +++ b/sys/crypto/openssl/aarch64/aes-gcm-armv8_64.S @@ -0,0 +1,6390 @@ +/* Do not modify. This file is auto-generated from aes-gcm-armv8_64.pl. */ +#include "arm_arch.h" + +#if __ARM_MAX_ARCH__>=8 +.arch armv8-a+crypto +.text +.globl aes_gcm_enc_128_kernel +.type aes_gcm_enc_128_kernel,%function +.align 4 +aes_gcm_enc_128_kernel: + cbz x1, .L128_enc_ret + stp x19, x20, [sp, #-112]! + mov x16, x4 + mov x8, x5 + stp x21, x22, [sp, #16] + stp x23, x24, [sp, #32] + stp d8, d9, [sp, #48] + stp d10, d11, [sp, #64] + stp d12, d13, [sp, #80] + stp d14, d15, [sp, #96] + + ldp x10, x11, [x16] //ctr96_b64, ctr96_t32 +#ifdef __AARCH64EB__ + rev x10, x10 + rev x11, x11 +#endif + ldp x13, x14, [x8, #160] //load rk10 +#ifdef __AARCH64EB__ + ror x13, x13, #32 + ror x14, x14, #32 +#endif + ld1 {v11.16b}, [x3] + ext v11.16b, v11.16b, v11.16b, #8 + rev64 v11.16b, v11.16b + lsr x5, x1, #3 //byte_len + mov x15, x5 + + ld1 {v18.4s}, [x8], #16 //load rk0 + add x4, x0, x1, lsr #3 //end_input_ptr + sub x5, x5, #1 //byte_len - 1 + + lsr x12, x11, #32 + ldr q15, [x3, #112] //load h4l | h4h +#ifndef __AARCH64EB__ + ext v15.16b, v15.16b, v15.16b, #8 +#endif + fmov d1, x10 //CTR block 1 + rev w12, w12 //rev_ctr32 + + add w12, w12, #1 //increment rev_ctr32 + orr w11, w11, w11 + ld1 {v19.4s}, [x8], #16 //load rk1 + + rev w9, w12 //CTR block 1 + add w12, w12, #1 //CTR block 1 + fmov d3, x10 //CTR block 3 + + orr x9, x11, x9, lsl #32 //CTR block 1 + ld1 { v0.16b}, [x16] //special case vector load initial counter so we can start first AES block as quickly as possible + + fmov v1.d[1], x9 //CTR block 1 + rev w9, w12 //CTR block 2 + + fmov d2, x10 //CTR block 2 + orr x9, x11, x9, lsl #32 //CTR block 2 + add w12, w12, #1 //CTR block 2 + + fmov v2.d[1], x9 //CTR block 2 + rev w9, w12 //CTR block 3 + + orr x9, x11, x9, lsl #32 //CTR block 3 + ld1 {v20.4s}, [x8], #16 //load rk2 + + add w12, w12, #1 //CTR block 3 + fmov v3.d[1], x9 //CTR block 3 + + ldr q14, [x3, #80] //load h3l | h3h +#ifndef __AARCH64EB__ + ext v14.16b, v14.16b, v14.16b, #8 +#endif + aese v1.16b, v18.16b + aesmc v1.16b, v1.16b //AES block 1 - round 0 + ld1 {v21.4s}, [x8], #16 //load rk3 + + aese v2.16b, v18.16b + aesmc v2.16b, v2.16b //AES block 2 - round 0 + ldr q12, [x3, #32] //load h1l | h1h +#ifndef __AARCH64EB__ + ext v12.16b, v12.16b, v12.16b, #8 +#endif + + aese v0.16b, v18.16b + aesmc v0.16b, v0.16b //AES block 0 - round 0 + ld1 {v22.4s}, [x8], #16 //load rk4 + + aese v3.16b, v18.16b + aesmc v3.16b, v3.16b //AES block 3 - round 0 + ld1 {v23.4s}, [x8], #16 //load rk5 + + aese v2.16b, v19.16b + aesmc v2.16b, v2.16b //AES block 2 - round 1 + trn2 v17.2d, v14.2d, v15.2d //h4l | h3l + + aese v0.16b, v19.16b + aesmc v0.16b, v0.16b //AES block 0 - round 1 + ld1 {v24.4s}, [x8], #16 //load rk6 + + aese v1.16b, v19.16b + aesmc v1.16b, v1.16b //AES block 1 - round 1 + ld1 {v25.4s}, [x8], #16 //load rk7 + + aese v3.16b, v19.16b + aesmc v3.16b, v3.16b //AES block 3 - round 1 + trn1 v9.2d, v14.2d, v15.2d //h4h | h3h + + aese v0.16b, v20.16b + aesmc v0.16b, v0.16b //AES block 0 - round 2 + ld1 {v26.4s}, [x8], #16 //load rk8 + + aese v1.16b, v20.16b + aesmc v1.16b, v1.16b //AES block 1 - round 2 + ldr q13, [x3, #64] //load h2l | h2h +#ifndef __AARCH64EB__ + ext v13.16b, v13.16b, v13.16b, #8 +#endif + + aese v3.16b, v20.16b + aesmc v3.16b, v3.16b //AES block 3 - round 2 + + aese v2.16b, v20.16b + aesmc v2.16b, v2.16b //AES block 2 - round 2 + eor v17.16b, v17.16b, v9.16b //h4k | h3k + + aese v0.16b, v21.16b + aesmc v0.16b, v0.16b //AES block 0 - round 3 + + aese v1.16b, v21.16b + aesmc v1.16b, v1.16b //AES block 1 - round 3 + + aese v2.16b, v21.16b + aesmc v2.16b, v2.16b //AES block 2 - round 3 + ld1 {v27.4s}, [x8], #16 //load rk9 + + aese v3.16b, v21.16b + aesmc v3.16b, v3.16b //AES block 3 - round 3 + + and x5, x5, #0xffffffffffffffc0 //number of bytes to be processed in main loop (at least 1 byte must be handled by tail) + trn2 v16.2d, v12.2d, v13.2d //h2l | h1l + + aese v3.16b, v22.16b + aesmc v3.16b, v3.16b //AES block 3 - round 4 + add x5, x5, x0 + + aese v2.16b, v22.16b + aesmc v2.16b, v2.16b //AES block 2 - round 4 + cmp x0, x5 //check if we have <= 4 blocks + + aese v0.16b, v22.16b + aesmc v0.16b, v0.16b //AES block 0 - round 4 + + aese v3.16b, v23.16b + aesmc v3.16b, v3.16b //AES block 3 - round 5 + + aese v2.16b, v23.16b + aesmc v2.16b, v2.16b //AES block 2 - round 5 + + aese v0.16b, v23.16b + aesmc v0.16b, v0.16b //AES block 0 - round 5 + + aese v3.16b, v24.16b + aesmc v3.16b, v3.16b //AES block 3 - round 6 + + aese v1.16b, v22.16b + aesmc v1.16b, v1.16b //AES block 1 - round 4 + + aese v2.16b, v24.16b + aesmc v2.16b, v2.16b //AES block 2 - round 6 + trn1 v8.2d, v12.2d, v13.2d //h2h | h1h + + aese v0.16b, v24.16b + aesmc v0.16b, v0.16b //AES block 0 - round 6 + + aese v1.16b, v23.16b + aesmc v1.16b, v1.16b //AES block 1 - round 5 + + aese v3.16b, v25.16b + aesmc v3.16b, v3.16b //AES block 3 - round 7 + + aese v0.16b, v25.16b + aesmc v0.16b, v0.16b //AES block 0 - round 7 + + aese v1.16b, v24.16b + aesmc v1.16b, v1.16b //AES block 1 - round 6 + + aese v2.16b, v25.16b + aesmc v2.16b, v2.16b //AES block 2 - round 7 + + aese v0.16b, v26.16b + aesmc v0.16b, v0.16b //AES block 0 - round 8 + + aese v1.16b, v25.16b + aesmc v1.16b, v1.16b //AES block 1 - round 7 + + aese v2.16b, v26.16b + aesmc v2.16b, v2.16b //AES block 2 - round 8 + + aese v3.16b, v26.16b + aesmc v3.16b, v3.16b //AES block 3 - round 8 + + aese v1.16b, v26.16b + aesmc v1.16b, v1.16b //AES block 1 - round 8 + + aese v2.16b, v27.16b //AES block 2 - round 9 + + aese v0.16b, v27.16b //AES block 0 - round 9 + + eor v16.16b, v16.16b, v8.16b //h2k | h1k + + aese v1.16b, v27.16b //AES block 1 - round 9 + + aese v3.16b, v27.16b //AES block 3 - round 9 + b.ge .L128_enc_tail //handle tail + + ldp x6, x7, [x0, #0] //AES block 0 - load plaintext +#ifdef __AARCH64EB__ + rev x6, x6 + rev x7, x7 +#endif + ldp x21, x22, [x0, #32] //AES block 2 - load plaintext +#ifdef __AARCH64EB__ + rev x21, x21 + rev x22, x22 +#endif + ldp x19, x20, [x0, #16] //AES block 1 - load plaintext +#ifdef __AARCH64EB__ + rev x19, x19 + rev x20, x20 +#endif + ldp x23, x24, [x0, #48] //AES block 3 - load plaintext +#ifdef __AARCH64EB__ + rev x23, x23 + rev x24, x24 +#endif + eor x6, x6, x13 //AES block 0 - round 10 low + eor x7, x7, x14 //AES block 0 - round 10 high + + eor x21, x21, x13 //AES block 2 - round 10 low + fmov d4, x6 //AES block 0 - mov low + + eor x19, x19, x13 //AES block 1 - round 10 low + eor x22, x22, x14 //AES block 2 - round 10 high + fmov v4.d[1], x7 //AES block 0 - mov high + + fmov d5, x19 //AES block 1 - mov low + eor x20, x20, x14 //AES block 1 - round 10 high + + eor x23, x23, x13 //AES block 3 - round 10 low + fmov v5.d[1], x20 //AES block 1 - mov high + + fmov d6, x21 //AES block 2 - mov low + eor x24, x24, x14 //AES block 3 - round 10 high + rev w9, w12 //CTR block 4 + + fmov v6.d[1], x22 //AES block 2 - mov high + orr x9, x11, x9, lsl #32 //CTR block 4 + + eor v4.16b, v4.16b, v0.16b //AES block 0 - result + fmov d0, x10 //CTR block 4 + add w12, w12, #1 //CTR block 4 + + fmov v0.d[1], x9 //CTR block 4 + rev w9, w12 //CTR block 5 + + eor v5.16b, v5.16b, v1.16b //AES block 1 - result + fmov d1, x10 //CTR block 5 + orr x9, x11, x9, lsl #32 //CTR block 5 + + add w12, w12, #1 //CTR block 5 + add x0, x0, #64 //AES input_ptr update + fmov v1.d[1], x9 //CTR block 5 + + fmov d7, x23 //AES block 3 - mov low + rev w9, w12 //CTR block 6 + st1 { v4.16b}, [x2], #16 //AES block 0 - store result + + fmov v7.d[1], x24 //AES block 3 - mov high + orr x9, x11, x9, lsl #32 //CTR block 6 + + add w12, w12, #1 //CTR block 6 + eor v6.16b, v6.16b, v2.16b //AES block 2 - result + st1 { v5.16b}, [x2], #16 //AES block 1 - store result + + fmov d2, x10 //CTR block 6 + cmp x0, x5 //check if we have <= 8 blocks + + fmov v2.d[1], x9 //CTR block 6 + rev w9, w12 //CTR block 7 + st1 { v6.16b}, [x2], #16 //AES block 2 - store result + + orr x9, x11, x9, lsl #32 //CTR block 7 + + eor v7.16b, v7.16b, v3.16b //AES block 3 - result + st1 { v7.16b}, [x2], #16 //AES block 3 - store result + b.ge .L128_enc_prepretail //do prepretail + +.L128_enc_main_loop: //main loop start + ldp x23, x24, [x0, #48] //AES block 4k+3 - load plaintext +#ifdef __AARCH64EB__ + rev x23, x23 + rev x24, x24 +#endif + rev64 v4.16b, v4.16b //GHASH block 4k (only t0 is free) + rev64 v6.16b, v6.16b //GHASH block 4k+2 (t0, t1, and t2 free) + + aese v2.16b, v18.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 0 + fmov d3, x10 //CTR block 4k+3 + + ext v11.16b, v11.16b, v11.16b, #8 //PRE 0 + rev64 v5.16b, v5.16b //GHASH block 4k+1 (t0 and t1 free) + + aese v1.16b, v18.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 0 + add w12, w12, #1 //CTR block 4k+3 + fmov v3.d[1], x9 //CTR block 4k+3 + + aese v0.16b, v18.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 0 + mov d31, v6.d[1] //GHASH block 4k+2 - mid + + aese v2.16b, v19.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 1 + mov d30, v5.d[1] //GHASH block 4k+1 - mid + + aese v1.16b, v19.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 1 + eor v4.16b, v4.16b, v11.16b //PRE 1 + + aese v3.16b, v18.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 0 + eor x24, x24, x14 //AES block 4k+3 - round 10 high + + pmull2 v28.1q, v5.2d, v14.2d //GHASH block 4k+1 - high + eor v31.8b, v31.8b, v6.8b //GHASH block 4k+2 - mid + ldp x6, x7, [x0, #0] //AES block 4k+4 - load plaintext +#ifdef __AARCH64EB__ + rev x6, x6 + rev x7, x7 +#endif + aese v0.16b, v19.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 1 + rev w9, w12 //CTR block 4k+8 + + eor v30.8b, v30.8b, v5.8b //GHASH block 4k+1 - mid + mov d8, v4.d[1] //GHASH block 4k - mid + orr x9, x11, x9, lsl #32 //CTR block 4k+8 + + pmull2 v9.1q, v4.2d, v15.2d //GHASH block 4k - high + add w12, w12, #1 //CTR block 4k+8 + mov d10, v17.d[1] //GHASH block 4k - mid + + aese v0.16b, v20.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 2 + + pmull v11.1q, v4.1d, v15.1d //GHASH block 4k - low + eor v8.8b, v8.8b, v4.8b //GHASH block 4k - mid + + aese v1.16b, v20.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 2 + + aese v0.16b, v21.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 3 + eor v9.16b, v9.16b, v28.16b //GHASH block 4k+1 - high + + pmull v28.1q, v6.1d, v13.1d //GHASH block 4k+2 - low + + pmull v10.1q, v8.1d, v10.1d //GHASH block 4k - mid + rev64 v7.16b, v7.16b //GHASH block 4k+3 (t0, t1, t2 and t3 free) + + pmull v30.1q, v30.1d, v17.1d //GHASH block 4k+1 - mid + + pmull v29.1q, v5.1d, v14.1d //GHASH block 4k+1 - low + ins v31.d[1], v31.d[0] //GHASH block 4k+2 - mid + + pmull2 v8.1q, v6.2d, v13.2d //GHASH block 4k+2 - high + eor x7, x7, x14 //AES block 4k+4 - round 10 high + + eor v10.16b, v10.16b, v30.16b //GHASH block 4k+1 - mid + mov d30, v7.d[1] //GHASH block 4k+3 - mid + + aese v3.16b, v19.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 1 + eor v11.16b, v11.16b, v29.16b //GHASH block 4k+1 - low + + aese v2.16b, v20.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 2 + eor x6, x6, x13 //AES block 4k+4 - round 10 low + + aese v1.16b, v21.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 3 + eor v30.8b, v30.8b, v7.8b //GHASH block 4k+3 - mid + + pmull2 v4.1q, v7.2d, v12.2d //GHASH block 4k+3 - high + + aese v2.16b, v21.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 3 + eor v9.16b, v9.16b, v8.16b //GHASH block 4k+2 - high + + pmull2 v31.1q, v31.2d, v16.2d //GHASH block 4k+2 - mid + + pmull v29.1q, v7.1d, v12.1d //GHASH block 4k+3 - low + movi v8.8b, #0xc2 + + pmull v30.1q, v30.1d, v16.1d //GHASH block 4k+3 - mid + eor v11.16b, v11.16b, v28.16b //GHASH block 4k+2 - low + + aese v1.16b, v22.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 4 + + aese v3.16b, v20.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 2 + shl d8, d8, #56 //mod_constant + + aese v0.16b, v22.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 4 + eor v9.16b, v9.16b, v4.16b //GHASH block 4k+3 - high + + aese v1.16b, v23.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 5 + ldp x19, x20, [x0, #16] //AES block 4k+5 - load plaintext +#ifdef __AARCH64EB__ + rev x19, x19 + rev x20, x20 +#endif + aese v3.16b, v21.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 3 + eor v10.16b, v10.16b, v31.16b //GHASH block 4k+2 - mid + + aese v0.16b, v23.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 5 + ldp x21, x22, [x0, #32] //AES block 4k+6 - load plaintext +#ifdef __AARCH64EB__ + rev x21, x21 + rev x22, x22 +#endif + pmull v31.1q, v9.1d, v8.1d //MODULO - top 64b align with mid + eor v11.16b, v11.16b, v29.16b //GHASH block 4k+3 - low + + aese v2.16b, v22.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 4 + eor x19, x19, x13 //AES block 4k+5 - round 10 low + + aese v3.16b, v22.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 4 + eor v10.16b, v10.16b, v30.16b //GHASH block 4k+3 - mid + + aese v1.16b, v24.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 6 + eor x23, x23, x13 //AES block 4k+3 - round 10 low + + aese v2.16b, v23.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 5 + eor v30.16b, v11.16b, v9.16b //MODULO - karatsuba tidy up + + fmov d4, x6 //AES block 4k+4 - mov low + aese v0.16b, v24.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 6 + fmov v4.d[1], x7 //AES block 4k+4 - mov high + + add x0, x0, #64 //AES input_ptr update + fmov d7, x23 //AES block 4k+3 - mov low + ext v9.16b, v9.16b, v9.16b, #8 //MODULO - other top alignment + + aese v3.16b, v23.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 5 + fmov d5, x19 //AES block 4k+5 - mov low + + aese v0.16b, v25.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 7 + eor v10.16b, v10.16b, v30.16b //MODULO - karatsuba tidy up + + aese v2.16b, v24.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 6 + eor x20, x20, x14 //AES block 4k+5 - round 10 high + + aese v1.16b, v25.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 7 + fmov v5.d[1], x20 //AES block 4k+5 - mov high + + aese v0.16b, v26.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 8 + fmov v7.d[1], x24 //AES block 4k+3 - mov high + + aese v3.16b, v24.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 6 + cmp x0, x5 //.LOOP CONTROL + + aese v1.16b, v26.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 8 + eor v10.16b, v10.16b, v31.16b //MODULO - fold into mid + + aese v0.16b, v27.16b //AES block 4k+4 - round 9 + eor x21, x21, x13 //AES block 4k+6 - round 10 low + eor x22, x22, x14 //AES block 4k+6 - round 10 high + + aese v3.16b, v25.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 7 + fmov d6, x21 //AES block 4k+6 - mov low + + aese v1.16b, v27.16b //AES block 4k+5 - round 9 + fmov v6.d[1], x22 //AES block 4k+6 - mov high + + aese v2.16b, v25.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 7 + eor v4.16b, v4.16b, v0.16b //AES block 4k+4 - result + + fmov d0, x10 //CTR block 4k+8 + aese v3.16b, v26.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 8 + + fmov v0.d[1], x9 //CTR block 4k+8 + rev w9, w12 //CTR block 4k+9 + eor v10.16b, v10.16b, v9.16b //MODULO - fold into mid + + aese v2.16b, v26.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 8 + eor v5.16b, v5.16b, v1.16b //AES block 4k+5 - result + + add w12, w12, #1 //CTR block 4k+9 + orr x9, x11, x9, lsl #32 //CTR block 4k+9 + fmov d1, x10 //CTR block 4k+9 + + pmull v9.1q, v10.1d, v8.1d //MODULO - mid 64b align with low + fmov v1.d[1], x9 //CTR block 4k+9 + rev w9, w12 //CTR block 4k+10 + + aese v2.16b, v27.16b //AES block 4k+6 - round 9 + st1 { v4.16b}, [x2], #16 //AES block 4k+4 - store result + eor v6.16b, v6.16b, v2.16b //AES block 4k+6 - result + orr x9, x11, x9, lsl #32 //CTR block 4k+10 + + aese v3.16b, v27.16b //AES block 4k+7 - round 9 + add w12, w12, #1 //CTR block 4k+10 + ext v10.16b, v10.16b, v10.16b, #8 //MODULO - other mid alignment + fmov d2, x10 //CTR block 4k+10 + + eor v11.16b, v11.16b, v9.16b //MODULO - fold into low + st1 { v5.16b}, [x2], #16 //AES block 4k+5 - store result + + fmov v2.d[1], x9 //CTR block 4k+10 + st1 { v6.16b}, [x2], #16 //AES block 4k+6 - store result + rev w9, w12 //CTR block 4k+11 + + orr x9, x11, x9, lsl #32 //CTR block 4k+11 + eor v7.16b, v7.16b, v3.16b //AES block 4k+3 - result + + eor v11.16b, v11.16b, v10.16b //MODULO - fold into low + st1 { v7.16b}, [x2], #16 //AES block 4k+3 - store result + b.lt .L128_enc_main_loop + +.L128_enc_prepretail: //PREPRETAIL + rev64 v4.16b, v4.16b //GHASH block 4k (only t0 is free) + fmov d3, x10 //CTR block 4k+3 + rev64 v5.16b, v5.16b //GHASH block 4k+1 (t0 and t1 free) + + ext v11.16b, v11.16b, v11.16b, #8 //PRE 0 + add w12, w12, #1 //CTR block 4k+3 + fmov v3.d[1], x9 //CTR block 4k+3 + + aese v1.16b, v18.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 0 + rev64 v6.16b, v6.16b //GHASH block 4k+2 (t0, t1, and t2 free) + + pmull v29.1q, v5.1d, v14.1d //GHASH block 4k+1 - low + + rev64 v7.16b, v7.16b //GHASH block 4k+3 (t0, t1, t2 and t3 free) + eor v4.16b, v4.16b, v11.16b //PRE 1 + + pmull2 v28.1q, v5.2d, v14.2d //GHASH block 4k+1 - high + + aese v3.16b, v18.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 0 + mov d30, v5.d[1] //GHASH block 4k+1 - mid + + pmull v11.1q, v4.1d, v15.1d //GHASH block 4k - low + mov d8, v4.d[1] //GHASH block 4k - mid + + mov d31, v6.d[1] //GHASH block 4k+2 - mid + mov d10, v17.d[1] //GHASH block 4k - mid + + aese v1.16b, v19.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 1 + eor v30.8b, v30.8b, v5.8b //GHASH block 4k+1 - mid + + eor v8.8b, v8.8b, v4.8b //GHASH block 4k - mid + + pmull2 v9.1q, v4.2d, v15.2d //GHASH block 4k - high + eor v31.8b, v31.8b, v6.8b //GHASH block 4k+2 - mid + + aese v3.16b, v19.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 1 + + pmull v30.1q, v30.1d, v17.1d //GHASH block 4k+1 - mid + eor v11.16b, v11.16b, v29.16b //GHASH block 4k+1 - low + + pmull v10.1q, v8.1d, v10.1d //GHASH block 4k - mid + + aese v0.16b, v18.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 0 + ins v31.d[1], v31.d[0] //GHASH block 4k+2 - mid + + aese v2.16b, v18.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 0 + + eor v10.16b, v10.16b, v30.16b //GHASH block 4k+1 - mid + mov d30, v7.d[1] //GHASH block 4k+3 - mid + + aese v0.16b, v19.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 1 + eor v9.16b, v9.16b, v28.16b //GHASH block 4k+1 - high + + pmull2 v31.1q, v31.2d, v16.2d //GHASH block 4k+2 - mid + + pmull2 v8.1q, v6.2d, v13.2d //GHASH block 4k+2 - high + eor v30.8b, v30.8b, v7.8b //GHASH block 4k+3 - mid + + pmull2 v4.1q, v7.2d, v12.2d //GHASH block 4k+3 - high + + pmull v28.1q, v6.1d, v13.1d //GHASH block 4k+2 - low + + aese v2.16b, v19.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 1 + eor v9.16b, v9.16b, v8.16b //GHASH block 4k+2 - high + + aese v0.16b, v20.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 2 + + pmull v29.1q, v7.1d, v12.1d //GHASH block 4k+3 - low + movi v8.8b, #0xc2 + + aese v2.16b, v20.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 2 + eor v11.16b, v11.16b, v28.16b //GHASH block 4k+2 - low + + aese v3.16b, v20.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 2 + + pmull v30.1q, v30.1d, v16.1d //GHASH block 4k+3 - mid + eor v10.16b, v10.16b, v31.16b //GHASH block 4k+2 - mid + + aese v2.16b, v21.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 3 + + aese v1.16b, v20.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 2 + eor v9.16b, v9.16b, v4.16b //GHASH block 4k+3 - high + + aese v0.16b, v21.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 3 + + eor v10.16b, v10.16b, v30.16b //GHASH block 4k+3 - mid + shl d8, d8, #56 //mod_constant + + aese v1.16b, v21.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 3 + eor v11.16b, v11.16b, v29.16b //GHASH block 4k+3 - low + + aese v0.16b, v22.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 4 + + pmull v28.1q, v9.1d, v8.1d + eor v10.16b, v10.16b, v9.16b //karatsuba tidy up + + aese v1.16b, v22.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 4 + + aese v0.16b, v23.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 5 + ext v9.16b, v9.16b, v9.16b, #8 + + aese v3.16b, v21.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 3 + + aese v2.16b, v22.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 4 + eor v10.16b, v10.16b, v11.16b + + aese v0.16b, v24.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 6 + + aese v3.16b, v22.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 4 + + aese v1.16b, v23.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 5 + + aese v2.16b, v23.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 5 + eor v10.16b, v10.16b, v28.16b + + aese v3.16b, v23.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 5 + + aese v1.16b, v24.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 6 + + aese v2.16b, v24.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 6 + + aese v3.16b, v24.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 6 + eor v10.16b, v10.16b, v9.16b + + aese v0.16b, v25.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 7 + + aese v2.16b, v25.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 7 + + aese v3.16b, v25.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 7 + + pmull v28.1q, v10.1d, v8.1d + + aese v1.16b, v25.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 7 + ext v10.16b, v10.16b, v10.16b, #8 + + aese v3.16b, v26.16b + aesmc v3.16b, v3.16b //AES block 4k+7 - round 8 + + aese v0.16b, v26.16b + aesmc v0.16b, v0.16b //AES block 4k+4 - round 8 + eor v11.16b, v11.16b, v28.16b + + aese v1.16b, v26.16b + aesmc v1.16b, v1.16b //AES block 4k+5 - round 8 + + aese v3.16b, v27.16b //AES block 4k+7 - round 9 + + aese v2.16b, v26.16b + aesmc v2.16b, v2.16b //AES block 4k+6 - round 8 + + aese v0.16b, v27.16b //AES block 4k+4 - round 9 + + aese v1.16b, v27.16b //AES block 4k+5 - round 9 + eor v11.16b, v11.16b, v10.16b + + aese v2.16b, v27.16b //AES block 4k+6 - round 9 +.L128_enc_tail: //TAIL + + sub x5, x4, x0 //main_end_input_ptr is number of bytes left to process + ldp x6, x7, [x0], #16 //AES block 4k+4 - load plaintext +#ifdef __AARCH64EB__ + rev x6, x6 + rev x7, x7 +#endif + cmp x5, #48 + + ext v8.16b, v11.16b, v11.16b, #8 //prepare final partial tag + eor x6, x6, x13 //AES block 4k+4 - round 10 low + eor x7, x7, x14 //AES block 4k+4 - round 10 high + + fmov d4, x6 //AES block 4k+4 - mov low + + fmov v4.d[1], x7 //AES block 4k+4 - mov high + + eor v5.16b, v4.16b, v0.16b //AES block 4k+4 - result + + b.gt .L128_enc_blocks_more_than_3 + + sub w12, w12, #1 + movi v11.8b, #0 + mov v3.16b, v2.16b + + cmp x5, #32 + mov v2.16b, v1.16b + movi v9.8b, #0 + + movi v10.8b, #0 + b.gt .L128_enc_blocks_more_than_2 + + mov v3.16b, v1.16b + cmp x5, #16 + + sub w12, w12, #1 + b.gt .L128_enc_blocks_more_than_1 + + sub w12, w12, #1 + b .L128_enc_blocks_less_than_1 +.L128_enc_blocks_more_than_3: //blocks left > 3 + st1 { v5.16b}, [x2], #16 //AES final-3 block - store result + + ldp x6, x7, [x0], #16 //AES final-2 block - load input low & high +#ifdef __AARCH64EB__ + rev x6, x6 + rev x7, x7 +#endif + rev64 v4.16b, v5.16b //GHASH final-3 block + + eor v4.16b, v4.16b, v8.16b //feed in partial tag + eor x7, x7, x14 //AES final-2 block - round 10 high + eor x6, x6, x13 //AES final-2 block - round 10 low + + fmov d5, x6 //AES final-2 block - mov low + + movi v8.8b, #0 //suppress further partial tag feed in + fmov v5.d[1], x7 //AES final-2 block - mov high + + pmull v11.1q, v4.1d, v15.1d //GHASH final-3 block - low + mov d22, v4.d[1] //GHASH final-3 block - mid + + pmull2 v9.1q, v4.2d, v15.2d //GHASH final-3 block - high + + mov d10, v17.d[1] //GHASH final-3 block - mid + + eor v5.16b, v5.16b, v1.16b //AES final-2 block - result + eor v22.8b, v22.8b, v4.8b //GHASH final-3 block - mid + + pmull v10.1q, v22.1d, v10.1d //GHASH final-3 block - mid +.L128_enc_blocks_more_than_2: //blocks left > 2 + + st1 { v5.16b}, [x2], #16 //AES final-2 block - store result + + rev64 v4.16b, v5.16b //GHASH final-2 block + ldp x6, x7, [x0], #16 //AES final-1 block - load input low & high +#ifdef __AARCH64EB__ + rev x6, x6 + rev x7, x7 +#endif + eor v4.16b, v4.16b, v8.16b //feed in partial tag + + eor x6, x6, x13 //AES final-1 block - round 10 low + + fmov d5, x6 //AES final-1 block - mov low + eor x7, x7, x14 //AES final-1 block - round 10 high + + pmull2 v20.1q, v4.2d, v14.2d //GHASH final-2 block - high + fmov v5.d[1], x7 //AES final-1 block - mov high + + mov d22, v4.d[1] //GHASH final-2 block - mid + + pmull v21.1q, v4.1d, v14.1d //GHASH final-2 block - low + + eor v9.16b, v9.16b, v20.16b //GHASH final-2 block - high + + eor v22.8b, v22.8b, v4.8b //GHASH final-2 block - mid + + eor v5.16b, v5.16b, v2.16b //AES final-1 block - result + + eor v11.16b, v11.16b, v21.16b //GHASH final-2 block - low + + pmull v22.1q, v22.1d, v17.1d //GHASH final-2 block - mid + + movi v8.8b, #0 //suppress further partial tag feed in + + eor v10.16b, v10.16b, v22.16b //GHASH final-2 block - mid +.L128_enc_blocks_more_than_1: //blocks left > 1 + + st1 { v5.16b}, [x2], #16 //AES final-1 block - store result + + rev64 v4.16b, v5.16b //GHASH final-1 block + ldp x6, x7, [x0], #16 //AES final block - load input low & high *** 45312 LINES SKIPPED *** From nobody Tue Aug 29 21:47:25 2023 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 4Rb1HN75hsz4rG0x; Tue, 29 Aug 2023 21:47:28 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rb1HN6qjyz3KTx; Tue, 29 Aug 2023 21:47:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693345648; 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=WFUenYmGZlc1Lf88Ct4Io9L1/Q40xa6lD+5tOvpWapw=; b=U2ZRiKPNzE1Dp8NgrclpY7xdBogntffByGUQjtykNVaFhwYt11h1nnjrrT8YAKoVCMXVn4 r33RT+mqa7rTs4kuTZaFKcToOZYQbRski+FxHCX8vfNKXTWQNPmVIyot6OkXToPQd2Gzq3 lxen2BF+iy9yDnf90CBSpc+zcJJoaOkzLr40OV9E6jTOpxpD+U7uWWeSyinAgXfr5hr3bs C90LqpCdYnLze2XEATqWTRceXUipRjcwFnwN+1lQcqG9SPxt+pvmi2u3tVRMb9NXm1t2rv XSoUFbWTDL1rh3BIzgDIeIgbq339eOp7ry9+6RJ8ZRsYuE/xDWz7vMTm6CkKGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693345648; a=rsa-sha256; cv=none; b=Mb2xhHZGOy53CmmxRubarxro/8p2J+MTc3PZL9NKXpW/tJYHDnHzDqA0+Lk/yXVSG/FWHQ kqbPmWJRW9sH5I+Hzh97rEQ3/jO5ASWlvS05c5Y3T4Wlrdv8qqX3kGWgb6MeAmIgQL/OGJ x5uyCgWfT1HnJWJntbD3yHuYnS5+RB3vpWOgSiguaniX9XN0pwHLJhgYQsLzsdeXn3wt4L pMDuyPo6JEQW1ojkv+DljsfzDL06qVEjLNKhbRkKoBbwomHPmp7O+8gLU/EuYxhzP8QEad fAofLucxN4XNGxDdTDHKQOUm8dxPe7anY2WtnRSiSGopjbXX3GqX6tlhMFy7Nw== 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=1693345648; 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=WFUenYmGZlc1Lf88Ct4Io9L1/Q40xa6lD+5tOvpWapw=; b=yRsRlghtexINSLgXLD4F7dXTiUNp83MO5fO22lr7ouF2AR2eWrG5pPMmJJUa9d8fnGRRZu CQQbgqcf7exy1aqK0Ro+B4jUo84pxR886/BCSD6Zjrtyqy7fLfd/ZCVx5fYNtWR7n7bNTk 8TRrzAV4mBeAxoQ6j2AoC1YC5+wI1Tqw2FLtyYiyIr5hN1XkZ6KXWGUj5uAxFbg5NjkcvB Qsj1evZcnUnV3O9iTNY9tZnhkfPwQtkE3mG6vXL4C5Ad5if9/wlb9gMwR3M8/lcnIpQsM5 5rq2+PLJ3cTIYYRa1cRwQEqKN5JF6yitFU8fgtYLJzsWZ8iIOB3VbV5SkhCpOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rb1HN5xDCz17kl; Tue, 29 Aug 2023 21:47:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37TLlSaH087824; Tue, 29 Aug 2023 21:47:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37TLlPPE087814; Tue, 29 Aug 2023 21:47:25 GMT (envelope-from git) Date: Tue, 29 Aug 2023 21:47:25 GMT Message-Id: <202308292147.37TLlPPE087814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 47d997021fbc - main - libcrypto: Switch back to the generated assembly in sys/crypto/openssl 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org 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: 47d997021fbc7b662e9507deec1897d514d1224c Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=47d997021fbc7b662e9507deec1897d514d1224c commit 47d997021fbc7b662e9507deec1897d514d1224c Author: John Baldwin AuthorDate: 2023-08-29 21:46:44 +0000 Commit: John Baldwin CommitDate: 2023-08-29 21:46:44 +0000 libcrypto: Switch back to the generated assembly in sys/crypto/openssl Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41569 --- secure/lib/libcrypto/Makefile | 4 +- .../lib/libcrypto/arch/aarch64/aes-gcm-armv8_64.S | 6390 --------- secure/lib/libcrypto/arch/aarch64/aesv8-armx.S | 3181 ----- secure/lib/libcrypto/arch/aarch64/arm64cpuid.S | 130 - secure/lib/libcrypto/arch/aarch64/armv8-mont.S | 2125 --- secure/lib/libcrypto/arch/aarch64/chacha-armv8.S | 2035 --- .../libcrypto/arch/aarch64/ecp_nistz256-armv8.S | 4243 ------ secure/lib/libcrypto/arch/aarch64/ghashv8-armx.S | 553 - .../lib/libcrypto/arch/aarch64/keccak1600-armv8.S | 1010 -- secure/lib/libcrypto/arch/aarch64/poly1305-armv8.S | 864 -- secure/lib/libcrypto/arch/aarch64/sha1-armv8.S | 1212 -- secure/lib/libcrypto/arch/aarch64/sha256-armv8.S | 2052 --- secure/lib/libcrypto/arch/aarch64/sha512-armv8.S | 1607 --- secure/lib/libcrypto/arch/aarch64/vpaes-armv8.S | 1197 -- secure/lib/libcrypto/arch/amd64/aes-x86_64.S | 2680 ---- secure/lib/libcrypto/arch/amd64/aesni-gcm-x86_64.S | 811 -- secure/lib/libcrypto/arch/amd64/aesni-mb-x86_64.S | 1610 --- .../lib/libcrypto/arch/amd64/aesni-sha1-x86_64.S | 3057 ----- .../lib/libcrypto/arch/amd64/aesni-sha256-x86_64.S | 4457 ------ secure/lib/libcrypto/arch/amd64/aesni-x86_64.S | 4507 ------ secure/lib/libcrypto/arch/amd64/bsaes-x86_64.S | 2619 ---- secure/lib/libcrypto/arch/amd64/chacha-x86_64.S | 2215 --- secure/lib/libcrypto/arch/amd64/cmll-x86_64.S | 1947 --- secure/lib/libcrypto/arch/amd64/e_padlock-x86_64.S | 1059 -- .../lib/libcrypto/arch/amd64/ecp_nistz256-x86_64.S | 7365 ---------- secure/lib/libcrypto/arch/amd64/ghash-x86_64.S | 1875 --- .../lib/libcrypto/arch/amd64/keccak1600-x86_64.S | 546 - secure/lib/libcrypto/arch/amd64/md5-x86_64.S | 705 - secure/lib/libcrypto/arch/amd64/poly1305-x86_64.S | 2090 --- secure/lib/libcrypto/arch/amd64/rc4-md5-x86_64.S | 1303 -- secure/lib/libcrypto/arch/amd64/rc4-x86_64.S | 657 - secure/lib/libcrypto/arch/amd64/rsaz-avx2.S | 1766 --- secure/lib/libcrypto/arch/amd64/rsaz-avx512.S | 902 -- secure/lib/libcrypto/arch/amd64/rsaz-x86_64.S | 2037 --- secure/lib/libcrypto/arch/amd64/sha1-mb-x86_64.S | 7325 ---------- secure/lib/libcrypto/arch/amd64/sha1-x86_64.S | 5472 -------- secure/lib/libcrypto/arch/amd64/sha256-mb-x86_64.S | 8006 ----------- secure/lib/libcrypto/arch/amd64/sha256-x86_64.S | 5478 -------- secure/lib/libcrypto/arch/amd64/sha512-x86_64.S | 5483 -------- secure/lib/libcrypto/arch/amd64/vpaes-x86_64.S | 880 -- secure/lib/libcrypto/arch/amd64/wp-x86_64.S | 901 -- secure/lib/libcrypto/arch/amd64/x25519-x86_64.S | 824 -- secure/lib/libcrypto/arch/amd64/x86_64-gf2m.S | 333 - secure/lib/libcrypto/arch/amd64/x86_64-mont.S | 1261 -- secure/lib/libcrypto/arch/amd64/x86_64-mont5.S | 3625 ----- secure/lib/libcrypto/arch/amd64/x86_64cpuid.S | 513 - secure/lib/libcrypto/arch/arm/aes-armv4.S | 1198 -- secure/lib/libcrypto/arch/arm/aesv8-armx.S | 1088 -- secure/lib/libcrypto/arch/arm/armv4-gf2m.S | 236 - secure/lib/libcrypto/arch/arm/armv4-mont.S | 961 -- secure/lib/libcrypto/arch/arm/armv4cpuid.S | 273 - secure/lib/libcrypto/arch/arm/bsaes-armv7.S | 2561 ---- secure/lib/libcrypto/arch/arm/chacha-armv4.S | 1478 -- secure/lib/libcrypto/arch/arm/ecp_nistz256-armv4.S | 4430 ------ secure/lib/libcrypto/arch/arm/ghash-armv4.S | 565 - secure/lib/libcrypto/arch/arm/ghashv8-armx.S | 244 - secure/lib/libcrypto/arch/arm/keccak1600-armv4.S | 2694 ---- secure/lib/libcrypto/arch/arm/poly1305-armv4.S | 1169 -- secure/lib/libcrypto/arch/arm/sha1-armv4-large.S | 1499 -- secure/lib/libcrypto/arch/arm/sha256-armv4.S | 2823 ---- secure/lib/libcrypto/arch/arm/sha512-armv4.S | 1877 --- secure/lib/libcrypto/arch/i386/aes-586.S | 6644 --------- secure/lib/libcrypto/arch/i386/aesni-x86.S | 6732 --------- secure/lib/libcrypto/arch/i386/bf-586.S | 1928 --- secure/lib/libcrypto/arch/i386/bn-586.S | 3157 ----- secure/lib/libcrypto/arch/i386/cast-586.S | 2002 --- secure/lib/libcrypto/arch/i386/chacha-x86.S | 2084 --- secure/lib/libcrypto/arch/i386/cmll-x86.S | 4896 ------- secure/lib/libcrypto/arch/i386/co-586.S | 2584 ---- secure/lib/libcrypto/arch/i386/crypt586.S | 1800 --- secure/lib/libcrypto/arch/i386/des-586.S | 3932 ------ secure/lib/libcrypto/arch/i386/e_padlock-x86.S | 2300 ---- secure/lib/libcrypto/arch/i386/ecp_nistz256-x86.S | 10584 -------------- secure/lib/libcrypto/arch/i386/ghash-x86.S | 2636 ---- secure/lib/libcrypto/arch/i386/md5-586.S | 1404 -- secure/lib/libcrypto/arch/i386/poly1305-x86.S | 3938 ------ secure/lib/libcrypto/arch/i386/rc4-586.S | 819 -- secure/lib/libcrypto/arch/i386/rc5-586.S | 1264 -- secure/lib/libcrypto/arch/i386/rmd-586.S | 3976 ------ secure/lib/libcrypto/arch/i386/sha1-586.S | 8016 ----------- secure/lib/libcrypto/arch/i386/sha256-586.S | 13612 ------------------- secure/lib/libcrypto/arch/i386/sha512-586.S | 5704 -------- secure/lib/libcrypto/arch/i386/vpaes-x86.S | 1488 -- secure/lib/libcrypto/arch/i386/wp-mmx.S | 2260 --- secure/lib/libcrypto/arch/i386/x86-gf2m.S | 755 - secure/lib/libcrypto/arch/i386/x86-mont.S | 995 -- secure/lib/libcrypto/arch/i386/x86cpuid.S | 1217 -- secure/lib/libcrypto/arch/powerpc/aes-ppc.S | 1561 --- secure/lib/libcrypto/arch/powerpc/aesp8-ppc.S | 3642 ----- secure/lib/libcrypto/arch/powerpc/bn-ppc.S | 1855 --- secure/lib/libcrypto/arch/powerpc/chacha-ppc.S | 1492 -- secure/lib/libcrypto/arch/powerpc/ghashp8-ppc.S | 569 - secure/lib/libcrypto/arch/powerpc/poly1305-ppc.S | 1301 -- secure/lib/libcrypto/arch/powerpc/poly1305-ppcfp.S | 586 - secure/lib/libcrypto/arch/powerpc/ppc-mont.S | 1787 --- secure/lib/libcrypto/arch/powerpc/ppc.S | 1855 --- secure/lib/libcrypto/arch/powerpc/ppccpuid.S | 356 - secure/lib/libcrypto/arch/powerpc/sha1-ppc.S | 1118 -- secure/lib/libcrypto/arch/powerpc/sha256-ppc.S | 1321 -- secure/lib/libcrypto/arch/powerpc/sha256p8-ppc.S | 735 - secure/lib/libcrypto/arch/powerpc/sha512-ppc.S | 3071 ----- secure/lib/libcrypto/arch/powerpc/sha512p8-ppc.S | 833 -- secure/lib/libcrypto/arch/powerpc/vpaes-ppc.S | 1468 -- secure/lib/libcrypto/arch/powerpc64/aes-ppc.S | 1533 --- secure/lib/libcrypto/arch/powerpc64/aesp8-ppc.S | 3659 ----- secure/lib/libcrypto/arch/powerpc64/bn-ppc.S | 1876 --- secure/lib/libcrypto/arch/powerpc64/chacha-ppc.S | 1499 -- .../libcrypto/arch/powerpc64/ecp_nistp521-ppc64.S | 354 - .../libcrypto/arch/powerpc64/ecp_nistz256-ppc64.S | 4854 ------- secure/lib/libcrypto/arch/powerpc64/ghashp8-ppc.S | 576 - .../libcrypto/arch/powerpc64/keccak1600-ppc64.S | 670 - secure/lib/libcrypto/arch/powerpc64/poly1305-ppc.S | 1142 -- .../lib/libcrypto/arch/powerpc64/poly1305-ppcfp.S | 596 - secure/lib/libcrypto/arch/powerpc64/ppc-mont.S | 1790 --- secure/lib/libcrypto/arch/powerpc64/ppc.S | 1876 --- secure/lib/libcrypto/arch/powerpc64/ppccpuid.S | 387 - secure/lib/libcrypto/arch/powerpc64/sha1-ppc.S | 1121 -- secure/lib/libcrypto/arch/powerpc64/sha256-ppc.S | 1324 -- secure/lib/libcrypto/arch/powerpc64/sha256p8-ppc.S | 738 - secure/lib/libcrypto/arch/powerpc64/sha512-ppc.S | 1420 -- secure/lib/libcrypto/arch/powerpc64/sha512p8-ppc.S | 836 -- secure/lib/libcrypto/arch/powerpc64/vpaes-ppc.S | 1479 -- secure/lib/libcrypto/arch/powerpc64/x25519-ppc64.S | 349 - secure/lib/libcrypto/arch/powerpc64le/aes-ppc.S | 1581 --- secure/lib/libcrypto/arch/powerpc64le/aesp8-ppc.S | 3659 ----- secure/lib/libcrypto/arch/powerpc64le/bn-ppc.S | 1876 --- secure/lib/libcrypto/arch/powerpc64le/chacha-ppc.S | 1371 -- .../arch/powerpc64le/ecp_nistp521-ppc64.S | 354 - .../arch/powerpc64le/ecp_nistz256-ppc64.S | 4854 ------- .../lib/libcrypto/arch/powerpc64le/ghashp8-ppc.S | 576 - .../libcrypto/arch/powerpc64le/keccak1600-ppc64.S | 670 - .../lib/libcrypto/arch/powerpc64le/poly1305-ppc.S | 1128 -- .../libcrypto/arch/powerpc64le/poly1305-ppcfp.S | 591 - secure/lib/libcrypto/arch/powerpc64le/ppc-mont.S | 1790 --- secure/lib/libcrypto/arch/powerpc64le/ppc.S | 1876 --- secure/lib/libcrypto/arch/powerpc64le/ppccpuid.S | 387 - secure/lib/libcrypto/arch/powerpc64le/sha1-ppc.S | 1169 -- secure/lib/libcrypto/arch/powerpc64le/sha256-ppc.S | 1372 -- .../lib/libcrypto/arch/powerpc64le/sha256p8-ppc.S | 746 - secure/lib/libcrypto/arch/powerpc64le/sha512-ppc.S | 1516 --- .../lib/libcrypto/arch/powerpc64le/sha512p8-ppc.S | 848 -- secure/lib/libcrypto/arch/powerpc64le/vpaes-ppc.S | 1479 -- .../lib/libcrypto/arch/powerpc64le/x25519-ppc64.S | 349 - secure/lib/libcrypto/engines/padlock/Makefile | 2 +- secure/lib/libcrypto/modules/fips/Makefile | 4 +- 145 files changed, 5 insertions(+), 310557 deletions(-) diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index ab9044ad67f9..585e89861815 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -618,12 +618,12 @@ buildasm cleanasm: PICFLAG+= -DOPENSSL_PIC .if defined(ASM_${MACHINE_CPUARCH}) -.PATH: ${SRCTOP}/secure/lib/libcrypto/arch/${MACHINE_CPUARCH} +.PATH: ${SRCTOP}/sys/crypto/openssl/${MACHINE_CPUARCH} .if defined(ASM_amd64) .PATH: ${LCRYPTO_SRC}/crypto/bn/asm .endif .elif defined(ASM_${MACHINE_ARCH}) -.PATH: ${SRCTOP}/secure/lib/libcrypto/arch/${MACHINE_ARCH} +.PATH: ${SRCTOP}/sys/crypto/openssl/${MACHINE_ARCH} .endif .PATH: ${LCRYPTO_SRC}/crypto \ diff --git a/secure/lib/libcrypto/arch/aarch64/aes-gcm-armv8_64.S b/secure/lib/libcrypto/arch/aarch64/aes-gcm-armv8_64.S deleted file mode 100644 index eb85dbc9f996..000000000000 --- a/secure/lib/libcrypto/arch/aarch64/aes-gcm-armv8_64.S +++ /dev/null @@ -1,6390 +0,0 @@ -/* Do not modify. This file is auto-generated from aes-gcm-armv8_64.pl. */ -#include "arm_arch.h" - -#if __ARM_MAX_ARCH__>=8 -.arch armv8-a+crypto -.text -.globl aes_gcm_enc_128_kernel -.type aes_gcm_enc_128_kernel,%function -.align 4 -aes_gcm_enc_128_kernel: - cbz x1, .L128_enc_ret - stp x19, x20, [sp, #-112]! - mov x16, x4 - mov x8, x5 - stp x21, x22, [sp, #16] - stp x23, x24, [sp, #32] - stp d8, d9, [sp, #48] - stp d10, d11, [sp, #64] - stp d12, d13, [sp, #80] - stp d14, d15, [sp, #96] - - ldp x10, x11, [x16] //ctr96_b64, ctr96_t32 -#ifdef __AARCH64EB__ - rev x10, x10 - rev x11, x11 -#endif - ldp x13, x14, [x8, #160] //load rk10 -#ifdef __AARCH64EB__ - ror x13, x13, #32 - ror x14, x14, #32 -#endif - ld1 {v11.16b}, [x3] - ext v11.16b, v11.16b, v11.16b, #8 - rev64 v11.16b, v11.16b - lsr x5, x1, #3 //byte_len - mov x15, x5 - - ld1 {v18.4s}, [x8], #16 //load rk0 - add x4, x0, x1, lsr #3 //end_input_ptr - sub x5, x5, #1 //byte_len - 1 - - lsr x12, x11, #32 - ldr q15, [x3, #112] //load h4l | h4h -#ifndef __AARCH64EB__ - ext v15.16b, v15.16b, v15.16b, #8 -#endif - fmov d1, x10 //CTR block 1 - rev w12, w12 //rev_ctr32 - - add w12, w12, #1 //increment rev_ctr32 - orr w11, w11, w11 - ld1 {v19.4s}, [x8], #16 //load rk1 - - rev w9, w12 //CTR block 1 - add w12, w12, #1 //CTR block 1 - fmov d3, x10 //CTR block 3 - - orr x9, x11, x9, lsl #32 //CTR block 1 - ld1 { v0.16b}, [x16] //special case vector load initial counter so we can start first AES block as quickly as possible - - fmov v1.d[1], x9 //CTR block 1 - rev w9, w12 //CTR block 2 - - fmov d2, x10 //CTR block 2 - orr x9, x11, x9, lsl #32 //CTR block 2 - add w12, w12, #1 //CTR block 2 - - fmov v2.d[1], x9 //CTR block 2 - rev w9, w12 //CTR block 3 - - orr x9, x11, x9, lsl #32 //CTR block 3 - ld1 {v20.4s}, [x8], #16 //load rk2 - - add w12, w12, #1 //CTR block 3 - fmov v3.d[1], x9 //CTR block 3 - - ldr q14, [x3, #80] //load h3l | h3h -#ifndef __AARCH64EB__ - ext v14.16b, v14.16b, v14.16b, #8 -#endif - aese v1.16b, v18.16b - aesmc v1.16b, v1.16b //AES block 1 - round 0 - ld1 {v21.4s}, [x8], #16 //load rk3 - - aese v2.16b, v18.16b - aesmc v2.16b, v2.16b //AES block 2 - round 0 - ldr q12, [x3, #32] //load h1l | h1h -#ifndef __AARCH64EB__ - ext v12.16b, v12.16b, v12.16b, #8 -#endif - - aese v0.16b, v18.16b - aesmc v0.16b, v0.16b //AES block 0 - round 0 - ld1 {v22.4s}, [x8], #16 //load rk4 - - aese v3.16b, v18.16b - aesmc v3.16b, v3.16b //AES block 3 - round 0 - ld1 {v23.4s}, [x8], #16 //load rk5 - - aese v2.16b, v19.16b - aesmc v2.16b, v2.16b //AES block 2 - round 1 - trn2 v17.2d, v14.2d, v15.2d //h4l | h3l - - aese v0.16b, v19.16b - aesmc v0.16b, v0.16b //AES block 0 - round 1 - ld1 {v24.4s}, [x8], #16 //load rk6 - - aese v1.16b, v19.16b - aesmc v1.16b, v1.16b //AES block 1 - round 1 - ld1 {v25.4s}, [x8], #16 //load rk7 - - aese v3.16b, v19.16b - aesmc v3.16b, v3.16b //AES block 3 - round 1 - trn1 v9.2d, v14.2d, v15.2d //h4h | h3h - - aese v0.16b, v20.16b - aesmc v0.16b, v0.16b //AES block 0 - round 2 - ld1 {v26.4s}, [x8], #16 //load rk8 - - aese v1.16b, v20.16b - aesmc v1.16b, v1.16b //AES block 1 - round 2 - ldr q13, [x3, #64] //load h2l | h2h -#ifndef __AARCH64EB__ - ext v13.16b, v13.16b, v13.16b, #8 -#endif - - aese v3.16b, v20.16b - aesmc v3.16b, v3.16b //AES block 3 - round 2 - - aese v2.16b, v20.16b - aesmc v2.16b, v2.16b //AES block 2 - round 2 - eor v17.16b, v17.16b, v9.16b //h4k | h3k - - aese v0.16b, v21.16b - aesmc v0.16b, v0.16b //AES block 0 - round 3 - - aese v1.16b, v21.16b - aesmc v1.16b, v1.16b //AES block 1 - round 3 - - aese v2.16b, v21.16b - aesmc v2.16b, v2.16b //AES block 2 - round 3 - ld1 {v27.4s}, [x8], #16 //load rk9 - - aese v3.16b, v21.16b - aesmc v3.16b, v3.16b //AES block 3 - round 3 - - and x5, x5, #0xffffffffffffffc0 //number of bytes to be processed in main loop (at least 1 byte must be handled by tail) - trn2 v16.2d, v12.2d, v13.2d //h2l | h1l - - aese v3.16b, v22.16b - aesmc v3.16b, v3.16b //AES block 3 - round 4 - add x5, x5, x0 - - aese v2.16b, v22.16b - aesmc v2.16b, v2.16b //AES block 2 - round 4 - cmp x0, x5 //check if we have <= 4 blocks - - aese v0.16b, v22.16b - aesmc v0.16b, v0.16b //AES block 0 - round 4 - - aese v3.16b, v23.16b - aesmc v3.16b, v3.16b //AES block 3 - round 5 - - aese v2.16b, v23.16b - aesmc v2.16b, v2.16b //AES block 2 - round 5 - - aese v0.16b, v23.16b - aesmc v0.16b, v0.16b //AES block 0 - round 5 - - aese v3.16b, v24.16b - aesmc v3.16b, v3.16b //AES block 3 - round 6 - - aese v1.16b, v22.16b - aesmc v1.16b, v1.16b //AES block 1 - round 4 - - aese v2.16b, v24.16b - aesmc v2.16b, v2.16b //AES block 2 - round 6 - trn1 v8.2d, v12.2d, v13.2d //h2h | h1h - - aese v0.16b, v24.16b - aesmc v0.16b, v0.16b //AES block 0 - round 6 - - aese v1.16b, v23.16b - aesmc v1.16b, v1.16b //AES block 1 - round 5 - - aese v3.16b, v25.16b - aesmc v3.16b, v3.16b //AES block 3 - round 7 - - aese v0.16b, v25.16b - aesmc v0.16b, v0.16b //AES block 0 - round 7 - - aese v1.16b, v24.16b - aesmc v1.16b, v1.16b //AES block 1 - round 6 - - aese v2.16b, v25.16b - aesmc v2.16b, v2.16b //AES block 2 - round 7 - - aese v0.16b, v26.16b - aesmc v0.16b, v0.16b //AES block 0 - round 8 - - aese v1.16b, v25.16b - aesmc v1.16b, v1.16b //AES block 1 - round 7 - - aese v2.16b, v26.16b - aesmc v2.16b, v2.16b //AES block 2 - round 8 - - aese v3.16b, v26.16b - aesmc v3.16b, v3.16b //AES block 3 - round 8 - - aese v1.16b, v26.16b - aesmc v1.16b, v1.16b //AES block 1 - round 8 - - aese v2.16b, v27.16b //AES block 2 - round 9 - - aese v0.16b, v27.16b //AES block 0 - round 9 - - eor v16.16b, v16.16b, v8.16b //h2k | h1k - - aese v1.16b, v27.16b //AES block 1 - round 9 - - aese v3.16b, v27.16b //AES block 3 - round 9 - b.ge .L128_enc_tail //handle tail - - ldp x6, x7, [x0, #0] //AES block 0 - load plaintext -#ifdef __AARCH64EB__ - rev x6, x6 - rev x7, x7 -#endif - ldp x21, x22, [x0, #32] //AES block 2 - load plaintext -#ifdef __AARCH64EB__ - rev x21, x21 - rev x22, x22 -#endif - ldp x19, x20, [x0, #16] //AES block 1 - load plaintext -#ifdef __AARCH64EB__ - rev x19, x19 - rev x20, x20 -#endif - ldp x23, x24, [x0, #48] //AES block 3 - load plaintext -#ifdef __AARCH64EB__ - rev x23, x23 - rev x24, x24 -#endif - eor x6, x6, x13 //AES block 0 - round 10 low - eor x7, x7, x14 //AES block 0 - round 10 high - - eor x21, x21, x13 //AES block 2 - round 10 low - fmov d4, x6 //AES block 0 - mov low - - eor x19, x19, x13 //AES block 1 - round 10 low - eor x22, x22, x14 //AES block 2 - round 10 high - fmov v4.d[1], x7 //AES block 0 - mov high - - fmov d5, x19 //AES block 1 - mov low - eor x20, x20, x14 //AES block 1 - round 10 high - - eor x23, x23, x13 //AES block 3 - round 10 low - fmov v5.d[1], x20 //AES block 1 - mov high - - fmov d6, x21 //AES block 2 - mov low - eor x24, x24, x14 //AES block 3 - round 10 high - rev w9, w12 //CTR block 4 - - fmov v6.d[1], x22 //AES block 2 - mov high - orr x9, x11, x9, lsl #32 //CTR block 4 - - eor v4.16b, v4.16b, v0.16b //AES block 0 - result - fmov d0, x10 //CTR block 4 - add w12, w12, #1 //CTR block 4 - - fmov v0.d[1], x9 //CTR block 4 - rev w9, w12 //CTR block 5 - - eor v5.16b, v5.16b, v1.16b //AES block 1 - result - fmov d1, x10 //CTR block 5 - orr x9, x11, x9, lsl #32 //CTR block 5 - - add w12, w12, #1 //CTR block 5 - add x0, x0, #64 //AES input_ptr update - fmov v1.d[1], x9 //CTR block 5 - - fmov d7, x23 //AES block 3 - mov low - rev w9, w12 //CTR block 6 - st1 { v4.16b}, [x2], #16 //AES block 0 - store result - - fmov v7.d[1], x24 //AES block 3 - mov high - orr x9, x11, x9, lsl #32 //CTR block 6 - - add w12, w12, #1 //CTR block 6 - eor v6.16b, v6.16b, v2.16b //AES block 2 - result - st1 { v5.16b}, [x2], #16 //AES block 1 - store result - - fmov d2, x10 //CTR block 6 - cmp x0, x5 //check if we have <= 8 blocks - - fmov v2.d[1], x9 //CTR block 6 - rev w9, w12 //CTR block 7 - st1 { v6.16b}, [x2], #16 //AES block 2 - store result - - orr x9, x11, x9, lsl #32 //CTR block 7 - - eor v7.16b, v7.16b, v3.16b //AES block 3 - result - st1 { v7.16b}, [x2], #16 //AES block 3 - store result - b.ge .L128_enc_prepretail //do prepretail - -.L128_enc_main_loop: //main loop start - ldp x23, x24, [x0, #48] //AES block 4k+3 - load plaintext -#ifdef __AARCH64EB__ - rev x23, x23 - rev x24, x24 -#endif - rev64 v4.16b, v4.16b //GHASH block 4k (only t0 is free) - rev64 v6.16b, v6.16b //GHASH block 4k+2 (t0, t1, and t2 free) - - aese v2.16b, v18.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 0 - fmov d3, x10 //CTR block 4k+3 - - ext v11.16b, v11.16b, v11.16b, #8 //PRE 0 - rev64 v5.16b, v5.16b //GHASH block 4k+1 (t0 and t1 free) - - aese v1.16b, v18.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 0 - add w12, w12, #1 //CTR block 4k+3 - fmov v3.d[1], x9 //CTR block 4k+3 - - aese v0.16b, v18.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 0 - mov d31, v6.d[1] //GHASH block 4k+2 - mid - - aese v2.16b, v19.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 1 - mov d30, v5.d[1] //GHASH block 4k+1 - mid - - aese v1.16b, v19.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 1 - eor v4.16b, v4.16b, v11.16b //PRE 1 - - aese v3.16b, v18.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 0 - eor x24, x24, x14 //AES block 4k+3 - round 10 high - - pmull2 v28.1q, v5.2d, v14.2d //GHASH block 4k+1 - high - eor v31.8b, v31.8b, v6.8b //GHASH block 4k+2 - mid - ldp x6, x7, [x0, #0] //AES block 4k+4 - load plaintext -#ifdef __AARCH64EB__ - rev x6, x6 - rev x7, x7 -#endif - aese v0.16b, v19.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 1 - rev w9, w12 //CTR block 4k+8 - - eor v30.8b, v30.8b, v5.8b //GHASH block 4k+1 - mid - mov d8, v4.d[1] //GHASH block 4k - mid - orr x9, x11, x9, lsl #32 //CTR block 4k+8 - - pmull2 v9.1q, v4.2d, v15.2d //GHASH block 4k - high - add w12, w12, #1 //CTR block 4k+8 - mov d10, v17.d[1] //GHASH block 4k - mid - - aese v0.16b, v20.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 2 - - pmull v11.1q, v4.1d, v15.1d //GHASH block 4k - low - eor v8.8b, v8.8b, v4.8b //GHASH block 4k - mid - - aese v1.16b, v20.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 2 - - aese v0.16b, v21.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 3 - eor v9.16b, v9.16b, v28.16b //GHASH block 4k+1 - high - - pmull v28.1q, v6.1d, v13.1d //GHASH block 4k+2 - low - - pmull v10.1q, v8.1d, v10.1d //GHASH block 4k - mid - rev64 v7.16b, v7.16b //GHASH block 4k+3 (t0, t1, t2 and t3 free) - - pmull v30.1q, v30.1d, v17.1d //GHASH block 4k+1 - mid - - pmull v29.1q, v5.1d, v14.1d //GHASH block 4k+1 - low - ins v31.d[1], v31.d[0] //GHASH block 4k+2 - mid - - pmull2 v8.1q, v6.2d, v13.2d //GHASH block 4k+2 - high - eor x7, x7, x14 //AES block 4k+4 - round 10 high - - eor v10.16b, v10.16b, v30.16b //GHASH block 4k+1 - mid - mov d30, v7.d[1] //GHASH block 4k+3 - mid - - aese v3.16b, v19.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 1 - eor v11.16b, v11.16b, v29.16b //GHASH block 4k+1 - low - - aese v2.16b, v20.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 2 - eor x6, x6, x13 //AES block 4k+4 - round 10 low - - aese v1.16b, v21.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 3 - eor v30.8b, v30.8b, v7.8b //GHASH block 4k+3 - mid - - pmull2 v4.1q, v7.2d, v12.2d //GHASH block 4k+3 - high - - aese v2.16b, v21.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 3 - eor v9.16b, v9.16b, v8.16b //GHASH block 4k+2 - high - - pmull2 v31.1q, v31.2d, v16.2d //GHASH block 4k+2 - mid - - pmull v29.1q, v7.1d, v12.1d //GHASH block 4k+3 - low - movi v8.8b, #0xc2 - - pmull v30.1q, v30.1d, v16.1d //GHASH block 4k+3 - mid - eor v11.16b, v11.16b, v28.16b //GHASH block 4k+2 - low - - aese v1.16b, v22.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 4 - - aese v3.16b, v20.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 2 - shl d8, d8, #56 //mod_constant - - aese v0.16b, v22.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 4 - eor v9.16b, v9.16b, v4.16b //GHASH block 4k+3 - high - - aese v1.16b, v23.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 5 - ldp x19, x20, [x0, #16] //AES block 4k+5 - load plaintext -#ifdef __AARCH64EB__ - rev x19, x19 - rev x20, x20 -#endif - aese v3.16b, v21.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 3 - eor v10.16b, v10.16b, v31.16b //GHASH block 4k+2 - mid - - aese v0.16b, v23.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 5 - ldp x21, x22, [x0, #32] //AES block 4k+6 - load plaintext -#ifdef __AARCH64EB__ - rev x21, x21 - rev x22, x22 -#endif - pmull v31.1q, v9.1d, v8.1d //MODULO - top 64b align with mid - eor v11.16b, v11.16b, v29.16b //GHASH block 4k+3 - low - - aese v2.16b, v22.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 4 - eor x19, x19, x13 //AES block 4k+5 - round 10 low - - aese v3.16b, v22.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 4 - eor v10.16b, v10.16b, v30.16b //GHASH block 4k+3 - mid - - aese v1.16b, v24.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 6 - eor x23, x23, x13 //AES block 4k+3 - round 10 low - - aese v2.16b, v23.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 5 - eor v30.16b, v11.16b, v9.16b //MODULO - karatsuba tidy up - - fmov d4, x6 //AES block 4k+4 - mov low - aese v0.16b, v24.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 6 - fmov v4.d[1], x7 //AES block 4k+4 - mov high - - add x0, x0, #64 //AES input_ptr update - fmov d7, x23 //AES block 4k+3 - mov low - ext v9.16b, v9.16b, v9.16b, #8 //MODULO - other top alignment - - aese v3.16b, v23.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 5 - fmov d5, x19 //AES block 4k+5 - mov low - - aese v0.16b, v25.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 7 - eor v10.16b, v10.16b, v30.16b //MODULO - karatsuba tidy up - - aese v2.16b, v24.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 6 - eor x20, x20, x14 //AES block 4k+5 - round 10 high - - aese v1.16b, v25.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 7 - fmov v5.d[1], x20 //AES block 4k+5 - mov high - - aese v0.16b, v26.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 8 - fmov v7.d[1], x24 //AES block 4k+3 - mov high - - aese v3.16b, v24.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 6 - cmp x0, x5 //.LOOP CONTROL - - aese v1.16b, v26.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 8 - eor v10.16b, v10.16b, v31.16b //MODULO - fold into mid - - aese v0.16b, v27.16b //AES block 4k+4 - round 9 - eor x21, x21, x13 //AES block 4k+6 - round 10 low - eor x22, x22, x14 //AES block 4k+6 - round 10 high - - aese v3.16b, v25.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 7 - fmov d6, x21 //AES block 4k+6 - mov low - - aese v1.16b, v27.16b //AES block 4k+5 - round 9 - fmov v6.d[1], x22 //AES block 4k+6 - mov high - - aese v2.16b, v25.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 7 - eor v4.16b, v4.16b, v0.16b //AES block 4k+4 - result - - fmov d0, x10 //CTR block 4k+8 - aese v3.16b, v26.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 8 - - fmov v0.d[1], x9 //CTR block 4k+8 - rev w9, w12 //CTR block 4k+9 - eor v10.16b, v10.16b, v9.16b //MODULO - fold into mid - - aese v2.16b, v26.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 8 - eor v5.16b, v5.16b, v1.16b //AES block 4k+5 - result - - add w12, w12, #1 //CTR block 4k+9 - orr x9, x11, x9, lsl #32 //CTR block 4k+9 - fmov d1, x10 //CTR block 4k+9 - - pmull v9.1q, v10.1d, v8.1d //MODULO - mid 64b align with low - fmov v1.d[1], x9 //CTR block 4k+9 - rev w9, w12 //CTR block 4k+10 - - aese v2.16b, v27.16b //AES block 4k+6 - round 9 - st1 { v4.16b}, [x2], #16 //AES block 4k+4 - store result - eor v6.16b, v6.16b, v2.16b //AES block 4k+6 - result - orr x9, x11, x9, lsl #32 //CTR block 4k+10 - - aese v3.16b, v27.16b //AES block 4k+7 - round 9 - add w12, w12, #1 //CTR block 4k+10 - ext v10.16b, v10.16b, v10.16b, #8 //MODULO - other mid alignment - fmov d2, x10 //CTR block 4k+10 - - eor v11.16b, v11.16b, v9.16b //MODULO - fold into low - st1 { v5.16b}, [x2], #16 //AES block 4k+5 - store result - - fmov v2.d[1], x9 //CTR block 4k+10 - st1 { v6.16b}, [x2], #16 //AES block 4k+6 - store result - rev w9, w12 //CTR block 4k+11 - - orr x9, x11, x9, lsl #32 //CTR block 4k+11 - eor v7.16b, v7.16b, v3.16b //AES block 4k+3 - result - - eor v11.16b, v11.16b, v10.16b //MODULO - fold into low - st1 { v7.16b}, [x2], #16 //AES block 4k+3 - store result - b.lt .L128_enc_main_loop - -.L128_enc_prepretail: //PREPRETAIL - rev64 v4.16b, v4.16b //GHASH block 4k (only t0 is free) - fmov d3, x10 //CTR block 4k+3 - rev64 v5.16b, v5.16b //GHASH block 4k+1 (t0 and t1 free) - - ext v11.16b, v11.16b, v11.16b, #8 //PRE 0 - add w12, w12, #1 //CTR block 4k+3 - fmov v3.d[1], x9 //CTR block 4k+3 - - aese v1.16b, v18.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 0 - rev64 v6.16b, v6.16b //GHASH block 4k+2 (t0, t1, and t2 free) - - pmull v29.1q, v5.1d, v14.1d //GHASH block 4k+1 - low - - rev64 v7.16b, v7.16b //GHASH block 4k+3 (t0, t1, t2 and t3 free) - eor v4.16b, v4.16b, v11.16b //PRE 1 - - pmull2 v28.1q, v5.2d, v14.2d //GHASH block 4k+1 - high - - aese v3.16b, v18.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 0 - mov d30, v5.d[1] //GHASH block 4k+1 - mid - - pmull v11.1q, v4.1d, v15.1d //GHASH block 4k - low - mov d8, v4.d[1] //GHASH block 4k - mid - - mov d31, v6.d[1] //GHASH block 4k+2 - mid - mov d10, v17.d[1] //GHASH block 4k - mid - - aese v1.16b, v19.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 1 - eor v30.8b, v30.8b, v5.8b //GHASH block 4k+1 - mid - - eor v8.8b, v8.8b, v4.8b //GHASH block 4k - mid - - pmull2 v9.1q, v4.2d, v15.2d //GHASH block 4k - high - eor v31.8b, v31.8b, v6.8b //GHASH block 4k+2 - mid - - aese v3.16b, v19.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 1 - - pmull v30.1q, v30.1d, v17.1d //GHASH block 4k+1 - mid - eor v11.16b, v11.16b, v29.16b //GHASH block 4k+1 - low - - pmull v10.1q, v8.1d, v10.1d //GHASH block 4k - mid - - aese v0.16b, v18.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 0 - ins v31.d[1], v31.d[0] //GHASH block 4k+2 - mid - - aese v2.16b, v18.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 0 - - eor v10.16b, v10.16b, v30.16b //GHASH block 4k+1 - mid - mov d30, v7.d[1] //GHASH block 4k+3 - mid - - aese v0.16b, v19.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 1 - eor v9.16b, v9.16b, v28.16b //GHASH block 4k+1 - high - - pmull2 v31.1q, v31.2d, v16.2d //GHASH block 4k+2 - mid - - pmull2 v8.1q, v6.2d, v13.2d //GHASH block 4k+2 - high - eor v30.8b, v30.8b, v7.8b //GHASH block 4k+3 - mid - - pmull2 v4.1q, v7.2d, v12.2d //GHASH block 4k+3 - high - - pmull v28.1q, v6.1d, v13.1d //GHASH block 4k+2 - low - - aese v2.16b, v19.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 1 - eor v9.16b, v9.16b, v8.16b //GHASH block 4k+2 - high - - aese v0.16b, v20.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 2 - - pmull v29.1q, v7.1d, v12.1d //GHASH block 4k+3 - low - movi v8.8b, #0xc2 - - aese v2.16b, v20.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 2 - eor v11.16b, v11.16b, v28.16b //GHASH block 4k+2 - low - - aese v3.16b, v20.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 2 - - pmull v30.1q, v30.1d, v16.1d //GHASH block 4k+3 - mid - eor v10.16b, v10.16b, v31.16b //GHASH block 4k+2 - mid - - aese v2.16b, v21.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 3 - - aese v1.16b, v20.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 2 - eor v9.16b, v9.16b, v4.16b //GHASH block 4k+3 - high - - aese v0.16b, v21.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 3 - - eor v10.16b, v10.16b, v30.16b //GHASH block 4k+3 - mid - shl d8, d8, #56 //mod_constant - - aese v1.16b, v21.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 3 - eor v11.16b, v11.16b, v29.16b //GHASH block 4k+3 - low - - aese v0.16b, v22.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 4 - - pmull v28.1q, v9.1d, v8.1d - eor v10.16b, v10.16b, v9.16b //karatsuba tidy up - - aese v1.16b, v22.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 4 - - aese v0.16b, v23.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 5 - ext v9.16b, v9.16b, v9.16b, #8 - - aese v3.16b, v21.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 3 - - aese v2.16b, v22.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 4 - eor v10.16b, v10.16b, v11.16b - - aese v0.16b, v24.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 6 - - aese v3.16b, v22.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 4 - - aese v1.16b, v23.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 5 - - aese v2.16b, v23.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 5 - eor v10.16b, v10.16b, v28.16b - - aese v3.16b, v23.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 5 - - aese v1.16b, v24.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 6 - - aese v2.16b, v24.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 6 - - aese v3.16b, v24.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 6 - eor v10.16b, v10.16b, v9.16b - - aese v0.16b, v25.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 7 - - aese v2.16b, v25.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 7 - - aese v3.16b, v25.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 7 - - pmull v28.1q, v10.1d, v8.1d - - aese v1.16b, v25.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 7 - ext v10.16b, v10.16b, v10.16b, #8 - - aese v3.16b, v26.16b - aesmc v3.16b, v3.16b //AES block 4k+7 - round 8 - - aese v0.16b, v26.16b - aesmc v0.16b, v0.16b //AES block 4k+4 - round 8 - eor v11.16b, v11.16b, v28.16b - - aese v1.16b, v26.16b - aesmc v1.16b, v1.16b //AES block 4k+5 - round 8 - - aese v3.16b, v27.16b //AES block 4k+7 - round 9 - - aese v2.16b, v26.16b - aesmc v2.16b, v2.16b //AES block 4k+6 - round 8 - - aese v0.16b, v27.16b //AES block 4k+4 - round 9 - - aese v1.16b, v27.16b //AES block 4k+5 - round 9 - eor v11.16b, v11.16b, v10.16b - - aese v2.16b, v27.16b //AES block 4k+6 - round 9 -.L128_enc_tail: //TAIL - - sub x5, x4, x0 //main_end_input_ptr is number of bytes left to process - ldp x6, x7, [x0], #16 //AES block 4k+4 - load plaintext -#ifdef __AARCH64EB__ - rev x6, x6 - rev x7, x7 -#endif - cmp x5, #48 - - ext v8.16b, v11.16b, v11.16b, #8 //prepare final partial tag - eor x6, x6, x13 //AES block 4k+4 - round 10 low - eor x7, x7, x14 //AES block 4k+4 - round 10 high - - fmov d4, x6 //AES block 4k+4 - mov low - - fmov v4.d[1], x7 //AES block 4k+4 - mov high - - eor v5.16b, v4.16b, v0.16b //AES block 4k+4 - result - - b.gt .L128_enc_blocks_more_than_3 - - sub w12, w12, #1 - movi v11.8b, #0 - mov v3.16b, v2.16b - - cmp x5, #32 - mov v2.16b, v1.16b - movi v9.8b, #0 - - movi v10.8b, #0 - b.gt .L128_enc_blocks_more_than_2 - - mov v3.16b, v1.16b - cmp x5, #16 - - sub w12, w12, #1 - b.gt .L128_enc_blocks_more_than_1 - - sub w12, w12, #1 - b .L128_enc_blocks_less_than_1 -.L128_enc_blocks_more_than_3: //blocks left > 3 - st1 { v5.16b}, [x2], #16 //AES final-3 block - store result - - ldp x6, x7, [x0], #16 //AES final-2 block - load input low & high -#ifdef __AARCH64EB__ - rev x6, x6 - rev x7, x7 -#endif - rev64 v4.16b, v5.16b //GHASH final-3 block *** 310630 LINES SKIPPED *** From nobody Wed Aug 30 09:14:36 2023 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 4RbJXD6TNMz4rvTZ; Wed, 30 Aug 2023 09:14:36 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RbJXD5wfWz3Q6F; Wed, 30 Aug 2023 09:14:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693386876; 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=iJ77BKZIdTlnPdaVQ2vhsMZ+zR37Dka6CVl3fn1wE4I=; b=Pw46f9d920aShoCN8lVCmJHZWgQhs7y+fDhiRHfYM4uQk09rn7R8HiCugz/h75MSCUagrz TQkV7NbC5ZpE3iHi7NUl4aIo87myeqU66P2UnCQOYp1KCq/1V0lwiDJVYrkEhC005PblBC eVtcaqhgx/XBpLqiVVMTRadZGAC0wPp2tecJbzdeiyyD9w7J+Eu1PcQsQmUiJmQdOcf35g l1M7afAINeArhyChX930GwLWJ+tku+xl0NOQ21/3mGPpeY0aRv73oJr2wmXy26/VyRMMWf SMeBXvGDJAYw/YHYNkwdC1bGdA8pvdx/+yE10NxRW2J3mJ+zbO4vqPESBlSo0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693386876; a=rsa-sha256; cv=none; b=mOXyTYdIN8wNA2/YPwE3dxXaEPvDfn/+jE3VsmoQz4hLYUENTDiqDXqOdZePf0p1lz24xB jAwxiJtIb5ssca5Dx9JZ9GhywKcT7AfafMacfAEguhD4rjvoX75Zl8KIEfTqZakW7wo9yE oc2YCUq0xIzKSex4SCmmH9VeJlxRmiK+ueGOLRbWalsYm1niOQjB+CcMzL8X8o5qUTrbwK 20QIGPFeNRGskG+nBUowRBSv/bEsVsS+BDc/2DRgkhJANq4oqbgKn+UbbjvpWczzqwieRu KY3xejxVcN8GFF9rSELOfstmG9T8HIingYsnQh+HneB+zN9jb0j9vQkxu/vd2A== 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=1693386876; 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=iJ77BKZIdTlnPdaVQ2vhsMZ+zR37Dka6CVl3fn1wE4I=; b=Y1r0krnLBbdzu9/BJo4VvbCMo9uH2cs/AK44kFau9SI1G1prRBGJfNgcU5fcChGrC3J5v0 oKfN2G/0Dy2k7ayBu12b5lsZ/IxDUO/BRysFAqzNF4ONf4tE4wmgULrhTao8AkkFyIGeU9 osytCthueqt9U4VahNmy8HxVqJB2oXTkqgKzSeaZGEvKHQI+rO3rLV8RrCceqD+f+qeXZy KNCAS5GibjO4Pa8qGiQj6/57cU76ImtjkqgyumJaQe5DSrTIluSOB9CiY+Ei9qn29It9C0 dWQuZZ39nvXqQi/oo3Jw/acRpLFWNI/h+uUZcHMsOTzQcAt2+woisXr5yW6ryQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RbJXD4g3vzDD9; Wed, 30 Aug 2023 09:14:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37U9Earu031563; Wed, 30 Aug 2023 09:14:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37U9Ea7E031560; Wed, 30 Aug 2023 09:14:36 GMT (envelope-from git) Date: Wed, 30 Aug 2023 09:14:36 GMT Message-Id: <202308300914.37U9Ea7E031560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: b94ec00ba73e - main - igmp: do not upgrade IGMP version beyond net.inet.igmp.default_version 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b94ec00ba73ef4769f62555bfcb840919143e198 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b94ec00ba73ef4769f62555bfcb840919143e198 commit b94ec00ba73ef4769f62555bfcb840919143e198 Author: Kristof Provost AuthorDate: 2023-08-29 09:23:49 +0000 Commit: Kristof Provost CommitDate: 2023-08-30 07:22:05 +0000 igmp: do not upgrade IGMP version beyond net.inet.igmp.default_version IGMP requires hosts to use the lowest version they've seen on the network. When the IGMP timers expire we take the opportunity to upgrade again. However, we did not take the net.inet.igmp.default_version sysctl setting into account, so we could end up switching to IGMPv3 even if the user had requested IGMPv2 or IGMPv1 via the sysctl. Check V_igmp_default_version before we upgrade the IGMP version. Reviewed by: adrian Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D41628 --- sys/netinet/igmp.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index c3dd0302fb39..9ae6d33564f2 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -2124,7 +2124,8 @@ igmp_v1v2_process_querier_timers(struct igmp_ifsoftc *igi) * * Revert to IGMPv3. */ - if (igi->igi_version != IGMP_VERSION_3) { + if (V_igmp_default_version == IGMP_VERSION_3 && + igi->igi_version != IGMP_VERSION_3) { CTR5(KTR_IGMPV3, "%s: transition from v%d -> v%d on %p(%s)", __func__, igi->igi_version, IGMP_VERSION_3, @@ -2139,7 +2140,8 @@ igmp_v1v2_process_querier_timers(struct igmp_ifsoftc *igi) * revert to IGMPv3. * If IGMPv2 is enabled, revert to IGMPv2. */ - if (!V_igmp_v2enable) { + if (V_igmp_default_version == IGMP_VERSION_3 && + !V_igmp_v2enable) { CTR5(KTR_IGMPV3, "%s: transition from v%d -> v%d on %p(%s)", __func__, igi->igi_version, IGMP_VERSION_3, @@ -2148,7 +2150,8 @@ igmp_v1v2_process_querier_timers(struct igmp_ifsoftc *igi) igi->igi_version = IGMP_VERSION_3; } else { --igi->igi_v2_timer; - if (igi->igi_version != IGMP_VERSION_2) { + if (V_igmp_default_version == IGMP_VERSION_2 && + igi->igi_version != IGMP_VERSION_2) { CTR5(KTR_IGMPV3, "%s: transition from v%d -> v%d on %p(%s)", __func__, igi->igi_version, IGMP_VERSION_2, @@ -2166,7 +2169,8 @@ igmp_v1v2_process_querier_timers(struct igmp_ifsoftc *igi) * revert to IGMPv3. * If IGMPv1 is enabled, reset IGMPv2 timer if running. */ - if (!V_igmp_v1enable) { + if (V_igmp_default_version == IGMP_VERSION_3 && + !V_igmp_v1enable) { CTR5(KTR_IGMPV3, "%s: transition from v%d -> v%d on %p(%s)", __func__, igi->igi_version, IGMP_VERSION_3, From nobody Wed Aug 30 09:38:51 2023 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 4RbK4C3Gmfz4rwdW; Wed, 30 Aug 2023 09:38:51 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RbK4C2pR7z3Tb0; Wed, 30 Aug 2023 09:38:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693388331; 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=uUIs/m5eyqs8dQy/QyASyF+4f/yfYPayvYXqtDSXqlo=; b=VJuC+7je56nhaw8+OBk7k74GkU1vQZnFQAVwgjM5Xe2QOUOphQ2e6SLt8xVdktWZqPhqME 1r1NERe9cVyVqclQ3WnR2NNY561QToeaugzs5AsfmGl+wi+SNI5rD48cZsPbcriKqEeVwR mXzyNbSb6R+NHebRl2Il6Vm6TYHIV5nLtL3QyhDo7+ef8HAqwuVTHdbf2g6i5qpvkFsfAf oB0VDCLX9xtxzKxG3Lyl+JJebuJnM/T3JbX6Tj8Hzsi7P3UUf+Ra0o2gR5Wj2K+si+0S4b qSOiKAD8xXPR55H7n6BihOsX7q+AcWrQpq3MglMf1SvHIV+lxJ9Gd7pF214ung== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693388331; a=rsa-sha256; cv=none; b=V9Om5h+/ik6psI6LdZa3JqFuYZiZzROy9WAeL4j70bW5z8XYvcfANK/3ZtZ0PYMk1g7ANh oG8n/1YIn6pu1AOZQo0cEimqWpuKjYIAgrNXAUX1B6UNvkP2Q045aNz4aa8kqEzaDmUZ3L PhPJcE48lfBOW8Pb9cZvu1ud+SKZP/10EmF5eeTOZWErfLjcPnEV6ckoSCI3hj81pTo3be /FdKpfpCMMQZtFUctaJ3GqcRZOhIUgtWXsuZSvi89rYBMzkXrVgx5YN64i0m7iKWV3krpW iqX5q7pOZzcudD7YJ1cMRrpYQK9BWoEsJbOtwqKfJVZ/kq1Sm9xtI+NpKm+ihg== 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=1693388331; 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=uUIs/m5eyqs8dQy/QyASyF+4f/yfYPayvYXqtDSXqlo=; b=K0sHUI3HYlwE0hqODI8oKaLdXBbzpoePdqaYpxC2HEqpyavfoRUJ7rwiNehD2t39cN903W YiYxJAlc6xaxDe/iwAWRRqG6jYNxdvxV8+Br1ovhY+C/yUKy9/edk9SIFAFz0l7sG2VWoa mrYR8DFjGMUiMBWYlxJioaQ1XHjqSbjnTIc0l+pFSkYrgrTcT2V7XR6ftSYejtEQfUx0Ja JkCSabHl6H7r9P9y6G92nwPhlN1N7QYpbQn3sSY63Krno9Tx54k2EzsJiLTE823QhmruiT UdKR1lAQnbJb+uX+KY8IlKHojfliDjftB75oUzA05gd1rQYQTyiiMTm4EcDxJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RbK4C1vXmzTVd; Wed, 30 Aug 2023 09:38:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37U9cpQ4065422; Wed, 30 Aug 2023 09:38:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37U9cpuv065419; Wed, 30 Aug 2023 09:38:51 GMT (envelope-from git) Date: Wed, 30 Aug 2023 09:38:51 GMT Message-Id: <202308300938.37U9cpuv065419@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: b22aae410bc7 - main - net: Remove vlan metadata on pcp / vlan encapsulation 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b22aae410bc7e4e9a6b43e556dc34be72deadb65 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=b22aae410bc7e4e9a6b43e556dc34be72deadb65 commit b22aae410bc7e4e9a6b43e556dc34be72deadb65 Author: Zhenlei Huang AuthorDate: 2023-08-30 09:36:38 +0000 Commit: Zhenlei Huang CommitDate: 2023-08-30 09:36:38 +0000 net: Remove vlan metadata on pcp / vlan encapsulation For oubound traffic, the flag M_VLANTAG is set in mbuf packet header to indicate the underlaying interface do hardware VLAN tag insertion if capable, otherwise the net stack will do 802.1Q encapsulation instead. Commit 868aabb4708d introduced per-flow priority which set the priority ID in the mbuf packet header. There's a corner case that when the driver is disabled to do hardware VLAN tag insertion, and the net stack do 802.1Q encapsulation, then it will result double tagged packets if the driver do not check the enabled capability (hardware VLAN tag insertion). Unfortunately some drivers, currently known cxgbe(4) re(4) ure(4) igc(4) and vmx(4), have this issue. From a quick review for other interface drivers I believe a lot more drivers have the same issue. It makes more sense to fix in net stack than to try to change every single driver. PR: 270736 Reviewed by: kp Fixes: 868aabb4708d Add IP(V6)_VLAN_PCP to set 802.1 priority per-flow MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39499 --- sys/net/if_ethersubr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 63ea5e7591c2..ab274eeb88bf 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -446,9 +446,11 @@ ether_set_pcp(struct mbuf **mp, struct ifnet *ifp, uint8_t pcp) struct ether_header *eh; eh = mtod(*mp, struct ether_header *); - if (ntohs(eh->ether_type) == ETHERTYPE_VLAN || - ntohs(eh->ether_type) == ETHERTYPE_QINQ) + if (eh->ether_type == htons(ETHERTYPE_VLAN) || + eh->ether_type == htons(ETHERTYPE_QINQ)) { + (*mp)->m_flags &= ~M_VLANTAG; return (true); + } qtag.vid = 0; qtag.pcp = pcp; @@ -1463,6 +1465,7 @@ ether_8021q_frame(struct mbuf **mp, struct ifnet *ife, struct ifnet *p, if_printf(ife, "unable to prepend 802.1Q header"); return (false); } + (*mp)->m_flags &= ~M_VLANTAG; } return (true); } From nobody Wed Aug 30 14:47:25 2023 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 4RbRwF5fmdz4sBJB; Wed, 30 Aug 2023 14:47:25 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RbRwF53BRz3CdX; Wed, 30 Aug 2023 14:47:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693406845; 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=t0EypbWC1UspOX1xwmkrohLTzfo+s62nBSfWIW89498=; b=E9UDSh72CObM7ikXGtb9GG7OaC6/O4q4LDSNIrhAnrZWmlQ8/N495uZS58ioynYmagPENq LnoCP25cQVUKPUSiRsqUuYbyrSV/iNdXCv84Fz8Le3Kqfi6h9qW3yfhDCm2rF45GYj6mni ItW2eARAT+KQvatoKKkRZRTyddjNAJgW8z2gNmNZEmo/sCZ6XNHQzUqnTP6pyRAUyp6Hd/ eIpZT6qs94Oj5aM4ZhtNtdO00LroaeC9onD2ACQS2eE4aVA9L45CVF+5LQq6urGC53yxJQ QOEy+Bk01O+hnCgp9BeDhkHVAPqIO6D2qfKzf59k63Zzxm8aAYo4TFMWRlQzTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693406845; a=rsa-sha256; cv=none; b=brM2elHhcY1vib6lu+UBngl6/q3t5kjlJE/N8Bb3ITVRZvsb3KCOL/jRoasXc79arNW8xg 1D39qSicHwAwQ8q3rnY2L5mm1mfpD5uy0jzIcsUitoN3bmicyKnfWmefxQHuULOu/No6IJ d/AnvTYoTDPWu5zQ4qDeEMVUmnPNoq3ukwjv6BXPT5Z4KA/rwlkuVtWsJvDf/TdZutgZ3a 4WEf+lfy+hJAi1LrqmJMrVRZh/l9XY2IHa3obZEdyrCDqAQgSvBtSfQadXbcOWyVre/b3p oOmSN3lJthxrqo0JKaQGOi3w1Cr3vvYwr4HPYntYimYf1pduYhDRjbz6Xzrxlg== 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=1693406845; 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=t0EypbWC1UspOX1xwmkrohLTzfo+s62nBSfWIW89498=; b=nLXWxFS0pED4yvMmtuGjyI/g9cWUtT1OWG759CnrkYkM5ZFFuNKFfG1AIpk0prhBagXUWs KzmKw2osSe04gLPqD0O8HlGUtyTvGHNCexiiYxMQTelWlCVUk7Y1LO7ZUY6hDpPFjq4nJm 8NK0f8mYaWnIu3goNfjEIf/aPELV5T4MOezrYxKIV2uNiK5waVBSngagjZGrPgMYqU+j7V Cj3mYm6W5sCH1hS3x6OzhuRRLWjC+cikq53fhHvsC9BBU3zIl1Vg5hw967ViMixJWSSFDs xIaDceKj0Q+lBbt8qR5UtF7p3bHN6ujqPtoVRMfSZz0pAYOCbmbRi5bO+408Ww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RbRwF41z5zdj9; Wed, 30 Aug 2023 14:47:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37UElPeD077530; Wed, 30 Aug 2023 14:47:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37UElPje077527; Wed, 30 Aug 2023 14:47:25 GMT (envelope-from git) Date: Wed, 30 Aug 2023 14:47:25 GMT Message-Id: <202308301447.37UElPje077527@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 61fe0b8e94a7 - main - Add sys.dirdeps.mk to share/mk FILES 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61fe0b8e94a75bced6d68e44ed3c3971132b66e1 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=61fe0b8e94a75bced6d68e44ed3c3971132b66e1 commit 61fe0b8e94a75bced6d68e44ed3c3971132b66e1 Author: Simon J. Gerraty AuthorDate: 2023-08-30 14:46:08 +0000 Commit: Simon J. Gerraty CommitDate: 2023-08-30 14:46:08 +0000 Add sys.dirdeps.mk to share/mk FILES A few recent makefiles should have been added to FILES. Rename sys.machine.mk to local.sys.machine.mk as it is very tree specific so does not belong in /usr/share/mk/ Reviewed by: stevek Differential Revision: https://reviews.freebsd.org/D41642 --- share/mk/Makefile | 4 ++++ share/mk/local.sys.env.mk | 2 +- share/mk/{sys.machine.mk => local.sys.machine.mk} | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/share/mk/Makefile b/share/mk/Makefile index 1663b787c662..2597ac5b2072 100644 --- a/share/mk/Makefile +++ b/share/mk/Makefile @@ -60,8 +60,11 @@ FILES= \ bsd.test.mk \ dirdeps.mk \ dirdeps-options.mk \ + dirdeps-targets.mk \ gendirdeps.mk \ + host-target.mk \ install-new.mk \ + jobs.mk \ meta.autodep.mk \ meta.stage.mk \ meta.subdir.mk \ @@ -70,6 +73,7 @@ FILES= \ stage-install.sh \ sys.mk \ sys.dependfile.mk \ + sys.dirdeps.mk \ version_gen.awk FILESDIR= ${BINDIR}/mk diff --git a/share/mk/local.sys.env.mk b/share/mk/local.sys.env.mk index c87a4b7dcf71..71a46f122bf4 100644 --- a/share/mk/local.sys.env.mk +++ b/share/mk/local.sys.env.mk @@ -56,4 +56,4 @@ ECHO_TRACE?= true .export HOST_TARGET .endif -.include +.include diff --git a/share/mk/sys.machine.mk b/share/mk/local.sys.machine.mk similarity index 94% rename from share/mk/sys.machine.mk rename to share/mk/local.sys.machine.mk index 716dd17d5cce..fc801a7cd11c 100644 --- a/share/mk/sys.machine.mk +++ b/share/mk/local.sys.machine.mk @@ -1,5 +1,5 @@ -.-include +.-include PSEUDO_MACHINE_LIST?= common host TARGET_MACHINE_LIST?= amd64 arm arm64 i386 powerpc riscv From nobody Wed Aug 30 19:44:43 2023 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 4RbZWJ0fwJz4sQdN; Wed, 30 Aug 2023 19:44:44 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RbZWH6f4mz4Hts; Wed, 30 Aug 2023 19:44:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693424683; 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=CpCsvTll0inANBiOcGPxaU4X6mrNLs0itts6Mvkoqe8=; b=pgv+rH9rrZhQbLuxlC3Ef5Gx7G8V1Ei8dEioeZ0C/5dSs1xawcL/B0Hw68C5Z8JjheB8wk 779HlDGT6wb6JsAlp2Nf9wIaHlPQJ4SNRz0eXF79cM0B+kjfNcLdItJRZV14oCgbI3/K5I BQ5JSeDRSLXHSrMBskLYZSeQksMC6r5uMJRuR6GbqvpRcRjrOjclfdRTdi0awypUFHD9dm vT6srvb6sDNLkYZQImRKgQ1Ar5J6WkE76TgEusXYz4q6urc1nPa3YcaD5M876SsLLWeiaL w8SJrf3cR5P99kUv5uybWockPS6z4SrhhqjFGOh9h1LQRfUqfCq44aDwRYQl0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693424683; a=rsa-sha256; cv=none; b=sz9FZoaX4+5TqkSl4WlV4nrbsxCXWgXnETb4U1UIL6bjaIVl8hqdqlFIXWbNl84oWDuKhp hnHZGFDUb+xoyl4C6s9M5YzP6fmYvF4jv7H2w59ahWfBnLKj+qEHpfG/QFKABtm2aV6KRr uybi4QPtTuPJncqCa9fXACHeZ/ACARNKMKFBkYSE+8LLpToNImTExLnAyj2pMKo17k0MVH qsV9Aw96uqZn4pYRm9Tua5Akgf7qlgKrKzBSEOBdorRTu3G67JnR1SUpBbFwZCs+4h5CxR VsUHjPmJqY0jvu+MnN2R/YPUYQoiev6NO+p9A3859SL83MgBhDLfykPriGeg6A== 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=1693424683; 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=CpCsvTll0inANBiOcGPxaU4X6mrNLs0itts6Mvkoqe8=; b=q/+jMFQLWN7ifCn8IveOIDpemU2HhV/PHu2BDQggbcy5ExPsvUdf/pRSoo6CgTWDaFFdzi huLfreB+9tBmpWWrpBDwd639/gXCfJjtCKjfz58pvPiJV5PFrKpadMkpNxyaQeEKgK4alR SKdlRoY8HYgCNIaNMoLFG1sZoQmGH/b6Q27IU7y2QDTlkPxjfUvPWZxmrc3M0osCfsLOxf 8lkNLeiuHsqD4SmybvVUWg+pJFaky7J8k8cC743B1Pn6dvboosoae9CtBIcRAXY6VqAb6H uUyZililF5MjuBJ68uxEG3YvaG/7AWUr9/jchfSrCZIJfltC5bl4nmugBxRMuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RbZWH5b3Szmbr; Wed, 30 Aug 2023 19:44:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37UJihAM075097; Wed, 30 Aug 2023 19:44:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37UJih8l075094; Wed, 30 Aug 2023 19:44:43 GMT (envelope-from git) Date: Wed, 30 Aug 2023 19:44:43 GMT Message-Id: <202308301944.37UJih8l075094@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric Joyner Subject: git: e04c4b4a369d - main - ice_ddp: Update to 1.3.35.0 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e04c4b4a369df3f1dcbebbdf726193f02af60801 Auto-Submitted: auto-generated The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=e04c4b4a369df3f1dcbebbdf726193f02af60801 commit e04c4b4a369df3f1dcbebbdf726193f02af60801 Author: Eric Joyner AuthorDate: 2023-08-22 04:55:34 +0000 Commit: Eric Joyner CommitDate: 2023-08-30 19:43:54 +0000 ice_ddp: Update to 1.3.35.0 This is intended to be used with the upcoming updated ice(4) version 1.38.16-k. Signed-off-by: Eric Joyner MFC after: 3 days Sponsored by: Intel Corporation --- sys/conf/files.amd64 | 6 +++--- sys/conf/files.arm64 | 6 +++--- sys/conf/files.powerpc | 6 +++--- sys/contrib/dev/ice/LICENSE | 2 +- .../dev/ice/{ice-1.3.30.0.pkg => ice-1.3.35.0.pkg} | Bin 692660 -> 692776 bytes sys/modules/ice_ddp/Makefile | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index e1499b19bb12..dfbe278f0c46 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -194,7 +194,7 @@ dev/ice/irdma_di_if.m optional ice pci \ dev/ice/ice_ddp_common.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032300 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ @@ -203,8 +203,8 @@ ice_ddp.fwo optional ice_ddp \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp \ - dependency "$S/contrib/dev/ice/ice-1.3.30.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.30.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.35.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.35.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" dev/ioat/ioat.c optional ioat pci diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 7b033c979c55..02dcadc0aa5c 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -322,7 +322,7 @@ dev/ice/irdma_di_if.m optional ice pci \ dev/ice/ice_ddp_common.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032300 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ @@ -331,8 +331,8 @@ ice_ddp.fwo optional ice_ddp \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp \ - dependency "$S/contrib/dev/ice/ice-1.3.30.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.30.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.35.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.35.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index aad29d050b68..48251ab07d9e 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -95,7 +95,7 @@ dev/ice/irdma_di_if.m optional ice pci powerpc64 | ice pci powerpc64le \ dev/ice/ice_ddp_common.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp powerpc64 | ice pci powerpc64le \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031e00 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032300 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp powerpc64 | ice pci powerpc64le \ @@ -104,8 +104,8 @@ ice_ddp.fwo optional ice_ddp powerpc64 | ice pci powerpc64le \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp powerpc64 | ice pci powerpc64le \ - dependency "$S/contrib/dev/ice/ice-1.3.30.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.30.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.35.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.35.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" dev/ixl/if_ixl.c optional ixl pci powerpc64 \ diff --git a/sys/contrib/dev/ice/LICENSE b/sys/contrib/dev/ice/LICENSE index 7faadfc55aac..97fe53c2d998 100644 --- a/sys/contrib/dev/ice/LICENSE +++ b/sys/contrib/dev/ice/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2006-2021, Intel Corporation. +Copyright (c) 2006-2023, Intel Corporation. All rights reserved. Redistribution. Redistribution and use in binary form, without diff --git a/sys/contrib/dev/ice/ice-1.3.30.0.pkg b/sys/contrib/dev/ice/ice-1.3.35.0.pkg similarity index 88% rename from sys/contrib/dev/ice/ice-1.3.30.0.pkg rename to sys/contrib/dev/ice/ice-1.3.35.0.pkg index 454a2a6ea193..fc3e8ebc640f 100644 Binary files a/sys/contrib/dev/ice/ice-1.3.30.0.pkg and b/sys/contrib/dev/ice/ice-1.3.35.0.pkg differ diff --git a/sys/modules/ice_ddp/Makefile b/sys/modules/ice_ddp/Makefile index 41ed4ac92888..ad85bc2a9935 100644 --- a/sys/modules/ice_ddp/Makefile +++ b/sys/modules/ice_ddp/Makefile @@ -1,5 +1,5 @@ KMOD= ice_ddp -FIRMWS= ${SRCTOP}/sys/contrib/dev/ice/ice-1.3.30.0.pkg:ice_ddp:0x01031e00 +FIRMWS= ${SRCTOP}/sys/contrib/dev/ice/ice-1.3.35.0.pkg:ice_ddp:0x01032300 .include From nobody Wed Aug 30 19:53:20 2023 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 4RbZjJ3MgRz4sR51; Wed, 30 Aug 2023 19:53:24 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RbZjJ2rP2z4KRx; Wed, 30 Aug 2023 19:53:24 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693425204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xzTw7cXO1D7CZGH72GjHy1bdmyJPfrCJ27BXoEWD/ds=; b=gqNoeiS/DsK0S9ya4bsZsbwlz0l7G+34jSGXfEbzf7C1H8+F4yneq8uSN6GgIECWIezbqi 0PwN5pFTBSljgo5qD9Wj1wGVuvGKgvmtAuIViMPE3oslN8OP/d2fSJ7jXMcXZpageDHtCX HOzEYJjrHmXXXtdk6CGrEKhLjMHh8KTQBKcOayO9EIhxdVHW2g9BTCh3jf3e4VdZXWSJ4O hBeF2iAdX9Ohsj3P6zs4yE/3xzcy0WIrTvFO/oULfRZ9SO4LvXuHoMDWniwXgT7SumptYQ WJGYr1q6/uUXOZvfS1xEE1+s0L6OQ9FnDMwFfy91HVqmMg6Hoa8hc3/zOBxNNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693425204; a=rsa-sha256; cv=none; b=ypLlXVApc3j1KoBnC6b6h40EPFXeAW0GxgvCI8l+RrXHj5u02w+6uFZWT65bM2yZwz8ZV6 y9sxBJP/wR7P6IkRaPG4KJpodOukEscwU0NlDjk4hutnp6XS+uoCRbAqc10C/K7C6cSRfO 1jSbhVN00zHIt5aXLjnvJkmusFfj0fEsDAL+n59V/9IXzL6MqAd569JAJRPnDTbkdoIz0y PaDT8YTEoj2AR2bXl15MRwuDmlXv+Rez0HOXW824KY8x6MNsNa8eLUT1vd7d7qWEWTDYuK fMqLCuvU1zcsXGOTQnRxX+LFXdZnCr5FPECZ1Y5oapmvnDFbWx3AWZ+fXEsNTw== 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=1693425204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xzTw7cXO1D7CZGH72GjHy1bdmyJPfrCJ27BXoEWD/ds=; b=vhBZ0qatccK4Q/wPzUn/JKD/HL4XaKmGTTJ7SRWyOu6kJld3NRP2bmhC0R3WqKh4KuHDl8 qglzXDbLnFwc7tXrkyCRi5SGjBtathXTG0MdujIcik0TQofAvugIyeG61++jOSP4v8LkjT g2dwERXdbAn2TMwGq9Os0zYR6d31JtAEjnGeuU9APx9Q8qXh3d1DB9gHzkB/Z41mIOVAu5 83Abh0Pg8FuLddlsr65uzjcdldI/Mu6fYeFKVObjqJYVKwDZ+qEA1xqu7SYmirv/R8G2h1 3+AueEkkrfuId9v7fYlX5kfp1XLDfg3PrZ2afYUSi5PyyrDKshlcdNDov+XnoQ== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (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 (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RbZjJ1GMBz8Pg; Wed, 30 Aug 2023 19:53:24 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 7849E140A1; Wed, 30 Aug 2023 21:53:21 +0200 (CEST) From: Kristof Provost To: Kevin Bowling Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org, mmendoza@netgate.com Subject: Re: git: b6b75424c57d - main - vmxnet3: Don't restart on VLAN changes Date: Wed, 30 Aug 2023 21:53:20 +0200 X-Mailer: MailMate (1.14r5937) Message-ID: <34CADCBB-B5E2-4E41-816E-4FAD36C474C3@FreeBSD.org> In-Reply-To: <202308242051.37OKpwUA039462@gitrepo.freebsd.org> References: <202308242051.37OKpwUA039462@gitrepo.freebsd.org> 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_AA43EB77-0E62-41E5-ACA6-C39CD04C4BF5_=" --=_MailMate_AA43EB77-0E62-41E5-ACA6-C39CD04C4BF5_= Content-Type: text/plain; format=flowed Content-Transfer-Encoding: quoted-printable On 24 Aug 2023, at 22:51, Kevin Bowling wrote: > The branch main has been updated by kbowling: > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3Db6b75424c57d6da49967fef39f690= 80ce6939207 > > commit b6b75424c57d6da49967fef39f69080ce6939207 > Author: Kevin Bowling > AuthorDate: 2023-08-24 20:25:21 +0000 > Commit: Kevin Bowling > CommitDate: 2023-08-24 20:46:56 +0000 > > vmxnet3: Don't restart on VLAN changes > > In rS360398, a new iflib device method was added with default of = > opt out > for VLAN events needing an interface reset. > > This re-init is unintentional for vmxnet3(4). > It looks like we do need to re-init vmx interfaces when vlans are set. = Marcos has an ESXi 7.0.3 setup that breaks with this patch series. This fixes it: diff --git a/sys/dev/vmware/vmxnet3/if_vmx.c = b/sys/dev/vmware/vmxnet3/if_vmx.c index 2c3530a217f..fdcad0dd4bb 100644 --- a/sys/dev/vmware/vmxnet3/if_vmx.c +++ b/sys/dev/vmware/vmxnet3/if_vmx.c @@ -2513,6 +2513,7 @@ vmxnet3_if_needs_restart(if_ctx_t ctx __unused, = enum iflib_restart_event event) { switch (event) { case IFLIB_RESTART_VLAN_CONFIG: + return (true); default: return (false); } Best regards, Kristof --=_MailMate_AA43EB77-0E62-41E5-ACA6-C39CD04C4BF5_= Content-Type: text/html Content-Transfer-Encoding: quoted-printable

On 24 Aug 2023, at 22:51, Kevin Bowling wrote:

The branch main has been updated by= kbowling:

URL: https://cgit.FreeBSD.org/src/co= mmit/?id=3Db6b75424c57d6da49967fef39f69080ce6939207

commit b6b75424c57d6da49967fef39f69080ce6939207
Author: Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2023-08-24 20:25:21 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2023-08-24 20:46:56 +0000

vmxnet3: Don't restart on VLAN changes

In rS360398, a new iflib device method was added with= default of opt out
for VLAN events needing an interface reset.

This re-init is unintentional for vmxnet3(4).


It looks like we do need to re-init vmx interfaces when v= lans are set. Marcos has an ESXi 7.0.3 setup that breaks with this patch = series.
This fixes it:

di=
ff --git a/sys/dev/vmware/vmxnet3/if_vmx.c b/sys/dev/vmware/vmxnet3/if_vm=
x.c
index 2c3530a217f..fdcad0dd4bb 100644
--- a/sys/dev/vmware/vmxnet3/if_vmx.c
+++ b/sys/dev/vmware/vmxnet3/if_vmx.c
@@ -2513,6 +2513,7 @@ vmxnet3_if_needs_restart(if_ctx_t ctx __unused, enu=
m iflib_restart_event event)
 {
        switch (event) {
        case IFLIB_RESTART_VLAN_CONFIG:
+               return (true);
        default:
                return (false);
        }

Best regards,
Kristof

--=_MailMate_AA43EB77-0E62-41E5-ACA6-C39CD04C4BF5_=-- From nobody Wed Aug 30 20:27:05 2023 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 4RbbSQ3vwtz4sS81 for ; Wed, 30 Aug 2023 20:27:18 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RbbSQ1vkBz4Pgr for ; Wed, 30 Aug 2023 20:27:18 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-68bedc0c268so77148b3a.0 for ; Wed, 30 Aug 2023 13:27:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; t=1693427237; x=1694032037; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=f3flemR6dvGwzgvc8EdaBS/r9dc7GhjIeCQiIuKVfnA=; b=eiIaaArIHsCmGpA1IPCE61A+hRScY2ZwyPCLSQX4p/DkNS4TRQ5Pcn98RvIihWJUXk smlXNq8/xgjwzMntSVQeekfE7Xvptc9s4++qJP8PxlqSGe2iVIKh6CoQqaoG+oUfzoiY DSvsh9cmxuXdgmrjmRrZNHUDLjLf2iA4TeyJU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693427237; x=1694032037; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f3flemR6dvGwzgvc8EdaBS/r9dc7GhjIeCQiIuKVfnA=; b=DFYtHvDXLCKBPJZnG2xDxai7r8zQEGe8iTBFcIVy9QWgCyrBh/V3lpN8KIU9O77Cov ZuT+V4r0GgOH7QdaW8uOaGnsPO9HDfI76NBGHWpX4UpyEzqAKWMMI2D64uvndsVVJzW+ KNjAgWwgv+CHo1xHnXyDfeM6/vIgSEcEf9Jp+jyFXhTh0nwbOeSwmNxPoUa03LlW37PL V7H0Q6GN+QIirRmFrUCvKMr+AI709V+LT7V0GLjnvZJNhXi9HLYEvqZPDPyV84A1R73T k98Iefd6n8M2k68BeXxgdbS791VfOaj6hOKpueufmaAHu1NaCsXR2Y8UpyIWouqth7sq xGpg== X-Gm-Message-State: AOJu0Yys7QlYanmF274rAuoHTuJFiSfaYkFLyGCMmu9HL/DPv6OAPdh+ OQTNn+7Rs8SF5GmTqp73PdwB8fSC1/aYF7m6BVkRkA== X-Google-Smtp-Source: AGHT+IGBKG7BU0EdWfJyq+TY4YAjjYRwGh+s7rWjUkvZMZrdxPpiq/LZgrJhdyR3MQhe/gzf3if9OdSWKlVHeKhmn4U= X-Received: by 2002:a05:6a21:7899:b0:12f:382d:2a37 with SMTP id bf25-20020a056a21789900b0012f382d2a37mr4359948pzc.15.1693427236715; Wed, 30 Aug 2023 13:27:16 -0700 (PDT) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202308242051.37OKpwUA039462@gitrepo.freebsd.org> <34CADCBB-B5E2-4E41-816E-4FAD36C474C3@FreeBSD.org> In-Reply-To: <34CADCBB-B5E2-4E41-816E-4FAD36C474C3@FreeBSD.org> From: Kevin Bowling Date: Wed, 30 Aug 2023 13:27:05 -0700 Message-ID: Subject: Re: git: b6b75424c57d - main - vmxnet3: Don't restart on VLAN changes To: Kristof Provost Cc: Kevin Bowling , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, mmendoza@netgate.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4RbbSQ1vkBz4Pgr On Wed, Aug 30, 2023 at 12:53=E2=80=AFPM Kristof Provost w= rote: > > On 24 Aug 2023, at 22:51, Kevin Bowling wrote: > > The branch main has been updated by kbowling: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Db6b75424c57d6da49967fef39f= 69080ce6939207 > > commit b6b75424c57d6da49967fef39f69080ce6939207 > Author: Kevin Bowling > AuthorDate: 2023-08-24 20:25:21 +0000 > Commit: Kevin Bowling > CommitDate: 2023-08-24 20:46:56 +0000 > > vmxnet3: Don't restart on VLAN changes > > In rS360398, a new iflib device method was added with default of opt out > for VLAN events needing an interface reset. > > This re-init is unintentional for vmxnet3(4). > > > It looks like we do need to re-init vmx interfaces when vlans are set. Ma= rcos has an ESXi 7.0.3 setup that breaks with this patch series. > This fixes it: Ok, feel free to push. > > diff --git a/sys/dev/vmware/vmxnet3/if_vmx.c b/sys/dev/vmware/vmxnet3/if_= vmx.c > index 2c3530a217f..fdcad0dd4bb 100644 > --- a/sys/dev/vmware/vmxnet3/if_vmx.c > +++ b/sys/dev/vmware/vmxnet3/if_vmx.c > @@ -2513,6 +2513,7 @@ vmxnet3_if_needs_restart(if_ctx_t ctx __unused, enu= m iflib_restart_event event) > { > switch (event) { > case IFLIB_RESTART_VLAN_CONFIG: > + return (true); > default: > return (false); > } > > Best regards, > Kristof From nobody Thu Aug 31 00:09:29 2023 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 4RbhNx19RWz4rQYn; Thu, 31 Aug 2023 00:09:37 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from glebi.us (glebi.us [162.251.186.162]) by mx1.freebsd.org (Postfix) with ESMTP id 4RbhNv6W86z4k84; Thu, 31 Aug 2023 00:09:35 +0000 (UTC) (envelope-from glebius@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 162.251.186.162 is neither permitted nor denied by domain of glebius@freebsd.org) smtp.mailfrom=glebius@freebsd.org; dmarc=none Received: by glebi.us (Postfix, from userid 1000) id 450991F48F; Wed, 30 Aug 2023 17:09:29 -0700 (PDT) Date: Wed, 30 Aug 2023 17:09:29 -0700 From: Gleb Smirnoff To: Martin Matuska Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad Message-ID: References: <202308270509.37R596B5048298@gitrepo.freebsd.org> 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202308270509.37R596B5048298@gitrepo.freebsd.org> X-Spamd-Bar: / X-Spamd-Result: default: False [0.75 / 15.00]; VIOLATED_DIRECT_SPF(3.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.85)[-0.850]; MIME_GOOD(-0.10)[text/plain]; RCVD_NO_TLS_LAST(0.10)[]; ONCE_RECEIVED(0.10)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; R_DKIM_NA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; R_SPF_SOFTFAIL(0.00)[~all]; DMARC_NA(0.00)[freebsd.org]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[glebius]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[] X-Rspamd-Queue-Id: 4RbhNv6W86z4k84 Hi Martin, we hit this panic with this update: panic: VERIFY(avl_is_empty(&lwb->lwb_vdev_tree)) failed cpuid = 8 time = 1693432004 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe09519aa800 vpanic() at vpanic+0x132/frame 0xfffffe09519aa930 spl_panic() at spl_panic+0x3a/frame 0xfffffe09519aa990 zil_free_lwb() at zil_free_lwb+0x1de/frame 0xfffffe09519aa9c0 zil_sync() at zil_sync+0x3cb/frame 0xfffffe09519aaaa0 [Wed Aug 30 21:46:44 2023]dmu_objset_sync() at dmu_objset_sync+0x51b/frame 0xfffffe09519aab70 dsl_pool_sync() at dsl_pool_sync+0x11d/frame 0xfffffe09519aabf0 spa_sync() at spa_sync+0xc68/frame 0xfffffe09519aae20 txg_sync_thread() at txg_sync_thread+0x2eb/frame 0xfffffe09519aaef0 fork_exit() at fork_exit+0x82/frame 0xfffffe09519aaf30 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe09519aaf30 --- trap 0x26d90a2f, rip = 0xbba54c81b25fd8d4, rsp = 0xff60c2f6f9874bcd, rbp = 0x37940e3e9793bd40 -- I have two cores dumped for this panic. Our previous version is based on 9c0a2d522f3a18fc795a7dd6266d2be2aff4b084, which I guess has the most recent ZFS merge openzfs/zfs@009d3288d. On Sun, Aug 27, 2023 at 05:09:06AM +0000, Martin Matuska wrote: M> The branch main has been updated by mm: M> M> URL: https://cgit.FreeBSD.org/src/commit/?id=315ee00fa9616b0a192b6834911f98bcf5316a6b M> M> commit 315ee00fa9616b0a192b6834911f98bcf5316a6b M> Merge: b3a714652ff0 804414aad224 M> Author: Martin Matuska M> AuthorDate: 2023-08-26 21:20:04 +0000 M> Commit: Martin Matuska M> CommitDate: 2023-08-26 21:51:42 +0000 M> M> zfs: merge openzfs/zfs@804414aad M> M> Notable upstream pull request merges: M> #15024 Add missed DMU_PROJECTUSED_OBJECT prefetch M> #15029 Do not request data L1 buffers on scan prefetch M> #15036 FreeBSD: catch up to __FreeBSD_version 1400093 M> #15039 Fix raw receive with different indirect block size M> #15047 FreeBSD: Fix build on stable/13 after 1302506 M> #15049 Fix the ZFS checksum error histograms with larger record sizes M> #15052 Reduce bloat in ereport.fs.zfs.checksum events M> #15056 Avoid extra snprintf() in dsl_deadlist_merge() M> #15061 Ignore pool ashift property during vdev attachment M> #15063 Don't panic if setting vdev properties is unsupported for this vdev type M> #15067 spa_min_alloc should be GCD, not min M> #15071 Add explicit prefetches to bpobj_iterate() M> #15072 Adjust prefetch parameters M> #15076 Refactor dmu_prefetch() M> #15079 set autotrim default to 'off' everywhere M> #15080 ZIL: Fix config lock deadlock M> #15088 metaslab: tuneable to better control force ganging M> #15096 Avoid waiting in dmu_sync_late_arrival() M> #15097 BRT should return EOPNOTSUPP M> #15103 Remove zl_issuer_lock from zil_suspend() M> #15107 Remove fastwrite mechanism M> #15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1 M> #15122 ZIL: Second attempt to reduce scope of zl_issuer_lock M> #15129 zpool_vdev_remove() should handle EALREADY error return M> #15132 ZIL: Replay blocks without next block pointer M> #15148 zfs_clone_range should return descriptive error codes M> #15153 ZIL: Avoid dbuf_read() before dmu_sync() M> #15172 copy_file_range: fix fallback when source create on same txg M> #15180 Update outdated assertion from zio_write_compress M> M> Obtained from: OpenZFS M> OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13 M> M> Makefile.inc1 | 5 +- M> cddl/lib/libzfs/Makefile | 1 + M> cddl/lib/libzfs/Makefile.depend | 1 + M> rescue/rescue/Makefile | 2 +- M> rescue/rescue/Makefile.depend | 1 + M> share/mk/src.libnames.mk | 2 +- M> sys/contrib/openzfs/META | 6 +- M> sys/contrib/openzfs/cmd/zdb/zdb.c | 77 ++- M> sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c | 2 - M> sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c | 5 + M> .../openzfs/cmd/zed/zed.d/statechange-slot_off.sh | 61 ++ M> sys/contrib/openzfs/cmd/zed/zed.d/zed.rc | 5 + M> sys/contrib/openzfs/cmd/ztest.c | 2 +- M> sys/contrib/openzfs/config/Shellcheck.am | 3 +- M> sys/contrib/openzfs/config/kernel-blkdev.m4 | 138 +++- M> .../config/kernel-block-device-operations.m4 | 35 +- M> .../openzfs/config/kernel-filemap-splice-read.m4 | 25 + M> .../openzfs/config/kernel-register_sysctl_table.m4 | 27 + M> .../config/kernel-vfs-extended-file_range.m4 | 50 ++ M> .../openzfs/config/kernel-vfs-file_range.m4 | 164 +++++ M> sys/contrib/openzfs/config/kernel-vfs-iov_iter.m4 | 26 +- M> sys/contrib/openzfs/config/kernel.m4 | 16 + M> sys/contrib/openzfs/contrib/debian/changelog | 6 + M> .../contrib/debian/openzfs-zfs-test.install | 2 - M> .../contrib/debian/openzfs-zfsutils.install | 2 + M> .../contrib/dracut/90zfs/zfs-env-bootfs.service.in | 11 +- M> .../dracut/90zfs/zfs-rollback-bootfs.service.in | 2 +- M> .../openzfs/include/os/freebsd/spl/sys/vnode.h | 6 +- M> .../include/os/linux/kernel/linux/blkdev_compat.h | 17 + M> .../openzfs/include/os/linux/spl/sys/kmem_cache.h | 8 + M> .../openzfs/include/os/linux/spl/sys/types.h | 2 +- M> sys/contrib/openzfs/include/os/linux/spl/sys/uio.h | 12 + M> sys/contrib/openzfs/include/os/linux/zfs/sys/zpl.h | 53 ++ M> sys/contrib/openzfs/include/sys/bpobj.h | 2 +- M> sys/contrib/openzfs/include/sys/brt.h | 1 + M> sys/contrib/openzfs/include/sys/dmu.h | 5 + M> sys/contrib/openzfs/include/sys/dmu_impl.h | 2 - M> sys/contrib/openzfs/include/sys/dmu_zfetch.h | 2 - M> sys/contrib/openzfs/include/sys/fm/fs/zfs.h | 4 - M> sys/contrib/openzfs/include/sys/metaslab.h | 3 - M> sys/contrib/openzfs/include/sys/metaslab_impl.h | 6 +- M> sys/contrib/openzfs/include/sys/spa_impl.h | 1 + M> sys/contrib/openzfs/include/sys/vdev_impl.h | 2 +- M> sys/contrib/openzfs/include/sys/zil_impl.h | 44 +- M> sys/contrib/openzfs/include/sys/zio.h | 1 - M> sys/contrib/openzfs/include/sys/zio_checksum.h | 2 - M> sys/contrib/openzfs/lib/libzfs/Makefile.am | 2 +- M> sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 6 + M> sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 95 ++- M> sys/contrib/openzfs/man/man4/zfs.4 | 10 +- M> sys/contrib/openzfs/man/man8/zfs-send.8 | 18 +- M> sys/contrib/openzfs/man/man8/zpool-events.8 | 23 +- M> sys/contrib/openzfs/module/Kbuild.in | 1 + M> .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 10 +- M> sys/contrib/openzfs/module/os/linux/spl/spl-proc.c | 26 +- M> .../openzfs/module/os/linux/zfs/vdev_disk.c | 65 +- M> .../openzfs/module/os/linux/zfs/zfs_ctldir.c | 26 +- M> .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 7 + M> .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 9 +- M> .../openzfs/module/os/linux/zfs/zfs_znode.c | 8 + M> .../openzfs/module/os/linux/zfs/zpl_ctldir.c | 2 +- M> sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 44 +- M> .../openzfs/module/os/linux/zfs/zpl_file_range.c | 272 ++++++++ M> .../openzfs/module/os/linux/zfs/zpl_super.c | 39 +- M> sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 28 +- M> sys/contrib/openzfs/module/zfs/bpobj.c | 49 +- M> sys/contrib/openzfs/module/zfs/brt.c | 43 +- M> sys/contrib/openzfs/module/zfs/dbuf.c | 11 +- M> sys/contrib/openzfs/module/zfs/dmu.c | 127 ++-- M> sys/contrib/openzfs/module/zfs/dmu_recv.c | 22 +- M> sys/contrib/openzfs/module/zfs/dmu_zfetch.c | 12 +- M> sys/contrib/openzfs/module/zfs/dnode.c | 31 +- M> sys/contrib/openzfs/module/zfs/dsl_deadlist.c | 14 +- M> sys/contrib/openzfs/module/zfs/dsl_scan.c | 17 +- M> sys/contrib/openzfs/module/zfs/metaslab.c | 83 +-- M> sys/contrib/openzfs/module/zfs/spa_log_spacemap.c | 4 +- M> sys/contrib/openzfs/module/zfs/spa_misc.c | 1 + M> sys/contrib/openzfs/module/zfs/vdev.c | 90 ++- M> sys/contrib/openzfs/module/zfs/vdev_indirect.c | 2 +- M> sys/contrib/openzfs/module/zfs/vdev_raidz.c | 2 +- M> sys/contrib/openzfs/module/zfs/zfs_fm.c | 33 +- M> sys/contrib/openzfs/module/zfs/zfs_vnops.c | 46 +- M> sys/contrib/openzfs/module/zfs/zil.c | 719 +++++++++------------ M> sys/contrib/openzfs/module/zfs/zio.c | 45 +- M> sys/contrib/openzfs/module/zfs/zio_checksum.c | 2 - M> sys/contrib/openzfs/module/zfs/zvol.c | 8 +- M> sys/contrib/openzfs/tests/runfiles/linux.run | 11 + M> .../openzfs/tests/test-runner/bin/zts-report.py.in | 18 + M> sys/contrib/openzfs/tests/zfs-tests/cmd/.gitignore | 1 + M> .../openzfs/tests/zfs-tests/cmd/Makefile.am | 1 + M> .../openzfs/tests/zfs-tests/cmd/clonefile.c | 333 ++++++++++ M> sys/contrib/openzfs/tests/zfs-tests/cmd/readmmap.c | 1 + M> .../openzfs/tests/zfs-tests/include/commands.cfg | 1 + M> .../openzfs/tests/zfs-tests/tests/Makefile.am | 14 + M> .../functional/block_cloning/block_cloning.kshlib | 54 ++ M> .../block_cloning/block_cloning_copyfilerange.ksh | 60 ++ M> .../block_cloning_copyfilerange_cross_dataset.ksh | 65 ++ M> .../block_cloning_copyfilerange_fallback.ksh | 86 +++ M> ...ock_cloning_copyfilerange_fallback_same_txg.ksh | 66 ++ M> .../block_cloning_copyfilerange_partial.ksh | 68 ++ M> .../block_cloning_disabled_copyfilerange.ksh | 60 ++ M> .../block_cloning_disabled_ficlone.ksh | 50 ++ M> .../block_cloning_disabled_ficlonerange.ksh | 50 ++ M> .../block_cloning/block_cloning_ficlone.ksh | 56 ++ M> .../block_cloning/block_cloning_ficlonerange.ksh | 56 ++ M> .../block_cloning_ficlonerange_partial.ksh | 64 ++ M> .../tests/functional/block_cloning/cleanup.ksh | 34 + M> .../tests/functional/block_cloning/setup.ksh | 36 ++ M> .../cli_root/zpool_attach/attach-o_ashift.ksh | 30 +- M> .../cli_root/zpool_replace/replace-o_ashift.ksh | 32 +- M> .../cli_root/zpool_replace/replace_prop_ashift.ksh | 24 +- M> sys/modules/zfs/zfs_config.h | 53 +- M> sys/modules/zfs/zfs_gitrev.h | 2 +- M> 113 files changed, 3322 insertions(+), 906 deletions(-) M> M> diff --cc Makefile.inc1 M> index 8838d31c795a,000000000000..f740cc5abcca M> mode 100644,000000..100644 M> --- a/Makefile.inc1 M> +++ b/Makefile.inc1 M> @@@ -1,3692 -1,0 +1,3695 @@@ M> +# M> +# M> +# Make command line options: M> +# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir M> +# -DNO_CLEAN do not clean at all M> +# -DDB_FROM_SRC use the user/group databases in src/etc instead of M> +# the system database when installing. M> +# -DNO_SHARE do not go into share subdir M> +# -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,OBJ} M> +# -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel M> +# -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel M> +# -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} buildkernel M> +# -DNO_ROOT install without using root privilege M> +# -DWITHOUT_CTF do not run the DTrace CTF conversion tools on built objects M> +# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list M> +# LOCAL_ITOOLS="list of tools" to add additional tools to the ITOOLS list M> +# LOCAL_LIB_DIRS="list of dirs" to add additional dirs to libraries target M> +# LOCAL_MTREE="list of mtree files" to process to allow local directories M> +# to be created before files are installed M> +# LOCAL_LEGACY_DIRS="list of dirs" to add additional dirs to the legacy M> +# target M> +# LOCAL_BSTOOL_DIRS="list of dirs" to add additional dirs to the M> +# bootstrap-tools target M> +# LOCAL_TOOL_DIRS="list of dirs" to add additional dirs to the build-tools M> +# target M> +# LOCAL_XTOOL_DIRS="list of dirs" to add additional dirs to the M> +# cross-tools target M> +# METALOG="path to metadata log" to write permission and ownership M> +# when NO_ROOT is set. (default: ${DESTDIR}/${DISTDIR}/METALOG, M> +# check /etc/make.conf for DISTDIR) M> +# TARGET="machine" to crossbuild world for a different machine type M> +# TARGET_ARCH= may be required when a TARGET supports multiple endians M> +# BUILDENV_SHELL= shell to launch for the buildenv target (def:${SHELL}) M> +# WORLD_FLAGS= additional flags to pass to make(1) during buildworld M> +# KERNEL_FLAGS= additional flags to pass to make(1) during buildkernel M> +# SUBDIR_OVERRIDE="list of dirs" to build rather than everything. M> +# All libraries and includes, and some build tools will still build. M> + M> +# M> +# The intended user-driven targets are: M> +# buildworld - rebuild *everything*, including glue to help do upgrades M> +# installworld- install everything built by "buildworld" M> +# checkworld - run test suite on installed world M> +# doxygen - build API documentation of the kernel M> +# M> +# Standard targets (not defined here) are documented in the makefiles in M> +# /usr/share/mk. These include: M> +# obj depend all install clean cleandepend cleanobj M> + M> +.if !defined(TARGET) || !defined(TARGET_ARCH) M> +.error Both TARGET and TARGET_ARCH must be defined. M> +.endif M> + M> +.if make(showconfig) || make(test-system-*) M> +_MKSHOWCONFIG= t M> +.endif M> + M> +SRCDIR?= ${.CURDIR} M> +LOCALBASE?= /usr/local M> +TIME_ENV ?= time env M> + M> +.include "share/mk/src.tools.mk" M> + M> +# Cross toolchain changes must be in effect before bsd.compiler.mk M> +# so that gets the right CC, and pass CROSS_TOOLCHAIN to submakes. M> +.if defined(CROSS_TOOLCHAIN) M> +.if exists(${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk) M> +.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" M> +.elif exists(${CROSS_TOOLCHAIN}) M> +.include "${CROSS_TOOLCHAIN}" M> +.else M> +.error CROSS_TOOLCHAIN ${CROSS_TOOLCHAIN} not found M> +.endif M> +CROSSENV+=CROSS_TOOLCHAIN="${CROSS_TOOLCHAIN}" M> +.elif defined(UNIVERSE_TOOLCHAIN) M> +UNIVERSE_TOOLCHAIN_PATH?=${HOST_OBJTOP}/tmp/usr/bin M> +XCC?="${UNIVERSE_TOOLCHAIN_PATH}/cc" M> +XCXX?="${UNIVERSE_TOOLCHAIN_PATH}/c++" M> +XCPP?="${UNIVERSE_TOOLCHAIN_PATH}/cpp" M> +XLD?="${UNIVERSE_TOOLCHAIN_PATH}/ld" M> +.endif M> +.if defined(CROSS_TOOLCHAIN_PREFIX) M> +CROSS_COMPILER_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} M> +.endif M> + M> +XCOMPILERS= CC CXX CPP M> +.for COMPILER in ${XCOMPILERS} M> +.if defined(CROSS_COMPILER_PREFIX) M> +X${COMPILER}?= ${CROSS_COMPILER_PREFIX}${${COMPILER}} M> +.else M> +X${COMPILER}?= ${${COMPILER}} M> +.endif M> +.endfor M> +# If a full path to an external cross compiler is given, don't build M> +# a cross compiler. M> +.if ${XCC:N${CCACHE_BIN}:M/*} M> +MK_CLANG_BOOTSTRAP= no M> +# Make sure sub-makes see the option as disabled so the hack in bsd.sys.mk to M> +# work around incompatible headers in Clang's resource directory is enabled. M> +.MAKEOVERRIDES+= MK_CLANG_BOOTSTRAP M> +.endif M> + M> +# Pull in compiler metadata from buildworld/toolchain if possible to avoid M> +# running CC from bsd.compiler.mk. M> +.if make(installworld) || make(install) || make(distributeworld) || \ M> + make(stageworld) M> +.-include "${OBJTOP}/toolchain-metadata.mk" M> +.if !defined(_LOADED_TOOLCHAIN_METADATA) M> +.error A build is required first. You may have the wrong MAKEOBJDIRPREFIX set. M> +.endif M> +.endif M> + M> +# Pull in COMPILER_TYPE and COMPILER_FREEBSD_VERSION early. Pull it from the M> +# tree to be friendlier to foreign OS builds. It's safe to do so unconditionally M> +# here since we will always have the right make, unlike in src/Makefile M> +# Don't include bsd.linker.mk yet until XBINUTILS is handled (after src.opts.mk) M> +_NO_INCLUDE_LINKERMK= t M> +# We also want the X_COMPILER* variables if we are using an external toolchain. M> +_WANT_TOOLCHAIN_CROSS_VARS= t M> +.include "share/mk/bsd.compiler.mk" M> +.undef _NO_INCLUDE_LINKERMK M> +.undef _WANT_TOOLCHAIN_CROSS_VARS M> +# src.opts.mk depends on COMPILER_FEATURES M> +.include "share/mk/src.opts.mk" M> + M> +.if ${TARGET} == ${MACHINE} M> +TARGET_CPUTYPE?=${CPUTYPE} M> +.else M> +TARGET_CPUTYPE?= M> +.endif M> +.if !empty(TARGET_CPUTYPE) M> +_TARGET_CPUTYPE=${TARGET_CPUTYPE} M> +.else M> +_TARGET_CPUTYPE=dummy M> +.endif M> +.if ${TARGET} == "arm" M> +.if ${TARGET_CPUTYPE:M*soft*} == "" M> +TARGET_TRIPLE_ABI= gnueabihf M> +.else M> +TARGET_TRIPLE_ABI= gnueabi M> +.endif M> +.endif M> +MACHINE_TRIPLE_ABI?= unknown M> +MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/}-${MACHINE_TRIPLE_ABI}-freebsd${OS_REVISION} M> +TARGET_TRIPLE_ABI?= unknown M> +TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/}-${TARGET_TRIPLE_ABI}-freebsd${OS_REVISION} M> +KNOWN_ARCHES?= aarch64/arm64 \ M> + amd64 \ M> + armv6/arm \ M> + armv7/arm \ M> + i386 \ M> + powerpc \ M> + powerpc64/powerpc \ M> + powerpc64le/powerpc \ M> + powerpcspe/powerpc \ M> + riscv64/riscv M> + M> +.if ${TARGET} == ${TARGET_ARCH} M> +_t= ${TARGET} M> +.else M> +_t= ${TARGET_ARCH}/${TARGET} M> +.endif M> +.for _t in ${_t} M> +.if empty(KNOWN_ARCHES:M${_t}) M> +.error Unknown target ${TARGET_ARCH}:${TARGET}. M> +.endif M> +.endfor M> + M> +.if ${TARGET_ARCH} == "amd64" M> +LIBCOMPAT_INCLUDE_DIRS+= i386 M> +.elif ${TARGET_ARCH} == "aarch64" M> +LIBCOMPAT_INCLUDE_DIRS+= arm M> +.endif M> + M> +.if ${.MAKE.OS} != "FreeBSD" M> +CROSSBUILD_HOST=${.MAKE.OS} M> +.if ${.MAKE.OS} != "Linux" && ${.MAKE.OS} != "Darwin" M> +.warning Unsupported crossbuild system: ${.MAKE.OS}. Build will probably fail! M> +.endif M> +# We need to force NO_ROOT/DB_FROM_SRC builds when building on other operating M> +# systems since the BSD.foo.dist specs contain users and groups that do not M> +# exist by default on a Linux/MacOS system. M> +NO_ROOT:= 1 M> +DB_FROM_SRC:= 1 M> +.export NO_ROOT M> +.endif M> + M> +# If all targets are disabled for system llvm then don't expect it to work M> +# for cross-builds. M> +.if !defined(TOOLS_PREFIX) && ${MK_LLVM_TARGET_ALL} == "no" && \ M> + ${MACHINE} != ${TARGET} && ${MACHINE_ARCH} != ${TARGET_ARCH} && \ M> + !make(showconfig) M> +MK_SYSTEM_COMPILER= no M> +MK_SYSTEM_LINKER= no M> +.endif M> + M> +# Handle external binutils. M> +.if defined(CROSS_TOOLCHAIN_PREFIX) M> +CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} M> +.endif M> +XBINUTILS= AS AR ELFCTL LD NM OBJCOPY RANLIB SIZE STRINGS STRIPBIN M> +.for BINUTIL in ${XBINUTILS} M> +.if defined(CROSS_BINUTILS_PREFIX) && \ M> + exists(${CROSS_BINUTILS_PREFIX}/${${BINUTIL}}) M> +X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX:C,/*$,,}/${${BINUTIL}} M> +.else M> +X${BINUTIL}?= ${${BINUTIL}} M> +.endif M> +.endfor M> + M> +# If a full path to an external linker is given, don't build lld. M> +.if ${XLD:M/*} M> +MK_LLD_BOOTSTRAP= no M> +.endif M> + M> +# We also want the X_LINKER* variables if we are using an external toolchain. M> +_WANT_TOOLCHAIN_CROSS_VARS= t M> +.include "share/mk/bsd.linker.mk" M> +.undef _WANT_TOOLCHAIN_CROSS_VARS M> + M> +# Begin WITH_SYSTEM_COMPILER / WITH_SYSTEM_LD M> + M> +# WITH_SYSTEM_COMPILER - Pull in needed values and make a decision. M> + M> +# Check if there is a local compiler that can satisfy as an external compiler. M> +# Which compiler is expected to be used? M> +.if ${MK_CLANG_BOOTSTRAP} == "yes" M> +WANT_COMPILER_TYPE= clang M> +.else M> +WANT_COMPILER_TYPE= M> +.endif M> + M> +.if !defined(WANT_COMPILER_FREEBSD_VERSION) && !make(showconfig) && \ M> + !make(test-system-linker) M> +.if ${WANT_COMPILER_TYPE} == "clang" M> +WANT_COMPILER_FREEBSD_VERSION_FILE= lib/clang/freebsd_cc_version.h M> +WANT_COMPILER_FREEBSD_VERSION!= \ M> + awk '$$2 == "FREEBSD_CC_VERSION" {printf("%d\n", $$3)}' \ M> + ${SRCDIR}/${WANT_COMPILER_FREEBSD_VERSION_FILE} || echo unknown M> +WANT_COMPILER_VERSION_FILE= lib/clang/include/clang/Basic/Version.inc M> +WANT_COMPILER_VERSION!= \ M> + awk '$$2 == "CLANG_VERSION" {split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \ M> + ${SRCDIR}/${WANT_COMPILER_VERSION_FILE} || echo unknown M> +.endif M> +.export WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_VERSION M> +.endif # !defined(WANT_COMPILER_FREEBSD_VERSION) M> + M> +# It needs to be the same revision as we would build for the bootstrap. M> +# If the expected vs CC is different then we can't skip. M> +# GCC cannot be used for cross-arch yet. For clang we pass -target later if M> +# TARGET_ARCH!=MACHINE_ARCH. M> +.if ${MK_SYSTEM_COMPILER} == "yes" && \ M> + defined(WANT_COMPILER_FREEBSD_VERSION) && \ M> + ${MK_CLANG_BOOTSTRAP} == "yes" && \ M> + !make(xdev*) && \ M> + ${X_COMPILER_TYPE} == ${WANT_COMPILER_TYPE} && \ M> + (${X_COMPILER_TYPE} == "clang" || ${TARGET_ARCH} == ${MACHINE_ARCH}) && \ M> + ${X_COMPILER_VERSION} == ${WANT_COMPILER_VERSION} && \ M> + ${X_COMPILER_FREEBSD_VERSION} == ${WANT_COMPILER_FREEBSD_VERSION} M> +# Everything matches, disable the bootstrap compiler. M> +MK_CLANG_BOOTSTRAP= no M> +USING_SYSTEM_COMPILER= yes M> +.endif # ${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} M> + M> +# WITH_SYSTEM_LD - Pull in needed values and make a decision. M> + M> +# Check if there is a local linker that can satisfy as an external linker. M> +# Which linker is expected to be used? M> +.if ${MK_LLD_BOOTSTRAP} == "yes" M> +WANT_LINKER_TYPE= lld M> +.else M> +WANT_LINKER_TYPE= M> +.endif M> + M> +.if !defined(WANT_LINKER_FREEBSD_VERSION) && !make(showconfig) && \ M> + !make(test-system-compiler) M> +.if ${WANT_LINKER_TYPE} == "lld" M> +WANT_LINKER_FREEBSD_VERSION_FILE= lib/clang/include/lld/Common/Version.inc M> +WANT_LINKER_FREEBSD_VERSION!= \ M> + awk '$$2 == "LLD_FREEBSD_VERSION" {print $$3}' \ M> + ${SRCDIR}/${WANT_LINKER_FREEBSD_VERSION_FILE} || echo unknown M> +WANT_LINKER_VERSION_FILE= lib/clang/include/lld/Common/Version.inc M> +WANT_LINKER_VERSION!= \ M> + awk '$$2 == "LLD_VERSION_STRING" {gsub("\"", "", $$3); split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \ M> + ${SRCDIR}/${WANT_LINKER_VERSION_FILE} || echo unknown M> +.else M> +WANT_LINKER_FREEBSD_VERSION_FILE= M> +WANT_LINKER_FREEBSD_VERSION= M> +.endif M> +.export WANT_LINKER_FREEBSD_VERSION WANT_LINKER_VERSION M> +.endif # !defined(WANT_LINKER_FREEBSD_VERSION) M> + M> +.if ${MK_SYSTEM_LINKER} == "yes" && \ M> + defined(WANT_LINKER_FREEBSD_VERSION) && \ M> + (${MK_LLD_BOOTSTRAP} == "yes") && \ M> + !make(xdev*) && \ M> + ${X_LINKER_TYPE} == ${WANT_LINKER_TYPE} && \ M> + ${X_LINKER_VERSION} == ${WANT_LINKER_VERSION} && \ M> + ${X_LINKER_FREEBSD_VERSION} == ${WANT_LINKER_FREEBSD_VERSION} M> +# Everything matches, disable the bootstrap linker. M> +MK_LLD_BOOTSTRAP= no M> +USING_SYSTEM_LINKER= yes M> +.endif # ${WANT_LINKER_TYPE} == ${LINKER_TYPE} M> + M> +# WITH_SYSTEM_COMPILER / WITH_SYSTEM_LINKER - Handle defaults and debug. M> +USING_SYSTEM_COMPILER?= no M> +USING_SYSTEM_LINKER?= no M> + M> +TEST_SYSTEM_COMPILER_VARS= \ M> + USING_SYSTEM_COMPILER MK_SYSTEM_COMPILER \ M> + MK_CROSS_COMPILER MK_CLANG_BOOTSTRAP \ M> + WANT_COMPILER_TYPE WANT_COMPILER_VERSION WANT_COMPILER_VERSION_FILE \ M> + WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_FREEBSD_VERSION_FILE \ M> + CC COMPILER_TYPE COMPILER_FEATURES COMPILER_VERSION \ M> + COMPILER_FREEBSD_VERSION \ M> + XCC X_COMPILER_TYPE X_COMPILER_FEATURES X_COMPILER_VERSION \ M> + X_COMPILER_FREEBSD_VERSION M> +TEST_SYSTEM_LINKER_VARS= \ M> + USING_SYSTEM_LINKER MK_SYSTEM_LINKER \ M> + MK_LLD_BOOTSTRAP \ M> + WANT_LINKER_TYPE WANT_LINKER_VERSION WANT_LINKER_VERSION_FILE \ M> + WANT_LINKER_FREEBSD_VERSION WANT_LINKER_FREEBSD_VERSION_FILE \ M> + LD LINKER_TYPE LINKER_FEATURES LINKER_VERSION \ M> + LINKER_FREEBSD_VERSION \ M> + XLD X_LINKER_TYPE X_LINKER_FEATURES X_LINKER_VERSION \ M> + X_LINKER_FREEBSD_VERSION M> + M> +.for _t in compiler linker M> +test-system-${_t}: .PHONY M> +.for v in ${TEST_SYSTEM_${_t:tu}_VARS} M> + ${_+_}@printf "%-35s= %s\n" "${v}" "${${v}}" M> +.endfor M> +.endfor M> +.if (make(buildworld) || make(buildkernel) || make(kernel-toolchain) || \ M> + make(toolchain) || make(_cross-tools)) M> +.if ${USING_SYSTEM_COMPILER} == "yes" M> +.info SYSTEM_COMPILER: Determined that CC=${CC} matches the source tree. Not bootstrapping a cross-compiler. M> +.elif ${MK_CLANG_BOOTSTRAP} == "yes" M> +.info SYSTEM_COMPILER: libclang will be built for bootstrapping a cross-compiler. M> +.endif M> +.if ${USING_SYSTEM_LINKER} == "yes" M> +.info SYSTEM_LINKER: Determined that LD=${LD} matches the source tree. Not bootstrapping a cross-linker. M> +.elif ${MK_LLD_BOOTSTRAP} == "yes" M> +.info SYSTEM_LINKER: libclang will be built for bootstrapping a cross-linker. M> +.endif M> +.endif M> + M> +# End WITH_SYSTEM_COMPILER / WITH_SYSTEM_LD M> + M> +# Store some compiler metadata for use in installworld where we don't M> +# want to invoke CC at all. M> +_TOOLCHAIN_METADATA_VARS= COMPILER_VERSION \ M> + COMPILER_TYPE \ M> + COMPILER_FEATURES \ M> + COMPILER_FREEBSD_VERSION \ M> + COMPILER_RESOURCE_DIR \ M> + LINKER_VERSION \ M> + LINKER_FEATURES \ M> + LINKER_TYPE \ M> + LINKER_FREEBSD_VERSION M> +toolchain-metadata.mk: .PHONY .META M> + @: > ${.TARGET} M> + @echo ".info Using cached toolchain metadata from build at $$(hostname) on $$(date)" \ M> + > ${.TARGET} M> + @echo "_LOADED_TOOLCHAIN_METADATA=t" >> ${.TARGET} M> +.for v in ${_TOOLCHAIN_METADATA_VARS} M> + @echo "${v}=${${v}}" >> ${.TARGET} M> + @echo "X_${v}=${X_${v}}" >> ${.TARGET} M> +.endfor M> + @echo ".export ${_TOOLCHAIN_METADATA_VARS}" >> ${.TARGET} M> + @echo ".export ${_TOOLCHAIN_METADATA_VARS:C,^,X_,}" >> ${.TARGET} M> + M> + M> +# We must do lib/ and libexec/ before bin/ in case of a mid-install error to M> +# keep the users system reasonably usable. For static->dynamic root upgrades, M> +# we don't want to install a dynamic binary without rtld and the needed M> +# libraries. More commonly, for dynamic root, we don't want to install a M> +# binary that requires a newer library version that hasn't been installed yet. M> +# This ordering is not a guarantee though. The only guarantee of a working M> +# system here would require fine-grained ordering of all components based M> +# on their dependencies. M> +.if !empty(SUBDIR_OVERRIDE) M> +SUBDIR= ${SUBDIR_OVERRIDE} M> +.else M> +SUBDIR= lib libexec M> +# Add LOCAL_LIB_DIRS, but only if they will not be picked up as a SUBDIR M> +# of a LOCAL_DIRS directory. This allows LOCAL_DIRS=foo and M> +# LOCAL_LIB_DIRS=foo/lib to behave as expected. M> +.for _DIR in ${LOCAL_DIRS:M*/} ${LOCAL_DIRS:N*/:S|$|/|} M> +_REDUNDANT_LIB_DIRS+= ${LOCAL_LIB_DIRS:M${_DIR}*} M> +.endfor M> +.for _DIR in ${LOCAL_LIB_DIRS} M> +.if ${_DIR} == ".WAIT" || (empty(_REDUNDANT_LIB_DIRS:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile)) M> +SUBDIR+= ${_DIR} M> +.endif M> +.endfor M> +.if !defined(NO_ROOT) && (make(installworld) || make(install)) M> +# Ensure libraries are installed before progressing. M> +SUBDIR+=.WAIT M> +.endif M> +SUBDIR+=bin M> +.if ${MK_CDDL} != "no" M> +SUBDIR+=cddl M> +.endif M> +SUBDIR+=gnu include M> +.if ${MK_KERBEROS} != "no" M> +SUBDIR+=kerberos5 M> +.endif M> +.if ${MK_RESCUE} != "no" M> +SUBDIR+=rescue M> +.endif M> +SUBDIR+=sbin M> +.if ${MK_CRYPT} != "no" M> +SUBDIR+=secure M> +.endif M> +.if !defined(NO_SHARE) M> +SUBDIR+=share M> +.endif M> +.if ${MK_BOOT} != "no" M> +SUBDIR+=stand M> +.endif M> +SUBDIR+=sys usr.bin usr.sbin M> +.if ${MK_TESTS} != "no" M> +SUBDIR+= tests M> +.endif M> + M> +# Local directories are built in parallel with the base system directories. M> +# Users may insert a .WAIT directive at the beginning or elsewhere within M> +# the LOCAL_DIRS and LOCAL_LIB_DIRS lists as needed. M> +.for _DIR in ${LOCAL_DIRS} M> +.if ${_DIR} == ".WAIT" || exists(${.CURDIR}/${_DIR}/Makefile) M> +SUBDIR+= ${_DIR} M> +.endif M> +.endfor M> + M> +# We must do etc/ last as it hooks into building the man whatis file M> +# by calling 'makedb' in share/man. This is only relevant for M> +# install/distribute so they build the whatis file after every manpage is M> +# installed. M> +.if make(installworld) || make(install) M> +SUBDIR+=.WAIT M> +.endif M> +SUBDIR+=etc M> + M> +.endif # !empty(SUBDIR_OVERRIDE) M> + M> +.if defined(NOCLEAN) M> +.warning The src.conf WITHOUT_CLEAN option can now be used instead of NOCLEAN. M> +MK_CLEAN:= no M> +.endif M> +.if defined(NO_CLEAN) M> +.info The src.conf WITHOUT_CLEAN option can now be used instead of NO_CLEAN. M> +MK_CLEAN:= no M> +.endif M> +.if defined(NO_CLEANDIR) M> +CLEANDIR= clean cleandepend M> +.else M> +CLEANDIR= cleandir M> +.endif M> + M> +.if defined(WORLDFAST) M> +MK_CLEAN:= no M> +NO_OBJWALK= t M> +.endif M> + M> +.if ${MK_META_MODE} == "yes" M> +# If filemon is used then we can rely on the build being incremental-safe. M> +# The .meta files will also track the build command and rebuild should M> +# it change. M> +.if empty(.MAKE.MODE:Mnofilemon) M> +MK_CLEAN:= no M> +.endif M> +.endif M> +.if defined(NO_OBJWALK) || ${MK_AUTO_OBJ} == "yes" M> +NO_OBJWALK= t M> +NO_KERNELOBJ= t M> +.endif M> +.if !defined(NO_OBJWALK) M> +_obj= obj M> +.endif M> + M> +LOCAL_TOOL_DIRS?= M> +PACKAGEDIR?= ${DESTDIR}/${DISTDIR} M> + M> +.if empty(SHELL:M*csh*) M> +BUILDENV_SHELL?=${SHELL} M> +.else M> +BUILDENV_SHELL?=/bin/sh M> +.endif M> + M> +.if !defined(_MKSHOWCONFIG) M> +.if !defined(VCS_REVISION) || empty(VCS_REVISION) M> +.if !defined(SVNVERSION_CMD) || empty(SVNVERSION_CMD) M> +. for _D in ${PATH:S,:, ,g} M> +. if exists(${_D}/svnversion) M> +SVNVERSION_CMD?=${_D}/svnversion M> +. endif M> +. if exists(${_D}/svnliteversion) M> +SVNVERSION_CMD?=${_D}/svnliteversion M> +. endif M> +. endfor M> +.endif M> +.if defined(SVNVERSION_CMD) && !empty(SVNVERSION_CMD) M> +_VCS_REVISION?= $$(eval ${SVNVERSION_CMD} ${SRCDIR}) M> +. if !empty(_VCS_REVISION) M> +VCS_REVISION= $$(echo r${_VCS_REVISION}) M> +.export VCS_REVISION M> +. endif M> +.endif M> +.endif M> + M> +.if !defined(GIT_CMD) || empty(GIT_CMD) M> +. for _P in /usr/bin /usr/local/bin M> +. if exists(${_P}/git) M> +GIT_CMD= ${_P}/git M> +. endif M> +. endfor M> +.export GIT_CMD M> +.endif M> + M> +.if !defined(OSRELDATE) M> +.if exists(/usr/include/osreldate.h) M> +OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ M> + /usr/include/osreldate.h M> +.else M> +OSRELDATE= 0 M> +.endif M> +.export OSRELDATE M> +.endif M> + M> +# Set VERSION for CTFMERGE to use via the default CTFFLAGS=-L VERSION. M> +.for _V in BRANCH REVISION TYPE M> +.if !defined(_${_V}) M> +_${_V}!= eval $$(awk '/^${_V}=/{print}' ${SRCTOP}/sys/conf/newvers.sh); echo $$${_V} M> +.export _${_V} M> +.endif M> +.endfor M> +.if !defined(SRCRELDATE) M> +SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ M> + ${SRCDIR}/sys/sys/param.h M> +.export SRCRELDATE M> +.endif M> +.if !defined(VERSION) M> +VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE} M> +.export VERSION M> +.endif M> +MAJOR_REVISION= ${_REVISION:R} M> + M> +.if !defined(PKG_VERSION) M> +_STRTIMENOW= %Y%m%d%H%M%S M> +_TIMENOW= ${_STRTIMENOW:gmtime} M> +.if ${_BRANCH:MCURRENT*} || ${_BRANCH:MSTABLE*} || ${_BRANCH:MPRERELEASE*} M> +EXTRA_REVISION= .snap${_TIMENOW} M> +.elif ${_BRANCH:MALPHA*} M> +EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/}.${_TIMENOW} M> +.elif ${_BRANCH:MBETA*} M> +EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/}.${_TIMENOW} M> +.elif ${_BRANCH:MRC*} M> +EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/}.${_TIMENOW} M> +.elif ${_BRANCH:M*-p*} M> +EXTRA_REVISION= p${_BRANCH:C/.*-p([0-9]+$)/\1/} M> +.endif M> +PKG_VERSION:= ${MAJOR_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} M> +.endif M> +.endif # !defined(PKG_VERSION) M> + M> +.if !defined(PKG_TIMESTAMP) M> +TIMEEPOCHNOW= %s M> +SOURCE_DATE_EPOCH= ${TIMEEPOCHNOW:gmtime} M> +.else M> +SOURCE_DATE_EPOCH= ${PKG_TIMESTAMP} M> +.endif M> + M> +PKG_NAME_PREFIX?= FreeBSD M> +PKG_MAINTAINER?= re@FreeBSD.org M> +PKG_WWW?= https://www.FreeBSD.org M> +.export PKG_NAME_PREFIX M> +.export PKG_MAINTAINER M> +.export PKG_WWW M> + M> +.if !defined(_MKSHOWCONFIG) M> +_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} -f /dev/null \ M> + -m ${.CURDIR}/share/mk MK_AUTO_OBJ=no -V CPUTYPE M> +.if ${_CPUTYPE} != ${_TARGET_CPUTYPE} M> +.error CPUTYPE global should be set with ?=. M> +.endif M> +.endif M> +.if make(buildworld) M> +BUILD_ARCH!= uname -p M> +# On some Linux systems uname -p returns "unknown" so skip this check there. M> +# This check only exists to tell people to use TARGET_ARCH instead of M> +# MACHINE_ARCH so skipping it when crossbuilding on non-FreeBSD should be fine. M> +.if ${MACHINE_ARCH} != ${BUILD_ARCH} && ${.MAKE.OS} == "FreeBSD" M> +.error To cross-build, set TARGET_ARCH. M> +.endif M> +.endif M> +WORLDTMP?= ${OBJTOP}/tmp M> +BPATH= ${CCACHE_WRAPPER_PATH_PFX}${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin:${WORLDTMP}/legacy/usr/libexec M> +XPATH= ${WORLDTMP}/bin:${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin M> + M> +# When building we want to find the cross tools before the host tools in ${BPATH}. M> +# We also need to add UNIVERSE_TOOLCHAIN_PATH so that we can find the shared M> +# toolchain files (clang, lld, etc.) during make universe/tinderbox M> +STRICTTMPPATH= ${XPATH}:${BPATH}:${UNIVERSE_TOOLCHAIN_PATH} M> +# We should not be using tools from /usr/bin accidentally since this could cause M> +# the build to break on other systems that don't have that tool. For now we M> +# still allow using the old behaviour (inheriting $PATH) if M> +# BUILD_WITH_STRICT_TMPPATH is set to 0 but this will eventually be removed. M> + M> +# Currently strict $PATH can cause build failures. Once the remaining issues M> +# have been resolved it will be turned on by default. M> +BUILD_WITH_STRICT_TMPPATH?=0 M> +.if defined(CROSSBUILD_HOST) M> +# When building on non-FreeBSD we can't rely on the tools in /usr/bin being compatible M> +# with what FreeBSD expects. Therefore we only use tools from STRICTTMPPATH M> +# during the world build stage. We build most tools during the bootstrap-tools M> +# phase but symlink host tools that are known to work instead of building them M> +BUILD_WITH_STRICT_TMPPATH:=1 M> +.endif M> +.if ${BUILD_WITH_STRICT_TMPPATH} != 0 M> +TMPPATH= ${STRICTTMPPATH} M> +.else M> +TMPPATH= ${STRICTTMPPATH}:${PATH} M> +.endif M> + M> +# M> +# Avoid running mktemp(1) unless actually needed. M> +# It may not be functional, e.g., due to new ABI M> +# when in the middle of installing over this system. M> +# M> +.if make(distributeworld) || make(installworld) || make(stageworld) M> +.if ${BUILD_WITH_STRICT_TMPPATH} != 0 M> +MKTEMP=${WORLDTMP}/legacy/usr/bin/mktemp M> +.if !exists(${MKTEMP}) M> +.error mktemp binary doesn't exist in expected location: ${MKTEMP} M> +.endif M> +.else M> +MKTEMP=mktemp M> +.endif M> +INSTALLTMP!= ${MKTEMP} -d -u -t install M> + M> +.if ${.MAKE.OS} == "FreeBSD" M> +# When building on FreeBSD we always copy the host tools instead of linking M> +# into INSTALLTMP to avoid issues with incompatible libraries (see r364030). M> +# Note: we could create links if we don't intend to update the current machine. M> +INSTALLTMP_COPY_HOST_TOOL=cp M> +.else M> +# However, this is not necessary on Linux/macOS. Additionally, copying the host M> +# tools to another directory with cp results in AMFI Launch Constraint M> +# Violations on macOS Ventura as part of its System Integrity Protection. M> +INSTALLTMP_COPY_HOST_TOOL=ln -s M> +.endif M> +.endif M> + M> +.if make(stagekernel) || make(distributekernel) M> +TAGS+= kernel M> +PACKAGE= kernel M> +.endif M> + M> +# M> +# Building a world goes through the following stages M> +# M> +# 1. legacy stage [BMAKE] M> +# This stage is responsible for creating compatibility M> +# shims that are needed by the bootstrap-tools, M> +# build-tools and cross-tools stages. These are generally M> +# APIs that tools from one of those three stages need to M> +# build that aren't present on the host. M> +# 1. bootstrap-tools stage [BMAKE] M> +# This stage is responsible for creating programs that M> +# are needed for backward compatibility reasons. They M> +# are not built as cross-tools. M> +# 2. build-tools stage [TMAKE] M> +# This stage is responsible for creating the object M> +# tree and building any tools that are needed during M> +# the build process. Some programs are listed during M> +# this phase because they build binaries to generate M> +# files needed to build these programs. This stage also M> +# builds the 'build-tools' target rather than 'all'. M> +# 3. cross-tools stage [XMAKE] M> +# This stage is responsible for creating any tools that M> +# are needed for building the system. A cross-compiler is one M> +# of them. This differs from build tools in two ways: M> +# 1. the 'all' target is built rather than 'build-tools' M> +# 2. these tools are installed into TMPPATH for stage 4. M> +# 4. world stage [WMAKE] M> +# This stage actually builds the world. M> +# 5. install stage (optional) [IMAKE] M> +# This stage installs a previously built world. M> +# M> + M> +BOOTSTRAPPING?= 0 M> +# Keep these in sync M> +MINIMUM_SUPPORTED_OSREL?= 1104001 M> +MINIMUM_SUPPORTED_REL?= 11.4 M> + M> +# Common environment for world related stages M> +CROSSENV+= \ M> + MACHINE_ARCH=${TARGET_ARCH} \ M> + MACHINE=${TARGET} \ M> + CPUTYPE=${TARGET_CPUTYPE} M> +.if ${MK_META_MODE} != "no" M> +# Don't rebuild build-tools targets during normal build. M> +CROSSENV+= BUILD_TOOLS_META=.NOMETA M> +.endif M> +.if defined(TARGET_CFLAGS) M> +CROSSENV+= ${TARGET_CFLAGS} M> +.endif M> +.if (${TARGET} != ${MACHINE} && !defined(WITH_LOCAL_MODULES)) || \ M> + defined(WITHOUT_LOCAL_MODULES) M> +CROSSENV+= LOCAL_MODULES= M> +.endif M> + M> +BOOTSTRAPPING_OSRELDATE?=${OSRELDATE} M> + M> +# bootstrap-tools stage M> +BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ M> + TOOLS_PREFIX=${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \ M> + PATH=${BPATH:Q}:${PATH:Q} \ M> + WORLDTMP=${WORLDTMP} \ M> + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" M> +# need to keep this in sync with targets/pseudo/bootstrap-tools/Makefile M> +BSARGS= DESTDIR= \ M> + OBJTOP='${WORLDTMP}/obj-tools' \ M> + OBJROOT='$${OBJTOP}/' \ M> + UNIVERSE_TOOLCHAIN_PATH=${UNIVERSE_TOOLCHAIN_PATH} \ M> + MAKEOBJDIRPREFIX= \ M> + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ M> + BWPHASE=${.TARGET:C,^_,,} \ M> + -DNO_CPU_CFLAGS \ M> + -DNO_LINT \ M> + -DNO_PIC \ M> + -DNO_SHARED \ M> + MK_ASAN=no \ M> + MK_CTF=no \ M> + MK_CLANG_EXTRAS=no \ M> + MK_CLANG_FORMAT=no \ M> + MK_CLANG_FULL=no \ M> + MK_HTML=no \ M> + MK_MAN=no \ M> + MK_PROFILE=no \ M> + MK_RETPOLINE=no \ M> + MK_SSP=no \ M> + MK_TESTS=no \ M> + MK_UBSAN=no \ M> + MK_WERROR=no \ M> + MK_INCLUDES=yes \ M> + MK_MAN_UTILS=yes M> + M> +BMAKE= \ M> + ${TIME_ENV} ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ M> + ${BSARGS} M> +.if empty(.MAKEOVERRIDES:MMK_LLVM_TARGET_ALL) M> +BMAKE+= MK_LLVM_TARGET_ALL=no M> +.endif M> + M> +# build-tools stage M> +TMAKE= \ M> + ${TIME_ENV} ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ M> + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ M> + DESTDIR= \ M> + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ M> + BWPHASE=${.TARGET:C,^_,,} \ M> + -DNO_CPU_CFLAGS \ M> + -DNO_LINT \ M> + MK_ASAN=no \ M> + MK_CTF=no \ M> + MK_CLANG_EXTRAS=no \ M> + MK_CLANG_FORMAT=no \ M> + MK_CLANG_FULL=no \ M> + MK_LLDB=no \ M> + MK_RETPOLINE=no \ M> + MK_SSP=no \ M> + MK_TESTS=no \ M> + MK_UBSAN=no \ M> + MK_WERROR=no M> + M> +# cross-tools stage M> +# TOOLS_PREFIX set in BMAKE M> +XMAKE= ${BMAKE} \ M> + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ M> + MK_LLDB=no \ M> + MK_LLVM_BINUTILS=no \ M> + MK_TESTS=no M> + M> +# kernel-tools stage M> +KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ M> + PATH=${BPATH:Q}:${PATH:Q} \ M> + WORLDTMP=${WORLDTMP} \ M> + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" M> + M> +KTMAKE= ${TIME_ENV} \ M> + TOOLS_PREFIX=${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \ M> + ${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ M> + DESTDIR= \ M> + OBJTOP='${WORLDTMP}/obj-kernel-tools' \ M> + OBJROOT='$${OBJTOP}/' \ M> + UNIVERSE_TOOLCHAIN_PATH=${UNIVERSE_TOOLCHAIN_PATH} \ M> + MAKEOBJDIRPREFIX= \ M> + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ M> + -DNO_CPU_CFLAGS \ M> + -DNO_LINT \ M> + -DNO_PIC \ M> + -DNO_SHARED \ M> + MK_CTF=no \ M> + MK_HTML=no \ M> + MK_MAN=no \ M> + MK_PROFILE=no \ M> + MK_SSP=no \ M> + MK_RETPOLINE=no \ M> + MK_WERROR=no M> + M> +# world stage M> +WMAKEENV= ${CROSSENV} \ M> + INSTALL="${INSTALL_CMD} -U" \ M> + PATH=${TMPPATH:Q} \ M> + SYSROOT=${WORLDTMP} M> + M> +# make hierarchy M> *** 5431 LINES SKIPPED *** -- Gleb Smirnoff From nobody Thu Aug 31 01:01:55 2023 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 4RbjYN4FNBz4rSSm; Thu, 31 Aug 2023 01:02:00 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RbjYN2HbCz4psj; Thu, 31 Aug 2023 01:02:00 +0000 (UTC) (envelope-from mavbsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-58cbdf3eecaso4586247b3.0; Wed, 30 Aug 2023 18:02:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693443719; x=1694048519; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=NOo2jeWFjsq7dEEGA5DyocEXfrfSGmGN2AfwVu0mLrY=; b=E+pClO8IdWVcYlSyrXCfsNFcWu2pwFtvh4EKmWWokWCI+vauPRdU3GeAfRglat8RMr EM+DBI6KIWPugt6kkSsDzux+rRPfps2XXepgk3WN/ljBqTp4+il3IlpDuShDjyOaIU53 vU/InyVvf9FGp/hjLUD4+dCzPPmzKWw0O7tIOb2wIM+cOLDhvkcNxbSxuswt+doPfftO uWxfGkQ3LbzNJm3OUT+cN9psVmwG53rKjw0eldccL4Z9EM5/Jz4a88iNCVYEuNmJKJpM kishXdWSaN7HHyB4aFGB9388f8rMN/FN01ymsQE97tE0MkFOjSk0EAaTkZkpTK1SrWa9 F8wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693443719; x=1694048519; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NOo2jeWFjsq7dEEGA5DyocEXfrfSGmGN2AfwVu0mLrY=; b=hbQsr3lYwPnO+YdAG2HsAuSDj3nGz7e8TbPLu2iDEIyPATdEjFW/6beGFqRWjYSB7S 6rd0ASLL+dju4f91Kcu01qV5uiybAzoBPkR/CSALltgLy4CiSs2CL7kFqgJIgnGalCtr SU3bcKX67UhH1AfkbQFrNQ+GQHFNMB/vO/YLWlvSEIxwbsa5rpDoO/jJiUEOXi6Bm5JQ yhhkvcdw2xykVys7XhsvnC5wBnCM/cvatgP7gkrURMjB5y/L9T7IEl3b8htFJXx7B9kG ArN3piww5h/+fFsUGfGLvKeVZk8SbgmWOMj1MKzgfbSdy7VpBVstj1/zjF7/Qjhnvc2e NwRg== X-Gm-Message-State: AOJu0Yxh7EW9zY0dT9lyoID1NOdGjWSwmeD/2q7G/UYj5V1ZKTzeml+9 tx552e+YbSX8ygCAtyxMIYJ7YBW1nt0= X-Google-Smtp-Source: AGHT+IH4W18xE53IuWIRg6MjcNLbUU48MX4ZQqV+D4dHlpGqFPaSykNcO2KMWiJHyDgYtHIP3l18QA== X-Received: by 2002:a81:a153:0:b0:589:f439:4cd1 with SMTP id y80-20020a81a153000000b00589f4394cd1mr3654551ywg.33.1693443718245; Wed, 30 Aug 2023 18:01:58 -0700 (PDT) Received: from [192.168.1.66] (104-55-12-234.lightspeed.knvltn.sbcglobal.net. [104.55.12.234]) by smtp.gmail.com with ESMTPSA id a4-20020a0df104000000b00583d67839fasm116962ywf.121.2023.08.30.18.01.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Aug 2023 18:01:57 -0700 (PDT) Message-ID: Date: Wed, 30 Aug 2023 21:01:55 -0400 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad Content-Language: en-US To: Gleb Smirnoff , Martin Matuska Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202308270509.37R596B5048298@gitrepo.freebsd.org> From: Alexander Motin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4RbjYN2HbCz4psj Hi Gleb, It is the first time I see a panic like this. I'll think about it tomorrow. But I'd appreciate any information on what is your workload and what are you doing related to ZIL (O_SYNC, fsync(), sync=always, etc) to trigger it? What is your pool configuration? On 30.08.2023 20:09, Gleb Smirnoff wrote: > Hi Martin, > > we hit this panic with this update: > > panic: VERIFY(avl_is_empty(&lwb->lwb_vdev_tree)) failed > > cpuid = 8 > time = 1693432004 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe09519aa800 > vpanic() at vpanic+0x132/frame 0xfffffe09519aa930 > spl_panic() at spl_panic+0x3a/frame 0xfffffe09519aa990 > zil_free_lwb() at zil_free_lwb+0x1de/frame 0xfffffe09519aa9c0 > zil_sync() at zil_sync+0x3cb/frame 0xfffffe09519aaaa0 > [Wed Aug 30 21:46:44 2023]dmu_objset_sync() at dmu_objset_sync+0x51b/frame 0xfffffe09519aab70 > dsl_pool_sync() at dsl_pool_sync+0x11d/frame 0xfffffe09519aabf0 > spa_sync() at spa_sync+0xc68/frame 0xfffffe09519aae20 > txg_sync_thread() at txg_sync_thread+0x2eb/frame 0xfffffe09519aaef0 > fork_exit() at fork_exit+0x82/frame 0xfffffe09519aaf30 > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe09519aaf30 > --- trap 0x26d90a2f, rip = 0xbba54c81b25fd8d4, rsp = 0xff60c2f6f9874bcd, rbp = 0x37940e3e9793bd40 -- > > I have two cores dumped for this panic. > > Our previous version is based on 9c0a2d522f3a18fc795a7dd6266d2be2aff4b084, which > I guess has the most recent ZFS merge openzfs/zfs@009d3288d. > > On Sun, Aug 27, 2023 at 05:09:06AM +0000, Martin Matuska wrote: > M> The branch main has been updated by mm: > M> > M> URL: https://cgit.FreeBSD.org/src/commit/?id=315ee00fa9616b0a192b6834911f98bcf5316a6b > M> > M> commit 315ee00fa9616b0a192b6834911f98bcf5316a6b > M> Merge: b3a714652ff0 804414aad224 > M> Author: Martin Matuska > M> AuthorDate: 2023-08-26 21:20:04 +0000 > M> Commit: Martin Matuska > M> CommitDate: 2023-08-26 21:51:42 +0000 > M> > M> zfs: merge openzfs/zfs@804414aad > M> > M> Notable upstream pull request merges: > M> #15024 Add missed DMU_PROJECTUSED_OBJECT prefetch > M> #15029 Do not request data L1 buffers on scan prefetch > M> #15036 FreeBSD: catch up to __FreeBSD_version 1400093 > M> #15039 Fix raw receive with different indirect block size > M> #15047 FreeBSD: Fix build on stable/13 after 1302506 > M> #15049 Fix the ZFS checksum error histograms with larger record sizes > M> #15052 Reduce bloat in ereport.fs.zfs.checksum events > M> #15056 Avoid extra snprintf() in dsl_deadlist_merge() > M> #15061 Ignore pool ashift property during vdev attachment > M> #15063 Don't panic if setting vdev properties is unsupported for this vdev type > M> #15067 spa_min_alloc should be GCD, not min > M> #15071 Add explicit prefetches to bpobj_iterate() > M> #15072 Adjust prefetch parameters > M> #15076 Refactor dmu_prefetch() > M> #15079 set autotrim default to 'off' everywhere > M> #15080 ZIL: Fix config lock deadlock > M> #15088 metaslab: tuneable to better control force ganging > M> #15096 Avoid waiting in dmu_sync_late_arrival() > M> #15097 BRT should return EOPNOTSUPP > M> #15103 Remove zl_issuer_lock from zil_suspend() > M> #15107 Remove fastwrite mechanism > M> #15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1 > M> #15122 ZIL: Second attempt to reduce scope of zl_issuer_lock > M> #15129 zpool_vdev_remove() should handle EALREADY error return > M> #15132 ZIL: Replay blocks without next block pointer > M> #15148 zfs_clone_range should return descriptive error codes > M> #15153 ZIL: Avoid dbuf_read() before dmu_sync() > M> #15172 copy_file_range: fix fallback when source create on same txg > M> #15180 Update outdated assertion from zio_write_compress > M> > M> Obtained from: OpenZFS > M> OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13 > M> > M> Makefile.inc1 | 5 +- > M> cddl/lib/libzfs/Makefile | 1 + > M> cddl/lib/libzfs/Makefile.depend | 1 + > M> rescue/rescue/Makefile | 2 +- > M> rescue/rescue/Makefile.depend | 1 + > M> share/mk/src.libnames.mk | 2 +- > M> sys/contrib/openzfs/META | 6 +- > M> sys/contrib/openzfs/cmd/zdb/zdb.c | 77 ++- > M> sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c | 2 - > M> sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c | 5 + > M> .../openzfs/cmd/zed/zed.d/statechange-slot_off.sh | 61 ++ > M> sys/contrib/openzfs/cmd/zed/zed.d/zed.rc | 5 + > M> sys/contrib/openzfs/cmd/ztest.c | 2 +- > M> sys/contrib/openzfs/config/Shellcheck.am | 3 +- > M> sys/contrib/openzfs/config/kernel-blkdev.m4 | 138 +++- > M> .../config/kernel-block-device-operations.m4 | 35 +- > M> .../openzfs/config/kernel-filemap-splice-read.m4 | 25 + > M> .../openzfs/config/kernel-register_sysctl_table.m4 | 27 + > M> .../config/kernel-vfs-extended-file_range.m4 | 50 ++ > M> .../openzfs/config/kernel-vfs-file_range.m4 | 164 +++++ > M> sys/contrib/openzfs/config/kernel-vfs-iov_iter.m4 | 26 +- > M> sys/contrib/openzfs/config/kernel.m4 | 16 + > M> sys/contrib/openzfs/contrib/debian/changelog | 6 + > M> .../contrib/debian/openzfs-zfs-test.install | 2 - > M> .../contrib/debian/openzfs-zfsutils.install | 2 + > M> .../contrib/dracut/90zfs/zfs-env-bootfs.service.in | 11 +- > M> .../dracut/90zfs/zfs-rollback-bootfs.service.in | 2 +- > M> .../openzfs/include/os/freebsd/spl/sys/vnode.h | 6 +- > M> .../include/os/linux/kernel/linux/blkdev_compat.h | 17 + > M> .../openzfs/include/os/linux/spl/sys/kmem_cache.h | 8 + > M> .../openzfs/include/os/linux/spl/sys/types.h | 2 +- > M> sys/contrib/openzfs/include/os/linux/spl/sys/uio.h | 12 + > M> sys/contrib/openzfs/include/os/linux/zfs/sys/zpl.h | 53 ++ > M> sys/contrib/openzfs/include/sys/bpobj.h | 2 +- > M> sys/contrib/openzfs/include/sys/brt.h | 1 + > M> sys/contrib/openzfs/include/sys/dmu.h | 5 + > M> sys/contrib/openzfs/include/sys/dmu_impl.h | 2 - > M> sys/contrib/openzfs/include/sys/dmu_zfetch.h | 2 - > M> sys/contrib/openzfs/include/sys/fm/fs/zfs.h | 4 - > M> sys/contrib/openzfs/include/sys/metaslab.h | 3 - > M> sys/contrib/openzfs/include/sys/metaslab_impl.h | 6 +- > M> sys/contrib/openzfs/include/sys/spa_impl.h | 1 + > M> sys/contrib/openzfs/include/sys/vdev_impl.h | 2 +- > M> sys/contrib/openzfs/include/sys/zil_impl.h | 44 +- > M> sys/contrib/openzfs/include/sys/zio.h | 1 - > M> sys/contrib/openzfs/include/sys/zio_checksum.h | 2 - > M> sys/contrib/openzfs/lib/libzfs/Makefile.am | 2 +- > M> sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 6 + > M> sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 95 ++- > M> sys/contrib/openzfs/man/man4/zfs.4 | 10 +- > M> sys/contrib/openzfs/man/man8/zfs-send.8 | 18 +- > M> sys/contrib/openzfs/man/man8/zpool-events.8 | 23 +- > M> sys/contrib/openzfs/module/Kbuild.in | 1 + > M> .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 10 +- > M> sys/contrib/openzfs/module/os/linux/spl/spl-proc.c | 26 +- > M> .../openzfs/module/os/linux/zfs/vdev_disk.c | 65 +- > M> .../openzfs/module/os/linux/zfs/zfs_ctldir.c | 26 +- > M> .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 7 + > M> .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 9 +- > M> .../openzfs/module/os/linux/zfs/zfs_znode.c | 8 + > M> .../openzfs/module/os/linux/zfs/zpl_ctldir.c | 2 +- > M> sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 44 +- > M> .../openzfs/module/os/linux/zfs/zpl_file_range.c | 272 ++++++++ > M> .../openzfs/module/os/linux/zfs/zpl_super.c | 39 +- > M> sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 28 +- > M> sys/contrib/openzfs/module/zfs/bpobj.c | 49 +- > M> sys/contrib/openzfs/module/zfs/brt.c | 43 +- > M> sys/contrib/openzfs/module/zfs/dbuf.c | 11 +- > M> sys/contrib/openzfs/module/zfs/dmu.c | 127 ++-- > M> sys/contrib/openzfs/module/zfs/dmu_recv.c | 22 +- > M> sys/contrib/openzfs/module/zfs/dmu_zfetch.c | 12 +- > M> sys/contrib/openzfs/module/zfs/dnode.c | 31 +- > M> sys/contrib/openzfs/module/zfs/dsl_deadlist.c | 14 +- > M> sys/contrib/openzfs/module/zfs/dsl_scan.c | 17 +- > M> sys/contrib/openzfs/module/zfs/metaslab.c | 83 +-- > M> sys/contrib/openzfs/module/zfs/spa_log_spacemap.c | 4 +- > M> sys/contrib/openzfs/module/zfs/spa_misc.c | 1 + > M> sys/contrib/openzfs/module/zfs/vdev.c | 90 ++- > M> sys/contrib/openzfs/module/zfs/vdev_indirect.c | 2 +- > M> sys/contrib/openzfs/module/zfs/vdev_raidz.c | 2 +- > M> sys/contrib/openzfs/module/zfs/zfs_fm.c | 33 +- > M> sys/contrib/openzfs/module/zfs/zfs_vnops.c | 46 +- > M> sys/contrib/openzfs/module/zfs/zil.c | 719 +++++++++------------ > M> sys/contrib/openzfs/module/zfs/zio.c | 45 +- > M> sys/contrib/openzfs/module/zfs/zio_checksum.c | 2 - > M> sys/contrib/openzfs/module/zfs/zvol.c | 8 +- > M> sys/contrib/openzfs/tests/runfiles/linux.run | 11 + > M> .../openzfs/tests/test-runner/bin/zts-report.py.in | 18 + > M> sys/contrib/openzfs/tests/zfs-tests/cmd/.gitignore | 1 + > M> .../openzfs/tests/zfs-tests/cmd/Makefile.am | 1 + > M> .../openzfs/tests/zfs-tests/cmd/clonefile.c | 333 ++++++++++ > M> sys/contrib/openzfs/tests/zfs-tests/cmd/readmmap.c | 1 + > M> .../openzfs/tests/zfs-tests/include/commands.cfg | 1 + > M> .../openzfs/tests/zfs-tests/tests/Makefile.am | 14 + > M> .../functional/block_cloning/block_cloning.kshlib | 54 ++ > M> .../block_cloning/block_cloning_copyfilerange.ksh | 60 ++ > M> .../block_cloning_copyfilerange_cross_dataset.ksh | 65 ++ > M> .../block_cloning_copyfilerange_fallback.ksh | 86 +++ > M> ...ock_cloning_copyfilerange_fallback_same_txg.ksh | 66 ++ > M> .../block_cloning_copyfilerange_partial.ksh | 68 ++ > M> .../block_cloning_disabled_copyfilerange.ksh | 60 ++ > M> .../block_cloning_disabled_ficlone.ksh | 50 ++ > M> .../block_cloning_disabled_ficlonerange.ksh | 50 ++ > M> .../block_cloning/block_cloning_ficlone.ksh | 56 ++ > M> .../block_cloning/block_cloning_ficlonerange.ksh | 56 ++ > M> .../block_cloning_ficlonerange_partial.ksh | 64 ++ > M> .../tests/functional/block_cloning/cleanup.ksh | 34 + > M> .../tests/functional/block_cloning/setup.ksh | 36 ++ > M> .../cli_root/zpool_attach/attach-o_ashift.ksh | 30 +- > M> .../cli_root/zpool_replace/replace-o_ashift.ksh | 32 +- > M> .../cli_root/zpool_replace/replace_prop_ashift.ksh | 24 +- > M> sys/modules/zfs/zfs_config.h | 53 +- > M> sys/modules/zfs/zfs_gitrev.h | 2 +- > M> 113 files changed, 3322 insertions(+), 906 deletions(-) > M> > M> diff --cc Makefile.inc1 > M> index 8838d31c795a,000000000000..f740cc5abcca > M> mode 100644,000000..100644 > M> --- a/Makefile.inc1 > M> +++ b/Makefile.inc1 > M> @@@ -1,3692 -1,0 +1,3695 @@@ > M> +# > M> +# > M> +# Make command line options: > M> +# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir > M> +# -DNO_CLEAN do not clean at all > M> +# -DDB_FROM_SRC use the user/group databases in src/etc instead of > M> +# the system database when installing. > M> +# -DNO_SHARE do not go into share subdir > M> +# -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,OBJ} > M> +# -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel > M> +# -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel > M> +# -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} buildkernel > M> +# -DNO_ROOT install without using root privilege > M> +# -DWITHOUT_CTF do not run the DTrace CTF conversion tools on built objects > M> +# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list > M> +# LOCAL_ITOOLS="list of tools" to add additional tools to the ITOOLS list > M> +# LOCAL_LIB_DIRS="list of dirs" to add additional dirs to libraries target > M> +# LOCAL_MTREE="list of mtree files" to process to allow local directories > M> +# to be created before files are installed > M> +# LOCAL_LEGACY_DIRS="list of dirs" to add additional dirs to the legacy > M> +# target > M> +# LOCAL_BSTOOL_DIRS="list of dirs" to add additional dirs to the > M> +# bootstrap-tools target > M> +# LOCAL_TOOL_DIRS="list of dirs" to add additional dirs to the build-tools > M> +# target > M> +# LOCAL_XTOOL_DIRS="list of dirs" to add additional dirs to the > M> +# cross-tools target > M> +# METALOG="path to metadata log" to write permission and ownership > M> +# when NO_ROOT is set. (default: ${DESTDIR}/${DISTDIR}/METALOG, > M> +# check /etc/make.conf for DISTDIR) > M> +# TARGET="machine" to crossbuild world for a different machine type > M> +# TARGET_ARCH= may be required when a TARGET supports multiple endians > M> +# BUILDENV_SHELL= shell to launch for the buildenv target (def:${SHELL}) > M> +# WORLD_FLAGS= additional flags to pass to make(1) during buildworld > M> +# KERNEL_FLAGS= additional flags to pass to make(1) during buildkernel > M> +# SUBDIR_OVERRIDE="list of dirs" to build rather than everything. > M> +# All libraries and includes, and some build tools will still build. > M> + > M> +# > M> +# The intended user-driven targets are: > M> +# buildworld - rebuild *everything*, including glue to help do upgrades > M> +# installworld- install everything built by "buildworld" > M> +# checkworld - run test suite on installed world > M> +# doxygen - build API documentation of the kernel > M> +# > M> +# Standard targets (not defined here) are documented in the makefiles in > M> +# /usr/share/mk. These include: > M> +# obj depend all install clean cleandepend cleanobj > M> + > M> +.if !defined(TARGET) || !defined(TARGET_ARCH) > M> +.error Both TARGET and TARGET_ARCH must be defined. > M> +.endif > M> + > M> +.if make(showconfig) || make(test-system-*) > M> +_MKSHOWCONFIG= t > M> +.endif > M> + > M> +SRCDIR?= ${.CURDIR} > M> +LOCALBASE?= /usr/local > M> +TIME_ENV ?= time env > M> + > M> +.include "share/mk/src.tools.mk" > M> + > M> +# Cross toolchain changes must be in effect before bsd.compiler.mk > M> +# so that gets the right CC, and pass CROSS_TOOLCHAIN to submakes. > M> +.if defined(CROSS_TOOLCHAIN) > M> +.if exists(${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk) > M> +.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" > M> +.elif exists(${CROSS_TOOLCHAIN}) > M> +.include "${CROSS_TOOLCHAIN}" > M> +.else > M> +.error CROSS_TOOLCHAIN ${CROSS_TOOLCHAIN} not found > M> +.endif > M> +CROSSENV+=CROSS_TOOLCHAIN="${CROSS_TOOLCHAIN}" > M> +.elif defined(UNIVERSE_TOOLCHAIN) > M> +UNIVERSE_TOOLCHAIN_PATH?=${HOST_OBJTOP}/tmp/usr/bin > M> +XCC?="${UNIVERSE_TOOLCHAIN_PATH}/cc" > M> +XCXX?="${UNIVERSE_TOOLCHAIN_PATH}/c++" > M> +XCPP?="${UNIVERSE_TOOLCHAIN_PATH}/cpp" > M> +XLD?="${UNIVERSE_TOOLCHAIN_PATH}/ld" > M> +.endif > M> +.if defined(CROSS_TOOLCHAIN_PREFIX) > M> +CROSS_COMPILER_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} > M> +.endif > M> + > M> +XCOMPILERS= CC CXX CPP > M> +.for COMPILER in ${XCOMPILERS} > M> +.if defined(CROSS_COMPILER_PREFIX) > M> +X${COMPILER}?= ${CROSS_COMPILER_PREFIX}${${COMPILER}} > M> +.else > M> +X${COMPILER}?= ${${COMPILER}} > M> +.endif > M> +.endfor > M> +# If a full path to an external cross compiler is given, don't build > M> +# a cross compiler. > M> +.if ${XCC:N${CCACHE_BIN}:M/*} > M> +MK_CLANG_BOOTSTRAP= no > M> +# Make sure sub-makes see the option as disabled so the hack in bsd.sys.mk to > M> +# work around incompatible headers in Clang's resource directory is enabled. > M> +.MAKEOVERRIDES+= MK_CLANG_BOOTSTRAP > M> +.endif > M> + > M> +# Pull in compiler metadata from buildworld/toolchain if possible to avoid > M> +# running CC from bsd.compiler.mk. > M> +.if make(installworld) || make(install) || make(distributeworld) || \ > M> + make(stageworld) > M> +.-include "${OBJTOP}/toolchain-metadata.mk" > M> +.if !defined(_LOADED_TOOLCHAIN_METADATA) > M> +.error A build is required first. You may have the wrong MAKEOBJDIRPREFIX set. > M> +.endif > M> +.endif > M> + > M> +# Pull in COMPILER_TYPE and COMPILER_FREEBSD_VERSION early. Pull it from the > M> +# tree to be friendlier to foreign OS builds. It's safe to do so unconditionally > M> +# here since we will always have the right make, unlike in src/Makefile > M> +# Don't include bsd.linker.mk yet until XBINUTILS is handled (after src.opts.mk) > M> +_NO_INCLUDE_LINKERMK= t > M> +# We also want the X_COMPILER* variables if we are using an external toolchain. > M> +_WANT_TOOLCHAIN_CROSS_VARS= t > M> +.include "share/mk/bsd.compiler.mk" > M> +.undef _NO_INCLUDE_LINKERMK > M> +.undef _WANT_TOOLCHAIN_CROSS_VARS > M> +# src.opts.mk depends on COMPILER_FEATURES > M> +.include "share/mk/src.opts.mk" > M> + > M> +.if ${TARGET} == ${MACHINE} > M> +TARGET_CPUTYPE?=${CPUTYPE} > M> +.else > M> +TARGET_CPUTYPE?= > M> +.endif > M> +.if !empty(TARGET_CPUTYPE) > M> +_TARGET_CPUTYPE=${TARGET_CPUTYPE} > M> +.else > M> +_TARGET_CPUTYPE=dummy > M> +.endif > M> +.if ${TARGET} == "arm" > M> +.if ${TARGET_CPUTYPE:M*soft*} == "" > M> +TARGET_TRIPLE_ABI= gnueabihf > M> +.else > M> +TARGET_TRIPLE_ABI= gnueabi > M> +.endif > M> +.endif > M> +MACHINE_TRIPLE_ABI?= unknown > M> +MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/}-${MACHINE_TRIPLE_ABI}-freebsd${OS_REVISION} > M> +TARGET_TRIPLE_ABI?= unknown > M> +TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/}-${TARGET_TRIPLE_ABI}-freebsd${OS_REVISION} > M> +KNOWN_ARCHES?= aarch64/arm64 \ > M> + amd64 \ > M> + armv6/arm \ > M> + armv7/arm \ > M> + i386 \ > M> + powerpc \ > M> + powerpc64/powerpc \ > M> + powerpc64le/powerpc \ > M> + powerpcspe/powerpc \ > M> + riscv64/riscv > M> + > M> +.if ${TARGET} == ${TARGET_ARCH} > M> +_t= ${TARGET} > M> +.else > M> +_t= ${TARGET_ARCH}/${TARGET} > M> +.endif > M> +.for _t in ${_t} > M> +.if empty(KNOWN_ARCHES:M${_t}) > M> +.error Unknown target ${TARGET_ARCH}:${TARGET}. > M> +.endif > M> +.endfor > M> + > M> +.if ${TARGET_ARCH} == "amd64" > M> +LIBCOMPAT_INCLUDE_DIRS+= i386 > M> +.elif ${TARGET_ARCH} == "aarch64" > M> +LIBCOMPAT_INCLUDE_DIRS+= arm > M> +.endif > M> + > M> +.if ${.MAKE.OS} != "FreeBSD" > M> +CROSSBUILD_HOST=${.MAKE.OS} > M> +.if ${.MAKE.OS} != "Linux" && ${.MAKE.OS} != "Darwin" > M> +.warning Unsupported crossbuild system: ${.MAKE.OS}. Build will probably fail! > M> +.endif > M> +# We need to force NO_ROOT/DB_FROM_SRC builds when building on other operating > M> +# systems since the BSD.foo.dist specs contain users and groups that do not > M> +# exist by default on a Linux/MacOS system. > M> +NO_ROOT:= 1 > M> +DB_FROM_SRC:= 1 > M> +.export NO_ROOT > M> +.endif > M> + > M> +# If all targets are disabled for system llvm then don't expect it to work > M> +# for cross-builds. > M> +.if !defined(TOOLS_PREFIX) && ${MK_LLVM_TARGET_ALL} == "no" && \ > M> + ${MACHINE} != ${TARGET} && ${MACHINE_ARCH} != ${TARGET_ARCH} && \ > M> + !make(showconfig) > M> +MK_SYSTEM_COMPILER= no > M> +MK_SYSTEM_LINKER= no > M> +.endif > M> + > M> +# Handle external binutils. > M> +.if defined(CROSS_TOOLCHAIN_PREFIX) > M> +CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} > M> +.endif > M> +XBINUTILS= AS AR ELFCTL LD NM OBJCOPY RANLIB SIZE STRINGS STRIPBIN > M> +.for BINUTIL in ${XBINUTILS} > M> +.if defined(CROSS_BINUTILS_PREFIX) && \ > M> + exists(${CROSS_BINUTILS_PREFIX}/${${BINUTIL}}) > M> +X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX:C,/*$,,}/${${BINUTIL}} > M> +.else > M> +X${BINUTIL}?= ${${BINUTIL}} > M> +.endif > M> +.endfor > M> + > M> +# If a full path to an external linker is given, don't build lld. > M> +.if ${XLD:M/*} > M> +MK_LLD_BOOTSTRAP= no > M> +.endif > M> + > M> +# We also want the X_LINKER* variables if we are using an external toolchain. > M> +_WANT_TOOLCHAIN_CROSS_VARS= t > M> +.include "share/mk/bsd.linker.mk" > M> +.undef _WANT_TOOLCHAIN_CROSS_VARS > M> + > M> +# Begin WITH_SYSTEM_COMPILER / WITH_SYSTEM_LD > M> + > M> +# WITH_SYSTEM_COMPILER - Pull in needed values and make a decision. > M> + > M> +# Check if there is a local compiler that can satisfy as an external compiler. > M> +# Which compiler is expected to be used? > M> +.if ${MK_CLANG_BOOTSTRAP} == "yes" > M> +WANT_COMPILER_TYPE= clang > M> +.else > M> +WANT_COMPILER_TYPE= > M> +.endif > M> + > M> +.if !defined(WANT_COMPILER_FREEBSD_VERSION) && !make(showconfig) && \ > M> + !make(test-system-linker) > M> +.if ${WANT_COMPILER_TYPE} == "clang" > M> +WANT_COMPILER_FREEBSD_VERSION_FILE= lib/clang/freebsd_cc_version.h > M> +WANT_COMPILER_FREEBSD_VERSION!= \ > M> + awk '$$2 == "FREEBSD_CC_VERSION" {printf("%d\n", $$3)}' \ > M> + ${SRCDIR}/${WANT_COMPILER_FREEBSD_VERSION_FILE} || echo unknown > M> +WANT_COMPILER_VERSION_FILE= lib/clang/include/clang/Basic/Version.inc > M> +WANT_COMPILER_VERSION!= \ > M> + awk '$$2 == "CLANG_VERSION" {split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \ > M> + ${SRCDIR}/${WANT_COMPILER_VERSION_FILE} || echo unknown > M> +.endif > M> +.export WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_VERSION > M> +.endif # !defined(WANT_COMPILER_FREEBSD_VERSION) > M> + > M> +# It needs to be the same revision as we would build for the bootstrap. > M> +# If the expected vs CC is different then we can't skip. > M> +# GCC cannot be used for cross-arch yet. For clang we pass -target later if > M> +# TARGET_ARCH!=MACHINE_ARCH. > M> +.if ${MK_SYSTEM_COMPILER} == "yes" && \ > M> + defined(WANT_COMPILER_FREEBSD_VERSION) && \ > M> + ${MK_CLANG_BOOTSTRAP} == "yes" && \ > M> + !make(xdev*) && \ > M> + ${X_COMPILER_TYPE} == ${WANT_COMPILER_TYPE} && \ > M> + (${X_COMPILER_TYPE} == "clang" || ${TARGET_ARCH} == ${MACHINE_ARCH}) && \ > M> + ${X_COMPILER_VERSION} == ${WANT_COMPILER_VERSION} && \ > M> + ${X_COMPILER_FREEBSD_VERSION} == ${WANT_COMPILER_FREEBSD_VERSION} > M> +# Everything matches, disable the bootstrap compiler. > M> +MK_CLANG_BOOTSTRAP= no > M> +USING_SYSTEM_COMPILER= yes > M> +.endif # ${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} > M> + > M> +# WITH_SYSTEM_LD - Pull in needed values and make a decision. > M> + > M> +# Check if there is a local linker that can satisfy as an external linker. > M> +# Which linker is expected to be used? > M> +.if ${MK_LLD_BOOTSTRAP} == "yes" > M> +WANT_LINKER_TYPE= lld > M> +.else > M> +WANT_LINKER_TYPE= > M> +.endif > M> + > M> +.if !defined(WANT_LINKER_FREEBSD_VERSION) && !make(showconfig) && \ > M> + !make(test-system-compiler) > M> +.if ${WANT_LINKER_TYPE} == "lld" > M> +WANT_LINKER_FREEBSD_VERSION_FILE= lib/clang/include/lld/Common/Version.inc > M> +WANT_LINKER_FREEBSD_VERSION!= \ > M> + awk '$$2 == "LLD_FREEBSD_VERSION" {print $$3}' \ > M> + ${SRCDIR}/${WANT_LINKER_FREEBSD_VERSION_FILE} || echo unknown > M> +WANT_LINKER_VERSION_FILE= lib/clang/include/lld/Common/Version.inc > M> +WANT_LINKER_VERSION!= \ > M> + awk '$$2 == "LLD_VERSION_STRING" {gsub("\"", "", $$3); split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \ > M> + ${SRCDIR}/${WANT_LINKER_VERSION_FILE} || echo unknown > M> +.else > M> +WANT_LINKER_FREEBSD_VERSION_FILE= > M> +WANT_LINKER_FREEBSD_VERSION= > M> +.endif > M> +.export WANT_LINKER_FREEBSD_VERSION WANT_LINKER_VERSION > M> +.endif # !defined(WANT_LINKER_FREEBSD_VERSION) > M> + > M> +.if ${MK_SYSTEM_LINKER} == "yes" && \ > M> + defined(WANT_LINKER_FREEBSD_VERSION) && \ > M> + (${MK_LLD_BOOTSTRAP} == "yes") && \ > M> + !make(xdev*) && \ > M> + ${X_LINKER_TYPE} == ${WANT_LINKER_TYPE} && \ > M> + ${X_LINKER_VERSION} == ${WANT_LINKER_VERSION} && \ > M> + ${X_LINKER_FREEBSD_VERSION} == ${WANT_LINKER_FREEBSD_VERSION} > M> +# Everything matches, disable the bootstrap linker. > M> +MK_LLD_BOOTSTRAP= no > M> +USING_SYSTEM_LINKER= yes > M> +.endif # ${WANT_LINKER_TYPE} == ${LINKER_TYPE} > M> + > M> +# WITH_SYSTEM_COMPILER / WITH_SYSTEM_LINKER - Handle defaults and debug. > M> +USING_SYSTEM_COMPILER?= no > M> +USING_SYSTEM_LINKER?= no > M> + > M> +TEST_SYSTEM_COMPILER_VARS= \ > M> + USING_SYSTEM_COMPILER MK_SYSTEM_COMPILER \ > M> + MK_CROSS_COMPILER MK_CLANG_BOOTSTRAP \ > M> + WANT_COMPILER_TYPE WANT_COMPILER_VERSION WANT_COMPILER_VERSION_FILE \ > M> + WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_FREEBSD_VERSION_FILE \ > M> + CC COMPILER_TYPE COMPILER_FEATURES COMPILER_VERSION \ > M> + COMPILER_FREEBSD_VERSION \ > M> + XCC X_COMPILER_TYPE X_COMPILER_FEATURES X_COMPILER_VERSION \ > M> + X_COMPILER_FREEBSD_VERSION > M> +TEST_SYSTEM_LINKER_VARS= \ > M> + USING_SYSTEM_LINKER MK_SYSTEM_LINKER \ > M> + MK_LLD_BOOTSTRAP \ > M> + WANT_LINKER_TYPE WANT_LINKER_VERSION WANT_LINKER_VERSION_FILE \ > M> + WANT_LINKER_FREEBSD_VERSION WANT_LINKER_FREEBSD_VERSION_FILE \ > M> + LD LINKER_TYPE LINKER_FEATURES LINKER_VERSION \ > M> + LINKER_FREEBSD_VERSION \ > M> + XLD X_LINKER_TYPE X_LINKER_FEATURES X_LINKER_VERSION \ > M> + X_LINKER_FREEBSD_VERSION > M> + > M> +.for _t in compiler linker > M> +test-system-${_t}: .PHONY > M> +.for v in ${TEST_SYSTEM_${_t:tu}_VARS} > M> + ${_+_}@printf "%-35s= %s\n" "${v}" "${${v}}" > M> +.endfor > M> +.endfor > M> +.if (make(buildworld) || make(buildkernel) || make(kernel-toolchain) || \ > M> + make(toolchain) || make(_cross-tools)) > M> +.if ${USING_SYSTEM_COMPILER} == "yes" > M> +.info SYSTEM_COMPILER: Determined that CC=${CC} matches the source tree. Not bootstrapping a cross-compiler. > M> +.elif ${MK_CLANG_BOOTSTRAP} == "yes" > M> +.info SYSTEM_COMPILER: libclang will be built for bootstrapping a cross-compiler. > M> +.endif > M> +.if ${USING_SYSTEM_LINKER} == "yes" > M> +.info SYSTEM_LINKER: Determined that LD=${LD} matches the source tree. Not bootstrapping a cross-linker. > M> +.elif ${MK_LLD_BOOTSTRAP} == "yes" > M> +.info SYSTEM_LINKER: libclang will be built for bootstrapping a cross-linker. > M> +.endif > M> +.endif > M> + > M> +# End WITH_SYSTEM_COMPILER / WITH_SYSTEM_LD > M> + > M> +# Store some compiler metadata for use in installworld where we don't > M> +# want to invoke CC at all. > M> +_TOOLCHAIN_METADATA_VARS= COMPILER_VERSION \ > M> + COMPILER_TYPE \ > M> + COMPILER_FEATURES \ > M> + COMPILER_FREEBSD_VERSION \ > M> + COMPILER_RESOURCE_DIR \ > M> + LINKER_VERSION \ > M> + LINKER_FEATURES \ > M> + LINKER_TYPE \ > M> + LINKER_FREEBSD_VERSION > M> +toolchain-metadata.mk: .PHONY .META > M> + @: > ${.TARGET} > M> + @echo ".info Using cached toolchain metadata from build at $$(hostname) on $$(date)" \ > M> + > ${.TARGET} > M> + @echo "_LOADED_TOOLCHAIN_METADATA=t" >> ${.TARGET} > M> +.for v in ${_TOOLCHAIN_METADATA_VARS} > M> + @echo "${v}=${${v}}" >> ${.TARGET} > M> + @echo "X_${v}=${X_${v}}" >> ${.TARGET} > M> +.endfor > M> + @echo ".export ${_TOOLCHAIN_METADATA_VARS}" >> ${.TARGET} > M> + @echo ".export ${_TOOLCHAIN_METADATA_VARS:C,^,X_,}" >> ${.TARGET} > M> + > M> + > M> +# We must do lib/ and libexec/ before bin/ in case of a mid-install error to > M> +# keep the users system reasonably usable. For static->dynamic root upgrades, > M> +# we don't want to install a dynamic binary without rtld and the needed > M> +# libraries. More commonly, for dynamic root, we don't want to install a > M> +# binary that requires a newer library version that hasn't been installed yet. > M> +# This ordering is not a guarantee though. The only guarantee of a working > M> +# system here would require fine-grained ordering of all components based > M> +# on their dependencies. > M> +.if !empty(SUBDIR_OVERRIDE) > M> +SUBDIR= ${SUBDIR_OVERRIDE} > M> +.else > M> +SUBDIR= lib libexec > M> +# Add LOCAL_LIB_DIRS, but only if they will not be picked up as a SUBDIR > M> +# of a LOCAL_DIRS directory. This allows LOCAL_DIRS=foo and > M> +# LOCAL_LIB_DIRS=foo/lib to behave as expected. > M> +.for _DIR in ${LOCAL_DIRS:M*/} ${LOCAL_DIRS:N*/:S|$|/|} > M> +_REDUNDANT_LIB_DIRS+= ${LOCAL_LIB_DIRS:M${_DIR}*} > M> +.endfor > M> +.for _DIR in ${LOCAL_LIB_DIRS} > M> +.if ${_DIR} == ".WAIT" || (empty(_REDUNDANT_LIB_DIRS:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile)) > M> +SUBDIR+= ${_DIR} > M> +.endif > M> +.endfor > M> +.if !defined(NO_ROOT) && (make(installworld) || make(install)) > M> +# Ensure libraries are installed before progressing. > M> +SUBDIR+=.WAIT > M> +.endif > M> +SUBDIR+=bin > M> +.if ${MK_CDDL} != "no" > M> +SUBDIR+=cddl > M> +.endif > M> +SUBDIR+=gnu include > M> +.if ${MK_KERBEROS} != "no" > M> +SUBDIR+=kerberos5 > M> +.endif > M> +.if ${MK_RESCUE} != "no" > M> +SUBDIR+=rescue > M> +.endif > M> +SUBDIR+=sbin > M> +.if ${MK_CRYPT} != "no" > M> +SUBDIR+=secure > M> +.endif > M> +.if !defined(NO_SHARE) > M> +SUBDIR+=share > M> +.endif > M> +.if ${MK_BOOT} != "no" > M> +SUBDIR+=stand > M> +.endif > M> +SUBDIR+=sys usr.bin usr.sbin > M> +.if ${MK_TESTS} != "no" > M> +SUBDIR+= tests > M> +.endif > M> + > M> +# Local directories are built in parallel with the base system directories. > M> +# Users may insert a .WAIT directive at the beginning or elsewhere within > M> +# the LOCAL_DIRS and LOCAL_LIB_DIRS lists as needed. > M> +.for _DIR in ${LOCAL_DIRS} > M> +.if ${_DIR} == ".WAIT" || exists(${.CURDIR}/${_DIR}/Makefile) > M> +SUBDIR+= ${_DIR} > M> +.endif > M> +.endfor > M> + > M> +# We must do etc/ last as it hooks into building the man whatis file > M> +# by calling 'makedb' in share/man. This is only relevant for > M> +# install/distribute so they build the whatis file after every manpage is > M> +# installed. > M> +.if make(installworld) || make(install) > M> +SUBDIR+=.WAIT > M> +.endif > M> +SUBDIR+=etc > M> + > M> +.endif # !empty(SUBDIR_OVERRIDE) > M> + > M> +.if defined(NOCLEAN) > M> +.warning The src.conf WITHOUT_CLEAN option can now be used instead of NOCLEAN. > M> +MK_CLEAN:= no > M> +.endif > M> +.if defined(NO_CLEAN) > M> +.info The src.conf WITHOUT_CLEAN option can now be used instead of NO_CLEAN. > M> +MK_CLEAN:= no > M> +.endif > M> +.if defined(NO_CLEANDIR) > M> +CLEANDIR= clean cleandepend > M> +.else > M> +CLEANDIR= cleandir > M> +.endif > M> + > M> +.if defined(WORLDFAST) > M> +MK_CLEAN:= no > M> +NO_OBJWALK= t > M> +.endif > M> + > M> +.if ${MK_META_MODE} == "yes" > M> +# If filemon is used then we can rely on the build being incremental-safe. > M> +# The .meta files will also track the build command and rebuild should > M> +# it change. > M> +.if empty(.MAKE.MODE:Mnofilemon) > M> +MK_CLEAN:= no > M> +.endif > M> +.endif > M> +.if defined(NO_OBJWALK) || ${MK_AUTO_OBJ} == "yes" > M> +NO_OBJWALK= t > M> +NO_KERNELOBJ= t > M> +.endif > M> +.if !defined(NO_OBJWALK) > M> +_obj= obj > M> +.endif > M> + > M> +LOCAL_TOOL_DIRS?= > M> +PACKAGEDIR?= ${DESTDIR}/${DISTDIR} > M> + > M> +.if empty(SHELL:M*csh*) > M> +BUILDENV_SHELL?=${SHELL} > M> +.else > M> +BUILDENV_SHELL?=/bin/sh > M> +.endif > M> + > M> +.if !defined(_MKSHOWCONFIG) > M> +.if !defined(VCS_REVISION) || empty(VCS_REVISION) > M> +.if !defined(SVNVERSION_CMD) || empty(SVNVERSION_CMD) > M> +. for _D in ${PATH:S,:, ,g} > M> +. if exists(${_D}/svnversion) > M> +SVNVERSION_CMD?=${_D}/svnversion > M> +. endif > M> +. if exists(${_D}/svnliteversion) > M> +SVNVERSION_CMD?=${_D}/svnliteversion > M> +. endif > M> +. endfor > M> +.endif > M> +.if defined(SVNVERSION_CMD) && !empty(SVNVERSION_CMD) > M> +_VCS_REVISION?= $$(eval ${SVNVERSION_CMD} ${SRCDIR}) > M> +. if !empty(_VCS_REVISION) > M> +VCS_REVISION= $$(echo r${_VCS_REVISION}) > M> +.export VCS_REVISION > M> +. endif > M> +.endif > M> +.endif > M> + > M> +.if !defined(GIT_CMD) || empty(GIT_CMD) > M> +. for _P in /usr/bin /usr/local/bin > M> +. if exists(${_P}/git) > M> +GIT_CMD= ${_P}/git > M> +. endif > M> +. endfor > M> +.export GIT_CMD > M> +.endif > M> + > M> +.if !defined(OSRELDATE) > M> +.if exists(/usr/include/osreldate.h) > M> +OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ > M> + /usr/include/osreldate.h > M> +.else > M> +OSRELDATE= 0 > M> +.endif > M> +.export OSRELDATE > M> +.endif > M> + > M> +# Set VERSION for CTFMERGE to use via the default CTFFLAGS=-L VERSION. > M> +.for _V in BRANCH REVISION TYPE > M> +.if !defined(_${_V}) > M> +_${_V}!= eval $$(awk '/^${_V}=/{print}' ${SRCTOP}/sys/conf/newvers.sh); echo $$${_V} > M> +.export _${_V} > M> +.endif > M> +.endfor > M> +.if !defined(SRCRELDATE) > M> +SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ > M> + ${SRCDIR}/sys/sys/param.h > M> +.export SRCRELDATE > M> +.endif > M> +.if !defined(VERSION) > M> +VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE} > M> +.export VERSION > M> +.endif > M> +MAJOR_REVISION= ${_REVISION:R} > M> + > M> +.if !defined(PKG_VERSION) > M> +_STRTIMENOW= %Y%m%d%H%M%S > M> +_TIMENOW= ${_STRTIMENOW:gmtime} > M> +.if ${_BRANCH:MCURRENT*} || ${_BRANCH:MSTABLE*} || ${_BRANCH:MPRERELEASE*} > M> +EXTRA_REVISION= .snap${_TIMENOW} > M> +.elif ${_BRANCH:MALPHA*} > M> +EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/}.${_TIMENOW} > M> +.elif ${_BRANCH:MBETA*} > M> +EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/}.${_TIMENOW} > M> +.elif ${_BRANCH:MRC*} > M> +EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/}.${_TIMENOW} > M> +.elif ${_BRANCH:M*-p*} > M> +EXTRA_REVISION= p${_BRANCH:C/.*-p([0-9]+$)/\1/} > M> +.endif > M> +PKG_VERSION:= ${MAJOR_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} > M> +.endif > M> +.endif # !defined(PKG_VERSION) > M> + > M> +.if !defined(PKG_TIMESTAMP) > M> +TIMEEPOCHNOW= %s > M> +SOURCE_DATE_EPOCH= ${TIMEEPOCHNOW:gmtime} > M> +.else > M> +SOURCE_DATE_EPOCH= ${PKG_TIMESTAMP} > M> +.endif > M> + > M> +PKG_NAME_PREFIX?= FreeBSD > M> +PKG_MAINTAINER?= re@FreeBSD.org > M> +PKG_WWW?= https://www.FreeBSD.org > M> +.export PKG_NAME_PREFIX > M> +.export PKG_MAINTAINER > M> +.export PKG_WWW > M> + > M> +.if !defined(_MKSHOWCONFIG) > M> +_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} -f /dev/null \ > M> + -m ${.CURDIR}/share/mk MK_AUTO_OBJ=no -V CPUTYPE > M> +.if ${_CPUTYPE} != ${_TARGET_CPUTYPE} > M> +.error CPUTYPE global should be set with ?=. > M> +.endif > M> +.endif > M> +.if make(buildworld) > M> +BUILD_ARCH!= uname -p > M> +# On some Linux systems uname -p returns "unknown" so skip this check there. > M> +# This check only exists to tell people to use TARGET_ARCH instead of > M> +# MACHINE_ARCH so skipping it when crossbuilding on non-FreeBSD should be fine. > M> +.if ${MACHINE_ARCH} != ${BUILD_ARCH} && ${.MAKE.OS} == "FreeBSD" > M> +.error To cross-build, set TARGET_ARCH. > M> +.endif > M> +.endif > M> +WORLDTMP?= ${OBJTOP}/tmp > M> +BPATH= ${CCACHE_WRAPPER_PATH_PFX}${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin:${WORLDTMP}/legacy/usr/libexec > M> +XPATH= ${WORLDTMP}/bin:${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin > M> + > M> +# When building we want to find the cross tools before the host tools in ${BPATH}. > M> +# We also need to add UNIVERSE_TOOLCHAIN_PATH so that we can find the shared > M> +# toolchain files (clang, lld, etc.) during make universe/tinderbox > M> +STRICTTMPPATH= ${XPATH}:${BPATH}:${UNIVERSE_TOOLCHAIN_PATH} > M> +# We should not be using tools from /usr/bin accidentally since this could cause > M> +# the build to break on other systems that don't have that tool. For now we > M> +# still allow using the old behaviour (inheriting $PATH) if > M> +# BUILD_WITH_STRICT_TMPPATH is set to 0 but this will eventually be removed. > M> + > M> +# Currently strict $PATH can cause build failures. Once the remaining issues > M> +# have been resolved it will be turned on by default. > M> +BUILD_WITH_STRICT_TMPPATH?=0 > M> +.if defined(CROSSBUILD_HOST) > M> +# When building on non-FreeBSD we can't rely on the tools in /usr/bin being compatible > M> +# with what FreeBSD expects. Therefore we only use tools from STRICTTMPPATH > M> +# during the world build stage. We build most tools during the bootstrap-tools > M> +# phase but symlink host tools that are known to work instead of building them > M> +BUILD_WITH_STRICT_TMPPATH:=1 > M> +.endif > M> +.if ${BUILD_WITH_STRICT_TMPPATH} != 0 > M> +TMPPATH= ${STRICTTMPPATH} > M> +.else > M> +TMPPATH= ${STRICTTMPPATH}:${PATH} > M> +.endif > M> + > M> +# > M> +# Avoid running mktemp(1) unless actually needed. > M> +# It may not be functional, e.g., due to new ABI > M> +# when in the middle of installing over this system. > M> +# > M> +.if make(distributeworld) || make(installworld) || make(stageworld) > M> +.if ${BUILD_WITH_STRICT_TMPPATH} != 0 > M> +MKTEMP=${WORLDTMP}/legacy/usr/bin/mktemp > M> +.if !exists(${MKTEMP}) > M> +.error mktemp binary doesn't exist in expected location: ${MKTEMP} > M> +.endif > M> +.else > M> +MKTEMP=mktemp > M> +.endif > M> +INSTALLTMP!= ${MKTEMP} -d -u -t install > M> + > M> +.if ${.MAKE.OS} == "FreeBSD" > M> +# When building on FreeBSD we always copy the host tools instead of linking > M> +# into INSTALLTMP to avoid issues with incompatible libraries (see r364030). > M> +# Note: we could create links if we don't intend to update the current machine. > M> +INSTALLTMP_COPY_HOST_TOOL=cp > M> +.else > M> +# However, this is not necessary on Linux/macOS. Additionally, copying the host > M> +# tools to another directory with cp results in AMFI Launch Constraint > M> +# Violations on macOS Ventura as part of its System Integrity Protection. > M> +INSTALLTMP_COPY_HOST_TOOL=ln -s > M> +.endif > M> +.endif > M> + > M> +.if make(stagekernel) || make(distributekernel) > M> +TAGS+= kernel > M> +PACKAGE= kernel > M> +.endif > M> + > M> +# > M> +# Building a world goes through the following stages > M> +# > M> +# 1. legacy stage [BMAKE] > M> +# This stage is responsible for creating compatibility > M> +# shims that are needed by the bootstrap-tools, > M> +# build-tools and cross-tools stages. These are generally > M> +# APIs that tools from one of those three stages need to > M> +# build that aren't present on the host. > M> +# 1. bootstrap-tools stage [BMAKE] > M> +# This stage is responsible for creating programs that > M> +# are needed for backward compatibility reasons. They > M> +# are not built as cross-tools. > M> +# 2. build-tools stage [TMAKE] > M> +# This stage is responsible for creating the object > M> +# tree and building any tools that are needed during > M> +# the build process. Some programs are listed during > M> +# this phase because they build binaries to generate > M> +# files needed to build these programs. This stage also > M> +# builds the 'build-tools' target rather than 'all'. > M> +# 3. cross-tools stage [XMAKE] > M> +# This stage is responsible for creating any tools that > M> +# are needed for building the system. A cross-compiler is one > M> +# of them. This differs from build tools in two ways: > M> +# 1. the 'all' target is built rather than 'build-tools' > M> +# 2. these tools are installed into TMPPATH for stage 4. > M> +# 4. world stage [WMAKE] > M> +# This stage actually builds the world. > M> +# 5. install stage (optional) [IMAKE] > M> +# This stage installs a previously built world. > M> +# > M> + > M> +BOOTSTRAPPING?= 0 > M> +# Keep these in sync > M> +MINIMUM_SUPPORTED_OSREL?= 1104001 > M> +MINIMUM_SUPPORTED_REL?= 11.4 > M> + > M> +# Common environment for world related stages > M> +CROSSENV+= \ > M> + MACHINE_ARCH=${TARGET_ARCH} \ > M> + MACHINE=${TARGET} \ > M> + CPUTYPE=${TARGET_CPUTYPE} > M> +.if ${MK_META_MODE} != "no" > M> +# Don't rebuild build-tools targets during normal build. > M> +CROSSENV+= BUILD_TOOLS_META=.NOMETA > M> +.endif > M> +.if defined(TARGET_CFLAGS) > M> +CROSSENV+= ${TARGET_CFLAGS} > M> +.endif > M> +.if (${TARGET} != ${MACHINE} && !defined(WITH_LOCAL_MODULES)) || \ > M> + defined(WITHOUT_LOCAL_MODULES) > M> +CROSSENV+= LOCAL_MODULES= > M> +.endif > M> + > M> +BOOTSTRAPPING_OSRELDATE?=${OSRELDATE} > M> + > M> +# bootstrap-tools stage > M> +BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ > M> + TOOLS_PREFIX=${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \ > M> + PATH=${BPATH:Q}:${PATH:Q} \ > M> + WORLDTMP=${WORLDTMP} \ > M> + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" > M> +# need to keep this in sync with targets/pseudo/bootstrap-tools/Makefile > M> +BSARGS= DESTDIR= \ > M> + OBJTOP='${WORLDTMP}/obj-tools' \ > M> + OBJROOT='$${OBJTOP}/' \ > M> + UNIVERSE_TOOLCHAIN_PATH=${UNIVERSE_TOOLCHAIN_PATH} \ > M> + MAKEOBJDIRPREFIX= \ > M> + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ > M> + BWPHASE=${.TARGET:C,^_,,} \ > M> + -DNO_CPU_CFLAGS \ > M> + -DNO_LINT \ > M> + -DNO_PIC \ > M> + -DNO_SHARED \ > M> + MK_ASAN=no \ > M> + MK_CTF=no \ > M> + MK_CLANG_EXTRAS=no \ > M> + MK_CLANG_FORMAT=no \ > M> + MK_CLANG_FULL=no \ > M> + MK_HTML=no \ > M> + MK_MAN=no \ > M> + MK_PROFILE=no \ > M> + MK_RETPOLINE=no \ > M> + MK_SSP=no \ > M> + MK_TESTS=no \ > M> + MK_UBSAN=no \ > M> + MK_WERROR=no \ > M> + MK_INCLUDES=yes \ > M> + MK_MAN_UTILS=yes > M> + > M> +BMAKE= \ > M> + ${TIME_ENV} ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ > M> + ${BSARGS} > M> +.if empty(.MAKEOVERRIDES:MMK_LLVM_TARGET_ALL) > M> +BMAKE+= MK_LLVM_TARGET_ALL=no > M> +.endif > M> + > M> +# build-tools stage > M> +TMAKE= \ > M> + ${TIME_ENV} ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ > M> + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ > M> + DESTDIR= \ > M> + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ > M> + BWPHASE=${.TARGET:C,^_,,} \ > M> + -DNO_CPU_CFLAGS \ > M> + -DNO_LINT \ > M> + MK_ASAN=no \ > M> + MK_CTF=no \ > M> + MK_CLANG_EXTRAS=no \ > M> + MK_CLANG_FORMAT=no \ > M> + MK_CLANG_FULL=no \ > M> + MK_LLDB=no \ > M> + MK_RETPOLINE=no \ > M> + MK_SSP=no \ > M> + MK_TESTS=no \ > M> + MK_UBSAN=no \ > M> + MK_WERROR=no > M> + > M> +# cross-tools stage > M> +# TOOLS_PREFIX set in BMAKE > M> +XMAKE= ${BMAKE} \ > M> + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ > M> + MK_LLDB=no \ > M> + MK_LLVM_BINUTILS=no \ > M> + MK_TESTS=no > M> + > M> +# kernel-tools stage > M> +KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ > M> + PATH=${BPATH:Q}:${PATH:Q} \ > M> + WORLDTMP=${WORLDTMP} \ > M> + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" > M> + > M> +KTMAKE= ${TIME_ENV} \ > M> + TOOLS_PREFIX=${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \ > M> + ${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ > M> + DESTDIR= \ > M> + OBJTOP='${WORLDTMP}/obj-kernel-tools' \ > M> + OBJROOT='$${OBJTOP}/' \ > M> + UNIVERSE_TOOLCHAIN_PATH=${UNIVERSE_TOOLCHAIN_PATH} \ > M> + MAKEOBJDIRPREFIX= \ > M> + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ > M> + -DNO_CPU_CFLAGS \ > M> + -DNO_LINT \ > M> + -DNO_PIC \ > M> + -DNO_SHARED \ > M> + MK_CTF=no \ > M> + MK_HTML=no \ > M> + MK_MAN=no \ > M> + MK_PROFILE=no \ > M> + MK_SSP=no \ > M> + MK_RETPOLINE=no \ > M> + MK_WERROR=no > M> + > M> +# world stage > M> +WMAKEENV= ${CROSSENV} \ > M> + INSTALL="${INSTALL_CMD} -U" \ > M> + PATH=${TMPPATH:Q} \ > M> + SYSROOT=${WORLDTMP} > M> + > M> +# make hierarchy > M> *** 5431 LINES SKIPPED *** > -- Alexander Motin From nobody Thu Aug 31 02:01:14 2023 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 4Rbksn3JJ1z4rWl6; Thu, 31 Aug 2023 02:01:17 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rbksn0jl9z3KQj; Thu, 31 Aug 2023 02:01:17 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTP id bKM1qK5iHLAoIbWzkqJIa7; Thu, 31 Aug 2023 02:01:16 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPA id bWziqWHclHFsObWzjqKcm9; Thu, 31 Aug 2023 02:01:16 +0000 X-Authority-Analysis: v=2.4 cv=XZqaca15 c=1 sm=1 tr=0 ts=64eff46c a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=UttIx32zK-AA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=Z2ir-ztnuTeMgji1Md8A:9 a=CjuIK1q_8ugA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 22E7A8AC; Wed, 30 Aug 2023 19:01:14 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 1775729A; Wed, 30 Aug 2023 19:01:14 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Gleb Smirnoff cc: Martin Matuska , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad In-reply-to: References: <202308270509.37R596B5048298@gitrepo.freebsd.org> Comments: In-reply-to Gleb Smirnoff message dated "Wed, 30 Aug 2023 17:09:29 -0700." 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 30 Aug 2023 19:01:14 -0700 Message-Id: <20230831020114.1775729A@slippy.cwsent.com> X-CMAE-Envelope: MS4xfBP5Sot26ALknkS04E9eRURNdJEH7vTpd9XRyIVkDIgg4CluIYm23uylhxmUW76t8DEm5JT6r5v+mMPotiH32NkKPrqTiWKPqh/yetdq4SdhKofHiY8e ESMLe/HYdEpIYeRidq4zefbYhj26POnGk/HReJa2LJgew6M5SbOh5zLq4rnmECPwc3J0z7rayWYtW3SEG6bOVVsWLDhSZ+/173wwZeHC9msWQO20tEN5Jwu/ a+vljJlk8ar05GkJtX+HRComHzgV5Lq57H81/0TPPBTJgSRZAvV0It42X42F8XT9tqpzESGdCBnjNBik1fioRbOxTmPbsP4TiF1I4LC9yR8OuL36vuQRUuIe rarkurlm X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4Rbksn0jl9z3KQj Not the same as the two (different) I got running poudriere on two different machines. Posted to -current. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 In message , Gleb Smirnoff writes: > Hi Martin, > > we hit this panic with this update: > > panic: VERIFY(avl_is_empty(&lwb->lwb_vdev_tree)) failed > > cpuid = 8 > time = 1693432004 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe09519aa80 > 0 > vpanic() at vpanic+0x132/frame 0xfffffe09519aa930 > spl_panic() at spl_panic+0x3a/frame 0xfffffe09519aa990 > zil_free_lwb() at zil_free_lwb+0x1de/frame 0xfffffe09519aa9c0 > zil_sync() at zil_sync+0x3cb/frame 0xfffffe09519aaaa0 > [Wed Aug 30 21:46:44 2023]dmu_objset_sync() at dmu_objset_sync+0x51b/frame 0x > fffffe09519aab70 > dsl_pool_sync() at dsl_pool_sync+0x11d/frame 0xfffffe09519aabf0 > spa_sync() at spa_sync+0xc68/frame 0xfffffe09519aae20 > txg_sync_thread() at txg_sync_thread+0x2eb/frame 0xfffffe09519aaef0 > fork_exit() at fork_exit+0x82/frame 0xfffffe09519aaf30 > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe09519aaf30 > --- trap 0x26d90a2f, rip = 0xbba54c81b25fd8d4, rsp = 0xff60c2f6f9874bcd, rbp > = 0x37940e3e9793bd40 -- > > I have two cores dumped for this panic. > > Our previous version is based on 9c0a2d522f3a18fc795a7dd6266d2be2aff4b084, wh > ich > I guess has the most recent ZFS merge openzfs/zfs@009d3288d. > > On Sun, Aug 27, 2023 at 05:09:06AM +0000, Martin Matuska wrote: > M> The branch main has been updated by mm: > M> > M> URL: https://cgit.FreeBSD.org/src/commit/?id=315ee00fa9616b0a192b6834911f9 > 8bcf5316a6b > M> > M> commit 315ee00fa9616b0a192b6834911f98bcf5316a6b > M> Merge: b3a714652ff0 804414aad224 > M> Author: Martin Matuska > M> AuthorDate: 2023-08-26 21:20:04 +0000 > M> Commit: Martin Matuska > M> CommitDate: 2023-08-26 21:51:42 +0000 > M> > M> zfs: merge openzfs/zfs@804414aad > M> > M> Notable upstream pull request merges: > M> #15024 Add missed DMU_PROJECTUSED_OBJECT prefetch > M> #15029 Do not request data L1 buffers on scan prefetch > M> #15036 FreeBSD: catch up to __FreeBSD_version 1400093 > M> #15039 Fix raw receive with different indirect block size > M> #15047 FreeBSD: Fix build on stable/13 after 1302506 > M> #15049 Fix the ZFS checksum error histograms with larger record size > s > M> #15052 Reduce bloat in ereport.fs.zfs.checksum events > M> #15056 Avoid extra snprintf() in dsl_deadlist_merge() > M> #15061 Ignore pool ashift property during vdev attachment > M> #15063 Don't panic if setting vdev properties is unsupported for thi > s vdev type > M> #15067 spa_min_alloc should be GCD, not min > M> #15071 Add explicit prefetches to bpobj_iterate() > M> #15072 Adjust prefetch parameters > M> #15076 Refactor dmu_prefetch() > M> #15079 set autotrim default to 'off' everywhere > M> #15080 ZIL: Fix config lock deadlock > M> #15088 metaslab: tuneable to better control force ganging > M> #15096 Avoid waiting in dmu_sync_late_arrival() > M> #15097 BRT should return EOPNOTSUPP > M> #15103 Remove zl_issuer_lock from zil_suspend() > M> #15107 Remove fastwrite mechanism > M> #15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR > 1 > M> #15122 ZIL: Second attempt to reduce scope of zl_issuer_lock > M> #15129 zpool_vdev_remove() should handle EALREADY error return > M> #15132 ZIL: Replay blocks without next block pointer > M> #15148 zfs_clone_range should return descriptive error codes > M> #15153 ZIL: Avoid dbuf_read() before dmu_sync() > M> #15172 copy_file_range: fix fallback when source create on same txg > M> #15180 Update outdated assertion from zio_write_compress > M> > M> Obtained from: OpenZFS > M> OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13 > M> > M> Makefile.inc1 | 5 +- > M> cddl/lib/libzfs/Makefile | 1 + > M> cddl/lib/libzfs/Makefile.depend | 1 + > M> rescue/rescue/Makefile | 2 +- > M> rescue/rescue/Makefile.depend | 1 + > M> share/mk/src.libnames.mk | 2 +- > M> sys/contrib/openzfs/META | 6 +- > M> sys/contrib/openzfs/cmd/zdb/zdb.c | 77 ++- > M> sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c | 2 - > M> sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c | 5 + > M> .../openzfs/cmd/zed/zed.d/statechange-slot_off.sh | 61 ++ > M> sys/contrib/openzfs/cmd/zed/zed.d/zed.rc | 5 + > M> sys/contrib/openzfs/cmd/ztest.c | 2 +- > M> sys/contrib/openzfs/config/Shellcheck.am | 3 +- > M> sys/contrib/openzfs/config/kernel-blkdev.m4 | 138 +++- > M> .../config/kernel-block-device-operations.m4 | 35 +- > M> .../openzfs/config/kernel-filemap-splice-read.m4 | 25 + > M> .../openzfs/config/kernel-register_sysctl_table.m4 | 27 + > M> .../config/kernel-vfs-extended-file_range.m4 | 50 ++ > M> .../openzfs/config/kernel-vfs-file_range.m4 | 164 +++++ > M> sys/contrib/openzfs/config/kernel-vfs-iov_iter.m4 | 26 +- > M> sys/contrib/openzfs/config/kernel.m4 | 16 + > M> sys/contrib/openzfs/contrib/debian/changelog | 6 + > M> .../contrib/debian/openzfs-zfs-test.install | 2 - > M> .../contrib/debian/openzfs-zfsutils.install | 2 + > M> .../contrib/dracut/90zfs/zfs-env-bootfs.service.in | 11 +- > M> .../dracut/90zfs/zfs-rollback-bootfs.service.in | 2 +- > M> .../openzfs/include/os/freebsd/spl/sys/vnode.h | 6 +- > M> .../include/os/linux/kernel/linux/blkdev_compat.h | 17 + > M> .../openzfs/include/os/linux/spl/sys/kmem_cache.h | 8 + > M> .../openzfs/include/os/linux/spl/sys/types.h | 2 +- > M> sys/contrib/openzfs/include/os/linux/spl/sys/uio.h | 12 + > M> sys/contrib/openzfs/include/os/linux/zfs/sys/zpl.h | 53 ++ > M> sys/contrib/openzfs/include/sys/bpobj.h | 2 +- > M> sys/contrib/openzfs/include/sys/brt.h | 1 + > M> sys/contrib/openzfs/include/sys/dmu.h | 5 + > M> sys/contrib/openzfs/include/sys/dmu_impl.h | 2 - > M> sys/contrib/openzfs/include/sys/dmu_zfetch.h | 2 - > M> sys/contrib/openzfs/include/sys/fm/fs/zfs.h | 4 - > M> sys/contrib/openzfs/include/sys/metaslab.h | 3 - > M> sys/contrib/openzfs/include/sys/metaslab_impl.h | 6 +- > M> sys/contrib/openzfs/include/sys/spa_impl.h | 1 + > M> sys/contrib/openzfs/include/sys/vdev_impl.h | 2 +- > M> sys/contrib/openzfs/include/sys/zil_impl.h | 44 +- > M> sys/contrib/openzfs/include/sys/zio.h | 1 - > M> sys/contrib/openzfs/include/sys/zio_checksum.h | 2 - > M> sys/contrib/openzfs/lib/libzfs/Makefile.am | 2 +- > M> sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 6 + > M> sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 95 ++- > M> sys/contrib/> M> sys/contrib/openzfs/man/man8/zfs-send.8 | 18 +- > M> sys/contrib/openzfs/man/man8/zpool-events.8 | 23 +- > M> sys/contrib/openzfs/module/Kbuild.in | 1 + > M> .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 10 +- > M> sys/contrib/openzfs/module/os/linux/spl/spl-proc.c | 26 +- > M> .../openzfs/module/os/linux/zfs/vdev_disk.c | 65 +- > M> .../openzfs/module/os/linux/zfs/zfs_ctldir.c | 26 +- > M> .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 7 + > M> .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 9 +- > M> .../openzfs/module/os/linux/zfs/zfs_znode.c | 8 + > M> .../openzfs/module/os/linux/zfs/zpl_ctldir.c | 2 +- > M> sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 44 +- > M> .../openzfs/module/os/linux/zfs/zpl_file_range.c | 272 ++++++++ > M> .../openzfs/module/os/linux/zfs/zpl_super.c | 39 +- > M> sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 28 +- > M> sys/contrib/openzfs/module/zfs/bpobj.c | 49 +- > M> sys/contrib/openzfs/module/zfs/brt.c | 43 +- > M> sys/contrib/openzfs/module/zfs/dbuf.c | 11 +- > M> sys/contrib/openzfs/module/zfs/dmu.c | 127 ++-- > M> sys/contrib/openzfs/module/zfs/dmu_recv.c | 22 +- > M> sys/contrib/openzfs/module/zfs/dmu_zfetch.c | 12 +- > M> sys/contrib/openzfs/module/zfs/dnode.c | 31 +- > M> sys/contrib/openzfs/module/zfs/dsl_deadlist.c | 14 +- > M> sys/contrib/openzfs/module/zfs/dsl_scan.c | 17 +- > M> sys/contrib/openzfs/module/zfs/metaslab.c | 83 +-- > M> sys/contrib/openzfs/module/zfs/spa_log_spacemap.c | 4 +- > M> sys/contrib/openzfs/module/zfs/spa_misc.c | 1 + > M> sys/contrib/openzfs/module/zfs/vdev.c | 90 ++- > M> sys/contrib/openzfs/module/zfs/vdev_indirect.c | 2 +- > M> sys/contrib/openzfs/module/zfs/vdev_raidz.c | 2 +- > M> sys/contrib/openzfs/module/zfs/zfs_fm.c | 33 +- > M> sys/contrib/openzfs/module/zfs/zfs_vnops.c | 46 +- > M> sys/contrib/openzfs/module/zfs/zil.c | 719 +++++++++------- > ----- > M> sys/contrib/openzfs/module/zfs/zio.c | 45 +- > M> sys/contrib/openzfs/module/zfs/zio_checksum.c | 2 - > M> sys/contrib/openzfs/module/zfs/zvol.c | 8 +- > M> sys/contrib/openzfs/tests/runfiles/linux.run | 11 + > M> .../openzfs/tests/test-runner/bin/zts-report.py.in | 18 + > M> sys/contrib/openzfs/tests/zfs-tests/cmd/.gitignore | 1 + > M> .../openzfs/tests/zfs-tests/cmd/Makefile.am | 1 + > M> .../openzfs/tests/zfs-tests/cmd/clonefile.c | 333 ++++++++++ > M> sys/contrib/openzfs/tests/zfs-tests/cmd/readmmap.c | 1 + > M> .../openzfs/tests/zfs-tests/include/commands.cfg | 1 + > M> .../openzfs/tests/zfs-tests/tests/Makefile.am | 14 + > M> .../functional/block_cloning/block_cloning.kshlib | 54 ++ > M> .../block_cloning/block_cloning_copyfilerange.ksh | 60 ++ > M> .../block_cloning_copyfilerange_cross_dataset.ksh | 65 ++ > M> .../block_cloning_copyfilerange_fallback.ksh | 86 +++ > M> ...ock_cloning_copyfilerange_fallback_same_txg.ksh | 66 ++ > M> .../block_cloning_copyfilerange_partial.ksh | 68 ++ > M> .../block_cloning_disabled_copyfilerange.ksh | 60 ++ > M> .../block_cloning_disabled_ficlone.ksh | 50 ++ > M> .../block_cloning_disabled_ficlonerange.ksh | 50 ++ > M> .../block_cloning/block_cloning_ficlone.ksh | 56 ++ > M> .../block_cloning/block_cloning_ficlonerange.ksh | 56 ++ > M> .../block_cloning_ficlonerange_partial.ksh | 64 ++ > M> .../tests/functional/block_cloning/cleanup.ksh | 34 + > M> .../tests/functional/block_cloning/setup.ksh | 36 ++ > M> .../cli_root/zpool_attach/attach-o_ashift.ksh | 30 +- > M> .../cli_root/zpool_replace/replace-o_ashift.ksh | 32 +- > M> .../cli_root/zpool_replace/replace_prop_ashift.ksh | 24 +- > M> sys/modules/zfs/zfs_config.h | 53 +- > M> sys/modules/zfs/zfs_gitrev.h | 2 +- > M> 113 files changed, 3322 insertions(+), 906 deletions(-) > M> > M> diff --cc Makefile.inc1 > M> index 8838d31c795a,000000000000..f740cc5abcca > M> mode 100644,000000..100644 > M> --- a/Makefile.inc1 > M> +++ b/Makefile.inc1 > M> @@@ -1,3692 -1,0 +1,3695 @@@ > M> +# > M> +# > M> +# Make command line options: > M> +# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir > M> +# -DNO_CLEAN do not clean at all > M> +# -DDB_FROM_SRC use the user/group databases in src/etc instead o > f > M> +# the system database when installing. > M> +# -DNO_SHARE do not go into share subdir > M> +# -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,OBJ} > M> +# -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel > M> +# -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkerne > l > M> +# -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} buildkernel > M> +# -DNO_ROOT install without using root privilege > M> +# -DWITHOUT_CTF do not run the DTrace CTF conversion tools on bui > lt objects > M> +# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR > list > M> +# LOCAL_ITOOLS="list of tools" to add additional tools to the ITO > OLS list > M> +# LOCAL_LIB_DIRS="list of dirs" to add additional dirs to librari > es target > M> +# LOCAL_MTREE="list of mtree files" to process to allow local dir > ectories > M> +# to be created before files are installed > M> +# LOCAL_LEGACY_DIRS="list of dirs" to add additional dirs to the > legacy > M> +# target > M> +# LOCAL_BSTOOL_DIRS="list of dirs" to add additional dirs to the > M> +# bootstrap-tools target > M> +# LOCAL_TOOL_DIRS="list of dirs" to add additional dirs to the bu > ild-tools > M> +# target > M> +# LOCAL_XTOOL_DIRS="list of dirs" to add additional dirs to the > M> +# cross-tools target > M> +# METALOG="path to metadata log" to write permission and ownershi > p > M> +# when NO_ROOT is set. (default: ${DESTDIR}/${DISTDIR}/METAL > OG, > M> +# check /etc/make.conf for DISTDIR) > M> +# TARGET="machine" to crossbuild world for a different machine ty > pe > M> +# TARGET_ARCH= may be required when a TARGET supports multiple en > dians > M> +# BUILDENV_SHELL= shell to launch for the buildenv target (def:${ > SHELL}) > M> +# WORLD_FLAGS= additional flags to pass to make(1) during buildwo > rld > M> +# KERNEL_FLAGS= additional flags to pass to make(1) during buildk > ernel > M> +# SUBDIR_OVERRIDE="list of dirs" to build rather than everything. > M> +# All libraries and includes, and some build tools will still > build. > M> + > M> +# > M> +# The intended user-driven targets are: > M> +# buildworld - rebuild *everything*, including glue to help do upgrades > M> +# installworld- install everything built by "buildworld" > M> +# checkworld - run test suite on installed world > M> +# doxygen - build API documentation of the kernel > M> +# > M> +# Standard targets (not defined here) are documented in the makefiles in > M> +# /usr/share/mk. These include: > M> +# obj depend all install clean cleandepend cleanobj > M> + > M> +.if !defined(TARGET) || !defined(TARGET_ARCH) > M> +.error Both TARGET and TARGET_ARCH must be defined. > M> +.endif > M> + > M> +.if make(showconfig) || make(test-system-*) > M> +_MKSHOWCONFIG= t > M> +.endif > M> + > M> +SRCDIR?= ${.CURDIR} > M> +LOCALBASE?= /usr/local > M> +TIME_ENV ?= time env > M> + > M> +.include "share/mk/src.tools.mk" > M> + > M> +# Cross toolchain changes must be in effect before bsd.compiler.mk > M> +# so that gets the right CC, and pass CROSS_TOOLCHAIN to submakes. > M> +.if defined(CROSS_TOOLCHAIN) > M> +.if exists(${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk) > M> +.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" > M> +.elif exists(${CROSS_TOOLCHAIN}) > M> +.include "${CROSS_TOOLCHAIN}" > M> +.else > M> +.error CROSS_TOOLCHAIN ${CROSS_TOOLCHAIN} not found > M> +.endif > M> +CROSSENV+=CROSS_TOOLCHAIN="${CROSS_TOOLCHAIN}" > M> +.elif defined(UNIVERSE_TOOLCHAIN) > M> +UNIVERSE_TOOLCHAIN_PATH?=${HOST_OBJTOP}/tmp/usr/bin > M> +XCC?="${UNIVERSE_TOOLCHAIN_PATH}/cc" > M> +XCXX?="${UNIVERSE_TOOLCHAIN_PATH}/c++" > M> +XCPP?="${UNIVERSE_TOOLCHAIN_PATH}/cpp" > M> +XLD?="${UNIVERSE_TOOLCHAIN_PATH}/ld" > M> +.endif > M> +.if defined(CROSS_TOOLCHAIN_PREFIX) > M> +CROSS_COMPILER_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} > M> +.endif > M> + > M> +XCOMPILERS= CC CXX CPP > M> +.for COMPILER in ${XCOMPILERS} > M> +.if defined(CROSS_COMPILER_PREFIX) > M> +X${COMPILER}?= ${CROSS_COMPILER_PREFIX}${${COMPILER}} > M> +.else > M> +X${COMPILER}?= ${${COMPILER}} > M> +.endif > M> +.endfor > M> +# If a full path to an external cross compiler is given, don't build > M> +# a cross compiler. > M> +.if ${XCC:N${CCACHE_BIN}:M/*} > M> +MK_CLANG_BOOTSTRAP= no > M> +# Make sure sub-makes see the option as disabled so the hack in bsd.sys. > mk to > M> +# work around incompatible headers in Clang's resource directory is enab > led. > M> +.MAKEOVERRIDES+= MK_CLANG_BOOTSTRAP > M> +.endif > M> + > M> +# Pull in compiler metadata from buildworld/toolchain if possible to avo > id > M> +# running CC from bsd.compiler.mk. > M> +.if make(installworld) || make(install) || make(distributeworld) || \ > M> + make(stageworld) > M> +.-include "${OBJTOP}/toolchain-metadata.mk" > M> +.if !defined(_LOADED_TOOLCHAIN_METADATA) > M> +.error A build is required first. You may have the wrong MAKEOBJDIRPREF > IX set. > M> +.endif > M> +.endif > M> + > M> +# Pull in COMPILER_TYPE and COMPILER_FREEBSD_VERSION early. Pull it from > the > M> +# tree to be friendlier to foreign OS builds. It's safe to do so uncondi > tionally > M> +# here since we will always have the right make, unlike in src/Makefile > M> +# Don't include bsd.linker.mk yet until XBINUTILS is handled (after src. > opts.mk) > M> +_NO_INCLUDE_LINKERMK= t > M> +# We also want the X_COMPILER* variables if we are using an external too > lchain. > M> +_WANT_TOOLCHAIN_CROSS_VARS= t > M> +.include "share/mk/bsd.compiler.mk" > M> +.undef _NO_INCLUDE_LINKERMK > M> +.undef _WANT_TOOLCHAIN_CROSS_VARS > M> +# src.opts.mk depends on COMPILER_FEATURES > M> +.include "share/mk/src.opts.mk" > M> + > M> +.if ${TARGET} == ${MACHINE} > M> +TARGET_CPUTYPE?=${CPUTYPE} > M> +.else > M> +TARGET_CPUTYPE?= > M> +.endif > M> +.if !empty(TARGET_CPUTYPE) > M> +_TARGET_CPUTYPE=${TARGET_CPUTYPE} > M> +.else > M> +_TARGET_CPUTYPE=dummy > M> +.endif > M> +.if ${TARGET} == "arm" > M> +.if ${TARGET_CPUTYPE:M*soft*} == "" > M> +TARGET_TRIPLE_ABI= gnueabihf > M> +.else > M> +TARGET_TRIPLE_ABI= gnueabi > M> +.endif > M> +.endif > M> +MACHINE_TRIPLE_ABI?= unknown > M> +MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/}-${MACHINE_TRIPLE_ABI}-fr > eebsd${OS_REVISION} > M> +TARGET_TRIPLE_ABI?= unknown > M> +TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/}-${TARGET_TRIPLE_ABI}-fre > ebsd${OS_REVISION} > M> +KNOWN_ARCHES?= aarch64/arm64 \ > M> + amd64 \ > M> + armv6/arm \ > M> + armv7/arm \ > M> + i386 \ > M> + powerpc \ > M> + powerpc64/powerpc \ > M> + powerpc64le/powerpc \ > M> + powerpcspe/powerpc \ > M> + riscv64/riscv > M> + > M> +.if ${TARGET} == ${TARGET_ARCH} > M> +_t= ${TARGET} > M> +.else > M> +_t= ${TARGET_ARCH}/${TARGET} > M> +.endif > M> +.for _t in ${_t} > M> +.if empty(KNOWN_ARCHES:M${_t}) > M> +.error Unknown target ${TARGET_ARCH}:${TARGET}. > M> +.endif > M> +.endfor > M> + > M> +.if ${TARGET_ARCH} == "amd64" > M> +LIBCOMPAT_INCLUDE_DIRS+= i386 > M> +.elif ${TARGET_ARCH} == "aarch64" > M> +LIBCOMPAT_INCLUDE_DIRS+= arm > M> +.endif > M> + > M> +.if ${.MAKE.OS} != "FreeBSD" > M> +CROSSBUILD_HOST=${.MAKE.OS} > M> +.if ${.MAKE.OS} != "Linux" && ${.MAKE.OS} != "Darwin" > M> +.warning Unsupported crossbuild system: ${.MAKE.OS}. Build will probably > fail! > M> +.endif > M> +# We need to force NO_ROOT/DB_FROM_SRC builds when building on other ope > rating > M> +# systems since the BSD.foo.dist specs contain users and groups that do > not > M> +# exist by default on a Linux/MacOS system. > M> +NO_ROOT:= 1 > M> +DB_FROM_SRC:= 1 > M> +.export NO_ROOT > M> +.endif > M> + > M> +# If all targets are disabled for system llvm then don't expect it to wo > rk > M> +# for cross-builds. > M> +.if !defined(TOOLS_PREFIX) && ${MK_LLVM_TARGET_ALL} == "no" && \ > M> + ${MACHINE} != ${TARGET} && ${MACHINE_ARCH} != ${TARGET_ARCH} && \ > M> + !make(showconfig) > M> +MK_SYSTEM_COMPILER= no > M> +MK_SYSTEM_LINKER= no > M> +.endif > M> + > M> +# Handle external binutils. > M> +.if defined(CROSS_TOOLCHAIN_PREFIX) > M> +CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} > M> +.endif > M> +XBINUTILS= AS AR ELFCTL LD NM OBJCOPY RANLIB SIZE STRINGS STRIPBIN > M> +.for BINUTIL in ${XBINUTILS} > M> +.if defined(CROSS_BINUTILS_PREFIX) && \ > M> + exists(${CROSS_BINUTILS_PREFIX}/${${BINUTIL}}) > M> +X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX:C,/*$,,}/${${BINUTIL}} > M> +.else > M> +X${BINUTIL}?= ${${BINUTIL}} > M> +.endif > M> +.endfor > M> + > M> +# If a full path to an external linker is given, don't build lld. > M> +.if ${XLD:M/*} > M> +MK_LLD_BOOTSTRAP= no > M> +.endif > M> + > M> +# We also want the X_LINKER* variables if we are using an external toolc > hain. > M> +_WANT_TOOLCHAIN_CROSS_VARS= t > M> +.include "share/mk/bsd.linker.mk" > M> +.undef _WANT_TOOLCHAIN_CROSS_VARS > M> + > M> +# Begin WITH_SYSTEM_COMPILER / WITH_SYSTEM_LD > M> + > M> +# WITH_SYSTEM_COMPILER - Pull in needed values and make a decision. > M> + > M> +# Check if there is a local compiler that can satisfy as an external com > piler. > M> +# Which compiler is expected to be used? > M> +.if ${MK_CLANG_BOOTSTRAP} == "yes" > M> +WANT_COMPILER_TYPE= clang > M> +.else > M> +WANT_COMPILER_TYPE= > M> +.endif > M> + > M> +.if !defined(WANT_COMPILER_FREEBSD_VERSION) && !make(showconfig) && \ > M> + !make(test-system-linker) > M> +.if ${WANT_COMPILER_TYPE} == "clang" > M> +WANT_COMPILER_FREEBSD_VERSION_FILE= lib/clang/freebsd_cc_version.h > M> +WANT_COMPILER_FREEBSD_VERSION!= \ > M> + awk '$$2 == "FREEBSD_CC_VERSION" {printf("%d\n", $$3)}' \ > M> + ${SRCDIR}/${WANT_COMPILER_FREEBSD_VERSION_FILE} || echo unknown > M> +WANT_COMPILER_VERSION_FILE= lib/clang/include/clang/Basic/Version.inc > M> +WANT_COMPILER_VERSION!= \ > M> + awk '$$2 == "CLANG_VERSION" {split($$3, a, "."); print a[1] * 10000 + a > [2] * 100 + a[3]}' \ > M> + ${SRCDIR}/${WANT_COMPILER_VERSION_FILE} || echo unknown > M> +.endif > M> +.export WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_VERSION > M> +.endif # !defined(WANT_COMPILER_FREEBSD_VERSION) > M> + > M> +# It needs to be the same revision as we would build for the bootstrap. > M> +# If the expected vs CC is different then we can't skip. > M> +# GCC cannot be used for cross-arch yet. For clang we pass -target late > r if > M> +# TARGET_ARCH!=MACHINE_ARCH. > M> +.if ${MK_SYSTEM_COMPILER} == "yes" && \ > M> + defined(WANT_COMPILER_FREEBSD_VERSION) && \ > M> + ${MK_CLANG_BOOTSTRAP} == "yes" && \ > M> + !make(xdev*) && \ > M> + ${X_COMPILER_TYPE} == ${WANT_COMPILER_TYPE} && \ > M> + (${X_COMPILER_TYPE} == "clang" || ${TARGET_ARCH} == ${MACHINE_ARCH}) > && \ > M> + ${X_COMPILER_VERSION} == ${WANT_COMPILER_VERSION} && \ > M> + ${X_COMPILER_FREEBSD_VERSION} == ${WANT_COMPILER_FREEBSD_VERSION} > M> +# Everything matches, disable the bootstrap compiler. > M> +MK_CLANG_BOOTSTRAP= no > M> +USING_SYSTEM_COMPILER= yes > M> +.endif # ${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} > M> + > M> +# WITH_SYSTEM_LD - Pull in needed values and make a decision. > M> + > M> +# Check if there is a local linker that can satisfy as an external linke > r. > M> +# Which linker is expected to be used? > M> +.if ${MK_LLD_BOOTSTRAP} == "yes" > M> +WANT_LINKER_TYPE= lld > M> +.else > M> +WANT_LINKER_TYPE= > M> +.endif > M> + > M> +.if !defined(WANT_LINKER_FREEBSD_VERSION) && !make(showconfig) && \ > M> + !make(test-system-compiler) > M> +.if ${WANT_LINKER_TYPE} == "lld" > M> +WANT_LINKER_FREEBSD_VERSION_FILE= lib/clang/include/lld/Common/Version.i > nc > M> +WANT_LINKER_FREEBSD_VERSION!= \ > M> + awk '$$2 == "LLD_FREEBSD_VERSION" {print $$3}' \ > M> + ${SRCDIR}/${WANT_LINKER_FREEBSD_VERSION_FILE} || echo unknown > M> +WANT_LINKER_VERSION_FILE= lib/clang/include/lld/Common/Version.inc > M> +WANT_LINKER_VERSION!= \ > M> + awk '$$2 == "LLD_VERSION_STRING" {gsub("\"", "", $$3); split($$3, a, ". > "); print a[1] * 10000 + a[2] * 100 + a[3]}' \ > M> + ${SRCDIR}/${WANT_LINKER_VERSION_FILE} || echo unknown > M> +.else > M> +WANT_LINKER_FREEBSD_VERSION_FILE= > M> +WANT_LINKER_FREEBSD_VERSION= > M> +.endif > M> +.export WANT_LINKER_FREEBSD_VERSION WANT_LINKER_VERSION > M> +.endif # !defined(WANT_LINKER_FREEBSD_VERSION) > M> + > M> +.if ${MK_SYSTEM_LINKER} == "yes" && \ > M> + defined(WANT_LINKER_FREEBSD_VERSION) && \ > M> + (${MK_LLD_BOOTSTRAP} == "yes") && \ > M> + !make(xdev*) && \ > M> + ${X_LINKER_TYPE} == ${WANT_LINKER_TYPE} && \ > M> + ${X_LINKER_VERSION} == ${WANT_LINKER_VERSION} && \ > M> + ${X_LINKER_FREEBSD_VERSION} == ${WANT_LINKER_FREEBSD_VERSION} > M> +# Everything matches, disable the bootstrap linker. > M> +MK_LLD_BOOTSTRAP= no > M> +USING_SYSTEM_LINKER= yes > M> +.endif # ${WANT_LINKER_TYPE} == ${LINKER_TYPE} > M> + > M> +# WITH_SYSTEM_COMPILER / WITH_SYSTEM_LINKER - Handle defaults and debug. > M> +USING_SYSTEM_COMPILER?= no > M> +USING_SYSTEM_LINKER?= no > M> + > M> +TEST_SYSTEM_COMPILER_VARS= \ > M> + USING_SYSTEM_COMPILER MK_SYSTEM_COMPILER \ > M> + MK_CROSS_COMPILER MK_CLANG_BOOTSTRAP \ > M> + WANT_COMPILER_TYPE WANT_COMPILER_VERSION WANT_COMPILER_VERSION_FILE \ > M> + WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_FREEBSD_VERSION_FILE \ > M> + CC COMPILER_TYPE COMPILER_FEATURES COMPILER_VERSION \ > M> + COMPILER_FREEBSD_VERSION \ > M> + XCC X_COMPILER_TYPE X_COMPILER_FEATURES X_COMPILER_VERSION \ > M> + X_COMPILER_FREEBSD_VERSION > M> +TEST_SYSTEM_LINKER_VARS= \ > M> + USING_SYSTEM_LINKER MK_SYSTEM_LINKER \ > M> + MK_LLD_BOOTSTRAP \ > M> + WANT_LINKER_TYPE WANT_LINKER_VERSION WANT_LINKER_VERSION_FILE \ > M> + WANT_LINKER_FREEBSD_VERSION WANT_LINKER_FREEBSD_VERSION_FILE \ > M> + LD LINKER_TYPE LINKER_FEATURES LINKER_VERSION \ > M> + LINKER_FREEBSD_VERSION \ > M> + XLD X_LINKER_TYPE X_LINKER_FEATURES X_LINKER_VERSION \ > M> + X_LINKER_FREEBSD_VERSION > M> + > M> +.for _t in compiler linker > M> +test-system-${_t}: .PHONY > M> +.for v in ${TEST_SYSTEM_${_t:tu}_VARS} > M> + ${_+_}@printf "%-35s= %s\n" "${v}" "${${v}}" > M> +.endfor > M> +.endfor > M> +.if (make(buildworld) || make(buildkernel) || make(kernel-toolchain) || > \ > M> + make(toolchain) || make(_cross-tools)) > M> +.if ${USING_SYSTEM_COMPILER} == "yes" > M> +.info SYSTEM_COMPILER: Determined that CC=${CC} matches the source tree. > Not bootstrapping a cross-compiler. > M> +.elif ${MK_CLANG_BOOTSTRAP} == "yes" > M> +.info SYSTEM_COMPILER: libclang will be built for bootstrapping a cross- > compiler. > M> +.endif > M> +.if ${USING_SYSTEM_LINKER} == "yes" > M> +.info SYSTEM_LINKER: Determined that LD=${LD} matches the source tree. > Not bootstrapping a cross-linker. > M> +.elif ${MK_LLD_BOOTSTRAP} == "yes" > M> +.info SYSTEM_LINKER: libclang will be built for bootstrapping a cross-li > nker. > M> +.endif > M> +.endif > M> + > M> +# End WITH_SYSTEM_COMPILER / WITH_SYSTEM_LD > M> + > M> +# Store some compiler metadata for use in installworld where we don't > M> +# want to invoke CC at all. > M> +_TOOLCHAIN_METADATA_VARS= COMPILER_VERSION \ > M> + COMPILER_TYPE \ > M> + COMPILER_FEATURES \ > M> + COMPILER_FREEBSD_VERSION \ > M> + COMPILER_RESOURCE_DIR \ > M> + LINKER_VERSION \ > M> + LINKER_FEATURES \ > M> + LINKER_TYPE \ > M> + LINKER_FREEBSD_VERSION > M> +toolchain-metadata.mk: .PHONY .META > M> + @: > ${.TARGET} > M> + @echo ".info Using cached toolchain metadata from build at $$(hostname) > on $$(date)" \ > M> + > ${.TARGET} > M> + @echo "_LOADED_TOOLCHAIN_METADATA=t" >> ${.TARGET} > M> +.for v in ${_TOOLCHAIN_METADATA_VARS} > M> + @echo "${v}=${${v}}" >> ${.TARGET} > M> + @echo "X_${v}=${X_${v}}" >> ${.TARGET} > M> +.endfor > M> + @echo ".export ${_TOOLCHAIN_METADATA_VARS}" >> ${.TARGET} > M> + @echo ".export ${_TOOLCHAIN_METADATA_VARS:C,^,X_,}" >> ${.TARGET} > M> + > M> + > M> +# We must do lib/ and libexec/ before bin/ in case of a mid-install erro > r to > M> +# keep the users system reasonably usable. For static->dynamic root upg > rades, > M> +# we don't want to install a dynamic binary without rtld and the needed > M> +# libraries. More commonly, for dynamic root, we don't want to install > a > M> +# binary that requires a newer library version that hasn't been installe > d yet. > M> +# This ordering is not a guarantee though. The only guarantee of a work > ing > M> +# system here would require fine-grained ordering of all components base > d > M> +# on their dependencies. > M> +.if !empty(SUBDIR_OVERRIDE) > M> +SUBDIR= ${SUBDIR_OVERRIDE} > M> +.else > M> +SUBDIR= lib libexec > M> +# Add LOCAL_LIB_DIRS, but only if they will not be picked up as a SUBDIR > M> +# of a LOCAL_DIRS directory. This allows LOCAL_DIRS=foo and > M> +# LOCAL_LIB_DIRS=foo/lib to behave as expected. > M> +.for _DIR in ${LOCAL_DIRS:M*/} ${LOCAL_DIRS:N*/:S|$|/|} > M> +_REDUNDANT_LIB_DIRS+= ${LOCAL_LIB_DIRS:M${_DIR}*} > M> +.endfor > M> +.for _DIR in ${LOCAL_LIB_DIRS} > M> +.if ${_DIR} == ".WAIT" || (empty(_REDUNDANT_LIB_DIRS:M${_DIR}) && exists > (${.CURDIR}/${_DIR}/Makefile)) > M> +SUBDIR+= ${_DIR} > M> +.endif > M> +.endfor > M> +.if !defined(NO_ROOT) && (make(installworld) || make(install)) > M> +# Ensure libraries are installed before progressing. > M> +SUBDIR+=.WAIT > M> +.endif > M> +SUBDIR+=bin > M> +.if ${MK_CDDL} != "no" > M> +SUBDIR+=cddl > M> +.endif > M> +SUBDIR+=gnu include > M> +.if ${MK_KERBEROS} != "no" > M> +SUBDIR+=kerberos5 > M> +.endif > M> +.if ${MK_RESCUE} != "no" > M> +SUBDIR+=rescue > M> +.endif > M> +SUBDIR+=sbin > M> +.if ${MK_CRYPT} != "no" > M> +SUBDIR+=secure > M> +.endif > M> +.if !defined(NO_SHARE) > M> +SUBDIR+=share > M> +.endif > M> +.if ${MK_BOOT} != "no" > M> +SUBDIR+=stand > M> +.endif > M> +SUBDIR+=sys usr.bin usr.sbin > M> +.if ${MK_TESTS} != "no" > M> +SUBDIR+= tests > M> +.endif > M> + > M> +# Local directories are built in parallel with the base system directori > es. > M> +# Users may insert a .WAIT directive at the beginning or elsewhere withi > n > M> +# the LOCAL_DIRS and LOCAL_LIB_DIRS lists as needed. > M> +.for _DIR in ${LOCAL_DIRS} > M> +.if ${_DIR} == ".WAIT" || exists(${.CURDIR}/${_DIR}/Makefile) > M> +SUBDIR+= ${_DIR} > M> +.endif > M> +.endfor > M> + > M> +# We must do etc/ last as it hooks into building the man whatis file > M> +# by calling 'makedb' in share/man. This is only relevant for > M> +# install/distribute so they build the whatis file after every manpage i > s > M> +# installed. > M> +.if make(installworld) || make(install) > M> +SUBDIR+=.WAIT > M> +.endif > M> +SUBDIR+=etc > M> + > M> +.endif # !empty(SUBDIR_OVERRIDE) > M> + > M> +.if defined(NOCLEAN) > M> +.warning The src.conf WITHOUT_CLEAN option can now be used instead of NO > CLEAN. > M> +MK_CLEAN:= no > M> +.endif > M> +.if defined(NO_CLEAN) > M> +.info The src.conf WITHOUT_CLEAN option can now be used instead of NO_CL > EAN. > M> +MK_CLEAN:= no > M> +.endif > M> +.if defined(NO_CLEANDIR) > M> +CLEANDIR= clean cleandepend > M> +.else > M> +CLEANDIR= cleandir > M> +.endif > M> + > M> +.if defined(WORLDFAST) > M> +MK_CLEAN:= no > M> +NO_OBJWALK= t > M> +.endif > M> + > M> +.if ${MK_META_MODE} == "yes" > M> +# If filemon is used then we can rely on the build being incremental-saf > e. > M> +# The .meta files will also track the build command and rebuild should > M> +# it change. > M> +.if empty(.MAKE.MODE:Mnofilemon) > M> +MK_CLEAN:= no > M> +.endif > M> +.endif > M> +.if defined(NO_OBJWALK) || ${MK_AUTO_OBJ} == "yes" > M> +NO_OBJWALK= t > M> +NO_KERNELOBJ= t > M> +.endif > M> +.if !defined(NO_OBJWALK) > M> +_obj= obj > M> +.endif > M> + > M> +LOCAL_TOOL_DIRS?= > M> +PACKAGEDIR?= ${DESTDIR}/${DISTDIR} > M> + > M> +.if empty(SHELL:M*csh*) > M> +BUILDENV_SHELL?=${SHELL} > M> +.else > M> +BUILDENV_SHELL?=/bin/sh > M> +.endif > M> + > M> +.if !defined(_MKSHOWCONFIG) > M> +.if !defined(VCS_REVISION) || empty(VCS_REVISION) > M> +.if !defined(SVNVERSION_CMD) || empty(SVNVERSION_CMD) > M> +. for _D in ${PATH:S,:, ,g} > M> +. if exists(${_D}/svnversion) > M> +SVNVERSION_CMD?=${_D}/svnversion > M> +. endif > M> +. if exists(${_D}/svnliteversion) > M> +SVNVERSION_CMD?=${_D}/svnliteversion > M> +. endif > M> +. endfor > M> +.endif > M> +.if defined(SVNVERSION_CMD) && !empty(SVNVERSION_CMD) > M> +_VCS_REVISION?= $$(eval ${SVNVERSION_CMD} ${SRCDIR}) > M> +. if !empty(_VCS_REVISION) > M> +VCS_REVISION= $$(echo r${_VCS_REVISION}) > M> +.export VCS_REVISION > M> +. endif > M> +.endif > M> +.endif > M> + > M> +.if !defined(GIT_CMD) || empty(GIT_CMD) > M> +. for _P in /usr/bin /usr/local/bin > M> +. if exists(${_P}/git) > M> +GIT_CMD= ${_P}/git > M> +. endif > M> +. endfor > M> +.export GIT_CMD > M> +.endif > M> + > M> +.if !defined(OSRELDATE) > M> +.if exists(/usr/include/osreldate.h) > M> +OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $ > $3 }' \ > M> + /usr/include/osreldate.h > M> +.else > M> +OSRELDATE= 0 > M> +.endif > M> +.export OSRELDATE > M> +.endif > M> + > M> +# Set VERSION for CTFMERGE to use via the default CTFFLAGS=-L VERSION. > M> +.for _V in BRANCH REVISION TYPE > M> +.if !defined(_${_V}) > M> +_${_V}!= eval $$(awk '/^${_V}=/{print}' ${SRCTOP}/sys/conf/newvers.sh); > echo $$${_V} > M> +.export _${_V} > M> +.endif > M> +.endfor > M> +.if !defined(SRCRELDATE) > M> +SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $ > $3 }' \ > M> + ${SRCDIR}/sys/sys/param.h > M> +.export SRCRELDATE > M> +.endif > M> +.if !defined(VERSION) > M> +VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${ > SRCRELDATE} > M> +.export VERSION > M> +.endif > M> +MAJOR_REVISION= ${_REVISION:R} > M> + > M> +.if !defined(PKG_VERSION) > M> +_STRTIMENOW= %Y%m%d%H%M%S > M> +_TIMENOW= ${_STRTIMENOW:gmtime} > M> +.if ${_BRANCH:MCURRENT*} || ${_BRANCH:MSTABLE*} || ${_BRANCH:MPRERELEASE > *} > M> +EXTRA_REVISION= .snap${_TIMENOW} > M> +.elif ${_BRANCH:MALPHA*} > M> +EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/}.${_TIMENOW} > M> +.elif ${_BRANCH:MBETA*} > M> +EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/}.${_TIMENOW} > M> +.elif ${_BRANCH:MRC*} > M> +EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/}.${_TIMENOW} > M> +.elif ${_BRANCH:M*-p*} > M> +EXTRA_REVISION= p${_BRANCH:C/.*-p([0-9]+$)/\1/} > M> +.endif > M> +PKG_VERSION:= ${MAJOR_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} > M> +.endif > M> +.endif # !defined(PKG_VERSION) > M> + > M> +.if !defined(PKG_TIMESTAMP) > M> +TIMEEPOCHNOW= %s > M> +SOURCE_DATE_EPOCH= ${TIMEEPOCHNOW:gmtime} > M> +.else > M> +SOURCE_DATE_EPOCH= ${PKG_TIMESTAMP} > M> +.endif > M> + > M> +PKG_NAME_PREFIX?= FreeBSD > M> +PKG_MAINTAINER?= re@FreeBSD.org > M> +PKG_WWW?= https://www.FreeBSD.org > M> +.export PKG_NAME_PREFIX > M> +.export PKG_MAINTAINER > M> +.export PKG_WWW > M> + > M> +.if !defined(_MKSHOWCONFIG) > M> +_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} -f /dev/n > ull \ > M> + -m ${.CURDIR}/share/mk MK_AUTO_OBJ=no -V CPUTYPE > M> +.if ${_CPUTYPE} != ${_TARGET_CPUTYPE} > M> +.error CPUTYPE global should be set with ?=. > M> +.endif > M> +.endif > M> +.if make(buildworld) > M> +BUILD_ARCH!= uname -p > M> +# On some Linux systems uname -p returns "unknown" so skip this check th > ere. > M> +# This check only exists to tell people to use TARGET_ARCH instead of > M> +# MACHINE_ARCH so skipping it when crossbuilding on non-FreeBSD should b > e fine. > M> +.if ${MACHINE_ARCH} != ${BUILD_ARCH} && ${.MAKE.OS} == "FreeBSD" > M> +.error To cross-build, set TARGET_ARCH. > M> +.endif > M> +.endif > M> +WORLDTMP?= ${OBJTOP}/tmp > M> +BPATH= ${CCACHE_WRAPPER_PATH_PFX}${WORLDTMP}/legacy/usr/sbin:$ > {WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin:${WORLDTMP}/legacy/usr/libex > ec > M> +XPATH= ${WORLDTMP}/bin:${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bi > n > M> + > M> +# When building we want to find the cross tools before the host tools in > ${BPATH}. > M> +# We also need to add UNIVERSE_TOOLCHAIN_PATH so that we can find the sh > ared > M> +# toolchain files (clang, lld, etc.) during make universe/tinderbox > M> +STRICTTMPPATH= ${XPATH}:${BPATH}:${UNIVERSE_TOOLCHAIN_PATH} > M> +# We should not be using tools from /usr/bin accidentally since this cou > ld cause > M> +# the build to break on other systems that don't have that tool. For now > we > M> +# still allow using the old behaviour (inheriting $PATH) if > M> +# BUILD_WITH_STRICT_TMPPATH is set to 0 but this will eventually be remo > ved. > M> + > M> +# Currently strict $PATH can cause build failures. Once the remaining is > sues > M> +# have been resolved it will be turned on by default. > M> +BUILD_WITH_STRICT_TMPPATH?=0 > M> +.if defined(CROSSBUILD_HOST) > M> +# When building on non-FreeBSD we can't rely on the tools in /usr/bin be > ing compatible > M> +# with what FreeBSD expects. Therefore we only use tools from STRICTTMPP > ATH > M> +# during the world build stage. We build most tools during the bootstrap > -tools > M> +# phase but symlink host tools that are known to work instead of buildin > g them > M> +BUILD_WITH_STRICT_TMPPATH:=1 > M> +.endif > M> +.if ${BUILD_WITH_STRICT_TMPPATH} != 0 > M> +TMPPATH= ${STRICTTMPPATH} > M> +.else > M> +TMPPATH= ${STRICTTMPPATH}:${PATH} > M> +.endif > M> + > M> +# > M> +# Avoid running mktemp(1) unless actually needed. > M> +# It may not be functional, e.g., due to new ABI > M> +# when in the middle of installing over this system. > M> +# > M> +.if make(distributeworld) || make(installworld) || make(stageworld) > M> +.if ${BUILD_WITH_STRICT_TMPPATH} != 0 > M> +MKTEMP=${WORLDTMP}/legacy/usr/bin/mktemp > M> +.if !exists(${MKTEMP}) > M> +.error mktemp binary doesn't exist in expected location: ${MKTEMP} > M> +.endif > M> +.else > M> +MKTEMP=mktemp > M> +.endif > M> +INSTALLTMP!= ${MKTEMP} -d -u -t install > M> + > M> +.if ${.MAKE.OS} == "FreeBSD" > M> +# When building on FreeBSD we always copy the host tools instead of link > ing > M> +# into INSTALLTMP to avoid issues with incompatible libraries (see r3640 > 30). > M> +# Note: we could create links if we don't intend to update the current m > achine. > M> +INSTALLTMP_COPY_HOST_TOOL=cp > M> +.else > M> +# However, this is not necessary on Linux/macOS. Additionally, copying t > he host > M> +# tools to another directory with cp results in AMFI Launch Constraint > M> +# Violations on macOS Ventura as part of its System Integrity Protection > . > M> +INSTALLTMP_COPY_HOST_TOOL=ln -s > M> +.endif > M> +.endif > M> + > M> +.if make(stagekernel) || make(distributekernel) > M> +TAGS+= kernel > M> +PACKAGE= kernel > M> +.endif > M> + > M> +# > M> +# Building a world goes through the following stages > M> +# > M> +# 1. legacy stage [BMAKE] > M> +# This stage is responsible for creating compatibility > M> +# shims that are needed by the bootstrap-tools, > M> +# build-tools and cross-tools stages. These are generally > M> +# APIs that tools from one of those three stages need to > M> +# build that aren't present on the host. > M> +# 1. bootstrap-tools stage [BMAKE] > M> +# This stage is responsible for creating programs that > M> +# are needed for backward compatibility reasons. They > M> +# are not built as cross-tools. > M> +# 2. build-tools stage [TMAKE] > M> +# This stage is responsible for creating the object > M> +# tree and building any tools that are needed during > M> +# the build process. Some programs are listed during > M> +# this phase because they build binaries to generate > M> +# files needed to build these programs. This stage also > M> +# builds the 'build-tools' target rather than 'all'. > M> +# 3. cross-tools stage [XMAKE] > M> +# This stage is responsible for creating any tools that > M> +# are needed for building the system. A cross-compiler is one > M> +# of them. This differs from build tools in two ways: > M> +# 1. the 'all' target is built rather than 'build-tools' > M> +# 2. these tools are installed into TMPPATH for stage 4. > M> +# 4. world stage [WMAKE] > M> +# This stage actually builds the world. > M> +# 5. install stage (optional) [IMAKE] > M> +# This stage installs a previously built world. > M> +# > M> + > M> +BOOTSTRAPPING?= 0 > M> +# Keep these in sync > M> +MINIMUM_SUPPORTED_OSREL?= 1104001 > M> +MINIMUM_SUPPORTED_REL?= 11.4 > M> + > M> +# Common environment for world related stages > M> +CROSSENV+= \ > M> + MACHINE_ARCH=${TARGET_ARCH} \ > M> + MACHINE=${TARGET} \ > M> + CPUTYPE=${TARGET_CPUTYPE} > M> +.if ${MK_META_MODE} != "no" > M> +# Don't rebuild build-tools targets during normal build. > M> +CROSSENV+= BUILD_TOOLS_META=.NOMETA > M> +.endif > M> +.if defined(TARGET_CFLAGS) > M> +CROSSENV+= ${TARGET_CFLAGS} > M> +.endif > M> +.if (${TARGET} != ${MACHINE} && !defined(WITH_LOCAL_MODULES)) || \ > M> + defined(WITHOUT_LOCAL_MODULES) > M> +CROSSENV+= LOCAL_MODULES= > M> +.endif > M> + > M> +BOOTSTRAPPING_OSRELDATE?=${OSRELDATE} > M> + > M> +# bootstrap-tools stage > M> +BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ > M> + TOOLS_PREFIX=${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \ > M> + PATH=${BPATH:Q}:${PATH:Q} \ > M> + WORLDTMP=${WORLDTMP} \ > M> + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" > M> +# need to keep this in sync with targets/pseudo/bootstrap-tools/Makefile > M> +BSARGS= DESTDIR= \ > M> + OBJTOP='${WORLDTMP}/obj-tools' \ > M> + OBJROOT='$${OBJTOP}/' \ > M> + UNIVERSE_TOOLCHAIN_PATH=${UNIVERSE_TOOLCHAIN_PATH} \ > M> + MAKEOBJDIRPREFIX= \ > M> + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ > M> + BWPHASE=${.TARGET:C,^_,,} \ > M> + -DNO_CPU_CFLAGS \ > M> + -DNO_LINT \ > M> + -DNO_PIC \ > M> + -DNO_SHARED \ > M> + MK_ASAN=no \ > M> + MK_CTF=no \ > M> + MK_CLANG_EXTRAS=no \ > M> + MK_CLANG_FORMAT=no \ > M> + MK_CLANG_FULL=no \ > M> + MK_HTML=no \ > M> + MK_MAN=no \ > M> + MK_PROFILE=no \ > M> + MK_RETPOLINE=no \ > M> + MK_SSP=no \ > M> + MK_TESTS=no \ > M> + MK_UBSAN=no \ > M> + MK_WERROR=no \ > M> + MK_INCLUDES=yes \ > M> + MK_MAN_UTILS=yes > M> + > M> +BMAKE= \ > M> + ${TIME_ENV} ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 > \ > M> + ${BSARGS} > M> +.if empty(.MAKEOVERRIDES:MMK_LLVM_TARGET_ALL) > M> +BMAKE+= MK_LLVM_TARGET_ALL=no > M> +.endif > M> + > M> +# build-tools stage > M> +TMAKE= \ > M> + ${TIME_ENV} ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 > \ > M> + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ > M> + DESTDIR= \ > M> + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ > M> + BWPHASE=${.TARGET:C,^_,,} \ > M> + -DNO_CPU_CFLAGS \ > M> + -DNO_LINT \ > M> + MK_ASAN=no \ > M> + MK_CTF=no \ > M> + MK_CLANG_EXTRAS=no \ > M> + MK_CLANG_FORMAT=no \ > M> + MK_CLANG_FULL=no \ > M> + MK_LLDB=no \ > M> + MK_RETPOLINE=no \ > M> + MK_SSP=no \ > M> + MK_TESTS=no \ > M> + MK_UBSAN=no \ > M> + MK_WERROR=no > M> + > M> +# cross-tools stage > M> +# TOOLS_PREFIX set in BMAKE > M> +XMAKE= ${BMAKE} \ > M> + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ > M> + MK_LLDB=no \ > M> + MK_LLVM_BINUTILS=no \ > M> + MK_TESTS=no > M> + > M> +# kernel-tools stage > M> +KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ > M> + PATH=${BPATH:Q}:${PATH:Q} \ > M> + WORLDTMP=${WORLDTMP} \ > M> + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" > M> + > M> +KTMAKE= ${TIME_ENV} \ > M> + TOOLS_PREFIX=${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \ > M> + ${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ > M> + DESTDIR= \ > M> + OBJTOP='${WORLDTMP}/obj-kernel-tools' \ > M> + OBJROOT='$${OBJTOP}/' \ > M> + UNIVERSE_TOOLCHAIN_PATH=${UNIVERSE_TOOLCHAIN_PATH} \ > M> + MAKEOBJDIRPREFIX= \ > M> + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ > M> + -DNO_CPU_CFLAGS \ > M> + -DNO_LINT \ > M> + -DNO_PIC \ > M> + -DNO_SHARED \ > M> + MK_CTF=no \ > M> + MK_HTML=no \ > M> + MK_MAN=no \ > M> + MK_PROFILE=no \ > M> + MK_SSP=no \ > M> + MK_RETPOLINE=no \ > M> + MK_WERROR=no > M> + > M> +# world stage > M> +WMAKEENV= ${CROSSENV} \ > M> + INSTALL="${INSTALL_CMD} -U" \ > M> + PATH=${TMPPATH:Q} \ > M> + SYSROOT=${WORLDTMP} > M> + > M> +# make hierarchy > M> *** 5431 LINES SKIPPED *** > > -- > Gleb Smirnoff > From nobody Thu Aug 31 02:47:45 2023 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 4RblvS4r5kz4rZw9; Thu, 31 Aug 2023 02:47:48 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RblvS1Sk1z3TdQ; Thu, 31 Aug 2023 02:47:48 +0000 (UTC) (envelope-from mavbsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-59205f26e47so4983337b3.2; Wed, 30 Aug 2023 19:47:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693450067; x=1694054867; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=CMy2AuY8opDyc4WwEYaco1DqQZYOOD0rGI+yUzdz8us=; b=h3K5SvUnd9ub3KH5tylNwDyzqaR1uL5i0sNf01DYcauLUB4qEojx62UwDqAbOvRO6P MkPS/c8L7r1OT2juFnKWvexGrrr3bnjLytpUu4Qt4nZ/nnQw/JoacYq9Tv/ZJlIhKd9i Gw0QX8kCaWp9NkKPrsC5gYHgfig52eCGvGUerHXvlVO4dVYRjMt3C7dvwZCj4j6UDVVI R2fMvQ3tX8zaQU1KLxw4xfBw2RP+ZnbEdFPjebvQGW2iXhfAElEWRW3DQQaDpMO8q+3T ZtA+WOYjmVe3V6kawhmWtTubEff6lcc1l2ArJdUe8NzuO9wAnsCMWQrzBJlWBAaPMxcp HGxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693450067; x=1694054867; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CMy2AuY8opDyc4WwEYaco1DqQZYOOD0rGI+yUzdz8us=; b=fwI+6d55k8iT45IXKLPFb2LjVB6AJkI9CspJocVutB5chyx9L5tzQA0hJEPXUcHogX q/jnE7X6j7En1hKmsW7zluAUbizNabbZFe4CtNJFeH7cLGK+847FM9v3y5FxT2K9zPxP +a2hyyzKYWmZE2XunyVPJZbwvkQCuZ4NAaf5REiBJCcpUDfEAW4oxxGz2qz3NEnUYeJQ f/jlEMI7mvYproxUcrUc6T+bH7WGVeUAW9LRnz+Ee+o9DsJb6Y1//7tMJxgaemJfW2PS lk1V7xdpied0CMA0vftgKSd/teuuCNs5SYsygEXGWu1L4lrS5vWsPJqqVHMfhA9XFyzn LGYw== X-Gm-Message-State: AOJu0YyfYywQhnOB9SXVXgVZtvIaaksHcCsDQr/bBGfk7XDaVs3Z4NC0 brpcSKgYJtQNZ3VEv8P/PxM= X-Google-Smtp-Source: AGHT+IEnKIswT8g3xN0GXP58xGnl+qmzb8dsYoiS2DpJQ/oMcnL5Xr1dEatmXDENB0X5wQ4SAeIy1A== X-Received: by 2002:a81:e952:0:b0:583:4f9b:27d7 with SMTP id e18-20020a81e952000000b005834f9b27d7mr3440231ywm.52.1693450067328; Wed, 30 Aug 2023 19:47:47 -0700 (PDT) Received: from [192.168.1.66] (104-55-12-234.lightspeed.knvltn.sbcglobal.net. [104.55.12.234]) by smtp.gmail.com with ESMTPSA id k125-20020a0dfa83000000b0057a8de72338sm159622ywf.68.2023.08.30.19.47.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Aug 2023 19:47:46 -0700 (PDT) Message-ID: Date: Wed, 30 Aug 2023 22:47:45 -0400 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad Content-Language: en-US To: Cy Schubert , Gleb Smirnoff Cc: Martin Matuska , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <20230831020114.1775729A@slippy.cwsent.com> From: Alexander Motin In-Reply-To: <20230831020114.1775729A@slippy.cwsent.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4RblvS1Sk1z3TdQ On 30.08.2023 22:01, Cy Schubert wrote: > Not the same as the two (different) I got running poudriere on two > different machines. Posted to -current. Right. Gleb's panic looks like from my ZIL area, yours are not, or at least not directly. -- Alexander Motin From nobody Thu Aug 31 02:52:25 2023 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 4Rbm0p05cwz4rb5S; Thu, 31 Aug 2023 02:52:26 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rbm0n6n4Bz3VYY; Thu, 31 Aug 2023 02:52:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693450346; 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=kbuiacVsmnrjWU0pUwyRu9tbmwTvoynvHZdawe23F1Q=; b=mo7biihNuPCUJaLbiJCgMd3CyyKWzY9+fJdMY2GlK5AeB7jfS6mXazo/5NROCrVJRUWe/f SnAipEYphiXJjQn5iJgwSZmm6VaMNpEaPrmyXAjNWu7lLshmGMEGGjeOcHY8l1bMM61i8t +Ib4xixOsEVIcpQNkVdZTdMbgPmV7bLsLLWSxqpDC42WlMTvKoD1CglZP1zI71QlKXORzj fafvMYPPefN8Go2u1NzgIquNHzPEeg5eFLPVNM34qQrbIwUB/Ui8P73zFKC+CAyh/szKYe 0URB3+hfrO8hfBXaXEokw8yYStuha1JWrPFUvtXhb/i4VaVaMxNg41PchV8ZSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693450346; a=rsa-sha256; cv=none; b=bfHVXhUhtFuzYiZ+/SdOT1bJ6w8xta+gsMG6/KPqVz1JL35Qkel1OiFRwljqHITYAOJMWm vcjUnLStthtu5CxRAtODQIOQP/kNFFX+OZgeSIvUB//h6N2iYLdqCEJEBlNIO1znIIlR1q 5HwdCxZ82GGAEWwxonN4UNhgjv77rJzSJ5ln9PWvf/YGbm/g9UJy8CRB4R3Ce0MoaVsqWY VdvcituyceCZVA/pJjskZweFSoaAa8evvNZj+pXg4/YsaDXa10IfBXFr6fw80hPgd1Kv+l KX9dxf9wVylao6UbwqqfqEdeKlqlI3RsJM8E9snbgVI4qg0ETYHOJhdk5+VHzQ== 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=1693450345; 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=kbuiacVsmnrjWU0pUwyRu9tbmwTvoynvHZdawe23F1Q=; b=NSmCAiiVeXgGORyY9lwD8xippxXDhVyy2+NWKUZLANJO502egQkd8ynVxG4Gi4+ZwRnexu nZnNI/PcSxNCYCiu8xFYVRBqY0G2uCx+VDnvKJt22kdhqwPdUvFDd3rZPm1o9Ct38MS7SK +XCjQx5NtHvXeKS5EyDAQrc6zZNDnv0RmFpQB1zUQgm1AqW0o0a1IOqUkt0HkmojgxkthS qHOJyAOBw/UNgjuCARZ8X6czi5yFlESYLFtmeM5H54rOEsAmdyAzgVzXJrd9A4Vq87N9Y2 ZeSZr80ugJhZ+nosrwXeA+K7+1Z5sL8841ILwY9LI5l47BUHcvsvE/aiUx4fiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rbm0n5qkmz107d; Thu, 31 Aug 2023 02:52:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37V2qPr7083688; Thu, 31 Aug 2023 02:52:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37V2qPKe083671; Thu, 31 Aug 2023 02:52:25 GMT (envelope-from git) Date: Thu, 31 Aug 2023 02:52:25 GMT Message-Id: <202308310252.37V2qPKe083671@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eugene Grosbein Subject: git: 872e89405684 - main - unbreak BEGEMOT-LM75-MIB.txt 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 872e89405684eac984e9004bdfeeb540e818ed74 Auto-Submitted: auto-generated The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=872e89405684eac984e9004bdfeeb540e818ed74 commit 872e89405684eac984e9004bdfeeb540e818ed74 Author: Eugene Grosbein AuthorDate: 2023-08-31 02:47:57 +0000 Commit: Eugene Grosbein CommitDate: 2023-08-31 02:47:57 +0000 unbreak BEGEMOT-LM75-MIB.txt The MIB has several bugs making it unusable. Fix it. Reported-by: Eugene M. Zheganin MFC-after: 2 weeks --- usr.sbin/bsnmpd/modules/snmp_lm75/BEGEMOT-LM75-MIB.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bsnmpd/modules/snmp_lm75/BEGEMOT-LM75-MIB.txt b/usr.sbin/bsnmpd/modules/snmp_lm75/BEGEMOT-LM75-MIB.txt index c4cf536e5043..7966f6535f15 100644 --- a/usr.sbin/bsnmpd/modules/snmp_lm75/BEGEMOT-LM75-MIB.txt +++ b/usr.sbin/bsnmpd/modules/snmp_lm75/BEGEMOT-LM75-MIB.txt @@ -35,7 +35,7 @@ IMPORTS begemot FROM BEGEMOT-MIB; -begemotLoos MODULE-IDENTITY +begemotLm75 MODULE-IDENTITY LAST-UPDATED "201402240000Z" ORGANIZATION "FreeBSD" CONTACT-INFO @@ -59,7 +59,7 @@ begemotLm75Objects OBJECT IDENTIFIER ::= { begemotLm75 1 } -- Configuration parameters -- ---------------------------------------------------------- -- -lm75Sensor OBJECT IDENTIFIER ::= { begemotlm75Objects 1 } +lm75Sensor OBJECT IDENTIFIER ::= { begemotLm75Objects 1 } lm75Sensors OBJECT-TYPE SYNTAX Integer32 @@ -67,7 +67,7 @@ lm75Sensors OBJECT-TYPE STATUS current DESCRIPTION "Number of LM75 sensors in the system." - ::= { lm75Sensors 1 } + ::= { lm75Sensor 1 } -- ---------------------------------------------------------- -- -- TempSensor Table @@ -80,7 +80,7 @@ lm75SensorTable OBJECT-TYPE "A table containing information about all temperature sensors." ::= { begemotLm75Objects 2 } -loosTempSensorEntry OBJECT-TYPE +lm75SensorEntry OBJECT-TYPE SYNTAX Lm75SensorEntry MAX-ACCESS not-accessible STATUS current From nobody Thu Aug 31 07:51:03 2023 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 4RbtdN0rP9z4rsDZ; Thu, 31 Aug 2023 07:51:04 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RbtdN0QNQz4SG6; Thu, 31 Aug 2023 07:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693468264; 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=+IDIG1Usg/m+c5s4YVkfSv1v5+zMTAhszeQ0MusRPCI=; b=PFMjrLUglhyi5I+naZyxLIG42gDepVb6zBNidh7/SprR29XZUwYGtXjCyBPlu4wZiQEqPP dk+mtVaj/8RoWmlHHNI2aFtbKkwxpUIDS7mLZdiZLFLR7WKJhoFb/sOeG6AYO+ShSkbCCY KfDE1dAMftSmdOZMQXdAu6khFOjb997F4v3GmzePidYlRwOtqghxGFedBMkB48QKl2muSl xlZlY4o4IN6cHVBippP349PHmfBrAGvKc/MPcf8IefeKZCl0CwxqJZgskkdckHz3tqBOH0 qrJ4AU6yMULf91Eyg7h+VVZCJezWPO5YwXZZfgrodyAu2Qx21hAcAU86e/amBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693468264; a=rsa-sha256; cv=none; b=KR/5YNeQ5qPPcdRN8MqtIgOIjP1qiX9bdogpyQ1o3q61+W2bFMp49iyq2gAbD1tvH+YsLL jZ8sU04/McgBgrM9LW2cTCr6u0I7rebxnULZvzks6eQnaqQyiLBFiBmPU4UVX3zQFiFTMo LQD0VaHX25RM/Ato7NGtLaSRfQWfNHVpEpTNfb8amvpB/PaZMyfaiuYUXXqt8vaS9qMuKs WR36We7iTBzI+uE7uafYmT91R7wPenBLDYLsJpnUiZu+bBD1PeS0oULEXKKQGynz4MIp9+ rYOHIg2x6HqcDzoxr8MMGRAaXu+ICl1vhNZSVujvnvQ621PqTUk7CigGjUxwnw== 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=1693468264; 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=+IDIG1Usg/m+c5s4YVkfSv1v5+zMTAhszeQ0MusRPCI=; b=sVGLH+f6m/4vgyooF/q5W8/HNsZfwPTpfqZ/vJ6TyzehX1cRwnTqDuqoz5b3w+F1dBM2tB OPHl5WtXITk3x7c4yk2gqSq7aB4mQ31I4Nby6tKNLRkYqM9t8ljGHXV7pt1rCg/rvx5Ktw QbF5m0PCh09D2ldwhftn+KOr/4EwYGOMbNMZVId7/Xt9JPPhpbpirGrdkSNR7SNBiyTIwb IUUrTutOAY6aHlPegfreiKrvFZCYc8oHHAfSnZ6cC1N3nXQEq7fFkbTHaVXMi1loPSIKii qCXKJvM1X12biqoEev0iCh972uxJ29BoEgtrGBjF3dUOxS8d17cN2IpFj5O47A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RbtdM6bwYz18PP; Thu, 31 Aug 2023 07:51:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37V7p3oF076840; Thu, 31 Aug 2023 07:51:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37V7p31M076837; Thu, 31 Aug 2023 07:51:03 GMT (envelope-from git) Date: Thu, 31 Aug 2023 07:51:03 GMT Message-Id: <202308310751.37V7p31M076837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 56b74a2d856c - main - nss_tacplus: Provide dummy setpwent(), getpwent_r(), endpwent(). 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56b74a2d856c4d65a4b5c72d1352067b6b469d3b Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=56b74a2d856c4d65a4b5c72d1352067b6b469d3b commit 56b74a2d856c4d65a4b5c72d1352067b6b469d3b Author: Dag-Erling Smørgrav AuthorDate: 2023-08-31 07:49:41 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-08-31 07:49:57 +0000 nss_tacplus: Provide dummy setpwent(), getpwent_r(), endpwent(). These aren't really needed, since TACACS+ does not support enumeration, but providing placeholders keeps nsdispatch() from complaining that they're missing. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D41658 --- lib/nss_tacplus/nss_tacplus.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/lib/nss_tacplus/nss_tacplus.c b/lib/nss_tacplus/nss_tacplus.c index e18ffe2315ce..238d7bf301ad 100644 --- a/lib/nss_tacplus/nss_tacplus.c +++ b/lib/nss_tacplus/nss_tacplus.c @@ -271,12 +271,43 @@ nss_tacplus_getpwnam_r(void *retval, void *mdata __unused, va_list ap) return (ret); } +static int +nss_tacplus_setpwent(void *retval __unused, void *mdata __unused, + va_list ap __unused) +{ + return (NS_SUCCESS); +} + +static int +nss_tacplus_getpwent_r(void *retval, void *mdata __unused, va_list ap) +{ + struct passwd *pwd __unused = va_arg(ap, struct passwd *); + char *buffer __unused = va_arg(ap, char *); + size_t bufsize __unused = va_arg(ap, size_t); + int *result = va_arg(ap, int *); + + *(void **)retval = NULL; + *result = 0; + return (NS_SUCCESS); + +} + +static int +nss_tacplus_endpwent(void *retval __unused, void *mdata __unused, + va_list ap __unused) +{ + return (NS_SUCCESS); +} + ns_mtab * nss_module_register(const char *name __unused, unsigned int *plen, nss_module_unregister_fn *unreg) { static ns_mtab mtab[] = { { "passwd", "getpwnam_r", &nss_tacplus_getpwnam_r, NULL }, + { "passwd", "setpwent", &nss_tacplus_setpwent, NULL }, + { "passwd", "getpwent_r", &nss_tacplus_getpwent_r, NULL }, + { "passwd", "endpwent", &nss_tacplus_endpwent, NULL }, }; *plen = nitems(mtab); From nobody Thu Aug 31 08:42:42 2023 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 4Rbvmy525Mz4rvP6; Thu, 31 Aug 2023 08:42:42 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rbvmy2nxPz4XV8; Thu, 31 Aug 2023 08:42:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693471362; 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=sNme/APLo6kB/7bSZbaz3X5Wx4ejmGQFoAXlcAC0ngw=; b=WqrvjXs7/XpEXTwZEBWIE5xk1Z0oFFVPthS+0dZAR18J8EWfxq3RpUupdlerlHUMN+Jy15 4bxtwZn1s865Wjqx0oLUtX8ejmA/fSTo08Luv3K7QZldIIvwu8Nurdcva6tHc1GPbMpAkc qAQ+yH2qUZDpmd+2iyD76cqbuMe0Tq5BARpfXLhoMHyOM3GKRz0Hb9T97lbohxpNGTLnWf HNkpOborg7hv7Kkmedg+DZinqDZucXZyz3yucIQAPNZL7NFtf1vNexumYZWTjXLOhuSNqd jn/1Y2foqNM9nbHV2QygJ60VQrx2Wh97Aqtfpqv9kv+WgncwpQLTK56EP7HOBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693471362; a=rsa-sha256; cv=none; b=yCpIAegClqxeAPiAeSuso3c5Jv2h6e/u5DTX7lG8YYUfv6zjEhESIrLRoXXBmlf9UWxVE2 d5NcArSYEP5OyaLwahyxFfOmqwhhPBkZy6qYR2s9h4617v9PlqZwvRRhsESsAo1TZUIW+f wQqy62xNZ9SnizDEMrsPP+a5pVc3UQ2bv7tkMtpMDTDepY4uXbVLawwLwv3XpjtEamkey/ HKruQh5aE8kb1pR6YTNo/cf5xbfgjAWvEMOybjE5G8n27itJiWosSd8r7lglwRMwqpKXEc RxynikpWTqIPBD1LA2EeNoIUKMb5m08bXPjCIV1Z8Np6aXHqTra6JA4dw6ojDw== 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=1693471362; 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=sNme/APLo6kB/7bSZbaz3X5Wx4ejmGQFoAXlcAC0ngw=; b=ySlOdn2sbb7mjilJGpIovKtjdoADuCwSzcSoLKwc90fLvVAOlIjjBDhoJx9rDrMxMSKRwx y+kd4r6tV7me29V87aSmIQ/w0WB1DQC47/BNoQy8OKj5cKAJpGgj21hr55A/9lNdC/mX7W 1t7ss11FktbO2PUyh9CFtCD40lgTCbgqR1DpicK9ANkaWy4WzCYBm+5QJNMrrvPe0YwVgI Dc6ShFSWifktlBL5zHeTpyJWrdjJSALZBrAqdn0vXJ8SKOGr2UmP/hqJwUhRgPRSFJXuLs EPRe6bNtdD8SSlIVv2drS3fHMUpOdLYfVTll6k8l3Mt2K15MWElYKmS7S8zjfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rbvmy1tx9z19pJ; Thu, 31 Aug 2023 08:42:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37V8gg1H066070; Thu, 31 Aug 2023 08:42:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37V8ggwU066067; Thu, 31 Aug 2023 08:42:42 GMT (envelope-from git) Date: Thu, 31 Aug 2023 08:42:42 GMT Message-Id: <202308310842.37V8ggwU066067@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 8c1274138a20 - main - vmxnet3: do restart on VLAN changes 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c1274138a20ee2342c4f217adb605e3abc14042 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8c1274138a20ee2342c4f217adb605e3abc14042 commit 8c1274138a20ee2342c4f217adb605e3abc14042 Author: Kristof Provost AuthorDate: 2023-08-31 07:32:54 +0000 Commit: Kristof Provost CommitDate: 2023-08-31 08:42:29 +0000 vmxnet3: do restart on VLAN changes At least one user reports issues with vmx interfaces after 725e4008ef, where we default to not resetting the interface on VLAN changes. This was on an ESXi 7.0.3 setup. Reported by: Marcos Mendoza MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/dev/vmware/vmxnet3/if_vmx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/vmware/vmxnet3/if_vmx.c b/sys/dev/vmware/vmxnet3/if_vmx.c index 2c3530a217f3..fdcad0dd4bba 100644 --- a/sys/dev/vmware/vmxnet3/if_vmx.c +++ b/sys/dev/vmware/vmxnet3/if_vmx.c @@ -2513,6 +2513,7 @@ vmxnet3_if_needs_restart(if_ctx_t ctx __unused, enum iflib_restart_event event) { switch (event) { case IFLIB_RESTART_VLAN_CONFIG: + return (true); default: return (false); } From nobody Thu Aug 31 08:56:41 2023 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 4Rbw561TRmz4rw7v; Thu, 31 Aug 2023 08:56:42 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rbw560f0Gz4YXR; Thu, 31 Aug 2023 08:56:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693472202; 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=UAs+rxlZtqkMfYbmP5yMQEIqmZTOOTkHq5b3CkE6AF0=; b=cl9Fq+PvMi1NnRvxKtG7PEkH0EkslMvCGSyoXKbdQ8yg9XSjwb78+eX0IWfvtuPSD7dE4a 0kjF6mX99mGx0qOKuuXbq9e+AqySGAmr5ZcQsfKhm6UPvCT4ECpZe53Zdh9Y4EbxnVDlg6 1QbsU7dG7yyqHs4rzl3nfg1LeQ71OCFNaVKPzYmyU5EuCv2J1drxLT0P6SkSwph4ISiCsl ZFkPjXG5VYA3H0GlHyK8j1YnpzfWhwYbVtKCR6a6y1u7PoIv92811zBJmTW4TvL7aAnbFZ D7fElY91TJcJdG5vnsALKwSB4F3Jt0x8gwkBvfJ4hkn0fW1DDxsf/1KPynNeNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693472202; a=rsa-sha256; cv=none; b=lLU1swNEd+yD5R4qCdtjqeEZU2eLM5QecBRkkAXnED2LPwDs+9E3j5t3Jopz8blBUxQs0u dN0bDn72JnACjHP/kJdmaD+qJQ7vQQnQegEZLk7E6FMFeVK4j2mzBFwmcRd7eKY79b0NDL x0saZuSz4UE4v5sw9xcFKJyCwnTQVb32OFoa5LfGYI1+c1zllBg307qq9XoHz2UtWS9DVT +2MBOucrR32y7BExr/Z7Y7/0K+efY28JbhFVwLi8054FEZAJrD8YyHZsJ76ifIBAAz7yi/ CQrwvoydK5QH0kqAs1Ly7MUdwlz8ye91UM2C9g4bvhQH1KOva/uicXyU/hCvTg== 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=1693472202; 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=UAs+rxlZtqkMfYbmP5yMQEIqmZTOOTkHq5b3CkE6AF0=; b=EKJZZjg9eTU3zAM/QFFzudRfIDbd5Wp/ghfnHHvNOJ0gFzVdTPhUMacHX3nuosqIeLkUt1 caFbaXDQ3Qo5K31GH2Tr/fv6ldAAj1tMEkExP1XSdECu9Rhp0Joj3Zcbu3Kkfgh9WebHhn GqgjGppW7cyhSUalgOtT49JbiQz8ic7dTr01m/PgOMkJUIJkX1eALoRBMCDuOhXkWWxHu1 ouJB9q+F18DQbani7WBxAj6dKNWlBFUFvYxsQwOTCLF+dQsbaFtkhTpme8gaxJag11h2hL aca2QSoZBZBhHB2wRq7yoPYJarkMsNDvCnJbx+abyQ9SeoAxMI6pAJJ9Tl3pPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rbw556mpNz19sN; Thu, 31 Aug 2023 08:56:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37V8ufNO083155; Thu, 31 Aug 2023 08:56:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37V8ufYX083152; Thu, 31 Aug 2023 08:56:41 GMT (envelope-from git) Date: Thu, 31 Aug 2023 08:56:41 GMT Message-Id: <202308310856.37V8ufYX083152@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: ddd08375c855 - main - pf (t)ftp-proxy: use libpfctl instead of DIOCGETSTATUS 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ddd08375c85576b49fb9a34968ba2c2f4f8d56cf Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ddd08375c85576b49fb9a34968ba2c2f4f8d56cf commit ddd08375c85576b49fb9a34968ba2c2f4f8d56cf Author: Kristof Provost AuthorDate: 2023-08-29 15:00:44 +0000 Commit: Kristof Provost CommitDate: 2023-08-31 08:56:31 +0000 pf (t)ftp-proxy: use libpfctl instead of DIOCGETSTATUS Prefer libpfctl functions over direct access to the ioctl whenever possible. This will allow subsequent removal of DIOCGETSTATUS (in 15) as there already is an nvlist-based alternative. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D41647 --- contrib/pf/ftp-proxy/filter.c | 9 ++++++--- contrib/pf/tftp-proxy/filter.c | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/contrib/pf/ftp-proxy/filter.c b/contrib/pf/ftp-proxy/filter.c index e4787985e99f..4277e079f3be 100644 --- a/contrib/pf/ftp-proxy/filter.c +++ b/contrib/pf/ftp-proxy/filter.c @@ -169,7 +169,7 @@ do_rollback(void) void init_filter(const char *opt_qname, const char *opt_tagname, int opt_verbose) { - struct pf_status status; + struct pfctl_status *status; qname = opt_qname; tagname = opt_tagname; @@ -182,10 +182,13 @@ init_filter(const char *opt_qname, const char *opt_tagname, int opt_verbose) dev = open("/dev/pf", O_RDWR); if (dev == -1) err(1, "open /dev/pf"); - if (ioctl(dev, DIOCGETSTATUS, &status) == -1) + status = pfctl_get_status(dev); + if (status == NULL) err(1, "DIOCGETSTATUS"); - if (!status.running) + if (!status->running) errx(1, "pf is disabled"); + + pfctl_free_status(status); } int diff --git a/contrib/pf/tftp-proxy/filter.c b/contrib/pf/tftp-proxy/filter.c index 1689d3465fd3..966628464d28 100644 --- a/contrib/pf/tftp-proxy/filter.c +++ b/contrib/pf/tftp-proxy/filter.c @@ -173,7 +173,7 @@ do_rollback(void) void init_filter(char *opt_qname, int opt_verbose) { - struct pf_status status; + struct pfctl_status *status; qname = opt_qname; @@ -187,14 +187,17 @@ init_filter(char *opt_qname, int opt_verbose) syslog(LOG_ERR, "can't open /dev/pf"); exit(1); } - if (ioctl(dev, DIOCGETSTATUS, &status) == -1) { + status = pfctl_get_status(dev); + if (status == NULL) { syslog(LOG_ERR, "DIOCGETSTATUS"); exit(1); } - if (!status.running) { + if (!status->running) { syslog(LOG_ERR, "pf is disabled"); exit(1); } + + pfctl_free_status(status); } int From nobody Thu Aug 31 08:56:42 2023 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 4Rbw57647kz4rw3D; Thu, 31 Aug 2023 08:56:43 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rbw571N33z4Z7f; Thu, 31 Aug 2023 08:56:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693472203; 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=hciPVbfluMO9V2s2AjasrtlNe23kdCuT0jxehTqlDiI=; b=B/kAJDMOhKBfD7Pv2wpIZyyYyECqEgByH+MQW5hMAcHOzbw2cpfggI/dd25qAMedlNZund UiE28UWUKYuXO7NZJQ9nnKNNQFydbyx4d1a0faZ97WB8nl8l7bpRMo7RA/1eR3RTbbEyXC JErvgQvParuJ7g2AKTdWX1/ygrctQ/eDwl5oaNsxVDUMPhDDfxOemAhbStWHBEYkr6REgZ D/vW3/yDzdu3WUaXj+eCwGVwzz4MuaFh5oFRmFFptlCXZisU+94wY1+3m4YYo/oHpig0x0 oeHj/ZDiwm8pZtanr5D4UGSMuP0oxtNz1MWCfo0d4z7YjW4hhAL4ZVtbeBvDPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693472203; a=rsa-sha256; cv=none; b=BDdMTEEa9m0WBEf2nBVnaPMKgLkiia1MutpDFZjQb5qRhaxzcxojFURRuG1aDnL7y5+cdm SPk8X4CLkD+biUXtw/OFp0TRvRcsxR8H2oZdSvX1PobwnxfUN9fmamFuDGQN5UJp2CcmCi IFZN6leo52nq2KN2oFZylHWYcI0wAtfmF0/wHQwqdGwB1HwOmcWtbN1lE/qtkh7HCi1Mf9 2V5aMIMf5i6GuVXXQv68RB5ahgWsmP26GSsGzfq4KKBjxFVeWFTeDHZOFsIGr5SLMiaMMv azVXkPQEBcc1G9nUPGIxmPABKlfKPTlMXwD1kUdpEscmB5TYnDNfbz6oN4psHw== 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=1693472203; 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=hciPVbfluMO9V2s2AjasrtlNe23kdCuT0jxehTqlDiI=; b=Id/Bx6LpqyLSGAp9uZJ5yLWYIlbRK9iLWEu6Nt9RxfjHFXDHTsKuaD4FKz6wFBX1nRhk8R wdJiS+4Xf5XAHGkZYPxypuqSN4QSfP/iP6BUqtyqQ/wtor8/tcmWDKS+SOPzKxBLIKwmMK 0Wcba4sFBLTxS6kHBDZurnVg8AHxMuP+K4N0MEEJ4b/rmwUFcoxvlxbo8jY9kKwaDqD0+H jlOqzVrfeRzxehBJeHGfeGjgse1P6DOut/jTj2iRpJmbY/8wlnfi0X9JuNYETMsmG1iXLz RT//UWaFml+W4wKMlL+OskRsHfeVP+UV582q2pInSMPazz9iDiZJinkqG9rsLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rbw570MB9z1B2D; Thu, 31 Aug 2023 08:56:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37V8ugp8083191; Thu, 31 Aug 2023 08:56:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37V8ugn7083188; Thu, 31 Aug 2023 08:56:42 GMT (envelope-from git) Date: Thu, 31 Aug 2023 08:56:42 GMT Message-Id: <202308310856.37V8ugn7083188@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 0b01878fd00b - main - libpfctl: allow pfctl_free_status(NULL) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b01878fd00b128ce3dead119b37781048744d39 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0b01878fd00b128ce3dead119b37781048744d39 commit 0b01878fd00b128ce3dead119b37781048744d39 Author: Kristof Provost AuthorDate: 2023-08-29 15:02:34 +0000 Commit: Kristof Provost CommitDate: 2023-08-31 08:56:31 +0000 libpfctl: allow pfctl_free_status(NULL) Mimic free() and friends, and allow free()ing of NULL. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D41648 --- lib/libpfctl/libpfctl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index f98b43f62cda..7d79d0abb970 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -257,6 +257,9 @@ pfctl_free_status(struct pfctl_status *status) { struct pfctl_status_counter *c, *tmp; + if (status == NULL) + return; + TAILQ_FOREACH_SAFE(c, &status->counters, entry, tmp) { free(c->name); free(c); From nobody Thu Aug 31 08:56:44 2023 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 4Rbw583fQMz4rwV5; Thu, 31 Aug 2023 08:56:44 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rbw582v67z4ZB8; Thu, 31 Aug 2023 08:56:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693472204; 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=veOtsd1m8ehJ+bNU6YdiNiLYkwI51vLM1/WFTzZ6Gsc=; b=Vx8twVQSS8/skyVk1YSVI0j2RP/XGJBaGZ+WEdqFRYQ9S3ZWhe7xDK/h0XvF/2DUFkD9gQ VnzS7nUtkhJf/UMlQJNH+UQf1vmyzzltuZ2ODIHx7ZyDebYCSYKqwSG/W2dhZ0mdbR6+Ck xrvt6lV+ScRUh9VJsMsD5wX+JuHJegs3P70OF3kKHQ3LTN7nd3yQUDTsltf2eqZF1DJGzu qXlqGALhG15wO3Wl4DcSO0pIpzqgFXUSVvRDrArZAivQ0GUbc+AvVqYI6DRF/e1zfMMjcr f/ZxU65avK2Xu9pUFiTmhGas/I+UPTMS59xGMnV1u1aNI7YtYUYZYXOzWwP+Bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693472204; a=rsa-sha256; cv=none; b=nWYJkztZ8EmZTUc5qKZfDv/7o68ntNTEXq/eYzC5EJgipn08MUctCvpVPomAApeFP0zSIq ea8iVdn12uReg8zC9kqoPLIIQoIcVgu5TQuhw2WgqM0xmaFaf0kMrhfSNyCp/8eHMqPJZ+ 9e2B7cSvOPjYXCpPQEgkgIg37AYP6CaeY8Z2BQLlrmcvoadt6qwhi2k5z+39SjZ+kvI+mO 6BUHv843JuD1e6mM+7abNRu7BkX1sP/LOJM+/XED86+KiK17CCML9VcB1NTOOmH5Vx1+4S u1oMudV6mbzfUFPUbIjXPrII/9+o6yxYXI3EaLQ5EmSW8XG0IvOfekXpqyn1Lg== 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=1693472204; 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=veOtsd1m8ehJ+bNU6YdiNiLYkwI51vLM1/WFTzZ6Gsc=; b=gdlJdISq3LBDKfIC3rRHroEw97flIcbKNLRPyPUUATQUQxQ68mLCZY/5JwfQp9AfpiXLv9 fC1+xWOP2mle0VDT2ooiZsDovOcmHccgCxl39qxU6s6O/FES+pj2mmGQBnmvIJmQT9eJ9v 0H1LOzIqfvtixFaYkB2bD8KxiZ1+3W/fvOsY3ogcKtNZshRcOiWGoGv20Q+br/JgP1ak4K q2KTzYI5rgiESg4lH8QnYPGNCWMGpSNW7t+J1LzB9fSutyXm8b9x4WcrjXemW6lpc0yvmT UgZ658Mgf9y6yr1HhCZGrvXzgEK2L1YzQBrtu2hiiSJncoCyTaC/MYIZl7sFaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rbw581cxWz19dL; Thu, 31 Aug 2023 08:56:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37V8ui25083242; Thu, 31 Aug 2023 08:56:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37V8uiVQ083239; Thu, 31 Aug 2023 08:56:44 GMT (envelope-from git) Date: Thu, 31 Aug 2023 08:56:44 GMT Message-Id: <202308310856.37V8uiVQ083239@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: e3d3d61a7d94 - main - libpfctl: implement status counter accessor functions 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3d3d61a7d94a4155ef70048a8b578985fca8383 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e3d3d61a7d94a4155ef70048a8b578985fca8383 commit e3d3d61a7d94a4155ef70048a8b578985fca8383 Author: Kristof Provost AuthorDate: 2023-08-29 15:04:17 +0000 Commit: Kristof Provost CommitDate: 2023-08-31 08:56:31 +0000 libpfctl: implement status counter accessor functions The new nvlist-based status call allows us to easily add new counters. However, the libpfctl interface defines a TAILQ, so it's not quite trivial to find the counter consumers are interested in. Provide convenience functions to access the counters. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D41649 --- lib/libpfctl/libpfctl.c | 31 +++++++++++++++++++++++++++++++ lib/libpfctl/libpfctl.h | 3 +++ 2 files changed, 34 insertions(+) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 7d79d0abb970..1eccf3dfbcdf 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -252,6 +252,37 @@ pfctl_get_status(int dev) return (status); } +static uint64_t +_pfctl_status_counter(struct pfctl_status_counters *counters, uint64_t id) +{ + struct pfctl_status_counter *c; + + TAILQ_FOREACH(c, counters, entry) { + if (c->id == id) + return (c->counter); + } + + return (0); +} + +uint64_t +pfctl_status_counter(struct pfctl_status *status, int id) +{ + return (_pfctl_status_counter(&status->counters, id)); +} + +uint64_t +pfctl_status_fcounter(struct pfctl_status *status, int id) +{ + return (_pfctl_status_counter(&status->fcounters, id)); +} + +uint64_t +pfctl_status_scounter(struct pfctl_status *status, int id) +{ + return (_pfctl_status_counter(&status->scounters, id)); +} + void pfctl_free_status(struct pfctl_status *status) { diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index 35c662816f3b..2559fc9c4843 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -385,6 +385,9 @@ struct pfctl_syncookies { }; struct pfctl_status* pfctl_get_status(int dev); +uint64_t pfctl_status_counter(struct pfctl_status *status, int id); +uint64_t pfctl_status_fcounter(struct pfctl_status *status, int id); +uint64_t pfctl_status_scounter(struct pfctl_status *status, int id); void pfctl_free_status(struct pfctl_status *status); int pfctl_get_eth_rulesets_info(int dev, From nobody Thu Aug 31 08:56:45 2023 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 4Rbw593vpTz4rwXT; Thu, 31 Aug 2023 08:56:45 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rbw593NSBz4Z8X; Thu, 31 Aug 2023 08:56:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693472205; 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=vh1v8JV3MGEs6IzaUXrqzLh8EdySI5Ld2sCNXUIBmKk=; b=qMwQjhF6cB4t12cAgPPakPS8HWObgmdx3gDDRtogREZZZDyeGsTKZ9FeK19D7//qGXw+hy 2XInSFDB1OCH3vuuxyNe1jf9G2ePgSX6ZIj3l6+BmtSaPUz4Nck+TWb0ZyYhhxh8neV/SG kHfBcDVbsWsbQQuRNIFLhCqbtSK54I6juOXkik5+rOpU3k1/piB3ei4rHDV25zOtNsqkFC 5AkXQcMaEOYpi1l0oPXKPaIVGXtcZyrTuFWHCC9Vkdrh/f+0YpOgDHLsUWr+ka2XnKKNpT y+Ro0TAZyejWHsbc3vPyVnfNTzSIfkiknbdquLrx3bSQLF80WaPsHeKvIYH/4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693472205; a=rsa-sha256; cv=none; b=qrCcxICmVbl2D5IosLApIH557mufhn4X8JzYZvH75CEQAuqj45ZSBMtVe+Tzv4chSdWZfz pkSoiyGqevnJWCvN9BaFgisJ3QaC6OyUcJYd9TJt5tV0IaLtZyTxLBKw5bgtX+8OWel/nJ uZDL8vGndyUZ7iQ4ObpGBDjXieuPR+6J+eP2NIlDC0Yoj2rngq/dsBcwTGYEC4/U4P9dSC ncAtQx2IIrnItylN2K2oVfv4Yqd+z7HP3hlgxuVW0KB5Im/CCU4SjOZQEFRwH/I3GbaDLi w0K7AO+YCw2jxupwTjaKFIauXmGDD65lv+tOfy9Kjw4JrDzDwqhDG3ALO9+2dg== 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=1693472205; 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=vh1v8JV3MGEs6IzaUXrqzLh8EdySI5Ld2sCNXUIBmKk=; b=KxyX1GDAGUGYrMNb29qBDGr/OL7HXzuetEGgHcIjVrR4CLlSBxAqZgjiMqZf1b0M9WWr16 AKJe6ZmaUnhfFJnOIWzoQvnLXs21vAdWOnos/0HawOre9CTntyRa6T8PgX26V+MvtSqisL BAyb2NCKtXf8qKL+8AahYFYiwgviYnRSiSceMVhKALJHzFI+eFulRPca3TOzYkcA0sKg0Y Jsn1N2/+ujF/7LFkj5JLKmTb/Ps8vCv1k4+0gGUMvyyDaDIAtzabkwjNiSoTEpWybHJiKw r0oHPJ0ZRGdbv4eynj+YQGgqEcjPr/A1EnUtCHRcXXXCHQ4cM0WVFFywdupmsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rbw592MJgz1B4J; Thu, 31 Aug 2023 08:56:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37V8ujgW083292; Thu, 31 Aug 2023 08:56:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37V8ujFh083289; Thu, 31 Aug 2023 08:56:45 GMT (envelope-from git) Date: Thu, 31 Aug 2023 08:56:45 GMT Message-Id: <202308310856.37V8ujFh083289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 6fbb9fbf7d65 - main - snmp_pf: use libpfctl's pfctl_get_status() rather than DIOCGETSTATUS 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6fbb9fbf7d659574512d706912e8fd0576b13573 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6fbb9fbf7d659574512d706912e8fd0576b13573 commit 6fbb9fbf7d659574512d706912e8fd0576b13573 Author: Kristof Provost AuthorDate: 2023-08-29 15:16:19 +0000 Commit: Kristof Provost CommitDate: 2023-08-31 08:56:32 +0000 snmp_pf: use libpfctl's pfctl_get_status() rather than DIOCGETSTATUS Prefer libpfctl functions over direct access to the ioctl whenever possible. This will allow subsequent removal of DIOCGETSTATUS (in 15) as there already is an nvlist-based alternative. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D41650 --- usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c | 74 ++++++++++++++++--------------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c b/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c index 134c05171749..a5786007d3f4 100644 --- a/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c +++ b/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c @@ -54,7 +54,7 @@ static int dev = -1; static int started; static uint64_t pf_tick; -static struct pf_status pfs; +static struct pfctl_status *pfs; enum { IN, OUT }; enum { IPV4, IPV6 }; @@ -166,18 +166,18 @@ pf_status(struct snmp_context __unused *ctx, struct snmp_value *val, switch (which) { case LEAF_pfStatusRunning: - val->v.uint32 = pfs.running; + val->v.uint32 = pfs->running; break; case LEAF_pfStatusRuntime: - runtime = (pfs.since > 0) ? - time(NULL) - pfs.since : 0; + runtime = (pfs->since > 0) ? + time(NULL) - pfs->since : 0; val->v.uint32 = runtime * 100; break; case LEAF_pfStatusDebug: - val->v.uint32 = pfs.debug; + val->v.uint32 = pfs->debug; break; case LEAF_pfStatusHostId: - sprintf(str, "0x%08x", ntohl(pfs.hostid)); + sprintf(str, "0x%08x", ntohl(pfs->hostid)); return (string_get(val, str, strlen(str))); default: @@ -205,22 +205,22 @@ pf_counter(struct snmp_context __unused *ctx, struct snmp_value *val, switch (which) { case LEAF_pfCounterMatch: - val->v.counter64 = pfs.counters[PFRES_MATCH]; + val->v.counter64 = pfctl_status_counter(pfs, PFRES_MATCH); break; case LEAF_pfCounterBadOffset: - val->v.counter64 = pfs.counters[PFRES_BADOFF]; + val->v.counter64 = pfctl_status_counter(pfs, PFRES_BADOFF); break; case LEAF_pfCounterFragment: - val->v.counter64 = pfs.counters[PFRES_FRAG]; + val->v.counter64 = pfctl_status_counter(pfs, PFRES_FRAG); break; case LEAF_pfCounterShort: - val->v.counter64 = pfs.counters[PFRES_SHORT]; + val->v.counter64 = pfctl_status_counter(pfs, PFRES_SHORT); break; case LEAF_pfCounterNormalize: - val->v.counter64 = pfs.counters[PFRES_NORM]; + val->v.counter64 = pfctl_status_counter(pfs, PFRES_NORM); break; case LEAF_pfCounterMemDrop: - val->v.counter64 = pfs.counters[PFRES_MEMORY]; + val->v.counter64 = pfctl_status_counter(pfs, PFRES_MEMORY); break; default: @@ -248,19 +248,19 @@ pf_statetable(struct snmp_context __unused *ctx, struct snmp_value *val, switch (which) { case LEAF_pfStateTableCount: - val->v.uint32 = pfs.states; + val->v.uint32 = pfs->states; break; case LEAF_pfStateTableSearches: val->v.counter64 = - pfs.fcounters[FCNT_STATE_SEARCH]; + pfctl_status_fcounter(pfs, FCNT_STATE_SEARCH); break; case LEAF_pfStateTableInserts: val->v.counter64 = - pfs.fcounters[FCNT_STATE_INSERT]; + pfctl_status_fcounter(pfs, FCNT_STATE_INSERT); break; case LEAF_pfStateTableRemovals: val->v.counter64 = - pfs.fcounters[FCNT_STATE_REMOVALS]; + pfctl_status_fcounter(pfs, FCNT_STATE_REMOVALS); break; default: @@ -288,19 +288,19 @@ pf_srcnodes(struct snmp_context __unused *ctx, struct snmp_value *val, switch (which) { case LEAF_pfSrcNodesCount: - val->v.uint32 = pfs.src_nodes; + val->v.uint32 = pfs->src_nodes; break; case LEAF_pfSrcNodesSearches: val->v.counter64 = - pfs.scounters[SCNT_SRC_NODE_SEARCH]; + pfctl_status_scounter(pfs, SCNT_SRC_NODE_SEARCH); break; case LEAF_pfSrcNodesInserts: val->v.counter64 = - pfs.scounters[SCNT_SRC_NODE_INSERT]; + pfctl_status_scounter(pfs, SCNT_SRC_NODE_INSERT); break; case LEAF_pfSrcNodesRemovals: val->v.counter64 = - pfs.scounters[SCNT_SRC_NODE_REMOVALS]; + pfctl_status_scounter(pfs, SCNT_SRC_NODE_REMOVALS); break; default: @@ -461,51 +461,51 @@ pf_logif(struct snmp_context __unused *ctx, struct snmp_value *val, switch (which) { case LEAF_pfLogInterfaceName: - strlcpy(str, pfs.ifname, sizeof str); + strlcpy(str, pfs->ifname, sizeof str); return (string_get(val, str, strlen(str))); case LEAF_pfLogInterfaceIp4BytesIn: - val->v.counter64 = pfs.bcounters[IPV4][IN]; + val->v.counter64 = pfs->bcounters[IPV4][IN]; break; case LEAF_pfLogInterfaceIp4BytesOut: - val->v.counter64 = pfs.bcounters[IPV4][OUT]; + val->v.counter64 = pfs->bcounters[IPV4][OUT]; break; case LEAF_pfLogInterfaceIp4PktsInPass: val->v.counter64 = - pfs.pcounters[IPV4][IN][PF_PASS]; + pfs->pcounters[IPV4][IN][PF_PASS]; break; case LEAF_pfLogInterfaceIp4PktsInDrop: val->v.counter64 = - pfs.pcounters[IPV4][IN][PF_DROP]; + pfs->pcounters[IPV4][IN][PF_DROP]; break; case LEAF_pfLogInterfaceIp4PktsOutPass: val->v.counter64 = - pfs.pcounters[IPV4][OUT][PF_PASS]; + pfs->pcounters[IPV4][OUT][PF_PASS]; break; case LEAF_pfLogInterfaceIp4PktsOutDrop: val->v.counter64 = - pfs.pcounters[IPV4][OUT][PF_DROP]; + pfs->pcounters[IPV4][OUT][PF_DROP]; break; case LEAF_pfLogInterfaceIp6BytesIn: - val->v.counter64 = pfs.bcounters[IPV6][IN]; + val->v.counter64 = pfs->bcounters[IPV6][IN]; break; case LEAF_pfLogInterfaceIp6BytesOut: - val->v.counter64 = pfs.bcounters[IPV6][OUT]; + val->v.counter64 = pfs->bcounters[IPV6][OUT]; break; case LEAF_pfLogInterfaceIp6PktsInPass: val->v.counter64 = - pfs.pcounters[IPV6][IN][PF_PASS]; + pfs->pcounters[IPV6][IN][PF_PASS]; break; case LEAF_pfLogInterfaceIp6PktsInDrop: val->v.counter64 = - pfs.pcounters[IPV6][IN][PF_DROP]; + pfs->pcounters[IPV6][IN][PF_DROP]; break; case LEAF_pfLogInterfaceIp6PktsOutPass: val->v.counter64 = - pfs.pcounters[IPV6][OUT][PF_PASS]; + pfs->pcounters[IPV6][OUT][PF_PASS]; break; case LEAF_pfLogInterfaceIp6PktsOutDrop: val->v.counter64 = - pfs.pcounters[IPV6][OUT][PF_DROP]; + pfs->pcounters[IPV6][OUT][PF_DROP]; break; default: @@ -1286,9 +1286,10 @@ pfs_refresh(void) if (started && this_tick <= pf_tick) return (0); - bzero(&pfs, sizeof(struct pf_status)); + pfctl_free_status(pfs); + pfs = pfctl_get_status(dev); - if (ioctl(dev, DIOCGETSTATUS, &pfs)) { + if (pfs == NULL) { syslog(LOG_ERR, "pfs_refresh(): ioctl(): %s", strerror(errno)); return (-1); @@ -1755,6 +1756,9 @@ pf_fini(void) l1 = l2; } + pfctl_free_status(pfs); + pfs = NULL; + close(dev); return (0); } From nobody Thu Aug 31 08:56:46 2023 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 4Rbw5B5MSwz4rw5f; Thu, 31 Aug 2023 08:56:46 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rbw5B4p5Tz4Z6Z; Thu, 31 Aug 2023 08:56:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693472206; 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=58s2rX37vlZm0Sz5m/572A6P6kzYfQ0x5pG58xP+/2s=; b=Sqcz0YDxFSCp6ciYlFHv8VatuxFuqtHNX4+cx10vqvXVRXMBTeVu3A5MAjhqQIcV9HVU5Z wr2hYYt78okA9zHWmt2q+xEZSStI+ovPafuLXqiLU49iIjFIopEpZRG22H3O4rDd5gwe9O IdnoEq83nOQWjvYzq92rDXaLTlxYfhrn8Hlw5CP18xP2TF6ww3+uAynzctigjn24iUHpTW QDaLmIjILOiDFkhMmJ/0tdc3f9009TO7DrvK2zvIM67WVlgiRgey/56KlQsEwkPSSJd2uD A4kbvoNrtOQQMwf7sIDfT+M1tojywN62utJrfqCsCwrIloVM9bSIGZZDRt1aZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693472206; a=rsa-sha256; cv=none; b=ee7Gj2ew/xeAWuYzw6dfkRddO4C7ArhG/ECW2M4t2s8Tuc98l+c9kPyicY05V+mJ9SxWxO gCfjfzSVnBvOea7FwpnOmSvuq2ma3Nl3pvUfJ2wPUmuhLV3IMTtl/b/KVvTRJBoDhAHIHL VVYARtyWI7IUBAwInNPv2+AKYw0B2s/f1UgZ2s4SJiANSoaJxqbizzuboblVdrTArOJOkZ v7icKNoLioAa62itVfw/CUMH4dTGhcHkRoChnvLO2zGJj35RPaPjemlZ8HSvTcLikOIZeQ VmyxaEm19X8MK5GuoRAxjWT6NnDwHxy147damOagFbAfubMoYlBhPHaAdE5wgA== 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=1693472206; 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=58s2rX37vlZm0Sz5m/572A6P6kzYfQ0x5pG58xP+/2s=; b=YZdvRIAuXXdrkM9cpXRKWinB+b2uEDb4Qjjo6HGNh38tgQHRt03nymhiXhwBZa5mJofYbu LYHClmWqReqLgIB04y/fhTRJteBXVt9b3J0Jn0z/xWF8O25V11fyn3DX8zYuj5UPOB5CLX gdsytfA2fwJW6mDdB+USHYL6h5RNdgSR2eNnTTGmYKQEDbrpGw4ClDBxCjJsSXMNXu9z6b OySSVWOxZzoy8TEsNDK4VMm7K5U1/io4k4vQP2FLsnezc9415i8d/YUGBU5oTwTcHzKd68 yyBjq2e+VQ2oYFOQU7aJ73DJUMUuQKHp2cxYhW38FMUoCWzN+Zcre+E+2ZVmlQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rbw5B3dK3z19dM; Thu, 31 Aug 2023 08:56:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37V8ukM7083336; Thu, 31 Aug 2023 08:56:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37V8ukEC083333; Thu, 31 Aug 2023 08:56:46 GMT (envelope-from git) Date: Thu, 31 Aug 2023 08:56:46 GMT Message-Id: <202308310856.37V8ukEC083333@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 8d49fd7331bc - main - pf: remove DIOCGETRULE and DIOCGETSTATUS 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d49fd7331bc72671a14f1aac1d9cdea36672d19 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8d49fd7331bc72671a14f1aac1d9cdea36672d19 commit 8d49fd7331bc72671a14f1aac1d9cdea36672d19 Author: Kristof Provost AuthorDate: 2023-08-29 15:17:24 +0000 Commit: Kristof Provost CommitDate: 2023-08-31 08:56:32 +0000 pf: remove DIOCGETRULE and DIOCGETSTATUS These calls have nvlist variants that completely supersede them. Remove the old code. Reviewed by: mjg MFC after: never Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D41651 --- sys/net/pfvar.h | 2 - sys/netpfil/pf/pf_ioctl.c | 98 ----------------------------------------------- 2 files changed, 100 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index d21ef1517bb6..60c7136e267c 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1921,14 +1921,12 @@ struct pfioc_iface { #define DIOCADDRULE _IOWR('D', 4, struct pfioc_rule) #define DIOCADDRULENV _IOWR('D', 4, struct pfioc_nv) #define DIOCGETRULES _IOWR('D', 6, struct pfioc_rule) -#define DIOCGETRULE _IOWR('D', 7, struct pfioc_rule) #define DIOCGETRULENV _IOWR('D', 7, struct pfioc_nv) /* XXX cut 8 - 17 */ #define DIOCCLRSTATESNV _IOWR('D', 18, struct pfioc_nv) #define DIOCGETSTATE _IOWR('D', 19, struct pfioc_state) #define DIOCGETSTATENV _IOWR('D', 19, struct pfioc_nv) #define DIOCSETSTATUSIF _IOWR('D', 20, struct pfioc_if) -#define DIOCGETSTATUS _IOWR('D', 21, struct pf_status) #define DIOCGETSTATUSNV _IOWR('D', 21, struct pfioc_nv) #define DIOCCLRSTATUS _IO ('D', 22) #define DIOCNATLOOK _IOWR('D', 23, struct pfioc_natlook) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index e5601710bce1..44ede3dea6a3 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2463,14 +2463,12 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td if (securelevel_gt(td->td_ucred, 2)) switch (cmd) { case DIOCGETRULES: - case DIOCGETRULE: case DIOCGETRULENV: case DIOCGETADDRS: case DIOCGETADDR: case DIOCGETSTATE: case DIOCGETSTATENV: case DIOCSETSTATUSIF: - case DIOCGETSTATUS: case DIOCGETSTATUSNV: case DIOCCLRSTATUS: case DIOCNATLOOK: @@ -2532,7 +2530,6 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td case DIOCGETADDR: case DIOCGETSTATE: case DIOCGETSTATENV: - case DIOCGETSTATUS: case DIOCGETSTATUSNV: case DIOCGETSTATES: case DIOCGETSTATESV2: @@ -2579,11 +2576,6 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td break; /* dummy operation ok */ } return (EACCES); - case DIOCGETRULE: - if (((struct pfioc_rule *)addr)->action == - PF_GET_CLR_CNTR) - return (EACCES); - break; default: return (EACCES); } @@ -3228,63 +3220,6 @@ DIOCADDRULENV_error: break; } - case DIOCGETRULE: { - struct pfioc_rule *pr = (struct pfioc_rule *)addr; - struct pf_kruleset *ruleset; - struct pf_krule *rule; - int rs_num; - - pr->anchor[sizeof(pr->anchor) - 1] = 0; - - PF_RULES_WLOCK(); - ruleset = pf_find_kruleset(pr->anchor); - if (ruleset == NULL) { - PF_RULES_WUNLOCK(); - error = EINVAL; - break; - } - rs_num = pf_get_ruleset_number(pr->rule.action); - if (rs_num >= PF_RULESET_MAX) { - PF_RULES_WUNLOCK(); - error = EINVAL; - break; - } - if (pr->ticket != ruleset->rules[rs_num].active.ticket) { - PF_RULES_WUNLOCK(); - error = EBUSY; - break; - } - rule = TAILQ_FIRST(ruleset->rules[rs_num].active.ptr); - while ((rule != NULL) && (rule->nr != pr->nr)) - rule = TAILQ_NEXT(rule, entries); - if (rule == NULL) { - PF_RULES_WUNLOCK(); - error = EBUSY; - break; - } - - pf_krule_to_rule(rule, &pr->rule); - - if (pf_kanchor_copyout(ruleset, rule, pr)) { - PF_RULES_WUNLOCK(); - error = EBUSY; - break; - } - pf_addr_copyout(&pr->rule.src.addr); - pf_addr_copyout(&pr->rule.dst.addr); - - if (pr->action == PF_GET_CLR_CNTR) { - pf_counter_u64_zero(&rule->evaluations); - for (int i = 0; i < 2; i++) { - pf_counter_u64_zero(&rule->packets[i]); - pf_counter_u64_zero(&rule->bytes[i]); - } - counter_u64_zero(rule->states_tot); - } - PF_RULES_WUNLOCK(); - break; - } - case DIOCGETRULENV: { struct pfioc_nv *nv = (struct pfioc_nv *)addr; nvlist_t *nvrule = NULL; @@ -3871,39 +3806,6 @@ DIOCGETSTATESV2_full: break; } - case DIOCGETSTATUS: { - struct pf_status *s = (struct pf_status *)addr; - - PF_RULES_RLOCK(); - s->running = V_pf_status.running; - s->since = V_pf_status.since; - s->debug = V_pf_status.debug; - s->hostid = V_pf_status.hostid; - s->states = V_pf_status.states; - s->src_nodes = V_pf_status.src_nodes; - - for (int i = 0; i < PFRES_MAX; i++) - s->counters[i] = - counter_u64_fetch(V_pf_status.counters[i]); - for (int i = 0; i < LCNT_MAX; i++) - s->lcounters[i] = - counter_u64_fetch(V_pf_status.lcounters[i]); - for (int i = 0; i < FCNT_MAX; i++) - s->fcounters[i] = - pf_counter_u64_fetch(&V_pf_status.fcounters[i]); - for (int i = 0; i < SCNT_MAX; i++) - s->scounters[i] = - counter_u64_fetch(V_pf_status.scounters[i]); - - bcopy(V_pf_status.ifname, s->ifname, IFNAMSIZ); - bcopy(V_pf_status.pf_chksum, s->pf_chksum, - PF_MD5_DIGEST_LENGTH); - - pfi_update_status(s->ifname, s); - PF_RULES_RUNLOCK(); - break; - } - case DIOCGETSTATUSNV: { error = pf_getstatus((struct pfioc_nv *)addr); break; From nobody Thu Aug 31 10:22:19 2023 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 4Rbxzv6l8Pz4s1S8; Thu, 31 Aug 2023 10:22:19 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rbxzv6J4Cz3Fvf; Thu, 31 Aug 2023 10:22:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693477339; 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=JbDHjdwqhbXFNY+TP4HoFfELISmFfhbJUjN9lUO3pnI=; b=b6g5pi68bgfHD1/QaDXESCW6KIPckK/XJM78mzxKCt6xhuzHADiQ+O1EtVjIgEfMfwpRxn ArCzPzWPtJgFuqlLbdYmHe+ETptX30Z93rA9KRDt4Vk7EN87D1joP/mggKvZ2fcpAgFQFG OAPbH3syeD48JmpAecwzL5J+iVjfxMavF9A0SgeiVTeAYjSCrQSaIUirzQ9BXyK/apX9fp PCLCS7N1cd4jcJwPdTMv5cN2j/RFbrVgpBLWZofV0SsT6GfYa+COLJGm7/qCJCtbphe5o6 zBoukp+p74xbcb8D+Em20DlV9EyEPR5VqzAPHJIyPfo96qgAOkgagVgUrNoW8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693477339; a=rsa-sha256; cv=none; b=wW7kR8q2o2fi5qilHGswd5QyDcBZClfpfJ29XFBqLgKVQ6AtUvhmeNmvYaI3fnrKtepM62 vxdi3VGCQfeVwfaJto6r9YwhpUAnq4utiXbmDiY5Ow/Dex35Y7GWJu2Qitxg8vHi6aHXQ+ dbReiG2vFlmg5pbUiRKurTZMAFBReJwr7BgNbqK3pKiCUG2koxZv35N5+NLnaQIKv7//Ne ntRotrjk0pskMDsAMrGk27Qh0LcuLb6taaev+msidnTQhzPHUYiUmU4ShRnR2a6hVhYXQ4 RNm0tB5O3T3K6mschxqnRf2dIvwUApR/QFHpsYbCzubyW1ssHaysa5Oyq1xPqg== 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=1693477339; 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=JbDHjdwqhbXFNY+TP4HoFfELISmFfhbJUjN9lUO3pnI=; b=WBgOd27ULdCdMQYgOavvpNFn8oLoTcad25u/tNfB794Vnv92mB6eYyNAufmEYjl9xIds9/ 7U/WwktuwYvfGNnJpSPVBwcGhCkefyz8nw9JH6FKqh8uUwZfyo1f8ok8qwK0Q+eh4CwkaH xGw/MLp8DnQL66kisULqSen2S+3Re5Froh++I8k5I9cd/B7SgqyBJEVZ8xgR5NJvRs5HF6 pn3Z6kMG1xjBsHNrGn8QqaUZOQd0cehS3015aeIZ8YHC5wrW1NKngztkOicA8pCn1exhjm WNYwOjbAhbvlbZZ6jT/LJ4QfVmMwvsRJfmDMXtnoQe2Nzzhpy0X9K07aWxk0pA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rbxzv5Lf0z1Cvf; Thu, 31 Aug 2023 10:22:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37VAMJY3034344; Thu, 31 Aug 2023 10:22:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37VAMJLY034341; Thu, 31 Aug 2023 10:22:19 GMT (envelope-from git) Date: Thu, 31 Aug 2023 10:22:19 GMT Message-Id: <202308311022.37VAMJLY034341@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: fa03d37432ca - main - mcast: fix memory leak in imf_purge() 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa03d37432caf17d56a931a9e6f5d9b06f102c5b Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=fa03d37432caf17d56a931a9e6f5d9b06f102c5b commit fa03d37432caf17d56a931a9e6f5d9b06f102c5b Author: Kristof Provost AuthorDate: 2023-08-29 09:33:17 +0000 Commit: Kristof Provost CommitDate: 2023-08-31 10:16:20 +0000 mcast: fix memory leak in imf_purge() The IGMP code buffers packets in the imf_inm->inm_scq mbufq, but does not clear this queue when struct in_mfilter is freed by imf_purge(). This can cause memory leaks if IGMPv3 is used. Purge the mbufq on imf_purge(). MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D41629 --- sys/netinet/in_mcast.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index 827b8f96b07e..362e3f25115c 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -915,6 +915,8 @@ imf_purge(struct in_mfilter *imf) imf->imf_st[0] = imf->imf_st[1] = MCAST_UNDEFINED; KASSERT(RB_EMPTY(&imf->imf_sources), ("%s: imf_sources not empty", __func__)); + if (imf->imf_inm != NULL) + mbufq_drain(&imf->imf_inm->inm_scq); } /* From nobody Thu Aug 31 11:53:05 2023 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 4Rc00d2tL7z4s5pJ; Thu, 31 Aug 2023 11:53:05 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rc00d1xf2z3N1Z; Thu, 31 Aug 2023 11:53:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693482785; 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=sDOZhcNc8jBpFhSN+BMlEhbUezIB6mAKVU6a3GrzFUo=; b=ADSya1lo0rz+BkOi+riSgx4Jhe5eSJDYM+qDl0sR+KZ2UZy5iF17ia0GTqDjDveO8f0AiN X8MQu2Px9ujZHwz0jdresTwMFyXUqFzMwKWF1e8YPvfEGQjE7CnWOg9aTwaFYHcbOdeOVV hZFAiud07fmMauIdTa7HFo5BVpd9nafjJkmRYiagR6enJMO/sfkVkNW3Z1hoZ+CfXblIh7 FTPhHJ+PLhcLwbMLB1XpxVSZKTU71lig/KHUHJz6/hMnSpKASIArx3VKsD07NtPveutCdk 77TAPwH/e+5NEOr1JoKL20N2XXLRsic2caQdJS1PA1+rlI/H+mYxMSOeTTUYGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693482785; a=rsa-sha256; cv=none; b=ZJetxbD1VasrEb/OVuIcOs1IMlFloDATL3D4/q1FsN/z7Dsb18oaujfpLyoI62N3ZgRDS0 K5ladFzeIZe89MbOiGsr25SqqfQJeLu3rZtO2Hu+/IDyAPqs2jBvkTBMRRPQcmdE1nC9Eg Vcmi4RrG9xRewSkzn/hyWuKvgd21/DwnG8Sobd4ZwcrI2AGg2OdwSQ2LdQGbZ27N0qWpjy iVlJgP6WysEp/wqTvXhl/WsqfiHaNMMW2CUHxDuFzn5NoUIza7HTtWo0FvapACQ1mU0/Z3 i8H2r9oDoos9qDNh8+LBkoRNmJhKuSeZEnOl2g4B3YTWJ5tgbn0CSoIbj3bXNg== 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=1693482785; 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=sDOZhcNc8jBpFhSN+BMlEhbUezIB6mAKVU6a3GrzFUo=; b=QUDSBpr1Wmhg59b4QONsR3St113IArrRspLZokPlJTk/Mtbm8Y/Ra0wXQBlRjGuYDMH4v5 vJKApyL2rzust9X8MUjyUeffsL3Cb1Rtp5EJ7rw+oxmO5O+Fr+nvDz03rCvDJGfqLk9pO0 Vvbr6yqmQgXf3YNoC2JTzidnzy+jx0T4nmbzT3wAMI7ioVRYx7d6I1W9ant8HEmr0LZTBD 3qShTNbxm5waBPmGs1V63uDsjf7vsWjo4r6Ah1v7gj/8hKWNU/J+0SeoDxK/3WP43+twUm FCDx+9wS9oa+anlBkxFAPOkSLnmfZ0N/cgir5PY8ny0FByHangcBPf5TLUhPqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rc00d107mz2bR; Thu, 31 Aug 2023 11:53:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37VBr5TD083615; Thu, 31 Aug 2023 11:53:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37VBr5KN083612; Thu, 31 Aug 2023 11:53:05 GMT (envelope-from git) Date: Thu, 31 Aug 2023 11:53:05 GMT Message-Id: <202308311153.37VBr5KN083612@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 09ec5e67a7a6 - main - libc: fix history for strverscmp(3) and versionsort(3) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09ec5e67a7a6605e5a58a2e3e82dab243a90609a Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=09ec5e67a7a6605e5a58a2e3e82dab243a90609a commit 09ec5e67a7a6605e5a58a2e3e82dab243a90609a Author: Mina Galić AuthorDate: 2023-08-31 11:50:17 +0000 Commit: Konstantin Belousov CommitDate: 2023-08-31 11:52:31 +0000 libc: fix history for strverscmp(3) and versionsort(3) strverscmp(3) and versionsort(3) where first released in 13.2 PR: 273401 Reviewed by: kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41617 --- lib/libc/gen/scandir.3 | 4 ++-- lib/libc/string/strverscmp.3 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/gen/scandir.3 b/lib/libc/gen/scandir.3 index 024e9947e682..e6d1fb38c2b1 100644 --- a/lib/libc/gen/scandir.3 +++ b/lib/libc/gen/scandir.3 @@ -27,7 +27,7 @@ .\" .\" @(#)scandir.3 8.1 (Berkeley) 6/4/93 .\" -.Dd August 23, 2022 +.Dd August 31, 2023 .Dt SCANDIR 3 .Os .Sh NAME @@ -189,4 +189,4 @@ and .Fn versionsort functions were added in -.Fx 14.0 . +.Fx 13.2 . diff --git a/lib/libc/string/strverscmp.3 b/lib/libc/string/strverscmp.3 index e4413fb96e36..495e5c8780c1 100644 --- a/lib/libc/string/strverscmp.3 +++ b/lib/libc/string/strverscmp.3 @@ -1,6 +1,6 @@ .\" SPDX-License-Identifier: BSD-2-Clause .\" Copyright (c) 2022 Aymeric Wibo -.Dd July 11, 2022 +.Dd August 31, 2023 .Dt STRVERSCMP 3 .Os .Sh NAME @@ -53,4 +53,4 @@ function is a GNU extension and conforms to no standard. The .Fn strverscmp function was added in -.Fx 14.0 . +.Fx 13.2 . From nobody Thu Aug 31 12:45:41 2023 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 4Rc19k2cm5z4s875; Thu, 31 Aug 2023 12:46:02 +0000 (UTC) (envelope-from gallatin@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rc19k1tndz3Rwy; Thu, 31 Aug 2023 12:46:02 +0000 (UTC) (envelope-from gallatin@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693485962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gJIp1KXlbbu15+zCuz2IsPc8SIsmWjaPZi7Vj5V/4JQ=; b=MIuo7aRcybFH1/eiKjYXbwQvDyXf0juvLbuIELD2bvAC9pqOiZKepmRMlDP3lpef4STTmf mzsOAoOqttardW4tp5mA405ysskw6frhLVqhChvZEC23quuCGUWk74AsYkruFGaLhMZEWC hmcpmn9/Q7zyxitVh6EfgfgIEMXVKivyscPc9jQ/uy3OIPDgIr3do7TLq7NND4pMJIcpY5 /ktfAJDKSYAMEfaa9GAz2LRLqx2WWPeW2CZihxYmsvyZ7xi6eKyAVzNghC5LHifeBfCXlX P3HkVDhCIEUAVPQF1PNDnhU3gzvWgttbZaB7qMJRiP1KqvMw9kzVKbG08I/B5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693485962; a=rsa-sha256; cv=none; b=imiP4BE44VcdZjr90NSMcWwPyYDoJFz5zOxKDC6sw96O5pn9bg9OkwedEMjcjWL8f34bsK JWk7i4o2X017+bsvGhOCK/oR5c6gUfuQMK6+q23UD6ygcWyaaQrDz2Pv2Q64C3hkqOhHKw hd+I8HPjQNF9knsF0/b1nj8yXh/1WN6qweC8HE1at70s9SxQbv7F7ti3nS02TdR7Wf5A8+ ktAEcZxeXWG68ChfZc0g8cV+7GmdPXAryUIrzpbcQTx+8Z6lt2D8/jJTgQLoIbuSfuYdFJ 1Nr2Pdk5nIZXPyCuCKPi8RZ9SXm7lGcyborE6tS+MHIhVoPk+fU6eawAV2IA5w== 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=1693485962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gJIp1KXlbbu15+zCuz2IsPc8SIsmWjaPZi7Vj5V/4JQ=; b=ho4CfH8A5ZSkfjrva1affiAC/iGeCo5Zh70zaMr2J0h0pgEb/r/l+gPZgh+zDoyRgbXkPY A+VzPS6cFSPjCE0b5wO/jwSHiSJSJpESP0fB8sEtux43mMG25ErxO9KV00eLFlvMwhXL/j NDbjMFKdR2/pPpLufspr7MZSuwxHDnDcSOp1C23uGwQ1YnGo/tS+Zt8obATbMU6QkAn/Hh 8HQ87SJmjEIeISdRpsRVCdcnjJ8YIw9QhyPDAXe5X0RRa/GBAw527kCbZIxCMfAl8++VZK uXT6OVIQp7HrS+jC3cM/RP2h4wK53gN2lsMIBHXa0Ee04fwzdezMGwk6T/uYkw== Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (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) (Authenticated sender: gallatin) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Rc19k0Yl8zxsx; Thu, 31 Aug 2023 12:46:01 +0000 (UTC) (envelope-from gallatin@freebsd.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 9441527C005A; Thu, 31 Aug 2023 08:46:01 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Thu, 31 Aug 2023 08:46:01 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudegtddgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsegrtderreerredtnecuhfhrohhmpedfffhr vgifucfirghllhgrthhinhdfuceoghgrlhhlrghtihhnsehfrhgvvggsshgurdhorhhgqe enucggtffrrghtthgvrhhnpeelveevkefhhfetudefffevtdfguefguefgtdekveekvefg fffffffhjefgieeuheenucffohhmrghinhepfhhrvggvsghsugdrohhrghdplhhisghnrg hmvghsrdhmkhdpshgvrhhvihgtvgdrihhnpdgtohhmphhilhgvrhdrmhhkpdhshihsrdhm khdplhhinhhkvghrrdhmkhdpohhpthhsrdhmkhdpohhsrdgsuhhilhgunecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghgrlhhlrghtihhnodhm vghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddufeefheelvddvudeiqddvleehtd egudekgedqghgrlhhlrghtihhnpeepfhhrvggvsghsugdrohhrghesfhgrshhtmhgrihhl rdgtohhm X-ME-Proxy: Feedback-ID: i41414658:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 58C88B60089; Thu, 31 Aug 2023 08:46:01 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-701-g9b2f44d3ee-fm-20230823.001-g9b2f44d3 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Message-Id: <07faf861-9186-47d1-992a-91d483ea4e9c@app.fastmail.com> In-Reply-To: References: <202308270509.37R596B5048298@gitrepo.freebsd.org> Date: Thu, 31 Aug 2023 07:45:41 -0500 From: "Drew Gallatin" To: "Alexander Motin" , "Gleb Smirnoff" , "Martin Matuska" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad Content-Type: multipart/alternative; boundary=06e1cace14e44ba6b615e2ddd8eabb7c --06e1cace14e44ba6b615e2ddd8eabb7c Content-Type: text/plain On Wed, Aug 30, 2023, at 8:01 PM, Alexander Motin wrote: > Hi Gleb, > > It is the first time I see a panic like this. I'll think about it > tomorrow. But I'd appreciate any information on what is your workload > and what are you doing related to ZIL (O_SYNC, fsync(), sync=always, > etc) to trigger it? What is your pool configuration? I'm not Gleb, but this was something at $WORK, so I can perhaps help. I've included the output of zpool status, and all non-default settings in the zpool. Note that we don't use a ZIL device. Thanks, Drew # zpool status pool: zroot state: ONLINE status: Some supported and requested features are not enabled on the pool. The pool can still be used, but some features are unavailable. action: Enable all features using 'zpool upgrade'. Once this is done, the pool may no longer be accessible by software that does not support the features. See zpool-features(7) for details. config: NAME STATE READ WRITE CKSUM zroot ONLINE 0 0 0 raidz1-0 ONLINE 0 0 0 nda0p2 ONLINE 0 0 0 nda1p2 ONLINE 0 0 0 nda2p2 ONLINE 0 0 0 spares nda3p2 AVAIL errors: No known data errors # zpool get all | grep -v default NAME PROPERTY VALUE SOURCE zroot size 149G - zroot capacity 14% - zroot health ONLINE - zroot guid 5099990586719219765 - zroot bootfs zroot/ROOT/NCD-7827-freebsd-2023-08-29-merge-oca-r202308291935 local zroot dedupratio 1.00x - zroot free 127G - zroot allocated 22.3G - zroot readonly off - zroot expandsize - - zroot freeing 0 - zroot fragmentation 28% - zroot leaked 0 - zroot checkpoint - - zroot load_guid 7612195721260396606 - zroot bcloneused 0 - zroot bclonesaved 0 - zroot bcloneratio 1.00x - zroot feature@async_destroy enabled local zroot feature@empty_bpobj active local zroot feature@lz4_compress active local zroot feature@multi_vdev_crash_dump enabled local zroot feature@spacemap_histogram active local zroot feature@enabled_txg active local zroot feature@hole_birth active local zroot feature@extensible_dataset active local zroot feature@embedded_data active local zroot feature@bookmarks enabled local zroot feature@filesystem_limits enabled local zroot feature@large_blocks enabled local zroot feature@large_dnode enabled local zroot feature@sha512 enabled local zroot feature@skein enabled local zroot feature@edonr disabled local zroot feature@userobj_accounting active local zroot feature@encryption enabled local zroot feature@project_quota active local zroot feature@device_removal enabled local zroot feature@obsolete_counts enabled local zroot feature@zpool_checkpoint enabled local zroot feature@spacemap_v2 active local zroot feature@allocation_classes enabled local zroot feature@resilver_defer enabled local zroot feature@bookmark_v2 enabled local zroot feature@redaction_bookmarks enabled local zroot feature@redacted_datasets enabled local zroot feature@bookmark_written enabled local zroot feature@log_spacemap active local zroot feature@livelist enabled local zroot feature@device_rebuild enabled local zroot feature@zstd_compress enabled local zroot feature@draid enabled local zroot feature@zilsaxattr disabled local zroot feature@head_errlog disabled local zroot feature@blake3 disabled local zroot feature@block_cloning disabled local zroot feature@vdev_zaps_v2 disabled local > On 30.08.2023 20:09, Gleb Smirnoff wrote: > > Hi Martin, > > > > we hit this panic with this update: > > > > panic: VERIFY(avl_is_empty(&lwb->lwb_vdev_tree)) failed > > > > cpuid = 8 > > time = 1693432004 > > KDB: stack backtrace: > > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe09519aa800 > > vpanic() at vpanic+0x132/frame 0xfffffe09519aa930 > > spl_panic() at spl_panic+0x3a/frame 0xfffffe09519aa990 > > zil_free_lwb() at zil_free_lwb+0x1de/frame 0xfffffe09519aa9c0 > > zil_sync() at zil_sync+0x3cb/frame 0xfffffe09519aaaa0 > > [Wed Aug 30 21:46:44 2023]dmu_objset_sync() at dmu_objset_sync+0x51b/frame 0xfffffe09519aab70 > > dsl_pool_sync() at dsl_pool_sync+0x11d/frame 0xfffffe09519aabf0 > > spa_sync() at spa_sync+0xc68/frame 0xfffffe09519aae20 > > txg_sync_thread() at txg_sync_thread+0x2eb/frame 0xfffffe09519aaef0 > > fork_exit() at fork_exit+0x82/frame 0xfffffe09519aaf30 > > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe09519aaf30 > > --- trap 0x26d90a2f, rip = 0xbba54c81b25fd8d4, rsp = 0xff60c2f6f9874bcd, rbp = 0x37940e3e9793bd40 -- > > > > I have two cores dumped for this panic. > > > > Our previous version is based on 9c0a2d522f3a18fc795a7dd6266d2be2aff4b084, which > > I guess has the most recent ZFS merge openzfs/zfs@009d3288d. > > > > On Sun, Aug 27, 2023 at 05:09:06AM +0000, Martin Matuska wrote: > > M> The branch main has been updated by mm: > > M> > > M> URL: https://cgit.FreeBSD.org/src/commit/?id=315ee00fa9616b0a192b6834911f98bcf5316a6b > > M> > > M> commit 315ee00fa9616b0a192b6834911f98bcf5316a6b > > M> Merge: b3a714652ff0 804414aad224 > > M> Author: Martin Matuska > > M> AuthorDate: 2023-08-26 21:20:04 +0000 > > M> Commit: Martin Matuska > > M> CommitDate: 2023-08-26 21:51:42 +0000 > > M> > > M> zfs: merge openzfs/zfs@804414aad > > M> > > M> Notable upstream pull request merges: > > M> #15024 Add missed DMU_PROJECTUSED_OBJECT prefetch > > M> #15029 Do not request data L1 buffers on scan prefetch > > M> #15036 FreeBSD: catch up to __FreeBSD_version 1400093 > > M> #15039 Fix raw receive with different indirect block size > > M> #15047 FreeBSD: Fix build on stable/13 after 1302506 > > M> #15049 Fix the ZFS checksum error histograms with larger record sizes > > M> #15052 Reduce bloat in ereport.fs.zfs.checksum events > > M> #15056 Avoid extra snprintf() in dsl_deadlist_merge() > > M> #15061 Ignore pool ashift property during vdev attachment > > M> #15063 Don't panic if setting vdev properties is unsupported for this vdev type > > M> #15067 spa_min_alloc should be GCD, not min > > M> #15071 Add explicit prefetches to bpobj_iterate() > > M> #15072 Adjust prefetch parameters > > M> #15076 Refactor dmu_prefetch() > > M> #15079 set autotrim default to 'off' everywhere > > M> #15080 ZIL: Fix config lock deadlock > > M> #15088 metaslab: tuneable to better control force ganging > > M> #15096 Avoid waiting in dmu_sync_late_arrival() > > M> #15097 BRT should return EOPNOTSUPP > > M> #15103 Remove zl_issuer_lock from zil_suspend() > > M> #15107 Remove fastwrite mechanism > > M> #15113 libzfs: sendrecv: send_progress_thread: handle SIGINFO/SIGUSR1 > > M> #15122 ZIL: Second attempt to reduce scope of zl_issuer_lock > > M> #15129 zpool_vdev_remove() should handle EALREADY error return > > M> #15132 ZIL: Replay blocks without next block pointer > > M> #15148 zfs_clone_range should return descriptive error codes > > M> #15153 ZIL: Avoid dbuf_read() before dmu_sync() > > M> #15172 copy_file_range: fix fallback when source create on same txg > > M> #15180 Update outdated assertion from zio_write_compress > > M> > > M> Obtained from: OpenZFS > > M> OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13 > > M> > > M> Makefile.inc1 | 5 +- > > M> cddl/lib/libzfs/Makefile | 1 + > > M> cddl/lib/libzfs/Makefile.depend | 1 + > > M> rescue/rescue/Makefile | 2 +- > > M> rescue/rescue/Makefile.depend | 1 + > > M> share/mk/src.libnames.mk | 2 +- > > M> sys/contrib/openzfs/META | 6 +- > > M> sys/contrib/openzfs/cmd/zdb/zdb.c | 77 ++- > > M> sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c | 2 - > > M> sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c | 5 + > > M> .../openzfs/cmd/zed/zed.d/statechange-slot_off.sh | 61 ++ > > M> sys/contrib/openzfs/cmd/zed/zed.d/zed.rc | 5 + > > M> sys/contrib/openzfs/cmd/ztest.c | 2 +- > > M> sys/contrib/openzfs/config/Shellcheck.am | 3 +- > > M> sys/contrib/openzfs/config/kernel-blkdev.m4 | 138 +++- > > M> .../config/kernel-block-device-operations.m4 | 35 +- > > M> .../openzfs/config/kernel-filemap-splice-read.m4 | 25 + > > M> .../openzfs/config/kernel-register_sysctl_table.m4 | 27 + > > M> .../config/kernel-vfs-extended-file_range.m4 | 50 ++ > > M> .../openzfs/config/kernel-vfs-file_range.m4 | 164 +++++ > > M> sys/contrib/openzfs/config/kernel-vfs-iov_iter.m4 | 26 +- > > M> sys/contrib/openzfs/config/kernel.m4 | 16 + > > M> sys/contrib/openzfs/contrib/debian/changelog | 6 + > > M> .../contrib/debian/openzfs-zfs-test.install | 2 - > > M> .../contrib/debian/openzfs-zfsutils.install | 2 + > > M> .../contrib/dracut/90zfs/zfs-env-bootfs.service.in | 11 +- > > M> .../dracut/90zfs/zfs-rollback-bootfs.service.in | 2 +- > > M> .../openzfs/include/os/freebsd/spl/sys/vnode.h | 6 +- > > M> .../include/os/linux/kernel/linux/blkdev_compat.h | 17 + > > M> .../openzfs/include/os/linux/spl/sys/kmem_cache.h | 8 + > > M> .../openzfs/include/os/linux/spl/sys/types.h | 2 +- > > M> sys/contrib/openzfs/include/os/linux/spl/sys/uio.h | 12 + > > M> sys/contrib/openzfs/include/os/linux/zfs/sys/zpl.h | 53 ++ > > M> sys/contrib/openzfs/include/sys/bpobj.h | 2 +- > > M> sys/contrib/openzfs/include/sys/brt.h | 1 + > > M> sys/contrib/openzfs/include/sys/dmu.h | 5 + > > M> sys/contrib/openzfs/include/sys/dmu_impl.h | 2 - > > M> sys/contrib/openzfs/include/sys/dmu_zfetch.h | 2 - > > M> sys/contrib/openzfs/include/sys/fm/fs/zfs.h | 4 - > > M> sys/contrib/openzfs/include/sys/metaslab.h | 3 - > > M> sys/contrib/openzfs/include/sys/metaslab_impl.h | 6 +- > > M> sys/contrib/openzfs/include/sys/spa_impl.h | 1 + > > M> sys/contrib/openzfs/include/sys/vdev_impl.h | 2 +- > > M> sys/contrib/openzfs/include/sys/zil_impl.h | 44 +- > > M> sys/contrib/openzfs/include/sys/zio.h | 1 - > > M> sys/contrib/openzfs/include/sys/zio_checksum.h | 2 - > > M> sys/contrib/openzfs/lib/libzfs/Makefile.am | 2 +- > > M> sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 6 + > > M> sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 95 ++- > > M> sys/contrib/openzfs/man/man4/zfs.4 | 10 +- > > M> sys/contrib/openzfs/man/man8/zfs-send.8 | 18 +- > > M> sys/contrib/openzfs/man/man8/zpool-events.8 | 23 +- > > M> sys/contrib/openzfs/module/Kbuild.in | 1 + > > M> .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 10 +- > > M> sys/contrib/openzfs/module/os/linux/spl/spl-proc.c | 26 +- > > M> .../openzfs/module/os/linux/zfs/vdev_disk.c | 65 +- > > M> .../openzfs/module/os/linux/zfs/zfs_ctldir.c | 26 +- > > M> .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 7 + > > M> .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 9 +- > > M> .../openzfs/module/os/linux/zfs/zfs_znode.c | 8 + > > M> .../openzfs/module/os/linux/zfs/zpl_ctldir.c | 2 +- > > M> sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 44 +- > > M> .../openzfs/module/os/linux/zfs/zpl_file_range.c | 272 ++++++++ > > M> .../openzfs/module/os/linux/zfs/zpl_super.c | 39 +- > > M> sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 28 +- > > M> sys/contrib/openzfs/module/zfs/bpobj.c | 49 +- > > M> sys/contrib/openzfs/module/zfs/brt.c | 43 +- > > M> sys/contrib/openzfs/module/zfs/dbuf.c | 11 +- > > M> sys/contrib/openzfs/module/zfs/dmu.c | 127 ++-- > > M> sys/contrib/openzfs/module/zfs/dmu_recv.c | 22 +- > > M> sys/contrib/openzfs/module/zfs/dmu_zfetch.c | 12 +- > > M> sys/contrib/openzfs/module/zfs/dnode.c | 31 +- > > M> sys/contrib/openzfs/module/zfs/dsl_deadlist.c | 14 +- > > M> sys/contrib/openzfs/module/zfs/dsl_scan.c | 17 +- > > M> sys/contrib/openzfs/module/zfs/metaslab.c | 83 +-- > > M> sys/contrib/openzfs/module/zfs/spa_log_spacemap.c | 4 +- > > M> sys/contrib/openzfs/module/zfs/spa_misc.c | 1 + > > M> sys/contrib/openzfs/module/zfs/vdev.c | 90 ++- > > M> sys/contrib/openzfs/module/zfs/vdev_indirect.c | 2 +- > > M> sys/contrib/openzfs/module/zfs/vdev_raidz.c | 2 +- > > M> sys/contrib/openzfs/module/zfs/zfs_fm.c | 33 +- > > M> sys/contrib/openzfs/module/zfs/zfs_vnops.c | 46 +- > > M> sys/contrib/openzfs/module/zfs/zil.c | 719 +++++++++------------ > > M> sys/contrib/openzfs/module/zfs/zio.c | 45 +- > > M> sys/contrib/openzfs/module/zfs/zio_checksum.c | 2 - > > M> sys/contrib/openzfs/module/zfs/zvol.c | 8 +- > > M> sys/contrib/openzfs/tests/runfiles/linux.run | 11 + > > M> .../openzfs/tests/test-runner/bin/zts-report.py.in | 18 + > > M> sys/contrib/openzfs/tests/zfs-tests/cmd/.gitignore | 1 + > > M> .../openzfs/tests/zfs-tests/cmd/Makefile.am | 1 + > > M> .../openzfs/tests/zfs-tests/cmd/clonefile.c | 333 ++++++++++ > > M> sys/contrib/openzfs/tests/zfs-tests/cmd/readmmap.c | 1 + > > M> .../openzfs/tests/zfs-tests/include/commands.cfg | 1 + > > M> .../openzfs/tests/zfs-tests/tests/Makefile.am | 14 + > > M> .../functional/block_cloning/block_cloning.kshlib | 54 ++ > > M> .../block_cloning/block_cloning_copyfilerange.ksh | 60 ++ > > M> .../block_cloning_copyfilerange_cross_dataset.ksh | 65 ++ > > M> .../block_cloning_copyfilerange_fallback.ksh | 86 +++ > > M> ...ock_cloning_copyfilerange_fallback_same_txg.ksh | 66 ++ > > M> .../block_cloning_copyfilerange_partial.ksh | 68 ++ > > M> .../block_cloning_disabled_copyfilerange.ksh | 60 ++ > > M> .../block_cloning_disabled_ficlone.ksh | 50 ++ > > M> .../block_cloning_disabled_ficlonerange.ksh | 50 ++ > > M> .../block_cloning/block_cloning_ficlone.ksh | 56 ++ > > M> .../block_cloning/block_cloning_ficlonerange.ksh | 56 ++ > > M> .../block_cloning_ficlonerange_partial.ksh | 64 ++ > > M> .../tests/functional/block_cloning/cleanup.ksh | 34 + > > M> .../tests/functional/block_cloning/setup.ksh | 36 ++ > > M> .../cli_root/zpool_attach/attach-o_ashift.ksh | 30 +- > > M> .../cli_root/zpool_replace/replace-o_ashift.ksh | 32 +- > > M> .../cli_root/zpool_replace/replace_prop_ashift.ksh | 24 +- > > M> sys/modules/zfs/zfs_config.h | 53 +- > > M> sys/modules/zfs/zfs_gitrev.h | 2 +- > > M> 113 files changed, 3322 insertions(+), 906 deletions(-) > > M> > > M> diff --cc Makefile.inc1 > > M> index 8838d31c795a,000000000000..f740cc5abcca > > M> mode 100644,000000..100644 > > M> --- a/Makefile.inc1 > > M> +++ b/Makefile.inc1 > > M> @@@ -1,3692 -1,0 +1,3695 @@@ > > M> +# > > M> +# > > M> +# Make command line options: > > M> +# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir > > M> +# -DNO_CLEAN do not clean at all > > M> +# -DDB_FROM_SRC use the user/group databases in src/etc instead of > > M> +# the system database when installing. > > M> +# -DNO_SHARE do not go into share subdir > > M> +# -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,OBJ} > > M> +# -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel > > M> +# -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel > > M> +# -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} buildkernel > > M> +# -DNO_ROOT install without using root privilege > > M> +# -DWITHOUT_CTF do not run the DTrace CTF conversion tools on built objects > > M> +# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list > > M> +# LOCAL_ITOOLS="list of tools" to add additional tools to the ITOOLS list > > M> +# LOCAL_LIB_DIRS="list of dirs" to add additional dirs to libraries target > > M> +# LOCAL_MTREE="list of mtree files" to process to allow local directories > > M> +# to be created before files are installed > > M> +# LOCAL_LEGACY_DIRS="list of dirs" to add additional dirs to the legacy > > M> +# target > > M> +# LOCAL_BSTOOL_DIRS="list of dirs" to add additional dirs to the > > M> +# bootstrap-tools target > > M> +# LOCAL_TOOL_DIRS="list of dirs" to add additional dirs to the build-tools > > M> +# target > > M> +# LOCAL_XTOOL_DIRS="list of dirs" to add additional dirs to the > > M> +# cross-tools target > > M> +# METALOG="path to metadata log" to write permission and ownership > > M> +# when NO_ROOT is set. (default: ${DESTDIR}/${DISTDIR}/METALOG, > > M> +# check /etc/make.conf for DISTDIR) > > M> +# TARGET="machine" to crossbuild world for a different machine type > > M> +# TARGET_ARCH= may be required when a TARGET supports multiple endians > > M> +# BUILDENV_SHELL= shell to launch for the buildenv target (def:${SHELL}) > > M> +# WORLD_FLAGS= additional flags to pass to make(1) during buildworld > > M> +# KERNEL_FLAGS= additional flags to pass to make(1) during buildkernel > > M> +# SUBDIR_OVERRIDE="list of dirs" to build rather than everything. > > M> +# All libraries and includes, and some build tools will still build. > > M> + > > M> +# > > M> +# The intended user-driven targets are: > > M> +# buildworld - rebuild *everything*, including glue to help do upgrades > > M> +# installworld- install everything built by "buildworld" > > M> +# checkworld - run test suite on installed world > > M> +# doxygen - build API documentation of the kernel > > M> +# > > M> +# Standard targets (not defined here) are documented in the makefiles in > > M> +# /usr/share/mk. These include: > > M> +# obj depend all install clean cleandepend cleanobj > > M> + > > M> +.if !defined(TARGET) || !defined(TARGET_ARCH) > > M> +.error Both TARGET and TARGET_ARCH must be defined. > > M> +.endif > > M> + > > M> +.if make(showconfig) || make(test-system-*) > > M> +_MKSHOWCONFIG= t > > M> +.endif > > M> + > > M> +SRCDIR?= ${.CURDIR} > > M> +LOCALBASE?= /usr/local > > M> +TIME_ENV ?= time env > > M> + > > M> +.include "share/mk/src.tools.mk" > > M> + > > M> +# Cross toolchain changes must be in effect before bsd.compiler.mk > > M> +# so that gets the right CC, and pass CROSS_TOOLCHAIN to submakes. > > M> +.if defined(CROSS_TOOLCHAIN) > > M> +.if exists(${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk) > > M> +.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" > > M> +.elif exists(${CROSS_TOOLCHAIN}) > > M> +.include "${CROSS_TOOLCHAIN}" > > M> +.else > > M> +.error CROSS_TOOLCHAIN ${CROSS_TOOLCHAIN} not found > > M> +.endif > > M> +CROSSENV+=CROSS_TOOLCHAIN="${CROSS_TOOLCHAIN}" > > M> +.elif defined(UNIVERSE_TOOLCHAIN) > > M> +UNIVERSE_TOOLCHAIN_PATH?=${HOST_OBJTOP}/tmp/usr/bin > > M> +XCC?="${UNIVERSE_TOOLCHAIN_PATH}/cc" > > M> +XCXX?="${UNIVERSE_TOOLCHAIN_PATH}/c++" > > M> +XCPP?="${UNIVERSE_TOOLCHAIN_PATH}/cpp" > > M> +XLD?="${UNIVERSE_TOOLCHAIN_PATH}/ld" > > M> +.endif > > M> +.if defined(CROSS_TOOLCHAIN_PREFIX) > > M> +CROSS_COMPILER_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} > > M> +.endif > > M> + > > M> +XCOMPILERS= CC CXX CPP > > M> +.for COMPILER in ${XCOMPILERS} > > M> +.if defined(CROSS_COMPILER_PREFIX) > > M> +X${COMPILER}?= ${CROSS_COMPILER_PREFIX}${${COMPILER}} > > M> +.else > > M> +X${COMPILER}?= ${${COMPILER}} > > M> +.endif > > M> +.endfor > > M> +# If a full path to an external cross compiler is given, don't build > > M> +# a cross compiler. > > M> +.if ${XCC:N${CCACHE_BIN}:M/*} > > M> +MK_CLANG_BOOTSTRAP= no > > M> +# Make sure sub-makes see the option as disabled so the hack in bsd.sys.mk to > > M> +# work around incompatible headers in Clang's resource directory is enabled. > > M> +.MAKEOVERRIDES+= MK_CLANG_BOOTSTRAP > > M> +.endif > > M> + > > M> +# Pull in compiler metadata from buildworld/toolchain if possible to avoid > > M> +# running CC from bsd.compiler.mk. > > M> +.if make(installworld) || make(install) || make(distributeworld) || \ > > M> + make(stageworld) > > M> +.-include "${OBJTOP}/toolchain-metadata.mk" > > M> +.if !defined(_LOADED_TOOLCHAIN_METADATA) > > M> +.error A build is required first. You may have the wrong MAKEOBJDIRPREFIX set. > > M> +.endif > > M> +.endif > > M> + > > M> +# Pull in COMPILER_TYPE and COMPILER_FREEBSD_VERSION early. Pull it from the > > M> +# tree to be friendlier to foreign OS builds. It's safe to do so unconditionally > > M> +# here since we will always have the right make, unlike in src/Makefile > > M> +# Don't include bsd.linker.mk yet until XBINUTILS is handled (after src.opts.mk) > > M> +_NO_INCLUDE_LINKERMK= t > > M> +# We also want the X_COMPILER* variables if we are using an external toolchain. > > M> +_WANT_TOOLCHAIN_CROSS_VARS= t > > M> +.include "share/mk/bsd.compiler.mk" > > M> +.undef _NO_INCLUDE_LINKERMK > > M> +.undef _WANT_TOOLCHAIN_CROSS_VARS > > M> +# src.opts.mk depends on COMPILER_FEATURES > > M> +.include "share/mk/src.opts.mk" > > M> + > > M> +.if ${TARGET} == ${MACHINE} > > M> +TARGET_CPUTYPE?=${CPUTYPE} > > M> +.else > > M> +TARGET_CPUTYPE?= > > M> +.endif > > M> +.if !empty(TARGET_CPUTYPE) > > M> +_TARGET_CPUTYPE=${TARGET_CPUTYPE} > > M> +.else > > M> +_TARGET_CPUTYPE=dummy > > M> +.endif > > M> +.if ${TARGET} == "arm" > > M> +.if ${TARGET_CPUTYPE:M*soft*} == "" > > M> +TARGET_TRIPLE_ABI= gnueabihf > > M> +.else > > M> +TARGET_TRIPLE_ABI= gnueabi > > M> +.endif > > M> +.endif > > M> +MACHINE_TRIPLE_ABI?= unknown > > M> +MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/}-${MACHINE_TRIPLE_ABI}-freebsd${OS_REVISION} > > M> +TARGET_TRIPLE_ABI?= unknown > > M> +TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/}-${TARGET_TRIPLE_ABI}-freebsd${OS_REVISION} > > M> +KNOWN_ARCHES?= aarch64/arm64 \ > > M> + amd64 \ > > M> + armv6/arm \ > > M> + armv7/arm \ > > M> + i386 \ > > M> + powerpc \ > > M> + powerpc64/powerpc \ > > M> + powerpc64le/powerpc \ > > M> + powerpcspe/powerpc \ > > M> + riscv64/riscv > > M> + > > M> +.if ${TARGET} == ${TARGET_ARCH} > > M> +_t= ${TARGET} > > M> +.else > > M> +_t= ${TARGET_ARCH}/${TARGET} > > M> +.endif > > M> +.for _t in ${_t} > > M> +.if empty(KNOWN_ARCHES:M${_t}) > > M> +.error Unknown target ${TARGET_ARCH}:${TARGET}. > > M> +.endif > > M> +.endfor > > M> + > > M> +.if ${TARGET_ARCH} == "amd64" > > M> +LIBCOMPAT_INCLUDE_DIRS+= i386 > > M> +.elif ${TARGET_ARCH} == "aarch64" > > M> +LIBCOMPAT_INCLUDE_DIRS+= arm > > M> +.endif > > M> + > > M> +.if ${.MAKE.OS} != "FreeBSD" > > M> +CROSSBUILD_HOST=${.MAKE.OS} > > M> +.if ${.MAKE.OS} != "Linux" && ${.MAKE.OS} != "Darwin" > > M> +.warning Unsupported crossbuild system: ${.MAKE.OS}. Build will probably fail! > > M> +.endif > > M> +# We need to force NO_ROOT/DB_FROM_SRC builds when building on other operating > > M> +# systems since the BSD.foo.dist specs contain users and groups that do not > > M> +# exist by default on a Linux/MacOS system. > > M> +NO_ROOT:= 1 > > M> +DB_FROM_SRC:= 1 > > M> +.export NO_ROOT > > M> +.endif > > M> + > > M> +# If all targets are disabled for system llvm then don't expect it to work > > M> +# for cross-builds. > > M> +.if !defined(TOOLS_PREFIX) && ${MK_LLVM_TARGET_ALL} == "no" && \ > > M> + ${MACHINE} != ${TARGET} && ${MACHINE_ARCH} != ${TARGET_ARCH} && \ > > M> + !make(showconfig) > > M> +MK_SYSTEM_COMPILER= no > > M> +MK_SYSTEM_LINKER= no > > M> +.endif > > M> + > > M> +# Handle external binutils. > > M> +.if defined(CROSS_TOOLCHAIN_PREFIX) > > M> +CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} > > M> +.endif > > M> +XBINUTILS= AS AR ELFCTL LD NM OBJCOPY RANLIB SIZE STRINGS STRIPBIN > > M> +.for BINUTIL in ${XBINUTILS} > > M> +.if defined(CROSS_BINUTILS_PREFIX) && \ > > M> + exists(${CROSS_BINUTILS_PREFIX}/${${BINUTIL}}) > > M> +X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX:C,/*$,,}/${${BINUTIL}} > > M> +.else > > M> +X${BINUTIL}?= ${${BINUTIL}} > > M> +.endif > > M> +.endfor > > M> + > > M> +# If a full path to an external linker is given, don't build lld. > > M> +.if ${XLD:M/*} > > M> +MK_LLD_BOOTSTRAP= no > > M> +.endif > > M> + > > M> +# We also want the X_LINKER* variables if we are using an external toolchain. > > M> +_WANT_TOOLCHAIN_CROSS_VARS= t > > M> +.include "share/mk/bsd.linker.mk" > > M> +.undef _WANT_TOOLCHAIN_CROSS_VARS > > M> + > > M> +# Begin WITH_SYSTEM_COMPILER / WITH_SYSTEM_LD > > M> + > > M> +# WITH_SYSTEM_COMPILER - Pull in needed values and make a decision. > > M> + > > M> +# Check if there is a local compiler that can satisfy as an external compiler. > > M> +# Which compiler is expected to be used? > > M> +.if ${MK_CLANG_BOOTSTRAP} == "yes" > > M> +WANT_COMPILER_TYPE= clang > > M> +.else > > M> +WANT_COMPILER_TYPE= > > M> +.endif > > M> + > > M> +.if !defined(WANT_COMPILER_FREEBSD_VERSION) && !make(showconfig) && \ > > M> + !make(test-system-linker) > > M> +.if ${WANT_COMPILER_TYPE} == "clang" > > M> +WANT_COMPILER_FREEBSD_VERSION_FILE= lib/clang/freebsd_cc_version.h > > M> +WANT_COMPILER_FREEBSD_VERSION!= \ > > M> + awk '$$2 == "FREEBSD_CC_VERSION" {printf("%d\n", $$3)}' \ > > M> + ${SRCDIR}/${WANT_COMPILER_FREEBSD_VERSION_FILE} || echo unknown > > M> +WANT_COMPILER_VERSION_FILE= lib/clang/include/clang/Basic/Version.inc > > M> +WANT_COMPILER_VERSION!= \ > > M> + awk '$$2 == "CLANG_VERSION" {split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \ > > M> + ${SRCDIR}/${WANT_COMPILER_VERSION_FILE} || echo unknown > > M> +.endif > > M> +.export WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_VERSION > > M> +.endif # !defined(WANT_COMPILER_FREEBSD_VERSION) > > M> + > > M> +# It needs to be the same revision as we would build for the bootstrap. > > M> +# If the expected vs CC is different then we can't skip. > > M> +# GCC cannot be used for cross-arch yet. For clang we pass -target later if > > M> +# TARGET_ARCH!=MACHINE_ARCH. > > M> +.if ${MK_SYSTEM_COMPILER} == "yes" && \ > > M> + defined(WANT_COMPILER_FREEBSD_VERSION) && \ > > M> + ${MK_CLANG_BOOTSTRAP} == "yes" && \ > > M> + !make(xdev*) && \ > > M> + ${X_COMPILER_TYPE} == ${WANT_COMPILER_TYPE} && \ > > M> + (${X_COMPILER_TYPE} == "clang" || ${TARGET_ARCH} == ${MACHINE_ARCH}) && \ > > M> + ${X_COMPILER_VERSION} == ${WANT_COMPILER_VERSION} && \ > > M> + ${X_COMPILER_FREEBSD_VERSION} == ${WANT_COMPILER_FREEBSD_VERSION} > > M> +# Everything matches, disable the bootstrap compiler. > > M> +MK_CLANG_BOOTSTRAP= no > > M> +USING_SYSTEM_COMPILER= yes > > M> +.endif # ${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} > > M> + > > M> +# WITH_SYSTEM_LD - Pull in needed values and make a decision. > > M> + > > M> +# Check if there is a local linker that can satisfy as an external linker. > > M> +# Which linker is expected to be used? > > M> +.if ${MK_LLD_BOOTSTRAP} == "yes" > > M> +WANT_LINKER_TYPE= lld > > M> +.else > > M> +WANT_LINKER_TYPE= > > M> +.endif > > M> + > > M> +.if !defined(WANT_LINKER_FREEBSD_VERSION) && !make(showconfig) && \ > > M> + !make(test-system-compiler) > > M> +.if ${WANT_LINKER_TYPE} == "lld" > > M> +WANT_LINKER_FREEBSD_VERSION_FILE= lib/clang/include/lld/Common/Version.inc > > M> +WANT_LINKER_FREEBSD_VERSION!= \ > > M> + awk '$$2 == "LLD_FREEBSD_VERSION" {print $$3}' \ > > M> + ${SRCDIR}/${WANT_LINKER_FREEBSD_VERSION_FILE} || echo unknown > > M> +WANT_LINKER_VERSION_FILE= lib/clang/include/lld/Common/Version.inc > > M> +WANT_LINKER_VERSION!= \ > > M> + awk '$$2 == "LLD_VERSION_STRING" {gsub("\"", "", $$3); split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \ > > M> + ${SRCDIR}/${WANT_LINKER_VERSION_FILE} || echo unknown > > M> +.else > > M> +WANT_LINKER_FREEBSD_VERSION_FILE= > > M> +WANT_LINKER_FREEBSD_VERSION= > > M> +.endif > > M> +.export WANT_LINKER_FREEBSD_VERSION WANT_LINKER_VERSION > > M> +.endif # !defined(WANT_LINKER_FREEBSD_VERSION) > > M> + > > M> +.if ${MK_SYSTEM_LINKER} == "yes" && \ > > M> + defined(WANT_LINKER_FREEBSD_VERSION) && \ > > M> + (${MK_LLD_BOOTSTRAP} == "yes") && \ > > M> + !make(xdev*) && \ > > M> + ${X_LINKER_TYPE} == ${WANT_LINKER_TYPE} && \ > > M> + ${X_LINKER_VERSION} == ${WANT_LINKER_VERSION} && \ > > M> + ${X_LINKER_FREEBSD_VERSION} == ${WANT_LINKER_FREEBSD_VERSION} > > M> +# Everything matches, disable the bootstrap linker. > > M> +MK_LLD_BOOTSTRAP= no > > M> +USING_SYSTEM_LINKER= yes > > M> +.endif # ${WANT_LINKER_TYPE} == ${LINKER_TYPE} > > M> + > > M> +# WITH_SYSTEM_COMPILER / WITH_SYSTEM_LINKER - Handle defaults and debug. > > M> +USING_SYSTEM_COMPILER?= no > > M> +USING_SYSTEM_LINKER?= no > > M> + > > M> +TEST_SYSTEM_COMPILER_VARS= \ > > M> + USING_SYSTEM_COMPILER MK_SYSTEM_COMPILER \ > > M> + MK_CROSS_COMPILER MK_CLANG_BOOTSTRAP \ > > M> + WANT_COMPILER_TYPE WANT_COMPILER_VERSION WANT_COMPILER_VERSION_FILE \ > > M> + WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_FREEBSD_VERSION_FILE \ > > M> + CC COMPILER_TYPE COMPILER_FEATURES COMPILER_VERSION \ > > M> + COMPILER_FREEBSD_VERSION \ > > M> + XCC X_COMPILER_TYPE X_COMPILER_FEATURES X_COMPILER_VERSION \ > > M> + X_COMPILER_FREEBSD_VERSION > > M> +TEST_SYSTEM_LINKER_VARS= \ > > M> + USING_SYSTEM_LINKER MK_SYSTEM_LINKER \ > > M> + MK_LLD_BOOTSTRAP \ > > M> + WANT_LINKER_TYPE WANT_LINKER_VERSION WANT_LINKER_VERSION_FILE \ > > M> + WANT_LINKER_FREEBSD_VERSION WANT_LINKER_FREEBSD_VERSION_FILE \ > > M> + LD LINKER_TYPE LINKER_FEATURES LINKER_VERSION \ > > M> + LINKER_FREEBSD_VERSION \ > > M> + XLD X_LINKER_TYPE X_LINKER_FEATURES X_LINKER_VERSION \ > > M> + X_LINKER_FREEBSD_VERSION > > M> + > > M> +.for _t in compiler linker > > M> +test-system-${_t}: .PHONY > > M> +.for v in ${TEST_SYSTEM_${_t:tu}_VARS} > > M> + ${_+_}@printf "%-35s= %s\n" "${v}" "${${v}}" > > M> +.endfor > > M> +.endfor > > M> +.if (make(buildworld) || make(buildkernel) || make(kernel-toolchain) || \ > > M> + make(toolchain) || make(_cross-tools)) > > M> +.if ${USING_SYSTEM_COMPILER} == "yes" > > M> +.info SYSTEM_COMPILER: Determined that CC=${CC} matches the source tree. Not bootstrapping a cross-compiler. > > M> +.elif ${MK_CLANG_BOOTSTRAP} == "yes" > > M> +.info SYSTEM_COMPILER: libclang will be built for bootstrapping a cross-compiler. > > M> +.endif > > M> +.if ${USING_SYSTEM_LINKER} == "yes" > > M> +.info SYSTEM_LINKER: Determined that LD=${LD} matches the source tree. Not bootstrapping a cross-linker. > > M> +.elif ${MK_LLD_BOOTSTRAP} == "yes" > > M> +.info SYSTEM_LINKER: libclang will be built for bootstrapping a cross-linker. > > M> +.endif > > M> +.endif > > M> + > > M> +# End WITH_SYSTEM_COMPILER / WITH_SYSTEM_LD > > M> + > > M> +# Store some compiler metadata for use in installworld where we don't > > M> +# want to invoke CC at all. > > M> +_TOOLCHAIN_METADATA_VARS= COMPILER_VERSION \ > > M> + COMPILER_TYPE \ > > M> + COMPILER_FEATURES \ > > M> + COMPILER_FREEBSD_VERSION \ > > M> + COMPILER_RESOURCE_DIR \ > > M> + LINKER_VERSION \ > > M> + LINKER_FEATURES \ > > M> + LINKER_TYPE \ > > M> + LINKER_FREEBSD_VERSION > > M> +toolchain-metadata.mk: .PHONY .META > > M> + @: > ${.TARGET} > > M> + @echo ".info Using cached toolchain metadata from build at $$(hostname) on $$(date)" \ > > M> + > ${.TARGET} > > M> + @echo "_LOADED_TOOLCHAIN_METADATA=t" >> ${.TARGET} > > M> +.for v in ${_TOOLCHAIN_METADATA_VARS} > > M> + @echo "${v}=${${v}}" >> ${.TARGET} > > M> + @echo "X_${v}=${X_${v}}" >> ${.TARGET} > > M> +.endfor > > M> + @echo ".export ${_TOOLCHAIN_METADATA_VARS}" >> ${.TARGET} > > M> + @echo ".export ${_TOOLCHAIN_METADATA_VARS:C,^,X_,}" >> ${.TARGET} > > M> + > > M> + > > M> +# We must do lib/ and libexec/ before bin/ in case of a mid-install error to > > M> +# keep the users system reasonably usable. For static->dynamic root upgrades, > > M> +# we don't want to install a dynamic binary without rtld and the needed > > M> +# libraries. More commonly, for dynamic root, we don't want to install a > > M> +# binary that requires a newer library version that hasn't been installed yet. > > M> +# This ordering is not a guarantee though. The only guarantee of a working > > M> +# system here would require fine-grained ordering of all components based > > M> +# on their dependencies. > > M> +.if !empty(SUBDIR_OVERRIDE) > > M> +SUBDIR= ${SUBDIR_OVERRIDE} > > M> +.else > > M> +SUBDIR= lib libexec > > M> +# Add LOCAL_LIB_DIRS, but only if they will not be picked up as a SUBDIR > > M> +# of a LOCAL_DIRS directory. This allows LOCAL_DIRS=foo and > > M> +# LOCAL_LIB_DIRS=foo/lib to behave as expected. > > M> +.for _DIR in ${LOCAL_DIRS:M*/} ${LOCAL_DIRS:N*/:S|$|/|} > > M> +_REDUNDANT_LIB_DIRS+= ${LOCAL_LIB_DIRS:M${_DIR}*} > > M> +.endfor > > M> +.for _DIR in ${LOCAL_LIB_DIRS} > > M> +.if ${_DIR} == ".WAIT" || (empty(_REDUNDANT_LIB_DIRS:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile)) > > M> +SUBDIR+= ${_DIR} > > M> +.endif > > M> +.endfor > > M> +.if !defined(NO_ROOT) && (make(installworld) || make(install)) > > M> +# Ensure libraries are installed before progressing. > > M> +SUBDIR+=.WAIT > > M> +.endif > > M> +SUBDIR+=bin > > M> +.if ${MK_CDDL} != "no" > > M> +SUBDIR+=cddl > > M> +.endif > > M> +SUBDIR+=gnu include > > M> +.if ${MK_KERBEROS} != "no" > > M> +SUBDIR+=kerberos5 > > M> +.endif > > M> +.if ${MK_RESCUE} != "no" > > M> +SUBDIR+=rescue > > M> +.endif > > M> +SUBDIR+=sbin > > M> +.if ${MK_CRYPT} != "no" > > M> +SUBDIR+=secure > > M> +.endif > > M> +.if !defined(NO_SHARE) > > M> +SUBDIR+=share > > M> +.endif > > M> +.if ${MK_BOOT} != "no" > > M> +SUBDIR+=stand > > M> +.endif > > M> +SUBDIR+=sys usr.bin usr.sbin > > M> +.if ${MK_TESTS} != "no" > > M> +SUBDIR+= tests > > M> +.endif > > M> + > > M> +# Local directories are built in parallel with the base system directories. > > M> +# Users may insert a .WAIT directive at the beginning or elsewhere within > > M> +# the LOCAL_DIRS and LOCAL_LIB_DIRS lists as needed. > > M> +.for _DIR in ${LOCAL_DIRS} > > M> +.if ${_DIR} == ".WAIT" || exists(${.CURDIR}/${_DIR}/Makefile) > > M> +SUBDIR+= ${_DIR} > > M> +.endif > > M> +.endfor > > M> + > > M> +# We must do etc/ last as it hooks into building the man whatis file > > M> +# by calling 'makedb' in share/man. This is only relevant for > > M> +# install/distribute so they build the whatis file after every manpage is > > M> +# installed. > > M> +.if make(installworld) || make(install) > > M> +SUBDIR+=.WAIT > > M> +.endif > > M> +SUBDIR+=etc > > M> + > > M> +.endif # !empty(SUBDIR_OVERRIDE) > > M> + > > M> +.if defined(NOCLEAN) > > M> +.warning The src.conf WITHOUT_CLEAN option can now be used instead of NOCLEAN. > > M> +MK_CLEAN:= no > > M> +.endif > > M> +.if defined(NO_CLEAN) > > M> +.info The src.conf WITHOUT_CLEAN option can now be used instead of NO_CLEAN. > > M> +MK_CLEAN:= no > > M> +.endif > > M> +.if defined(NO_CLEANDIR) > > M> +CLEANDIR= clean cleandepend > > M> +.else > > M> +CLEANDIR= cleandir > > M> +.endif > > M> + > > M> +.if defined(WORLDFAST) > > M> +MK_CLEAN:= no > > M> +NO_OBJWALK= t > > M> +.endif > > M> + > > M> +.if ${MK_META_MODE} == "yes" > > M> +# If filemon is used then we can rely on the build being incremental-safe. > > M> +# The .meta files will also track the build command and rebuild should > > M> +# it change. > > M> +.if empty(.MAKE.MODE:Mnofilemon) > > M> +MK_CLEAN:= no > > M> +.endif > > M> +.endif > > M> +.if defined(NO_OBJWALK) || ${MK_AUTO_OBJ} == "yes" > > M> +NO_OBJWALK= t > > M> +NO_KERNELOBJ= t > > M> +.endif > > M> +.if !defined(NO_OBJWALK) > > M> +_obj= obj > > M> +.endif > > M> + > > M> +LOCAL_TOOL_DIRS?= > > M> +PACKAGEDIR?= ${DESTDIR}/${DISTDIR} > > M> + > > M> +.if empty(SHELL:M*csh*) > > M> +BUILDENV_SHELL?=${SHELL} > > M> +.else > > M> +BUILDENV_SHELL?=/bin/sh > > M> +.endif > > M> + > > M> +.if !defined(_MKSHOWCONFIG) > > M> +.if !defined(VCS_REVISION) || empty(VCS_REVISION) > > M> +.if !defined(SVNVERSION_CMD) || empty(SVNVERSION_CMD) > > M> +. for _D in ${PATH:S,:, ,g} > > M> +. if exists(${_D}/svnversion) > > M> +SVNVERSION_CMD?=${_D}/svnversion > > M> +. endif > > M> +. if exists(${_D}/svnliteversion) > > M> +SVNVERSION_CMD?=${_D}/svnliteversion > > M> +. endif > > M> +. endfor > > M> +.endif > > M> +.if defined(SVNVERSION_CMD) && !empty(SVNVERSION_CMD) > > M> +_VCS_REVISION?= $$(eval ${SVNVERSION_CMD} ${SRCDIR}) > > M> +. if !empty(_VCS_REVISION) > > M> +VCS_REVISION= $$(echo r${_VCS_REVISION}) > > M> +.export VCS_REVISION > > M> +. endif > > M> +.endif > > M> +.endif > > M> + > > M> +.if !defined(GIT_CMD) || empty(GIT_CMD) > > M> +. for _P in /usr/bin /usr/local/bin > > M> +. if exists(${_P}/git) > > M> +GIT_CMD= ${_P}/git > > M> +. endif > > M> +. endfor > > M> +.export GIT_CMD > > M> +.endif > > M> + > > M> +.if !defined(OSRELDATE) > > M> +.if exists(/usr/include/osreldate.h) > > M> +OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ > > M> + /usr/include/osreldate.h > > M> +.else > > M> +OSRELDATE= 0 > > M> +.endif > > M> +.export OSRELDATE > > M> +.endif > > M> + > > M> +# Set VERSION for CTFMERGE to use via the default CTFFLAGS=-L VERSION. > > M> +.for _V in BRANCH REVISION TYPE > > M> +.if !defined(_${_V}) > > M> +_${_V}!= eval $$(awk '/^${_V}=/{print}' ${SRCTOP}/sys/conf/newvers.sh); echo $$${_V} > > M> +.export _${_V} > > M> +.endif > > M> +.endfor > > M> +.if !defined(SRCRELDATE) > > M> +SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ > > M> + ${SRCDIR}/sys/sys/param.h > > M> +.export SRCRELDATE > > M> +.endif > > M> +.if !defined(VERSION) > > M> +VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE} > > M> +.export VERSION > > M> +.endif > > M> +MAJOR_REVISION= ${_REVISION:R} > > M> + > > M> +.if !defined(PKG_VERSION) > > M> +_STRTIMENOW= %Y%m%d%H%M%S > > M> +_TIMENOW= ${_STRTIMENOW:gmtime} > > M> +.if ${_BRANCH:MCURRENT*} || ${_BRANCH:MSTABLE*} || ${_BRANCH:MPRERELEASE*} > > M> +EXTRA_REVISION= .snap${_TIMENOW} > > M> +.elif ${_BRANCH:MALPHA*} > > M> +EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/}.${_TIMENOW} > > M> +.elif ${_BRANCH:MBETA*} > > M> +EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/}.${_TIMENOW} > > M> +.elif ${_BRANCH:MRC*} > > M> +EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/}.${_TIMENOW} > > M> +.elif ${_BRANCH:M*-p*} > > M> +EXTRA_REVISION= p${_BRANCH:C/.*-p([0-9]+$)/\1/} > > M> +.endif > > M> +PKG_VERSION:= ${MAJOR_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} > > M> +.endif > > M> +.endif # !defined(PKG_VERSION) > > M> + > > M> +.if !defined(PKG_TIMESTAMP) > > M> +TIMEEPOCHNOW= %s > > M> +SOURCE_DATE_EPOCH= ${TIMEEPOCHNOW:gmtime} > > M> +.else > > M> +SOURCE_DATE_EPOCH= ${PKG_TIMESTAMP} > > M> +.endif > > M> + > > M> +PKG_NAME_PREFIX?= FreeBSD > > M> +PKG_MAINTAINER?= re@FreeBSD.org > > M> +PKG_WWW?= https://www.FreeBSD.org > > M> +.export PKG_NAME_PREFIX > > M> +.export PKG_MAINTAINER > > M> +.export PKG_WWW > > M> + > > M> +.if !defined(_MKSHOWCONFIG) > > M> +_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} -f /dev/null \ > > M> + -m ${.CURDIR}/share/mk MK_AUTO_OBJ=no -V CPUTYPE > > M> +.if ${_CPUTYPE} != ${_TARGET_CPUTYPE} > > M> +.error CPUTYPE global should be set with ?=. > > M> +.endif > > M> +.endif > > M> +.if make(buildworld) > > M> +BUILD_ARCH!= uname -p > > M> +# On some Linux systems uname -p returns "unknown" so skip this check there. > > M> +# This check only exists to tell people to use TARGET_ARCH instead of > > M> +# MACHINE_ARCH so skipping it when crossbuilding on non-FreeBSD should be fine. > > M> +.if ${MACHINE_ARCH} != ${BUILD_ARCH} && ${.MAKE.OS} == "FreeBSD" > > M> +.error To cross-build, set TARGET_ARCH. > > M> +.endif > > M> +.endif > > M> +WORLDTMP?= ${OBJTOP}/tmp > > M> +BPATH= ${CCACHE_WRAPPER_PATH_PFX}${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin:${WORLDTMP}/legacy/usr/libexec > > M> +XPATH= ${WORLDTMP}/bin:${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin > > M> + > > M> +# When building we want to find the cross tools before the host tools in ${BPATH}. > > M> +# We also need to add UNIVERSE_TOOLCHAIN_PATH so that we can find the shared > > M> +# toolchain files (clang, lld, etc.) during make universe/tinderbox > > M> +STRICTTMPPATH= ${XPATH}:${BPATH}:${UNIVERSE_TOOLCHAIN_PATH} > > M> +# We should not be using tools from /usr/bin accidentally since this could cause > > M> +# the build to break on other systems that don't have that tool. For now we > > M> +# still allow using the old behaviour (inheriting $PATH) if > > M> +# BUILD_WITH_STRICT_TMPPATH is set to 0 but this will eventually be removed. > > M> + > > M> +# Currently strict $PATH can cause build failures. Once the remaining issues > > M> +# have been resolved it will be turned on by default. > > M> +BUILD_WITH_STRICT_TMPPATH?=0 > > M> +.if defined(CROSSBUILD_HOST) > > M> +# When building on non-FreeBSD we can't rely on the tools in /usr/bin being compatible > > M> +# with what FreeBSD expects. Therefore we only use tools from STRICTTMPPATH > > M> +# during the world build stage. We build most tools during the bootstrap-tools > > M> +# phase but symlink host tools that are known to work instead of building them > > M> +BUILD_WITH_STRICT_TMPPATH:=1 > > M> +.endif > > M> +.if ${BUILD_WITH_STRICT_TMPPATH} != 0 > > M> +TMPPATH= ${STRICTTMPPATH} > > M> +.else > > M> +TMPPATH= ${STRICTTMPPATH}:${PATH} > > M> +.endif > > M> + > > M> +# > > M> +# Avoid running mktemp(1) unless actually needed. > > M> +# It may not be functional, e.g., due to new ABI > > M> +# when in the middle of installing over this system. > > M> +# > > M> +.if make(distributeworld) || make(installworld) || make(stageworld) > > M> +.if ${BUILD_WITH_STRICT_TMPPATH} != 0 > > M> +MKTEMP=${WORLDTMP}/legacy/usr/bin/mktemp > > M> +.if !exists(${MKTEMP}) > > M> +.error mktemp binary doesn't exist in expected location: ${MKTEMP} > > M> +.endif > > M> +.else > > M> +MKTEMP=mktemp > > M> +.endif > > M> +INSTALLTMP!= ${MKTEMP} -d -u -t install > > M> + > > M> +.if ${.MAKE.OS} == "FreeBSD" > > M> +# When building on FreeBSD we always copy the host tools instead of linking > > M> +# into INSTALLTMP to avoid issues with incompatible libraries (see r364030). > > M> +# Note: we could create links if we don't intend to update the current machine. > > M> +INSTALLTMP_COPY_HOST_TOOL=cp > > M> +.else > > M> +# However, this is not necessary on Linux/macOS. Additionally, copying the host > > M> +# tools to another directory with cp results in AMFI Launch Constraint > > M> +# Violations on macOS Ventura as part of its System Integrity Protection. > > M> +INSTALLTMP_COPY_HOST_TOOL=ln -s > > M> +.endif > > M> +.endif > > M> + > > M> +.if make(stagekernel) || make(distributekernel) > > M> +TAGS+= kernel > > M> +PACKAGE= kernel > > M> +.endif > > M> + > > M> +# > > M> +# Building a world goes through the following stages > > M> +# > > M> +# 1. legacy stage [BMAKE] > > M> +# This stage is responsible for creating compatibility > > M> +# shims that are needed by the bootstrap-tools, > > M> +# build-tools and cross-tools stages. These are generally > > M> +# APIs that tools from one of those three stages need to > > M> +# build that aren't present on the host. > > M> +# 1. bootstrap-tools stage [BMAKE] > > M> +# This stage is responsible for creating programs that > > M> +# are needed for backward compatibility reasons. They > > M> +# are not built as cross-tools. > > M> +# 2. build-tools stage [TMAKE] > > M> +# This stage is responsible for creating the object > > M> +# tree and building any tools that are needed during > > M> +# the build process. Some programs are listed during > > M> +# this phase because they build binaries to generate > > M> +# files needed to build these programs. This stage also > > M> +# builds the 'build-tools' target rather than 'all'. > > M> +# 3. cross-tools stage [XMAKE] > > M> +# This stage is responsible for creating any tools that > > M> +# are needed for building the system. A cross-compiler is one > > M> +# of them. This differs from build tools in two ways: > > M> +# 1. the 'all' target is built rather than 'build-tools' > > M> +# 2. these tools are installed into TMPPATH for stage 4. > > M> +# 4. world stage [WMAKE] > > M> +# This stage actually builds the world. > > M> +# 5. install stage (optional) [IMAKE] > > M> +# This stage installs a previously built world. > > M> +# > > M> + > > M> +BOOTSTRAPPING?= 0 > > M> +# Keep these in sync > > M> +MINIMUM_SUPPORTED_OSREL?= 1104001 > > M> +MINIMUM_SUPPORTED_REL?= 11.4 > > M> + > > M> +# Common environment for world related stages > > M> +CROSSENV+= \ > > M> + MACHINE_ARCH=${TARGET_ARCH} \ > > M> + MACHINE=${TARGET} \ > > M> + CPUTYPE=${TARGET_CPUTYPE} > > M> +.if ${MK_META_MODE} != "no" > > M> +# Don't rebuild build-tools targets during normal build. > > M> +CROSSENV+= BUILD_TOOLS_META=.NOMETA > > M> +.endif > > M> +.if defined(TARGET_CFLAGS) > > M> +CROSSENV+= ${TARGET_CFLAGS} > > M> +.endif > > M> +.if (${TARGET} != ${MACHINE} && !defined(WITH_LOCAL_MODULES)) || \ > > M> + defined(WITHOUT_LOCAL_MODULES) > > M> +CROSSENV+= LOCAL_MODULES= > > M> +.endif > > M> + > > M> +BOOTSTRAPPING_OSRELDATE?=${OSRELDATE} > > M> + > > M> +# bootstrap-tools stage > > M> +BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ > > M> + TOOLS_PREFIX=${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \ > > M> + PATH=${BPATH:Q}:${PATH:Q} \ > > M> + WORLDTMP=${WORLDTMP} \ > > M> + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" > > M> +# need to keep this in sync with targets/pseudo/bootstrap-tools/Makefile > > M> +BSARGS= DESTDIR= \ > > M> + OBJTOP='${WORLDTMP}/obj-tools' \ > > M> + OBJROOT='$${OBJTOP}/' \ > > M> + UNIVERSE_TOOLCHAIN_PATH=${UNIVERSE_TOOLCHAIN_PATH} \ > > M> + MAKEOBJDIRPREFIX= \ > > M> + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ > > M> + BWPHASE=${.TARGET:C,^_,,} \ > > M> + -DNO_CPU_CFLAGS \ > > M> + -DNO_LINT \ > > M> + -DNO_PIC \ > > M> + -DNO_SHARED \ > > M> + MK_ASAN=no \ > > M> + MK_CTF=no \ > > M> + MK_CLANG_EXTRAS=no \ > > M> + MK_CLANG_FORMAT=no \ > > M> + MK_CLANG_FULL=no \ > > M> + MK_HTML=no \ > > M> + MK_MAN=no \ > > M> + MK_PROFILE=no \ > > M> + MK_RETPOLINE=no \ > > M> + MK_SSP=no \ > > M> + MK_TESTS=no \ > > M> + MK_UBSAN=no \ > > M> + MK_WERROR=no \ > > M> + MK_INCLUDES=yes \ > > M> + MK_MAN_UTILS=yes > > M> + > > M> +BMAKE= \ > > M> + ${TIME_ENV} ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ > > M> + ${BSARGS} > > M> +.if empty(.MAKEOVERRIDES:MMK_LLVM_TARGET_ALL) > > M> +BMAKE+= MK_LLVM_TARGET_ALL=no > > M> +.endif > > M> + > > M> +# build-tools stage > > M> +TMAKE= \ > > M> + ${TIME_ENV} ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ > > M> + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ > > M> + DESTDIR= \ > > M> + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ > > M> + BWPHASE=${.TARGET:C,^_,,} \ > > M> + -DNO_CPU_CFLAGS \ > > M> + -DNO_LINT \ > > M> + MK_ASAN=no \ > > M> + MK_CTF=no \ > > M> + MK_CLANG_EXTRAS=no \ > > M> + MK_CLANG_FORMAT=no \ > > M> + MK_CLANG_FULL=no \ > > M> + MK_LLDB=no \ > > M> + MK_RETPOLINE=no \ > > M> + MK_SSP=no \ > > M> + MK_TESTS=no \ > > M> + MK_UBSAN=no \ > > M> + MK_WERROR=no > > M> + > > M> +# cross-tools stage > > M> +# TOOLS_PREFIX set in BMAKE > > M> +XMAKE= ${BMAKE} \ > > M> + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ > > M> + MK_LLDB=no \ > > M> + MK_LLVM_BINUTILS=no \ > > M> + MK_TESTS=no > > M> + > > M> +# kernel-tools stage > > M> +KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ > > M> + PATH=${BPATH:Q}:${PATH:Q} \ > > M> + WORLDTMP=${WORLDTMP} \ > > M> + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" > > M> + > > M> +KTMAKE= ${TIME_ENV} \ > > M> + TOOLS_PREFIX=${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \ > > M> + ${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ > > M> + DESTDIR= \ > > M> + OBJTOP='${WORLDTMP}/obj-kernel-tools' \ > > M> + OBJROOT='$${OBJTOP}/' \ > > M> + UNIVERSE_TOOLCHAIN_PATH=${UNIVERSE_TOOLCHAIN_PATH} \ > > M> + MAKEOBJDIRPREFIX= \ > > M> + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ > > M> + -DNO_CPU_CFLAGS \ > > M> + -DNO_LINT \ > > M> + -DNO_PIC \ > > M> + -DNO_SHARED \ > > M> + MK_CTF=no \ > > M> + MK_HTML=no \ > > M> + MK_MAN=no \ > > M> + MK_PROFILE=no \ > > M> + MK_SSP=no \ > > M> + MK_RETPOLINE=no \ > > M> + MK_WERROR=no > > M> + > > M> +# world stage > > M> +WMAKEENV= ${CROSSENV} \ > > M> + INSTALL="${INSTALL_CMD} -U" \ > > M> + PATH=${TMPPATH:Q} \ > > M> + SYSROOT=${WORLDTMP} > > M> + > > M> +# make hierarchy > > M> *** 5431 LINES SKIPPED *** > > > > -- > Alexander Motin > --06e1cace14e44ba6b615e2ddd8eabb7c Content-Type: text/html Content-Transfer-Encoding: quoted-printable

=
On Wed, Aug 30, 2023, at 8:01 PM, Alexander Motin wrote:<= br>
Hi Gleb,

It is the first time I see a panic like this.=   I'll think about it 
tomorrow.  But I'd a= ppreciate any information on what is your workload 
a= nd what are you doing related to ZIL (O_SYNC, fsync(), sync=3Dalways,&nb= sp;
etc) to trigger it?  What is your pool configurat= ion?

I'm not Gleb, but this wa= s something at $WORK, so I can perhaps help.  I've included the out= put of zpool status, and all non-default settings in the zpool.  No= te that we don't use a ZIL device.

Thanks,<= br>

Drew


# zpool status
  pool: zroot
stat= e: ONLINE
status: Some supported and requested features ar= e not enabled on the pool.
The pool can still be used, but= some features are unavailable.
action: Enable all feature= s using 'zpool upgrade'. Once this is done,
the pool may n= o longer be accessible by software that does not support
t= he features. See zpool-features(7) for details.
config:

NAME       = ; STATE     READ WRITE CKSUM
zroot&nbs= p;      ONLINE     &nb= sp; 0     0     0
=   raidz1-0  ONLINE       0 =     0     0
  = ;  nda0p2  ONLINE       0 &= nbsp;   0     0
  =   nda1p2  ONLINE       0 &n= bsp;   0     0
  &= nbsp; nda2p2  ONLINE       0 &nb= sp;   0     0
spares
  nda3p2    AVAIL   
=

errors: No known data errors

# zpool get all | grep -v default
NAME   P= ROPERTY           = ;            VALU= E            = ;            = ;            = ;            = ;           SOURCE
=
zroot  size       &nb= sp;           &nb= sp;       149G    &nbs= p;           &nbs= p;           &nbs= p;           &nbs= p;           &nbs= p;       -
zroot  capac= ity           &nb= sp;           14% = ;            = ;            = ;            = ;            = ;            -
zroot  health       =             =       ONLINE      = ;            = ;            = ;            = ;            = ;    -
zroot  guid   &n= bsp;           &n= bsp;           5099990= 586719219765          =             =             =            -
=
zroot  bootfs        &= nbsp;           &= nbsp;    zroot/ROOT/NCD-7827-freebsd-2023-08-29-merge-oca= -r202308291935  local
zroot  dedupratio &nb= sp;           &nb= sp;       1.00x    &nb= sp;           &nb= sp;           &nb= sp;           &nb= sp;           &nb= sp;      -
zroot  free =             =             =   127G          &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp; -
zroot  allocated     = ;            = ;     22.3G       = ;            = ;            = ;            = ;            = ;    -
zroot  readonly  &nbs= p;           &nbs= p;        off    =             =             =             =             =          -
zroot&n= bsp; expandsize         &nb= sp;           - &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp; -
zroot  freeing     &= nbsp;           &= nbsp;      0      = ;            = ;            = ;            = ;            = ;         -
zroot&= nbsp; fragmentation         = ;         28%   &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;         -
zr= oot  leaked         &n= bsp;           &n= bsp;   0         =             =             =             =             =       -
zroot  checkpoint&nb= sp;           &nb= sp;        -    &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;          -
<= div>zroot  load_guid        = ;            = ;  7612195721260396606       &nb= sp;           &nb= sp;           &nb= sp;           &nb= sp; -
zroot  bcloneused     =             =     0        &nbs= p;           &nbs= p;           &nbs= p;           &nbs= p;           &nbs= p;      -
zroot  bclonesaved=             =         0    &nbs= p;           &nbs= p;           &nbs= p;           &nbs= p;           &nbs= p;          -
zroot  bcloneratio        =             1.00x=             =             =             =             =            -
=
zroot  feature@async_destroy     &nbs= p;    enabled       &n= bsp;           &n= bsp;           &n= bsp;           &n= bsp;           &n= bsp; local
zroot  feature@empty_bpobj  &nbs= p;         active  &nb= sp;           &nb= sp;           &nb= sp;           &nb= sp;           &nb= sp;       local
zroot  = feature@lz4_compress        &nbs= p;  active         &nb= sp;           &nb= sp;           &nb= sp;           &nb= sp;            lo= cal
zroot  feature@multi_vdev_crash_dump  enable= d            = ;            = ;            = ;            = ;         local
zr= oot  feature@spacemap_histogram     active = ;            = ;            = ;            = ;            = ;         local
zr= oot  feature@enabled_txg       &= nbsp;    active       =             =             =             =             =    local
zroot  feature@hole_birth &nb= sp;           active&n= bsp;           &n= bsp;           &n= bsp;           &n= bsp;           &n= bsp;         local
zroot  feature@extensible_dataset     active&n= bsp;           &n= bsp;           &n= bsp;           &n= bsp;           &n= bsp;         local
zroot  feature@embedded_data      &n= bsp;   active        &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp; local
zroot  feature@bookmarks   = ;           enabled&nb= sp;           &nb= sp;           &nb= sp;           &nb= sp;           &nb= sp;        local
zroot&= nbsp; feature@filesystem_limits      enabled&nb= sp;           &nb= sp;           &nb= sp;           &nb= sp;           &nb= sp;        local
zroot&= nbsp; feature@large_blocks       &nbs= p;   enabled        &n= bsp;           &n= bsp;           &n= bsp;           &n= bsp;            l= ocal
zroot  feature@large_dnode   &nbs= p;        enabled   &n= bsp;           &n= bsp;           &n= bsp;           &n= bsp;           &n= bsp;     local
zroot  feature@sha= 512           &nb= sp;     enabled      &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;  local
zroot  feature@skein  &nb= sp;           &nb= sp;   enabled        &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;            = local
zroot  feature@edonr    &nb= sp;           &nb= sp; disabled          =             =             =             =           local
zroot  feature@userobj_accounting     active=             =             =             =             =           local
zroot  feature@encryption      &nb= sp;      enabled     &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;   local
zroot  feature@project_quota&= nbsp;         active  =             =             =             =             =         local
zroot&nbs= p; feature@device_removal        = ; enabled          &nb= sp;           &nb= sp;           &nb= sp;           &nb= sp;          local
zroot  feature@obsolete_counts     &= nbsp;  enabled         = ;            = ;            = ;            = ;            loca= l
zroot  feature@zpool_checkpoint   &n= bsp;   enabled        =             =             =             =             = local
zroot  feature@spacemap_v2   &n= bsp;        active   &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;      local
zroot  feat= ure@allocation_classes     enabled   =             =             =             =             =       local
zroot  feature@r= esilver_defer         enabled&nb= sp;           &nb= sp;           &nb= sp;           &nb= sp;           &nb= sp;        local
zroot&= nbsp; feature@bookmark_v2        = ;    enabled       &nb= sp;           &nb= sp;           &nb= sp;           &nb= sp;           &nb= sp; local
zroot  feature@redaction_bookmarks &nb= sp;  enabled         &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;           local<= br>
zroot  feature@redacted_datasets   &nb= sp;  enabled         &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;           local<= br>
zroot  feature@bookmark_written   &nbs= p;   enabled        &n= bsp;           &n= bsp;           &n= bsp;           &n= bsp;            l= ocal
zroot  feature@log_spacemap   &nb= sp;       active    &n= bsp;           &n= bsp;           &n= bsp;           &n= bsp;           &n= bsp;     local
zroot  feature@liv= elist           &= nbsp;   enabled        = ;            = ;            = ;            = ;            = ; local
zroot  feature@device_rebuild  &nbs= p;      enabled     &n= bsp;           &n= bsp;           &n= bsp;           &n= bsp;           &n= bsp;   local
zroot  feature@zstd_compress&n= bsp;         enabled  =             =             =             =             =        local
zroot  fea= ture@draid          &n= bsp;       enabled    =             =             =             =             =      local
zroot  feature@zilsaxa= ttr           &nb= sp; disabled          =             =             =             =           local
zroot  feature@head_errlog      &n= bsp;     disabled      = ;            = ;            = ;            = ;            = ;  local
zroot  feature@blake3   =             =   disabled         &nb= sp;           &nb= sp;           &nb= sp;           &nb= sp;          local
zroot  feature@block_cloning     &nb= sp;    disabled       =             =             =             =             = local
zroot  feature@vdev_zaps_v2   &= nbsp;       disabled   &nbs= p;           &nbs= p;           &nbs= p;           &nbs= p;           &nbs= p;    local


On 30.08.2023 20:09, Gleb = Smirnoff wrote:
>    Hi Martin,

> we hit this panic with this update:<= br>

> panic: VERIFY(avl_is_empty(&= amp;lwb->lwb_vdev_tree)) failed

> cpuid =3D 8
> time =3D 1693432004
= > KDB: stack backtrace:
> db_trace_self_wrapper() at= db_trace_self_wrapper+0x2b/frame 0xfffffe09519aa800
> = vpanic() at vpanic+0x132/frame 0xfffffe09519aa930
> spl= _panic() at spl_panic+0x3a/frame 0xfffffe09519aa990
> z= il_free_lwb() at zil_free_lwb+0x1de/frame 0xfffffe09519aa9c0
> zil_sync() at zil_sync+0x3cb/frame 0xfffffe09519aaaa0
<= div>> [Wed Aug 30 21:46:44 2023]dmu_objset_sync() at dmu_objset_sync+= 0x51b/frame 0xfffffe09519aab70
> dsl_pool_sync() at dsl= _pool_sync+0x11d/frame 0xfffffe09519aabf0
> spa_sync() = at spa_sync+0xc68/frame 0xfffffe09519aae20
> txg_sync_t= hread() at txg_sync_thread+0x2eb/frame 0xfffffe09519aaef0
= > fork_exit() at fork_exit+0x82/frame 0xfffffe09519aaf30
> fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe09519aaf30=
> --- trap 0x26d90a2f, rip =3D 0xbba54c81b25fd8d4, rsp= =3D 0xff60c2f6f9874bcd, rbp =3D 0x37940e3e9793bd40 --
>= ; 
> I have two cores dumped for this panic.

> Our previous version is based on = 9c0a2d522f3a18fc795a7dd6266d2be2aff4b084, which
> I gue= ss has the most recent ZFS merge openzfs/zfs@009d3288d.
&g= t; 
> On Sun, Aug 27, 2023 at 05:09:06AM +0000, Ma= rtin Matuska wrote:
> M> The branch main has been up= dated by mm:
> M>
> M>
> M> commit 315ee00fa9616b0a192b6834911f98bcf5316a6b
> M> Merge: b3a714652ff0 804414aad224
> M&= gt; Author:     Martin Matuska <mm@FreeBSD.org>
> M> AuthorD= ate: 2023-08-26 21:20:04 +0000
> M> Commit: &nb= sp;   Martin Matuska <mm@= FreeBSD.org>
> M> CommitDate: 2023-08-26 21:5= 1:42 +0000
> M>
> M>  =    zfs: merge openzfs/zfs@804414aad
> M>
> M>     Notable upstream pull re= quest merges:
> M>     &nbs= p; #15024 Add missed DMU_PROJECTUSED_OBJECT prefetch
> = M>       #15029 Do not request data L1 = buffers on scan prefetch
> M>    = ;   #15036 FreeBSD: catch up to __FreeBSD_version 1400093
<= /div>
> M>       #15039 Fix raw = receive with different indirect block size
> M> = ;      #15047 FreeBSD: Fix build on stable/13 a= fter 1302506
> M>      = ; #15049 Fix the ZFS checksum error histograms with larger record sizes<= br>
> M>       #15052 Redu= ce bloat in ereport.fs.zfs.checksum events
> M> = ;      #15056 Avoid extra snprintf() in dsl_dea= dlist_merge()
> M>     &nbs= p; #15061 Ignore pool ashift property during vdev attachment
> M>       #15063 Don't panic if = setting vdev properties is unsupported for this vdev type
= > M>       #15067 spa_min_alloc shou= ld be GCD, not min
> M>     = ;  #15071 Add explicit prefetches to bpobj_iterate()
= > M>       #15072 Adjust prefetch pa= rameters
> M>       #1= 5076 Refactor dmu_prefetch()
> M>   &= nbsp;   #15079 set autotrim default to 'off' everywhere
> M>       #15080 ZIL: Fix c= onfig lock deadlock
> M>    &nbs= p;  #15088 metaslab: tuneable to better control force ganging
> M>       #15096 Avoid wai= ting in dmu_sync_late_arrival()
> M>  &nbs= p;    #15097 BRT should return EOPNOTSUPP
&= gt; M>       #15103 Remove zl_issuer_lo= ck from zil_suspend()
> M>    &n= bsp;  #15107 Remove fastwrite mechanism
> M>&nb= sp;      #15113 libzfs: sendrecv: send_progress= _thread: handle SIGINFO/SIGUSR1
> M>  &nbs= p;    #15122 ZIL: Second attempt to reduce scope of zl_is= suer_lock
> M>       #= 15129 zpool_vdev_remove() should handle EALREADY error return
<= div>> M>       #15132 ZIL: Replay bl= ocks without next block pointer
> M>  &nbs= p;    #15148 zfs_clone_range should return descriptive er= ror codes
> M>       #= 15153 ZIL: Avoid dbuf_read() before dmu_sync()
> M>&= nbsp;      #15172 copy_file_range: fix fallback= when source create on same txg
> M>  &nbs= p;    #15180 Update outdated assertion from zio_write_com= press
> M>
> M>   = ;  Obtained from:  OpenZFS
> M>  = ;   OpenZFS commit: 804414aad224b432590afe3f9ec114ffb49e0f13
> M>
> M>  Makefile.inc1&nbs= p;           &nbs= p;           &nbs= p;           &nbs= p; |   5 +-
> M>  cddl/lib/libzfs/Mak= efile           &= nbsp;           &= nbsp;   |   1 +
> M>  cddl/= lib/libzfs/Makefile.depend       &nbs= p;            |&n= bsp;  1 +
> M>  rescue/rescue/Makefile&nbs= p;           &nbs= p;           &nbs= p;    |   2 +-
> M>  r= escue/rescue/Makefile.depend       &n= bsp;           &n= bsp;  |   1 +
> M>  share/mk/src= .libnames.mk          =             =      |   2 +-
> M>&nbs= p; sys/contrib/openzfs/META       &nb= sp;           &nb= sp;       |   6 +-
> M>  sys/contrib/openzfs/cmd/zdb/zdb.c   &nb= sp;           &nb= sp;  |  77 ++-
> M>  sys/contrib/open= zfs/cmd/zed/agents/zfs_mod.c       | =   2 -
> M>  sys/contrib/openzfs/cmd/zed/ag= ents/zfs_retire.c    |   5 +
>= M>  .../openzfs/cmd/zed/zed.d/statechange-slot_off.sh  |&n= bsp; 61 ++
> M>  sys/contrib/openzfs/cmd/zed/ze= d.d/zed.rc           |=    5 +
> M>  sys/contrib/openzfs/cmd/= ztest.c           = ;         |   2 +-
=
> M>  sys/contrib/openzfs/config/Shellcheck.am&nbs= p;          |   3= +-
> M>  sys/contrib/openzfs/config/kernel-blk= dev.m4        | 138 +++-
> M>  .../config/kernel-block-device-operations.m4 &nb= sp;     |  35 +-
> M> = .../openzfs/config/kernel-filemap-splice-read.m4   |  25= +
> M>  .../openzfs/config/kernel-register_sys= ctl_table.m4 |  27 +
> M>  .../config/kern= el-vfs-extended-file_range.m4       | = ; 50 ++
> M>  .../openzfs/config/kernel-vfs-fil= e_range.m4        | 164 +++++
> M>  sys/contrib/openzfs/config/kernel-vfs-iov_iter.m= 4  |  26 +-
> M>  sys/contrib/openzfs= /config/kernel.m4         &= nbsp;     |  16 +
> M> = ; sys/contrib/openzfs/contrib/debian/changelog    &n= bsp;  |   6 +
> M>  .../contrib/= debian/openzfs-zfs-test.install       = ; |   2 -
> M>  .../contrib/debian/op= enzfs-zfsutils.install        | =   2 +
> M>  .../contrib/dracut/90zfs/zfs-e= nv-bootfs.service.in |  11 +-
> M>  .../dr= acut/90zfs/zfs-rollback-bootfs.service.in    |  = ; 2 +-
> M>  .../openzfs/include/os/freebsd/spl= /sys/vnode.h     |   6 +-
&g= t; M>  .../include/os/linux/kernel/linux/blkdev_compat.h  |=   17 +
> M>  .../openzfs/include/os/linux/= spl/sys/kmem_cache.h  |   8 +
> M>&nb= sp; .../openzfs/include/os/linux/spl/sys/types.h    =    |   2 +-
> M>  sys/contr= ib/openzfs/include/os/linux/spl/sys/uio.h |  12 +
>= ; M>  sys/contrib/openzfs/include/os/linux/zfs/sys/zpl.h | = 53 ++
> M>  sys/contrib/openzfs/include/sys/bp= obj.h            = |   2 +-
> M>  sys/contrib/openzfs/in= clude/sys/brt.h         &nb= sp;    |   1 +
> M>  s= ys/contrib/openzfs/include/sys/dmu.h      =         |   5 +
> M>  sys/contrib/openzfs/include/sys/dmu_impl.h &nbs= p;       |   2 -
&= gt; M>  sys/contrib/openzfs/include/sys/dmu_zfetch.h  =      |   2 -
> M> = ; sys/contrib/openzfs/include/sys/fm/fs/zfs.h    &nb= sp;   |   4 -
> M>  sys/con= trib/openzfs/include/sys/metaslab.h      &= nbsp;  |   3 -
> M>  sys/contrib= /openzfs/include/sys/metaslab_impl.h    |   6 += -
> M>  sys/contrib/openzfs/include/sys/spa_imp= l.h         |   1 +
> M>  sys/contrib/openzfs/include/sys/vdev_impl.h=         |   2 +-
<= div>> M>  sys/contrib/openzfs/include/sys/zil_impl.h &nb= sp;       |  44 +-
>= M>  sys/contrib/openzfs/include/sys/zio.h   &nbs= p;          |   1= -
> M>  sys/contrib/openzfs/include/sys/zio_ch= ecksum.h     |   2 -
> M&= gt;  sys/contrib/openzfs/lib/libzfs/Makefile.am   &n= bsp;     |   2 +-
> M>=   sys/contrib/openzfs/lib/libzfs/libzfs_pool.c   &nb= sp;   |   6 +
> M>  sys/con= trib/openzfs/lib/libzfs/libzfs_sendrecv.c   |  95 ++-
=
> M>  sys/contrib/openzfs/man/man4/zfs.4 &nbs= p;           &nbs= p;   |  10 +-
> M>  sys/contrib/= openzfs/man/man8/zfs-send.8       &nb= sp;    |  18 +-
> M>  sys/c= ontrib/openzfs/man/man8/zpool-events.8     &nbs= p;  |  23 +-
> M>  sys/contrib/openzf= s/module/Kbuild.in         =       |   1 +
> M>= ;  .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c   |&n= bsp; 10 +-
> M>  sys/contrib/openzfs/module/os/= linux/spl/spl-proc.c |  26 +-
> M>  .../op= enzfs/module/os/linux/zfs/vdev_disk.c      = ;  |  65 +-
> M>  .../openzfs/module/= os/linux/zfs/zfs_ctldir.c       |  26= +-
> M>  .../openzfs/module/os/linux/zfs/zfs_v= fsops.c       |   7 +
<= div>> M>  .../openzfs/module/os/linux/zfs/zfs_vnops_os.c = ;    |   9 +-
> M>  ..= ./openzfs/module/os/linux/zfs/zfs_znode.c     &= nbsp;  |   8 +
> M>  .../openzfs= /module/os/linux/zfs/zpl_ctldir.c       |&= nbsp;  2 +-
> M>  sys/contrib/openzfs/modu= le/os/linux/zfs/zpl_file.c |  44 +-
> M>  = .../openzfs/module/os/linux/zfs/zpl_file_range.c   | 272 +++++= +++
> M>  .../openzfs/module/os/linux/zfs/zpl_s= uper.c        |  39 +-
=
> M>  sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c&= nbsp; |  28 +-
> M>  sys/contrib/openzfs/m= odule/zfs/bpobj.c         &= nbsp;   |  49 +-
> M>  sys/contr= ib/openzfs/module/zfs/brt.c       &nb= sp;       |  43 +-
>= M>  sys/contrib/openzfs/module/zfs/dbuf.c   &nbs= p;          |  11 +-
> M>  sys/contrib/openzfs/module/zfs/dmu.c =             =   | 127 ++--
> M>  sys/contrib/openzfs/mod= ule/zfs/dmu_recv.c         = |  22 +-
> M>  sys/contrib/openzfs/module= /zfs/dmu_zfetch.c        |  12 += -
> M>  sys/contrib/openzfs/module/zfs/dnode.c&= nbsp;            = |  31 +-
> M>  sys/contrib/openzfs/module/= zfs/dsl_deadlist.c      |  14 +-
=
> M>  sys/contrib/openzfs/module/zfs/dsl_scan.c &nb= sp;        |  17 +-
> M>  sys/contrib/openzfs/module/zfs/metaslab.c  =         |  83 +--
= > M>  sys/contrib/openzfs/module/zfs/spa_log_spacemap.c = |   4 +-
> M>  sys/contrib/openzfs/m= odule/zfs/spa_misc.c        &nbs= p; |   1 +
> M>  sys/contrib/openzfs/= module/zfs/vdev.c         &= nbsp;    |  90 ++-
> M>  sy= s/contrib/openzfs/module/zfs/vdev_indirect.c     |&n= bsp;  2 +-
> M>  sys/contrib/openzfs/modul= e/zfs/vdev_raidz.c        | &nbs= p; 2 +-
> M>  sys/contrib/openzfs/module/zfs/zf= s_fm.c           = |  33 +-
> M>  sys/contrib/openzfs/module= /zfs/zfs_vnops.c         | = 46 +-
> M>  sys/contrib/openzfs/module/zfs/zil= .c           &nbs= p;   | 719 +++++++++------------
> M> = ; sys/contrib/openzfs/module/zfs/zio.c     &nbs= p;         |  45 +-
> M>  sys/contrib/openzfs/module/zfs/zio_checksum.c&nb= sp;     |   2 -
> M>&n= bsp; sys/contrib/openzfs/module/zfs/zvol.c     =          |   8 +-
<= /div>
> M>  sys/contrib/openzfs/tests/runfiles/linux.run&= nbsp;      |  11 +
> M>= ;  .../openzfs/tests/test-runner/bin/zts-report.py.in |  18 +<= br>
> M>  sys/contrib/openzfs/tests/zfs-tests/cmd/.= gitignore |   1 +
> M>  .../openzfs/t= ests/zfs-tests/cmd/Makefile.am       = |   1 +
> M>  .../openzfs/tests/zfs-= tests/cmd/clonefile.c        | 333 ++= ++++++++
> M>  sys/contrib/openzfs/tests/zfs-te= sts/cmd/readmmap.c |   1 +
> M>  .../= openzfs/tests/zfs-tests/include/commands.cfg   |   1= +
> M>  .../openzfs/tests/zfs-tests/tests/Make= file.am      |  14 +
> M&= gt;  .../functional/block_cloning/block_cloning.kshlib  | = ; 54 ++
> M>  .../block_cloning/block_cloning_c= opyfilerange.ksh  |  60 ++
> M>  .../= block_cloning_copyfilerange_cross_dataset.ksh  |  65 ++
> M>  .../block_cloning_copyfilerange_fallback.ksh&nb= sp;      |  86 +++
> M>= ;  ...ock_cloning_copyfilerange_fallback_same_txg.ksh |  66 ++=
> M>  .../block_cloning_copyfilerange_partial.= ksh        |  68 ++
> M>  .../block_cloning_disabled_copyfilerange.ksh &nb= sp;     |  60 ++
> M> = .../block_cloning_disabled_ficlone.ksh     &nb= sp;       |  50 ++
>= M>  .../block_cloning_disabled_ficlonerange.ksh  &nbs= p;     |  50 ++
> M>  = .../block_cloning/block_cloning_ficlone.ksh     = ;   |  56 ++
> M>  .../block_clo= ning/block_cloning_ficlonerange.ksh   |  56 ++
<= div>> M>  .../block_cloning_ficlonerange_partial.ksh &nb= sp;       |  64 ++
>= M>  .../tests/functional/block_cloning/cleanup.ksh  &= nbsp;  |  34 +
> M>  .../tests/functi= onal/block_cloning/setup.ksh       | = 36 ++
> M>  .../cli_root/zpool_attach/attach-o= _ashift.ksh      |  30 +-
&g= t; M>  .../cli_root/zpool_replace/replace-o_ashift.ksh &nbs= p;  |  32 +-
> M>  .../cli_root/zpool= _replace/replace_prop_ashift.ksh |  24 +-
> M>&= nbsp; sys/modules/zfs/zfs_config.h      &n= bsp;           &n= bsp;    |  53 +-
> M>  sys/= modules/zfs/zfs_gitrev.h        =             =    |   2 +-
> M>  113 files= changed, 3322 insertions(+), 906 deletions(-)
> M><= br>
> M> diff --cc Makefile.inc1
> M>= ; index 8838d31c795a,000000000000..f740cc5abcca
> M>= mode 100644,000000..100644
> M> --- a/Makefile.inc1=
> M> +++ b/Makefile.inc1
> M> @= @@ -1,3692 -1,0 +1,3695 @@@
> M>  +#
<= div>> M>  +#
> M>  +# Make command l= ine options:
> M>  +# -DNO_CLEANDIR run ${MAKE}= clean, instead of ${MAKE} cleandir
> M>  +# -D= NO_CLEAN do not clean at all
> M>  +# -DDB_FROM= _SRC use the user/group databases in src/etc instead of
&g= t; M>  +#     the system database when installing= .
> M>  +# -DNO_SHARE do not go into share subd= ir
> M>  +# -DKERNFAST define NO_KERNEL{CONFIG,= CLEAN,OBJ}
> M>  +# -DNO_KERNELCONFIG do not ru= n config in ${MAKE} buildkernel
> M>  +# -DNO_K= ERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel
> M>  +# -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} bu= ildkernel
> M>  +# -DNO_ROOT install without us= ing root privilege
> M>  +# -DWITHOUT_CTF do no= t run the DTrace CTF conversion tools on built objects
>= ; M>  +# LOCAL_DIRS=3D"list of dirs" to add additional dirs to t= he SUBDIR list
> M>  +# LOCAL_ITOOLS=3D"list of= tools" to add additional tools to the ITOOLS list
> M&= gt;  +# LOCAL_LIB_DIRS=3D"list of dirs" to add additional dirs to l= ibraries target
> M>  +# LOCAL_MTREE=3D"list of= mtree files" to process to allow local directories
> M= >  +#     to be created before files are installe= d
> M>  +# LOCAL_LEGACY_DIRS=3D"list of dirs" t= o add additional dirs to the legacy
> M>  +# &n= bsp;   target
> M>  +# LOCAL_BSTOOL_D= IRS=3D"list of dirs" to add additional dirs to the
> M&= gt;  +#     bootstrap-tools target
>= ; M>  +# LOCAL_TOOL_DIRS=3D"list of dirs" to add additional dirs= to the build-tools
> M>  +#    = target
> M>  +# LOCAL_XTOOL_DIRS=3D"list of di= rs" to add additional dirs to the
> M>  +# &nbs= p;   cross-tools target
> M>  +# META= LOG=3D"path to metadata log" to write permission and ownership
=
> M>  +#     when NO_ROOT is set.  (= default: ${DESTDIR}/${DISTDIR}/METALOG,
> M>  += #           check /etc= /make.conf for DISTDIR)
> M>  +# TARGET=3D"mach= ine" to crossbuild world for a different machine type
>= M>  +# TARGET_ARCH=3D may be required when a TARGET supports mu= ltiple endians
> M>  +# BUILDENV_SHELL=3D shell= to launch for the buildenv target (def:${SHELL})
> M&g= t;  +# WORLD_FLAGS=3D additional flags to pass to make(1) during bu= ildworld
> M>  +# KERNEL_FLAGS=3D additional fl= ags to pass to make(1) during buildkernel
> M> = +# SUBDIR_OVERRIDE=3D"list of dirs" to build rather than everything.
> M>  +#     All libraries and inc= ludes, and some build tools will still build.
> M>&n= bsp; +
> M>  +#
> M>  = +# The intended user-driven targets are:
> M>  = +# buildworld  - rebuild *everything*, including glue to help do up= grades
> M>  +# installworld- install everythin= g built by "buildworld"
> M>  +# checkworld&nbs= p; - run test suite on installed world
> M>  +#= doxygen     - build API documentation of the kernel=
> M>  +#
> M>  +# Sta= ndard targets (not defined here) are documented in the makefiles in
<= /div>
> M>  +# /usr/share/mk.  These include:
> M>  +# obj depend all install clean cleandepend cl= eanobj
> M>  +
> M>  += .if !defined(TARGET) || !defined(TARGET_ARCH)
> M>&n= bsp; +.error Both TARGET and TARGET_ARCH must be defined.
= > M>  +.endif
> M>  +
= > M>  +.if make(showconfig) || make(test-system-*)
<= div>> M>  +_MKSHOWCONFIG=3D t
> M>  = +.endif
> M>  +
> M>  = +SRCDIR?=3D ${.CURDIR}
> M>  +LOCALBASE?=3D /us= r/local
> M>  +TIME_ENV ?=3D time env
=
> M>  +
> M>  +.include "share/= mk/src.tools.mk"
> M>  +
> M&g= t;  +# Cross toolchain changes must be in effect before bsd.compile= r.mk
> M>  +# so that gets the right CC, and pa= ss CROSS_TOOLCHAIN to submakes.
> M>  +.if defi= ned(CROSS_TOOLCHAIN)
> M>  +.if exists(${LOCALB= ASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk)
> M>&nb= sp; +.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk"
<= /div>
> M>  +.elif exists(${CROSS_TOOLCHAIN})
> M>  +.include "${CROSS_TOOLCHAIN}"
> M&= gt;  +.else
> M>  +.error CROSS_TOOLCHAIN = ${CROSS_TOOLCHAIN} not found
> M>  +.endif
<= /div>
> M>  +CROSSENV+=3DCROSS_TOOLCHAIN=3D"${CROSS_TOOLC= HAIN}"
> M>  +.elif defined(UNIVERSE_TOOLCHAIN)=
> M>  +UNIVERSE_TOOLCHAIN_PATH?=3D${HOST_OBJTO= P}/tmp/usr/bin
> M>  +XCC?=3D"${UNIVERSE_TOOLCH= AIN_PATH}/cc"
> M>  +XCXX?=3D"${UNIVERSE_TOOLCH= AIN_PATH}/c++"
> M>  +XCPP?=3D"${UNIVERSE_TOOLC= HAIN_PATH}/cpp"
> M>  +XLD?=3D"${UNIVERSE_TOOLC= HAIN_PATH}/ld"
> M>  +.endif
>= M>  +.if defined(CROSS_TOOLCHAIN_PREFIX)
> M&g= t;  +CROSS_COMPILER_PREFIX?=3D${CROSS_TOOLCHAIN_PREFIX}
> M>  +.endif
> M>  +
> M>  +XCOMPILERS=3D CC CXX CPP
> M>&n= bsp; +.for COMPILER in ${XCOMPILERS}
> M>  +.if= defined(CROSS_COMPILER_PREFIX)
> M>  +X${COMPI= LER}?=3D ${CROSS_COMPILER_PREFIX}${${COMPILER}}
> M>=   +.else
> M>  +X${COMPILER}?=3D ${${COMPI= LER}}
> M>  +.endif
> M>&nb= sp; +.endfor
> M>  +# If a full path to an exte= rnal cross compiler is given, don't build
> M> = +# a cross compiler.
> M>  +.if ${XCC:N${CCACH= E_BIN}:M/*}
> M>  +MK_CLANG_BOOTSTRAP=3D no
=
> M>  +# Make sure sub-makes see the option as dis= abled so the hack in bsd.sys.mk to
> M>  +# wor= k around incompatible headers in Clang's resource directory is enabled.<= br>
> M>  +.MAKEOVERRIDES+=3D MK_CLANG_BOOTSTRAP
> M>  +.endif
> M>  +
> M>  +# Pull in compiler metadata from buildworl= d/toolchain if possible to avoid
> M>  +# runni= ng CC from bsd.compiler.mk.
> M>  +.if make(ins= tallworld) || make(install) || make(distributeworld) || \
= > M>  +    make(stageworld)
>= M>  +.-include "${OBJTOP}/toolchain-metadata.mk"
= > M>  +.if !defined(_LOADED_TOOLCHAIN_METADATA)
> M>  +.error A build is required first.  You may have = the wrong MAKEOBJDIRPREFIX set.
> M>  +.endif
> M>  +.endif
> M>  +
> M>  +# Pull in COMPILER_TYPE and COMPILER_FREE= BSD_VERSION early. Pull it from the
> M>  +# tr= ee to be friendlier to foreign OS builds. It's safe to do so uncondition= ally
> M>  +# here since we will always have th= e right make, unlike in src/Makefile
> M>  +# D= on't include bsd.linker.mk yet until XBINUTILS is handled (after src.opt= s.mk)
> M>  +_NO_INCLUDE_LINKERMK=3D t
> M>  +# We also want the X_COMPILER* variables if we a= re using an external toolchain.
> M>  +_WANT_TO= OLCHAIN_CROSS_VARS=3D t
> M>  +.include "share/= mk/bsd.compiler.mk"
> M>  +.undef _NO_INCLUDE_L= INKERMK
> M>  +.undef _WANT_TOOLCHAIN_CROSS_VAR= S
> M>  +# src.opts.mk depends on COMPILER_FEAT= URES
> M>  +.include "share/mk/src.opts.mk"
=
> M>  +
> M>  +.if ${TARG= ET} =3D=3D ${MACHINE}
> M>  +TARGET_CPUTYPE?=3D= ${CPUTYPE}
> M>  +.else
> M>= ;  +TARGET_CPUTYPE?=3D
> M>  +.endif
> M>  +.if !empty(TARGET_CPUTYPE)
>= M>  +_TARGET_CPUTYPE=3D${TARGET_CPUTYPE}
> M&g= t;  +.else
> M>  +_TARGET_CPUTYPE=3Ddummy<= br>
> M>  +.endif
> M>  +.= if ${TARGET} =3D=3D "arm"
> M>  +.if ${TARGET_C= PUTYPE:M*soft*} =3D=3D ""
> M>  +TARGET_TRIPLE_= ABI=3D gnueabihf
> M>  +.else
>= ; M>  +TARGET_TRIPLE_ABI=3D gnueabi
> M>&nbs= p; +.endif
> M>  +.endif
> M&g= t;  +MACHINE_TRIPLE_ABI?=3D unknown
> M>  = +MACHINE_TRIPLE?=3D${MACHINE_ARCH:S/amd64/x86_64/}-${MACHINE_TRIPLE_ABI}= -freebsd${OS_REVISION}
> M>  +TARGET_TRIPLE_ABI= ?=3D unknown
> M>  +TARGET_TRIPLE?=3D ${TARGET_= ARCH:S/amd64/x86_64/}-${TARGET_TRIPLE_ABI}-freebsd${OS_REVISION}
> M>  +KNOWN_ARCHES?=3D aarch64/arm64 \
= > M>  + amd64 \
> M>  + armv6/arm = \
> M>  + armv7/arm \
> M>=   + i386 \
> M>  + powerpc \
> M>  + powerpc64/powerpc \
> M> = ; + powerpc64le/powerpc \
> M>  + powerpcspe/= powerpc \
> M>  + riscv64/riscv
= > M>  +
> M>  +.if ${TARGET} =3D=3D = ${TARGET_ARCH}
> M>  +_t=3D ${TARGET}
> M>  +.else
> M>  +_t=3D ${T= ARGET_ARCH}/${TARGET}
> M>  +.endif
> M>  +.for _t in ${_t}
> M>  +.i= f empty(KNOWN_ARCHES:M${_t})
> M>  +.error Unkn= own target ${TARGET_ARCH}:${TARGET}.
> M>  +.en= dif
> M>  +.endfor
> M>&nbs= p; +
> M>  +.if ${TARGET_ARCH} =3D=3D "amd64"
> M>  +LIBCOMPAT_INCLUDE_DIRS+=3D i386
=
> M>  +.elif ${TARGET_ARCH} =3D=3D "aarch64"
> M>  +LIBCOMPAT_INCLUDE_DIRS+=3D arm
> M= >  +.endif
> M>  +
> M= >  +.if ${.MAKE.OS} !=3D "FreeBSD"
> M> = ; +CROSSBUILD_HOST=3D${.MAKE.OS}
> M>  +.if ${.= MAKE.OS} !=3D "Linux" && ${.MAKE.OS} !=3D "Darwin"
> M>  +.warning Unsupported crossbuild system: ${.MAKE.OS}. = Build will probably fail!
> M>  +.endif
> M>  +# We need to force NO_ROOT/DB_FROM_SRC builds w= hen building on other operating
> M>  +# system= s since the BSD.foo.dist specs contain users and groups that do not
<= /div>
> M>  +# exist by default on a Linux/MacOS system.<= br>
> M>  +NO_ROOT:=3D 1
> M>&n= bsp; +DB_FROM_SRC:=3D 1
> M>  +.export NO_ROOT<= br>
> M>  +.endif
> M>  +<= br>
> M>  +# If all targets are disabled for system= llvm then don't expect it to work
> M>  +# for= cross-builds.
> M>  +.if !defined(TOOLS_PREFIX= ) && ${MK_LLVM_TARGET_ALL} =3D=3D "no" && \
> M>  +    ${MACHINE} !=3D ${TARGET} &&a= mp; ${MACHINE_ARCH} !=3D ${TARGET_ARCH} && \
> = M>  +    !make(showconfig)
> M&g= t;  +MK_SYSTEM_COMPILER=3D no
> M>  +MK_SY= STEM_LINKER=3D no
> M>  +.endif
&= gt; M>  +
> M>  +# Handle external binu= tils.
> M>  +.if defined(CROSS_TOOLCHAIN_PREFIX= )
> M>  +CROSS_BINUTILS_PREFIX?=3D${CROSS_TOOLC= HAIN_PREFIX}
> M>  +.endif
> M= >  +XBINUTILS=3D AS AR ELFCTL LD NM OBJCOPY RANLIB SIZE STRINGS = STRIPBIN
> M>  +.for BINUTIL in ${XBINUTILS}
> M>  +.if defined(CROSS_BINUTILS_PREFIX) &&a= mp; \
> M>  +    exists(${CROSS_= BINUTILS_PREFIX}/${${BINUTIL}})
> M>  +X${BINUT= IL}?=3D ${CROSS_BINUTILS_PREFIX:C,/*$,,}/${${BINUTIL}}
>= ; M>  +.else
> M>  +X${BINUTIL}?=3D ${$= {BINUTIL}}
> M>  +.endif
> M&g= t;  +.endfor
> M>  +
> M&= gt;  +# If a full path to an external linker is given, don't build = lld.
> M>  +.if ${XLD:M/*}
> M= >  +MK_LLD_BOOTSTRAP=3D no
> M>  +.endi= f
> M>  +
> M>  +# We = also want the X_LINKER* variables if we are using an external toolchain.=
> M>  +_WANT_TOOLCHAIN_CROSS_VARS=3D t
> M>  +.include "share/mk/bsd.linker.mk"
> M>  +.undef _WANT_TOOLCHAIN_CROSS_VARS
> = M>  +
> M>  +# Begin WITH_SYSTEM_COMPIL= ER / WITH_SYSTEM_LD
> M>  +
> = M>  +# WITH_SYSTEM_COMPILER - Pull in needed values and make a d= ecision.
> M>  +
> M> = +# Check if there is a local compiler that can satisfy as an external c= ompiler.
> M>  +# Which compiler is expected to= be used?
> M>  +.if ${MK_CLANG_BOOTSTRAP} =3D=3D= "yes"
> M>  +WANT_COMPILER_TYPE=3D clang
> M>  +.else
> M>  +WANT_CO= MPILER_TYPE=3D
> M>  +.endif
>= M>  +
> M>  +.if !defined(WANT_COMPILE= R_FREEBSD_VERSION) && !make(showconfig) && \
> M>  +    !make(test-system-linker)
> M>  +.if ${WANT_COMPILER_TYPE} =3D=3D "clang"
> M>  +WANT_COMPILER_FREEBSD_VERSION_FILE=3D lib/cla= ng/freebsd_cc_version.h
> M>  +WANT_COMPILER_FR= EEBSD_VERSION!=3D \
> M>  + awk '$$2 =3D=3D "FR= EEBSD_CC_VERSION" {printf("%d\n", $$3)}' \
> M> = ; + ${SRCDIR}/${WANT_COMPILER_FREEBSD_VERSION_FILE} || echo unknown
<= /div>
> M>  +WANT_COMPILER_VERSION_FILE=3D lib/clang/incl= ude/clang/Basic/Version.inc
> M>  +WANT_COMPILE= R_VERSION!=3D \
> M>  + awk '$$2 =3D=3D "CLANG_= VERSION" {split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \=
> M>  + ${SRCDIR}/${WANT_COMPILER_VERSION_FILE= } || echo unknown
> M>  +.endif
&= gt; M>  +.export WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_VER= SION
> M>  +.endif # !defined(WANT_COMPILER_FRE= EBSD_VERSION)
> M>  +
> M>&= nbsp; +# It needs to be the same revision as we would build for the boot= strap.
> M>  +# If the expected vs CC is differ= ent then we can't skip.
> M>  +# GCC cannot be = used for cross-arch yet.  For clang we pass -target later if
> M>  +# TARGET_ARCH!=3DMACHINE_ARCH.
&= gt; M>  +.if ${MK_SYSTEM_COMPILER} =3D=3D "yes" && \
=
> M>  +    defined(WANT_COMPILER_FR= EEBSD_VERSION) && \
> M>  +  =   ${MK_CLANG_BOOTSTRAP} =3D=3D "yes" && \
>= ; M>  +    !make(xdev*) && \
> M>  +    ${X_COMPILER_TYPE} =3D=3D ${WANT_= COMPILER_TYPE} && \
> M>  +  =   (${X_COMPILER_TYPE} =3D=3D "clang" || ${TARGET_ARCH} =3D=3D ${MAC= HINE_ARCH}) && \
> M>  +  &nb= sp; ${X_COMPILER_VERSION} =3D=3D ${WANT_COMPILER_VERSION} && \
> M>  +    ${X_COMPILER_FREEBSD_V= ERSION} =3D=3D ${WANT_COMPILER_FREEBSD_VERSION}
> M>=   +# Everything matches, disable the bootstrap compiler.
<= div>> M>  +MK_CLANG_BOOTSTRAP=3D no
> M>&= nbsp; +USING_SYSTEM_COMPILER=3D yes
> M>  +.end= if # ${WANT_COMPILER_TYPE} =3D=3D ${COMPILER_TYPE}
> M&= gt;  +
> M>  +# WITH_SYSTEM_LD - Pull in n= eeded values and make a decision.
> M>  +
> M>  +# Check if there is a local linker that can s= atisfy as an external linker.
> M>  +# Which li= nker is expected to be used?
> M>  +.if ${MK_LL= D_BOOTSTRAP} =3D=3D "yes"
> M>  +WANT_LINKER_TY= PE=3D lld
> M>  +.else
> M>= ;  +WANT_LINKER_TYPE=3D
> M>  +.endif
<= /div>
> M>  +
> M>  +.if !define= d(WANT_LINKER_FREEBSD_VERSION) && !make(showconfig) && \=
> M>  +    !make(test-system-co= mpiler)
> M>  +.if ${WANT_LINKER_TYPE} =3D=3D "= lld"
> M>  +WANT_LINKER_FREEBSD_VERSION_FILE=3D= lib/clang/include/lld/Common/Version.inc
> M> = +WANT_LINKER_FREEBSD_VERSION!=3D \
> M>  + awk= '$$2 =3D=3D "LLD_FREEBSD_VERSION" {print $$3}' \
> M&g= t;  + ${SRCDIR}/${WANT_LINKER_FREEBSD_VERSION_FILE} || echo unknown=
> M>  +WANT_LINKER_VERSION_FILE=3D lib/clang/i= nclude/lld/Common/Version.inc
> M>  +WANT_LINKE= R_VERSION!=3D \
> M>  + awk '$$2 =3D=3D "LLD_VE= RSION_STRING" {gsub("\"", "", $$3); split($$3, a, "."); print a[1] * 100= 00 + a[2] * 100 + a[3]}' \
> M>  + ${SRCDIR}/${= WANT_LINKER_VERSION_FILE} || echo unknown
> M> = +.else
> M>  +WANT_LINKER_FREEBSD_VERSION_FILE= =3D
> M>  +WANT_LINKER_FREEBSD_VERSION=3D
> M>  +.endif
> M>  +.expor= t WANT_LINKER_FREEBSD_VERSION WANT_LINKER_VERSION
> M&g= t;  +.endif # !defined(WANT_LINKER_FREEBSD_VERSION)
&= gt; M>  +
> M>  +.if ${MK_SYSTEM_LINKER= } =3D=3D "yes" && \
> M>  +  =   defined(WANT_LINKER_FREEBSD_VERSION) && \
&= gt; M>  +    (${MK_LLD_BOOTSTRAP} =3D=3D "yes") &= amp;& \
> M>  +    !make(xde= v*) && \
> M>  +    ${X_= LINKER_TYPE} =3D=3D ${WANT_LINKER_TYPE} && \
> = M>  +    ${X_LINKER_VERSION} =3D=3D ${WANT_LINKER= _VERSION} && \
> M>  +   = ; ${X_LINKER_FREEBSD_VERSION} =3D=3D ${WANT_LINKER_FREEBSD_VERSION}
<= /div>
> M>  +# Everything matches, disable the bootstrap = linker.
> M>  +MK_LLD_BOOTSTRAP=3D no
=
> M>  +USING_SYSTEM_LINKER=3D yes
> M&g= t;  +.endif # ${WANT_LINKER_TYPE} =3D=3D ${LINKER_TYPE}
> M>  +
> M>  +# WITH_SYSTEM_COMP= ILER / WITH_SYSTEM_LINKER - Handle defaults and debug.
>= ; M>  +USING_SYSTEM_COMPILER?=3D no
> M>&nbs= p; +USING_SYSTEM_LINKER?=3D no
> M>  +
> M>  +TEST_SYSTEM_COMPILER_VARS=3D \
>= ; M>  + USING_SYSTEM_COMPILER MK_SYSTEM_COMPILER \
> M>  + MK_CROSS_COMPILER MK_CLANG_BOOTSTRAP \
> M>  + WANT_COMPILER_TYPE WANT_COMPILER_VERSION WANT_COMPIL= ER_VERSION_FILE \
> M>  + WANT_COMPILER_FREEBSD= _VERSION WANT_COMPILER_FREEBSD_VERSION_FILE \
> M>&n= bsp; + CC COMPILER_TYPE COMPILER_FEATURES COMPILER_VERSION \
> M>  + COMPILER_FREEBSD_VERSION \
> M>= ;  + XCC X_COMPILER_TYPE X_COMPILER_FEATURES X_COMPILER_VERSION \
> M>  + X_COMPILER_FREEBSD_VERSION
> M>  +TEST_SYSTEM_LINKER_VARS=3D \
> M>=   + USING_SYSTEM_LINKER MK_SYSTEM_LINKER \
> M>=   + MK_LLD_BOOTSTRAP \
> M>  + WANT_LINKER= _TYPE WANT_LINKER_VERSION WANT_LINKER_VERSION_FILE \
> = M>  + WANT_LINKER_FREEBSD_VERSION WANT_LINKER_FREEBSD_VERSION_FI= LE \
> M>  + LD LINKER_TYPE LINKER_FEATURES LIN= KER_VERSION \
> M>  + LINKER_FREEBSD_VERSION \<= br>
> M>  + XLD X_LINKER_TYPE X_LINKER_FEATURES X_L= INKER_VERSION \
> M>  + X_LINKER_FREEBSD_VERSIO= N
> M>  +
> M>  +.for = _t in compiler linker
> M>  +test-system-${_t}:= .PHONY
> M>  +.for v in ${TEST_SYSTEM_${_t:tu}= _VARS}
> M>  + ${_+_}@printf "%-35s=3D %s\n" "$= {v}" "${${v}}"
> M>  +.endfor
>= ; M>  +.endfor
> M>  +.if (make(buildwo= rld) || make(buildkernel) || make(kernel-toolchain) || \
&= gt; M>  +    make(toolchain) || make(_cross-tools= ))
> M>  +.if ${USING_SYSTEM_COMPILER} =3D=3D "= yes"
> M>  +.info SYSTEM_COMPILER: Determined t= hat CC=3D${CC} matches the source tree.  Not bootstrapping a cross-= compiler.
> M>  +.elif ${MK_CLANG_BOOTSTRAP} =3D= =3D "yes"
> M>  +.info SYSTEM_COMPILER: libclan= g will be built for bootstrapping a cross-compiler.
> M= >  +.endif
> M>  +.if ${USING_SYSTEM_LI= NKER} =3D=3D "yes"
> M>  +.info SYSTEM_LINKER: = Determined that LD=3D${LD} matches the source tree.  Not bootstrapp= ing a cross-linker.
> M>  +.elif ${MK_LLD_BOOTS= TRAP} =3D=3D "yes"
> M>  +.info SYSTEM_LINKER: = libclang will be built for bootstrapping a cross-linker.
&= gt; M>  +.endif
> M>  +.endif
=
> M>  +
> M>  +# End WITH_SYSTE= M_COMPILER / WITH_SYSTEM_LD
> M>  +
> M>  +# Store some compiler metadata for use in installwo= rld where we don't
> M>  +# want to invoke CC a= t all.
> M>  +_TOOLCHAIN_METADATA_VARS=3D COMPI= LER_VERSION \
> M>  + COMPILER_TYPE \
> M>  + COMPILER_FEATURES \
> M&g= t;  + COMPILER_FREEBSD_VERSION \
> M>  = + COMPILER_RESOURCE_DIR \
> M>  + LINKER_= VERSION \
> M>  + LINKER_FEATURES \
> M>  + LINKER_TYPE \
> M> = + LINKER_FREEBSD_VERSION
> M>  +toolchain-m= etadata.mk: .PHONY .META
> M>  + @: > ${.TAR= GET}
> M>  + @echo ".info Using cached toolchai= n metadata from build at $$(hostname) on $$(date)" \
> = M>  +     > ${.TARGET}
> M>= ;  + @echo "_LOADED_TOOLCHAIN_METADATA=3Dt" >> ${.TARGET}
=
> M>  +.for v in ${_TOOLCHAIN_METADATA_VARS}
> M>  + @echo "${v}=3D${${v}}" >> ${.TARGET}
> M>  + @echo "X_${v}=3D${X_${v}}" >> ${.T= ARGET}
> M>  +.endfor
> M>&= nbsp; + @echo ".export ${_TOOLCHAIN_METADATA_VARS}" >> ${.TARGET}<= br>
> M>  + @echo ".export ${_TOOLCHAIN_METADATA_VA= RS:C,^,X_,}" >> ${.TARGET}
> M>  +
> M>  +
> M>  +# We must do = lib/ and libexec/ before bin/ in case of a mid-install error to
> M>  +# keep the users system reasonably usable. = For static->dynamic root upgrades,
> M>  +#= we don't want to install a dynamic binary without rtld and the needed
> M>  +# libraries.  More commonly, for dyn= amic root, we don't want to install a
> M>  +# = binary that requires a newer library version that hasn't been installed = yet.
> M>  +# This ordering is not a guarantee = though.  The only guarantee of a working
> M>&n= bsp; +# system here would require fine-grained ordering of all component= s based
> M>  +# on their dependencies.
> M>  +.if !empty(SUBDIR_OVERRIDE)
> = M>  +SUBDIR=3D ${SUBDIR_OVERRIDE}
> M> = +.else
> M>  +SUBDIR=3D lib libexec
<= div>> M>  +# Add LOCAL_LIB_DIRS, but only if they will not be= picked up as a SUBDIR
> M>  +# of a LOCAL_DIRS= directory.  This allows LOCAL_DIRS=3Dfoo and
> M&= gt;  +# LOCAL_LIB_DIRS=3Dfoo/lib to behave as expected.
> M>  +.for _DIR in ${LOCAL_DIRS:M*/} ${LOCAL_DIRS:N*/:S|$= |/|}
> M>  +_REDUNDANT_LIB_DIRS+=3D  =   ${LOCAL_LIB_DIRS:M${_DIR}*}
> M>  +.endf= or
> M>  +.for _DIR in ${LOCAL_LIB_DIRS}
> M>  +.if ${_DIR} =3D=3D ".WAIT" || (empty(_REDUNDAN= T_LIB_DIRS:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile))
=
> M>  +SUBDIR+=3D ${_DIR}
> M>=   +.endif
> M>  +.endfor
>= ; M>  +.if !defined(NO_ROOT) && (make(installworld) || m= ake(install))
> M>  +# Ensure libraries are ins= talled before progressing.
> M>  +SUBDIR+=3D.WA= IT
> M>  +.endif
> M> = +SUBDIR+=3Dbin
> M>  +.if ${MK_CDDL} !=3D "no"=
> M>  +SUBDIR+=3Dcddl
> M>=   +.endif
> M>  +SUBDIR+=3Dgnu include
=
> M>  +.if ${MK_KERBEROS} !=3D "no"
= > M>  +SUBDIR+=3Dkerberos5
> M>  +.e= ndif
> M>  +.if ${MK_RESCUE} !=3D "no"
> M>  +SUBDIR+=3Drescue
> M>  = +.endif
> M>  +SUBDIR+=3Dsbin
>= ; M>  +.if ${MK_CRYPT} !=3D "no"
> M>  = +SUBDIR+=3Dsecure
> M>  +.endif
&= gt; M>  +.if !defined(NO_SHARE)
> M>  += SUBDIR+=3Dshare
> M>  +.endif
>= ; M>  +.if ${MK_BOOT} !=3D "no"
> M>  += SUBDIR+=3Dstand
> M>  +.endif
>= ; M>  +SUBDIR+=3Dsys usr.bin usr.sbin
> M>&n= bsp; +.if ${MK_TESTS} !=3D "no"
> M>  +SUBDIR+=3D= tests
> M>  +.endif
> M>&n= bsp; +
> M>  +# Local directories are built in = parallel with the base system directories.
> M> = ; +# Users may insert a .WAIT directive at the beginning or elsewhere wi= thin
> M>  +# the LOCAL_DIRS and LOCAL_LIB_DIRS= lists as needed.
> M>  +.for _DIR in ${LOCAL_D= IRS}
> M>  +.if ${_DIR} =3D=3D ".WAIT" || exist= s(${.CURDIR}/${_DIR}/Makefile)
> M>  +SUBDIR+=3D= ${_DIR}
> M>  +.endif
> M>=   +.endfor
> M>  +
> M>= ;  +# We must do etc/ last as it hooks into building the man whatis= file
> M>  +# by calling 'makedb' in share/man= .  This is only relevant for
> M>  +# inst= all/distribute so they build the whatis file after every manpage is
<= /div>
> M>  +# installed.
> M>  = +.if make(installworld) || make(install)
> M>  = +SUBDIR+=3D.WAIT
> M>  +.endif
&g= t; M>  +SUBDIR+=3Detc
> M>  +
=
> M>  +.endif # !empty(SUBDIR_OVERRIDE)
&g= t; M>  +
> M>  +.if defined(NOCLEAN)
> M>  +.warning The src.conf WITHOUT_CLEAN option= can now be used instead of NOCLEAN.
> M>  +MK_= CLEAN:=3D no
> M>  +.endif
> M= >  +.if defined(NO_CLEAN)
> M>  +.info = The src.conf WITHOUT_CLEAN option can now be used instead of NO_CLEAN.
> M>  +MK_CLEAN:=3D no
> M>&= nbsp; +.endif
> M>  +.if defined(NO_CLEANDIR)
> M>  +CLEANDIR=3D clean cleandepend
> M>  +.else
> M>  +CLEANDIR=3D c= leandir
> M>  +.endif
> M>&= nbsp; +
> M>  +.if defined(WORLDFAST)
=
> M>  +MK_CLEAN:=3D no
> M>  +N= O_OBJWALK=3D t
> M>  +.endif
>= M>  +
> M>  +.if ${MK_META_MODE} =3D=3D= "yes"
> M>  +# If filemon is used then we can = rely on the build being incremental-safe.
> M> = +# The .meta files will also track the build command and rebuild should=
> M>  +# it change.
> M>&n= bsp; +.if empty(.MAKE.MODE:Mnofilemon)
> M>  +M= K_CLEAN:=3D no
> M>  +.endif
>= M>  +.endif
> M>  +.if defined(NO_OBJW= ALK) || ${MK_AUTO_OBJ} =3D=3D "yes"
> M>  +NO_O= BJWALK=3D t
> M>  +NO_KERNELOBJ=3D t
<= div>> M>  +.endif
> M>  +.if !define= d(NO_OBJWALK)
> M>  +_obj=3D obj
> M>  +.endif
> M>  +
> M>  +LOCAL_TOOL_DIRS?=3D
> M>  +P= ACKAGEDIR?=3D ${DESTDIR}/${DISTDIR}
> M>  +
=
> M>  +.if empty(SHELL:M*csh*)
> = M>  +BUILDENV_SHELL?=3D${SHELL}
> M>  += .else
> M>  +BUILDENV_SHELL?=3D/bin/sh
> M>  +.endif
> M>  +
> M>  +.if !defined(_MKSHOWCONFIG)
> M= >  +.if !defined(VCS_REVISION) || empty(VCS_REVISION)
<= div>> M>  +.if !defined(SVNVERSION_CMD) || empty(SVNVERSION_C= MD)
> M>  +. for _D in ${PATH:S,:, ,g}
> M>  +.  if exists(${_D}/svnversion)
> M>  +SVNVERSION_CMD?=3D${_D}/svnversion
>= ; M>  +.  endif
> M>  +.  if = exists(${_D}/svnliteversion)
> M>  +SVNVERSION_= CMD?=3D${_D}/svnliteversion
> M>  +.  endi= f
> M>  +. endfor
> M> = ; +.endif
> M>  +.if defined(SVNVERSION_CMD) &a= mp;& !empty(SVNVERSION_CMD)
> M>  +_VCS_REV= ISION?=3D $$(eval ${SVNVERSION_CMD} ${SRCDIR})
> M>&= nbsp; +. if !empty(_VCS_REVISION)
> M>  +VCS_RE= VISION=3D $$(echo r${_VCS_REVISION})
> M>  +.ex= port VCS_REVISION
> M>  +. endif
= > M>  +.endif
> M>  +.endif
> M>  +
> M>  +.if !defined(GI= T_CMD) || empty(GIT_CMD)
> M>  +. for _P in /us= r/bin /usr/local/bin
> M>  +.  if exists($= {_P}/git)
> M>  +GIT_CMD=3D   ${_P}/g= it
> M>  +.  endif
> M>= ;  +. endfor
> M>  +.export GIT_CMD
> M>  +.endif
> M>  +
> M>  +.if !defined(OSRELDATE)
> M&g= t;  +.if exists(/usr/include/osreldate.h)
> M>&= nbsp; +OSRELDATE!=3D awk '/^\#define[[:space:]]*__FreeBSD_version/ { pri= nt $$3 }' \
> M>  + /usr/include/osreldate.h
> M>  +.else
> M>  +OSR= ELDATE=3D 0
> M>  +.endif
> M&= gt;  +.export OSRELDATE
> M>  +.endif
<= /div>
> M>  +
> M>  +# Set VERSI= ON for CTFMERGE to use via the default CTFFLAGS=3D-L VERSION.
<= div>> M>  +.for _V in BRANCH REVISION TYPE
>= M>  +.if !defined(_${_V})
> M>  +_${_V= }!=3D eval $$(awk '/^${_V}=3D/{print}' ${SRCTOP}/sys/conf/newvers.sh); e= cho $$${_V}
> M>  +.export _${_V}
> M>  +.endif
> M>  +.endfor
> M>  +.if !defined(SRCRELDATE)
> M&= gt;  +SRCRELDATE!=3D awk '/^\#define[[:space:]]*__FreeBSD_version/ = { print $$3 }' \
> M>  + ${SRCDIR}/sys/sys/par= am.h
> M>  +.export SRCRELDATE
&g= t; M>  +.endif
> M>  +.if !defined(VERS= ION)
> M>  +VERSION=3D FreeBSD ${_REVISION}-${_= BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE}
> M&= gt;  +.export VERSION
> M>  +.endif
> M>  +MAJOR_REVISION=3D ${_REVISION:R}
> M>  +
> M>  +.if !defined(PKG_VER= SION)
> M>  +_STRTIMENOW=3D %Y%m%d%H%M%S
> M>  +_TIMENOW=3D ${_STRTIMENOW:gmtime}
> M>  +.if ${_BRANCH:MCURRENT*} || ${_BRANCH:MSTABLE*} || $= {_BRANCH:MPRERELEASE*}
> M>  +EXTRA_REVISION=3D= .snap${_TIMENOW}
> M>  +.elif ${_BRANCH:MALPHA= *}
> M>  +EXTRA_REVISION=3D .a${_BRANCH:C/ALPHA= ([0-9]+).*/\1/}.${_TIMENOW}
> M>  +.elif ${_BRA= NCH:MBETA*}
> M>  +EXTRA_REVISION=3D .b${_BRANC= H:C/BETA([0-9]+).*/\1/}.${_TIMENOW}
> M>  +.eli= f ${_BRANCH:MRC*}
> M>  +EXTRA_REVISION=3D .rc$= {_BRANCH:C/RC([0-9]+).*/\1/}.${_TIMENOW}
> M>  = +.elif ${_BRANCH:M*-p*}
> M>  +EXTRA_REVISION=3D= p${_BRANCH:C/.*-p([0-9]+$)/\1/}
> M>  +.endif<= br>
> M>  +PKG_VERSION:=3D ${MAJOR_REVISION}${EXTRA= _REVISION:C/[[:space:]]//g}
> M>  +.endif
> M>  +.endif # !defined(PKG_VERSION)
= > M>  +
> M>  +.if !defined(PKG_TIME= STAMP)
> M>  +TIMEEPOCHNOW=3D %s
> M>  +SOURCE_DATE_EPOCH=3D ${TIMEEPOCHNOW:gmtime}
=
> M>  +.else
> M>  +SOURCE_DATE= _EPOCH=3D ${PKG_TIMESTAMP}
> M>  +.endif
> M>  +
> M>  +PKG_NAME_PREF= IX?=3D FreeBSD
> M>  +PKG_MAINTAINER?=3D re@FreeBSD.org
> M>&= nbsp; +PKG_WWW?=3D https://www.FreeB= SD.org
> M>  +.export PKG_NAME_PREFIX
> M>  +.export PKG_MAINTAINER
> M&g= t;  +.export PKG_WWW
> M>  +
> M>  +.if !defined(_MKSHOWCONFIG)
> M>&= nbsp; +_CPUTYPE!=3D MAKEFLAGS=3D CPUTYPE=3D${_TARGET_CPUTYPE} ${MAKE} -f= /dev/null \
> M>  + -m ${.CURDIR}/share/mk MK= _AUTO_OBJ=3Dno -V CPUTYPE
> M>  +.if ${_CPUTYPE= } !=3D ${_TARGET_CPUTYPE}
> M>  +.error CPUTYPE= global should be set with ?=3D.
> M>  +.endif<= br>
> M>  +.endif
> M>  +.= if make(buildworld)
> M>  +BUILD_ARCH!=3D uname= -p
> M>  +# On some Linux systems uname -p ret= urns "unknown" so skip this check there.
> M>  = +# This check only exists to tell people to use TARGET_ARCH instead of
> M>  +# MACHINE_ARCH so skipping it when crossb= uilding on non-FreeBSD should be fine.
> M>  +.= if ${MACHINE_ARCH} !=3D ${BUILD_ARCH} && ${.MAKE.OS} =3D=3D "Fre= eBSD"
> M>  +.error To cross-build, set TARGET_= ARCH.
> M>  +.endif
> M>&nb= sp; +.endif
> M>  +WORLDTMP?=3D ${OBJTOP}/tmp
> M>  +BPATH=3D ${CCACHE_WRAPPER_PATH_PFX}${WOR= LDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin= :${WORLDTMP}/legacy/usr/libexec
> M>  +XPATH=3D= ${WORLDTMP}/bin:${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin
> M>  +
> M>  +# When building we w= ant to find the cross tools before the host tools in ${BPATH}.
=
> M>  +# We also need to add UNIVERSE_TOOLCHAIN_PATH so = that we can find the shared
> M>  +# toolchain = files (clang, lld, etc.) during make universe/tinderbox
&g= t; M>  +STRICTTMPPATH=3D ${XPATH}:${BPATH}:${UNIVERSE_TOOLCHAIN_= PATH}
> M>  +# We should not be using tools fro= m /usr/bin accidentally since this could cause
> M>&= nbsp; +# the build to break on other systems that don't have that tool. = For now we
> M>  +# still allow using the old b= ehaviour (inheriting $PATH) if
> M>  +# BUILD_W= ITH_STRICT_TMPPATH is set to 0 but this will eventually be removed.
<= /div>
> M>  +
> M>  +# Currently= strict $PATH can cause build failures. Once the remaining issues
> M>  +# have been resolved it will be turned on by d= efault.
> M>  +BUILD_WITH_STRICT_TMPPATH?=3D0
> M>  +.if defined(CROSSBUILD_HOST)
> M>  +# When building on non-FreeBSD we can't rely on the = tools in /usr/bin being compatible
> M>  +# wit= h what FreeBSD expects. Therefore we only use tools from STRICTTMPPATH
> M>  +# during the world build stage. We build = most tools during the bootstrap-tools
> M>  +# = phase but symlink host tools that are known to work instead of building = them
> M>  +BUILD_WITH_STRICT_TMPPATH:=3D1
<= /div>
> M>  +.endif
> M>  +.if $= {BUILD_WITH_STRICT_TMPPATH} !=3D 0
> M>  +TMPPA= TH=3D ${STRICTTMPPATH}
> M>  +.else
> M>  +TMPPATH=3D ${STRICTTMPPATH}:${PATH}
&= gt; M>  +.endif
> M>  +
&= gt; M>  +#
> M>  +# Avoid running mktem= p(1) unless actually needed.
> M>  +# It may no= t be functional, e.g., due to new ABI
> M>  +# = when in the middle of installing over this system.
> M&= gt;  +#
> M>  +.if make(distributeworld) |= | make(installworld) || make(stageworld)
> M>  = +.if ${BUILD_WITH_STRICT_TMPPATH} !=3D 0
> M>  = +MKTEMP=3D${WORLDTMP}/legacy/usr/bin/mktemp
> M>&nbs= p; +.if !exists(${MKTEMP})
> M>  +.error mktemp= binary doesn't exist in expected location: ${MKTEMP}
>= M>  +.endif
> M>  +.else
> M>  +MKTEMP=3Dmktemp
> M>  +.endi= f
> M>  +INSTALLTMP!=3D ${MKTEMP} -d -u -t inst= all
> M>  +
> M>  +.if= ${.MAKE.OS} =3D=3D "FreeBSD"
> M>  +# When bui= lding on FreeBSD we always copy the host tools instead of linking
> M>  +# into INSTALLTMP to avoid issues with incompa= tible libraries (see r364030).
> M>  +# Note: w= e could create links if we don't intend to update the current machine.
> M>  +INSTALLTMP_COPY_HOST_TOOL=3Dcp
<= div>> M>  +.else
> M>  +# However, t= his is not necessary on Linux/macOS. Additionally, copying the host
<= /div>
> M>  +# tools to another directory with cp results= in AMFI Launch Constraint
> M>  +# Violations = on macOS Ventura as part of its System Integrity Protection.
> M>  +INSTALLTMP_COPY_HOST_TOOL=3Dln -s
>= ; M>  +.endif
> M>  +.endif
> M>  +
> M>  +.if make(stagekern= el) || make(distributekernel)
> M>  +TAGS+=3D = kernel
> M>  +PACKAGE=3D kernel
&= gt; M>  +.endif
> M>  +
&= gt; M>  +#
> M>  +# Building a world go= es through the following stages
> M>  +#
> M>  +# 1. legacy stage [BMAKE]
> M= >  +# This stage is responsible for creating compatibility
> M>  +# shims that are needed by the bootstrap-tool= s,
> M>  +# build-tools and cross-tools stages.= These are generally
> M>  +# APIs that tools f= rom one of those three stages need to
> M>  +# = build that aren't present on the host.
> M>  +#= 1. bootstrap-tools stage [BMAKE]
> M>  +# This= stage is responsible for creating programs that
> M>= ;  +# are needed for backward compatibility reasons. They
=
> M>  +# are not built as cross-tools.
>= ; M>  +# 2. build-tools stage [TMAKE]
> M>&n= bsp; +# This stage is responsible for creating the object
= > M>  +# tree and building any tools that are needed during
> M>  +# the build process. Some programs are li= sted during
> M>  +# this phase because they bu= ild binaries to generate
> M>  +# files needed = to build these programs. This stage also
> M>  = +# builds the 'build-tools' target rather than 'all'.
>= M>  +# 3. cross-tools stage [XMAKE]
> M>&nb= sp; +# This stage is responsible for creating any tools that
> M>  +# are needed for building the system. A cross-compi= ler is one
> M>  +# of them. This differs from = build tools in two ways:
> M>  +# 1. the 'all' = target is built rather than 'build-tools'
> M> = +# 2. these tools are installed into TMPPATH for stage 4.
> M>  +# 4. world stage [WMAKE]
> M>&nbs= p; +# This stage actually builds the world.
> M>&nbs= p; +# 5. install stage (optional) [IMAKE]
> M> = +# This stage installs a previously built world.
> M&g= t;  +#
> M>  +
> M>&nb= sp; +BOOTSTRAPPING?=3D 0
> M>  +# Keep these in= sync
> M>  +MINIMUM_SUPPORTED_OSREL?=3D 110400= 1
> M>  +MINIMUM_SUPPORTED_REL?=3D 11.4
> M>  +
> M>  +# Common envir= onment for world related stages
> M>  +CROSSENV= +=3D \
> M>  + MACHINE_ARCH=3D${TARGET_ARCH} \=
> M>  + MACHINE=3D${TARGET} \
&= gt; M>  + CPUTYPE=3D${TARGET_CPUTYPE}
> M>&= nbsp; +.if ${MK_META_MODE} !=3D "no"
> M>  +# D= on't rebuild build-tools targets during normal build.
>= M>  +CROSSENV+=3D BUILD_TOOLS_META=3D.NOMETA
>= M>  +.endif
> M>  +.if defined(TARGET_= CFLAGS)
> M>  +CROSSENV+=3D ${TARGET_CFLAGS}
> M>  +.endif
> M>  +.if= (${TARGET} !=3D ${MACHINE} && !defined(WITH_LOCAL_MODULES)) || = \
> M>  +    defined(WITHOUT_LOC= AL_MODULES)
> M>  +CROSSENV+=3D LOCAL_MODULES=3D=
> M>  +.endif
> M>  +=
> M>  +BOOTSTRAPPING_OSRELDATE?=3D${OSRELDATE}=
> M>  +
> M>  +# boot= strap-tools stage
> M>  +BMAKEENV=3D INSTALL=3D= "sh ${.CURDIR}/tools/install.sh" \
> M>  + TOO= LS_PREFIX=3D${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \
> M>= ;  + PATH=3D${BPATH:Q}:${PATH:Q} \
> M>  = + WORLDTMP=3D${WORLDTMP} \
> M>  + MAKEFLAGS=3D= "-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}"
> M>&nb= sp; +# need to keep this in sync with targets/pseudo/bootstrap-tools/Mak= efile
> M>  +BSARGS=3D DESTDIR=3D \
<= div>> M>  + OBJTOP=3D'${WORLDTMP}/obj-tools' \
> M>  + OBJROOT=3D'$${OBJTOP}/' \
> M>&= nbsp; + UNIVERSE_TOOLCHAIN_PATH=3D${UNIVERSE_TOOLCHAIN_PATH} \
> M>  + MAKEOBJDIRPREFIX=3D \
> M>=   + BOOTSTRAPPING=3D${BOOTSTRAPPING_OSRELDATE} \
>= ; M>  + BWPHASE=3D${.TARGET:C,^_,,} \
> M>&= nbsp; + -DNO_CPU_CFLAGS \
> M>  + -DNO_LINT \=
> M>  + -DNO_PIC \
> M>&n= bsp; + -DNO_SHARED \
> M>  + MK_ASAN=3Dno \
> M>  + MK_CTF=3Dno \
> M>&= nbsp; + MK_CLANG_EXTRAS=3Dno \
> M>  + MK_CLA= NG_FORMAT=3Dno \
> M>  + MK_CLANG_FULL=3Dno \<= br>
> M>  + MK_HTML=3Dno \
> M>= ;  + MK_MAN=3Dno \
> M>  + MK_PROFILE=3D= no \
> M>  + MK_RETPOLINE=3Dno \
> M>  + MK_SSP=3Dno \
> M>  + MK_= TESTS=3Dno \
> M>  + MK_UBSAN=3Dno \
=
> M>  + MK_WERROR=3Dno \
> M> = + MK_INCLUDES=3Dyes \
> M>  + MK_MAN_UTILS=3D= yes
> M>  +
> M>  +BMA= KE=3D \
> M>  + ${TIME_ENV} ${BMAKEENV} ${MAK= E} ${WORLD_FLAGS} -f Makefile.inc1 \
> M>  + $= {BSARGS}
> M>  +.if empty(.MAKEOVERRIDES:MMK_LL= VM_TARGET_ALL)
> M>  +BMAKE+=3D MK_LLVM_TARGET= _ALL=3Dno
> M>  +.endif
> M>= ;  +
> M>  +# build-tools stage
<= div>> M>  +TMAKE=3D \
> M>  + ${TI= ME_ENV} ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \
<= div>> M>  + TARGET=3D${TARGET} TARGET_ARCH=3D${TARGET_ARCH} = \
> M>  + DESTDIR=3D \
> M>= ;  + BOOTSTRAPPING=3D${BOOTSTRAPPING_OSRELDATE} \
&g= t; M>  + BWPHASE=3D${.TARGET:C,^_,,} \
> M>=   + -DNO_CPU_CFLAGS \
> M>  + -DNO_LINT = \
> M>  + MK_ASAN=3Dno \
> M&= gt;  + MK_CTF=3Dno \
> M>  + MK_CLANG_EX= TRAS=3Dno \
> M>  + MK_CLANG_FORMAT=3Dno \
=
> M>  + MK_CLANG_FULL=3Dno \
> M= >  + MK_LLDB=3Dno \
> M>  + MK_RETPOL= INE=3Dno \
> M>  + MK_SSP=3Dno \
> M>  + MK_TESTS=3Dno \
> M>  + M= K_UBSAN=3Dno \
> M>  + MK_WERROR=3Dno
> M>  +
> M>  +# cross-tools s= tage
> M>  +# TOOLS_PREFIX set in BMAKE
> M>  +XMAKE=3D ${BMAKE} \
> M>&n= bsp; + TARGET=3D${TARGET} TARGET_ARCH=3D${TARGET_ARCH} \
= > M>  + MK_LLDB=3Dno \
> M>  + MK_= LLVM_BINUTILS=3Dno \
> M>  + MK_TESTS=3Dno
=
> M>  +
> M>  +# kernel-t= ools stage
> M>  +KTMAKEENV=3D INSTALL=3D"sh ${= .CURDIR}/tools/install.sh" \
> M>  + PATH=3D${= BPATH:Q}:${PATH:Q} \
> M>  + WORLDTMP=3D${WORL= DTMP} \
> M>  + MAKEFLAGS=3D"-m ${.CURDIR}/too= ls/build/mk ${.MAKEFLAGS}"
> M>  +
> M>  +KTMAKE=3D ${TIME_ENV} \
> M>&nb= sp; + TOOLS_PREFIX=3D${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \
> M>  + ${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc= 1 \
> M>  + DESTDIR=3D \
> M&= gt;  + OBJTOP=3D'${WORLDTMP}/obj-kernel-tools' \
>= ; M>  + OBJROOT=3D'$${OBJTOP}/' \
> M> = ; + UNIVERSE_TOOLCHAIN_PATH=3D${UNIVERSE_TOOLCHAIN_PATH} \
> M>  + MAKEOBJDIRPREFIX=3D \
> M>&nbs= p; + BOOTSTRAPPING=3D${BOOTSTRAPPING_OSRELDATE} \
> M&= gt;  + -DNO_CPU_CFLAGS \
> M>  + -DNO_LI= NT \
> M>  + -DNO_PIC \
> M&g= t;  + -DNO_SHARED \
> M>  + MK_CTF=3Dno = \
> M>  + MK_HTML=3Dno \
> M&= gt;  + MK_MAN=3Dno \
> M>  + MK_PROFILE=3D= no \
> M>  + MK_SSP=3Dno \
> = M>  + MK_RETPOLINE=3Dno \
> M>  + MK_= WERROR=3Dno
> M>  +
> M>&nb= sp; +# world stage
> M>  +WMAKEENV=3D ${CROSSEN= V} \
> M>  + INSTALL=3D"${INSTALL_CMD} -U" \
> M>  + PATH=3D${TMPPATH:Q} \
>= ; M>  + SYSROOT=3D${WORLDTMP}
> M>  +<= br>
> M>  +# make hierarchy
> M>= ; *** 5431 LINES SKIPPED ***


=
-- 
Alexander Motin


--06e1cace14e44ba6b615e2ddd8eabb7c-- From nobody Thu Aug 31 16:50:19 2023 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 4Rc6cJ6jRwz4rMt1; Thu, 31 Aug 2023 16:50:56 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yw1-x112e.google.com (mail-yw1-x112e.google.com [IPv6:2607:f8b0:4864:20::112e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rc6cJ4WhYz4PrJ; Thu, 31 Aug 2023 16:50:56 +0000 (UTC) (envelope-from mavbsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-58fae4a5285so12214017b3.0; Thu, 31 Aug 2023 09:50:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693500655; x=1694105455; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :from:to:cc:subject:date:message-id:reply-to; bh=hPWIbPEOOm59r0FCudD+AHyX6x6YMDZgphrVpsUlGXA=; b=Weq9sJd56wZ6nkyiqbzmXmWfwV/loZugEXyL8wJzfpHRQ4Q4wHurQXRulFWQwy3l3Z TY+RTzyWMnPZnaFE6dC0cUjK6BDSqb4ErAxeRj4ZKibYSw/ZQCyGbFVzo0LdjW91YBsE foZdS44ZOxvEcxSk5k0rRinaG/O49eAtmab1EusB67OovgZAB8yFftd/LLOtMYr23tHu oWhPYlQd6gIU806PklLRQtD63GLlOVPmzeigxFvoPHdeAc/pJPTisAFWP48PqlGWD9al 4s6vegEJWStaOFroOY70MmBncK0jPxHv1ZjqX98ehfSG0/A7wKLmvZ/RTKoTJU4fLVEX TqPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693500655; x=1694105455; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hPWIbPEOOm59r0FCudD+AHyX6x6YMDZgphrVpsUlGXA=; b=Y+u5ygcDpR7oVozQ29CuiYHIjm8IHnTwm9bESCSz6LWRqUvz4oEpLHBVffIOyz4feK Fq6t9ZjbJhlHGrpj9cmjGFxJFTOxGAxIfp6hOQn9PrCbYvFwEIfJIWI0BSkumtuFSUuK 70h3TriV3ek9rivfBDNwsH3WPu+xkCnhj111DLWkn/kwtHphLpcI4Oq8lkOSb1T7FQ/Q zAK242H/L82pXubRdhyzNvl0nz3lQukz6iYehizceERO4IDtYjwnAWwekS3ZgK2dvWY4 n835/0sBRjtT+qnd/XuWJI4sERZRHbWajhPE1W/iB+73enpC28kk6mjPyLqqRwQz362P t/Sg== X-Gm-Message-State: AOJu0YwGp8JRj83BeZ5i3jYN4aVzDnT9SfqeEsrBV9PqdZXNJyp7IHWp 3lZjPKWPsV+iuAyX3huGeYMHO6LaTLRUug== X-Google-Smtp-Source: AGHT+IGhyCW6hHqNwF9v7Vk1sj6CsbkFyZO7h+HJc7DxjOk2LSwnNs9zgedEMPgSsfQYhzVGoHbtGg== X-Received: by 2002:a0d:d5d4:0:b0:583:a590:cd66 with SMTP id x203-20020a0dd5d4000000b00583a590cd66mr5769002ywd.4.1693500655170; Thu, 31 Aug 2023 09:50:55 -0700 (PDT) Received: from [10.230.45.5] ([38.32.73.2]) by smtp.gmail.com with ESMTPSA id l62-20020a0dc941000000b005925765aa30sm524766ywd.135.2023.08.31.09.50.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Aug 2023 09:50:54 -0700 (PDT) Message-ID: <1db726d4-32c9-e1b8-51d6-981aa51b7825@FreeBSD.org> Date: Thu, 31 Aug 2023 12:50:19 -0400 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US To: Drew Gallatin , Gleb Smirnoff , Martin Matuska Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <07faf861-9186-47d1-992a-91d483ea4e9c@app.fastmail.com> From: Alexander Motin Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad In-Reply-To: <07faf861-9186-47d1-992a-91d483ea4e9c@app.fastmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4Rc6cJ4WhYz4PrJ On 31.08.2023 08:45, Drew Gallatin wrote: > On Wed, Aug 30, 2023, at 8:01 PM, Alexander Motin wrote: >> It is the first time I see a panic like this.  I'll think about it >> tomorrow.  But I'd appreciate any information on what is your workload >> and what are you doing related to ZIL (O_SYNC, fsync(), sync=always, >> etc) to trigger it?  What is your pool configuration? > > I'm not Gleb, but this was something at $WORK, so I can perhaps help. > I've included the output of zpool status, and all non-default settings > in the zpool.  Note that we don't use a ZIL device. You don't use SLOG device. ZIL is always with you, just embedded in this case. I tried to think about this for couple hours and still can't see how can this happen. zil_sync() should not call zil_free_lwb() unless the lwb is in LWB_STATE_FLUSH_DONE. To get into LWB_STATE_FLUSH_DONE lwb should first delete all lwb_vdev_tree entries in zil_lwb_write_done(). And no new entries should be added during/after zil_lwb_write_done() due to set zio dependencies. I've made a patch tuning some assertions for this context: https://github.com/openzfs/zfs/pull/15227 . If the issue is reproducible, could you please apply it and try again? May be it give us any more clues. -- Alexander Motin From nobody Thu Aug 31 17:53:50 2023 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 4Rc80x02hxz4rQmw; Thu, 31 Aug 2023 17:53:53 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rc80w5lywz4VLp; Thu, 31 Aug 2023 17:53:52 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTP id bjt5qLN4xLAoIblrcqKxjI; Thu, 31 Aug 2023 17:53:52 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPA id blraqbjS5HFsOblrbqLwkr; Thu, 31 Aug 2023 17:53:52 +0000 X-Authority-Analysis: v=2.4 cv=XZqaca15 c=1 sm=1 tr=0 ts=64f0d3b0 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=8nJEP1OIZ-IA:10 a=UttIx32zK-AA:10 a=6I5d2MoRAAAA:8 a=NEAV23lmAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=KOormpjoEEOd_GiNS3AA:9 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id A0AEE2D3; Thu, 31 Aug 2023 10:53:50 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 981F1D5; Thu, 31 Aug 2023 10:53:50 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Alexander Motin cc: Drew Gallatin , Gleb Smirnoff , Martin Matuska , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad In-reply-to: <1db726d4-32c9-e1b8-51d6-981aa51b7825@FreeBSD.org> References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <07faf861-9186-47d1-992a-91d483ea4e9c@app.fastmail.com> <1db726d4-32c9-e1b8-51d6-981aa51b7825@FreeBSD.org> Comments: In-reply-to Alexander Motin message dated "Thu, 31 Aug 2023 12:50:19 -0400." 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Thu, 31 Aug 2023 10:53:50 -0700 Message-Id: <20230831175350.981F1D5@slippy.cwsent.com> X-CMAE-Envelope: MS4xfFubN8MIBGH9zTs6kPYfygihXW+qjdVSMmqiiCt5AjbToUmIOz9+Ej1oa6qUwdDCxWR1W0gt4eMun6wpAVpvFTlHj9llcdwLu5VzGYaswignXz9JUPSY N/ph8cskllvlqLj/zIDzKnUJ4TM9blhTPcCxfbVe6iCmPwud1pd07B/ywSPSp4mAz9MMYSWlFG4wA5sht10qF1GK5zKoRvSUF+N2TvGK+gUtMA634ufP0Ygu ItNmbEHGdwUW+Nc4AKKhllCSTW6V0uFZO/N9vkwSPvQZmrsIEY2YoRAK0nWWhWAZpXJMTmnK6sQOM07/0MXdzNlxMvgUyzZxVuSyjahGOnnTxQILfK99QlwJ hrVHioFLqkI1iiVfDKbyPWyxc1r3SEso5zvIEtW7t28EsXHrZEuO1hnZo/Q7rQAKTdsnHjUp X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4Rc80w5lywz4VLp In message <1db726d4-32c9-e1b8-51d6-981aa51b7825@FreeBSD.org>, Alexander Motin writes: > On 31.08.2023 08:45, Drew Gallatin wrote: > > On Wed, Aug 30, 2023, at 8:01 PM, Alexander Motin wrote: > >> It is the first time I see a panic like this.  I'll think about it > >> tomorrow.  But I'd appreciate any information on what is your workload > >> and what are you doing related to ZIL (O_SYNC, fsync(), sync=always, > >> etc) to trigger it?  What is your pool configuration? > > > > I'm not Gleb, but this was something at $WORK, so I can perhaps help. > > I've included the output of zpool status, and all non-default settings > > in the zpool.  Note that we don't use a ZIL device. > > You don't use SLOG device. ZIL is always with you, just embedded in > this case. > > I tried to think about this for couple hours and still can't see how can > this happen. zil_sync() should not call zil_free_lwb() unless the lwb > is in LWB_STATE_FLUSH_DONE. To get into LWB_STATE_FLUSH_DONE lwb should > first delete all lwb_vdev_tree entries in zil_lwb_write_done(). And no > new entries should be added during/after zil_lwb_write_done() due to set > zio dependencies. > > I've made a patch tuning some assertions for this context: > https://github.com/openzfs/zfs/pull/15227 . If the issue is > reproducible, could you please apply it and try again? May be it give > us any more clues. One thing that circumvents my two problems is reducing poudriere bulk jobs from 8 to 5 on my 4 core machines. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 =L From nobody Thu Aug 31 19:07:40 2023 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 4Rc9fn0NGcz4rVj1; Thu, 31 Aug 2023 19:08:17 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rc9fm5mcGz4cG3; Thu, 31 Aug 2023 19:08:16 +0000 (UTC) (envelope-from mavbsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-58df8cab1f2so13546837b3.3; Thu, 31 Aug 2023 12:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693508896; x=1694113696; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :from:to:cc:subject:date:message-id:reply-to; bh=lpt1FAxULub6RCUc0kYz0qfHAY9tHKICJrDBf6/dWsw=; b=McHxFpkpjy+YsfzRAGkEhp7K2WrhqdFoPdME6h+aOBzyLrEaxgMpPzJfdpkZp5FJ3B zmkDdsOzV9q03f1dvUxwceux9QBiQdw9j99k11hk4+ur7Q7IhvpLfdHR3ESl+SUXkQsV rr8jxH4hrln1v+FZ8m05iF0FOIupStBRhmnKNV0HpSKB/zvXvqHSjUuqIIfpvlOXoGoH GB4MTy77BgJyiJ2wotos45JNGWdN2nFRMUeXWK+7MS0wYWJPdkImvLiMdoo+BHqxa7nD EMTgNmd/dCdw753au/IK0cuP3rGvvbRMsK5fw0oZOmaI09SOkZmPtQpHqPOitkqro+Nq BKRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693508896; x=1694113696; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lpt1FAxULub6RCUc0kYz0qfHAY9tHKICJrDBf6/dWsw=; b=jCeaVyTx5WKWGJci2j0oVoL28iLpOIj9bkGiWPc+4dIaZ0IuNw8HGk8j7tKOtG9tjP xsD6mvUVordpuWoxx0kOerPHTHHSa+aAf85k0g80p42H6DqtJc6ZDkGf/cXuosBCu9Kc /jUx2NDnzrXbmxFacygINSag5m72F/Egc8dWFfl8K8CdZw8Bi5EnG+dI+nlnxubf6ABH yUDtxjHurMFG0DkBzsZyV2e/YrbEl1EmUIT5LuE7VKmeXicsXgUneGXLaD6WB9iwk7oY si2Cb2C7SNZzRssWC/929kxw2DIk6DY2k3AIC+1kRBrGB7i86Awdq5lLZy8lpq2ZVgOU nxoA== X-Gm-Message-State: AOJu0YztXKO77DNzv0t3W2la9eg2CpBUp0sOnunWXnSECTpqvEycHFsE 0FN36eGkQq4q2833+5LwUHOoVfwk/UDbkw== X-Google-Smtp-Source: AGHT+IF7jF+t6pgD0LGrthE/28Mp90CgoUE8Go9otFJXIjRvhlCG6zHvnps0b2euUASlr4qtVGxoqQ== X-Received: by 2002:a0d:eb10:0:b0:586:cf7:2207 with SMTP id u16-20020a0deb10000000b005860cf72207mr308022ywe.14.1693508896063; Thu, 31 Aug 2023 12:08:16 -0700 (PDT) Received: from [10.230.45.5] ([38.32.73.2]) by smtp.gmail.com with ESMTPSA id s4-20020a817704000000b0057399b3bd26sm607153ywc.33.2023.08.31.12.08.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Aug 2023 12:08:15 -0700 (PDT) Message-ID: Date: Thu, 31 Aug 2023 15:07:40 -0400 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US To: Cy Schubert , Gleb Smirnoff Cc: Drew Gallatin , Martin Matuska , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <07faf861-9186-47d1-992a-91d483ea4e9c@app.fastmail.com> <1db726d4-32c9-e1b8-51d6-981aa51b7825@FreeBSD.org> <20230831175350.981F1D5@slippy.cwsent.com> From: Alexander Motin Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad In-Reply-To: <20230831175350.981F1D5@slippy.cwsent.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4Rc9fm5mcGz4cG3 On 31.08.2023 13:53, Cy Schubert wrote: > One thing that circumvents my two problems is reducing poudriere bulk jobs > from 8 to 5 on my 4 core machines. Cy, I have no real evidences to think it is related, other than your panics look like some memory corruptions, but could you try is patch: https://github.com/openzfs/zfs/pull/15228 . If it won't do the trick, then I am out of ideas without additional input. Gleb, you may try to add this too, just as a choice between impossible and improbable. -- Alexander Motin From nobody Thu Aug 31 19:30:25 2023 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 4RcB8l46Cxz4rW1W for ; Thu, 31 Aug 2023 19:30:47 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic313-20.consmr.mail.gq1.yahoo.com (sonic313-20.consmr.mail.gq1.yahoo.com [98.137.65.83]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcB8k0nqrz4dMB for ; Thu, 31 Aug 2023 19:30:46 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=X5ZX8s51; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.65.83 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1693510243; bh=PYJ5FEJQRPonLQxRGGhvGFsWSbrX/hqCBWRdnCtuPlk=; h=From:Subject:Date:Cc:To:References:From:Subject:Reply-To; b=X5ZX8s51Bi9WiMUcIgGgswccqLb0KPwL3m3RlOPMV06nf/Pv7H3IC45NWGD/r1Dr+Av898a9TZL7o0HiGHpy8SsagAMGyr0oZjb0+ucCcdarh8mfugLzRAYlMqD5Cmm2cX4CSly2vVmOkyseAI9gDg+mC1kqVxUHHOY9sZWIMtN9CVP0fzZYLwjQCNE4Stbkn3XFNvPDZa7HldcLYzrUp4A7JXg4YWpPnB8PZgWR05nTOkf4aeKsrwom1y9873seVxIYFQLMkUFj0o46NEl+8gtT0NyprDvb31/eQpUUgtIeWA10fiYizCWQeopWmsJD5j2Uio1/NbBGkFysawoYyA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1693510243; bh=9fKJbn5lqoEtSyKa5Q5kjdJ+vNdvpx6h32QZyBPZdlu=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=kP4C3UcKkbG7v1TkyTM5MkTwuGkcyRfBhdrbQs64fjT4M5XBSU9/ox7ar7Pl1Oi32HKP3hV+3XTySMLDIvwHQbr2EHRn30ykOD/O7B+SRiYohEUxhfBhbWl5j+dcHEfnYPG9s+hpygur863nNePDK8ytU7ijJolSphbXzynl4/bx8dWP1tjlkzFHwqyMjBiTuty2OKScRxrxnaKXXw8qVy1qihIjlMEGhdx/e4MJfWmK7PDnWhK1lT2oEqV04Z5iQzLLmhr/ucqmpln+MXOeX/zIUq+8UIYWEOo+wbhonQeOM0NcJg7rg8aJHkZ2xW/yM0MaEG/dKmpoKPKfOu+iqw== X-YMail-OSG: NICRPhYVM1nBBTWgza1PyQgeNjerRyGqpT9gHPH1lqnUR6_P0f8a0Hl6WMZV.us fYl.1AWn.a6My9GcD1iTBVz.nVX8iLDPSF1L_YttX9owk7shCm64cadLJ1.NPqa2h08XjQPIVzkI Dh3hPPJUTkqH1JEoel9OYlL0OM1q3pf2lwJO397FqrMHkg6oEye.WZyJzAehJ1Mqno5H7pjOGD_L T.iUzoc9gfxk44IvWlNnIxSpkcFoowqsNAard_0s8fVR978P1VJp7KfL13fOCA0UD2vHpxWYi4_8 qhZmk4_vhv_EvkKYhdwiETfGL.oWPjGHNiJikCMFAevY20J4RQRXpvUjHL2qb629ppoDU1IO16e6 78MlyRDbptJJIHflPmi4Vt8vteTb9rFW_vLZBz_BFqRNQPsyT8deYhEvii7N1Al2Grs8Bp.lC3Et Dq2LpvdffrIeru99kO7nyJqq8OkUE7Vcuu5Vlcnm9E18vUYxUP9fTYzdaE1Sk9L5l4gxXM_yvzUZ qvmuvHYAb20YtOAmEYPZ0Yb48AbyZXYdYHKLHWKy1UpXvxezKcsKYwyegVSZ0C2wxOjCcn3eI1nC NVyj3fddsIG_Pmtin0ehmqtXI57bGkbygaaXcB3GNGOGiK9g8Jlu2qAwEFCnIhAA68jQ1SZIOWss d47HOeeRZqgksx6uYAMRloA6jpPXBdCjeuexignzQNyPx9.9PCLzYStEMz87WmJctJK8Hnm2tZs2 ZTXHIhdfvP.yMnnSQRY85YSR80317NuJvmwM6pENBbK_0DmBEvF0t8bLOjD1HfKo_LnRPTkGo_I7 VHmtFQBeU5spKNK8Kyy6YlELHm6OvwIJDkzKKS5RezGGyg7Ozrigi7ffhdo2cQivBMUq6V2D5R8K KXrPbfFqj_wKJk2qu6izhkYh4SuxYGk4kYU03Chb3gW4q3_JaBcGrTQ4Q1Bjb5TeIuVxXv.vsynS TsdQgISPvm1h1e15SP3MqjHvLSqTlHqUuSDx8tgqxBdGWck_edHxgeaFPbNmXLzNayDK_SehjWzQ vhVEvwQlRY_9TOnQgDa7l31x20e0_ISevQcn7DW6ZlUSGYBgqjbgr.rD6JTWvfVcrbO6B0Kf3zii _4Y9koqCIkLl5yOyjLEWH82Ek81UeSWVAX0Lz_UosCmo.Svv0_2ugTP3uRpPZSwoaQm19FrGGY.n Y.V1XYHQXdGF8TsaitMzr98eiomENv07jmGiYoHk6rSBqHv3l_wos3Hf9kayIkKR9cMqglVW1zxY y6rh.mb1GMvRqFg._ffMqLm9nmxU3bKIFq9qkSSvixPTaViFbwWpqhtm3AfzquCUgOivreqCFA7_ j8t_T.OAam25TadQdGbinwFc4oNAHKkJewLYhEKamSTF0hvvISL97KZP7sq2nAkrd1zV3697r65P NqwVvY32w_PwF7d1kipoHmuPTKh63cF6lROBxEUZu5Rz205YjMJny.e3cxEg7lQUCpU5nDrTnCZ_ _lwd8u5UMDz4FrAOE8dqKsqM5hh3iYmm9Ix5PXAri0lQPnfnK1PkXCnuSbnRDBWYJSqKOMCzPb6v BIRknsj9PvcqoScKoQlomj7Cv62zFPNtlijcfrj3Q9E3ccRqhrLcRW5tVzRh8SilKd3jiP2QkzlB Aej7ccT_bI.6cErmy4gwJMksjcgnF4ARHYeCzlVF9Bs6EfyMgzBdq8ufH4yvFW0.YWAW6uPhHBRl FIKByjO3w2SpjmeEwUaEtzqin6js1Ee4BiMXjaeR5PTifGWz1dAR0IAwiZmdq8KW8HgRF0pzWsCG B6AO3qtjpEG6MEWiuC5aim0SiBdE57_h1Yhgi_egTUAnL2xRDoDw0QC5_FcAEPQ_dyekIEtL2pF3 Sry.yvgxmKVXwBjB9StvCCWN1IJXoC5ezRyDDg3pkcCaTmZ798P0xW479IlYyaF8fHpOjpPz9ZyB 50J4rKcUxwxIcyeqzsK7Rgw7YuK2pPWBH7elm7pl6tm7nzeL7MTXDsY15zsdyJ7B7kO_Ltovy883 Ug3kaGaKJz4B2P1YjGIZDdQZpbBhqrDX2xWM5HRTAwFep.qn9RdxWEAS13gqlr0vaZE3g641aFKX SMfIvdXlsUXgr8zwc6k3jhIZJOwf6.daykJOpaE0ta7pzik9DbEK70MezeiDH6I32ntvfESpZCz6 tUf3s.PjzNsXpNYMQ5_Kcbnou8rcJpRgd2WE6kqjV64J8CeME.iWzV7F.zeH98It0D7WVSdTM7Po EveJJbjTXsS_ba40ANhUJmLKZG9DKAhi_ALrshb45qlK3MrJUvwYwyzn9clVwoQ8g0CgLHk8Z4zC 9fPVpsZI- X-Sonic-MF: X-Sonic-ID: a7f672f3-20bf-4a31-8163-da77d8d5fde0 Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.gq1.yahoo.com with HTTP; Thu, 31 Aug 2023 19:30:43 +0000 Received: by hermes--production-bf1-865889d799-xc84r (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 08baccca88b40090f0c5b1d80466c4ef; Thu, 31 Aug 2023 19:30:37 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad Message-Id: Date: Thu, 31 Aug 2023 12:30:25 -0700 Cc: Alexander Motin To: Cy Schubert , dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3731.700.6) References: X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.83:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.83:from]; DKIM_TRACE(0.00)[yahoo.com:+]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4RcB8k0nqrz4dMB Cy Schubert wrote on Date: Thu, 31 Aug 2023 17:53:50 UTC : > In message <1db726d4-32c9-e1b8-51d6-981aa51b7825@FreeBSD.org>, = Alexander=20 > Motin > writes: > > On 31.08.2023 08:45, Drew Gallatin wrote: > > > On Wed, Aug 30, 2023, at 8:01 PM, Alexander Motin wrote: > > >> It is the first time I see a panic like this.=C3=82 I'll think = about it > > >> tomorrow.=C3=82 But I'd appreciate any information on what is = your workload > > >> and what are you doing related to ZIL (O_SYNC, fsync(), = sync=3Dalways, > > >> etc) to trigger it?=C3=82 What is your pool configuration? > > >=20 > > > I'm not Gleb, but this was something at $WORK, so I can perhaps = help.=20 > > > I've included the output of zpool status, and all non-default = settings=20 > > > in the zpool.=C3=82 Note that we don't use a ZIL device. > > > > You don't use SLOG device. ZIL is always with you, just embedded in=20= > > this case. > > > > I tried to think about this for couple hours and still can't see how = can=20 > > this happen. zil_sync() should not call zil_free_lwb() unless the = lwb=20 > > is in LWB_STATE_FLUSH_DONE. To get into LWB_STATE_FLUSH_DONE lwb = should=20 > > first delete all lwb_vdev_tree entries in zil_lwb_write_done(). And = no=20 > > new entries should be added during/after zil_lwb_write_done() due to = set=20 > > zio dependencies. > > > > I've made a patch tuning some assertions for this context:=20 > > https://github.com/openzfs/zfs/pull/15227 . If the issue is=20 > > reproducible, could you please apply it and try again? May be it = give=20 > > us any more clues. >=20 > One thing that circumvents my two problems is reducing poudriere bulk = jobs=20 > from 8 to 5 on my 4 core machines. What about the likes of your ALLOW_MAKE_JOBS status or other constraints (such as MAKE_JOBS_NUMBER) on the parallelism internal to each builder? My earlier high load average test that did not reproduce the problem was allowed to use 32 builders, each allowed to use 32 make jobs. This was for 32 hardware threads (ThreadRipper 1950X). The maximum observed for each the 3 load averages were: 349.68, 264.30, 243.16 (not simultaneously). (I use top patched to monitor and report such maximums for what it observes.) In general the 3 reported load averages were each over 100 for a very long time. Since I did not get the problem despite the high sustained load averages but with no "extra" builders involved and you got what you report, my test does support the number of builders being large compared to the number of hardware threads being what matters for repeatability via poudriere. A weakness in that evidence is that my test predates: Sun, 27 Aug 2023 =E2=80=A2 git: 315ee00fa961 - main - zfs: merge = openzfs/zfs@804414aad Martin Matuska and so was for one stage earlier relative main's openzfs updates. It = had: Thu, 10 Aug 2023 . . . =E2=80=A2 git: cd25b0f740f8 - main - zfs: cherry-pick fix from = openzfs Martin Matuska=20 =E2=80=A2 git: 28d2e3b5dedf - main - zfs: cherry-pick fix from = openzfs Martin Matuska and no uncommitted openzfs patches. =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Thu Aug 31 20:16:38 2023 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 4RcC9g04VRz4rZ4F; Thu, 31 Aug 2023 20:16:39 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcC9f6cZXz3DQf; Thu, 31 Aug 2023 20:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693512998; 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=0V16i6GdZmrNpQTJGj8YCPQLDHWC1X4n7+X1JntIT7w=; b=oPRPPoxoSL4NsHTefYLqJ48ozvrhj9Ld5gE42tmcTU/owAusvdGym7eKCTGoQdzPc4R8c5 Hs8+4zmKKmJnaDS4sTgxBFMIq5YvpZoJ4jwLYINoQ8pR8ChBxRkwP8ZLtw3lcjWf/8CYqp FghXw0fbuW00PWpMeSeGaCh1g2YcF8q5OD/ZsIIW7sJiz7AlebdyPugkG0+uD6Xyjv1Z6p LolkaeVL3w/3fMfvTW51yZZ1UajAGinN2q6lEye+JZnocHe1qryE6aOjqmanhtfdGTNfs8 Ca+aK65p8X5X4L2sq7Po4TeKCPiIaOdrxL661Q9oI5KfuhXi8hSbrVJT0JPuWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693512998; a=rsa-sha256; cv=none; b=tI7zhiPV+ZVUiv8sfOucLTFn2LUaO6aGHmsIY7YxDtZGEjtCny8PWmpXqvHCT3Of2tace+ Pz5qXchtHrMAgtbQDqEg+hp3PpB3W3VxCG3p6saDTNAIbijNCaFcmpxxLxVLEi7s4vr91X k6MdDhsGh7AZvrAYd1m76d9pqpG+s6XKQLZAvHpwzHeIEz59zEYb01ZoWjJGo2KVXUqsHZ ts+SwhmkL637Z87zXexqohpKRrxQJ8j9m/mgWiZ67KNQHYeXwFVwqardMt98simePr/4N1 ehTGtCqZlFqk48dI7NtAmBlFLMs2HFyV9WlGJtG09z7L5fzFCjRoBdDdRtg5sg== 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=1693512998; 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=0V16i6GdZmrNpQTJGj8YCPQLDHWC1X4n7+X1JntIT7w=; b=A+GAtvHlQGxNJa4iE7iNfFeixh/SXIAxDV56/onOGz3Rd+m0TryaatgPPuvp9Pk34udLXH 1tgURM3HQ1DrCxgtaiAWFBBURzQPbs/YaKVHyBj/SOW/ltKlK0LJT2fSJ5zvjI3EXhEohw tBTZj23ZF/55QtLrays+ioMPwcSecrXYROt1y0ryE8jKLB3IR6kjDV5FY7PZ3c61MYJcyf SDHGlSdyA391aLK12eycSQjnVschdFMRSxav8DeVMkDSFg36qATbjQS3rHfNh97Q3hjAuh Mzs/57xVDEJy776fJN2tDnW0j3snqJZV41rG8NHYC0IGUaaNEGybXhnI3OQM4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcC9f5fyNzWkF; Thu, 31 Aug 2023 20:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37VKGcPU013325; Thu, 31 Aug 2023 20:16:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37VKGcnd013322; Thu, 31 Aug 2023 20:16:38 GMT (envelope-from git) Date: Thu, 31 Aug 2023 20:16:38 GMT Message-Id: <202308312016.37VKGcnd013322@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 4cd9d804ae8b - main - libipf: fix parser error message. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4cd9d804ae8b955d47dfa0bba06e7c254d760cb1 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4cd9d804ae8b955d47dfa0bba06e7c254d760cb1 commit 4cd9d804ae8b955d47dfa0bba06e7c254d760cb1 Author: Dag-Erling Smørgrav AuthorDate: 2023-08-31 20:15:54 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-08-31 20:15:54 +0000 libipf: fix parser error message. MFC after: 1 week Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D41652 --- sbin/ipf/libipf/parseipfexpr.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sbin/ipf/libipf/parseipfexpr.c b/sbin/ipf/libipf/parseipfexpr.c index 215e43b2978d..880258e5dd66 100644 --- a/sbin/ipf/libipf/parseipfexpr.c +++ b/sbin/ipf/libipf/parseipfexpr.c @@ -93,11 +93,7 @@ parseipfexpr(char *line, char **errorptr) break; } if (e->ipoe_word == NULL) { - error = malloc(32); - if (error != NULL) { - snprintf(error, sizeof(error), "keyword (%.10s) not found", - ops); - } + asprintf(&error, "keyword (%.10s) not found", ops); goto parseerror; } From nobody Thu Aug 31 22:35:26 2023 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 4RcGFt27D5z4rhhy; Thu, 31 Aug 2023 22:35:30 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcGFs6Ygzz3PZn; Thu, 31 Aug 2023 22:35:29 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTP id bgpkqLCBILAoIbqG9qLwWj; Thu, 31 Aug 2023 22:35:29 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPA id bqG7qfF6H3fOSbqG8qWusW; Thu, 31 Aug 2023 22:35:29 +0000 X-Authority-Analysis: v=2.4 cv=J8G5USrS c=1 sm=1 tr=0 ts=64f115b1 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=UttIx32zK-AA:10 a=6I5d2MoRAAAA:8 a=NEAV23lmAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=omy7BsLPBn8v354EOekA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 23FC7213; Thu, 31 Aug 2023 15:35:27 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id DCB701A1; Thu, 31 Aug 2023 15:35:26 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Alexander Motin cc: Cy Schubert , Gleb Smirnoff , Drew Gallatin , Martin Matuska , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad In-reply-to: References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <07faf861-9186-47d1-992a-91d483ea4e9c@app.fastmail.com> <1db726d4-32c9-e1b8-51d6-981aa51b7825@FreeBSD.org> <20230831175350.981F1D5@slippy.cwsent.com> Comments: In-reply-to Alexander Motin message dated "Thu, 31 Aug 2023 15:07:40 -0400." 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 31 Aug 2023 15:35:26 -0700 Message-Id: <20230831223526.DCB701A1@slippy.cwsent.com> X-CMAE-Envelope: MS4xfCL2ga6yFTz3Ze/QGV+ajU0hJn2rdO0tjWOfUg70jStx5KJB+sCACaEnh7crRw8ttm1xjombj8CnsWS93/kX95CiGdaV01XU6ZlRHVEIgI6mx3LTIOiN u7DhSTnGhQmFvcSdK0jaCX+AzE6LD3c8Rcrree95UsdFxLEradePpRd97p5vY8Nh7LO7WadQdN69DeYBHUnfN6yGyPKeoaQFtVYuOGXltnSQAzW9GuNBsGxU yMgkdmwAfFA/++UnVqtSjtqqGhh79l28X5kATkfqgODpbZjAIpLRmqWb7O7tm+i60ZbMooqorw2jv045iX3IXfg3oiIrPglDwJwM2Phm89lOatRQNNDvirfH El8JhH7YmNpluHAZBgvktiggG5rtmesIZDggTkA/KYsl6Gaht7uk2ytWkHGF6TsQzMpodMlI X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4RcGFs6Ygzz3PZn In message , Alexander Motin writes: > On 31.08.2023 13:53, Cy Schubert wrote: > > One thing that circumvents my two problems is reducing poudriere bulk jobs > > from 8 to 5 on my 4 core machines. > > Cy, I have no real evidences to think it is related, other than your > panics look like some memory corruptions, but could you try is patch: > https://github.com/openzfs/zfs/pull/15228 . If it won't do the trick, > then I am out of ideas without additional input. So far so good. Poudriere has been running with a decent -J jobs on both machines for over an hour. I'll let you know if they survive the night. It can take some time before the panics happen though. The problem is more likely to occur when there are a lot of small package builds than large long running jobs, probably because of the parallel ZFS dataset creations, deletions, and rollbacks. > > Gleb, you may try to add this too, just as a choice between impossible > and improbable. > > -- > Alexander Motin -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Thu Aug 31 22:35:59 2023 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 4RcGGR4nl9z4rhgB; Thu, 31 Aug 2023 22:35:59 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcGGR4Mq8z3PXC; Thu, 31 Aug 2023 22:35:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693521359; 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=e5QF5of3MhWxKs0nmdCl101CeiNoIsS7b/zC96629Fw=; b=weWqB2mIi5hxyPyY/AzFCUMx1LVmrEWlETO1LSzfNtfnMAQU5tP1Nzou03V/te8LL9dW9K G4UtGvAf2hJZy32Q23EkqG0t6EEUEu+wx1MMIWG/o/PPOLzPe1+DV0Z1POXpAlqe/IAndz 0Q/vw0L65Z6TTCds+pKNfwyCjCpYLroibxPEjqiEkG6mtnen3zd6+X9JH7AFKl4h3Ayjff 9sEoD618CcZMF+qwyjZ5dOJj/dCEXESM4XezUseZOeHoNGnXlL3svP/duDn4uAHaB8FHqV 6bnSK3JmBVgW0L8w2WeLUiKbZA7wkxK/MDtBzajUpvCmchyZYnDAriCS417Atw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693521359; a=rsa-sha256; cv=none; b=LUDY1+3Q0eY8jmrNpYBrz071jY5upKu+ha5IHLo+RRbxAfYMD0tAtp6UxC/7k63Ev10xp8 WAgsM3x2EF56QOr1Et9Q8odtdEijOl96Xby3X6Y418lUVp7wxUg3XSYjxIcW9puvP+liiV pMiQt2N6NCMClzzpMpYrhecV4ZD0py7VDxVIcIDhG7m9xEW6uXJ64sRmluJdC6I/bd9LfX ef7G4dnRLcExzXpo/efwCPYxEwO7o3I3/Jtq62ePmEhzkCtV47Vrt9j89uSWu6uLjLiZSu Iu7vNfv6sIJ/mdFUTNuwVxJzUI26XYJ7rWXyuTsI4MOxZ6fzAv3EnYLTsGg+eA== 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=1693521359; 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=e5QF5of3MhWxKs0nmdCl101CeiNoIsS7b/zC96629Fw=; b=eahSTTdIWn4sMk8L+RB860VmxB12h4DzcJfjnn2x+796wMgAgp9rQujMzNVgn8zZBXlt0q S0a5Sv0vIf5lEk/T3Ef59ygK9W/S/kGpBRO2E4kNf/qZTYrHjrIOKzNlKb+CSjY1SVeCfI oSSIfGLHnr8xe5ciOxCPmuH5QDkozvgu0yPUHn9ElstU/fChOwYuS24yRcLGvaSmZuinvB DW00PK/ercBWvguemvW5rLycs1e7Uh9EYWbS+q7ClueY1mWLjBcRXRGSa8oPZgbwFASbCl iMpjmVepRWafoevsP1ylOmbg/xSEbbx1aT/OUquxBeBELJmX0aLDAVI9cvR09w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcGGR3QzmzbWf; Thu, 31 Aug 2023 22:35:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37VMZxhe045001; Thu, 31 Aug 2023 22:35:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37VMZxSj044998; Thu, 31 Aug 2023 22:35:59 GMT (envelope-from git) Date: Thu, 31 Aug 2023 22:35:59 GMT Message-Id: <202308312235.37VMZxSj044998@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jamie Gritton Subject: git: db08e8ba0e7b - main - Re-remove $FreeBSD$ inadvertantly put back into jail.8 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db08e8ba0e7bebbd1af1ee91f0235cd36c9bb7d3 Auto-Submitted: auto-generated The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=db08e8ba0e7bebbd1af1ee91f0235cd36c9bb7d3 commit db08e8ba0e7bebbd1af1ee91f0235cd36c9bb7d3 Author: Jamie Gritton AuthorDate: 2023-08-31 22:35:00 +0000 Commit: Jamie Gritton CommitDate: 2023-08-31 22:35:00 +0000 Re-remove $FreeBSD$ inadvertantly put back into jail.8 --- usr.sbin/jail/jail.8 | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index 6fb5fdfa0623..0e98914795a2 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 26, 2023 .Dt JAIL 8 .Os From nobody Thu Aug 31 23:25:30 2023 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 4RcHMZ69Fpz4rlLK; Thu, 31 Aug 2023 23:25:30 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcHMZ5cKNz3SFk; Thu, 31 Aug 2023 23:25:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693524330; 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=17DBOwMb2c4ucsvokv1mYOOYPtf6xXie4Lmzn583TFU=; b=pn0TqBjbi2gV14NHlg349AFlsgVEvsXlbjJanNrOZiuZVCJ2i5tiA0azDaOQLcXUdfKlZ8 9pfAKOfJyW7x/+SDMRyuDZqPrw5u9gjfSXq0pYlWDlIwHVZhT0U4EFg2vwjfBVgUhPOnGy jeWk0gEI/D0oTu16MRzqHCguCJL88o2oDP8Eox9bSCqiSISdMKKtqZ+5LEByjEGthDS0kU NI+vVpdHawwHhVELT9xXm0INblViDwYksPtbVQy2/n7T6DBsLeNrj9V+WM1hHt7IPezdcf cbow28wBe3yIVmbPyw0zi1VqRsZ2ZZ8cK9sD821iSc8PdbpSUHipJ+nQaf6zMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693524330; a=rsa-sha256; cv=none; b=kovqBG+rUeDHyhpBwQgXH9eZL1UUNQ/lJzC2nCsu1SgIHmEVYHjTJ5dFM1uC9yC5QHYy63 5n0nA5l4KSv2qzvSMxcltoi17Vzj80aUgx1uB4mV8TJULbnlglMfMoh+4bhs9+XKdoTF65 OM1qYR1n8Qo/aULBV/9hlew/6ChpVuuBFyK375jgedGw17ow/6+DMC2GmdCrXg/Gg3QFsO tdApY5KGRwt49e95YdI6TOmgL893K728osiQXLWYv1Y68jU/PbtX2r67Jd9HKw41P2DiP/ FAQ3UOjxceJ6IaSwIe7V069ghNHbeZ3d61CmX50k+qCy/CSMECd+fPxZ1ZvFiA== 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=1693524330; 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=17DBOwMb2c4ucsvokv1mYOOYPtf6xXie4Lmzn583TFU=; b=yyffhODwOaOGEOOfHmagGaQ/3L+k9Auo+mTJ5MsRWFM6wFPnDKoFwSPqUIKoQ/bClWQ5mq tSOEAfvfrSCjHrORAuaXOqR3IwF+0Es8FVnqhAP1HOj6t2s04ta+CTpVdqYoKCXlSCgoJg B9p96ZxtssKqKrXghNBTRhzKo1fMwIGTRgcw7pRyvmnYsg6zOAjM5j0DkeFxyjlR3vEVvG bx4UxwvhFtX5n7MAuvf3emyBuqtdSO9cVL/U8G+JS7UYoNdLzyc29GYwyIO9MFddBbpRKV wPjeqbmHIIAv2vaNndHHR7jF1sB1ATLCGm7DkFa+qZt22dCoMq4+c/2mw+fVwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcHMZ4jdrzd5H; Thu, 31 Aug 2023 23:25:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37VNPUvA027696; Thu, 31 Aug 2023 23:25:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37VNPU8q027693; Thu, 31 Aug 2023 23:25:30 GMT (envelope-from git) Date: Thu, 31 Aug 2023 23:25:30 GMT Message-Id: <202308312325.37VNPU8q027693@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Glen Barber Subject: git: 82c57e2a75c7 - main - release: remove arm/armv6 RPI-B configuration file 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 82c57e2a75c7134b70eb2138ff6bbc6e55bef130 Auto-Submitted: auto-generated The branch main has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=82c57e2a75c7134b70eb2138ff6bbc6e55bef130 commit 82c57e2a75c7134b70eb2138ff6bbc6e55bef130 Author: Glen Barber AuthorDate: 2023-08-31 23:24:38 +0000 Commit: Glen Barber CommitDate: 2023-08-31 23:24:38 +0000 release: remove arm/armv6 RPI-B configuration file The arm/armv6 RPI-B images are deprecated in 15 and 14. An MFC to stable/14 will follow. MFC after: 3 days Sponsored by: GoFundMe https://www.gofundme.com/f/gjbbsd Sponsored by: PayPal https://paypal.me/gjbbsd --- release/arm/RPI-B.conf | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) diff --git a/release/arm/RPI-B.conf b/release/arm/RPI-B.conf deleted file mode 100644 index 839348e418f7..000000000000 --- a/release/arm/RPI-B.conf +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# - -EMBEDDED_TARGET_ARCH="armv6" -EMBEDDED_TARGET="arm" -EMBEDDEDBUILD=1 -EMBEDDEDPORTS="sysutils/u-boot-rpi sysutils/rpi-firmware" -FAT_SIZE="50m" -FAT_TYPE="16" -IMAGE_SIZE="5120M" -KERNEL="RPI-B" -MD_ARGS="-x 63 -y 255" -UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi" -RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware" -OL_DIR="${RPI_FIRMWARE_DIR}/overlays" -OVERLAYS="mmc.dtbo disable-bt.dtbo" -PART_SCHEME="MBR" -export BOARDNAME="RPI-B" - -arm_install_uboot() { - UBOOT_FILES="u-boot.bin" - RPI_FIRMWARE_FILES="bootcode.bin config.txt \ - fixup.dat fixup_cd.dat fixup_db.dat fixup_x.dat \ - start.elf start_cd.elf start_db.elf start_x.elf \ - bcm2708-rpi-zero-w.dtb bcm2708-rpi-b-plus.dtb \ - bcm2708-rpi-b.dtb bcm2708-rpi-cm.dtb" - FATMOUNT="${DESTDIR%${KERNEL}}/fat" - chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" - chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} - for _UF in ${UBOOT_FILES}; do - chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/${_UF} \ - ${FATMOUNT}/${_UF} - done - for _UF in ${RPI_FIRMWARE_FILES}; do - chroot ${CHROOTDIR} cp -p ${RPI_FIRMWARE_DIR}/${_UF} \ - ${FATMOUNT}/${_UF} - done - chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/overlays - for _OL in ${OVERLAYS}; do - chroot ${CHROOTDIR} cp -p ${OL_DIR}/${_OL} \ - ${FATMOUNT}/overlays/${_OL} - done - sync - umount_loop ${CHROOTDIR}/${FATMOUNT} - chroot ${CHROOTDIR} rmdir ${FATMOUNT} - - return 0 -} From nobody Thu Aug 31 23:30:32 2023 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 4RcHTR0DBJz4rl9y; Thu, 31 Aug 2023 23:30:35 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (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 "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcHTQ6tMdz3SR7; Thu, 31 Aug 2023 23:30:34 +0000 (UTC) (envelope-from gjb@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693524635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5hKAUhVNq7V4+ltHMqL+cyZHRNolULOeLmbGM1EOWXM=; b=huiwrl1xPZestOP6SvUk9MdSF1xX7mMsLviseZf9yg5MheAZx3afooHMSZi6XBW/Gxqfcn Ag+VCDHAlHA65Rn4sNzCuakMdKln6w7R8olTsUH7XG3D+tNw1PK/hbGsoPHtdjThILD+lL eKVn0RupfPGWk+ffGVgfL7z0ZjFlA+KVVDOag9r9jHeDNCdaiUxcAC4nKx/ZvI3mBl1FGM 0OWOIRSSJ6Rrd/oeftTTx7Wc3RQryRq6O4Ppo/dJlP+06ug5wZx0jrPdFDpzjPJzsZx1J7 Fmz1bS/vjhSLAn+9axO/qxxb+sajt4K30ZWyRUkq+JqA9kl75q+niNO6UaEdvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693524635; a=rsa-sha256; cv=none; b=LPsmX2mqBZBG8XUgHQv2q4T4tZA3hYxETRocAx0gwYMpBigf+lD5Ipqe2PBVtx/F3dRhyt P+xyIZnvOH+x2Cl1wjKjfPMu7hdsgaARYXoqxbEHE3xQMjStl/pfixtzOGY0AZvuAaSIPf rczO+fQ+r+vlBJ0STLyO9TnSO6ZIDDK8nIyHF0A2Y1Ts9hNSUxPq8R8b0pWg9AIdybVGnd Rj/0qHhOIhKN34Y6zf9oWu6Zc3h/pt/MrsLDYfFzAJVeOh/tyQswSTTn6VwyK7GP0txzl8 dcdUG8MWgs2VKMqujsRl3IKf3jmpfAm0F7n6ZVeQy9HZ72rMb4N1yx9Xa1AxaA== 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=1693524635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5hKAUhVNq7V4+ltHMqL+cyZHRNolULOeLmbGM1EOWXM=; b=nlAj3AMuUOlb5zEeRymTNyIzhwHCVrUPvkW7HqSDuhh1hVa0Xl4w0jZ5Du1lLpYKCOmgr9 5TyRukoTXaR4exFO6NpPuiYEmePfxgCWxJr3KKljXNVYaWNGYeNV390Cbu5jlyx2gQa6ZI J/JBACaybDONMV/52742Z/KiDFMLnx3r0es07mA+u2ILgfF9A6Qey1EN+5Sn3Wh6Jbq8ek 5MsQsLvwc0UM8HC+SwCFFYPHLXxEruZtoL+yAHod9bbB4M/hmVOqc3oV0L0G/70eXFGL8O kPjZkPbZuJFvIGPUixIDPQSt/QUnVzafT60sU9jSSXs9tk4YGHKn/wJ7TeIR2Q== Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 98E8A1E9A0; Thu, 31 Aug 2023 23:30:34 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Thu, 31 Aug 2023 23:30:32 +0000 From: Glen Barber To: Jamie Gritton Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: db08e8ba0e7b - main - Re-remove $FreeBSD$ inadvertantly put back into jail.8 Message-ID: <20230831233032.GS4090@FreeBSD.org> References: <202308312235.37VMZxSj044998@gitrepo.freebsd.org> 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="THYEXwetZJOK3OLY" Content-Disposition: inline In-Reply-To: <202308312235.37VMZxSj044998@gitrepo.freebsd.org> --THYEXwetZJOK3OLY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 31, 2023 at 10:35:59PM +0000, Jamie Gritton wrote: > The branch main has been updated by jamie: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3Ddb08e8ba0e7bebbd1af1ee91f0= 235cd36c9bb7d3 >=20 > commit db08e8ba0e7bebbd1af1ee91f0235cd36c9bb7d3 > Author: Jamie Gritton > AuthorDate: 2023-08-31 22:35:00 +0000 > Commit: Jamie Gritton > CommitDate: 2023-08-31 22:35:00 +0000 >=20 > Re-remove $FreeBSD$ inadvertantly put back into jail.8 > --- > usr.sbin/jail/jail.8 | 2 -- > 1 file changed, 2 deletions(-) >=20 > diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 > index 6fb5fdfa0623..0e98914795a2 100644 > --- a/usr.sbin/jail/jail.8 > +++ b/usr.sbin/jail/jail.8 > @@ -23,8 +23,6 @@ > .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY = OF > .\" SUCH DAMAGE. > .\" > -.\" $FreeBSD$ > -.\" > .Dd August 26, 2023 > .Dt JAIL 8 > .Os >=20 There is no need to re-send your approval request to re@. Just include this in the cherry-picked commits. Glen --THYEXwetZJOK3OLY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAmTxIpgACgkQAxRYpUeP 4pPOzg/+MwpUNgEONXLm/FSAzbk9AQDp4ftlW5jJOEGb/7AF6oQPS/YD9G0BYo+v jtKILuGjifYaT9l7vk+1L92JElbM4N47EEl3r60BMFynsiOL7U8c8ARx1u5K0P/V OgKWXMu9DZv5lTqG91v7XDUyjfCP6oGaUA9vVDakg1R9y9xyoJGCdBe1whrq3scB eVt3g1hPXrBJSsVySl6/K3LceoK9VAqas01dtvLJDwElTHOtbaR73aU/k2Ha8hu3 B7+fMo4LCAvDMafg2ajCi4AZkGT+bkT/hJm4Kxi7ycPXy4oumOjMbb9/VgZ5SIiO Ve5NoxD6xfSD14xaK+g4pXvt3mN1Tlp2R+tZmY3TUuIlVqo9PjPJxMkAM2yPgksB fSfaCdJ6GN4XB6D2eSwJiSe7oAbDgdvyDzZ9gqGvp7jF+j8MFXfgz3dKBn4OCNUq MxvHgkBimXGmBpQxxD8SOqdi+HvrYaTMqHFjbPDIZVhwet/tNjmuNmy0TDi7McYq cSHqkRSer/cDVmPNX72JP/ToM3OjEO1NScS2NDHqvv2k6d6YiaWZljfM9qZfO5lD YN8H+C8M/Fk+T1W+sHUUD94WrM9izffy9JWRot9SDXPmBBCBqRUJd3xHrMMOtDXZ wfetIME8KXNu6s8sgbEWZT59KD0qC8nOcjtTt7xxPT4ESY3eShM= =K0d6 -----END PGP SIGNATURE----- --THYEXwetZJOK3OLY-- From nobody Thu Aug 31 23:32:28 2023 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 4RcHWg65l1z4rlqp; Thu, 31 Aug 2023 23:32:31 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcHWg4mbbz3TNK; Thu, 31 Aug 2023 23:32:31 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTP id bghDqLBovLAoIbr9KqM6vT; Thu, 31 Aug 2023 23:32:30 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPA id br9IqzH7GyAOebr9JqUxn8; Thu, 31 Aug 2023 23:32:30 +0000 X-Authority-Analysis: v=2.4 cv=e5oV9Il/ c=1 sm=1 tr=0 ts=64f1230e a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=UttIx32zK-AA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=NEAV23lmAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=1QEamiDjkYNDyZr7EvAA:9 a=uoAAfHYLybI1uLOJ:21 a=CjuIK1q_8ugA:10 a=gvFz51Dc2IYA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id A32D12D0; Thu, 31 Aug 2023 16:32:28 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 9935BA8; Thu, 31 Aug 2023 16:32:28 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: Alexander Motin , Gleb Smirnoff , Drew Gallatin , Martin Matuska , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad In-reply-to: <20230831223526.DCB701A1@slippy.cwsent.com> References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <07faf861-9186-47d1-992a-91d483ea4e9c@app.fastmail.com> <1db726d4-32c9-e1b8-51d6-981aa51b7825@FreeBSD.org> <20230831175350.981F1D5@slippy.cwsent.com> <20230831223526.DCB701A1@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Thu, 31 Aug 2023 15:35:26 -0700." 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 31 Aug 2023 16:32:28 -0700 Message-Id: <20230831233228.9935BA8@slippy.cwsent.com> X-CMAE-Envelope: MS4xfOxcB1NcZZ9hlvYKEKK2PsnvU95pR74FgkdRXckFvnnRDv6rOyz520Nhny2m63rtVo3BAwwz8JirRRCBHzdqCxkhMp1CXI/mRQbWbO4pd3O5RlkyWYlU A1QZJR32wU7tCiUm8Nng9ANm5ygMb9WPwATNyMB8YRXr6/lmttKTuNf/k3KOl7c8mBqjLKFRhfcjcFUR/pH0tRRUW84QZzUtQ8INCynF8aqQm9wW1ZdnIQUu U1lsW1yx3DxPklyWv/VXhldIJOXPUYaOgdXWQSKdJb+rmqfuWUGhmxfjeIGY6Lmh+8aSaoh4R8hxgCrmKJKglSU+lzeipHItcyS3v6ZTJAvkaf2wORigp5A2 FHNvRnuOBnw6BrOWtJQl9dm75B41zAWyEr+fxcJ2wBiRN3OxqJrk9Ruixu+FuwA9VQMb82y5 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4RcHWg4mbbz3TNK In message <20230831223526.DCB701A1@slippy.cwsent.com>, Cy Schubert writes: > In message , Alexander > Motin > writes: > > On 31.08.2023 13:53, Cy Schubert wrote: > > > One thing that circumvents my two problems is reducing poudriere bulk job > s > > > from 8 to 5 on my 4 core machines. > > > > Cy, I have no real evidences to think it is related, other than your > > panics look like some memory corruptions, but could you try is patch: > > https://github.com/openzfs/zfs/pull/15228 . If it won't do the trick, > > then I am out of ideas without additional input. > > So far so good. Poudriere has been running with a decent -J jobs on both > machines for over an hour. I'll let you know if they survive the night. It > can take some time before the panics happen though. > > The problem is more likely to occur when there are a lot of small package > builds than large long running jobs, probably because of the parallel ZFS > dataset creations, deletions, and rollbacks. > > > > > Gleb, you may try to add this too, just as a choice between impossible > > and improbable. > > > > -- > > Alexander Motin > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > e^(i*pi)+1=0 > > One of the two machines is hung. cwfw# ping bob PING bob (10.1.1.7): 56 data bytes ^C --- bob ping statistics --- 2 packets transmitted, 0 packets received, 100.0% packet loss cwfw# console bob [Enter `^Ec?' for help] [halt sent] KDB: enter: Break to debugger [ thread pid 31259 tid 100913 ] Stopped at kdb_break+0x48: movq $0,0xa1069d(%rip) db> bt Tracing pid 31259 tid 100913 td 0xfffffe00c4eca000 kdb_break() at kdb_break+0x48/frame 0xfffffe00c53ef2d0 uart_intr() at uart_intr+0xf7/frame 0xfffffe00c53ef310 intr_event_handle() at intr_event_handle+0x12b/frame 0xfffffe00c53ef380 intr_execute_handlers() at intr_execute_handlers+0x63/frame 0xfffffe00c53ef3b0 Xapic_isr1() at Xapic_isr1+0xdc/frame 0xfffffe00c53ef3b0 --- interrupt, rip = 0xffffffff806d5c70, rsp = 0xfffffe00c53ef480, rbp = 0xfffffe00c53ef480 --- getbinuptime() at getbinuptime+0x30/frame 0xfffffe00c53ef480 arc_access() at arc_access+0x250/frame 0xfffffe00c53ef4d0 arc_buf_access() at arc_buf_access+0xd0/frame 0xfffffe00c53ef4f0 dbuf_hold_impl() at dbuf_hold_impl+0xf3/frame 0xfffffe00c53ef580 dbuf_hold() at dbuf_hold+0x25/frame 0xfffffe00c53ef5b0 dnode_hold_impl() at dnode_hold_impl+0x194/frame 0xfffffe00c53ef670 dmu_bonus_hold() at dmu_bonus_hold+0x20/frame 0xfffffe00c53ef6a0 zfs_zget() at zfs_zget+0x20d/frame 0xfffffe00c53ef750 zfs_dirent_lookup() at zfs_dirent_lookup+0x16d/frame 0xfffffe00c53ef7a0 zfs_dirlook() at zfs_dirlook+0x7f/frame 0xfffffe00c53ef7d0 zfs_lookup() at zfs_lookup+0x3c0/frame 0xfffffe00c53ef8a0 zfs_freebsd_cachedlookup() at zfs_freebsd_cachedlookup+0x67/frame 0xfffffe00c53ef9e0 vfs_cache_lookup() at vfs_cache_lookup+0xa6/frame 0xfffffe00c53efa30 vfs_lookup() at vfs_lookup+0x457/frame 0xfffffe00c53efac0 namei() at namei+0x2e1/frame 0xfffffe00c53efb20 vn_open_cred() at vn_open_cred+0x505/frame 0xfffffe00c53efca0 kern_openat() at kern_openat+0x287/frame 0xfffffe00c53efdf0 ia32_syscall() at ia32_syscall+0x156/frame 0xfffffe00c53eff30 int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffff89dc db> I'll let it continue. Hopefully the watchdog timer will pop and we get a dump. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Thu Aug 31 23:37:45 2023 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 4RcHf05mhJz4rlWw for ; Thu, 31 Aug 2023 23:38:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcHf0186qz3Txp for ; Thu, 31 Aug 2023 23:38:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-31c93d2a24fso1101543f8f.2 for ; Thu, 31 Aug 2023 16:38:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1693525077; x=1694129877; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fDZsTig4/XXGa+HY3Fd7OR70XFCzSqOm9rvE3HjGjAg=; b=G1rFrI1zZagu5a8RgjYQ9GmbjmhtpvdllFgnbeMGS8LpDO9mHksByZSLWTIpMfKFSU zxm63dtWJyLo8559XNe3Vwedx2s84/8HWmmikCQKaQxxCM4KPemQnwiaXT5rMy4mYnrD LDDbyJwy4c3yyHBn4Wm/Va0qpyG3KZd3UxlhkHbiTaoodxBa1pze0a/tZonqZn9HwWjQ ggxG2Kj1ahvCfPZrHaXDtvGGWzORrRjmcVYGUA/ZQyIjXqmdSi60D6mX5E3ZLSXdW8Nq Gfwfe+0IJmeR3WNVK6jiLdMT60T+COEQqnx35sBOvA6C7GiVQLz7XX0L+V9fY24vxg/l zvrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693525077; x=1694129877; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fDZsTig4/XXGa+HY3Fd7OR70XFCzSqOm9rvE3HjGjAg=; b=gWhzyfucK1LMY9vCETPtZKn6XGWIoYadQT1dTWgEyUA92fymjIAWdymWVELDx5XZly +rWMFznhcJWZiKSclX09nQSe9Gyv9wA4wbNV+IthOdOLAkjWCEG8uOk1IAjXNrRkOduC LtINIyy2Mqqjj7gGMoT2bsU4Kvcj3ZLbwUNn3tVROUXJ+IUyMnacJL9VlISkF8U41gHq xayn07VTE3Xu+aEdDcmFjrGS7ewVm8gynDC/wYtDlhuxCvqIUEUtjWNv21M2vPnkOf9N qVijpowhhxTArcce59OglDP2+oe53ENYUVJ70nmAFFLjXfH35OSyqcNuZOPW/p2VotoU oVgw== X-Gm-Message-State: AOJu0YzpuSj2spI13BoD247etI211wcUz7r884wGgPtnC0KB8nkYnOGv eifMmp9pd8QpKcfi58sigmaXcHR9rhJfRqw5Bj+EyA== X-Google-Smtp-Source: AGHT+IH6ECYRtcCw0Pa6sWuUVA3jxriLxcSjMyQrwU3NMHKvxSmyZ6Gm+ReqMSLC2GI9PjmEO8L9AehwStNuOWh5Ntw= X-Received: by 2002:a5d:5651:0:b0:318:c108:67b0 with SMTP id j17-20020a5d5651000000b00318c10867b0mr774738wrw.48.1693525077425; Thu, 31 Aug 2023 16:37:57 -0700 (PDT) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <07faf861-9186-47d1-992a-91d483ea4e9c@app.fastmail.com> <1db726d4-32c9-e1b8-51d6-981aa51b7825@FreeBSD.org> <20230831175350.981F1D5@slippy.cwsent.com> <20230831223526.DCB701A1@slippy.cwsent.com> <20230831233228.9935BA8@slippy.cwsent.com> In-Reply-To: <20230831233228.9935BA8@slippy.cwsent.com> From: Warner Losh Date: Thu, 31 Aug 2023 17:37:45 -0600 Message-ID: Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad To: Cy Schubert Cc: Alexander Motin , Gleb Smirnoff , Drew Gallatin , Martin Matuska , src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000a89ba10604408858" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4RcHf0186qz3Txp --000000000000a89ba10604408858 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Aug 31, 2023, 5:32 PM Cy Schubert wrote= : > In message <20230831223526.DCB701A1@slippy.cwsent.com>, Cy Schubert > writes: > > In message , > Alexander > > Motin > > writes: > > > On 31.08.2023 13:53, Cy Schubert wrote: > > > > One thing that circumvents my two problems is reducing poudriere > bulk job > > s > > > > from 8 to 5 on my 4 core machines. > > > > > > Cy, I have no real evidences to think it is related, other than your > > > panics look like some memory corruptions, but could you try is patch: > > > https://github.com/openzfs/zfs/pull/15228 . If it won't do the > trick, > > > then I am out of ideas without additional input. > > > > So far so good. Poudriere has been running with a decent -J jobs on bot= h > > machines for over an hour. I'll let you know if they survive the night. > It > > can take some time before the panics happen though. > > > > The problem is more likely to occur when there are a lot of small > package > > builds than large long running jobs, probably because of the parallel > ZFS > > dataset creations, deletions, and rollbacks. > > > > > > > > Gleb, you may try to add this too, just as a choice between impossibl= e > > > and improbable. > > > > > > -- > > > Alexander Motin > > > > > > -- > > Cheers, > > Cy Schubert > > FreeBSD UNIX: Web: https://FreeBSD.org > > NTP: Web: https://nwtime.org > > > > e^(i*pi)+1=3D0 > > > > > > One of the two machines is hung. > > cwfw# ping bob > PING bob (10.1.1.7): 56 data bytes > ^C > --- bob ping statistics --- > 2 packets transmitted, 0 packets received, 100.0% packet loss > cwfw# console bob > [Enter `^Ec?' for help] > [halt sent] > KDB: enter: Break to debugger > [ thread pid 31259 tid 100913 ] > Stopped at kdb_break+0x48: movq $0,0xa1069d(%rip) > db> bt > Tracing pid 31259 tid 100913 td 0xfffffe00c4eca000 > kdb_break() at kdb_break+0x48/frame 0xfffffe00c53ef2d0 > uart_intr() at uart_intr+0xf7/frame 0xfffffe00c53ef310 > intr_event_handle() at intr_event_handle+0x12b/frame 0xfffffe00c53ef380 > intr_execute_handlers() at intr_execute_handlers+0x63/frame > 0xfffffe00c53ef3b0 > Xapic_isr1() at Xapic_isr1+0xdc/frame 0xfffffe00c53ef3b0 > --- interrupt, rip =3D 0xffffffff806d5c70, rsp =3D 0xfffffe00c53ef480, rb= p =3D > 0xfffffe00c53ef480 --- > getbinuptime() at getbinuptime+0x30/frame 0xfffffe00c53ef480 > arc_access() at arc_access+0x250/frame 0xfffffe00c53ef4d0 > arc_buf_access() at arc_buf_access+0xd0/frame 0xfffffe00c53ef4f0 > dbuf_hold_impl() at dbuf_hold_impl+0xf3/frame 0xfffffe00c53ef580 > dbuf_hold() at dbuf_hold+0x25/frame 0xfffffe00c53ef5b0 > dnode_hold_impl() at dnode_hold_impl+0x194/frame 0xfffffe00c53ef670 > dmu_bonus_hold() at dmu_bonus_hold+0x20/frame 0xfffffe00c53ef6a0 > zfs_zget() at zfs_zget+0x20d/frame 0xfffffe00c53ef750 > zfs_dirent_lookup() at zfs_dirent_lookup+0x16d/frame 0xfffffe00c53ef7a0 > zfs_dirlook() at zfs_dirlook+0x7f/frame 0xfffffe00c53ef7d0 > zfs_lookup() at zfs_lookup+0x3c0/frame 0xfffffe00c53ef8a0 > zfs_freebsd_cachedlookup() at zfs_freebsd_cachedlookup+0x67/frame > 0xfffffe00c53ef9e0 > vfs_cache_lookup() at vfs_cache_lookup+0xa6/frame 0xfffffe00c53efa30 > vfs_lookup() at vfs_lookup+0x457/frame 0xfffffe00c53efac0 > namei() at namei+0x2e1/frame 0xfffffe00c53efb20 > vn_open_cred() at vn_open_cred+0x505/frame 0xfffffe00c53efca0 > kern_openat() at kern_openat+0x287/frame 0xfffffe00c53efdf0 > ia32_syscall() at ia32_syscall+0x156/frame 0xfffffe00c53eff30 > int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffff89dc > db> > > I'll let it continue. Hopefully the watchdog timer will pop and we get a > dump. > Might also be interesting to see if this moves around or is really hung getting the time. I suspect it's live lock given this traceback. Warner --=20 > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > e^(i*pi)+1=3D0 > > > J=EF=BE=90 =EF=BD=A4 =EF=BF=BD > --000000000000a89ba10604408858 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Aug 31, 2023, 5:32 PM Cy Schubert <Cy.Schubert@cschubert.com> wro= te:
In message <20230831223526.DCB701A1@slippy.cwsent.com>, Cy Schubert write= s:
> In message <a5c51f3f-8c7f-8bd5-f718-72bc33fe22ed@FreeBSD.org>, A= lexander
> Motin
> writes:
> > On 31.08.2023 13:53, Cy Schubert wrote:
> > > One thing that circumvents my two problems is reducing poudr= iere bulk job
> s
> > > from 8 to 5 on my 4 core machines.
> >
> > Cy, I have no real evidences to think it is related, other than y= our
> > panics look like some memory corruptions, but could you try is pa= tch:
> > https://github.com/openzfs/zfs/pull/15= 228 .=C2=A0 If it won't do the trick,
> > then I am out of ideas without additional input.
>
> So far so good. Poudriere has been running with a decent -J jobs on bo= th
> machines for over an hour. I'll let you know if they survive the n= ight. It
> can take some time before the panics happen though.
>
> The problem is more likely to occur when there are a lot of small pack= age
> builds than large long running jobs, probably because of the parallel = ZFS
> dataset creations, deletions, and rollbacks.
>
> >
> > Gleb, you may try to add this too, just as a choice between impos= sible
> > and improbable.
> >
> > --
> > Alexander Motin
>
>
> --
> Cheers,
> Cy Schubert <Cy.Schubert@cschubert.com>
> FreeBSD UNIX:=C2=A0 <cy@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 https://FreeBSD.org
> NTP:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<cy@nwtime.org>=C2= =A0 =C2=A0 Web:=C2=A0 https://nwtime.org
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0e^(i*pi)+1=3D0
>
>

One of the two machines is hung.

cwfw# ping bob
PING bob (10.1.1.7): 56 data bytes
^C
--- bob ping statistics ---
2 packets transmitted, 0 packets received, 100.0% packet loss
cwfw# console bob
[Enter `^Ec?' for help]
[halt sent]
KDB: enter: Break to debugger
[ thread pid 31259 tid 100913 ]
Stopped at=C2=A0 =C2=A0 =C2=A0 kdb_break+0x48: movq=C2=A0 =C2=A0 $0,0xa1069= d(%rip)
db> bt
Tracing pid 31259 tid 100913 td 0xfffffe00c4eca000
kdb_break() at kdb_break+0x48/frame 0xfffffe00c53ef2d0
uart_intr() at uart_intr+0xf7/frame 0xfffffe00c53ef310
intr_event_handle() at intr_event_handle+0x12b/frame 0xfffffe00c53ef380
intr_execute_handlers() at intr_execute_handlers+0x63/frame
0xfffffe00c53ef3b0
Xapic_isr1() at Xapic_isr1+0xdc/frame 0xfffffe00c53ef3b0
--- interrupt, rip =3D 0xffffffff806d5c70, rsp =3D 0xfffffe00c53ef480, rbp = =3D
0xfffffe00c53ef480 ---
getbinuptime() at getbinuptime+0x30/frame 0xfffffe00c53ef480
arc_access() at arc_access+0x250/frame 0xfffffe00c53ef4d0
arc_buf_access() at arc_buf_access+0xd0/frame 0xfffffe00c53ef4f0
dbuf_hold_impl() at dbuf_hold_impl+0xf3/frame 0xfffffe00c53ef580
dbuf_hold() at dbuf_hold+0x25/frame 0xfffffe00c53ef5b0
dnode_hold_impl() at dnode_hold_impl+0x194/frame 0xfffffe00c53ef670
dmu_bonus_hold() at dmu_bonus_hold+0x20/frame 0xfffffe00c53ef6a0
zfs_zget() at zfs_zget+0x20d/frame 0xfffffe00c53ef750
zfs_dirent_lookup() at zfs_dirent_lookup+0x16d/frame 0xfffffe00c53ef7a0
zfs_dirlook() at zfs_dirlook+0x7f/frame 0xfffffe00c53ef7d0
zfs_lookup() at zfs_lookup+0x3c0/frame 0xfffffe00c53ef8a0
zfs_freebsd_cachedlookup() at zfs_freebsd_cachedlookup+0x67/frame
0xfffffe00c53ef9e0
vfs_cache_lookup() at vfs_cache_lookup+0xa6/frame 0xfffffe00c53efa30
vfs_lookup() at vfs_lookup+0x457/frame 0xfffffe00c53efac0
namei() at namei+0x2e1/frame 0xfffffe00c53efb20
vn_open_cred() at vn_open_cred+0x505/frame 0xfffffe00c53efca0
kern_openat() at kern_openat+0x287/frame 0xfffffe00c53efdf0
ia32_syscall() at ia32_syscall+0x156/frame 0xfffffe00c53eff30
int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffff89dc db>

I'll let it continue. Hopefully the watchdog timer will pop and we get = a
dump.


Might also be interesting to see if this m= oves around or is really hung getting the time. I suspect it's live loc= k given this traceback.

= Warner

--
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:=C2=A0 <cy@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 ht= tps://FreeBSD.org
NTP:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<cy@nwtime.org>=C2=A0 =C2= =A0 Web:=C2=A0 https://nwtime.org

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 e^(i*pi)+1=3D0


=C2=A0J=EF=BE=90 =EF=BD=A4=C2=A0 =C2=A0=EF=BF=BD
--000000000000a89ba10604408858-- From nobody Thu Aug 31 23:40:23 2023 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 4RcHhp6gmnz4rlxf; Thu, 31 Aug 2023 23:40:26 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcHhp5MmYz3VVw; Thu, 31 Aug 2023 23:40:26 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTP id bjrnqLMzSLAoIbrH0qM87M; Thu, 31 Aug 2023 23:40:26 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPA id brGyqc1nTcyvubrGzqxE6h; Thu, 31 Aug 2023 23:40:26 +0000 X-Authority-Analysis: v=2.4 cv=VbHkgXl9 c=1 sm=1 tr=0 ts=64f124ea a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=UttIx32zK-AA:10 a=YxBL1-UpAAAA:8 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=NEAV23lmAAAA:8 a=EkcXrb_YAAAA:8 a=e0r49BRreBg573lirpUA:9 a=VOrSvM_a6J0YgARF:21 a=CjuIK1q_8ugA:10 a=UJ0tAi3fqDAA:10 a=gvFz51Dc2IYA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id C671F2E9; Thu, 31 Aug 2023 16:40:23 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 917DFAB; Thu, 31 Aug 2023 16:40:23 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Warner Losh cc: Cy Schubert , Alexander Motin , Gleb Smirnoff , Drew Gallatin , Martin Matuska , src-committers , "" , "" Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad In-reply-to: References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <07faf861-9186-47d1-992a-91d483ea4e9c@app.fastmail.com> <1db726d4-32c9-e1b8-51d6-981aa51b7825@FreeBSD.org> <20230831175350.981F1D5@slippy.cwsent.com> <20230831223526.DCB701A1@slippy.cwsent.com> <20230831233228.9935BA8@slippy.cwsent.com> Comments: In-reply-to Warner Losh message dated "Thu, 31 Aug 2023 17:37:45 -0600." 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 31 Aug 2023 16:40:23 -0700 Message-Id: <20230831234023.917DFAB@slippy.cwsent.com> X-CMAE-Envelope: MS4xfBnWtoQE6sEYHTZd12mn2WlOrZ+jKUE3P68rbEKIAlyV/WfEdJtPWBrzDzUgBBSFO1/EmqpriLReytIao/RMnXv0qsa2diUhiupVxeYwP/UHoXsgWZpR EfZt4SgsSTScXY3Sqd5p5xwIor79kHgQj6OP92JN1EQLd69z6fIx1J16h+nK1qhmXIouLF8OR9eGKcuMFwFVRknxuzxd1zZBHkXJVmSUdxSIyfXGEEFmONwh jieEKmF5TWUZEozcgaviKIE6MjkIqiwpeyOboLmWZF6SS4Uk1qkAHPl2pUPOhbpva/LFl74apvh1MYszGmo1gae+EuT7GNnTZ1G3aXOVSsJ9Dod/mk3Luhkd 2Iqc6SJmC/wijg0dhaj7LQZPcK9JK1HJF9W+iMX9XA8nLymflx7jeR1B1FV5uA44jcJWGvM7XUTbPzBkRYeEuFedibjRCA== X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4RcHhp5MmYz3VVw In message , Warner Losh writes: > On Thu, Aug 31, 2023, 5:32 PM Cy Schubert wrote= > : > > > In message <20230831223526.DCB701A1@slippy.cwsent.com>, Cy Schubert > > writes: > > > In message , > > Alexander > > > Motin > > > writes: > > > > On 31.08.2023 13:53, Cy Schubert wrote: > > > > > One thing that circumvents my two problems is reducing poudriere > > bulk job > > > s > > > > > from 8 to 5 on my 4 core machines. > > > > > > > > Cy, I have no real evidences to think it is related, other than your > > > > panics look like some memory corruptions, but could you try is patch: > > > > https://github.com/openzfs/zfs/pull/15228 . If it won't do the > > trick, > > > > then I am out of ideas without additional input. > > > > > > So far so good. Poudriere has been running with a decent -J jobs on bot= > h > > > machines for over an hour. I'll let you know if they survive the night. > > It > > > can take some time before the panics happen though. > > > > > > The problem is more likely to occur when there are a lot of small > > package > > > builds than large long running jobs, probably because of the parallel > > ZFS > > > dataset creations, deletions, and rollbacks. > > > > > > > > > > > Gleb, you may try to add this too, just as a choice between impossibl= > e > > > > and improbable. > > > > > > > > -- > > > > Alexander Motin > > > > > > > > > -- > > > Cheers, > > > Cy Schubert > > > FreeBSD UNIX: Web: https://FreeBSD.org > > > NTP: Web: https://nwtime.org > > > > > > e^(i*pi)+1=3D0 > > > > > > > > > > One of the two machines is hung. > > > > cwfw# ping bob > > PING bob (10.1.1.7): 56 data bytes > > ^C > > --- bob ping statistics --- > > 2 packets transmitted, 0 packets received, 100.0% packet loss > > cwfw# console bob > > [Enter `^Ec?' for help] > > [halt sent] > > KDB: enter: Break to debugger > > [ thread pid 31259 tid 100913 ] > > Stopped at kdb_break+0x48: movq $0,0xa1069d(%rip) > > db> bt > > Tracing pid 31259 tid 100913 td 0xfffffe00c4eca000 > > kdb_break() at kdb_break+0x48/frame 0xfffffe00c53ef2d0 > > uart_intr() at uart_intr+0xf7/frame 0xfffffe00c53ef310 > > intr_event_handle() at intr_event_handle+0x12b/frame 0xfffffe00c53ef380 > > intr_execute_handlers() at intr_execute_handlers+0x63/frame > > 0xfffffe00c53ef3b0 > > Xapic_isr1() at Xapic_isr1+0xdc/frame 0xfffffe00c53ef3b0 > > --- interrupt, rip =3D 0xffffffff806d5c70, rsp =3D 0xfffffe00c53ef480, rb= > p =3D > > 0xfffffe00c53ef480 --- > > getbinuptime() at getbinuptime+0x30/frame 0xfffffe00c53ef480 > > arc_access() at arc_access+0x250/frame 0xfffffe00c53ef4d0 > > arc_buf_access() at arc_buf_access+0xd0/frame 0xfffffe00c53ef4f0 > > dbuf_hold_impl() at dbuf_hold_impl+0xf3/frame 0xfffffe00c53ef580 > > dbuf_hold() at dbuf_hold+0x25/frame 0xfffffe00c53ef5b0 > > dnode_hold_impl() at dnode_hold_impl+0x194/frame 0xfffffe00c53ef670 > > dmu_bonus_hold() at dmu_bonus_hold+0x20/frame 0xfffffe00c53ef6a0 > > zfs_zget() at zfs_zget+0x20d/frame 0xfffffe00c53ef750 > > zfs_dirent_lookup() at zfs_dirent_lookup+0x16d/frame 0xfffffe00c53ef7a0 > > zfs_dirlook() at zfs_dirlook+0x7f/frame 0xfffffe00c53ef7d0 > > zfs_lookup() at zfs_lookup+0x3c0/frame 0xfffffe00c53ef8a0 > > zfs_freebsd_cachedlookup() at zfs_freebsd_cachedlookup+0x67/frame > > 0xfffffe00c53ef9e0 > > vfs_cache_lookup() at vfs_cache_lookup+0xa6/frame 0xfffffe00c53efa30 > > vfs_lookup() at vfs_lookup+0x457/frame 0xfffffe00c53efac0 > > namei() at namei+0x2e1/frame 0xfffffe00c53efb20 > > vn_open_cred() at vn_open_cred+0x505/frame 0xfffffe00c53efca0 > > kern_openat() at kern_openat+0x287/frame 0xfffffe00c53efdf0 > > ia32_syscall() at ia32_syscall+0x156/frame 0xfffffe00c53eff30 > > int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffff89dc > > db> > > > > I'll let it continue. Hopefully the watchdog timer will pop and we get a > > dump. > > > > > Might also be interesting to see if this moves around or is really hung > getting the time. I suspect it's live lock given this traceback. It's moving around. db> c [halt sent] KDB: enter: Break to debugger [ thread pid 31259 tid 100913 ] Stopped at kdb_break+0x48: movq $0,0xa1069d(%rip) db> bt Tracing pid 31259 tid 100913 td 0xfffffe00c4eca000 kdb_break() at kdb_break+0x48/frame 0xfffffe00c53ef410 uart_intr() at uart_intr+0xf7/frame 0xfffffe00c53ef450 intr_event_handle() at intr_event_handle+0x12b/frame 0xfffffe00c53ef4c0 intr_execute_handlers() at intr_execute_handlers+0x63/frame 0xfffffe00c53ef4f0 Xapic_isr1() at Xapic_isr1+0xdc/frame 0xfffffe00c53ef4f0 --- interrupt, rip = 0xffffffff807117c4, rsp = 0xfffffe00c53ef5c0, rbp = 0xfffffe00c53ef5c0 --- lock_delay() at lock_delay+0x14/frame 0xfffffe00c53ef5c0 _sx_xlock_hard() at _sx_xlock_hard+0x1a9/frame 0xfffffe00c53ef660 _sx_xlock() at _sx_xlock+0xb0/frame 0xfffffe00c53ef6a0 zfs_zget() at zfs_zget+0x1fa/frame 0xfffffe00c53ef750 zfs_dirent_lookup() at zfs_dirent_lookup+0x16d/frame 0xfffffe00c53ef7a0 zfs_dirlook() at zfs_dirlook+0x7f/frame 0xfffffe00c53ef7d0 zfs_lookup() at zfs_lookup+0x3c0/frame 0xfffffe00c53ef8a0 zfs_freebsd_cachedlookup() at zfs_freebsd_cachedlookup+0x67/frame 0xfffffe00c53ef9e0 vfs_cache_lookup() at vfs_cache_lookup+0xa6/frame 0xfffffe00c53efa30 vfs_lookup() at vfs_lookup+0x457/frame 0xfffffe00c53efac0 namei() at namei+0x2e1/frame 0xfffffe00c53efb20 vn_open_cred() at vn_open_cred+0x505/frame 0xfffffe00c53efca0 kern_openat() at kern_openat+0x287/frame 0xfffffe00c53efdf0 ia32_syscall() at ia32_syscall+0x156/frame 0xfffffe00c53eff30 int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffff89dc db> c -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Thu Aug 31 23:44:36 2023 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 4RcHnh17XFz4rmPs; Thu, 31 Aug 2023 23:44:40 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcHng5pkQz3W8s; Thu, 31 Aug 2023 23:44:39 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTP id bp28qFOK56NwhbrL5qBvzE; Thu, 31 Aug 2023 23:44:39 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPA id brL3qfYCK3fOSbrL4qX3Tm; Thu, 31 Aug 2023 23:44:39 +0000 X-Authority-Analysis: v=2.4 cv=J8G5USrS c=1 sm=1 tr=0 ts=64f125e7 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=UttIx32zK-AA:10 a=VxmjJ2MpAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=NEAV23lmAAAA:8 a=EkcXrb_YAAAA:8 a=xDwQH7ZLWR0dE5ld-7IA:9 a=VOrSvM_a6J0YgARF:21 a=CjuIK1q_8ugA:10 a=UJ0tAi3fqDAA:10 a=gvFz51Dc2IYA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 1D2C22F3; Thu, 31 Aug 2023 16:44:37 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 0EB38133; Thu, 31 Aug 2023 16:44:37 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: Warner Losh , Alexander Motin , Gleb Smirnoff , Drew Gallatin , Martin Matuska , src-committers , "" , "" Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad In-reply-to: <20230831234023.917DFAB@slippy.cwsent.com> References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <07faf861-9186-47d1-992a-91d483ea4e9c@app.fastmail.com> <1db726d4-32c9-e1b8-51d6-981aa51b7825@FreeBSD.org> <20230831175350.981F1D5@slippy.cwsent.com> <20230831223526.DCB701A1@slippy.cwsent.com> <20230831233228.9935BA8@slippy.cwsent.com> <20230831234023.917DFAB@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Thu, 31 Aug 2023 16:40:23 -0700." 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 31 Aug 2023 16:44:36 -0700 Message-Id: <20230831234437.0EB38133@slippy.cwsent.com> X-CMAE-Envelope: MS4xfJJjAxlA45qO+eE9rO/alj7ZUX7z7UXOvVbo2ZnVA/PhgKHu4dT9OkzteujT1nyqavuor1xQ9xDCLY+38FlzcoqLy81KEC9RasCs8PB95rkNpM7Ad4ZP 5MBz7fSqKwaAoY6y8SYkPtgSwlZYNVajEQw1XxEXBiAkSuGw2nzGymhT56L/JR4Sa8uEbo1/Km/OYvoE41ut86JjnssIdGoaE6FUkthJeubEluENvxHPfLe8 8IhQ+EDKvmRhyQJz2uLFVLv1aeJotfr5BSDBSvu5JT/J0jZBYp0NALTuLzt+Tt9poVAhLvCnXz2VXmYAhSJeGfwkKF++TwJOu5j5n/MaWg34s4g8lIDeuHZd 3pdtCiRxAH6vm8leuKQZk4tU3/xuPGPE3oI7rargyxhRv3iDVV5WwUfToncEEx95b1/n3AhANABTNF/YtyIadWHd8ZQPVw== X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4RcHng5pkQz3W8s In message <20230831234023.917DFAB@slippy.cwsent.com>, Cy Schubert writes: > In message om> > , Warner Losh writes: > > On Thu, Aug 31, 2023, 5:32 PM Cy Schubert wrote > = > > : > > > > > In message <20230831223526.DCB701A1@slippy.cwsent.com>, Cy Schubert > > > writes: > > > > In message , > > > Alexander > > > > Motin > > > > writes: > > > > > On 31.08.2023 13:53, Cy Schubert wrote: > > > > > > One thing that circumvents my two problems is reducing poudriere > > > bulk job > > > > s > > > > > > from 8 to 5 on my 4 core machines. > > > > > > > > > > Cy, I have no real evidences to think it is related, other than your > > > > > panics look like some memory corruptions, but could you try is patch: > > > > > https://github.com/openzfs/zfs/pull/15228 . If it won't do the > > > trick, > > > > > then I am out of ideas without additional input. > > > > > > > > So far so good. Poudriere has been running with a decent -J jobs on bot > = > > h > > > > machines for over an hour. I'll let you know if they survive the night. > > > It > > > > can take some time before the panics happen though. > > > > > > > > The problem is more likely to occur when there are a lot of small > > > package > > > > builds than large long running jobs, probably because of the parallel > > > ZFS > > > > dataset creations, deletions, and rollbacks. > > > > > > > > > > > > > > Gleb, you may try to add this too, just as a choice between impossibl > = > > e > > > > > and improbable. > > > > > > > > > > -- > > > > > Alexander Motin > > > > > > > > > > > > -- > > > > Cheers, > > > > Cy Schubert > > > > FreeBSD UNIX: Web: https://FreeBSD.org > > > > NTP: Web: https://nwtime.org > > > > > > > > e^(i*pi)+1=3D0 > > > > > > > > > > > > > > One of the two machines is hung. > > > > > > cwfw# ping bob > > > PING bob (10.1.1.7): 56 data bytes > > > ^C > > > --- bob ping statistics --- > > > 2 packets transmitted, 0 packets received, 100.0% packet loss > > > cwfw# console bob > > > [Enter `^Ec?' for help] > > > [halt sent] > > > KDB: enter: Break to debugger > > > [ thread pid 31259 tid 100913 ] > > > Stopped at kdb_break+0x48: movq $0,0xa1069d(%rip) > > > db> bt > > > Tracing pid 31259 tid 100913 td 0xfffffe00c4eca000 > > > kdb_break() at kdb_break+0x48/frame 0xfffffe00c53ef2d0 > > > uart_intr() at uart_intr+0xf7/frame 0xfffffe00c53ef310 > > > intr_event_handle() at intr_event_handle+0x12b/frame 0xfffffe00c53ef380 > > > intr_execute_handlers() at intr_execute_handlers+0x63/frame > > > 0xfffffe00c53ef3b0 > > > Xapic_isr1() at Xapic_isr1+0xdc/frame 0xfffffe00c53ef3b0 > > > --- interrupt, rip =3D 0xffffffff806d5c70, rsp =3D 0xfffffe00c53ef480, rb > = > > p =3D > > > 0xfffffe00c53ef480 --- > > > getbinuptime() at getbinuptime+0x30/frame 0xfffffe00c53ef480 > > > arc_access() at arc_access+0x250/frame 0xfffffe00c53ef4d0 > > > arc_buf_access() at arc_buf_access+0xd0/frame 0xfffffe00c53ef4f0 > > > dbuf_hold_impl() at dbuf_hold_impl+0xf3/frame 0xfffffe00c53ef580 > > > dbuf_hold() at dbuf_hold+0x25/frame 0xfffffe00c53ef5b0 > > > dnode_hold_impl() at dnode_hold_impl+0x194/frame 0xfffffe00c53ef670 > > > dmu_bonus_hold() at dmu_bonus_hold+0x20/frame 0xfffffe00c53ef6a0 > > > zfs_zget() at zfs_zget+0x20d/frame 0xfffffe00c53ef750 > > > zfs_dirent_lookup() at zfs_dirent_lookup+0x16d/frame 0xfffffe00c53ef7a0 > > > zfs_dirlook() at zfs_dirlook+0x7f/frame 0xfffffe00c53ef7d0 > > > zfs_lookup() at zfs_lookup+0x3c0/frame 0xfffffe00c53ef8a0 > > > zfs_freebsd_cachedlookup() at zfs_freebsd_cachedlookup+0x67/frame > > > 0xfffffe00c53ef9e0 > > > vfs_cache_lookup() at vfs_cache_lookup+0xa6/frame 0xfffffe00c53efa30 > > > vfs_lookup() at vfs_lookup+0x457/frame 0xfffffe00c53efac0 > > > namei() at namei+0x2e1/frame 0xfffffe00c53efb20 > > > vn_open_cred() at vn_open_cred+0x505/frame 0xfffffe00c53efca0 > > > kern_openat() at kern_openat+0x287/frame 0xfffffe00c53efdf0 > > > ia32_syscall() at ia32_syscall+0x156/frame 0xfffffe00c53eff30 > > > int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffff89dc > > > db> > > > > > > I'll let it continue. Hopefully the watchdog timer will pop and we get a > > > dump. > > > > > > > > > Might also be interesting to see if this moves around or is really hung > > getting the time. I suspect it's live lock given this traceback. > > It's moving around. > > > db> c > [halt sent] > KDB: enter: Break to debugger > [ thread pid 31259 tid 100913 ] > Stopped at kdb_break+0x48: movq $0,0xa1069d(%rip) > db> bt > Tracing pid 31259 tid 100913 td 0xfffffe00c4eca000 > kdb_break() at kdb_break+0x48/frame 0xfffffe00c53ef410 > uart_intr() at uart_intr+0xf7/frame 0xfffffe00c53ef450 > intr_event_handle() at intr_event_handle+0x12b/frame 0xfffffe00c53ef4c0 > intr_execute_handlers() at intr_execute_handlers+0x63/frame > 0xfffffe00c53ef4f0 > Xapic_isr1() at Xapic_isr1+0xdc/frame 0xfffffe00c53ef4f0 > --- interrupt, rip = 0xffffffff807117c4, rsp = 0xfffffe00c53ef5c0, rbp = > 0xfffffe00c53ef5c0 --- > lock_delay() at lock_delay+0x14/frame 0xfffffe00c53ef5c0 > _sx_xlock_hard() at _sx_xlock_hard+0x1a9/frame 0xfffffe00c53ef660 > _sx_xlock() at _sx_xlock+0xb0/frame 0xfffffe00c53ef6a0 > zfs_zget() at zfs_zget+0x1fa/frame 0xfffffe00c53ef750 > zfs_dirent_lookup() at zfs_dirent_lookup+0x16d/frame 0xfffffe00c53ef7a0 > zfs_dirlook() at zfs_dirlook+0x7f/frame 0xfffffe00c53ef7d0 > zfs_lookup() at zfs_lookup+0x3c0/frame 0xfffffe00c53ef8a0 > zfs_freebsd_cachedlookup() at zfs_freebsd_cachedlookup+0x67/frame > 0xfffffe00c53ef9e0 > vfs_cache_lookup() at vfs_cache_lookup+0xa6/frame 0xfffffe00c53efa30 > vfs_lookup() at vfs_lookup+0x457/frame 0xfffffe00c53efac0 > namei() at namei+0x2e1/frame 0xfffffe00c53efb20 > vn_open_cred() at vn_open_cred+0x505/frame 0xfffffe00c53efca0 > kern_openat() at kern_openat+0x287/frame 0xfffffe00c53efdf0 > ia32_syscall() at ia32_syscall+0x156/frame 0xfffffe00c53eff30 > int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffff89dc > db> c It seems to have settled there for now. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Thu Aug 31 23:56:12 2023 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 4RcJ324zRWz4rn1j; Thu, 31 Aug 2023 23:56:14 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcJ324H8Bz3Wg4; Thu, 31 Aug 2023 23:56:14 +0000 (UTC) (envelope-from gjb@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693526174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=12UGubNdhrt+kOvNWv4hFhRoBNw5FXwFm+/oJ37MBw8=; b=emIVy8i5kvboLS/S+pmRt6iK1n+hcPmPaEaGWvwJIXM3/DdwD6G6n4EL3LSMOOWV/Jow3y 4qcfKfQbX1cuiJHemPLCGdYJrOHWcWqF5UYLLANA8TzhtCFD3T8KC+hOnsVFDWc7Yo7VOr qmiKtypAWe2YBsAd5qErJKBcWwLbu+QWrFWI4LmQ/6nJ36pE5RczjTqWYBhGO7rtclfFDf jA6RFIsUwESG538uUVUzmUE0v5Ttr6Ea73mHctukzuvLyWuQBDgqTgSVBisCEPl2yQkMU5 Sg25QtmQtO8j3TmnkJS2ChiAlMLlpHWqEI9srel3Vw47thWOGpWiQ4w50AoH+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693526174; a=rsa-sha256; cv=none; b=XAqzPBDZDxjCVJ5ddtRJVnaeNESV1I0b3RDfx/gggceN+5/A59/HVcZS5FmyyxyDsksPJt Dp8F3UpJaK5oqPvXJC8x7PQH1lhvmID6ZXi0mXn116F9rnw7GOXoCSBblf1HsSqNfw+DQA xHAhi6wn5ZiR04TH1M+ULUvitHwbW8yY9+hppXwimEPUT0KFYAynEKbbyBLV6OEFWu84PN krkh+iwNoKYT4IlOxcoUbP9IQ+gnbrnp5COWTDO60BU3x3pf2blxcwZKGhNuFUcVALo6Em 3wGO1fvH5a2dXDoS+YIqig3ShaXMQfhB8VDHwTDU28K5NnOlBuBdduYF8I3h5w== 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=1693526174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=12UGubNdhrt+kOvNWv4hFhRoBNw5FXwFm+/oJ37MBw8=; b=l/aiayq/LD0fRglFSm88wI/EVrum5EjGbE3d+FM1efFylgNiEh68OxatVHNkRzNREO+xpt mUDbYVLSDkXW94k81mL/PUYFmMzNp7oy7AXryzewv6yFU83HNXWNA29+Jx44Wx0vlb2qPC S5SH4X/+R2WTcOsuwEHewYMRCKOEUKM41LuOFGPgJe6u6ixSnarf/XRYjQ7zoYFIx3F/N5 3FV2cdbMPIdRvpz9aRFP/XXf+wtj8D0fsHKROdEBDCGkTmwMJ3w0P8m/w1ISrW/XaWyJva sDt/I7sSunqYZ7K8P1A3mTzuk62cDsXZsrhHrIinQzU67lodiw1AOQq06dbRSg== Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 343AD1EB1C; Thu, 31 Aug 2023 23:56:14 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Thu, 31 Aug 2023 23:56:12 +0000 From: Glen Barber To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: db08e8ba0e7b - main - Re-remove $FreeBSD$ inadvertantly put back into jail.8 Message-ID: <20230831235612.GT4090@FreeBSD.org> References: <202308312235.37VMZxSj044998@gitrepo.freebsd.org> <20230831233032.GS4090@FreeBSD.org> 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OxDG9cJJSSQMUzGF" Content-Disposition: inline In-Reply-To: <20230831233032.GS4090@FreeBSD.org> --OxDG9cJJSSQMUzGF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 31, 2023 at 11:30:32PM +0000, Glen Barber wrote: [...] > There is no need to re-send your approval request to re@. Just include > this in the cherry-picked commits. >=20 I intended to trim the CC. Sorry for the public noise (and the noise generated by this follow-up). Glen --OxDG9cJJSSQMUzGF Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAmTxKJwACgkQAxRYpUeP 4pPk/RAAjj097uzfFkLPezPtbU9psNiIfzP1MVlfF5qanfnFQNvRnOyvbEt3SQJU 8Hj6CUd/CGW+1WrcnvxXc3xEMIM0gwPTvD0wf5vpL9WrrCHdkV9TSXbxrzT+whrk uOyGiDmK8LE7GcGraTcnqxk5WntrCYpMiGJcTv04jeqd3z7P6BPLSQMv2QlUcqAb duj8VysdfNLcwQJMwCUiH9tCI+h5Sjzyu6QeZtnMTmthys365ii7fRKsydzo+EP6 hbG1kqhx5Psxql/fddr4m/6hXl+t+od8mGvtO2UdU/qqIwxCLSojXLAK7YzhSv/k waQ7f7YSCw7y37d6vfaw8xS0cjhzuIAtfR6DUMZbCmYLZu33f7IesOc89eE0QpJC jllgPzR6pfZumbf3JmiyvjBlo4rKRSMXROJcmVsrUY+kMgOJr0i3EvHv6qplEr+4 4qWB4HQosFNZXtQXjsubm6paLw42OrJCTBU13UfuvKh82F1uV6wB2brJgiIRi7tG wJXyKWn7LcstxvAunxMaqWYlHAn+pAqwlV3CWradxLQMp09JoftF9wK9rsT+5kEz BtLyxji2xUblN+HbKeRIMp3cifHhqZ2N0vOvaznTktDNaldik5tHndMPi78dHpG4 +vmoBI39PrVJ3TQH8HDr8iXoxbyqWaZv0TInWcSn/GAoWZL//Ro= =ZnXQ -----END PGP SIGNATURE----- --OxDG9cJJSSQMUzGF-- From nobody Fri Sep 1 00:02:50 2023 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 4RcJBf3xyfz4rnJy; Fri, 1 Sep 2023 00:02:50 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcJBf3CBXz3ZN1; Fri, 1 Sep 2023 00:02:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693526570; 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=AXGYgSKJE24HMALdk8qpZk4kE1nmkYegJXeaGeCqe+Y=; b=o7iH0Jw7bYzeVGFJwD/NI+s0qZTA2G2jJOw4Br9f1X8OgAlbR16f/wZKHRsLb5Rm0pRHNk 3/+Pq4mDEbQbFpswajxAqPsiRwSj6hen0w6mrYlXG2P13gIvNCcxBJo/5n1tmFUfDf8oZj MAAsfPdV/xOTS8g7kO7xrwx1i7doL5HM3iic7CmGi87Ye3XOA63Dl1BrpHEiFzwwsLSDG2 PYzPsGRUjOxjO2hahRPTYEAcv8IdsaAGEJGhHevE2J6r49WvacOnVTxBGMYMkGKw1rka4V NbaniQvu/dhSFjLvFvut/tbP6mAcr8YCuahOe1/msI8cnda0eDhTh1tONv4l/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693526570; a=rsa-sha256; cv=none; b=fglmzW8vUQ7IIu7qm1PrxgB/dn+oIkvH9kgYek5peh7kcUZg3IK2A5nbGQ0R+FqRaTVSLn SopdBAoucbZszJt/Ycx0yGZ2vC3DsJmBmplwzRVbA8LBgr9RlbePhq8VMWx0qIVbFk1hGO PV01bRfIk5lDwWt6mc/UdewsY7M8Jz1JH8OUbshmlBsik8jHUL4SqklSS+4BDVd9SJlSoT edNw+nyqPO5vPctLD8cMguxWHACwKSk3GHIyurJJyovGyIvzTLtNcDnMJYPyqkFxAENT7e xhr0OaY4wI8LAi1d0quJ1ltZfSWYxaRTDkf/qrtFr50Hr/aFwhDaXpSq8UoL5g== 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=1693526570; 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=AXGYgSKJE24HMALdk8qpZk4kE1nmkYegJXeaGeCqe+Y=; b=kmjLuGa/BsGTQCGi3/wss66z3Wt52NaSErDBXB93i8M2wwwtZ9rc0Xve+xJViILn4lBtQ2 nCGr7SlpZPqxY10/j7vMwSq5KSmejVb/MjuiHpch+7DdAF7gkGOheEo7oW4nMmsaaw563z sgLW2rhDG/SvWrdRuKDTfJ/FvjRnmtqiITik6+ceyKddrTVrhUgXWiSycDiVGw31CbgfL9 jlFbmNj6OVDAtQBghuAekD+8OqbVsW0EBJbBimHXjqU+p7jB9FoiHN7k9gjEtE0M9mBY7i 7IBHu7jHCVuWOSix1O1xPx/6tWhDbLWgvIiO1GmpbeNEOQHvU/CZ70h149zIHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcJBf2HsKzfTn; Fri, 1 Sep 2023 00:02:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38102otM093554; Fri, 1 Sep 2023 00:02:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38102o3m093551; Fri, 1 Sep 2023 00:02:50 GMT (envelope-from git) Date: Fri, 1 Sep 2023 00:02:50 GMT Message-Id: <202309010002.38102o3m093551@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 89aed8837f0d - main - makeman: clarify scope of ignored option values 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89aed8837f0da7143e12979f84fc253b59acaf30 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=89aed8837f0da7143e12979f84fc253b59acaf30 commit 89aed8837f0da7143e12979f84fc253b59acaf30 Author: Brooks Davis AuthorDate: 2023-08-31 23:58:39 +0000 Commit: Brooks Davis CommitDate: 2023-08-31 23:58:39 +0000 makeman: clarify scope of ignored option values The values of WITH_ and WITHOUT_ options are ignored, but group options are not. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41683 --- tools/build/options/makeman | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/build/options/makeman b/tools/build/options/makeman index ac5aaa8b8b03..c4a51ec7c56e 100755 --- a/tools/build/options/makeman +++ b/tools/build/options/makeman @@ -228,7 +228,11 @@ and .Va MAKEOBJDIRPREFIX as they are environment-only variables. .Pp -The values of variables are ignored regardless of their setting; +The values of +.Va WITH_ +and +.Va WITHOUT_ +variables are ignored regardless of their setting; even if they would be set to .Dq Li FALSE or From nobody Fri Sep 1 00:02:51 2023 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 4RcJBg5tPpz4rnPW; Fri, 1 Sep 2023 00:02:51 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcJBg4R3hz3ZKw; Fri, 1 Sep 2023 00:02:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693526571; 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=yG8/BCxz4ye+lrvwPPTYgY32KZJjeZMzdZZIC9X5FUk=; b=hTmT3enBzZFBAmJ9as38RlaUBPvPUMesMHAuxXDQj/l1ey72ma7KPTfvVcsIdqG3PLvqYy FzCF6hdWTLsyj22LAUG2BCFs+xmGHJs0gNwy53JcplSXYTNR4mKhc2fv2lD9YNhiA+pdeh ivbqiMO7cbQspmKDxyzfu8TlIXmxYeap5rpJSZS5LCsXrm9dIFZ/4dBsPDACTtM0uh8X2i cXUhj+xCfKFw3aCl2+p246Z9RM+0ZREKVZxWxerZgh+faiPpiaZ/KK/fEWwZOcagHZlp5q FRau/df1YNP5QMPiUOF9pT8KLjgE6XhXECqA0WGkjm6CIEzg+dNaOOryNo+rMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693526571; a=rsa-sha256; cv=none; b=DJG2FPfKPKVkNZyBUzTPbeci40dg2sKCXCP7dhtIzLT98B+CG38PmA7U28f7O4cmu+oPDK VVwff2PuHLHnPbWsRssCm9ehI9ACtFtGPTtTrJsxhgUN9Y1NPekhlH+fVv2Bx8Z2uLLgD+ 3VsT9sFQNKT42owGHsOPHuhDKjkiTwkJG6tVCKro0iE+19jQrsWEQhPpebIXkO3UHbDOZ2 APRH9cj7NRa4A2k+8F6zNHEReMJeuXuvT5Qp/U3jFzyhi4QyR4Dj1qgHDvq7dm8xvyr1tv 5xh267p9CLimER9n1/cqZsyYK8Y84MsP73F0R0xH5QkyIRqgByjRtvefSP0U6Q== 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=1693526571; 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=yG8/BCxz4ye+lrvwPPTYgY32KZJjeZMzdZZIC9X5FUk=; b=ic6N/AxKZFaK2AJvoxeRwhQRbfYsLTmoa13/bMJO37N6S22ZbXvMEbl7wBNFrPGykxgpM4 ycw4CM5mPBUogBK8p/Px+WHRqERjyUKLCCunq7Nm81OkHg7p4tepGzM8YS/rZ+dj6ZgSBF TQgx5qP7DjxExAK6u4FnMJ4L0JvVYSKod6829uKnrcwPFeYb0QgBfEn+1F+V62k8F6HKmn 1gSKplguJ9yuemy9jB1XdRNasIuiOML5qpaxOU78yBI2L/8YU3xlorerF8hkq5g49onbHU CtVAYPfWIzA4YNUzi5lySrRjk872Np3U8Wo0zTbTO7mX0dl6zxyjDfDBAGF7wg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcJBg3S0CzfML; Fri, 1 Sep 2023 00:02:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38102puT093589; Fri, 1 Sep 2023 00:02:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38102pcR093586; Fri, 1 Sep 2023 00:02:51 GMT (envelope-from git) Date: Fri, 1 Sep 2023 00:02:51 GMT Message-Id: <202309010002.38102pcR093586@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: d88983333447 - main - src.conf.5: regen 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d8898333344744342a28d8cb74b50588eb523bb7 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=d8898333344744342a28d8cb74b50588eb523bb7 commit d8898333344744342a28d8cb74b50588eb523bb7 Author: Brooks Davis AuthorDate: 2023-09-01 00:02:20 +0000 Commit: Brooks Davis CommitDate: 2023-09-01 00:02:20 +0000 src.conf.5: regen --- share/man/man5/src.conf.5 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 15c80af095e6..1bd6d19679f4 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd August 1, 2023 +.Dd September 1, 2023 .Dt SRC.CONF 5 .Os .Sh NAME @@ -78,7 +78,11 @@ and .Va MAKEOBJDIRPREFIX as they are environment-only variables. .Pp -The values of variables are ignored regardless of their setting; +The values of +.Va WITH_ +and +.Va WITHOUT_ +variables are ignored regardless of their setting; even if they would be set to .Dq Li FALSE or From nobody Fri Sep 1 00:04:29 2023 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 4RcJDc3kCJz4rnKh; Fri, 1 Sep 2023 00:04:32 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcJDc2btVz3bCW; Fri, 1 Sep 2023 00:04:32 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTP id biTCqEv6b6NwhbreJqBzMN; Fri, 01 Sep 2023 00:04:31 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPA id breIqzPupyAOebreIqV1Et; Fri, 01 Sep 2023 00:04:31 +0000 X-Authority-Analysis: v=2.4 cv=e5oV9Il/ c=1 sm=1 tr=0 ts=64f12a8f a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=UttIx32zK-AA:10 a=VxmjJ2MpAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=NEAV23lmAAAA:8 a=EkcXrb_YAAAA:8 a=MvHaf23w45GdYnbxqqAA:9 a=LhhIYMOyE9AJFHmb:21 a=CjuIK1q_8ugA:10 a=2tJrspVSXVUA:10 a=gvFz51Dc2IYA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id C2B753B5; Thu, 31 Aug 2023 17:04:29 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id B83BE1C0; Thu, 31 Aug 2023 17:04:29 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: Warner Losh , Alexander Motin , Gleb Smirnoff , Drew Gallatin , Martin Matuska , src-committers , "" , "" Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad In-reply-to: <20230831234437.0EB38133@slippy.cwsent.com> References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <07faf861-9186-47d1-992a-91d483ea4e9c@app.fastmail.com> <1db726d4-32c9-e1b8-51d6-981aa51b7825@FreeBSD.org> <20230831175350.981F1D5@slippy.cwsent.com> <20230831223526.DCB701A1@slippy.cwsent.com> <20230831233228.9935BA8@slippy.cwsent.com> <20230831234023.917DFAB@slippy.cwsent.com> <20230831234437.0EB38133@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Thu, 31 Aug 2023 16:44:36 -0700." 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 31 Aug 2023 17:04:29 -0700 Message-Id: <20230901000429.B83BE1C0@slippy.cwsent.com> X-CMAE-Envelope: MS4xfN6lseVqb6SFlykTn2PvKGeqEDaYjt9O58QUuOodYxV5zHpXU3zR2/bXiPse1Xo8WxkTKO1T+UbGRtJJYWCF8qG2OsO66CgvSns0X0+NO0I//YzVBL0W QnZ8y5RI+/vbItrmw8q9PAC+yfco5ATuYEom+KcV2q1hdorAOKoiEYYbrk7mNd9/SlQaNr+hDog9/ezyKpJkzFpryIqH6WXm6SeKdxMCY7bi7uXaEqa3RIWf +OKYP34Hx48Ln66igDZHkTCFjqSJn7EKk9/Jt67JLNYSVHvg882JjvkSI/FooPjXkBwlNd0Xf4u1GqtVYnmeDPdQ03IwWsqWDa942p774rURI+PelaGU+szw jEGLk2mMeR48iafUQFewoL/5J7qDrxshnF5eCSvo4NezAP1Dbn65uYWLYtfTrWh4S+7hQzCHy35ipuCp7p+LqewOFUhqyw== X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4RcJDc2btVz3bCW In message <20230831234437.0EB38133@slippy.cwsent.com>, Cy Schubert writes: > In message <20230831234023.917DFAB@slippy.cwsent.com>, Cy Schubert writes: > > In message c > > om> > > , Warner Losh writes: > > > On Thu, Aug 31, 2023, 5:32 PM Cy Schubert wro > te > > = > > > : > > > > > > > In message <20230831223526.DCB701A1@slippy.cwsent.com>, Cy Schubert > > > > writes: > > > > > In message , > > > > Alexander > > > > > Motin > > > > > writes: > > > > > > On 31.08.2023 13:53, Cy Schubert wrote: > > > > > > > One thing that circumvents my two problems is reducing poudriere > > > > bulk job > > > > > s > > > > > > > from 8 to 5 on my 4 core machines. > > > > > > > > > > > > Cy, I have no real evidences to think it is related, other than you > r > > > > > > panics look like some memory corruptions, but could you try is patc > h: > > > > > > https://github.com/openzfs/zfs/pull/15228 . If it won't do the > > > > trick, > > > > > > then I am out of ideas without additional input. > > > > > > > > > > So far so good. Poudriere has been running with a decent -J jobs on b > ot > > = > > > h > > > > > machines for over an hour. I'll let you know if they survive the nigh > t. > > > > It > > > > > can take some time before the panics happen though. > > > > > > > > > > The problem is more likely to occur when there are a lot of small > > > > package > > > > > builds than large long running jobs, probably because of the parallel > > > > ZFS > > > > > dataset creations, deletions, and rollbacks. > > > > > > > > > > > > > > > > > Gleb, you may try to add this too, just as a choice between impossi > bl > > = > > > e > > > > > > and improbable. > > > > > > > > > > > > -- > > > > > > Alexander Motin > > > > > > > > > > > > > > > -- > > > > > Cheers, > > > > > Cy Schubert > > > > > FreeBSD UNIX: Web: https://FreeBSD.org > > > > > NTP: Web: https://nwtime.org > > > > > > > > > > e^(i*pi)+1=3D0 > > > > > > > > > > > > > > > > > > One of the two machines is hung. > > > > > > > > cwfw# ping bob > > > > PING bob (10.1.1.7): 56 data bytes > > > > ^C > > > > --- bob ping statistics --- > > > > 2 packets transmitted, 0 packets received, 100.0% packet loss > > > > cwfw# console bob > > > > [Enter `^Ec?' for help] > > > > [halt sent] > > > > KDB: enter: Break to debugger > > > > [ thread pid 31259 tid 100913 ] > > > > Stopped at kdb_break+0x48: movq $0,0xa1069d(%rip) > > > > db> bt > > > > Tracing pid 31259 tid 100913 td 0xfffffe00c4eca000 > > > > kdb_break() at kdb_break+0x48/frame 0xfffffe00c53ef2d0 > > > > uart_intr() at uart_intr+0xf7/frame 0xfffffe00c53ef310 > > > > intr_event_handle() at intr_event_handle+0x12b/frame 0xfffffe00c53ef380 > > > > intr_execute_handlers() at intr_execute_handlers+0x63/frame > > > > 0xfffffe00c53ef3b0 > > > > Xapic_isr1() at Xapic_isr1+0xdc/frame 0xfffffe00c53ef3b0 > > > > --- interrupt, rip =3D 0xffffffff806d5c70, rsp =3D 0xfffffe00c53ef480, > rb > > = > > > p =3D > > > > 0xfffffe00c53ef480 --- > > > > getbinuptime() at getbinuptime+0x30/frame 0xfffffe00c53ef480 > > > > arc_access() at arc_access+0x250/frame 0xfffffe00c53ef4d0 > > > > arc_buf_access() at arc_buf_access+0xd0/frame 0xfffffe00c53ef4f0 > > > > dbuf_hold_impl() at dbuf_hold_impl+0xf3/frame 0xfffffe00c53ef580 > > > > dbuf_hold() at dbuf_hold+0x25/frame 0xfffffe00c53ef5b0 > > > > dnode_hold_impl() at dnode_hold_impl+0x194/frame 0xfffffe00c53ef670 > > > > dmu_bonus_hold() at dmu_bonus_hold+0x20/frame 0xfffffe00c53ef6a0 > > > > zfs_zget() at zfs_zget+0x20d/frame 0xfffffe00c53ef750 > > > > zfs_dirent_lookup() at zfs_dirent_lookup+0x16d/frame 0xfffffe00c53ef7a0 > > > > zfs_dirlook() at zfs_dirlook+0x7f/frame 0xfffffe00c53ef7d0 > > > > zfs_lookup() at zfs_lookup+0x3c0/frame 0xfffffe00c53ef8a0 > > > > zfs_freebsd_cachedlookup() at zfs_freebsd_cachedlookup+0x67/frame > > > > 0xfffffe00c53ef9e0 > > > > vfs_cache_lookup() at vfs_cache_lookup+0xa6/frame 0xfffffe00c53efa30 > > > > vfs_lookup() at vfs_lookup+0x457/frame 0xfffffe00c53efac0 > > > > namei() at namei+0x2e1/frame 0xfffffe00c53efb20 > > > > vn_open_cred() at vn_open_cred+0x505/frame 0xfffffe00c53efca0 > > > > kern_openat() at kern_openat+0x287/frame 0xfffffe00c53efdf0 > > > > ia32_syscall() at ia32_syscall+0x156/frame 0xfffffe00c53eff30 > > > > int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffff89d > c > > > > db> > > > > > > > > I'll let it continue. Hopefully the watchdog timer will pop and we get > a > > > > dump. > > > > > > > > > > > > > Might also be interesting to see if this moves around or is really hung > > > getting the time. I suspect it's live lock given this traceback. > > > > It's moving around. > > > > > > db> c > > [halt sent] > > KDB: enter: Break to debugger > > [ thread pid 31259 tid 100913 ] > > Stopped at kdb_break+0x48: movq $0,0xa1069d(%rip) > > db> bt > > Tracing pid 31259 tid 100913 td 0xfffffe00c4eca000 > > kdb_break() at kdb_break+0x48/frame 0xfffffe00c53ef410 > > uart_intr() at uart_intr+0xf7/frame 0xfffffe00c53ef450 > > intr_event_handle() at intr_event_handle+0x12b/frame 0xfffffe00c53ef4c0 > > intr_execute_handlers() at intr_execute_handlers+0x63/frame > > 0xfffffe00c53ef4f0 > > Xapic_isr1() at Xapic_isr1+0xdc/frame 0xfffffe00c53ef4f0 > > --- interrupt, rip = 0xffffffff807117c4, rsp = 0xfffffe00c53ef5c0, rbp = > > 0xfffffe00c53ef5c0 --- > > lock_delay() at lock_delay+0x14/frame 0xfffffe00c53ef5c0 > > _sx_xlock_hard() at _sx_xlock_hard+0x1a9/frame 0xfffffe00c53ef660 > > _sx_xlock() at _sx_xlock+0xb0/frame 0xfffffe00c53ef6a0 > > zfs_zget() at zfs_zget+0x1fa/frame 0xfffffe00c53ef750 > > zfs_dirent_lookup() at zfs_dirent_lookup+0x16d/frame 0xfffffe00c53ef7a0 > > zfs_dirlook() at zfs_dirlook+0x7f/frame 0xfffffe00c53ef7d0 > > zfs_lookup() at zfs_lookup+0x3c0/frame 0xfffffe00c53ef8a0 > > zfs_freebsd_cachedlookup() at zfs_freebsd_cachedlookup+0x67/frame > > 0xfffffe00c53ef9e0 > > vfs_cache_lookup() at vfs_cache_lookup+0xa6/frame 0xfffffe00c53efa30 > > vfs_lookup() at vfs_lookup+0x457/frame 0xfffffe00c53efac0 > > namei() at namei+0x2e1/frame 0xfffffe00c53efb20 > > vn_open_cred() at vn_open_cred+0x505/frame 0xfffffe00c53efca0 > > kern_openat() at kern_openat+0x287/frame 0xfffffe00c53efdf0 > > ia32_syscall() at ia32_syscall+0x156/frame 0xfffffe00c53eff30 > > int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffff89dc > > db> c > > It seems to have settled I manually panicked the machine. It captured a good dump of the above backtrace. This is the amd64 machine that was building i386 packages under poudriere. I purposely set -J high to stress it enough to panic the machine. This kernel includes amotin's patch from https://github.com/openzfs/zfs/pull /15228. This manually triggered panic is different from the one it suffered two days ago. The machine building amd64 packages is still running nicely but it's building some large packages. Because of this there's not as much stress on zfs. The panicked machine was building a lot of small packages. As such it was doing a lot of zfs clones, destroys, and rollbacks. I'll take a look at the dump after dinner tonight. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Fri Sep 1 00:19:59 2023 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 4RcJrp0fx9z4rpYj; Fri, 1 Sep 2023 00:32:26 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcJrn43llz3cdY; Fri, 1 Sep 2023 00:32:25 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 3.97.99.33) smtp.mailfrom=cy.schubert@cschubert.com; dmarc=none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTP id bp28qFOK66NwhbrtKqC1pp; Fri, 01 Sep 2023 00:20:02 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPA id brtIqfhf73fOSbrtJqX7aA; Fri, 01 Sep 2023 00:20:02 +0000 X-Authority-Analysis: v=2.4 cv=J8G5USrS c=1 sm=1 tr=0 ts=64f12e32 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=UttIx32zK-AA:10 a=VxmjJ2MpAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=NEAV23lmAAAA:8 a=EkcXrb_YAAAA:8 a=45_lsCV5zqt6W4nhKLUA:9 a=kbdmn2KRkxbFYjns:21 a=CjuIK1q_8ugA:10 a=o4MvjAAMTzsA:10 a=2tJrspVSXVUA:10 a=gvFz51Dc2IYA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 312D33D9; Thu, 31 Aug 2023 17:20:00 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id E463A1C3; Thu, 31 Aug 2023 17:19:59 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: Warner Losh , Alexander Motin , Gleb Smirnoff , Drew Gallatin , Martin Matuska , src-committers , "" , "" Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad Comments: In-reply-to Cy Schubert message dated "Thu, 31 Aug 2023 17:04:29 -0700." 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 31 Aug 2023 17:19:59 -0700 Message-Id: <20230901001959.E463A1C3@slippy.cwsent.com> X-CMAE-Envelope: MS4xfJllWI4cyg+rrtDisuPaG/JQuAk1YMZBcHNCb4wjTct2DgKHcKTsCvgAfZPNzrywPQLvDETeIFQNJn5SMmDBknV5QOFodmP46xewnh+YVKXmGsVNDRMu fVfBpzqWZrKQCHlkIdLtUq97lhx/QbjpSFcYizRpmqK2/w0y64GFkQEJDcQeBDxAKLE8+cvRbs1/roNszTWHMOuziAG+7kkwJiTtcmv0ELGH4fp5KUGXGV3J uzEDN/m6bUWzrmGLDerGzUzap5nj4LjCB2t2Qo1IYC1iBARWLAf7ZZ1cHkwp4aKKwm/9zlOv2RfRI0ZTh9mYUp3cJOxsAH1dul87O1Rz8DkHms8WD5qqqLiY Ijlk6ydrTw8ivJHe9HiQz/jZjEJ8+kE9DMOltFFsJGJYnINiF0pbVRh5n4iG11w/aQmvIh+X48dEhzGOCPooUfOQ1fwn5Q== X-Spamd-Bar: ++ X-Spamd-Result: default: False [2.87 / 15.00]; R_BAD_CTE_7BIT(3.50)[7bit]; FAKE_REPLY(1.00)[]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.995]; NEURAL_HAM_LONG(-0.87)[-0.868]; NEURAL_HAM_SHORT(-0.67)[-0.667]; MV_CASE(0.50)[]; RWL_MAILSPIKE_EXCELLENT(-0.40)[3.97.99.33:from]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[3.97.99.33:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; DMARC_NA(0.00)[cschubert.com]; FROM_HAS_DN(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org,dev-commits-src-all@freebsd.org]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RCPT_COUNT_SEVEN(0.00)[9]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; MIME_TRACE(0.00)[0:+]; GREYLIST(0.00)[pass,body] X-Rspamd-Queue-Id: 4RcJrn43llz3cdY Cy Schubert writes: > In message <20230831234437.0EB38133@slippy.cwsent.com>, Cy Schubert writes: > > In message <20230831234023.917DFAB@slippy.cwsent.com>, Cy Schubert writes: > > > In message l. > > c > > > om> > > > , Warner Losh writes: > > > > On Thu, Aug 31, 2023, 5:32 PM Cy Schubert w > ro > > te > > > = > > > > : > > > > > > > > > In message <20230831223526.DCB701A1@slippy.cwsent.com>, Cy Schubert > > > > > writes: > > > > > > In message , > > > > > Alexander > > > > > > Motin > > > > > > writes: > > > > > > > On 31.08.2023 13:53, Cy Schubert wrote: > > > > > > > > One thing that circumvents my two problems is reducing poudrier > e > > > > > bulk job > > > > > > s > > > > > > > > from 8 to 5 on my 4 core machines. > > > > > > > > > > > > > > Cy, I have no real evidences to think it is related, other than y > ou > > r > > > > > > > panics look like some memory corruptions, but could you try is pa > tc > > h: > > > > > > > https://github.com/openzfs/zfs/pull/15228 . If it won't do the > > > > > trick, > > > > > > > then I am out of ideas without additional input. > > > > > > > > > > > > So far so good. Poudriere has been running with a decent -J jobs on > b > > ot > > > = > > > > h > > > > > > machines for over an hour. I'll let you know if they survive the ni > gh > > t. > > > > > It > > > > > > can take some time before the panics happen though. > > > > > > > > > > > > The problem is more likely to occur when there are a lot of small > > > > > package > > > > > > builds than large long running jobs, probably because of the parall > el > > > > > ZFS > > > > > > dataset creations, deletions, and rollbacks. > > > > > > > > > > > > > > > > > > > > Gleb, you may try to add this too, just as a choice between impos > si > > bl > > > = > > > > e > > > > > > > and improbable. > > > > > > > > > > > > > > -- > > > > > > > Alexander Motin > > > > > > > > > > > > > > > > > > -- > > > > > > Cheers, > > > > > > Cy Schubert > > > > > > FreeBSD UNIX: Web: https://FreeBSD.org > > > > > > NTP: Web: https://nwtime.org > > > > > > > > > > > > e^(i*pi)+1=3D0 > > > > > > > > > > > > > > > > > > > > > > One of the two machines is hung. > > > > > > > > > > cwfw# ping bob > > > > > PING bob (10.1.1.7): 56 data bytes > > > > > ^C > > > > > --- bob ping statistics --- > > > > > 2 packets transmitted, 0 packets received, 100.0% packet loss > > > > > cwfw# console bob > > > > > [Enter `^Ec?' for help] > > > > > [halt sent] > > > > > KDB: enter: Break to debugger > > > > > [ thread pid 31259 tid 100913 ] > > > > > Stopped at kdb_break+0x48: movq $0,0xa1069d(%rip) > > > > > db> bt > > > > > Tracing pid 31259 tid 100913 td 0xfffffe00c4eca000 > > > > > kdb_break() at kdb_break+0x48/frame 0xfffffe00c53ef2d0 > > > > > uart_intr() at uart_intr+0xf7/frame 0xfffffe00c53ef310 > > > > > intr_event_handle() at intr_event_handle+0x12b/frame 0xfffffe00c53ef3 > 80 > > > > > intr_execute_handlers() at intr_execute_handlers+0x63/frame > > > > > 0xfffffe00c53ef3b0 > > > > > Xapic_isr1() at Xapic_isr1+0xdc/frame 0xfffffe00c53ef3b0 > > > > > --- interrupt, rip =3D 0xffffffff806d5c70, rsp =3D 0xfffffe00c53ef480 > , > > rb > > > = > > > > p =3D > > > > > 0xfffffe00c53ef480 --- > > > > > getbinuptime() at getbinuptime+0x30/frame 0xfffffe00c53ef480 > > > > > arc_access() at arc_access+0x250/frame 0xfffffe00c53ef4d0 > > > > > arc_buf_access() at arc_buf_access+0xd0/frame 0xfffffe00c53ef4f0 > > > > > dbuf_hold_impl() at dbuf_hold_impl+0xf3/frame 0xfffffe00c53ef580 > > > > > dbuf_hold() at dbuf_hold+0x25/frame 0xfffffe00c53ef5b0 > > > > > dnode_hold_impl() at dnode_hold_impl+0x194/frame 0xfffffe00c53ef670 > > > > > dmu_bonus_hold() at dmu_bonus_hold+0x20/frame 0xfffffe00c53ef6a0 > > > > > zfs_zget() at zfs_zget+0x20d/frame 0xfffffe00c53ef750 > > > > > zfs_dirent_lookup() at zfs_dirent_lookup+0x16d/frame 0xfffffe00c53ef7 > a0 > > > > > zfs_dirlook() at zfs_dirlook+0x7f/frame 0xfffffe00c53ef7d0 > > > > > zfs_lookup() at zfs_lookup+0x3c0/frame 0xfffffe00c53ef8a0 > > > > > zfs_freebsd_cachedlookup() at zfs_freebsd_cachedlookup+0x67/frame > > > > > 0xfffffe00c53ef9e0 > > > > > vfs_cache_lookup() at vfs_cache_lookup+0xa6/frame 0xfffffe00c53efa30 > > > > > vfs_lookup() at vfs_lookup+0x457/frame 0xfffffe00c53efac0 > > > > > namei() at namei+0x2e1/frame 0xfffffe00c53efb20 > > > > > vn_open_cred() at vn_open_cred+0x505/frame 0xfffffe00c53efca0 > > > > > kern_openat() at kern_openat+0x287/frame 0xfffffe00c53efdf0 > > > > > ia32_syscall() at ia32_syscall+0x156/frame 0xfffffe00c53eff30 > > > > > int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffff8 > 9d > > c > > > > > db> > > > > > > > > > > I'll let it continue. Hopefully the watchdog timer will pop and we ge > t > > a > > > > > dump. > > > > > > > > > > > > > > > > > Might also be interesting to see if this moves around or is really hung > > > > getting the time. I suspect it's live lock given this traceback. > > > > > > It's moving around. > > > > > > > > > db> c > > > [halt sent] > > > KDB: enter: Break to debugger > > > [ thread pid 31259 tid 100913 ] > > > Stopped at kdb_break+0x48: movq $0,0xa1069d(%rip) > > > db> bt > > > Tracing pid 31259 tid 100913 td 0xfffffe00c4eca000 > > > kdb_break() at kdb_break+0x48/frame 0xfffffe00c53ef410 > > > uart_intr() at uart_intr+0xf7/frame 0xfffffe00c53ef450 > > > intr_event_handle() at intr_event_handle+0x12b/frame 0xfffffe00c53ef4c0 > > > intr_execute_handlers() at intr_execute_handlers+0x63/frame > > > 0xfffffe00c53ef4f0 > > > Xapic_isr1() at Xapic_isr1+0xdc/frame 0xfffffe00c53ef4f0 > > > --- interrupt, rip = 0xffffffff807117c4, rsp = 0xfffffe00c53ef5c0, rbp = > > > 0xfffffe00c53ef5c0 --- > > > lock_delay() at lock_delay+0x14/frame 0xfffffe00c53ef5c0 > > > _sx_xlock_hard() at _sx_xlock_hard+0x1a9/frame 0xfffffe00c53ef660 > > > _sx_xlock() at _sx_xlock+0xb0/frame 0xfffffe00c53ef6a0 > > > zfs_zget() at zfs_zget+0x1fa/frame 0xfffffe00c53ef750 > > > zfs_dirent_lookup() at zfs_dirent_lookup+0x16d/frame 0xfffffe00c53ef7a0 > > > zfs_dirlook() at zfs_dirlook+0x7f/frame 0xfffffe00c53ef7d0 > > > zfs_lookup() at zfs_lookup+0x3c0/frame 0xfffffe00c53ef8a0 > > > zfs_freebsd_cachedlookup() at zfs_freebsd_cachedlookup+0x67/frame > > > 0xfffffe00c53ef9e0 > > > vfs_cache_lookup() at vfs_cache_lookup+0xa6/frame 0xfffffe00c53efa30 > > > vfs_lookup() at vfs_lookup+0x457/frame 0xfffffe00c53efac0 > > > namei() at namei+0x2e1/frame 0xfffffe00c53efb20 > > > vn_open_cred() at vn_open_cred+0x505/frame 0xfffffe00c53efca0 > > > kern_openat() at kern_openat+0x287/frame 0xfffffe00c53efdf0 > > > ia32_syscall() at ia32_syscall+0x156/frame 0xfffffe00c53eff30 > > > int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffff89dc > > > db> c > > > > It seems to have settled there for now. > > I manually panicked the machine. It captured a good dump of the above > backtrace. > > This is the amd64 machine that was building i386 packages under poudriere. > I purposely set -J high to stress it enough to panic the machine. > > This ker> /15228. This manually triggered panic is different from the one it suffered > two days ago. > > The machine building amd64 packages is still running nicely but it's > building some large packages. Because of this there's not as much stress on > zfs. The panicked machine was building a lot of small packages. As such it > was doing a lot of zfs clones, destroys, and rollbacks. An initial look at the dump: (kgdb) bt #0 __curthread () at /opt/src/git-src/sys/amd64/include/pcpu_aux.h:57 #1 doadump (textdump=textdump@entry=1) at /opt/src/git-src/sys/kern/kern_shutdown.c:405 #2 0xffffffff806c1b30 in kern_reboot (howto=260) at /opt/src/git-src/sys/kern/kern_shutdown.c:526 #3 0xffffffff806c202f in vpanic (fmt=0xffffffff80b8653c "from debugger", ap=ap@entry=0xfffffe00c53eef30) at /opt/src/git-src/sys/kern/kern_shutdown.c:970 #4 0xffffffff806c1dd3 in panic (fmt=) at /opt/src/git-src/sys/kern/kern_shutdown.c:894 #5 0xffffffff80413937 in db_panic (addr=, have_addr=, count=, modif=) at /opt/src/git-src/sys/ddb/db_command.c:531 #6 0xffffffff80412ddd in db_command (last_cmdp=, cmd_table=, dopager=true) at /opt/src/git-src/sys/ddb/db_command.c:504 #7 0xffffffff80412a9d in db_command_loop () at /opt/src/git-src/sys/ddb/db_command.c:551 #8 0xffffffff80416176 in db_trap (type=, code=) at /opt/src/git-src/sys/ddb/db_main.c:268 #9 0xffffffff80710993 in kdb_trap (type=type@entry=3, code=code@entry=0, tf=tf@entry=0xfffffe00c53ef340) at /opt/src/git-src/sys/kern/subr_kdb.c: 790 #10 0xffffffff80a72cb9 in trap (frame=0xfffffe00c53ef340) at /opt/src/git-src/sys/amd64/amd64/trap.c:608 #11 #12 kdb_enter (why=, msg=) at /opt/src/git-src/sys/kern/subr_kdb.c:556 #13 kdb_break () at /opt/src/git-src/sys/kern/subr_kdb.c:346 #14 0xffffffff804dc7f7 in uart_intr_break (arg=0xfffff80006b84400) at /opt/src/git-src/sys/dev/uart/uart_core.c:298 #15 uart_intr (arg=0xfffff80006b84400) at /opt/src/git-src/sys/dev/uart/uart_core.c:439 #16 0xffffffff8067ae8b in intr_event_handle (ie=ie@entry=0xfffff80005814c00, frame=frame@entry=0xfffffe00c53ef500) at /opt/src/git-src/sys/kern/kern_intr.c:1410 #17 0xffffffff80a37653 in intr_execute_handlers (isrc=0xfffff8000580c9c8, --Type for more, q to quit, c to continue without paging--c frame=0xfffffe00c53ef500) at /opt/src/git-src/sys/x86/x86/intr_machdep.c:354 #18 #19 lock_delay (la=la@entry=0xfffffe00c53ef600) at /opt/src/git-src/sys/kern/subr_lock.c:124 #20 0xffffffff806ccfb9 in _sx_xlock_hard (sx=sx@entry=0xfffff80123712340, x=, opts=opts@entry=0, file=file@entry=0xffffffff81910597 "/opt/src/git-src/sys/contrib/openzfs /module/os/freebsd/zfs/zfs_znode.c", line=line@entry=949) at /opt/src/git-src/sys/kern/kern_sx.c:693 #21 0xffffffff806ccdb0 in _sx_xlock (sx=sx@entry=0xfffff80123712340, opts=opts@entry=0, file=0xffffffff81910597 "/opt/src/git-src/sys/contrib/openzfs/module/os/ freebsd/zfs/zfs_znode.c", line=line@entry=949) at /opt/src/git-src/sys/kern/kern_sx.c:330 #22 0xffffffff816b4ffa in zfs_zget (zfsvfs=zfsvfs@entry=0xfffff80123712000, obj_num=80130, zpp=zpp@entry=0xfffffe00c53ef760) at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode. c:949 #23 0xffffffff816a018d in zfs_dirent_lookup (dzp=dzp@entry=0xfffff80131e6dae 0, name=0xfffffe00c53ef8c0 "xlocale", zpp=zpp@entry=0xfffffe00c53ef7b0, flag=flag@entry=2) at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_dir.c: 190 #24 0xffffffff816a028f in zfs_dirlook (dzp=dzp@entry=0xfffff80131e6dae0, name=0xfffffe00c4bbdc80 "", name@entry=0xfffffe00c53ef8c0 "xlocale", zpp=zpp@entry=0xfffffe00c53ef860) at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_dir.c: 246 #25 0xffffffff816b0d20 in zfs_lookup (dvp=0xfffff800c2da9380, nm=nm@entry=0xfffffe00c53ef8c0 "xlocale", vpp=0xfffffe00c53efd10, cnp=cnp@entry=0xfffffe00c53efd38, nameiop=0, cr=, flags=0, cached=1) at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_ os.c:923 #26 0xffffffff816ab907 in zfs_freebsd_lookup (ap=0xfffffe00c53ef9f0, cached=1) at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_ os.c:4558 #27 zfs_freebsd_cachedlookup (ap=0xfffffe00c53ef9f0) at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_ os.c:4566 #28 0xffffffff80797d86 in VOP_CACHEDLOOKUP (dvp=0xfffff800c2da9380, vpp=0xfffffe00c53efd10, cnp=0xfffffe00c53efd38) at ./vnode_if.h:101 #29 vfs_cache_lookup (ap=) at /opt/src/git-src/sys/kern/vfs_cache.c:3068 #30 0xffffffff807a9487 in VOP_LOOKUP (dvp=0xfffff800c2da9380, vpp=0xfffffe00c53efd10, cnp=0xfffffe00c53efd38) at ./vnode_if.h:67 #31 vfs_lookup (ndp=ndp@entry=0xfffffe00c53efcb8) at /opt/src/git-src/sys/kern/vfs_lookup.c:1252 #32 0xffffffff807a8531 in namei (ndp=ndp@entry=0xfffffe00c53efcb8) at /opt/src/git-src/sys/kern/vfs_lookup.c:684 #33 0xffffffff807d0095 in vn_open_cred (ndp=ndp@entry=0xfffffe00c53efcb8, flagp=flagp@entry=0xfffffe00c53efdc4, cmode=cmode@entry=0, vn_open_flags=vn_open_flags@entry=16, cred=0xfffff801ea492800, fp=0xfffff801b9a54690) at /opt/src/git-src/sys/kern/vfs_vnops.c:331 #34 0xffffffff807c61f7 in kern_openat (td=0xfffffe00c4eca000, fd=-100, path=0xffff8a24 , pathseg=UIO_USERSPACE, flags=1048577, mode=) at /opt/src/git-src/sys/kern/vfs_syscalls.c:1165 #35 0xffffffff80a993a6 in syscallenter (td=0xfffffe00c4eca000) at /opt/src/git-src/sys/amd64/ia32/../../kern/subr_syscall.c:187 #36 ia32_syscall (frame=0xfffffe00c53eff40) at /opt/src/git-src/sys/amd64/ia32/ia32_syscall.c:222 #37 0xffffffff80a47f8f in int0x80_syscall_common () at /opt/src/git-src/sys/amd64/ia32/ia32_exception.S:75 #38 0x0000000026a12000 in ?? () #39 0x0000000000000000 in ?? () (kgdb) > > I'll take a look at the dump after dinner tonight. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Fri Sep 1 02:10:54 2023 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 4RcM2Q4gwMz4rv56; Fri, 1 Sep 2023 02:10:54 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcM2Q3dBNz4HBD; Fri, 1 Sep 2023 02:10:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693534254; 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=9MvCiEGwSjDgtXlLMY8cdD+ahKPUnZ66+pKY1O7aBps=; b=fegPbIDrBakK2GRapuTTAJKKx91UlzXV65gqdFsDnOlNnFeLJ6DZ1RD/rFZPkh6q6sA+LR etNg/zCbqsMqDypxiLYsgNm61VohsFC2qG8t66mMRwTJ9/NtpEO4o4wquqDKFAKZDOsoxa poX3co/6XjoP2n74cEBJvJ9O4B90m6/J1rgxO0Mfv+bWS0fv5kj4YgdlfUcG10DMu3/Nse K7PuXND8DgUmp57XU+VHQu5WthraUCFBpVKnbhXnlJSRc8mIz+pUBfEnei7ehQR6GWm8WA dpYe6PZBWboGaPcTwO/C8Fnwx1mhjhX+gW7xvjZ6YHgNFQVHqfNKBC0MoE5SCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693534254; a=rsa-sha256; cv=none; b=j2+8VNSCPglQa9WTjK3QsQ0HOjPXQt41Dn9c7FOLHyaIy8/KpIdv4keucdCWOYFZYy6KqS MZMbaBt0noF1MWxorPWOvANkrmaAcOoq11ZjgERH2bcTBsTo1KYh/K0oc7CONsEiHgoYRe xdrbdDk9sMl4I4rjmcCDBC0Sk8bQRtnAooPsJyiihfb7msTKkBzOwBQxobM2CCX9UIRUdq xh9LjkLT6A/rIiwMGaGm2EsTUvsywyXV8HxtXGXruR6DyOw3/6c3ViBGPkEoH4Pc1zlIU8 eZySoBBtoYXq4Iuowaj8mrbwSUNqVlCn/tQJelafGDWJFn63N8P4ubNjyGea7A== 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=1693534254; 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=9MvCiEGwSjDgtXlLMY8cdD+ahKPUnZ66+pKY1O7aBps=; b=ooHLQLNXh5zT9m9aFLDVpIdPiIR4ti+7Lx2fIqaY86Ddv9AG3a6UJ54c+QLKZzzmLD9AGY Rc+aru9LYFVRvjvnV+nYJUQVePAUFYLn7G0ZhtuivH10by0dhUEilauKjwKbwNlAV0kp6o 6+Q6GcmvB9bm+Hasixz52My/covQeWkP+OTVBY9PshMdXL+TXGcF6jALuxsEsaQ+D7klKk 4hK508PDswuc+FR6qS9U6AzZ70U2RksUx3nnVHXTociKXhqSQ3OJMmbsO6tyZsWARZs9vJ adKugnDTTJ4lxC/XWrjl2Cs7gfyYauI8lUI9YBaZ6JnYuOWUHT5Etbc49DeRng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcM2Q2k4qzjRQ; Fri, 1 Sep 2023 02:10:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3812AsYG004234; Fri, 1 Sep 2023 02:10:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3812AsLs004231; Fri, 1 Sep 2023 02:10:54 GMT (envelope-from git) Date: Fri, 1 Sep 2023 02:10:54 GMT Message-Id: <202309010210.3812AsLs004231@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 03d104888cae - main - arm64: initialize pcb in the TBI/PAC/etc. fault case 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03d104888caea595960605a9ff010da7f39133dc Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=03d104888caea595960605a9ff010da7f39133dc commit 03d104888caea595960605a9ff010da7f39133dc Author: Kyle Evans AuthorDate: 2023-09-01 02:10:38 +0000 Commit: Kyle Evans CommitDate: 2023-09-01 02:10:38 +0000 arm64: initialize pcb in the TBI/PAC/etc. fault case After 2c10be9e06d, we may jump to the bad_far label without `pcb` being set, resulting in a follow-up fault as we may dereference it immediately after the jump if td_intr_nesting_level == 0. In this branch, it should be safe to dereference `td` as we're not handling the special case mentioned below of accessing it during promotion/demotion. This seems to fix a null ptr deref I hit during my most recent pkgbase build attempt on the Windows DevKit, though that was admittedly encountered while we were on the way to a panic from an apparent use-after-free in ZFS bits. Reviewed by: andrew, markj Fixes: 2c10be9e06d ("arm64: Handle translation faults for thread [..]") Differential Revision: https://reviews.freebsd.org/D41677 --- sys/arm64/arm64/trap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index 15f1f5e86a08..d1a48a2fd9f4 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -277,6 +277,7 @@ data_abort(struct thread *td, struct trapframe *frame, uint64_t esr, } else if (!ADDR_IS_CANONICAL(far)) { /* We received a TBI/PAC/etc. fault from the kernel */ error = KERN_INVALID_ADDRESS; + pcb = td->td_pcb; goto bad_far; } else if (ADDR_IS_KERNEL(far)) { /* From nobody Fri Sep 1 02:18:30 2023 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 4RcMCD3w7Bz4rvLP; Fri, 1 Sep 2023 02:18:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcMCD3N65z4HS0; Fri, 1 Sep 2023 02:18:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693534712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M0FvUJz3gWCxdpouV8eacwaakOXBGK/PpbOlCwZbyBs=; b=k2XbLOvzRaiqSVzhsmUlcUsmxSrc/Sc5XUlY3iGH/hOw7KgG85zWNqEGwX2ioXBAnvnKJu bWrGXEMn2s/M+WLFZGvcFPqpTgWDNXWYepI98cMqI7hgNM8lX7OFkG4a27jqH6rXMs/C5A Rkh6T61tRgpOQyVtfs/udf2cJKYrQUdV8tJ26dq/6HI7wJZouaKT1dfs39E1wluYxwraJo cOg3OPFAqtR3nPnB1QIw3Q2G+6D0MSx7ZuC34qFf6LCDYaMbyOcde1L2KoWhCgqU5np/i2 xVX3HGTaw0IjAj0lppxk/+x0L72J8rb2MEqT7MEpEvg4JXzlUshcgRKMpR65RQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693534712; a=rsa-sha256; cv=none; b=j/gUBHMv6ovfhGfE5+FqMCAFx5ynDJgV+xpRZCDJGxRaAKBP8KqK3UnHGUKlEr6dov8EkJ zDgAKEgdcc2aQDKgHepyp6Kkr9WmssE5jFXjEOB24g8/FhsM/XhebrNQNBG2vvmJV5zlMH thakvcuGMbZ5qDxau3O+2ZaQjb/RR8vnGh1CqTAVifVX6HJbF1pERh0mes9vROjdI8UyPm Bt4qXLEj3WTJ7wPVyif0+B04GWTmWUQs8pr00ZDJp4RTMc2LWJIEqFxuYtveKM50hmSpV/ t4DRdnbxwjGxHRRxZZpvL/AhqmRkJZ2ouKeLlf9v2n3iEuMJRKc9+xi1v73omg== 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=1693534712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M0FvUJz3gWCxdpouV8eacwaakOXBGK/PpbOlCwZbyBs=; b=jYtqo7Uee7X9OjB3rjVVGbjmq0hMUPp20RIVLmrfNd7Nc0peI+xh7ZwoknYscVjRccRIKe I3FkOpbLiKUW3wSL/6/tGaZYdhKo/DGtgjmeSqt7FjrZyjx17Hr08uBiFX+nNXvN3sgGwY uTD/fbTc1u7gm8Wwb2tGgdC+pr1apbL/Llc9L5ML36Wqu8hpwVPG3jwaOSJAYyeZyULWEl HYmLHDE9Fdli4qNBvoUMaBdPBdbwdPCA9bJIcG21jUurLlshD08y6KIr5II6GtlJV6y8R9 RUljQkeSpin7+Te82r12CsBUn1cxRdpCl66qPWvCjTjPGrdRuxZWGR3oKQ2w1A== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RcMCC5bk7z1Csc; Fri, 1 Sep 2023 02:18:31 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: Date: Thu, 31 Aug 2023 21:18:30 -0500 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad Content-Language: en-US To: Alexander Motin , Gleb Smirnoff , Martin Matuska Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202308270509.37R596B5048298@gitrepo.freebsd.org> From: Kyle Evans In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 8/30/23 20:01, Alexander Motin wrote: > On 30.08.2023 20:09, Gleb Smirnoff wrote: >>    Hi Martin, >> >> we hit this panic with this update: >> >> panic: VERIFY(avl_is_empty(&lwb->lwb_vdev_tree)) failed >> >> cpuid = 8 >> time = 1693432004 >> KDB: stack backtrace: >> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame >> 0xfffffe09519aa800 >> vpanic() at vpanic+0x132/frame 0xfffffe09519aa930 >> spl_panic() at spl_panic+0x3a/frame 0xfffffe09519aa990 >> zil_free_lwb() at zil_free_lwb+0x1de/frame 0xfffffe09519aa9c0 >> zil_sync() at zil_sync+0x3cb/frame 0xfffffe09519aaaa0 >> [Wed Aug 30 21:46:44 2023]dmu_objset_sync() at >> dmu_objset_sync+0x51b/frame 0xfffffe09519aab70 >> dsl_pool_sync() at dsl_pool_sync+0x11d/frame 0xfffffe09519aabf0 >> spa_sync() at spa_sync+0xc68/frame 0xfffffe09519aae20 >> txg_sync_thread() at txg_sync_thread+0x2eb/frame 0xfffffe09519aaef0 >> fork_exit() at fork_exit+0x82/frame 0xfffffe09519aaf30 >> fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe09519aaf30 >> --- trap 0x26d90a2f, rip = 0xbba54c81b25fd8d4, rsp = >> 0xff60c2f6f9874bcd, rbp = 0x37940e3e9793bd40 -- >> >> I have two cores dumped for this panic. >> >> Our previous version is based on >> 9c0a2d522f3a18fc795a7dd6266d2be2aff4b084, which >> I guess has the most recent ZFS merge openzfs/zfs@009d3288d. >> > Hi Gleb, > > It is the first time I see a panic like this. I'll think about it > tomorrow. But I'd appreciate any information on what is your workload > and what are you doing related to ZIL (O_SYNC, fsync(), sync=always, > etc) to trigger it? What is your pool configuration? > Hello! Probably not related, but I seem to have hit a use-after-free in ZIL bits; is this something you're interested in? Backtrace is: #17 zio_nowait (zio=0xdeadc0dedeadc0de) at /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zio.c:2367 #18 0xffff00000160720c in zil_lwb_write_issue (zilog=zilog@entry=0xffffa00021631800, lwb=0xffffa00933d34c40) at /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zil.c:1935 --Type for more, q to quit, c to continue without paging-- #19 0xffff0000016031c0 in zil_commit_writer (zilog=0xffffa00021631800, zcw=0xffffa000fb01e140) at /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zil.c:2985 #20 zil_commit_impl (zilog=0xffffa00021631800, foid=) at /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zil.c:3489 #21 0xffff000001602f44 in zil_commit (zilog=, foid=) at /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zil.c:3452 #22 0xffff0000015fdac8 in zfs_fsync (zp=0xffffa007e27b23a0, syncflag=, cr=) at /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zfs_vnops.c:75 #23 0xffff00000056a864 in VOP_FSYNC (vp=0xffffa001d2003000, waitfor=1, td=0xffff00015aa94620) at ./vnode_if.h:763 #24 kern_fsync (td=0xffff00015aa94620, fd=, fullsync=true) at /usr/src.kbsd/sys/kern/vfs_syscalls.c:3556 #25 0xffff000000800630 in syscallenter (td=0xffff00015aa94620) at /usr/src.kbsd/sys/arm64/arm64/../../kern/subr_syscall.c:187 #26 svc_handler (td=0xffff00015aa94620, frame=) at /usr/src.kbsd/sys/arm64/arm64/trap.c:198 #27 do_el0_sync (td=0xffff00015aa94620, frame=) at /usr/src.kbsd/sys/arm64/arm64/trap.c:625 If I pop up to the zil_lwb_write_issue frame: (kgdb) print *lwb $4 = {lwb_zilog = 0xdeadc0dedeadc0de, lwb_blk = {blk_dva = {{dva_word = {16045693110842147038, 16045693110842147038}}, {dva_word = {16045693110842147038, 16045693110842147038}}, {dva_word = {16045693110842147038, 16045693110842147038}}}, blk_prop = 16045693110842147038, blk_pad = {16045693110842147038, 16045693110842147038}, blk_phys_birth = 16045693110842147038, blk_birth = 16045693110842147038, blk_fill = 16045693110842147038, blk_cksum = {zc_word = {16045693110842147038, 16045693110842147038, 16045693110842147038, 16045693110842147038}}}, lwb_slim = 3735929054, lwb_slog = 3735929054, lwb_error = -559038242, lwb_nmax = -559038242, lwb_nused = -559038242, lwb_nfilled = -559038242, lwb_sz = -559038242, lwb_state = 3735929054, lwb_buf = 0xdeadc0dedeadc0de , lwb_child_zio = 0xdeadc0dedeadc0de, lwb_write_zio = 0xdeadc0dedeadc0de, lwb_root_zio = 0xdeadc0dedeadc0de, lwb_issued_timestamp = -2401050962867404578, lwb_issued_txg = 16045693110842147038, lwb_alloc_txg = 16045693110842147038, lwb_max_txg = 16045693110842147038, lwb_node = {list_next = 0xdeadc0dedeadc0de, list_prev = 0xdeadc0dedeadc0de}, lwb_issue_node = {list_next = 0xdeadc0dedeadc0de, list_prev = 0xdeadc0dedeadc0de}, lwb_itxs = {list_size = 16045693110842147038, list_offset = 16045693110842147038, list_head = {list_next = 0xdeadc0dedeadc0de, list_prev = 0xdeadc0dedeadc0de}}, lwb_waiters = { list_size = 16045693110842147038, list_offset = 16045693110842147038, list_head = {list_next = 0xdeadc0dedeadc0de, list_prev = 0xdeadc0dedeadc0de}}, lwb_vdev_tree = {avl_root = 0xdeadc0dedeadc0de, avl_compar = 0xdeadc0dedeadc0de, avl_offset = 16045693110842147038, avl_numnodes = 16045693110842147038}, lwb_vdev_lock = {lock_object = { lo_name = 0xdeadc0dedeadc0de , lo_flags = 3735929054, lo_data = 3735929054, lo_witness = 0xdeadc0dedeadc0de}, sx_lock = 16045693110842147038}} It seems to have clearly been stomped on by uma trashing. Encountered while running a pkgbase build, I think while it was in the packaging phase. I note in particular in that frame: (kgdb) p/x lwb->lwb_issued_timestamp $4 = 0xdeadc0dedeadc0de So I guess it was freed sometime during one of the previous two zio_nowait() calls. Thanks, Kyle Evans From nobody Fri Sep 1 02:46:08 2023 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 4RcMqB2GTSz4rwwb; Fri, 1 Sep 2023 02:46:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcMq83p7Bz4LZh; Fri, 1 Sep 2023 02:46:12 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 3.97.99.32) smtp.mailfrom=cy.schubert@cschubert.com; dmarc=none Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTP id bjt5qLN5BLAoIbuAlqMVgL; Fri, 01 Sep 2023 02:46:11 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPA id buAjqejPSHFsObuAkqMzaj; Fri, 01 Sep 2023 02:46:11 +0000 X-Authority-Analysis: v=2.4 cv=XZqaca15 c=1 sm=1 tr=0 ts=64f15073 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=UttIx32zK-AA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=VxmjJ2MpAAAA:8 a=NEAV23lmAAAA:8 a=CXQmmfSMwurIqW0_v6AA:9 a=kbdmn2KRkxbFYjns:21 a=CjuIK1q_8ugA:10 a=o4MvjAAMTzsA:10 a=2tJrspVSXVUA:10 a=gvFz51Dc2IYA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 a=7gXAzLPJhVmCkEl4_tsf:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id D1BA95A6; Thu, 31 Aug 2023 19:46:08 -0700 (PDT) Received: from slippy (localhost [IPv6:::1]) by slippy.cwsent.com (Postfix) with ESMTP id A7EA8232; Thu, 31 Aug 2023 19:46:08 -0700 (PDT) Date: Thu, 31 Aug 2023 19:46:08 -0700 From: Cy Schubert To: Cy Schubert Cc: Warner Losh , Alexander Motin , Gleb Smirnoff , Drew Gallatin , Martin Matuska , src-committers , "" , "" Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad Message-ID: <20230831194608.2f20d74f@slippy> Organization: KOMQUATS X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfO2GW74U1WNIlb0uPzMaTi9STkjQN+6DSt7fTnZsnEZusRuo3T4qlTKjIIwbXNJ4sufbpVadn2Uedlwbgqt//mGSLrOVj/REUJs+Y8trc4NpebG/27F4 hv9IgtX0v6tcqOZ4avAoG27nukXQNd+Ktwgnw4qyENzOuqKAvNCTiZ7pxJWloM4QznOg+z4Nrq9TdPEbT7TRsBSjudkm4DLSe0RvlXxXUOj2StdIsoPAZ/rn OCucqcbtZuiHfdm0TPLa4M1vrLg3fB56tVz4oSFDY4ATPW0fjazqGi3v0NMA25Txr4fS/9LKnGgCNQesuvWIKhvV4lTm4FqHas045h4gtyd3w/3z5gQG3d3G KWugkHLUf3ArXvyJOfwLqpeE0CRQyJmY8Uj5Ek/DSI/CnohPQylFQ/BfntRhm+uJNlO9w94cwsmgK+fpR+YbERKq8ymgIA== X-Spamd-Bar: / X-Spamd-Result: default: False [-0.64 / 15.00]; FAKE_REPLY(1.00)[]; AUTH_NA(1.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-0.98)[-0.982]; NEURAL_HAM_LONG(-0.95)[-0.955]; MID_RHS_NOT_FQDN(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[3.97.99.32:from]; DMARC_NA(0.00)[cschubert.com]; FROM_EQ_ENVFROM(0.00)[]; R_SPF_NA(0.00)[no SPF record]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org,dev-commits-src-all@freebsd.org]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_SEVEN(0.00)[9]; TO_DN_ALL(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_ORG_HEADER(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4RcMq83p7Bz4LZh Resending this again. The email that was returned from the ML back to me was corrupted. I'm not sure if exmh was at fault, zfs (or postfix) on my laptop or zfs (or postfix) on my gateway. The last time we had significant ZFS issues my emails were also truncated or corrupted. It's likely something on the laptop as one email in my note log contained a few bytes of binary zeros. It's just interesting that I'm seeing similar email corruption as last time. Hopefully the full email makes it to the ML so people can view the full backtrace. (Also using a different MH based MUA, if that might make a difference.) -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 On Thu, 31 Aug 2023 17:19:59 -0700 Cy Schubert wrote: > Cy Schubert writes: > > In message <20230831234437.0EB38133@slippy.cwsent.com>, Cy Schubert writes: > > > In message <20230831234023.917DFAB@slippy.cwsent.com>, Cy Schubert writes: > > > > In message > l. > > > c > > > > om> > > > > , Warner Losh writes: > > > > > On Thu, Aug 31, 2023, 5:32 PM Cy Schubert w > > ro > > > te > > > > = > > > > > : > > > > > > > > > > > In message <20230831223526.DCB701A1@slippy.cwsent.com>, Cy Schubert > > > > > > writes: > > > > > > > In message , > > > > > > Alexander > > > > > > > Motin > > > > > > > writes: > > > > > > > > On 31.08.2023 13:53, Cy Schubert wrote: > > > > > > > > > One thing that circumvents my two problems is reducing poudrier > > e > > > > > > bulk job > > > > > > > s > > > > > > > > > from 8 to 5 on my 4 core machines. > > > > > > > > > > > > > > > > Cy, I have no real evidences to think it is related, other than y > > ou > > > r > > > > > > > > panics look like some memory corruptions, but could you try is pa > > tc > > > h: > > > > > > > > https://github.com/openzfs/zfs/pull/15228 . If it won't do the > > > > > > trick, > > > > > > > > then I am out of ideas without additional input. > > > > > > > > > > > > > > So far so good. Poudriere has been running with a decent -J jobs on > > b > > > ot > > > > = > > > > > h > > > > > > > machines for over an hour. I'll let you know if they survive the ni > > gh > > > t. > > > > > > It > > > > > > > can take some time before the panics happen though. > > > > > > > > > > > > > > The problem is more likely to occur when there are a lot of small > > > > > > package > > > > > > > builds than large long running jobs, probably because of the parall > > el > > > > > > ZFS > > > > > > > dataset creations, deletions, and rollbacks. > > > > > > > > > > > > > > > > > > > > > > > Gleb, you may try to add this too, just as a choice between impos > > si > > > bl > > > > = > > > > > e > > > > > > > > and improbable. > > > > > > > > > > > > > > > > -- > > > > > > > > Alexander Motin > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > Cheers, > > > > > > > Cy Schubert > > > > > > > FreeBSD UNIX: Web: https://FreeBSD.org > > > > > > > NTP: Web: https://nwtime.org > > > > > > > > > > > > > > e^(i*pi)+1=3D0 > > > > > > > > > > > > > > > > > > > > > > > > > > One of the two machines is hung. > > > > > > > > > > > > cwfw# ping bob > > > > > > PING bob (10.1.1.7): 56 data bytes > > > > > > ^C > > > > > > --- bob ping statistics --- > > > > > > 2 packets transmitted, 0 packets received, 100.0% packet loss > > > > > > cwfw# console bob > > > > > > [Enter `^Ec?' for help] > > > > > > [halt sent] > > > > > > KDB: enter: Break to debugger > > > > > > [ thread pid 31259 tid 100913 ] > > > > > > Stopped at kdb_break+0x48: movq $0,0xa1069d(%rip) > > > > > > db> bt > > > > > > Tracing pid 31259 tid 100913 td 0xfffffe00c4eca000 > > > > > > kdb_break() at kdb_break+0x48/frame 0xfffffe00c53ef2d0 > > > > > > uart_intr() at uart_intr+0xf7/frame 0xfffffe00c53ef310 > > > > > > intr_event_handle() at intr_event_handle+0x12b/frame 0xfffffe00c53ef3 > > 80 > > > > > > intr_execute_handlers() at intr_execute_handlers+0x63/frame > > > > > > 0xfffffe00c53ef3b0 > > > > > > Xapic_isr1() at Xapic_isr1+0xdc/frame 0xfffffe00c53ef3b0 > > > > > > --- interrupt, rip =3D 0xffffffff806d5c70, rsp =3D 0xfffffe00c53ef480 > > , > > > rb > > > > = > > > > > p =3D > > > > > > 0xfffffe00c53ef480 --- > > > > > > getbinuptime() at getbinuptime+0x30/frame 0xfffffe00c53ef480 > > > > > > arc_access() at arc_access+0x250/frame 0xfffffe00c53ef4d0 > > > > > > arc_buf_access() at arc_buf_access+0xd0/frame 0xfffffe00c53ef4f0 > > > > > > dbuf_hold_impl() at dbuf_hold_impl+0xf3/frame 0xfffffe00c53ef580 > > > > > > dbuf_hold() at dbuf_hold+0x25/frame 0xfffffe00c53ef5b0 > > > > > > dnode_hold_impl() at dnode_hold_impl+0x194/frame 0xfffffe00c53ef670 > > > > > > dmu_bonus_hold() at dmu_bonus_hold+0x20/frame 0xfffffe00c53ef6a0 > > > > > > zfs_zget() at zfs_zget+0x20d/frame 0xfffffe00c53ef750 > > > > > > zfs_dirent_lookup() at zfs_dirent_lookup+0x16d/frame 0xfffffe00c53ef7 > > a0 > > > > > > zfs_dirlook() at zfs_dirlook+0x7f/frame 0xfffffe00c53ef7d0 > > > > > > zfs_lookup() at zfs_lookup+0x3c0/frame 0xfffffe00c53ef8a0 > > > > > > zfs_freebsd_cachedlookup() at zfs_freebsd_cachedlookup+0x67/frame > > > > > > 0xfffffe00c53ef9e0 > > > > > > vfs_cache_lookup() at vfs_cache_lookup+0xa6/frame 0xfffffe00c53efa30 > > > > > > vfs_lookup() at vfs_lookup+0x457/frame 0xfffffe00c53efac0 > > > > > > namei() at namei+0x2e1/frame 0xfffffe00c53efb20 > > > > > > vn_open_cred() at vn_open_cred+0x505/frame 0xfffffe00c53efca0 > > > > > > kern_openat() at kern_openat+0x287/frame 0xfffffe00c53efdf0 > > > > > > ia32_syscall() at ia32_syscall+0x156/frame 0xfffffe00c53eff30 > > > > > > int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffff8 > > 9d > > > c > > > > > > db> > > > > > > > > > > > > I'll let it continue. Hopefully the watchdog timer will pop and we ge > > t > > > a > > > > > > dump. > > > > > > > > > > > > > > > > > > > > > Might also be interesting to see if this moves around or is really hung > > > > > getting the time. I suspect it's live lock given this traceback. > > > > > > > > It's moving around. > > > > > > > > > > > > db> c > > > > [halt sent] > > > > KDB: enter: Break to debugger > > > > [ thread pid 31259 tid 100913 ] > > > > Stopped at kdb_break+0x48: movq $0,0xa1069d(%rip) > > > > db> bt > > > > Tracing pid 31259 tid 100913 td 0xfffffe00c4eca000 > > > > kdb_break() at kdb_break+0x48/frame 0xfffffe00c53ef410 > > > > uart_intr() at uart_intr+0xf7/frame 0xfffffe00c53ef450 > > > > intr_event_handle() at intr_event_handle+0x12b/frame 0xfffffe00c53ef4c0 > > > > intr_execute_handlers() at intr_execute_handlers+0x63/frame > > > > 0xfffffe00c53ef4f0 > > > > Xapic_isr1() at Xapic_isr1+0xdc/frame 0xfffffe00c53ef4f0 > > > > --- interrupt, rip = 0xffffffff807117c4, rsp = 0xfffffe00c53ef5c0, rbp = > > > > 0xfffffe00c53ef5c0 --- > > > > lock_delay() at lock_delay+0x14/frame 0xfffffe00c53ef5c0 > > > > _sx_xlock_hard() at _sx_xlock_hard+0x1a9/frame 0xfffffe00c53ef660 > > > > _sx_xlock() at _sx_xlock+0xb0/frame 0xfffffe00c53ef6a0 > > > > zfs_zget() at zfs_zget+0x1fa/frame 0xfffffe00c53ef750 > > > > zfs_dirent_lookup() at zfs_dirent_lookup+0x16d/frame 0xfffffe00c53ef7a0 > > > > zfs_dirlook() at zfs_dirlook+0x7f/frame 0xfffffe00c53ef7d0 > > > > zfs_lookup() at zfs_lookup+0x3c0/frame 0xfffffe00c53ef8a0 > > > > zfs_freebsd_cachedlookup() at zfs_freebsd_cachedlookup+0x67/frame > > > > 0xfffffe00c53ef9e0 > > > > vfs_cache_lookup() at vfs_cache_lookup+0xa6/frame 0xfffffe00c53efa30 > > > > vfs_lookup() at vfs_lookup+0x457/frame 0xfffffe00c53efac0 > > > > namei() at namei+0x2e1/frame 0xfffffe00c53efb20 > > > > vn_open_cred() at vn_open_cred+0x505/frame 0xfffffe00c53efca0 > > > > kern_openat() at kern_openat+0x287/frame 0xfffffe00c53efdf0 > > > > ia32_syscall() at ia32_syscall+0x156/frame 0xfffffe00c53eff30 > > > > int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffff89dc > > > > db> c > > > > > > It seems to have settled there for now. > > > > I manually panicked the machine. It captured a good dump of the above > > backtrace. > > > > This is the amd64 machine that was building i386 packages under poudriere. > > I purposely set -J high to stress it enough to panic the machine. > > > > This ker> /15228. This manually triggered panic is different from the one it suffered > > two days ago. > > > > The machine building amd64 packages is still running nicely but it's > > building some large packages. Because of this there's not as much stress on > > zfs. The panicked machine was building a lot of small packages. As such it > > was doing a lot of zfs clones, destroys, and rollbacks. > > An initial look at the dump: > > (kgdb) bt > #0 __curthread () at /opt/src/git-src/sys/amd64/include/pcpu_aux.h:57 > #1 doadump (textdump=textdump@entry=1) > at /opt/src/git-src/sys/kern/kern_shutdown.c:405 > #2 0xffffffff806c1b30 in kern_reboot (howto=260) > at /opt/src/git-src/sys/kern/kern_shutdown.c:526 > #3 0xffffffff806c202f in vpanic (fmt=0xffffffff80b8653c "from debugger", > ap=ap@entry=0xfffffe00c53eef30) > at /opt/src/git-src/sys/kern/kern_shutdown.c:970 > #4 0xffffffff806c1dd3 in panic (fmt=) > at /opt/src/git-src/sys/kern/kern_shutdown.c:894 > #5 0xffffffff80413937 in db_panic (addr=, > have_addr=, count=, modif=) > at /opt/src/git-src/sys/ddb/db_command.c:531 > #6 0xffffffff80412ddd in db_command (last_cmdp=, > cmd_table=, dopager=true) > at /opt/src/git-src/sys/ddb/db_command.c:504 > #7 0xffffffff80412a9d in db_command_loop () > at /opt/src/git-src/sys/ddb/db_command.c:551 > #8 0xffffffff80416176 in db_trap (type=, code= out>) > at /opt/src/git-src/sys/ddb/db_main.c:268 > #9 0xffffffff80710993 in kdb_trap (type=type@entry=3, code=code@entry=0, > tf=tf@entry=0xfffffe00c53ef340) at /opt/src/git-src/sys/kern/subr_kdb.c: > 790 > #10 0xffffffff80a72cb9 in trap (frame=0xfffffe00c53ef340) > at /opt/src/git-src/sys/amd64/amd64/trap.c:608 > #11 > #12 kdb_enter (why=, msg=) > at /opt/src/git-src/sys/kern/subr_kdb.c:556 > #13 kdb_break () at /opt/src/git-src/sys/kern/subr_kdb.c:346 > #14 0xffffffff804dc7f7 in uart_intr_break (arg=0xfffff80006b84400) > at /opt/src/git-src/sys/dev/uart/uart_core.c:298 > #15 uart_intr (arg=0xfffff80006b84400) > at /opt/src/git-src/sys/dev/uart/uart_core.c:439 > #16 0xffffffff8067ae8b in intr_event_handle (ie=ie@entry=0xfffff80005814c00, > > frame=frame@entry=0xfffffe00c53ef500) > at /opt/src/git-src/sys/kern/kern_intr.c:1410 > #17 0xffffffff80a37653 in intr_execute_handlers (isrc=0xfffff8000580c9c8, > --Type for more, q to quit, c to continue without paging--c > frame=0xfffffe00c53ef500) > at /opt/src/git-src/sys/x86/x86/intr_machdep.c:354 > #18 > #19 lock_delay (la=la@entry=0xfffffe00c53ef600) > at /opt/src/git-src/sys/kern/subr_lock.c:124 > #20 0xffffffff806ccfb9 in _sx_xlock_hard (sx=sx@entry=0xfffff80123712340, > x=, opts=opts@entry=0, > file=file@entry=0xffffffff81910597 "/opt/src/git-src/sys/contrib/openzfs > /module/os/freebsd/zfs/zfs_znode.c", line=line@entry=949) > at /opt/src/git-src/sys/kern/kern_sx.c:693 > #21 0xffffffff806ccdb0 in _sx_xlock (sx=sx@entry=0xfffff80123712340, > opts=opts@entry=0, > file=0xffffffff81910597 "/opt/src/git-src/sys/contrib/openzfs/module/os/ > freebsd/zfs/zfs_znode.c", line=line@entry=949) > at /opt/src/git-src/sys/kern/kern_sx.c:330 > #22 0xffffffff816b4ffa in zfs_zget (zfsvfs=zfsvfs@entry=0xfffff80123712000, > obj_num=80130, zpp=zpp@entry=0xfffffe00c53ef760) > at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode. > c:949 > #23 0xffffffff816a018d in zfs_dirent_lookup (dzp=dzp@entry=0xfffff80131e6dae > 0, > name=0xfffffe00c53ef8c0 "xlocale", zpp=zpp@entry=0xfffffe00c53ef7b0, > flag=flag@entry=2) > at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_dir.c: > 190 > #24 0xffffffff816a028f in zfs_dirlook (dzp=dzp@entry=0xfffff80131e6dae0, > name=0xfffffe00c4bbdc80 "", name@entry=0xfffffe00c53ef8c0 "xlocale", > zpp=zpp@entry=0xfffffe00c53ef860) > at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_dir.c: > 246 > #25 0xffffffff816b0d20 in zfs_lookup (dvp=0xfffff800c2da9380, > nm=nm@entry=0xfffffe00c53ef8c0 "xlocale", vpp=0xfffffe00c53efd10, > cnp=cnp@entry=0xfffffe00c53efd38, nameiop=0, cr=, > flags=0, > cached=1) > at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_ > os.c:923 > #26 0xffffffff816ab907 in zfs_freebsd_lookup (ap=0xfffffe00c53ef9f0, > cached=1) > at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_ > os.c:4558 > #27 zfs_freebsd_cachedlookup (ap=0xfffffe00c53ef9f0) > at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_ > os.c:4566 > #28 0xffffffff80797d86 in VOP_CACHEDLOOKUP (dvp=0xfffff800c2da9380, > vpp=0xfffffe00c53efd10, cnp=0xfffffe00c53efd38) at ./vnode_if.h:101 > #29 vfs_cache_lookup (ap=) > at /opt/src/git-src/sys/kern/vfs_cache.c:3068 > #30 0xffffffff807a9487 in VOP_LOOKUP (dvp=0xfffff800c2da9380, > vpp=0xfffffe00c53efd10, cnp=0xfffffe00c53efd38) at ./vnode_if.h:67 > #31 vfs_lookup (ndp=ndp@entry=0xfffffe00c53efcb8) > at /opt/src/git-src/sys/kern/vfs_lookup.c:1252 > #32 0xffffffff807a8531 in namei (ndp=ndp@entry=0xfffffe00c53efcb8) > at /opt/src/git-src/sys/kern/vfs_lookup.c:684 > #33 0xffffffff807d0095 in vn_open_cred (ndp=ndp@entry=0xfffffe00c53efcb8, > flagp=flagp@entry=0xfffffe00c53efdc4, cmode=cmode@entry=0, > vn_open_flags=vn_open_flags@entry=16, cred=0xfffff801ea492800, > fp=0xfffff801b9a54690) at /opt/src/git-src/sys/kern/vfs_vnops.c:331 > #34 0xffffffff807c61f7 in kern_openat (td=0xfffffe00c4eca000, fd=-100, > path=0xffff8a24 , > pathseg=UIO_USERSPACE, flags=1048577, mode=) > at /opt/src/git-src/sys/kern/vfs_syscalls.c:1165 > #35 0xffffffff80a993a6 in syscallenter (td=0xfffffe00c4eca000) > at /opt/src/git-src/sys/amd64/ia32/../../kern/subr_syscall.c:187 > #36 ia32_syscall (frame=0xfffffe00c53eff40) > at /opt/src/git-src/sys/amd64/ia32/ia32_syscall.c:222 > #37 0xffffffff80a47f8f in int0x80_syscall_common () > at /opt/src/git-src/sys/amd64/ia32/ia32_exception.S:75 > #38 0x0000000026a12000 in ?? () > #39 0x0000000000000000 in ?? () > (kgdb) > > > > > I'll take a look at the dump after dinner tonight. > > From nobody Fri Sep 1 03:38:01 2023 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 4RcNz070HKz4rywk; Fri, 1 Sep 2023 03:38:04 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcNz05v7tz4PZK; Fri, 1 Sep 2023 03:38:04 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTP id be2fqL6WGLAoIbuyyqMavh; Fri, 01 Sep 2023 03:38:04 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPA id buywqgTGk3fOSbuyxqXOql; Fri, 01 Sep 2023 03:38:04 +0000 X-Authority-Analysis: v=2.4 cv=J8G5USrS c=1 sm=1 tr=0 ts=64f15c9c a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=UttIx32zK-AA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=DFkHzWEJDzc0sj43XusA:9 a=QEXdDO2ut3YA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 23D0D56E; Thu, 31 Aug 2023 20:38:02 -0700 (PDT) Received: from slippy (localhost [IPv6:::1]) by slippy.cwsent.com (Postfix) with ESMTP id 0E377D5; Thu, 31 Aug 2023 20:38:02 -0700 (PDT) Date: Thu, 31 Aug 2023 20:38:01 -0700 From: Cy Schubert To: Kyle Evans Cc: Alexander Motin , Gleb Smirnoff , Martin Matuska , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad Message-ID: <20230831203801.24fade6d@slippy> In-Reply-To: References: <202308270509.37R596B5048298@gitrepo.freebsd.org> Organization: KOMQUATS X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-CMAE-Envelope: MS4xfLZ2rjQDrhCzC7pGD26WZdIqcf7t8k4uAFXmyOPU9C90LgHHHbJJpK+bgCbYddzxo45fwJGqp7I8LbCcOxo4Pa/KUJ0oZz0lsHQJjmOWMWl3jq7UC7nm /6XaE86Y+yO43NkEI4mFWagv6Dfn71qKtJ8ZkIs75LR+d8M+7KSPQ/Z9T9+KPHtYA/e3Et57r9015RGKsi6BSRVb0jOTh4LapGayqRcvBCScYi+n6IT0yAQC xvBuY67f+HcoccduskAvqeqVCOfvwqKYZQuhobBQ7HlXtLz5JwMibsiBfVEh5yF4Wuo5ANfsvh56xmDIwKlLLSPE5yHjDZA2OOOXQ1zl7VVaOlCsGKixKV6n AJNTu6v46+RiV/rXQPj/e5deyPbYsCZNhckR46n1am0BCFykL7CKQ630hGvj35Mpk+l8QBgH X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4RcNz05v7tz4PZK On Thu, 31 Aug 2023 21:18:30 -0500 Kyle Evans wrote: > On 8/30/23 20:01, Alexander Motin wrote: > > On 30.08.2023 20:09, Gleb Smirnoff wrote: =20 > >> =C2=A0=C2=A0 Hi Martin, > >> > >> we hit this panic with this update: > >> > >> panic: VERIFY(avl_is_empty(&lwb->lwb_vdev_tree)) failed > >> > >> cpuid =3D 8 > >> time =3D 1693432004 > >> KDB: stack backtrace: > >> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame=20 > >> 0xfffffe09519aa800 > >> vpanic() at vpanic+0x132/frame 0xfffffe09519aa930 > >> spl_panic() at spl_panic+0x3a/frame 0xfffffe09519aa990 > >> zil_free_lwb() at zil_free_lwb+0x1de/frame 0xfffffe09519aa9c0 > >> zil_sync() at zil_sync+0x3cb/frame 0xfffffe09519aaaa0 > >> [Wed Aug 30 21:46:44 2023]dmu_objset_sync() at=20 > >> dmu_objset_sync+0x51b/frame 0xfffffe09519aab70 > >> dsl_pool_sync() at dsl_pool_sync+0x11d/frame 0xfffffe09519aabf0 > >> spa_sync() at spa_sync+0xc68/frame 0xfffffe09519aae20 > >> txg_sync_thread() at txg_sync_thread+0x2eb/frame 0xfffffe09519aaef0 > >> fork_exit() at fork_exit+0x82/frame 0xfffffe09519aaf30 > >> fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe09519aaf30 > >> --- trap 0x26d90a2f, rip =3D 0xbba54c81b25fd8d4, rsp =3D=20 > >> 0xff60c2f6f9874bcd, rbp =3D 0x37940e3e9793bd40 -- > >> > >> I have two cores dumped for this panic. > >> > >> Our previous version is based on=20 > >> 9c0a2d522f3a18fc795a7dd6266d2be2aff4b084, which > >> I guess has the most recent ZFS merge openzfs/zfs@009d3288d. > >> =20 > > Hi Gleb, > > > > It is the first time I see a panic like this. I'll think about it > > tomorrow. But I'd appreciate any information on what is your workload > > and what are you doing related to ZIL (O_SYNC, fsync(), sync=3Dalways, > > etc) to trigger it? What is your pool configuration? > > =20 >=20 > Hello! >=20 > Probably not related, but I seem to have hit a use-after-free in ZIL=20 > bits; is this something you're interested in? Backtrace is: >=20 > #17 zio_nowait (zio=3D0xdeadc0dedeadc0de) at=20 > /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zio.c:2367 > #18 0xffff00000160720c in zil_lwb_write_issue=20 > (zilog=3Dzilog@entry=3D0xffffa00021631800, lwb=3D0xffffa00933d34c40) > at /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zil.c:1935 > --Type for more, q to quit, c to continue without paging-- > #19 0xffff0000016031c0 in zil_commit_writer (zilog=3D0xffffa00021631800,= =20 > zcw=3D0xffffa000fb01e140) at=20 > /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zil.c:2985 > #20 zil_commit_impl (zilog=3D0xffffa00021631800, foid=3D) = at=20 > /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zil.c:3489 > #21 0xffff000001602f44 in zil_commit (zilog=3D,=20 > foid=3D) at=20 > /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zil.c:3452 > #22 0xffff0000015fdac8 in zfs_fsync (zp=3D0xffffa007e27b23a0,=20 > syncflag=3D, cr=3D) at=20 > /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zfs_vnops.c:75 > #23 0xffff00000056a864 in VOP_FSYNC (vp=3D0xffffa001d2003000, waitfor=3D1= ,=20 > td=3D0xffff00015aa94620) at ./vnode_if.h:763 > #24 kern_fsync (td=3D0xffff00015aa94620, fd=3D,=20 > fullsync=3Dtrue) at /usr/src.kbsd/sys/kern/vfs_syscalls.c:3556 > #25 0xffff000000800630 in syscallenter (td=3D0xffff00015aa94620) at=20 > /usr/src.kbsd/sys/arm64/arm64/../../kern/subr_syscall.c:187 > #26 svc_handler (td=3D0xffff00015aa94620, frame=3D) at=20 > /usr/src.kbsd/sys/arm64/arm64/trap.c:198 > #27 do_el0_sync (td=3D0xffff00015aa94620, frame=3D) at=20 > /usr/src.kbsd/sys/arm64/arm64/trap.c:625 >=20 >=20 > If I pop up to the zil_lwb_write_issue frame: >=20 > (kgdb) print *lwb > $4 =3D {lwb_zilog =3D 0xdeadc0dedeadc0de, lwb_blk =3D {blk_dva =3D {{dva_= word =3D=20 > {16045693110842147038, 16045693110842147038}}, {dva_word =3D=20 > {16045693110842147038, 16045693110842147038}}, {dva_word =3D=20 > {16045693110842147038, > 16045693110842147038}}}, blk_prop =3D 16045693110842147038,=20 > blk_pad =3D {16045693110842147038, 16045693110842147038}, blk_phys_birth = =3D=20 > 16045693110842147038, blk_birth =3D 16045693110842147038, > blk_fill =3D 16045693110842147038, blk_cksum =3D {zc_word =3D=20 > {16045693110842147038, 16045693110842147038, 16045693110842147038,=20 > 16045693110842147038}}}, lwb_slim =3D 3735929054, lwb_slog =3D 3735929054= ,=20 > lwb_error =3D -559038242, > lwb_nmax =3D -559038242, lwb_nused =3D -559038242, lwb_nfilled =3D=20 > -559038242, lwb_sz =3D -559038242, lwb_state =3D 3735929054, lwb_buf =3D= =20 > 0xdeadc0dedeadc0de 0xdeadc0dedeadc0de>, =20 > lwb_child_zio =3D 0xdeadc0dedeadc0de, lwb_write_zio =3D=20 > 0xdeadc0dedeadc0de, lwb_root_zio =3D 0xdeadc0dedeadc0de,=20 > lwb_issued_timestamp =3D -2401050962867404578, lwb_issued_txg =3D=20 > 16045693110842147038, > lwb_alloc_txg =3D 16045693110842147038, lwb_max_txg =3D=20 > 16045693110842147038, lwb_node =3D {list_next =3D 0xdeadc0dedeadc0de,=20 > list_prev =3D 0xdeadc0dedeadc0de}, lwb_issue_node =3D {list_next =3D=20 > 0xdeadc0dedeadc0de, > list_prev =3D 0xdeadc0dedeadc0de}, lwb_itxs =3D {list_size =3D=20 > 16045693110842147038, list_offset =3D 16045693110842147038, list_head =3D= =20 > {list_next =3D 0xdeadc0dedeadc0de, list_prev =3D 0xdeadc0dedeadc0de}},=20 > lwb_waiters =3D { > list_size =3D 16045693110842147038, list_offset =3D=20 > 16045693110842147038, list_head =3D {list_next =3D 0xdeadc0dedeadc0de,=20 > list_prev =3D 0xdeadc0dedeadc0de}}, lwb_vdev_tree =3D {avl_root =3D=20 > 0xdeadc0dedeadc0de, > avl_compar =3D 0xdeadc0dedeadc0de, avl_offset =3D 160456931108421470= 38,=20 > avl_numnodes =3D 16045693110842147038}, lwb_vdev_lock =3D {lock_object = =3D { > lo_name =3D 0xdeadc0dedeadc0de address 0xdeadc0dedeadc0de>, lo_flags =3D 3735929054, lo_data =3D=20 > 3735929054, lo_witness =3D 0xdeadc0dedeadc0de}, sx_lock =3D=20 > 16045693110842147038}} >=20 > It seems to have clearly been stomped on by uma trashing. Encountered=20 > while running a pkgbase build, I think while it was in the packaging=20 > phase. I note in particular in that frame: >=20 > (kgdb) p/x lwb->lwb_issued_timestamp > $4 =3D 0xdeadc0dedeadc0de >=20 > So I guess it was freed sometime during one of the previous two=20 > zio_nowait() calls. >=20 > Thanks, >=20 > Kyle Evans >=20 I think the four panics on my two downstairs machines two days ago, the panic today on the one of the same two machines today, and the email data corruption my laptop has been experiencing, and the backtraces I've seen Gleb and you post give me the uneasy sense that there may be some kind of general memory corruption due to bad or corrupted addresses being dereferenced. --=20 Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=3D0 From nobody Fri Sep 1 03:44:11 2023 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 4RcP674980z4s0XZ; Fri, 1 Sep 2023 03:44:15 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcP665z8Xz4Q4p; Fri, 1 Sep 2023 03:44:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 3.97.99.32) smtp.mailfrom=cy.schubert@cschubert.com; dmarc=none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTP id bp28qLkS0LAoIbv4wqMbUp; Fri, 01 Sep 2023 03:44:14 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPA id bv4uqgUfH3fOSbv4vqXPLO; Fri, 01 Sep 2023 03:44:14 +0000 X-Authority-Analysis: v=2.4 cv=J8G5USrS c=1 sm=1 tr=0 ts=64f15e0e a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=UttIx32zK-AA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=VtD-V8Bl0kRGtFH_ge0A:9 a=QEXdDO2ut3YA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 3ECB15EA; Thu, 31 Aug 2023 20:44:12 -0700 (PDT) Received: from slippy (localhost [IPv6:::1]) by slippy.cwsent.com (Postfix) with ESMTP id ED07FD6; Thu, 31 Aug 2023 20:44:11 -0700 (PDT) Date: Thu, 31 Aug 2023 20:44:11 -0700 From: Cy Schubert To: Kyle Evans Cc: Alexander Motin , Gleb Smirnoff , Martin Matuska , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad Message-ID: <20230831204411.02780107@slippy> In-Reply-To: <20230831203801.24fade6d@slippy> References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <20230831203801.24fade6d@slippy> Organization: KOMQUATS X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-CMAE-Envelope: MS4xfPGihm+RcxbXTOjkGgi+4u0e7sqhs62sSEcOLZgIi2wcklCXGJ/HYk4AA9UVAlIoHeyrYIb8+DgMYKsed4fySeGoGA4Ip5g/12HEbgGLj9H5Y9otT67K bZJNjtHXq1/CVb48Si6och2ahTvin40Nh60UhCqj/x/hed+a5gRKBab/l16KFx8Q1ZyXVfc3RjYCTtaOkO0C/9fSfJzZ2JQ68RJRywhTF27MFE/Pi1x6npWd ZHr+d5Gc/qqIx7V3JRc3OvATgvjjCr4rc1Ye0Vl5uPfrDFtLvVn5j7WmW5H3jp4D0p0ApTL8UjikhAbbUdposEPkj147mUzrP/4QfBISRISsc3+Oaq7Aj3uZ Ze08zY82eEjORzckEM5WpgPfBqtkJLoGd7BaIEixp/rTdjJOhJQ1BmPVFukbvCiGOFRPRDK5 X-Spamd-Bar: - X-Spamd-Result: default: False [-1.70 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MID_RHS_NOT_FQDN(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[3.97.99.32:from]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org,dev-commits-src-all@freebsd.org]; RCPT_COUNT_SEVEN(0.00)[7]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; MIME_TRACE(0.00)[0:+]; R_SPF_NA(0.00)[no SPF record]; R_DKIM_NA(0.00)[]; HAS_ORG_HEADER(0.00)[]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[cschubert.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 4RcP665z8Xz4Q4p On Thu, 31 Aug 2023 20:38:01 -0700 Cy Schubert wrote: > On Thu, 31 Aug 2023 21:18:30 -0500 > Kyle Evans wrote: >=20 > > On 8/30/23 20:01, Alexander Motin wrote: =20 > > > On 30.08.2023 20:09, Gleb Smirnoff wrote: =20 > > >> =C2=A0=C2=A0 Hi Martin, > > >> > > >> we hit this panic with this update: > > >> > > >> panic: VERIFY(avl_is_empty(&lwb->lwb_vdev_tree)) failed > > >> > > >> cpuid =3D 8 > > >> time =3D 1693432004 > > >> KDB: stack backtrace: > > >> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame=20 > > >> 0xfffffe09519aa800 > > >> vpanic() at vpanic+0x132/frame 0xfffffe09519aa930 > > >> spl_panic() at spl_panic+0x3a/frame 0xfffffe09519aa990 > > >> zil_free_lwb() at zil_free_lwb+0x1de/frame 0xfffffe09519aa9c0 > > >> zil_sync() at zil_sync+0x3cb/frame 0xfffffe09519aaaa0 > > >> [Wed Aug 30 21:46:44 2023]dmu_objset_sync() at=20 > > >> dmu_objset_sync+0x51b/frame 0xfffffe09519aab70 > > >> dsl_pool_sync() at dsl_pool_sync+0x11d/frame 0xfffffe09519aabf0 > > >> spa_sync() at spa_sync+0xc68/frame 0xfffffe09519aae20 > > >> txg_sync_thread() at txg_sync_thread+0x2eb/frame 0xfffffe09519aaef0 > > >> fork_exit() at fork_exit+0x82/frame 0xfffffe09519aaf30 > > >> fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe09519aaf30 > > >> --- trap 0x26d90a2f, rip =3D 0xbba54c81b25fd8d4, rsp =3D=20 > > >> 0xff60c2f6f9874bcd, rbp =3D 0x37940e3e9793bd40 -- > > >> > > >> I have two cores dumped for this panic. > > >> > > >> Our previous version is based on=20 > > >> 9c0a2d522f3a18fc795a7dd6266d2be2aff4b084, which > > >> I guess has the most recent ZFS merge openzfs/zfs@009d3288d. > > >> =20 > > > Hi Gleb, > > > > > > It is the first time I see a panic like this. I'll think about it > > > tomorrow. But I'd appreciate any information on what is your worklo= ad > > > and what are you doing related to ZIL (O_SYNC, fsync(), sync=3Dalway= s, > > > etc) to trigger it? What is your pool configuration? > > > =20 > >=20 > > Hello! > >=20 > > Probably not related, but I seem to have hit a use-after-free in ZIL=20 > > bits; is this something you're interested in? Backtrace is: > >=20 > > #17 zio_nowait (zio=3D0xdeadc0dedeadc0de) at=20 > > /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zio.c:2367 > > #18 0xffff00000160720c in zil_lwb_write_issue=20 > > (zilog=3Dzilog@entry=3D0xffffa00021631800, lwb=3D0xffffa00933d34c40) > > at /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zil.c:1935 > > --Type for more, q to quit, c to continue without paging-- > > #19 0xffff0000016031c0 in zil_commit_writer (zilog=3D0xffffa00021631800= ,=20 > > zcw=3D0xffffa000fb01e140) at=20 > > /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zil.c:2985 > > #20 zil_commit_impl (zilog=3D0xffffa00021631800, foid=3D= ) at=20 > > /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zil.c:3489 > > #21 0xffff000001602f44 in zil_commit (zilog=3D,=20 > > foid=3D) at=20 > > /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zil.c:3452 > > #22 0xffff0000015fdac8 in zfs_fsync (zp=3D0xffffa007e27b23a0,=20 > > syncflag=3D, cr=3D) at=20 > > /usr/src.kbsd/sys/contrib/openzfs/module/zfs/zfs_vnops.c:75 > > #23 0xffff00000056a864 in VOP_FSYNC (vp=3D0xffffa001d2003000, waitfor= =3D1,=20 > > td=3D0xffff00015aa94620) at ./vnode_if.h:763 > > #24 kern_fsync (td=3D0xffff00015aa94620, fd=3D,=20 > > fullsync=3Dtrue) at /usr/src.kbsd/sys/kern/vfs_syscalls.c:3556 > > #25 0xffff000000800630 in syscallenter (td=3D0xffff00015aa94620) at=20 > > /usr/src.kbsd/sys/arm64/arm64/../../kern/subr_syscall.c:187 > > #26 svc_handler (td=3D0xffff00015aa94620, frame=3D) at=20 > > /usr/src.kbsd/sys/arm64/arm64/trap.c:198 > > #27 do_el0_sync (td=3D0xffff00015aa94620, frame=3D) at=20 > > /usr/src.kbsd/sys/arm64/arm64/trap.c:625 > >=20 > >=20 > > If I pop up to the zil_lwb_write_issue frame: > >=20 > > (kgdb) print *lwb > > $4 =3D {lwb_zilog =3D 0xdeadc0dedeadc0de, lwb_blk =3D {blk_dva =3D {{dv= a_word =3D=20 > > {16045693110842147038, 16045693110842147038}}, {dva_word =3D=20 > > {16045693110842147038, 16045693110842147038}}, {dva_word =3D=20 > > {16045693110842147038, > > 16045693110842147038}}}, blk_prop =3D 16045693110842147038,= =20 > > blk_pad =3D {16045693110842147038, 16045693110842147038}, blk_phys_birt= h =3D=20 > > 16045693110842147038, blk_birth =3D 16045693110842147038, > > blk_fill =3D 16045693110842147038, blk_cksum =3D {zc_word =3D=20 > > {16045693110842147038, 16045693110842147038, 16045693110842147038,=20 > > 16045693110842147038}}}, lwb_slim =3D 3735929054, lwb_slog =3D 37359290= 54,=20 > > lwb_error =3D -559038242, > > lwb_nmax =3D -559038242, lwb_nused =3D -559038242, lwb_nfilled =3D=20 > > -559038242, lwb_sz =3D -559038242, lwb_state =3D 3735929054, lwb_buf = =3D=20 > > 0xdeadc0dedeadc0de > 0xdeadc0dedeadc0de>, =20 > > lwb_child_zio =3D 0xdeadc0dedeadc0de, lwb_write_zio =3D=20 > > 0xdeadc0dedeadc0de, lwb_root_zio =3D 0xdeadc0dedeadc0de,=20 > > lwb_issued_timestamp =3D -2401050962867404578, lwb_issued_txg =3D=20 > > 16045693110842147038, > > lwb_alloc_txg =3D 16045693110842147038, lwb_max_txg =3D=20 > > 16045693110842147038, lwb_node =3D {list_next =3D 0xdeadc0dedeadc0de,=20 > > list_prev =3D 0xdeadc0dedeadc0de}, lwb_issue_node =3D {list_next =3D=20 > > 0xdeadc0dedeadc0de, > > list_prev =3D 0xdeadc0dedeadc0de}, lwb_itxs =3D {list_size =3D=20 > > 16045693110842147038, list_offset =3D 16045693110842147038, list_head = =3D=20 > > {list_next =3D 0xdeadc0dedeadc0de, list_prev =3D 0xdeadc0dedeadc0de}},= =20 > > lwb_waiters =3D { > > list_size =3D 16045693110842147038, list_offset =3D=20 > > 16045693110842147038, list_head =3D {list_next =3D 0xdeadc0dedeadc0de,= =20 > > list_prev =3D 0xdeadc0dedeadc0de}}, lwb_vdev_tree =3D {avl_root =3D=20 > > 0xdeadc0dedeadc0de, > > avl_compar =3D 0xdeadc0dedeadc0de, avl_offset =3D 1604569311084214= 7038,=20 > > avl_numnodes =3D 16045693110842147038}, lwb_vdev_lock =3D {lock_object = =3D { > > lo_name =3D 0xdeadc0dedeadc0de > address 0xdeadc0dedeadc0de>, lo_flags =3D 3735929054, lo_data =3D=20 > > 3735929054, lo_witness =3D 0xdeadc0dedeadc0de}, sx_lock =3D=20 > > 16045693110842147038}} > >=20 > > It seems to have clearly been stomped on by uma trashing. Encountered=20 > > while running a pkgbase build, I think while it was in the packaging=20 > > phase. I note in particular in that frame: > >=20 > > (kgdb) p/x lwb->lwb_issued_timestamp > > $4 =3D 0xdeadc0dedeadc0de > >=20 > > So I guess it was freed sometime during one of the previous two=20 > > zio_nowait() calls. > >=20 > > Thanks, > >=20 > > Kyle Evans > > =20 >=20 > I think the four panics on my two downstairs machines two days ago, the > panic today on the one of the same two machines today, and the email > data corruption my laptop has been experiencing, and the backtraces I've > seen Gleb and you post give me the uneasy sense that there may be some > kind of general memory corruption due to bad or corrupted addresses > being dereferenced. >=20 Though on second thought these could be separate and unrelated problems. The fact that the spin loop that forced me to manually panic my one machine reminds me of a similar situation on a mainframe where page tables were being overwritten by kernel code being developed at the time which also resulted in a spin loop over a corrupted lock. --=20 Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=3D0 From nobody Fri Sep 1 08:14:39 2023 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 4RcW68050sz4sDth; Fri, 1 Sep 2023 08:14:40 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcW676l2pz3KKH; Fri, 1 Sep 2023 08:14:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693556079; 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=pHruWn5Lt6F0g/z4kBk9hL6XOpXzltZyvzD21HEA6HA=; b=jGDr83Kwyk1ESnDwtBL+0/VyZ2EQJDXuNxrDuWjeVV09WxbZEdkecH+CVHmvUzCxo4Y888 x3Qdc4/XDgLtb/gqO8DO0PK6jy8spXkBMuUltBb/UnQHynv7lgMe6tJFHX2H9tfhWj0639 J/+KJ7J1xwfKkH3lrtkBy7YhLWkvmbxvupWNPAO+oZjM3FLwIcU8bqLXdYDsgDFrkm6hpA JlIIlgLqmBOE6kf6U7oqRKZizgSyJHG9J+UM2R7ww5aGKFEB24zCOJ12Qu0QJpDVe7rnVD pcwnd10JHxNxssqewM6d8K30W+mJSEFgyliIN9D3+ySKoY8PVw/lwmChVCnwvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693556079; a=rsa-sha256; cv=none; b=tmG9L3hMwMQBW57RN3RgfSAO2HwH8+GsQYpLk7E8/47biHLSA3KFT1eNB2/fX7768z63rw l9q0MEpCe+rWFY7rVKs6k59rIi48Z4gyfK1l22WOHYstRWX4cQPD6RQ7PGFu0Kl2kb9p01 cLfl5mbrhb7+9DTL3rHIFTzS+sh9ZxtUt5RuHTKBvb6fl4l5ZAN/mOJsnG6JX0oyD2Fv2b 39tWNyVwqMeT1bboXWlnIfSVXVYdxzwKP2zYwgqc2X6yaubkheSbjdJsYrUcXmRt2xZkIS TwTFNo8UnP2WqdDg8Nn3SgzaMb8uY5PWfQVuzZagKQsdNkt9AZvH13CXi/uqXA== 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=1693556079; 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=pHruWn5Lt6F0g/z4kBk9hL6XOpXzltZyvzD21HEA6HA=; b=XYRI77N0dPVQqC3XelCLzzgCWyipdeKOAhZ3+dE5zsmB1UsWOSZrY3jcQHO1HMjNjmodtU Yo/cz0Ith95t8IYv7fHHLS5CDe+HIzBTlBYCILz3bbWMKgpTB5tjL1qJY6SCqqwcOr2dMd /TuGz3D/zDzOdNPPusn80Wq/sEC9C4VRl3t74aZuhbSl8KqpP5pcnGGbvT4MkzI8QsE3Z9 dGQRNN6feiXZGeHg4YGNo0VPrW74G4cYR5ayfxVnO9SoVkr8fncA0zWtZ+I59THkEvRXrF Qwzxwku9wWcBf/mAgMqRoHbocZgye2zaIQSP5U8ZcFgDKt26guFiN2hjxBDHfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcW675nwsztXG; Fri, 1 Sep 2023 08:14:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3818Ed6M008276; Fri, 1 Sep 2023 08:14:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3818EdQw008273; Fri, 1 Sep 2023 08:14:39 GMT (envelope-from git) Date: Fri, 1 Sep 2023 08:14:39 GMT Message-Id: <202309010814.3818EdQw008273@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 6b46ec66129d - main - linux(4): Merge getxattr for future error recode 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b46ec66129d9490c91876f72d98e514121996a6 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=6b46ec66129d9490c91876f72d98e514121996a6 commit 6b46ec66129d9490c91876f72d98e514121996a6 Author: Dmitry Chagin AuthorDate: 2023-09-01 08:09:49 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-01 08:09:49 +0000 linux(4): Merge getxattr for future error recode Tested by: zirias MFC after: 1 week --- sys/compat/linux/linux_xattr.c | 62 ++++++++++++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 17 deletions(-) diff --git a/sys/compat/linux/linux_xattr.c b/sys/compat/linux/linux_xattr.c index b54a0d2f89ad..901123684154 100644 --- a/sys/compat/linux/linux_xattr.c +++ b/sys/compat/linux/linux_xattr.c @@ -68,6 +68,15 @@ struct setxattr_args { int follow; }; +struct getxattr_args { + int fd; + const char *path; + const char *name; + void *value; + l_size_t size; + int follow; +}; + static char *extattr_namespace_names[] = EXTATTR_NAMESPACE_NAMES; @@ -262,47 +271,66 @@ linux_fremovexattr(struct thread *td, struct linux_fremovexattr_args *args) } static int -linux_path_getxattr(struct thread *td, const char *upath, const char *uname, - void *value, l_size_t size, int follow) +getxattr(struct thread *td, struct getxattr_args *args) { char attrname[LINUX_XATTR_NAME_MAX + 1]; int attrnamespace, error; - error = xatrr_to_extattr(uname, &attrnamespace, attrname); + error = xatrr_to_extattr(args->name, &attrnamespace, attrname); if (error != 0) return (error); - - return (kern_extattr_get_path(td, upath, attrnamespace, - attrname, value, size, follow, UIO_USERSPACE)); + if (args->path != NULL) + error = kern_extattr_get_path(td, args->path, attrnamespace, + attrname, args->value, args->size, args->follow, UIO_USERSPACE); + else + error = kern_extattr_get_fd(td, args->fd, attrnamespace, + attrname, args->value, args->size); + return (error); } int linux_getxattr(struct thread *td, struct linux_getxattr_args *args) { + struct getxattr_args eargs = { + .fd = -1, + .path = args->path, + .name = args->name, + .value = args->value, + .size = args->size, + .follow = FOLLOW, + }; - return (linux_path_getxattr(td, args->path, args->name, - args->value, args->size, FOLLOW)); + return (getxattr(td, &eargs)); } int linux_lgetxattr(struct thread *td, struct linux_lgetxattr_args *args) { + struct getxattr_args eargs = { + .fd = -1, + .path = args->path, + .name = args->name, + .value = args->value, + .size = args->size, + .follow = NOFOLLOW, + }; - return (linux_path_getxattr(td, args->path, args->name, - args->value, args->size, NOFOLLOW)); + return (getxattr(td, &eargs)); } int linux_fgetxattr(struct thread *td, struct linux_fgetxattr_args *args) { - char attrname[LINUX_XATTR_NAME_MAX + 1]; - int attrnamespace, error; + struct getxattr_args eargs = { + .fd = args->fd, + .path = NULL, + .name = args->name, + .value = args->value, + .size = args->size, + .follow = 0, + }; - error = xatrr_to_extattr(args->name, &attrnamespace, attrname); - if (error != 0) - return (error); - return (kern_extattr_get_fd(td, args->fd, attrnamespace, - attrname, args->value, args->size)); + return (getxattr(td, &eargs)); } static int From nobody Fri Sep 1 08:14:40 2023 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 4RcW6918zJz4sDbv; Fri, 1 Sep 2023 08:14:41 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcW690dc1z3KPt; Fri, 1 Sep 2023 08:14:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693556081; 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=gwreUuqGI8guUuB/P+A/aQhEr/2hvoid1gur57Idyyc=; b=fjelrMiuVOewBgBDqJtdJVJkH5vBcx61nFCX3iTb1qrm9k8YiK9LkALWyl+UDeqytLSdKA xcXn8m1R8fd6yYwEvC+4aqfHZJWKV7CeiUtHKEwCrzW8RrvVa5mzaKkCF4TCAEFcL2fE7q gMwygDyUl/OxHkDm3w42K2sVlvLcnKY13w6kcrjb7M2L9y8PHWP75AnMNtVeXk2RKdFmaN mZLGZzfSSKxnuKpRaUaOdF3UPdXHJO7H648kTkVT64TFYY4M+60IU383RHd1jFYOwr3T2b oQeg/+431OMk65Rbcn7xG35MCE02HZAKafW+xqsygZirvw/Io4OKuwwT8zhNMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693556081; a=rsa-sha256; cv=none; b=Nr2bfdbE3KUirI70vJCDOU1MN5QIMm7pH5h6htils7UWc2YdlRb2tpKefgLNsmf0hr6Z7M gePajlMkO1sdCY8cQAiIPEyG0zsp2JgNzLQnveG5/zTfqUK++VSwvph1ilNEhe8U1zTOLT t15DabN1WH/U1CHxkULOqiEudczkjN7PnfNNK1LGdw+5u4k1FO+4HIESCGvW7l4dgGqQzz tWj02K516iXDk8mLznVZBLrDAnPNIaGrhkdB81uKK4aAC+OMQTrR9Y3UYuYy0OFfWgebDD 86iLECpmK9eQ3obEZugQvgZvuPOxuR28bptKsHDpkVsPld7wKCDiw3nj4xFXaA== 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=1693556081; 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=gwreUuqGI8guUuB/P+A/aQhEr/2hvoid1gur57Idyyc=; b=C+0v1VvlqKUm04MSd1Lk1I4RWev/FgY4uGFdrU069YhTNswkbcsEFQIBhmZ8vcfgKkN/UU Q+MUyfjav4cVDhdf9NFh88HS1H1RhUv42ccXgw+Ucj2YnyyT72oUDSpGI0rop6MrhdlY+h QMy799n4OsSvH1URw+ryz06PX/Z0Dl1uiHhjZa5gOhynfwLQPauvSNO+dqpoA4w3yjsleq 6R0I/cI2UOE+k3tNtzRsoEQrstlSxLEMasZ16FYPI3cur8Pjz89hgnICylkyejizEcYU8n 93+vF+j0FgVL+8U8G5Aqy5FKe1ZWouwNDUtLLPpmc4nDO3UtpGDHTtCTQnVSoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcW686pMlztTw; Fri, 1 Sep 2023 08:14:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3818Ee5Y008331; Fri, 1 Sep 2023 08:14:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3818Ee5F008328; Fri, 1 Sep 2023 08:14:40 GMT (envelope-from git) Date: Fri, 1 Sep 2023 08:14:40 GMT Message-Id: <202309010814.3818Ee5F008328@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 4d59b790553e - main - linux(4): Return ENODATA from getxattr syscalls instead of EPERM 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4d59b790553ef75b9a4b6a673eab3354f3d012b3 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=4d59b790553ef75b9a4b6a673eab3354f3d012b3 commit 4d59b790553ef75b9a4b6a673eab3354f3d012b3 Author: Dmitry Chagin AuthorDate: 2023-09-01 08:10:12 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-01 08:10:12 +0000 linux(4): Return ENODATA from getxattr syscalls instead of EPERM On Linux ENODATA mean the named attribute does not exist, or the process has no access to this attribute. Reported by: zirias Tested by: zirias MFC after: 1 week --- sys/compat/linux/linux_xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_xattr.c b/sys/compat/linux/linux_xattr.c index 901123684154..b9717c62133c 100644 --- a/sys/compat/linux/linux_xattr.c +++ b/sys/compat/linux/linux_xattr.c @@ -285,7 +285,7 @@ getxattr(struct thread *td, struct getxattr_args *args) else error = kern_extattr_get_fd(td, args->fd, attrnamespace, attrname, args->value, args->size); - return (error); + return (error == EPERM ? ENOATTR : error); } int From nobody Fri Sep 1 08:14:41 2023 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 4RcW6B5k8Tz4sDV9; Fri, 1 Sep 2023 08:14:42 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcW6B1xPZz3KQ8; Fri, 1 Sep 2023 08:14:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693556082; 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=S+mntM+AxrwDbnpAxBTdlx+wwCbOAy2nMKovNdrtMIU=; b=E4amY46KmoCTyhtgxUNOY2Tan2LksxDMYuBveoWmxMPXGwgZBdEX4uAmHcXq6ltEzbrIVt b4lZaEwa+B32PH1vsortcjVfnp1n4fU8zw4zXxSKmr7/lYxRLS+tnP9KA+7Fp+buLbz499 5wsLz+Gd21M4RRhzCKraSpswokzeq8wFAAfuR7B28CTiG0XwvrLdUb+yTne44Hj0W+bj8M Nx8O7Wayno9EntErR1nHZafnU/Iom65wb9u2yscwUSxii/QdSMv/gUw2Q/tOzsrgqK0tC+ /UxKi0MLRvd2zQSK/+E2HrZy2O23FM+Hf/q9rjwKbKAMPS8AQJe1Kz4ATNfZKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693556082; a=rsa-sha256; cv=none; b=Jm+JRZ5eOhQ4OTa7jOG6YejBbRmDgOePHjh+/pTSgcXIcEsLp2iFt4qhrXhF4nkj4FxKpJ 8o/ksJLDJcmmtZQJBL/yPZq/glAHtSYC968zjzoyPak25UncEkB+DLReuCGiV7ceBaQaMe YPTyUE4acGKynIwKxK8Wk5UEe4N5Rh1AFFejaZ3PEgDxlpO5fe18uzqXVhCtpm9cpAl34B +KGHXHUeFYU1Zsz9PsG9L7qrD+Y2TXN93SkUQIAaahu+eCfE4ZM8rmBQXW6d/rkVo3Cp5J GZy7v+edTovmAU2+R+7QdyS4YJYN6VJHOa1pO1xUENwIuMrwLWCoutTXwF+qCA== 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=1693556082; 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=S+mntM+AxrwDbnpAxBTdlx+wwCbOAy2nMKovNdrtMIU=; b=TS6L7i/2HlR7ngiR8S6DYwlIyn4jIVZs1+RmpKpLQ7cBS9P5jay/xv6Nk7bJGDZ+82yfX4 PJygU+rirnLFdcvvprp+PglHb6w9fPUJ/mhVIK4wsOz7wsmvHQKyW3DtAfFZjVI76P03HD iMBqgFKJomyFmBz/mtnHKTLOo+sY3Gr+nbMHp0kW+m5MjZyvuC0fVs6gYGwGalk/32p5PT fdgcBLwS+lzsRphvta77c8hNsGZdhBUjNFC3m3Xg/wl61VS4EKTv1I8NB7+SI/ZxNHg+iQ Ix0k/ahtvG9Ivcpb59i02h/I25pRW9wnFyLttUEdMAGRVnqv64aQ7HbDE015GQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcW6B0WskztXH; Fri, 1 Sep 2023 08:14:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3818EfQl008379; Fri, 1 Sep 2023 08:14:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3818EfuU008376; Fri, 1 Sep 2023 08:14:41 GMT (envelope-from git) Date: Fri, 1 Sep 2023 08:14:41 GMT Message-Id: <202309010814.3818EfuU008376@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: dfcc0237c3a9 - main - linux(4): Merge removexattr for future error recode 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dfcc0237c3a97f4f7962da854389f3c5d976145a Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=dfcc0237c3a97f4f7962da854389f3c5d976145a commit dfcc0237c3a97f4f7962da854389f3c5d976145a Author: Dmitry Chagin AuthorDate: 2023-09-01 08:10:44 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-01 08:10:44 +0000 linux(4): Merge removexattr for future error recode Tested by: zirias MFC after: 1 week --- sys/compat/linux/linux_xattr.c | 54 +++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/sys/compat/linux/linux_xattr.c b/sys/compat/linux/linux_xattr.c index b9717c62133c..2b46cf708c7d 100644 --- a/sys/compat/linux/linux_xattr.c +++ b/sys/compat/linux/linux_xattr.c @@ -77,6 +77,13 @@ struct getxattr_args { int follow; }; +struct removexattr_args { + int fd; + const char *path; + const char *name; + int follow; +}; + static char *extattr_namespace_names[] = EXTATTR_NAMESPACE_NAMES; @@ -227,47 +234,60 @@ linux_flistxattr(struct thread *td, struct linux_flistxattr_args *args) } static int -linux_path_removexattr(struct thread *td, const char *upath, const char *uname, - int follow) +removexattr(struct thread *td, struct removexattr_args *args) { char attrname[LINUX_XATTR_NAME_MAX + 1]; int attrnamespace, error; - error = xatrr_to_extattr(uname, &attrnamespace, attrname); + error = xatrr_to_extattr(args->name, &attrnamespace, attrname); if (error != 0) return (error); - - return (kern_extattr_delete_path(td, upath, attrnamespace, - attrname, follow, UIO_USERSPACE)); + if (args->path != NULL) + error = kern_extattr_delete_path(td, args->path, attrnamespace, + attrname, args->follow, UIO_USERSPACE); + else + error = kern_extattr_delete_fd(td, args->fd, attrnamespace, + attrname); + return (error); } int linux_removexattr(struct thread *td, struct linux_removexattr_args *args) { + struct removexattr_args eargs = { + .fd = -1, + .path = args->path, + .name = args->name, + .follow = FOLLOW, + }; - return (linux_path_removexattr(td, args->path, args->name, - FOLLOW)); + return (removexattr(td, &eargs)); } int linux_lremovexattr(struct thread *td, struct linux_lremovexattr_args *args) { + struct removexattr_args eargs = { + .fd = -1, + .path = args->path, + .name = args->name, + .follow = NOFOLLOW, + }; - return (linux_path_removexattr(td, args->path, args->name, - NOFOLLOW)); + return (removexattr(td, &eargs)); } int linux_fremovexattr(struct thread *td, struct linux_fremovexattr_args *args) { - char attrname[LINUX_XATTR_NAME_MAX + 1]; - int attrnamespace, error; + struct removexattr_args eargs = { + .fd = args->fd, + .path = NULL, + .name = args->name, + .follow = 0, + }; - error = xatrr_to_extattr(args->name, &attrnamespace, attrname); - if (error != 0) - return (error); - return (kern_extattr_delete_fd(td, args->fd, attrnamespace, - attrname)); + return (removexattr(td, &eargs)); } static int From nobody Fri Sep 1 08:14:43 2023 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 4RcW6C3nFhz4sDc0; Fri, 1 Sep 2023 08:14:43 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcW6C2rN3z3K8q; Fri, 1 Sep 2023 08:14:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693556083; 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=NxxjKJ4OMMMvGj67gKkJw6Vasom8Jgn8wGm1tNYrZ7c=; b=haxY9R4RPQF7SM22sQCHcpTXGt2P7COCpTHgPZLTB6BOVhU/fIsYF4HYbnySiOtAvyg3a+ XbcAtmYfyu/dgRZgRyr0VFswmWmwCj1NWj+oJuoMGoRcpJSIOIquL9gTIEPVOnbCOm2dG6 6aLCiDdIxvcWTytS4Zp+A4DJ5A0lrX7kEdnkxYkDCUiv3/T/JZ4t0fnZWe2m4sfSJDxTPM 48tJlY6BSrBh3gN0HgVAH8lWKt8rDZgh22B+ATKNlffIdMHljLYnFxfccnkfw5y67nCMl5 JnK7fI5Ae7e2kZ5lKTnf2qig8/UNmLHEu+yzir4T1HzU3v12XlYGt4/u8SPayg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693556083; a=rsa-sha256; cv=none; b=NODQHTWGVM2YjOktRZ65Iw5GvDHR/m2TIVFW15J66y3XMoyHjcMU9yn+dmGu1i/MAh5kOI PBloiE2gRQg+nTaSUQ1eD85mXr/ifkHyqj0gP1LNyFGsk0y0QwzYpNF7pZgQTQ5IuWiFRT CtrahEEGNyMven+mkmAFff7c0xYF5NMQQisgfPqRoowxTpqzgQleAeAltnaKkC2Wj7vTSP Fq1hz95x9mn83CG1P+DRXaAm6aHTstRkg4bymAdwQvMmrx8D8bS4GsMCwdjj3yo5Bxab4i Z4GbABv4BQ6C2ieCkuZh1Q1qlGuR/qU54cw80URqvLj7ZqbRhd3N9mUDkbNQSA== 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=1693556083; 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=NxxjKJ4OMMMvGj67gKkJw6Vasom8Jgn8wGm1tNYrZ7c=; b=vubEYIcqUcZFK0hVBmHuPu/plY4nNdY4xecTEGlFeNuh7XORlYC5A5k8SUFDbHnrACrHKM jef7EsKMHmquFklrb1xFQi0S0QOI09h69k5CHQRyeVK/clkJlEBVIkb53TM9bqrEZ+CwZD tAtuIGv0q1Hbiv7yOY4lItITMLY2tPaMUaHvaWNQpgYwj9K0tCGxgpkKXtvYSxjHo8Zalx Uano2OdjHbntvdeZPHZZSKFAm2aSTlDlIo/iwiQxjeOScwrMQ1rfiey1yXifl59cpndulW zuOYDyyJLdFmMNawnFZvHukm+A9TC/v84lr2wL7RPRevtsjqcLvGbljQCj7kJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcW6C1ZjTztJR; Fri, 1 Sep 2023 08:14:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3818Ehxe008433; Fri, 1 Sep 2023 08:14:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3818EhNl008430; Fri, 1 Sep 2023 08:14:43 GMT (envelope-from git) Date: Fri, 1 Sep 2023 08:14:43 GMT Message-Id: <202309010814.3818EhNl008430@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 1bfc4574f786 - main - linux(4): Return ENOTSUP from xattr syscalls instead of EPERM 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1bfc4574f78653e4b64ac9dd31518c96a17fe52b Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=1bfc4574f78653e4b64ac9dd31518c96a17fe52b commit 1bfc4574f78653e4b64ac9dd31518c96a17fe52b Author: Dmitry Chagin AuthorDate: 2023-09-01 08:11:02 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-01 08:11:02 +0000 linux(4): Return ENOTSUP from xattr syscalls instead of EPERM FreeBSD does not permits manipulating extended attributes in the system namespace by unprivileged accounts, even if account has appropriate privileges to access filesystem object. In Linux the system namespace is used to preserve posix acls. Some Gnu coreutils binaries uses posix acls, eg, install, ls. And fails if we unexpectedly return EPERM error from xattr system calls. In the other hands, in Linux read and write access to the system namespace depend on the policy implemented for each filesystem, so we'll mimics we're a filesystem that prohibits this for unpriveleged accounts. Reported by: zirias Tested by: zirias MFC after: 1 week --- sys/compat/linux/linux_xattr.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sys/compat/linux/linux_xattr.c b/sys/compat/linux/linux_xattr.c index 2b46cf708c7d..74b47f1cbaec 100644 --- a/sys/compat/linux/linux_xattr.c +++ b/sys/compat/linux/linux_xattr.c @@ -87,6 +87,16 @@ struct removexattr_args { static char *extattr_namespace_names[] = EXTATTR_NAMESPACE_NAMES; +static int +error_to_xattrerror(int attrnamespace, int error) +{ + + if (attrnamespace == EXTATTR_NAMESPACE_SYSTEM && error == EPERM) + return (ENOTSUP); + else + return (error); +} + static int xatrr_to_extattr(const char *uattrname, int *attrnamespace, char *attrname) { @@ -188,7 +198,7 @@ listxattr(struct thread *td, struct listxattr_args *args) if (error == 0) td->td_retval[0] = cnt; free(data, M_LINUX); - return (error); + return (error_to_xattrerror(attrnamespace, error)); } int @@ -248,7 +258,7 @@ removexattr(struct thread *td, struct removexattr_args *args) else error = kern_extattr_delete_fd(td, args->fd, attrnamespace, attrname); - return (error); + return (error_to_xattrerror(attrnamespace, error)); } int @@ -392,7 +402,7 @@ setxattr(struct thread *td, struct setxattr_args *args) attrname, args->value, args->size); out: td->td_retval[0] = 0; - return (error); + return (error_to_xattrerror(attrnamespace, error)); } int From nobody Fri Sep 1 08:14:44 2023 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 4RcW6D4D5nz4sF0V; Fri, 1 Sep 2023 08:14:44 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcW6D3Xfjz3KZ4; Fri, 1 Sep 2023 08:14:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693556084; 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=W1r9h4vjdqi98fup6XT5wtFpdmYo8fNkAipMbte40VY=; b=U9wau1nvIBIgDyBPhhWsp8BacytaTk5mmuzWyvjK3rPkK+dIHNRKacDL2vfmublqx+qUdY vrUOjH3xocetnz0ojFZfRSTKq9QBW1hijIYoTaRFw0xw4xuM5/5fBiHwqbkxLBef8KnxXh jo9DDIjYbru3LXBWLrOJeK+YFeVhyO7vKpSnTpdSHPxq1xBNi9xERQvsQ0Yhg2GPOYt6En PJHZ4EheR68iV0hRlDyGCDKRgmOd+k/rWTL3dDQRtVcDzCJYM9tVnCKOpNYqRY5D7Wm1nO NG3BbnqSbk9qsSShBRz0ZtUK62BJqD1yjowx+0BUCKcpxh0QL6qtk2OC+7KVGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693556084; a=rsa-sha256; cv=none; b=aFSCw7HQH31ESe/KEkm1/bB0MgafPMmG07CBBm2ESu/wen7Sn6dPlTIUTqXjD1esZXScvM ZGrHrXoCN6ZDQYe63cRIM5yw22ijbEAUwA5sDM7vHencumXQNS7QU6TO2PCD+Pk2QjdzXE /jjtPMlOToP6W4zGAckbLWqfB+i3ha5f+kJ6ZZXMs7qtfu/r0xPMlEig35Mp5KeTXvFl9V ShHm7uqnRuAPIBTOjThE8Xh1Kfmy+KBb9QEXyWHvk31HI+O417AT+s1IMXc6Z2zZEPTZ25 juveKKqI7m5VXAk8SFbq7UMRqiR8Fa7C0URbclvHJ56LLXrS4o8XuERCVecwWQ== 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=1693556084; 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=W1r9h4vjdqi98fup6XT5wtFpdmYo8fNkAipMbte40VY=; b=HfqcaQ26aRnNzS97UYecJCFcMHv8p3AuYRyhmCNV27ntOkgJaNLPdpuQFadBhCQH9dtBy9 ltMJowOxmiS/2nfT/awypa/6h5aGENCoS326hBg1d2z24JxBP+DdO+rr16wE0f+GTtMGce OhsNm+iwo1W9jW3VbcjSwV3S3Bf0LJY34AAqTWA7MV/KBgek9Bs6S47Wze8SIFapUfSPrc a8i8l/oVHOvX7lGays83ALHeMFjS/JP66fCSjpoTQC6jOJ6yIWDFSIY9oFfXqoLU4iHs0l 7jIR85gHi6ywxCz3Eo/A49jfjkmf1XYTYgCcx0B5/90dDqwnqMAc/9ILhIguXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcW6D2fGRztP3; Fri, 1 Sep 2023 08:14:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3818EiLX008491; Fri, 1 Sep 2023 08:14:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3818EiJK008488; Fri, 1 Sep 2023 08:14:44 GMT (envelope-from git) Date: Fri, 1 Sep 2023 08:14:44 GMT Message-Id: <202309010814.3818EiJK008488@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: cb48780db4d6 - main - jail: Add the ability to access system-level filesystem extended attributes 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb48780db4d6d276d0abd2f84d41185fce17ff83 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=cb48780db4d6d276d0abd2f84d41185fce17ff83 commit cb48780db4d6d276d0abd2f84d41185fce17ff83 Author: Shawn Webb AuthorDate: 2023-09-01 08:11:33 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-01 08:11:33 +0000 jail: Add the ability to access system-level filesystem extended attributes Prior to this commit privileged accounts in a jail could not access to the filesystem extended attributes in the system namespace. To control access to the system namespace in a per-jail basis add a new configuration parameter allow.extattr which is off by default. Reported by: zirias Tested by: zirias Obtained from: HardenedBSD Reviewed by: kevans, jamie Differential revision: https://reviews.freebsd.org/D41643 MFC after: 1 week Relnotes: yes --- sys/kern/kern_jail.c | 14 ++++++++++++++ sys/sys/jail.h | 3 ++- usr.sbin/jail/jail.8 | 8 ++++++-- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 39bdcaf5ef0e..0c1f565638da 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -220,6 +220,7 @@ static struct bool_flags pr_flag_allow[NBBY * NBPW] = { #ifdef VIMAGE {"allow.nfsd", "allow.nonfsd", PR_ALLOW_NFSD}, #endif + {"allow.extattr", "allow.noextattr", PR_ALLOW_EXTATTR}, }; static unsigned pr_allow_all = PR_ALLOW_ALL_STATIC; const size_t pr_flag_allow_size = sizeof(pr_flag_allow); @@ -4059,6 +4060,17 @@ prison_priv_check(struct ucred *cred, int priv) case PRIV_VFS_READ_DIR: return (0); + /* + * Conditionally allow privileged process in the jail to + * manipulate filesystem extended attributes in the system + * namespace. + */ + case PRIV_VFS_EXTATTR_SYSTEM: + if ((cred->cr_prison->pr_allow & PR_ALLOW_EXTATTR) != 0) + return (0); + else + return (EPERM); + /* * Conditionnaly allow locking (unlocking) physical pages * in memory. @@ -4552,6 +4564,8 @@ SYSCTL_JAIL_PARAM(_allow, suser, CTLTYPE_INT | CTLFLAG_RW, SYSCTL_JAIL_PARAM(_allow, nfsd, CTLTYPE_INT | CTLFLAG_RW, "B", "Mountd/nfsd may run in the jail"); #endif +SYSCTL_JAIL_PARAM(_allow, extattr, CTLTYPE_INT | CTLFLAG_RW, + "B", "Jail may set system-level filesystem extended attributes"); SYSCTL_JAIL_PARAM_SUBNODE(allow, mount, "Jail mount/unmount permission flags"); SYSCTL_JAIL_PARAM(_allow_mount, , CTLTYPE_INT | CTLFLAG_RW, diff --git a/sys/sys/jail.h b/sys/sys/jail.h index 088a0bc33d6d..fb8858f73453 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -253,7 +253,8 @@ struct prison_racct { #define PR_ALLOW_RESERVED_PORTS 0x00008000 #define PR_ALLOW_KMEM_ACCESS 0x00010000 /* reserved, not used yet */ #define PR_ALLOW_NFSD 0x00020000 -#define PR_ALLOW_ALL_STATIC 0x000387ff +#define PR_ALLOW_EXTATTR 0x00040000 +#define PR_ALLOW_ALL_STATIC 0x000787ff /* * PR_ALLOW_DIFFERENCES determines which flags are able to be diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index 0e98914795a2..f6fd04d52162 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 26, 2023 +.Dd September 1, 2023 .Dt JAIL 8 .Os .Sh NAME @@ -642,6 +642,9 @@ sysctl. The super-user will be disabled automatically if its parent system has it disabled. The super-user is enabled by default. +.It Va allow.extattr +Allow privileged process in the jail to manipulate filesystem extended +attributes in the system namespace. .El .El .Pp @@ -1414,7 +1417,8 @@ environment of the first jail. .Xr shutdown 8 , .Xr sysctl 8 , .Xr syslogd 8 , -.Xr umount 8 +.Xr umount 8 , +.Xr extattr 9 .Sh HISTORY The .Nm From nobody Fri Sep 1 08:14:45 2023 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 4RcW6F5Nhfz4sDpb; Fri, 1 Sep 2023 08:14:45 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcW6F4Z7pz3KjQ; Fri, 1 Sep 2023 08:14:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693556085; 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=hSY7Ew+VsKs5i2A74A1IgkYM48FFAX42ROV2FFh+gVs=; b=UFHc96UjNd+PnngkM1CJWlOlDkRQIHDOSbn9I/M0Gwx1vUCButpMBMzdCqZ2CfGi2sW1T3 LaxEoCzKLFyNkaW9lb6dO601IgHy1nJx1adcVDBWHhKb0R8GvXbBktRy1YsL56iOtQwboJ OAQQ3S8tN7u6+LF/2ku14QB52GNZDmsKQpuy5qmZrK8tDBSk0wx+0yCUlytOoZqRn7tpU0 pRyWiXqdg7Oc5dMkM2bWUuGU+O6gRSQ+jY7DU2tD3TcpjgqfEadADzXRS8Uo1nZf1GkRSS EAAVdVzSo9muBiLaDvKUGWu2cCWieDj9tPwbsMal8826Ho/QTtD/LXIGDZ6RAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693556085; a=rsa-sha256; cv=none; b=s55N1VdrDtq2RY+CcDtbLRDT7KfPDAZn3si5SVq328r8Ikt4mtFwq4zx+jA1MMFbPe0jtZ scXlTYa3zbyRsvV6Vtr3PDpFY6zEF89ixBsLiaenrZ6DVHvA3rVu1GUw4B+sfA9IlyDeVl 587l5zCBOM7f1/a6Nm0d8gtLZrR3RGmr9jR79imTH3h0TmNvxzZKSRe7pwHu22Fb72LpT+ qY4HS4S+bFiMjdriX1yMbyl+VrB7N7uutUcjIHsBEz7I7Ib2ELF/CdhBmPedRqCdpeknoe cLDec83Psob7ZPP9/httc0+d/cCDZfC5Z75BHKT52N1cE2biWlZSkoPYJ46PqA== 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=1693556085; 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=hSY7Ew+VsKs5i2A74A1IgkYM48FFAX42ROV2FFh+gVs=; b=WB0q6ho2Wfxqa6xmdcjrJ/hxXeCgVkCgYOrWnMzFnzlCtMtisiEkOpdyqi5KHBNCwxqTnI 2P8xu5CRp2D1Ga2v0EqWSJtXpyxwuJrNc/Gioh3v5e+IZZIL6adyxlYztwUJqoFecuCvE+ UUSodCdvEz5MKp8E0WltfFQcmx4T/tlIncmIBWEhgvC7Q+GEjJTxBZPIEaK/aAFmSSh/+r Js0EiYOhaUZ8mZGqSRUhB3v8nrmg61CkKq1fz3DeNN0jkWWhQd7h+8+u0ivhL12u8OSqd8 q0YIKnMA0Qmis/qpCH3cPI0fnYi0noVgDrYea1nUYexba6lXMUKo7xsd63SkXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcW6F3fcyztTx; Fri, 1 Sep 2023 08:14:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3818EjBA008549; Fri, 1 Sep 2023 08:14:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3818EjHK008546; Fri, 1 Sep 2023 08:14:45 GMT (envelope-from git) Date: Fri, 1 Sep 2023 08:14:45 GMT Message-Id: <202309010814.3818EjHK008546@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 315d7bbbb4e4 - main - extattr(9): Mention system namespace restrictions in a jail 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 315d7bbbb4e4b35d195a0a74ede229b1f64d42cc Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=315d7bbbb4e4b35d195a0a74ede229b1f64d42cc commit 315d7bbbb4e4b35d195a0a74ede229b1f64d42cc Author: Dmitry Chagin AuthorDate: 2023-09-01 08:12:51 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-01 08:12:51 +0000 extattr(9): Mention system namespace restrictions in a jail Reported by: netchild Reviewed by: gbe Differential revision: https://reviews.freebsd.org/D41676 MFC after: 1 week --- share/man/man9/extattr.9 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/man/man9/extattr.9 b/share/man/man9/extattr.9 index 3a49746d1eb1..c765a55e9059 100644 --- a/share/man/man9/extattr.9 +++ b/share/man/man9/extattr.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 23, 1999 +.Dd September 1, 2023 .Dt EXTATTR 9 .Os .Sh NAME @@ -54,6 +54,10 @@ attribute data is protected according the normal discretionary and mandatory protections associated with the data in the file or directory; system attribute data is protected such that appropriate privilege is required to directly access or manipulate these attributes. +By default processes in a +.Xr jail 8 +can not access to the system attribute data unless allow.extattr +configuration parameter is specified. .Pp Reads of extended attribute data may return specific contiguous regions of the meta-data, in the style of @@ -77,6 +81,7 @@ Appropriate vnode extended attribute calls are: and .Xr VOP_SETEXTATTR 9 . .Sh SEE ALSO +.Xr jail 8 , .Xr VFS 9 , .Xr VFS_EXTATTRCTL 9 , .Xr VOP_GETEXTATTR 9 , From nobody Fri Sep 1 08:14:46 2023 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 4RcW6H0ZW9z4sDfj; Fri, 1 Sep 2023 08:14:47 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcW6G5cbWz3Kb4; Fri, 1 Sep 2023 08:14:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693556086; 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=J3JOXizyIenp9iCP6y4ttFlx/CxGrXOFYfpEevT3KmI=; b=n0jmmd1pDPKGumCAkBtVsnX+gMgQ9n90+LJbywXEzODl5968OIBV2Pda3Q7Pj3di+wudkr p6genldZA9yu0gO+eeRFYNkttH/ANZqlQjmnHPqRZmGM/GaTWzXu6RP2pTj73rje2tYzKj ZrcY+Pkq+8yWxddMLpGLci4kYajnKFDMXp3HGMuJrH+tm5zznE3Qd9QrFkfxd102C5ogEC fywvuYOcoxOhvwrJFFOo6CdhvNv+jJ+43V3zqrM/4RZY8/5eRTkHwG7ojVGICvi3bV28fd 9ommR5HqgTLj4+23seggvxuYb0KgjRFd7HN2dMmgMxXoyXAj+YoA1cfxzwfhWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693556086; a=rsa-sha256; cv=none; b=S7HU73fbrOF7QXVoBNQciuX5XXokW0Btmbv907DwJNcqEdxdROAV+4jDYLy5Po1yQ3YLVQ TZtjMc1kCnSboIm9jDT1NC3kFOuA4cCD+8GL5m/cFa2H4iHpvvBSSlOg0NsGBRlcV1M0LX dIvwyN6n/2YIrUrbLy8nTOvDJDvHWAuS7/29gtlFs0ocVRb7vGS6q8kemoQgma050qI8K2 gfAyW6wU00j3KiDFW1mtI0KMAWhvj5FnGwcyf4173vH/sk6lx2olsvGxfJ2AqAyBsAjsC9 e4Jd/pkRPi+EiTD4oIkUCe+BojRJO28LH6LXtneBqBYDcr61x4NAwCoALkhEhw== 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=1693556086; 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=J3JOXizyIenp9iCP6y4ttFlx/CxGrXOFYfpEevT3KmI=; b=RSOxhKDLENBsz5OXLiB2OTPvz4gKvtGQrwSwbx8NzIZ5+l7H9bXnWF18uC1gpAxbC2MFcL DVeSpaTIgAS5xqHBSRAjjotlbnAwu6QYpc2g0DZyLluRQBY15mosRgni1jAIgYFlcyYhi7 uknDxu+lBWmJ7aCoK8ylqX8P18aqLZtkVGW4OFcyR5c5ybolW7e4y7RdJN6Ai+eKfDaSSo yxgX3y3mibfXD3X5LeUf1StI3EgNYAxM5L9zbuv7VcdIjStb4QY/6YhVivYDSHu5iMKur1 1orA5Lm2hrt9kMtVBvy4JvpRroYSHjlaO+MdjGQYFDE6PXL7U9v9HOKorN4lGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcW6G4gvVztXJ; Fri, 1 Sep 2023 08:14:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3818EkTn008600; Fri, 1 Sep 2023 08:14:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3818Ek0j008597; Fri, 1 Sep 2023 08:14:46 GMT (envelope-from git) Date: Fri, 1 Sep 2023 08:14:46 GMT Message-Id: <202309010814.3818Ek0j008597@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 1d41989933bf - main - extattr(9): Remove a reference to a non-existent VFS_EXTATTRCTL(9) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d41989933bfb93929f85ce76b8c8d544c331b75 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=1d41989933bfb93929f85ce76b8c8d544c331b75 commit 1d41989933bfb93929f85ce76b8c8d544c331b75 Author: Dmitry Chagin AuthorDate: 2023-09-01 08:13:22 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-01 08:13:22 +0000 extattr(9): Remove a reference to a non-existent VFS_EXTATTRCTL(9) Reviewed by: gbe Differential Revision: https://reviews.freebsd.org/D41678 MFC after: 1 week --- share/man/man9/extattr.9 | 1 - 1 file changed, 1 deletion(-) diff --git a/share/man/man9/extattr.9 b/share/man/man9/extattr.9 index c765a55e9059..dc919bf4e056 100644 --- a/share/man/man9/extattr.9 +++ b/share/man/man9/extattr.9 @@ -83,7 +83,6 @@ and .Sh SEE ALSO .Xr jail 8 , .Xr VFS 9 , -.Xr VFS_EXTATTRCTL 9 , .Xr VOP_GETEXTATTR 9 , .Xr VOP_LISTEXTATTR 9 , .Xr VOP_SETEXTATTR 9 From nobody Fri Sep 1 08:14:47 2023 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 4RcW6J21zKz4sDty; Fri, 1 Sep 2023 08:14:48 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcW6H6YTkz3Kp6; Fri, 1 Sep 2023 08:14:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693556087; 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=xFD7wPoVk5eeUQt2G0uvsQ/xFANoDIXUQIjKjuZr4No=; b=rMKR7bbqMFhFmwySNAIaQ8sQWElLFgKIklHDGYb7uo7GfQTd78c+kualhkmC6+/sw/XYs9 x4ioPTl+vqx82CY0GNrGYLujEYl5t0bVpvlKn1UEPiZuepWmoKNT2YSzK8chO6y48JrdIQ gSjEe9J9jGTNUXXKXOjkTf2GP8eqrHvcMjSoeZF5z1w4lt61YfeLPVHckuCD2cMarX/ay/ AFZnkgeENNdicUOlI2va+VnoTAOMKigKZXd1ezERi/qVoNo317A2ZBFX1ctggewitF2y3k 17uuwqwspavAkY5kjMAwG9Cuikj4n6Oq4DHum36zld/jxf4oM7Hlvl8GH/GLkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693556087; a=rsa-sha256; cv=none; b=t7hsgQlErYhsfHY0o7Io+qnsBirXfKAfHzSMSphRPb9fQm+GAo45LNX38o17w9dMmaFNcm ep0rdHYKH9W4KKvXHSS8b1GsHD64yd4ZQD71RJh4ONmO6I4Ky4/urWZM2J5YmQISBr7vYB M1A4x6g/v0cDKmIFGDladmH4blzHwYqA5e/66ztenUNRjYo9eJmnIgfwxn/6XbzsTYoe7y rAxHl3af0NrDaT8UAnFaWwQLI/pKeRd2azTB39XVqm6/0brnWjZsPjFKWutYf17I6lxDRL y0t+O5XqBDeuNCqe+tVUIcBCJ67uu+ajJ3rfhrv6Edsb1uGiMoG5aIWZYVmAwQ== 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=1693556087; 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=xFD7wPoVk5eeUQt2G0uvsQ/xFANoDIXUQIjKjuZr4No=; b=cNOnaP5p5m/oxtAlAH1UVxvE6X+aNgpF0tEqCf/PajvtRayDIT8h38gsIXRWA8Hxo7lpFu NKbiZwIqRFjBCZ0SrERhrID0jPfpQNv3sx5Z7jKMKV393IHLSPxrtiIKd8WAnFcZcER+6v Se/5xz+syYGmrMUfMlt22UuwozIDd3VxMkRLlwGVBajbmNSfmDNWRwAGN9H5UIdRg45Yoc xpiXXkY2dkJDB0NZpQr6/zI1GXK0Yw60XS1dBmPi9rG9QxT+q2RbQnczhOBQfGcEhFly4A VblntgDaZMMNxzl3hXymJFqmRsJkYCs4kuVckXpzZKwL+ChAAGpURn80O/NmCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcW6H5g8Szt09; Fri, 1 Sep 2023 08:14:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3818ElfJ008640; Fri, 1 Sep 2023 08:14:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3818ElTB008637; Fri, 1 Sep 2023 08:14:47 GMT (envelope-from git) Date: Fri, 1 Sep 2023 08:14:47 GMT Message-Id: <202309010814.3818ElTB008637@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: edd28b857e2d - main - jail(8): Fix mandoc warnings 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: edd28b857e2d2aa672eb391b9ef3d3bf85277a21 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=edd28b857e2d2aa672eb391b9ef3d3bf85277a21 commit edd28b857e2d2aa672eb391b9ef3d3bf85277a21 Author: Dmitry Chagin AuthorDate: 2023-09-01 08:13:46 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-01 08:13:46 +0000 jail(8): Fix mandoc warnings Reviewed by: gbe Differential Revision: https://reviews.freebsd.org/D41680 MFC after: 1 week --- usr.sbin/jail/jail.8 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index f6fd04d52162..21f395609bb5 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -574,8 +574,9 @@ If the MIB entry is zero, this will be restricted to the root user. .It Va allow.socket_af Sockets within a jail are normally restricted to IPv4, IPv6, local -(UNIX), and route. This allows access to other protocol stacks that -have not had jail functionality added to them. +(UNIX), and route. +This allows access to other protocol stacks that have not had jail +functionality added to them. .It Va allow.mlock Locking or unlocking physical pages in memory are normally not available within a jail. @@ -671,7 +672,7 @@ and only when .Va enforce_statfs is set to a value lower than 2. .It Va allow.mount.fusefs -privileged users inside the jail will be able to mount and unmount +privileged users inside the jail will be able to mount and unmount fuse-based file systems. This permission is effective only together with .Va allow.mount @@ -764,7 +765,7 @@ the jail cannot perform any sysvmsg-related system calls. .It Va sysvsem, sysvshm Allow access to SYSV IPC semaphore and shared memory primitives, in the same manner as -.Va sysvmsg. +.Va sysvmsg . .El .Pp There are pseudo-parameters that are not passed to the kernel, but are From nobody Fri Sep 1 10:07:11 2023 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 4RcYc01KkJz4sKTg; Fri, 1 Sep 2023 10:07:12 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcYc00Ydhz3ZhW; Fri, 1 Sep 2023 10:07:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693562832; 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=p65XuJPD3atCP2p2X8S0W99yvw37SZQRQlSF0eWkz3g=; b=FK09NpxWzRdBoYtk3fM50vpP8o3/rouEid/+H1nRyKlgQ498qjT5+GVlGLyXSS7PeykeJC OGEF2gBlXn0lMHQpdmrVa0p8P2wm2ra5fgUaidTnDT9DJZ0/4e1LmtZLmAmSEk8JumrS2M ks2tL9Fy9/j7ytooT2lsweaj/MS8W5cPD/VwV6qNY1VqI8rWaI28lBil3wOgvb2yADMqv2 Vc1CRxUXkda2Mdw4y61Nw2QeYFwwYEEhtm2RK2JGz5uCLKDvltwSDJ+I62Q+lBmdooBusf NsesJmMDWc5vDYcsIiyZ+oqh70yganSEGMyhQ3CkZNzqCKiSnEfm65AwrZXYPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693562832; a=rsa-sha256; cv=none; b=RoLpy+qjg8HNd950kys0gUXFYvYAH3xoBgY5WDZKH9Fe/cfZjHyMMqyQtE+KMbRf+CvCrr EHUE6P9nhlpyUnlfIbzYR2JGdAw0LgO/i+25qXrjaqNee0SMFnLcPLafB65nAQJc6z+vwa Vh/YfMFsZ8O7mpEeU/qOj7mlDehVmwL1hCznBDCyA5gIMDYTsSO/UJyFAIAM32pWt9Wy/j 2qOFRyka4vtJ20jwaEhd2p/N7UkJe6RTRMI8vpHN6719MW4NZRRXAmOAiNpJjPCqqTh6ZD 28eQYvmqeZh+oQahPVdRR1ac/Kn5Q2kDOHp1E/WqyASt68e0L6sa1J0SOiFyhQ== 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=1693562832; 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=p65XuJPD3atCP2p2X8S0W99yvw37SZQRQlSF0eWkz3g=; b=J/UlA092ttJhA/wJNSueakzrmeqW8NXW1+4AqvOok1AMSPDSlXPwa2L/dXGzm3ihaqbtVl 1MguMcwnnr0a5UiVpPOHSRWHNzIBQwWdv5GnQb7jgM9MFpueA9EAFccCGv+hS9nLdaNboU 230XFl7lHhudyOwWqFjo+rzHpdM11ekFO41VEM9oL5Wea4NJfZBJSf+nioLxvsI1ricENY zsuaQS8ox6YwPmCokxqeSkAf8HmD8fNrLvmQMhWgdYG4pL6Vmx9M3uVFiVQx906PEQH6Bp cLTn3bNx+kZmmG2RxJkEAwjVqCMLedU6TW1nDEfMxIKX/HbmJSldx+g69PR9CQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcYbz6l3gzwkS; Fri, 1 Sep 2023 10:07:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381A7BEM092305; Fri, 1 Sep 2023 10:07:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381A7BIQ092302; Fri, 1 Sep 2023 10:07:11 GMT (envelope-from git) Date: Fri, 1 Sep 2023 10:07:11 GMT Message-Id: <202309011007.381A7BIQ092302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 7ad28b73ec1f - main - arm: Add a userspace physical timer check 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ad28b73ec1fd78a28a708da442d4a4c9e573172 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=7ad28b73ec1fd78a28a708da442d4a4c9e573172 commit 7ad28b73ec1fd78a28a708da442d4a4c9e573172 Author: Andrew Turner AuthorDate: 2023-08-23 12:34:09 +0000 Commit: Andrew Turner CommitDate: 2023-09-01 09:49:18 +0000 arm: Add a userspace physical timer check We currently use the same Arm generic time in both userspace and the kernel. As we always enable userspace access to the virtual timer we can tell userspace to use it. Reviewed by: imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41565 --- sys/arm/arm/generic_timer.c | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c index b9562620848f..998259c5c90f 100644 --- a/sys/arm/arm/generic_timer.c +++ b/sys/arm/arm/generic_timer.c @@ -110,7 +110,8 @@ struct arm_tmr_softc { uint32_t clkfreq; int irq_count; struct eventtimer et; - bool physical; + bool physical_sys; + bool physical_user; }; static struct arm_tmr_softc *arm_tmr_sc = NULL; @@ -271,7 +272,7 @@ setup_user_access(void *arg __unused) /* Always enable the virtual timer */ cntkctl |= GT_CNTKCTL_PL0VCTEN; /* Enable the physical timer if supported */ - if (arm_tmr_sc->physical) { + if (arm_tmr_sc->physical_user) { cntkctl |= GT_CNTKCTL_PL0PCTEN; } set_el1(cntkctl, cntkctl); @@ -333,7 +334,7 @@ static unsigned arm_tmr_get_timecount(struct timecounter *tc) { - return (arm_tmr_sc->get_cntxct(arm_tmr_sc->physical)); + return (arm_tmr_sc->get_cntxct(arm_tmr_sc->physical_sys)); } static int @@ -347,11 +348,11 @@ arm_tmr_start(struct eventtimer *et, sbintime_t first, if (first != 0) { counts = ((uint32_t)et->et_frequency * first) >> 32; - ctrl = get_ctrl(sc->physical); + ctrl = get_ctrl(sc->physical_sys); ctrl &= ~GT_CTRL_INT_MASK; ctrl |= GT_CTRL_ENABLE; - set_tval(counts, sc->physical); - set_ctrl(ctrl, sc->physical); + set_tval(counts, sc->physical_sys); + set_ctrl(ctrl, sc->physical_sys); return (0); } @@ -375,7 +376,7 @@ arm_tmr_stop(struct eventtimer *et) struct arm_tmr_softc *sc; sc = (struct arm_tmr_softc *)et->et_priv; - arm_tmr_disable(sc->physical); + arm_tmr_disable(sc->physical_sys); return (0); } @@ -387,10 +388,10 @@ arm_tmr_intr(void *arg) int ctrl; sc = (struct arm_tmr_softc *)arg; - ctrl = get_ctrl(sc->physical); + ctrl = get_ctrl(sc->physical_sys); if (ctrl & GT_CTRL_INT_STAT) { ctrl |= GT_CTRL_INT_MASK; - set_ctrl(ctrl, sc->physical); + set_ctrl(ctrl, sc->physical_sys); } if (sc->et.et_active) @@ -616,7 +617,7 @@ arm_tmr_attach(device_t dev) phandle_t node; pcell_t clock; #endif - int error; + int error, user_phys; int i, first_timer, last_timer; sc = device_get_softc(dev); @@ -680,18 +681,28 @@ arm_tmr_attach(device_t dev) * coordinated with the virtual machine manager. */ if (!HAS_PHYS) { - sc->physical = false; + sc->physical_sys = false; first_timer = GT_VIRT; last_timer = GT_VIRT; } else #endif /* Otherwise set up the secure and non-secure physical timers. */ { - sc->physical = true; + sc->physical_sys = true; first_timer = GT_PHYS_SECURE; last_timer = GT_PHYS_NONSECURE; } + /* + * The virtual timer is always available on arm and arm64, tell + * userspace to use it. + */ + sc->physical_user = false; + /* Allow use of the physical counter in userspace when available */ + if (TUNABLE_INT_FETCH("hw.userspace_allow_phys_counter", &user_phys) && + user_phys != 0) + sc->physical_user = sc->physical_sys; + arm_tmr_sc = sc; /* Setup secure, non-secure and virtual IRQs handler */ @@ -790,10 +801,10 @@ arm_tmr_do_delay(int usec, void *arg) else counts = usec * counts_per_usec; - first = sc->get_cntxct(sc->physical); + first = sc->get_cntxct(sc->physical_sys); while (counts > 0) { - last = sc->get_cntxct(sc->physical); + last = sc->get_cntxct(sc->physical_sys); counts -= (int32_t)(last - first); first = last; } @@ -830,7 +841,7 @@ arm_tmr_fill_vdso_timehands(struct vdso_timehands *vdso_th, { vdso_th->th_algo = VDSO_TH_ALGO_ARM_GENTIM; - vdso_th->th_physical = arm_tmr_sc->physical; + vdso_th->th_physical = arm_tmr_sc->physical_user; bzero(vdso_th->th_res, sizeof(vdso_th->th_res)); return (1); } From nobody Fri Sep 1 10:07:12 2023 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 4RcYc123xXz4sKMM; Fri, 1 Sep 2023 10:07:13 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcYc11HKCz3ZW7; Fri, 1 Sep 2023 10:07:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693562833; 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=gz5Qx1YcNU3Bfi+CvCJsvx9BlfVVl71T/q944V4U+fo=; b=kvttDxO01tqeqfZap/DjYOQJBBbkmrZkOB6NthzjKHXJ89JcJdG0PgiXYKzeH/ganQ1H9O gIBSsYPvFjBkkZBSxDzS4420cqNkUBVxTNk4xpR0TuQQLF2+DQs4Nj9RD0MoM/jdiCA/JU CSzq9RY9jOWJXltlXfjcTkdoIakcxOganBiV62cbVoCSsHFn3qoDGVGfZBKCE32EyOJD5Z WB/aG53iKxeg2P88HPLBx1ZMMuP1EeH/tl+hK8yMqfr0l2FPAsF+gqpyh9nW+YKphDeood noE24dy1+FtLdHw0d8jSz0ZuxoP8b8SqgsBHRQX2b5HFgUz+0z3uqEhnVdkXyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693562833; a=rsa-sha256; cv=none; b=l24ekT0HtvIKal+UYu/n2Aj4PDwDemmr9mIwGSocQvGgXFJoCTw+m5b4D7ncbmdN11cebv C0hmce8ZFsQnTUHihSxSxAyv4ifB1vuIntw7guZIe2DAT2j2P6hnJi1silRpynX4f7s0wV OcwyIPY7t1a/zatCLDR/vCq/YI1DAe6wAe8sP4SrHIq9z4PH8DmoAL3G/2uDd8kdAsANZ3 YVztSdbXm4mVe54cDNsQmeM9Oxw/nbH27JoZvsvLYZfZd45GP18drEfeGyqryjCa8sNCg0 +QFWJwwum1OHPvm37q4xoSfU9FsJHdxqd8dJMuJzhzjU1yLhQuufg7ENOjzlcA== 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=1693562833; 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=gz5Qx1YcNU3Bfi+CvCJsvx9BlfVVl71T/q944V4U+fo=; b=SAcvqUPJbNXIw4P+3ldQFLJ0tG0gEmxxj908lFAWzUrCCqdx4u9uq0VOeUpmGDyICxYpMC N7m+36wU5gjhml2f4ZetLlbrKuFW9HwUaf3oauDfIhTMBsF61gy7OGQHxzg8DpwJoYWwUJ 4m6FPZyjAGACaVffNHldGai6MGwAAYc9pXWsFzIclnsR/q5nJyhvKEFSriLRphRoOGkouf jsnhLcvT2tOLWrZrd0k71Qd+f5HLGjuuYr3PRgrUNtG815Jfa4LY/SYKj2eR1IlhcjMAlM kPB1Ks0ktOvAKlkg/NDMp4zVMZ6rMRPxsTJTRWdutb0fM1V5gxZ62yGsMaF1jg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcYc10FDXzwXP; Fri, 1 Sep 2023 10:07:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381A7C7T092351; Fri, 1 Sep 2023 10:07:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381A7CXv092347; Fri, 1 Sep 2023 10:07:12 GMT (envelope-from git) Date: Fri, 1 Sep 2023 10:07:12 GMT Message-Id: <202309011007.381A7CXv092347@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 8b143276ae49 - main - gicv3: Support indirect ITS tables 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b143276ae493c8f060159643d9d9cdc149e294a Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=8b143276ae493c8f060159643d9d9cdc149e294a commit 8b143276ae493c8f060159643d9d9cdc149e294a Author: Andrew Turner AuthorDate: 2023-08-22 16:01:21 +0000 Commit: Andrew Turner CommitDate: 2023-09-01 09:56:17 +0000 gicv3: Support indirect ITS tables The GICv3 ITS device supports two options for device tables. Currently we support a single table to hold all device IDs, however when the device ID space grows large this can be too large for the GITS_BASER register to describe. To handle this case, and to reduce the memory needed when this space is sparse support the second option, the indirect table. The indirect table is a 2 level table where the first level contains the physical address of the second with a valid bit. The second level is an ITS page sized table where each entry is the original entry size. As we don't need to allocate a second level table for devices IDs that don't exist this can reduce the allocation size. Reviewed by: gallatin Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41555 --- sys/arm64/arm64/gic_v3_reg.h | 3 ++ sys/arm64/arm64/gicv3_its.c | 96 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 95 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/gic_v3_reg.h b/sys/arm64/arm64/gic_v3_reg.h index 6a766be3da2a..16b1cd438350 100644 --- a/sys/arm64/arm64/gic_v3_reg.h +++ b/sys/arm64/arm64/gic_v3_reg.h @@ -417,6 +417,8 @@ #define GITS_BASER_SIZE_MASK 0xFFUL #define GITS_BASER_NUM 8 +/* Size of entries in a level 1 indirect table */ +#define GITS_INDIRECT_L1_ESIZE 8 #define GITS_TYPER (0x0008) #define GITS_TYPER_HCC_SHIFT 24 @@ -433,6 +435,7 @@ ((((x) & GITS_TYPER_ITTES_MASK) >> GITS_TYPER_ITTES_SHIFT) + 1) #define GITS_TRANSLATER (0x10040) + /* * LPI related */ diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index cb655eaca412..a126a166c4c9 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2015-2016 The FreeBSD Foundation + * Copyright (c) 2023 Arm Ltd * * This software was developed by Andrew Turner under * the sponsorship of the FreeBSD Foundation. @@ -221,10 +222,16 @@ struct its_cmd { /* An ITS private table */ struct its_ptable { vm_offset_t ptab_vaddr; - /* Size of the L1 table */ + /* Size of the L1 and L2 tables */ size_t ptab_l1_size; - /* Number of L1 entries */ + size_t ptab_l2_size; + /* Number of L1 and L2 entries */ int ptab_l1_nidents; + int ptab_l2_nidents; + + int ptab_page_size; + int ptab_share; + bool ptab_indirect; }; /* ITS collection description. */ @@ -475,6 +482,23 @@ gicv3_its_table_page_size(struct gicv3_its_softc *sc, int table) } } +static bool +gicv3_its_table_supports_indirect(struct gicv3_its_softc *sc, int table) +{ + uint64_t reg; + + reg = gic_its_read_8(sc, GITS_BASER(table)); + + /* Try setting the indirect flag */ + reg |= GITS_BASER_INDIRECT; + gic_its_write_8(sc, GITS_BASER(table), reg); + + /* Read back to check */ + reg = gic_its_read_8(sc, GITS_BASER(table)); + return ((reg & GITS_BASER_INDIRECT) != 0); +} + + static int gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) { @@ -482,9 +506,10 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) vm_paddr_t paddr; uint64_t cache, reg, share, tmp, type; size_t its_tbl_size, nitspages, npages; - size_t l1_esize, l1_nidents; + size_t l1_esize, l2_esize, l1_nidents, l2_nidents; int i, page_size; int devbits; + bool indirect; if ((sc->sc_its_flags & ITS_FLAGS_ERRATA_CAVIUM_22375) != 0) { /* @@ -532,6 +557,9 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) return (EINVAL); } + indirect = false; + l2_nidents = 0; + l2_esize = 0; switch(type) { case GITS_BASER_TYPE_DEV: if (sc->sc_dev_table_idx != -1) @@ -540,6 +568,23 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) sc->sc_dev_table_idx = i; l1_nidents = (1 << devbits); + if ((l1_esize * l1_nidents) > (page_size * 2)) { + indirect = + gicv3_its_table_supports_indirect(sc, i); + if (indirect) { + /* + * Each l1 entry is 8 bytes and points + * to an l2 table of size page_size. + * Calculate how many entries this is + * and use this to find how many + * 8 byte l1 idents we need. + */ + l2_esize = l1_esize; + l2_nidents = page_size / l2_esize; + l1_nidents = l1_nidents / l2_nidents; + l1_esize = GITS_INDIRECT_L1_ESIZE; + } + } its_tbl_size = l1_esize * l1_nidents; its_tbl_size = roundup2(its_tbl_size, page_size); break; @@ -564,6 +609,11 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) sc->sc_its_ptab[i].ptab_vaddr = table; sc->sc_its_ptab[i].ptab_l1_size = its_tbl_size; sc->sc_its_ptab[i].ptab_l1_nidents = l1_nidents; + sc->sc_its_ptab[i].ptab_l2_size = page_size; + sc->sc_its_ptab[i].ptab_l2_nidents = l2_nidents; + + sc->sc_its_ptab[i].ptab_indirect = indirect; + sc->sc_its_ptab[i].ptab_page_size = page_size; paddr = vtophys(table); @@ -578,6 +628,7 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) GITS_BASER_SIZE_MASK); /* Set the new values */ reg |= GITS_BASER_VALID | + (indirect ? GITS_BASER_INDIRECT : 0) | (cache << GITS_BASER_CACHE_SHIFT) | (type << GITS_BASER_TYPE_SHIFT) | paddr | (share << GITS_BASER_SHARE_SHIFT) | @@ -618,6 +669,7 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) return (ENXIO); } + sc->sc_its_ptab[i].ptab_share = share; /* We should have made all needed changes */ break; } @@ -1218,6 +1270,10 @@ static bool its_device_alloc(struct gicv3_its_softc *sc, int devid) { struct its_ptable *ptable; + vm_offset_t l2_table; + uint64_t *table; + uint32_t index; + bool shareable; /* No device table */ if (sc->sc_dev_table_idx < 0) { @@ -1228,7 +1284,39 @@ its_device_alloc(struct gicv3_its_softc *sc, int devid) ptable = &sc->sc_its_ptab[sc->sc_dev_table_idx]; /* Check the devid is within the table limit */ - return (devid < ptable->ptab_l1_nidents); + if (!ptable->ptab_indirect) { + return (devid < ptable->ptab_l1_nidents); + } + + /* Check the devid is within the allocated range */ + index = devid / ptable->ptab_l2_nidents; + if (index >= ptable->ptab_l1_nidents) + return (false); + + table = (uint64_t *)ptable->ptab_vaddr; + /* We have an second level table */ + if ((table[index] & GITS_BASER_VALID) != 0) + return (true); + + shareable = true; + if ((ptable->ptab_share & GITS_BASER_SHARE_MASK) == GITS_BASER_SHARE_NS) + shareable = false; + + l2_table = (vm_offset_t)contigmalloc_domainset(ptable->ptab_l2_size, + M_GICV3_ITS, sc->sc_ds, M_WAITOK | M_ZERO, 0, (1ul << 48) - 1, + ptable->ptab_page_size, 0); + + if (!shareable) + cpu_dcache_wb_range((vm_offset_t)l2_table, + ptable->ptab_l2_size); + + table[index] = vtophys(l2_table) | GITS_BASER_VALID; + if (!shareable) + cpu_dcache_wb_range((vm_offset_t)&table[index], + sizeof(table[index])); + + dsb(sy); + return (true); } static struct its_dev * From nobody Fri Sep 1 10:07:14 2023 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 4RcYc230BQz4sKPq; Fri, 1 Sep 2023 10:07:14 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcYc226qxz3ZlX; Fri, 1 Sep 2023 10:07:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693562834; 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=hS2kWoOyFIcYhcga1IbfyMMax55TjKex3vjmd7hCopw=; b=YXUa3hMQ4PKNSW049Vj6C02pA8gOqjCYDF6eaBBNOr8XUtBnM9mviWUGWfb0gl6qGnzyDP aGBhnlBVjCVNf8Kzf3z4/NcRqZIQpMEVzNSX1L2REAohBUKrWP+5Avv3qm16RTOMU5bQVH 4ZTfafPWyk06fQysdZANRZDCqAWVXJtkZ5nSt+NTGePU22jUnP8lx1JjrVBUcS5ACk+jyY /N0ZBc9XwR7ADixaLdWloV44xspew1RnADEwNXFbIWSb3NuyBT0hhCaHM+z5m6e5ZAaj2d LA/kQqPvZsP5JM4zqvSHEMvesvrT+ehDeTGyFZh81wtVJhyTSh5SvaM1d5UeCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693562834; a=rsa-sha256; cv=none; b=pxDUHNiet/G+2wUOqeWcbhn/PiD8MVcByBTMR5+P7CWg2J0+mGHWFUr5AxExyFEJ3f7kKh x0t/RNRkztnIQ19z1iRdITNFyiYWGLgOSz16VPtHgXd1v3SwQ9/+7Cl7lKme7xp9zq2he7 Zn2gfeGQCHP1XSaAxJE+tph070p1bepxpMds1cYnq4axA7Kr8LSgQ7DSGc6QZgM5oGDvke lm3r1EAw+9KBj670bYT+7yatHa1/BbiwFG8DMy/O/zMnXTiKjHScijGezHFHV1rsijDlj9 aC4CI5NyXqGvM1VHJnI6MHo4wmgyWIYh8K3EKpoNMWIUfsY1I9SEkyaG820NuA== 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=1693562834; 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=hS2kWoOyFIcYhcga1IbfyMMax55TjKex3vjmd7hCopw=; b=w+8Hg3qIu/KfNWlYS/Ep1cKBCCpWVZCu1TYJaJlNN7JYnF4XIdLSvF+KzBxFg1ZaW7cPlX NbYNbB2+cCrAY+Z4sq4Vt5Meaq//u6dsrfEvgTtjTbIU1Hvc1M4jDORY4iPo3iBrslcGZf WDK5YidsFtTogpC6ckSLx1ZqTS1txGqwpGoR2VXh2dUZGoT3lv2OvnBPSttdAL1yqfUdI+ GljKvEnnv56LnDsn2Lp3hqHRcK9rg7gl/nQuDGD71u6JDYYLPC1/gb4qnl91qeqFyrcC3R vScg7ANRPNDvMump8ky3n6MZFztpWSQku4K6/5GzGoypFktQ1Azj81fUBY4d2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcYc21F30zwxs; Fri, 1 Sep 2023 10:07:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381A7EBX092404; Fri, 1 Sep 2023 10:07:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381A7ELJ092401; Fri, 1 Sep 2023 10:07:14 GMT (envelope-from git) Date: Fri, 1 Sep 2023 10:07:14 GMT Message-Id: <202309011007.381A7ELJ092401@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 5429e194212e - main - gicv3: Add logging for when its_device_alloc fails 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5429e194212e7d2fd7b4771bcf348f0917a0d505 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=5429e194212e7d2fd7b4771bcf348f0917a0d505 commit 5429e194212e7d2fd7b4771bcf348f0917a0d505 Author: Andrew Turner AuthorDate: 2023-08-23 17:44:38 +0000 Commit: Andrew Turner CommitDate: 2023-09-01 09:56:42 +0000 gicv3: Add logging for when its_device_alloc fails Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41566 --- sys/arm64/arm64/gicv3_its.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index a126a166c4c9..777e20649f33 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -1277,21 +1277,44 @@ its_device_alloc(struct gicv3_its_softc *sc, int devid) /* No device table */ if (sc->sc_dev_table_idx < 0) { - if (devid < (1 << sc->sc_devbits)) - return (true); - return (false); + if (devid >= (1 << sc->sc_devbits)) { + if (bootverbose) { + device_printf(sc->dev, + "%s: Device out of range for hardware " + "(%x >= %x)\n", __func__, devid, + 1 << sc->sc_devbits); + } + return (false); + } + return (true); } ptable = &sc->sc_its_ptab[sc->sc_dev_table_idx]; /* Check the devid is within the table limit */ if (!ptable->ptab_indirect) { - return (devid < ptable->ptab_l1_nidents); + if (devid >= ptable->ptab_l1_nidents) { + if (bootverbose) { + device_printf(sc->dev, + "%s: Device out of range for table " + "(%x >= %x)\n", __func__, devid, + ptable->ptab_l1_nidents); + } + return (false); + } + + return (true); } /* Check the devid is within the allocated range */ index = devid / ptable->ptab_l2_nidents; - if (index >= ptable->ptab_l1_nidents) + if (index >= ptable->ptab_l1_nidents) { + if (bootverbose) { + device_printf(sc->dev, + "%s: Index out of range for table (%x >= %x)\n", + __func__, index, ptable->ptab_l1_nidents); + } return (false); + } table = (uint64_t *)ptable->ptab_vaddr; /* We have an second level table */ From nobody Fri Sep 1 10:07:15 2023 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 4RcYc35gnVz4sKPv; Fri, 1 Sep 2023 10:07:15 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcYc33jzBz3Zxc; Fri, 1 Sep 2023 10:07:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693562835; 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=fdgoiNJwN8hy5s1/LN267pCbTsHgrF8v37Vs+Pe3x0s=; b=XgPD8cl2yQtjHkA9w/5GCe/jldsCv1cgFYvJr6wM2DPSkAJqGE8MpHOnI5RU+Ptw2Qfbt2 BZTCR+rHvANjt3yblo4wUB6LK6h6S0gT18FUiCwj7Fe7VbKUxWzsE0hzigxHltRQwaVLCY P6ZoumxlgztxYz/qre/Cl3yx1AoQVzqq1fqZCDrm07WIeCfMVHDTLSfqgr3aj0cOLfHQZ6 Q26d3pVPTNGEjVY3EDYoU+5RuLLJMOs4UZPOrqGQlFujLbjk+QDmdBoop/5h6sEWcFcLnk +jh1Fnh7fdO6aMpTzi/9v/3gelP9tsee3oDd/4XB7f8WucHPdklyaC+FY269qA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693562835; a=rsa-sha256; cv=none; b=OkYtUn7EIhhQKH4vll7zLJZflg1rXM/i2f4EwYFzuiWZrBe6UCmWSVOtSUZB2RYDDl/e3y zWZfO2k3Is64jdcviMFgwAFri6VDcaN1BVQx/T/YiFVY7ThHnRYydOY6G0TJ4f1G1ty2TD XnPH7FeEeJGrDU5GRxWU1j88T448PPaHuE/qzWuYsqjB81JN4ZVRIZUXCodwEPqDPgMVZH 6HfvwDEQvSNA75kyovYu4Obz+Sa0TadkkwNedgTSzVqvJ29iESVlPORGeZ2W9l145aC7m/ B2J+ekivv9YV7fAVOE98ORcpyOUjYPpw1f7pd1Wtb1Hz7dQALpJa2BHGnusImg== 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=1693562835; 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=fdgoiNJwN8hy5s1/LN267pCbTsHgrF8v37Vs+Pe3x0s=; b=AVevFf1607KG0SlYRZgc1Mq/j7oPSRPvhu+BjvVJ3xl/gNrJnUlcYMhFLJLKs7C9Az88QW w8q1hSfOaWL6/9WDVKLOPJLZPAqkXD7zC6ADPr7ttjiJTUXsyB4EPR8mlVwTHvmnj52FwF bZyqXb5m42jO2oUc0KlmTRm9uFTVWPPw/xU1va+LJG8Egm8ycUOcd8S13qPBBag4lfz0af 6GF+riwLW0lrLDgatbqUn89euAPjm5nL7RxlJVO6NPuyPdh1Dsa1OdB1eMPnTdzkRl5gzG XSU46rPNtxPtTh8ym7Sm8ATp4Qp1AvK6mhl/vfWKGQY168P5bMYi2tnp63lBqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcYc32CyBzwt6; Fri, 1 Sep 2023 10:07:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381A7FR1092446; Fri, 1 Sep 2023 10:07:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381A7F6w092443; Fri, 1 Sep 2023 10:07:15 GMT (envelope-from git) Date: Fri, 1 Sep 2023 10:07:15 GMT Message-Id: <202309011007.381A7F6w092443@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 565c887a7752 - main - armv8_crypto: fix recursive fpu_kern_enter call 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 565c887a775284bfb1a15eadee2c3f312d288c01 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=565c887a775284bfb1a15eadee2c3f312d288c01 commit 565c887a775284bfb1a15eadee2c3f312d288c01 Author: Zachary Leaf AuthorDate: 2023-08-31 13:11:53 +0000 Commit: Andrew Turner CommitDate: 2023-09-01 09:56:58 +0000 armv8_crypto: fix recursive fpu_kern_enter call Now armv8_crypto is using FPU_KERN_NOCTX, this results in a kernel panic in armv8_crypto.c:armv8_crypto_cipher_setup: panic: recursive fpu_kern_enter while in PCB_FP_NOSAVE state This is because in armv8_crypto.c:armv8_crypto_cipher_process, directly after calling fpu_kern_enter() a call is made to armv8_crypto_cipher_setup(), resulting in nested calls to fpu_kern_enter() without the required fpu_kern_leave() in between. Move fpu_kern_enter() in armv8_crypto_cipher_process() after the call to armv8_crypto_cipher_setup() to resolve this. Reviewed by: markj, andrew Fixes: 6485286f536f ("armv8_crypto: Switch to using FPU_KERN_NOCTX") Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D41671 --- sys/crypto/armv8/armv8_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/crypto/armv8/armv8_crypto.c b/sys/crypto/armv8/armv8_crypto.c index fd1d845c29b0..fcbc7e77de29 100644 --- a/sys/crypto/armv8/armv8_crypto.c +++ b/sys/crypto/armv8/armv8_crypto.c @@ -336,8 +336,6 @@ armv8_crypto_cipher_process(struct armv8_crypto_session *ses, crypto_cursor_copy(&fromc, &toc); } - fpu_kern_enter(curthread, NULL, FPU_KERN_NORMAL | FPU_KERN_NOCTX); - if (crp->crp_cipher_key != NULL) { armv8_crypto_cipher_setup(ses, csp, crp->crp_cipher_key, csp->csp_cipher_klen); @@ -345,6 +343,8 @@ armv8_crypto_cipher_process(struct armv8_crypto_session *ses, crypto_read_iv(crp, iv); + fpu_kern_enter(curthread, NULL, FPU_KERN_NORMAL | FPU_KERN_NOCTX); + error = 0; switch (csp->csp_cipher_alg) { case CRYPTO_AES_CBC: From nobody Fri Sep 1 13:05:28 2023 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 4RcdZP5cmFz4sTBX; Fri, 1 Sep 2023 13:06:05 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcdZP2wNRz4PYt; Fri, 1 Sep 2023 13:06:05 +0000 (UTC) (envelope-from mavbsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-58dfe2d5b9aso25722257b3.1; Fri, 01 Sep 2023 06:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693573564; x=1694178364; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :from:to:cc:subject:date:message-id:reply-to; bh=OCO1weCbfhqf+u9KyqLeVA0T1sU7cwxAhDE8XxLi/ds=; b=e4aRg83cwfN9LAtHlIB/nPz2usVqOGd3O3u70uAUoAosxPTdp+nAjJvad/Sehe90HV d2+ltSnT3QkXh9z1v56ZR82lvmyH/uHWRIjk+mEVzDsduc0be84EvQ0S/sDqVRePdIJA 1Sgw6pVf0zowquc0tnh4bTvxU9K5O1WuyGf/lgbbBuAGGUbZFdTda9A+6vW5toZ8e+qd q4sEHpmZ0ODc1c2AoAIsD/1XXXksXmgCc2j/pso6i9AglaTHTN+gxsBSFtkKnA8ypul0 6z6Ak+Oxn4ohtQZfhY6UJlQ1CLsqpJEEbqMApQrAmiQAVI8xo2P20ElcRc1RK0cpHMIt YWUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693573564; x=1694178364; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OCO1weCbfhqf+u9KyqLeVA0T1sU7cwxAhDE8XxLi/ds=; b=RP69FlOqjPfW42sTMsewkneLq581HI+dJjkcMZdk1WlGU2SoH+QCPKT0LXaLv4U2t8 p3Pu2HjOiVvH6JIy4v6SIM0Cx9QXkwAb/0XDrUv0+s8Db9vu8H+b6ia+k/PODd+n4vj+ CzJXOKInh9nV30BuNW03uwZgquwW7sg5f8t9JMN1g5XwAMCQPVAwLCLMJRBH0odsdB1o 2q7dqqUyZSEI3X3CN4k/YMLuE3zxdlGERZpZhalLdS7hAPLkhxCeKSG7H5G3uO4piLPS mLPJKjM1afeU0ADqo/cNnGbM8wFMX6BkHZ0gMSzdttHN52Vk6qKmJxe3Z3YNkD94wM9Z 4Gig== X-Gm-Message-State: AOJu0YyOiodCh8QxdNilxaJoNpDAF95p8QkJS+TDjbyFVez24MjVCOST d1l/uhasWxpm9yEr0q5gaqw= X-Google-Smtp-Source: AGHT+IEJ3TIMA85ApzZyUj5Ouj0AxbFDLYzACrN6KgFRpJQwnTDMFB0ikgp5DP7rzXSP/zQeMU7EBg== X-Received: by 2002:a81:a013:0:b0:592:975b:376a with SMTP id x19-20020a81a013000000b00592975b376amr3636637ywg.0.1693573564161; Fri, 01 Sep 2023 06:06:04 -0700 (PDT) Received: from [10.230.45.5] ([38.32.73.2]) by smtp.gmail.com with ESMTPSA id t76-20020a0dea4f000000b005922c29c025sm1031745ywe.108.2023.09.01.06.06.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Sep 2023 06:06:03 -0700 (PDT) Message-ID: <3a6f0cf5-2c1d-74fc-8223-1c106dbde2a2@FreeBSD.org> Date: Fri, 1 Sep 2023 09:05:28 -0400 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US To: Cy Schubert Cc: Warner Losh , Gleb Smirnoff , Drew Gallatin , Martin Matuska , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <20230901001959.E463A1C3@slippy.cwsent.com> From: Alexander Motin Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad In-Reply-To: <20230901001959.E463A1C3@slippy.cwsent.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4RcdZP2wNRz4PYt On 31.08.2023 20:19, Cy Schubert wrote: > Cy Schubert writes: >> In message <20230831234437.0EB38133@slippy.cwsent.com>, Cy Schubert writes: >>> In message <20230831234023.917DFAB@slippy.cwsent.com>, Cy Schubert writes: >>>>>> One of the two machines is hung. >>>>>> >>>>>> cwfw# ping bob >>>>>> PING bob (10.1.1.7): 56 data bytes >>>>>> ^C >>>>>> --- bob ping statistics --- >>>>>> 2 packets transmitted, 0 packets received, 100.0% packet loss >>>>>> cwfw# console bob >>>>>> [Enter `^Ec?' for help] >>>>>> [halt sent] >>>>>> KDB: enter: Break to debugger >>>>>> [ thread pid 31259 tid 100913 ] >>>>>> Stopped at kdb_break+0x48: movq $0,0xa1069d(%rip) >>>>>> db> bt >>>>>> Tracing pid 31259 tid 100913 td 0xfffffe00c4eca000 >>>>>> kdb_break() at kdb_break+0x48/frame 0xfffffe00c53ef2d0 >>>>>> uart_intr() at uart_intr+0xf7/frame 0xfffffe00c53ef310 >>>>>> intr_event_handle() at intr_event_handle+0x12b/frame 0xfffffe00c53ef3 >> 80 >>>>>> intr_execute_handlers() at intr_execute_handlers+0x63/frame >>>>>> 0xfffffe00c53ef3b0 >>>>>> Xapic_isr1() at Xapic_isr1+0xdc/frame 0xfffffe00c53ef3b0 >>>>>> --- interrupt, rip =3D 0xffffffff806d5c70, rsp =3D 0xfffffe00c53ef480 >> , >>> rb >>>> = >>>>> p =3D >>>>>> 0xfffffe00c53ef480 --- >>>>>> getbinuptime() at getbinuptime+0x30/frame 0xfffffe00c53ef480 >>>>>> arc_access() at arc_access+0x250/frame 0xfffffe00c53ef4d0 >>>>>> arc_buf_access() at arc_buf_access+0xd0/frame 0xfffffe00c53ef4f0 >>>>>> dbuf_hold_impl() at dbuf_hold_impl+0xf3/frame 0xfffffe00c53ef580 >>>>>> dbuf_hold() at dbuf_hold+0x25/frame 0xfffffe00c53ef5b0 >>>>>> dnode_hold_impl() at dnode_hold_impl+0x194/frame 0xfffffe00c53ef670 >>>>>> dmu_bonus_hold() at dmu_bonus_hold+0x20/frame 0xfffffe00c53ef6a0 >>>>>> zfs_zget() at zfs_zget+0x20d/frame 0xfffffe00c53ef750 >>>>>> zfs_dirent_lookup() at zfs_dirent_lookup+0x16d/frame 0xfffffe00c53ef7 >> a0 >>>>>> zfs_dirlook() at zfs_dirlook+0x7f/frame 0xfffffe00c53ef7d0 >>>>>> zfs_lookup() at zfs_lookup+0x3c0/frame 0xfffffe00c53ef8a0 >>>>>> zfs_freebsd_cachedlookup() at zfs_freebsd_cachedlookup+0x67/frame >>>>>> 0xfffffe00c53ef9e0 >>>>>> vfs_cache_lookup() at vfs_cache_lookup+0xa6/frame 0xfffffe00c53efa30 >>>>>> vfs_lookup() at vfs_lookup+0x457/frame 0xfffffe00c53efac0 >>>>>> namei() at namei+0x2e1/frame 0xfffffe00c53efb20 >>>>>> vn_open_cred() at vn_open_cred+0x505/frame 0xfffffe00c53efca0 >>>>>> kern_openat() at kern_openat+0x287/frame 0xfffffe00c53efdf0 >>>>>> ia32_syscall() at ia32_syscall+0x156/frame 0xfffffe00c53eff30 >>>>>> int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffff8 >> 9d >>> c >>>>>> db> >>>>>> >>>>>> I'll let it continue. Hopefully the watchdog timer will pop and we ge >> t >>> a >>>>>> dump. >>>>>> >>>>> >>>>> >>>>> Might also be interesting to see if this moves around or is really hung >>>>> getting the time. I suspect it's live lock given this traceback. >>>> >>>> It's moving around. >>>> >>>> >>>> db> c >>>> [halt sent] >>>> KDB: enter: Break to debugger >>>> [ thread pid 31259 tid 100913 ] >>>> Stopped at kdb_break+0x48: movq $0,0xa1069d(%rip) >>>> db> bt >>>> Tracing pid 31259 tid 100913 td 0xfffffe00c4eca000 >>>> kdb_break() at kdb_break+0x48/frame 0xfffffe00c53ef410 >>>> uart_intr() at uart_intr+0xf7/frame 0xfffffe00c53ef450 >>>> intr_event_handle() at intr_event_handle+0x12b/frame 0xfffffe00c53ef4c0 >>>> intr_execute_handlers() at intr_execute_handlers+0x63/frame >>>> 0xfffffe00c53ef4f0 >>>> Xapic_isr1() at Xapic_isr1+0xdc/frame 0xfffffe00c53ef4f0 >>>> --- interrupt, rip = 0xffffffff807117c4, rsp = 0xfffffe00c53ef5c0, rbp = >>>> 0xfffffe00c53ef5c0 --- >>>> lock_delay() at lock_delay+0x14/frame 0xfffffe00c53ef5c0 >>>> _sx_xlock_hard() at _sx_xlock_hard+0x1a9/frame 0xfffffe00c53ef660 >>>> _sx_xlock() at _sx_xlock+0xb0/frame 0xfffffe00c53ef6a0 >>>> zfs_zget() at zfs_zget+0x1fa/frame 0xfffffe00c53ef750 >>>> zfs_dirent_lookup() at zfs_dirent_lookup+0x16d/frame 0xfffffe00c53ef7a0 >>>> zfs_dirlook() at zfs_dirlook+0x7f/frame 0xfffffe00c53ef7d0 >>>> zfs_lookup() at zfs_lookup+0x3c0/frame 0xfffffe00c53ef8a0 >>>> zfs_freebsd_cachedlookup() at zfs_freebsd_cachedlookup+0x67/frame >>>> 0xfffffe00c53ef9e0 >>>> vfs_cache_lookup() at vfs_cache_lookup+0xa6/frame 0xfffffe00c53efa30 >>>> vfs_lookup() at vfs_lookup+0x457/frame 0xfffffe00c53efac0 >>>> namei() at namei+0x2e1/frame 0xfffffe00c53efb20 >>>> vn_open_cred() at vn_open_cred+0x505/frame 0xfffffe00c53efca0 >>>> kern_openat() at kern_openat+0x287/frame 0xfffffe00c53efdf0 >>>> ia32_syscall() at ia32_syscall+0x156/frame 0xfffffe00c53eff30 >>>> int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffff89dc >>>> db> c >>> >>> It seems to have settled there for now. >> >> I manually panicked the machine. It captured a good dump of the above >> backtrace. >> >> This is the amd64 machine that was building i386 packages under poudriere. >> I purposely set -J high to stress it enough to panic the machine. >> >> This ker c¦`bfnel includes amotin's patch from https://github.com/openzfs/zfs/pull >> /15228. This manually triggered panic is different from the one it suffered >> two days ago. >> >> The machine building amd64 packages is still running nicely but it's >> building some large packages. Because of this there's not as much stress on >> zfs. The panicked machine was building a lot of small packages. As such it >> was doing a lot of zfs clones, destroys, and rollbacks. > > An initial look at the dump: > > (kgdb) bt > #0 __curthread () at /opt/src/git-src/sys/amd64/include/pcpu_aux.h:57 > #1 doadump (textdump=textdump@entry=1) > at /opt/src/git-src/sys/kern/kern_shutdown.c:405 > #2 0xffffffff806c1b30 in kern_reboot (howto=260) > at /opt/src/git-src/sys/kern/kern_shutdown.c:526 > #3 0xffffffff806c202f in vpanic (fmt=0xffffffff80b8653c "from debugger", > ap=ap@entry=0xfffffe00c53eef30) > at /opt/src/git-src/sys/kern/kern_shutdown.c:970 > #4 0xffffffff806c1dd3 in panic (fmt=) > at /opt/src/git-src/sys/kern/kern_shutdown.c:894 > #5 0xffffffff80413937 in db_panic (addr=, > have_addr=, count=, modif=) > at /opt/src/git-src/sys/ddb/db_command.c:531 > #6 0xffffffff80412ddd in db_command (last_cmdp=, > cmd_table=, dopager=true) > at /opt/src/git-src/sys/ddb/db_command.c:504 > #7 0xffffffff80412a9d in db_command_loop () > at /opt/src/git-src/sys/ddb/db_command.c:551 > #8 0xffffffff80416176 in db_trap (type=, code= out>) > at /opt/src/git-src/sys/ddb/db_main.c:268 > #9 0xffffffff80710993 in kdb_trap (type=type@entry=3, code=code@entry=0, > tf=tf@entry=0xfffffe00c53ef340) at /opt/src/git-src/sys/kern/subr_kdb.c: > 790 > #10 0xffffffff80a72cb9 in trap (frame=0xfffffe00c53ef340) > at /opt/src/git-src/sys/amd64/amd64/trap.c:608 > #11 > #12 kdb_enter (why=, msg=) > at /opt/src/git-src/sys/kern/subr_kdb.c:556 > #13 kdb_break () at /opt/src/git-src/sys/kern/subr_kdb.c:346 > #14 0xffffffff804dc7f7 in uart_intr_break (arg=0xfffff80006b84400) > at /opt/src/git-src/sys/dev/uart/uart_core.c:298 > #15 uart_intr (arg=0xfffff80006b84400) > at /opt/src/git-src/sys/dev/uart/uart_core.c:439 > #16 0xffffffff8067ae8b in intr_event_handle (ie=ie@entry=0xfffff80005814c00, > > frame=frame@entry=0xfffffe00c53ef500) > at /opt/src/git-src/sys/kern/kern_intr.c:1410 > #17 0xffffffff80a37653 in intr_execute_handlers (isrc=0xfffff8000580c9c8, > --Type for more, q to quit, c to continue without paging--c > frame=0xfffffe00c53ef500) > at /opt/src/git-src/sys/x86/x86/intr_machdep.c:354 > #18 > #19 lock_delay (la=la@entry=0xfffffe00c53ef600) > at /opt/src/git-src/sys/kern/subr_lock.c:124 > #20 0xffffffff806ccfb9 in _sx_xlock_hard (sx=sx@entry=0xfffff80123712340, > x=, opts=opts@entry=0, > file=file@entry=0xffffffff81910597 "/opt/src/git-src/sys/contrib/openzfs > /module/os/freebsd/zfs/zfs_znode.c", line=line@entry=949) > at /opt/src/git-src/sys/kern/kern_sx.c:693 > #21 0xffffffff806ccdb0 in _sx_xlock (sx=sx@entry=0xfffff80123712340, > opts=opts@entry=0, > file=0xffffffff81910597 "/opt/src/git-src/sys/contrib/openzfs/module/os/ > freebsd/zfs/zfs_znode.c", line=line@entry=949) > at /opt/src/git-src/sys/kern/kern_sx.c:330 > #22 0xffffffff816b4ffa in zfs_zget (zfsvfs=zfsvfs@entry=0xfffff80123712000, > obj_num=80130, zpp=zpp@entry=0xfffffe00c53ef760) > at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode. > c:949 > #23 0xffffffff816a018d in zfs_dirent_lookup (dzp=dzp@entry=0xfffff80131e6dae > 0, > name=0xfffffe00c53ef8c0 "xlocale", zpp=zpp@entry=0xfffffe00c53ef7b0, > flag=flag@entry=2) > at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_dir.c: > 190 > #24 0xffffffff816a028f in zfs_dirlook (dzp=dzp@entry=0xfffff80131e6dae0, > name=0xfffffe00c4bbdc80 "", name@entry=0xfffffe00c53ef8c0 "xlocale", > zpp=zpp@entry=0xfffffe00c53ef860) > at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_dir.c: > 246 > #25 0xffffffff816b0d20 in zfs_lookup (dvp=0xfffff800c2da9380, > nm=nm@entry=0xfffffe00c53ef8c0 "xlocale", vpp=0xfffffe00c53efd10, > cnp=cnp@entry=0xfffffe00c53efd38, nameiop=0, cr=, > flags=0, > cached=1) > at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_ > os.c:923 > #26 0xffffffff816ab907 in zfs_freebsd_lookup (ap=0xfffffe00c53ef9f0, > cached=1) > at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_ > os.c:4558 > #27 zfs_freebsd_cachedlookup (ap=0xfffffe00c53ef9f0) > at /opt/src/git-src/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_ > os.c:4566 > #28 0xffffffff80797d86 in VOP_CACHEDLOOKUP (dvp=0xfffff800c2da9380, > vpp=0xfffffe00c53efd10, cnp=0xfffffe00c53efd38) at ./vnode_if.h:101 > #29 vfs_cache_lookup (ap=) > at /opt/src/git-src/sys/kern/vfs_cache.c:3068 > #30 0xffffffff807a9487 in VOP_LOOKUP (dvp=0xfffff800c2da9380, > vpp=0xfffffe00c53efd10, cnp=0xfffffe00c53efd38) at ./vnode_if.h:67 > #31 vfs_lookup (ndp=ndp@entry=0xfffffe00c53efcb8) > at /opt/src/git-src/sys/kern/vfs_lookup.c:1252 > #32 0xffffffff807a8531 in namei (ndp=ndp@entry=0xfffffe00c53efcb8) > at /opt/src/git-src/sys/kern/vfs_lookup.c:684 > #33 0xffffffff807d0095 in vn_open_cred (ndp=ndp@entry=0xfffffe00c53efcb8, > flagp=flagp@entry=0xfffffe00c53efdc4, cmode=cmode@entry=0, > vn_open_flags=vn_open_flags@entry=16, cred=0xfffff801ea492800, > fp=0xfffff801b9a54690) at /opt/src/git-src/sys/kern/vfs_vnops.c:331 > #34 0xffffffff807c61f7 in kern_openat (td=0xfffffe00c4eca000, fd=-100, > path=0xffff8a24 , > pathseg=UIO_USERSPACE, flags=1048577, mode=) > at /opt/src/git-src/sys/kern/vfs_syscalls.c:1165 > #35 0xffffffff80a993a6 in syscallenter (td=0xfffffe00c4eca000) > at /opt/src/git-src/sys/amd64/ia32/../../kern/subr_syscall.c:187 > #36 ia32_syscall (frame=0xfffffe00c53eff40) > at /opt/src/git-src/sys/amd64/ia32/ia32_syscall.c:222 > #37 0xffffffff80a47f8f in int0x80_syscall_common () > at /opt/src/git-src/sys/amd64/ia32/ia32_exception.S:75 > #38 0x0000000026a12000 in ?? () > #39 0x0000000000000000 in ?? () > (kgdb) Cy, considering the machine didn't crash or deadlock immediately, and that the only trace you've got from it shows only a lock waiting in VFS layer, it can be anything, including something in vnode life cycle. If you have more than one CPU, then trace from the one arbitrary CPU where serial interrupt is routed may show only some consequences, not the source of problem. To diagnose some deadlocks we would need something like `procstat -akk`. I've asked you in private email yesterday to try experiment with setting sync=disabled on your pools/datasets to bypass ZIL code and see whether the errors persist. It means you may loose few seconds of updates in case of crash, so I do not propose to do it normally, but if you see the problems even after that, it may mean there is more than one problem and they should be handled separately. -- Alexander Motin From nobody Fri Sep 1 13:41:44 2023 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 4RcfNG044kz4rHF0; Fri, 1 Sep 2023 13:42:22 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcfNF3r3Vz4SQs; Fri, 1 Sep 2023 13:42:21 +0000 (UTC) (envelope-from mavbsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-58fc4d319d2so21881137b3.1; Fri, 01 Sep 2023 06:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693575740; x=1694180540; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :from:to:cc:subject:date:message-id:reply-to; bh=fD5r31OK7q9F7ZHMAhtyc8UotIcJYQhBV14b0WZQp1Y=; b=R43uLdRFQ2Mz+cKYvehBP5bY//httes7Wl2Gm/4wjE9IX7MQ7qyrumGzv3zgrfyRJ5 TPcTZmdtuXrRKozJgrn2LkACQWEg6FIpl3NYs6loYUaJghutJFPwxiJaBEUN8qORE4wQ u4ZpIKU11lsUL7orLDqHHBnfr5ZA+lFpnRKw9w8L7MeEA41Rkfxv5Yi2FpbYvzmZbyWx wk+JF2rrPGVAT2undMwxBVVlFvZOAw8AX7IpwVVF+iCS4rRiE1nsLquNLOthct5MHXLY 1MkOGSTyTXlKWTRsNeQeR2E+n47an06jpeHfcLGA12nr8k9uQB+kTzP3wkxmG32cevCX 2PFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693575740; x=1694180540; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fD5r31OK7q9F7ZHMAhtyc8UotIcJYQhBV14b0WZQp1Y=; b=DjWyp5S9pwItRIjFjSTWJtp+IoLylu1k7RxZ2tPrlkTL4IPa+enn/jHHEOMYfkRUEy vBMwqhLN15y1i/goesjOakWousvT5RAD1nANjCZxiOlKbar9/o51lCyWSaKaHeI30dxW 6GNpwk9sZSUD5g3QzaaHCgUm23haf9+y7xDv5KHkd7qqUS6aEsF3GNwC3YjV9RikixVw NWJM+kgIWMk/bHZFzH7KNmE5Du0r/v96Sqmog3PIKj+F0zipIib6Q/o3RP1AQlJqVBDE pGj3XrME37c1hlOJdXR6iYceYyusOhaRD+k9Q+Q4uTOQ/oml4ZkFwuaHkYKJbgVjCTuJ /dkA== X-Gm-Message-State: AOJu0YyRU1vuOcscinzGRf8yFJKNos1GpeiiFwIfJcG5gIKZBhk4A9GW 9eFgQnUkOuAAJ+FhQo1/QJzMryGqFdHS9Q== X-Google-Smtp-Source: AGHT+IF63VCIHchL5wZd1oC6k28Mrcma+6QL9xzF27EH3/pSUN/3RqFBNizArNOab6ihP4QPtA6Uvg== X-Received: by 2002:a0d:e205:0:b0:58c:57c1:138a with SMTP id l5-20020a0de205000000b0058c57c1138amr2520679ywe.19.1693575740128; Fri, 01 Sep 2023 06:42:20 -0700 (PDT) Received: from [10.230.45.5] ([38.32.73.2]) by smtp.gmail.com with ESMTPSA id r62-20020a0de841000000b005865494000dsm1071570ywe.115.2023.09.01.06.42.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Sep 2023 06:42:19 -0700 (PDT) Message-ID: <65269e7a-4c3f-95ff-3e81-91b76e023fbd@FreeBSD.org> Date: Fri, 1 Sep 2023 09:41:44 -0400 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US To: Kyle Evans , Gleb Smirnoff , Martin Matuska Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Cy Schubert References: <202308270509.37R596B5048298@gitrepo.freebsd.org> From: Alexander Motin Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4RcfNF3r3Vz4SQs On 31.08.2023 22:18, Kyle Evans wrote: > It seems to have clearly been stomped on by uma trashing. Encountered > while running a pkgbase build, I think while it was in the packaging > phase. I note in particular in that frame: > > (kgdb) p/x lwb->lwb_issued_timestamp > $4 = 0xdeadc0dedeadc0de > > So I guess it was freed sometime during one of the previous two > zio_nowait() calls. Thank you, Kyle. If the source lines are resolved correctly and it really crashes on lwb_child_zio access, then I do see there a possible race condition, even though I think it would involve at least 2 or may be even 3 different threads. I've just created this new PR to address it: https://github.com/openzfs/zfs/pull/15233 If you'll be able to test it, include also the two previous: https://github.com/openzfs/zfs/pull/15227 https://github.com/openzfs/zfs/pull/15228 Thank you for something actionable, it really feels much better! :) -- Alexander Motin From nobody Fri Sep 1 15:46:00 2023 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 4Rcj701Y8cz4rYgM; Fri, 1 Sep 2023 15:46:04 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rcj700xbmz3HBL; Fri, 1 Sep 2023 15:46:04 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693583164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2bJx0Xg6Juv2q4XkURGZaROnUNOOudfZ7B9flSGgekU=; b=L8OKzx/cfR9yf87ZbHWlH2guFpGpQkMADIg+NiYVNJqstRg4fpjURVXBqaFwF9e8PPAyiL QNk1Dt1SktdzudnCoyZR+KyUGIlSpq0JxR15YKXRsl81W56Tts10EB4Gx0qd1vQqfvQz54 PJmQPrXrFrKoNRMckSEdf1m7DbJE3o55ss2wKXpCUwt1StV7N31qlib5+CPADZhXUhpWBG e4BNM7qq1nE14YSDEGtnOROj4cG6qUmBg6WfWngcdojtJGOsZjgH7QN8raP9smvUIPL52q 8Zu6ReJFxKBIk0DyVC5ZuXt87HvFIcdhKvSnb5Gz2RooJTxr0zDUlrIeQWusgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693583164; a=rsa-sha256; cv=none; b=KTGej8yVCXpKCZTg0vVhxExdNmE8eXWkH4Smg6pttbwWTHikJtan1MHNhq2cfjhEqp3KVi VMOLjm6UohSLpZcDNTkYccZ7K4o+Oec47ljB/XYiK5V72VVbO/Gdn9PD0TMSShnAeJjFzV Si9V0o1D1Hsn3o+dqxMDrZUSgrs70FvaYcH6N+lBP6wgXVFFtlXsINIsyhqG+KwIghC1C3 lvixYhtKGZS51aVoDV/yYXgfLdbOaP6u0h9ook/nEYc5hiqjpHCsMyPjRDR+Z6YjAMRUMJ 3Ej2hbzYmSSqFpDv16m3GqDwFrpl1600Dc4lAUyi5rvjhdg+13xDH4ENmwVH5g== 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=1693583164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2bJx0Xg6Juv2q4XkURGZaROnUNOOudfZ7B9flSGgekU=; b=ECVLUTCLlezVIOHzlIoApf9dNOEAPncdVuP3a1G1qUJkWQ89sJbF5JN6B0bJ7/3WOcK/6y z/fwolSe0z3TEldTQRKKNJ7BgwB+M2xXyaQQGuJpQF9PErjuCRQkFzVJjeGjgIzGM7z/CR ZKWVsetbO7IubOkn2ZyQ+l9tVzoTCLkn9TAshm3smYZxahZoD9HmLUc6lXdkjeknX2h/oI d5LouTki4iZDVtFRLAKPz3WTLSOAKWltALPhnPgDBkkG2Rm5ttbOWJ6Uo2UUegCp7BbSWY jEJoOn5wdDceVRMXjdAiA6Kz6HVlL7yn0JE0clrtCha24JAqILWcw6ST4MLo1Q== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Rcj6z3H9Fz3C; Fri, 1 Sep 2023 15:46:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <7b12cc47-0e41-ee8c-2165-9e81874c3490@FreeBSD.org> Date: Fri, 1 Sep 2023 10:46:00 -0500 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad To: Alexander Motin , Martin Matuska Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Cy Schubert References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <65269e7a-4c3f-95ff-3e81-91b76e023fbd@FreeBSD.org> Content-Language: en-US From: Kyle Evans In-Reply-To: <65269e7a-4c3f-95ff-3e81-91b76e023fbd@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/1/23 08:41, Alexander Motin wrote: > On 31.08.2023 22:18, Kyle Evans wrote: >> It seems to have clearly been stomped on by uma trashing. Encountered >> while running a pkgbase build, I think while it was in the packaging >> phase. I note in particular in that frame: >> >> (kgdb) p/x lwb->lwb_issued_timestamp >> $4 = 0xdeadc0dedeadc0de >> >> So I guess it was freed sometime during one of the previous two >> zio_nowait() calls. > > Thank you, Kyle.  If the source lines are resolved correctly and it > really crashes on lwb_child_zio access, then I do see there a possible > race condition, even though I think it would involve at least 2 or may > be even 3 different threads. > Oh, sorry- yes, it was the access to lwb_child_zio there. > I've just created this new PR to address it: > https://github.com/openzfs/zfs/pull/15233 > > If you'll be able to test it, include also the two previous: > https://github.com/openzfs/zfs/pull/15227 > https://github.com/openzfs/zfs/pull/15228 > > Thank you for something actionable, it really feels much better! :) > Perfect, thanks! I haven't been able to reproduce it since the first time, but your explanation sounds plausible to me. I'm not a ZFS developer, but it's not clear to me how I didn't end up tripping over other assertions, though; e.g., in zil_lwb_flush_vdevs_done: 1442 ASSERT3S(lwb->lwb_state, ==, LWB_STATE_WRITE_DONE); 1443 lwb->lwb_state = LWB_STATE_FLUSH_DONE; lwb_state seems to only be set to LWB_STATE_WRITE_DONE in zil_lwb_write_done (lwb_write_zio's completion routine). I would've thought all three of these were executed synchronously in __zio_execute(), which would presumably put us in LWB_STATE_ISSUED at the time of completing the lwb_root_zio? Thanks, Kyle Evans From nobody Fri Sep 1 16:04:22 2023 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 4RcjXr15NTz4rddr; Fri, 1 Sep 2023 16:05:00 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcjXq3Pmlz3Ldj; Fri, 1 Sep 2023 16:04:59 +0000 (UTC) (envelope-from mavbsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-59288c68eb8so23316407b3.0; Fri, 01 Sep 2023 09:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693584298; x=1694189098; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :from:to:cc:subject:date:message-id:reply-to; bh=nFZK5MS1H9OusUArnHQ8sF6Ph3vCH8rDrTI6UZmR+ac=; b=mzYwKi8SmUZuaylRAR+3uWFWD8XdxlJouw75lYLwUiLHcP4/ACA2Rbu/GM4uW29/y7 Mzbyt4z1uHjH6FkYP9+XMsIhSIa5P3LKtxxXwztuMAfGVYZn9blXKAo4zictna6Ndg/8 VBcfV5aZbYA+fx/KWW9wdlVR6UkJwc8xxl/D0HkdKNIJjeRKAI7IwoGXXJ2/viEMDx2f VZ1o5LzVXa8cc+HXJgJuSHyE2FhOnYSueAuwyd/Jgj5FXGhMED1nUPI500owDPsZcW50 tXDJ7ttbkad5+cbTJ4tT/K+wXfuCakim/6AZQANYGtGnR3nlXLft2JF4zxeCwB612AyN Feiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693584298; x=1694189098; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nFZK5MS1H9OusUArnHQ8sF6Ph3vCH8rDrTI6UZmR+ac=; b=Y+Rtk9bjF8fPB0VmKM0bfouvUMoRX9ScgBdUkPkQYcO64J2XUfP12cENv2L33s1JDs g5nju41336MkHhE1RJWWS6jGgl7R5EWHKM4IgfxxyS3SzLh9cKLHiuv3byU8olQXj12v ZLTeFKAhJxf7laLIkdxwoVOrG+SZ4A+QZIWXGbBY5U9gJ9Adg3i436ZH4DEMhvw/06g7 RINZ6dxVwWAxdH8rPRk2LdfkARY0Lcpg9FUs+7VZAhlA/Hpk8/xTaY5yi4JNZpVMLsmQ z3JiPCFjOGkP21Uepym10KM3pYmkByHVGZw3Y7Owwo0wiZBTzxNp8VDW7vbUKibn7OQd nMhA== X-Gm-Message-State: AOJu0YyApDVSKRyDoYjPXsCRdGsMUDvpjamN0wWjmWGI02SHHgazqR0z zUvDCVHfM8BYDFuuGjbghvSaiPYjjmU24g== X-Google-Smtp-Source: AGHT+IHz0ByN3sT+HCDTrDJ5TLO3+hqeTLYQ2hnQh0BMvIOzqBqNYLDhyon6Iwd/I+TtR+BO0AoO8Q== X-Received: by 2002:a0d:c945:0:b0:589:8b55:fe09 with SMTP id l66-20020a0dc945000000b005898b55fe09mr2855844ywd.50.1693584298240; Fri, 01 Sep 2023 09:04:58 -0700 (PDT) Received: from [10.230.45.5] ([38.32.73.2]) by smtp.gmail.com with ESMTPSA id s6-20020a0dd006000000b005924fb1be44sm1132860ywd.139.2023.09.01.09.04.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Sep 2023 09:04:57 -0700 (PDT) Message-ID: <80777717-1d67-104a-94f6-2ac8112e41b8@FreeBSD.org> Date: Fri, 1 Sep 2023 12:04:22 -0400 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US To: Kyle Evans , Martin Matuska Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Cy Schubert References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <65269e7a-4c3f-95ff-3e81-91b76e023fbd@FreeBSD.org> <7b12cc47-0e41-ee8c-2165-9e81874c3490@FreeBSD.org> From: Alexander Motin Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad In-Reply-To: <7b12cc47-0e41-ee8c-2165-9e81874c3490@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4RcjXq3Pmlz3Ldj On 01.09.2023 11:46, Kyle Evans wrote: > On 9/1/23 08:41, Alexander Motin wrote: >> On 31.08.2023 22:18, Kyle Evans wrote: >>> It seems to have clearly been stomped on by uma trashing. Encountered >>> while running a pkgbase build, I think while it was in the packaging >>> phase. I note in particular in that frame: >>> >>> (kgdb) p/x lwb->lwb_issued_timestamp >>> $4 = 0xdeadc0dedeadc0de >>> >>> So I guess it was freed sometime during one of the previous two >>> zio_nowait() calls. >> >> Thank you, Kyle.  If the source lines are resolved correctly and it >> really crashes on lwb_child_zio access, then I do see there a possible >> race condition, even though I think it would involve at least 2 or may >> be even 3 different threads. >> > > Oh, sorry- yes, it was the access to lwb_child_zio there. > > >> I've just created this new PR to address it: >> https://github.com/openzfs/zfs/pull/15233 >> >> If you'll be able to test it, include also the two previous: >> https://github.com/openzfs/zfs/pull/15227 >> https://github.com/openzfs/zfs/pull/15228 >> >> Thank you for something actionable, it really feels much better! :) >> > > Perfect, thanks! I haven't been able to reproduce it since the first > time, but your explanation sounds plausible to me. > > I'm not a ZFS developer, but it's not clear to me how I didn't end up > tripping over other assertions, though; e.g., in zil_lwb_flush_vdevs_done: > > 1442         ASSERT3S(lwb->lwb_state, ==, LWB_STATE_WRITE_DONE); > 1443         lwb->lwb_state = LWB_STATE_FLUSH_DONE; > > lwb_state seems to only be set to LWB_STATE_WRITE_DONE in > zil_lwb_write_done (lwb_write_zio's completion routine). I would've > thought all three of these were executed synchronously in > __zio_execute(), which would presumably put us in LWB_STATE_ISSUED at > the time of completing the lwb_root_zio? That is where ZIO dependencies work. lwb_root_zio can never complete before lwb_write_zio completion. So first zil_lwb_write_done() on lwb_write_zio completion should move the lwb to LWB_STATE_WRITE_DONE, then zil_lwb_flush_vdevs_done() on lwb_root_zio completion should move it to LWB_STATE_FLUSH_DONE, at which state zil_sync() can free it. If only at that point we try to check lwb->lwb_child_zio, we see the 0xdeadc0dedeadc0de and try call zio_nowait() on it with the result you saw. Would lwb_child_zio actually be used by the specific lwb, lwb_write_zio could not proceed before its completion first and so late zio_nowait() call for it would be legal, but not otherwise. -- Alexander Motin From nobody Fri Sep 1 16:22:40 2023 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 4RcjxG1TLbz4rhBQ; Fri, 1 Sep 2023 16:22:42 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcjxG0tvrz3QSN; Fri, 1 Sep 2023 16:22:42 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693585362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1hMQi5qAQo4xqlkhNL/eioF+ue4d23L54ph6Qj3F5P4=; b=EUYPobzfQwHiiHkBEM5jlZXsGVC1SvcsK34dCKrQbSMgXDvCQrDwN1XArXcQubjbyKOcoB QI+QRd2wWqrroTQwkYN19ODQWOQwNste7uqMncO7KJgVmuuz0syY7ENBerI+fmKTNCFXiS QwDSvgxGWyuRnwwzVdWL1hkqvmc3VOnIxFoVvnRQo9QqSROSPIq7l3zRpMAm9wTJgMBcQ4 kr1U2w7INEFkcSIA0FcXmUdO+5DNdl4c1l/6cDjm+qiAtyOTWuYATDrNlA+BvqBDossRdd vrU/ctANKo1xeZ3GVBgS7YQV1yaYyPfOMvm6tjOS3baLcYj/q8bJUophxWRsVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693585362; a=rsa-sha256; cv=none; b=NW+OJeAOEsThKWhCO+Pl+VqByM2VJTtpT7kFgsOMNMz3uOwCAW514Wj0tUKZCZYI4rwUTN yV7HcwuLsVNfHB1UWAjtVrK7wsAQTbs8d23q2P6Nax3sMFM3OHf0QB+a0bT18GdL0e9jVv EMsw4Ty2SXl7ViDdqlarJ+/yDy2u4MaxAAmev3X3mjDetC/4hDtoZrKFdwxHNywmwkfjCO ZdUX5IGULfB7F/1XxTzi/yqODLwQg49V8mjPjDVpCpTqVEfncfuaGRJoRnZe8hlGVKPpL4 sdmDhyj/ncdzjm6LL7NtUTAX+rd3La1q+JjKqkWWO3d2XPBD0/GompQS2CVRow== 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=1693585362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1hMQi5qAQo4xqlkhNL/eioF+ue4d23L54ph6Qj3F5P4=; b=gFzVS2wCEi1Y4tR0Rf6eIpp2BWcrWv6PwG2u+ia3dWyCOxtrU3eCl0urtUi3rq+OlNTwc6 BUJR81y9K0Z8XaTugXuOpH0JhWUHGMKaC+MaY1yhpJSoTdhUWJiGyIlAQzEPGoflPP/Pml lEiGQN758K8cjM7d0g7VKlEchv97TAGGBIUJYhEJR+4bYzyL3rE+M7Bp00iInW9E2vNEqy pjKz5H2sgqy/LvaQERfjzQQL5QDamVJZGF/L0TfehEkaIsh7lJbv3gQs8YAs7aSaGSb4yQ 9XAPYxHyMAgllvxL2PITGzDPIhJ0tdjQ2eDYjoUvDF6JsRvoENQ6WQoZxfuorA== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RcjxF3LkFz1RBW; Fri, 1 Sep 2023 16:22:41 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <5e08b56e-ca81-75a8-dcdc-c9a7dcb3bcad@FreeBSD.org> Date: Fri, 1 Sep 2023 11:22:40 -0500 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad Content-Language: en-US To: Alexander Motin , Martin Matuska Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Cy Schubert References: <202308270509.37R596B5048298@gitrepo.freebsd.org> <65269e7a-4c3f-95ff-3e81-91b76e023fbd@FreeBSD.org> <7b12cc47-0e41-ee8c-2165-9e81874c3490@FreeBSD.org> <80777717-1d67-104a-94f6-2ac8112e41b8@FreeBSD.org> From: Kyle Evans In-Reply-To: <80777717-1d67-104a-94f6-2ac8112e41b8@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/1/23 11:04, Alexander Motin wrote: > On 01.09.2023 11:46, Kyle Evans wrote: >> On 9/1/23 08:41, Alexander Motin wrote: >>> On 31.08.2023 22:18, Kyle Evans wrote: >>>> It seems to have clearly been stomped on by uma trashing. >>>> Encountered while running a pkgbase build, I think while it was in >>>> the packaging phase. I note in particular in that frame: >>>> >>>> (kgdb) p/x lwb->lwb_issued_timestamp >>>> $4 = 0xdeadc0dedeadc0de >>>> >>>> So I guess it was freed sometime during one of the previous two >>>> zio_nowait() calls. >>> >>> Thank you, Kyle.  If the source lines are resolved correctly and it >>> really crashes on lwb_child_zio access, then I do see there a >>> possible race condition, even though I think it would involve at >>> least 2 or may be even 3 different threads. >>> >> >> Oh, sorry- yes, it was the access to lwb_child_zio there. >> >> >>> I've just created this new PR to address it: >>> https://github.com/openzfs/zfs/pull/15233 >>> >>> If you'll be able to test it, include also the two previous: >>> https://github.com/openzfs/zfs/pull/15227 >>> https://github.com/openzfs/zfs/pull/15228 >>> >>> Thank you for something actionable, it really feels much better! :) >>> >> >> Perfect, thanks! I haven't been able to reproduce it since the first >> time, but your explanation sounds plausible to me. >> >> I'm not a ZFS developer, but it's not clear to me how I didn't end up >> tripping over other assertions, though; e.g., in >> zil_lwb_flush_vdevs_done: >> >> 1442         ASSERT3S(lwb->lwb_state, ==, LWB_STATE_WRITE_DONE); >> 1443         lwb->lwb_state = LWB_STATE_FLUSH_DONE; >> >> lwb_state seems to only be set to LWB_STATE_WRITE_DONE in >> zil_lwb_write_done (lwb_write_zio's completion routine). I would've >> thought all three of these were executed synchronously in >> __zio_execute(), which would presumably put us in LWB_STATE_ISSUED at >> the time of completing the lwb_root_zio? > > That is where ZIO dependencies work.  lwb_root_zio can never complete > before lwb_write_zio completion.   So first zil_lwb_write_done() on > lwb_write_zio completion should move the lwb to LWB_STATE_WRITE_DONE, > then zil_lwb_flush_vdevs_done() on lwb_root_zio completion should move > it to LWB_STATE_FLUSH_DONE, at which state zil_sync() can free it.  If > only at that point we try to check lwb->lwb_child_zio, we see the > 0xdeadc0dedeadc0de and try call zio_nowait() on it with the result you > saw.  Would lwb_child_zio actually be used by the specific lwb, > lwb_write_zio could not proceed before its completion first and so late > zio_nowait() call for it would be legal, but not otherwise. > A-ha, ok, that makes sense- thanks for taking the time to explain that! Thanks, Kyle Evans From nobody Fri Sep 1 16:54:53 2023 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 4RckfP4VXpz4rlqZ; Fri, 1 Sep 2023 16:54:53 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RckfP3mycz3VGC; Fri, 1 Sep 2023 16:54:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693587293; 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=Dg+y7GMNnb5JswPsdDOo0qDiqdzWWxe7wdrK9Yczvi0=; b=yKKUwsmseb/MzlgvN/f3snpCtmY9yf9tUcS+H5s7cO2Y66LoNzELWgEdTA4gZTN5ss9/sQ 4CAmCyGNRHKxxJZ66C4tnBSp91Rw7N4IibxCoAwGffnpNU2Rmrh/9QASr2ZwNxAYeykmap j1WMEYkJwLhz7v5dCx3bQWiIObbm+TYL98pqse5gaMrBqdec1SfVZCTk8BGS6LlzVp6BWM +SYIKOtJQ14wFNR7lZChpai7DlEODNvRWKYDvR5iZIMdwWFbAR21oW4OvlXRffNF8Ypqw6 E0pV2ruaQeKnJtpzsuQW3lm9BjQfb8BBuW5/ceOemS8SQsrmrKxBCgUsQqXqZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693587293; a=rsa-sha256; cv=none; b=GsleNXs9U2oNf7bZVhbNimuDeZDjztZ8sn6MC7cUEfVrX/PkTjOjY18Og/pXbRL7d+6BSB xoyeg6twIPeNLKFaqW1CLrxSpYoTNoZE2wPeAPwDOK4qhsNiC8aNtatohP2Sk5K4ygPiQQ JPoo6KMDwJPrFuvKYQ3FYpgok4gMw892XMhOg5mCHMhu4XhtNyBCFg04oWJobpP6ir/Hro l/C7cwvc6/mokSIcD/Dsh2havzFP5NojqbxiYqwt0WEttAEfgV6vFJyk65OZJgRBYnTkO6 MROM9Ar9J3KDZwIk5O8nk3SD1m74s4v3A1VEEMISzZLPfR66qvK19PhagiouRQ== 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=1693587293; 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=Dg+y7GMNnb5JswPsdDOo0qDiqdzWWxe7wdrK9Yczvi0=; b=vpkujUc3SA1aaY44r8uvXf8BQXau+3it+yB0/+MLxsFSgls6eqnaj/fatxPpG9yOtXSq+D yfC/iT7tnb9Zf0e9xix7wTKoMMEVLXCyCmVaZO4mRP7/JqY36Wul51sPUHTicZ2JlWJbIS FIXwXaMkLK3yX3dpLX1FkzCTVWboWlvTxtA5DCdVmlWYvWRK14t30erxhAgBF93c6kqqli znydY8TkXREa9wt0mzkHP8bWJpgU11/U93Zcb0jOLvu5VF3gM4Fie8Ty6+srvp4CWJZMRc ODdl8pFzGoZDgDciLQmgc6IKbnxmCDODx2pPJq9oEoSqAP+Bi5rcpTSsGUy6Ng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RckfP2qvfz17ck; Fri, 1 Sep 2023 16:54:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381GsrPo070590; Fri, 1 Sep 2023 16:54:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381GsraB070587; Fri, 1 Sep 2023 16:54:53 GMT (envelope-from git) Date: Fri, 1 Sep 2023 16:54:53 GMT Message-Id: <202309011654.381GsraB070587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: ce5fa47cf02a - main - share/mk: support for "single" group options 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce5fa47cf02ae97844a826d967d122cc8171dd58 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=ce5fa47cf02ae97844a826d967d122cc8171dd58 commit ce5fa47cf02ae97844a826d967d122cc8171dd58 Author: Brooks Davis AuthorDate: 2023-09-01 16:41:07 +0000 Commit: Brooks Davis CommitDate: 2023-09-01 16:52:28 +0000 share/mk: support for "single" group options Support group options where 1 of n values will be selected (or a default value will be used). After processing, an OPT_FOO will be set to one value from __FOO_OPTIONS for each FOO in __SINGLE_OPTIONS. If the user sets FOO that value will be used, otherwise __FOO_DEFAULT will be used. Options that don't work an a particular system can be remapped to an alternative using BROKEN_SINGLE_OPTIONS which can be set to a list of 3-tuples of the form: OPTION broken_value replacement_value This is somewhat inspired by OPTIONS_SINGLE from ports, but the structure is quite different with a per-option variable in the style of MK_FOO={yes,no}. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41659 --- share/mk/bsd.mkopt.mk | 38 +++++++++++++++++++++++++++++++++++++- sys/conf/kern.opts.mk | 27 +++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.mkopt.mk b/share/mk/bsd.mkopt.mk index 7d43e91b042d..043a41212064 100644 --- a/share/mk/bsd.mkopt.mk +++ b/share/mk/bsd.mkopt.mk @@ -1,7 +1,7 @@ # # # Generic mechanism to deal with WITH and WITHOUT options and turn -# them into MK_ options. +# them into MK_ options. Also turn group options into OPT_ options. # # For each option FOO in __DEFAULT_YES_OPTIONS, MK_FOO is set to # "yes", unless WITHOUT_FOO is defined, in which case it is set to @@ -31,6 +31,15 @@ # system should use MK_FOO={yes,no} when it needs to override the # user's desires or default behavior. # +# For each option in __SINGLE_OPTIONS, OPT_FOO is set to FOO if +# defined and __FOO_DEFAULT if not. Valid values for FOO are specified +# by __FOO_OPTIONS. +# +# Other parts of the build system will set BROKEN_SINGLE_OPTIONS to a +# list of 3-tuples of the form: "OPTION broken_value replacment_value". +# This will not be unset before returning. Clients are expected to +# always += this variable. +# # # MK_* options which default to "yes". @@ -93,6 +102,33 @@ MK_${var}:= no MK_${var}:= no .endfor +# +# Group options set an OPT_FOO variable for each option. +# +.for opt in ${__SINGLE_OPTIONS} +.if !defined(__${opt}_OPTIONS) || empty(__${opt}_OPTIONS) +.error __${opt}_OPTIONS undefined or empty +.endif +.if !defined(__${opt}_DEFAULT) || empty(__${opt}_DEFAULT) +.error __${opt}_DEFAULT undefined or empty +.endif +.if defined(${opt}) +OPT_${opt}:= ${${opt}} +.else +OPT_${opt}:= ${__${opt}_DEFAULT} +.endif +.if empty(OPT_${opt}) || ${__${opt}_OPTIONS:M${OPT_${opt}}} != ${OPT_${opt}} +.error Invalid option OPT_${opt} (${OPT_${opt}}), must be one of: ${__${opt}_OPTIONS} +.endif +.endfor +.undef __SINGLE_OPTIONS + +.for opt val rep in ${BROKEN_SINGLE_OPTIONS} +.if ${OPT_${opt}} == ${val} +OPT_${opt}:= ${rep} +.endif +.endfor + .for vv in ${__DEFAULT_DEPENDENT_OPTIONS} .if defined(WITH_${vv:H}) && defined(WITHOUT_${vv:H}) MK_${vv:H}?= no diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk index 178a4db61cb2..bad5e218a5b0 100644 --- a/sys/conf/kern.opts.mk +++ b/sys/conf/kern.opts.mk @@ -141,6 +141,33 @@ MK_${var}:= no MK_${var}:= no .endfor .undef BROKEN_OPTIONS + +# +# Group options set an OPT_FOO variable for each option. +# +.for opt in ${__SINGLE_OPTIONS} +.if !defined(__${opt}_OPTIONS) || empty(__${opt}_OPTIONS) +.error __${opt}_OPTIONS not defined or empty +.endif +.if !defined(__${opt}_DEFAULT) || empty(__${opt}_DEFAULT) +.error __${opt}_DEFAULT undefined or empty +.endif +.if defined(${opt}) +OPT_${opt}:= ${${opt}} +.else +OPT_${opt}:= ${__${opt}_DEFAULT} +.endif +.if empty(OPT_${opt}) || ${__${opt}_OPTIONS:M${OPT_${opt}}} != ${OPT_${opt}} +.error Invalid option OPT_${opt} (${OPT_${opt}}), must be one of: ${__${opt}_OPTIONS} +.endif +.endfor +.undef __SINGLE_OPTIONS + +.for opt val rep in ${BROKEN_SINGLE_OPTIONS} +.if ${OPT_${opt}} == ${val} +OPT_${opt}:= ${rep} +.endif +.endfor #end of bsd.mkopt.mk expanded inline. # From nobody Fri Sep 1 16:54:54 2023 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 4RckfQ5PQhz4rlnr; Fri, 1 Sep 2023 16:54:54 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RckfQ4g0xz3V9v; Fri, 1 Sep 2023 16:54:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693587294; 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=CB7AIAPp+qPkDNKMhC/ogSRxWdPZ6/3/XgJ7omyqXMI=; b=L1zciECr6RpWY4ef2tvCeGW1NOl9Fq0By5BKDKmaxIyeQugN54kk9VsfI64FBTFyDjEvc8 uMueN67Awemx3wEtn+iYLCsriVo5yvcKS+YZ1/kZZRtAI3Mch77IMOLaft/AAl1Dy5Ljvu ZO15YisRGDyo07b3VEko5VUNCzP5cdL9y7mDyCtNqYv7REJxH6zDIJxhgm82Ec+mrQPXFx hLHTXfSZm6q+cEZ4g6QMYQZr1DWTA4vXMA7CH0Pnzg8vEN+sqJ2oG5YClfPNfPWYt/DQY4 2/YqOLdXUWrx8sjWcWga6bmvcFIY4wTlRpExvPeCaMs6qq3GHKKnrWmxUuCLSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693587294; a=rsa-sha256; cv=none; b=vyUi7JdmtmJ96jMFtFJ70ffeA4ignXKB+WLYL6xiM3Xg21lOcpPkSOR5SPfmBF/mtwcTCu YwuN/vNW+kuAR5CQRJ0DWqor7LYcKJNfqHOOJo+6TlLQatNLv9/MdmsgHYwJeO8QfhHnmH De5D2+eMKQ8CzFTeu8yX1aKQ5h8LZZrrPzex5Z0fqTGWxn/wvfyl6mmK7iD2q/yrHfjIBQ oJ1YwkMwZkdSe8s/PuvnARHcA5L5w72yoXg0TW3VTQCIyGwrYwyy5NQL0ElpsNNbjOFFMk bm4V1tK4MyTPyUPn8mMoffbTNWaI+wubF5LbaaYTConbDzqtttVAnRBh3KJWVA== 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=1693587294; 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=CB7AIAPp+qPkDNKMhC/ogSRxWdPZ6/3/XgJ7omyqXMI=; b=BQdsNp93CSLyv4oE3Ke6/t7Da5ufQml03+JZLqoz5sT4xsQ7uenZoYWAVunWzHZLp++pNB fR49jD1cWQPW4JmIY7oluQNU8r+D98PFpjSTND3X5LjD9a8CJ08KjgOEMAdqFacUdZhUGY pX7AA0InbEJuz9jbs/7ReFmzWI8th/ePkl8CnsWk4N/vtsylePMYF0n/0CDVQ4F+5l0uyI 4l54JljywqBHrL5xYtMFZbJ53vcmlhPAPTbcglWBf02ojSZceqvRjBukqEBEuxEgGMiEVz 1wRvOQykDVm/DRQWnzAQVzsJahqzy7MCC95urE1NcrS4VtkevFpbzdnDB3YOsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RckfQ3lfcz181d; Fri, 1 Sep 2023 16:54:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381GssqZ070638; Fri, 1 Sep 2023 16:54:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381GssHB070635; Fri, 1 Sep 2023 16:54:54 GMT (envelope-from git) Date: Fri, 1 Sep 2023 16:54:54 GMT Message-Id: <202309011654.381GssHB070635@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 897ae85f7d02 - main - makeman: add minimal support for group options 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 897ae85f7d02e1244907587e7b7c3b628ca66365 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=897ae85f7d02e1244907587e7b7c3b628ca66365 commit 897ae85f7d02e1244907587e7b7c3b628ca66365 Author: Brooks Davis AuthorDate: 2023-09-01 16:41:59 +0000 Commit: Brooks Davis CommitDate: 2023-09-01 16:54:23 +0000 makeman: add minimal support for group options Ignore OPT_* values in showconfig out in exising code paths and add a new path to include descriptions for each. For now, hardcode the description contents rather than attempting to generate it. This runs the risk of docs getting out of date, limits the amount of new shell code added today while a lua rewrite is nearly ready to land. This change requires a followup commit to enable OPT_* values in "make showconfig" in order to actually find group options. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D41681 --- tools/build/options/makeman | 103 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 81 insertions(+), 22 deletions(-) diff --git a/tools/build/options/makeman b/tools/build/options/makeman index c4a51ec7c56e..f4089d453801 100755 --- a/tools/build/options/makeman +++ b/tools/build/options/makeman @@ -52,21 +52,32 @@ show_options() __MAKE_CONF=/dev/null \ TARGET_ARCH=${target#*/} TARGET=${target%/*} | while read var _ val ; do - opt=${var#MK_} - if [ $opt = "$prev_opt" ]; then - echo "$target: ignoring duplicate option $opt" >&2 - continue - fi - prev_opt=$opt - case ${val} in - yes) - echo ${opt} ${target} + case $var in + MK_*) + opt=${var#MK_} + if [ $opt = "$prev_opt" ]; then + echo "$target: ignoring duplicate option $opt" >&2 + continue + fi + prev_opt=$opt + case ${val} in + yes) + echo ${opt} ${target} + ;; + no) + echo ${opt} + ;; + *) + echo "make showconfig broken: ${var} ${_} ${val} (not yes or no)" >&2 + exit 1 + ;; + esac ;; - no) - echo ${opt} + OPT_*) + # ignore ;; *) - echo "make showconfig broken: ${var} ${_} ${val} (not yes or no)" >&2 + echo "make showconfig broken: ${var} ${_} ${val} not MK_ or OPT_" >&2 exit 1 ;; esac @@ -121,21 +132,53 @@ show() env -i ${make} .MAKE.MODE=normal "$@" showconfig __MAKE_CONF=/dev/null \ SRCCONF=/dev/null | while read var _ val ; do - opt=${var#MK_} - case ,${requireds}, in - *,${opt},*) - continue + case ${var} in + MK_*) + opt=${var#MK_} + case ,${requireds}, in + *,${opt},*) + continue + ;; + esac + case ${val} in + yes) + echo ${yes_prefix}_${opt} + ;; + no) + echo ${no_prefix}_${opt} + ;; + *) + echo "make showconfig broken: ${var} ${_} ${val} (not yes or no)" >&2 + exit 1 + ;; + esac + ;; + OPT_*) + # ignore + ;; + *) + echo "make showconfig broken: ${var} ${_} ${val} not MK_ or OPT_" >&2 + exit 1 ;; esac - case ${val} in - yes) - echo ${yes_prefix}_${opt} + done +} + +show_group_options() +{ + env -i ${make} .MAKE.MODE=normal "$@" showconfig __MAKE_CONF=/dev/null \ + SRCCONF=/dev/null | + while read var _ val ; do + case ${var} in + MK_*) + # ignore ;; - no) - echo ${no_prefix}_${opt} + OPT_*) + opt=${var#OPT_} + echo ${opt} ;; *) - echo "make showconfig broken: ${var} ${_} ${val} (not yes or no)" >&2 + echo "make showconfig broken: ${var} ${_} ${val} not MK_ or OPT_" >&2 exit 1 ;; esac @@ -332,6 +375,22 @@ EOF printf "\n" >&2 cat <&2 + continue + fi + + echo ".It Va ${opt}" + cat ${opt} + done + cat < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: bd016ad227b0 - main - Teach make showconfig about group options 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd016ad227b06830ac24a8f9035b904a138a5d3e Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=bd016ad227b06830ac24a8f9035b904a138a5d3e commit bd016ad227b06830ac24a8f9035b904a138a5d3e Author: Brooks Davis AuthorDate: 2023-09-01 16:42:27 +0000 Commit: Brooks Davis CommitDate: 2023-09-01 16:54:23 +0000 Teach make showconfig about group options Output OPT_ variables in addition to MK_ variables. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D41682 --- Makefile.inc1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index f740cc5abcca..7c6981f0f890 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -3470,7 +3470,7 @@ check-old: check-old-files check-old-libs check-old-dirs .PHONY # showconfig: .PHONY @(${MAKE} -n -f ${.CURDIR}/sys/conf/kern.opts.mk -V dummy -dg1 UPDATE_DEPENDFILE=no NO_OBJ=yes MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH}; \ - ${MAKE} -n -f ${.CURDIR}/share/mk/src.opts.mk -V dummy -dg1 UPDATE_DEPENDFILE=no NO_OBJ=yes) 2>&1 | grep '^MK_[A-Z]' | sort -u + ${MAKE} -n -f ${.CURDIR}/share/mk/src.opts.mk -V dummy -dg1 UPDATE_DEPENDFILE=no NO_OBJ=yes) 2>&1 | grep -E '^(MK|OPT)_[A-Z]' | sort -u .if !empty(KRNLOBJDIR) && !empty(KERNCONF) DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF}/ From nobody Fri Sep 1 16:54:56 2023 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 4RckfT0kVvz4rlnt; Fri, 1 Sep 2023 16:54:57 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RckfS6cljz3V8K; Fri, 1 Sep 2023 16:54:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693587296; 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=6WaGoicPsIvN2ZCAEBW0dSTQLCU5mlLCVGcuunZdY3E=; b=xbpfkpTRr8lONikqq/zZGzF0Qd/u7l2getwZX0QDpOxnDs2s1dUnzGPyBMzFIKM4PJ9yuj t7UqFRJA5/z+0DtlGHpQJ55wGSXUFDHKls4SjbF5VmBwyskyz2CCdr48pIcoaMTe3Hyw4b 79Dq2jWWnnchUfwMssBUzYt9xpHMNS1gmSGqD1yc0AXwJEQJz8OPP9ZTNgSwi9bj6y1Fan d7ZcntDgOZ6x/86+u6T7QVibwROnYxuh5Nfa+GistDB0MAKUsc9EQGV7mzAxNH49lkEV4l Wel6O3A0Udgi0Zrrm67yxF/psvF4VXL/AVdaSL+ThG4lBPY6C8G0yzMUX+O7NA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693587296; a=rsa-sha256; cv=none; b=OU5zWckAxHNoF/rbjhqUXbjueNeUEdhnqTK5qNwfREb8KLHLHVlpq8tbMIEHR0XC6GidTH 5SOhBeqgRgZrkk7smIdASUZaWOzM4PkGP90xkoSR8joH+0Hw2VQqMCEhdo4fJMiLDOt41p GmBzIHVsHJwJznmk/fPutHRqI9D919o+qsZIkkhlDLrimJjVTqazRHbpnW8+GlUGJhIbQM fmf6CtLsM8x/cxx5KGGSZiA/3oVqGAvvJDCGiyw2/ighLXcZxmIjV+6IOArHYP4sd/K5xt sgnOljrStdMQ3a4pxdugSMnCMXOvmUKCTNWjjHxwQa8KfwDPVUusNwywoyQebQ== 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=1693587296; 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=6WaGoicPsIvN2ZCAEBW0dSTQLCU5mlLCVGcuunZdY3E=; b=iRru1PlLgLmi5dWs43QsfrdRZ+KRAFcywCFsuQUyanoKiXnCirDMzMrDJXLpdwIAIdYYxG NaU5I//tPQ2RMoR/lYEfXnXC4ve5+mH0XZaX/EEFiKBxh/S5uA7udA0nOPwPPhKxIBYFzB EyO/N3KFzbt8XRNnpOZkl8VQjnClE2oJpp9EtR9Xs4pIF/PkHDyYaYIgeEJZhhuzX0bkMc qD7E4K+lncuO/nMIhb2dhD2AfsQzxH+jz52v75dvtuAPMj/9WKH5aDOrFNrKSJkUqY1mjZ SH8mSxCMj9VsRcqHOhZ5oDb8DOY5RJVlPwFc7+I2k1RwP07UmQE/my3v9acHag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RckfS5k9qz17p0; Fri, 1 Sep 2023 16:54:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381Gsuaw070726; Fri, 1 Sep 2023 16:54:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381Gsuaf070723; Fri, 1 Sep 2023 16:54:56 GMT (envelope-from git) Date: Fri, 1 Sep 2023 16:54:56 GMT Message-Id: <202309011654.381Gsuaf070723@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 09e32b2fddf5 - main - libc: add LIBC_MALLOC option 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09e32b2fddf5f673f76e2fffa415a73d99a6f309 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=09e32b2fddf5f673f76e2fffa415a73d99a6f309 commit 09e32b2fddf5f673f76e2fffa415a73d99a6f309 Author: Brooks Davis AuthorDate: 2023-09-01 16:42:39 +0000 Commit: Brooks Davis CommitDate: 2023-09-01 16:54:23 +0000 libc: add LIBC_MALLOC option This will enable alternative mallocs to be included in the tree and selected by setting LIBC_MALLOC. As there is only one today (jemalloc) this option does nothing, but we expect to add other implementations in the future. This will also reduce diffs to CheriBSD. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D41660 --- lib/libc/stdlib/malloc/Makefile.inc | 2 +- share/mk/src.opts.mk | 6 ++++++ tools/build/options/LIBC_MALLOC | 13 +++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lib/libc/stdlib/malloc/Makefile.inc b/lib/libc/stdlib/malloc/Makefile.inc index bce4353fe80a..3bae4ff1505b 100644 --- a/lib/libc/stdlib/malloc/Makefile.inc +++ b/lib/libc/stdlib/malloc/Makefile.inc @@ -1,3 +1,3 @@ SYM_MAPS+=${LIBC_SRCTOP}/stdlib/malloc/Symbol.map -.include "${LIBC_SRCTOP}/stdlib/malloc/jemalloc/Makefile.inc" +.include "${LIBC_SRCTOP}/stdlib/malloc/${OPT_LIBC_MALLOC}/Makefile.inc" diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 1183a8202168..d7112cf57178 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -228,6 +228,12 @@ __DEFAULT_DEPENDENT_OPTIONS= \ LOADER_VERIEXEC_VECTX/LOADER_VERIEXEC \ VERIEXEC/BEARSSL \ +__SINGLE_OPTIONS = \ + LIBC_MALLOC + +__LIBC_MALLOC_OPTIONS= jemalloc +__LIBC_MALLOC_DEFAULT= jemalloc + # MK_*_SUPPORT options which default to "yes" unless their corresponding # MK_* variable is set to "no". # diff --git a/tools/build/options/LIBC_MALLOC b/tools/build/options/LIBC_MALLOC new file mode 100644 index 000000000000..ee1883f3ee54 --- /dev/null +++ b/tools/build/options/LIBC_MALLOC @@ -0,0 +1,13 @@ +Specify the +.Xr malloc 3 +implementaiton used by libc. +The default value is +.Li jemalloc . +Valid values are: +.Bl -tag -width indent +.It Li jemalloc +.El +.Pp +Other implementations are expected in the future in both +.Fx +and downstream consumers. From nobody Fri Sep 1 16:54:57 2023 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 4RckfV1Sfcz4rlhk; Fri, 1 Sep 2023 16:54:58 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RckfV11VTz3VJN; Fri, 1 Sep 2023 16:54:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693587298; 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=ZvDEsk/5PHuOaLuNyzYy8UxQ/7m/nB/6oa4SxYYW99U=; b=g4oCBiYQ/Ke2yRzxOsqFVlYLIp4fmJsOir8ZG3nyKwvTlus0G0yhulKBW9rt5XIHleDp0t 8JqXAcO9N+/wPQhe96HFRL+6Kh8nXP2AjTYPeZ0/gQkHhMw8VCLBnvsskqBCDGwr4CLeVS dNWdCCyn7PGy997SP01uqNssExeD16CE/0Dp1jo/JvfGSMJx2FZM1vjY8CgKNuhf59Bz9n knSRU/Kr9lHqN3gWDpqTi7KetMh4gdOF4PUyBNXlZj+vSDZej5k7MYfo5O/txR9gcRCuAn yo3ZRJiefnXpZRCiY7O6c0H4N3a/42a0DSfeFskdoQyYNgoztjcOXvA/eGbE+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693587298; a=rsa-sha256; cv=none; b=Y53hL3KaTgxrqZuQSR90mNMVjyeJToeUKHN6wFuRBLsyIUMdt/uEaA2HPPk2Kv29ffLh1G B6djJJG0/PHEb3FStXx7d/QP5IQLAuuavdUzWhiYiGw5/y8wh2dfMgjCgnTGGql+/fXYVj 7Be4FXyBYHgWnQKYnFlnXiqc36sniNg8SJ+jCKY1WnvWmKWZVD9IORJT4wLprMDJShDFlo ij5U2oUI8IujqsVowdWv+9JaTA1pWqVRgnPOqLLHFAUVPzJoBgTVTzDOLb1Yxlaruxx6Fh niTA+5MS0MmyJi4vcDw8KCeXPOrf0UDMq7f3FWRFo3gxnuNP61YMgys5joYaBA== 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=1693587298; 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=ZvDEsk/5PHuOaLuNyzYy8UxQ/7m/nB/6oa4SxYYW99U=; b=AMRKxBjWkfLWZM/eGO9ZiWbWkG9rFbFH8Sv9y3p05dDDaFsIhSFfd08eVls+swNpb8Haw6 xbasWR5HMdJRkPKdRdJ98NXLj+7yR/EAos3dXRNMBobKNDPSQI3wFBO4teQzuIoXsNJ5LM uPbjS/eOu85/+KDyd4DxYPUabUddZS1rfCI2D+X+uc0EfJMNwAk7JuEJIfHLh4NkOtHthW 6P8xi9tQZoR7ppfXK+r4cyDcxyplsfj4nmBYT+WSl1LijZEMcQVTBlaQP1LDgyxsfuHKxc rTa3ibx4/88o0Sk3B7dHBRlurTF8eIw6rvw5P2rzLw8xc0cNVwEWPD3U/Xy3Yg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RckfT6m98z17p1; Fri, 1 Sep 2023 16:54:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381Gsv2B070765; Fri, 1 Sep 2023 16:54:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381GsvXg070762; Fri, 1 Sep 2023 16:54:57 GMT (envelope-from git) Date: Fri, 1 Sep 2023 16:54:57 GMT Message-Id: <202309011654.381GsvXg070762@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 2befa269b869 - main - Add INIT_ALL build option 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2befa269b869c810b4436b7b5fe922ac3278ee5e Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=2befa269b869c810b4436b7b5fe922ac3278ee5e commit 2befa269b869c810b4436b7b5fe922ac3278ee5e Author: Brooks Davis AuthorDate: 2023-09-01 16:42:52 +0000 Commit: Brooks Davis CommitDate: 2023-09-01 16:54:24 +0000 Add INIT_ALL build option This option replaces WITH_INIT_ALL_PATTERN and WITH_INIT_ALL_ZERO with INIT_ALL=pattern and INIT_ALL=zero respectively. As these are relatively rarely used options no backwards compatibility is implemented. Reviewed by: emaste Relnotes: yes Differential Revision: https://reviews.freebsd.org/D41675 --- UPDATING | 4 ++++ share/mk/bsd.lib.mk | 17 +++++------------ share/mk/bsd.opts.mk | 12 ++++++------ share/mk/bsd.prog.mk | 17 +++++------------ sys/conf/kern.mk | 14 ++++---------- sys/conf/kern.opts.mk | 18 ++++++++++-------- tools/build/options/INIT_ALL | 21 +++++++++++++++++++++ tools/build/options/WITH_INIT_ALL_PATTERN | 4 ---- tools/build/options/WITH_INIT_ALL_ZERO | 3 --- 9 files changed, 55 insertions(+), 55 deletions(-) diff --git a/UPDATING b/UPDATING index fbb899cc25a4..0b1d8aeb60c5 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20230901: + The WITH_INIT_ALL_PATTERN and WITH_INIT_ALL_ZERO build option have + been replaced by INIT_ALL=pattern and INIT_ALL=zero respectively. + 20230824: FreeBSD 15.0-CURRENT. diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 3099c8e205b1..90d89eeebc5d 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -101,23 +101,16 @@ LDFLAGS+= -Wl,-zretpolineplt LDFLAGS.bfd+= -Wl,-znoexecstack # Initialize stack variables on function entry -.if ${MK_INIT_ALL_ZERO} == "yes" +.if ${OPT_INIT_ALL} != "none" .if ${COMPILER_FEATURES:Minit-all} -CFLAGS+= -ftrivial-auto-var-init=zero -CXXFLAGS+= -ftrivial-auto-var-init=zero -.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 160000 +CFLAGS+= -ftrivial-auto-var-init=${OPT_INIT_ALL} +CXXFLAGS+= -ftrivial-auto-var-init=${OPT_INIT_ALL} +.if ${OPT_INIT_ALL} == "zero" && ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 160000 CFLAGS+= -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang CXXFLAGS+= -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang .endif .else -.warning InitAll (zeros) requested but not supported by compiler -.endif -.elif ${MK_INIT_ALL_PATTERN} == "yes" -.if ${COMPILER_FEATURES:Minit-all} -CFLAGS+= -ftrivial-auto-var-init=pattern -CXXFLAGS+= -ftrivial-auto-var-init=pattern -.else -.warning InitAll (pattern) requested but not supported by compiler +.warning INIT_ALL (${OPT_INIT_ALL}) requested but not supported by compiler .endif .endif diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk index bb9fba38e5a6..93b0e7184b6d 100644 --- a/share/mk/bsd.opts.mk +++ b/share/mk/bsd.opts.mk @@ -75,8 +75,6 @@ __DEFAULT_NO_OPTIONS = \ BIND_NOW \ CCACHE_BUILD \ CTF \ - INIT_ALL_PATTERN \ - INIT_ALL_ZERO \ INSTALL_AS_USER \ MANSPLITPKG \ PROFILE \ @@ -103,14 +101,16 @@ __DEFAULT_NO_OPTIONS+= PIE __DEFAULT_YES_OPTIONS+=PIE .endif +__SINGLE_OPTIONS = \ + INIT_ALL + +__INIT_ALL_OPTIONS= none pattern zero +__INIT_ALL_DEFAULT= none + .-include .include -.if ${MK_INIT_ALL_PATTERN} == "yes" && ${MK_INIT_ALL_ZERO} == "yes" -.warning WITH_INIT_ALL_PATTERN and WITH_INIT_ALL_ZERO are mutually exclusive. -.endif - # # Supported NO_* options (if defined, MK_* will be forced to "no", # regardless of user's setting). diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 8c3ba69af73d..c546c4f0b680 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -71,23 +71,16 @@ LDFLAGS+= -Wl,-zretpolineplt LDFLAGS.bfd+= -Wl,-znoexecstack # Initialize stack variables on function entry -.if ${MK_INIT_ALL_ZERO} == "yes" +.if ${OPT_INIT_ALL} != "none" .if ${COMPILER_FEATURES:Minit-all} -CFLAGS+= -ftrivial-auto-var-init=zero -CXXFLAGS+= -ftrivial-auto-var-init=zero -.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 160000 +CFLAGS+= -ftrivial-auto-var-init=${OPT_INIT_ALL} +CXXFLAGS+= -ftrivial-auto-var-init=${OPT_INIT_ALL} +.if ${OPT_INIT_ALL} == "zero" && ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 160000 CFLAGS+= -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang CXXFLAGS+= -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang .endif .else -.warning InitAll (zeros) requested but not supported by compiler -.endif -.elif ${MK_INIT_ALL_PATTERN} == "yes" -.if ${COMPILER_FEATURES:Minit-all} -CFLAGS+= -ftrivial-auto-var-init=pattern -CXXFLAGS+= -ftrivial-auto-var-init=pattern -.else -.warning InitAll (pattern) requested but not supported by compiler +.warning INIT_ALL (${OPT_INIT_ALL}) requested but not supported by compiler .endif .endif diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index dcaacbf831cb..e00e025ab91b 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -242,20 +242,14 @@ CFLAGS+= -mretpoline # # Initialize stack variables on function entry # -.if ${MK_INIT_ALL_ZERO} == "yes" +.if ${OPT_INIT_ALL} != "none" .if ${COMPILER_FEATURES:Minit-all} -CFLAGS+= -ftrivial-auto-var-init=zero -.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 160000 +CFLAGS+= -ftrivial-auto-var-init=${OPT_INIT_ALL} +.if ${OPT_INIT_ALL} == "zero" && ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 160000 CFLAGS+= -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang .endif .else -.warning InitAll (zeros) requested but not supported by compiler -.endif -.elif ${MK_INIT_ALL_PATTERN} == "yes" -.if ${COMPILER_FEATURES:Minit-all} -CFLAGS+= -ftrivial-auto-var-init=pattern -.else -.warning InitAll (pattern) requested but not support by compiler +.warning INIT_ALL (${OPT_INIT_ALL}) requested but not supported by compiler .endif .endif diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk index bad5e218a5b0..f908f761b21e 100644 --- a/sys/conf/kern.opts.mk +++ b/sys/conf/kern.opts.mk @@ -57,8 +57,6 @@ __DEFAULT_YES_OPTIONS = \ __DEFAULT_NO_OPTIONS = \ BHYVE_SNAPSHOT \ EXTRA_TCP_STACKS \ - INIT_ALL_PATTERN \ - INIT_ALL_ZERO \ KERNEL_RETPOLINE \ RATELIMIT \ REPRODUCIBLE_BUILD \ @@ -72,12 +70,6 @@ __DEFAULT_NO_OPTIONS = \ # Kernel config files are unaffected, though some targets can be # affected by KERNEL_SYMBOLS, FORMAT_EXTENSIONS, CTF and SSP. -# Things that don't work based on the CPU -.if ${MACHINE} == "amd64" -# PR251083 conflict between INIT_ALL_ZERO and ifunc memset -BROKEN_OPTIONS+= INIT_ALL_ZERO -.endif - # Broken on 32-bit arm, kernel module compile errors .if ${MACHINE_CPUARCH} == "arm" BROKEN_OPTIONS+= OFED @@ -99,6 +91,16 @@ __DEFAULT_NO_OPTIONS += FDT __DEFAULT_YES_OPTIONS += FDT .endif +__SINGLE_OPTIONS = \ + INIT_ALL + +__INIT_ALL_OPTIONS= none pattern zero +__INIT_ALL_DEFAULT= none +.if ${MACHINE} == "amd64" +# PR251083 conflict between INIT_ALL_ZERO and ifunc memset +BROKEN_SINGLE_OPTIONS+= INIT_ALL zero none +.endif + # expanded inline from bsd.mkopt.mk to avoid share/mk dependency # Those that default to yes diff --git a/tools/build/options/INIT_ALL b/tools/build/options/INIT_ALL new file mode 100644 index 000000000000..3ca70337b8f1 --- /dev/null +++ b/tools/build/options/INIT_ALL @@ -0,0 +1,21 @@ +Control default initialization of stack variables in C and C++ code. +Options other than +.Li none +require the Clang compiler or GCC 12.0 or later. +The default value is +.Li none . +Valid values are: +.Bl -tag -width indent +.It Li none +Do not initialize stack variables (standard C/C++ behavior). +.It Li pattern +Build the base system or kernel with stack variables initialized to +.Pq compiler defined +debugging patterns on function entry. +.It Li zero +Build the base system or kernel with stack variables initialized +to zero on function entry. +This value is converted to +.Li none +for amd64 kernel builds due to incompatability with ifunc memset. +.El diff --git a/tools/build/options/WITH_INIT_ALL_PATTERN b/tools/build/options/WITH_INIT_ALL_PATTERN deleted file mode 100644 index 781c0ea19ab6..000000000000 --- a/tools/build/options/WITH_INIT_ALL_PATTERN +++ /dev/null @@ -1,4 +0,0 @@ -Build the base system or kernel with stack variables initialized to -.Pq compiler defined -debugging patterns on function entry. -This option requires the clang compiler. diff --git a/tools/build/options/WITH_INIT_ALL_ZERO b/tools/build/options/WITH_INIT_ALL_ZERO deleted file mode 100644 index 102462316759..000000000000 --- a/tools/build/options/WITH_INIT_ALL_ZERO +++ /dev/null @@ -1,3 +0,0 @@ -Build the base system or kernel with stack variables initialized -to zero on function entry. -This option requires that the clang compiler be used. From nobody Fri Sep 1 16:54:58 2023 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 4RckfW2lHxz4rlqj; Fri, 1 Sep 2023 16:54:59 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RckfW1kJ7z3VG7; Fri, 1 Sep 2023 16:54:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693587299; 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=19BYowjSpy7oo6Sbga/uXZGlTofTifUtpwkKTRfZZnQ=; b=K7mQ/Bdiv2Hsyi1N+qhSDbuD9sX7Lk7b1aFMsHHS+5bYDNIqJ5cGG300/PJ05avi5+aJGe /ahoLUjIgJ86IHEj0wUVCIatxSPg1D71uR1eecZJMijzhsgc5aLxli5hM6gHmKiDZf6aBO 0HVb9b05uUdvqlF98Io08g5nacDLBW2Bj4NJ6aj8sb/SVPhDn6EeC7Sg2w2vK5Ui5/TbgE VaIMGtHNWD0fHpbPlJ0kyWMmXXW2dm5px/SyxC4UTHysf6cqDgruimIxw5cVJB2sUa37gg 7Ou1Ox671O13l9WK9iiRboGV0ZvdX/v/Yj7IKFicBwLd+5fpuDBQFvWgLQPAdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693587299; a=rsa-sha256; cv=none; b=Dpw381mc1QyvjnL3jJ10wbjTlmD5Ty3QI8njDrms2e4odXLAnVC1mGtUM/9GM0ABjQHQk0 1f0YBC2PnyWl9PKXW3IoncNk3yPS4V3pwnpeFYfPjTdo1jIZMMCSidrtxMMzvZ9cY85hor 7x3xJVB/X3gerUEDMKhOfQ4kEFu0XnpHqJuJJq47NacTOV2E+8ngZzJ6nFtEG8/B4qGbvu C6z6WqFasd7hViJPD2zLfBorQV6yX9xTYGYxN7LarHoXfVXQRO6nrICpeBH7m5TWAJG52c vGFcG88IV2Hdb9fglKhYp6fymkiHjD72NRKiNGG7J5j1ARLlTwQXzKrl6j4XHw== 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=1693587299; 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=19BYowjSpy7oo6Sbga/uXZGlTofTifUtpwkKTRfZZnQ=; b=R1jGvanp9VuljQaEtFv1IO2SV3W4Jp4mIU+M4IWoemXnS1XVoean659KUd401mcibv141A QKhaCpnrTQfVPIoXUKdWn082gR43fW7uHtdeU1vi+xbxcJWHShexKjFuAP05nleREP1q/c CzMvZSW3eQ6m0Olkd5Njd6HR5szmGaFTrOESJfZTAMVYsPSalpe3Ft9ppyrvr3FI9iNqL7 ruP06/yTV/KbrpOYbdBIppmSa4v3hhgpx5hWXu8I1n5ki033sA9ieokqXRMFxXVA/7d05t CUdx83ZordxtKphX3vL33nEbdDJs4BSZRW3QULTIiNdg7TvviuTq9bYLmiKy4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RckfW0ZtBz17Wl; Fri, 1 Sep 2023 16:54:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381Gswuu070807; Fri, 1 Sep 2023 16:54:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381GswAQ070804; Fri, 1 Sep 2023 16:54:58 GMT (envelope-from git) Date: Fri, 1 Sep 2023 16:54:58 GMT Message-Id: <202309011654.381GswAQ070804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 3fe97711e3c0 - main - src.conf.5: regen 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3fe97711e3c04117a64518f05e8af39446f20163 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=3fe97711e3c04117a64518f05e8af39446f20163 commit 3fe97711e3c04117a64518f05e8af39446f20163 Author: Brooks Davis AuthorDate: 2023-09-01 16:47:11 +0000 Commit: Brooks Davis CommitDate: 2023-09-01 16:54:24 +0000 src.conf.5: regen --- share/man/man5/src.conf.5 | 49 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 1bd6d19679f4..fdbbaf70e190 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -765,15 +765,6 @@ Do not build .Xr inetd 8 . .It Va WITHOUT_INET_SUPPORT Build libraries, programs, and kernel modules without IPv4 support. -.It Va WITH_INIT_ALL_PATTERN -Build the base system or kernel with stack variables initialized to -.Pq compiler defined -debugging patterns on function entry. -This option requires the clang compiler. -.It Va WITH_INIT_ALL_ZERO -Build the base system or kernel with stack variables initialized -to zero on function entry. -This option requires that the clang compiler be used. .It Va WITHOUT_INSTALLLIB Set this to not install optional libraries. For example, when creating a @@ -1834,6 +1825,46 @@ When set, it enforces these options: .It Va WITH_ZONEINFO_LEAPSECONDS_SUPPORT Build leapsecond information in to the timezone database. .El +.Pp +The following options accept a single value from a list of valid values. +.Bl -tag -width indent +.It Va INIT_ALL +Control default initialization of stack variables in C and C++ code. +Options other than +.Li none +require the Clang compiler or GCC 12.0 or later. +The default value is +.Li none . +Valid values are: +.Bl -tag -width indent +.It Li none +Do not initialize stack variables (standard C/C++ behavior). +.It Li pattern +Build the base system or kernel with stack variables initialized to +.Pq compiler defined +debugging patterns on function entry. +.It Li zero +Build the base system or kernel with stack variables initialized +to zero on function entry. +This value is converted to +.Li none +for amd64 kernel builds due to incompatability with ifunc memset. +.El +.It Va LIBC_MALLOC +Specify the +.Xr malloc 3 +implementaiton used by libc. +The default value is +.Li jemalloc . +Valid values are: +.Bl -tag -width indent +.It Li jemalloc +.El +.Pp +Other implementations are expected in the future in both +.Fx +and downstream consumers. +.El .Sh FILES .Bl -tag -compact -width Pa .It Pa /etc/src.conf From nobody Fri Sep 1 17:11:39 2023 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 4Rcl1p5ck9z4rncb; Fri, 1 Sep 2023 17:11:42 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4Rcl1p0cX4z3Z6m; Fri, 1 Sep 2023 17:11:42 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Authentication-Results: mx1.freebsd.org; none Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 162F83C019A; Fri, 1 Sep 2023 17:11:39 +0000 (UTC) Date: Fri, 1 Sep 2023 17:11:39 +0000 From: Brooks Davis To: Brooks Davis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: ce5fa47cf02a - main - share/mk: support for "single" group options Message-ID: References: <202309011654.381GsraB070587@gitrepo.freebsd.org> 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202309011654.381GsraB070587@gitrepo.freebsd.org> X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US] X-Rspamd-Queue-Id: 4Rcl1p0cX4z3Z6m On Fri, Sep 01, 2023 at 04:54:53PM +0000, Brooks Davis wrote: > The branch main has been updated by brooks: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ce5fa47cf02ae97844a826d967d122cc8171dd58 > > commit ce5fa47cf02ae97844a826d967d122cc8171dd58 > Author: Brooks Davis > AuthorDate: 2023-09-01 16:41:07 +0000 > Commit: Brooks Davis > CommitDate: 2023-09-01 16:52:28 +0000 > > share/mk: support for "single" group options > > Support group options where 1 of n values will be selected (or a default > value will be used). After processing, an OPT_FOO will be set to one > value from __FOO_OPTIONS for each FOO in __SINGLE_OPTIONS. If the user > sets FOO that value will be used, otherwise __FOO_DEFAULT will be used. I eventually plan to follow this up with MULTI support so we can tame MK_LLVM_TARGET_*, but I need to get back to the downstream malloc work that motivated this change. -- Brooks From nobody Fri Sep 1 17:13:21 2023 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 4Rcl3z5xWRz4rp1F for ; Fri, 1 Sep 2023 17:13:35 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rcl3z40Vnz3bGj for ; Fri, 1 Sep 2023 17:13:35 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-31c93d2a24fso1798644f8f.2 for ; Fri, 01 Sep 2023 10:13:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693588413; x=1694193213; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OpUzCYq90kAO5SgIEHlAw/kbMr7s0E49n7G1lC/MxWQ=; b=dBm3gxD6TnKBNp5Yunxy7h9yZeCD3u0zPhibIlOzk3r8uqJ4pn2An7rxENn+sl0qRO cfWm9VPeKha8zNpamqY6AEEl7C6B9aw5rIszDX3wO80EkmZ2zgfRvVQZobDou2Z/KeHA 70SRrISQ6N3JGxNg8s86JuK0f30yibqF77OenfMdckvtdL6Z+c9MrY2jG2tNWRP2rrsa V355cUHv+d3kdbBiXnFVp3cDcxSrwk5tMZrWxwVVkMhXxxNmG/w1ALiR7GF8ss/u2FOk Z0I21yY/I/26iTv6lNphGIopNK84hCrZEBvOeLWMYuPJ0YqQd96R8Ozaj1FMMujRs6Kr r+GA== X-Gm-Message-State: AOJu0YzsnNnhZIhR1aJz3GwK4FhCeMV/+jVm1MvCIX64GX3KHaQR2ap4 f/QcJJWuJSwFr550olzOor1x5fLhfeRgMDWMtmGSHw== X-Google-Smtp-Source: AGHT+IGQeAXHADrZelAXUjsGpqLTePI6t+FX3on9sc+P9GYII9KIKQKBDZ7+2pPULCCkLcq53qgJxg== X-Received: by 2002:adf:f987:0:b0:319:76a3:1006 with SMTP id f7-20020adff987000000b0031976a31006mr2155784wrr.40.1693588412953; Fri, 01 Sep 2023 10:13:32 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id i14-20020adfdece000000b003142e438e8csm5772629wrn.26.2023.09.01.10.13.32 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Sep 2023 10:13:32 -0700 (PDT) Content-Type: text/plain; charset=us-ascii 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: 09e32b2fddf5 - main - libc: add LIBC_MALLOC option From: Jessica Clarke In-Reply-To: <202309011654.381Gsuaf070723@gitrepo.freebsd.org> Date: Fri, 1 Sep 2023 18:13:21 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <8D44A65D-373D-49E5-96D0-208F77C5A402@freebsd.org> References: <202309011654.381Gsuaf070723@gitrepo.freebsd.org> To: Brooks Davis X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4Rcl3z40Vnz3bGj On 1 Sep 2023, at 17:54, Brooks Davis wrote: >=20 > The branch main has been updated by brooks: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D09e32b2fddf5f673f76e2fffa415a73d= 99a6f309 >=20 > commit 09e32b2fddf5f673f76e2fffa415a73d99a6f309 > Author: Brooks Davis > AuthorDate: 2023-09-01 16:42:39 +0000 > Commit: Brooks Davis > CommitDate: 2023-09-01 16:54:23 +0000 >=20 > libc: add LIBC_MALLOC option >=20 > This will enable alternative mallocs to be included in the tree and > selected by setting LIBC_MALLOC. As there is only one today = (jemalloc) > this option does nothing, but we expect to add other = implementations > in the future. This will also reduce diffs to CheriBSD. >=20 > Reviewed by: emaste > Differential Revision: https://reviews.freebsd.org/D41660 > --- > lib/libc/stdlib/malloc/Makefile.inc | 2 +- > share/mk/src.opts.mk | 6 ++++++ > tools/build/options/LIBC_MALLOC | 13 +++++++++++++ > 3 files changed, 20 insertions(+), 1 deletion(-) >=20 > diff --git a/lib/libc/stdlib/malloc/Makefile.inc = b/lib/libc/stdlib/malloc/Makefile.inc > index bce4353fe80a..3bae4ff1505b 100644 > --- a/lib/libc/stdlib/malloc/Makefile.inc > +++ b/lib/libc/stdlib/malloc/Makefile.inc > @@ -1,3 +1,3 @@ > SYM_MAPS+=3D${LIBC_SRCTOP}/stdlib/malloc/Symbol.map >=20 > -.include "${LIBC_SRCTOP}/stdlib/malloc/jemalloc/Makefile.inc" > +.include = "${LIBC_SRCTOP}/stdlib/malloc/${OPT_LIBC_MALLOC}/Makefile.inc" > diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk > index 1183a8202168..d7112cf57178 100644 > --- a/share/mk/src.opts.mk > +++ b/share/mk/src.opts.mk > @@ -228,6 +228,12 @@ __DEFAULT_DEPENDENT_OPTIONS=3D \ > LOADER_VERIEXEC_VECTX/LOADER_VERIEXEC \ > VERIEXEC/BEARSSL \ >=20 > +__SINGLE_OPTIONS =3D \ > + LIBC_MALLOC > + > +__LIBC_MALLOC_OPTIONS=3D jemalloc > +__LIBC_MALLOC_DEFAULT=3D jemalloc > + > # MK_*_SUPPORT options which default to "yes" unless their = corresponding > # MK_* variable is set to "no". > # > diff --git a/tools/build/options/LIBC_MALLOC = b/tools/build/options/LIBC_MALLOC > new file mode 100644 > index 000000000000..ee1883f3ee54 > --- /dev/null > +++ b/tools/build/options/LIBC_MALLOC > @@ -0,0 +1,13 @@ > +Specify the > +.Xr malloc 3 > +implementaiton used by libc. s/implementaiton/implementation/ Jess > +The default value is > +.Li jemalloc . > +Valid values are: > +.Bl -tag -width indent > +.It Li jemalloc > +.El > +.Pp > +Other implementations are expected in the future in both > +.Fx > +and downstream consumers. From nobody Fri Sep 1 17:14:23 2023 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 4Rcl590jPNz4rp8R for ; Fri, 1 Sep 2023 17:14:37 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rcl582j8dz3bbt for ; Fri, 1 Sep 2023 17:14:36 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-31aeef88a55so1828410f8f.2 for ; Fri, 01 Sep 2023 10:14:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693588475; x=1694193275; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yKUluS655/2wtH+K+dWUh3hB8cb2xXPOlJ5MVnFqTDw=; b=g7DBQmtYN9yZtm2zZiqG6I3M37fgIR4p+KYh0hhUxFnXpLMCJQQFKGjR5M3wksYn/3 olDpik0hru61RCoIMpaM5ByBEF0yX//ILtYien0iXDXyW2DjOlcWl+L/QLFlEqYEbI0x hAHfq8ZREm+d1OcifBPwdHkc7gj82RHkLWH1tL5ZRbdYKfR+43Jd57Lr9h4BHd18mOfm ipSvY2cO7Nz8wXQ+8SxKIuwNRqQNM/QjrNWOpGF2zMCrf/cHAwSBpnv3zOe3/gCvMgjl 9fzeClUTlVilkEtEEU3rdVuqL2dECoW1xQDTGm9d/8Qf1QKR4jgRFCNzUUDKJiFjc1hB 4sAg== X-Gm-Message-State: AOJu0YzpCBUpzLpozXvSTT27BPNQBpPCrJsoE1O7YOxx4icJFqq4oubb zjPfL2V2NzxxQc/s8mcgeEpWOw== X-Google-Smtp-Source: AGHT+IFOnCb/jaZViR89SVcfHFazbF/tcD59SWe6aBf2zwcR+pu3aUTjNvHp1uD5djruNYQWDwKk0A== X-Received: by 2002:adf:ed8c:0:b0:319:79bb:980c with SMTP id c12-20020adfed8c000000b0031979bb980cmr2177393wro.64.1693588474753; Fri, 01 Sep 2023 10:14:34 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id m24-20020adfa3d8000000b0031753073abcsm1212751wrb.36.2023.09.01.10.14.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Sep 2023 10:14:34 -0700 (PDT) Content-Type: text/plain; charset=us-ascii 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: 2befa269b869 - main - Add INIT_ALL build option From: Jessica Clarke In-Reply-To: <202309011654.381GsvXg070762@gitrepo.freebsd.org> Date: Fri, 1 Sep 2023 18:14:23 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202309011654.381GsvXg070762@gitrepo.freebsd.org> To: Brooks Davis X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4Rcl582j8dz3bbt On 1 Sep 2023, at 17:54, Brooks Davis wrote: >=20 > The branch main has been updated by brooks: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D2befa269b869c810b4436b7b5fe922ac= 3278ee5e >=20 > commit 2befa269b869c810b4436b7b5fe922ac3278ee5e > Author: Brooks Davis > AuthorDate: 2023-09-01 16:42:52 +0000 > Commit: Brooks Davis > CommitDate: 2023-09-01 16:54:24 +0000 >=20 > Add INIT_ALL build option >=20 > This option replaces WITH_INIT_ALL_PATTERN and WITH_INIT_ALL_ZERO = with > INIT_ALL=3Dpattern and INIT_ALL=3Dzero respectively. As these are > relatively rarely used options no backwards compatibility is > implemented. >=20 > Reviewed by: emaste > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D41675 > --- > UPDATING | 4 ++++ > share/mk/bsd.lib.mk | 17 +++++------------ > share/mk/bsd.opts.mk | 12 ++++++------ > share/mk/bsd.prog.mk | 17 +++++------------ > sys/conf/kern.mk | 14 ++++---------- > sys/conf/kern.opts.mk | 18 ++++++++++-------- > tools/build/options/INIT_ALL | 21 +++++++++++++++++++++ > tools/build/options/WITH_INIT_ALL_PATTERN | 4 ---- > tools/build/options/WITH_INIT_ALL_ZERO | 3 --- > 9 files changed, 55 insertions(+), 55 deletions(-) >=20 > diff --git a/UPDATING b/UPDATING > index fbb899cc25a4..0b1d8aeb60c5 100644 > --- a/UPDATING > +++ b/UPDATING > @@ -27,6 +27,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: > world, or to merely disable the most expensive debugging functionality > at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) >=20 > +20230901: > + The WITH_INIT_ALL_PATTERN and WITH_INIT_ALL_ZERO build option have s/option/options/ Jess From nobody Fri Sep 1 17:23:52 2023 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 4RclHr5wXtz4rqKM; Fri, 1 Sep 2023 17:23: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RclHr4B7nz3dr7; Fri, 1 Sep 2023 17:23:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693589032; 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=Y3fSTkPQ6krw/my4BeLSoCbtZJRcpNQXyPmqLskp5aw=; b=A0udM8vdu/pLxONbIX1KfezO/6hUNXEQ0gdgeTsvVfgASBs9qxCmD8gIjZSNzt2zzECIlk ff94bfcei+1bioplt9lydArRNWEMOYHqBawLAFe6DosyLcnWNO2YXq9nzVNWtmMFVmUlhQ JkEdKQb7TKGegjLT6+ik3R0qC3S34YK5VQinJMesstih4nOMLFsKhXa+dBSKQd/wZSyjoQ WVxYI5v6iZqOLtNKgIs7JUyFWjQGcGcrIN8xNJtfR3OkFFUQ7cz/sR3Xais/GsefQ/AsPu QZ+l+Sr/+IStzvLvITPE6MiTBSN8EusClOo9IE4U/ev05MIr7HRBcCsWd0XjOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693589032; a=rsa-sha256; cv=none; b=CK7O3LdelQ51jgIjdtnrdsqLGJP9T3BunZ1SKJEW4mghTQxRYWuD1E4rlQeObjM5dbfpKP TZ3WHWWlkAYnzJM2RNsI8P8GHyuk+VqGoqXho2YETVShLImtCvMY5KXRxGEejprENYSqeI Hg4nh8Wohke4UJnOhfakRI5K0WpkUn8sxUMdL/UfcUKaYw/ChJ0HEUeeEGWHswy/d0mNSL BVMn26hBH0HCCdEvmhdg5zV/ycG36TMMO+D0mdslnQ4h7rOEQWruPlxKBJGktQ1M/Mtw0Q uLdcoJV9bRbwtrRR7+BcukxgkXN6O2WzanrxHVpPUKNwsGrQThbW+x2v3+VY6A== 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=1693589032; 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=Y3fSTkPQ6krw/my4BeLSoCbtZJRcpNQXyPmqLskp5aw=; b=iFILMfHhAa8eX7npwjIdR1r2ixNetPfkMzgISMjIh/RHWMBs7lq5bNkAJOtJqxquCFyOsq 9xVzbpFXgK+uHZnZI1xCt9GkVVTsH2FHzPV4aXB5czYt+7J72I6olmxYzVVUXlKL1Tn+/U u3iMya2MFSdoBGWOrLUKjb7R0qTWe3VReGW1gcHyWFXIid3UdQT84F764RAQwAewTjbwv+ Hd47seKnHm+/JmN7y1o09pf8QWNn/uKQUJZr2bvFfGCwdO7QrvF+wjYnqr7PhizV8YmndK VCehQwI1lTwbk3FYvfTiv7a8Z8PWI7RmV+TayXk14lZO42k066ugJ4a+x0JscQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RclHr3Gxxz18g7; Fri, 1 Sep 2023 17:23:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381HNq26021733; Fri, 1 Sep 2023 17:23:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381HNqGB021730; Fri, 1 Sep 2023 17:23:52 GMT (envelope-from git) Date: Fri, 1 Sep 2023 17:23:52 GMT Message-Id: <202309011723.381HNqGB021730@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 48d057378d34 - main - UPDATING: typo fox 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48d057378d3466012d2e70b7fdf189541d5e6cef Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=48d057378d3466012d2e70b7fdf189541d5e6cef commit 48d057378d3466012d2e70b7fdf189541d5e6cef Author: Brooks Davis AuthorDate: 2023-09-01 17:19:06 +0000 Commit: Brooks Davis CommitDate: 2023-09-01 17:23:23 +0000 UPDATING: typo fox Fixes: 2befa269b869c810b4436b7b5fe922ac3278ee5e Reported by: jrtc27 --- UPDATING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 0b1d8aeb60c5..3b056eec8227 100644 --- a/UPDATING +++ b/UPDATING @@ -28,7 +28,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20230901: - The WITH_INIT_ALL_PATTERN and WITH_INIT_ALL_ZERO build option have + The WITH_INIT_ALL_PATTERN and WITH_INIT_ALL_ZERO build options have been replaced by INIT_ALL=pattern and INIT_ALL=zero respectively. 20230824: From nobody Fri Sep 1 17:23:53 2023 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 4RclHt0hpKz4rq9X; Fri, 1 Sep 2023 17:23:54 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RclHs52KHz3dZZ; Fri, 1 Sep 2023 17:23:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693589033; 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=X1/9DQxY2QqZg7th2NhkNqWBHnJHYzCax1mvIchv9dw=; b=qV7uQ1hyRlwjZa1u1u/PmvTQMQEkot3jy9JNe/eqz3qJami8QJ/tTHTTmXpdB0UyR1IXPM yeNH0gSsWdp+R5W0I59YTGhatihM+VdkS96t3t9jntsjaXszsZLS0CLPLjNrpLxaczEQpy TJS9C/ygrv46YjGunEOt7djYDJIrIL1TgjOYeYwGCGLDl0atxK/ZpBqqMVWlP4ZK8Bf3ct jOU72mqTfIRP9sUkAjk3tW3pYgLoL7ou31mB+z5YbcyoDYB4piFG7xaBouSiFToVoeegF0 w0wBv/f30JutPuyK/o0wSyi2knaX0KfVgGiH6EVuw81oP/l424xZrwMi5vcdYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693589033; a=rsa-sha256; cv=none; b=rKCFCu4EbX3neAnfyGgiKOjDfmc99XM9F9jwfG2fh/wJTVVrqJzifsf3vKgQ8L3NWvf8kB sexRrmYjpfyinCBQRmmD58nXgGeCll/zTS6sPoFlgcrf4j5a+LSkwTonupa2yJ700LfdC1 4pDffJmQj0/k5zDQ5woFky3y81oxodI5O2fQfMQrZDcEdkO5g90aiEJ0fhjTTQ9NMBHkdT GwYDOXMYk2X+kJId1mRfieJYlWhC3gSa6uldztgNlILrbqwOhqs/VqZhNo+xoGYcC9j8AV mlWpE/RmkwaDhMIrsrtJZK2G9csgVUjyPLVDtHKkRTGgLxc27ghWvHq0Kfi1Nw== 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=1693589033; 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=X1/9DQxY2QqZg7th2NhkNqWBHnJHYzCax1mvIchv9dw=; b=FP/6Z6fktsWKRBg57ok6y/l24DbkUMMS5aTTs5Fvheq2+VBOP3CcQDnerIluQHB/nJ+f9Q mvIIFwUJMTLEvWm4NUqKWIJw7DmHdRFKIVfAdXKJHZilwXxfvR2PRmdz++3toCUKG1ZtIa U0l+P6B9CRSZPz+hb+mvWK5wOq4aK6mqL+gbYfIkrjtEUHEmeyQNvGZQxsrTAnvU6DMfhg vQCFKx54/e+/YdYf1q+LVc/aU7k/guCO3t+f1IoQXShjewtzZhBHFrlOZlmDKafSeuEMkd MAxsBkstHB2gQj6OqQFh+zWjeP3NcSYO7J35B1pR3oggr1JjWVfD3G01z8rFsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RclHs3zxsz18k4; Fri, 1 Sep 2023 17:23:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381HNrD2021772; Fri, 1 Sep 2023 17:23:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381HNrLx021769; Fri, 1 Sep 2023 17:23:53 GMT (envelope-from git) Date: Fri, 1 Sep 2023 17:23:53 GMT Message-Id: <202309011723.381HNrLx021769@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: a8ae129e6ee9 - main - LIBC_MALLOC: description typo fix 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a8ae129e6ee966b1b56220c7b42116458eecac12 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=a8ae129e6ee966b1b56220c7b42116458eecac12 commit a8ae129e6ee966b1b56220c7b42116458eecac12 Author: Brooks Davis AuthorDate: 2023-09-01 17:19:25 +0000 Commit: Brooks Davis CommitDate: 2023-09-01 17:23:33 +0000 LIBC_MALLOC: description typo fix Fixes: 09e32b2fddf5f673f76e2fffa415a73d99a6f309 Reported by: jrtc27 --- tools/build/options/LIBC_MALLOC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build/options/LIBC_MALLOC b/tools/build/options/LIBC_MALLOC index ee1883f3ee54..5a72f7730fc7 100644 --- a/tools/build/options/LIBC_MALLOC +++ b/tools/build/options/LIBC_MALLOC @@ -1,6 +1,6 @@ Specify the .Xr malloc 3 -implementaiton used by libc. +implementation used by libc. The default value is .Li jemalloc . Valid values are: From nobody Fri Sep 1 17:23:54 2023 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 4RclHv3gCZz4rqKV; Fri, 1 Sep 2023 17:23:55 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RclHt67dxz3dRR; Fri, 1 Sep 2023 17:23:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693589034; 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=1TJ+TrhphhaiGGVsvt8Cz6BN1kVCbk6/3fWiQqzS4sI=; b=UeLo0a/IISDFI0l+sChCYF6/3IUoIoPzgpER5C3JjEHl6OmHo9UhXQluUib0SQr74i9vPZ jE8Pt/KtewH7O6dodxW+KmuhI6qjYpP5p0yLhVf3wY/R6wmLCn+Wqunz/TshoXR3yPouws 95lQsikWBoCpVIWMjul5hDFq3I8C0bDfi1hze9wG9WA0F3rYDMZqOfCqycGq18FrUdju93 X4JiJ4tGi+6x38SCAJYKb9POeqgcy2PQqVkDS3KyvJ/szkbqP1Clrv5MjMmz8x2w1aaXGk ChRb1B/NRL4lpOY8YJEmnAvsem72moLd9DUifE73cTDzmGyDXvtp2erAiZLpcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693589034; a=rsa-sha256; cv=none; b=gXdQzI1JW+H8tFSVKgdTpn7uH0O1OyLswz2+2IYaFoWMySbrBq4zpmO6TdishCF4Eh9VgW w9QTIPqtD/G9Y3pu1YW619pFZNzQHxwTBiz9dQd4br/4v552HzsSxY6GpqdQkOrDBGPFir qA34eIrbnUE4ChzI/5wA3X3LrhGUjcO5o29V7kXqqUSvr7WZzlgeba3Dl1i1pvhuXNw7VJ a2y7JvTtByTWInzzBXV4ZjUr55Mg3mCHXrfhLWaB+iHWeo/C+ImszYnIb9tyjf4McSp6tt 9BjrTv3qs9hxXDE4Lsbllbvj24IyuZlri/AF7BdSg/1P1V3pigbu2oKMai5LQQ== 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=1693589034; 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=1TJ+TrhphhaiGGVsvt8Cz6BN1kVCbk6/3fWiQqzS4sI=; b=PoQTs0umR2zkV+ifMc2v67oHDx92MTjIbH/opDkPluqSkQbimbntfACwtBHCLKqMTp98Wc M5YwV9mVPNxjODzmdPGJTS4gbb4Ga6Du/ycJTcWW6h2OT1+DyA2Yf62PQ2ZgtgWZw9HNCA Vf1u+eXEthzXBZmCAyhQcyf0N0DxupDaMWg97nGL/NJ3Qqbk+hLU8/nU6p+k9vnfx8AuOZ /qFzY1aryEgPY5p36iMnjyFdHQPHZQmlnd12qcuubX1RRn3V0Uof5qlD5m4OzbIHGU4QRH 37nBtCJimfpX4cXbEXoVlTqFJob8tYH+z1fn9PO1bSD2bRt6o0z7ONDrlnaGgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RclHt5BdNz18Jq; Fri, 1 Sep 2023 17:23:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381HNs5N021805; Fri, 1 Sep 2023 17:23:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381HNsFS021803; Fri, 1 Sep 2023 17:23:54 GMT (envelope-from git) Date: Fri, 1 Sep 2023 17:23:54 GMT Message-Id: <202309011723.381HNsFS021803@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: a89e98ec33b3 - main - src.conf.5: regen 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a89e98ec33b3206bc208a2321dc3ca0fa99e6503 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=a89e98ec33b3206bc208a2321dc3ca0fa99e6503 commit a89e98ec33b3206bc208a2321dc3ca0fa99e6503 Author: Brooks Davis AuthorDate: 2023-09-01 17:23:14 +0000 Commit: Brooks Davis CommitDate: 2023-09-01 17:23:33 +0000 src.conf.5: regen --- share/man/man5/src.conf.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index fdbbaf70e190..ff7623b1e8d1 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1853,7 +1853,7 @@ for amd64 kernel builds due to incompatability with ifunc memset. .It Va LIBC_MALLOC Specify the .Xr malloc 3 -implementaiton used by libc. +implementation used by libc. The default value is .Li jemalloc . Valid values are: From nobody Fri Sep 1 18:18:12 2023 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 4RcmVY2RFMz4s0YS; Fri, 1 Sep 2023 18:18:13 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcmVY0Lysz4GwZ; Fri, 1 Sep 2023 18:18:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693592293; 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=Jx2mmnTTORIvDtWCWVDCjF3G22iFtJ7HhIezkstUSxo=; b=Ir2gZtmu4SGOOQs8RLVzMx4mmw81CGQZzx2bv5oZr7wL9SMIMFLyOV9RV+JurG9XW97mH/ +8v4ylBeSINtJQIeW/WN3SKjq5hIz0ToB1VIZTDVRCwC3J5IiNFgJMYCuE5pgTIemfrVgD kg5Qa3D+8IZhw49dzpsobwP51uBs84mAhbh3/8o0ww0O64HUTd/HbEnXZJAdxKIs+BdUk7 x+6AYX3ZR+iIBxZumHo0EXZCYPMoBFJaI2rSFavXux24McG6Sw5lUlNc2VD4vNv4Aai6od zKcquz+rzZaRexZPzXAIq7K1vmRnoJ7Cy0X4rQf4Kz98G67Gv5TwNhRy3ivR5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693592293; a=rsa-sha256; cv=none; b=o/DFsqT3LaL2fmScmqsnCz3Na7DejvPx+JA+70HVLvSqUFVrk563BBr/MX42Yc9slmklz8 oDDisRFSJ94faX5HR9wSHJqAuY0ZzjAR3NhQ0dVM38oUIwdO9QZNZl8hiRF02NkYiPfcOw 0niyGvS0xeZBIIdMGDn1dkTWj2IxdhVlabo8mhuKoLLNUmtltTZUByz2iHz3szabcYmGIf HK9WzP3qObLIfHdzpWP5rP9pcTGsKSeXT/RjlSBM93qVrnRVE5YEL4IJYWiaOw1uKACpXy y94fn2eVfxaUet+a6tzLsUVBdWe+V77GxpJjxUIi2p62PD9t1jce+o8YElm0sw== 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=1693592293; 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=Jx2mmnTTORIvDtWCWVDCjF3G22iFtJ7HhIezkstUSxo=; b=Zf6ZDE0C2UB4DFOjYnKZDfG7W8MSv8akMLYf3U97HWHhf5aBWAlUPT94qJwtadBTYHLQWT tfEXJOa5h0vkTpry6FJKv4SRreS58qj/9xvqbu1sEDVtDxp8ybcO5IWvzHiYQY5mQSSFMk xvcmZk7ouNhLkfYtlbTX/VeLr5FVZ6MDR/1EdHhHVWdZtgFo+VkPdET+9CI9D6odYbUSSg Vs6zOLlZtHEMnwEXY2U8NvVNnIGfrWBoxSMOtcrXhbzNECyfT5GB1099rNfCZ85JdksAAV SUBfIlKoY+R2+BKnzOVHInYFECfJ45hYDo1xHLCxkuWY2DfKAZZwMOkQLYUfHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcmVX6PtSz19jk; Fri, 1 Sep 2023 18:18:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381IICuB005376; Fri, 1 Sep 2023 18:18:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381IICVO005373; Fri, 1 Sep 2023 18:18:12 GMT (envelope-from git) Date: Fri, 1 Sep 2023 18:18:12 GMT Message-Id: <202309011818.381IICVO005373@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: b2a48c3cf86d - main - pf: retire pf_krule_to_rule and pf_kpool_to_pool 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b2a48c3cf86d8593f42072c3df74f2f708fbd93b Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b2a48c3cf86d8593f42072c3df74f2f708fbd93b commit b2a48c3cf86d8593f42072c3df74f2f708fbd93b Author: Mateusz Guzik AuthorDate: 2023-09-01 18:12:41 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-01 18:18:02 +0000 pf: retire pf_krule_to_rule and pf_kpool_to_pool Discussed with: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_ioctl.c | 115 ---------------------------------------------- 1 file changed, 115 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 44ede3dea6a3..8dbc8986e7d3 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -1877,20 +1877,6 @@ pf_pooladdr_to_kpooladdr(const struct pf_pooladdr *pool, return (ret); } -static void -pf_kpool_to_pool(const struct pf_kpool *kpool, struct pf_pool *pool) -{ - bzero(pool, sizeof(*pool)); - - bcopy(&kpool->key, &pool->key, sizeof(pool->key)); - bcopy(&kpool->counter, &pool->counter, sizeof(pool->counter)); - - pool->tblidx = kpool->tblidx; - pool->proxy_port[0] = kpool->proxy_port[0]; - pool->proxy_port[1] = kpool->proxy_port[1]; - pool->opts = kpool->opts; -} - static void pf_pool_to_kpool(const struct pf_pool *pool, struct pf_kpool *kpool) { @@ -1906,107 +1892,6 @@ pf_pool_to_kpool(const struct pf_pool *pool, struct pf_kpool *kpool) kpool->opts = pool->opts; } -static void -pf_krule_to_rule(const struct pf_krule *krule, struct pf_rule *rule) -{ - - bzero(rule, sizeof(*rule)); - - bcopy(&krule->src, &rule->src, sizeof(rule->src)); - bcopy(&krule->dst, &rule->dst, sizeof(rule->dst)); - - for (int i = 0; i < PF_SKIP_COUNT; ++i) { - if (rule->skip[i].ptr == NULL) - rule->skip[i].nr = -1; - else - rule->skip[i].nr = krule->skip[i].ptr->nr; - } - - strlcpy(rule->label, krule->label[0], sizeof(rule->label)); - strlcpy(rule->ifname, krule->ifname, sizeof(rule->ifname)); - strlcpy(rule->qname, krule->qname, sizeof(rule->qname)); - strlcpy(rule->pqname, krule->pqname, sizeof(rule->pqname)); - strlcpy(rule->tagname, krule->tagname, sizeof(rule->tagname)); - strlcpy(rule->match_tagname, krule->match_tagname, - sizeof(rule->match_tagname)); - strlcpy(rule->overload_tblname, krule->overload_tblname, - sizeof(rule->overload_tblname)); - - pf_kpool_to_pool(&krule->rpool, &rule->rpool); - - rule->evaluations = pf_counter_u64_fetch(&krule->evaluations); - for (int i = 0; i < 2; i++) { - rule->packets[i] = pf_counter_u64_fetch(&krule->packets[i]); - rule->bytes[i] = pf_counter_u64_fetch(&krule->bytes[i]); - } - - /* kif, anchor, overload_tbl are not copied over. */ - - rule->os_fingerprint = krule->os_fingerprint; - - rule->rtableid = krule->rtableid; - bcopy(krule->timeout, rule->timeout, sizeof(krule->timeout)); - rule->max_states = krule->max_states; - rule->max_src_nodes = krule->max_src_nodes; - rule->max_src_states = krule->max_src_states; - rule->max_src_conn = krule->max_src_conn; - rule->max_src_conn_rate.limit = krule->max_src_conn_rate.limit; - rule->max_src_conn_rate.seconds = krule->max_src_conn_rate.seconds; - rule->qid = krule->qid; - rule->pqid = krule->pqid; - rule->nr = krule->nr; - rule->prob = krule->prob; - rule->cuid = krule->cuid; - rule->cpid = krule->cpid; - - rule->return_icmp = krule->return_icmp; - rule->return_icmp6 = krule->return_icmp6; - rule->max_mss = krule->max_mss; - rule->tag = krule->tag; - rule->match_tag = krule->match_tag; - rule->scrub_flags = krule->scrub_flags; - - bcopy(&krule->uid, &rule->uid, sizeof(krule->uid)); - bcopy(&krule->gid, &rule->gid, sizeof(krule->gid)); - - rule->rule_flag = krule->rule_flag; - rule->action = krule->action; - rule->direction = krule->direction; - rule->log = krule->log; - rule->logif = krule->logif; - rule->quick = krule->quick; - rule->ifnot = krule->ifnot; - rule->match_tag_not = krule->match_tag_not; - rule->natpass = krule->natpass; - - rule->keep_state = krule->keep_state; - rule->af = krule->af; - rule->proto = krule->proto; - rule->type = krule->type; - rule->code = krule->code; - rule->flags = krule->flags; - rule->flagset = krule->flagset; - rule->min_ttl = krule->min_ttl; - rule->allow_opts = krule->allow_opts; - rule->rt = krule->rt; - rule->return_ttl = krule->return_ttl; - rule->tos = krule->tos; - rule->set_tos = krule->set_tos; - rule->anchor_relative = krule->anchor_relative; - rule->anchor_wildcard = krule->anchor_wildcard; - - rule->flush = krule->flush; - rule->prio = krule->prio; - rule->set_prio[0] = krule->set_prio[0]; - rule->set_prio[1] = krule->set_prio[1]; - - bcopy(&krule->divert, &rule->divert, sizeof(krule->divert)); - - rule->u_states_cur = counter_u64_fetch(krule->states_cur); - rule->u_states_tot = counter_u64_fetch(krule->states_tot); - rule->u_src_nodes = counter_u64_fetch(krule->src_nodes); -} - static int pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) { From nobody Fri Sep 1 20:56:37 2023 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 4Rcr1K46M7z4rbBF; Fri, 1 Sep 2023 20:56:37 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rcr1K3XPVz4fNj; Fri, 1 Sep 2023 20:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693601797; 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=VR6oS9Of05Se3BULUTrcUhDVWTPkwI7nxx8ShsNsq8w=; b=aILwFIfrzIanlS7KEAURXkp3tjA2F3pFjZPH9IFgdWoBMQfJUyE+uxdLHhPPoIfu/NP1hw LoX894HV0TX2vDeVh9LDx2w6lNo5KB9IH87i7kMfxEt4PLzZDkYVgJ02kYSmWFxvPFlMn/ bZy/fpllw/gPnrPG+SvivqpfS3V4ByoUHRGxcA9CNFbLK8n/gslOeYtzH0NHe9M76gYUsz Gpdo3u2MqPL8aZGcL/GuY8Jx/4+wd2ZhcMX13uZepxAVKQW4GFSexN57aLn9NkT6nEi44R m6yQyfupWdBnph+fuKJbRPSiQglRO+8K4t4p+humByEO3TWCXs3XAyODX46HWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693601797; a=rsa-sha256; cv=none; b=t6aChL/3A9GkzMuLhA7XAi7MrvvhVh1OY5vIyp9UfKHK5kGui6jYcxttww6rZP7UXQaRH0 +cwAYjYurE+kVY/piUBYKincKtLL4c1ol7FpVFoSK2QeHdQGKuPM9z0Ma+gZjJfTk4JvND 8WeXU2nDCMtui7+vFXRssRwLdWEfV+digX6PsJjDe4ahUv8hEJ9a20Pb/fU5cP/KxNZPDp vkidS+PWi/1R3iu0tG3QguchOC5nCFIoSqfObNTJ/KQxM460vgsRcFPPId+ZU1LKbHl5MS Dj1ZN/A1+oK84kZ1DnqQuqIz78l8tgzf55eHWN+6gKAa5KNU4Vu1H+Sckkd+RQ== 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=1693601797; 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=VR6oS9Of05Se3BULUTrcUhDVWTPkwI7nxx8ShsNsq8w=; b=WR9Ti6PFB9Hun9AQWLkl9NCrP1WwaUHeRSkcFHraz/MYihXoRhDdFPOJHndsvQ9o/rOS9L qAdqoktAASgsPwn9qnI3XmLAOs9gOV7jI1cV0Vut0wz96XhanK1cKPUbNA1hbDTrL0u2rN 1F5nVvuxox/9AEYTjLsQKFN2B0nLo23zjQ4vSyNWeVnRF9Oq1RQVJjvPZ/wukiAj8ZPxOl EMKVZV/XXF82LjoE8b1cJYe2ID0gdOpEdUtRUb/1p73frzGSrWZ6mB4fL/ryOKj4mqtw9M 3zbWtxJ3VCyjIY0GCHJBXFXMbf5RciZnlWO3i9sf5QYcnU4joKnN31cVPjXthg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rcr1K2ZyTz1LR; Fri, 1 Sep 2023 20:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381Kub6s068969; Fri, 1 Sep 2023 20:56:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381KubPa068965; Fri, 1 Sep 2023 20:56:37 GMT (envelope-from git) Date: Fri, 1 Sep 2023 20:56:37 GMT Message-Id: <202309012056.381KubPa068965@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 5a57401e7106 - main - libc: Fix fmemopen(3) prototype in fopen(3) man page. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a57401e7106132b61b16e34365cebf52b773007 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5a57401e7106132b61b16e34365cebf52b773007 commit 5a57401e7106132b61b16e34365cebf52b773007 Author: Dag-Erling Smørgrav AuthorDate: 2023-09-01 20:56:17 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-01 20:56:26 +0000 libc: Fix fmemopen(3) prototype in fopen(3) man page. While here, also update a mention of ANSI C. Sponsored by: Klara, Inc. Reviewed by: kevans, markj Differential Revision: https://reviews.freebsd.org/D41686 --- lib/libc/stdio/fopen.3 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/libc/stdio/fopen.3 b/lib/libc/stdio/fopen.3 index 74da88efff0f..7012e565d7fe 100644 --- a/lib/libc/stdio/fopen.3 +++ b/lib/libc/stdio/fopen.3 @@ -31,7 +31,7 @@ .\" .\" @(#)fopen.3 8.1 (Berkeley) 6/4/93 .\" -.Dd May 1, 2020 +.Dd September 1, 2023 .Dt FOPEN 3 .Os .Sh NAME @@ -51,7 +51,7 @@ .Ft FILE * .Fn freopen "const char *path" "const char *mode" "FILE *stream" .Ft FILE * -.Fn fmemopen "void *restrict *buf" "size_t size" "const char * restrict mode" +.Fn fmemopen "void * restrict buf" "size_t size" "const char * restrict mode" .Sh DESCRIPTION The .Fn fopen @@ -144,8 +144,10 @@ Reads and writes may be intermixed on read/write streams in any order, and do not require an intermediate seek as in previous versions of .Em stdio . This is not portable to other systems, however; -.Tn ANSI C -requires that +.St -isoC +and +.St -p1003.1 +both require that a file positioning function intervene between output and input, unless an input operation encounters end-of-file. .Pp From nobody Fri Sep 1 20:57:13 2023 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 4Rcr22197zz4rb80; Fri, 1 Sep 2023 20:57:14 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rcr216QTfz4g1W; Fri, 1 Sep 2023 20:57:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693601833; 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=sQ1BaM7KrCkd1aYaYWL4M4JWCTB9DGuMW5Tgzcfdn3M=; b=iXXO5snfGN4rNp9Q/xh7i9EAeu6B1HYu2DahiX5phgN8gG9tD+bQ9Wk4ruUsuumczpDwIZ 5VP4C+JvH4XW6/WOYf2YdvSlZGaxtRs+WxqirGA2dd/tNGxRoL/noDE+wPlrQpTYH/d8RT SG4cZrBqai4SfkVZ/vmf1nEPahUVrDwN+ne0EIXY5ZHAuqK+mCTzk5/VybzpIvGBg6S3Yf HAQfoqOrIyNFDANuf6/Qa/YmeNAg2czm2DAwe9oVKPUpqj8Ip7POIZHEeZBCznV1wglmP5 6CccoEQDU0L0Bdd0HP9B9EwYOcX7oRQcAi9oRv0Z8bDf+KvwwmBWmmxQ5hEzRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693601833; a=rsa-sha256; cv=none; b=wD+kFdr/OShjCqAhQ7cPmuwvrWbT3fZLxQUBuSegGv+Y1j35oeSAqj2dBM/0if8PakPZs8 tiFl0wiGQyRUrO7w3XkpLSDTaUeb9A2f+Z72lnCufg0ab/NRIoo860ZnPpHkYX5xYRgMoA UkCtQQqboIg/mYeMDMCYfuYeiNzHQ9qdLQEO4xlhnLfM8wDiAxFc5KSXNDBUuYSlEVd1wU LN1wuIn2N38ShS/3nqbZGPMQwQuGBATYY1Gxm0Qg81yns9c3ijPCWY4f/OKW6awbVA9xih sFC+J6oPa6P1DZuvAl8QCD3AADFpp+ky/WO7pGE0zZIxyxgD5Ykz6bmmVHD1Dg== 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=1693601833; 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=sQ1BaM7KrCkd1aYaYWL4M4JWCTB9DGuMW5Tgzcfdn3M=; b=fjrliCTOYcQTWtL8tyS00D4tUFEhpGbBpG/2EK/Y4v+O3vQujCtKgK36PH56Do77zACQe2 h8Fek77U4TedmnQ5IROecAq5a7GZjaobC8tLawvFeTh9n3kj5FLdRvdsjTlK3K6cSngPy5 HRVhApHnxpK4cpbDRkTreMs1+2i2HoCPWiYjqx79X9WCfw0/BNBRyji1B2fi2jo3RRb0EP iybd32DQV1OS3oN13e0WJKKky+7E2wKr6Q1/KgV+ZTpXLbGwdUTO3zVWN4Q/8nsMiT6F+t iVIf8adtWOxWo1nvIK0b4uWqCBabt0RzKxxCfBflED/KPUb74wdoFhYI8+HyOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rcr215Tlrz1jb; Fri, 1 Sep 2023 20:57:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381KvDV3069205; Fri, 1 Sep 2023 20:57:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381KvDD6069203; Fri, 1 Sep 2023 20:57:13 GMT (envelope-from git) Date: Fri, 1 Sep 2023 20:57:13 GMT Message-Id: <202309012057.381KvDD6069203@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: b7000cadfbf3 - main - scandir.3: Fix several typos 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7000cadfbf312b6a8acff6b7a3bbbbe55509565 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b7000cadfbf312b6a8acff6b7a3bbbbe55509565 commit b7000cadfbf312b6a8acff6b7a3bbbbe55509565 Author: Trond Endrestøl AuthorDate: 2023-09-01 20:48:16 +0000 Commit: Mark Johnston CommitDate: 2023-09-01 20:57:03 +0000 scandir.3: Fix several typos PR: 273480 Reviewed by: markj MFC after: 1 week --- lib/libc/gen/scandir.3 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/scandir.3 b/lib/libc/gen/scandir.3 index e6d1fb38c2b1..033042acbb05 100644 --- a/lib/libc/gen/scandir.3 +++ b/lib/libc/gen/scandir.3 @@ -48,9 +48,9 @@ .Fa "int \*(lp*select\*(rp\*(lpconst struct dirent *\*(rp" .Fa "int \*(lp*compar\*(rp\*(lpconst struct dirent **, const struct dirent **\*(rp" .Fc -.Ft +.Ft int .Fo scandirat -.Fa int dirfd +.Fa "int dirfd" .Fa "const char *dirname" .Fa "struct dirent ***namelist" .Fa "int \*(lp*select\*(rp\*(lpconst struct dirent *\*(rp" @@ -60,7 +60,7 @@ .Fo scandir_b .Fa "const char *dirname" .Fa "struct dirent ***namelist" -.Fa "int \*(lp*select\^(rp\*(lpconst struct dirent *\*(rp" +.Fa "int \*(lp^select\*(rp\*(lpconst struct dirent *\*(rp" .Fa "int \*(lp^compar\*(rp\*(lpconst struct dirent **, const struct dirent **\*(rp" .Fc .Ft int @@ -186,7 +186,6 @@ functions appeared in The .Fn scandirat and -.Fn -versionsort +.Fn versionsort functions were added in .Fx 13.2 . From nobody Fri Sep 1 21:19:14 2023 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 4RcrWR5S16z4rgHl; Fri, 1 Sep 2023 21:19:15 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcrWR0s6yz4jX6; Fri, 1 Sep 2023 21:19:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693603155; 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=BXKna/EJrsUsR1cuZPzyUP/qcTNSRjwwQxFoPVZc2nA=; b=hYPu21JPKKFX45yHbEdYlK5W4AMjsNVPy/pW6uoVqEFVoBxkoJISxkndGSHz4TKdG8PHK5 RJNbV1Twk16OZ/eRtc/lsAEVBvQqBXzrmHrxpmDVLONnX6KM30UTKhCh70bUcdjPNL0anr VoOWOYGUYJfIBLOCzKtKoGs16M8h+/KV981KPXH6vj0YOI3JNDWNxnPs5zArmUW00MA0zO CwmtXzNSrxNu9gJqZkZrBXE91+hzPwQsYCwElQNxCFRv6n8/xpkMo6FgROtSNYXRWlu4hZ uGWeS1bxGgZZUEg1Gm+b0wNybMI9BxtxR4kVEsRDkgExPeYKCGqg7ViRqe98dA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693603155; a=rsa-sha256; cv=none; b=YTq1y2OPIebMfhclGrBcaPCC6QEDdJOKDqptN8KkrBZ9k5wCImBspgYsC2269MJz4kZQkz oEaGcL2W20xywTqGbPRVEjMABf9nUfM0BILcEZVKV8u6eosnx6TmNHLuGZ0BkLzmMAZ4yd 2hXBPqm10oa9Js5p2+b6xXC3vfGGHJuHgTE8sx6UBC9bIb+IJJVgxWF0hX5Y49YJHxlQ7P iaFe2y2DdClOQKcBfbr+fpVn4PxWT4cTvKvNiWFAai1fq92vzV0xGKGc2UjFGtLkDD5PNS 3ctZXF3bGDXccDVmaheEM9h/VEgiQVYNPi/6jmBPnF8nlIiENddZAlxWN+oNnw== 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=1693603155; 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=BXKna/EJrsUsR1cuZPzyUP/qcTNSRjwwQxFoPVZc2nA=; b=Vzw82aIuJfgYsE+HJL/+9KuiyNVPV8U5p6lKMmPTkoDVxKHsRBurvoIswcuBNov+IyzcFu Lm6SPHoGRia/XM0BJq1/K5/xFdhTBi/LOjoIiKBcYQaGlLUrIwACGnirshAYtxUhcqN2fy NC4wl0xf6uyJk1TYZ1gPN3rPobODXylF8OqhNo4PS8TY3e/TqpmRmCDoLVi2L9WWALrUSn wjnpwGh+9E1KgDtpdkVZoyVl362FMmsnDVhBZXUDCkyds21VXtYei1zAHnBcFN0+rgjOkq e8sUWnQYg6+1drLFYTgT51PVvFy1baVQsEAyRoog6aKgQ9Jkb+A5zt9ZMqv9UA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RcrWQ6jbdz239; Fri, 1 Sep 2023 21:19:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381LJE3H004092; Fri, 1 Sep 2023 21:19:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381LJE9i004089; Fri, 1 Sep 2023 21:19:14 GMT (envelope-from git) Date: Fri, 1 Sep 2023 21:19:14 GMT Message-Id: <202309012119.381LJE9i004089@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 7063f94283af - main - pci_iov: Refuse to create VFs which require ARI if ARI is not available 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org 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: 7063f94283af60818429a0c2d70e80ae4ad5c146 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7063f94283af60818429a0c2d70e80ae4ad5c146 commit 7063f94283af60818429a0c2d70e80ae4ad5c146 Author: John Baldwin AuthorDate: 2023-09-01 21:18:30 +0000 Commit: John Baldwin CommitDate: 2023-09-01 21:18:38 +0000 pci_iov: Refuse to create VFs which require ARI if ARI is not available If a parent downstream port doesn't support ARI, the code would try to create VFs anyway but then all PCI config space access to those VFs would fail. Tested by: np Sponsored by: Chelsio Communications --- sys/dev/pci/pci_iov.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/pci_iov.c b/sys/dev/pci/pci_iov.c index db7210cb729a..ff3ac0e64271 100644 --- a/sys/dev/pci/pci_iov.c +++ b/sys/dev/pci/pci_iov.c @@ -435,7 +435,7 @@ out: * affects all PFs on the device. */ static int -pci_iov_set_ari(device_t bus) +pci_iov_set_ari(device_t bus, bool *ari_enabled) { device_t lowest; device_t *devlist; @@ -443,8 +443,10 @@ pci_iov_set_ari(device_t bus) uint16_t iov_ctl; /* If ARI is disabled on the downstream port there is nothing to do. */ - if (!PCIB_ARI_ENABLED(device_get_parent(bus))) + if (!PCIB_ARI_ENABLED(device_get_parent(bus))) { + *ari_enabled = false; return (0); + } error = device_get_children(bus, &devlist, &devcount); @@ -480,6 +482,7 @@ pci_iov_set_ari(device_t bus) device_printf(lowest, "failed to enable ARI\n"); return (ENXIO); } + *ari_enabled = true; return (0); } @@ -683,6 +686,7 @@ pci_iov_config(struct cdev *cdev, struct pci_iov_arg *arg) uint16_t iov_ctl; uint16_t num_vfs, total_vfs; int iov_inited; + bool ari_enabled; mtx_lock(&Giant); dinfo = cdev->si_drv1; @@ -713,7 +717,7 @@ pci_iov_config(struct cdev *cdev, struct pci_iov_arg *arg) if (error != 0) goto out; - error = pci_iov_set_ari(bus); + error = pci_iov_set_ari(bus, &ari_enabled); if (error != 0) goto out; @@ -736,6 +740,11 @@ pci_iov_config(struct cdev *cdev, struct pci_iov_arg *arg) goto out; } + if (!ari_enabled && PCI_RID2SLOT(last_rid) != 0) { + error = ENOSPC; + goto out; + } + iov_ctl = IOV_READ(dinfo, PCIR_SRIOV_CTL, 2); iov_ctl &= ~(PCIM_SRIOV_VF_EN | PCIM_SRIOV_VF_MSE); IOV_WRITE(dinfo, PCIR_SRIOV_CTL, iov_ctl, 2); From nobody Fri Sep 1 22:53:41 2023 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 4RctcQ0FQJz4rrNb; Fri, 1 Sep 2023 22:53:42 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RctcP6rZWz4v8q; Fri, 1 Sep 2023 22:53:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693608822; 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=UHlNwrUafCDu89QJlbFbr+QtucsD50PfYzQrFgbmuzg=; b=DYpH1xTzIYGHW+5CQGtChYPo7I/LxcmaMLnyVBhpuWSvzKKRL8hcfc8VJTnbG0/2AxqxNt HPfHiVwvD66ZKLDJZAujG4CPKx/GNQe0YPR1awqpyDwAe8gP4qo6KyqBIYpxkE8PABpfbL E/Tms4SwN+XzWJThbDSkZukSqPVxebN21MZ+fSuUBUwQKHtcy+PX051t/KhMyHwO2adUF4 ek5pJFA7nZk9FVKa5v7Jzcv71PF/6TO396k6n894tnK/wglXfP/dlrObNDpXrxgyoGBFzm 0INPVhEDcSW6oXOwyKl6w0+nAdnYpaLHGVJ+Vx7QDOTMXeIiClcGk/eoL4eE1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693608822; a=rsa-sha256; cv=none; b=l/f6nE6QsLpmjA1JrSPskZcSPvl74CcOyf4kxBAEKSPDFQEllbOPviq9iMQVzR/aMOfCJ/ jznZSIR9ioni9B59WbrXpsyilEm6Hiwa4F6pKmCIseyAsXaJrdJKIIjukRmqL2xHG+7Ycz wUX6v3DMLC65RJA5btVbj/PybSy1nTq+Kzhwv48iKw6Me71576ybd5AE5hY3k89V8SVw4f +KACKh7KGX27X21yI6XxnIeZRP3LszkUVZrpfblwVuIBFvuGF5kqhE8zPhJemhj/tJAUK/ FBNrdbCa6xRdmyJbDUjrB4s4jOr5U62jkbUiCtH4Aq8fIOisK68BLrjLRD2O1A== 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=1693608822; 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=UHlNwrUafCDu89QJlbFbr+QtucsD50PfYzQrFgbmuzg=; b=i+MwfoerIDZ+RLUSM+Ne87iNbXUnvlcBs9IuI5QcbLUpUeiXHVd98mRzd9KaFHYGFU8iBM oyKnhS/R/4rQDuN7unoV/yV1BMsJgczVRsk/LXp4Jx+rWlbWC55l9Iq/ifWPRDoEyXMzas 5thI45QaeKmxfsrSMct2D6SlID5GOl/79AtDInCkeALAXeEo4xIwrM65N4rAQClZ3B22Z2 b3geaqZwBjajbZCCYyrgtwge4Vb3ZgbIZX4i49iXn5LWNeZtQWhWOf755g+8y7fbSoZXzS 27Z7884Xhqq6rxp2YLUbrPuGWFlJUxUi5g+xYpdb/4TwmU/NF8b/BDaiDWv7OQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RctcP5t5nz4Bx; Fri, 1 Sep 2023 22:53:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381MrfUU067693; Fri, 1 Sep 2023 22:53:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381MrfOo067690; Fri, 1 Sep 2023 22:53:41 GMT (envelope-from git) Date: Fri, 1 Sep 2023 22:53:41 GMT Message-Id: <202309012253.381MrfOo067690@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: c9f5889d05b5 - main - libc: Further nit in fopen(3) man page. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c9f5889d05b5854be033849a4ff9985699071548 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c9f5889d05b5854be033849a4ff9985699071548 commit c9f5889d05b5854be033849a4ff9985699071548 Author: Dag-Erling Smørgrav AuthorDate: 2023-09-01 22:53:27 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-01 22:53:35 +0000 libc: Further nit in fopen(3) man page. Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D41687 --- lib/libc/stdio/fopen.3 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdio/fopen.3 b/lib/libc/stdio/fopen.3 index 7012e565d7fe..6f03443caf42 100644 --- a/lib/libc/stdio/fopen.3 +++ b/lib/libc/stdio/fopen.3 @@ -248,9 +248,10 @@ byte. .Sh RETURN VALUES Upon successful completion .Fn fopen , -.Fn fdopen -and +.Fn fdopen , .Fn freopen +and +.Fn fmemopen return a .Tn FILE pointer. From nobody Fri Sep 1 22:55:49 2023 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 4Rctfs5Gn6z4rrXb; Fri, 1 Sep 2023 22:55:49 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rctfs4jdRz3BpS; Fri, 1 Sep 2023 22:55:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693608949; 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=gO7GJazsnaAH34DMmhV+5OTSntLjm/wtTGB/7RORcd8=; b=NuqEFH636jH1yRbct/DVcLuWGyciIq/JaJNgCKT1qDncMBT8krGSEXm3cgt+jPKQ1AXRxI himrrpSbxLquGVLmRSe10FQJ4HIS0TJ62ZCvkzrECO2q3IPmYQahLgjmSzdh4vI4CcJkfx YdsTDJbZFbiZFr9l1dkFzsSdy4gPb6h1t58IbnBDD9xLbbtO1b88+PlL7MgVW0KkvlR5Fu W7xiFnC3PPO7i6PL5MHcw6o9NRLHq1zpTcfwSe5D6YMlqmJkzLkBJPgG1M0l8sYHZb3Svw 2aSskKPJjjCSyYBWJa2PbIGOChamW6rHxz1XqxReuPUpommuRCxXGPfJtWqb5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693608949; a=rsa-sha256; cv=none; b=tozD7LNbrZmJXzEAoTME4zLWI2T9QCR/Eg+9S6yVCj5IpiwhnxgxoJyZPTo5jrjaJuirS1 qWSUz4WJIXh82VLtGyYxqerG7wOE4FZ1uzZVXc13C5g6X/vU/z5FkmhYrgbexTmsFeyGJ+ TY8+wy5i1lzGh3tYEcoLpl8eWqh0x5aJ76Px8WFltUOdamL6/C0OOIh1Jh0OlVhlMndyVv VWNEvPH2cYmpUZwx4wZnse1wHa3yxEgN8rZAeiwIkjh3+Jz4uH481Y768D4tIrjgxl8s8F mifiM6ZPRBpYOv+Hd0Hh0Ko/lkT2oqIgC8ictujehpcjmzmqBLqtQfn0pMlAog== 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=1693608949; 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=gO7GJazsnaAH34DMmhV+5OTSntLjm/wtTGB/7RORcd8=; b=rlMK/RGNr2cDirMBQmj+Q2HobZY+ZVcpRltja7ijVV8bJvqraqHeFZZJ7lpMXP5DTu4xpv mCXLS4wJYCZQl0B5I9bGZzIIGGjyWKZ86E3sLlqQJabdGocAaLVndNUC8MwVbgo33Bv3pf sVCv34zm2/txHzRqjOreXGILUcL2HI0Cc39jvnXFokTR4o4s6VTWnDX/2S51E8R9ZBkzjX NF6xceUpQFD3P0BpOYguid2et47IyjcF7H7yrGkxIi6B1c2+awPDWszrN8L7r6zN71ej4c BleWohQFyiWtS1p7qMr6n/0YptIG6SdSL1Sm1tNenO3Ct61H2nXNGPyEK2VAqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rctfs3n1yz488; Fri, 1 Sep 2023 22:55:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381MtnIc068111; Fri, 1 Sep 2023 22:55:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381Mtnnn068108; Fri, 1 Sep 2023 22:55:49 GMT (envelope-from git) Date: Fri, 1 Sep 2023 22:55:49 GMT Message-Id: <202309012255.381Mtnnn068108@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 4a9cd9fc22d7 - main - amd64 db_trace: Reject unaligned frame pointers 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org 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: 4a9cd9fc22d7f87a27ccd3d41b93a0356cd7061c Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4a9cd9fc22d7f87a27ccd3d41b93a0356cd7061c commit 4a9cd9fc22d7f87a27ccd3d41b93a0356cd7061c Author: John Baldwin AuthorDate: 2023-09-01 22:55:05 +0000 Commit: John Baldwin CommitDate: 2023-09-01 22:55:37 +0000 amd64 db_trace: Reject unaligned frame pointers Switch to using db_addr_t to hold frame pointer values until they are verified to be suitably aligned. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D41532 --- sys/amd64/amd64/db_trace.c | 127 ++++++++++++++++++++++++--------------------- 1 file changed, 68 insertions(+), 59 deletions(-) diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c index 14bd893b6cc4..f9a0c2b6a03e 100644 --- a/sys/amd64/amd64/db_trace.c +++ b/sys/amd64/amd64/db_trace.c @@ -121,17 +121,14 @@ db_frame(struct db_variable *vp, db_expr_t *valuep, int op) #define INTERRUPT 2 #define SYSCALL 3 -static void db_nextframe(struct amd64_frame **, db_addr_t *, struct thread *); -static void db_print_stack_entry(const char *, db_addr_t, void *); - static void -db_print_stack_entry(const char *name, db_addr_t callpc, void *frame) +db_print_stack_entry(const char *name, db_addr_t callpc, db_addr_t frame) { db_printf("%s() at ", name != NULL ? name : "??"); db_printsym(callpc, DB_STGY_PROC); - if (frame != NULL) - db_printf("/frame 0x%lx", (register_t)frame); + if (frame != 0) + db_printf("/frame %#lx", frame); db_printf("\n"); } @@ -139,17 +136,20 @@ db_print_stack_entry(const char *name, db_addr_t callpc, void *frame) * Figure out the next frame up in the call stack. */ static void -db_nextframe(struct amd64_frame **fp, db_addr_t *ip, struct thread *td) +db_nextframe(db_addr_t *fp, db_addr_t *ip, struct thread *td) { struct trapframe *tf; + db_addr_t tf_addr; int frame_type; long rip, rsp, rbp; db_expr_t offset; c_db_sym_t sym; const char *name; - rip = db_get_value((long) &(*fp)->f_retaddr, 8, FALSE); - rbp = db_get_value((long) &(*fp)->f_frame, 8, FALSE); + rip = db_get_value(*fp + offsetof(struct amd64_frame, f_retaddr), 8, + FALSE); + rbp = db_get_value(*fp + offsetof(struct amd64_frame, f_frame), 8, + FALSE); /* * Figure out frame type. We look at the address just before @@ -193,50 +193,55 @@ db_nextframe(struct amd64_frame **fp, db_addr_t *ip, struct thread *td) * Normal frames need no special processing. */ if (frame_type == NORMAL) { - *ip = (db_addr_t) rip; - *fp = (struct amd64_frame *) rbp; + *ip = rip; + *fp = rbp; return; } - db_print_stack_entry(name, rip, &(*fp)->f_frame); + db_print_stack_entry(name, rip, *fp); /* * Point to base of trapframe which is just above the * current frame. */ - tf = (struct trapframe *)((long)*fp + 16); - - if (INKERNEL((long) tf)) { - rsp = tf->tf_rsp; - rip = tf->tf_rip; - rbp = tf->tf_rbp; - switch (frame_type) { - case TRAP: - db_printf("--- trap %#r", tf->tf_trapno); - break; - case SYSCALL: - db_printf("--- syscall"); - db_decode_syscall(td, tf->tf_rax); - break; - case INTERRUPT: - db_printf("--- interrupt"); - break; - default: - panic("The moon has moved again."); - } - db_printf(", rip = %#lr, rsp = %#lr, rbp = %#lr ---\n", rip, - rsp, rbp); + tf_addr = *fp + 16; + + if (!__is_aligned(tf_addr, _Alignof(*tf)) || !INKERNEL(tf_addr)) { + db_printf("--- invalid trapframe %p\n", (void *)tf_addr); + *ip = 0; + *fp = 0; + return; } + tf = (struct trapframe *)tf_addr; + + rsp = tf->tf_rsp; + rip = tf->tf_rip; + rbp = tf->tf_rbp; + switch (frame_type) { + case TRAP: + db_printf("--- trap %#r", tf->tf_trapno); + break; + case SYSCALL: + db_printf("--- syscall"); + db_decode_syscall(td, tf->tf_rax); + break; + case INTERRUPT: + db_printf("--- interrupt"); + break; + default: + __assert_unreachable(); + } + db_printf(", rip = %#lr, rsp = %#lr, rbp = %#lr ---\n", rip, rsp, rbp); - *ip = (db_addr_t) rip; - *fp = (struct amd64_frame *) rbp; + *ip = rip; + *fp = rbp; } static int __nosanitizeaddress __nosanitizememory -db_backtrace(struct thread *td, struct trapframe *tf, struct amd64_frame *frame, +db_backtrace(struct thread *td, struct trapframe *tf, db_addr_t frame, db_addr_t pc, register_t sp, int count) { - struct amd64_frame *actframe; + db_addr_t actframe; const char *name; db_expr_t offset; c_db_sym_t sym; @@ -270,7 +275,7 @@ db_backtrace(struct thread *td, struct trapframe *tf, struct amd64_frame *frame, * jumped to a bogus location, so try and use * the return address to find our caller. */ - db_print_stack_entry(name, pc, NULL); + db_print_stack_entry(name, pc, 0); pc = db_get_value(sp, 8, FALSE); if (db_search_symbol(pc, DB_STGY_PROC, &offset) == C_DB_SYM_NULL) @@ -282,20 +287,20 @@ db_backtrace(struct thread *td, struct trapframe *tf, struct amd64_frame *frame, instr = db_get_value(pc, 4, FALSE); if ((instr & 0xffffffff) == 0xe5894855) { /* pushq %rbp; movq %rsp, %rbp */ - actframe = (void *)(tf->tf_rsp - 8); + actframe = tf->tf_rsp - 8; } else if ((instr & 0xffffff) == 0xe58948) { /* movq %rsp, %rbp */ - actframe = (void *)tf->tf_rsp; + actframe = tf->tf_rsp; if (tf->tf_rbp == 0) { /* Fake frame better. */ frame = actframe; } } else if ((instr & 0xff) == 0xc3) { /* ret */ - actframe = (void *)(tf->tf_rsp - 8); + actframe = tf->tf_rsp - 8; } else if (offset == 0) { /* Probably an assembler symbol. */ - actframe = (void *)(tf->tf_rsp - 8); + actframe = tf->tf_rsp - 8; } } else if (name != NULL && strcmp(name, "fork_trampoline") == 0) { @@ -312,20 +317,24 @@ db_backtrace(struct thread *td, struct trapframe *tf, struct amd64_frame *frame, if (actframe != frame) { /* `frame' belongs to caller. */ - pc = (db_addr_t) - db_get_value((long)&actframe->f_retaddr, 8, FALSE); + pc = db_get_value(actframe + + offsetof(struct amd64_frame, f_retaddr), 8, FALSE); continue; } db_nextframe(&frame, &pc, td); - - if (INKERNEL((long)pc) && !INKERNEL((long)frame)) { - sym = db_search_symbol(pc, DB_STGY_ANY, &offset); - db_symbol_values(sym, &name, NULL); - db_print_stack_entry(name, pc, frame); + if (frame == 0) break; - } - if (!INKERNEL((long) frame)) { + + if (!__is_aligned(frame, _Alignof(struct amd64_frame)) || + !INKERNEL(frame)) { + if (INKERNEL(pc)) { + sym = db_search_symbol(pc, DB_STGY_ANY, + &offset); + db_symbol_values(sym, &name, NULL); + db_print_stack_entry(name, pc, frame); + break; + } break; } } @@ -336,14 +345,14 @@ db_backtrace(struct thread *td, struct trapframe *tf, struct amd64_frame *frame, void db_trace_self(void) { - struct amd64_frame *frame; - db_addr_t callpc; + db_addr_t callpc, frame; register_t rbp; __asm __volatile("movq %%rbp,%0" : "=r" (rbp)); - frame = (struct amd64_frame *)rbp; - callpc = (db_addr_t)db_get_value((long)&frame->f_retaddr, 8, FALSE); - frame = frame->f_frame; + callpc = db_get_value(rbp + offsetof(struct amd64_frame, f_retaddr), 8, + FALSE); + frame = db_get_value(rbp + offsetof(struct amd64_frame, f_frame), 8, + FALSE); db_backtrace(curthread, NULL, frame, callpc, 0, -1); } @@ -355,8 +364,8 @@ db_trace_thread(struct thread *thr, int count) ctx = kdb_thr_ctx(thr); tf = thr == kdb_thread ? kdb_frame : NULL; - return (db_backtrace(thr, tf, (struct amd64_frame *)ctx->pcb_rbp, - ctx->pcb_rip, ctx->pcb_rsp, count)); + return (db_backtrace(thr, tf, ctx->pcb_rbp, ctx->pcb_rip, ctx->pcb_rsp, + count)); } void From nobody Sat Sep 2 05:59:43 2023 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 4Rd4401S7Lz4rvL9; Sat, 2 Sep 2023 05:59:44 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rd43z6QPnz4ZR8; Sat, 2 Sep 2023 05:59:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693634383; 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=NdEwjlkMYkFJv8qhfEwvfGDvtYzU5ZRXBkLHh7gqBxU=; b=kX0piMOnFeHYK9sZBGCsADBILKxy0HAe8ZxH/1NKo0FyHTC64cVFwb8DRNrzCR/bQlckU0 AMUY9d30su4GIq0HVf61nar3XVgmBMd7FpSKdLP7/nuHve7OH//1qE6coXOU5zjcRs1Sr+ ZRhCtHtknsTUxm/sV//eDsTDPXx6UZ/yhWAmY49bGw1wSK1y59CpXkUQt9a1g2l7DYfSZy zlsWo/6y8UWJhhbi7XU4JxGvmXi3o0u+FTuhU6iJbRZPoeeWpP46CD6wmJBLiKzmQwstnm 7pU6dmFpOESXMzhZg4Po/5ZJtLl0Vw9cUJdyuYZxxr2z13ttbgKwTuq+w/ixvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693634383; a=rsa-sha256; cv=none; b=IQQZSS1vlBDiNSBpgouKKiOzbg49/LFRV9hw8RAVFPG5UzHmwj86J52Cym7Cms1e3cFO2f 0ma64VfYoSuTsURm/pTIdI3M8WuKbCqInU41LHq15MBGDRY8u91rZZQTWRztXNTYbRC0Mu hqVr70KcISQuzcH8vW0u0KwlsIk7VNaCVWkkWfDuVA5AmCDUChZUhK+PeTwTL9qIFpQa6I sjWCvcqmEb69zFOYZ/tqJEyO8wuwSlVubRqvcxuk+Khr9jg0ePMHG6xaIZnCUZ+ZlEbRAg rDMLHVduT7die0Lt2nlRBEgfDOWIY6E+vZxTjOS5GSmMPm95SiCoWjgzz3N3vA== 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=1693634383; 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=NdEwjlkMYkFJv8qhfEwvfGDvtYzU5ZRXBkLHh7gqBxU=; b=GiYAH+WnCy/gIp1pLBSaPE9oY+kgWOxLCU8kUr/9N4Qxuuz9BOp0bjQ9UU3Hg7jlh81wIE TL0v20bvkgYkmJQGW9raPknEYX+WIciVZMlIyXq4219tbi0Pil+FlBRQr+F9/sJsexZe9C yaMs/zI0O0l38GvmsgKZ9kD4WwZF/LJ243sDd2MFVryqoHYaZtO2THCofDEsO3RlL5opw6 eLJj1pA32jNMW9jNzLPLozR8IhTCv3Y4RjI1VyXkFrCrAzHz2Vz4b2PQ8+SvvHFnhjBB9v 707i6Bmx4MFfuu3T7gWBjVw/IRgUMcTmLlfHULL9ZhJEWCeTn2LhXUegCnUNCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rd43z5Tb9zXRR; Sat, 2 Sep 2023 05:59:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3825xhQh064984; Sat, 2 Sep 2023 05:59:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3825xhaD064981; Sat, 2 Sep 2023 05:59:43 GMT (envelope-from git) Date: Sat, 2 Sep 2023 05:59:43 GMT Message-Id: <202309020559.3825xhaD064981@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 07bc20e4740d - main - localedef: correct definition of right-parenthesis in default charmap 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 07bc20e4740d09f554c3787bb1940fc503300822 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=07bc20e4740d09f554c3787bb1940fc503300822 commit 07bc20e4740d09f554c3787bb1940fc503300822 Author: Kyle Evans AuthorDate: 2023-09-02 05:56:31 +0000 Commit: Kyle Evans CommitDate: 2023-09-02 05:58:35 +0000 localedef: correct definition of right-parenthesis in default charmap It turns out that right parentheses do exist and are different than left parentheses, so let's switch to that. Sponsored by: Klara, Inc. --- usr.bin/localedef/charmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/localedef/charmap.c b/usr.bin/localedef/charmap.c index bc302965de1a..44b7e3292eae 100644 --- a/usr.bin/localedef/charmap.c +++ b/usr.bin/localedef/charmap.c @@ -86,7 +86,7 @@ static const struct { { "ampersand", '&' }, { "apostrophe", '\'' }, { "left-parenthesis", '(' }, - { "right-parenthesis", '(' }, + { "right-parenthesis", ')' }, { "asterisk", '*' }, { "plus-sign", '+' }, { "comma", ','}, From nobody Sat Sep 2 10:24:10 2023 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 4Rd9x64hdhz4rWkS; Sat, 2 Sep 2023 10:24:10 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rd9x64Gq9z4Mlk; Sat, 2 Sep 2023 10:24:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693650250; 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=HsAvS0gVgSncw02o0FuLWQQL5RbkpiCj3y2+fL7dk80=; b=kogcrunDogLbjoM5JIRLeT0JNXVpFkJTDD9hney50EZfm1HAwtQmmuAhc+U1QCxiLK+tjs o/joRWo1aJ6zheVwn8dTl8QniLc4trpOefk1gL4NVklQpj+h/JhjvPs/qb0l41yiRcFA3B Nfr0qxinBplk1X6HH9Y0QG2zxbNKOUPm26gGIJKJLxc42tElsx57oGPJ0N6rkyJYCrfy+F aV3FQxXaHDjTxZjKYd4hw+eMtyWy5654ptablYYxKv8iddp7FfIdro0TwytpzMDFVBXbkd P5vLVaWsFi7N70TRzhO4soHUs5xw/+0shqHZHCb+HCgpF7E5aaQe+j2aENdjSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693650250; a=rsa-sha256; cv=none; b=d8S6Xu2XQqRoD10KKyNOCb8kVOe3Vli0yM8gb25CJph0y9tniOm0W31pfaK2/LONyuNZpL yNWpgJId61VTAtly0i7uzM+haAYop2jJOzBxKZYX5ezNvHpU3WgSFBm5YwdUwPkxrt8uUZ aWR9pwsASFtUKOJkTFRafgeK1I7nHR5wn+e1WC3m3MzPY5iTgqVR+NikSYRvw0OsxMwSR6 RxP6oamLjlwEn/QMxceiMLdfFJnYT5THUiDVXYd7+8PMcS2bNSY5iWtMeZVR/+5xzw52Ca lHxbQagWtJfKTwcw3/cKybYL86e4FCo9Z98wprY2C9Ddwh2oRL2tdtzSz3tlEw== 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=1693650250; 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=HsAvS0gVgSncw02o0FuLWQQL5RbkpiCj3y2+fL7dk80=; b=hDNPKTnMJiqjB9A6RGjPwuMub2afiHP3MuVRIq5LKDqq653KjXtTMxWrMdl360KQbMyFuH LcF52vkabUPJvhF2UtzcBrVE52kt94HK74HGuRqTLbbyf5JIV0T2m22c1iQ5F1j1feFDao XAnxLC8j4JNiKle6DrofqDFaZArNKlXjAyW5owJuKkdjSFbxbmAU2YN1oS2uizNQeNVh96 9A4W66tazjZ2EZxJl1O/cjgcVSuAzuaRThw1AlapaXYuNjHIlaLScbVojyYN3A/2yw0fgO Bqq5QdyQUcm0sv/B0dlAGsrnXWwoDm9MXNHcPpLopqwCdof+cdy4BMCffQPXow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Rd9x63M38zfvX; Sat, 2 Sep 2023 10:24:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 382AOAXm014078; Sat, 2 Sep 2023 10:24:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 382AOAYs014075; Sat, 2 Sep 2023 10:24:10 GMT (envelope-from git) Date: Sat, 2 Sep 2023 10:24:10 GMT Message-Id: <202309021024.382AOAYs014075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: f4296cfb409a - main - timerfd: convert timerfd_list_lock from sx to mtx 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4296cfb409a48de00bfa60e76f686c2b031876f Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=f4296cfb409a48de00bfa60e76f686c2b031876f commit f4296cfb409a48de00bfa60e76f686c2b031876f Author: Mateusz Guzik AuthorDate: 2023-09-02 09:55:50 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-02 09:55:50 +0000 timerfd: convert timerfd_list_lock from sx to mtx There was no good reason to use the former. This should prevent some head-scratching by an interested and qualified reader. --- sys/kern/sys_timerfd.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/kern/sys_timerfd.c b/sys/kern/sys_timerfd.c index c8b45a926b02..e4d2f10f28ef 100644 --- a/sys/kern/sys_timerfd.c +++ b/sys/kern/sys_timerfd.c @@ -61,9 +61,9 @@ static MALLOC_DEFINE(M_TIMERFD, "timerfd", "timerfd structures"); -static struct sx timerfd_list_lock; +static struct mtx timerfd_list_lock; static LIST_HEAD(, timerfd) timerfd_list; -SX_SYSINIT(timerfd, &timerfd_list_lock, "timerfd_list_lock"); +MTX_SYSINIT(timerfd, &timerfd_list_lock, "timerfd_list_lock", MTX_DEF); static struct unrhdr64 tfdino_unr; @@ -133,7 +133,7 @@ timerfd_jumped(void) return; timerfd_getboottime(&boottime); - sx_xlock(&timerfd_list_lock); + mtx_lock(&timerfd_list_lock); LIST_FOREACH(tfd, &timerfd_list, entry) { mtx_lock(&tfd->tfd_lock); if (tfd->tfd_clockid != CLOCK_REALTIME || @@ -169,7 +169,7 @@ timerfd_jumped(void) tfd->tfd_boottim = boottime; mtx_unlock(&tfd->tfd_lock); } - sx_xunlock(&timerfd_list_lock); + mtx_unlock(&timerfd_list_lock); } static int @@ -324,9 +324,9 @@ timerfd_close(struct file *fp, struct thread *td) { struct timerfd *tfd = fp->f_data; - sx_xlock(&timerfd_list_lock); + mtx_lock(&timerfd_list_lock); LIST_REMOVE(tfd, entry); - sx_xunlock(&timerfd_list_lock); + mtx_unlock(&timerfd_list_lock); callout_drain(&tfd->tfd_callout); seldrain(&tfd->tfd_sel); @@ -450,9 +450,9 @@ kern_timerfd_create(struct thread *td, int clockid, int flags) knlist_init_mtx(&tfd->tfd_sel.si_note, &tfd->tfd_lock); timerfd_getboottime(&tfd->tfd_boottim); getnanotime(&tfd->tfd_birthtim); - sx_xlock(&timerfd_list_lock); + mtx_lock(&timerfd_list_lock); LIST_INSERT_HEAD(&timerfd_list, tfd, entry); - sx_xunlock(&timerfd_list_lock); + mtx_unlock(&timerfd_list_lock); finit(fp, fflags, DTYPE_TIMERFD, tfd, &timerfdops); From nobody Sat Sep 2 10:34:04 2023 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 4RdB8f6rDjz4rYm3; Sat, 2 Sep 2023 10:34:10 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RdB8f6dNNz4Pyr; Sat, 2 Sep 2023 10:34:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693650850; 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=7hd29iK+VfMyiwjsMdxMOvaebaip49X4oyDjO4VXseE=; b=qxzPqho53G04Tspq7RDtYOxAMGcMtOP0RLPVIM/meHIgmtcNVywNCy85mwJ7Jae+osSpqZ pkTfiUdzFLbSHsilstKNeIUucFh5Chkm90nRi7ATeCnYGHkPQv3bgc+muf+SN96F9WIuss 5Xqb4x/q9luHmk+RFsw3v9FRf46lrJgRVuoV94HPP4ehHkyuPNE8+mRHb06YO0I5u+1oq8 CKpTsLuh+Mi8vr8cKFrZZMpScT0vxmRYo7WU5caY9KahOa3O0N4c9CWO1iD44/mtYc+WGo g6Q9T0PRhCZVh4Tv9l7zmMZYpJIantJjKqB337sjZzbo+Ft3xz0eCbjrEm4yuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693650850; a=rsa-sha256; cv=none; b=tgbLZmFR3xMtH6KMB2LfNSMMw97abz+6ZO7cLDGEiFIST4cFmMisP8mYqdgIQuisT8CM1C sGHGu0t62+zu5J36jSDa699r6MgeVN0Fi0j8d+PNNiLSq01n1ajrN+TcPHZfO0uTM6NKkc URArvgLZLd6USwRzi4fpElOzN+s2LHABpZZxouFJ+IXbsvsx+2exVHtfbAUgKSuJoW51ML LdIdeP6+tN4Uph7flhQtttjCXnhDW4f/yo1yhAyBXC0pv1FMKLJyAjbAV1J8PF+NQGY2JT FwGrJ2jEsqwV5Mxu+8uExRPtdfW24S/163Nw9T25GRt1DIU1a29/n67Bb1+zeQ== 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=1693650850; 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=7hd29iK+VfMyiwjsMdxMOvaebaip49X4oyDjO4VXseE=; b=NpQ+33scGZYvOFd5acVOfG4gle80OlBScBYw/OO7pEiQv/PHHM5SOO7/M88B5K5G8uaPHk vQxmvjaO1CCUGnLzKFvhjwdToGid59mj5HpnGLSsbn9Bso6vohBoTK7kh5Ku+8ugzFioGK ZSAdJkURgLIcgoIJ+bOg2EVVeNLK/4FEsNRafgOn5KkFDekJC0b9ky06O39rebIYe4EsVM i9H0s+qWB62NtZJCZAXb54Jj9WbopORqGO5Hk+HmWqMXwLshC2Er5Mf85xeHabhZXhKLq8 itKpnf/5bw2t3ddUSlwWwiCOak0L4dffPLkluIt9pBz19WiptZTQff/KgXEXGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RdB8f5hYxzfcL; Sat, 2 Sep 2023 10:34:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 382AYAkR030655; Sat, 2 Sep 2023 10:34:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 382AY4hi030647; Sat, 2 Sep 2023 10:34:04 GMT (envelope-from git) Date: Sat, 2 Sep 2023 10:34:04 GMT Message-Id: <202309021034.382AY4hi030647@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 2ad756a6bbb3 - main - zfs: merge openzfs/zfs@95f71c019 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ad756a6bbb30fc98ee9000fba5bceec916a6c70 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=2ad756a6bbb30fc98ee9000fba5bceec916a6c70 commit 2ad756a6bbb30fc98ee9000fba5bceec916a6c70 Merge: f4296cfb409a 95f71c019d7c Author: Martin Matuska AuthorDate: 2023-09-02 10:32:48 +0000 Commit: Martin Matuska CommitDate: 2023-09-02 10:33:26 +0000 zfs: merge openzfs/zfs@95f71c019 Notable upstream pull request merges: #15018 Increase limit of redaction list by using spill block #15161 Make zoned/jailed zfsprops(7) make more sense #15216 Relax error reporting in zpool import and zpool split #15218 Selectable block allocators #15227 ZIL: Tune some assertions #15228 ZIL: Revert zl_lock scope reduction #15233 ZIL: Change ZIOs issue order Obtained from: OpenZFS OpenZFS commit: 95f71c019d7c3e3b728a9b05e2117ce6b09f1b87 sys/contrib/openzfs/cmd/zdb/zdb.c | 15 +++- sys/contrib/openzfs/cmd/zed/zed.d/Makefile.am | 2 + .../openzfs/cmd/zed/zed.d/statechange-slot_off.sh | 19 +++-- sys/contrib/openzfs/cmd/zfs/zfs_main.c | 4 + sys/contrib/openzfs/cmd/zpool/zpool_main.c | 34 +++++--- .../contrib/debian/openzfs-zfsutils.install | 2 - sys/contrib/openzfs/include/libzfs.h | 1 + .../openzfs/include/os/freebsd/spl/sys/mod_os.h | 3 + .../include/os/linux/kernel/linux/simd_x86.h | 19 +++-- sys/contrib/openzfs/include/sys/dsl_bookmark.h | 1 + sys/contrib/openzfs/include/sys/metaslab.h | 1 + sys/contrib/openzfs/include/sys/spa.h | 3 + sys/contrib/openzfs/include/sys/spa_impl.h | 3 + sys/contrib/openzfs/include/zfeature_common.h | 1 + sys/contrib/openzfs/lib/libzfs/libzfs.abi | 9 +- sys/contrib/openzfs/lib/libzfs/libzfs_mount.c | 4 +- sys/contrib/openzfs/man/Makefile.am | 16 +++- sys/contrib/openzfs/man/man7/zfsprops.7 | 16 ++-- sys/contrib/openzfs/man/man7/zpool-features.7 | 12 +++ sys/contrib/openzfs/man/man8/zpool.8 | 58 +++++++------ .../openzfs/module/os/freebsd/zfs/sysctl_os.c | 18 ++++ sys/contrib/openzfs/module/os/linux/spl/spl-proc.c | 36 ++++---- .../openzfs/module/os/linux/zfs/spa_misc_os.c | 12 +++ .../openzfs/module/zcommon/zfeature_common.c | 12 +++ sys/contrib/openzfs/module/zfs/dbuf.c | 2 +- sys/contrib/openzfs/module/zfs/dmu_redact.c | 17 ++-- sys/contrib/openzfs/module/zfs/dnode.c | 1 + sys/contrib/openzfs/module/zfs/dsl_bookmark.c | 67 +++++++++++---- sys/contrib/openzfs/module/zfs/dsl_destroy.c | 10 +++ sys/contrib/openzfs/module/zfs/metaslab.c | 98 ++++++++++++++++------ sys/contrib/openzfs/module/zfs/spa.c | 14 ++-- sys/contrib/openzfs/module/zfs/spa_misc.c | 6 ++ sys/contrib/openzfs/module/zfs/zil.c | 49 +++++------ .../functional/cli_root/zpool_get/zpool_get.cfg | 1 + .../redacted_send/redacted_many_clones.ksh | 12 ++- sys/modules/zfs/zfs_config.h | 4 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 37 files changed, 406 insertions(+), 178 deletions(-) diff --cc sys/modules/zfs/zfs_config.h index 08092e5e169c,000000000000..49b699b24018 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1134 -1,0 +1,1134 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* bio_end_io_t wants 1 arg */ +/* #undef HAVE_1ARG_BIO_END_IO_T */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* submit_bio() wants 1 arg */ +/* #undef HAVE_1ARG_SUBMIT_BIO */ + +/* bdi_setup_and_register() wants 2 args */ +/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 2 args */ +/* #undef HAVE_2ARGS_VFS_GETATTR */ + +/* zlib_deflate_workspacesize() wants 2 args */ +/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +/* bdi_setup_and_register() wants 3 args */ +/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 3 args */ +/* #undef HAVE_3ARGS_VFS_GETATTR */ + +/* vfs_getattr wants 4 args */ +/* #undef HAVE_4ARGS_VFS_GETATTR */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* posix_acl has refcount_t */ +/* #undef HAVE_ACL_REFCOUNT */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio->bi_opf is defined */ +/* #undef HAVE_BIO_BI_OPF */ + +/* bio->bi_status exists */ +/* #undef HAVE_BIO_BI_STATUS */ + +/* bio has bi_iter */ +/* #undef HAVE_BIO_BVEC_ITER */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() is available */ +/* #undef HAVE_BIO_SET_DEV */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue is available */ +/* #undef HAVE_BLK_MQ */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* blk_queue_flag_clear() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */ + +/* blk_queue_flag_set() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_SET */ + +/* blk_queue_flush() is available */ +/* #undef HAVE_BLK_QUEUE_FLUSH */ + +/* blk_queue_flush() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */ + +/* blk_queue_secdiscard() is available */ +/* #undef HAVE_BLK_QUEUE_SECDISCARD */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* blk_queue_write_cache() exists */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE */ + +/* blk_queue_write_cache() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* clear_inode() is available */ +/* #undef HAVE_CLEAR_INODE */ + +/* dentry uses const struct dentry_operations */ +/* #undef HAVE_CONST_DENTRY_OPERATIONS */ + +/* copy_from_iter() is available */ +/* #undef HAVE_COPY_FROM_ITER */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* copy_to_iter() is available */ +/* #undef HAVE_COPY_TO_ITER */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* yes */ +/* #undef HAVE_CPU_HOTPLUG */ + +/* current_time() exists */ +/* #undef HAVE_CURRENT_TIME */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* dentry aliases are in d_u member */ +/* #undef HAVE_DENTRY_D_U_ALIASES */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* sops->dirty_inode() wants flags */ +/* #undef HAVE_DIRTY_INODE_WITH_FLAGS */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* d_make_root() is available */ +/* #undef HAVE_D_MAKE_ROOT */ + +/* d_prune_aliases() is available */ +/* #undef HAVE_D_PRUNE_ALIASES */ + +/* dops->d_revalidate() operation takes nameidata */ +/* #undef HAVE_D_REVALIDATE_NAMEIDATA */ + +/* eops->encode_fh() wants child and parent inodes */ +/* #undef HAVE_ENCODE_FH_WITH_INODE */ + +/* sops->evict_inode() exists */ +/* #undef HAVE_EVICT_INODE */ + +/* FALLOC_FL_ZERO_RANGE is defined */ +/* #undef HAVE_FALLOC_FL_ZERO_RANGE */ + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* filemap_range_has_page() is available */ +/* #undef HAVE_FILEMAP_RANGE_HAS_PAGE */ + +/* fops->aio_fsync() exists */ +/* #undef HAVE_FILE_AIO_FSYNC */ + +/* file_dentry() is available */ +/* #undef HAVE_FILE_DENTRY */ + +/* fops->fadvise() exists */ +/* #undef HAVE_FILE_FADVISE */ + +/* file_inode() is available */ +/* #undef HAVE_FILE_INODE */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* iops->follow_link() cookie */ +/* #undef HAVE_FOLLOW_LINK_COOKIE */ + +/* iops->follow_link() nameidata */ +/* #undef HAVE_FOLLOW_LINK_NAMEIDATA */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fops->fsync() with range */ +/* #undef HAVE_FSYNC_RANGE */ + +/* fops->fsync() without dentry */ +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 3 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_3ARG */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* generic_readlink is global */ +/* #undef HAVE_GENERIC_READLINK */ + +/* generic_setxattr() exists */ +/* #undef HAVE_GENERIC_SETXATTR */ + +/* generic_write_checks() takes kiocb */ +/* #undef HAVE_GENERIC_WRITE_CHECKS_KIOCB */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iops->get_link() cookie */ +/* #undef HAVE_GET_LINK_COOKIE */ + +/* iops->get_link() delayed */ +/* #undef HAVE_GET_LINK_DELAYED */ + +/* group_info->gid exists */ +/* #undef HAVE_GROUP_INFO_GID */ + +/* has_capability() is available */ +/* #undef HAVE_HAS_CAPABILITY */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* yes */ +/* #undef HAVE_INODE_LOCK_SHARED */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + +/* inode_set_flags() exists */ +/* #undef HAVE_INODE_SET_FLAGS */ + +/* inode_set_iversion() exists */ +/* #undef HAVE_INODE_SET_IVERSION */ + +/* inode->i_*time's are timespec64 */ +/* #undef HAVE_INODE_TIMESPEC64_TIMES */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* in_compat_syscall() is available */ +/* #undef HAVE_IN_COMPAT_SYSCALL */ + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->setattr() exists */ +/* #undef HAVE_IOPS_SETATTR */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_advance() is available */ +/* #undef HAVE_IOV_ITER_ADVANCE */ + +/* iov_iter_count() is available */ +/* #undef HAVE_IOV_ITER_COUNT */ + +/* iov_iter_fault_in_readable() is available */ +/* #undef HAVE_IOV_ITER_FAULT_IN_READABLE */ + +/* iov_iter_revert() is available */ +/* #undef HAVE_IOV_ITER_REVERT */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* iov_iter types are available */ +/* #undef HAVE_IOV_ITER_TYPES */ + +/* yes */ +/* #undef HAVE_IO_SCHEDULE_TIMEOUT */ + +/* Define to 1 if you have the `issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* uncached_acl_sentinel() exists */ +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* kernel_read() take loff_t pointer */ +/* #undef HAVE_KERNEL_READ_PPOS */ + +/* timer_list.function gets a timer_list */ +/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */ + +/* struct timer_list has a flags member */ +/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */ + +/* timer_setup() is available */ +/* #undef HAVE_KERNEL_TIMER_SETUP */ + +/* kernel_write() take loff_t pointer */ +/* #undef HAVE_KERNEL_WRITE_PPOS */ + +/* kmem_cache_create_usercopy() exists */ +/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */ + +/* kstrtoul() exists */ +/* #undef HAVE_KSTRTOUL */ + +/* ktime_get_coarse_real_ts64() exists */ +/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */ + +/* ktime_get_raw_ts64() exists */ +/* #undef HAVE_KTIME_GET_RAW_TS64 */ + +/* kvmalloc exists */ +/* #undef HAVE_KVMALLOC */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* linux/blk-cgroup.h exists */ +/* #undef HAVE_LINUX_BLK_CGROUP_HEADER */ + +/* lseek_execute() is available */ +/* #undef HAVE_LSEEK_EXECUTE */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Noting that make_request_fn() returns void */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */ + +/* iops->mkdir() takes umode_t */ +/* #undef HAVE_MKDIR_UMODE_T */ + +/* Define to 1 if you have the `mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* lookup_bdev() wants mode arg */ +/* #undef HAVE_MODE_LOOKUP_BDEV */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* new_sync_read()/new_sync_write() are available */ +/* #undef HAVE_NEW_SYNC_READ */ + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* percpu_counter_add_batch() is defined */ +/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */ + +/* percpu_counter_init() wants gfp_t */ +/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */ + +/* posix_acl_chmod() exists */ +/* #undef HAVE_POSIX_ACL_CHMOD */ + +/* posix_acl_from_xattr() needs user_ns */ +/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */ + +/* posix_acl_release() is available */ +/* #undef HAVE_POSIX_ACL_RELEASE */ + +/* posix_acl_release() is GPL-only */ +/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */ + +/* posix_acl_valid() wants user namespace */ +/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* iops->put_link() cookie */ +/* #undef HAVE_PUT_LINK_COOKIE */ + +/* iops->put_link() delayed */ +/* #undef HAVE_PUT_LINK_DELAYED */ + +/* iops->put_link() nameidata */ +/* #undef HAVE_PUT_LINK_NAMEIDATA */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename2() exists */ +/* #undef HAVE_RENAME2 */ + +/* struct inode_operations_wrapper takes .rename2() */ +/* #undef HAVE_RENAME2_OPERATIONS_WRAPPER */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* REQ_DISCARD is defined */ +/* #undef HAVE_REQ_DISCARD */ + +/* REQ_FLUSH is defined */ +/* #undef HAVE_REQ_FLUSH */ + +/* REQ_OP_DISCARD is defined */ +/* #undef HAVE_REQ_OP_DISCARD */ + +/* REQ_OP_FLUSH is defined */ +/* #undef HAVE_REQ_OP_FLUSH */ + +/* REQ_OP_SECURE_ERASE is defined */ +/* #undef HAVE_REQ_OP_SECURE_ERASE */ + +/* REQ_PREFLUSH is defined */ +/* #undef HAVE_REQ_PREFLUSH */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* struct rw_semaphore has member activity */ +/* #undef HAVE_RWSEM_ACTIVITY */ + +/* struct rw_semaphore has atomic_long_t member count */ +/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */ + +/* linux/sched/signal.h exists */ +/* #undef HAVE_SCHED_SIGNAL_HEADER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() exists, takes 3 args */ +/* #undef HAVE_SET_ACL */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* set_cached_acl() is usable */ +/* #undef HAVE_SET_CACHED_ACL_USABLE */ + +/* set_special_state() exists */ +/* #undef HAVE_SET_SPECIAL_STATE */ + +/* struct shrink_control exists */ +/* #undef HAVE_SHRINK_CONTROL_STRUCT */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* signal_stop() exists */ +/* #undef HAVE_SIGNAL_STOP */ + +/* new shrinker callback wants 2 args */ +/* #undef HAVE_SINGLE_SHRINKER_CALLBACK */ + +/* cs->count_objects exists */ +/* #undef HAVE_SPLIT_SHRINKER_CALLBACK */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* super_setup_bdi_name() exits */ +/* #undef HAVE_SUPER_SETUP_BDI_NAME */ + +/* super_block->s_user_ns exists */ +/* #undef HAVE_SUPER_USER_NS */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* i_op->tmpfile() exists */ +/* #undef HAVE_TMPFILE */ + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the `udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +/* user_namespace->ns.inum exists */ +/* #undef HAVE_USER_NS_COMMON_INUM */ + +/* iops->getattr() takes a vfsmount */ +/* #undef HAVE_VFSMOUNT_IOPS_GETATTR */ + +/* fops->clone_file_range() is available */ +/* #undef HAVE_VFS_CLONE_FILE_RANGE */ + +/* fops->copy_file_range() is available */ +/* #undef HAVE_VFS_COPY_FILE_RANGE */ + +/* fops->dedupe_file_range() is available */ +/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */ + +/* aops->direct_IO() uses iovec */ +/* #undef HAVE_VFS_DIRECT_IO_IOVEC */ + +/* aops->direct_IO() uses iov_iter without rw */ +/* #undef HAVE_VFS_DIRECT_IO_ITER */ + +/* aops->direct_IO() uses iov_iter with offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_OFFSET */ + +/* aops->direct_IO() uses iov_iter with rw and offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET */ + +/* filemap_dirty_folio exists */ +/* #undef HAVE_VFS_FILEMAP_DIRTY_FOLIO */ + +/* file_operations_extend takes .copy_file_range() and .clone_file_range() */ +/* #undef HAVE_VFS_FILE_OPERATIONS_EXTEND */ + +/* generic_copy_file_range() is available */ +/* #undef HAVE_VFS_GENERIC_COPY_FILE_RANGE */ + +/* All required iov_iter interfaces are available */ +/* #undef HAVE_VFS_IOV_ITER */ + +/* fops->iterate() is available */ +/* #undef HAVE_VFS_ITERATE */ + +/* fops->iterate_shared() is available */ +/* #undef HAVE_VFS_ITERATE_SHARED */ + *** 227 LINES SKIPPED *** From nobody Sat Sep 2 14:47:37 2023 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 4RdHn530JJz4rcl4; Sat, 2 Sep 2023 14:47:37 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RdHn52Y05z3b8q; Sat, 2 Sep 2023 14:47:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693666057; 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=V+G3xrlvjQAeNxiB0sPDsORLXzT5rzQW6+Tgy/84eIk=; b=GFY0HLGd+6kZ9dZv0iNLXkDuFFKRAUhx4jlPuQRj/kAGQ+W8rjOvH0LAZ8HwMGF6piMrEd 7jBWEboYtN4uvsCizblfSATczDG3p8FBpEA+Ux1WJcwVP1pRCmGUtimQuWYiT2ildevY5B haXZXPT1sPD2Jo3ZQPmtAcSmbpjBQN7QUeFT2NmWgvQX6gUo/WdiGPFdxEBCiRgXaFeaKC LlExPx9qfnxiSmZ5NVpcX5TL5qM63O6H5sUgR7hJFTz0W3JxoJcm9pGQeK6PW+v+JLZy6x 3FzPls7BM2oTnXFUWIX/RwWeUGV6VPU7jcTDzZ9Jx8lr+wb+HJX9Y4zdt9ew+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693666057; a=rsa-sha256; cv=none; b=P3lBgrQckVGBFFPoVCBoEn9Jh08kPD7C7obkrY1NYzTsl5Q3/UiMRy2hyAoUSEfPjQsPEh et3iubhFFjm0Rnd4yDoHhyTi9DULiREI6TcwPtqW7u/ZsG0OyLipcMSUMm2KUEX8G71/al tV762PZ1ti1eUsl/y6J1Hwfnh8V1eqVT6O/oOw7okCUBPPcQjmwQvXiA28rLylFSxazq/F AV7rNsGOA+4CeNcmzLVBRx45v1Yepzf0MS5n9oD3UOxXHf4/a1g+ogVKB079rAl7QBcGIC tVKeC/iPbHGv5xAyd7clWziTAXKQntAFH/1O2+CnXaodKZbFypO1xMfdG6kzAA== 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=1693666057; 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=V+G3xrlvjQAeNxiB0sPDsORLXzT5rzQW6+Tgy/84eIk=; b=pnnKwFvMMDED+AWEUk+mDoAYr8zh2IkiPAYhw94i6x8+piQ+V+b9R/AdfFCzBZsuQtP2Wt 6j3Eqffc+K61TzcmoHIdtdJ78V0CgB68z0gCpSSCaTxT/aMiCsXnpYCoDoX/asqqdmdDfK sI9Ero0ua/bCeSGOYajccWf6w32Nl8ApUHjxDrjhIsB7DeOxdWBmOtfUfjHqHc2ykEsRMQ Wj4mHmKhf4SiSqPWJyI1g2rkzvGv5y7yWm6rI1Wcm0BTjDqYKG3SkhC/STA7mX0Lm6QRvs gSAtfbSGvd3M9wioQzhodtcTg5QFuMr1/50pyxWr5QjCmMQiVb278B1lVvZd0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RdHn51VLgzmp5; Sat, 2 Sep 2023 14:47:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 382Elb63044602; Sat, 2 Sep 2023 14:47:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 382Elbs5044599; Sat, 2 Sep 2023 14:47:37 GMT (envelope-from git) Date: Sat, 2 Sep 2023 14:47:37 GMT Message-Id: <202309021447.382Elbs5044599@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 32988c1499f8 - main - vfs cache: fix a hang when bumping vnode limit too high 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32988c1499f8698b41e15ed40a46d271e757bba3 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=32988c1499f8698b41e15ed40a46d271e757bba3 commit 32988c1499f8698b41e15ed40a46d271e757bba3 Author: Mateusz Guzik AuthorDate: 2023-09-02 14:27:33 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-02 14:45:27 +0000 vfs cache: fix a hang when bumping vnode limit too high Overflow in cache_changesize would make the value flip to 0 and stay there as 0 << 1 does not do anything. Note callers limit the outcome to something below u_int. Also note there entire vnode handling thing both in vfs layer as a whole and this file can't decide whether to long, u_long or u_int. --- sys/kern/vfs_cache.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 92c926a16afb..5b0cd64146ad 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -2597,10 +2597,10 @@ cache_enter_time_flags(struct vnode *dvp, struct vnode *vp, struct componentname cache_enter_time(dvp, vp, cnp, tsp, dtsp); } -static u_int -cache_roundup_2(u_int val) +static u_long +cache_roundup_2(u_long val) { - u_int res; + u_long res; for (res = 1; res <= val; res <<= 1) continue; @@ -2616,7 +2616,7 @@ nchinittbl(u_long elements, u_long *hashmask) hashsize = cache_roundup_2(elements) / 2; - hashtbl = malloc((u_long)hashsize * sizeof(*hashtbl), M_VFSCACHE, M_WAITOK); + hashtbl = malloc(hashsize * sizeof(*hashtbl), M_VFSCACHE, M_WAITOK); for (i = 0; i < hashsize; i++) CK_SLIST_INIT(&hashtbl[i]); *hashmask = hashsize - 1; @@ -2762,7 +2762,7 @@ cache_changesize(u_long newmaxvnodes) struct namecache *ncp; uint32_t hash; u_long newncsize; - int i; + u_long i; newncsize = newmaxvnodes * ncsizefactor; newmaxvnodes = cache_roundup_2(newmaxvnodes * 2); From nobody Sat Sep 2 19:40:06 2023 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 4RdQGZ5wXVz4rrGQ; Sat, 2 Sep 2023 19:40:06 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RdQGZ5V9fz3YTX; Sat, 2 Sep 2023 19:40:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693683606; 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=8+RBkja4pWYFImRFIiDGIRE7l7Aptc9BtEvharK54ls=; b=frYC/h24c+OExuxY/S7LshVBMoMugg4IXM4O9+Z03rithr+WkgXSXYoYnY1m919E26f1d3 tXCvK8HSvh8W3R/6n1kCFBAJ0c9sFi0H61KrEPKwzc5XBdWxjfaRV7d9wl8gQUd1rCUSCl L0ug0mFtFg+8WL1RJJxCxDLIV5H5vjdLxr5W8SEXuB0MWz6GD6eBA+lwVJuUKtzFyalAES FefwgfevtlNZBO+a7ecf/IqN1RMAHItkExxlZtpgpOeW6ai7LtdrM9LIm4J0W7j6l+8hZn 2hmZJ6v01iSm1CzShE4Jju0DxWfLF9QV//Xk8E8kSuozDwO9/yWlSPB1BuCulg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693683606; a=rsa-sha256; cv=none; b=j8p8Ue91+1XXk5pOilE2tHxeGe5K8F9Bu5qqKg6HvWM5WgObAcbNSiPeMNxwQDj2UZ/J5L hoxsdeOfgqb0dbqfhgxVIbJ13cMFvLbnJtzw0yFPI80kTL/g0ytVsj63KgmNzBXesDhfq1 yye/S46ym763VutO2FaJgInWlXF2vSxr3GZSIzx7p/x5Vj/DsIqbXIG+z2mTHPekRkZghc c5rBia0X9YpU4/PMJd9NTl6heU3zKTlEm7xq7zwYDzdOk9LaS3sVOa6FJuJpQYw9plsLFE PuYfPveOHI6krptlx0o+V1bGEeT/k2fRR92i9MOHpRP6gKx+hwIgWf0Tca29hw== 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=1693683606; 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=8+RBkja4pWYFImRFIiDGIRE7l7Aptc9BtEvharK54ls=; b=QKbX0bzuH0zH++xfImGqn4bO25YncVab6UnR8Ec7ccKEvvcSfsOKVXanKmJU+gT69psckG Dhy396ZzHPvzD37K7uOpfKUl+WnMFeTtFYllosAe4PSEcTDZYJ9wgxRyxGDFLcDV1yEI5R 13JMEGAZUOmYOVz2loWhFAr2s0aXOd2NL3i0iMsxRDv5m2vzQtX7r7eAA5SZvUdUlwjk+J c+yGzMlbxNevUMDEZ3xZ5EIO68y1HzC51zIUJ9voJbQfFbZpOkuWI7amZA7WPT3IY3FXcR P8C2xM1la4GUNwaei3D3nsr/1Hi7cwlr3S6bIvBJgKNrHjGSDu4CFGD3Si7ExQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RdQGZ4b6czvsR; Sat, 2 Sep 2023 19:40:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 382Je6ZV028774; Sat, 2 Sep 2023 19:40:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 382Je6Hn028769; Sat, 2 Sep 2023 19:40:06 GMT (envelope-from git) Date: Sat, 2 Sep 2023 19:40:06 GMT Message-Id: <202309021940.382Je6Hn028769@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ea82362219ee - main - tests: Skip all tests that require mdconfig when /dev/mdctl missing 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ea82362219ee715cfbb195b2114e73fdc8599fa5 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ea82362219ee715cfbb195b2114e73fdc8599fa5 commit ea82362219ee715cfbb195b2114e73fdc8599fa5 Author: Warner Losh AuthorDate: 2023-09-02 19:12:31 +0000 Commit: Warner Losh CommitDate: 2023-09-02 19:16:22 +0000 tests: Skip all tests that require mdconfig when /dev/mdctl missing When run in a jail, /dev/mdctl is missing. So skip any tests that use mdconfig or mdmfs with md in this case: they can't possibly work. This is in line with other tests that test for presence of required features and skip if they aren't present. I did this instead of checking for jails so they can still run in jails that allow creation of md devices. Sponsored by: Netflix --- tests/sys/acl/00.sh | 4 ++++ tests/sys/acl/01.sh | 4 ++++ tests/sys/acl/02.sh | 4 ++++ tests/sys/acl/03.sh | 4 ++++ tests/sys/acl/04.sh | 4 ++++ tests/sys/cddl/zfs/tests/cache/cache_test.sh | 1 + tests/sys/geom/class/eli/conf.sh | 1 + tests/sys/geom/class/geom_subr.sh | 1 + tests/sys/geom/class/mirror/8_test.sh | 5 +++++ tests/sys/kern/sendfile_test.sh | 1 + tests/sys/mac/bsdextended/matches_test.sh | 1 + 11 files changed, 30 insertions(+) diff --git a/tests/sys/acl/00.sh b/tests/sys/acl/00.sh index 42b06cb8c484..5853aac2cac8 100644 --- a/tests/sys/acl/00.sh +++ b/tests/sys/acl/00.sh @@ -43,6 +43,10 @@ if [ $(id -u) -ne 0 ]; then echo "1..0 # SKIP you must be root" exit 0 fi +if [ ! -c /dev/mdctl ]; then + echo "1..0 # SKIP no /dev/mdctl to create md devices" + exit 0 +fi echo "1..4" diff --git a/tests/sys/acl/01.sh b/tests/sys/acl/01.sh index 3521ef37e663..044d1b81ab68 100644 --- a/tests/sys/acl/01.sh +++ b/tests/sys/acl/01.sh @@ -45,6 +45,10 @@ if [ $(id -u) -ne 0 ]; then echo "1..0 # SKIP you must be root" exit 0 fi +if [ ! -c /dev/mdctl ]; then + echo "1..0 # SKIP no /dev/mdctl to create md devices" + exit 0 +fi echo "1..4" diff --git a/tests/sys/acl/02.sh b/tests/sys/acl/02.sh index 069995d9906f..98fe1345b069 100644 --- a/tests/sys/acl/02.sh +++ b/tests/sys/acl/02.sh @@ -43,6 +43,10 @@ if [ $(id -u) -ne 0 ]; then echo "1..0 # SKIP you must be root" exit 0 fi +if [ ! -c /dev/mdctl ]; then + echo "1..0 # SKIP no /dev/mdctl to create md devices" + exit 0 +fi echo "1..4" diff --git a/tests/sys/acl/03.sh b/tests/sys/acl/03.sh index 2de58e31ba3a..4c85638ca8db 100644 --- a/tests/sys/acl/03.sh +++ b/tests/sys/acl/03.sh @@ -40,6 +40,10 @@ if [ $(id -u) -ne 0 ]; then echo "1..0 # SKIP you must be root" exit 0 fi +if [ ! -c /dev/mdctl ]; then + echo "1..0 # SKIP no /dev/mdctl to create md devices" + exit 0 +fi echo "1..5" diff --git a/tests/sys/acl/04.sh b/tests/sys/acl/04.sh index 33ce5ab9bc17..cfe4b1cb08a8 100644 --- a/tests/sys/acl/04.sh +++ b/tests/sys/acl/04.sh @@ -37,6 +37,10 @@ if [ $(id -u) -ne 0 ]; then echo "1..0 # SKIP you must be root" exit 0 fi +if [ ! -c /dev/mdctl ]; then + echo "1..0 # SKIP no /dev/mdctl to create md devices" + exit 0 +fi echo "1..3" diff --git a/tests/sys/cddl/zfs/tests/cache/cache_test.sh b/tests/sys/cddl/zfs/tests/cache/cache_test.sh index 4d77d9fa56a7..79b09dd93183 100755 --- a/tests/sys/cddl/zfs/tests/cache/cache_test.sh +++ b/tests/sys/cddl/zfs/tests/cache/cache_test.sh @@ -280,6 +280,7 @@ cache_010_neg_body() . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg + [ -c /dev/mdctl ] || atf_skip "no /dev/mdctl to create md devices" verify_disk_count "$DISKS" 1 ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cache_010_neg.ksh || atf_fail "Testcase failed" diff --git a/tests/sys/geom/class/eli/conf.sh b/tests/sys/geom/class/eli/conf.sh index fe7c9c2528ea..a21e645f1637 100644 --- a/tests/sys/geom/class/eli/conf.sh +++ b/tests/sys/geom/class/eli/conf.sh @@ -8,6 +8,7 @@ attach_md() { local test_md + [ -c /dev/mdctl ] || atf_skip "no /dev/mdctl to create md devices" test_md=$(mdconfig -a "$@") || atf_fail "failed to allocate md(4)" echo $test_md >> $TEST_MDS_FILE || exit echo $test_md diff --git a/tests/sys/geom/class/geom_subr.sh b/tests/sys/geom/class/geom_subr.sh index 7e572ccd5175..f8eca4c6b220 100644 --- a/tests/sys/geom/class/geom_subr.sh +++ b/tests/sys/geom/class/geom_subr.sh @@ -16,6 +16,7 @@ attach_md() { local test_md + [ -c /dev/mdctl ] || atf_skip "no /dev/mdctl to create md devices" test_md=$(mdconfig -a "$@") || exit echo $test_md >> $TEST_MDS_FILE || exit echo $test_md diff --git a/tests/sys/geom/class/mirror/8_test.sh b/tests/sys/geom/class/mirror/8_test.sh index 21f6b83c85f7..5b3e5c3543a1 100644 --- a/tests/sys/geom/class/mirror/8_test.sh +++ b/tests/sys/geom/class/mirror/8_test.sh @@ -4,6 +4,11 @@ . `dirname $0`/conf.sh +if ! [ -c /dev/mdctl ]; then + echo "1..0 # SKIP no /dev/mdctl to create md devices" + exit 0 +fi + echo 1..1 ddbs=2048 diff --git a/tests/sys/kern/sendfile_test.sh b/tests/sys/kern/sendfile_test.sh index 03d2c882241c..2e9779d6779c 100755 --- a/tests/sys/kern/sendfile_test.sh +++ b/tests/sys/kern/sendfile_test.sh @@ -124,6 +124,7 @@ alloc_md() { local md + [ -c /dev/mdctl ] || atf_skip "no /dev/mdctl to create md devices" md=$(mdconfig -a -t swap -s 256M) || atf_fail "mdconfig -a failed" echo ${md} >> $MD_DEVS echo ${md} diff --git a/tests/sys/mac/bsdextended/matches_test.sh b/tests/sys/mac/bsdextended/matches_test.sh index 40774594fd18..2a28be0f231b 100644 --- a/tests/sys/mac/bsdextended/matches_test.sh +++ b/tests/sys/mac/bsdextended/matches_test.sh @@ -27,6 +27,7 @@ setup() { check_ko mkdir mnt + [ -c /dev/mdctl ] || atf_skip "no /dev/mdctl to create md devices" mdmfs -s 25m md mnt \ || atf_fail "failed to mount md device" chmod a+rwx mnt From nobody Sat Sep 2 20:36:44 2023 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 4RdRWw4tbYz4s76p; Sat, 2 Sep 2023 20:36:44 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RdRWw4RKnz4JTt; Sat, 2 Sep 2023 20:36:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693687004; 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=q6XPbq2H+5cu4Y0o2svoK7ObZylh+rZPFJrxOyZoCBo=; b=i2dDYDsHkHQ8IVwEldADewe+XCNBmq5Pg0zxw3TzNwrR1aRC3jxhGQbFvpVVPsqKBI2SIO 75hKm72SHwLCTLhZ5PvEYm0wRVhAe/ZO3HRXgW3Pdegfok4bkhkj/RlwPZfdnn3IigqALR oMo3PFaoPMOdknLCyW6s/eHKXQwnDvAag316+dI7E9hiOpG4S1ZivfuwQN1bItmlcN8MpK D9WDu6/Kj27BesRs65g9wRIK9c+Z47ArcapJoTfke/9KKHV5isewgMuQREsPStkErzkX1E SX/QQK8cu7KzGUTGsfg4hvqbigxd/nd1miI9orhj+JXiO51tYfAldl1en3wSiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693687004; a=rsa-sha256; cv=none; b=HFP25UZGlfHzlm1/h94RS4zHzthBxGLCp5AcGWrnjTOJ/f/nqDNy8Uw86k5Ha0u4dJ4UeG UV0O7lGch8+nrup1kzlPMFZ57AcA4UDxHKsIYFKhMe5pakS+M5V0yR/IyKrpPIjhrFuWkn k3VUn4YGGF05aPLPNKw6F8bOrSzyEZkzqBTo4yLibFVuD7jnXlYcQY9L7ZlOSZbUK6yVtF KT1erKUthIiSj6OWf7yvno7ecOrcsqErOivanxpL7Bq4lNVgqqT7aq4X8WbhnFRppYq/bZ aap18qPrW5Sg1KeXx+HcV4QH/0db4s9dxr6zTqKE6yCbc5R+y6oYd3I9DTvpYQ== 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=1693687004; 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=q6XPbq2H+5cu4Y0o2svoK7ObZylh+rZPFJrxOyZoCBo=; b=xKuUrQVHBwGrphtLVPL3xjeSE1J7DGpxnCjWFKx7mp3rW7kdZe6MFhNm0bB1ibv8xMJ3fi xV6++MRgtosAYSBWwhS1scxHn5x9mwM3bFEnaNHDOCY6L5OCzLYOuPne06AqUrR5PTTxXN ZRexrExGvJ5TmWPyQBtCiXAsx2PON02HEpqoNt1Bdi4iBmyZs9FX9pZtVKWjo3eJkCHBrz AC0k+g98HIUlbJrec549SIeMV48CdvsngzsVwMePx/geS1eb6dp7/tiqZH/0Mmmei8slhH ISMZ0a/gjisDq19Bghwe5yts9NUZlLT+mQ8sJLKz/jtG3hJsOeAAAeivbuuB3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4RdRWw3TVczx6p; Sat, 2 Sep 2023 20:36:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 382Kai0t024327; Sat, 2 Sep 2023 20:36:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 382KaisV024324; Sat, 2 Sep 2023 20:36:44 GMT (envelope-from git) Date: Sat, 2 Sep 2023 20:36:44 GMT Message-Id: <202309022036.382KaisV024324@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 224aec05e732 - main - tcp: Initialize the maximum number of entries in a client cookie cache bucket 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 224aec05e732bb97a0d3c91142973b98a91238d1 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=224aec05e732bb97a0d3c91142973b98a91238d1 commit 224aec05e732bb97a0d3c91142973b98a91238d1 Author: Zhenlei Huang AuthorDate: 2023-09-02 20:34:07 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-02 20:34:07 +0000 tcp: Initialize the maximum number of entries in a client cookie cache bucket This vnet loader tunable is defined with SYSCTL_PROC, thus will not be initialized by kernel on vnet creating and will always have the default value TCP_FASTOPEN_CCACHE_BUCKET_LIMIT_DEFAULT. Fix by fetching the value from the corresponding kernel environment during vnet constructing. PR: 273509 Reviewed by: #transport, tuexen Fixes: c560df6f12f1 This is an implementation of the client side of TCP Fast Open (TFO) [RFC7413] MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41691 --- sys/netinet/tcp_fastopen.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_fastopen.c b/sys/netinet/tcp_fastopen.c index 9b6f9c17b05c..c31225214d1d 100644 --- a/sys/netinet/tcp_fastopen.c +++ b/sys/netinet/tcp_fastopen.c @@ -271,7 +271,7 @@ SYSCTL_PROC(_net_inet_tcp_fastopen, OID_AUTO, autokey, static int sysctl_net_inet_tcp_fastopen_ccache_bucket_limit(SYSCTL_HANDLER_ARGS); SYSCTL_PROC(_net_inet_tcp_fastopen, OID_AUTO, ccache_bucket_limit, - CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, + CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_NEEDGIANT, NULL, 0, &sysctl_net_inet_tcp_fastopen_ccache_bucket_limit, "IU", "Max entries per bucket in client cookie cache"); @@ -393,7 +393,8 @@ tcp_fastopen_init(void) V_tcp_fastopen_keys.newest = TCP_FASTOPEN_MAX_KEYS - 1; V_tcp_fastopen_keys.newest_psk = TCP_FASTOPEN_MAX_PSKS - 1; - /* May already be non-zero if kernel tunable was set */ + TUNABLE_INT_FETCH("net.inet.tcp.fastopen.ccache_bucket_limit", + &V_tcp_fastopen_ccache.bucket_limit); if (V_tcp_fastopen_ccache.bucket_limit == 0) V_tcp_fastopen_ccache.bucket_limit = TCP_FASTOPEN_CCACHE_BUCKET_LIMIT_DEFAULT;