From nobody Sun Oct 8 04:35: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 4S38Vj2J5Jz4wRpP; Sun, 8 Oct 2023 04:35: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 4S38Vj1qBwz4NVn; Sun, 8 Oct 2023 04:35:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696739757; 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=/50JPgivDlKmdpy0f+DLgQ9FAJA4+he/lGLcNrST7zg=; b=PewleaxZm6tm+QzZmgmhFuZeACARdswECzuAs2cgV/wkAJrsIaf9MkW2kHIT2/1CQCoEL6 bF+u/rDw5qV2ladp1cGuHJXIBKSUHiOEzx8nULb3ZRzX0wYa97AA26RYO91DNpFXYr2t5Y qKsmxLTs4onmj23zMOtbW22tafLCG1HTgbkA9R8bPbOLqF/aKIxXbaxOydkQLhNphbOIsg eWXeDwVuCbrrYPzplyTWwYgW9RmD6HIkCTmOfm8hEiuKN9RrYz3vre7Z3a5OYleWS2t2DA BurofP75UmSJjhDII2eG/K/UA3niFn/O5JEnlJN5B6W8rwXDQyLKKVmi7d/U6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696739757; a=rsa-sha256; cv=none; b=H4DW2hQFzJl+KG5OfhhhzUfc8+jVB2GCjNLpo2YfEoaEwDSoGYoZjfD7d7dfS9uh/SerlQ OtsuLPNFt6ltjPHh6eEsVAStvDSmzvsz3zeR56uG2WNkU2S/b2v1K/pHJ+3mjc1WyMEC7J 6pjwR+op4dD+8gseSnf1J83I8rMg213b76P07FT0gol9TO4LQoLmN0qwWKd6XaWnjkRo3V Jc8vJEZmL8O99dDyAAHsWBG6CIaDo8luZO1NjGXh3YNuWkU4vbMijZ9kTRPEHOM8DA2cXv hbVRr77uMFuck2TWYvVm8DcL/eEErwJB/nWkEGAfNuJmnfrkMMIsAN7SHm/4IQ== 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=1696739757; 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=/50JPgivDlKmdpy0f+DLgQ9FAJA4+he/lGLcNrST7zg=; b=SitQfLWPv6EfA3JKmL4mlYfWqbcsEfemZHwLhnkEkhFT+eaiCKxw2z9kFKCZ+YQjDrGXII jCOPOIrMu4Ua2BZ1Fm8pfQlwN2QoTT2bYNn6nvezeEppV4TpR1MeWvz/5K560fNJi0Ibtf Y8AjksnFIEexYbCtIXpNe6kaFbFo1PI32vTxjmBzBVkR32usZXMKm73dNEvqdH9+NDljFV ZiELEWz+s2yy3mBEQB2sauis9NbHtmn4DUI2O5JlkaW+q+g/wGPehD2YHuXyU5y/UUKNiC rDQipJXPtPL1BQew5aIlvs4hbcYcNupTn3Tjs6Pm1QJVHYgqGiTm0Imf83/FMQ== 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 4S38Vj0ZYJz10Jp; Sun, 8 Oct 2023 04:35: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 3984ZuCW004431; Sun, 8 Oct 2023 04:35:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3984Zuhe004428; Sun, 8 Oct 2023 04:35:56 GMT (envelope-from git) Date: Sun, 8 Oct 2023 04:35:56 GMT Message-Id: <202310080435.3984Zuhe004428@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: 2821a7498f65 - main - libfetch, fetch: Stop recommending the use of ca_root_nss. 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: 2821a7498f65d357c68166e1978b491abef1ca4a Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2821a7498f65d357c68166e1978b491abef1ca4a commit 2821a7498f65d357c68166e1978b491abef1ca4a Author: Dag-Erling Smørgrav AuthorDate: 2023-10-08 04:35:15 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-08 04:35:15 +0000 libfetch, fetch: Stop recommending the use of ca_root_nss. MFC after: 3 days Reviewed by: kevans, emaste Differential Revision: https://reviews.freebsd.org/D42119 --- lib/libfetch/fetch.3 | 15 +-------------- usr.bin/fetch/fetch.1 | 14 ++------------ 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/lib/libfetch/fetch.3 b/lib/libfetch/fetch.3 index 9082f338f7c1..5f7489799cf6 100644 --- a/lib/libfetch/fetch.3 +++ b/lib/libfetch/fetch.3 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 24, 2020 +.Dd October 7, 2023 .Dt FETCH 3 .Os .Sh NAME @@ -409,19 +409,6 @@ library, is currently unimplemented. .Sh HTTPS SCHEME Based on HTTP SCHEME. -By default the peer is verified using the CA bundle located in -.Pa /usr/local/etc/ssl/cert.pem . -If this file does not exist, -.Pa /etc/ssl/cert.pem -is used instead. -If neither file exists, and -.Ev SSL_CA_CERT_PATH -has not been set, -OpenSSL's default CA cert and path settings apply. -The certificate bundle can contain multiple CA certificates. -A common source of a current CA bundle is -.Pa \%security/ca_root_nss . -.Pp The CA bundle used for peer verification can be changed by setting the environment variables .Ev SSL_CA_CERT_FILE diff --git a/usr.bin/fetch/fetch.1 b/usr.bin/fetch/fetch.1 index 2737373c98bf..7238226998fc 100644 --- a/usr.bin/fetch/fetch.1 +++ b/usr.bin/fetch/fetch.1 @@ -28,7 +28,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 29, 2020 +.Dd October 7, 2023 .Dt FETCH 1 .Os .Sh NAME @@ -131,18 +131,8 @@ only. .It Fl -ca-cert= Ns Ar file [SSL] Path to certificate bundle containing trusted CA certificates. -If not specified, -.Pa /usr/local/etc/ssl/cert.pem -is used. -If this file does not exist, -.Pa /etc/ssl/cert.pem -is used instead. -If neither file exists and no CA path has been configured, +Otherwise, OpenSSL's default CA cert and path settings apply. -The certificate bundle can contain multiple CA certificates. -The -.Pa security/ca_root_nss -port is a common source of a current CA bundle. .It Fl -ca-path= Ns Ar dir [SSL] The directory From nobody Sun Oct 8 07:54: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 4S3Dw73bHLz4wysx; Sun, 8 Oct 2023 07:54: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 4S3Dw72r2Yz3Csk; Sun, 8 Oct 2023 07:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696751687; 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=xb1HFZIKVMVWz6QfxxDj/2+trxjCGD9+wyQ2kmMj8/s=; b=b86nZiJF3+Ukl8fbn/GSeCifAlvF8atYkRZKOSe0piSpB2wt7y7utwM4HikLbzay0uo15o FFduyr4cB0VMmakTF/ZZVRpZU1fqx3++N1jeVXrfAybaATw7aBhplHvKD8ZK0xfa7YbMjg YrlnihXn0jQaGDSkYT3Xl9YoBYnM9Y0A5TansgkKluvqQuBzEIPt5+rNa2XjX05wReM+kO jjlRmMQ2nSf3nXke9UPfvtHw9r9+NWkUO9CloOLMlsCzzXX0mcPBBdTCdG82mU9MnckONV CTOTvrur+cjkGCXLCLBY06nDtyRNKRZpVV0LHqUERnHWIK4SMK43y7alJvwp0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696751687; a=rsa-sha256; cv=none; b=Up3ZZt3XSjV6t8zwYzSsVEUGxsHA/u3JU8vprGtEmUUdq/4d8lRUvDELQy6BcE10RBz796 V54OF6rcwW6dm7vbE8F8vsvlaT51r/9/SR4ypUptej2QqonP0Ig1zv8YQCdrqOBknNgODU fmTrhUqHeCiw7zFlNI5+v7hDZJd4p2yuOKA8JKDv5146adrSunLo0qdg2jfr35J8ep1/yh MgWsBGXo8bLMtn3IKzJZlljMGiU8m94KIDW2+HcsTA/5HYM3W9b0NHx2XrPNTmiyk+6yXk Y3AHBiv6NQigmN65/iEfhGwQaseMmzreYC0qZLI8D9SfQCR9F9VVTcDDypTpkg== 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=1696751687; 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=xb1HFZIKVMVWz6QfxxDj/2+trxjCGD9+wyQ2kmMj8/s=; b=TU1JXqyYcjI5r5HmiABfJni+9LUktQIuarG7nVZUaGDCvE228iGwULTQ/IyyQ74S3TVnfE Mhjdjefw1GEcAd/OnXZ49ceriUwcYK7v1toRJ2LUJcPNuJ42XbvdJjNL7k7bhaz5+8Ohpd IX2RQO6kMouFLmf6uhNnzlanAS3FRulBBtus3WsyJi4NIVkmrxblhWttZWi3anjbEowW88 DkY8vNL1MKJtjWUBGA3qeuxJUppp+038T96565D7V9ackNIud1eQO7YmfGZfB38nOMlsGe lSvNQtal8+146ZGUbRdXtq0jzfqwTAA489frwd6MZpPPc4D4T5zUCtE6xT2SRA== 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 4S3Dw71mmTz14Qk; Sun, 8 Oct 2023 07:54: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 3987slUk035195; Sun, 8 Oct 2023 07:54:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3987sfTe035183; Sun, 8 Oct 2023 07:54:41 GMT (envelope-from git) Date: Sun, 8 Oct 2023 07:54:41 GMT Message-Id: <202310080754.3987sfTe035183@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: b2526e8bfe51 - main - zfs: merge openzfs/zfs@66b81b349 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: b2526e8bfe513b7d11f4aa0b7a581a17be74374e Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=b2526e8bfe513b7d11f4aa0b7a581a17be74374e commit b2526e8bfe513b7d11f4aa0b7a581a17be74374e Merge: 2821a7498f65 66b81b349749 Author: Martin Matuska AuthorDate: 2023-10-08 07:43:15 +0000 Commit: Martin Matuska CommitDate: 2023-10-08 07:43:15 +0000 zfs: merge openzfs/zfs@66b81b349 Notable upstream pull request merges: #15290 54b1b1d89 import: require force when cachefile hostid doesn't match on-disk #15319 342357cd9 Reduce number of metaslab preload taskq threads #15340 2a6c62109 ARC: Remove b_cv from struct l1arc_buf_hdr #15347 75a2eb7fa ARC: Drop different size headers for crypto #15350 96b9cf42e ARC: Remove b_bufcnt/b_ebufcnt from ARC headers #15353 66b81b349 ZIL: Reduce maximum size of WR_COPIED to 7.5K #15362 5b8688e62 zfsconcepts: add description of block cloning Obtained from: OpenZFS OpenZFS commit: 66b81b349749bc1ba11fa277bee860be03315429 sys/contrib/openzfs/.cirrus.yml | 21 ++ sys/contrib/openzfs/.gitignore | 2 +- sys/contrib/openzfs/cmd/zpool/zpool_main.c | 23 +- sys/contrib/openzfs/config/zfs-build.m4 | 3 + .../openzfs/include/os/linux/zfs/sys/trace_arc.h | 12 +- sys/contrib/openzfs/include/sys/arc_impl.h | 10 +- sys/contrib/openzfs/include/sys/metaslab_impl.h | 1 - sys/contrib/openzfs/include/sys/spa_impl.h | 4 +- sys/contrib/openzfs/man/man4/zfs.4 | 11 + sys/contrib/openzfs/man/man7/zfsconcepts.7 | 40 ++- .../openzfs/module/os/freebsd/zfs/sysctl_os.c | 22 -- sys/contrib/openzfs/module/zfs/arc.c | 322 +++++---------------- sys/contrib/openzfs/module/zfs/metaslab.c | 23 +- sys/contrib/openzfs/module/zfs/spa.c | 46 ++- sys/contrib/openzfs/module/zfs/zil.c | 17 +- sys/contrib/openzfs/rpm/generic/zfs.spec.in | 2 +- sys/contrib/openzfs/tests/runfiles/common.run | 4 + .../openzfs/tests/zfs-tests/tests/Makefile.am | 4 + ...ock_cloning_copyfilerange_fallback_same_txg.ksh | 2 + .../cli_root/zpool_import/zpool_import.cfg | 5 + .../cli_root/zpool_import/zpool_import.kshlib | 1 + .../zpool_import/zpool_import_hostid_changed.ksh | 59 ++++ .../zpool_import_hostid_changed_cachefile.ksh | 65 +++++ ...ort_hostid_changed_cachefile_unclean_export.ksh | 75 +++++ .../zpool_import_hostid_changed_unclean_export.ksh | 70 +++++ 25 files changed, 512 insertions(+), 332 deletions(-) diff --cc sys/contrib/openzfs/.cirrus.yml index 000000000000,000000000000..18b292289e20 new file mode 100644 --- /dev/null +++ b/sys/contrib/openzfs/.cirrus.yml @@@ -1,0 -1,0 +1,21 @@@ ++env: ++ CIRRUS_CLONE_DEPTH: 1 ++ ARCH: amd64 ++ ++build_task: ++ matrix: ++ freebsd_instance: ++ image_family: freebsd-12-4 ++ freebsd_instance: ++ image_family: freebsd-13-2 ++ freebsd_instance: ++ image_family: freebsd-14-0-snap ++ prepare_script: ++ - pkg install -y autoconf automake libtool gettext-runtime gmake ksh93 py39-packaging py39-cffi py39-sysctl ++ configure_script: ++ - env MAKE=gmake ./autogen.sh ++ - env MAKE=gmake ./configure --with-config="user" --with-python=3.9 ++ build_script: ++ - gmake -j `sysctl -n kern.smp.cpus` ++ install_script: ++ - gmake install diff --cc sys/contrib/openzfs/.gitignore index 8d91dd9466c5,000000000000..1ef47d921c28 mode 100644,000000..100644 --- a/sys/contrib/openzfs/.gitignore +++ b/sys/contrib/openzfs/.gitignore @@@ -1,88 -1,0 +1,88 @@@ +# +# This is the top-level .gitignore file: +# ignore everything except a list of allowed files. +# +# This is not the place for entries that are specific to +# a subdirectory. Instead add those files to the +# .gitignore file in that subdirectory. +# +# N.B. +# Please use 'git ls-files -i --exclude-standard' +# command after changing this file, to see if there are +# any tracked files which get ignored after the change. + +* + +!.github +!cmd +!config +!contrib +!etc +!include +!lib +!man +!module +!rpm +!scripts +!tests +!udev + +!.github/** +!cmd/** +!config/** +!contrib/** +!etc/** +!include/** +!lib/** +!man/** +!module/** +!rpm/** +!scripts/** +!tests/** +!udev/** + +!.editorconfig ++!.cirrus.yml +!.gitignore +!.gitmodules +!AUTHORS +!autogen.sh +!CODE_OF_CONDUCT.md +!configure.ac +!copy-builtin +!COPYRIGHT +!LICENSE +!Makefile.am +!META +!NEWS +!NOTICE +!README.md +!RELEASES.md +!TEST +!zfs.release.in + - +# +# Normal rules +# +*.[oa] +*.o.ur-safe +*.lo +*.la +*.mod.c +*~ +*.swp +*.gcno +*.gcda +*.pyc +*.pyo +.deps +.libs +.dirstamp +.DS_Store +modules.order +Makefile +Makefile.in +*.patch +*.orig +*.tmp +*.log diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_hostid_changed.ksh index 000000000000,bc82b7cc1ee8..bc82b7cc1ee8 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_hostid_changed.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_hostid_changed.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_hostid_changed_cachefile.ksh index 000000000000,07c43482d68f..07c43482d68f mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_hostid_changed_cachefile.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_hostid_changed_cachefile.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_hostid_changed_cachefile_unclean_export.ksh index 000000000000,dcb1ac1ab69f..dcb1ac1ab69f mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_hostid_changed_cachefile_unclean_export.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_hostid_changed_cachefile_unclean_export.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_hostid_changed_unclean_export.ksh index 000000000000,ad8cca642dbc..ad8cca642dbc mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_hostid_changed_unclean_export.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_hostid_changed_unclean_export.ksh From nobody Sun Oct 8 07:56: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 4S3Dxb47R4z4wywP; Sun, 8 Oct 2023 07:56:03 +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 4S3Dxb3dqWz3DN0; Sun, 8 Oct 2023 07:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696751763; 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=10l0ba9e0HuqqJXTOOICTp25RWW5+rx6cr8eYVjdAqo=; b=gvdTEclVSq8gG0iFyBs3wHB3PjDonOYJADlUUC6eKBxXsjlvOf5h6tOmaGmIW8tqV+Ix5X p+qYLAqRVs5m4hudwVYpzPztkA9xktUNpzipVjcLl9MphWyBxAVORVjrfze5zttItbEf+P ABVL0u6W4ifTJZiC7NtPFGobnZplSH/wRuKusgZIyCR1ni4hTXd2S0AwI6+0yGRlbZavZl B07fYI6Lr8PIFy5NCk+vmj3kZFlklI34vfQ49E8ecXO8yIptJLhnwOPK0rH2R1MGZFN+7j psUWXFn1Y+C+zTSiolDOq8V8JHkp8D/jaA0eyBeq3fObXlQEguGywm9+kQqs+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696751763; a=rsa-sha256; cv=none; b=MtUr6Eypvq4bfie4b4qtYslW/LhLTGmfdTiYHWgiRA3QmCqTG5b520lnKCbNC33rRTmrJM UiNeAE5qPLOCJv/AweDH9XWfgh42gmCxlGWael0yG3dOt3XFjHXhZnkZXvrZ9g/VZnFTTk mWj9iECY8R+pyk0Q7+wvDnxQi3Tt1neXeoGdoidXPNmGx5XMM/LVz/CMQiuNYKd00D+bad gYxhv/+I2z23qzvCB3vlTuNRLGCXewVwZFlakugnN+fOBZyG0ewRNBjmKyf+DV4RqjkoQY qPFC3nZDKjMv2+y9IYPAD2C0QfzSjjEUeGt7dQfOmLbvDbYgH2bAYciRSF3f9w== 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=1696751763; 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=10l0ba9e0HuqqJXTOOICTp25RWW5+rx6cr8eYVjdAqo=; b=uXipgvSFvU25HD3B2wdCsuDKwZiL9aj403dxWQhZ5BOrHHxvUlJokC1nGNquEGL7Uc1Hct u6QtUowMtNeXq/i3GBr+xvab/y80gtNuqTXDCy4VDo+CaQUabezd8flywbaIjtPnpvkj+Z IBPOtdKO64KfQc3LLQDMtV+OSfEsJ4LfgJIyI9MheeYgVff3jxvNJhjh77EezU8clpDodx t0znLrm7j0/GVxfK13k47w/Ot+nAo4Lo4aA3TMem7KFjFKzBf4ir4Wlc2MDX6Vn5ZGWB1u gBi5fzy6wP16ZvcDCfH7vjHpst8LA7A78TbhQR4/e90u9c/TqD15OpygyO4rGg== 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 4S3Dxb2hR8z151F; Sun, 8 Oct 2023 07:56: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 3987u38R035543; Sun, 8 Oct 2023 07:56:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3987u3n7035540; Sun, 8 Oct 2023 07:56:03 GMT (envelope-from git) Date: Sun, 8 Oct 2023 07:56:03 GMT Message-Id: <202310080756.3987u3n7035540@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: 9aa71bad2180 - main - zfs: update zfs_config.h and zfs_gitrev.h missing in b2526e8bfe51 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: 9aa71bad2180d3903175d9d19c47f1076637eb25 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=9aa71bad2180d3903175d9d19c47f1076637eb25 commit 9aa71bad2180d3903175d9d19c47f1076637eb25 Author: Martin Matuska AuthorDate: 2023-10-08 07:55:29 +0000 Commit: Martin Matuska CommitDate: 2023-10-08 07:55:29 +0000 zfs: update zfs_config.h and zfs_gitrev.h missing in b2526e8bfe51 --- sys/modules/zfs/zfs_config.h | 4 ++-- sys/modules/zfs/zfs_gitrev.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/modules/zfs/zfs_config.h b/sys/modules/zfs/zfs_config.h index b355e0cd6d0f..1990d5d99cb1 100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@ -1110,7 +1110,7 @@ /* #undef ZFS_IS_GPL_COMPATIBLE */ /* Define the project alias string. */ -#define ZFS_META_ALIAS "zfs-2.2.99-FreeBSD_gf795e90a1" +#define ZFS_META_ALIAS "zfs-2.2.99-FreeBSD_g66b81b349" /* Define the project author. */ #define ZFS_META_AUTHOR "OpenZFS" @@ -1140,7 +1140,7 @@ #define ZFS_META_NAME "zfs" /* Define the project release. */ -#define ZFS_META_RELEASE "FreeBSD_gf795e90a1" +#define ZFS_META_RELEASE "FreeBSD_g66b81b349" /* Define the project version. */ #define ZFS_META_VERSION "2.2.99" diff --git a/sys/modules/zfs/zfs_gitrev.h b/sys/modules/zfs/zfs_gitrev.h index 07340bf8aab7..648e4ce0811b 100644 --- a/sys/modules/zfs/zfs_gitrev.h +++ b/sys/modules/zfs/zfs_gitrev.h @@ -1 +1 @@ -#define ZFS_META_GITREV "zfs-2.2.99-125-gf795e90a1" +#define ZFS_META_GITREV "zfs-2.2.99-136-g66b81b349" From nobody Sun Oct 8 10:05: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 4S3Hpy6CvLz4w6qn; Sun, 8 Oct 2023 10:05: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 4S3Hpy5l7lz3TWT; Sun, 8 Oct 2023 10:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696759530; 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=3g0AGXVpe9Eh9x15t2WOHt/UjhKpNBfe9JG0RNWx3+4=; b=Wam0D+f2qvR9q0Fcp2pIVFWe3ckQhXpDlDpozGPJ7cWUlhwlRpx0N8tzF12OTy6TqzJ0CV 79G7A6WgabiAvU2DjxEY5HaX546vjF9LTdvb6zQPu/eiSgr75mwa7lBuDrhHTzFTnMppsN 59WrRE778FSGyCA7dbA3TFEVeaIDYwm++JBX7oh2b1Jvat4WK2L0xu5T0+R3acBSHozTP1 +tR58slzqMhZeEaF6hPrwPYCMaatbje31iuJZqmGsMUn8H1o5jeivhknMOPOXPQenTyp6Y 1wjC0LlxHlPeSotfOIqMnGqIXJ4t95pNLcpv1yWYHn/Qtd2cxBMYLWpOaVvj0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696759530; a=rsa-sha256; cv=none; b=YY96Obun7G0GbFvGGisT9DtVgoKVtJCMtGcOvk+jOcD0WdAQ79zsVBo5a2jnozDC8MiFfZ aF/EO64SFeJN32WNmM7iieUpVee2OQnZ5hx6eVX1wpSNW9rzt3vm9ORWFwCKZtyR9WOEVq nMwcMJxuHGSrteTDtu5Zw3TVU3N+biO/cEeG9pGsybMjntgf9A+8A0WpeFUjpLQ5/gbM3g dfYfNqpO7iUF3R1p5VUOavUTuItYOUyFALjTnfyaxi5V9G3IrU8flTZjmaoYbCRm3Wv0UG ewEsfomDQvvNDR5cbsBuiPlr671RZFKU/pCdyUVRiyXePmxFwGAy8bsLvmd0WA== 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=1696759530; 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=3g0AGXVpe9Eh9x15t2WOHt/UjhKpNBfe9JG0RNWx3+4=; b=SrAT3CRsKR8gW50/sISCUM/DkwN7goGJtF2QOaGE973tpnQYSlPh3ju4hQLwwK8p6JXPUY eh8wm0JBWgNVeNPbdqZerf4Xp/QBVF7przjO08x7mxx0Cb+Ssa+bwzmn99OQWjK9j883ma Z+VAoY1KajTI0d2IcOBnvkdBfmV3MJxpmTODVNpgyB3W7XZVtsnvWENoF7zZ0OO5mUvxUq 2wj1L8cgoorQ8NNNONKb7mOK/WsEhSo6CWlPxmWm3XuKTb/PiXotDPMxVSBkSyDaFUBX7J f07B4iStlaAm2IzaBSyJaGVlHYglrnt285OTd0VWPy+bZCewzgUd/Cp6bxsKXw== 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 4S3Hpy4gydz18B1; Sun, 8 Oct 2023 10:05: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 398A5U12052682; Sun, 8 Oct 2023 10:05:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 398A5UGM052679; Sun, 8 Oct 2023 10:05:30 GMT (envelope-from git) Date: Sun, 8 Oct 2023 10:05:30 GMT Message-Id: <202310081005.398A5UGM052679@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: 38ecc80b2a4e - main - tcp: Simplify the initialization of loader tunable 'net.inet.tcp.tcbhashsize' 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: 38ecc80b2a4e5e11ece83ca4df63632f0b6fa394 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=38ecc80b2a4e5e11ece83ca4df63632f0b6fa394 commit 38ecc80b2a4e5e11ece83ca4df63632f0b6fa394 Author: Zhenlei Huang AuthorDate: 2023-10-08 10:03:59 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-08 10:03:59 +0000 tcp: Simplify the initialization of loader tunable 'net.inet.tcp.tcbhashsize' No functional change intended. Reviewed by: cc, rscheff, #transport MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41998 --- sys/netinet/tcp_subr.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 696bd40f7ada..27b0eae83837 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -305,8 +305,17 @@ static int tcp_log_debug = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, log_debug, CTLFLAG_RW, &tcp_log_debug, 0, "Log errors caused by incoming TCP segments"); -static int tcp_tcbhashsize; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcbhashsize, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, +/* + * Target size of TCP PCB hash tables. Must be a power of two. + * + * Note that this can be overridden by the kernel environment + * variable net.inet.tcp.tcbhashsize + */ +#ifndef TCBHASHSIZE +#define TCBHASHSIZE 0 +#endif +static int tcp_tcbhashsize = TCBHASHSIZE; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcbhashsize, CTLFLAG_RDTUN, &tcp_tcbhashsize, 0, "Size of TCP control-block hashtable"); static int do_tcpdrain = 1; @@ -1152,16 +1161,6 @@ tcp_default_fb_fini(struct tcpcb *tp, int tcb_is_purged) return; } -/* - * Target size of TCP PCB hash tables. Must be a power of two. - * - * Note that this can be overridden by the kernel environment - * variable net.inet.tcp.tcbhashsize - */ -#ifndef TCBHASHSIZE -#define TCBHASHSIZE 0 -#endif - MALLOC_DEFINE(M_TCPLOG, "tcplog", "TCP address and flags print buffers"); MALLOC_DEFINE(M_TCPFUNCTIONS, "tcpfunc", "TCP function set memory"); @@ -1508,7 +1507,6 @@ VNET_SYSINIT(tcp_vnet_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, static void tcp_init(void *arg __unused) { - const char *tcbhash_tuneable; int hashsize; tcp_reass_global_init(); @@ -1576,9 +1574,7 @@ tcp_init(void *arg __unused) tcp_pcap_init(); #endif - hashsize = TCBHASHSIZE; - tcbhash_tuneable = "net.inet.tcp.tcbhashsize"; - TUNABLE_INT_FETCH(tcbhash_tuneable, &hashsize); + hashsize = tcp_tcbhashsize; if (hashsize == 0) { /* * Auto tune the hash size based on maxsockets. @@ -1595,7 +1591,7 @@ tcp_init(void *arg __unused) hashsize = 512; if (bootverbose) printf("%s: %s auto tuned to %d\n", __func__, - tcbhash_tuneable, hashsize); + "net.inet.tcp.tcbhashsize", hashsize); } /* * We require a hashsize to be a power of two. From nobody Sun Oct 8 13:54: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 4S3NvJ35sfz4wmKn; Sun, 8 Oct 2023 13:54: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 4S3NvJ2cnlz4Y7l; Sun, 8 Oct 2023 13:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696773276; 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=gNreMtFYKoP0vX7BNoycGycFmmxmQ1lHuhCwL2e+cf4=; b=M+IRa6s2Uu1tQ3GpmYqB6ZU5tsKJcdM+FcrN1Uejzju5u/yVFptYi9UNVt0vOR0wMOgd1Z SIIlK1NKsniXb8GiUM6c89VnRfnD0yMuZGNJU6lBgTQNGNPYG5dKzfFHxdaW7Bn4WoLky9 jZB/axKUNm/2wopBL8EMYm1CnC03l8Ru1OB2BEM0Dks7hcz/0ZryA04MFo+pUrfyRV/96c CVTO9qhts1atgzhbgEUnyzjt5XZ45MgXGSNEI/I4IwkRemh44Gv653pZspVEd0iXrBQWal Linp4cxCS0G2P4qpKTm+KfgCUXUcwQTbNSiNfW9gsw/MZ44Rpv6v8I4bgimW7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696773276; a=rsa-sha256; cv=none; b=MqoiZOB/FXBCRYnzXTFyOvbIhw2+P/5Mh7fzVsAfmA6A8reX7gkaahFKCFNRPAOCqEjXxA m97Yh38+7I/UFILChvsGT2RqFgzQZ3wWQX5yDhc7eH32OqUAMjBPPneK8hEcRtxOlcYlBn rVrWqiTXOMxp+S1FFIcqQ647ioeNAjmr558tPKu9tM88RRCi1q5OBH0kwF87oISPBRyaKf XgrvObcH+A5o8u3dkWQoHSGD9np1YBKNeBDb3qHoanonohhl5lkEj3wAE+5uFPtk0F8lRb VPH43FeCaVAofXopY5j4iVO30ZDSSJvfVZAF7laXnktzvqBpkiPMOGVfMCJfBQ== 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=1696773276; 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=gNreMtFYKoP0vX7BNoycGycFmmxmQ1lHuhCwL2e+cf4=; b=TwIS68pWPlIXu2g/J/w9NwRqxz3D7n2Z5dQvirnz+VYfy9JA2gURGgXZoX1AHG881FmpUY nvN/W4L1IjiL7KF36Ut3AKDxMVxHMQZHGPbRFnatg3+CPV983zZmhCc5XhJ46GEtcO+lqa ORWKNL6CUt4/d/Rg8ojeAll6OO3Pl3/JjegcInsBOhFkBCLSNbIeCs48THx6CicT3ll6GA Sfd+JBH1uQ/ZSZGopbhfB+SiKf9tjfi+Qtzw+tzwWxHmuOKvMamYQL3KznhfV6BCXtO48p 9IH7yxaXJ4k7vojop9xdwmjuquEAcEcJPvDUYp1J5oOd4lPhU+FAQoXrYpg6DQ== 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 4S3NvJ1gRtz1cf; Sun, 8 Oct 2023 13:54: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 398Dsab7038727; Sun, 8 Oct 2023 13:54:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 398DsaSl038724; Sun, 8 Oct 2023 13:54:36 GMT (envelope-from git) Date: Sun, 8 Oct 2023 13:54:36 GMT Message-Id: <202310081354.398DsaSl038724@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: 4b9aa38ef0e5 - main - teken: fix up unused func 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b9aa38ef0e5bedcdd90b6627cc1c215037a1121 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=4b9aa38ef0e5bedcdd90b6627cc1c215037a1121 commit 4b9aa38ef0e5bedcdd90b6627cc1c215037a1121 Author: Mateusz Guzik AuthorDate: 2023-10-08 13:54:11 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-08 13:54:11 +0000 teken: fix up unused func warnings Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/teken/teken_wcwidth.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index bc992e1ef5d8..bc40c23a6eb7 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -16,7 +16,7 @@ struct interval { }; /* auxiliary function for binary search in interval table */ -static int bisearch(teken_char_t ucs, const struct interval *table, int max) { +static inline int bisearch(teken_char_t ucs, const struct interval *table, int max) { int min = 0; int mid; @@ -35,7 +35,7 @@ static int bisearch(teken_char_t ucs, const struct interval *table, int max) { return 0; } -static int teken_wcwidth(teken_char_t ucs) +static inline int teken_wcwidth(teken_char_t ucs) { /* sorted list of non-overlapping intervals of non-spacing characters */ /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */ @@ -124,7 +124,7 @@ static int teken_wcwidth(teken_char_t ucs) * https://datatracker.ietf.org/doc/html/rfc3629#section-3 . The function * expects the 'bytes' array to start with the leading character. */ -static teken_char_t +static inline teken_char_t teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) { From nobody Sun Oct 8 13:58: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 4S3NzS0Lg3z4wn5w; Sun, 8 Oct 2023 13:58: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 4S3NzR71Dhz4Ygb; Sun, 8 Oct 2023 13:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696773492; 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=VPz7WYUpDFr2HHUBqnMV1zMEtJlAMQs8RYeUunnjjPg=; b=kfWN8uphhpjyayolNhvVAKak90gcBfO6NIS+9zBhiximnLtjj9DGreF+OOQlDPVnMziGZg vAmu4aOAsdeAb+ejvrTy9beX8L8ItH+dLkvNjwtQPQDJri5EuvXSzzvbTn/v81L/GV/Ki1 KLdoc9S9CQis9nxNudKU+QiMkrE4aG/2eOm4MzamH95/aqd+GcQDrHhiY+Oe89Om1IVkJf NBdnxWUACgoBifLCNP4xmI2kyaRUEN2iZkdT0AVGmlNehxUxeWBhif7/gQU5JEmTI7+/i4 N9scyAhLKqZiw39xplaWlNsE72+EAJUyV/YFpa4WQhf1CvDl2CqDVaM7V56D9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696773492; a=rsa-sha256; cv=none; b=CK4lgmFysehsFC00DL4cTnCgtANlC8Cm5JzzW8TN9Ldrf7QMMNwHxArr6h23RmlUVZquQU 81FAgDreA4dwmheMZjmPeGrkPblGPqcdxoitYqqx+Q5fsrHg6/1NB3GZLduHVNNnuUWKuK gDOFxDTEgpuVJ002EtCojFOTgK5Elu8sCV0xufR4zm1jvP/nqpZzdaiw7hMFLN2rGfk/Pv VYVkfg6UyhjqseUC5lDIcPBmjA/c3DdL+GLyULCyVTbh4SffN5P0Nhpsmgecx/cGYSmYzX 2apanMjY94fyKlqNd8EKdwHvm2UUE8zx3LUvyspHma0itdA7puAd8/KAnLWagA== 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=1696773492; 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=VPz7WYUpDFr2HHUBqnMV1zMEtJlAMQs8RYeUunnjjPg=; b=bZQSAtwNbWaOsoUgwUrrhxppG+oyz2Z5CVrrGvwOquphCm5zgwOhfrAwvwEOc20ERXW3xy Wjz281wNjjOQLqlhBEmfakxmA/kgjs00xleWML5Dp68MOq5l9nH5HlbU2matGDl/xRqGpg UAHB/fK5ZpuZio8o2bvv2E81eZGK/UYHEmf6pHY341dWvBPzUWDc1XyOUjmRhW26aOOVz0 FNLIFt+pOEenhSqM5iV0IpbLAHKB7xWHpLvBZxMVUJNIuK9Wb3XnHdUtkiI1mo6sk2McAk tFrWxKQcKcjzxIuQslPlU2hwAFyeJv9eH2TNEc1s2af4dQupsJtVU4vjDHnWjA== 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 4S3NzR5wZJzy0; Sun, 8 Oct 2023 13:58: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 398DwBgP039364; Sun, 8 Oct 2023 13:58:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 398DwBfJ039361; Sun, 8 Oct 2023 13:58:11 GMT (envelope-from git) Date: Sun, 8 Oct 2023 13:58:11 GMT Message-Id: <202310081358.398DwBfJ039361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Benedict Reuschling Subject: git: 3ddd961db1ce - main - mount_nfs(8): Indicate that the -t option is deprecated 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: bcr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ddd961db1ce8d9285e4d630bf6bfd5b99042a03 Auto-Submitted: auto-generated The branch main has been updated by bcr: URL: https://cgit.FreeBSD.org/src/commit/?id=3ddd961db1ce8d9285e4d630bf6bfd5b99042a03 commit 3ddd961db1ce8d9285e4d630bf6bfd5b99042a03 Author: Benedict Reuschling AuthorDate: 2023-10-08 13:47:24 +0000 Commit: Benedict Reuschling CommitDate: 2023-10-08 13:57:47 +0000 mount_nfs(8): Indicate that the -t option is deprecated In mount_nfs.c the -t option is deprecated and advises to use timeout= instead. However, since that refers to NFS over UDP, which is not used nowadays, mark this option as deprecated in the man page. PR: 260611 Suggested by: rmacklem --- sbin/mount_nfs/mount_nfs.8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/mount_nfs/mount_nfs.8 b/sbin/mount_nfs/mount_nfs.8 index 7afbc6f691a0..d7b1ffdb7543 100644 --- a/sbin/mount_nfs/mount_nfs.8 +++ b/sbin/mount_nfs/mount_nfs.8 @@ -27,7 +27,7 @@ .\" .\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" -.Dd June 14, 2023 +.Dd October 8, 2023 .Dt MOUNT_NFS 8 .Os .Sh NAME @@ -635,6 +635,7 @@ Same as .It Fl t Same as .Fl o Cm retransmit Ns = Ns Aq Ar value +(deprecated) .It Fl w Same as .Fl o Cm wsize Ns = Ns Aq Ar value From nobody Mon Oct 9 00:47: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 4S3gNL6R4bz4wRrN; Mon, 9 Oct 2023 00:47: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 4S3gNL5wX7z3JQv; Mon, 9 Oct 2023 00:47:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696812434; 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=sAeeBtGnGUjEt871NJmfqBEmboqYvb6UuHYByqU7dFM=; b=suK0f61yaRaXNEn4f2kZjxJ8vvA+UzlIP6dxhYI22Z9mYRla/uGrfwz2CZg3wKpjsqrD7H MVLl/KPBI+9hYZzuxL2A5Ej0sC+6jpj47rxZ4ujRVF8m3doqnhfftFRh7R6yXgRvw9SPbM vAo0zZtjrPZbNzoeukcd4LvPtzJ4qaVcC0AVTE7+AoegGJV3q6uCcfWxx3Uga0EhDuf8qq k794rcxeyBvqbevMcv2+n5y4Vlhvp/t43Q2yNIkQvYgsGbsq8cSg200CjGMZoOgZDCczUt YreXQKQrjXrdOoXqL+8KaJjgScjayMw0Qy7vsl25LvCVBND0XOPn2Nxf8IlAKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696812434; a=rsa-sha256; cv=none; b=LrJ5GgzFEGjLjx5o/YWOsvANxHUE+AYHFWi9glZSFtdn7GK90ZB6LhFhy3I2KNo6oZxdN+ cGhhfDaj2Vh68OgrpSPi9CAPfL7xi35uNA36zfbz6pPbwJEp5AbEi31k876SnY6lTzPI5s pcPsVLkALoTW0PJ1FGOhik7bJcS0rFNOAZ02twW9ZTkmjhCCkQYj8D+E4nmTPK8U7finm/ 4uPp/oflJM4k3K2n6rdaIsV3nLZ/3e0lDuP9T1T5k6738HQBmm35aulwo0lnL98Ys8vb1S exiubjOsFTk3xuQeDOa+pGDr7EI1TQOmhrsvaemZn61xBlvrnY7xZWQtMD1jpQ== 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=1696812434; 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=sAeeBtGnGUjEt871NJmfqBEmboqYvb6UuHYByqU7dFM=; b=PSILmEqP+fJilvB4E4ChtNfCYAxJ5QUFI/6kp3fyf9WyNlP+JuU78fucHl9P8cG6syuMxp ZCyTfgb3P00STaexT3aZFEldP6vPUkBw9W6NXgU2z1OIjU+sZfG6I+ide3sGRzkuIQMP5T YdiXsTu6DjplxkrA4JUEftkGdIetFHkT08DVBm0Ksw1BBX/pKKzOimF5nt8iKLSHD1KDXp yUDTSi5Ysymgg48sL3gnahMbLBAum24P5DX/aoPp8Xvk5crX5d9+gXm4KG8zy1H87QSvQU 5C8gJpkI+K0g9a/vQv/8dIOWL4vXdmQ7t87ukKC3M0aUZbD9rT9pOsciRMIhDQ== 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 4S3gNL4hNyzZpj; Mon, 9 Oct 2023 00:47: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 3990lElB023861; Mon, 9 Oct 2023 00:47:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3990lEua023858; Mon, 9 Oct 2023 00:47:14 GMT (envelope-from git) Date: Mon, 9 Oct 2023 00:47:14 GMT Message-Id: <202310090047.3990lEua023858@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: 6c1d6d4c7ffd - main - i386: Add a leaf PTP when pmap_enter(psind=1) creates a wired mapping 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: 6c1d6d4c7ffd81d66acd4869cfe596398df301b7 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6c1d6d4c7ffd81d66acd4869cfe596398df301b7 commit 6c1d6d4c7ffd81d66acd4869cfe596398df301b7 Author: Bojan Novković AuthorDate: 2023-10-09 00:32:35 +0000 Commit: Mark Johnston CommitDate: 2023-10-09 00:40:44 +0000 i386: Add a leaf PTP when pmap_enter(psind=1) creates a wired mapping Let pmap_enter_pde() create wired mappings. In particular, allocate a leaf PTP for use during demotion. This is a step towards reverting commit 64087fd7f372. Reviewed by: alc, kib, markj Sponsored by: Google, Inc. (GSoC 2023) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D41635 --- sys/i386/i386/pmap.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 2d19fc51dd53..6b839484e6c5 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -3973,12 +3973,11 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t newpde, u_int flags, struct spglist free; pd_entry_t oldpde, *pde; vm_page_t mt; + vm_page_t uwptpg; rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT((newpde & (PG_M | PG_RW)) != PG_RW, ("pmap_enter_pde: newpde is missing PG_M")); - KASSERT(pmap == kernel_pmap || (newpde & PG_W) == 0, - ("pmap_enter_pde: cannot create wired user mapping")); PMAP_LOCK_ASSERT(pmap, MA_OWNED); pde = pmap_pde(pmap, va); oldpde = *pde; @@ -4028,11 +4027,40 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t newpde, u_int flags, panic("pmap_enter_pde: trie insert failed"); } } + + /* + * Allocate a leaf ptpage for wired userspace pages. + */ + uwptpg = NULL; + if ((newpde & PG_W) != 0 && pmap != kernel_pmap) { + uwptpg = vm_page_alloc_noobj(VM_ALLOC_WIRED); + if (uwptpg == NULL) { + return (KERN_RESOURCE_SHORTAGE); + } + uwptpg->pindex = va >> PDRSHIFT; + if (pmap_insert_pt_page(pmap, uwptpg, true, false)) { + vm_page_unwire_noq(uwptpg); + vm_page_free(uwptpg); + return (KERN_RESOURCE_SHORTAGE); + } + pmap->pm_stats.resident_count++; + uwptpg->ref_count = NPTEPG; + } if ((newpde & PG_MANAGED) != 0) { /* * Abort this mapping if its PV entry could not be created. */ if (!pmap_pv_insert_pde(pmap, va, newpde, flags)) { + if (uwptpg != NULL) { + mt = pmap_remove_pt_page(pmap, va); + KASSERT(mt == uwptpg, + ("removed pt page %p, expected %p", mt, + uwptpg)); + pmap->pm_stats.resident_count--; + uwptpg->ref_count = 1; + vm_page_unwire_noq(uwptpg); + vm_page_free(uwptpg); + } CTR2(KTR_PMAP, "pmap_enter_pde: failure for va %#lx" " in pmap %p", va, pmap); return (KERN_RESOURCE_SHORTAGE); From nobody Mon Oct 9 00:47: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 4S3gNN0zwQz4wRxH; Mon, 9 Oct 2023 00:47:16 +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 4S3gNM6yLKz3JZ3; Mon, 9 Oct 2023 00:47:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696812436; 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=feHwnJLfMsEpSsltMHAwvaT0/vZYQIQu9Ws+uhDRLK8=; b=PodO/aGvj+t9tjAQ96y8KH9SJmv4m/ULt2aKBrM0IWgeoVfoCs6aQlOxEVmaHjWbMNcnJa vUbOglz85xHJEm36JKKbTI7g7dfZxVN+JbkxBqdzieb1gmTMWBepUE/rwB0bf8twG+adkt Q6qyZjhnVmDHTB1X9TYxZEF9i10K0kqmwXg2jj0doa79OUT16/tix/ZsGito6Q0D+fbNBj aRg+95PSNtgAgtkwNlOjkCbrSxAMFOk6Y4BtqBNVMaLzoaNd7Gzzliho7XBgA4NE/5OVSA JoOj5YnzJjfhYlRirtAd3L8hZFk3U2hYpEYOKgIoJBXGV8/Vx9h7SbihH6vq/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696812436; a=rsa-sha256; cv=none; b=E50pkBsryFPGT/MEd3Z+9U+PL/lFHoO8yHlR/rHZCzxEby8lmBH1LV5A+csRBRIM80X32B 1iFUE2wD6SJdWhvKBmSkWkPcwGmV9bGZKxzvlhW0OA5yFJ/bpkVRKW12Kb52dQfJKLJt60 HnSW9gObH9CApLsJO81w3okn07tUuxiPJ8yyoP+ltT5jtSAAaTa/w2jSkyvdkRT+MLwdaX UxuFNUwXncWH+GH2y424yvs0Ete0+hw4Vhrj34Dl2uuehQxx1IHzLVKRS4cjHCS76jfEiT KNQUMLjCU5kWKfprybTUmP09JgDlyhabEvCZwX9PP7AkAhM7PEqNIFM/Y6Udgg== 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=1696812436; 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=feHwnJLfMsEpSsltMHAwvaT0/vZYQIQu9Ws+uhDRLK8=; b=pA6ivIVuOi+wlJI1c0rlxYOZmek8s5M3tgA/7VqvELKTzt9iH+Gs/KQ2i+CI217EOnj2ha YQbrZ+uSvcQT13IEht+TeBHgTaz6DKBCFAg3Z5jYLAUM7UOzv8fv37+byDhMutjB7Yijmz uQ0udSpNOeJ/sxg8+pyj7M1wewwGlRcJbLTaU1uSWSoIeTMQ4QncZUOKBzngJaiHdWkCc3 GDBMfk8nw7zkNgtPO2TrKav35bGij9ffAafesu5zMmhnnBHa0Rl8OJcii7VEAVW5kB9NYp xmt+n/jHaMuFExqEd12hirEEjGiOpZTfIE0QOx9yvBdEjkNAFbUSrUl94VbeQw== 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 4S3gNM5lBTzb1V; Mon, 9 Oct 2023 00:47: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 3990lF3s023921; Mon, 9 Oct 2023 00:47:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3990lFQr023919; Mon, 9 Oct 2023 00:47:15 GMT (envelope-from git) Date: Mon, 9 Oct 2023 00:47:15 GMT Message-Id: <202310090047.3990lFQr023919@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: 808f5ac3c6dc - main - arm64: Add a leaf PTP when pmap_enter(psind=1) creates a wired mapping 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: 808f5ac3c6dcbe38f505c0c843b0a10ae154e6ec Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=808f5ac3c6dcbe38f505c0c843b0a10ae154e6ec commit 808f5ac3c6dcbe38f505c0c843b0a10ae154e6ec Author: Bojan Novković AuthorDate: 2023-10-09 00:38:08 +0000 Commit: Mark Johnston CommitDate: 2023-10-09 00:40:44 +0000 arm64: Add a leaf PTP when pmap_enter(psind=1) creates a wired mapping Let pmap_enter_l2() create wired mappings. In particular, allocate a leaf PTP for use during demotion. This is a step towards reverting commit 64087fd7f372. Reviewed by: alc, markj Sponsored by: Google, Inc. (GSoC 2023) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D41634 --- sys/arm64/arm64/pmap.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index a30a037c8d4a..6f2afa0b98a3 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -4797,6 +4797,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, struct spglist free; pd_entry_t *l2, old_l2; vm_page_t l2pg, mt; + vm_page_t uwptpg; PMAP_LOCK_ASSERT(pmap, MA_OWNED); KASSERT(ADDR_IS_CANONICAL(va), @@ -4864,6 +4865,24 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, } } + /* + * Allocate leaf ptpage for wired userspace pages. + */ + uwptpg = NULL; + if ((new_l2 & ATTR_SW_WIRED) != 0 && pmap != kernel_pmap) { + uwptpg = vm_page_alloc_noobj(VM_ALLOC_WIRED); + if (uwptpg == NULL) { + return (KERN_RESOURCE_SHORTAGE); + } + uwptpg->pindex = pmap_l2_pindex(va); + if (pmap_insert_pt_page(pmap, uwptpg, true, false)) { + vm_page_unwire_noq(uwptpg); + vm_page_free(uwptpg); + return (KERN_RESOURCE_SHORTAGE); + } + pmap_resident_count_inc(pmap, 1); + uwptpg->ref_count = NL3PG; + } if ((new_l2 & ATTR_SW_MANAGED) != 0) { /* * Abort this mapping if its PV entry could not be created. @@ -4871,6 +4890,16 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, if (!pmap_pv_insert_l2(pmap, va, new_l2, flags, lockp)) { if (l2pg != NULL) pmap_abort_ptp(pmap, va, l2pg); + if (uwptpg != NULL) { + mt = pmap_remove_pt_page(pmap, va); + KASSERT(mt == uwptpg, + ("removed pt page %p, expected %p", mt, + uwptpg)); + pmap_resident_count_dec(pmap, 1); + uwptpg->ref_count = 1; + vm_page_unwire_noq(uwptpg); + vm_page_free(uwptpg); + } CTR2(KTR_PMAP, "pmap_enter_l2: failure for va %#lx in pmap %p", va, pmap); From nobody Mon Oct 9 04:38:33 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 4S3mWF6PM5z4wMGX; Mon, 9 Oct 2023 04:38:33 +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 4S3mWF5scSz4Mkt; Mon, 9 Oct 2023 04:38:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696826313; 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=0AgGJ6dFERNBCn9QwSOgvGEA/mkeXL+gG/jLtW+vkpg=; b=M74aEoNtU0F930bmwOd4XqgMjfFuZyNocyzBwMdML4qQ3G/XiHRpt9gyrHAKYEYUyXekQH WSgUImnfRDN8Hqr3qrt6E962/8uA7FXLcEhIkfWRNOEOT6Ugy2SPYirNWltaevN92Xu+D/ yDuL/1a7O+v6pdwgk4hJn/rimJaokRUwcOYH07UsI4gYlD751Pq0Nw5/o/2IA9iJe6g9VF AE3MAUny9Un2KYboCISO34Pz2vGpcP9oVviNJu5P2neo4VIZs8e42FxwDaTWEssyNKAj2S Jh1LpGLep7q4D2in0B8lQmTi37KwZHX2Gy2fOiPlNNwReB6ijDeMnHrieOt2eQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696826313; a=rsa-sha256; cv=none; b=AZKGQDnJhKcg67UpqNyWQYh7nPfsp4KDbL3Nld7R9gefKuLcAg3vtVk0xTRwNY0Os4nmQp nmpe9djfEZ9fUSTHpbNxLY22XJssfDt9ZotHQ15Z9jKPt3EQq3yDI1catSO3Hc+1sWG9sO qx3hfhbRSKqWt2uQRHDCGqReEIh/C4Bw/iuTgM0WWXQqNG992SYNAyE8IlQ9I05ooDUADT i6XwHdHzRMmE7koy7ciaqaNSTDI6/ATQleLccHqLdayPvT1iAMZ9tiLNhRF4ewahuh5X68 Kk1EJJ/mQqMfOAJYzx4a47b+E/+fYxMGEYU6We0Qv2cUA6Zqm+hy4mrfM5s+8g== 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=1696826313; 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=0AgGJ6dFERNBCn9QwSOgvGEA/mkeXL+gG/jLtW+vkpg=; b=NAov7EO7TABk1nrlvXgTT73W0G65Pu9I2RwHE0vu0oFYFMHZa5O/xRRwFXJTmmhiYobvJo lgGnf6Sgo5lY2/norjZbxT0pttxOkIhKmMmOPt0frE7wtqkzYkF0ypZzrVXQlp2u2D+1Mh zpmZZz7LoBZADMk0e6HtASkCl1rITsPVPJKkKqaZkn3kQT2em8mNOwQy046uIpJALkWR15 xM0nNHjpT2GV7TISP2/0TWCebQcgY/k18rM2QEpChpdM385I/3crocQOuq4sbu5Mg/oEsg AL/OqQe0g9LSOwPVtmglw5gaKJPhGytVBWc/1b1Rh9KIzDTNkIOVQzjgl/0RfQ== 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 4S3mWF4wGgzh83; Mon, 9 Oct 2023 04:38:33 +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 3994cXh0007750; Mon, 9 Oct 2023 04:38:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3994cXkQ007747; Mon, 9 Oct 2023 04:38:33 GMT (envelope-from git) Date: Mon, 9 Oct 2023 04:38:33 GMT Message-Id: <202310090438.3994cXkQ007747@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: dac91eb76603 - main - sctp: Various fixes for loader tunables 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: dac91eb7660324677d8a2f71bd6f192422355ba1 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=dac91eb7660324677d8a2f71bd6f192422355ba1 commit dac91eb7660324677d8a2f71bd6f192422355ba1 Author: Zhenlei Huang AuthorDate: 2023-10-09 04:36:48 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-09 04:36:48 +0000 sctp: Various fixes for loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. net.inet.sctp.tcbhashsize 2. net.inet.sctp.pcbhashsize 3. net.inet.sctp.chunkscale The loader tunable 'net.inet.sctp.tcbhashsize' and 'net.inet.sctp.chunkscale' are only used during vnet initializing, thus it make no senses to make them writable tunable. Validate the values of loader tunables on vnet initialize, reset them to theirs defaults if invalid to prevent potential kernel panics. Reviewed by: tuexen, #transport, #network MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42007 --- sys/netinet/sctp_pcb.c | 8 ++++++++ sys/netinet/sctp_sysctl.c | 24 ++++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 16cde18c4c1d..a1742b2fffca 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -5676,6 +5676,11 @@ sctp_startup_mcore_threads(void) } #endif +#define VALIDATE_LOADER_TUNABLE(var_name, prefix) \ + if (SCTP_BASE_SYSCTL(var_name) < prefix##_MIN || \ + SCTP_BASE_SYSCTL(var_name) > prefix##_MAX) \ + SCTP_BASE_SYSCTL(var_name) = prefix##_DEFAULT + void sctp_pcb_init(void) { @@ -5717,6 +5722,9 @@ sctp_pcb_init(void) TUNABLE_INT_FETCH("net.inet.sctp.tcbhashsize", &SCTP_BASE_SYSCTL(sctp_hashtblsize)); TUNABLE_INT_FETCH("net.inet.sctp.pcbhashsize", &SCTP_BASE_SYSCTL(sctp_pcbtblsize)); TUNABLE_INT_FETCH("net.inet.sctp.chunkscale", &SCTP_BASE_SYSCTL(sctp_chunkscale)); + VALIDATE_LOADER_TUNABLE(sctp_hashtblsize, SCTPCTL_TCBHASHSIZE); + VALIDATE_LOADER_TUNABLE(sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE); + VALIDATE_LOADER_TUNABLE(sctp_chunkscale, SCTPCTL_CHUNKSCALE); SCTP_BASE_INFO(sctp_asochash) = SCTP_HASH_INIT((SCTP_BASE_SYSCTL(sctp_hashtblsize) * 31), &SCTP_BASE_INFO(hashasocmark)); SCTP_BASE_INFO(sctp_ephash) = SCTP_HASH_INIT(SCTP_BASE_SYSCTL(sctp_hashtblsize), diff --git a/sys/netinet/sctp_sysctl.c b/sys/netinet/sctp_sysctl.c index 851ed408092b..2c2cc58ee086 100644 --- a/sys/netinet/sctp_sysctl.c +++ b/sys/netinet/sctp_sysctl.c @@ -867,6 +867,14 @@ sctp_sysctl_handle_trace_log_clear(SYSCTL_HANDLER_ARGS) #endif #define SCTP_UINT_SYSCTL(mib_name, var_name, prefix) \ + SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, \ + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW); + +#define SCTP_UINT_SYSCTL_TUN(mib_name, var_name, prefix) \ + SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, \ + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RWTUN|CTLFLAG_NOFETCH); + +#define SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, flags) \ static int \ sctp_sysctl_handle_##mib_name(SYSCTL_HANDLER_ARGS) \ { \ @@ -885,9 +893,13 @@ sctp_sysctl_handle_trace_log_clear(SYSCTL_HANDLER_ARGS) } \ return (error); \ } \ - SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mib_name, \ - CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW, NULL, 0, \ - sctp_sysctl_handle_##mib_name, "UI", prefix##_DESC); + SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mib_name, flags, \ + NULL, 0, sctp_sysctl_handle_##mib_name, "UI", prefix##_DESC) + +#define SCTP_UINT_SYSCTL_RDTUN(mib_name, var_name, prefix) \ + SYSCTL_UINT(_net_inet_sctp, OID_AUTO, mib_name, \ + CTLFLAG_VNET|CTLFLAG_RDTUN|CTLFLAG_NOFETCH, \ + &VNET_NAME(system_base_info.sctpsysctl.var_name), 0, prefix##_DESC); /* * sysctl definitions @@ -909,10 +921,10 @@ SCTP_UINT_SYSCTL(peer_chkoh, sctp_peer_chunk_oh, SCTPCTL_PEER_CHKOH) SCTP_UINT_SYSCTL(maxburst, sctp_max_burst_default, SCTPCTL_MAXBURST) SCTP_UINT_SYSCTL(fr_maxburst, sctp_fr_max_burst_default, SCTPCTL_FRMAXBURST) SCTP_UINT_SYSCTL(maxchunks, sctp_max_chunks_on_queue, SCTPCTL_MAXCHUNKS) -SCTP_UINT_SYSCTL(tcbhashsize, sctp_hashtblsize, SCTPCTL_TCBHASHSIZE) -SCTP_UINT_SYSCTL(pcbhashsize, sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE) +SCTP_UINT_SYSCTL_RDTUN(tcbhashsize, sctp_hashtblsize, SCTPCTL_TCBHASHSIZE) +SCTP_UINT_SYSCTL_TUN(pcbhashsize, sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE) SCTP_UINT_SYSCTL(min_split_point, sctp_min_split_point, SCTPCTL_MIN_SPLIT_POINT) -SCTP_UINT_SYSCTL(chunkscale, sctp_chunkscale, SCTPCTL_CHUNKSCALE) +SCTP_UINT_SYSCTL_RDTUN(chunkscale, sctp_chunkscale, SCTPCTL_CHUNKSCALE) SCTP_UINT_SYSCTL(delayed_sack_time, sctp_delayed_sack_time_default, SCTPCTL_DELAYED_SACK_TIME) SCTP_UINT_SYSCTL(sack_freq, sctp_sack_freq_default, SCTPCTL_SACK_FREQ) SCTP_UINT_SYSCTL(sys_resource, sctp_system_free_resc_limit, SCTPCTL_SYS_RESOURCE) From nobody Mon Oct 9 04:45: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 4S3mg34Nlqz4wNdR; Mon, 9 Oct 2023 04:45: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 4S3mg33vxyz4NrZ; Mon, 9 Oct 2023 04:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696826719; 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=6gYLbdz1JzUNNbRSTauJ6HqeFI+AeRZIb1UA8VgjjgQ=; b=SPRH0+KpmMuxik4rA/CsiYMBHDoxwmgDQht/gCmwdjo1wPAU818k1v1/fiphN82zMTHXNQ 1gdxdD/bflZbyy6PTF8sPSJz+lM1JPYm4AdoeUG6p2+heVY4NjICejHNRJdvMiYw/5jpAo GIvMIe3qMgX/Ej/zMsRFk7t2oR13Q5kMb3WYEAWsJimezZ0i1QbfaHVncSOM+7VEQzR859 pQvGT3Xu3u0EOlMoTDLo6Lyba7db9CsozyMi8gkr4luvXvK3DTR8V0O9PVSSMU7XWBbV63 sM59OGF+re0yb2KDfVveZ7jfUyyNXsOO5DO0KYs3ZP0tn/U6u2ggl11Wzf6aOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696826719; a=rsa-sha256; cv=none; b=cB+HcKsQYxsil30kTR31fLxSgzZimYvIvshPaEGXUXaxIHftJzDqOs5aAa9cfCAA50vNSt He0MAedGgSGj+gVES2394AzTy+mtuLCW2x7haXGvCNPud/oZg5BxIRK3iRwE/33VC2lDnc 0inxdConzZ1COcCUW1lUI9+hY78r/7Gs1XWwk6D0yPHg/HMwS2/BXCAQYq2Hns0q5pj/2P Oc6OiGf2qA6P3j/WNFdOTbdAQOnS6pPQ9lJYboqVTwu4IkRDGkWiWbKn5djNvUqPQDrTHC ZB8sPglDhWk7/26B94QuhmrKB2P/cCKJ0egfTjLZD/LfplW2Z4x9Ic8h3A7WrA== 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=1696826719; 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=6gYLbdz1JzUNNbRSTauJ6HqeFI+AeRZIb1UA8VgjjgQ=; b=bzhC1Mw1fFl8Xe0U/upwaO4Hrskh9aLCExLT3oBV5sxQJMOyMBnC/ep+kNM3TZ6Bs9HKko n2ILX3S1VvsMQwYZBlM2U2Kcl2USZ6cEx1ALhYyZ1E37X2yFJ4SrRsg+j7lWEhzmoA987U BR9BLqQLF3nlbALQ0cAskkne4hqqzAqaBPjmjMEHR/G5e5pA1U2iwJoJgXxN7gxSmgh0Ns 1az0fA7/doZkI+JSWHH+zG4bVaDdJnbUD9/fwf3Zsd+HZGPAUUCuqNVqpZ9QrH5Zuo0l9d Fjnd69RQQ2fOAgzYdvD9QLfGHP5+wbjWXiemK6R0s7b4L4UVS2rtk3vU48LZLQ== 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 4S3mg331GQzhvR; Mon, 9 Oct 2023 04:45: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 3994jJHB023781; Mon, 9 Oct 2023 04:45:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3994jJq3023778; Mon, 9 Oct 2023 04:45:19 GMT (envelope-from git) Date: Mon, 9 Oct 2023 04:45:19 GMT Message-Id: <202310090445.3994jJq3023778@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 0d3a87569f14 - main - file_test: Fix file 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: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d3a87569f14b0e48826bbaab5e05f35669bcebf Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=0d3a87569f14b0e48826bbaab5e05f35669bcebf commit 0d3a87569f14b0e48826bbaab5e05f35669bcebf Author: Jose Luis Duran AuthorDate: 2023-10-07 12:47:29 +0000 Commit: Xin LI CommitDate: 2023-10-09 04:44:14 +0000 file_test: Fix file test Trimming of the line feed is no longer necessary after https://github.com/file/file/commit/d993c6b0db20711b2c4cb9d2bee8c7f2e59b0a43 Currently the tests: - bcachefs2 - gpkg-1-zst - multiple are failing, but a fix will be committed upstream. This also reverts c5e957ad4 "file: fix test case for gpkg by removing the extra \n." MFC after: 3 days --- contrib/file/tests/gpkg-1-zst.result | 2 +- usr.bin/file/tests/file_test.sh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/file/tests/gpkg-1-zst.result b/contrib/file/tests/gpkg-1-zst.result index 10379834d4b1..e99149450b1a 100644 --- a/contrib/file/tests/gpkg-1-zst.result +++ b/contrib/file/tests/gpkg-1-zst.result @@ -1 +1 @@ -Gentoo GLEP 78 (GPKG) binary package for "inkscape-1.2.1-r2-1" using zstd compression \ No newline at end of file +Gentoo GLEP 78 (GPKG) binary package for "inkscape-1.2.1-r2-1" using zstd compression diff --git a/usr.bin/file/tests/file_test.sh b/usr.bin/file/tests/file_test.sh index e6e398f6e51d..02d494b0f643 100644 --- a/usr.bin/file/tests/file_test.sh +++ b/usr.bin/file/tests/file_test.sh @@ -40,8 +40,7 @@ contrib_file_tests_body() { # The result files were created in UTC. TZ=Z atf_check -o save:actual_output file ${file_args} \ --brief "$testfile" - atf_check -o save:trimmed_output tr -d '\012' < actual_output - atf_check cmp trimmed_output "$result_file" + atf_check cmp actual_output "$result_file" done } From nobody Mon Oct 9 04:53: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 4S3mrl3JZqz4wPP7; Mon, 9 Oct 2023 04:53: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 4S3mrl2sWCz4Px4; Mon, 9 Oct 2023 04:53:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696827223; 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=EEztA/2fvd4viRW/6qd7UkHuezm7vKybH9SZVl/xAao=; b=vqNPSARKIu3HqgqLFgykBWDaprKGUPUNe1nd/iXPbIeAPYd3UzbeZ/48H/HYhf90jaqe23 lR2B6wK8E75kLc18nvgf/L4jitVBVVjDa3pUHypYTxfWmS6irH8k+2tIpiO7YpSrw5svtx t27RRSCSxoxsGr416fszbZpPy246PgXmaBqCPhLdbnqqiz4yIKcS6YWvqWBmmfRkZyZkzp jTicd9S8k0XUCRnX3yI9wHniAQM4yBWEOtLxEIjkYogAvQYdiNxRotW7JiQf74QSCXaQds 5o5BrsTb3goCwL31CWCXA4BpLWiz8hTh2Ungpzar3ZyaKfic7UG8BinkOtiimA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696827223; a=rsa-sha256; cv=none; b=X2hdLbm8h+tmXDx77Pvxa9fVxy4hCdurkuaXpEsDEVF1O10b4kGzCaGERm2A6v3Ir34may Rjmx8O4ush3MExw7A2m9DsR1Du4iNGqIki4pvDVjNCC76hQDPC1GctsSzPpvdX07VydXmK nJsAdemqX5m9EMJqFeIMGjXADilc2GwHxUMzt+zd7vZtsH1NCjhJ5d2Qcw7LvKhEN4qK7Z ddvhvWSK1zGyJ0Bn0vLhly2agCxwie5IAOxkECVILWgsbGuBOG+8xd4KIc1tDG6jcPcWRk +vyAmXAXohsibP9ZO8aLQued0d1VzVkq+QHaX6Oenh72PqLEn4AkGzXrT8W1hA== 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=1696827223; 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=EEztA/2fvd4viRW/6qd7UkHuezm7vKybH9SZVl/xAao=; b=cFy1W+LonxfrLpHUbHRxIoyvgoGfvm0USTxK9Kb/JxDVbhrvWZL3235sLDi1QnymIQdwxJ vwM3D08kkIC2KZH9yRmnzEIGJwRX3xK22sdjSnDiEbFhdRZmus5aVg4WKsf+HQUCsqUCXc 7amSvr69CjvoXMJYy4Cs7CQsTQ1K8KQzA+IeIvbBa5t1ChhYAApjdAd5wDcccSFSoYyVnJ x1bn9m9BAZF/xOeEOoWgCRub30BEZD/csxwe6z6OnLZKgfjRp0Mz8kJAuEfxLwdXB+xpFX eRW0UVvvtlaiVAoXY3puzMPRmsFHUW3AcLfWw4zAfLUt9NP0GqIqfqoLNM5hNw== 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 4S3mrl1whTzjNc; Mon, 9 Oct 2023 04:53: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 3994rhlY040445; Mon, 9 Oct 2023 04:53:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3994rhus040442; Mon, 9 Oct 2023 04:53:43 GMT (envelope-from git) Date: Mon, 9 Oct 2023 04:53:43 GMT Message-Id: <202310090453.3994rhus040442@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 3347078000c0 - main - (upstream) PR/386: Add newlines for consitency 2 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: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3347078000c078f2e67214ef1ba2e0bffe1aea4f Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=3347078000c078f2e67214ef1ba2e0bffe1aea4f commit 3347078000c078f2e67214ef1ba2e0bffe1aea4f Author: Jose Luis Duran AuthorDate: 2023-10-09 04:52:53 +0000 Commit: Xin LI CommitDate: 2023-10-09 04:52:53 +0000 (upstream) PR/386: Add newlines for consitency 2 Obtained from: https://github.com/file/file/pull/134/ --- contrib/file/tests/bcachefs2.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/file/tests/bcachefs2.result b/contrib/file/tests/bcachefs2.result index 9ebf64bb55bc..30fe8e8910d2 100644 --- a/contrib/file/tests/bcachefs2.result +++ b/contrib/file/tests/bcachefs2.result @@ -1 +1 @@ -bcachefs, UUID=4fa11b1e-75e6-4210-9167-34e1769c0fe1, label "Label", version 26, min version 26, device 0/UUID=0a3643b7-c515-47f8-a0ea-91fc38d043d1, 1 devices (unclean) \ No newline at end of file +bcachefs, UUID=4fa11b1e-75e6-4210-9167-34e1769c0fe1, label "Label", version 26, min version 26, device 0/UUID=0a3643b7-c515-47f8-a0ea-91fc38d043d1, 1 devices (unclean) From nobody Mon Oct 9 09:22: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 4S3tq25LcVz4x8hm; Mon, 9 Oct 2023 09:22: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 4S3tq24LjHz3Xw7; Mon, 9 Oct 2023 09:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696843358; 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=syXrdrsdw32qjazDwWzW53F9VLznMCHGsWT1oL3dPlY=; b=cVk1cndBSaxrOXEn2z48p6wmGyrr0N7CC0dZ2izosn19nnlrSuLyGp7j9rEbhOz5ZGo5ni l05JBl+cD0l/6OB67KLTgXY/DyHfq9FzQBXUwUEzxVQ1lYHrzzhFTTWpv0rpFFMEHRHNmB ItU4wCFQ6O2y0hWP8gp/qQf1/xUX0qVTNQmr4fjLYj6v/hx6mFPy4UOB8nN0jkpLa2ygZ5 ZF9uhhno1MPXeawiVSxOaAERi9vF106GIMRaBHT9V1VasMwT/MeampryH5xBGGwouzax18 0lmhfemPF5cKRx8shHiTEikJshvOvx+QP6nY3od3KHBnmFwbgSqUBAk7pULIzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696843358; a=rsa-sha256; cv=none; b=EqZXLgzKVEi6WLhCtqlsMo5pLAg+dFiGAuvuhKqHDTH44V55y1rsQ6t47wQkD0NQzaXD4I kVbeBGSA41FKp87J+sJB/h25SmF1kkI1bD3qJb9mDKUcGLItm0LeEiFXCxEfuCGXzmOLzH QSTGEEQ33G8V0CwYviiRL+ax/0wFBuzElv8d0fKJM5GCrLsLvfGjt6Mu2j5z4FZ7WUf/ly ZKEi9Ue90aIJgNv1rY8EEwbiVScjosajMIADXIBrOhxMJ7r5dk5740xDYtIoF+yXFx8A/5 xf/h1/IJgyHjen8GRNERZCKqfWIFOKH5iaVPuWWlXyLnPC9bwk0lrLL4kygv6g== 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=1696843358; 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=syXrdrsdw32qjazDwWzW53F9VLznMCHGsWT1oL3dPlY=; b=n6WTPQzHhJe/AEvAwaSLrvF+eD8aVv6bWbXnPtKYwuN7qEex5i15vVdbooovLgjlje4FCh InCGtbjorI+YdX8FcrOK+yECEZamm3n2VNrc2hL8b4N2W9NaNSX67BFtlXMApzRox5DAer HthZo/HepGZN+Lrj7g3pUhdnMXHtdqYwvPc/htKSHIVpdkYwZkw7RLtR/MO/GWfihkF8Pb IbtmliAIGQa+m6gnDgyqODySE3A8iHekTxIoTM+yjUiqU0sHHDGLo00t4sfvqYiJR3X4A4 7ibzXrewETqX8hqp9FaZdnQP9U0ak4vpW0mjSQaYFCN8zMZrrBgAjmw/47a0DA== 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 4S3tq23P7JzqMs; Mon, 9 Oct 2023 09:22: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 3999McvF090001; Mon, 9 Oct 2023 09:22:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3999McCq089998; Mon, 9 Oct 2023 09:22:38 GMT (envelope-from git) Date: Mon, 9 Oct 2023 09:22:38 GMT Message-Id: <202310090922.3999McCq089998@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: af5e348c61da - main - mtree: Add missing sound entry for /usr/examples 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af5e348c61dac360de7774fc0ecbf53ae056177c Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=af5e348c61dac360de7774fc0ecbf53ae056177c commit af5e348c61dac360de7774fc0ecbf53ae056177c Author: Emmanuel Vadot AuthorDate: 2023-10-09 09:21:53 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-09 09:22:27 +0000 mtree: Add missing sound entry for /usr/examples Sponsored by: Beckhoff Automation GmbH & Co. KG --- etc/mtree/BSD.usr.dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index f434946e4b4f..bb74c5e2e9b9 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -350,6 +350,8 @@ print .. .. + sound + ... sunrpc dir .. From nobody Mon Oct 9 10:31: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 4S3wLx5g74z4xKh2; Mon, 9 Oct 2023 10:31: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 4S3wLx59cTz3gns; Mon, 9 Oct 2023 10:31:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696847513; 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=3KerMDJXH8SMDuTJSESQEZ73KRAIW0/XxrN4AOQjJHI=; b=aCUYRnY8l2hrJKr9nxTlGC2uVFlPTkvr6MHrZwIpI0SJ9e2jdrh66gq3u9bilKwpQxjZJH lwXitzAdbRdiV1qLOkm3zkyqSVrFyGTXHPIhKtRFbcuLt4z9VjxFyg1WXVzN066PysXnEr fBHYAPbvsfITDODbLWSd5l5d2pkJGngTroAFfYAY/fS3bfe4qkur7y88mlThx604ALMJGb eQH7KTo6Xbr/XZl449eTqOn78hjdGT736DgoVmj1rxF81E4CSwabjemiCmZwtcxcZI+EXg kNImoUCjjo6s52V4/sG2/VlF8MNLY4yJU7O89KkbxYjMLM3/uvTOQ6A9KmXpXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696847513; a=rsa-sha256; cv=none; b=n8m4KLpAXVWjhn9L9f4mz3V8Z105VKieJBXe/m42KVBkdFEiinxDlvJSrk5uqawdaO8r6h tzQoe5ouUmJgiWnTFSLNwX766G0AYOXoYmjbDu4jR29cY4Gd1d7LlMOC5WDYHtVRLTvbmC zqPJPWlTtGpJrtjVSF1K6/M9dZQd9hCGngsDvGWzSPURxBidgjaNezS88fpZAM9EK+OPDa sRNbB+TsGwXdVIvZ4ffFApbN0pNW1sQvTzefIO5VxlgmEEmvf49FLPKpFi/rRod10sIepj g5NmpJF+nxzhNkZJrTO4HnQieSOR0nZmoQgH7UM5uOjl5QLqj3g65odcweGbiA== 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=1696847513; 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=3KerMDJXH8SMDuTJSESQEZ73KRAIW0/XxrN4AOQjJHI=; b=SqhAaydgWhAwbudKq8Gz/7dTtU36br+4qE0nP3lYPRXt3KFc0DAuEQeyOfoXybw1j1/GAc KF4Qp71zBAi4z324bStkj3dX+CAOWbCupN74+yuuYlF73EdpaxCbC6znmhMSwGkbmG2Jmz FumWub4T2jBIDiuFTr5s5ZYi5DOuJWCI4uaCffxABPYww1BFVzKHl+Zs2eRm3UA6zM6ofF x3EXRCUgHPfktNmebdQ3ZHPcHPDTQ8YMxymFCNfdK5AS15+ASB2znN0vKYH67CnAbx01V2 ejWzNYOvlAWNIZ2zxTfwsfNHI1VKgPxSBANkDkIa935Azq0dKFf3r9MSguIdSg== 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 4S3wLx4FtFzrrq; Mon, 9 Oct 2023 10:31: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 399AVr1N003462; Mon, 9 Oct 2023 10:31:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399AVrQ8003459; Mon, 9 Oct 2023 10:31:53 GMT (envelope-from git) Date: Mon, 9 Oct 2023 10:31:53 GMT Message-Id: <202310091031.399AVrQ8003459@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: e2ad7ce37b1a - main - cam/scsi: Add sysctl flag CTLFLAG_TUN to loader tunable 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: e2ad7ce37b1a354750d2dd3567e77f72edeb7e1d Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=e2ad7ce37b1a354750d2dd3567e77f72edeb7e1d commit e2ad7ce37b1a354750d2dd3567e77f72edeb7e1d Author: Zhenlei Huang AuthorDate: 2023-10-09 10:30:21 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-09 10:30:21 +0000 cam/scsi: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable 'kern.cam.scsi_delay' is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Reviewed by: kib, imp (for #cam) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42113 --- sys/cam/scsi/scsi_all.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c index 985547b7ce20..0e42403d74a6 100644 --- a/sys/cam/scsi/scsi_all.c +++ b/sys/cam/scsi/scsi_all.c @@ -9406,7 +9406,8 @@ sysctl_scsi_delay(SYSCTL_HANDLER_ARGS) return (set_scsi_delay(delay)); } SYSCTL_PROC(_kern_cam, OID_AUTO, scsi_delay, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 0, sysctl_scsi_delay, "I", + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, + 0, 0, sysctl_scsi_delay, "I", "Delay to allow devices to settle after a SCSI bus reset (ms)"); static int From nobody Mon Oct 9 10:31: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 4S3wLy6rjDz4xKh7; Mon, 9 Oct 2023 10:31: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 4S3wLy6D5sz4Cmr; Mon, 9 Oct 2023 10:31:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696847514; 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=0htOmwbyvN0I9oaktS9eIuM5v2V9fPe0ALgB8VTZJWo=; b=VCgU9smO7AjM3h7pudASL5Ff2LbZmNYF4kBORgwWbYQ6xNcu8TRgum/92fqBofAJy6y5J6 Rv9eG6KXvQ4cZfpUm3TF3c2ZrFvF8u/Lco3ircItsDvm/cxWHJOqNaueag3OJRvQyknLCU H9Io3RY3rFtLq3q8u1s4Ko58rYojzuiTO8BXCmOoUQ90+IpvrrV2D43BSgW5dTA44jblwt PvGrffTWIJ9Cw40p1vtYgJ3U/jy2YlJYgSgRanSAi1Fk8MpoVmO3fx+H5UHhGoNsCA3r5L 1ic0YOR1bVN9f6N+MpPBzun+s+ZTM1dwEa+NO+ikk+DOKXo+G2KHZdnTgDg6dA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696847514; a=rsa-sha256; cv=none; b=tA16yOyPLU+hxupPDoHi8srrlcCVHGjz+pXn+kGGYR1RLRX5mdGDgw96DB4kUFLcej8K/r GdTlMyk+BY3ZIvIvzE8ZDJYQ+Y5IQWefJ8oiNx3J7HHt6WB8IBiW68QbKH9ps6UhramKr4 y1gRgF+QM9W8WGGwL+RXuArqmDk7tpRuoBPsWFZzxd9eB6ui4cnvxjGrhrzq3nEDoxTQKX DNtdxt/Ec1CQf3IlBNvJy5rvGT1aWcDfhXpJ08Wh9QwVEKSj5S4EIZCF0cl0lPE3YE7tl1 6XToVHmfqiS9Z6zynEFGR6oMSIit6JqyXP39hBPlAovQQLZtLL/M/Mkh330tUQ== 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=1696847514; 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=0htOmwbyvN0I9oaktS9eIuM5v2V9fPe0ALgB8VTZJWo=; b=FvJi+74I/iUU7jy3EiIeZT8SCodf2Uloi0H8BH1O2cKZzdSH+Mj6bvHtwagU4NJ2tklTjI 1Ml6NIzVs8V72h0Kyqnyy5MEg27LYH5gh+WbrshdQdlwSprJCEaJ6WPFNhK2rQtNU5MrmU ywg7JODcKiVsvMI6aQNTfsEGCl4OyGZPl8RK5HG1ehUc8pgvBKY0AvuMwhT0Fv+tpH+uMS PuuwKbS88NvQNC0YnEW80621GzrwYHe+0FPaheyrwDFYQ+QvVqCn1lriYE+jZNDTittlUM XI+S6XBlglTrnpCTf3tsUj/aZ7sVHaPR90pn9JYV7qDekkTdg/WUn4eskGYkfg== 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 4S3wLy5GQvzsY3; Mon, 9 Oct 2023 10:31: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 399AVsc3003513; Mon, 9 Oct 2023 10:31:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399AVsNh003510; Mon, 9 Oct 2023 10:31:54 GMT (envelope-from git) Date: Mon, 9 Oct 2023 10:31:54 GMT Message-Id: <202310091031.399AVsNh003510@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: 0eb2e197896e - main - ddb: Add sysctl flag CTLFLAG_TUN to loader tunable 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: 0eb2e197896e2ec8a45730b61eeb77d5431af69f Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=0eb2e197896e2ec8a45730b61eeb77d5431af69f commit 0eb2e197896e2ec8a45730b61eeb77d5431af69f Author: Zhenlei Huang AuthorDate: 2023-10-09 10:30:21 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-09 10:30:21 +0000 ddb: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable 'debug.ddb.capture.bufsize' is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Reviewed by: kib, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42113 --- sys/ddb/db_capture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/ddb/db_capture.c b/sys/ddb/db_capture.c index 98c6e806187a..b4e598bf45cc 100644 --- a/sys/ddb/db_capture.c +++ b/sys/ddb/db_capture.c @@ -165,8 +165,8 @@ sysctl_debug_ddb_capture_bufsize(SYSCTL_HANDLER_ARGS) return (0); } SYSCTL_PROC(_debug_ddb_capture, OID_AUTO, bufsize, - CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 0, - sysctl_debug_ddb_capture_bufsize, "IU", + CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, + 0, 0, sysctl_debug_ddb_capture_bufsize, "IU", "Size of DDB capture buffer"); /* From nobody Mon Oct 9 10:31: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 4S3wM00YhXz4xKmf; Mon, 9 Oct 2023 10:31: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 4S3wM005B7z4Cpw; Mon, 9 Oct 2023 10:31:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696847516; 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=Sn8LlBJNznV0u+lqRGCrgndlzw8iaxLMYLD++h2HEUU=; b=RGkXTprjfqlYi+ZHKdczki4YsdAydLJXsGBKRpEJILTiFNA9rgQeZIcNHzbgUCCCKNN6Bj RZTm0NeX1NgMej4N+Iut6+oUuVisLG2tq+C7vkQZgKRp/PJ2XPV4YUNhH9XN6xv94je+UP zpoacsi8sF3qpIC9dr0mpuTTZxVKWd/HSyTtWUs2rFpKq5kwDkEeKRBnxy4k04n+Vqm3Kz vLcHCsFUs+sY03Mg7r7mTGXqqISUSuNYb1U9Vj5QGfBKavbJ86gXhmEtZfBcvlQalfZW+7 QRNASapSwQmXA1XPTRfa5AnaWeKUg7EC3pl/LR9XN5q/AHrZNdV3pmM7UM3apg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696847516; a=rsa-sha256; cv=none; b=a57iOcxy0MvmkIkgN4+Mp8RtU0LAiHtX1Ublk382XIAJpwTLQm8uXp76TZZDHID/7b4UpR eWF2qJ5Ru9T7hFUD0Cc5BTjv93ZsA0nnV2WEFfevBwU8DMIVjtd4msjKuxNmAxzIryzDAa CSt4LITu+iL5NbZVA7WqC7wmkp0lg06RHXH1nzv7z4K+tjxxcskQJonZ3DLZ6NzSqC8rdA FRkQ5AUS7JoS76tqBlk4/65qbD+9RpzRc7hujdcY3U6ZGlP2/dOHOwzknwIVx+kCFmrnuJ 8+loJQ7+4YykeCPkefMeLv7lxR39CUN3ITrlIooODAZalhnFMkVkAC22M/Gy6w== 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=1696847516; 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=Sn8LlBJNznV0u+lqRGCrgndlzw8iaxLMYLD++h2HEUU=; b=wcSsUgkRlCO3nBbJMxYJyHQwA35AbWfTttXWYxL71EFW3dGuJ6IA/rsbfrbnZ9BULlWabJ WTszDh2HrW9QEHbRLOchCiocD/+WCOaG12/hr21X9ZaBDm9OkJLvaiVuuLpK/IqVinx4gx HGL7eWHoYsvtJcUpeE4VkHUE24Vve5PKHY4ukvn3pR9PcAfi9n8Rfh+Tdu67uYy5c5D1WG WM8tlxxRP2h8gO1I9nR+bEVc0LSdxPX3v6xC1521x+bB+2PkxlrlTB2pCuTS7gkweRAN0m WKU0TWssc5Z+pzrYV6htTqkIx1dA8Q+aj4nH6btURh7yqTWKKYHYmmtbyFMpWw== 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 4S3wLz6Hwnzs81; Mon, 9 Oct 2023 10:31: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 399AVtf7003570; Mon, 9 Oct 2023 10:31:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399AVtIN003567; Mon, 9 Oct 2023 10:31:55 GMT (envelope-from git) Date: Mon, 9 Oct 2023 10:31:55 GMT Message-Id: <202310091031.399AVtIN003567@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: 95c01e9b3294 - main - nfscl: Add sysctl flag CTLFLAG_TUN to loader tunable 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: 95c01e9b329406699e89907167b5c3c9effbcbca Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=95c01e9b329406699e89907167b5c3c9effbcbca commit 95c01e9b329406699e89907167b5c3c9effbcbca Author: Zhenlei Huang AuthorDate: 2023-10-09 10:30:21 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-09 10:30:21 +0000 nfscl: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable 'vfs.nfs.iodmin' is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Reviewed by: kib, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42113 --- sys/fs/nfsclient/nfs_clnfsiod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clnfsiod.c b/sys/fs/nfsclient/nfs_clnfsiod.c index 5dc1d5643591..f4f97a8646f0 100644 --- a/sys/fs/nfsclient/nfs_clnfsiod.c +++ b/sys/fs/nfsclient/nfs_clnfsiod.c @@ -123,8 +123,8 @@ out: return (0); } SYSCTL_PROC(_vfs_nfs, OID_AUTO, iodmin, - CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, sizeof (nfs_iodmin), - sysctl_iodmin, "IU", + CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, + 0, sizeof (nfs_iodmin), sysctl_iodmin, "IU", "Min number of nfsiod kthreads to keep as spares"); static int From nobody Mon Oct 9 10:31: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 4S3wM11l3yz4xKrp; Mon, 9 Oct 2023 10:31: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 4S3wM10vSPz4CWb; Mon, 9 Oct 2023 10:31:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696847517; 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=3mHs/WHdBL079w5/W+asZabu9InY8GHZmqx05Y01MHw=; b=E7gg9WeYtnW+r23ZQnp8/eIHSQmvi2txnX0qUjBL04Q3HwHv3qREie+XdE0KStDAJbCp1O 3ttajJNOzFYHyFzG3fusprGV5bez6gsxC0STKA8WiYNSQHQUUVzbV8SE2UQ4Tk83UCqpT3 ckBz/3M56mvKU4LGLbZZwTv0/O2Iw1Om7Kq7covH3zSPE3+4oj2ibDNUx32QM2Ed0JM4ZM VqdwreoPUu+KGbkLpTocr5g4HTpxOTKfdcqs60ZhkpCNqGcKRvyS3Zpc8r9x8E9upjED6i 7iVEIStTxzLJBeEaP/0tvSOiuRpni2e8SCdRoSDeNUQLs78NI5NUeDGFPJjk9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696847517; a=rsa-sha256; cv=none; b=s3WlD02fgv5sG8gYKMubCgJYeu3JrJ9cActAKcL+cGTfGLQ+nl8hv0r8hF8a34q1RRnkZB kcNKctDVSxHA/m+z4s92pbfOk23gt8QefBpFoqHveAbBoRkRbKvGzt7Q2irWqk0lJOdIPN BBDADH8rsv9JyZvQtxp20MTXvNFMmjG0p3xg4Be8+iD9ybN1XJ6THm3R3DB3Wtrh4b8Jy6 AxJat2Z+3V1tdEvLEw/uApk9CNW3tv4IxlUfiT6AjRCGT2oKy618lXInWK2vdCbtQj+ulD P7rAG2/yopSnM2jGJUV5k/OMcU/l2kPHP2GTdjXabVPFvQz/hG7veIjp7Msunw== 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=1696847517; 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=3mHs/WHdBL079w5/W+asZabu9InY8GHZmqx05Y01MHw=; b=EfhzA1QWWAj9zAeqxJvFexT/JmmhqDE6MpPHqvC6kZhWy8ZjtUjw+J1lXBaPiOgseuurRW gvIpD/sTPfbGbBL1u4DFjq2DePMVM7dnBEB0mmNTKC/vcHGZYJUDYm/6v/6D4In+CzYPxG xYNzJftq86xGh5u/8DH2hXXtRfRS6pahmimgI47KdDODT3KoMAcChH0uh4Bdaai2bNq6uT s1ol8tsPo8xgZR8n9q5ANAAnfVr7Ex06Z8eSsj4lzy+wbvj1FXmQI92YhaugvV/s0IYQFh Wu6FRX83JROAqm8MVvjcW/KotwrqDWDXDzYOaJdSlerjHwxde2Op2CufdqZm3A== 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 4S3wM074fzzrjF; Mon, 9 Oct 2023 10:31: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 399AVuE7003622; Mon, 9 Oct 2023 10:31:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399AVuN5003619; Mon, 9 Oct 2023 10:31:56 GMT (envelope-from git) Date: Mon, 9 Oct 2023 10:31:56 GMT Message-Id: <202310091031.399AVuN5003619@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: 149b9c234b00 - main - x86: Add sysctl flag CTLFLAG_TUN to loader tunables 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: 149b9c234b00ff902718e1f76c809609a5465198 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=149b9c234b00ff902718e1f76c809609a5465198 commit 149b9c234b00ff902718e1f76c809609a5465198 Author: Zhenlei Huang AuthorDate: 2023-10-09 10:30:21 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-09 10:30:21 +0000 x86: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. machdep.idle 2. machdep.idle_apl31 No functional change intended. Reviewed by: kib, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42113 --- sys/x86/x86/cpu_machdep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/x86/x86/cpu_machdep.c b/sys/x86/x86/cpu_machdep.c index 868e6e2bc365..6062b4e85e16 100644 --- a/sys/x86/x86/cpu_machdep.c +++ b/sys/x86/x86/cpu_machdep.c @@ -688,7 +688,7 @@ out: } static int cpu_idle_apl31_workaround; -SYSCTL_INT(_machdep, OID_AUTO, idle_apl31, CTLFLAG_RW, +SYSCTL_INT(_machdep, OID_AUTO, idle_apl31, CTLFLAG_RWTUN | CTLFLAG_NOFETCH, &cpu_idle_apl31_workaround, 0, "Apollo Lake APL31 MWAIT bug workaround"); @@ -802,7 +802,7 @@ cpu_idle_sysctl(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_machdep, OID_AUTO, idle, - CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, + CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, 0, 0, cpu_idle_sysctl, "A", "currently selected idle function"); From nobody Mon Oct 9 10:31: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 4S3wM24wR2z4xKy0; Mon, 9 Oct 2023 10:31: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 4S3wM229qLz4D7V; Mon, 9 Oct 2023 10:31:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696847518; 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=fHdleI5VzKJwdT8lxWBYy7AGnYXRkmxZuPYaOT9NrD0=; b=ujTfaFR8yJh9BkvLqtiO5nfLM7A0Tb7BY1NrUgg+D7DYT4cbdFawNlPP/ohKS6La/moPMw VNbKBvBmKtAcU02lvc15/5uHNiQyKWBf07iUXYTAqzJRzpk6+1gvpSqijItNXLTAO2cIrs r7q9R4CjMiaV8CbwtiWEqlgRo82yKDPhhXdcIyEWeMJiR0LSC8kBg/0N40t3Nn1/SIy3M9 vitTIou3YKPg4T8mGkJUkXEvLVCJzp8v23BE6Vzaw0ptT1FWO9Ql79U8AOQ+Jvv5aGeSZs 0ACVujNAVBKy+Va3NCBwtyqcv3JPUuws1jbUhebZlajIsJJ3OlXHEsscQUcj+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696847518; a=rsa-sha256; cv=none; b=L7i09fcxu4OTBVW8GtMPG9dKIk+h2nFNGfR0193O0V33wfwCTjF5ExsFTlrmgsr2gfRiEd WNbzvCujH5Qv9Cp8QGVOPWGmversHBpHnrJG0uUi68no2U4SID78Jy2noJ5ETmJBNLreIi 1o8T+RfndhH3cgteFgRW1uWfUSzz5HSJecDl3H0SkwG+2piibhJMGnLlxgbrTUyQyx9RWe AXFsWHTWwQpFtam5XkTibiWKjIvkkCIXH+oTJphjgQcD4kiJjXdY+gsWi8PHx2VibgxBDA srPgK+XaiWF4vQbbY8kaE3oX+b48WKW2ChDQYlZAV3r58nrWzNzSCxzeVJI87g== 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=1696847518; 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=fHdleI5VzKJwdT8lxWBYy7AGnYXRkmxZuPYaOT9NrD0=; b=h1GTg7HZNyqc14LjWNJiZsQfKu07qdVIDeJGTRvj8PmcY07oaeNLtagYJw5GPMD72eF0oK v7OJeqNz8PNsN+ZuGJMgiW48GRbg9kyMdH1ltLgUhzU+vpz8RKHf0lF+Nn3mYxYdXedB5u zPmReoJwIZIjOKL+shpDK7+2ggF5whV0Eig2B9QJIApR/kOCfWb1aWH6sqbvqmWrru1Jiz U1DxpbGECj8hNPXwWU4WEvdDjydmWFMqGhXPobo9PFQbPcTO+5EM8nMSxBUtPXtQpu/bgp QMLiuPEKf3oJJtus7qw4rlaewKJx1YmcpFtoVndIvTnokJybzwmTJpS7erImXA== 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 4S3wM21Dljzrrt; Mon, 9 Oct 2023 10:31: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 399AVw4b003675; Mon, 9 Oct 2023 10:31:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399AVwBP003672; Mon, 9 Oct 2023 10:31:58 GMT (envelope-from git) Date: Mon, 9 Oct 2023 10:31:58 GMT Message-Id: <202310091031.399AVwBP003672@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: 2af5ce5b5efb - main - fd: Add sysctl flag CTLFLAG_TUN to loader tunables 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: 2af5ce5b5efb0cf6514acdc4a8b4058221641c39 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=2af5ce5b5efb0cf6514acdc4a8b4058221641c39 commit 2af5ce5b5efb0cf6514acdc4a8b4058221641c39 Author: Zhenlei Huang AuthorDate: 2023-10-09 10:30:21 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-09 10:30:21 +0000 fd: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. kern.maxfiles 2. kern.maxfilesperproc No functional change intended. Reviewed by: kib, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42113 --- sys/kern/kern_descrip.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 35046c856d54..6ed824e229d6 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -5090,10 +5090,11 @@ DB_SHOW_COMMAND_FLAGS(files, db_show_files, DB_CMD_MEMSAFE) } #endif -SYSCTL_INT(_kern, KERN_MAXFILESPERPROC, maxfilesperproc, CTLFLAG_RW, +SYSCTL_INT(_kern, KERN_MAXFILESPERPROC, maxfilesperproc, + CTLFLAG_RWTUN | CTLFLAG_NOFETCH, &maxfilesperproc, 0, "Maximum files allowed open per process"); -SYSCTL_INT(_kern, KERN_MAXFILES, maxfiles, CTLFLAG_RW, +SYSCTL_INT(_kern, KERN_MAXFILES, maxfiles, CTLFLAG_RWTUN | CTLFLAG_NOFETCH, &maxfiles, 0, "Maximum number of files"); SYSCTL_INT(_kern, OID_AUTO, openfiles, CTLFLAG_RD, From nobody Mon Oct 9 10:31: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 4S3wM34Qg1z4xKk2; Mon, 9 Oct 2023 10:31: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 4S3wM3383lz4DN8; Mon, 9 Oct 2023 10:31:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696847519; 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=kvZxTkLqvmUn/E9aK4PFUJbTdrjsa1yiiqqzVdCYa1w=; b=Wt3tbasLT+XkmQ2IHXXH6yYxgdCiYee17zdTi4MSgtaT1wRvZHO63PLz7bOv5B1bu/Mwl7 Q1+26JKofxPKjgyOKLuQOnP7WLtiVcjH2LreGqNutFwlxkcIYh/Jpxv/STu24L0yZ7w5i5 wiw+8TP4c2D2oLqp8+FHfFGy+DKIMGmSc5f74GMovc91CiilUWu7vBTL3xXFOYpuxspbNc 9cLjn9YibkeNBfd2Y9MRZdP+cJGUVr7amG9YYkylThxIa5MPUuq6VjtqASjyvFBSnRUiX4 OYcWFjFhGC7QPEE8KW5NZderLaytF9LVBX/F0RIifYD+xbw5o+ryxklzINUqSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696847519; a=rsa-sha256; cv=none; b=CxysqKsC0yo+FOBisWR1YWJCwx1LMisQHYaetxwbeuhHsRCtx5iEcTmvYyV+tBzTxRl/HW zdgHXsILfaV3d+BbJWMsaABh8ZWXvc+N1npPLEJBtgOh3SUuD+NsvXTWP5Dw61o/jcBV+i kPBXo4JkCmASXX1r1qMYbcoXEBjhG2mFneVN/OZ7pvxq47ay6wThuAKk3c62f5pw15Pi+R HZ/TZcMZBTjXHlgn1QezQWkaDfB5gsr1C8wJ75wmk/p8FoDuIdBu7VkIjLFmqEfKPbh22M gFap+nALKo4fOKZuE02gNKoThwtXrb5MMM1hc+2DlnnW1wlye1nqukBa5I3OBg== 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=1696847519; 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=kvZxTkLqvmUn/E9aK4PFUJbTdrjsa1yiiqqzVdCYa1w=; b=LL6EDIzhYkB7lCAySztCXigCcqpFhQzyk51zx6SeTxpTYk/aRR7pdMbiiB2bIALRZgB67e nW3/XNDa3EHI/Y/reSrMHGGWUOLhg7R5d8+B4d9+WFRhXxBtrozr6bs0EDtB8gN4t41ogz gHzEmG8IhcERYvXGGMHkLVUqAG2eOHS9Chn8PW55LspIYWf7yWvePqo/5oWDs9rmHlRK+R 5DMqoX0spFJreDZmBfeCkgXYXdwa48IquarKdG/T1NzxRoOnDlTvtvYJyLW1Q9JVtZ8y1y gQwmbub4cnrFCtJJcHyjNxcDTrqvOrrV7yrDkuHds3b05l84N1v8uB0Vt/GgLQ== 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 4S3wM32G26zsQc; Mon, 9 Oct 2023 10:31: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 399AVxD4003726; Mon, 9 Oct 2023 10:31:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399AVx48003723; Mon, 9 Oct 2023 10:31:59 GMT (envelope-from git) Date: Mon, 9 Oct 2023 10:31:59 GMT Message-Id: <202310091031.399AVx48003723@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: 6a88498e53b2 - main - mbuf: Add sysctl flag CTLFLAG_TUN to loader tunables 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: 6a88498e53b24d870e066c2a94910ad23dd355eb Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=6a88498e53b24d870e066c2a94910ad23dd355eb commit 6a88498e53b24d870e066c2a94910ad23dd355eb Author: Zhenlei Huang AuthorDate: 2023-10-09 10:30:22 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-09 10:30:22 +0000 mbuf: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. kern.ipc.mb_use_ext_pgs 2. kern.ipc.nmbclusters 3. kern.ipc.nmbjumbop 4. kern.ipc.nmbjumbo9 5. kern.ipc.nmbjumbo16 6. kern.ipc.nmbufs No functional change intended. Reviewed by: kib, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42113 --- sys/kern/kern_mbuf.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index 494379f53e7c..0897ac4cc2db 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -132,9 +132,9 @@ sysctl_mb_use_ext_pgs(SYSCTL_HANDLER_ARGS) } return (error); } -SYSCTL_PROC(_kern_ipc, OID_AUTO, mb_use_ext_pgs, CTLTYPE_INT | CTLFLAG_RW, - &mb_use_ext_pgs, 0, - sysctl_mb_use_ext_pgs, "IU", +SYSCTL_PROC(_kern_ipc, OID_AUTO, mb_use_ext_pgs, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, + &mb_use_ext_pgs, 0, sysctl_mb_use_ext_pgs, "IU", "Use unmapped mbufs for sendfile(2) and TLS offload"); static quad_t maxmbufmem; /* overall real memory limit for all mbufs */ @@ -222,8 +222,8 @@ sysctl_nmbclusters(SYSCTL_HANDLER_ARGS) return (error); } SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbclusters, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &nmbclusters, 0, - sysctl_nmbclusters, "IU", + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, + &nmbclusters, 0, sysctl_nmbclusters, "IU", "Maximum number of mbuf clusters allowed"); static int @@ -244,8 +244,8 @@ sysctl_nmbjumbop(SYSCTL_HANDLER_ARGS) return (error); } SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbop, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &nmbjumbop, 0, - sysctl_nmbjumbop, "IU", + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, + &nmbjumbop, 0, sysctl_nmbjumbop, "IU", "Maximum number of mbuf page size jumbo clusters allowed"); static int @@ -266,8 +266,8 @@ sysctl_nmbjumbo9(SYSCTL_HANDLER_ARGS) return (error); } SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbo9, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &nmbjumbo9, 0, - sysctl_nmbjumbo9, "IU", + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, + &nmbjumbo9, 0, sysctl_nmbjumbo9, "IU", "Maximum number of mbuf 9k jumbo clusters allowed"); static int @@ -288,8 +288,8 @@ sysctl_nmbjumbo16(SYSCTL_HANDLER_ARGS) return (error); } SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbo16, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &nmbjumbo16, 0, - sysctl_nmbjumbo16, "IU", + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, + &nmbjumbo16, 0, sysctl_nmbjumbo16, "IU", "Maximum number of mbuf 16k jumbo clusters allowed"); static int @@ -310,7 +310,7 @@ sysctl_nmbufs(SYSCTL_HANDLER_ARGS) return (error); } SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbufs, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, &nmbufs, 0, sysctl_nmbufs, "IU", "Maximum number of mbufs allowed"); From nobody Mon Oct 9 10:32: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 4S3wM451p5z4xKpx; Mon, 9 Oct 2023 10:32: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 4S3wM44FSYz4DRR; Mon, 9 Oct 2023 10:32:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696847520; 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=nhBaMlFhOk5qCO5x8pwNGMk2kpOyxJ75IS0YNIOneeQ=; b=kOsEBNWu10gxzLH+gRTnY9b94FB0fb+WIF8cAjT0rarEa+4noZA+fDlWqq7JdcUB8hmMxy pCTS4nnIjuRRRREIGcPqYybUEBihvozVyoDDWnIZUvbnMiUhSn4X9LwmY4nRc0U5qbKTmV T/qUAeySnZ7dcwaxVhxaMnH1xyLDhF9NThv5vLFh/fEWsB4O560gh2HJuxYpE3RPn1hhSm 2k/aZoLTRBbevI1XfNaJo46pm/fBEwS0ldf1uYvqzL8/7RZGFEyWDgVmo+pEZqZHHAObsm boruClMWzioV8RjmQPZ+nloLUKxEB4qH8mScy7USTZ4Hx1H+0RX8JengpmiweQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696847520; a=rsa-sha256; cv=none; b=PIjv03GeSiBLMNQHrM5bF3mk6e3mwb7Y4c4y8mzs9BjSr+sKv1nU620PLvTUY1TCyKrTX/ eTqQZluLqUNTJmXzFa/CGLZ9XV0OPeKJaWleVLfZUQeE7W2h2yrFGtyRTPKFAy8gLzB0e0 x5zK2OZ62mh4XDpoKGreLYt78VAvhXbixfVYzysBfB/wbLXuae5PqwFhLYasb2WBHOb8T0 7DWRG3Rh290EpMSccpZs9OpimWEQI3Fq1wJ/zXkud1BHtVRqP+D2qSQI7dOoXSy73DLghM nk7c2HPOS6FdHImdm0Yb3i2RBN9tK2Ld2eOnKZgVrf5RRHZMeImX2q44wkakrA== 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=1696847520; 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=nhBaMlFhOk5qCO5x8pwNGMk2kpOyxJ75IS0YNIOneeQ=; b=GsUtZH2RvTzYNGFT3Ch+JpbyWbPYCH5c0butsKfnIdvZffzx0cy9J//ku0KAQvLSmMjf7S 1qnG5pGZF1aJNW3pdShrjy5vOl8X7P8EdJt3C6o6nIm5S5yD+CCPoyUDE3fodGzEG9umiX CgPRKB8X1h18AwVEvADLYhZtgCJw0uZ57OLeC58x8+TzlT0yKdA8HJjoVPSZIvR65RVR+w Ek5ZZD/H3leyEaTg//VceRWfK+omMvIkaun9UfR0EHpDJTfOT6wwEQXOrbjX8L8jRVYAPQ KaAqIBEw0pfI1P+NWDRsdNH53j+rnEJr9y8GX+37nq/5za25Eh2K/NWN3X9XKQ== 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 4S3wM43J6bzsMt; Mon, 9 Oct 2023 10:32: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 399AW0kP003785; Mon, 9 Oct 2023 10:32:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399AW0rH003782; Mon, 9 Oct 2023 10:32:00 GMT (envelope-from git) Date: Mon, 9 Oct 2023 10:32:00 GMT Message-Id: <202310091032.399AW0rH003782@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: 978be1ee5d5f - main - sockets: Add sysctl flag CTLFLAG_TUN to loader tunable 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: 978be1ee5d5fef983b4163955e15c4269c0ec76d Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=978be1ee5d5fef983b4163955e15c4269c0ec76d commit 978be1ee5d5fef983b4163955e15c4269c0ec76d Author: Zhenlei Huang AuthorDate: 2023-10-09 10:30:22 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-09 10:30:22 +0000 sockets: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable 'kern.ipc.maxsockets' is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Reviewed by: kib, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42113 --- sys/kern/uipc_socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 3c7e5c4cb4bb..880dec89245b 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -366,8 +366,8 @@ sysctl_maxsockets(SYSCTL_HANDLER_ARGS) return (error); } SYSCTL_PROC(_kern_ipc, OID_AUTO, maxsockets, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &maxsockets, 0, - sysctl_maxsockets, "IU", + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, + &maxsockets, 0, sysctl_maxsockets, "IU", "Maximum number of sockets available"); /* From nobody Mon Oct 9 10:32: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 4S3wM566q5z4xKvC; Mon, 9 Oct 2023 10:32: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 4S3wM55CfRz4DV1; Mon, 9 Oct 2023 10:32:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696847521; 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=d4n5mBQMYltwRHy2whi1488cQHf6XrFZvOftXHI0E9w=; b=NgnP05q3tOJxH2Ruf/bYMsgvlagP/nZ5foZMeiX7L0nO5K/goSB6xVZHLTlxrqwIzbEN8u ipbYC8Kk8yqJzLdf9DNB7PLL1BNWXyZ4BBz0+6ZPsLrvQNlJyZDLLUyOWZbj18M7RUx9+L 5aYbILIFMEBlWIehEFRsMsuoMAYQzIpwO6dDfwGIVDRZGsoHQyD7Nw3yHHRcWgs5DrW9lJ gVFOHq5K7QkiEeGV0Xjoj1fD5tzTz/OcQr8hLioAX6xmj6W0CvzqpoY3rEX5xaTqqw9x1E 4wEOctyStvm4oZXy0WK8lB1OdORparVY7zGeuTwRUfjRPjA6MGrPMtD6tXdnLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696847521; a=rsa-sha256; cv=none; b=p4k9FBmnNTn3maCTY2Vbyha6qIa+F1m9DNEoOvkOLGWL8dHurl9QFCSn5G9U5b9elL5zRs 788VYu0Kk7GEYwgNS8ZlGwGOJvTrsMFdmcAojeFdHDqVUkmOHznc2HoWRxPENn0rYsw9Z5 C+V2T1hxtUCCxGz/62knsVlSdNsVX+nmd/NxGKsmo1nX8J4WAsK1eowtrDtxiNY0c4hTna aNZAGu5B+67GeeoR3aLl/XbO1kAzfOMvOChR1NW3WjRF6+3IZczUsnJ9mwoNzbe/ZyjnyP iBYYEFohTdagLSBuYv2oM0AS8QZFylTLS1hwS3Q5ZXJgU/6ISHspE9ZOzGgB2Q== 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=1696847521; 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=d4n5mBQMYltwRHy2whi1488cQHf6XrFZvOftXHI0E9w=; b=CcG81vsz2+eGWL7msLClZHo14Q6sFPvws83oKFfJ4kh4hL+wIQxiU+yG9IdQotTlOGgKmq PXHAIk92At+R3g15KTV6WKdb/kjJnPCYhv4/yGa9vx487zyX2Rh/91AzYZU9PQuZjK1+D6 T6kKzlD2yBUv414Y4BqZImH6X3ss2k2IKXLALKO7o8ten/1LRj8IJ+SQb26Mxh8IhUCPzA IBB6OE2J6OcNzjeYT6b67VCOr6AqsnILrQgRUGgt3LT2ZEyWnJxHnoh56R1E77qtSwU6xr fxZr+y1vbfYxEGmRG1ThWl71npYCxBPpiF2JTnLuUZslYErkCcRp3s24yDq8gg== 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 4S3wM54JG4zsMv; Mon, 9 Oct 2023 10:32: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 399AW1UM003838; Mon, 9 Oct 2023 10:32:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399AW1th003835; Mon, 9 Oct 2023 10:32:01 GMT (envelope-from git) Date: Mon, 9 Oct 2023 10:32:01 GMT Message-Id: <202310091032.399AW1th003835@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: 31b94065300a - main - buf: Add sysctl flag CTLFLAG_TUN to loader tunable 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: 31b94065300a76e52c26b8caec7256574d64a777 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=31b94065300a76e52c26b8caec7256574d64a777 commit 31b94065300a76e52c26b8caec7256574d64a777 Author: Zhenlei Huang AuthorDate: 2023-10-09 10:30:22 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-09 10:30:22 +0000 buf: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable 'vfs.unmapped_buf_allowed' is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Reviewed by: kib, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42113 --- sys/kern/vfs_bio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index bc09131adb87..56f9d604b9eb 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -320,7 +320,8 @@ SYSCTL_COUNTER_U64(_vfs, OID_AUTO, notbufdflushes, CTLFLAG_RD, ¬bufdflushes, static long barrierwrites; SYSCTL_LONG(_vfs, OID_AUTO, barrierwrites, CTLFLAG_RW | CTLFLAG_STATS, &barrierwrites, 0, "Number of barrier writes"); -SYSCTL_INT(_vfs, OID_AUTO, unmapped_buf_allowed, CTLFLAG_RD, +SYSCTL_INT(_vfs, OID_AUTO, unmapped_buf_allowed, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &unmapped_buf_allowed, 0, "Permit the use of the unmapped i/o"); int maxbcachebuf = MAXBCACHEBUF; From nobody Mon Oct 9 10:32:02 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 4S3wM71KsYz4xKvF; Mon, 9 Oct 2023 10:32:03 +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 4S3wM66D9Yz4DjP; Mon, 9 Oct 2023 10:32:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696847522; 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=9bSDaSvSd/HIZLOFdLG7QS0VJheRi/vOw2J560FfCCY=; b=tLYI90uiita2qOUoeHzikwWic5HaxEEOMvqzYyJJ0nQAOsYHVCi2GWMiKOyA2kVkOzdcef YI5kL5mNceeJPG23V6dHcGpIamV6bEsh4r7SSQDy9iXgSGU2MFyztq2rm1RL3mPmRRz49G B55TYJB/8HfoNhinKrhcUH14P6rM1WCDjcnrDx7fkniwk+bfBWpw+HTgafkkBhIHvcQVMb ch8fjNVLKiHxj7V/ExoxneikwZUrKIMeKE1znq/HYBPHSBJaZbUfRDMP+CzWCFecKQzTEt DV3hbM2ZKwyRuvWVh9WkgxiyQHyXqqrd9dbByxNzA3xPcEooBJ7yEJycwqx9dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696847522; a=rsa-sha256; cv=none; b=eUwkDopaRXFeJY85yRMHecEVVNofoiwDgkacJq8soRamXdrw90hs8cEG0Ocb0xcBgpFEp/ +jGgkZpSzDxp29tW2TDbE1IBI5DVS5fbh3CbJuc717o2MiIWwhrq5yftBUIWKJeY1msugn jAMCHerw8vv66yfGVTBwcNJL5VDac7vwX9kjTm5yKF9psgiSYqb5vSXr0p4hrftnC3JXHL ls4mu1pqVnxOwhggN3UoklFkcTy+fAyOsW3fpXp+PBABltDC20pMrq75CZqEK3zntT1dx9 lXte/pmNnpDA5ih/ulpwZBCrk3b8LjJ4O0gVgUN4w9zNhNDkIlF++zJrOsB3Ug== 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=1696847522; 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=9bSDaSvSd/HIZLOFdLG7QS0VJheRi/vOw2J560FfCCY=; b=PxV9mOuQ9T34gGI6nfSjXsH2CuFLIohbxBj424gqC3WPQqQkwmcpB/yMye3hueIWTAK3np U6R/H8+8t8UVwGUrNGuZh5JreKKb/wKNoVpHXwCWv2d63ZlpePeY0sBppx7NBzBnud7k5O KBWfys2uzagF2E68F2wR6HFy8URqS53CwE3KnSo5K/97KNpihYZF4gQQslUN1E9RH1N2a7 ZptDTX/fkUtWFgrW3/OjUfGCaqBK97jTHLtyKUgpNi8JCPYFA358OHL9YOelcT8UqVCYzD fhsL54ZTuqfnS6qGs8XI631MLq6HnUVdLIljoa5oIwf6wXkJTEq0EBurDlLyOA== 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 4S3wM65J6yzsY5; Mon, 9 Oct 2023 10:32:02 +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 399AW2du003893; Mon, 9 Oct 2023 10:32:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399AW25f003891; Mon, 9 Oct 2023 10:32:02 GMT (envelope-from git) Date: Mon, 9 Oct 2023 10:32:02 GMT Message-Id: <202310091032.399AW25f003891@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: 35b3be81f1d9 - main - proc: Add sysctl flag CTLFLAG_TUN to loader tunable 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: 35b3be81f1d9fe38457d9137bef7a2875d24e2c8 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=35b3be81f1d9fe38457d9137bef7a2875d24e2c8 commit 35b3be81f1d9fe38457d9137bef7a2875d24e2c8 Author: Zhenlei Huang AuthorDate: 2023-10-09 10:30:22 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-09 10:30:22 +0000 proc: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable 'kern.kstack_pages' is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Note that on arm64 the thread0 stack size can not be controlled with it, kib@ suggested that arm64 maintainers can fix it eventually so let's enable it also on arm64 right now. Reviewed by: kib, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42113 --- sys/kern/kern_proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index cccce834e284..2daf39b398b5 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -161,7 +161,8 @@ EVENTHANDLER_LIST_DEFINE(process_fork); EVENTHANDLER_LIST_DEFINE(process_exec); int kstack_pages = KSTACK_PAGES; -SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, +SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &kstack_pages, 0, "Kernel stack size in pages"); static int vmmap_skip_res_cnt = 0; SYSCTL_INT(_kern, OID_AUTO, proc_vmmap_skip_resident_count, CTLFLAG_RW, From nobody Mon Oct 9 10:39: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 4S3wX56h1nz4xLqF; Mon, 9 Oct 2023 10:39: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 4S3wX568XKz4HYv; Mon, 9 Oct 2023 10:39:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696847989; 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=ANmKjAjvfZIwYMxGhAb9MM21Bi83eblE7r9fVKoTkXA=; b=G+Ehd2VlNpoCwXHwBybytssjAkz/0EzNxCcQm1jboLsB8//Wvq5M0UtweSf5xTl81QbhuT y8JfmPeVSMCiK8DuflF1A0ycKhxssZsCpxwajF7NDRYxzxAEDoR98tRj9Xccu++K3SbqTm wsZe4gyy9SAX8MMT6T55pQeo/I2MWJkYAfDx8FDSZ7VpqR9b/KylgNNjNe29ltwJ1M0uhf 8g3QrpOtDcpHBeLj3tdmeGYJyJlNrQYfSFnppHWV1CasztRYHuIfAN6MFhZn13XT8xPDEU i15AUwHiHP4eyDiBrJIjbUhX0BC13xgqjrMiYrByIB4Rb6KicH9ontt/QgTX7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696847989; a=rsa-sha256; cv=none; b=j8HkV3gCqODZG/knc6h5P8sgT3+0gSQVG94wNY5Ubcv4gGp9IEh+5IWV17YYhc86u1U/r1 hxjOvamFekn+aOVYMtUNelMNn7nS0Rc0u6HxR9bMNJR7IC4qsDh9Ba3CH/3Tc1CpzspLl+ qP9QgfnJjZ5G3Ccww+/UAT8GVHl8epks4fqziIcpbSk+QNrZ8HsiTH1smsDfIqRU6C05pC KpT7cfdB90o+NvZbFOjPrH8hiNH5diuW1VEleKcibiLIF7OD9JjkqcEGKWCdvkW8d07MqF OYXs6VHbZGXFU8BmTSUBunIwhetYGwDmWO0QuKr80TsD/r7FR6ErYq/AeCGQWw== 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=1696847989; 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=ANmKjAjvfZIwYMxGhAb9MM21Bi83eblE7r9fVKoTkXA=; b=k9axMlOwOrgJCouIw41qXUzN0+3dcB/X5Ms93O4hm3bxO94HU9SXoZY8lOsyRBgxVrybFs O1hkEieQ0RTc9z2QC1zUdhA1yi3YSPchi1PnjcjEmeB7lFyOduoxLU2YZ13tiwSDYXjaY9 JdFrVrm8L2QWrQQ12uU4Shf8XGMUSZCxMWcOU60NpW20YCJEms8wgh/FQ1cHTfwA5T4GAS ISu7Gfk2J72vtW8O85ozy1cJtuWIft5Lite82USFssEZuT6BQ1iMIvPLRBSzda6+q75tI+ ztaSOOim/MPoWg1aoN89pLcqslM40+WwqPRDxAsvuBIkz2BIv2H1/oDIa/PTEw== 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 4S3wX55CdtzsR7; Mon, 9 Oct 2023 10:39: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 399AdneV007652; Mon, 9 Oct 2023 10:39:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399Adnsu007649; Mon, 9 Oct 2023 10:39:49 GMT (envelope-from git) Date: Mon, 9 Oct 2023 10:39:49 GMT Message-Id: <202310091039.399Adnsu007649@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: e2c6a6d29b16 - main - tcp: include RFC6675 IsLost() in pipe calculation 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: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e2c6a6d29b163f936c6f9a8020021f711768808d Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=e2c6a6d29b163f936c6f9a8020021f711768808d commit e2c6a6d29b163f936c6f9a8020021f711768808d Author: Richard Scheffenegger AuthorDate: 2023-10-09 09:55:14 +0000 Commit: Richard Scheffenegger CommitDate: 2023-10-09 10:37:20 +0000 tcp: include RFC6675 IsLost() in pipe calculation Add more accounting while processing SACK data, to keep track of when a packet is deemed lost using the RFC6675 guidance. Together with PRR (RFC6972) this allows a sender to retransmit presumed lost packets faster, and loss recovery to complete earlier. Reviewed By: cc, rrs, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D39299 --- sys/netinet/tcp_input.c | 3 +- sys/netinet/tcp_sack.c | 77 ++++++++++++++++++++++++++++++++++++++++++++----- sys/netinet/tcp_var.h | 2 ++ 3 files changed, 74 insertions(+), 8 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 11ec7d2d74d2..ba11503955dc 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -4048,7 +4048,8 @@ tcp_compute_pipe(struct tcpcb *tp) if (tp->t_fb->tfb_compute_pipe == NULL) { return (tp->snd_max - tp->snd_una + tp->sackhint.sack_bytes_rexmit - - tp->sackhint.sacked_bytes); + tp->sackhint.sacked_bytes - + tp->sackhint.lost_bytes); } else { return((*tp->t_fb->tfb_compute_pipe)(tp)); } diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index fca4b99ee83b..9a01ff684cbb 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -555,6 +555,11 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) int i, j, num_sack_blks, sack_changed; int delivered_data, left_edge_delta; + tcp_seq loss_hiack = 0; + int loss_thresh = 0; + int loss_sblks = 0; + int notlost_bytes = 0; + INP_WLOCK_ASSERT(tptoinpcb(tp)); num_sack_blks = 0; @@ -637,6 +642,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) */ tp->snd_fack = SEQ_MAX(tp->snd_una, th_ack); tp->sackhint.sacked_bytes = 0; /* reset */ + tp->sackhint.hole_bytes = 0; } /* * In the while-loop below, incoming SACK blocks (sack_blocks[]) and @@ -661,13 +667,17 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) */ if (((temp = TAILQ_LAST(&tp->snd_holes, sackhole_head)) != NULL) && SEQ_LEQ(tp->snd_fack,temp->end)) { + tp->sackhint.hole_bytes -= temp->end - temp->start; temp->start = SEQ_MAX(tp->snd_fack, SEQ_MAX(tp->snd_una, th_ack)); temp->end = sblkp->start; temp->rxmit = temp->start; delivered_data += sblkp->end - sblkp->start; + tp->sackhint.hole_bytes += temp->end - temp->start; + KASSERT(tp->sackhint.hole_bytes >= 0, + ("sackhint hole bytes >= 0")); tp->snd_fack = sblkp->end; - sblkp--; sack_changed = 1; + sblkp--; } else { /* * Append a new SACK hole at the tail. If the @@ -678,10 +688,11 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) temp = tcp_sackhole_insert(tp, tp->snd_fack,sblkp->start,NULL); if (temp != NULL) { delivered_data += sblkp->end - sblkp->start; + tp->sackhint.hole_bytes += temp->end - temp->start; tp->snd_fack = sblkp->end; + sack_changed = 1; /* Go to the previous sack block. */ sblkp--; - sack_changed = 1; } else { /* * We failed to add a new hole based on the current @@ -709,11 +720,29 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) sack_changed = 1; } cur = TAILQ_LAST(&tp->snd_holes, sackhole_head); /* Last SACK hole. */ + loss_hiack = tp->snd_fack; + /* * Since the incoming sack blocks are sorted, we can process them * making one sweep of the scoreboard. */ - while (sblkp >= sack_blocks && cur != NULL) { + while (cur != NULL) { + if (!(sblkp >= sack_blocks)) { + if (((loss_sblks >= tcprexmtthresh) || + (loss_thresh > (tcprexmtthresh-1)*tp->t_maxseg))) + break; + loss_thresh += loss_hiack - cur->end; + loss_hiack = cur->start; + loss_sblks++; + if (!((loss_sblks >= tcprexmtthresh) || + (loss_thresh > (tcprexmtthresh-1)*tp->t_maxseg))) { + notlost_bytes += cur->end - cur->start; + } else { + break; + } + cur = TAILQ_PREV(cur, sackhole_head, scblink); + continue; + } if (SEQ_GEQ(sblkp->start, cur->end)) { /* * SACKs data beyond the current hole. Go to the @@ -727,6 +756,12 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) * SACKs data before the current hole. Go to the * previous hole. */ + loss_thresh += loss_hiack - cur->end; + loss_hiack = cur->start; + loss_sblks++; + if (!((loss_sblks >= tcprexmtthresh) || + (loss_thresh > (tcprexmtthresh-1)*tp->t_maxseg))) + notlost_bytes += cur->end - cur->start; cur = TAILQ_PREV(cur, sackhole_head, scblink); continue; } @@ -742,6 +777,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) delivered_data += (cur->end - cur->start); temp = cur; cur = TAILQ_PREV(cur, sackhole_head, scblink); + tp->sackhint.hole_bytes -= temp->end - temp->start; tcp_sackhole_remove(tp, temp); /* * The sack block may ack all or part of the @@ -752,6 +788,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) } else { /* Move start of hole forward. */ delivered_data += (sblkp->end - cur->start); + tp->sackhint.hole_bytes -= sblkp->end - cur->start; cur->start = sblkp->end; cur->rxmit = SEQ_MAX(cur->rxmit, cur->start); } @@ -760,6 +797,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) if (SEQ_GEQ(sblkp->end, cur->end)) { /* Move end of hole backward. */ delivered_data += (cur->end - sblkp->start); + tp->sackhint.hole_bytes -= cur->end - sblkp->start; cur->end = sblkp->start; cur->rxmit = SEQ_MIN(cur->rxmit, cur->end); if ((tp->t_flags & TF_LRD) && SEQ_GEQ(cur->rxmit, cur->end)) @@ -778,6 +816,13 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) (SEQ_MIN(temp->rxmit, temp->end) - temp->start); } + tp->sackhint.hole_bytes -= sblkp->end - sblkp->start; + loss_thresh += loss_hiack - temp->end; + loss_hiack = temp->start; + loss_sblks++; + if (!((loss_sblks >= tcprexmtthresh) || + (loss_thresh > (tcprexmtthresh-1)*tp->t_maxseg))) + notlost_bytes += temp->end - temp->start; cur->end = sblkp->start; cur->rxmit = SEQ_MIN(cur->rxmit, cur->end); @@ -794,11 +839,25 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) * we're done with the sack block or the sack hole. * Accordingly, we advance one or the other. */ - if (SEQ_LEQ(sblkp->start, cur->start)) + if (SEQ_LEQ(sblkp->start, cur->start)) { + loss_thresh += loss_hiack - cur->end; + loss_hiack = cur->start; + loss_sblks++; + if (!((loss_sblks >= tcprexmtthresh) || + (loss_thresh > (tcprexmtthresh-1)*tp->t_maxseg))) + notlost_bytes += cur->end - cur->start; cur = TAILQ_PREV(cur, sackhole_head, scblink); - else + } else { sblkp--; + } } + + KASSERT(!(TAILQ_EMPTY(&tp->snd_holes) && (tp->sackhint.hole_bytes != 0)), + ("SACK scoreboard empty, but accounting non-zero\n")); + + KASSERT(notlost_bytes <= tp->sackhint.hole_bytes, + ("SACK: more bytes marked notlost than in scoreboard holes")); + if (!(to->to_flags & TOF_SACK)) /* * If this ACK did not contain any @@ -811,6 +870,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) sack_changed = 0; tp->sackhint.delivered_data = delivered_data; tp->sackhint.sacked_bytes += delivered_data - left_edge_delta; + tp->sackhint.lost_bytes = tp->sackhint.hole_bytes - notlost_bytes; KASSERT((delivered_data >= 0), ("delivered_data < 0")); KASSERT((tp->sackhint.sacked_bytes >= 0), ("sacked_bytes < 0")); return (sack_changed); @@ -845,6 +905,7 @@ tcp_free_sackholes(struct tcpcb *tp) void tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *th) { + struct sackhole *temp; int num_segs = 1; u_int maxseg = tcp_maxseg(tp); @@ -891,8 +952,10 @@ tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *th) highdata = SEQ_MIN(highdata, tp->snd_recover); if (th->th_ack != highdata) { tp->snd_fack = th->th_ack; - (void)tcp_sackhole_insert(tp, SEQ_MAX(th->th_ack, - highdata - maxseg), highdata, NULL); + if ((temp = tcp_sackhole_insert(tp, SEQ_MAX(th->th_ack, + highdata - maxseg), highdata, NULL)) != NULL) + tp->sackhint.hole_bytes += temp->end - + temp->start; } } (void) tcp_output(tp); diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index cd5712132522..11509a87c6e7 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -128,6 +128,8 @@ struct sackhint { uint32_t recover_fs; /* Flight Size at the start of Loss recovery */ uint32_t prr_delivered; /* Total bytes delivered using PRR */ uint32_t prr_out; /* Bytes sent during IN_RECOVERY */ + uint32_t hole_bytes; /* current number of bytes in scoreboard holes */ + uint32_t lost_bytes; /* number of rfc6675 IsLost() bytes */ }; #define SEGQ_EMPTY(tp) TAILQ_EMPTY(&(tp)->t_segq) From nobody Mon Oct 9 10:56: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 4S3wvD5Y6Xz4xP9W; Mon, 9 Oct 2023 10:56: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 4S3wvD34LBz4KBF; Mon, 9 Oct 2023 10:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696848984; 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=pi4cZAp/pqdCgi3GkM+0WXc0M63Qevsk5fCMWbGdYBo=; b=ZIp7uWqtwDFhHKS/d2SfldY0TQk2cp5ZGHkxD1S2IkX4ho1iks2fl2xcRvjLEmVH1C63y5 HNAWsGDr0C3K35CHJtFTRgql0Pu7UgKdSDAtwZa8sF1tHsA+ozmdZolnsDHn6ieyfzIaOE FPI860ki7R72PZ8Il/L+R2CN7vNZ8qKPAMPVX7/s47Nj1Pyz6aSvdVWy6ct9UawvLqohDK axS2+cq0C8HwfW7aKE2msYUhsRzY1WdKawhoNpUKkfWcwb5kJnc0Qq1IG3xkS3SPOoj4sC rdGHt4Vr7xFyK3ar2lDb0Sx481olqs2pTa9cq+p8jDlLoODaWL+iU/3PGSIB5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696848984; a=rsa-sha256; cv=none; b=q8i0rDXf/KD72qWb1PVV6VlPGBJW1gMrRjCbP73ePmPSb/Ea6y2yv8pm/m57QAon6pa20P +HKLgqCzqcd5ZZjzGLb2RU17hyytuNychLFzII3SpV9rd2+mCv2T9bGxDPES/gwTZduOW7 swARsOeHgHxnVPkEUpt2C/+T6NJBsPHZzhyxruO91zSnipKVBkD+fKHOb7r1W+8TeZ7JHV kKWVLIIS4Tohkmzi/XLJfx3QUHQQnnSpEYGPU0pOMM35SxreVtPiwOuI39P1/+EM3Tu+iW Ep84k3AYsPTRlyF4KO/XiZnA0FVJn80YGo2owlcfAH1jB8v7KyWALed5Dq8SOA== 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=1696848984; 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=pi4cZAp/pqdCgi3GkM+0WXc0M63Qevsk5fCMWbGdYBo=; b=e+Xl3nCI/zvD6Mbt+GuidUsUrYFRITC6/H4WeflABO9KfzhpBndJomXn2NUEVrSAFSp6wE pr7PArmBS20pS20UjmzLZtWY/Hi0NJO7abIgEMTzfh2KSLoF/4Chw4fvD4E7HOGZ7HyTle QZcuPFIWl3fCmRt1FO8qBFy6ZxUh2lRDP1fbXdS1zhedVoUcqgnLW46DzNZBpP9Xq8Fz0r +cMo0aEZBeEDsNGrjPIs6tbWm899Paz/h2+7S2HE28oW2ALVn/Npw4mHFLsrWPQkkPslhu CdAA9JXqlor4OpN79YMsM3gWSfbh7epdgO+beiRdNrFF7Pa1XAGSrm9cP60kJg== 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 4S3wvD29btzssf; Mon, 9 Oct 2023 10:56: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 399AuO2u040050; Mon, 9 Oct 2023 10:56:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399AuOPj040047; Mon, 9 Oct 2023 10:56:24 GMT (envelope-from git) Date: Mon, 9 Oct 2023 10:56:24 GMT Message-Id: <202310091056.399AuOPj040047@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: fee14577d590 - main - mtree: Fix entry 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fee14577d59013f2277a4b0f4b2f4108e417e7c3 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=fee14577d59013f2277a4b0f4b2f4108e417e7c3 commit fee14577d59013f2277a4b0f4b2f4108e417e7c3 Author: Emmanuel Vadot AuthorDate: 2023-10-09 10:55:32 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-09 10:56:19 +0000 mtree: Fix entry Fixes: af5e348c61da ("mtree: Add missing sound entry for /usr/examples") --- etc/mtree/BSD.usr.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index bb74c5e2e9b9..396afdb2aec1 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -351,7 +351,7 @@ .. .. sound - ... + .. sunrpc dir .. From nobody Mon Oct 9 11:49: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 4S3y4R32TXz4wHyd; Mon, 9 Oct 2023 11:49:27 +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 4S3y4R1h2kz4QSG; Mon, 9 Oct 2023 11:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696852167; 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=R8kz+Wt1q7G4Q7zod8UwnhR1GwWaKKMi13c3q2OJANw=; b=se4LCMRJ8vRCv8UymMklxx9T6cQ9VBKHsR1+rRXC1lrSROw5EcacU5WxspOr2h/sAXE2I7 aJbZDi1ZpG3SgSa2bGC6A7ZKlGBabniEk5NxIyN68ide+v8sq3aVPs1aSmVnB9ctk1i7ZY YukkK0DoeHnjVzzgMa+PNwdDWMLw8gTq9B53gNucH8T67gDCocUPYM0AC6+gYKkZ3wnnxa Qe6Qvc1+bFfOeQ+z10W6d9T4YSKHgCXdhX7n5qQEMojrz8nabiAcSVDlYg35FNMdlaUARR 0X/GMsg4MfX5b7ZWYcDxs9OqGaW8yWy0RkHG6BCHz5491T1WVyEOMdiBq2VFxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696852167; a=rsa-sha256; cv=none; b=Q9Azahk/fxTPUha5Ec9M4itO6PX3+xyzrZ0sdpIUKpK1MRFpny/3LoUVnBqCEiOPYgvKdg 4L9CYNBi67Yeqr1Bw+vPOVZH2RpgPXuWF4GHGXJaRp3YDcLGu/zcR8yY9xgTT1Qse77+Lr +lYAXAdSpxIVdQ1dBZScusR1JLMVuWVLAIvXTKyeTSSd/O08wziIwCbRjZz8KAhfYu+Kv8 U0ahWJrTe3769ih96iIYEmQcnzyqUHTaqar/tYilW+a8gnhvwQKzsRUIgZAEnNxpNTY1xB +a8I9QfvJ8qajKPwe9HOclMsDS5YxZETsClijOIZD5alT+0iOHTw9PA/tre7MA== 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=1696852167; 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=R8kz+Wt1q7G4Q7zod8UwnhR1GwWaKKMi13c3q2OJANw=; b=slXrd7POcNalBdR/fIsVGKitOC0vh5mV0A8QklcbRYgInTEwNDdj7Ip/iNOygwC7ofaZ+v /pocVow1zHSEgMhiuQjvFsoXQCCae7yL69X5aIBhihUb96RgcA+tkHAT7Bf5zziPLVW/A9 SXmBzcxqsVgE5Eu1zQCDGX+vetxDx25XrWYxQROPJpKiozGXHb+mLKlMgUj/PlWDzPFMvY 0VoawKxwMpUK4H6mLIREoo+fTcd664k5fWD1mrL3MOhIIC0ZntOIPSyFywq794B/p45dM1 OqQ2Yj1i3EsJHv4FR57FOdtxq5qdTf8AJrVQv0+AtSC5xdckHnOqRyBpbDdUpQ== 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 4S3y4R0Vx4zv4S; Mon, 9 Oct 2023 11:49:27 +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 399BnQGr024002; Mon, 9 Oct 2023 11:49:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399BnQo0023999; Mon, 9 Oct 2023 11:49:26 GMT (envelope-from git) Date: Mon, 9 Oct 2023 11:49:26 GMT Message-Id: <202310091149.399BnQo0023999@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: 3523f0677ef5 - main - fdc.4: document fdc sysctls 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: 3523f0677ef514fe72710033c73cc58517b9cda8 Auto-Submitted: auto-generated The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=3523f0677ef514fe72710033c73cc58517b9cda8 commit 3523f0677ef514fe72710033c73cc58517b9cda8 Author: Felix Johnson AuthorDate: 2023-10-09 11:46:03 +0000 Commit: Eugene Grosbein CommitDate: 2023-10-09 11:48:52 +0000 fdc.4: document fdc sysctls PR: 105608 MFC-after: 1 week --- share/man/man4/fdc.4 | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/share/man/man4/fdc.4 b/share/man/man4/fdc.4 index f42a74b3a65c..929baf3a234b 100644 --- a/share/man/man4/fdc.4 +++ b/share/man/man4/fdc.4 @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 7, 2017 +.Dd October 10, 2023 .Dt FDC 4 .Os .Sh NAME @@ -311,6 +311,61 @@ Third argument is a pointer to This type is the same as being used in the per-drive configuration flags, or in the CMOS configuration data or ACPI namespace on IA32 systems. .El +.Sh SYSCTL VARIABLES +.Bl -tag -width "debug.fdc.debugflags" +.It Dv debug.fdc.debugflags +Selectively enable debugging by setting one or more flags. +.Bl -tag -width "0x40" +.It Dv 0x01 +Dump device registers on reset. +.It Dv 0x02 +When an IO operation completes, print the number of retries +when that number is greater than zero. +.It Dv 0x04 +Print when the number of retries exceeds +.Dv debug.fdc.retries +.Pq Dv EIO . +Print when the option +.Dv FDOPT_NOERROR +is set and an error would have returned from a write operation. +.It Dv 0x08 +Print detailed IO command information. +.It Dv 0x10 +Print status registers. +.It Dv 0x20 +Print detailed status registers when interrupts complete. +Print the source code line number close to the source of a +non-zero return from a thread worker operation. +.It Dv 0x40 +Print when the disk appears to be lost. +Print cylinder, head, sector, and sector shift information +after a request to read an ID field. +Notify whether a disk probe resulted in finding a disk. +When detecting the density of media present, indicate whether +the autosensing was successful, and if so, the size of the +medium in kilobytes. +Print detailed type information when setting the drive type. +.It Dv 0x80 +Print when an unknown IOCTL is used. +.El +.It Dv debug.fdc.fifo +For enhanced controllers, allows a non-default FIFO +threshold setting. The default is 8 bytes. +.It Dv debug.fdc.retries +Maximum number of retries to attempt. The default is 10. +.It Dv debug.fdc.spec1 +Specification byte one (step-rate + head unload). +The default step rate is 6 ms. The default head unload +time is 240 ms. +.It Dv debug.fdc.spec2 +Specification byte two (head load time + no-dma). +The default head load time is 16 ms, and no-dma is 0 +.Pq disabled . +.It Dv debug.fdc.settle +Head settling time in +.Sy settle +/ hz seconds. The default value is set during device attach. +.El .Sh FILES .Bl -tag -width ".Pa /dev/fd*" -compact .It Pa /dev/fd* From nobody Mon Oct 9 16:34: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 4S44Pg6Y8Kz4x0b0; Mon, 9 Oct 2023 16:34: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 4S44Pg667Sz3YJ7; Mon, 9 Oct 2023 16:34:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696869287; 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=WlDfEIuHT9L9UKPk+DE6fHVEMUZE6Pwr4o1G6iKqxaM=; b=rIakclRnj3v7wR+P0IsHjvQVo7Ac3KFppa/8lbOmcwUekEGAZ+Yj2LHJQjFI6NQTLuJjDd wu+cM0d5Duo9dUPaBDPnfxfULP9V/swRJyvy7PWQYpG490uYi5155+9h6QNC1mL06XwNEP 7kxB128cSCf0pb6HEAqXZvwYZnULaZfkdrf3s9oVCL7cpAfW9/0GmRsSVzKTJusl0ad+m5 3N/ssWdDJhNmWlWpvaYVUcqUW+wE83udG5p0keMh8X7D634+w2PF1N2NlwyI6W6cmSoG2N W/h7Smgoe38BLDvo7q5npVogd2NnFAD+MpWPwuEhkMJQq+Fg0cY02MyksJ0jFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696869287; a=rsa-sha256; cv=none; b=jaHAI4mFexwvhSyJRsx9WnDZaHTsx/CFsLwDEjgdejdisjD8TDIexeYA6RuicQjRO7WjZZ XZGVP0rws4CIfyR6ShB96+zT2TtB1xjQxPXRIdpANBjGv9AIHdw9UuPjBME4iqhcPilB6d 8vHG3TFLrLwOp4MJDi3/ZPRlwFr4tap1LhL+51oRB+m1reQHgxQlTlgQOAgZw/ZCTxqsq3 L8//OPXXFZexu4j8uzHtf8JawyOsD3QGiXmEmEuGPgAkVLt+7tecYNwkRnNlwucW6Uokad nAlbOWNrZd1yZXF/bAQ+02Xkgx+MJeWrV7zdua11BFXPnlqLEPEm7a3EV6NdqA== 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=1696869287; 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=WlDfEIuHT9L9UKPk+DE6fHVEMUZE6Pwr4o1G6iKqxaM=; b=CXzwJOwoozpwnblKGk33QwtTRGYjPE7LQlBL/B5GizmrFES4HldTu4SGHaTxIcs/oZreno UCMBEZ87b0AMWoHEod+mMX6KU4aT20/XbcXdYi9S4eULTVM6vOLrDy7ss18E+48q44p8QL XCWfXXmVcCvOoK/hwV8gpmQzW/xB29sXYh9QGlSrx8ABbOzx4g2dNoj6TQx/LPfnDl91OV Een5ywNGY9vGRgM8bXSL3GAYrIX7DomVaddt6RSb/YnXegCIGveszGxkTtlp9r7Vck+N7F erhYk5MjdURLoxL4+J7rUQ+iGSKSqPo79UMgaeXIrMK8oGy5Ux14VZf+i1SdxQ== 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 4S44Pg59JCz13Pw; Mon, 9 Oct 2023 16:34: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 399GYlUn005541; Mon, 9 Oct 2023 16:34:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399GYl34005538; Mon, 9 Oct 2023 16:34:47 GMT (envelope-from git) Date: Mon, 9 Oct 2023 16:34:47 GMT Message-Id: <202310091634.399GYl34005538@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Benedict Reuschling Subject: git: 8120190f80f2 - main - bhyve(8): Expand the -p option text with additional text and an example 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: bcr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8120190f80f2440e44615df85c64f1ea5aa97ddb Auto-Submitted: auto-generated The branch main has been updated by bcr: URL: https://cgit.FreeBSD.org/src/commit/?id=8120190f80f2440e44615df85c64f1ea5aa97ddb commit 8120190f80f2440e44615df85c64f1ea5aa97ddb Author: Felix Johnson AuthorDate: 2023-10-09 16:32:33 +0000 Commit: Benedict Reuschling CommitDate: 2023-10-09 16:32:33 +0000 bhyve(8): Expand the -p option text with additional text and an example PR: 249981 --- usr.sbin/bhyve/bhyve.8 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index f80dd54fc2c3..759a3be6454a 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 5, 2023 +.Dd October 9, 2023 .Dt BHYVE 8 .Os .Sh NAME @@ -259,6 +259,14 @@ Pin guest's virtual CPU .Em vcpu to .Em hostcpu . +Host CPUs and guest virtual CPUs are numbered starting from 0. +A +.Fl p +option is required for every guest vCPU to be pinned. +To map a 4 vCPU guest to host CPUs 12-15: +.Bd -literal +-p 0:12 -p 1:13 -p 2:14 -p 3:15 +.Ed .It Fl r Ar file Resume a guest from a snapshot. The guest memory contents are restored from From nobody Mon Oct 9 16:44: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 4S44dQ01Xvz4x1xW; Mon, 9 Oct 2023 16:44: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 4S44dP6c3Gz3bT0; Mon, 9 Oct 2023 16:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696869897; 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=P05ppmv5ssxa/nFZsxDXPAfCZcxaiwt3ZZlcxViU8mQ=; b=Bau81uo5PvUcUuJfwkjPiHYE5GCTkV6spNZWOuR/pcgCNFDvexToa9aF7f/9LFch4Lrrjh GWZzOEgDyMo2+3PwdxbKdQEdl/aaLYZFXMbVUsspEBuVIIUVuIgSUMIGsZ9HYNKVCQYXp5 xipic097o0mi+xY5UM147iHley92UuGZv/SIdifHVGCWlWi9NNLH/3e43wjYKXRU3Y0GzK +Gmyl2eQ+KhTdp1n8fv4nEulJAhUsUAVVDufBOAevWv/NYffgp8P1/aTMEWh1kdFi+tXQH f/J284ro64/JiltiRc6pOfOQ7i2uz9pyPe2fqOFYOcmabmj+ayYlb35aqXBigg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696869897; a=rsa-sha256; cv=none; b=V4p2UCN0io3osONeWSbMosblJzr7i1yTl8aDxtOOuyceAyAgGuoSEG2EC3unjs6DJrTByk cxiC1Em94mgM9z7I6mGIQfghXjoZib7MWVbSa6PcBVYiSRtAUJ+n9jFqQzyBwQKpK7MG5T YzDl0n/m4POJ9AGtDCKCtWl602dybTB1H5E9z6HjRprEEb1K3jvW9kZa9tv+QYzeclyQKj 4JHcAvwybV1cPIESJDFSGiaUiE5xrbuRE/MnGGgx64spkDSeNXinX9iQJHKbr8ckUrrUc/ Wlb7zq37VSd7ilTl0oFRJlhU3egTwr9cYlS2d4mJDVG+PWdYAwJBEltvQ+BO7A== 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=1696869897; 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=P05ppmv5ssxa/nFZsxDXPAfCZcxaiwt3ZZlcxViU8mQ=; b=E9olH/EFxEaYmw2o28rrAOUsBkX/rJH/i4H+AcRz2Gaqv35RmAP6kywXghCyhAmY9o9oFf dNX5EtY5JhFYBmyvzyGTB8vK63zur9XAUpG6TZM4tGSprLMKYE2bgoj14fcI5neLUM6ooC jpiWQUAgj53s2jwZYb+YCWJPWHMhAQ24zmYcUSi19gwz4iWOQLGqMVnjLjlR5r/8dyHHBh 4LI4iRXsOGdalPIbk9Xi7d40jxYsgT5hEt17VP8MoFuFd22UdDz8E1mjCPZLW7xLomIlrv 6clphGx41tv+O0t/VFHiRjy5rvX8VWkMmj+IhQOuQG8pFY0lyGoZLwg18FA11Q== 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 4S44dP5ZGJz13BV; Mon, 9 Oct 2023 16:44: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 399GivIS021866; Mon, 9 Oct 2023 16:44:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399Giv58021864; Mon, 9 Oct 2023 16:44:57 GMT (envelope-from git) Date: Mon, 9 Oct 2023 16:44:57 GMT Message-Id: <202310091644.399Giv58021864@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Benedict Reuschling Subject: git: a3b3e89ff163 - main - bhyve(8): Fix style warnings emitted by mandoc, no content 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: bcr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3b3e89ff163e8f2018356ed53f78efba7c4fd2c Auto-Submitted: auto-generated The branch main has been updated by bcr: URL: https://cgit.FreeBSD.org/src/commit/?id=a3b3e89ff163e8f2018356ed53f78efba7c4fd2c commit a3b3e89ff163e8f2018356ed53f78efba7c4fd2c Author: Benedict Reuschling AuthorDate: 2023-10-09 16:43:35 +0000 Commit: Benedict Reuschling CommitDate: 2023-10-09 16:43:35 +0000 bhyve(8): Fix style warnings emitted by mandoc, no content changes --- usr.sbin/bhyve/bhyve.8 | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 759a3be6454a..a07d312250b4 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -193,8 +193,11 @@ Specify the keyboard layout. The value that can be specified sets the file name in .Ar /usr/share/bhyve/kbdlayout . This specification only works when loaded with UEFI mode for VNC. -When using a VNC client that supports QEMU Extended Key Event Message (e.g. TigerVNC), this option isn't needed. -When using a VNC client that doesn't support QEMU Extended Key Event Message (e.g. tightVNC), the layout defaults to the US keyboard unless specified otherwise. +When using a VNC client that supports QEMU Extended Key Event Message (e.g. +TigerVNC), this option isn't needed. +When using a VNC client that doesn't support QEMU Extended Key Event Message +(e.g. tightVNC), the layout defaults to the US keyboard unless specified +otherwise. .Pq Sq = , and a value. No spaces are permitted between the variable name, equals sign, or @@ -274,9 +277,9 @@ The guest memory contents are restored from and the guest device and vCPU state are restored from the file .Dq Ar file Ns .kern . .Pp -Note that the current snapshot file format requires that the configuration of -devices in the new VM match the VM from which the snapshot was taken by specifying the -same +Note that the current snapshot file format requires that the +configuration of devices in the new VM match the VM from which the +snapshot was taken by specifying the same .Fl s and .Fl l @@ -579,7 +582,8 @@ to that file. Fwcfg types: .Bl -tag -width 10n .It Ar fwcfg -The fwcfg interface is used to pass information such as the CPU count or ACPI tables to the guest firmware. +The fwcfg interface is used to pass information such as the CPU count +or ACPI tables to the guest firmware. Supported values are .Ql bhyve and @@ -594,9 +598,12 @@ It currently reports only the CPU count to the guest firmware. The .Ql qemu option uses QEMU's fwcfg interface. -This interface is widely used and allows user-defined information to be passed to the guest. -It is used for passing the CPU count, ACPI tables, a boot order and many other things to the guest. -Some operating systems such as Fedora CoreOS can be configured by qemu's fwcfg interface as well. +This interface is widely used and allows user-defined information to +be passed to the guest. +It is used for passing the CPU count, ACPI tables, a boot order and +many other things to the guest. +Some operating systems such as Fedora CoreOS can be configured by +qemu's fwcfg interface as well. .El .Pp Pass-through device backends: @@ -630,7 +637,8 @@ are: Add .Ar romfile as option ROM to the PCI device. -The ROM will be loaded by firmware and should be capable of initializing the device. +The ROM will be loaded by firmware and should be capable of +initializing the device. .It Li bootindex= Ns Ar index Add the device to the bootorder at .Ar index . @@ -949,9 +957,10 @@ Each virtual CPU is exposed to the debugger as a thread. General purpose registers can be queried for each virtual CPU, but other registers such as floating-point and system registers cannot be queried. .Ss Memory -Memory (including memory mapped I/O regions) can be read and written by the debugger. -Memory operations use virtual addresses that are resolved to physical addresses -via the current virtual CPU's active address translation. +Memory (including memory mapped I/O regions) can be read and written +by the debugger. +Memory operations use virtual addresses that are resolved to physical +addresses via the current virtual CPU's active address translation. .Ss Control The running guest can be interrupted by the debugger at any time .Pq for example, by pressing Ctrl-C in the debugger . From nobody Mon Oct 9 17:28: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 4S45bq1LBhz4x7B6; Mon, 9 Oct 2023 17:28: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 4S45bq16q7z4FV6; Mon, 9 Oct 2023 17:28:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696872519; 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=9LTF30Vt7EJ6/IGndPUBNaDXajFhYBapBX04tg8cP/8=; b=FqYL6vbEXTbxI2brsil1fIFdqGXb7ZHaybUhl8YMMQb77uSsAEjHDTsKPHL9X1Z/a9iwgS xjAwnDeooJzH6SGl84V6UeQEbyJfOnnj5eBOMpewFIfK6SDQbWrP+GCzPhwpmmFSpwH8Br BmcbuvRLEIjES0h9f05GjYTkTOmcCFXh07lS07ozZasz06sw4f+iGA2vUqR4tpS6a0ZXbM dRiQ6yVWX1XZc/JskhFdwQ4Ibe61pagOAf92rzj9DACzR+cZVnYIP5p0mhBuQ1xmXqNseW H7kjARThlZy9rzNtrO1v6oi6hFhr7MRnmvTCt/1RroroEJpUDy4vQJa1R8TCtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696872519; a=rsa-sha256; cv=none; b=JWIRwkV4tZOi4usJI1Th6i4auOjnoU5v9eE61G1GITKSChFsXNek4Wt4CzivDpxJsQIUk2 OcTFPRBZq+Fbo3LbrObI3KFZDYSOrllfxf5bY+Y/76HbWoOq+BMEtXkc9y0c4u1RI8AZxa SvFZz9d0lUAdK+7w0ANjHs+qNyYwvkSx5luEPv1B7//CGZXgnb3dgd/QtWrXljVZOlR5Ol vzwVznNjsR5LHC2emGjpcP8s4az9Rfob74UnBtnrXbr1NdSppMMhJW+oEI9c6rC7jXCN0O uu0KVktXPCAh794o1bZneKRboDRq0ij8u7/6LPezoEXBE6H3v1VwnL06H8AjTA== 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=1696872519; 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=9LTF30Vt7EJ6/IGndPUBNaDXajFhYBapBX04tg8cP/8=; b=qlyQDtomebxLGYadeC86njuX77p2febpau1ClOjqYt1oClw5kz0lqcjxbY7ypnbT6mcCXj oRTWUC1yMZvwukTmFrxX8nE35fzXAETtr4Shfy/554vbylpX4xr2IKt0QP/oTzgdhOvLz+ FORO7zrLurm5ppDStQLhjDfmPh/kPC91XH/pRI1u63U+qq1q37Gg11pvJ7Tl7W9Gfcb+oz iCvbkyHL38yVWZKCkfj87GVZrfzb7NgQ+TOyzITMdMTf5WeOehEd+vWjgBM9hwiG+KFAk4 Q+Krd11zfFDV9Uy0r+d+ehgrbHC+fwwsSafgKLcia7pji1zyM/oFNAVf211kuQ== 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 4S45bq09dvz14SX; Mon, 9 Oct 2023 17:28: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 399HScCQ088970; Mon, 9 Oct 2023 17:28:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399HScRa088967; Mon, 9 Oct 2023 17:28:38 GMT (envelope-from git) Date: Mon, 9 Oct 2023 17:28:38 GMT Message-Id: <202310091728.399HScRa088967@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: edf8578117e8 - main - ssh: Update to OpenSSH 9.5p1 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: edf8578117e8844e02c0121147f45e4609b30680 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=edf8578117e8844e02c0121147f45e4609b30680 commit edf8578117e8844e02c0121147f45e4609b30680 Merge: a3b3e89ff163 b3ced7f26826 Author: Ed Maste AuthorDate: 2023-10-09 17:28:17 +0000 Commit: Ed Maste CommitDate: 2023-10-09 17:28:17 +0000 ssh: Update to OpenSSH 9.5p1 Excerpts from the release notes: Potentially incompatible changes -------------------------------- * ssh-keygen(1): generate Ed25519 keys by default. [NOTE: This change was already merged into FreeBSD.] * sshd(8): the Subsystem directive now accurately preserves quoting of subsystem commands and arguments. New features ------------ * ssh(1): add keystroke timing obfuscation to the client. * ssh(1), sshd(8): Introduce a transport-level ping facility. * sshd(8): allow override of Sybsystem directives in sshd Match blocks. Full release notes at https://www.openssh.com/txt/release-9.5 Relnotes: Yes Sponsored by: The FreeBSD Foundation crypto/openssh/.github/ci-status.md | 4 + crypto/openssh/.github/configs | 11 + crypto/openssh/.github/setup_ci.sh | 8 + crypto/openssh/.github/workflows/c-cpp.yml | 1 + crypto/openssh/.github/workflows/selfhosted.yml | 3 + crypto/openssh/ChangeLog | 1611 +++++++---------------- crypto/openssh/PROTOCOL | 35 +- crypto/openssh/PROTOCOL.agent | 4 +- crypto/openssh/README | 2 +- crypto/openssh/auth2.c | 11 +- crypto/openssh/channels.c | 35 +- crypto/openssh/channels.h | 4 +- crypto/openssh/clientloop.c | 189 ++- crypto/openssh/configure.ac | 12 +- crypto/openssh/contrib/redhat/openssh.spec | 2 +- crypto/openssh/contrib/suse/openssh.spec | 2 +- crypto/openssh/kex.c | 55 +- crypto/openssh/kex.h | 3 +- crypto/openssh/misc.c | 29 +- crypto/openssh/misc.h | 3 +- crypto/openssh/monitor.c | 7 +- crypto/openssh/openbsd-compat/bsd-closefrom.c | 1 - crypto/openssh/packet.c | 35 +- crypto/openssh/packet.h | 3 +- crypto/openssh/readconf.c | 64 +- crypto/openssh/readconf.h | 8 +- crypto/openssh/regress/Makefile | 5 +- crypto/openssh/regress/match-subsystem.sh | 90 ++ crypto/openssh/regress/scp.sh | 24 +- crypto/openssh/regress/scp3.sh | 19 +- crypto/openssh/scp.c | 50 +- crypto/openssh/servconf.c | 107 +- crypto/openssh/servconf.h | 14 +- crypto/openssh/serverloop.c | 4 +- crypto/openssh/session.c | 15 +- crypto/openssh/sftp-client.c | 409 +++--- crypto/openssh/sftp-client.h | 76 +- crypto/openssh/sftp-glob.c | 28 +- crypto/openssh/sftp-usergroup.c | 8 +- crypto/openssh/sftp.c | 138 +- crypto/openssh/ssh-agent.1 | 8 +- crypto/openssh/ssh.c | 11 +- crypto/openssh/ssh2.h | 7 +- crypto/openssh/ssh_config.5 | 33 +- crypto/openssh/ssh_namespace.h | 3 + crypto/openssh/sshd.8 | 6 +- crypto/openssh/sshd.c | 2 +- crypto/openssh/sshd_config | 2 +- crypto/openssh/sshd_config.5 | 2 +- crypto/openssh/sshkey.c | 3 +- crypto/openssh/sshsig.c | 27 +- crypto/openssh/version.h | 6 +- 52 files changed, 1639 insertions(+), 1600 deletions(-) diff --cc crypto/openssh/auth2.c index 84377a906df4,000000000000..d2a420d0deec mode 100644,000000..100644 --- a/crypto/openssh/auth2.c +++ b/crypto/openssh/auth2.c @@@ -1,847 -1,0 +1,854 @@@ - /* $OpenBSD: auth2.c,v 1.166 2023/03/08 04:43:12 guenther Exp $ */ ++/* $OpenBSD: auth2.c,v 1.167 2023/08/28 09:48:11 djm Exp $ */ +/* + * Copyright (c) 2000 Markus Friedl. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "includes.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "stdlib.h" +#include "atomicio.h" +#include "xmalloc.h" +#include "ssh2.h" +#include "packet.h" +#include "log.h" +#include "sshbuf.h" +#include "misc.h" +#include "servconf.h" +#include "sshkey.h" +#include "hostfile.h" +#include "auth.h" +#include "dispatch.h" +#include "pathnames.h" +#include "ssherr.h" +#include "blacklist_client.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif +#include "monitor_wrap.h" +#include "digest.h" + +/* import */ +extern ServerOptions options; +extern struct sshbuf *loginmsg; + +/* methods */ + +extern Authmethod method_none; +extern Authmethod method_pubkey; +extern Authmethod method_passwd; +extern Authmethod method_kbdint; +extern Authmethod method_hostbased; +#ifdef GSSAPI +extern Authmethod method_gssapi; +#endif + +Authmethod *authmethods[] = { + &method_none, + &method_pubkey, +#ifdef GSSAPI + &method_gssapi, +#endif + &method_passwd, + &method_kbdint, + &method_hostbased, + NULL +}; + +/* protocol */ + +static int input_service_request(int, u_int32_t, struct ssh *); +static int input_userauth_request(int, u_int32_t, struct ssh *); + +/* helper */ +static Authmethod *authmethod_byname(const char *); +static Authmethod *authmethod_lookup(Authctxt *, const char *); +static char *authmethods_get(Authctxt *authctxt); + +#define MATCH_NONE 0 /* method or submethod mismatch */ +#define MATCH_METHOD 1 /* method matches (no submethod specified) */ +#define MATCH_BOTH 2 /* method and submethod match */ +#define MATCH_PARTIAL 3 /* method matches, submethod can't be checked */ +static int list_starts_with(const char *, const char *, const char *); + +char * +auth2_read_banner(void) +{ + struct stat st; + char *banner = NULL; + size_t len, n; + int fd; + + if ((fd = open(options.banner, O_RDONLY)) == -1) + return (NULL); + if (fstat(fd, &st) == -1) { + close(fd); + return (NULL); + } + if (st.st_size <= 0 || st.st_size > 1*1024*1024) { + close(fd); + return (NULL); + } + + len = (size_t)st.st_size; /* truncate */ + banner = xmalloc(len + 1); + n = atomicio(read, fd, banner, len); + close(fd); + + if (n != len) { + free(banner); + return (NULL); + } + banner[n] = '\0'; + + return (banner); +} + +static void +userauth_send_banner(struct ssh *ssh, const char *msg) +{ + int r; + + if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_BANNER)) != 0 || + (r = sshpkt_put_cstring(ssh, msg)) != 0 || + (r = sshpkt_put_cstring(ssh, "")) != 0 || /* language, unused */ + (r = sshpkt_send(ssh)) != 0) + fatal_fr(r, "send packet"); + debug("%s: sent", __func__); +} + +static void +userauth_banner(struct ssh *ssh) +{ + char *banner = NULL; + + if (options.banner == NULL) + return; + + if ((banner = PRIVSEP(auth2_read_banner())) == NULL) + goto done; + userauth_send_banner(ssh, banner); + +done: + free(banner); +} + +/* + * loop until authctxt->success == TRUE + */ +void +do_authentication2(struct ssh *ssh) +{ + Authctxt *authctxt = ssh->authctxt; + + ssh_dispatch_init(ssh, &dispatch_protocol_error); + ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_REQUEST, &input_service_request); + ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt->success); + ssh->authctxt = NULL; +} + +static int +input_service_request(int type, u_int32_t seq, struct ssh *ssh) +{ + Authctxt *authctxt = ssh->authctxt; + char *service = NULL; + int r, acceptit = 0; + + if ((r = sshpkt_get_cstring(ssh, &service, NULL)) != 0 || + (r = sshpkt_get_end(ssh)) != 0) + goto out; + + if (authctxt == NULL) + fatal("input_service_request: no authctxt"); + + if (strcmp(service, "ssh-userauth") == 0) { + if (!authctxt->success) { + acceptit = 1; + /* now we can handle user-auth requests */ + ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_REQUEST, + &input_userauth_request); + } + } + /* XXX all other service requests are denied */ + + if (acceptit) { + if ((r = sshpkt_start(ssh, SSH2_MSG_SERVICE_ACCEPT)) != 0 || + (r = sshpkt_put_cstring(ssh, service)) != 0 || + (r = sshpkt_send(ssh)) != 0 || + (r = ssh_packet_write_wait(ssh)) != 0) + goto out; + } else { + debug("bad service request %s", service); + ssh_packet_disconnect(ssh, "bad service request %s", service); + } + r = 0; + out: + free(service); + return r; +} + +#define MIN_FAIL_DELAY_SECONDS 0.005 ++#define MAX_FAIL_DELAY_SECONDS 5.0 +static double +user_specific_delay(const char *user) +{ + char b[512]; + size_t len = ssh_digest_bytes(SSH_DIGEST_SHA512); + u_char *hash = xmalloc(len); + double delay; + + (void)snprintf(b, sizeof b, "%llu%s", + (unsigned long long)options.timing_secret, user); + if (ssh_digest_memory(SSH_DIGEST_SHA512, b, strlen(b), hash, len) != 0) + fatal_f("ssh_digest_memory"); + /* 0-4.2 ms of delay */ + delay = (double)PEEK_U32(hash) / 1000 / 1000 / 1000 / 1000; + freezero(hash, len); + debug3_f("user specific delay %0.3lfms", delay/1000); + return MIN_FAIL_DELAY_SECONDS + delay; +} + +static void +ensure_minimum_time_since(double start, double seconds) +{ + struct timespec ts; + double elapsed = monotime_double() - start, req = seconds, remain; + ++ if (elapsed > MAX_FAIL_DELAY_SECONDS) { ++ debug3_f("elapsed %0.3lfms exceeded the max delay " ++ "requested %0.3lfms)", elapsed*1000, req*1000); ++ return; ++ } ++ + /* if we've already passed the requested time, scale up */ + while ((remain = seconds - elapsed) < 0.0) + seconds *= 2; + + ts.tv_sec = remain; + ts.tv_nsec = (remain - ts.tv_sec) * 1000000000; + debug3_f("elapsed %0.3lfms, delaying %0.3lfms (requested %0.3lfms)", + elapsed*1000, remain*1000, req*1000); + nanosleep(&ts, NULL); +} + +static int +input_userauth_request(int type, u_int32_t seq, struct ssh *ssh) +{ + Authctxt *authctxt = ssh->authctxt; + Authmethod *m = NULL; + char *user = NULL, *service = NULL, *method = NULL, *style = NULL; + int r, authenticated = 0; + double tstart = monotime_double(); + + if (authctxt == NULL) + fatal("input_userauth_request: no authctxt"); + + if ((r = sshpkt_get_cstring(ssh, &user, NULL)) != 0 || + (r = sshpkt_get_cstring(ssh, &service, NULL)) != 0 || + (r = sshpkt_get_cstring(ssh, &method, NULL)) != 0) + goto out; + debug("userauth-request for user %s service %s method %s", user, service, method); + debug("attempt %d failures %d", authctxt->attempt, authctxt->failures); + + if ((style = strchr(user, ':')) != NULL) + *style++ = 0; + + if (authctxt->attempt >= 1024) + auth_maxtries_exceeded(ssh); + if (authctxt->attempt++ == 0) { + /* setup auth context */ + authctxt->pw = PRIVSEP(getpwnamallow(ssh, user)); + authctxt->user = xstrdup(user); + if (authctxt->pw && strcmp(service, "ssh-connection")==0) { + authctxt->valid = 1; + debug2_f("setting up authctxt for %s", user); + } else { + authctxt->valid = 0; + /* Invalid user, fake password information */ + authctxt->pw = fakepw(); +#ifdef SSH_AUDIT_EVENTS + PRIVSEP(audit_event(ssh, SSH_INVALID_USER)); +#endif + } +#ifdef USE_PAM + if (options.use_pam) + PRIVSEP(start_pam(ssh)); +#endif + ssh_packet_set_log_preamble(ssh, "%suser %s", + authctxt->valid ? "authenticating " : "invalid ", user); + setproctitle("%s%s", authctxt->valid ? user : "unknown", + use_privsep ? " [net]" : ""); + authctxt->service = xstrdup(service); + authctxt->style = style ? xstrdup(style) : NULL; + if (use_privsep) + mm_inform_authserv(service, style); + userauth_banner(ssh); + if (auth2_setup_methods_lists(authctxt) != 0) + ssh_packet_disconnect(ssh, + "no authentication methods enabled"); + } else if (strcmp(user, authctxt->user) != 0 || + strcmp(service, authctxt->service) != 0) { + ssh_packet_disconnect(ssh, "Change of username or service " + "not allowed: (%s,%s) -> (%s,%s)", + authctxt->user, authctxt->service, user, service); + } + /* reset state */ + auth2_challenge_stop(ssh); + +#ifdef GSSAPI + /* XXX move to auth2_gssapi_stop() */ + ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL); + ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL); +#endif + + auth2_authctxt_reset_info(authctxt); + authctxt->postponed = 0; + authctxt->server_caused_failure = 0; + + /* try to authenticate user */ + m = authmethod_lookup(authctxt, method); + if (m != NULL && authctxt->failures < options.max_authtries) { + debug2("input_userauth_request: try method %s", method); + authenticated = m->userauth(ssh, method); + } - if (!authctxt->authenticated) ++ if (!authctxt->authenticated && strcmp(method, "none") != 0) + ensure_minimum_time_since(tstart, + user_specific_delay(authctxt->user)); + userauth_finish(ssh, authenticated, method, NULL); + r = 0; + out: + free(service); + free(user); + free(method); + return r; +} + +void +userauth_finish(struct ssh *ssh, int authenticated, const char *packet_method, + const char *submethod) +{ + Authctxt *authctxt = ssh->authctxt; + Authmethod *m = NULL; + const char *method = packet_method; + char *methods; + int r, partial = 0; + + if (authenticated) { + if (!authctxt->valid) { + fatal("INTERNAL ERROR: authenticated invalid user %s", + authctxt->user); + } + if (authctxt->postponed) + fatal("INTERNAL ERROR: authenticated and postponed"); + /* prefer primary authmethod name to possible synonym */ + if ((m = authmethod_byname(method)) == NULL) + fatal("INTERNAL ERROR: bad method %s", method); + method = m->name; + } + + /* Special handling for root */ + if (authenticated && authctxt->pw->pw_uid == 0 && + !auth_root_allowed(ssh, method)) { + authenticated = 0; +#ifdef SSH_AUDIT_EVENTS + PRIVSEP(audit_event(ssh, SSH_LOGIN_ROOT_DENIED)); +#endif + } + + if (authenticated && options.num_auth_methods != 0) { + if (!auth2_update_methods_lists(authctxt, method, submethod)) { + authenticated = 0; + partial = 1; + } + } + + /* Log before sending the reply */ + auth_log(ssh, authenticated, partial, method, submethod); + + /* Update information exposed to session */ + if (authenticated || partial) + auth2_update_session_info(authctxt, method, submethod); + + if (authctxt->postponed) + return; + +#ifdef USE_PAM + if (options.use_pam && authenticated) { + int r, success = PRIVSEP(do_pam_account()); + + /* If PAM returned a message, send it to the user. */ + if (sshbuf_len(loginmsg) > 0) { + if ((r = sshbuf_put(loginmsg, "\0", 1)) != 0) + fatal("%s: buffer error: %s", + __func__, ssh_err(r)); + userauth_send_banner(ssh, sshbuf_ptr(loginmsg)); + if ((r = ssh_packet_write_wait(ssh)) != 0) { + sshpkt_fatal(ssh, r, + "%s: send PAM banner", __func__); + } + } + if (!success) { + fatal("Access denied for user %s by PAM account " + "configuration", authctxt->user); + } + } +#endif + + if (authenticated == 1) { + /* turn off userauth */ + ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_REQUEST, + &dispatch_protocol_ignore); + if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_SUCCESS)) != 0 || + (r = sshpkt_send(ssh)) != 0 || + (r = ssh_packet_write_wait(ssh)) != 0) + fatal_fr(r, "send success packet"); + /* now we can break out */ + authctxt->success = 1; + ssh_packet_set_log_preamble(ssh, "user %s", authctxt->user); + } else { + /* Allow initial try of "none" auth without failure penalty */ + if (!partial && !authctxt->server_caused_failure && + (authctxt->attempt > 1 || strcmp(method, "none") != 0)) { + authctxt->failures++; + BLACKLIST_NOTIFY(ssh, BLACKLIST_AUTH_FAIL, "ssh"); + } + if (authctxt->failures >= options.max_authtries) { +#ifdef SSH_AUDIT_EVENTS + PRIVSEP(audit_event(ssh, SSH_LOGIN_EXCEED_MAXTRIES)); +#endif + auth_maxtries_exceeded(ssh); + } + methods = authmethods_get(authctxt); + debug3_f("failure partial=%d next methods=\"%s\"", + partial, methods); + if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_FAILURE)) != 0 || + (r = sshpkt_put_cstring(ssh, methods)) != 0 || + (r = sshpkt_put_u8(ssh, partial)) != 0 || + (r = sshpkt_send(ssh)) != 0 || + (r = ssh_packet_write_wait(ssh)) != 0) + fatal_fr(r, "send failure packet"); + free(methods); + } +} + +/* + * Checks whether method is allowed by at least one AuthenticationMethods + * methods list. Returns 1 if allowed, or no methods lists configured. + * 0 otherwise. + */ +int +auth2_method_allowed(Authctxt *authctxt, const char *method, + const char *submethod) +{ + u_int i; + + /* + * NB. authctxt->num_auth_methods might be zero as a result of + * auth2_setup_methods_lists(), so check the configuration. + */ + if (options.num_auth_methods == 0) + return 1; + for (i = 0; i < authctxt->num_auth_methods; i++) { + if (list_starts_with(authctxt->auth_methods[i], method, + submethod) != MATCH_NONE) + return 1; + } + return 0; +} + +static char * +authmethods_get(Authctxt *authctxt) +{ + struct sshbuf *b; + char *list; + int i, r; + + if ((b = sshbuf_new()) == NULL) + fatal_f("sshbuf_new failed"); + for (i = 0; authmethods[i] != NULL; i++) { + if (strcmp(authmethods[i]->name, "none") == 0) + continue; + if (authmethods[i]->enabled == NULL || + *(authmethods[i]->enabled) == 0) + continue; + if (!auth2_method_allowed(authctxt, authmethods[i]->name, + NULL)) + continue; + if ((r = sshbuf_putf(b, "%s%s", sshbuf_len(b) ? "," : "", + authmethods[i]->name)) != 0) + fatal_fr(r, "buffer error"); + } + if ((list = sshbuf_dup_string(b)) == NULL) + fatal_f("sshbuf_dup_string failed"); + sshbuf_free(b); + return list; +} + +static Authmethod * +authmethod_byname(const char *name) +{ + int i; + + if (name == NULL) + fatal_f("NULL authentication method name"); + for (i = 0; authmethods[i] != NULL; i++) { + if (strcmp(name, authmethods[i]->name) == 0 || + (authmethods[i]->synonym != NULL && + strcmp(name, authmethods[i]->synonym) == 0)) + return authmethods[i]; + } + debug_f("unrecognized authentication method name: %s", name); + return NULL; +} + +static Authmethod * +authmethod_lookup(Authctxt *authctxt, const char *name) +{ + Authmethod *method; + + if ((method = authmethod_byname(name)) == NULL) + return NULL; + + if (method->enabled == NULL || *(method->enabled) == 0) { + debug3_f("method %s not enabled", name); + return NULL; + } + if (!auth2_method_allowed(authctxt, method->name, NULL)) { + debug3_f("method %s not allowed " + "by AuthenticationMethods", name); + return NULL; + } + return method; +} + +/* + * Check a comma-separated list of methods for validity. Is need_enable is + * non-zero, then also require that the methods are enabled. + * Returns 0 on success or -1 if the methods list is invalid. + */ +int +auth2_methods_valid(const char *_methods, int need_enable) +{ + char *methods, *omethods, *method, *p; + u_int i, found; + int ret = -1; + + if (*_methods == '\0') { + error("empty authentication method list"); + return -1; + } + omethods = methods = xstrdup(_methods); + while ((method = strsep(&methods, ",")) != NULL) { + for (found = i = 0; !found && authmethods[i] != NULL; i++) { + if ((p = strchr(method, ':')) != NULL) + *p = '\0'; + if (strcmp(method, authmethods[i]->name) != 0) + continue; + if (need_enable) { + if (authmethods[i]->enabled == NULL || + *(authmethods[i]->enabled) == 0) { + error("Disabled method \"%s\" in " + "AuthenticationMethods list \"%s\"", + method, _methods); + goto out; + } + } + found = 1; + break; + } + if (!found) { + error("Unknown authentication method \"%s\" in list", + method); + goto out; + } + } + ret = 0; + out: + free(omethods); + return ret; +} + +/* + * Prune the AuthenticationMethods supplied in the configuration, removing + * any methods lists that include disabled methods. Note that this might + * leave authctxt->num_auth_methods == 0, even when multiple required auth + * has been requested. For this reason, all tests for whether multiple is + * enabled should consult options.num_auth_methods directly. + */ +int +auth2_setup_methods_lists(Authctxt *authctxt) +{ + u_int i; + + /* First, normalise away the "any" pseudo-method */ + if (options.num_auth_methods == 1 && + strcmp(options.auth_methods[0], "any") == 0) { + free(options.auth_methods[0]); + options.auth_methods[0] = NULL; + options.num_auth_methods = 0; + } + + if (options.num_auth_methods == 0) + return 0; + debug3_f("checking methods"); + authctxt->auth_methods = xcalloc(options.num_auth_methods, + sizeof(*authctxt->auth_methods)); + authctxt->num_auth_methods = 0; + for (i = 0; i < options.num_auth_methods; i++) { + if (auth2_methods_valid(options.auth_methods[i], 1) != 0) { + logit("Authentication methods list \"%s\" contains " + "disabled method, skipping", + options.auth_methods[i]); + continue; + } + debug("authentication methods list %d: %s", + authctxt->num_auth_methods, options.auth_methods[i]); + authctxt->auth_methods[authctxt->num_auth_methods++] = + xstrdup(options.auth_methods[i]); + } + if (authctxt->num_auth_methods == 0) { + error("No AuthenticationMethods left after eliminating " + "disabled methods"); + return -1; + } + return 0; +} + +static int +list_starts_with(const char *methods, const char *method, + const char *submethod) +{ + size_t l = strlen(method); + int match; + const char *p; + + if (strncmp(methods, method, l) != 0) + return MATCH_NONE; + p = methods + l; + match = MATCH_METHOD; + if (*p == ':') { + if (!submethod) + return MATCH_PARTIAL; + l = strlen(submethod); + p += 1; + if (strncmp(submethod, p, l)) + return MATCH_NONE; + p += l; + match = MATCH_BOTH; + } + if (*p != ',' && *p != '\0') + return MATCH_NONE; + return match; +} + +/* + * Remove method from the start of a comma-separated list of methods. + * Returns 0 if the list of methods did not start with that method or 1 + * if it did. + */ +static int +remove_method(char **methods, const char *method, const char *submethod) +{ + char *omethods = *methods, *p; + size_t l = strlen(method); + int match; + + match = list_starts_with(omethods, method, submethod); + if (match != MATCH_METHOD && match != MATCH_BOTH) + return 0; + p = omethods + l; + if (submethod && match == MATCH_BOTH) + p += 1 + strlen(submethod); /* include colon */ + if (*p == ',') + p++; + *methods = xstrdup(p); + free(omethods); + return 1; +} + +/* + * Called after successful authentication. Will remove the successful method + * from the start of each list in which it occurs. If it was the last method + * in any list, then authentication is deemed successful. + * Returns 1 if the method completed any authentication list or 0 otherwise. + */ +int +auth2_update_methods_lists(Authctxt *authctxt, const char *method, + const char *submethod) +{ + u_int i, found = 0; + + debug3_f("updating methods list after \"%s\"", method); + for (i = 0; i < authctxt->num_auth_methods; i++) { + if (!remove_method(&(authctxt->auth_methods[i]), method, + submethod)) + continue; + found = 1; + if (*authctxt->auth_methods[i] == '\0') { + debug2("authentication methods list %d complete", i); + return 1; + } + debug3("authentication methods list %d remaining: \"%s\"", + i, authctxt->auth_methods[i]); + } + /* This should not happen, but would be bad if it did */ + if (!found) + fatal_f("method not in AuthenticationMethods"); + return 0; +} + +/* Reset method-specific information */ +void auth2_authctxt_reset_info(Authctxt *authctxt) +{ + sshkey_free(authctxt->auth_method_key); + free(authctxt->auth_method_info); + authctxt->auth_method_key = NULL; + authctxt->auth_method_info = NULL; +} + +/* Record auth method-specific information for logs */ +void +auth2_record_info(Authctxt *authctxt, const char *fmt, ...) +{ + va_list ap; + int i; + + free(authctxt->auth_method_info); + authctxt->auth_method_info = NULL; + + va_start(ap, fmt); + i = vasprintf(&authctxt->auth_method_info, fmt, ap); + va_end(ap); + + if (i == -1) + fatal_f("vasprintf failed"); +} + +/* + * Records a public key used in authentication. This is used for logging + * and to ensure that the same key is not subsequently accepted again for + * multiple authentication. + */ +void +auth2_record_key(Authctxt *authctxt, int authenticated, + const struct sshkey *key) +{ + struct sshkey **tmp, *dup; + int r; + + if ((r = sshkey_from_private(key, &dup)) != 0) + fatal_fr(r, "copy key"); + sshkey_free(authctxt->auth_method_key); + authctxt->auth_method_key = dup; + + if (!authenticated) + return; + + /* If authenticated, make sure we don't accept this key again */ + if ((r = sshkey_from_private(key, &dup)) != 0) + fatal_fr(r, "copy key"); + if (authctxt->nprev_keys >= INT_MAX || + (tmp = recallocarray(authctxt->prev_keys, authctxt->nprev_keys, + authctxt->nprev_keys + 1, sizeof(*authctxt->prev_keys))) == NULL) + fatal_f("reallocarray failed"); + authctxt->prev_keys = tmp; + authctxt->prev_keys[authctxt->nprev_keys] = dup; + authctxt->nprev_keys++; + +} + +/* Checks whether a key has already been previously used for authentication */ +int +auth2_key_already_used(Authctxt *authctxt, const struct sshkey *key) +{ + u_int i; + char *fp; + + for (i = 0; i < authctxt->nprev_keys; i++) { + if (sshkey_equal_public(key, authctxt->prev_keys[i])) { + fp = sshkey_fingerprint(authctxt->prev_keys[i], + options.fingerprint_hash, SSH_FP_DEFAULT); + debug3_f("key already used: %s %s", + sshkey_type(authctxt->prev_keys[i]), + fp == NULL ? "UNKNOWN" : fp); + free(fp); + return 1; + } + } + return 0; +} + +/* + * Updates authctxt->session_info with details of authentication. Should be + * whenever an authentication method succeeds. + */ +void +auth2_update_session_info(Authctxt *authctxt, const char *method, + const char *submethod) +{ + int r; + + if (authctxt->session_info == NULL) { + if ((authctxt->session_info = sshbuf_new()) == NULL) + fatal_f("sshbuf_new"); + } + + /* Append method[/submethod] */ + if ((r = sshbuf_putf(authctxt->session_info, "%s%s%s", + method, submethod == NULL ? "" : "/", + submethod == NULL ? "" : submethod)) != 0) + fatal_fr(r, "append method"); + + /* Append key if present */ + if (authctxt->auth_method_key != NULL) { + if ((r = sshbuf_put_u8(authctxt->session_info, ' ')) != 0 || + (r = sshkey_format_text(authctxt->auth_method_key, + authctxt->session_info)) != 0) + fatal_fr(r, "append key"); + } + + if (authctxt->auth_method_info != NULL) { + /* Ensure no ambiguity here */ + if (strchr(authctxt->auth_method_info, '\n') != NULL) + fatal_f("auth_method_info contains \\n"); + if ((r = sshbuf_put_u8(authctxt->session_info, ' ')) != 0 || + (r = sshbuf_putf(authctxt->session_info, "%s", + authctxt->auth_method_info)) != 0) { + fatal_fr(r, "append method info"); + } + } + if ((r = sshbuf_put_u8(authctxt->session_info, '\n')) != 0) + fatal_fr(r, "append"); +} + diff --cc crypto/openssh/configure.ac index 7034ebe9bf14,000000000000..58a40dd174b5 mode 100644,000000..100644 --- a/crypto/openssh/configure.ac +++ b/crypto/openssh/configure.ac @@@ -1,5723 -1,0 +1,5729 @@@ +# +# Copyright (c) 1999-2004 Damien Miller +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_SRCDIR([ssh.c]) + +# Check for stale configure as early as possible. +for i in $srcdir/configure.ac $srcdir/m4/*.m4; do + if test "$i" -nt "$srcdir/configure"; then + AC_MSG_ERROR([$i newer than configure, run autoreconf]) + fi +done + +AC_LANG([C]) *** 12320 LINES SKIPPED *** From nobody Mon Oct 9 17:46: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 4S460g0b5Cz4x9Bd; Mon, 9 Oct 2023 17:46: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 4S460g072Yz4JJv; Mon, 9 Oct 2023 17:46:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696873603; 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=sljD6CWKr8EYj37crlB2H/ynxU8kdX0x2yoiC6ytS7I=; b=wfslukGuIug06/cbjImU2qLcOrw1KCP5fgU+9BngVRsCj0CLFCkf1YgIY78v9Lsgn1Qyz+ PaR9Jo8TwHTAvY/LGxtygrVRPaNjzqwQ5VgnOd/Z1EB58USmgaVUzS5fNkGF7N8AVxqutu f32G02Mhm7Vn60FXzaYjF3swiQs6UTS3QTj4yMtDhixAwWmqXXuViWgXQMpVIzpTu6E4TZ ARFPRWndB9rE331K7dVRXuqyzZ5Acmgs1iHB9h9XUXF1Cr+lfQ3sd8ZOZlZJo+QvyJ99QF oocS38F9ZcR3160G0aiRNjKDqyFj8KHFp0eljqzN6vZilLUHisuysa4aFsH+PA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696873603; a=rsa-sha256; cv=none; b=p2Mp4Ym612UAzsvzktM4sD6+KhwJJ2VRLK9Pv4RCy5y9zIQYhhiy3WYLmF4xUCKr/bAdHb 6RiVpM2Rjh2dM199JMda9gwhAoP2hGn5UT96PFm/xSHrx9ApmQD0WnxUC0QMQ/gBmmmcSM FbytQqh7G0THoO1jM5HD6ZBPl00mto4yXliWaWQapbRsIKRH12vzuYZ851YkWgjr0kbbOp lIHGpqdO3tJb9Z9g7eFN2pDmC14RFOSPywzOypeYRJw3i82o6WN49YQoOjk7fvUtoWTOkL ac+ANbqB49+zNqajDW/k2Lp5fA4cnE+1Zi9DWJg12ZxN6cV5iAPjHyvI6GKqww== 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=1696873603; 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=sljD6CWKr8EYj37crlB2H/ynxU8kdX0x2yoiC6ytS7I=; b=jQFgshTt3zv07ftH6knJPZWCDoSS8tA3g6M53qkL60ZkPm28woLpsePYaojArpV4fQxXz8 zYZwgnMUTPokt0vobLKtZkAfbomwqrbdPcffMumAJH2lnsmQErJ2MhrRMufU3uFqEvPQPi qTv/7rczjUaVdsVTsVwrdnfXZMFp8Higq0lNA9lTkdEUvtjnw9GhrYUsYxEwFGM7O2g+xm t6FDXjL24YUOb4ML1rO0cBxKT+hVGkJDUorq6NGdDsWBxPDqxHrEYdtuaVlrGvYXY6EZpy eFejKTl0/lHuhuV5R7uEuI9i+m3iE9iC9UjSsPolxcH9QiExEabqCOFxMyt1DQ== 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 4S460f6HYxz15BC; Mon, 9 Oct 2023 17:46: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 399HkgBd022375; Mon, 9 Oct 2023 17:46:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399HkgQB022372; Mon, 9 Oct 2023 17:46:42 GMT (envelope-from git) Date: Mon, 9 Oct 2023 17:46:42 GMT Message-Id: <202310091746.399HkgQB022372@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 8f75390c66bd - main - file: Support testing multiple magic 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: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f75390c66bdcde95e1b383aecaa27b4adf88279 Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=8f75390c66bdcde95e1b383aecaa27b4adf88279 commit 8f75390c66bdcde95e1b383aecaa27b4adf88279 Author: Xin LI AuthorDate: 2023-10-09 06:06:20 +0000 Commit: Xin LI CommitDate: 2023-10-09 17:44:42 +0000 file: Support testing multiple magic files. This is based on upstream b74150490be904801378b2712fe0d532e1700124 but adapted to ATF. Reviewed by: jlduran@gmail.com, markj, vangyzen Differential Revision: https://reviews.freebsd.org/D42129 --- usr.bin/file/tests/Makefile | 2 +- usr.bin/file/tests/file_test.sh | 22 +++++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/usr.bin/file/tests/Makefile b/usr.bin/file/tests/Makefile index ea0ebaa12ce2..cd3d00ae742c 100644 --- a/usr.bin/file/tests/Makefile +++ b/usr.bin/file/tests/Makefile @@ -2,7 +2,7 @@ PACKAGE= tests ATF_TESTS_SH= file_test SRCDIR= ${SRCTOP}/contrib/file/tests -_files!= echo ${SRCDIR}/*.testfile ${SRCDIR}/*.result ${SRCDIR}/*.magic +_files!= echo ${SRCDIR}/*.testfile ${SRCDIR}/*.flags ${SRCDIR}/*.result ${SRCDIR}/*.magic ${PACKAGE}FILES+=${_files} .include diff --git a/usr.bin/file/tests/file_test.sh b/usr.bin/file/tests/file_test.sh index 02d494b0f643..490274c05892 100644 --- a/usr.bin/file/tests/file_test.sh +++ b/usr.bin/file/tests/file_test.sh @@ -32,14 +32,26 @@ contrib_file_tests_body() { for testfile in "${srcdir}"/*.testfile; do test_name="${testfile%.testfile}" result_file="${test_name}.result" - magic_file="${test_name}.magic" file_args= - if [ -e "${magic_file}" ]; then - file_args="${file_args} --magic-file ${magic_file}" + magic_files= + for magic_file in ${test_name}*.magic; do + if [ -f "${magic_file}" ]; then + if [ -z "${magic_files}" ]; then + magic_files="${magic_file}" + else + magic_files="${magic_files}:${magic_file}" + fi + fi + done + if [ -z "${magic_files}" ]; then + magic_files=/usr/share/misc/magic + fi + if [ -f "${test_name}.flags" ]; then + file_args="${file_args} -$(cat "${test_name}.flags")" fi # The result files were created in UTC. - TZ=Z atf_check -o save:actual_output file ${file_args} \ - --brief "$testfile" + atf_check -o save:actual_output -e ignore env TZ=Z MAGIC="${magic_files}" \ + file ${file_args} --brief "$testfile" atf_check cmp actual_output "$result_file" done } From nobody Mon Oct 9 19:01: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 4S47fn1KB6z4w70Y; Mon, 9 Oct 2023 19:01: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 4S47fn16Kyz4SRs; Mon, 9 Oct 2023 19:01:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696878081; 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=lrptzxVu7Qh4lKxSp34pvNYAftid5DekVVObwwasJvI=; b=uuzTFttqz6tmFnF12xjYU2VabbDQanWj9BKHRlVHIfupp8wGvNwgwj7HLSABerhNzZ3D5u qd+ZkdUi07Vf7rUs0yneM6vHwg+U25mvBOl8oQ0AF4TIlTV9DmDTUyMUksqW760EZEP/sj pT5IHLcfdenQUOExGs1ssC1vmXinTsSoSZoh/FQtzszR9MCL0+fIHgrjMaDpv6XZik6U3f rpWr6ptyrnQGmXrJnbT5zhH6DJSH3/9oTZNh05b62jfEET5EIveXVer3Ho+vQQM9dETRzO NVtWGkcM0EJg0QS5WD4WDTWe49IXPaBJJEbkbZM7QX3aJOAlMRmTELQoFp21ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696878081; a=rsa-sha256; cv=none; b=mvGX3tbv1k+yHq93XAAHX80kq3Hvd+6Eqvoo9asDlafHWIUWSs996UGkLz/zT1jxMQfNc6 tMyNmSALg0H6jxlpDvqcHAw1XzgVyNP3DZ8T71xrPF+bs4fllGWRDxpu23GFDl9mAoAUgA we5CZI6F98+F55bG1eg8TpkQm3MKAqyyxKrjCydT94Cv2y4VkVrLp+XcSPWWfY9ydMYe9A p6/ajF/iPpwAkpm3QzmwRPfC+ZhUaLujlR+dNmMUvHpvNpQn2NbHloMTzx8kT+U5ijxG28 Yv2C+14k8Izlte97gJTdycgrxs0FSBG43a3Bv0ZW6gLYPJJIf4cTqIn9EjH84g== 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=1696878081; 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=lrptzxVu7Qh4lKxSp34pvNYAftid5DekVVObwwasJvI=; b=HTIAxLAtNjobDbGKbZc9SKqEPW+wFGxbZjH+hYni9qEWGUaMepqy03cnQStINc8VVgyWar d0UlYnMNNWC8Tm3gz5Q48+8BFrvrwu3qNNc6pscW9/vFSbrZidSmbC/gQTE3tTlTN3lD9R ybdtFHubq5nYM2FaV4mjjcNTspB+GZB5TN3tnjpjbR8+wCsyY8uQBAzp/7LSDezgi3fB7+ ylPgEylVXVHlZEXRch6lpmHr10iOz638Q7k/ey80kHzFY26a9JpGVh8h+Z4KnhZCAJfvZj wBci+wmmKRYZaKay6qFPaKt8tyvHvYd5gwtbZcU2ABIDGabmr2WjUiQP5uPRxQ== 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 4S47fn07rtz16q3; Mon, 9 Oct 2023 19:01: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 399J1KuS053003; Mon, 9 Oct 2023 19:01:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399J1FHO052474; Mon, 9 Oct 2023 19:01:15 GMT (envelope-from git) Date: Mon, 9 Oct 2023 19:01:15 GMT Message-Id: <202310091901.399J1FHO052474@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: 6f1af0d7d2af - main - OpenSSL: update to 3.0.11 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: 6f1af0d7d2af54b339b5212434cd6d4fda628d80 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6f1af0d7d2af54b339b5212434cd6d4fda628d80 commit 6f1af0d7d2af54b339b5212434cd6d4fda628d80 Merge: 8f75390c66bd 315108b81694 Author: Pierre Pronchery AuthorDate: 2023-10-09 19:00:25 +0000 Commit: Ed Maste CommitDate: 2023-10-09 19:00:26 +0000 OpenSSL: update to 3.0.11 OpenSSL 3.0.11 addresses: POLY1305 MAC implementation corrupts XMM registers on Windows (CVE-2023-4807) Relnotes: Yes Pull request: https://github.com/freebsd/freebsd-src/pull/852 Sponsored by: The FreeBSD Foundation crypto/openssl/CHANGES.md | 25 +++++++++ crypto/openssl/NEWS.md | 6 ++ crypto/openssl/README.md | 2 +- crypto/openssl/VERSION.dat | 4 +- crypto/openssl/apps/cmp.c | 2 +- crypto/openssl/apps/lib/apps.c | 13 ++--- crypto/openssl/apps/req.c | 8 +-- crypto/openssl/apps/s_server.c | 2 +- crypto/openssl/crypto/asn1/a_strnid.c | 4 +- crypto/openssl/crypto/asn1/asn1_gen.c | 11 ++-- crypto/openssl/crypto/chacha/asm/chacha-ia64.pl | 2 + crypto/openssl/crypto/cmp/cmp_asn.c | 10 ++-- crypto/openssl/crypto/cmp/cmp_client.c | 2 +- crypto/openssl/crypto/cmp/cmp_status.c | 7 ++- crypto/openssl/crypto/cms/cms_env.c | 21 ++++++- crypto/openssl/crypto/cms/cms_lib.c | 5 +- crypto/openssl/crypto/cms/cms_local.h | 3 +- crypto/openssl/crypto/cms/cms_sd.c | 6 +- crypto/openssl/crypto/conf/conf_sap.c | 3 +- crypto/openssl/crypto/encode_decode/decoder_lib.c | 7 ++- crypto/openssl/crypto/encode_decode/decoder_pkey.c | 8 ++- crypto/openssl/crypto/engine/eng_lib.c | 24 +++++--- crypto/openssl/crypto/engine/eng_list.c | 11 ++-- crypto/openssl/crypto/engine/eng_local.h | 6 +- crypto/openssl/crypto/engine/eng_table.c | 12 ++-- crypto/openssl/crypto/evp/ctrl_params_translate.c | 22 +++++--- crypto/openssl/crypto/evp/p_lib.c | 2 + crypto/openssl/crypto/http/http_client.c | 15 +++-- crypto/openssl/crypto/mem.c | 5 +- crypto/openssl/crypto/pem/pem_pkey.c | 13 ++++- crypto/openssl/crypto/perlasm/arm-xlate.pl | 2 +- crypto/openssl/crypto/pkcs12/p12_crt.c | 64 +++++++++++++++------- .../openssl/crypto/poly1305/asm/poly1305-x86_64.pl | 6 +- crypto/openssl/crypto/property/property.c | 6 +- crypto/openssl/crypto/provider_core.c | 8 +-- crypto/openssl/crypto/rsa/rsa_ameth.c | 5 +- crypto/openssl/crypto/srp/srp_vfy.c | 3 +- crypto/openssl/crypto/store/store_lib.c | 6 +- crypto/openssl/crypto/threads_pthread.c | 4 +- crypto/openssl/crypto/x509/v3_ist.c | 8 +-- crypto/openssl/crypto/x509/x509_cmp.c | 9 ++- crypto/openssl/doc/man1/openssl-cmp.pod.in | 31 +++++++---- crypto/openssl/doc/man1/openssl-cms.pod.in | 4 +- crypto/openssl/doc/man1/openssl-ts.pod.in | 4 +- crypto/openssl/doc/man3/BIO_s_mem.pod | 22 +++++++- crypto/openssl/doc/man3/CMS_sign.pod | 4 +- crypto/openssl/doc/man3/EVP_MAC.pod | 4 +- crypto/openssl/doc/man3/EVP_SIGNATURE.pod | 4 +- crypto/openssl/doc/man3/OSSL_CMP_CTX_new.pod | 30 +++++----- crypto/openssl/doc/man3/OSSL_CMP_exec_certreq.pod | 16 ++++-- crypto/openssl/doc/man3/OSSL_HTTP_REQ_CTX.pod | 12 ++-- crypto/openssl/doc/man3/OSSL_HTTP_transfer.pod | 9 ++- crypto/openssl/doc/man3/PKCS12_create.pod | 9 ++- crypto/openssl/doc/man3/PKCS12_gen_mac.pod | 2 + crypto/openssl/doc/man3/SSL_new.pod | 4 +- crypto/openssl/doc/man3/d2i_RSAPrivateKey.pod | 6 +- crypto/openssl/doc/man3/d2i_X509.pod | 2 + crypto/openssl/doc/man5/x509v3_config.pod | 4 +- crypto/openssl/doc/man7/EVP_KDF-PKCS12KDF.pod | 8 ++- crypto/openssl/doc/man7/migration_guide.pod | 9 +++ crypto/openssl/include/openssl/opensslv.h | 10 ++-- crypto/openssl/providers/fips-sources.checksums | 14 ++--- crypto/openssl/providers/fips.checksum | 2 +- .../implementations/ciphers/cipher_chacha20.c | 23 +++++++- .../implementations/encode_decode/decode_der2key.c | 6 +- .../encode_decode/decode_msblob2key.c | 22 +++++++- .../implementations/encode_decode/decode_pvk2key.c | 21 ++++++- .../implementations/encode_decode/encode_key2any.c | 7 ++- .../providers/implementations/keymgmt/dh_kmgmt.c | 3 + .../providers/implementations/keymgmt/dsa_kmgmt.c | 3 + .../providers/implementations/keymgmt/ecx_kmgmt.c | 5 +- .../implementations/keymgmt/mac_legacy_kmgmt.c | 5 +- crypto/openssl/ssl/ssl_lib.c | 10 ++-- crypto/openssl/ssl/ssl_sess.c | 5 +- crypto/openssl/ssl/statem/extensions_srvr.c | 4 +- secure/lib/libcrypto/Makefile.inc | 4 +- secure/lib/libcrypto/man/man3/ADMISSIONS.3 | 6 +- secure/lib/libcrypto/man/man3/ASN1_EXTERN_FUNCS.3 | 6 +- .../libcrypto/man/man3/ASN1_INTEGER_get_int64.3 | 6 +- secure/lib/libcrypto/man/man3/ASN1_INTEGER_new.3 | 6 +- secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 | 6 +- secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 | 6 +- .../lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 | 6 +- secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 | 6 +- secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 | 6 +- .../lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 | 6 +- secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 | 6 +- secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 | 6 +- secure/lib/libcrypto/man/man3/ASN1_aux_cb.3 | 6 +- .../lib/libcrypto/man/man3/ASN1_generate_nconf.3 | 6 +- secure/lib/libcrypto/man/man3/ASN1_item_d2i_bio.3 | 6 +- secure/lib/libcrypto/man/man3/ASN1_item_new.3 | 6 +- secure/lib/libcrypto/man/man3/ASN1_item_sign.3 | 6 +- secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 | 6 +- secure/lib/libcrypto/man/man3/ASYNC_start_job.3 | 6 +- secure/lib/libcrypto/man/man3/BF_encrypt.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_ADDR.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_connect.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_ctrl.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_f_base64.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_f_buffer.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_f_cipher.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_f_md.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_f_null.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_f_prefix.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_f_readbuffer.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_f_ssl.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_find_type.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_get_data.3 | 6 +- .../lib/libcrypto/man/man3/BIO_get_ex_new_index.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_meth_new.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_new.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_new_CMS.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_parse_hostserv.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_printf.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_push.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_read.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_s_accept.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_s_bio.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_s_connect.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_s_core.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_s_datagram.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_s_fd.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_s_file.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_s_mem.3 | 31 +++++++++-- secure/lib/libcrypto/man/man3/BIO_s_null.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_s_socket.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_set_callback.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_should_retry.3 | 6 +- secure/lib/libcrypto/man/man3/BIO_socket_wait.3 | 6 +- secure/lib/libcrypto/man/man3/BN_BLINDING_new.3 | 6 +- secure/lib/libcrypto/man/man3/BN_CTX_new.3 | 6 +- secure/lib/libcrypto/man/man3/BN_CTX_start.3 | 6 +- secure/lib/libcrypto/man/man3/BN_add.3 | 6 +- secure/lib/libcrypto/man/man3/BN_add_word.3 | 6 +- secure/lib/libcrypto/man/man3/BN_bn2bin.3 | 6 +- secure/lib/libcrypto/man/man3/BN_cmp.3 | 6 +- secure/lib/libcrypto/man/man3/BN_copy.3 | 6 +- secure/lib/libcrypto/man/man3/BN_generate_prime.3 | 6 +- secure/lib/libcrypto/man/man3/BN_mod_exp_mont.3 | 6 +- secure/lib/libcrypto/man/man3/BN_mod_inverse.3 | 6 +- .../lib/libcrypto/man/man3/BN_mod_mul_montgomery.3 | 6 +- .../lib/libcrypto/man/man3/BN_mod_mul_reciprocal.3 | 6 +- secure/lib/libcrypto/man/man3/BN_new.3 | 6 +- secure/lib/libcrypto/man/man3/BN_num_bytes.3 | 6 +- secure/lib/libcrypto/man/man3/BN_rand.3 | 6 +- secure/lib/libcrypto/man/man3/BN_security_bits.3 | 6 +- secure/lib/libcrypto/man/man3/BN_set_bit.3 | 6 +- secure/lib/libcrypto/man/man3/BN_swap.3 | 6 +- secure/lib/libcrypto/man/man3/BN_zero.3 | 6 +- secure/lib/libcrypto/man/man3/BUF_MEM_new.3 | 6 +- .../libcrypto/man/man3/CMS_EncryptedData_decrypt.3 | 6 +- .../libcrypto/man/man3/CMS_EncryptedData_encrypt.3 | 6 +- .../libcrypto/man/man3/CMS_EnvelopedData_create.3 | 6 +- secure/lib/libcrypto/man/man3/CMS_add0_cert.3 | 6 +- .../libcrypto/man/man3/CMS_add1_recipient_cert.3 | 6 +- secure/lib/libcrypto/man/man3/CMS_add1_signer.3 | 6 +- secure/lib/libcrypto/man/man3/CMS_compress.3 | 6 +- secure/lib/libcrypto/man/man3/CMS_data_create.3 | 6 +- secure/lib/libcrypto/man/man3/CMS_decrypt.3 | 6 +- secure/lib/libcrypto/man/man3/CMS_digest_create.3 | 6 +- secure/lib/libcrypto/man/man3/CMS_encrypt.3 | 6 +- secure/lib/libcrypto/man/man3/CMS_final.3 | 6 +- .../libcrypto/man/man3/CMS_get0_RecipientInfos.3 | 6 +- .../lib/libcrypto/man/man3/CMS_get0_SignerInfos.3 | 6 +- secure/lib/libcrypto/man/man3/CMS_get0_type.3 | 6 +- .../libcrypto/man/man3/CMS_get1_ReceiptRequest.3 | 6 +- secure/lib/libcrypto/man/man3/CMS_sign.3 | 10 ++-- secure/lib/libcrypto/man/man3/CMS_sign_receipt.3 | 6 +- secure/lib/libcrypto/man/man3/CMS_uncompress.3 | 6 +- secure/lib/libcrypto/man/man3/CMS_verify.3 | 6 +- secure/lib/libcrypto/man/man3/CMS_verify_receipt.3 | 6 +- secure/lib/libcrypto/man/man3/CONF_modules_free.3 | 6 +- .../libcrypto/man/man3/CONF_modules_load_file.3 | 6 +- .../libcrypto/man/man3/CRYPTO_THREAD_run_once.3 | 6 +- .../libcrypto/man/man3/CRYPTO_get_ex_new_index.3 | 6 +- secure/lib/libcrypto/man/man3/CRYPTO_memcmp.3 | 6 +- .../man/man3/CTLOG_STORE_get0_log_by_id.3 | 6 +- secure/lib/libcrypto/man/man3/CTLOG_STORE_new.3 | 6 +- secure/lib/libcrypto/man/man3/CTLOG_new.3 | 6 +- .../libcrypto/man/man3/CT_POLICY_EVAL_CTX_new.3 | 6 +- secure/lib/libcrypto/man/man3/DEFINE_STACK_OF.3 | 6 +- secure/lib/libcrypto/man/man3/DES_random_key.3 | 6 +- secure/lib/libcrypto/man/man3/DH_generate_key.3 | 6 +- .../libcrypto/man/man3/DH_generate_parameters.3 | 6 +- secure/lib/libcrypto/man/man3/DH_get0_pqg.3 | 6 +- secure/lib/libcrypto/man/man3/DH_get_1024_160.3 | 6 +- secure/lib/libcrypto/man/man3/DH_meth_new.3 | 6 +- secure/lib/libcrypto/man/man3/DH_new.3 | 6 +- secure/lib/libcrypto/man/man3/DH_new_by_nid.3 | 6 +- secure/lib/libcrypto/man/man3/DH_set_method.3 | 6 +- secure/lib/libcrypto/man/man3/DH_size.3 | 6 +- secure/lib/libcrypto/man/man3/DSA_SIG_new.3 | 6 +- secure/lib/libcrypto/man/man3/DSA_do_sign.3 | 6 +- secure/lib/libcrypto/man/man3/DSA_dup_DH.3 | 6 +- secure/lib/libcrypto/man/man3/DSA_generate_key.3 | 6 +- .../libcrypto/man/man3/DSA_generate_parameters.3 | 6 +- secure/lib/libcrypto/man/man3/DSA_get0_pqg.3 | 6 +- secure/lib/libcrypto/man/man3/DSA_meth_new.3 | 6 +- secure/lib/libcrypto/man/man3/DSA_new.3 | 6 +- secure/lib/libcrypto/man/man3/DSA_set_method.3 | 6 +- secure/lib/libcrypto/man/man3/DSA_sign.3 | 6 +- secure/lib/libcrypto/man/man3/DSA_size.3 | 6 +- secure/lib/libcrypto/man/man3/DTLS_get_data_mtu.3 | 6 +- secure/lib/libcrypto/man/man3/DTLS_set_timer_cb.3 | 6 +- secure/lib/libcrypto/man/man3/DTLSv1_listen.3 | 6 +- secure/lib/libcrypto/man/man3/ECDSA_SIG_new.3 | 6 +- secure/lib/libcrypto/man/man3/ECDSA_sign.3 | 6 +- .../lib/libcrypto/man/man3/ECPKParameters_print.3 | 6 +- .../lib/libcrypto/man/man3/EC_GFp_simple_method.3 | 6 +- secure/lib/libcrypto/man/man3/EC_GROUP_copy.3 | 6 +- secure/lib/libcrypto/man/man3/EC_GROUP_new.3 | 6 +- .../lib/libcrypto/man/man3/EC_KEY_get_enc_flags.3 | 6 +- secure/lib/libcrypto/man/man3/EC_KEY_new.3 | 6 +- secure/lib/libcrypto/man/man3/EC_POINT_add.3 | 6 +- secure/lib/libcrypto/man/man3/EC_POINT_new.3 | 6 +- secure/lib/libcrypto/man/man3/ENGINE_add.3 | 6 +- secure/lib/libcrypto/man/man3/ERR_GET_LIB.3 | 6 +- secure/lib/libcrypto/man/man3/ERR_clear_error.3 | 6 +- secure/lib/libcrypto/man/man3/ERR_error_string.3 | 6 +- secure/lib/libcrypto/man/man3/ERR_get_error.3 | 6 +- .../libcrypto/man/man3/ERR_load_crypto_strings.3 | 6 +- secure/lib/libcrypto/man/man3/ERR_load_strings.3 | 6 +- secure/lib/libcrypto/man/man3/ERR_new.3 | 6 +- secure/lib/libcrypto/man/man3/ERR_print_errors.3 | 6 +- secure/lib/libcrypto/man/man3/ERR_put_error.3 | 6 +- secure/lib/libcrypto/man/man3/ERR_remove_state.3 | 6 +- secure/lib/libcrypto/man/man3/ERR_set_mark.3 | 6 +- .../lib/libcrypto/man/man3/EVP_ASYM_CIPHER_free.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_BytesToKey.3 | 6 +- .../man/man3/EVP_CIPHER_CTX_get_cipher_data.3 | 6 +- .../man/man3/EVP_CIPHER_CTX_get_original_iv.3 | 6 +- .../lib/libcrypto/man/man3/EVP_CIPHER_meth_new.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_DigestInit.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_DigestSignInit.3 | 6 +- .../lib/libcrypto/man/man3/EVP_DigestVerifyInit.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_EncodeInit.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_EncryptInit.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_KDF.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_KEM_free.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_KEYEXCH_free.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_KEYMGMT.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_MAC.3 | 10 ++-- secure/lib/libcrypto/man/man3/EVP_MD_meth_new.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_OpenInit.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PBE_CipherInit.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY2PKCS8.3 | 6 +- .../lib/libcrypto/man/man3/EVP_PKEY_ASN1_METHOD.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_ctrl.3 | 6 +- .../libcrypto/man/man3/EVP_PKEY_CTX_get0_libctx.3 | 6 +- .../libcrypto/man/man3/EVP_PKEY_CTX_get0_pkey.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_new.3 | 6 +- .../man/man3/EVP_PKEY_CTX_set1_pbe_pass.3 | 6 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_hkdf_md.3 | 6 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_params.3 | 6 +- .../man/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 | 6 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_scrypt_N.3 | 6 +- .../man/man3/EVP_PKEY_CTX_set_tls1_prf_md.3 | 6 +- .../libcrypto/man/man3/EVP_PKEY_asn1_get_count.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY_check.3 | 6 +- .../libcrypto/man/man3/EVP_PKEY_copy_parameters.3 | 6 +- .../lib/libcrypto/man/man3/EVP_PKEY_decapsulate.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY_decrypt.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY_derive.3 | 6 +- .../man/man3/EVP_PKEY_digestsign_supports_digest.3 | 6 +- .../lib/libcrypto/man/man3/EVP_PKEY_encapsulate.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY_encrypt.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY_fromdata.3 | 6 +- .../man/man3/EVP_PKEY_get_default_digest_nid.3 | 6 +- .../libcrypto/man/man3/EVP_PKEY_get_field_type.3 | 6 +- .../libcrypto/man/man3/EVP_PKEY_get_group_name.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY_get_size.3 | 6 +- .../libcrypto/man/man3/EVP_PKEY_gettable_params.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY_is_a.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY_keygen.3 | 6 +- .../libcrypto/man/man3/EVP_PKEY_meth_get_count.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY_meth_new.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY_new.3 | 6 +- .../libcrypto/man/man3/EVP_PKEY_print_private.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY_set1_RSA.3 | 6 +- .../man/man3/EVP_PKEY_set1_encoded_public_key.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY_set_type.3 | 6 +- .../libcrypto/man/man3/EVP_PKEY_settable_params.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY_sign.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY_todata.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_PKEY_verify.3 | 6 +- .../libcrypto/man/man3/EVP_PKEY_verify_recover.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_RAND.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_SIGNATURE.3 | 10 ++-- secure/lib/libcrypto/man/man3/EVP_SealInit.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_SignInit.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_VerifyInit.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_aes_128_gcm.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_aria_128_gcm.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_bf_cbc.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_blake2b512.3 | 6 +- .../lib/libcrypto/man/man3/EVP_camellia_128_ecb.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_cast5_cbc.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_chacha20.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_des_cbc.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_desx_cbc.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_idea_cbc.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_md2.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_md4.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_md5.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_mdc2.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_rc2_cbc.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_rc4.3 | 6 +- .../lib/libcrypto/man/man3/EVP_rc5_32_12_16_cbc.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_ripemd160.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_seed_cbc.3 | 6 +- .../man/man3/EVP_set_default_properties.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_sha1.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_sha224.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_sha3_224.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_sm3.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_sm4_cbc.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_whirlpool.3 | 6 +- secure/lib/libcrypto/man/man3/HMAC.3 | 6 +- secure/lib/libcrypto/man/man3/MD5.3 | 6 +- secure/lib/libcrypto/man/man3/MDC2_Init.3 | 6 +- secure/lib/libcrypto/man/man3/NCONF_new_ex.3 | 6 +- secure/lib/libcrypto/man/man3/OBJ_nid2obj.3 | 6 +- secure/lib/libcrypto/man/man3/OCSP_REQUEST_new.3 | 6 +- secure/lib/libcrypto/man/man3/OCSP_cert_to_id.3 | 6 +- .../libcrypto/man/man3/OCSP_request_add1_nonce.3 | 6 +- .../lib/libcrypto/man/man3/OCSP_resp_find_status.3 | 6 +- .../lib/libcrypto/man/man3/OCSP_response_status.3 | 6 +- secure/lib/libcrypto/man/man3/OCSP_sendreq_new.3 | 6 +- secure/lib/libcrypto/man/man3/OPENSSL_Applink.3 | 6 +- secure/lib/libcrypto/man/man3/OPENSSL_FILE.3 | 6 +- .../lib/libcrypto/man/man3/OPENSSL_LH_COMPFUNC.3 | 6 +- secure/lib/libcrypto/man/man3/OPENSSL_LH_stats.3 | 6 +- secure/lib/libcrypto/man/man3/OPENSSL_config.3 | 6 +- .../lib/libcrypto/man/man3/OPENSSL_fork_prepare.3 | 6 +- secure/lib/libcrypto/man/man3/OPENSSL_gmtime.3 | 6 +- .../lib/libcrypto/man/man3/OPENSSL_hexchar2int.3 | 6 +- secure/lib/libcrypto/man/man3/OPENSSL_ia32cap.3 | 6 +- .../lib/libcrypto/man/man3/OPENSSL_init_crypto.3 | 6 +- secure/lib/libcrypto/man/man3/OPENSSL_init_ssl.3 | 6 +- .../libcrypto/man/man3/OPENSSL_instrument_bus.3 | 6 +- .../man/man3/OPENSSL_load_builtin_modules.3 | 6 +- secure/lib/libcrypto/man/man3/OPENSSL_malloc.3 | 6 +- secure/lib/libcrypto/man/man3/OPENSSL_s390xcap.3 | 6 +- .../lib/libcrypto/man/man3/OPENSSL_secure_malloc.3 | 6 +- secure/lib/libcrypto/man/man3/OPENSSL_strcasecmp.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_ALGORITHM.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_CALLBACK.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_CMP_CTX_new.3 | 38 ++++++------- .../man/man3/OSSL_CMP_HDR_get0_transactionID.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_CMP_ITAV_set0.3 | 6 +- .../libcrypto/man/man3/OSSL_CMP_MSG_get0_header.3 | 6 +- .../libcrypto/man/man3/OSSL_CMP_MSG_http_perform.3 | 6 +- .../lib/libcrypto/man/man3/OSSL_CMP_SRV_CTX_new.3 | 6 +- .../libcrypto/man/man3/OSSL_CMP_STATUSINFO_new.3 | 6 +- .../lib/libcrypto/man/man3/OSSL_CMP_exec_certreq.3 | 22 +++++--- secure/lib/libcrypto/man/man3/OSSL_CMP_log_open.3 | 6 +- .../lib/libcrypto/man/man3/OSSL_CMP_validate_msg.3 | 6 +- .../lib/libcrypto/man/man3/OSSL_CORE_MAKE_FUNC.3 | 6 +- .../libcrypto/man/man3/OSSL_CRMF_MSG_get0_tmpl.3 | 6 +- .../man/man3/OSSL_CRMF_MSG_set0_validity.3 | 6 +- .../man/man3/OSSL_CRMF_MSG_set1_regCtrl_regToken.3 | 6 +- .../man/man3/OSSL_CRMF_MSG_set1_regInfo_certReq.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_CRMF_pbmp_new.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_DECODER.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_DECODER_CTX.3 | 6 +- .../man/man3/OSSL_DECODER_CTX_new_for_pkey.3 | 6 +- .../lib/libcrypto/man/man3/OSSL_DECODER_from_bio.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_DISPATCH.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_ENCODER.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_ENCODER_CTX.3 | 6 +- .../man/man3/OSSL_ENCODER_CTX_new_for_pkey.3 | 6 +- .../lib/libcrypto/man/man3/OSSL_ENCODER_to_bio.3 | 6 +- .../man/man3/OSSL_ESS_check_signing_certs.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_HTTP_REQ_CTX.3 | 18 +++--- .../lib/libcrypto/man/man3/OSSL_HTTP_parse_url.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_HTTP_transfer.3 | 15 +++-- secure/lib/libcrypto/man/man3/OSSL_ITEM.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_LIB_CTX.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_PARAM.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_PARAM_BLD.3 | 6 +- .../man/man3/OSSL_PARAM_allocate_from_text.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_PARAM_dup.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_PARAM_int.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_PROVIDER.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_SELF_TEST_new.3 | 6 +- .../man/man3/OSSL_SELF_TEST_set_callback.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_STORE_INFO.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_STORE_LOADER.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_STORE_SEARCH.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_STORE_attach.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_STORE_expect.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_STORE_open.3 | 6 +- secure/lib/libcrypto/man/man3/OSSL_trace_enabled.3 | 6 +- .../man/man3/OSSL_trace_get_category_num.3 | 6 +- .../libcrypto/man/man3/OSSL_trace_set_channel.3 | 6 +- .../man/man3/OpenSSL_add_all_algorithms.3 | 6 +- secure/lib/libcrypto/man/man3/OpenSSL_version.3 | 6 +- .../libcrypto/man/man3/PEM_X509_INFO_read_bio_ex.3 | 6 +- secure/lib/libcrypto/man/man3/PEM_bytes_read_bio.3 | 6 +- secure/lib/libcrypto/man/man3/PEM_read.3 | 6 +- secure/lib/libcrypto/man/man3/PEM_read_CMS.3 | 6 +- .../libcrypto/man/man3/PEM_read_bio_PrivateKey.3 | 6 +- secure/lib/libcrypto/man/man3/PEM_read_bio_ex.3 | 6 +- .../libcrypto/man/man3/PEM_write_bio_CMS_stream.3 | 6 +- .../man/man3/PEM_write_bio_PKCS7_stream.3 | 6 +- .../lib/libcrypto/man/man3/PKCS12_PBE_keyivgen.3 | 6 +- .../man/man3/PKCS12_SAFEBAG_create_cert.3 | 6 +- .../libcrypto/man/man3/PKCS12_SAFEBAG_get0_attrs.3 | 6 +- .../libcrypto/man/man3/PKCS12_SAFEBAG_get1_cert.3 | 6 +- .../libcrypto/man/man3/PKCS12_add1_attr_by_NID.3 | 6 +- .../libcrypto/man/man3/PKCS12_add_CSPName_asc.3 | 6 +- secure/lib/libcrypto/man/man3/PKCS12_add_cert.3 | 6 +- .../man/man3/PKCS12_add_friendlyname_asc.3 | 6 +- .../lib/libcrypto/man/man3/PKCS12_add_localkeyid.3 | 6 +- secure/lib/libcrypto/man/man3/PKCS12_add_safe.3 | 6 +- secure/lib/libcrypto/man/man3/PKCS12_create.3 | 15 +++-- .../lib/libcrypto/man/man3/PKCS12_decrypt_skey.3 | 6 +- secure/lib/libcrypto/man/man3/PKCS12_gen_mac.3 | 8 ++- .../libcrypto/man/man3/PKCS12_get_friendlyname.3 | 6 +- secure/lib/libcrypto/man/man3/PKCS12_init.3 | 6 +- .../libcrypto/man/man3/PKCS12_item_decrypt_d2i.3 | 6 +- .../libcrypto/man/man3/PKCS12_key_gen_utf8_ex.3 | 6 +- secure/lib/libcrypto/man/man3/PKCS12_newpass.3 | 6 +- .../lib/libcrypto/man/man3/PKCS12_pack_p7encdata.3 | 6 +- secure/lib/libcrypto/man/man3/PKCS12_parse.3 | 6 +- secure/lib/libcrypto/man/man3/PKCS5_PBE_keyivgen.3 | 6 +- secure/lib/libcrypto/man/man3/PKCS5_PBKDF2_HMAC.3 | 6 +- secure/lib/libcrypto/man/man3/PKCS7_decrypt.3 | 6 +- secure/lib/libcrypto/man/man3/PKCS7_encrypt.3 | 6 +- .../libcrypto/man/man3/PKCS7_get_octet_string.3 | 6 +- secure/lib/libcrypto/man/man3/PKCS7_sign.3 | 6 +- .../lib/libcrypto/man/man3/PKCS7_sign_add_signer.3 | 6 +- .../lib/libcrypto/man/man3/PKCS7_type_is_other.3 | 6 +- secure/lib/libcrypto/man/man3/PKCS7_verify.3 | 6 +- secure/lib/libcrypto/man/man3/PKCS8_encrypt.3 | 6 +- .../lib/libcrypto/man/man3/PKCS8_pkey_add1_attr.3 | 6 +- secure/lib/libcrypto/man/man3/RAND_add.3 | 6 +- secure/lib/libcrypto/man/man3/RAND_bytes.3 | 6 +- secure/lib/libcrypto/man/man3/RAND_cleanup.3 | 6 +- secure/lib/libcrypto/man/man3/RAND_egd.3 | 6 +- secure/lib/libcrypto/man/man3/RAND_get0_primary.3 | 6 +- secure/lib/libcrypto/man/man3/RAND_load_file.3 | 6 +- secure/lib/libcrypto/man/man3/RAND_set_DRBG_type.3 | 6 +- .../lib/libcrypto/man/man3/RAND_set_rand_method.3 | 6 +- secure/lib/libcrypto/man/man3/RC4_set_key.3 | 6 +- secure/lib/libcrypto/man/man3/RIPEMD160_Init.3 | 6 +- secure/lib/libcrypto/man/man3/RSA_blinding_on.3 | 6 +- secure/lib/libcrypto/man/man3/RSA_check_key.3 | 6 +- secure/lib/libcrypto/man/man3/RSA_generate_key.3 | 6 +- secure/lib/libcrypto/man/man3/RSA_get0_key.3 | 6 +- secure/lib/libcrypto/man/man3/RSA_meth_new.3 | 6 +- secure/lib/libcrypto/man/man3/RSA_new.3 | 6 +- .../man/man3/RSA_padding_add_PKCS1_type_1.3 | 6 +- secure/lib/libcrypto/man/man3/RSA_print.3 | 6 +- .../lib/libcrypto/man/man3/RSA_private_encrypt.3 | 6 +- secure/lib/libcrypto/man/man3/RSA_public_encrypt.3 | 6 +- secure/lib/libcrypto/man/man3/RSA_set_method.3 | 6 +- secure/lib/libcrypto/man/man3/RSA_sign.3 | 6 +- .../man/man3/RSA_sign_ASN1_OCTET_STRING.3 | 6 +- secure/lib/libcrypto/man/man3/RSA_size.3 | 6 +- secure/lib/libcrypto/man/man3/SCT_new.3 | 6 +- secure/lib/libcrypto/man/man3/SCT_print.3 | 6 +- secure/lib/libcrypto/man/man3/SCT_validate.3 | 6 +- secure/lib/libcrypto/man/man3/SHA256_Init.3 | 6 +- secure/lib/libcrypto/man/man3/SMIME_read_ASN1.3 | 6 +- secure/lib/libcrypto/man/man3/SMIME_read_CMS.3 | 6 +- secure/lib/libcrypto/man/man3/SMIME_read_PKCS7.3 | 6 +- secure/lib/libcrypto/man/man3/SMIME_write_ASN1.3 | 6 +- secure/lib/libcrypto/man/man3/SMIME_write_CMS.3 | 6 +- secure/lib/libcrypto/man/man3/SMIME_write_PKCS7.3 | 6 +- secure/lib/libcrypto/man/man3/SRP_Calc_B.3 | 6 +- secure/lib/libcrypto/man/man3/SRP_VBASE_new.3 | 6 +- .../lib/libcrypto/man/man3/SRP_create_verifier.3 | 6 +- secure/lib/libcrypto/man/man3/SRP_user_pwd_new.3 | 6 +- .../lib/libcrypto/man/man3/SSL_CIPHER_get_name.3 | 6 +- .../man/man3/SSL_COMP_add_compression_method.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_CONF_CTX_new.3 | 6 +- .../libcrypto/man/man3/SSL_CONF_CTX_set1_prefix.3 | 6 +- .../libcrypto/man/man3/SSL_CONF_CTX_set_flags.3 | 6 +- .../libcrypto/man/man3/SSL_CONF_CTX_set_ssl_ctx.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_CONF_cmd_argv.3 | 6 +- .../libcrypto/man/man3/SSL_CTX_add1_chain_cert.3 | 6 +- .../man/man3/SSL_CTX_add_extra_chain_cert.3 | 6 +- .../lib/libcrypto/man/man3/SSL_CTX_add_session.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_CTX_config.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_CTX_ctrl.3 | 6 +- .../lib/libcrypto/man/man3/SSL_CTX_dane_enable.3 | 6 +- .../libcrypto/man/man3/SSL_CTX_flush_sessions.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_CTX_free.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_CTX_get0_param.3 | 6 +- .../libcrypto/man/man3/SSL_CTX_get_verify_mode.3 | 6 +- .../man/man3/SSL_CTX_has_client_custom_ext.3 | 6 +- .../man/man3/SSL_CTX_load_verify_locations.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_CTX_new.3 | 6 +- .../lib/libcrypto/man/man3/SSL_CTX_sess_number.3 | 6 +- .../man/man3/SSL_CTX_sess_set_cache_size.3 | 6 +- .../libcrypto/man/man3/SSL_CTX_sess_set_get_cb.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_CTX_sessions.3 | 6 +- .../lib/libcrypto/man/man3/SSL_CTX_set0_CA_list.3 | 6 +- .../lib/libcrypto/man/man3/SSL_CTX_set1_curves.3 | 6 +- .../lib/libcrypto/man/man3/SSL_CTX_set1_sigalgs.3 | 6 +- .../man/man3/SSL_CTX_set1_verify_cert_store.3 | 6 +- .../man/man3/SSL_CTX_set_alpn_select_cb.3 | 6 +- .../lib/libcrypto/man/man3/SSL_CTX_set_cert_cb.3 | 6 +- .../libcrypto/man/man3/SSL_CTX_set_cert_store.3 | 6 +- .../man/man3/SSL_CTX_set_cert_verify_callback.3 | 6 +- .../libcrypto/man/man3/SSL_CTX_set_cipher_list.3 | 6 +- .../man/man3/SSL_CTX_set_client_cert_cb.3 | 6 +- .../man/man3/SSL_CTX_set_client_hello_cb.3 | 6 +- .../man/man3/SSL_CTX_set_ct_validation_callback.3 | 6 +- .../man/man3/SSL_CTX_set_ctlog_list_file.3 | 6 +- .../man/man3/SSL_CTX_set_default_passwd_cb.3 | 6 +- .../man/man3/SSL_CTX_set_generate_session_id.3 | 6 +- .../libcrypto/man/man3/SSL_CTX_set_info_callback.3 | 6 +- .../man/man3/SSL_CTX_set_keylog_callback.3 | 6 +- .../libcrypto/man/man3/SSL_CTX_set_max_cert_list.3 | 6 +- .../man/man3/SSL_CTX_set_min_proto_version.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_CTX_set_mode.3 | 6 +- .../libcrypto/man/man3/SSL_CTX_set_msg_callback.3 | 6 +- .../libcrypto/man/man3/SSL_CTX_set_num_tickets.3 | 6 +- .../lib/libcrypto/man/man3/SSL_CTX_set_options.3 | 6 +- .../man/man3/SSL_CTX_set_psk_client_callback.3 | 6 +- .../man/man3/SSL_CTX_set_quiet_shutdown.3 | 6 +- .../libcrypto/man/man3/SSL_CTX_set_read_ahead.3 | 6 +- .../man/man3/SSL_CTX_set_record_padding_callback.3 | 6 +- .../man/man3/SSL_CTX_set_security_level.3 | 6 +- .../man/man3/SSL_CTX_set_session_cache_mode.3 | 6 +- .../man/man3/SSL_CTX_set_session_id_context.3 | 6 +- .../man/man3/SSL_CTX_set_session_ticket_cb.3 | 6 +- .../man/man3/SSL_CTX_set_split_send_fragment.3 | 6 +- .../libcrypto/man/man3/SSL_CTX_set_srp_password.3 | 6 +- .../libcrypto/man/man3/SSL_CTX_set_ssl_version.3 | 6 +- .../SSL_CTX_set_stateless_cookie_generate_cb.3 | 6 +- .../lib/libcrypto/man/man3/SSL_CTX_set_timeout.3 | 6 +- .../man3/SSL_CTX_set_tlsext_servername_callback.3 | 6 +- .../man/man3/SSL_CTX_set_tlsext_status_cb.3 | 6 +- .../man/man3/SSL_CTX_set_tlsext_ticket_key_cb.3 | 6 +- .../man/man3/SSL_CTX_set_tlsext_use_srtp.3 | 6 +- .../man/man3/SSL_CTX_set_tmp_dh_callback.3 | 6 +- .../lib/libcrypto/man/man3/SSL_CTX_set_tmp_ecdh.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_CTX_set_verify.3 | 6 +- .../libcrypto/man/man3/SSL_CTX_use_certificate.3 | 6 +- .../man/man3/SSL_CTX_use_psk_identity_hint.3 | 6 +- .../libcrypto/man/man3/SSL_CTX_use_serverinfo.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_SESSION_free.3 | 6 +- .../libcrypto/man/man3/SSL_SESSION_get0_cipher.3 | 6 +- .../libcrypto/man/man3/SSL_SESSION_get0_hostname.3 | 6 +- .../man/man3/SSL_SESSION_get0_id_context.3 | 6 +- .../lib/libcrypto/man/man3/SSL_SESSION_get0_peer.3 | 6 +- .../man/man3/SSL_SESSION_get_compress_id.3 | 6 +- .../man/man3/SSL_SESSION_get_protocol_version.3 | 6 +- .../lib/libcrypto/man/man3/SSL_SESSION_get_time.3 | 6 +- .../libcrypto/man/man3/SSL_SESSION_has_ticket.3 | 6 +- .../libcrypto/man/man3/SSL_SESSION_is_resumable.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_SESSION_print.3 | 6 +- .../lib/libcrypto/man/man3/SSL_SESSION_set1_id.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_accept.3 | 6 +- .../lib/libcrypto/man/man3/SSL_alert_type_string.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_alloc_buffers.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_check_chain.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_clear.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_connect.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_do_handshake.3 | 6 +- .../man/man3/SSL_export_keying_material.3 | 6 +- .../libcrypto/man/man3/SSL_extension_supported.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_free.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_get0_peer_scts.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_get_SSL_CTX.3 | 6 +- .../lib/libcrypto/man/man3/SSL_get_all_async_fds.3 | 6 +- .../lib/libcrypto/man/man3/SSL_get_certificate.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_get_ciphers.3 | 6 +- .../lib/libcrypto/man/man3/SSL_get_client_random.3 | 6 +- .../libcrypto/man/man3/SSL_get_current_cipher.3 | 6 +- .../libcrypto/man/man3/SSL_get_default_timeout.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_get_error.3 | 6 +- .../lib/libcrypto/man/man3/SSL_get_extms_support.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_get_fd.3 | 6 +- .../libcrypto/man/man3/SSL_get_peer_cert_chain.3 | 6 +- .../libcrypto/man/man3/SSL_get_peer_certificate.3 | 6 +- .../man/man3/SSL_get_peer_signature_nid.3 | 6 +- .../lib/libcrypto/man/man3/SSL_get_peer_tmp_key.3 | 6 +- .../lib/libcrypto/man/man3/SSL_get_psk_identity.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_get_rbio.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_get_session.3 | 6 +- .../libcrypto/man/man3/SSL_get_shared_sigalgs.3 | 6 +- .../lib/libcrypto/man/man3/SSL_get_verify_result.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_get_version.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_group_to_name.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_in_init.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_key_update.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_library_init.3 | 6 +- .../libcrypto/man/man3/SSL_load_client_CA_file.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_new.3 | 10 ++-- secure/lib/libcrypto/man/man3/SSL_pending.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_read.3 | 6 +- .../lib/libcrypto/man/man3/SSL_read_early_data.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_rstate_string.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_session_reused.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_set1_host.3 | 6 +- .../libcrypto/man/man3/SSL_set_async_callback.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_set_bio.3 | 6 +- .../lib/libcrypto/man/man3/SSL_set_connect_state.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_set_fd.3 | 6 +- .../lib/libcrypto/man/man3/SSL_set_retry_verify.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_set_session.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_set_shutdown.3 | 6 +- .../lib/libcrypto/man/man3/SSL_set_verify_result.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_shutdown.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_state_string.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_want.3 | 6 +- secure/lib/libcrypto/man/man3/SSL_write.3 | 6 +- secure/lib/libcrypto/man/man3/TS_RESP_CTX_new.3 | 6 +- .../libcrypto/man/man3/TS_VERIFY_CTX_set_certs.3 | 6 +- secure/lib/libcrypto/man/man3/UI_STRING.3 | 6 +- secure/lib/libcrypto/man/man3/UI_UTIL_read_pw.3 | 6 +- secure/lib/libcrypto/man/man3/UI_create_method.3 | 6 +- secure/lib/libcrypto/man/man3/UI_new.3 | 6 +- secure/lib/libcrypto/man/man3/X509V3_get_d2i.3 | 6 +- secure/lib/libcrypto/man/man3/X509V3_set_ctx.3 | 6 +- secure/lib/libcrypto/man/man3/X509_ALGOR_dup.3 | 6 +- .../libcrypto/man/man3/X509_CRL_get0_by_serial.3 | 6 +- .../libcrypto/man/man3/X509_EXTENSION_set_object.3 | 6 +- secure/lib/libcrypto/man/man3/X509_LOOKUP.3 | 6 +- .../lib/libcrypto/man/man3/X509_LOOKUP_hash_dir.3 | 6 +- .../lib/libcrypto/man/man3/X509_LOOKUP_meth_new.3 | 6 +- .../man/man3/X509_NAME_ENTRY_get_object.3 | 6 +- .../man/man3/X509_NAME_add_entry_by_txt.3 | 6 +- secure/lib/libcrypto/man/man3/X509_NAME_get0_der.3 | 6 +- .../man/man3/X509_NAME_get_index_by_NID.3 | 6 +- secure/lib/libcrypto/man/man3/X509_NAME_print_ex.3 | 6 +- secure/lib/libcrypto/man/man3/X509_PUBKEY_new.3 | 6 +- secure/lib/libcrypto/man/man3/X509_SIG_get0.3 | 6 +- .../libcrypto/man/man3/X509_STORE_CTX_get_error.3 | 6 +- secure/lib/libcrypto/man/man3/X509_STORE_CTX_new.3 | 6 +- .../man/man3/X509_STORE_CTX_set_verify_cb.3 | 6 +- .../lib/libcrypto/man/man3/X509_STORE_add_cert.3 | 6 +- .../lib/libcrypto/man/man3/X509_STORE_get0_param.3 | 6 +- secure/lib/libcrypto/man/man3/X509_STORE_new.3 | 6 +- .../man/man3/X509_STORE_set_verify_cb_func.3 | 6 +- .../man/man3/X509_VERIFY_PARAM_set_flags.3 | 6 +- secure/lib/libcrypto/man/man3/X509_add_cert.3 | 6 +- secure/lib/libcrypto/man/man3/X509_check_ca.3 | 6 +- secure/lib/libcrypto/man/man3/X509_check_host.3 | 6 +- secure/lib/libcrypto/man/man3/X509_check_issued.3 | 6 +- .../libcrypto/man/man3/X509_check_private_key.3 | 6 +- secure/lib/libcrypto/man/man3/X509_check_purpose.3 | 6 +- secure/lib/libcrypto/man/man3/X509_cmp.3 | 6 +- secure/lib/libcrypto/man/man3/X509_cmp_time.3 | 6 +- secure/lib/libcrypto/man/man3/X509_digest.3 | 6 +- secure/lib/libcrypto/man/man3/X509_dup.3 | 6 +- .../man/man3/X509_get0_distinguishing_id.3 | 6 +- .../lib/libcrypto/man/man3/X509_get0_notBefore.3 | 6 +- .../lib/libcrypto/man/man3/X509_get0_signature.3 | 6 +- secure/lib/libcrypto/man/man3/X509_get0_uids.3 | 6 +- .../libcrypto/man/man3/X509_get_extension_flags.3 | 6 +- secure/lib/libcrypto/man/man3/X509_get_pubkey.3 | 6 +- .../lib/libcrypto/man/man3/X509_get_serialNumber.3 | 6 +- .../lib/libcrypto/man/man3/X509_get_subject_name.3 | 6 +- secure/lib/libcrypto/man/man3/X509_get_version.3 | 6 +- secure/lib/libcrypto/man/man3/X509_load_http.3 | 6 +- secure/lib/libcrypto/man/man3/X509_new.3 | 6 +- secure/lib/libcrypto/man/man3/X509_sign.3 | 6 +- secure/lib/libcrypto/man/man3/X509_verify.3 | 6 +- secure/lib/libcrypto/man/man3/X509_verify_cert.3 | 6 +- .../lib/libcrypto/man/man3/X509v3_get_ext_by_NID.3 | 6 +- secure/lib/libcrypto/man/man3/b2i_PVK_bio_ex.3 | 6 +- .../libcrypto/man/man3/d2i_PKCS8PrivateKey_bio.3 | 6 +- secure/lib/libcrypto/man/man3/d2i_PrivateKey.3 | 6 +- secure/lib/libcrypto/man/man3/d2i_RSAPrivateKey.3 | 12 ++-- secure/lib/libcrypto/man/man3/d2i_SSL_SESSION.3 | 6 +- secure/lib/libcrypto/man/man3/d2i_X509.3 | 8 ++- secure/lib/libcrypto/man/man3/i2d_CMS_bio_stream.3 | 6 +- .../lib/libcrypto/man/man3/i2d_PKCS7_bio_stream.3 | 6 +- secure/lib/libcrypto/man/man3/i2d_re_X509_tbs.3 | 6 +- secure/lib/libcrypto/man/man3/o2i_SCT_LIST.3 | 6 +- secure/lib/libcrypto/man/man3/s2i_ASN1_IA5STRING.3 | 6 +- secure/lib/libcrypto/man/man5/config.5 | 6 +- secure/lib/libcrypto/man/man5/fips_config.5 | 6 +- secure/lib/libcrypto/man/man5/x509v3_config.5 | 10 ++-- .../lib/libcrypto/man/man7/EVP_ASYM_CIPHER-RSA.7 | 6 +- .../lib/libcrypto/man/man7/EVP_ASYM_CIPHER-SM2.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-AES.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-ARIA.7 | 6 +- .../lib/libcrypto/man/man7/EVP_CIPHER-BLOWFISH.7 | 6 +- .../lib/libcrypto/man/man7/EVP_CIPHER-CAMELLIA.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-CAST.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-CHACHA.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-DES.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-IDEA.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-NULL.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-RC2.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-RC4.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-RC5.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-SEED.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-SM4.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_KDF-HKDF.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_KDF-KB.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_KDF-KRB5KDF.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_KDF-PBKDF1.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_KDF-PBKDF2.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_KDF-PKCS12KDF.7 | 14 +++-- secure/lib/libcrypto/man/man7/EVP_KDF-SCRYPT.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_KDF-SS.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_KDF-SSHKDF.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_KDF-TLS13_KDF.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_KDF-TLS1_PRF.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_KDF-X942-ASN1.7 | 6 +- .../lib/libcrypto/man/man7/EVP_KDF-X942-CONCAT.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_KDF-X963.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_KEM-RSA.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_KEYEXCH-DH.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_KEYEXCH-ECDH.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_KEYEXCH-X25519.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MAC-BLAKE2.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MAC-CMAC.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MAC-GMAC.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MAC-HMAC.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MAC-KMAC.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MAC-Poly1305.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MAC-Siphash.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MD-BLAKE2.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MD-MD2.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MD-MD4.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MD-MD5-SHA1.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MD-MD5.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MD-MDC2.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MD-NULL.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MD-RIPEMD160.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MD-SHA1.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MD-SHA2.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MD-SHA3.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MD-SHAKE.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MD-SM3.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MD-WHIRLPOOL.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_MD-common.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_PKEY-DH.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_PKEY-DSA.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_PKEY-EC.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_PKEY-FFC.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_PKEY-HMAC.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_PKEY-RSA.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_PKEY-SM2.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_PKEY-X25519.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_RAND-CTR-DRBG.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_RAND-HASH-DRBG.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_RAND-HMAC-DRBG.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_RAND-SEED-SRC.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_RAND-TEST-RAND.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_RAND.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_SIGNATURE-DSA.7 | 6 +- .../lib/libcrypto/man/man7/EVP_SIGNATURE-ECDSA.7 | 6 +- .../lib/libcrypto/man/man7/EVP_SIGNATURE-ED25519.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_SIGNATURE-HMAC.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_SIGNATURE-RSA.7 | 6 +- secure/lib/libcrypto/man/man7/OSSL_PROVIDER-FIPS.7 | 6 +- secure/lib/libcrypto/man/man7/OSSL_PROVIDER-base.7 | 6 +- .../lib/libcrypto/man/man7/OSSL_PROVIDER-default.7 | 6 +- .../lib/libcrypto/man/man7/OSSL_PROVIDER-legacy.7 | 6 +- secure/lib/libcrypto/man/man7/OSSL_PROVIDER-null.7 | 6 +- secure/lib/libcrypto/man/man7/RAND.7 | 6 +- secure/lib/libcrypto/man/man7/RSA-PSS.7 | 6 +- secure/lib/libcrypto/man/man7/X25519.7 | 6 +- secure/lib/libcrypto/man/man7/bio.7 | 6 +- secure/lib/libcrypto/man/man7/crypto.7 | 6 +- secure/lib/libcrypto/man/man7/ct.7 | 6 +- secure/lib/libcrypto/man/man7/des_modes.7 | 6 +- secure/lib/libcrypto/man/man7/evp.7 | 6 +- secure/lib/libcrypto/man/man7/fips_module.7 | 14 ++--- secure/lib/libcrypto/man/man7/life_cycle-cipher.7 | 6 +- secure/lib/libcrypto/man/man7/life_cycle-digest.7 | 6 +- secure/lib/libcrypto/man/man7/life_cycle-kdf.7 | 6 +- secure/lib/libcrypto/man/man7/life_cycle-mac.7 | 6 +- secure/lib/libcrypto/man/man7/life_cycle-pkey.7 | 6 +- secure/lib/libcrypto/man/man7/life_cycle-rand.7 | 6 +- secure/lib/libcrypto/man/man7/migration_guide.7 | 16 +++++- secure/lib/libcrypto/man/man7/openssl-core.h.7 | 6 +- .../libcrypto/man/man7/openssl-core_dispatch.h.7 | 6 +- .../lib/libcrypto/man/man7/openssl-core_names.h.7 | 6 +- secure/lib/libcrypto/man/man7/openssl-env.7 | 6 +- secure/lib/libcrypto/man/man7/openssl-glossary.7 | 6 +- secure/lib/libcrypto/man/man7/openssl-threads.7 | 6 +- .../lib/libcrypto/man/man7/openssl_user_macros.7 | 6 +- secure/lib/libcrypto/man/man7/ossl_store-file.7 | 6 +- secure/lib/libcrypto/man/man7/ossl_store.7 | 6 +- .../lib/libcrypto/man/man7/passphrase-encoding.7 | 6 +- secure/lib/libcrypto/man/man7/property.7 | 6 +- .../lib/libcrypto/man/man7/provider-asym_cipher.7 | 6 +- secure/lib/libcrypto/man/man7/provider-base.7 | 6 +- secure/lib/libcrypto/man/man7/provider-cipher.7 | 6 +- secure/lib/libcrypto/man/man7/provider-decoder.7 | 6 +- secure/lib/libcrypto/man/man7/provider-digest.7 | 6 +- secure/lib/libcrypto/man/man7/provider-encoder.7 | 6 +- secure/lib/libcrypto/man/man7/provider-kdf.7 | 6 +- secure/lib/libcrypto/man/man7/provider-kem.7 | 6 +- secure/lib/libcrypto/man/man7/provider-keyexch.7 | 6 +- secure/lib/libcrypto/man/man7/provider-keymgmt.7 | 6 +- secure/lib/libcrypto/man/man7/provider-mac.7 | 6 +- secure/lib/libcrypto/man/man7/provider-object.7 | 6 +- secure/lib/libcrypto/man/man7/provider-rand.7 | 6 +- secure/lib/libcrypto/man/man7/provider-signature.7 | 6 +- secure/lib/libcrypto/man/man7/provider-storemgmt.7 | 6 +- secure/lib/libcrypto/man/man7/provider.7 | 6 +- secure/lib/libcrypto/man/man7/proxy-certificates.7 | 6 +- secure/lib/libcrypto/man/man7/ssl.7 | 6 +- secure/lib/libcrypto/man/man7/x509.7 | 6 +- secure/usr.bin/openssl/man/CA.pl.1 | 6 +- secure/usr.bin/openssl/man/openssl-asn1parse.1 | 6 +- secure/usr.bin/openssl/man/openssl-ca.1 | 8 +-- secure/usr.bin/openssl/man/openssl-ciphers.1 | 6 +- secure/usr.bin/openssl/man/openssl-cmds.1 | 6 +- secure/usr.bin/openssl/man/openssl-cmp.1 | 37 ++++++++----- secure/usr.bin/openssl/man/openssl-cms.1 | 10 ++-- secure/usr.bin/openssl/man/openssl-crl.1 | 6 +- secure/usr.bin/openssl/man/openssl-crl2pkcs7.1 | 6 +- secure/usr.bin/openssl/man/openssl-dgst.1 | 6 +- secure/usr.bin/openssl/man/openssl-dhparam.1 | 6 +- secure/usr.bin/openssl/man/openssl-dsa.1 | 6 +- secure/usr.bin/openssl/man/openssl-dsaparam.1 | 6 +- secure/usr.bin/openssl/man/openssl-ec.1 | 6 +- secure/usr.bin/openssl/man/openssl-ecparam.1 | 6 +- secure/usr.bin/openssl/man/openssl-enc.1 | 6 +- secure/usr.bin/openssl/man/openssl-engine.1 | 6 +- secure/usr.bin/openssl/man/openssl-errstr.1 | 6 +- secure/usr.bin/openssl/man/openssl-fipsinstall.1 | 6 +- .../usr.bin/openssl/man/openssl-format-options.1 | 6 +- secure/usr.bin/openssl/man/openssl-gendsa.1 | 6 +- secure/usr.bin/openssl/man/openssl-genpkey.1 | 6 +- secure/usr.bin/openssl/man/openssl-genrsa.1 | 6 +- secure/usr.bin/openssl/man/openssl-info.1 | 6 +- secure/usr.bin/openssl/man/openssl-kdf.1 | 6 +- secure/usr.bin/openssl/man/openssl-list.1 | 6 +- secure/usr.bin/openssl/man/openssl-mac.1 | 6 +- .../openssl/man/openssl-namedisplay-options.1 | 6 +- secure/usr.bin/openssl/man/openssl-nseq.1 | 6 +- secure/usr.bin/openssl/man/openssl-ocsp.1 | 6 +- .../openssl/man/openssl-passphrase-options.1 | 6 +- secure/usr.bin/openssl/man/openssl-passwd.1 | 6 +- secure/usr.bin/openssl/man/openssl-pkcs12.1 | 6 +- secure/usr.bin/openssl/man/openssl-pkcs7.1 | 6 +- secure/usr.bin/openssl/man/openssl-pkcs8.1 | 6 +- secure/usr.bin/openssl/man/openssl-pkey.1 | 6 +- secure/usr.bin/openssl/man/openssl-pkeyparam.1 | 6 +- secure/usr.bin/openssl/man/openssl-pkeyutl.1 | 6 +- secure/usr.bin/openssl/man/openssl-prime.1 | 6 +- secure/usr.bin/openssl/man/openssl-rand.1 | 6 +- secure/usr.bin/openssl/man/openssl-rehash.1 | 8 +-- secure/usr.bin/openssl/man/openssl-req.1 | 6 +- secure/usr.bin/openssl/man/openssl-rsa.1 | 6 +- secure/usr.bin/openssl/man/openssl-rsautl.1 | 6 +- secure/usr.bin/openssl/man/openssl-s_client.1 | 6 +- secure/usr.bin/openssl/man/openssl-s_server.1 | 6 +- secure/usr.bin/openssl/man/openssl-s_time.1 | 6 +- secure/usr.bin/openssl/man/openssl-sess_id.1 | 6 +- secure/usr.bin/openssl/man/openssl-smime.1 | 6 +- secure/usr.bin/openssl/man/openssl-speed.1 | 6 +- secure/usr.bin/openssl/man/openssl-spkac.1 | 6 +- secure/usr.bin/openssl/man/openssl-srp.1 | 6 +- secure/usr.bin/openssl/man/openssl-storeutl.1 | 6 +- secure/usr.bin/openssl/man/openssl-ts.1 | 10 ++-- .../openssl/man/openssl-verification-options.1 | 6 +- secure/usr.bin/openssl/man/openssl-verify.1 | 6 +- secure/usr.bin/openssl/man/openssl-version.1 | 6 +- secure/usr.bin/openssl/man/openssl-x509.1 | 6 +- secure/usr.bin/openssl/man/openssl.1 | 6 +- secure/usr.bin/openssl/man/tsget.1 | 6 +- 868 files changed, 2999 insertions(+), 2665 deletions(-) diff --cc crypto/openssl/README.md index f2f4fd39ad05,000000000000..b848d050132a mode 100644,000000..100644 --- a/crypto/openssl/README.md +++ b/crypto/openssl/README.md @@@ -1,224 -1,0 +1,224 @@@ +Welcome to the OpenSSL Project +============================== + +[![openssl logo]][www.openssl.org] + +[![github actions ci badge]][github actions ci] +[![appveyor badge]][appveyor jobs] + +OpenSSL is a robust, commercial-grade, full-featured Open Source Toolkit +for the Transport Layer Security (TLS) protocol formerly known as the +Secure Sockets Layer (SSL) protocol. The protocol implementation is based +on a full-strength general purpose cryptographic library, which can also +be used stand-alone. + +OpenSSL is descended from the SSLeay library developed by Eric A. Young +and Tim J. Hudson. + +The official Home Page of the OpenSSL Project is [www.openssl.org]. + +Table of Contents +================= + + - [Overview](#overview) + - [Download](#download) + - [Build and Install](#build-and-install) + - [Documentation](#documentation) + - [License](#license) + - [Support](#support) + - [Contributing](#contributing) + - [Legalities](#legalities) + +Overview +======== + +The OpenSSL toolkit includes: + +- **libssl** + an implementation of all TLS protocol versions up to TLSv1.3 ([RFC 8446]). + +- **libcrypto** + a full-strength general purpose cryptographic library. It constitutes the + basis of the TLS implementation, but can also be used independently. + +- **openssl** + the OpenSSL command line tool, a swiss army knife for cryptographic tasks, + testing and analyzing. It can be used for + - creation of key parameters + - creation of X.509 certificates, CSRs and CRLs + - calculation of message digests + - encryption and decryption + - SSL/TLS client and server tests + - handling of S/MIME signed or encrypted mail + - and more... + +Download +======== + +For Production Use +------------------ + +Source code tarballs of the official releases can be downloaded from +[www.openssl.org/source](https://www.openssl.org/source). +The OpenSSL project does not distribute the toolkit in binary form. + +However, for a large variety of operating systems precompiled versions +of the OpenSSL toolkit are available. In particular on Linux and other +Unix operating systems it is normally recommended to link against the +precompiled shared libraries provided by the distributor or vendor. + +For Testing and Development +--------------------------- + +Although testing and development could in theory also be done using +the source tarballs, having a local copy of the git repository with +the entire project history gives you much more insight into the +code base. + +The official OpenSSL Git Repository is located at [git.openssl.org]. +There is a GitHub mirror of the repository at [github.com/openssl/openssl], +which is updated automatically from the former on every commit. + +A local copy of the Git Repository can be obtained by cloning it from +the original OpenSSL repository using + + git clone git://git.openssl.org/openssl.git + +or from the GitHub mirror using + + git clone https://github.com/openssl/openssl.git + *** 224101 LINES SKIPPED *** From nobody Mon Oct 9 19:13: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 4S47x54V9Vz4w8pq; Mon, 9 Oct 2023 19:13: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 4S47x52TCRz4VKG; Mon, 9 Oct 2023 19:13:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696878825; 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=9uz910ctc85+U4gvw2Qh+z2TUOp5GEOxM31V2vVqP9o=; b=laMQGR2no/fq5gqDGhcf22XC+9CkF7VqT0I0H8y+7ToUxa/cDaun7Qgj9tK/LaB/OCn1JC RpO3NWqY/SSr7AsPnZWTQ1pG5Ug4Ci7GoOVFzYDcsNaBVHu1U9rVJsjG9hewZFbq2cUN14 wkpuI5d/FAJIK50h5fmME20QjwhEIAu+9hNRSE1V5JpuzBU5IbLfnIMBR4v1IWdRNtbSL8 5ptNpWXf9lezpFWG2+xXRqRf8XP1zg29tyLIUi4mPLOutNBRIAstlcUafWo7ffElLBN6ZT IfQq2QODYNq+e8n1+v0KwgDiyi4Rf4p9mXMn4bpuVvveJZe+1vATX/1SRBHDqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696878825; a=rsa-sha256; cv=none; b=pOjCTBdjjVYkPbM//9PYJ3puKGxWQRzUgC3mZyjxlUk2hqvlcXMAJ9AJGF9FIvemJDKwDV lxatHeq4XkFUeiW3qUXxP60m4W7EZgUYbZbUhI7QjG+vXuzTT63ss8JMneuT1JmnXE1+9n XpRQ7sgxW7kmhny6OWXi7GzlxuVH2xAy8EhwuCVnQ9QLXLSKH1luihlB5H0fToXvHCLHCX WJEuUSgGd+qJJoAF8TvvruWqbFkKTt4Huf635WijQkb3xBhE5u/+OeBGFC4ddY7v7unO1v /F7fdYG2eJLhoieHuw/ije1QhPO2bsXyuMTPlz7bwQYtpMkO13XwCOSwl3VcYg== 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=1696878825; 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=9uz910ctc85+U4gvw2Qh+z2TUOp5GEOxM31V2vVqP9o=; b=BD/YuW9b3Z0zHHXrDPy/5GxRZqr9NUFiZXzcd0mQf+XlSeU8hQEmDsNSAxZ9UKKrFSZj3S 7XHXi47MZDbO9UUUESwXiaSMc58HIpYlQ/EvFBhFmIe7FqejhvOPLvOIIqTgLHyzy2OWUn TtLhD3+qN1kGvVNFiXXi7X2f9EUaucKAH6L8hJ6OiJLgmx9Mo3RhJ71AlB9yGi1LG/UfJW i7pjXeABZd9vAZNCPWf37zU+qBaPvHESObpPeqSNqSLyN6N5kCnO9q9dkzHOeTAD5UGhYQ fJ3aujr1Uz/sP6tv5ItCXtl4Z7MJ+3d8/tyd20FgKXDeGHqPQ2mCQTOxvk9cYQ== 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 4S47x51R5cz1798; Mon, 9 Oct 2023 19:13: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 399JDj6q072131; Mon, 9 Oct 2023 19:13:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399JDjHe072128; Mon, 9 Oct 2023 19:13:45 GMT (envelope-from git) Date: Mon, 9 Oct 2023 19:13:45 GMT Message-Id: <202310091913.399JDjHe072128@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: 5d371834d29c - main - Cirrus CI: Trigger on pull requests or downstream repos 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: 5d371834d29c3c716148f201bb8c1f68f15218fb Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5d371834d29c3c716148f201bb8c1f68f15218fb commit 5d371834d29c3c716148f201bb8c1f68f15218fb Author: Jose Luis Duran AuthorDate: 2023-10-06 12:13:26 +0000 Commit: Ed Maste CommitDate: 2023-10-09 19:13:21 +0000 Cirrus CI: Trigger on pull requests or downstream repos Since Cirrus Labs is limiting their free usage tier [1], limit CI runs on pull requests only. Otherwise, we might deplete our monthly quota within a few days. Adapt the task amd64-llvm16 to execute on downstream repos or on pull requests only. Other alternatives will be further studied. [1]: https://cirrus-ci.org/blog/2023/07/17/limiting-free-usage-of-cirrus-ci/ --- .cirrus.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.cirrus.yml b/.cirrus.yml index 99a6e0106897..18417b52e6c9 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -23,6 +23,7 @@ task: TOOLCHAIN: llvm15 TOOLCHAIN_PKG: ${TOOLCHAIN}-lite - name: amd64-llvm16 World and kernel build and boot smoke test + only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' || $CIRRUS_BRANCH =~ 'pull/.*' env: TARGET: amd64 TARGET_ARCH: amd64 From nobody Mon Oct 9 19:23: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 4S487n5SgWz4wBHx; Mon, 9 Oct 2023 19:23: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 4S487n4xy3z4WNm; Mon, 9 Oct 2023 19:23:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696879381; 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=duR6lT8Cuxx9G6sbcX817bVcgu+EVSPZleq6ljRIits=; b=dWw9wo4SGJ5dH9MvIm7QiQpTWh6199dL6I/SMARA9gOJWBR4bXfmiFbeysvS5pBDoY6wvf uV5A6hIhgri7oV5Q1WJOA2Y4bq0bZfK4gJhabWgHWZfW4wl+7y9pQpGoJzugVB1Xo8yxiS 5pGM6QUKq4sdPHCdEFo4ExmNw7SmvO+N9bJVDuTFoXN2f6QEXjIZr5V1m9KPaj36QInzpp vNELrIsX6gjYPIprwrhKSKYMSs/FwRgaXo3kaMeblPq6Pn2Az8NYS57gZz7AwoBSw9jjZF KgSlaoNeowaeXXHyFhe+rcJyOTWbxyU0hoiU/+N69SGxNGL/o5PUPOMGckkebA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696879381; a=rsa-sha256; cv=none; b=POGmPoyJhW/i5DbtzqoPclzjTkifqoA4uo6B+YGu4tu00eSGAtddp+Ac+YVNe6FbD7xuXq 6BlWLBgnUhCWfuXgSYnHaBgRWtqOWh7j3FuujAAJw+eQ1v9lG/tH6MtbwvUK8AP+ezXvL0 jwB5vDZ6/5oZgvSSdA3I84i7Vidm6yruQpdbo2g7SFtST5u+8XpRD66FKZqN2TDY+sjSrq RP/GzojGSU0Vr7tQTK2/C6bfvujC1F48iXFtIPs4c87O5lqeK2gYeu42UQAE54iFMoPy0C 1A9fnhiGgsVlTwQ0gLlghS3W9wCTiRSAQkDBtxHKwRzKFn3QeEEuxD2VIV3S2Q== 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=1696879381; 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=duR6lT8Cuxx9G6sbcX817bVcgu+EVSPZleq6ljRIits=; b=ur5BES2Id11cRa2uBp4oIUGxkt3vb+LhHvFf7mCtO6ncl5dKwSLxv+L+Cub/BlqcZofnZx Fh9w1CCifkZHdpYBchhRxMCRL+R8udr3irwUn8g2UpZrB4qNxSR711gYyD8X5yby0KABlK Y9SGrcDEcSaDrjwHd84IGW9JGGCmnVjXyR/k6QAYJusSPLOHuqm9qvCqYdrislbEdCfMcE YJHig34LQ2LK3dXpqx/enGNI2mQECFOLO5Wz9OSlcfqLX5qJP+JS9cTHi7St1gaeyBF6MO eljzpq0q7hD9S+oEAjG/s9WWsAAYvL37rIDZnfcU/P2C5+rwDJjn3DelkJV5Eg== 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 4S487n40psz177S; Mon, 9 Oct 2023 19:23: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 399JN1xL088042; Mon, 9 Oct 2023 19:23:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399JN1Fh088039; Mon, 9 Oct 2023 19:23:01 GMT (envelope-from git) Date: Mon, 9 Oct 2023 19:23:01 GMT Message-Id: <202310091923.399JN1Fh088039@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 018d93ece16b - main - LinuxKPI: 802.11: add unconditional error reporting 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 018d93ece16bd33077021383940d0da5121f0691 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=018d93ece16bd33077021383940d0da5121f0691 commit 018d93ece16bd33077021383940d0da5121f0691 Author: Bjoern A. Zeeb AuthorDate: 2023-10-09 19:11:50 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-09 19:21:51 +0000 LinuxKPI: 802.11: add unconditional error reporting Multiple reports have shown missed state transitions in net80211 without major cause obvious (or with a txq warning in iwlwifi). In order to better track down potential problems add unconditional ic_printf calls to any case in the lkpi state machine compat code which would let us return with an error in the hope that it helps us to catch the actual problems. Also remove the debug conditions from ieee80211_{beacon,connection}_loss which can also cause state transitions to have the ic_printf all the time there too. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 84 +++++++++++++++++++++------- 1 file changed, 64 insertions(+), 20 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 4a296e2f0fad..e8fb5b4914a6 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1012,6 +1012,8 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int vif->bss_conf.chandef.center_freq2 = conf->def.center_freq2; } else { + ic_printf(vap->iv_ic, "%s:%d: mo_add_chanctx " + "failed: %d\n", __func__, __LINE__, error); goto out; } @@ -1024,6 +1026,8 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int if (error == EOPNOTSUPP) error = 0; if (error != 0) { + ic_printf(vap->iv_ic, "%s:%d: mo_assign_vif_chanctx " + "failed: %d\n", __func__, __LINE__, error); lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); free(lchanctx, M_LKPI80211); @@ -1049,6 +1053,8 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int lsta = lkpi_lsta_alloc(vap, ni->ni_macaddr, hw, ni); if (lsta == NULL) { error = ENOMEM; + ic_printf(vap->iv_ic, "%s:%d: lkpi_lsta_alloc " + "failed: %d\n", __func__, __LINE__, error); goto out; } lsta->ni = ieee80211_ref_node(ni); @@ -1068,6 +1074,8 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_NONE); if (error != 0) { IMPROVE("do we need to undo the chan ctx?"); + ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(NONE) " + "failed: %d\n", __func__, __LINE__, error); goto out; } #if 0 @@ -1169,6 +1177,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_NOTEXIST); if (error != 0) { IMPROVE("do we need to undo the chan ctx?"); + ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(NOTEXIST) " + "failed: %d\n", __func__, __LINE__, error); goto out; } #if 0 @@ -1247,8 +1257,11 @@ lkpi_sta_auth_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, in KASSERT(lsta->state == IEEE80211_STA_NONE, ("%s: lsta %p state not " "NONE: %#x\n", __func__, lsta, lsta->state)); error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_AUTH); - if (error != 0) + if (error != 0) { + ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(AUTH) " + "failed: %d\n", __func__, __LINE__, error); goto out; + } /* End mgd_complete_tx. */ if (lsta->in_mgd) { @@ -1386,8 +1399,11 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i /* Call iv_newstate first so we get potential DISASSOC packet out. */ error = lvif->iv_newstate(vap, nstate, arg); - if (error != 0) + if (error != 0) { + ic_printf(vap->iv_ic, "%s:%d: iv_newstate(%p, %d, %d) " + "failed: %d\n", __func__, __LINE__, vap, nstate, arg, error); goto outni; + } IEEE80211_UNLOCK(vap->iv_ic); LKPI_80211_LHW_LOCK(lhw); @@ -1421,8 +1437,11 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i KASSERT(lsta->state == IEEE80211_STA_AUTH, ("%s: lsta %p state not " "AUTH: %#x\n", __func__, lsta, lsta->state)); error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_NONE); - if (error != 0) + if (error != 0) { + ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(NONE) " + "failed: %d\n", __func__, __LINE__, error); goto out; + } lkpi_lsta_dump(lsta, ni, __func__, __LINE__); @@ -1442,6 +1461,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_NOTEXIST); if (error != 0) { IMPROVE("do we need to undo the chan ctx?"); + ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(NOTEXIST) " + "failed: %d\n", __func__, __LINE__, error); goto out; } @@ -1559,8 +1580,11 @@ lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int sta->wme = true; #endif error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_ASSOC); - if (error != 0) + if (error != 0) { + ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(ASSOC) " + "failed: %d\n", __func__, __LINE__, error); goto out; + } IMPROVE("wme / conf_tx [all]"); @@ -1634,6 +1658,8 @@ lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_AUTHORIZED); if (error != 0) { IMPROVE("undo some changes?"); + ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(AUTHORIZED) " + "failed: %d\n", __func__, __LINE__, error); goto out; } @@ -1716,8 +1742,11 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Call iv_newstate first so we get potential DISASSOC packet out. */ error = lvif->iv_newstate(vap, nstate, arg); - if (error != 0) + if (error != 0) { + ic_printf(vap->iv_ic, "%s:%d: iv_newstate(%p, %d, %d) " + "failed: %d\n", __func__, __LINE__, vap, nstate, arg, error); goto outni; + } IEEE80211_UNLOCK(vap->iv_ic); LKPI_80211_LHW_LOCK(lhw); @@ -1753,8 +1782,11 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int KASSERT(lsta->state == IEEE80211_STA_AUTHORIZED, ("%s: lsta %p state not " "AUTHORIZED: %#x\n", __func__, lsta, lsta->state)); error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_ASSOC); - if (error != 0) + if (error != 0) { + ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(ASSOC) " + "failed: %d\n", __func__, __LINE__, error); goto out; + } lkpi_lsta_dump(lsta, ni, __func__, __LINE__); @@ -1763,8 +1795,11 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int KASSERT(lsta->state == IEEE80211_STA_ASSOC, ("%s: lsta %p state not " "ASSOC: %#x\n", __func__, lsta, lsta->state)); error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_AUTH); - if (error != 0) + if (error != 0) { + ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(AUTH) " + "failed: %d\n", __func__, __LINE__, error); goto out; + } lkpi_lsta_dump(lsta, ni, __func__, __LINE__); @@ -1829,8 +1864,11 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Call iv_newstate first so we get potential DISASSOC packet out. */ error = lvif->iv_newstate(vap, nstate, arg); - if (error != 0) + if (error != 0) { + ic_printf(vap->iv_ic, "%s:%d: iv_newstate(%p, %d, %d) " + "failed: %d\n", __func__, __LINE__, vap, nstate, arg, error); goto outni; + } IEEE80211_UNLOCK(vap->iv_ic); LKPI_80211_LHW_LOCK(lhw); @@ -1864,8 +1902,11 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int KASSERT(lsta->state == IEEE80211_STA_AUTHORIZED, ("%s: lsta %p state not " "AUTHORIZED: %#x\n", __func__, lsta, lsta->state)); error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_ASSOC); - if (error != 0) + if (error != 0) { + ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(ASSOC) " + "failed: %d\n", __func__, __LINE__, error); goto out; + } lkpi_lsta_dump(lsta, ni, __func__, __LINE__); @@ -1874,8 +1915,11 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int KASSERT(lsta->state == IEEE80211_STA_ASSOC, ("%s: lsta %p state not " "ASSOC: %#x\n", __func__, lsta, lsta->state)); error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_AUTH); - if (error != 0) + if (error != 0) { + ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(AUTH) " + "failed: %d\n", __func__, __LINE__, error); goto out; + } lkpi_lsta_dump(lsta, ni, __func__, __LINE__); @@ -1884,8 +1928,11 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int KASSERT(lsta->state == IEEE80211_STA_AUTH, ("%s: lsta %p state not " "AUTH: %#x\n", __func__, lsta, lsta->state)); error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_NONE); - if (error != 0) + if (error != 0) { + ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(NONE) " + "failed: %d\n", __func__, __LINE__, error); goto out; + } lkpi_lsta_dump(lsta, ni, __func__, __LINE__); @@ -1903,6 +1950,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_NOTEXIST); if (error != 0) { IMPROVE("do we need to undo the chan ctx?"); + ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(NOTEXIST) " + "failed: %d\n", __func__, __LINE__, error); goto out; } @@ -4859,10 +4908,8 @@ linuxkpi_ieee80211_connection_loss(struct ieee80211_vif *vif) nstate = IEEE80211_S_INIT; arg = 0; /* Not a valid reason. */ -#ifdef LINUXKPI_DEBUG_80211 - if (linuxkpi_debug_80211 & D80211_TRACE) - ic_printf(vap->iv_ic, "%s: vif %p\n", __func__, vif); -#endif + ic_printf(vap->iv_ic, "%s: vif %p vap %p state %s\n", __func__, + vif, vap, ieee80211_state_name[vap->iv_state]); ieee80211_new_state(vap, nstate, arg); } @@ -4875,11 +4922,8 @@ linuxkpi_ieee80211_beacon_loss(struct ieee80211_vif *vif) lvif = VIF_TO_LVIF(vif); vap = LVIF_TO_VAP(lvif); -#ifdef LINUXKPI_DEBUG_80211 - if (linuxkpi_debug_80211 & D80211_TRACE || vap->iv_state != IEEE80211_S_RUN) - ic_printf(vap->iv_ic, "%s: vif %p vap %p state %s\n", __func__, - vif, vap, ieee80211_state_name[vap->iv_state]); -#endif + ic_printf(vap->iv_ic, "%s: vif %p vap %p state %s\n", __func__, + vif, vap, ieee80211_state_name[vap->iv_state]); ieee80211_beacon_miss(vap->iv_ic); } From nobody Mon Oct 9 19:50: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 4S48lg0VCQz4wFdT; Mon, 9 Oct 2023 19:50: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 4S48lf75GZz4Yg3; Mon, 9 Oct 2023 19:50:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696881039; 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=xNePUKc5+nKODCbC0lnQSoINuRL3uBjvb4gRdO9x420=; b=ydyby1Gnyi+pV1tqXyPQzMU42vcMUCOM2xZKvCzNzi6S0ojcR8R0fKC7AiYvACRqYnmJr7 TRG50Q+OPuWuV4Rxy4LYFMXsa05ujIQAG57MAsujcXt+4byJ73akqTfLMznVYuyBIIDc05 meG4au0unibjvk9I/+dJbBwtsjH7sb8POGaEF+7q192+1XxDn8KLHykodlAPS31uBkfdWi TLoQrWtuUyciQkitOS+i4liOciIdZOxgrT1abQBH9d4sw9WPQWE3byf7K3SuNeXQFITaMn +94fwrxPZdsYaRn5gxpPam+0u9MBc8B1GqezjOyzRnB0sLGoO8/E0dADOJPeCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696881039; a=rsa-sha256; cv=none; b=dbsPeOz0QtdFIqGcG/RY7giVVPAr9JjmK4SUiWETxfDDCgTsnHzgeF0gYrWz0qJdmDMbYn VzNpoYr1W9JBg4u+DcooCGpWfSfEYxGSbwHTgc04bZ67zZbJ7s5JBcd3TAeTfcjA2VyATk yT/0WICQNW5tmZdgAhqMxuzDnApDVkRdEsD2vnggiaZMVlzYEFrFzG9xvNSzjh1VlPzIGv uo/I8H0ueRhdV2oRhbF8V+Q/qR/lRqY4sDa2qEznT0nhOQgDx5jG6jgaLLF05sTpAjdHoi Y5XUW4umhIW2SwNShYTZEciuopjdRcNIdoKSlSl6XL0ksD0IK+a7LSFCoPQqEQ== 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=1696881039; 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=xNePUKc5+nKODCbC0lnQSoINuRL3uBjvb4gRdO9x420=; b=n7ZfNN8rB5R8WKoy5u6BVvvqSpfk1P0mcn6cqh6KD+EcXTDn3t6qf+sIVqYSLfO7KXGrlJ 4af0noqU+RnrQJA/exLl5FTtNQpZTc+Zh0XfS9N9uV7YsqJJUaAnedHmeZI17MFitQH6mb htuhXVbRu/YzACRq8PHrfWxvGnien5Fm/3cbzVjZd2U1DcATpzj2MiNQS/uKDSqFxLLXTC 0jp4PVEKTE2KhogDT4LOYF6oLN/NU3TesuUL5nlA3JiWrk9OePoi5tQ3ALXpczvUznu+SW iApOcey1XdAfgwVO8bDHcLHb/NHXwUWvtS+kIMz8rNFyMI9e1mYhtLcV5P4n+Q== 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 4S48lf68Z4z17Hm; Mon, 9 Oct 2023 19:50: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 399JocAB033348; Mon, 9 Oct 2023 19:50:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399Jocsa033345; Mon, 9 Oct 2023 19:50:38 GMT (envelope-from git) Date: Mon, 9 Oct 2023 19:50:38 GMT Message-Id: <202310091950.399Jocsa033345@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: ad134f8ab768 - main - iwlwifi: re-enable "Invalid TXQ id" logging 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad134f8ab768e3b1d2db203f1cc963bdf0eea857 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ad134f8ab768e3b1d2db203f1cc963bdf0eea857 commit ad134f8ab768e3b1d2db203f1cc963bdf0eea857 Author: Bjoern A. Zeeb AuthorDate: 2023-10-09 19:47:39 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-09 19:50:02 +0000 iwlwifi: re-enable "Invalid TXQ id" logging Various reports recently hit the "Invalid TXQ id" in iwlwifi again. Unconditionally enable logging and add a note to report to a specific PR in the log message for now. Along with 018d93ece16b this will hopefully help us to understand what is going on. Sponsored by: The FreeBSD Foundation PR: 274382 --- sys/contrib/dev/iwlwifi/mvm/tx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/contrib/dev/iwlwifi/mvm/tx.c b/sys/contrib/dev/iwlwifi/mvm/tx.c index 2407d0ee832e..da33c1a5cc46 100644 --- a/sys/contrib/dev/iwlwifi/mvm/tx.c +++ b/sys/contrib/dev/iwlwifi/mvm/tx.c @@ -1199,9 +1199,10 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb, if (WARN_ONCE(txq_id == IWL_MVM_INVALID_QUEUE, "Invalid TXQ id")) { #if defined(__FreeBSD__) - IWL_DEBUG_TX(mvm, "fc %#06x tid %u txq_id %u mvm %p " - "skb %p { len %u } info %p sta %p\n", fc, - tid, txq_id, mvm, skb, skb->len, info, sta); + printf("%s:%d: fc %#06x tid %u txq_id %u mvm %p " + "skb %p { len %u } info %p sta %p (if you see this please " + "report to PR 274382)\n", __func__, __LINE__, + fc, tid, txq_id, mvm, skb, skb->len, info, sta); #endif iwl_trans_free_tx_cmd(mvm->trans, dev_cmd); spin_unlock(&mvmsta->lock); From nobody Mon Oct 9 20:12: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 4S49Dn2PNBz4wJS1; Mon, 9 Oct 2023 20:12: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 4S49Dn1ytzz4bvw; Mon, 9 Oct 2023 20:12:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696882345; 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=7mD0Rbo6CPL+PJPgjLMX9iNp238peAREU9SsrCi1mes=; b=KX/fsKpJZQAUrPOuxx9k2EXmP3L31M0W5ba7cdW8yJKIs5nN/bytnylH4tDk2qRY8mZ2bz JDpl+KD4RwEkUoNAh62uCMgBgGYbzFXSxJt5nud/dfimuYHQC2gB+I4FNDQicdXqtX3GPc X8QazVTuK8ESKazJlz0ZwZ3SLSxIspuFyOC4UFnpmd855QY2R2g6FdgmEmS0ZkIvN3nhuG jxK1FHDvdNz81gZdWRzxI967ukyLC7nnccbOz3FnYaq0Uu3J/OqexbYiNs5tc9zi7HFW6b XJW1gwW1hVcBnAEuNg9fKzYa3XUuBltPGoIPaSgIIOfCQaYSf8bFCR9Us6aTGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696882345; a=rsa-sha256; cv=none; b=SXnWc5UV6RpMZsI5bqpS9lYq37kwHL8N9NkTcK5YnwKAf1UozWed4z9fqq0YtkzlWqm2Rs C5mSGkBD44W/Rn6bi1t2jphsMLbkqWEyJBIh2cuuLTUl47yihKMuVjkxsg3hcPFnqbmjQa exrW3rvTqSR4YzpGgySL2PsgyC9f6yiNhRld6BngD/KUkLUXg2lX9/FZ05FqiX3ePK7OCI FWwcbD3ZE2FimyizK0Aes+1kx0MmOsXBSHgQ+DJond1+YKdPNIwbKudUATskeJtrLbZSiA 9Rq5gU6Ip5EXg4GEQUuyVaW6wdOGVCHnROA2XKI3SuwG2j1/KKOPdBd915W0ig== 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=1696882345; 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=7mD0Rbo6CPL+PJPgjLMX9iNp238peAREU9SsrCi1mes=; b=ptZwTLZtx4R8zE+QlaRRR9UXBGs7IgLAsozz5lKLKUquip9uUlJU+v0ekoWnKaVjWV3pTp qjXR3jucaUDCoi7EBhlTORbNF2IjSDTii8hGVpOEjn7/hjIcefJGNXJQt8c6Ogrp3XvK87 2CRfN5hzCHo4UXkQreJQPpHsmGofZ2Y0FTYGmTZbVDqYO8J7Lwt71AQCndtW7Vi6FLNJAP i63kIOiQbws4luMzKbxP4OBtWQJdh3YrHWtywu5EzdYXTz1kpGsAwE5ZH0PrtT+/dmfesc F9YMC/ASg5ZvTpAlrvm7mOGCuc2XGshS8Nev3sHNAQlIkVaLRJEDT+GtdZ9iIA== 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 4S49Dn0zrtz18kH; Mon, 9 Oct 2023 20:12: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 399KCOLp068574; Mon, 9 Oct 2023 20:12:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399KCOcq068553; Mon, 9 Oct 2023 20:12:24 GMT (envelope-from git) Date: Mon, 9 Oct 2023 20:12:24 GMT Message-Id: <202310092012.399KCOcq068553@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: 792655abd64c - main - x86: make EARLY_AP_STARTUP mandatory 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: 792655abd64c94146ededd991652496ec9ec0cfe Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=792655abd64c94146ededd991652496ec9ec0cfe commit 792655abd64c94146ededd991652496ec9ec0cfe Author: Ed Maste AuthorDate: 2023-08-07 20:59:52 +0000 Commit: Ed Maste CommitDate: 2023-10-09 20:08:22 +0000 x86: make EARLY_AP_STARTUP mandatory When early AP startup was introduced in 2016 it was put behind a kernel option EARLY_AP_STARTUP as a transition aid, so that it could be turned off if necessary. For x86 the non-EARLY_AP_STARTUP case is no longer functional, so disallow it. Other archs are still incompatible with EARLY_AP_STARTUP, so the option cannot yet be removed entirely. Reported by: wollman Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41351 --- sys/x86/isa/clock.c | 8 ------ sys/x86/x86/intr_machdep.c | 63 +--------------------------------------------- sys/x86/x86/local_apic.c | 14 ----------- sys/x86/x86/mca.c | 4 --- sys/x86/x86/mp_x86.c | 5 ---- 5 files changed, 1 insertion(+), 93 deletions(-) diff --git a/sys/x86/isa/clock.c b/sys/x86/isa/clock.c index 8fa642295611..a0bf60159e78 100644 --- a/sys/x86/isa/clock.c +++ b/sys/x86/isa/clock.c @@ -411,7 +411,6 @@ startrtclock(void) void cpu_initclocks(void) { -#ifdef EARLY_AP_STARTUP struct thread *td; int i; @@ -434,13 +433,6 @@ cpu_initclocks(void) if (sched_is_bound(td)) sched_unbind(td); thread_unlock(td); -#else - tsc_calibrate(); -#ifdef DEV_APIC - lapic_calibrate_timer(); -#endif - cpu_initclocks_bsp(); -#endif } static int diff --git a/sys/x86/x86/intr_machdep.c b/sys/x86/x86/intr_machdep.c index b43fa790d264..458a0cb396bb 100644 --- a/sys/x86/x86/intr_machdep.c +++ b/sys/x86/x86/intr_machdep.c @@ -90,7 +90,7 @@ static TAILQ_HEAD(pics_head, pic) pics; u_int num_io_irqs; #if defined(SMP) && !defined(EARLY_AP_STARTUP) -static int assign_cpu; +#error EARLY_AP_STARTUP required on x86 #endif #define INTRNAME_LEN (MAXCOMLEN + 1) @@ -399,18 +399,10 @@ intr_assign_cpu(void *arg, int cpu) struct intsrc *isrc; int error; -#ifdef EARLY_AP_STARTUP MPASS(mp_ncpus == 1 || smp_started); /* Nothing to do if there is only a single CPU. */ if (mp_ncpus > 1 && cpu != NOCPU) { -#else - /* - * Don't do anything during early boot. We will pick up the - * assignment once the APs are started. - */ - if (assign_cpu && cpu != NOCPU) { -#endif isrc = arg; sx_xlock(&intrsrc_lock); error = isrc->is_pic->pic_assign_cpu(isrc, cpu_apic_ids[cpu]); @@ -620,15 +612,9 @@ intr_next_cpu(int domain) { u_int apic_id; -#ifdef EARLY_AP_STARTUP MPASS(mp_ncpus == 1 || smp_started); if (mp_ncpus == 1) return (PCPU_GET(apic_id)); -#else - /* Leave all interrupts on the BSP during boot. */ - if (!assign_cpu) - return (PCPU_GET(apic_id)); -#endif if (intr_no_domain) domain = 0; @@ -662,7 +648,6 @@ intr_add_cpu(u_int cpu) CPU_SET(cpu, &intr_cpus); } -#ifdef EARLY_AP_STARTUP static void intr_smp_startup(void *arg __unused) { @@ -673,52 +658,6 @@ intr_smp_startup(void *arg __unused) SYSINIT(intr_smp_startup, SI_SUB_SMP, SI_ORDER_SECOND, intr_smp_startup, NULL); -#else -/* - * Distribute all the interrupt sources among the available CPUs once the - * AP's have been launched. - */ -static void -intr_shuffle_irqs(void *arg __unused) -{ - struct intsrc *isrc; - u_int cpu, i; - - intr_init_cpus(); - /* Don't bother on UP. */ - if (mp_ncpus == 1) - return; - - /* Round-robin assign a CPU to each enabled source. */ - sx_xlock(&intrsrc_lock); - assign_cpu = 1; - for (i = 0; i < num_io_irqs; i++) { - isrc = interrupt_sources[i]; - if (isrc != NULL && isrc->is_handlers > 0) { - /* - * If this event is already bound to a CPU, - * then assign the source to that CPU instead - * of picking one via round-robin. Note that - * this is careful to only advance the - * round-robin if the CPU assignment succeeds. - */ - cpu = isrc->is_event->ie_cpu; - if (cpu == NOCPU) - cpu = current_cpu[isrc->is_domain]; - if (isrc->is_pic->pic_assign_cpu(isrc, - cpu_apic_ids[cpu]) == 0) { - isrc->is_cpu = cpu; - if (isrc->is_event->ie_cpu == NOCPU) - intr_next_cpu(isrc->is_domain); - } - } - } - sx_xunlock(&intrsrc_lock); -} -SYSINIT(intr_shuffle_irqs, SI_SUB_SMP, SI_ORDER_SECOND, intr_shuffle_irqs, - NULL); -#endif - /* * TODO: Export this information in a non-MD fashion, integrate with vmstat -i. */ diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c index b382368cc626..43fe4625cd08 100644 --- a/sys/x86/x86/local_apic.c +++ b/sys/x86/x86/local_apic.c @@ -876,22 +876,8 @@ lapic_enable_pmc(void) lvts[APIC_LVT_PMC].lvt_masked = 0; -#ifdef EARLY_AP_STARTUP MPASS(mp_ncpus == 1 || smp_started); smp_rendezvous(NULL, lapic_update_pmc, NULL, NULL); -#else -#ifdef SMP - /* - * If hwpmc was loaded at boot time then the APs may not be - * started yet. In that case, don't forward the request to - * them as they will program the lvt when they start. - */ - if (smp_started) - smp_rendezvous(NULL, lapic_update_pmc, NULL, NULL); - else -#endif - lapic_update_pmc(NULL); -#endif return (1); #else return (0); diff --git a/sys/x86/x86/mca.c b/sys/x86/x86/mca.c index dca6b935e4a3..b293fcedbd84 100644 --- a/sys/x86/x86/mca.c +++ b/sys/x86/x86/mca.c @@ -1077,11 +1077,7 @@ mca_startup(void *dummy) taskqueue_enqueue_timeout_sbt(mca_tq, &mca_scan_task, mca_ticks * SBT_1S, 0, C_PREL(1)); } -#ifdef EARLY_AP_STARTUP SYSINIT(mca_startup, SI_SUB_KICK_SCHEDULER, SI_ORDER_ANY, mca_startup, NULL); -#else -SYSINIT(mca_startup, SI_SUB_SMP, SI_ORDER_ANY, mca_startup, NULL); -#endif #ifdef DEV_APIC static void diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c index ddcb54b63d88..11b11471d736 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -1133,11 +1133,6 @@ init_secondary_tail(void) while (atomic_load_acq_int(&smp_started) == 0) ia32_pause(); -#ifndef EARLY_AP_STARTUP - /* Start per-CPU event timers. */ - cpu_initclocks_ap(); -#endif - kcsan_cpu_init(cpuid); sched_ap_entry(); From nobody Mon Oct 9 23:38: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 4S4FpF05czz4wk5L; Mon, 9 Oct 2023 23:38: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 4S4FpD6m0lz3bk5; Mon, 9 Oct 2023 23:38:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696894693; 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=yEMPctILEv0yNkUKyY5YlFO3KvoL6KWrxecqom/1e7s=; b=Hhfxa+oeWuNfXODNT1/b08Evl9K8kLx95Qgri5EzEF+AZebqsQ/rB+U5bt19xHh0dVfM/4 cEBgHVuJVarhAd7dbJL8uq/CVUxGIRkOXC9RZ5zXdGYjjZLxnza2jkTTBeL6L5xDjBkus0 OFhfbF1ZQqjOMmT4le3a3CsoBP8xx8Njf7bF4xvAyzcGqdnM/tfkzZmthY0FGWXu5L+rha znnMNVbaBFPKmNtBiX+bupCAMtrGGLL2iaXPjbbPaDfBcqGn65pLyzjK8+lJMPI3+FJMiA nTNlBsgbNXbeC9lNs64Mc3NrXRxGT/boK5B1VvBHPsg5znrlxsSrFNIP2FehwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696894692; a=rsa-sha256; cv=none; b=aSzqUJ193RbhrUYIP36gxl5j3EQwHn2RLHL64BDBAPsYqgc0WqEY2zyUrsGOQlrCFG7+9C LA/QHyI4NwoqQ/EZJOWIjVDxjF9xVGVYm0rDoOTbQDI34Sq25hcz4rl5UC0tAkjh6tlKef GtB/hYO46rMmUK8Lj4+38eXFERXPcFR+ndgTokgJoMbZBJHqAXU1yKJop4izKp/6Wm9cTQ LXZM+MP07DiYNJjzKEnZGIv//qemgCLUQrqo3MarrUzbcXy6LUbD+YEvZlMgCLIYedm3wh f4RmH+rMN64VvkdC4f6R/I7qpiHpC6Js4BMeK8O4VbghL4IINg44+Lfhq1xSGA== 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=1696894692; 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=yEMPctILEv0yNkUKyY5YlFO3KvoL6KWrxecqom/1e7s=; b=K+qhnam93tLNUfZA+OziQbQvcEqrKHmpR36BP/ueAzG5qIi98Na6wdycbBaMdZDIqFnsqM nCnxMISksUcrLAaU8y5BoQsspmXQOS3ukS8xdpJb3BfTd2YdRNZ7DzaUhPQsCTJ5WOjKAD qA3IFnQC6+JmpZyVbUAwW/KFu8Wdqv/XX8/tosPYj5pXNcO7Kh35RaYrHhmj0Fbn9Xvifb XrTow7BhKbK0wTWV5eGPy+Yt0mpzbeU09uDwFnqE63vTHldb+ZEF+zHx/9gi5BTSRgID+7 QHBEVnxLw/NG9othvR7pLbvGUM4nQhxIoRwa6AXEcniLrHEqMk927pX8sUqmbQ== 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 4S4FpD5qP2z1c5; Mon, 9 Oct 2023 23:38: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 399NcCnv006133; Mon, 9 Oct 2023 23:38:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399NcCug006130; Mon, 9 Oct 2023 23:38:12 GMT (envelope-from git) Date: Mon, 9 Oct 2023 23:38:12 GMT Message-Id: <202310092338.399NcCug006130@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: 27f1ec0be24b - main - tun/tap: correct ref count on cloned cdevs 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: 27f1ec0be24b45559793e486a4fa5a2e7fdadc17 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=27f1ec0be24b45559793e486a4fa5a2e7fdadc17 commit 27f1ec0be24b45559793e486a4fa5a2e7fdadc17 Author: Konstantin Belousov AuthorDate: 2023-09-21 10:47:14 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-09 23:36:59 +0000 tun/tap: correct ref count on cloned cdevs Reported and tested by: eugen PR: 273418 Discussed with: jah, kevans Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42008 --- sys/net/if_tuntap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index f4dbf685fba6..a01bc11aa64c 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -548,6 +548,7 @@ tun_clone_create(struct if_clone *ifc, char *name, size_t len, if (i != 0) i = tun_create_device(drv, unit, NULL, &dev, name); if (i == 0) { + dev_ref(dev); tuncreate(dev); struct tuntap_softc *tp = dev->si_drv1; *ifpp = tp->tun_ifp; @@ -611,8 +612,10 @@ tunclone(void *arg, struct ucred *cred, char *name, int namelen, i = tun_create_device(drv, u, cred, dev, name); } - if (i == 0) + if (i == 0) { + dev_ref(*dev); if_clone_create(name, namelen, NULL); + } out: CURVNET_RESTORE(); } From nobody Mon Oct 9 23:38: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 4S4FpG2cCYz4wkRn; Mon, 9 Oct 2023 23:38: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 4S4FpG0Zmbz3bYj; Mon, 9 Oct 2023 23:38:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696894694; 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=x8dlzDeF+mya7LwJEjSJc1q3VjoyWFJkTtyxviAan1o=; b=Lfg7VG/rcMTbpCimVVsbcT80kulSGqG2IuXtORDEnzApJHBibSJEE5fX7ApN79iRZcdN2T 2T6Cyc+L+BKxsE281oaGpYCTrFBPJ91LPqawbUnl+G4/kb2zzJzcaFdicqVlBjwE4nHTe3 1u4fJO6PS5A8j87zUHF1cub43vQ5SoP7nX51OPmR6T+KvjTtkJ8I1ktS6W2Zyr7MjLpAXx NTgHMUuUKALTnszw/LMvnhBuZjU6HIxbrsQq8kr0IgAEOJFNNzVcXcfNf/4NbfetqG8OdV MSDtTEi9ZvUluJs8N5b8yHocwJrT8OS/59W+x8YCU8nhRCorTuFMxMDEiy/s1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696894694; a=rsa-sha256; cv=none; b=b6DJoi3cSbRybovLShAr8ktbuedu1D7CrIGShym0ijpuZs2vgxXQrMflBFc7mmbXRGmXHB fSdCZKVl0qz8rL3Z7YuqnIjyb69Pm+8Q8aG6JbOLMJQnsG0xSrop3LOJ+n3EU8vOyHNFoO f2uuS6YcIvhNrePhfrCfB835eHNtOLOOtcGdqGLdlXY9ApVvHqCYEhI5B4z++uXaB25n4D mTsLxwgx+BYeeXnJ8tREnFhrDT6RjG/aIiKZLKTUJKMRCEHLaC3CzpVa4XZzQU1l/pKcVB J3SRrVcRq1YVyIr3m6cmbyBq2mqyy5ANHt5Sbrg29Qng//C8plXXwda4RfehGg== 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=1696894694; 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=x8dlzDeF+mya7LwJEjSJc1q3VjoyWFJkTtyxviAan1o=; b=jT3pO5YRuS8I01UJZnDEU++n28XuqM3t395WBEdfqqGTOkr7UVh6pG0XrRV5eaEHdAJaCt 9KWQbbhNYoSmCaQqIifqdsBdghVdG10tE6jpT1VO3tmSaOsxfBqTjkw+mJk1XzQ4p23aFm XHSojH5GpFZU1QVjI34aE8b5rlP51F15KE2GltwzoEx+nXX8AWdYwAlOOXJVGIFdDhBbE/ YPWapmZBWoR2QWl3ziwR7o31+6Rh4D68B7pAAFcklYpwTd1knmaDvCG7v7IXen6qpeu5Qb DijjIuQdK7D1PdkDo3qSPLIt0as+1EQGmZniJPU6gZaDFsyZvCo229OOhUAsZQ== 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 4S4FpF6pDdz1Sw; Mon, 9 Oct 2023 23:38: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 399NcD0W006190; Mon, 9 Oct 2023 23:38:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399NcDAe006185; Mon, 9 Oct 2023 23:38:13 GMT (envelope-from git) Date: Mon, 9 Oct 2023 23:38:13 GMT Message-Id: <202310092338.399NcDAe006185@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: 6e92fc930943 - main - vkbd: correct ref count on cloned cdevs 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: 6e92fc930943a85f311e986a02e2b3dae9e37126 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6e92fc930943a85f311e986a02e2b3dae9e37126 commit 6e92fc930943a85f311e986a02e2b3dae9e37126 Author: Konstantin Belousov AuthorDate: 2023-10-02 22:25:52 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-09 23:37:43 +0000 vkbd: correct ref count on cloned cdevs Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42008 --- sys/dev/vkbd/vkbd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/vkbd/vkbd.c b/sys/dev/vkbd/vkbd.c index a8d4583f46c7..3dbf64063e33 100644 --- a/sys/dev/vkbd/vkbd.c +++ b/sys/dev/vkbd/vkbd.c @@ -191,6 +191,8 @@ vkbd_dev_clone(void *arg, struct ucred *cred, char *name, int namelen, *dev = make_dev_credf(MAKEDEV_REF, &vkbd_dev_cdevsw, unit, cred, UID_ROOT, GID_WHEEL, 0600, DEVICE_NAME "%d", unit); + else + dev_ref(*dev); } /* Open device */ From nobody Tue Oct 10 01:57: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 4S4JvQ2BFvz4wtsW; Tue, 10 Oct 2023 01:57: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 4S4JvQ1JvPz4MXT; Tue, 10 Oct 2023 01:57:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696903074; 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=3iClp7elWpo8LFiaCV0+pwPJ4yLCkIynx+riocuvUw4=; b=O5jfVktv3HZdGrZqHOJM+psmWhj/falzI2xCxbklwVAOPkWxmJLvZKlFMne1vafSbyieSX bEQU+7RGSwbdFdJROTmosgmUZqiexa3RiHFu4p/gTsQe7hjUOJh3DxmKQAsSux8X+eeyOV XFtLeWt9ITfJgKeOEsEmMjaIoJFdE3/kBxlQpxxatwWvKdPdpd5R/rGbnuTDEoNP+D6uCq o28A++tO12YlHB0fIzQq5TLhW3UTa37f07xzeGsccaHl0eu2H81PUIpAi6ozpFpN+a479s SxcX7gq+SyJWmrkRIeW/wWklv4zjfsyB/TpNax22bLAwD7U9rBXi3JF+q4k/xQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696903074; a=rsa-sha256; cv=none; b=uzBGjTsApNoEN4WB8tOhBVkm6nlfJcS4MmNXnp+B22qbVJ+ADGPdNzsZ9euZejnsiV4EU9 d9qPRJjtc+2P6L6r/xHI5WXBGGLk4RpAV0PmBhlM3S5XbdLS7KvZdX1BVrCAuugtyfTCxr o6004fdeY/Y+C1LcdAxPG0UPVFimEwA9GvYVjOVmGhUonPc8V7BIbRChKetXcpLXl1084q l3Z8vnnLDTAswW2i/rOe3HTNXGLqjZ1TpYItQXoo2xxw9RL222os2Y6Zyvptnt6SGO+7TW +MQhk0fWRHz5vctRi20xM9nM0TvEBgnCbgColiBIigBN9uZb6MBlRzkKxA+NxQ== 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=1696903074; 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=3iClp7elWpo8LFiaCV0+pwPJ4yLCkIynx+riocuvUw4=; b=Vb50EpHuNCc1jn8K6DVcGEOo/Hzt6vT+PSgesHTIiZU1D3Gc76bUVWMx+nm0n4nVHFN6tL SVm3UH7pofjG/2n0RJoZGMD9zZGCERuPbQr89D6emI/N06amEYXqcD4tn9FQ61bOhpiFRQ T2MNRTyy0CHpxpBk+k3xTr70K3WnM6+PqMss4ujec2OO1NC3BvS4OBOnEhb4FP4+I5HrzI zVB7QsHNH37HSW71ieWBuAOFqVslrncLSPrsF0sZjtcL+X2XH+y1u5w+bcqqcsAXYoeOSn sjuHIwD3R5nzPYX9Fc6InLYqSk0CB8s6FaIzD7WyKUYC5qwJk0IwH1bBo++CcA== 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 4S4JvQ0KLSz4Jf; Tue, 10 Oct 2023 01:57: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 39A1vrcQ036850; Tue, 10 Oct 2023 01:57:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39A1vrwb036847; Tue, 10 Oct 2023 01:57:53 GMT (envelope-from git) Date: Tue, 10 Oct 2023 01:57:53 GMT Message-Id: <202310100157.39A1vrwb036847@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: 892654fe9b5a - main - setusercontext(): Apply personal settings only on matching effective UID 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: 892654fe9b5a9115815c30a423b8db47185aebbd Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=892654fe9b5a9115815c30a423b8db47185aebbd commit 892654fe9b5a9115815c30a423b8db47185aebbd Author: Olivier Certner AuthorDate: 2023-05-30 16:35:08 +0000 Commit: Ed Maste CommitDate: 2023-10-10 01:47:10 +0000 setusercontext(): Apply personal settings only on matching effective UID Commit 35305a8dc114 (r211393) added a check on whether 'uid' was equal to getuid() before calling setlogincontext(). Doing so still allows a setuid program to apply resource limits and priorities specified in a user-controlled configuration file ('~/.login_conf') where a non-setuid program could not. Plug the hole by checking instead that the process' effective UID is the target one (which is likely what was meant in the initial commit). PR: 271750 Reviewed by: kib, des MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40351 --- lib/libutil/login_class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c index 90a3ec5d106a..1036e9f9208c 100644 --- a/lib/libutil/login_class.c +++ b/lib/libutil/login_class.c @@ -546,7 +546,7 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in /* * Now, we repeat some of the above for the user's private entries */ - if (getuid() == uid && (lc = login_getuserclass(pwd)) != NULL) { + if (geteuid() == uid && (lc = login_getuserclass(pwd)) != NULL) { mymask = setlogincontext(lc, pwd, mymask, flags); login_close(lc); } From nobody Tue Oct 10 02:49: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 4S4L2y5mPKz4wy06; Tue, 10 Oct 2023 02:49: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 4S4L2y5G2jz4QL0; Tue, 10 Oct 2023 02:49:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696906170; 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=DU2r+q869nDnMjlS80UWCCOwgSzD4WIbViYGalYTUSY=; b=ahbcL/ZGAMKGXNp69HmZAkYdsmB1YS+uemRPpB5bAEl+69zSZCPn+9Kd/bHmYbD3zggSHN jjdG0NWzKdv9ytfeRtjgu7UfaFe5d/XxsNPzRnavfFe2UhkIn8mL7xrOL/XgwmtAuDFT3T ga87ng3yl86qAXwKS6n5/2/pqYCpTLZXFCWRzyruXNSoSS5kAGBTjSbEncSIlMvX2D3UM5 mr0oR1UoJ6c22SW0f3A+36WOOVY4Bmzz2P9U0MDBR5c3oNURKT0bDTdPhujfeBbANCmQIf W9m7effMCCdLJ7HS/rPiuLzz4XSase8hfVm+aQLX+cXxLp7sHDqHplzR8rdlVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696906170; a=rsa-sha256; cv=none; b=l+kgg+nLTd/jC2Xl0CkSoiMR07WQnBa+bge3C6zs2BQKrNapRZ0k/DrJMkT15BH1h5/orK NXy9O/TaqDLqUjNMmuxNqycWHf8bha1T2vAQHi1HS3HGo12jkYD0PLB+dhGmrCC+cZjXNo OVFZOxAELqa4nwjSAQUF54TJrx0UvQMO/EUSnrHFObx/4PMnR0OkW0UvKH9LrteBqt4wdz 7o827zH2t4dEWSwyF5z1tcwO83iTJGrOJDSYqnvvhwbpF+zYf6+SFm0/huhPSEmdIH52KN 3iMJ37THIDEjoUqIfgwmmseC8cScVeSKoCHYAUl8Be6kDNXeCxkBPEG1K/XP5Q== 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=1696906170; 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=DU2r+q869nDnMjlS80UWCCOwgSzD4WIbViYGalYTUSY=; b=HCTZnKz93w0w9tSjcG0rb+gNY2TMJPc4jZkXwJcrgXZoRCdZKq9QGGwqnUdC9gfTVDKW8y ugEgpCKjKqiv0rjbwu2j7BgNFJmvR4c0RPEX0vlnsLmOx+Nn1SXdYOuF7qq0g0KaKfrGNJ KZM19zzpmf1u3S/sHgoWuiGXeZ4fQSHy++iA/wQf3pvlJqDmWncEVp+C2g8KaSoKs2c2mH vmsirJ6dayslh+qaxKl1l7Bh4xi/r2xycXDTKRGO8/sdmxzfrASmfxc2WFmddANq3eMlbt ERxYppR/Fp4vthJS8mwzJCs8Cd+BhcyGwML+7FAQIPt9zzeYP6tPRdE4Bhp8Ag== 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 4S4L2y4Jymz5xv; Tue, 10 Oct 2023 02:49: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 39A2nUbh019592; Tue, 10 Oct 2023 02:49:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39A2nUOK019589; Tue, 10 Oct 2023 02:49:30 GMT (envelope-from git) Date: Tue, 10 Oct 2023 02:49:30 GMT Message-Id: <202310100249.39A2nUOK019589@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: 75be7e30271b - main - sysctl: emit a newline after NULL node descriptions 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: 75be7e30271bb192fd27698982f2c7e56831eeef Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=75be7e30271bb192fd27698982f2c7e56831eeef commit 75be7e30271bb192fd27698982f2c7e56831eeef Author: Ed Maste AuthorDate: 2023-10-06 18:00:30 +0000 Commit: Ed Maste CommitDate: 2023-10-10 02:48:53 +0000 sysctl: emit a newline after NULL node descriptions Previously when printing the sysctl description (via the -d flag) we omitted the newline if the node provided no description (i.e., NULL). This could be observed via e.g. `sysctl -d dev`. PR: 44034 Reviewed by: zlei Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42112 --- sbin/sysctl/sysctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index fe1a53a9d645..7ed7be95c9a5 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -998,8 +998,10 @@ show_info(char *name, const char *sep, int ctltype, char *fmt, int *qoid, int nl bzero(buf, BUFSIZ); j = sizeof(buf); i = sysctl(qoid, nlen + 2, buf, &j, 0, 0); - if (i < 0) + if (i < 0) { + putchar('\n'); return (1); + } fputs(buf, stdout); return (error); } From nobody Tue Oct 10 03:47:35 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 4S4MKz2cnPz4x2VT; Tue, 10 Oct 2023 03:47:35 +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 4S4MKz26hVz4VYp; Tue, 10 Oct 2023 03:47:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696909655; 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=D5V542nWJZvZLzbuhxULMpX4M+wYkRDQxnYpKS2YRjQ=; b=w/0I3Zmw7aGoEgGPIVKZjWQ+bKHJt2f1NWYNDID0X3T7yBD5rP4Vlfta79ouFRyijG14li 6VwCkEumqroqWrD4mvyt1n9sol0ELzQrc5dyqJ8tKy7vC8bGw14kzkQWLdD8ih+0v+ma0f K32fkLP9pxamnXfbqbZRByS9MTkklJ/iwr26EFbtSTMGNBRIslrr8xKaStsbmpmHiA9IiY VBgLJeqL69NlQK+Ya/+UOmg6ZfbSOgyVKFgzZNLb7yjCAZCsCIX1bN5MoU7D6WQPBsDjRo hnoNh7OYVKzALVCXFJq7cCvwqWPcmu+U8mL//m35Yis0i9W+8N4O+R5/TPDqGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696909655; a=rsa-sha256; cv=none; b=b1w1nsweRADnuBwD0Z9qA7ulhOVaG6sVgTpHkAeSI6MbVSfb1m2u3avmDknjLCq3h6iURO MKzSlqa3CngJKV99TuKhPOhMOcHk9larfIfDgPgFXqZiixGz8FGn1F9lgCvcTuctVfERL3 W4Tn7qFXLiNf+hCYY2oebbTLAxqjnzvSgvTC6RNb7A8QJaGQp1dTxvL+xhOjC0Se6fMXIs PNjPgzBUBS1tY2vOFL0Ol5GcqJ95ypinH4RmuCPX/JBd2RocNqHnQvAVCAa8jJi97LieHe dN3/GptEwQ8NDyGhEIxun1x3cCGi6+M5fSl2+SwzXTxZts0abbkP/u98GUHpyw== 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=1696909655; 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=D5V542nWJZvZLzbuhxULMpX4M+wYkRDQxnYpKS2YRjQ=; b=PhVnWCuaiUpivilHD1CNKylwuopdAhy7u0koiC9uUnaQDh0+CdTA6RnHvnjtAT8XU1qDg1 sWj0jSIpPPVh6bNMejFkkiaVRk34p93ZKH0wLFXxczntDIWnd5kiFHUT0Fy9GLl7+vQvEj 6U5XvWLaSLO3hVBTWUZ1ZkybY1881fYfSmPBW6oTIylw3w2XjQqwItKsANgo/FR3eX1K/1 HHx3YGP3FAfZIOTdglzxI/hYX4dRdsuNT1D9BTsHrj3Vy8j1YSY9kZn/X9XliJNY6sFbFm R5O3bzyzmjqsVhSuM1GLToNhgoLJfDAfQMP/gFe8pYa0qxYirq/Dvyg+MHVnrg== 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 4S4MKz19P7z7gv; Tue, 10 Oct 2023 03:47:35 +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 39A3lZ0I021098; Tue, 10 Oct 2023 03:47:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39A3lZPs021095; Tue, 10 Oct 2023 03:47:35 GMT (envelope-from git) Date: Tue, 10 Oct 2023 03:47:35 GMT Message-Id: <202310100347.39A3lZPs021095@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: 826d14467918 - main - newvers: remove references to svnliteversion 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: 826d1446791816fcaa9be59aedc7295ffbc8d5bb Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=826d1446791816fcaa9be59aedc7295ffbc8d5bb commit 826d1446791816fcaa9be59aedc7295ffbc8d5bb Author: Ed Maste AuthorDate: 2023-10-02 12:16:50 +0000 Commit: Ed Maste CommitDate: 2023-10-10 03:46:36 +0000 newvers: remove references to svnliteversion svnliteversion was provided by the base system copy of subversion, which was disabled in a2bc17474b96 ("Disable building svnlite(1) by default.") Reviewed by: zlei Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42034 --- sys/conf/newvers.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 33615a8d94f8..ffab36d7f964 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -218,15 +218,6 @@ for dir in /usr/bin /usr/local/bin; do fi done -if [ -z "${svnversion}" ] && [ -x /usr/bin/svnliteversion ] ; then - /usr/bin/svnliteversion $(realpath ${0}) >/dev/null 2>&1 - if [ $? -eq 0 ]; then - svnversion=/usr/bin/svnliteversion - else - svnversion= - fi -fi - if findvcs .git; then for dir in /usr/bin /usr/local/bin; do if [ -x "${dir}/git" ] ; then From nobody Tue Oct 10 07:01: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 4S4RfD6FLFz4wGCr; Tue, 10 Oct 2023 07:01: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 4S4RfD5nqrz4q3M; Tue, 10 Oct 2023 07:01:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696921316; 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=T+D2C/xUEcXxM5rRZ22GaPiBEVErDDDIK2ySmN4W3YU=; b=lyviEZXMhTReVImJ3qf7UQlMx0JTWzP1MraGbjDk5CgvcunqwRJvCJMfj9fq9SiGZe3IRO QHMZWmshWtCciIn9RVyk9lk5bKtdldy+xDvaqsrUS7JArjGcaBlQcsyrdEmE4nFGamu57u cgGvlaC+7s1bLlWKqkpfDpCwKFx4ZXHb+zIohjaia3pGuVL3/Au6n+nNu6c5qDxsiJvewH CdqvvWe3Wc9H9ZuhgUMZXuD8/aphRS5oXEPsL+m79k7GmbBA0AbGdKO8VQRNfwYlqt/97F MaRNMa4O4rGvQZaml2ytcxy8eH76uzEgCKLnM3E/G0FF7isxRgB/A7BC5TE/+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696921316; a=rsa-sha256; cv=none; b=Ut6gOoEOK/EfpOSkAEvuhPg5o7zC5pbmPBA6hX9ceUdJVxqKnPPgYKBRXdpQtq19j0sF10 u+XK9jAECtdJ8aLo6GvpoLmIrgilzw4Ba7Da2SfylIkuZ/xQOrfFZ1C6p8+oHC+EI3jFPJ 8342fx/ZQZxVLwUz7hNmdDsPFxBiXtvPfeRseCjiuVV6ouzIeu4dyDAmmyVVOV0czOlbpn CBFJfNV9KrOm6OTymUmy6f03gjBIbFDiCuDHTPDPPTkFTcedSF24S8XmNfZxseBQHzhUxu juBb7Cjs64hvEOqee0pHScThBTLzqrrjmi3LrLeP29auY3++B1+Y6819VkmsXg== 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=1696921316; 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=T+D2C/xUEcXxM5rRZ22GaPiBEVErDDDIK2ySmN4W3YU=; b=VsWp4otyoxGmBpWrNYEq6ck8oMh40is74J67aAHtCqrUm+31745ewR5Iwutzsp1utDQVu2 Qg9kWndlul0HJJEkZOTtk8yMDUh34RkWAe1AIRpssM/qYdSB9yh377LsvGv48HXvepjQDk V9P0TRPLZMA1mZfHontSIdbFy/UXS8ExZKWTgrIJ8OVqWRt3IaY+4QzEhMK55tewo3C1Zt 8X4t7MJTuvA4GddreEBY95B2xtOGhhYhl+a8yIp0TB957h8jf6a+Or4b13pFuwe42IizdS UdGvOP1BjLz8p4q2bKqAPmQD/+XxXpgxf3r0mQnTnlxFkfvGRGQ+3v5giEMuTg== 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 4S4RfD4ZjCzTYt; Tue, 10 Oct 2023 07:01: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 39A71uUf054655; Tue, 10 Oct 2023 07:01:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39A71uLB054652; Tue, 10 Oct 2023 07:01:56 GMT (envelope-from git) Date: Tue, 10 Oct 2023 07:01:56 GMT Message-Id: <202310100701.39A71uLB054652@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 6d3c0798ccbe - main - bsdconfig: rework packages selection TUI 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: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d3c0798ccbe7f6d3b677eed31206efc1227be50 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=6d3c0798ccbe7f6d3b677eed31206efc1227be50 commit 6d3c0798ccbe7f6d3b677eed31206efc1227be50 Author: Baptiste Daroussin AuthorDate: 2023-10-10 06:56:36 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-10 07:01:51 +0000 bsdconfig: rework packages selection TUI Rework the packages TUI, do that the index caching is now done with dialog --gauge (tested with cdialog and bsddialog). With pkg we can know in avance the number of packages making it possible to have a real gauge. The cache of the index is now a file that can be sourced, meaning it is not anymore an index like file, but a post process one, simplifying the code. Each menu is now built calling directly pkg rquery with just the informations required to build the menu instead of parsing an indexfile install all the awk index processing into a separate file to ease reading and debuggung --- usr.sbin/bsdconfig/share/packages/Makefile | 2 +- usr.sbin/bsdconfig/share/packages/index.awk | 98 +++++++++++++++++ usr.sbin/bsdconfig/share/packages/index.subr | 138 +++++------------------- usr.sbin/bsdconfig/share/packages/packages.subr | 12 ++- 4 files changed, 133 insertions(+), 117 deletions(-) diff --git a/usr.sbin/bsdconfig/share/packages/Makefile b/usr.sbin/bsdconfig/share/packages/Makefile index e694bf4157cf..c8e710902bec 100644 --- a/usr.sbin/bsdconfig/share/packages/Makefile +++ b/usr.sbin/bsdconfig/share/packages/Makefile @@ -1,5 +1,5 @@ FILESDIR= ${SHAREDIR}/bsdconfig/packages -FILES= categories.subr index.subr musthavepkg.subr packages.subr +FILES= categories.subr index.awk index.subr musthavepkg.subr packages.subr .include diff --git a/usr.sbin/bsdconfig/share/packages/index.awk b/usr.sbin/bsdconfig/share/packages/index.awk new file mode 100644 index 000000000000..f22aa150bd63 --- /dev/null +++ b/usr.sbin/bsdconfig/share/packages/index.awk @@ -0,0 +1,98 @@ +function _asorti(src, dest) +{ + k = nitems = 0 + + # Copy src indices to dest and calculate array length + for (i in src) dest[++nitems] = i + + # Sort the array of indices (dest) using insertion sort method + for (i = 1; i <= nitems; k = i++) + { + idx = dest[i] + while ((k > 0) && (dest[k] > idx)) + { + dest[k+1] = dest[k] + k-- + } + dest[k+1] = idx + } + + return nitems +} + +function print_category(category, npkgs, desc) +{ + cat = category + # Accent the category if the first page has been + # cached (also acting as a visitation indicator) + if ( ENVIRON["_index_page_" varcat "_1"] ) + cat = cat "*" + printf "'\''%s'\'' '\''%s " packages "'\'' '\''%s'\''\n", + cat, npkgs, desc >>tmpfile +} + +BEGIN{ + cnt=0 + div=int(npkg / 100) + last=0 + prefix = "" +} +{ + cnt+=1 + i = int(cnt / div) + if (i > last) { + last = i + print "XXX" + print i + print msg + print "XXX" + fflush("/dev/stdout"); + } + varpkg = $1 + gsub("[^" valid_chars "]", "_", varpkg) + print "_categories_" varpkg "=\"" $7 "\"" >> tmpfile + split($7, pkg_categories, /[[:space:]]+/) + for (pkg_category in pkg_categories) + categories[pkg_categories[pkg_category]]++ + print "_rundeps_" varpkg "=\"" $9 "\"" >> tmpfile + +} +END { + n = _asorti(categories, categories_sorted) + # Produce package counts for each category + for (i = 1; i <= n; i++) + { + cat = varcat = categories_sorted[i] + npkgs = categories[cat] + gsub("[^" valid_chars "]", "_", varcat) + print "_npkgs_" varcat "=\"" npkgs "\"" >>tmpfile + } + # + # Create menu list and generate list of categories at same time + print "CATEGORY_MENU_LIST=\"" >>tmpfile + print_category(msg_all, npkg, msg_all_desc) + category_list = "" + for (i = 1; i <= n; i++) + { + cat = varcat = categories_sorted[i] + npkgs = categories[cat] + cur_prefix = tolower(substr(cat, 1, 1)) + if ( prefix != cur_prefix ) + prefix = cur_prefix + else + cat = " " cat + gsub("[^" valid_chars "]", "_", varcat) + desc = ENVIRON["_category_" varcat] + if ( ! desc ) desc = default_desc + print_category(cat, npkgs, desc) + category_list = category_list " " cat + } + print "\"" >>tmpfile + + # Produce the list of categories (calculated in above block) + sub(/^ /, "", category_list) + print "PACKAGE_CATEGORIES=\"" category_list "\"" >> tmpfile + print "_npkgs=\""npkg"\"" >>tmpfile + + print "EOF" +} diff --git a/usr.sbin/bsdconfig/share/packages/index.subr b/usr.sbin/bsdconfig/share/packages/index.subr index 34c40d6905ab..04f28603426b 100644 --- a/usr.sbin/bsdconfig/share/packages/index.subr +++ b/usr.sbin/bsdconfig/share/packages/index.subr @@ -146,7 +146,7 @@ f_index_initialize() # one populate the environment from the on-disk # cache and provide success exit status. # - if [ "$digest" = "$__sqlite_digest" ]; then + if [ "$digest" = "#$__sqlite_digest" ]; then cat exit $SUCCESS else @@ -171,24 +171,27 @@ f_index_initialize() # If we reach this point, we need to generate the data from scratch # - eval "$__var_to_set"='$( pkg rquery -I | ( - exec 2<&1; dpv -ko /dev/stderr >&$TERMINAL_STDOUT_PASSTHRU \ - -b "$DIALOG_BACKTITLE" \ - -- "$msg_generating_index_from_pkg_database" - ) | sort )' - - # - # Attempt to create the persistent on-disk cache - # - # Create a new temporary file to write to local __tmpfile if f_eval_catch -dk __tmpfile $__funcname mktemp \ - 'mktemp -t "%s"' "$pgm" - then + 'mktemp -t "%s"' "$pgm"; then + local _npkg # Write the temporary file contents - echo "$__sqlite_digest" > "$__tmpfile" - debug= f_getvar "$__var_to_set" >> "$__tmpfile" + echo "#$__sqlite_digest" > "$__tmpfile" + f_eval_catch -k _npkg $__funcname pkg \ + "pkg stat -r | awk '%s'" '/Packages available/ { print $3 }' + pkg rquery -I | awk -v npkg=$_npkg \ + -v msg="$msg_generating_index_from_pkg_database" \ + -v tmpfile="$__tmpfile" \ + -v valid_chars="$VALID_VARNAME_CHARS" \ + -v default_desc="$msg_no_description_provided" \ + -v packages="$msg_packages" \ + -v msg_all="$msg_all" \ + -v msg_all_desc="$msg_all_desc" \ + -F "|" \ + -f $BSDCFG_SHARE/packages/index.awk | \ + $DIALOG --backtitle "$DIALOG_BACKTITLE" \ + --gauge "$msg_generating_index_from_pkg_database" 0 0 # Finally, move the temporary file into place case "$PACKAGES_INDEX_CACHEFILE" in @@ -197,10 +200,13 @@ f_index_initialize() esac f_eval_catch -d $__funcname mv 'mv -f "%s" "%s"' \ "$__tmpfile" "$PACKAGES_INDEX_CACHEFILE" + else + return $FAILURE fi if ! f_index_read "$__var_to_set"; then - f_show_err "$msg_io_or_format_error_on_index_file" + f_show_err \ + "$msg_io_or_format_error_on_index_file" return $FAILURE fi @@ -234,98 +240,7 @@ f_index_read() export VALID_VARNAME_CHARS export msg_packages - eval "$( debug= f_getvar "$var_to_get" | awk -F'|' ' - function _asorti(src, dest) - { - k = nitems = 0 - - # Copy src indices to dest and calculate array length - for (i in src) dest[++nitems] = i - - # Sort the array of indices (dest) using insertion sort method - for (i = 1; i <= nitems; k = i++) - { - idx = dest[i] - while ((k > 0) && (dest[k] > idx)) - { - dest[k+1] = dest[k] - k-- - } - dest[k+1] = idx - } - - return nitems - } - function print_category(category, npkgs, desc) - { - cat = category - # Accent the category if the first page has been - # cached (also acting as a visitation indicator) - if ( ENVIRON["_index_page_" varcat "_1"] ) - cat = cat "*" - printf "'\''%s'\'' '\''%s " packages "'\'' '\''%s'\''\n", - cat, npkgs, desc - } - BEGIN { - valid_chars = ENVIRON["VALID_VARNAME_CHARS"] - default_desc = ENVIRON["msg_no_description_provided"] - packages = ENVIRON["msg_packages"] - tpkgs = 0 - prefix = "" - } - { - tpkgs++ - varpkg = $1 - gsub("[^" valid_chars "]", "_", varpkg) - print "_categories_" varpkg "=\"" $7 "\"" - split($7, pkg_categories, /[[:space:]]+/) - for (pkg_category in pkg_categories) - categories[pkg_categories[pkg_category]]++ - print "_rundeps_" varpkg "=\"" $9 "\"" - } - END { - print "_npkgs=" tpkgs # For convenience, total package count - - n = _asorti(categories, categories_sorted) - - # Produce package counts for each category - for (i = 1; i <= n; i++) - { - cat = varcat = categories_sorted[i] - npkgs = categories[cat] - gsub("[^" valid_chars "]", "_", varcat) - print "_npkgs_" varcat "=\"" npkgs "\"" - } - - # Create menu list and generate list of categories at same time - print "CATEGORY_MENU_LIST=\"" - print_category(ENVIRON["msg_all"], tpkgs, - ENVIRON["msg_all_desc"]) - category_list = "" - for (i = 1; i <= n; i++) - { - cat = varcat = categories_sorted[i] - npkgs = categories[cat] - cur_prefix = tolower(substr(cat, 1, 1)) - if ( prefix != cur_prefix ) - prefix = cur_prefix - else - cat = " " cat - gsub("[^" valid_chars "]", "_", varcat) - desc = ENVIRON["_category_" varcat] - if ( ! desc ) desc = default_desc - print_category(cat, npkgs, desc) - category_list = category_list " " cat - } - print "\"" - - # Produce the list of categories (calculated in above block) - sub(/^ /, "", category_list) - print "PACKAGE_CATEGORIES=\"" category_list "\"" - - }' | ( exec 2<&1; dpv -ko /dev/stderr >&$TERMINAL_STDOUT_PASSTHRU \ - -b "$DIALOG_BACKTITLE" -- "$msg_reading_package_index_data" - ) )" # End-Quote + . $PACKAGES_INDEX_CACHEFILE } # f_index_extract_pages $var_to_get $var_basename $pagesize [$category] @@ -342,19 +257,14 @@ f_index_read() f_index_extract_pages() { local var_to_get="${1:-PACKAGE_INDEX}" var_basename="$2" pagesize="$3" - local category="$4" # Optional eval "$( debug= f_getvar "$var_to_get" | awk -F'|' \ - -v cat="$category" \ -v pagesize="$pagesize" \ - -v var_basename="$var_basename" \ - -v i18n_all="$msg_all" ' + -v var_basename="$var_basename" ' \ BEGIN { n = page = 0 } /'\''/{ gsub(/'\''/, "'\''\\'\'\''") } { - if ( cat !~ "(^$|^" i18n_all "$)" && $7 !~ \ - "(^|[[:space:]])" cat "([[:space:]]|$)" ) next starting_new_page = (n++ == (pagesize * page)) if ( starting_new_page ) printf "%s%s", ( n > 1 ? "'\''\n" : "" ), diff --git a/usr.sbin/bsdconfig/share/packages/packages.subr b/usr.sbin/bsdconfig/share/packages/packages.subr index 554e7f9bb9e0..38059d4748a6 100644 --- a/usr.sbin/bsdconfig/share/packages/packages.subr +++ b/usr.sbin/bsdconfig/share/packages/packages.subr @@ -378,6 +378,7 @@ f_package_index_get_page() # f_package_menu_select() { + local __funcname=f_package_menu_deselect local category="$1" page="${2:-1}" local prompt= # Calculated below local menu_list # Calculated below @@ -424,8 +425,15 @@ f_package_menu_select() next_page="$next_page*" fi - local index_page - f_package_index_get_page "$category" $page index_page + local index_page __index + if [ "$category" = "$msg_all" ]; then + f_eval_catch -k __index $__funcname pkg \ + "pkg rquery -a '%s'" "%n|%o||%c" + else + f_eval_catch -k __index $__funcname pkg \ + "pkg rquery -g '%s' '%s/\*'" "%n|%o||%c" "$category" + fi + f_package_index_get_page "$category" $page index_page __index menu_list=" ${add_prev:+'> $previous_page' '' ${SHOW_DESC:+''}} From nobody Tue Oct 10 07:25: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 4S4S932bx6z4wJXP; Tue, 10 Oct 2023 07:25:11 +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 4S4S9315zgz4s5n; Tue, 10 Oct 2023 07:25:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696922711; 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=MDA22TrA0rnTYmGyFQ+x5v6tvlXXQRirgR9pUVjuXDM=; b=BUi0c2Wx8DpkfVQ6k0NNTFFJ8fAPLMmyyHTikGoRuGXneZr6OOl0jvbrch/SN/IXGM97AQ FWBq98ACzq30Af5u32DlQoTo0kn91RIuqzA03gWbdIJN2D+rEhQr7GbCUab9QKxWrOP3z+ jO5CDwxctwf2ek3GB0Go8NEvGfOKhKRwMDhSrzrpY3JIkKDDdWU7xtB4N+Uu2G0i4ZPWlr j1y5wPpz6/fOiTbhAA1x6mjx3nrrqRwY53olBpjlNwuZ/REhzppZyT3qO6sri4yxYj8Pxk i+0l53BfoK60Qbsm0jVbLRUH4gZwn/jPJGC5zqgxc5CeFcj9lqXqD5gWbCeRJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696922711; a=rsa-sha256; cv=none; b=J0ZaBQmySu4AbsZ+qGT3b+jedl2fQNO4WK2aXgiUhnP9YtSgDmzFxZPN9rlq/XiVM59MmD CquebTNMNe2wj7dPUEC9UEd6UxXD6ssXIBym75iixoXSe9vg695T9MLJISbfoaKufRkO5H GsUIYfW8OULFOUUKBFqDIkpqwUhyilTNZyiXo83RIJxkSt9nT+0pHubHQdBmcIaqCX7E3M 6xS7OEowq/osRSrfSSAX53BMF0cJgLg/0oKQfIWmptBxGgOXhhy00aCwGu7vjLJukUruA4 0YDbTsypqNPwVdWOHdpHmkpa/YnTIf5gRuRZVEDO0azQZopJtWd69tymaPAbCg== 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=1696922711; 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=MDA22TrA0rnTYmGyFQ+x5v6tvlXXQRirgR9pUVjuXDM=; b=qcmFbG1IsOrbZdeXroaBT+nPKOOUX5epKwAjhi27ZDT8Ut3ZuyYJtQwRyqQ+6+3bmzBxU6 GYHImGSahE4y9TT+cZNzI7WOyDibw3NG/LSGtgLAvFTLcU4PA5lCqiE4uUUSXMUCy84Cy+ I1AhOT3aQnk6mmrx4hUxf1J8NnDyqDyUO8YB6Bll8H+JQCd0LtsQZa1/K4FYy7MQ+OV9Uf mk+dXh6Cfn2uNA+wALjvFXgWGiYPYzEH1kk+rtd2TSi4353etcn4+zdbkFIKESrtST9hPm gLzNnCQOyeKMVBEPTdTyn5T4Gw542ntp3IHhCy6UzKO6QfPMbOs3eiRb0rYVzw== 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 4S4S9309bmzVYl; Tue, 10 Oct 2023 07:25: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 39A7PAqJ088097; Tue, 10 Oct 2023 07:25:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39A7PAB6088094; Tue, 10 Oct 2023 07:25:10 GMT (envelope-from git) Date: Tue, 10 Oct 2023 07:25:10 GMT Message-Id: <202310100725.39A7PAB6088094@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: ff01d71e48d4 - main - bsdconfig: do not remove files id MK_DIALOG=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: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff01d71e48d40399c873113020ae8db158a01f94 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=ff01d71e48d40399c873113020ae8db158a01f94 commit ff01d71e48d40399c873113020ae8db158a01f94 Author: Baptiste Daroussin AuthorDate: 2023-10-10 07:17:29 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-10 07:17:29 +0000 bsdconfig: do not remove files id MK_DIALOG=no bsdconfig does not depends anymore on anything related to dialog(1) and libdialog(1) and has totally switched to bsddialog(1) --- tools/build/mk/OptionalObsoleteFiles.inc | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index fb22d56d53e0..7bb8403860e9 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1623,20 +1623,10 @@ OLD_FILES+=usr/lib/libdpv.a OLD_FILES+=usr/lib/libdpv.so OLD_FILES+=usr/lib/libdpv.so.3 OLD_FILES+=usr/lib/libdpv_p.a -OLD_FILES+=usr/sbin/bsdconfig OLD_FILES+=usr/share/man/man1/dialog.1.gz OLD_FILES+=usr/share/man/man1/dpv.1.gz OLD_FILES+=usr/share/man/man3/dialog.3.gz OLD_FILES+=usr/share/man/man3/dpv.3.gz -OLD_FILES+=usr/share/man/man8/bsdconfig.8.gz -OLD_DIRS+=usr/share/bsdconfig -OLD_DIRS+=usr/share/bsdconfig/media -OLD_DIRS+=usr/share/bsdconfig/networking -OLD_DIRS+=usr/share/bsdconfig/packages -OLD_DIRS+=usr/share/bsdconfig/password -OLD_DIRS+=usr/share/bsdconfig/startup -OLD_DIRS+=usr/share/bsdconfig/timezone -OLD_DIRS+=usr/share/bsdconfig/usermgmt .endif .if ${MK_EFI} == no From nobody Tue Oct 10 07:25: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 4S4S943BYGz4wHXc; Tue, 10 Oct 2023 07:25: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 4S4S942LfDz4rq6; Tue, 10 Oct 2023 07:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696922712; 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=RVnH2j7IfsPNZYK4ZhWLa22HPCWGUBHXj6myveRYDAA=; b=i8EzMnTOlTBjQ42/pH2ae/VeWdT0sLuauKfY8lA77VpNnroi2Py5hNojRr7wj3+e7CJkw/ ZsFUneD95Ub9jOhMzXULHac3LIo7wUCIV3u14mwHfK6vXkmn+WGfOf0yJH3NgbOg/+/3Ng 3X4g+iK3DsA4Gm+uGxiyPiMxJHEUWOM7FiI5fgrs3QN+gRXykCNriaMbOx6MB6/XEMAF6A 9K4rDFo9M5/NQcXVhmLMrJcqGeBEezet4brqwy/uB7O4iVWE8783Hm3EpnSpeQXDPjMOzC 9xu7loz75n/y0ww5DW/bFcm+F6Fqx75Ipc7MZwyqmiBaDKjd+uK+RZaUc+lIng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696922712; a=rsa-sha256; cv=none; b=coQUothjP4yjZd5sHijW7IhiNUzNWbMDPMWkC7eDKbZziAAaSIXpvYn24wF2GrSi9Fsxaw w6f/cMqbbOPcZpSKzBMfNt6xoOv8cZpI5n9f8uohPBykq9+5ePhCvMzBfC5eHUSDXFRWFK FcNm301T7ieERvx4y6ZIk0N7lyokvvdx3+5pWshhNs3AVxp/rIslYICtOvsW3KsJrUFVzE ykmASzDUqI8gNOdHqFdOXF9l9Egsmql9sct3VgYSRqV1h+ROrChC3Cs90a8qzwf6NAiUPe LB0gJza7BGHrtKFfNHlLcw+Oz2Xcgu3r76h9NYbwGX+hxMOXC6s9Mny/FyNpqw== 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=1696922712; 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=RVnH2j7IfsPNZYK4ZhWLa22HPCWGUBHXj6myveRYDAA=; b=hPLVVxaxNzl3XSVqDDX0TfbmlJnTPr4iA7MaiHh6QfjvxIN8Y0fRF4VpmAUNpMYHM+kEp1 lu0T2AQ2b+12Y70PEs8w0a/Itle1HAHjs6pOLaYZ8QOK+7Ytv9ODgcRaQ6I5SnqXRHzcjc msDaQ/juOZkZNy65yiy+bLzik0qGNSnLWjP+zHG5b/ANUqt3uUk4dQyARLgku3vh7JPuIn Sp+GZ9MA7z7D4sklmlT2clFANCt6ybDbNXcbGyLJEMe2qGrnl8E8+UYv01uhHYpZumZTH8 idkDX6m6uXj6/KifWWQquhZ8tTk4L4Tm9QO890kUGLohvlcJWRms7Q6q4OqIMg== 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 4S4S940yq5zTwq; Tue, 10 Oct 2023 07:25: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 39A7PCx9088142; Tue, 10 Oct 2023 07:25:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39A7PCxd088139; Tue, 10 Oct 2023 07:25:12 GMT (envelope-from git) Date: Tue, 10 Oct 2023 07:25:12 GMT Message-Id: <202310100725.39A7PCxd088139@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 38981026e703 - main - dialog(1): switch off dialog(1) by default 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: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38981026e70390ccfb99930ec6d71299dd2af780 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=38981026e70390ccfb99930ec6d71299dd2af780 commit 38981026e70390ccfb99930ec6d71299dd2af780 Author: Baptiste Daroussin AuthorDate: 2023-10-10 07:19:48 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-10 07:19:48 +0000 dialog(1): switch off dialog(1) by default Every direct consumers in base have switch to use bsddialog(1) by default --- share/mk/src.opts.mk | 2 +- tools/build/options/WITH_DIALOG | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 16b2433244da..ecb944262955 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -86,7 +86,6 @@ __DEFAULT_YES_OPTIONS = \ CRYPT \ CUSE \ CXGBETOOL \ - DIALOG \ DICT \ DMAGENT \ DTRACE \ @@ -197,6 +196,7 @@ __DEFAULT_NO_OPTIONS = \ BHYVE_SNAPSHOT \ CLANG_EXTRAS \ CLANG_FORMAT \ + DIALOG \ DETECT_TZ_CHANGES \ DISK_IMAGE_TOOLS_BOOTSTRAP \ DTRACE_ASAN \ diff --git a/tools/build/options/WITH_DIALOG b/tools/build/options/WITH_DIALOG new file mode 100644 index 000000000000..8b473b22e21e --- /dev/null +++ b/tools/build/options/WITH_DIALOG @@ -0,0 +1,6 @@ +Do build +.Xr dialog 1 , +.Xr dialog 3 , +.Xr dpv 1 , +and +.Xr dpv 3 . From nobody Tue Oct 10 07:25: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 4S4S954LjBz4wJTp; Tue, 10 Oct 2023 07:25: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 4S4S953V47z4sFd; Tue, 10 Oct 2023 07:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696922713; 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=X0eFcCITKsnV/ENzjnMSpuDZLdFHBOkq/RMzGU1/z00=; b=Aj7ixTfp1gGlp+RJxwRnsdVsU+h/VqG3pSWb50QtdySrKUQ+P2VfWxNbX2WkYZSGVhZqBn 3DN5HDQOjbes6709v9w42+13UjHeedMscqQQwlGLSiYBAW/Lj2QzT7CmFNbR4f1p13oXG8 YxehDQZL/tCrixHf2sdnHs7cPxTTJMrgeQFFzpLiP9WEVF/tgfGKYVa6UglwbD0vs9Lxi2 3oK5Mn2NqGF5Q5TNs4u3J6bRR2B5ruZUcOgHvH9544JMam9mo8FTOSWAWob5F0UV1JRIdY tPOFkIfn9oA7j8fSzPovtnQ2R41FXcuQdMydF2XvLTXJISCftszkRZ8kCDX09A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696922713; a=rsa-sha256; cv=none; b=J/qC1lcSkw0/enxVe8wLp0zIHXoTvYTX3vKdF8wvF/qusFMYDghoj8UXEpMw0LRFnKD3mg /h1lu5BupPv2UlDdnxKfatijh0BARh9f+DSTKuDgj6+vwL1ThDVqpww9eEAGJbI8oe920b LH84/NBnpp4uTJiHTw2fy6KaiKixDVKOavo0bJ+aKOyT2Zkr4474sknSyNaorcsH/gQuCo chJ4vnMiwBFvb5cjENgC53cFx89lAJ+cOBZX9gbWB79ZMrvdmwxp3MERuBjcPV45DHt9Ry p1fMCTBov98C9MLCFlCzgdHAirW5x80T1/2E2/7Ny0Xc8k9JrJKjlCCRPZ6fJw== 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=1696922713; 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=X0eFcCITKsnV/ENzjnMSpuDZLdFHBOkq/RMzGU1/z00=; b=uv5xnIAvxkjqZcAzaYDQtsonYBEoqQ49o5ZgoxWYnfwwrrr6ft5lwapAavaY9O8BfnbH5J hgEVmqezSoFQiSzLIhz83u65tMfkXXglzGQbB5V2W5tL3NKmknzbZR2ViviIXV33luDTA4 +qAZHL0wdYPRXpW5c+4pwDCFx5YJhaYOKR3DTXiOH9M4QshuvpTNsvo4rUJ6nwSngcZowR O5LT5EZyxyaJbDKq7BNAzRwiy475lmq9KquXavAv0xJaFch5yRD8naU0noVwLpjryS0k0c 7AvQ6FzmQ58e7lK/wkgOv7FtjCb2sPx5FV2AIn1ZSGSlggBwNeq15nmo9Sqa+g== 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 4S4S952C9pzVRB; Tue, 10 Oct 2023 07:25: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 39A7PD6H088194; Tue, 10 Oct 2023 07:25:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39A7PDHJ088191; Tue, 10 Oct 2023 07:25:13 GMT (envelope-from git) Date: Tue, 10 Oct 2023 07:25:13 GMT Message-Id: <202310100725.39A7PDHJ088191@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: bb63e82e8c10 - main - bsddialog(1): document the replacement of dialog(1) 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: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb63e82e8c109156b31e806fac8ecefbd259a0ed Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=bb63e82e8c109156b31e806fac8ecefbd259a0ed commit bb63e82e8c109156b31e806fac8ecefbd259a0ed Author: Baptiste Daroussin AuthorDate: 2023-10-10 07:24:25 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-10 07:24:25 +0000 bsddialog(1): document the replacement of dialog(1) --- RELNOTES | 3 +++ UPDATING | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/RELNOTES b/RELNOTES index c5686a4f30fb..880cec5d3fe1 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,9 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +ff01d71e48d4: + dialog(1) has been replace by bsddialog(1) + 41582f28ddf7: FreeBSD 15.0 will not include support for 32-bit platforms. However, 64-bit systems will still be able to run older 32-bit diff --git a/UPDATING b/UPDATING index a1bcecadd357..0064e53c7a53 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,16 @@ 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".) +20231010: + dialog(1) has been replaced in base by bsddialog(1), while most of the + time replacing a dialog(1) call by a bsddialog(1) call works out of the + box, bsddialog(1) is not considered as a drop-in replacement dialog(1). + + If you do depend on dialog(1) functionnality, please install cdialog + from ports: + + pkg install cdialog + 20230927: The EARLY_AP_STARTUP kernel option is mandatory on x86. The option has been added to DEFAULTS, so it should automatically be included in From nobody Tue Oct 10 09:33: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 4S4W1f4VmFz4wSf6; Tue, 10 Oct 2023 09:33: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 4S4W1f40Qtz3Md4; Tue, 10 Oct 2023 09:33:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696930438; 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=1bBS/e6TNqQPj1gESCO+yrh7LzUJ5XooqiOLVYWxEOU=; b=ky+q11S+jETFbBJpi9/MkG4nxHKpLcydBA7t5hS9QVM2f+mjt9NlbG1t+s2OGHH2CtA+cg 1ydSLZuW6fIcnv6Vr9KZ6yMxoAU94lpEijQbiVwuqMqwRA6I7w8MtcNOiGUSQ7+tLDDvrk CoWwKZKvVZGU2kl3uIG/ZEtoynLXUybjfm6hKRhdrubpyXb3IZJvR7B19n2IwY+my3cCu4 dBHBrugtuRctXrWKEtanrUAj7br384BDajT3dAmquxG6MAaSf0jCd74A3/SmxZriCZMjeB ZH39JpC9jXJbgrOUGqxO/HCxDCSqIA4EfeuceEEQxLW5rS/GbOO2UPdgtImJoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696930438; a=rsa-sha256; cv=none; b=gnY9oPioFZey50BmnXXCUCwFX7xuX2wLZFfY0HG3OPHwmTQSNVtQCTfQ2wRqqglhYdxJq7 UYqIVDf8NoSS0+nd9cT7/1GRzJRh+kVuTtB1uX6nJOqAnv9mJowo5Tzvk1dcnqEjzDZbKc uEu5HLIy2y1pSTc+FOcOnp97j40s/TdmHmDKjZRA1G314hCjpQAgsj75gSLQyrJgL599AU re0ooDlEVAdHK/UHcPl/OhQC1h1UlvWZiodW7yH/xyGNPzdTtxf7jILqhpM7SIq10C6Ypw AOCWe99X5ewXy3oKSEa/r2VhO+AVqxq5lP7JjBiys+kdQ0bLfcg6APd9RxZzQQ== 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=1696930438; 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=1bBS/e6TNqQPj1gESCO+yrh7LzUJ5XooqiOLVYWxEOU=; b=u6sYErUPSjFfAVlwwRrlKD41A226HGVYh8iL5bRnUP49a/JS47Wsbqd1Op503o0To8ZZka yMkWO9i5IxSKwSdQ21npxM7kVz2hirjSEgrdaKtqnc7zE72FffPpylZEUl3BWRQQ2r8tBS fcWH+HEIiJaenu2M+qunou8j5WqlIKJviXWK2tIFqVawX6aTCOD3gbHbLoomV22ynIQeH0 ONpk/PFrD0AsWYXWMhNybtj2nnGZumUTb3PfFSHvl2HTXg5cJjPkHaouoenTAOICQmOKWM 8vDwgSCp7E8K28TDVedDd32SKu/SsRnBRmDzUS0T+p5UMsOVqImMH7C2K/y4YQ== 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 4S4W1f31mrzYgG; Tue, 10 Oct 2023 09:33: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 39A9XwSi004140; Tue, 10 Oct 2023 09:33:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39A9XwPJ004137; Tue, 10 Oct 2023 09:33:58 GMT (envelope-from git) Date: Tue, 10 Oct 2023 09:33:58 GMT Message-Id: <202310100933.39A9XwPJ004137@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: 03f5bd1e4625 - main - linux(4): Drop the outdated comment, nosys is fine since 39024a89 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: 03f5bd1e462576838e79145379ce314e2e03e4b3 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=03f5bd1e462576838e79145379ce314e2e03e4b3 commit 03f5bd1e462576838e79145379ce314e2e03e4b3 Author: Dmitry Chagin AuthorDate: 2023-10-10 09:20:51 +0000 Commit: Dmitry Chagin CommitDate: 2023-10-10 09:20:51 +0000 linux(4): Drop the outdated comment, nosys is fine since 39024a89 MFC after: 1 week --- sys/arm64/linux/linux_sysvec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index 19dd5866ba50..a850d5e34bc0 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -121,7 +121,7 @@ linux_fetch_syscall_args(struct thread *td) sa->code = td->td_frame->tf_x[8]; sa->original_code = sa->code; - /* LINUXTODO: generic syscall? */ + if (sa->code >= p->p_sysent->sv_size) sa->callp = &nosys_sysent; else From nobody Tue Oct 10 09: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 4S4W1g5jnPz4wSkL; Tue, 10 Oct 2023 09:33: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 4S4W1g5GSyz3MrT; Tue, 10 Oct 2023 09:33:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696930439; 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=B//UTXxaFNZW7haHrgnH9TapPuxCmV2Q6cbtKh8/VuI=; b=lcfFM7a2vRTsQ7abUabIXD28/663aW9kUsHK8gJPCMJn+N+VsKLD5mIk7+uWUOu+WugVzs xjbHqS++vCYQYZZz2DOY3bUpCpXQwW6OvyYzwqBX6B+hq2B6gdGYXIgVV6xFt5eUuGUON9 PFcc+xHWxN0hfoQjmy1jP3AOOXiRvUkTakYocTY/Bhh2roB+3Oe5V3mAqZ3KpuSWQ0I6Rb UwwFkE3Kl12dqXwH+KhC+SPXP75JyOi/eUdVozB0CXOTyTUXW2eXMkoI0iSioa7GReCIxQ pJsP6LhB7vXOsUsAzj1zy+IzMa5FH98PZI9t9qn9/5eDoKf24LacjxiYQfTrhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696930439; a=rsa-sha256; cv=none; b=IY0n814knjP5JHmqk0yKCQSmGrmfdd5N80ZeD7Ke5q4UfSqIdvkTzXP8SL3g1o5xBpGcCs 2g1LHv7DqsbMQzrDoWfeY3wS8uEESzgxwYTpgj4zn/6vVh/XVqBgh3tkH/LFE/LXiZPlnV OZ7TdzPKxnH4tMq3MevUqjdxWK5UlbE3nkYkfhFU8QYcuGLx2kRylnDIeMMbH4zc5QVuBP Ifd0rNjuVGubNx3oy/FyHAVSDAS0Qn+8SJqp3EgKOTT85S8LmwNvuZDTYxf3P6UmwNW8zj 1vdS3/D1Ea2kmSdO1VEGIVhXobDRKGegbqxMpyMR+fe4YO0PfcmL287X9A6vTQ== 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=1696930439; 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=B//UTXxaFNZW7haHrgnH9TapPuxCmV2Q6cbtKh8/VuI=; b=VjfYRQr82knud3e8wOjw+wgyBBo5w8yt9rRQKQwYVxJS6QRST+slx+Xd5f6if69BSQ7/H4 KL3tiy18/P/yVYufQ8y4Qz4aaO8bw1JzgPLn6M1Pr8Ejxa24py/RdE1CfW6zZ2X0SIZh0B qblLX99Voig03nwZWwXWFIUPkfrqJLdahSzSgbp9WxSzW+RcPRQslqmEOG/JkOrSmZ/Tez PIX9k2HdpdPUGUPU8fmKL5l+2+hh1aGCqKoI9yi9eTu+uRZSRnrYCDXMniimN4IcKoIQQb yvj/r5fP1mCEOrX1evLLtHv1zFOPfk4VwKL+CuzpjJf1RavPh0023EaMD5BjVQ== 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 4S4W1g41wYzZ0y; Tue, 10 Oct 2023 09:33: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 39A9XxmC004201; Tue, 10 Oct 2023 09:33:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39A9XxmH004198; Tue, 10 Oct 2023 09:33:59 GMT (envelope-from git) Date: Tue, 10 Oct 2023 09:33:59 GMT Message-Id: <202310100933.39A9XxmH004198@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: 5bdd74cc05e6 - main - linux(4): Drop the outdated comments about sixth register on i386 int0x80 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: 5bdd74cc05e6c7d110688feacdbd22b6dffe5d72 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=5bdd74cc05e6c7d110688feacdbd22b6dffe5d72 commit 5bdd74cc05e6c7d110688feacdbd22b6dffe5d72 Author: Dmitry Chagin AuthorDate: 2023-10-10 09:33:22 +0000 Commit: Dmitry Chagin CommitDate: 2023-10-10 09:33:22 +0000 linux(4): Drop the outdated comments about sixth register on i386 int0x80 This is well documented in the Linux syscall(2). MFC after: 1 week --- sys/amd64/linux32/linux32_sysvec.c | 2 +- sys/i386/linux/linux_sysvec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index 7104cc50735e..1002648c3df8 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -525,7 +525,7 @@ linux32_fetch_syscall_args(struct thread *td) sa->args[2] = frame->tf_rdx; sa->args[3] = frame->tf_rsi; sa->args[4] = frame->tf_rdi; - sa->args[5] = frame->tf_rbp; /* Unconfirmed */ + sa->args[5] = frame->tf_rbp; sa->code = frame->tf_rax; sa->original_code = sa->code; diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index a3d445951cce..8990b9b806ca 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -518,7 +518,7 @@ linux_fetch_syscall_args(struct thread *td) sa->args[2] = frame->tf_edx; sa->args[3] = frame->tf_esi; sa->args[4] = frame->tf_edi; - sa->args[5] = frame->tf_ebp; /* Unconfirmed */ + sa->args[5] = frame->tf_ebp; if (sa->code >= p->p_sysent->sv_size) /* nosys */ From nobody Tue Oct 10 09:50: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 4S4WNp5w7bz4wV5d; Tue, 10 Oct 2023 09:50:34 +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 4S4WNp5j4Qz3Njk; Tue, 10 Oct 2023 09:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696931434; 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=Jg3VTukphAs1I+7syG3r5EMESPjhWqHy/AAqcVkMcpc=; b=WjfnGWYmVAVGtV336o7wuJO7VXEKiX2mRDdQYH+ao/YYYe7/kuMyWIdQWC1217JWjIvGn+ aPpsaZcKpsr6+elhtuaL7I7zpPxfBqKP0oxdkUE/4JYaIAKgZ5HEIj/B1RqP1oYOo6lSIa axl61z4Vnn4q7P+ohcJqNatUVHULrAtzia6+C3zvaMvdBOPRyMJElrV/PYpIktpUK9gGzD Y0AUWVg35PsYn+g2KhnFrf/ITm9jc56sy2uR0pOY908XAst7ayzfaj28+bXY66Nb7jRpci /NnaWjf77cje60+hvbgUEYt0A5OPUZ87AmaEQn9o14co57vBL3DKgCBI9j+q1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696931434; a=rsa-sha256; cv=none; b=uauVFk/i8fFW62gWZwKUvh3M89rHy8ZoPCC7tLoHlkhVuLxCuUxvMZYm6yiLzFjPWHMa9y QrMqpcgkoNGVy0FgGcO/3C1uVzSO8guyONFvW6TZFC0caTh8H5DPLbVvDmGMvLLmVBmegg DLgRS5gUvfdC2P/tfXiOZdyFl/Zdrmlc1mPWrHtu5xBZHPoGqVV7dJxE2WvsBj5gLz6zGx kWeeJ8H1bJwisbi/mSeuLggjUojWwnFHn5edC7wijZlm9bXkrHPZKCbiT4oeltPn8EJBCL cu0+o1lsPEafJaAueFurjeRx+wxuLJHS+B38FjnXcrVr19obMl/hmzMcH24lgw== 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=1696931434; 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=Jg3VTukphAs1I+7syG3r5EMESPjhWqHy/AAqcVkMcpc=; b=uuZwiLQBz9ngoCEgOp+LN2lKdIlswd8wW5WSjbEihsKZAJcT6kTvrMc2oiED9GoyPr0ZOA owK6qHlYTXCLOboY1lH9CZc61ZF+XlEQ1+uhjmUT39ytBtKcSm9FV0KKWsw6iQulEP0YCS ZQqiVwgGyH10L/IyA8EwomSjAvhltyw/cRydmLJAJVCwX9ou/wHfcGxlDSsSrGTKcawhgP NV52UR8I9ZHbncx2xTSXHPRrmBeNHcknGbp0aTQc/Pln0qCtv83pg/NckH5SFA9TP/zHLa nND8b4jxwmTjV/+swR3P9t/LngoazZboB9Hb/exuD2kzFVYWZdpBd1ret2PpIg== 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 4S4WNp4ldXzYy9; Tue, 10 Oct 2023 09:50:34 +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 39A9oY9R029999; Tue, 10 Oct 2023 09:50:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39A9oYuc029996; Tue, 10 Oct 2023 09:50:34 GMT (envelope-from git) Date: Tue, 10 Oct 2023 09:50:34 GMT Message-Id: <202310100950.39A9oYuc029996@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: 2cef62886dc7 - main - pf: convert state retrieval to netlink 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: 2cef62886dc7c33ca01f70ca712845da1e55b470 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2cef62886dc7c33ca01f70ca712845da1e55b470 commit 2cef62886dc7c33ca01f70ca712845da1e55b470 Author: Alexander V. Chernikov AuthorDate: 2023-09-15 10:06:59 +0000 Commit: Kristof Provost CommitDate: 2023-10-10 09:48:21 +0000 pf: convert state retrieval to netlink Use netlink to export pf's state table. The primary motivation is to improve how we deal with very large state stables. With the previous implementation we had to build the entire list (both in the kernel and in userspace) before we could start processing. With netlink we start to get data in userspace while the kernel is still generating more. This reduces peak memory consumption (which can get to the GB range once we hit millions of states). Netlink also makes future extension easier, in that we can easily add fields to the state export without breaking userspace. In that regard it's similar to an nvlist-based approach, except that it also deals with transport to userspace and that it performs significantly better than nvlists. Testing has failed to measure a performance difference between the previous struct-copy based ioctl and the netlink approach. Differential Revision: https://reviews.freebsd.org/D38888 --- include/Makefile | 3 +- lib/libpfctl/libpfctl.c | 214 +++++++++++++++++---------------- sys/conf/files | 1 + sys/modules/pf/Makefile | 2 +- sys/netpfil/pf/pf_ioctl.c | 5 + sys/netpfil/pf/pf_nl.c | 292 ++++++++++++++++++++++++++++++++++++++++++++++ sys/netpfil/pf/pf_nl.h | 105 +++++++++++++++++ 7 files changed, 522 insertions(+), 100 deletions(-) diff --git a/include/Makefile b/include/Makefile index 736a47854534..5a3cb66eb3e3 100644 --- a/include/Makefile +++ b/include/Makefile @@ -215,7 +215,8 @@ IPFILTERDIR= ${INCLUDEDIR}/netinet .PATH: ${SRCTOP}/sys/netpfil/pf PF= pf.h \ pf_altq.h \ - pf_mtag.h + pf_mtag.h \ + pf_nl.h PFPACKAGE= pf PFDIR= ${INCLUDEDIR}/netpfil/pf diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 1eccf3dfbcdf..8699d8132240 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -40,6 +40,13 @@ #include #include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -1115,125 +1122,136 @@ pfctl_nv_add_state_cmp(nvlist_t *nvl, const char *name, nvlist_destroy(nv); } -static void -pf_state_key_export_to_state_key(struct pfctl_state_key *ps, - const struct pf_state_key_export *s) +static inline bool +snl_attr_get_pfaddr(struct snl_state *ss __unused, struct nlattr *nla, + const void *arg __unused, void *target) { - bcopy(s->addr, ps->addr, sizeof(ps->addr[0]) * 2); - ps->port[0] = s->port[0]; - ps->port[1] = s->port[1]; + memcpy(target, NLA_DATA(nla), NLA_DATA_LEN(nla)); + return (true); } -static void -pf_state_peer_export_to_state_peer(struct pfctl_state_peer *ps, - const struct pf_state_peer_export *s) +static inline bool +snl_attr_store_ifname(struct snl_state *ss __unused, struct nlattr *nla, + const void *arg __unused, void *target) { - /* Ignore scrub. */ - ps->seqlo = s->seqlo; - ps->seqhi = s->seqhi; - ps->seqdiff = s->seqdiff; - /* Ignore max_win & mss */ - ps->state = s->state; - ps->wscale = s->wscale; -} + size_t maxlen = NLA_DATA_LEN(nla); -static void -pf_state_export_to_state(struct pfctl_state *ps, const struct pf_state_export *s) -{ - assert(s->version >= PF_STATE_VERSION); - - ps->id = s->id; - strlcpy(ps->ifname, s->ifname, sizeof(ps->ifname)); - strlcpy(ps->orig_ifname, s->orig_ifname, sizeof(ps->orig_ifname)); - strlcpy(ps->rt_ifname, s->rt_ifname, sizeof(ps->rt_ifname)); - pf_state_key_export_to_state_key(&ps->key[0], &s->key[0]); - pf_state_key_export_to_state_key(&ps->key[1], &s->key[1]); - pf_state_peer_export_to_state_peer(&ps->src, &s->src); - pf_state_peer_export_to_state_peer(&ps->dst, &s->dst); - bcopy(&s->rt_addr, &ps->rt_addr, sizeof(ps->rt_addr)); - ps->rule = ntohl(s->rule); - ps->anchor = ntohl(s->anchor); - ps->nat_rule = ntohl(s->nat_rule); - ps->creation = ntohl(s->creation); - ps->expire = ntohl(s->expire); - ps->packets[0] = s->packets[0]; - ps->packets[1] = s->packets[1]; - ps->bytes[0] = s->bytes[0]; - ps->bytes[1] = s->bytes[1]; - ps->creatorid = ntohl(s->creatorid); - ps->key[0].proto = s->proto; - ps->key[1].proto = s->proto; - ps->key[0].af = s->af; - ps->key[1].af = s->af; - ps->direction = s->direction; - ps->state_flags = ntohs(s->state_flags); - ps->sync_flags = ntohs(s->sync_flags); - ps->qid = ntohs(s->qid); - ps->pqid = ntohs(s->pqid); - ps->dnpipe = ntohs(s->dnpipe); - ps->dnrpipe = ntohs(s->dnrpipe); - ps->rtableid = ntohl(s->rtableid); - ps->min_ttl = s->min_ttl; - ps->set_tos = s->set_tos; - ps->max_mss = ntohs(s->max_mss); - ps->rt = s->rt; - ps->set_prio[0] = s->set_prio[0]; - ps->set_prio[1] = s->set_prio[1]; + if (strnlen((char *)NLA_DATA(nla), maxlen) < maxlen) { + strlcpy(target, (char *)NLA_DATA(nla), maxlen); + return (true); + } + return (false); } -int -pfctl_get_states(int dev, struct pfctl_states *states) +#define _OUT(_field) offsetof(struct pfctl_state_peer, _field) +static const struct snl_attr_parser nla_p_speer[] = { + { .type = PF_STP_SEQLO, .off = _OUT(seqlo), .cb = snl_attr_get_uint32 }, + { .type = PF_STP_SEQHI, .off = _OUT(seqhi), .cb = snl_attr_get_uint32 }, + { .type = PF_STP_SEQDIFF, .off = _OUT(seqdiff), .cb = snl_attr_get_uint32 }, + { .type = PF_STP_STATE, .off = _OUT(state), .cb = snl_attr_get_uint8 }, + { .type = PF_STP_WSCALE, .off = _OUT(wscale), .cb = snl_attr_get_uint8 }, +}; +SNL_DECLARE_ATTR_PARSER(speer_parser, nla_p_speer); +#undef _OUT + +#define _OUT(_field) offsetof(struct pf_state_key_export, _field) +static const struct snl_attr_parser nla_p_skey[] = { + { .type = PF_STK_ADDR0, .off = _OUT(addr[0]), .cb = snl_attr_get_pfaddr }, + { .type = PF_STK_ADDR1, .off = _OUT(addr[1]), .cb = snl_attr_get_pfaddr }, + { .type = PF_STK_PORT0, .off = _OUT(port[0]), .cb = snl_attr_get_uint16 }, + { .type = PF_STK_PORT1, .off = _OUT(port[1]), .cb = snl_attr_get_uint16 }, +}; +SNL_DECLARE_ATTR_PARSER(skey_parser, nla_p_skey); +#undef _OUT + +#define _IN(_field) offsetof(struct genlmsghdr, _field) +#define _OUT(_field) offsetof(struct pfctl_state, _field) +static struct snl_attr_parser ap_state[] = { + { .type = PF_ST_ID, .off = _OUT(id), .cb = snl_attr_get_uint64 }, + { .type = PF_ST_CREATORID, .off = _OUT(creatorid), .cb = snl_attr_get_uint32 }, + { .type = PF_ST_IFNAME, .off = _OUT(ifname), .cb = snl_attr_store_ifname }, + { .type = PF_ST_ORIG_IFNAME, .off = _OUT(orig_ifname), .cb = snl_attr_store_ifname }, + { .type = PF_ST_KEY_WIRE, .off = _OUT(key[0]), .arg = &skey_parser, .cb = snl_attr_get_nested }, + { .type = PF_ST_KEY_STACK, .off = _OUT(key[1]), .arg = &skey_parser, .cb = snl_attr_get_nested }, + { .type = PF_ST_PEER_SRC, .off = _OUT(src), .arg = &speer_parser, .cb = snl_attr_get_nested }, + { .type = PF_ST_PEER_DST, .off = _OUT(dst), .arg = &speer_parser, .cb = snl_attr_get_nested }, + { .type = PF_ST_RT_ADDR, .off = _OUT(rt_addr), .cb = snl_attr_get_pfaddr }, + { .type = PF_ST_RULE, .off = _OUT(rule), .cb = snl_attr_get_uint32 }, + { .type = PF_ST_ANCHOR, .off = _OUT(anchor), .cb = snl_attr_get_uint32 }, + { .type = PF_ST_NAT_RULE, .off = _OUT(nat_rule), .cb = snl_attr_get_uint32 }, + { .type = PF_ST_CREATION, .off = _OUT(creation), .cb = snl_attr_get_uint32 }, + { .type = PF_ST_EXPIRE, .off = _OUT(expire), .cb = snl_attr_get_uint32 }, + { .type = PF_ST_PACKETS0, .off = _OUT(packets[0]), .cb = snl_attr_get_uint64 }, + { .type = PF_ST_PACKETS1, .off = _OUT(packets[1]), .cb = snl_attr_get_uint64 }, + { .type = PF_ST_BYTES0, .off = _OUT(bytes[0]), .cb = snl_attr_get_uint64 }, + { .type = PF_ST_BYTES1, .off = _OUT(bytes[1]), .cb = snl_attr_get_uint64 }, + { .type = PF_ST_AF, .off = _OUT(key[0].af), .cb = snl_attr_get_uint8 }, + { .type = PF_ST_PROTO, .off = _OUT(key[0].proto), .cb = snl_attr_get_uint8 }, + { .type = PF_ST_DIRECTION, .off = _OUT(direction), .cb = snl_attr_get_uint8 }, + { .type = PF_ST_LOG, .off = _OUT(log), .cb = snl_attr_get_uint8 }, + { .type = PF_ST_STATE_FLAGS, .off = _OUT(state_flags), .cb = snl_attr_get_uint16 }, + { .type = PF_ST_SYNC_FLAGS, .off = _OUT(sync_flags), .cb = snl_attr_get_uint8 }, +}; +static struct snl_field_parser fp_state[] = { +}; +#undef _IN +#undef _OUT +SNL_DECLARE_PARSER(state_parser, struct genlmsghdr, fp_state, ap_state); + +static const struct snl_hdr_parser *all_parsers[] = { + &state_parser, &skey_parser, &speer_parser +}; + +static int +pfctl_get_states_nl(struct snl_state *ss, struct pfctl_states *states) { - struct pfioc_states_v2 ps; - struct pf_state_export *p; - char *inbuf = NULL, *newinbuf = NULL; - unsigned int len = 0; - int i, error; + SNL_VERIFY_PARSERS(all_parsers); + int family_id = snl_get_genl_family(ss, PFNL_FAMILY_NAME); + + struct nlmsghdr *hdr; + struct snl_writer nw; - bzero(&ps, sizeof(ps)); - ps.ps_req_version = PF_STATE_VERSION; + snl_init_writer(ss, &nw); + hdr = snl_create_genl_msg_request(&nw, family_id, PFNL_CMD_GETSTATES); + hdr->nlmsg_flags |= NLM_F_DUMP; + snl_finalize_msg(&nw); + uint32_t seq_id = hdr->nlmsg_seq; + + snl_send_message(ss, hdr); bzero(states, sizeof(*states)); TAILQ_INIT(&states->states); - for (;;) { - ps.ps_len = len; - if (len) { - newinbuf = realloc(inbuf, len); - if (newinbuf == NULL) - return (ENOMEM); - ps.ps_buf = inbuf = newinbuf; - } - if ((error = ioctl(dev, DIOCGETSTATESV2, &ps)) < 0) { - free(inbuf); - return (error); - } - if (ps.ps_len + sizeof(struct pfioc_states_v2) < len) - break; - if (len == 0 && ps.ps_len == 0) - goto out; - if (len == 0 && ps.ps_len != 0) - len = ps.ps_len; - if (ps.ps_len == 0) - goto out; /* no states */ - len *= 2; - } - p = ps.ps_states; - - for (i = 0; i < ps.ps_len; i += sizeof(*p), p++) { + struct snl_errmsg_data e = {}; + while ((hdr = snl_read_reply_multi(ss, seq_id, &e)) != NULL) { struct pfctl_state *s = malloc(sizeof(*s)); + bzero(s, sizeof(*s)); if (s == NULL) { pfctl_free_states(states); - error = ENOMEM; - goto out; + return (ENOMEM); } + if (!snl_parse_nlmsg(ss, hdr, &state_parser, s)) + continue; + + s->key[1].af = s->key[0].af; + s->key[1].proto = s->key[0].proto; - pf_state_export_to_state(s, p); TAILQ_INSERT_TAIL(&states->states, s, entry); } -out: - free(inbuf); + return (0); +} + +int +pfctl_get_states(int dev __unused, struct pfctl_states *states) +{ + struct snl_state ss = {}; + int error; + + snl_init(&ss, NETLINK_GENERIC); + error = pfctl_get_states_nl(&ss, states); + snl_free(&ss); + return (error); } diff --git a/sys/conf/files b/sys/conf/files index 5d5e8f30347c..dc837eb02c06 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4498,6 +4498,7 @@ netpfil/pf/pf_if.c optional pf inet netpfil/pf/pf_ioctl.c optional pf inet netpfil/pf/pf_lb.c optional pf inet netpfil/pf/pf_norm.c optional pf inet +netpfil/pf/pf_nl.c optional pf inet netpfil/pf/pf_nv.c optional pf inet netpfil/pf/pf_osfp.c optional pf inet netpfil/pf/pf_ruleset.c optional pf inet diff --git a/sys/modules/pf/Makefile b/sys/modules/pf/Makefile index 918cc78bad5e..6158943139cf 100644 --- a/sys/modules/pf/Makefile +++ b/sys/modules/pf/Makefile @@ -3,7 +3,7 @@ KMOD= pf SRCS= pf.c pf_if.c pf_lb.c pf_osfp.c pf_ioctl.c pf_norm.c pf_table.c \ - pf_ruleset.c pf_nv.c pf_syncookies.c in4_cksum.c \ + pf_ruleset.c pf_nl.c pf_nv.c pf_syncookies.c in4_cksum.c \ bus_if.h device_if.h \ opt_pf.h opt_inet.h opt_inet6.h opt_bpf.h opt_sctp.h opt_global.h \ opt_kern_tls.h diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index db8f481a1567..42c2aa9bfb01 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -83,6 +83,7 @@ #include #include #include +#include #include #ifdef INET6 @@ -6648,6 +6649,8 @@ pf_unload(void) } sx_xunlock(&pf_end_lock); + pf_nl_unregister(); + if (pf_dev != NULL) destroy_dev(pf_dev); @@ -6683,6 +6686,7 @@ pf_modevent(module_t mod, int type, void *data) switch(type) { case MOD_LOAD: error = pf_load(); + pf_nl_register(); break; case MOD_UNLOAD: /* Handled in SYSUNINIT(pf_unload) to ensure it's done after @@ -6703,4 +6707,5 @@ static moduledata_t pf_mod = { }; DECLARE_MODULE(pf, pf_mod, SI_SUB_PROTO_FIREWALL, SI_ORDER_SECOND); +MODULE_DEPEND(pf, netlink, 1, 1, 1); MODULE_VERSION(pf, PF_MODVER); diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c new file mode 100644 index 000000000000..cbea76e7386f --- /dev/null +++ b/sys/netpfil/pf/pf_nl.c @@ -0,0 +1,292 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Alexander V. Chernikov + * Copyright (c) 2023 Rubicon Communications, LLC (Netgate) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include "opt_netlink.h" + +#include + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include + +#define DEBUG_MOD_NAME nl_pf +#define DEBUG_MAX_LEVEL LOG_DEBUG3 +#include +_DECLARE_DEBUG(LOG_DEBUG); + +struct nl_parsed_state { + uint8_t version; + uint32_t id; + uint32_t creatorid; +}; + +#define _IN(_field) offsetof(struct genlmsghdr, _field) +#define _OUT(_field) offsetof(struct nl_parsed_state, _field) +static const struct nlattr_parser nla_p_state[] = { + { .type = PF_ST_ID, .off = _OUT(id), .cb = nlattr_get_uint32 }, + { .type = PF_ST_CREATORID, .off = _OUT(creatorid), .cb = nlattr_get_uint32 }, +}; +static const struct nlfield_parser nlf_p_generic[] = { + { .off_in = _IN(version), .off_out = _OUT(version), .cb = nlf_get_u8 }, +}; +#undef _IN +#undef _OUT +NL_DECLARE_PARSER(state_parser, struct genlmsghdr, nlf_p_generic, nla_p_state); + +static void +dump_addr(struct nl_writer *nw, int attr, const struct pf_addr *addr, int af) +{ + switch (af) { + case AF_INET: + nlattr_add(nw, attr, 4, &addr->v4); + break; + case AF_INET6: + nlattr_add(nw, attr, 16, &addr->v6); + break; + }; +} + +static bool +dump_state_peer(struct nl_writer *nw, int attr, const struct pf_state_peer *peer) +{ + int off = nlattr_add_nested(nw, attr); + if (off == 0) + return (false); + + nlattr_add_u32(nw, PF_STP_SEQLO, peer->seqlo); + nlattr_add_u32(nw, PF_STP_SEQHI, peer->seqhi); + nlattr_add_u32(nw, PF_STP_SEQDIFF, peer->seqdiff); + nlattr_add_u16(nw, PF_STP_MAX_WIN, peer->max_win); + nlattr_add_u16(nw, PF_STP_MSS, peer->mss); + nlattr_add_u8(nw, PF_STP_STATE, peer->state); + nlattr_add_u8(nw, PF_STP_WSCALE, peer->wscale); + + if (peer->scrub != NULL) { + struct pf_state_scrub *sc = peer->scrub; + uint16_t pfss_flags = sc->pfss_flags & PFSS_TIMESTAMP; + + nlattr_add_u16(nw, PF_STP_PFSS_FLAGS, pfss_flags); + nlattr_add_u32(nw, PF_STP_PFSS_TS_MOD, sc->pfss_ts_mod); + nlattr_add_u8(nw, PF_STP_PFSS_TTL, sc->pfss_ttl); + nlattr_add_u8(nw, PF_STP_SCRUB_FLAG, PFSYNC_SCRUB_FLAG_VALID); + } + nlattr_set_len(nw, off); + + return (true); +} + +static bool +dump_state_key(struct nl_writer *nw, int attr, const struct pf_state_key *key) +{ + int off = nlattr_add_nested(nw, attr); + if (off == 0) + return (false); + + dump_addr(nw, PF_STK_ADDR0, &key->addr[0], key->af); + dump_addr(nw, PF_STK_ADDR1, &key->addr[1], key->af); + nlattr_add_u16(nw, PF_STK_PORT0, key->port[0]); + nlattr_add_u16(nw, PF_STK_PORT1, key->port[1]); + + nlattr_set_len(nw, off); + + return (true); +} + +static int +dump_state(struct nlpcb *nlp, const struct nlmsghdr *hdr, struct pf_kstate *s, + struct nl_pstate *npt) +{ + struct nl_writer *nw = npt->nw; + int error = 0; + int af; + struct pf_state_key *key; + + if (!nlmsg_reply(nw, hdr, sizeof(struct genlmsghdr))) + goto enomem; + + struct genlmsghdr *ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); + ghdr_new->cmd = PFNL_CMD_GETSTATES; + ghdr_new->version = 0; + ghdr_new->reserved = 0; + + nlattr_add_u64(nw, PF_ST_VERSION, PF_STATE_VERSION); + + key = s->key[PF_SK_WIRE]; + if (!dump_state_key(nw, PF_ST_KEY_WIRE, key)) + goto enomem; + key = s->key[PF_SK_STACK]; + if (!dump_state_key(nw, PF_ST_KEY_STACK, key)) + goto enomem; + + af = s->key[PF_SK_WIRE]->af; + nlattr_add_u8(nw, PF_ST_PROTO, s->key[PF_SK_WIRE]->proto); + nlattr_add_u8(nw, PF_ST_AF, af); + + nlattr_add_string(nw, PF_ST_IFNAME, s->kif->pfik_name); + nlattr_add_string(nw, PF_ST_ORIG_IFNAME, s->orig_kif->pfik_name); + dump_addr(nw, PF_ST_RT_ADDR, &s->rt_addr, af); + nlattr_add_u32(nw, PF_ST_CREATION, time_uptime - s->creation); + uint32_t expire = pf_state_expires(s); + if (expire > time_uptime) + expire = expire - time_uptime; + nlattr_add_u32(nw, PF_ST_EXPIRE, expire); + nlattr_add_u8(nw, PF_ST_DIRECTION, s->direction); + nlattr_add_u8(nw, PF_ST_LOG, s->act.log); + nlattr_add_u8(nw, PF_ST_TIMEOUT, s->timeout); + nlattr_add_u16(nw, PF_ST_STATE_FLAGS, s->state_flags); + uint8_t sync_flags = 0; + if (s->src_node) + sync_flags |= PFSYNC_FLAG_SRCNODE; + if (s->nat_src_node) + sync_flags |= PFSYNC_FLAG_NATSRCNODE; + nlattr_add_u8(nw, PF_ST_SYNC_FLAGS, sync_flags); + nlattr_add_u64(nw, PF_ST_ID, s->id); + nlattr_add_u32(nw, PF_ST_CREATORID, htonl(s->creatorid)); + + nlattr_add_u32(nw, PF_ST_RULE, s->rule.ptr ? s->rule.ptr->nr : -1); + nlattr_add_u32(nw, PF_ST_ANCHOR, s->anchor.ptr ? s->anchor.ptr->nr : -1); + nlattr_add_u32(nw, PF_ST_NAT_RULE, s->nat_rule.ptr ? s->nat_rule.ptr->nr : -1); + + nlattr_add_u64(nw, PF_ST_PACKETS0, s->packets[0]); + nlattr_add_u64(nw, PF_ST_PACKETS1, s->packets[1]); + nlattr_add_u64(nw, PF_ST_BYTES0, s->bytes[0]); + nlattr_add_u64(nw, PF_ST_BYTES1, s->bytes[1]); + + if (!dump_state_peer(nw, PF_ST_PEER_SRC, &s->src)) + goto enomem; + if (!dump_state_peer(nw, PF_ST_PEER_DST, &s->dst)) + goto enomem; + + if (nlmsg_end(nw)) + return (0); + +enomem: + error = ENOMEM; + nlmsg_abort(nw); + return (error); +} + +static int +handle_dumpstates(struct nlpcb *nlp, struct nl_parsed_state *attrs, + struct nlmsghdr *hdr, struct nl_pstate *npt) +{ + int error = 0; + + hdr->nlmsg_flags |= NLM_F_MULTI; + + for (int i = 0; i <= pf_hashmask; i++) { + struct pf_idhash *ih = &V_pf_idhash[i]; + struct pf_kstate *s; + + if (LIST_EMPTY(&ih->states)) + continue; + + PF_HASHROW_LOCK(ih); + LIST_FOREACH(s, &ih->states, entry) { + if (s->timeout != PFTM_UNLINKED) { + error = dump_state(nlp, hdr, s, npt); + if (error != 0) + break; + } + } + PF_HASHROW_UNLOCK(ih); + } + + if (!nlmsg_end_dump(npt->nw, error, hdr)) { + NL_LOG(LOG_DEBUG, "Unable to finalize the dump"); + return (ENOMEM); + } + + return (error); +} + +static int +handle_getstate(struct nlpcb *nlp, struct nl_parsed_state *attrs, + struct nlmsghdr *hdr, struct nl_pstate *npt) +{ + struct pf_kstate *s = pf_find_state_byid(attrs->id, attrs->creatorid); + if (s == NULL) + return (ENOENT); + return (dump_state(nlp, hdr, s, npt)); +} + +static int +pf_handle_getstates(struct nlmsghdr *hdr, struct nl_pstate *npt) +{ + int error; + + struct nl_parsed_state attrs = {}; + error = nl_parse_nlmsg(hdr, &state_parser, npt, &attrs); + if (error != 0) + return (error); + + if (attrs.id != 0) + error = handle_getstate(npt->nlp, &attrs, hdr, npt); + else + error = handle_dumpstates(npt->nlp, &attrs, hdr, npt); + + return (error); +} + +static const struct nlhdr_parser *all_parsers[] = { &state_parser }; + +static int family_id; + +static const struct genl_cmd pf_cmds[] = { + { + .cmd_num = PFNL_CMD_GETSTATES, + .cmd_name = "GETSTATES", + .cmd_cb = pf_handle_getstates, + .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, + }, +}; + +void +pf_nl_register(void) +{ + NL_VERIFY_PARSERS(all_parsers); + family_id = genl_register_family(PFNL_FAMILY_NAME, 0, 2, PFNL_CMD_MAX); + genl_register_cmds(PFNL_FAMILY_NAME, pf_cmds, NL_ARRAY_LEN(pf_cmds)); +} + +void +pf_nl_unregister(void) +{ + genl_unregister_family(PFNL_FAMILY_NAME); +} diff --git a/sys/netpfil/pf/pf_nl.h b/sys/netpfil/pf/pf_nl.h new file mode 100644 index 000000000000..5ef757eead21 --- /dev/null +++ b/sys/netpfil/pf/pf_nl.h @@ -0,0 +1,105 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Alexander V. Chernikov + * Copyright (c) 2023 Rubicon Communications, LLC (Netgate) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#ifndef _NETPFIL_PF_PF_NL_H_ +#define _NETPFIL_PF_PF_NL_H_ + +/* Genetlink family */ +#define PFNL_FAMILY_NAME "pfctl" + +/* available commands */ +enum { + PFNL_CMD_UNSPEC = 0, + PFNL_CMD_GETSTATES = 1, + __PFNL_CMD_MAX, +}; +#define PFNL_CMD_MAX (__PFNL_CMD_MAX -1) + +enum pfstate_key_type_t { + PF_STK_UNSPEC, + PF_STK_ADDR0 = 1, /* ip */ + PF_STK_ADDR1 = 2, /* ip */ + PF_STK_PORT0 = 3, /* u16 */ + PF_STK_PORT1 = 4, /* u16 */ +}; + +enum pfstate_peer_type_t { + PF_STP_UNSPEC, + PF_STP_PFSS_FLAGS = 1, /* u16 */ + PF_STP_PFSS_TTL = 2, /* u8 */ + PF_STP_SCRUB_FLAG = 3, /* u8 */ + PF_STP_PFSS_TS_MOD = 4, /* u32 */ + PF_STP_SEQLO = 5, /* u32 */ + PF_STP_SEQHI = 6, /* u32 */ + PF_STP_SEQDIFF = 7, /* u32 */ + PF_STP_MAX_WIN = 8, /* u16 */ + PF_STP_MSS = 9, /* u16 */ + PF_STP_STATE = 10, /* u8 */ + PF_STP_WSCALE = 11, /* u8 */ +}; + +enum pfstate_type_t { + PF_ST_UNSPEC, + PF_ST_ID = 1, /* u32, state id */ + PF_ST_CREATORID = 2, /* u32, */ + PF_ST_IFNAME = 3, /* string */ + PF_ST_ORIG_IFNAME = 4, /* string */ + PF_ST_KEY_WIRE = 5, /* nested, pfstate_key_type_t */ + PF_ST_KEY_STACK = 6, /* nested, pfstate_key_type_t */ + PF_ST_PEER_SRC = 7, /* nested, pfstate_peer_type_t*/ + PF_ST_PEER_DST = 8, /* nested, pfstate_peer_type_t */ + PF_ST_RT_ADDR = 9, /* ip */ + PF_ST_RULE = 10, /* u32 */ + PF_ST_ANCHOR = 11, /* u32 */ + PF_ST_NAT_RULE = 12, /* u32 */ + PF_ST_CREATION = 13, /* u32 */ + PF_ST_EXPIRE = 14, /* u32 */ + PF_ST_PACKETS0 = 15, /* u64 */ + PF_ST_PACKETS1 = 16, /* u64 */ + PF_ST_BYTES0 = 17, /* u64 */ + PF_ST_BYTES1 = 18, /* u64 */ + PF_ST_AF = 19, /* u8 */ + PF_ST_PROTO = 21, /* u8 */ + PF_ST_DIRECTION = 22, /* u8 */ + PF_ST_LOG = 23, /* u8 */ + PF_ST_TIMEOUT = 24, /* u8 */ + PF_ST_STATE_FLAGS = 25, /* u8 */ + PF_ST_SYNC_FLAGS = 26, /* u8 */ + PF_ST_UPDATES = 27, /* u8 */ + PF_ST_VERSION = 28, /* u64 */ +}; + +#ifdef _KERNEL + +void pf_nl_register(void); +void pf_nl_unregister(void); + +#endif + +#endif From nobody Tue Oct 10 09:50:35 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 4S4WNr1X6Wz4wVBH; Tue, 10 Oct 2023 09:50: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 4S4WNr09tfz3P1b; Tue, 10 Oct 2023 09:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696931436; 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=+Wo5+gshW9WunLiusZJRPedqzjNbMOj4a9GDi39vmhc=; b=kJDo3a96oqUDntaYaB84I+GFrFIZWznQ8WvgCnetqq8ISDgi8OIs4K2dLXlCpDgdNLizDx icfsXh61mhg8Ek4/Kh95FbEK4ex8UHanAPQS1kkUalGStnhUV+mhrizTRHO9dVRV2lM2rp Y9aZ2kU5jOFB0VYLwME3p2Cvj04k/bMa4A1WlM5UIgBdPax67pImUyRdQ3le7b0Fv0sTIr MYWEsM7uY0YCBpc8YX41lRyehvZIDOe5my072WBRgdWfTszNfc8Son/aQ4iWxXEZr8PaKi 1xo9NsEfPtIcruonJ8x1vyFGXwDyUF0PRSZRRTQ30vqJUpPqRX6LCE/Na3mBWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696931436; a=rsa-sha256; cv=none; b=SNvnTHhTEANp9lD/+GN8kNeXRP2YxfHw/bOmk2s4LYBKhl6+0QR0PE2r0vJKjNqVZMVR9l snBCQh6KtzGnur9rl6bIGswn4sg5PZxgxHvNDkbGrAmHs3UGT2k0RCvMs7RRe7jyaMC+wj 4RkkGczweq54QjwkqryzgfhI+O/mVxGlEqRAYy6Gl1n8Jr9wrV9M1YNfAFVDYBKEkdEGTg 8wOooR7vdHqHFUS0RoSugbHbYB9YWfeVvO93lWZAQFAoTRTvAd7z4/jge077oCm0zq0jsn 04/fF99ZJG+qfP1oShCDilT/nzb3CBbRvAd0R1oYCVNsAb9NLBbOvcl3qa0ZcQ== 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=1696931436; 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=+Wo5+gshW9WunLiusZJRPedqzjNbMOj4a9GDi39vmhc=; b=T+Ev5Ih1sn7TWzSLfJ13oVyBxwZovuEmxv1GWwVugy3c/GD2MiaZHGNt3CRyL4NXNyRpq7 hEidzDFUZpqvtiQSu7qpwLHhK7L5mF6xnC7lQZkTTNMkKC6klS5yj7VXu3PlBW7msDqPKW fQVDL8wrMs0tDHENlZOVLmctftMoqkZqRM1AF+6creBMbYPi8XFAVvWAwj+niBzlv2Cs6R XaF3oYbyXyJ61uUa2L/QsD6pVU9bC7ovF+E0ZKNUnDwNlCgstXBvAtsemB1C7WzP/29OS7 8QBs8VdhUvY6sno1HZENdrHP8XMRi9jqomYlI9c4cWwSJPEjFHH6otlEC8U22Q== 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 4S4WNq5lK2zZ1j; Tue, 10 Oct 2023 09:50:35 +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 39A9oZeV030041; Tue, 10 Oct 2023 09:50:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39A9oZ6L030038; Tue, 10 Oct 2023 09:50:35 GMT (envelope-from git) Date: Tue, 10 Oct 2023 09:50:35 GMT Message-Id: <202310100950.39A9oZ6L030038@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: f218b851da04 - main - libpfctl: introduce state iterator 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: f218b851da0480460195c1128d0c0b41d3b6a6d4 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f218b851da0480460195c1128d0c0b41d3b6a6d4 commit f218b851da0480460195c1128d0c0b41d3b6a6d4 Author: Kristof Provost AuthorDate: 2023-10-02 13:48:18 +0000 Commit: Kristof Provost CommitDate: 2023-10-10 09:48:21 +0000 libpfctl: introduce state iterator Allow consumers to start processing states as the kernel supplies them, rather than having to build a full list and only then start processing. Especially for very large state tables this can significantly reduce memory use. Without this change when retrieving 1M states time -l reports: real 3.55 user 1.95 sys 1.05 318832 maximum resident set size 194 average shared memory size 15 average unshared data size 127 average unshared stack size 79041 page reclaims 0 page faults 0 swaps 0 block input operations 0 block output operations 15096 messages sent 250001 messages received 0 signals received 22 voluntary context switches 34 involuntary context switches With it it reported: real 3.32 user 1.88 sys 0.86 3220 maximum resident set size 195 average shared memory size 11 average unshared data size 128 average unshared stack size 260 page reclaims 0 page faults 0 swaps 0 block input operations 0 block output operations 15096 messages sent 250001 messages received 0 signals received 21 voluntary context switches 31 involuntary context switches Reviewed by: mjg Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42091 --- lib/libpfctl/libpfctl.c | 62 ++++++++++++++++++++++++++++++++++++------------- lib/libpfctl/libpfctl.h | 2 ++ sbin/pfctl/pfctl.c | 45 +++++++++++++++++++++-------------- 3 files changed, 76 insertions(+), 33 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 8699d8132240..03f80baa2178 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -1203,10 +1203,11 @@ static const struct snl_hdr_parser *all_parsers[] = { }; static int -pfctl_get_states_nl(struct snl_state *ss, struct pfctl_states *states) +pfctl_get_states_nl(struct snl_state *ss, pfctl_get_state_fn f, void *arg) { SNL_VERIFY_PARSERS(all_parsers); int family_id = snl_get_genl_family(ss, PFNL_FAMILY_NAME); + int ret; struct nlmsghdr *hdr; struct snl_writer nw; @@ -1219,42 +1220,71 @@ pfctl_get_states_nl(struct snl_state *ss, struct pfctl_states *states) snl_send_message(ss, hdr); - bzero(states, sizeof(*states)); - TAILQ_INIT(&states->states); - struct snl_errmsg_data e = {}; while ((hdr = snl_read_reply_multi(ss, seq_id, &e)) != NULL) { - struct pfctl_state *s = malloc(sizeof(*s)); - bzero(s, sizeof(*s)); - if (s == NULL) { - pfctl_free_states(states); - return (ENOMEM); - } - if (!snl_parse_nlmsg(ss, hdr, &state_parser, s)) + struct pfctl_state s; + bzero(&s, sizeof(s)); + if (!snl_parse_nlmsg(ss, hdr, &state_parser, &s)) continue; - s->key[1].af = s->key[0].af; - s->key[1].proto = s->key[0].proto; + s.key[1].af = s.key[0].af; + s.key[1].proto = s.key[0].proto; - TAILQ_INSERT_TAIL(&states->states, s, entry); + ret = f(&s, arg); + if (ret != 0) + return (ret); } return (0); } int -pfctl_get_states(int dev __unused, struct pfctl_states *states) +pfctl_get_states_iter(pfctl_get_state_fn f, void *arg) { struct snl_state ss = {}; int error; snl_init(&ss, NETLINK_GENERIC); - error = pfctl_get_states_nl(&ss, states); + error = pfctl_get_states_nl(&ss, f, arg); snl_free(&ss); return (error); } +static int +pfctl_append_states(struct pfctl_state *s, void *arg) +{ + struct pfctl_state *new; + struct pfctl_states *states = (struct pfctl_states *)arg; + + new = malloc(sizeof(*s)); + if (new == NULL) + return (ENOMEM); + + memcpy(new, s, sizeof(*s)); + + TAILQ_INSERT_TAIL(&states->states, s, entry); + + return (0); +} + +int +pfctl_get_states(int dev __unused, struct pfctl_states *states) +{ + int ret; + + bzero(states, sizeof(*states)); + TAILQ_INIT(&states->states); + + ret = pfctl_get_states_iter(pfctl_append_states, states); + if (ret != 0) { + pfctl_free_states(states); + return (ret); + } + + return (0); +} + void pfctl_free_states(struct pfctl_states *states) { diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index 2559fc9c4843..4906ec3ccfce 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -413,6 +413,8 @@ int pfctl_add_rule(int dev, const struct pfctl_rule *r, const char *anchor, const char *anchor_call, uint32_t ticket, uint32_t pool_ticket); int pfctl_set_keepcounters(int dev, bool keep); +typedef int (*pfctl_get_state_fn)(struct pfctl_state *, void *); +int pfctl_get_states_iter(pfctl_get_state_fn f, void *arg); int pfctl_get_states(int dev, struct pfctl_states *states); void pfctl_free_states(struct pfctl_states *states); int pfctl_clear_states(int dev, const struct pfctl_kill *kill, diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index bfa76b299a02..9a75eb7d00b5 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1514,30 +1514,41 @@ done: return (0); } +struct pfctl_show_state_arg { + int opts; + int dotitle; + const char *iface; +}; + +static int +pfctl_show_state(struct pfctl_state *s, void *arg) +{ + struct pfctl_show_state_arg *a = (struct pfctl_show_state_arg *)arg; + + if (a->iface != NULL && strcmp(s->ifname, a->iface)) + return (0); + + if (a->dotitle) { + pfctl_print_title("STATES:"); + a->dotitle = 0; + } + print_state(s, a->opts); + + return (0); +} + int pfctl_show_states(int dev, const char *iface, int opts) { - struct pfctl_states states; - struct pfctl_state *s; - int dotitle = (opts & PF_OPT_SHOWALL); + struct pfctl_show_state_arg arg; - memset(&states, 0, sizeof(states)); + arg.opts = opts; + arg.dotitle = opts & PF_OPT_SHOWALL; + arg.iface = iface; - if (pfctl_get_states(dev, &states)) + if (pfctl_get_states_iter(pfctl_show_state, &arg)) return (-1); - TAILQ_FOREACH(s, &states.states, entry) { - if (iface != NULL && strcmp(s->ifname, iface)) - continue; - if (dotitle) { - pfctl_print_title("STATES:"); - dotitle = 0; - } - print_state(s, opts); - } - - pfctl_free_states(&states); - return (0); } From nobody Tue Oct 10 09:50: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 4S4WNs31Gmz4wVDk; Tue, 10 Oct 2023 09:50: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 4S4WNs1SFMz3P6p; Tue, 10 Oct 2023 09:50:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696931437; 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/rMh8N/Py/DiyhE1QX3OfM/Vvafg6NX6mm1ywjuMUo=; b=ZaRelOU2OXDjx2Hze/WemUIE1XJ3vw+q6sdo/S7bheLPLoEOMa0Z62CmTqRfG6wzc62uv1 +yC/Y+ordPSupMLqUXtdHH8AvcTk4JYor1vTyQddFByo8BpAOStU8+3NLgBb/MRxb712re 9zqNysUH/ewE0SjYegdJFxouiNDlBbn5WqqXAe5IthsOVL2cF05jjE5RZfWPA8gYKBGtJ2 NVXGod5MO4XOE1yX7oubhBnNrn3YCRfPZ0aTcM5gJEqkQpw/zO/Omr+O6LQn4oRaULSHUp RA4dFmnK1fcAQ/zHPjIqhW9IVJhOtJV2P6wSoo4b44Y7+b+Zp7IoMwsdqhXPMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696931437; a=rsa-sha256; cv=none; b=obndlgT6HnY6LdUvWWufX4e7D7zxzg0ACiDSC6BAQgG96gukAxr1FVvMORmN7Z4P0/jdHS ji1URuuFY0W+/5MAph6UIMj/tHO9QsF9vT6U0pnNQI0UezhYwcjuQxBw1P3LcSpOGOXWbp utnS3CO+qjrsUj3g/9pNAMHOan4H9kSO3oQJ27gbQqgEGzjmrn2KUZsP2E5QwAO71hR+s6 bkQKM0yohV9WwjmqSxVxqujfXSztFDzIpJWTcVHT/EoysdTns6G/QqZ2r4DDUsTTVRbXgf S2HsILvhgVb60agTa310f0fO2AdcuUGA26Ap4aMpqLX2yO3ugdXDvncN6ZbFaA== 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=1696931437; 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/rMh8N/Py/DiyhE1QX3OfM/Vvafg6NX6mm1ywjuMUo=; b=m48NpU/jLacP+Sl2peh5wSNUOPKDm707Pd/3o0aJTAnr0kyxxdL1erglDMMxrFiQhsNhNH PIVWt1ycPY+/vJaymKEaFKQIzkRPp3S3gS+Jl8rMP2IzqoVitpTsJ6pzHLWrH1w4/oTva/ aA/aACeQUPfqrfbSPiR18XHbRaM/PHUcFUl+LSQEvJDCssIG0HSNMDkdMuCT3T9clU+AAc mCTTHUNy3hDTloFmBFmjVRBNNM+PQGBySXJrzw4efgSHE18xzWQRss4DmSb8KO1SaF1fHs i1ScE6z9EHtt09ajg9WDzvmc6fPYZHzIw9Lzmx4OYlCvIibqFx/xthswgK/XWQ== 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 4S4WNr6lMJzYh7; Tue, 10 Oct 2023 09:50: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 39A9oa9F030092; Tue, 10 Oct 2023 09:50:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39A9oaL0030089; Tue, 10 Oct 2023 09:50:36 GMT (envelope-from git) Date: Tue, 10 Oct 2023 09:50:36 GMT Message-Id: <202310100950.39A9oaL0030089@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: a7191e5d7b62 - main - pf: add a way to list creator ids 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: a7191e5d7b625c35434f99f51ccbf577228b2afc Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a7191e5d7b625c35434f99f51ccbf577228b2afc commit a7191e5d7b625c35434f99f51ccbf577228b2afc Author: Kristof Provost AuthorDate: 2023-10-04 10:27:54 +0000 Commit: Kristof Provost CommitDate: 2023-10-10 09:48:21 +0000 pf: add a way to list creator ids Allow userspace to retrieve a list of distinct creator ids for the current states. This is used by pfSense, and used to require dumping all states to userspace. It's rather inefficient to export a (potentially extremely large) state table to obtain a handful (typically 2) of 32-bit integers. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42092 --- lib/libpfctl/libpfctl.c | 68 ++++++++++++++++++++++++++++++++++- lib/libpfctl/libpfctl.h | 1 + sbin/pfctl/pfctl.c | 21 ++++++++++- sbin/pfctl/pfctl.h | 1 + sys/netpfil/pf/pf_nl.c | 80 ++++++++++++++++++++++++++++++++++++++++++ sys/netpfil/pf/pf_nl.h | 1 + tests/sys/netpfil/pf/pfsync.sh | 8 +++++ 7 files changed, 178 insertions(+), 2 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 03f80baa2178..ca29645f9c34 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -1106,6 +1106,71 @@ pfctl_set_keepcounters(int dev, bool keep) return (ret); } +struct pfctl_creator { + uint32_t id; +}; +#define _IN(_field) offsetof(struct genlmsghdr, _field) +#define _OUT(_field) offsetof(struct pfctl_creator, _field) +static struct snl_attr_parser ap_creators[] = { + { .type = PF_ST_CREATORID, .off = _OUT(id), .cb = snl_attr_get_uint32 }, +}; +static struct snl_field_parser fp_creators[] = { +}; +#undef _IN +#undef _OUT +SNL_DECLARE_PARSER(creator_parser, struct genlmsghdr, fp_creators, ap_creators); + +static int +pfctl_get_creators_nl(struct snl_state *ss, uint32_t *creators, size_t *len) +{ + + int family_id = snl_get_genl_family(ss, PFNL_FAMILY_NAME); + size_t i = 0; + + struct nlmsghdr *hdr; + struct snl_writer nw; + + snl_init_writer(ss, &nw); + hdr = snl_create_genl_msg_request(&nw, family_id, PFNL_CMD_GETCREATORS); + hdr->nlmsg_flags |= NLM_F_DUMP; + snl_finalize_msg(&nw); + uint32_t seq_id = hdr->nlmsg_seq; + + snl_send_message(ss, hdr); + + struct snl_errmsg_data e = {}; + while ((hdr = snl_read_reply_multi(ss, seq_id, &e)) != NULL) { + struct pfctl_creator c; + bzero(&c, sizeof(c)); + + if (!snl_parse_nlmsg(ss, hdr, &creator_parser, &c)) + continue; + + creators[i] = c.id; + i++; + if (i > *len) + return (E2BIG); + } + + *len = i; + + return (0); +} + +int +pfctl_get_creatorids(uint32_t *creators, size_t *len) +{ + struct snl_state ss = {}; + int error; + + snl_init(&ss, NETLINK_GENERIC); + error = pfctl_get_creators_nl(&ss, creators, len); + snl_free(&ss); + + return (error); + +} + static void pfctl_nv_add_state_cmp(nvlist_t *nvl, const char *name, const struct pfctl_state_cmp *cmp) @@ -1199,7 +1264,8 @@ static struct snl_field_parser fp_state[] = { SNL_DECLARE_PARSER(state_parser, struct genlmsghdr, fp_state, ap_state); static const struct snl_hdr_parser *all_parsers[] = { - &state_parser, &skey_parser, &speer_parser + &state_parser, &skey_parser, &speer_parser, + &creator_parser, }; static int diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index 4906ec3ccfce..e75f93d8775e 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -413,6 +413,7 @@ int pfctl_add_rule(int dev, const struct pfctl_rule *r, const char *anchor, const char *anchor_call, uint32_t ticket, uint32_t pool_ticket); int pfctl_set_keepcounters(int dev, bool keep); +int pfctl_get_creatorids(uint32_t *creators, size_t *len); typedef int (*pfctl_get_state_fn)(struct pfctl_state *, void *); int pfctl_get_states_iter(pfctl_get_state_fn f, void *arg); int pfctl_get_states(int dev, struct pfctl_states *states); diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 9a75eb7d00b5..759b36d9cebe 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -233,7 +233,7 @@ static const char * const clearopt_list[] = { static const char * const showopt_list[] = { "ether", "nat", "queue", "rules", "Anchors", "Sources", "states", "info", "Interfaces", "labels", "timeouts", "memory", "Tables", - "osfp", "Running", "all", NULL + "osfp", "Running", "all", "creatorids", NULL }; static const char * const tblcmdopt_list[] = { @@ -1639,6 +1639,22 @@ pfctl_show_limits(int dev, int opts) return (0); } +void +pfctl_show_creators(int opts) +{ + int ret; + uint32_t creators[16]; + size_t count = nitems(creators); + + ret = pfctl_get_creatorids(creators, &count); + if (ret != 0) + errx(ret, "Failed to retrieve creators"); + + printf("Creator IDs:\n"); + for (size_t i = 0; i < count; i++) + printf("%08x\n", creators[i]); +} + /* callbacks for rule/nat/rdr/addr */ int pfctl_add_pool(struct pfctl *pf, struct pfctl_pool *p, sa_family_t af) @@ -3121,6 +3137,9 @@ main(int argc, char *argv[]) case 'I': pfctl_show_ifaces(ifaceopt, opts); break; + case 'c': + pfctl_show_creators(opts); + break; } } diff --git a/sbin/pfctl/pfctl.h b/sbin/pfctl/pfctl.h index b9da5e96a90e..cf198d557299 100644 --- a/sbin/pfctl/pfctl.h +++ b/sbin/pfctl/pfctl.h @@ -88,6 +88,7 @@ int pfctl_command_tables(int, char *[], char *, const char *, char *, int pfctl_show_altq(int, const char *, int, int); void warn_namespace_collision(const char *); int pfctl_show_ifaces(const char *, int); +void pfctl_show_creators(int); FILE *pfctl_fopen(const char *, const char *); #ifdef __FreeBSD__ diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index cbea76e7386f..bb50b3b2b321 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -246,6 +246,30 @@ handle_getstate(struct nlpcb *nlp, struct nl_parsed_state *attrs, return (dump_state(nlp, hdr, s, npt)); } +static int +dump_creatorid(struct nlpcb *nlp, const struct nlmsghdr *hdr, uint32_t creator, + struct nl_pstate *npt) +{ + struct nl_writer *nw = npt->nw; + + if (!nlmsg_reply(nw, hdr, sizeof(struct genlmsghdr))) + goto enomem; + + struct genlmsghdr *ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); + ghdr_new->cmd = PFNL_CMD_GETCREATORS; + ghdr_new->version = 0; + ghdr_new->reserved = 0; + + nlattr_add_u32(nw, PF_ST_CREATORID, htonl(creator)); + + if (nlmsg_end(nw)) + return (0); + +enomem: + nlmsg_abort(nw); + return (ENOMEM); +} + static int pf_handle_getstates(struct nlmsghdr *hdr, struct nl_pstate *npt) { @@ -264,6 +288,56 @@ pf_handle_getstates(struct nlmsghdr *hdr, struct nl_pstate *npt) return (error); } +static int +pf_handle_getcreators(struct nlmsghdr *hdr, struct nl_pstate *npt) +{ + uint32_t creators[16]; + int error = 0; + + bzero(creators, sizeof(creators)); + + for (int i = 0; i < pf_hashmask; i++) { + struct pf_idhash *ih = &V_pf_idhash[i]; + struct pf_kstate *s; + + if (LIST_EMPTY(&ih->states)) + continue; + + PF_HASHROW_LOCK(ih); + LIST_FOREACH(s, &ih->states, entry) { + int j; + if (s->timeout == PFTM_UNLINKED) + continue; + + for (j = 0; j < nitems(creators); j++) { + if (creators[j] == s->creatorid) + break; + if (creators[j] == 0) { + creators[j] = s->creatorid; + break; + } + } + if (j == nitems(creators)) + printf("Warning: too many creators!\n"); + } + PF_HASHROW_UNLOCK(ih); + } + + hdr->nlmsg_flags |= NLM_F_MULTI; + for (int i = 0; i < nitems(creators); i++) { + if (creators[i] == 0) + break; + error = dump_creatorid(npt->nlp, hdr, creators[i], npt); + } + + if (!nlmsg_end_dump(npt->nw, error, hdr)) { + NL_LOG(LOG_DEBUG, "Unable to finalize the dump"); + return (ENOMEM); + } + + return (error); +} + static const struct nlhdr_parser *all_parsers[] = { &state_parser }; static int family_id; @@ -275,6 +349,12 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_getstates, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, }, + { + .cmd_num = PFNL_CMD_GETCREATORS, + .cmd_name = "GETCREATORS", + .cmd_cb = pf_handle_getcreators, + .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, + }, }; void diff --git a/sys/netpfil/pf/pf_nl.h b/sys/netpfil/pf/pf_nl.h index 5ef757eead21..98525641b43d 100644 --- a/sys/netpfil/pf/pf_nl.h +++ b/sys/netpfil/pf/pf_nl.h @@ -37,6 +37,7 @@ enum { PFNL_CMD_UNSPEC = 0, PFNL_CMD_GETSTATES = 1, + PFNL_CMD_GETCREATORS = 2, __PFNL_CMD_MAX, }; #define PFNL_CMD_MAX (__PFNL_CMD_MAX -1) diff --git a/tests/sys/netpfil/pf/pfsync.sh b/tests/sys/netpfil/pf/pfsync.sh index 5d30f5b44888..87dfcf748d3c 100644 --- a/tests/sys/netpfil/pf/pfsync.sh +++ b/tests/sys/netpfil/pf/pfsync.sh @@ -78,6 +78,8 @@ common_body() "set skip on ${epair_sync}b" \ "pass out keep state" + hostid_one=$(jexec one pfctl -si -v | awk '/Hostid:/ { gsub(/0x/, "", $2); printf($2); }') + ifconfig ${epair_one}b 198.51.100.254/24 up ping -c 1 -S 198.51.100.254 198.51.100.1 @@ -89,6 +91,12 @@ common_body() grep 198.51.100.254 ; then atf_fail "state not found on synced host" fi + + if ! jexec two pfctl -sc | grep ""${hostid_one}""; + then + jexec two pfctl -sc + atf_fail "HostID for host one not found on two" + fi } basic_cleanup() From nobody Tue Oct 10 09:50: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 4S4WNt596mz4wV8B; Tue, 10 Oct 2023 09:50: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 4S4WNt1j3Qz3P7V; Tue, 10 Oct 2023 09:50:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696931438; 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=ZZ7xF+bnWn/+DbFkhIJGo9mpR0ff+vBnPWT2nO56JiU=; b=L3D/m2J6xUa3djtdzIG1W53wIrKguzeZ+SGAPNyN1AaPg9y7sxhIS2Yrn7nan0eos1XjlU Ww0DMs99Yhv16Rz8nIrlt5uc8r9Bv47//EOQGFqPTXinh2oxK3wBAILCVsFm+pY+uyiMJw BruvdlbuYluJbsLR5srvmKv4CMErTIoBd0eLsjCypRlGlO4yQhLCAzzlfQTjeHEJH/GFqA MPhDY3naOQraLL1B9hJqagaeisaNj/vmDo3jN5GXn0/iWAMOcjaRdBWjP8rb3w/hBzZorQ IzMjcp6SJav77Ngx+M0x+Dng+8tk5Z5W9qAiOi8LcVJcj+h+RNu1VFWlp6sZFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696931438; a=rsa-sha256; cv=none; b=mB4dlV/Rjrjf1LOocrrFskb1vSwOpM252u71yi8+tNv0obLoNg5tG+CpY3Jk/DdqjwET3i 5GO8ltJhobGg/IqxOjolbDkzeSM9mRCsX0OcTvzBD4MKps1JEcAaEutZFf3zu5WdSqST5x iCFyNhdSeMW0eM9jdQexlxUkH/qPdvjT0AN2m/3YoDoJCJyFXjAq3sWIzsK6Upcb0Blx8/ ZAmimvLH0QC8YQPDfTfat3BjylTFuHeUtAhhZbwJ5Eq4SFGCQFb8RyYlarT6kEAnmt6WPp WV9Js9gUVNQ9zQaLqQ8DvjaDkEBqqvzTGfvVeroxnogUPM1GUG/mkhHLPJq4ug== 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=1696931438; 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=ZZ7xF+bnWn/+DbFkhIJGo9mpR0ff+vBnPWT2nO56JiU=; b=LiXCIOwXN9qZl8EJx7NCTjstOuua/ocRY1G3tbySBYw3Z7ghVIwEe0SjljK25cZmUPjOPd hYTJSQYu5zIfduhQPYtw7Yyg8a28b6vEuoQvdXTq5QKoNiqDyrKQCSfT5pPXaogcnen6VL umKCwDDnYYlUNzMHU1gFApLukvpfDj+n5/p607dikDLfsWxpqV5caUVphPRCrBkCD8zMAG BI8+Ha102k1oR81k4kn62r9AdiDhYuKNb/Yv4+yyqzkxqceD34kl6lpqNcsKjaGYQUH/Gm 7N9VxxuuCHFRV01LXtdxKUi7Q9v/Td8vMqmJVmC+Z5Ba+xjpugiVW4uGZYm40w== 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 4S4WNt0hrjzZFd; Tue, 10 Oct 2023 09:50: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 39A9oc1a030145; Tue, 10 Oct 2023 09:50:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39A9oblD030142; Tue, 10 Oct 2023 09:50:37 GMT (envelope-from git) Date: Tue, 10 Oct 2023 09:50:37 GMT Message-Id: <202310100950.39A9oblD030142@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: 84d12f887c91 - main - Add a COMPAT_FREEBSD14 kernel 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84d12f887c91fc2e2859edfeb0673fe7f953bd87 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=84d12f887c91fc2e2859edfeb0673fe7f953bd87 commit 84d12f887c91fc2e2859edfeb0673fe7f953bd87 Author: Kristof Provost AuthorDate: 2023-10-06 09:13:27 +0000 Commit: Kristof Provost CommitDate: 2023-10-10 09:48:22 +0000 Add a COMPAT_FREEBSD14 kernel option Use it wherever COMPAT_FREEBSD13 is currently specified. Reviewed by: brooks, zlei Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42100 --- sys/amd64/conf/FIRECRACKER | 1 + sys/amd64/conf/GENERIC | 1 + sys/amd64/conf/MINIMAL | 1 + sys/arm/conf/std.armv6 | 1 + sys/arm/conf/std.armv7 | 1 + sys/arm64/conf/std.arm64 | 1 + sys/conf/NOTES | 3 +++ sys/conf/options | 1 + sys/i386/conf/GENERIC | 1 + sys/i386/conf/MINIMAL | 1 + sys/kern/syscalls.master | 1 + sys/powerpc/conf/GENERIC | 1 + sys/powerpc/conf/GENERIC64 | 1 + sys/powerpc/conf/GENERIC64LE | 1 + sys/powerpc/conf/MPC85XX | 1 + sys/powerpc/conf/MPC85XXSPE | 1 + sys/riscv/conf/GENERIC | 1 + 17 files changed, 19 insertions(+) diff --git a/sys/amd64/conf/FIRECRACKER b/sys/amd64/conf/FIRECRACKER index b9cf11543245..590a3059beac 100644 --- a/sys/amd64/conf/FIRECRACKER +++ b/sys/amd64/conf/FIRECRACKER @@ -66,6 +66,7 @@ options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 options COMPAT_FREEBSD13 # Compatible with FreeBSD13 +options COMPAT_FREEBSD14 # Compatible with FreeBSD14 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 8d513fdc5f4c..1c1fde99ba8e 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -67,6 +67,7 @@ options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 options COMPAT_FREEBSD13 # Compatible with FreeBSD13 +options COMPAT_FREEBSD14 # Compatible with FreeBSD14 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index c3eca5221890..11f0d5d10c78 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -57,6 +57,7 @@ options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 options COMPAT_FREEBSD13 # Compatible with FreeBSD13 +options COMPAT_FREEBSD14 # Compatible with FreeBSD14 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support diff --git a/sys/arm/conf/std.armv6 b/sys/arm/conf/std.armv6 index f60520d7dd2a..b4b83d66809a 100644 --- a/sys/arm/conf/std.armv6 +++ b/sys/arm/conf/std.armv6 @@ -51,6 +51,7 @@ options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 options COMPAT_FREEBSD13 # Compatible with FreeBSD13 +options COMPAT_FREEBSD14 # Compatible with FreeBSD14 # DTrace support options KDTRACE_HOOKS # Kernel DTrace hooks diff --git a/sys/arm/conf/std.armv7 b/sys/arm/conf/std.armv7 index 5c1e63af1bad..80b4e898bfdc 100644 --- a/sys/arm/conf/std.armv7 +++ b/sys/arm/conf/std.armv7 @@ -51,6 +51,7 @@ options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 options COMPAT_FREEBSD13 # Compatible with FreeBSD13 +options COMPAT_FREEBSD14 # Compatible with FreeBSD14 # DTrace support options KDTRACE_HOOKS # Kernel DTrace hooks diff --git a/sys/arm64/conf/std.arm64 b/sys/arm64/conf/std.arm64 index a19e7a95ef98..eb4a0238ecdd 100644 --- a/sys/arm64/conf/std.arm64 +++ b/sys/arm64/conf/std.arm64 @@ -43,6 +43,7 @@ options COMPAT_FREEBSD32 # Compatible with FreeBSD/arm options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 options COMPAT_FREEBSD13 # Compatible with FreeBSD13 +options COMPAT_FREEBSD14 # Compatible with FreeBSD14 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 088bd7426a77..a5ed60792a1f 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -365,6 +365,9 @@ options COMPAT_FREEBSD12 # Enable FreeBSD13 compatibility syscalls options COMPAT_FREEBSD13 +# Enable FreeBSD14 compatibility syscalls +options COMPAT_FREEBSD14 + # Enable Linux Kernel Programming Interface options COMPAT_LINUXKPI diff --git a/sys/conf/options b/sys/conf/options index 840f6a9dfffc..2f5aa8ae55c1 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -99,6 +99,7 @@ COMPAT_FREEBSD10 opt_global.h COMPAT_FREEBSD11 opt_global.h COMPAT_FREEBSD12 opt_global.h COMPAT_FREEBSD13 opt_global.h +COMPAT_FREEBSD14 opt_global.h COMPAT_LINUXKPI opt_dontuse.h COMPILING_LINT opt_global.h CY_PCI_FASTINTR diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index 00932195efcd..948c44114d7d 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -62,6 +62,7 @@ options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 options COMPAT_FREEBSD13 # Compatible with FreeBSD13 +options COMPAT_FREEBSD14 # Compatible with FreeBSD14 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support diff --git a/sys/i386/conf/MINIMAL b/sys/i386/conf/MINIMAL index 3d97f84058a9..d8c43d37fbce 100644 --- a/sys/i386/conf/MINIMAL +++ b/sys/i386/conf/MINIMAL @@ -62,6 +62,7 @@ options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 options COMPAT_FREEBSD13 # Compatible with FreeBSD13 +options COMPAT_FREEBSD14 # Compatible with FreeBSD14 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index f7c235ced26c..6692495f0d2d 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -34,6 +34,7 @@ ; COMPAT11 included on COMPAT_FREEBSD11 #ifdef (FreeBSD 11 compat) ; COMPAT12 included on COMPAT_FREEBSD12 #ifdef (FreeBSD 12 compat) ; COMPAT13 included on COMPAT_FREEBSD13 #ifdef (FreeBSD 13 compat) +; COMPAT14 included on COMPAT_FREEBSD14 #ifdef (FreeBSD 14 compat) ; OBSOL obsolete, not included in system, only specifies name ; RESERVED reserved for local or vendor use (not for FreeBSD) ; UNIMPL not implemented, placeholder only diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC index b01a88d34138..47c84956facd 100644 --- a/sys/powerpc/conf/GENERIC +++ b/sys/powerpc/conf/GENERIC @@ -67,6 +67,7 @@ options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 options COMPAT_FREEBSD13 # Compatible with FreeBSD13 +options COMPAT_FREEBSD14 # Compatible with FreeBSD14 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) syscall trace support options STACK # stack(9) support diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64 index 45897555791a..ac041c420ee0 100644 --- a/sys/powerpc/conf/GENERIC64 +++ b/sys/powerpc/conf/GENERIC64 @@ -76,6 +76,7 @@ options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 options COMPAT_FREEBSD13 # Compatible with FreeBSD13 +options COMPAT_FREEBSD14 # Compatible with FreeBSD14 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) syscall trace support options STACK # stack(9) support diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE index 2cd53b860126..d90018802d37 100644 --- a/sys/powerpc/conf/GENERIC64LE +++ b/sys/powerpc/conf/GENERIC64LE @@ -71,6 +71,7 @@ options GEOM_LABEL # Provides labelization options COMPAT_FREEBSD11 # Compatible with FreeBSD11 (required by ports) options COMPAT_FREEBSD12 # Compatible with FreeBSD12 (required by ports) options COMPAT_FREEBSD13 # Compatible with FreeBSD13 +options COMPAT_FREEBSD14 # Compatible with FreeBSD14 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) syscall trace support diff --git a/sys/powerpc/conf/MPC85XX b/sys/powerpc/conf/MPC85XX index e44a35377355..c31f892a4208 100644 --- a/sys/powerpc/conf/MPC85XX +++ b/sys/powerpc/conf/MPC85XX @@ -63,6 +63,7 @@ options COMPAT_FREEBSD10 options COMPAT_FREEBSD11 options COMPAT_FREEBSD12 options COMPAT_FREEBSD13 +options COMPAT_FREEBSD14 # Compatible with FreeBSD14 options HWPMC_HOOKS options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data diff --git a/sys/powerpc/conf/MPC85XXSPE b/sys/powerpc/conf/MPC85XXSPE index 3665da656ed1..8ebc4a41bcb2 100644 --- a/sys/powerpc/conf/MPC85XXSPE +++ b/sys/powerpc/conf/MPC85XXSPE @@ -69,6 +69,7 @@ options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 options COMPAT_FREEBSD13 # Compatible with FreeBSD13 +options COMPAT_FREEBSD14 # Compatible with FreeBSD14 options HWPMC_HOOKS options KDTRACE_HOOKS # Kernel DTrace hooks diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 60b96c52f661..fd871315b27e 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -54,6 +54,7 @@ options GEOM_RAID # Soft RAID functionality. options GEOM_LABEL # Provides labelization options COMPAT_FREEBSD12 # Compatible with FreeBSD12 options COMPAT_FREEBSD13 # Compatible with FreeBSD13 +options COMPAT_FREEBSD14 # Compatible with FreeBSD14 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support From nobody Tue Oct 10 09:50: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 4S4WNv4WSRz4wV8G; Tue, 10 Oct 2023 09:50: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 4S4WNv32dLz3Nky; Tue, 10 Oct 2023 09:50:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696931439; 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=YijiyJ6XXyp0THi8Ez0HhowYTdqqHUCzjSIe60Jetjw=; b=EPi/M5vZpKeIg/IGYNeEstThBEaDziHcjdych0J3lpz39Lsi5QOcR3EwxLjXI43qFZjfAD 8qrgBvRarF/4nE2/S/FHGiV7uAI0XhSxA6Qu2ZGBHalAAhsltfVtSyHDWjHbGFImkovOeK Ek+RaisOVxydEvxxalpdCDG4PNEI3HEfvSYks7WloRwlLA1agwiEtM2TocIzNJ2FmkjTr3 TlWLCHlJqhR4pDtoErb4sxUvplI4LpDr8+Tpu9WfZ9f7OdkaBO8tFZADLsbtFTFPFGNs+J q8zRxpIRhdb/IEWJSpJiMbVc3O6RuvuwROwsJqHDTHy3b/rixiU25OO2wHKdSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696931439; a=rsa-sha256; cv=none; b=yKv6e6I38AjezUbz6XTCb9pTx8j3Ve8EYIPnAGBoWoDQTNwx4TvzYwIS+0Mr15gxm8bWWv hqllfupBHvMURZYLxCKbci3KQRirWRicPuMchZz/lSxSfDsolLD7VaynekADCAHIAaHhqk XBUxkdbJCSCun0Cd+qUUVuCvta/2G7FTJMn2X9Z6n4g/q3CLZAzTjM9GegugRH1dz5P1TF HDOpBFk86NEg1/vQX8QsI4mPiBbVjiQRh6UM+FwIhzXA+Gbth30yUAEpXXpIV/fm7lSZkj Pv8jUsLjUVRUOmVmBoDJDvFs+V0loTCoDJDnNgm+bQgPaz4UzTLbKDO4Egm6WA== 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=1696931439; 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=YijiyJ6XXyp0THi8Ez0HhowYTdqqHUCzjSIe60Jetjw=; b=IEYQmva+Swv8n2yrzYY1ODihRJvnZWMcLain/MuBiD7xcHPe67pcECrbFbx9GJKqJu8T/8 /Gg3SWvLPxZxOLr3SuXpaCj/iadu0P/qlg1R7KXXEGpJtk9fvibOtREfd2w+JtXJxB3owb p9VxoS/EM6lzBMfevQpK1OXvAQFxcOvQOHXfo0kzS/8S/HDzrfoUDBMdHSkNWUujW7Ps4y QBJz3HYsc7bS4/za8DYxrW5HlGscnqIw8x6kPGXqV5QtYTnU8ehImtJNagy0rWUWTmfbro FMTi82pxm6Pcfb2ttI9UZx7aCNLBny/Ch7JB2heGPsGfIvUH2xgdVAXT+zrl8Q== 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 4S4WNv1RDCzZ3r; Tue, 10 Oct 2023 09:50: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 39A9odW2030195; Tue, 10 Oct 2023 09:50:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39A9odxB030192; Tue, 10 Oct 2023 09:50:39 GMT (envelope-from git) Date: Tue, 10 Oct 2023 09:50:39 GMT Message-Id: <202310100950.39A9odxB030192@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: ebfd3b229af1 - main - pf: move DIOCGETSTATES(V2) to COMPAT_FREEBSD14 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: ebfd3b229af1cf0036ebaedbb09d9721ec037c0f Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ebfd3b229af1cf0036ebaedbb09d9721ec037c0f commit ebfd3b229af1cf0036ebaedbb09d9721ec037c0f Author: Kristof Provost AuthorDate: 2023-10-06 09:16:11 +0000 Commit: Kristof Provost CommitDate: 2023-10-10 09:48:22 +0000 pf: move DIOCGETSTATES(V2) to COMPAT_FREEBSD14 We now have an improved version (via netlink). The old-style ioctl will be removed in FreeBSD 16. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42101 --- sys/net/pfvar.h | 4 ++++ sys/netpfil/pf/pf_ioctl.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index a5eeb60a0d7c..f5ea9bf71f0c 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1951,7 +1951,9 @@ struct pfioc_iface { #define DIOCCLRSTATUS _IO ('D', 22) #define DIOCNATLOOK _IOWR('D', 23, struct pfioc_natlook) #define DIOCSETDEBUG _IOWR('D', 24, u_int32_t) +#ifdef COMPAT_FREEBSD14 #define DIOCGETSTATES _IOWR('D', 25, struct pfioc_states) +#endif #define DIOCCHANGERULE _IOWR('D', 26, struct pfioc_rule) /* XXX cut 26 - 28 */ #define DIOCSETTIMEOUT _IOWR('D', 29, struct pfioc_tm) @@ -2012,7 +2014,9 @@ struct pfioc_iface { #define DIOCKILLSRCNODES _IOWR('D', 91, struct pfioc_src_node_kill) #define DIOCGIFSPEEDV0 _IOWR('D', 92, struct pf_ifspeed_v0) #define DIOCGIFSPEEDV1 _IOWR('D', 92, struct pf_ifspeed_v1) +#ifdef COMPAT_FREEBSD14 #define DIOCGETSTATESV2 _IOWR('D', 93, struct pfioc_states_v2) +#endif #define DIOCGETSYNCOOKIES _IOWR('D', 94, struct pfioc_nv) #define DIOCSETSYNCOOKIES _IOWR('D', 95, struct pfioc_nv) #define DIOCKEEPCOUNTERS _IOWR('D', 96, struct pfioc_nv) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 42c2aa9bfb01..5a441c9723e3 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2365,8 +2365,10 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td case DIOCCLRSTATUS: case DIOCNATLOOK: case DIOCSETDEBUG: +#ifdef COMPAT_FREEBSD14 case DIOCGETSTATES: case DIOCGETSTATESV2: +#endif case DIOCGETTIMEOUT: case DIOCCLRRULECTRS: case DIOCGETLIMIT: @@ -2423,8 +2425,10 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td case DIOCGETSTATE: case DIOCGETSTATENV: case DIOCGETSTATUSNV: +#ifdef COMPAT_FREEBSD14 case DIOCGETSTATES: case DIOCGETSTATESV2: +#endif case DIOCGETTIMEOUT: case DIOCGETLIMIT: case DIOCGETALTQSV0: @@ -3546,6 +3550,7 @@ DIOCCHANGERULE_error: break; } +#ifdef COMPAT_FREEBSD14 case DIOCGETSTATES: { struct pfioc_states *ps = (struct pfioc_states *)addr; struct pf_kstate *s; @@ -3697,7 +3702,7 @@ DIOCGETSTATESV2_full: break; } - +#endif case DIOCGETSTATUSNV: { error = pf_getstatus((struct pfioc_nv *)addr); break; From nobody Tue Oct 10 09:53: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 4S4WRt1lHcz4wVNX; Tue, 10 Oct 2023 09:53: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 4S4WRt10z7z3R4q; Tue, 10 Oct 2023 09:53:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696931594; 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=8mOxdWKVFmKB3XVOGJqgH1GiUrsVWwTJP+4iUkjdCEE=; b=hXANCXn4ZnOCCWQU3nNdPS9ftev55htIoLUPcoRJhltI+bOAxDtWfQVBtNUTTHcVt5lREd 7KhPs9h4wiV9bP1NNGHGDD11MBcbZsY1TQsU6CwoIJoGB8+pzMCHxHq2gOQEu4mnfx4mJM aOrRzThnn1Dy9H3YEkZdT1bEo7M4rZE3wCo6JKTpNGlIbl85MT0D4Hlu7Nrq5JXxzpsfp4 Y9EMjwkESXmZWQQzD1g4SIVoyM25+GbaeS96d6rEMElG4Ea2ouO43qJrswSOlaG6zJ+P+D 8Dq9t41gpKO/izfgjLPfWuErFaeQOYNLUiqPy+W/esC5gVd5g997FHk12X303g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696931594; a=rsa-sha256; cv=none; b=YxcNnLVq1MmNVVT76ohLiVhemyVOxyQzUDqkAi40HudQYNW4kSFoENWd+B0rDagd2Kh2OR IdK6K62Wl2NJlddzZmUdoeiKRIK0Q+0iwGkP9euP7UiJzVnW3i8JMtWlRd+3JLiTzmbZFO GlrqMlrRDS2a/RGvROKnGTQhZqkwxdnrKz2semdvxh4saVcQcVzamOVblRHwMrlbZkb3UQ Jt78qC8i+kuacd9xTm10UtBUFrYqhZdkPXDv8kw/fcyxAteQ37lDpB1pxjue183Kmh7Or3 lJj8slLHHQvMa3n8iqKhRcF5Nh/JpMuaBjgh4Hu9lbijDTIm8YvAsk98/HAOBA== 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=1696931594; 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=8mOxdWKVFmKB3XVOGJqgH1GiUrsVWwTJP+4iUkjdCEE=; b=UTA+cHJ6dkbTK6kFtXfw/lK/A4BH8qGCQVppoctelGfuq8Y0imiee9bZ8PDAmTnvZka3L0 cIMj3LWiO2ujSDe06ZkdaNDmqbwXQtniRIYHrhTWw5oPoK5OQOkIegVvHuk+b3mG8ALn2V tC0wSjOYFwqGgw7MWrmOAtnCuyHul3utfmQJgunBAtscLhoPTccBRplZd0VJkoiZrFBqnd hHwmqR65Q9diJNJAH5V+qImmzGGxobeyHfszQo57qg8+ERodHB5SZMVy3OlP1rGUOKm8Vi RxIt400tu08I4OLvmKKVejqQmliQD44IA/2e5b1bp1NLQrIBIXrdZSFq3L7lMA== 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 4S4WRt04dLzZWH; Tue, 10 Oct 2023 09:53: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 39A9rDXj036796; Tue, 10 Oct 2023 09:53:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39A9rDJY036793; Tue, 10 Oct 2023 09:53:13 GMT (envelope-from git) Date: Tue, 10 Oct 2023 09:53:13 GMT Message-Id: <202310100953.39A9rDJY036793@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: e340882d3e49 - main - arm64: Add BTI landing pads to assembly 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e340882d3e49a98aa39b13041a2bf714c30dccdf Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=e340882d3e49a98aa39b13041a2bf714c30dccdf commit e340882d3e49a98aa39b13041a2bf714c30dccdf Author: Andrew Turner AuthorDate: 2023-10-03 08:52:02 +0000 Commit: Andrew Turner CommitDate: 2023-10-10 09:52:16 +0000 arm64: Add BTI landing pads to assembly functions When we enable BTI iboth the first instruction in a function that could be called indirectly, and a branch within a function need a valid landing pad instruction. There are three options for these instructions: 1. A breakpoint instruction 2. A pointer authentication PACIASP/PACIBSP 3. A BTI instruction Option 1 will raise a breakpoint exception so isn't useable in either cases. Option 2 could be used in some function entry cases, but needs to be paired with an authentication instruction, and is normally only used in non-leaf functions we can't use it in this case. This leaves option 3. There are four variants of the instruction, the C variant is used on function entry and the J variant is for jumping within a function. There is also a JC that works with both and one with no target that works with neither. Reviewed by: markj Sponsored by: Arm Ltd Sponsored by: The FreeBSD Foundation (earlier version) Differential Revision: https://reviews.freebsd.org/D42078 --- sys/arm64/arm64/locore.S | 4 ++++ sys/arm64/include/asm.h | 30 +++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index bc2a84c404ab..f741bccf598a 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -107,6 +107,8 @@ ENTRY(_start) br x15 virtdone: + BTI_J + /* Set up the stack */ adrp x25, initstack_end add x25, x25, :lo12:initstack_end @@ -223,6 +225,8 @@ ENTRY(mpentry) br x15 mp_virtdone: + BTI_J + /* Start using the AP boot stack */ ldr x4, =bootstack ldr x4, [x4] diff --git a/sys/arm64/include/asm.h b/sys/arm64/include/asm.h index 5c1f874366fd..6ebfca6eaf0c 100644 --- a/sys/arm64/include/asm.h +++ b/sys/arm64/include/asm.h @@ -48,7 +48,7 @@ #define LENTRY(sym) \ .text; .align 2; .type sym,#function; sym: \ - .cfi_startproc; DTRACE_NOP + .cfi_startproc; BTI_C; DTRACE_NOP #define ENTRY(sym) \ .globl sym; LENTRY(sym) #define EENTRY(sym) \ @@ -114,6 +114,34 @@ dsb sy; \ isb +/* + * When a CPU that implements FEAT_BTI uses a BR/BLR instruction (or the + * pointer authentication variants, e.g. BLRAA) and the target location + * has the GP attribute in its page table, then the target of the BR/BLR + * needs to be a valid BTI landing pad. + * + * BTI_C should be used at the start of a function and is used in the + * ENTRY macro. It can be replaced by PACIASP or PACIBSP, however these + * also need an appropriate authenticate instruction before returning. + * + * BTI_J should be used as the target instruction when branching with a + * BR instruction within a function. + * + * When using a BR to branch to a new function, e.g. a tail call, then + * the target register should be x16 or x17 so it is compatible with + * the BRI_C instruction. + * + * As these instructions are in the hint space they are a NOP when + * the CPU doesn't implement FEAT_BTI so are safe to use. + */ +#ifdef __ARM_FEATURE_BTI_DEFAULT +#define BTI_C hint #34 +#define BTI_J hint #36 +#else +#define BTI_C +#define BTI_J +#endif + #endif /* _MACHINE_ASM_H_ */ #endif /* !__arm__ */ From nobody Tue Oct 10 09:53: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 4S4WRv2n7qz4wVMd; Tue, 10 Oct 2023 09:53: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 4S4WRv1wYJz3R5G; Tue, 10 Oct 2023 09:53:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696931595; 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=BOd2oUA+919l7AiVpCjSi3Nx33eSr+WFSSNIsobvsrY=; b=g6UNR+V0WTjhvoM5s9O6LzNrCCwrjxsEV69uEHBRZuAgfT+gc3CR4H099Dv18mgwhPlv3a Nw5IHZ4ZL0aoeXPNNqAA7C1T22b+lEMR/Uu2SoaACw9jmN1dLn1JE2ECR4u/h/O0IDlwGt dfrbrs+eREeNI41g3HDISNay+0lcvE3kS0oqs9FQ25sGy5Ye1O3c+Kze9NuBkXybV4BcC4 1T9dcFaTh4/mGepR6BWaxFvVdWCczFJQMqb+943jLuBp4CEzyDpB90Hg5axVv7zMjM8PMp oi9DCHucPVnFZ1QzDzxz7D5DCMtpRqCBTFCk35nq4Evyuz8y7z82QUh43l84HA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696931595; a=rsa-sha256; cv=none; b=pY6CTGHI9epoGfb7o8uuQZf8oAkOn7Te7rAPU68+5Edhy7yCb5XCh570e5n+dIsTxWG7Mq kRBG3NFPuODs5ahS7svSen9ylwyP3SBQ0AdKyBLE8z+Vmry/jeM3wSoJU5j16jQ4GZHsZ9 ZyFRpLAnSksrNISHfB2gXnuaRCKnm6L2Gt/d4WsLni04VuahTv14l31S1hUbeAyvugYPFA ebhspzyCRE7zylVBujy0GKwys/sBW07PiacAhhFNU3p/MXjVSeGyOEEOHGgemo9XEzTmLE ncnEjjFNlCIfyWmlpSt7ZCfaFgLJGbFVqcrZeANNTXgxx+G0ifrzUS9eEl5A3Q== 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=1696931595; 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=BOd2oUA+919l7AiVpCjSi3Nx33eSr+WFSSNIsobvsrY=; b=ZC83G02JSi7zAwwI4pjxt/SMmV5oVFRoUjXl6Za4uJtGU4U5VPqITM6ZFyS8og6joyxR0h OZ/Hd7/RBYE0r+zSmwJzh2x6bSmBPBrBzoZAMnHc54z/XfWLn6RbtmBl0JCdEE+eWPW4Vs mlOPwvH5KtPWhrdYXu3fJTOv3wkmPPHBY/V9vkXug/tWMiLUpHdhI0Q42RD9oJxPGpzKIl 2hK8oQ6W5cdi8mQUPvRGY2zUqpU+yCPpgJ9blI5oHZIffuy4Dxn2Zx2GTLTgEHfEzWa+XP ttf7vUpNtur1Uu+r9AW7OOWPEaof/4Q+1yGO/lqWf8w1IgvzbBjSzbNtgRg/CA== 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 4S4WRv0yqxzZSG; Tue, 10 Oct 2023 09:53: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 39A9rFZH036838; Tue, 10 Oct 2023 09:53:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39A9rFWk036835; Tue, 10 Oct 2023 09:53:15 GMT (envelope-from git) Date: Tue, 10 Oct 2023 09:53:15 GMT Message-Id: <202310100953.39A9rFWk036835@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: d09a64e15d8f - main - arm64: Enable kernel branch protection 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: d09a64e15d8fad6588b9aad62979f20afa8441df Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=d09a64e15d8fad6588b9aad62979f20afa8441df commit d09a64e15d8fad6588b9aad62979f20afa8441df Author: Andrew Turner AuthorDate: 2023-10-02 15:55:31 +0000 Commit: Andrew Turner CommitDate: 2023-10-10 09:52:16 +0000 arm64: Enable kernel branch protection Add the build flags to enable branch protection on arm64. This enable the use of PAC and BTI in the kernel. For PAC we already install the kernel keys when entering the kernel from userspace so this will start using these to sign the stack. For BTI we need to mark the kernel page tables with a new guarded page field. As this will require all code that could be reached through a function pointer with an appropriate branch target instruction we are enabling this before setting the field. As the pointer authentication support shouldn't be reached via a function pointer it is safe to not enable the use of BTI there. Reviewed by: markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42079 --- sys/conf/kern.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index b508bc81b5f0..72b7387d3959 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -140,6 +140,8 @@ INLINE_LIMIT?= 8000 CFLAGS += -mgeneral-regs-only # Reserve x18 for pcpu data CFLAGS += -ffixed-x18 +# Build with BTI+PAC +CFLAGS += -mbranch-protection=standard INLINE_LIMIT?= 8000 .endif From nobody Tue Oct 10 11: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 4S4YLL5wfyz4wbr9; Tue, 10 Oct 2023 11:18:34 +0000 (UTC) (envelope-from garga@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 4S4YLL5Pvlz3YJV; Tue, 10 Oct 2023 11:18:34 +0000 (UTC) (envelope-from garga@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696936714; 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: in-reply-to:in-reply-to:references:references; bh=nXmKsfBuGreEeg9E2IQ/cUhUUefbBfUXOu65grK5H8k=; b=ZeqcNx/U8QYxc2bODC8eKEooHNYYelUzw9MWYHrzbMxF9OoKeVF/y93MUxRfBrgBo6w3/i x/4lWvNP2NTcDj1PzMXN6DKKiG83TxQBkuxD33LHcqsrcrs3cmy3T/r93bdmN097IbwlMq /UjMp113r37+jxlk+q4MLWEaJssZwS/ur6GZh1VMKWXmgckfUX7A7+xs1Qc0FOBDwlfQF7 ecARX62fdJrCT5aaOo+gLK2aAdyqCaRRJqsiBNTyzJSCasWIVpN6AsVxqsVvXPpy0GCeos RxaE1L5SsqAvOVN0tPCi0BwO8JoQv1Bf/mtmkzPUdhuaBNCSYB6YiPLp8TWMUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696936714; a=rsa-sha256; cv=none; b=vhumlWFSCASQeLRi1Gwie4cd2d6wAjpPkfX1ZifYGD+zrbTWdhthndPCynZy/K3sajPHlM SNSKlGrdvUrQSUNzIp0gDAnaAYkZ928GlG8VbplixhJHGVCyYtJU1jExtZm2CAhcPSApls RaINqXcleYY3/nAChoMm9Boya6Z6GkbweJFraYyeyMnHCB3V8/jeLHnG6okWmL0xZdSIrf WwkgEgYTaj4gk8kSwYcg8J0EKgSqznbVO7YJjT/2+FadatcN+WETuDUjKMFiZToTdkx+GZ kTHoBf/ewcQLmPDspubR8kFnOk/97Oufs0RSjxV5/CwLCwkAv4gBC8ve18YiBA== 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=1696936714; 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: in-reply-to:in-reply-to:references:references; bh=nXmKsfBuGreEeg9E2IQ/cUhUUefbBfUXOu65grK5H8k=; b=bxo5/54k+vFt6r40o9EX5r2YT8Lv7qt2Z5LWhd4SGlyFstZ/ZxkhFdSzc7JX5/JBFZwbWn nGcHDmUHSKP7Bcs0+ccNGulAGxifCj+7aIP+H8MBxzz2CZSDh8baVq+dusEiTowoDgR/Jt qC095UIhpy+H2J0/zAzgLZHi1afD7ukuZPY7fsW20Q0668yrnx7ufTs8/BfzHIHxCTvO5L tvOmF8DGjiOkYxs7Ww51H8w1ZQ7nUfCHPdW7HgVyJZ3CW1dIE0mrIACt3d27T2Nm+cLWDO MW7JRvMSdHRiIf/X3sDapJp2PVch7D8Mrjs2cj+22/wOdPpHwAw92Fno/P1stA== Received: from [172.21.4.170] (dynamic-177-53-82-16.telecominternet.net.br [177.53.82.16]) (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: garga) by smtp.freebsd.org (Postfix) with ESMTPSA id 4S4YLL00cqz17JQ; Tue, 10 Oct 2023 11:18:33 +0000 (UTC) (envelope-from garga@FreeBSD.org) Message-ID: <1c36cfee-8387-4c0a-bf61-d07f10a6b964@FreeBSD.org> Date: Tue, 10 Oct 2023 08:18:30 -0300 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 Thunderbird Subject: Re: git: bb63e82e8c10 - main - bsddialog(1): document the replacement of dialog(1) Content-Language: en-US To: Baptiste Daroussin , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202310100725.39A7PDHJ088191__49071.7090478697$1696922730$gmane$org@gitrepo.freebsd.org> From: Renato Botelho In-Reply-To: <202310100725.39A7PDHJ088191__49071.7090478697$1696922730$gmane$org@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10/10/23 04:25, Baptiste Daroussin wrote: > The branch main has been updated by bapt: > > URL: https://cgit.FreeBSD.org/src/commit/?id=bb63e82e8c109156b31e806fac8ecefbd259a0ed > > commit bb63e82e8c109156b31e806fac8ecefbd259a0ed > Author: Baptiste Daroussin > AuthorDate: 2023-10-10 07:24:25 +0000 > Commit: Baptiste Daroussin > CommitDate: 2023-10-10 07:24:25 +0000 > > bsddialog(1): document the replacement of dialog(1) > --- > RELNOTES | 3 +++ > UPDATING | 10 ++++++++++ > 2 files changed, 13 insertions(+) > > diff --git a/RELNOTES b/RELNOTES > index c5686a4f30fb..880cec5d3fe1 100644 > --- a/RELNOTES > +++ b/RELNOTES > @@ -10,6 +10,9 @@ newline. Entries should be separated by a newline. > > Changes to this file should not be MFCed. > > +ff01d71e48d4: > + dialog(1) has been replace by bsddialog(1) small typo: s/replace/replaced/ > + > 41582f28ddf7: > FreeBSD 15.0 will not include support for 32-bit platforms. > However, 64-bit systems will still be able to run older 32-bit > diff --git a/UPDATING b/UPDATING > index a1bcecadd357..0064e53c7a53 100644 > --- a/UPDATING > +++ b/UPDATING > @@ -27,6 +27,16 @@ 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".) > > +20231010: > + dialog(1) has been replaced in base by bsddialog(1), while most of the > + time replacing a dialog(1) call by a bsddialog(1) call works out of the > + box, bsddialog(1) is not considered as a drop-in replacement dialog(1). > + > + If you do depend on dialog(1) functionnality, please install cdialog > + from ports: > + > + pkg install cdialog > + > 20230927: > The EARLY_AP_STARTUP kernel option is mandatory on x86. The option > has been added to DEFAULTS, so it should automatically be included in > > -- Renato Botelho From nobody Tue Oct 10 11:59: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 4S4ZFf4XVQz4wfQZ; Tue, 10 Oct 2023 11:59:34 +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 4S4ZFf3crRz3dsM; Tue, 10 Oct 2023 11:59:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696939174; 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=wMPbrV3I17US8IPf9nf4WblXD95ycLMIIQ/srgpr4pE=; b=gKHqPpkZ2EK1p5So63Ea/26J+lI5dtbngHVQpR/SxGgL2Cpvbkfo41IvT/nAQGp0df9TGr 1jJubnjSxCelA+hm/J/stKFDamS2WUoG76D5e1k1NJ7C9CLMDBY16XM/Hh7H/wall0CQYJ SqQ6emeyUIPOSjCNQLRv6On8ckENDF4rQk8qvZ4rWrNZYPuzGlglDceYwNQSh7CieQjF6s utEj85/E3NxVmO+WYa9llQFp/z1ndXKYK/2v8ruzIGc7X3EvLaEcirO73rjO0l48vcvNn6 CZ+0GQC5ARCTgmzUqiveDZ1mrsO4ijd8FTCFiVn+UCqux3ta6OdlGLzeLylLog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696939174; a=rsa-sha256; cv=none; b=lSvmMXUBXXaJBGFdjFvXJrx94VnRiDWQLdIamIOnFIZHOdcHAdstK+9tOeuo6dLmuIh0OE ZsZPkQpZZsbmDEQMVnjkUmzsm2SGGEkORrj4Nt9d+Vc1ZtmmjQPgQ3MSrKC4CyTfBV1gub fchYDKwlSYfNC8btYF3Eo5+17zadLBGLEMREBrL81xnAvdmEkKuJb215zuQNtRZhVCp+TJ ewwf8M/cMaKY3dSQPGzeo5WWKC7eG03aiMvgeDxBGmXGsT3dfih3zp0WB7NEnnLFvP/6Xk /4ZV0hdHm01oc+pdpJ4VLyj6IrTAy5E/h/HcAqtHS4b+Zuy8vCafzGhxLOPGOw== 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=1696939174; 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=wMPbrV3I17US8IPf9nf4WblXD95ycLMIIQ/srgpr4pE=; b=H0d8K3azDYE7TF56HbR4TGqwDqE6w4pHYGi2wvLFFLr3NBzJnihnjOKSbvfMa3BORdXYHy KGtpADQkLVbfJjXxLE5FoOWjUKpSmvETPVdYwRZdgWjB2kUk3ZX95MUVf/nB12PtWjXkJ/ NFR/ItxLhllRDjEO/DbwSdOydYXy89fRyEWDO21JIU5eCKRKr90BLEIZnscjaRqG6k+F1G VJQQedV8bmcJgFldIMROOe2LHotC2y0nTgozgePnhVMGS+QoC36tB3kva7g9J5GXgWbUds YFR9n0dinOI4MuCzmMlNQXRWhB6s9pJ1xqCr3QtGomLrGDdXx7a16rLADCHEig== 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 4S4ZFf2gWzzdCy; Tue, 10 Oct 2023 11:59:34 +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 39ABxYdU038090; Tue, 10 Oct 2023 11:59:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ABxYPA038087; Tue, 10 Oct 2023 11:59:34 GMT (envelope-from git) Date: Tue, 10 Oct 2023 11:59:34 GMT Message-Id: <202310101159.39ABxYPA038087@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: b627b3e6ea0d - main - RELNOTES: fix typo 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: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b627b3e6ea0d806b2c54dd1654cab310825ae147 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=b627b3e6ea0d806b2c54dd1654cab310825ae147 commit b627b3e6ea0d806b2c54dd1654cab310825ae147 Author: Baptiste Daroussin AuthorDate: 2023-10-10 11:39:36 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-10 11:59:32 +0000 RELNOTES: fix typo Reported by: garga --- RELNOTES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELNOTES b/RELNOTES index 880cec5d3fe1..77d423a5c50c 100644 --- a/RELNOTES +++ b/RELNOTES @@ -11,7 +11,7 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. ff01d71e48d4: - dialog(1) has been replace by bsddialog(1) + dialog(1) has been replaced by bsddialog(1) 41582f28ddf7: FreeBSD 15.0 will not include support for 32-bit platforms. From nobody Tue Oct 10 12:52: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 4S4bQp2ShHz4wjv8; Tue, 10 Oct 2023 12:52:34 +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 4S4bQp20jFz4F4L; Tue, 10 Oct 2023 12:52:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696942354; 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=0lnc5daSe1oZ2tvTwXIQcvI4qyylavmUkvlcIFvB9Vk=; b=L150zdvz8HOk7Y2KV7e1uccSNlt1SwPw9QQiVU3GtYWE9gsdnbrp4YzGQFMIZNv7SXztcM jTSWD7yfKJ4JkbNrNJGWzYRahOYb/gxMpgkkbIUAmWJppHzT7PLF27riHjTG2LlDJi+DOg +DHnMzDTTOTJS6vMA9vlicJnCGKQju7hoWeNCcscaEK2lM4jhGylXdOR9VOXs1B/NlKepw d/jugtPOvRHtZZTkDH9WIVehLBlgHIYG5LFx5Rxru8DOpxmIfgYY3nEatPl4cXf5o6w1Ui PQPXvqPewJwiZRknqS+DFaBvh424Chw9X1JXK7Mnkri/SAJI+JPgfP/YNIlHhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696942354; a=rsa-sha256; cv=none; b=H0budCoJFlXxruotIkdpVtCol0EiAK1juG5Og9cB61V7FP1tkBASRT77N0gHrZjND4GiTE k0pzUi3C+14zRLjIc7K6nAO9kXxqxVD8wm8Vl0kc10KlJpPmQjWEdJzYwbgcVwrJGBvzT4 CI7Xz6tsaOMJY+Q2t+VQsferNHVTiZ5A2VW8e7kEnqze68DAr2OfNqNGnbmALRPsZh2kTH ZpFkkAxQ2z8MQrqYcoG8cEoSQEJlWJs9p3y6CP0C4eOrGQBryK/jXRiuy8FEP5hhM5X8KA O3ZAJrUF2/Q22qG3QEar0QyUIG7ffUtYMErDngrjKr6oeo5jC4JP+gjmoAenMg== 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=1696942354; 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=0lnc5daSe1oZ2tvTwXIQcvI4qyylavmUkvlcIFvB9Vk=; b=yuTSHIjqOXTU6AvS4a8oSUqTb7fQtmBTKzWovq+tliBM0m91zS2cOKGKuUabBDX1wtrRp/ wgfHGm9LzkVvU6BvD439jWOyaVrB2EcKRF3i6TyhTW+MIQGR0XvoXhCwAU/V9VrBjkoDO/ pLecQRZAS7zsUIJr2hEK0LIcOOGSLa0h9+iQjgefUqnskUNpbRCaf9PIEz6U0R5daA1Tvh Hc9AkoFkZdq8rqCWuAPzBwHF9AhOGJaqjIFeTgWSSraeVljykxC+1pnLb+NDdKGtPY55AS SUs4/+AIzS8zZtq/1tQlIKvLo2mXfjeBdstQXrtYhrF9NFjva8ugnUHLIC6zrQ== 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 4S4bQp148Mzfgw; Tue, 10 Oct 2023 12:52:34 +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 39ACqYK8037417; Tue, 10 Oct 2023 12:52:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ACqYIx037414; Tue, 10 Oct 2023 12:52:34 GMT (envelope-from git) Date: Tue, 10 Oct 2023 12:52:34 GMT Message-Id: <202310101252.39ACqYIx037414@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: 8733bc277a38 - main - vfs: don't provoke recycling non-free vnodes without a good reason 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: 8733bc277a383cf59f38a83956f4f523869cfc90 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=8733bc277a383cf59f38a83956f4f523869cfc90 commit 8733bc277a383cf59f38a83956f4f523869cfc90 Author: Mateusz Guzik AuthorDate: 2023-09-14 16:13:01 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-10 12:49:04 +0000 vfs: don't provoke recycling non-free vnodes without a good reason If the total number of free vnodes is at or above target, there is no point creating more of them. Tested by: pho (in a bigger patch) --- sys/kern/vfs_subr.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 0251525a50c7..e37f8697efa2 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1802,11 +1802,19 @@ vn_alloc_hard(struct mount *mp) mtx_unlock(&vnode_list_mtx); goto alloc; } - rfreevnodes = vnlru_read_freevnodes(); - if (vn_alloc_cyclecount++ >= rfreevnodes) { - vn_alloc_cyclecount = 0; - vstir = true; + + if (vn_alloc_cyclecount != 0) { + rfreevnodes = vnlru_read_freevnodes(); + if (rfreevnodes < wantfreevnodes) { + if (vn_alloc_cyclecount++ >= rfreevnodes) { + vn_alloc_cyclecount = 0; + vstir = true; + } + } else { + vn_alloc_cyclecount = 0; + } } + /* * Grow the vnode cache if it will not be above its target max * after growing. Otherwise, if the free list is nonempty, try From nobody Tue Oct 10 14:18: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 4S4dKg0jjqz4wpwv; Tue, 10 Oct 2023 14:18: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 4S4dKg06Rvz4NxX; Tue, 10 Oct 2023 14:18:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696947495; 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=9r8XVg1+ZFlQ06yHketXZd5E7d4Cfr06rEAS8sSKu38=; b=aR5hG82aHpw3U+e0uvA1CVW7bNuJpWfWGLckeIwiArgD2+Gkyu8NZ4CI46IJICDjQrnmbu 6jXAmpqD+UyUdI+KNg9g01rYcvh5GwQMVsxBd6Ixgvr5/afCgoFoLy5LseOoqzfxBMNm13 /wGZHviBEw2K74JvFyHQTu+BGojq/LciyyTsbCiMKKzHGwys5qf2wSpoaFlBOsO74NyJVL T4XYL6n5OKIdCXW9YXg3RAuQk1wMUVg1pr6rifKV5j0tTm7LqwV4nb/hb1j6AV37/RhRpp gp3ZezOWSmlRWeRGcad7/tBE2l3tn7Z95aT3jFxo4wzt0Lm63G7ev7DqAHQP7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696947495; a=rsa-sha256; cv=none; b=UhCR7TxgwgTq2P5CX/8eL6CGiJoeU/9rGP9qaVVs7Cn1GJWNoblm/Esn5IpTseIT3JYfF8 IlEXxhME1uLmHc4RHGpUJdFwXKUcyiJ3fsyYfh/X1vm0/vJp/eoGixvQP/IVo3uQsuORMf 5cmrz0di8cobxDKp3EDY7sKi44LEqamCvCIJuAQKg5Naw1PZ7Ogvehl1GrE6kC4X/ipj17 HKWTsYfTNHDKQRpgwzSaZDuHodW463XtoD8A2TjedoDCMGs/qiMf6kTBAssgTUHm0qlGgo tvQm2nL+4w4G7TSsfEMIgBhwefDMbzY9mVveEJK+NdazeuXESkTXugDU3jkt6A== 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=1696947495; 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=9r8XVg1+ZFlQ06yHketXZd5E7d4Cfr06rEAS8sSKu38=; b=FXjGsEzAapGAED3lwLP/8dXvOvLnPcN7t3aqjNlj/+UPBJLJ4ZQxiYEdjFQSlnX186mLDx 712s+8Kg4pUq+qduAH6z9YzZsGD2uwBtqbxNgnHBPH+zJYsoqCxqL883WTFvORvZP+Tj3u mwFePx9MhlOO98Lq9qKHl8FMQ3zpX/BKTbMBpXw7HO8psQ+vjzOG69xdZR/9DM9hlfDr4e A3+LGLMK0nH1MLSi4oDoJGZuWy3a4W/QstboFifbpOMVYtqhpYaUh4pj/9CRHrtIh3rL94 GMRysHwdyhU20kUQWkWMbNE5gh9ciV6y6jfO9So+cvNurjQjzUFlMN1M/C/Bcw== 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 4S4dKf6KFlzhpJ; Tue, 10 Oct 2023 14:18: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 39AEIEu2072566; Tue, 10 Oct 2023 14:18:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39AEIEdw072563; Tue, 10 Oct 2023 14:18:14 GMT (envelope-from git) Date: Tue, 10 Oct 2023 14:18:14 GMT Message-Id: <202310101418.39AEIEdw072563@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 52fe961c6cae - main - src.conf(5): regen after 38981026e70390c 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: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52fe961c6caef7c45d130c9a85ca341fcde1f7ff Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=52fe961c6caef7c45d130c9a85ca341fcde1f7ff commit 52fe961c6caef7c45d130c9a85ca341fcde1f7ff Author: Baptiste Daroussin AuthorDate: 2023-10-10 14:16:53 +0000 Commit: Baptiste Daroussin CommitDate: 2023-10-10 14:17:23 +0000 src.conf(5): regen after 38981026e70390c Reported by: manu --- share/man/man5/src.conf.5 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index cc26c026052d..9d26531e515b 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 October 6, 2023 +.Dd October 10, 2023 .Dt SRC.CONF 5 .Os .Sh NAME @@ -470,8 +470,8 @@ Avoid building or installing standalone debug files for each executable binary and shared library. .It Va WITH_DETECT_TZ_CHANGES Make the time handling code detect changes to the timezone files. -.It Va WITHOUT_DIALOG -Do not build +.It Va WITH_DIALOG +Do build .Xr dialog 1 , .Xr dialog 3 , .Xr dpv 1 , From nobody Tue Oct 10 14:59: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 4S4fG066JXz4wscg for ; Tue, 10 Oct 2023 15:00:08 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.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 4S4fG02KLMz4ShW for ; Tue, 10 Oct 2023 15:00:08 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-40572aeb673so55863385e9.0 for ; Tue, 10 Oct 2023 08:00:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696950006; x=1697554806; 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=ctwpxDBaYRoSiNuOQUh+KfNjHJ1Yd1x6t37RdEOR2UU=; b=xFREiEF91ucJx7Jpke4JGymoaSO1FTF9pghjFEEBr8HkeLIYdFThBt3TyB0U7DiflM q//qVFP/X9sIm0Y+7QeMyv34m0lYBjMqBOGfh/CF5WESnQNIxE58jS3OhZULCJDwaOkx zPiivWk8yDBka2MlDyFJwsOg6jYu+8mymBPrraZ92+H2mOcLOwZYZnn0RNJU2DunYSJz U+4BfvTHufTbcOsDnhL7oq/z0vAf6VoM8v51B7GZgx20w1IRiiF+ai4/o8ktjh6JKVy5 EshViBNyjzk+SXGismvKdILzAGtw/hEoPtsggs6+JsCLBLPlvtInPKmFbmWmd20CB6tQ 4cYA== X-Gm-Message-State: AOJu0YxHcNOU6VFo83d8x8jx1ubrGg52kArpYr9FZs2vhxvtUXlHscrR 0mOTg1a7QKcaLxP94clSGcmlzw== X-Google-Smtp-Source: AGHT+IHsrHo+VGA/eHFL4CDNk4PIWR6Glxsl+upR6oZawWMTlpWsP+9Lf3TF2R8tcypojWXbQTeGlw== X-Received: by 2002:a05:600c:2116:b0:405:4743:de12 with SMTP id u22-20020a05600c211600b004054743de12mr17014443wml.21.1696950006027; Tue, 10 Oct 2023 08:00:06 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id k14-20020a05600c0b4e00b003fe1fe56202sm14429021wmr.33.2023.10.10.08.00.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Oct 2023 08:00:04 -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 \(3774.100.2.1.4\)) Subject: Re: git: d09a64e15d8f - main - arm64: Enable kernel branch protection From: Jessica Clarke In-Reply-To: <202310100953.39A9rFWk036835@gitrepo.freebsd.org> Date: Tue, 10 Oct 2023 15:59:53 +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: <33A07449-D0C0-4E6B-BF4E-5128B8DB202B@freebsd.org> References: <202310100953.39A9rFWk036835@gitrepo.freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.3774.100.2.1.4) 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: 4S4fG02KLMz4ShW On 10 Oct 2023, at 10:53, Andrew Turner wrote: >=20 > The branch main has been updated by andrew: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dd09a64e15d8fad6588b9aad62979f20a= fa8441df >=20 > commit d09a64e15d8fad6588b9aad62979f20afa8441df > Author: Andrew Turner > AuthorDate: 2023-10-02 15:55:31 +0000 > Commit: Andrew Turner > CommitDate: 2023-10-10 09:52:16 +0000 >=20 > arm64: Enable kernel branch protection Can we please put this kind of thing behind an option? Users may want to be able to turn it off, and we surely will in CheriBSD for pure-capability kernels. This applies to any other security features in your pipeline too. Jess > Add the build flags to enable branch protection on arm64. This = enable > the use of PAC and BTI in the kernel. >=20 > For PAC we already install the kernel keys when entering the kernel > from userspace so this will start using these to sign the stack. >=20 > For BTI we need to mark the kernel page tables with a new guarded = page > field. As this will require all code that could be reached through = a > function pointer with an appropriate branch target instruction we > are enabling this before setting the field. >=20 > As the pointer authentication support shouldn't be reached via a > function pointer it is safe to not enable the use of BTI there. >=20 > Reviewed by: markj > Sponsored by: Arm Ltd > Differential Revision: https://reviews.freebsd.org/D42079 > --- > sys/conf/kern.mk | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk > index b508bc81b5f0..72b7387d3959 100644 > --- a/sys/conf/kern.mk > +++ b/sys/conf/kern.mk > @@ -140,6 +140,8 @@ INLINE_LIMIT?=3D 8000 > CFLAGS +=3D -mgeneral-regs-only > # Reserve x18 for pcpu data > CFLAGS +=3D -ffixed-x18 > +# Build with BTI+PAC > +CFLAGS +=3D -mbranch-protection=3Dstandard > INLINE_LIMIT?=3D 8000 > .endif >=20 From nobody Tue Oct 10 15:04: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 4S4fMJ6NLYz4wsl1; Tue, 10 Oct 2023 15:04: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 4S4fMJ5s14z4Tg8; Tue, 10 Oct 2023 15:04:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696950284; 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=sN4i2IKzUsj/PBKI90dNcTRy7EXSpVy5hb7sUIZ4BBk=; b=wjkoLK/pLi6Mb0DgjgTg0/LWCi0dgS4Ip0bCgzKYOMuL7O2TFIL9aW8yUEtGlhoPtYzBBl CyRWFjkYzUvq6CF2kH0A84O0bYNxOdXpHMrg4FET4eXQPAH2hGkO6nSqux2vFyAWq67bQG +HFJPb0Z77qQwmXuFY+Mls9Uy+CCs4qLeuEjRaVFcp7etAACHNabawqjhdV3+Hqle5l8F8 TARE1oDZvDFOFnLf53CcIkfGnA+UKMjsboPwgju74OYE/I12zvzWblnDtFb8i9yRBHO2bd wf3TllEJJjIRWsTBox3KIhDkRyWYK414+vKAIylk8asDmg9jSv3jKlJ2YC7Dnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696950284; a=rsa-sha256; cv=none; b=LgxTPivb1PWKiT4WJNS+rj2sJ3/wdvsPqThGOrZES0+W/wAOqabBAN6hJvOcyDVx/ajPaz 2Bq49rE4zis8aswBDKrnHeKVXIIYqFSAPDlG4gie/tbZgIPUsX6el9mQ4FLUwHrNkZdNbo lyQQBcaJOJ8AepVlSBWVWg/V5e9IsBZ9SbFIjr9Xmwpk9WEbmpySQBULETJkdDmXy4sLfr 7teslzTwu43jmkFUV05eykijNgnnDixq1mvjbkCNmkMmlSgLOu2zMiygdcvc8DtOnSsqIy gh+QmnF0UkcOCWf/Lh7iZtn+6VRAphDLdDGQuoBNZdx3tP6AZQETZRQQ4md8ZA== 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=1696950284; 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=sN4i2IKzUsj/PBKI90dNcTRy7EXSpVy5hb7sUIZ4BBk=; b=I8YkvoDKN50/2MSSUgNQ9b4qh5zZjBMMTOnlP2SUKDV/3p56O39eJ8gZR7ID0bRRWVXsky maon8a/9FvQyWF+j1X/YmCvfw8pP3iMGJq3hj8ZfolifvFm2+mYYbrEcBdEiwGKRWsIviB L8ODKVynbnJ22CKDEsuFy0vYk+eB794vmql9SSAr5NLpnZbwiI3mA1O79gO1qnV4YiaA1r fPL5T7Xik1gqdwHtZMzALx6479ypMmRm0xTfWrHl3kzkOmsAAf7ch1B+jJqKEl+9GOdIFF 8V4XqzyKZxGG8bDRAYerQSn4SVIcfLIzeR6NbnCC7wntlvUxx8mSYMmxY8g12w== 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 4S4fMJ4wszzjT4; Tue, 10 Oct 2023 15:04: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 39AF4ibl055789; Tue, 10 Oct 2023 15:04:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39AF4i9U055786; Tue, 10 Oct 2023 15:04:44 GMT (envelope-from git) Date: Tue, 10 Oct 2023 15:04:44 GMT Message-Id: <202310101504.39AF4i9U055786@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: e49c7cd677df - main - dtrace: remove x86 non-EARLY_AP_STARTUP support 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: e49c7cd677df0b8691c828b55919ef37d8aad219 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e49c7cd677df0b8691c828b55919ef37d8aad219 commit e49c7cd677df0b8691c828b55919ef37d8aad219 Author: Ed Maste AuthorDate: 2023-10-09 20:13:50 +0000 Commit: Ed Maste CommitDate: 2023-10-10 15:03:27 +0000 dtrace: remove x86 non-EARLY_AP_STARTUP support After 792655abd64c EARLY_AP_STARTUP is mandatory for x86. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42139 --- sys/cddl/dev/dtrace/amd64/dtrace_subr.c | 28 ---------------------------- sys/cddl/dev/dtrace/i386/dtrace_subr.c | 28 ---------------------------- 2 files changed, 56 deletions(-) diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c index ee57432bd2fb..09b820241e50 100644 --- a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c @@ -283,7 +283,6 @@ dtrace_gethrtime_init_cpu(void *arg) hst_cpu_tsc = rdtsc(); } -#ifdef EARLY_AP_STARTUP static void dtrace_gethrtime_init(void *arg) { @@ -291,16 +290,6 @@ dtrace_gethrtime_init(void *arg) uint64_t tsc_f; cpuset_t map; int i; -#else -/* - * Get the frequency and scale factor as early as possible so that they can be - * used for boot-time tracing. - */ -static void -dtrace_gethrtime_init_early(void *arg) -{ - uint64_t tsc_f; -#endif /* * Get TSC frequency known at this moment. @@ -329,18 +318,6 @@ dtrace_gethrtime_init_early(void *arg) * (terahertz) values; */ nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tsc_f; -#ifndef EARLY_AP_STARTUP -} -SYSINIT(dtrace_gethrtime_init_early, SI_SUB_CPU, SI_ORDER_ANY, - dtrace_gethrtime_init_early, NULL); - -static void -dtrace_gethrtime_init(void *arg) -{ - struct pcpu *pc; - cpuset_t map; - int i; -#endif if (vm_guest != VM_GUEST_NO) return; @@ -364,13 +341,8 @@ dtrace_gethrtime_init(void *arg) } sched_unpin(); } -#ifdef EARLY_AP_STARTUP SYSINIT(dtrace_gethrtime_init, SI_SUB_DTRACE, SI_ORDER_ANY, dtrace_gethrtime_init, NULL); -#else -SYSINIT(dtrace_gethrtime_init, SI_SUB_SMP, SI_ORDER_ANY, dtrace_gethrtime_init, - NULL); -#endif /* * DTrace needs a high resolution time function which can diff --git a/sys/cddl/dev/dtrace/i386/dtrace_subr.c b/sys/cddl/dev/dtrace/i386/dtrace_subr.c index 9c9143eb9dff..026581f5a899 100644 --- a/sys/cddl/dev/dtrace/i386/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/i386/dtrace_subr.c @@ -283,7 +283,6 @@ dtrace_gethrtime_init_cpu(void *arg) hst_cpu_tsc = rdtsc(); } -#ifdef EARLY_AP_STARTUP static void dtrace_gethrtime_init(void *arg) { @@ -291,16 +290,6 @@ dtrace_gethrtime_init(void *arg) uint64_t tsc_f; cpuset_t map; int i; -#else -/* - * Get the frequency and scale factor as early as possible so that they can be - * used for boot-time tracing. - */ -static void -dtrace_gethrtime_init_early(void *arg) -{ - uint64_t tsc_f; -#endif /* * Get TSC frequency known at this moment. @@ -329,18 +318,6 @@ dtrace_gethrtime_init_early(void *arg) * (terahertz) values; */ nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tsc_f; -#ifndef EARLY_AP_STARTUP -} -SYSINIT(dtrace_gethrtime_init_early, SI_SUB_CPU, SI_ORDER_ANY, - dtrace_gethrtime_init_early, NULL); - -static void -dtrace_gethrtime_init(void *arg) -{ - cpuset_t map; - struct pcpu *pc; - int i; -#endif if (vm_guest != VM_GUEST_NO) return; @@ -364,13 +341,8 @@ dtrace_gethrtime_init(void *arg) } sched_unpin(); } -#ifdef EARLY_AP_STARTUP SYSINIT(dtrace_gethrtime_init, SI_SUB_DTRACE, SI_ORDER_ANY, dtrace_gethrtime_init, NULL); -#else -SYSINIT(dtrace_gethrtime_init, SI_SUB_SMP, SI_ORDER_ANY, dtrace_gethrtime_init, - NULL); -#endif /* * DTrace needs a high resolution time function which can From nobody Tue Oct 10 16:29:48 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 4S4hFT244Sz4x0Sb; Tue, 10 Oct 2023 16:29: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 4S4hFT1Yttz4b1J; Tue, 10 Oct 2023 16:29:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696955389; 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=dywCj19dBBK/HIlYaXsQJlekn9GFLmqFm1xVRG3FTWA=; b=AogF22tncuWJ3LtuVmihrqRRcqTFzj5m1eO7NVyq4jb4aPlniRgqj29I0UjK2hvmP5N+3c 0+3KQBFm50ikUfA9RZwuDrbZVfZQJdSWPPDUvFLv1cnkmJjvJrbtRapQOM3JgAgg7JX6KO 7vflZ8l1aBrfQ9BqC41/eMnvoe/5s65XdKrGJ89qqVtTUMUJ95S118woWpQ7NctQ7EaRpP ACgAV5dIDrr02fWobirC+HPz4lA08yaK0xEY8IA5dCfxHKaHex2OOSUUYRL2SNRn01HURP 4llrV8olF5JPLi+XQTEQGatt1/wGnFUXDWidncH8jZ97fMLvcs/6rYn5YYfvFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696955389; a=rsa-sha256; cv=none; b=ZHIueEyQT2p2Q0BDdiVt9zaKjC/AjiyeRK5G8ArOLckCpbJYG/hrCTBwpGmkvVCBl8mWPp wZ8sw/ICt3bFt80c+rTya5mYLDhoexNwAwGQIjT0RTmzrmgAKm7cVrQhiHXnl0aZAiRL0f vbKGM/zn2l6jxzVZLa4CpIiYkN0nVPceWzSfxMfiy1vbkuIATpYj38LSNQjiRu7geaf/1m Dr0JN6XsudCg1TxURM9rsbj1bZKLwCdAFuU82wP8w39fpFt+U8EQ4bIcfR/6lETgbhgsij Nw4d0aHex1WP50P6jHuSkc3hftyN1YZdmDsGVwVuie5W/pVqxVQospx5EWoNfg== 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=1696955389; 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=dywCj19dBBK/HIlYaXsQJlekn9GFLmqFm1xVRG3FTWA=; b=mpECtYr6skJ2RW5MVg9cZTT7Urf0fJdG7YuW5GZPZzlCvwvlwea090NrCQK/k61HSrs2Qo /uFlB48vVsmscbmV+Jbny33nmwP22lZxl7kxSSptdWwWRWq8n7Lww0Lrnb8ZfGoDQ+njz0 eKMhotOJ8cQl17Y/dkGI+zLrU7D/ZDIKxd7saCRaaGlDN6k+Wn7b1OByoM59XRjyJ2T5dG 6uNlP5aYS8ifkrOL+4KlVvhWZMyV0qBgUtsrE6OPIzVkRmzEf8UuuWYIhHtBX8WI+SDTpG AgeNd7RjI3qAC1nTp8IZLsRmyPTQQnl4HMbp1Cdb7+/wPmyBw/xzm8fOP/cSYg== 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 4S4hFT0cRXzlPG; Tue, 10 Oct 2023 16:29: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 39AGTmNC088265; Tue, 10 Oct 2023 16:29:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39AGTmDa088262; Tue, 10 Oct 2023 16:29:48 GMT (envelope-from git) Date: Tue, 10 Oct 2023 16:29:48 GMT Message-Id: <202310101629.39AGTmDa088262@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: 1bf55a739e75 - main - vfs: be less eager to call uma_reclaim(UMA_RECLAIM_DRAIN) 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: 1bf55a739e754765fa2dc15ab6481fe411084be3 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=1bf55a739e754765fa2dc15ab6481fe411084be3 commit 1bf55a739e754765fa2dc15ab6481fe411084be3 Author: Mateusz Guzik AuthorDate: 2023-10-10 16:15:53 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-10 16:15:53 +0000 vfs: be less eager to call uma_reclaim(UMA_RECLAIM_DRAIN) In face of vnode shortage the count very easily can go few units above the limit before going back down. Calling uma_reclaim results in massive amount of work which in this case is not warranted. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/kern/vfs_subr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index e37f8697efa2..e7e612254ba2 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1674,7 +1674,12 @@ vnlru_proc(void) target = target / 10 + 1; done = vlrureclaim(reclaim_nc_src, trigger, target); mtx_unlock(&vnode_list_mtx); - if (onumvnodes > desiredvnodes && numvnodes <= desiredvnodes) + /* + * Total number of vnodes can transiently go slightly above the + * limit (see vn_alloc_hard), no need to call uma_reclaim if + * this happens. + */ + if (onumvnodes + 1000 > desiredvnodes && numvnodes <= desiredvnodes) uma_reclaim(UMA_RECLAIM_DRAIN); if (done == 0) { if (force == 0 || force == 1) { From nobody Tue Oct 10 16:29: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 4S4hFV3NDxz4x0MC; Tue, 10 Oct 2023 16:29: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 4S4hFV2Z9Hz4bSd; Tue, 10 Oct 2023 16:29:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696955390; 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=ungjfCdO/c1+cC6WhP6oCa7vOZirHANLOcN2kySp4CY=; b=mK78woIj9sO8NXN+g2zkkxfr2Efe6EGU1yGdO/tx8v1tag8JkotnaulbfTYyNAwdXoKWpJ PJvLJ1O/bXU5ALTzbCLuXlldA+2gc82gKwrkM6puEwvk2fl2nvLf18KFUZVjv4x+0YMJdq 40AlqwcB/iCC9IGUruqxmu7/DEhk5qvJSjYOY4JprdXGJKH+S7czqtMrzoaHNvDILWLZcK eOoRtsksBjxgr4LI6PvxDqAM38D7lm/yBi1XGDm8uILT1UxgIqnkMyOdbtP/GssuvlM+R3 m+Qb99llf1NcUWVhYLT/R+pqYtpMDygBAqL9LknnD4exgftfJOMbJsufqteN5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696955390; a=rsa-sha256; cv=none; b=MqSLaepqXj5hSfM4wio0tsZrjD8tIJYBtee5xAIKTldzwWK6xtSTRZ2uFKxeWtgAGy9l2X opUmsja8eIEaBz6QZRe723jqeoQwkT/x++xcqTltwpikQBvN9ZDVRg0mwtTiJwgEftDGYH BkSUjfg5cL102eM7bYf26iJHOnUow/1IFdppVahaAvlRE2kasPIbtfPi12kGQK2Pj+Zmqw wSYnnNfweIa7pfZ0ZL1pwxiIPRYta2+P45lA6uchPSMe4889h+63DJ3yB5RnlZ0P1/BCGg hPVf7qwSsflRIK4hRntAm2mUg8fMQ7oObKO0Y/b6qaHlVM0HVm7UP2PYdeIagA== 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=1696955390; 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=ungjfCdO/c1+cC6WhP6oCa7vOZirHANLOcN2kySp4CY=; b=rrNbkX5whjolP2TW5zubzYbVZuwRCrG/l9gjweycXNra945TKh/Qr3bth8R3Dne5EZ78/C R+rwUHqiEOsClSjy+u60YURt00Iikl2NagA7aMLP5fqevdWqvFegrbSltGJrsbyVKzw/tH Bcw5GMpCqREhvUFJdOqiWbNsK2wDJBu0VBL9YMCgVlIaM3bjTBegqWXOp6WfKLwyWD4R2J eSkKtZaZ+0ZUAwywoqM++0K8Ogo5NSZW5v9R2WWNhbPFth1I/smbmkPRJjtMnPLRo5yzZt x69c9vHXwg4415UKJBOxy5DBv110Ykh3sJA0XsFmp3Sj2uhokPCZ1WxFrc6cXQ== 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 4S4hFV1b8rzlxL; Tue, 10 Oct 2023 16:29: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 39AGTogI088307; Tue, 10 Oct 2023 16:29:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39AGToN7088304; Tue, 10 Oct 2023 16:29:50 GMT (envelope-from git) Date: Tue, 10 Oct 2023 16:29:50 GMT Message-Id: <202310101629.39AGToN7088304@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: 23ef25d25d98 - main - vfs: consult freevnodes in vnlru_kick_cond 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: 23ef25d25d989e7213bc1d3ef32b0f48a9eb2537 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=23ef25d25d989e7213bc1d3ef32b0f48a9eb2537 commit 23ef25d25d989e7213bc1d3ef32b0f48a9eb2537 Author: Mateusz Guzik AuthorDate: 2023-10-10 16:19:53 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-10 16:19:53 +0000 vfs: consult freevnodes in vnlru_kick_cond If the count is high enough there is no point trying to produce more. Not going there reduces traffic on the vnode_list mtx. This further shaves total real time in a test mentioned in: 74be676d87745eb7 ("vfs: drop one vnode list lock trip during vnlru free recycle") -- 20 instances of find each creating 1 million vnodes, while total limit is set to 400k. Time goes down from ~41 to ~35 seconds. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/kern/vfs_subr.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index e7e612254ba2..5e39a149ef36 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1584,6 +1584,9 @@ static void vnlru_kick_cond(void) { + if (vnlru_read_freevnodes() > wantfreevnodes) + return; + if (vnlruproc_sig) return; mtx_lock(&vnode_list_mtx); @@ -1849,9 +1852,8 @@ vn_alloc_hard(struct mount *mp) } alloc: mtx_assert(&vnode_list_mtx, MA_NOTOWNED); - rnumvnodes = atomic_fetchadd_long(&numvnodes, 1) + 1; - if (vnlru_under(rnumvnodes, vlowat)) - vnlru_kick_cond(); + atomic_add_long(&numvnodes, 1); + vnlru_kick_cond(); return (uma_zalloc_smr(vnode_zone, M_WAITOK)); } From nobody Tue Oct 10 17:35: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 4S4jj32wW1z4x4SK; Tue, 10 Oct 2023 17:35: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 4S4jj32RB7z3F43; Tue, 10 Oct 2023 17:35:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696959319; 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=LmMBW6LoRwEle90kKL/DPwtVwsu5sp3tIfGh1e+smTQ=; b=qFklosOXTy41/BqPRtZYf0uTKQqsM7ETNZQI58/Zts4mS3v6qa8lUW6KrVVvU6jwDOZz9U ukFFrNk2XXy0K5WuU4SmX+4RcScR6RHMU/auJIvLsP86Ej6SlaaLdd7K1U3TraORN9/WFF waoQj2/N0OnSDb5oHQppgZNvSifw/w91W9UlRewaTK/sS2550ps5PkyZk3Xjo5YBmrFZAy 6MGnOidZOYR27K4Ul5WLwUJkMQBy/+r5MIjPxobJdMhic2JcWH9fFpqUcOT/IaF+BDDLU+ DfAEE//15UWQBsK7KTsnQI6kBcRXP7H3hlw/QOfH6Vb8FvfhJBZernmo24JGCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696959319; a=rsa-sha256; cv=none; b=pp3wWLIJkHkiizLZnrpZORfdGvkWm5602LFoSXakuRp1dLm0jZ6fXknXt/SFumQpxOgmYQ IUUYj+GPScg/lZu8mUE69PZJsz9sNqNHnk9x++RZMNTpa3yK5T21QEAezAcbgqY2j3oxYe vjq+vVqy7/2Fb/nYt3VuMY7TYeNSrLkBMkL7jDJ+WSYeZlZRklh1cT9HAhmUEQKyGgHA3b cTSW6BnUYTfcMWo1+/aduJqOBPXwzlG3AMa62IEZko1C/UHGuVyEC6YZxp9+CHkUgi+qgc DQxtj04b34xG5aROLuAdFLCRPgo/KfCMlhcTKQf9Shjz19UQJ1KllImmQro8mw== 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=1696959319; 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=LmMBW6LoRwEle90kKL/DPwtVwsu5sp3tIfGh1e+smTQ=; b=b7sF2VkZ5ijfGBOFbK0GjDS34whweqakVElPbeo9O6sCPLmMJRnP2VpiKVAgYSyXVQnn4h bF9K59ZwGBGYMLpIItkq5gPlODUSqojJXGzLg2zwYXB1i6eQ/wUXC/L8KsqEbjQrOFhjnN mvfo7L7AyVg7tKiv1Z48uBsVPvAR5txC5woLGJh8jI+Lu1N5FrCD492IqXWspVu3UUkdNe 07b7ST0C81XZ3LBHWv8EzIomDaFhplIEZAy49WDkGW0V/RDbe7eARaVDqQBtl7jxAhxMWV NilNFiGdDOhbHM1dM5JlT1JT2BByRkleuJwnSyQIwwRMOr8DZ0Lndy5crFfs6A== 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 4S4jj31VVjznlx; Tue, 10 Oct 2023 17:35: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 39AHZJ6X004294; Tue, 10 Oct 2023 17:35:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39AHZJIN004291; Tue, 10 Oct 2023 17:35:19 GMT (envelope-from git) Date: Tue, 10 Oct 2023 17:35:19 GMT Message-Id: <202310101735.39AHZJIN004291@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: f53355131f65 - main - Trim various $FreeBSD$ 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: f53355131f65d64e7643d734dbcd4fb2a5de20ed Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f53355131f65d64e7643d734dbcd4fb2a5de20ed commit f53355131f65d64e7643d734dbcd4fb2a5de20ed Author: John Baldwin AuthorDate: 2023-10-10 17:34:43 +0000 Commit: John Baldwin CommitDate: 2023-10-10 17:34:43 +0000 Trim various $FreeBSD$ Approved by: markj (cddl/contrib changes) Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41961 --- cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 | 2 -- cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 | 2 -- cddl/usr.sbin/dwatch/dwatch | 1 - include/rpc/rpcb_prot.x | 2 -- lib/ofed/libirdma/Makefile | 2 -- share/man/man4/pcf8591.4 | 2 -- share/vt/keymaps/colemak-dh.acc.kbd | 2 -- stand/kboot/arch/powerpc64/ldscript.powerpc | 2 -- sys/dev/firmware/xilinx/zynqmp_firmware_if.m | 2 -- sys/modules/ath12k/Makefile | 2 -- sys/modules/mt76/mt7996/Makefile | 2 -- tools/tools/editing/freebsd.vim | 2 -- tools/tools/locale/etc/charmaps.xml | 1 - usr.sbin/ypldap/ypldap.c | 1 - 14 files changed, 25 deletions(-) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 index 42367b99b786..1745519c2c1a 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 +++ b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 @@ -18,8 +18,6 @@ .\" CDDL HEADER END .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. .\" -.\" $FreeBSD$ -.\" .Dd February 24, 2023 .Dt DTRACE 1 .Os diff --git a/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 b/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 index c649e21bb67e..6c9657fa5406 100644 --- a/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 +++ b/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 @@ -19,8 +19,6 @@ .\" CDDL HEADER END .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved. .\" -.\" $FreeBSD$ -.\" .Dd February 25, 2020 .Dt LOCKSTAT 1 .Os diff --git a/cddl/usr.sbin/dwatch/dwatch b/cddl/usr.sbin/dwatch/dwatch index 9adde7eb8d49..c9af8258f4ac 100755 --- a/cddl/usr.sbin/dwatch/dwatch +++ b/cddl/usr.sbin/dwatch/dwatch @@ -1327,7 +1327,6 @@ PSARGS_ACTION=$( cat <&9 ) * SUCH DAMAGE. * * $TITLE dtrace(1) script to log process(es) triggering $PROBE $ - * \$FreeBSD$ */ $( echo "$DTRACE_PRAGMA" | awk ' diff --git a/include/rpc/rpcb_prot.x b/include/rpc/rpcb_prot.x index a34bcc12502a..b5de5c6d865d 100644 --- a/include/rpc/rpcb_prot.x +++ b/include/rpc/rpcb_prot.x @@ -1,6 +1,4 @@ %/*- -% * $FreeBSD$ -% * % * Copyright (c) 2009, Sun Microsystems, Inc. % * All rights reserved. % * diff --git a/lib/ofed/libirdma/Makefile b/lib/ofed/libirdma/Makefile index 368bd536c587..349590672b44 100644 --- a/lib/ofed/libirdma/Makefile +++ b/lib/ofed/libirdma/Makefile @@ -1,5 +1,3 @@ -# $FreeBSD: releng/12.1/lib/ofed/libirdma/Makefile 336568 2018-07-20 23:49:57Z kib $ - _spath= ${SRCTOP}/contrib/ofed/libirdma _ipath= ${SRCTOP}/contrib/ofed/include lin_inc=/usr/src/sys/compat/linuxkpi/common/include diff --git a/share/man/man4/pcf8591.4 b/share/man/man4/pcf8591.4 index 6133d6cfa0d8..9acaf6502b38 100644 --- a/share/man/man4/pcf8591.4 +++ b/share/man/man4/pcf8591.4 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: head/share/man/man4/cp2112.4 364144 2020-08-12 09:42:05Z avg $ -.\" .Dd November 6, 2021 .Dt PCF8591 4 .Os diff --git a/share/vt/keymaps/colemak-dh.acc.kbd b/share/vt/keymaps/colemak-dh.acc.kbd index 82c5faa2c6a6..b3f1b7d5ba83 100644 --- a/share/vt/keymaps/colemak-dh.acc.kbd +++ b/share/vt/keymaps/colemak-dh.acc.kbd @@ -1,5 +1,3 @@ -# $FreeBSD $ -# # Colemak Mod-DH (rev. 2) layout for FreeBSD console # 2006-01-01 Shai Coleman (http://colemak.com/), # 2014-10-27 Steve P (http://colemakmods.github.io/mod-dh/). diff --git a/stand/kboot/arch/powerpc64/ldscript.powerpc b/stand/kboot/arch/powerpc64/ldscript.powerpc index 662871eb7c09..f9fcc37f02d8 100644 --- a/stand/kboot/arch/powerpc64/ldscript.powerpc +++ b/stand/kboot/arch/powerpc64/ldscript.powerpc @@ -1,5 +1,3 @@ -/* $FreeBSD: user/nwhitehorn/kboot/powerpc/kboot/ldscript.powerpc 272888 2014-10-10 06:24:09Z bapt $ */ - OUTPUT_FORMAT("elf32-powerpc-freebsd", "elf32-powerpc-freebsd", "elf32-powerpc-freebsd") OUTPUT_ARCH(powerpc:common) diff --git a/sys/dev/firmware/xilinx/zynqmp_firmware_if.m b/sys/dev/firmware/xilinx/zynqmp_firmware_if.m index 1007d721952d..53b9fa5399bb 100644 --- a/sys/dev/firmware/xilinx/zynqmp_firmware_if.m +++ b/sys/dev/firmware/xilinx/zynqmp_firmware_if.m @@ -23,8 +23,6 @@ # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. -# -# $FreeBSD$ INTERFACE zynqmp_firmware; diff --git a/sys/modules/ath12k/Makefile b/sys/modules/ath12k/Makefile index e72d061d0c08..674a68e12813 100644 --- a/sys/modules/ath12k/Makefile +++ b/sys/modules/ath12k/Makefile @@ -1,5 +1,3 @@ -# $FreeBSD$ - DEVATH12KDIR= ${SRCTOP}/sys/contrib/dev/athk/ath12k .PATH: ${DEVATH12KDIR} diff --git a/sys/modules/mt76/mt7996/Makefile b/sys/modules/mt76/mt7996/Makefile index 3a4a56d839a5..a43721b6079e 100644 --- a/sys/modules/mt76/mt7996/Makefile +++ b/sys/modules/mt76/mt7996/Makefile @@ -1,5 +1,3 @@ -# $FreeBSD$ - DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7996 .PATH: ${DEVDIR} diff --git a/tools/tools/editing/freebsd.vim b/tools/tools/editing/freebsd.vim index fa7977b30361..e515f81890df 100644 --- a/tools/tools/editing/freebsd.vim +++ b/tools/tools/editing/freebsd.vim @@ -21,8 +21,6 @@ " THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT " (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF " THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -" -" $FreeBSD$ " This is a plugin for Vim (tested with Vim v7.1) to follow the FreeBSD style(9) " indentation. It registers a macro (see below) for changing a buffer's diff --git a/tools/tools/locale/etc/charmaps.xml b/tools/tools/locale/etc/charmaps.xml index dcf1644e4371..0193912b9a01 100644 --- a/tools/tools/locale/etc/charmaps.xml +++ b/tools/tools/locale/etc/charmaps.xml @@ -1,4 +1,3 @@ - 2001:db8::2 16 bytes from ::1, icmp_seq=0 hlim=64 time=0.168 ms 16 bytes from ::1, icmp_seq=1 hlim=64 time=0.068 ms --- 2001:db8::2 ping6 statistics --- round-trip min/avg/max/std-dev = 0.068/0.118/0.168/0.050 ms After (ping6): PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 16 bytes from ::1, icmp_seq=0 hlim=64 time=0.168 ms 16 bytes from ::1, icmp_seq=1 hlim=64 time=0.068 ms --- 2001:db8::2 ping statistics --- round-trip min/avg/max/stddev = 0.068/0.118/0.168/0.050 ms This has the nice side-effect of adding units to SIGINFO's statistics, as printing numbers without units may not be of much help. Also mentions the fact that these times are round-trip. Before (ping/ping6 SIGINFO): 2/2 packets received (100.0%) 0.068 min / 0.118 avg / 0.168 max After (ping/ping6 SIGINFO): --- ping statistics --- 2 packets transmitted, 2 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.068/0.118/0.168/0.050 ms In the case of a SIGINFO, the output will be printed to stderr, for both ping and ping6. Reviewed by: markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/863 Differential Revision: https://reviews.freebsd.org/D39126 --- sbin/ping/main.c | 83 +++++++++++++++++ sbin/ping/main.h | 25 ++++++ sbin/ping/ping.c | 169 +++++++---------------------------- sbin/ping/ping6.c | 123 +++---------------------- sbin/ping/tests/ping_6_c1_s8_t1.out | 6 +- sbin/ping/tests/ping_c1_s8_t1_S1.out | 6 +- sbin/ping/tests/test_ping.py | 72 +++++++-------- 7 files changed, 193 insertions(+), 291 deletions(-) diff --git a/sbin/ping/main.c b/sbin/ping/main.c index e07b30952199..686b412a19b7 100644 --- a/sbin/ping/main.c +++ b/sbin/ping/main.c @@ -35,6 +35,8 @@ #include #include +#include +#include #include #include #include @@ -59,6 +61,28 @@ #error At least one of INET and INET6 is required #endif +/* various options */ +u_int options; + +char *hostname; + +/* counters */ +long nreceived; /* # of packets we got back */ +long nrepeats; /* number of duplicates */ +long ntransmitted; /* sequence # for outbound packets = #sent */ +long nrcvtimeout = 0; /* # of packets we got back after waittime */ + +/* nonzero if we've been told to finish up */ +volatile sig_atomic_t seenint; +volatile sig_atomic_t seeninfo; + +/* timing */ +int timing; /* flag to do timing */ +double tmin = 999999999.0; /* minimum round trip time */ +double tmax = 0.0; /* maximum round trip time */ +double tsum = 0.0; /* sum of all times, for doing average */ +double tsumsq = 0.0; /* sum of all times squared, for std. dev. */ + int main(int argc, char *argv[]) { @@ -157,6 +181,65 @@ ping6: #endif } +/* + * onsignal -- + * Set the global bit that causes the main loop to quit. + */ +void +onsignal(int sig) +{ + switch (sig) { + case SIGALRM: + case SIGINT: + /* + * When doing reverse DNS lookups, the seenint flag might not + * be noticed for a while. Just exit if we get a second SIGINT. + */ + if (!(options & F_HOSTNAME) && seenint != 0) + _exit(nreceived ? 0 : 2); + seenint++; + break; + case SIGINFO: + seeninfo++; + break; + } +} + +/* + * pr_summary -- + * Print out summary statistics to the given output stream. + */ +void +pr_summary(FILE * restrict stream) +{ + fprintf(stream, "\n--- %s ping statistics ---\n", hostname); + fprintf(stream, "%ld packets transmitted, ", ntransmitted); + fprintf(stream, "%ld packets received, ", nreceived); + if (nrepeats) + fprintf(stream, "+%ld duplicates, ", nrepeats); + if (ntransmitted) { + if (nreceived > ntransmitted) + fprintf(stream, "-- somebody's duplicating packets!"); + else + fprintf(stream, "%.1f%% packet loss", + ((((double)ntransmitted - nreceived) * 100.0) / + ntransmitted)); + } + if (nrcvtimeout) + fprintf(stream, ", %ld packets out of wait time", nrcvtimeout); + fputc('\n', stream); + if (nreceived && timing) { + /* Only display average to microseconds */ + double num = nreceived + nrepeats; + double avg = tsum / num; + double stddev = sqrt(fmax(0, tsumsq / num - avg * avg)); + fprintf(stream, + "round-trip min/avg/max/stddev = %.3f/%.3f/%.3f/%.3f ms\n", + tmin, avg, tmax, stddev); + } + fflush(stream); +} + void usage(void) { diff --git a/sbin/ping/main.h b/sbin/ping/main.h index 7084585e6bb0..9a883b61a350 100644 --- a/sbin/ping/main.h +++ b/sbin/ping/main.h @@ -49,6 +49,31 @@ #endif #define PING6OPTS ".::6Aab:C:c:Dde:fHI:i:k:l:m:nNoOp:qS:s:t:uvyYW:z:" PING6ADDOPTS +/* various options */ +extern u_int options; +#define F_HOSTNAME 0x0004 + +extern char *hostname; + +/* counters */ +extern long nreceived; /* # of packets we got back */ +extern long nrepeats; /* number of duplicates */ +extern long ntransmitted; /* sequence # for outbound packets = #sent */ +extern long nrcvtimeout; /* # of packets we got back after waittime */ + +/* nonzero if we've been told to finish up */ +extern volatile sig_atomic_t seenint; +extern volatile sig_atomic_t seeninfo; + +/* timing */ +extern int timing; /* flag to do timing */ +extern double tmin; /* minimum round trip time */ +extern double tmax; /* maximum round trip time */ +extern double tsum; /* sum of all times, for doing average */ +extern double tsumsq; /* sum of all times squared, for std. dev. */ + +void onsignal(int); +void pr_summary(FILE * __restrict); void usage(void) __dead2; #endif diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index ad16ff5a5ee9..bbb103a7361f 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -87,7 +87,6 @@ static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93"; #include #include #include -#include #include #include #include @@ -127,10 +126,8 @@ struct tv32 { }; /* various options */ -static int options; #define F_FLOOD 0x0001 #define F_INTERVAL 0x0002 -#define F_NUMERIC 0x0004 #define F_PINGFILLED 0x0008 #define F_QUIET 0x0010 #define F_RROUTE 0x0020 @@ -178,7 +175,6 @@ static char BSPACE = '\b'; /* characters written for flood */ static const char *DOT = "."; static size_t DOTlen = 1; static size_t DOTidx = 0; -static char *hostname; static char *shostname; static int ident; /* process id to identify our packets */ static int uid; /* cached uid for micro-optimization */ @@ -190,9 +186,6 @@ static int send_len; /* counters */ static long nmissedmax; /* max value of ntransmitted - nreceived - 1 */ static long npackets; /* max packets to transmit */ -static long nreceived; /* # of packets we got back */ -static long nrepeats; /* number of duplicates */ -static long ntransmitted; /* sequence # for outbound packets = #sent */ static long snpackets; /* max packets to transmit in one sweep */ static long sntransmitted; /* # of packets we sent in this sweep */ static int sweepmax; /* max value of payload in sweep */ @@ -200,33 +193,17 @@ static int sweepmin = 0; /* start value of payload in sweep */ static int sweepincr = 1; /* payload increment in sweep */ static int interval = 1000; /* interval between packets, ms */ static int waittime = MAXWAIT; /* timeout for each packet */ -static long nrcvtimeout = 0; /* # of packets we got back after waittime */ - -/* timing */ -static int timing; /* flag to do timing */ -static double tmin = 999999999.0; /* minimum round trip time */ -static double tmax = 0.0; /* maximum round trip time */ -static double tsum = 0.0; /* sum of all times, for doing average */ -static double tsumsq = 0.0; /* sum of all times squared, for std. dev. */ - -/* nonzero if we've been told to finish up */ -static volatile sig_atomic_t finish_up; -static volatile sig_atomic_t siginfo_p; static cap_channel_t *capdns; static void fill(char *, char *); static cap_channel_t *capdns_setup(void); -static void check_status(void); -static void finish(void) __dead2; static void pinger(void); static char *pr_addr(struct in_addr); static char *pr_ntime(n_time); static void pr_icmph(struct icmp *, struct ip *, const u_char *const); static void pr_iph(struct ip *, const u_char *); static void pr_pack(char *, ssize_t, struct sockaddr_in *, struct timespec *); -static void status(int); -static void stopit(int); int ping(int argc, char *const *argv) @@ -264,8 +241,6 @@ ping(int argc, char *const *argv) #endif cap_rights_t rights; - options |= F_NUMERIC; - /* * Do the stuff that we need root priv's for *first*, and * then drop our setuid bit. Save error reporting for @@ -379,7 +354,7 @@ ping(int argc, char *const *argv) options |= F_SWEEP; break; case 'H': - options &= ~F_NUMERIC; + options |= F_HOSTNAME; break; case 'h': /* Packet size increment for ping sweep */ ltmp = strtonum(optarg, 1, INT_MAX, &errstr); @@ -452,7 +427,7 @@ ping(int argc, char *const *argv) options |= F_TTL; break; case 'n': - options |= F_NUMERIC; + options &= ~F_HOSTNAME; break; case 'o': options |= F_ONCE; @@ -882,22 +857,17 @@ ping(int argc, char *const *argv) sigemptyset(&si_sa.sa_mask); si_sa.sa_flags = 0; - - si_sa.sa_handler = stopit; - if (sigaction(SIGINT, &si_sa, 0) == -1) { + si_sa.sa_handler = onsignal; + if (sigaction(SIGINT, &si_sa, 0) == -1) err(EX_OSERR, "sigaction SIGINT"); - } - - si_sa.sa_handler = status; - if (sigaction(SIGINFO, &si_sa, 0) == -1) { + seenint = 0; + if (sigaction(SIGINFO, &si_sa, 0) == -1) err(EX_OSERR, "sigaction SIGINFO"); - } - - if (alarmtimeout > 0) { - si_sa.sa_handler = stopit; + seeninfo = 0; + if (alarmtimeout > 0) { if (sigaction(SIGALRM, &si_sa, 0) == -1) err(EX_OSERR, "sigaction SIGALRM"); - } + } bzero(&msg, sizeof(msg)); msg.msg_name = (caddr_t)&from; @@ -929,13 +899,18 @@ ping(int argc, char *const *argv) } almost_done = 0; - while (!finish_up) { + while (seenint == 0) { struct timespec now, timeout; fd_set rfds; int n; ssize_t cc; - check_status(); + /* signal handling */ + if (seeninfo) { + pr_summary(stderr); + seeninfo = 0; + continue; + } if ((unsigned)srecv >= FD_SETSIZE) errx(EX_OSERR, "descriptor too large"); FD_ZERO(&rfds); @@ -945,9 +920,10 @@ ping(int argc, char *const *argv) timespecsub(&timeout, &now, &timeout); if (timeout.tv_sec < 0) timespecclear(&timeout); + n = pselect(srecv + 1, &rfds, NULL, NULL, &timeout, NULL); if (n < 0) - continue; /* Must be EINTR. */ + continue; /* EINTR */ if (n == 1) { struct timespec *tv = NULL; #ifdef SO_TIMESTAMP @@ -982,7 +958,7 @@ ping(int argc, char *const *argv) (npackets && nreceived >= npackets)) break; } - if (n == 0 || options & F_FLOOD) { + if (n == 0 || (options & F_FLOOD)) { if (sweepmax && sntransmitted == snpackets) { if (datalen + sweepincr > sweepmax) break; @@ -998,14 +974,21 @@ ping(int argc, char *const *argv) if (almost_done) break; almost_done = 1; + /* + * If we're not transmitting any more packets, + * change the timer to wait two round-trip times + * if we've received any packets or (waittime) + * milliseconds if we haven't. + */ intvl.tv_nsec = 0; if (nreceived) { intvl.tv_sec = 2 * tmax / 1000; - if (!intvl.tv_sec) + if (intvl.tv_sec == 0) intvl.tv_sec = 1; } else { intvl.tv_sec = waittime / 1000; - intvl.tv_nsec = waittime % 1000 * 1000000; + intvl.tv_nsec = + waittime % 1000 * 1000000; } } (void)clock_gettime(CLOCK_MONOTONIC, &last); @@ -1016,28 +999,9 @@ ping(int argc, char *const *argv) } } } - finish(); - /* NOTREACHED */ - exit(0); /* Make the compiler happy */ -} - -/* - * stopit -- - * Set the global bit that causes the main loop to quit. - * Do NOT call finish() from here, since finish() does far too much - * to be called from a signal handler. - */ -void -stopit(int sig __unused) -{ + pr_summary(stdout); - /* - * When doing reverse DNS lookups, the finish_up flag might not - * be noticed for a while. Just exit if we get a second SIGINT. - */ - if (!(options & F_NUMERIC) && finish_up) - _exit(nreceived ? 0 : 2); - finish_up = 1; + exit(nreceived ? 0 : 2); } /* @@ -1463,77 +1427,6 @@ pr_pack(char *buf, ssize_t cc, struct sockaddr_in *from, struct timespec *tv) } } -/* - * status -- - * Print out statistics when SIGINFO is received. - */ - -static void -status(int sig __unused) -{ - - siginfo_p = 1; -} - -static void -check_status(void) -{ - - if (siginfo_p) { - siginfo_p = 0; - (void)fprintf(stderr, "\r%ld/%ld packets received (%.1f%%)", - nreceived, ntransmitted, - ntransmitted ? nreceived * 100.0 / ntransmitted : 0.0); - if (nreceived && timing) - (void)fprintf(stderr, " %.3f min / %.3f avg / %.3f max", - tmin, tsum / (nreceived + nrepeats), tmax); - (void)fprintf(stderr, "\n"); - } -} - -/* - * finish -- - * Print out statistics, and give up. - */ -static void -finish(void) -{ - - (void)signal(SIGINT, SIG_IGN); - (void)signal(SIGALRM, SIG_IGN); - (void)putchar('\n'); - (void)fflush(stdout); - (void)printf("--- %s ping statistics ---\n", hostname); - (void)printf("%ld packets transmitted, ", ntransmitted); - (void)printf("%ld packets received, ", nreceived); - if (nrepeats) - (void)printf("+%ld duplicates, ", nrepeats); - if (ntransmitted) { - if (nreceived > ntransmitted) - (void)printf("-- somebody's printing up packets!"); - else - (void)printf("%.1f%% packet loss", - ((ntransmitted - nreceived) * 100.0) / - ntransmitted); - } - if (nrcvtimeout) - (void)printf(", %ld packets out of wait time", nrcvtimeout); - (void)putchar('\n'); - if (nreceived && timing) { - double n = nreceived + nrepeats; - double avg = tsum / n; - double stddev = sqrt(fmax(0, tsumsq / n - avg * avg)); - (void)printf( - "round-trip min/avg/max/stddev = %.3f/%.3f/%.3f/%.3f ms\n", - tmin, avg, tmax, stddev); - } - - if (nreceived) - exit(0); - else - exit(2); -} - /* * pr_icmph -- * Print a descriptive string about an ICMP header. @@ -1705,7 +1598,7 @@ pr_addr(struct in_addr ina) struct hostent *hp; static char buf[16 + 3 + MAXHOSTNAMELEN]; - if (options & F_NUMERIC) + if (!(options & F_HOSTNAME)) return inet_ntoa(ina); hp = cap_gethostbyaddr(capdns, (char *)&ina, sizeof(ina), AF_INET); diff --git a/sbin/ping/ping6.c b/sbin/ping/ping6.c index d14da9c67a52..a71ef8a84aee 100644 --- a/sbin/ping/ping6.c +++ b/sbin/ping/ping6.c @@ -124,7 +124,6 @@ static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93"; #include #include #include -#include #include #include #include @@ -188,7 +187,6 @@ struct tv32 { #define F_FQDN 0x1000 #define F_INTERFACE 0x2000 #define F_SRCADDR 0x4000 -#define F_HOSTNAME 0x10000 #define F_FQDNOLD 0x20000 #define F_NIGROUP 0x40000 #define F_SUPTYPES 0x80000 @@ -200,7 +198,6 @@ struct tv32 { #define F_NOUSERDATA (F_NODEADDR | F_FQDN | F_FQDNOLD | F_SUPTYPES) #define F_WAITTIME 0x2000000 #define F_DOT 0x4000000 -static u_int options; #define IN6LEN sizeof(struct in6_addr) #define SA6LEN sizeof(struct sockaddr_in6) @@ -229,7 +226,6 @@ static char BBELL = '\a'; /* characters written for AUDIBLE */ static const char *DOT = "."; static size_t DOTlen = 1; static size_t DOTidx = 0; -static char *hostname; static int ident; /* process id to identify our packets */ static u_int8_t nonce[8]; /* nonce field for node information */ static int hoplimit = -1; /* hoplimit */ @@ -241,20 +237,9 @@ static cap_channel_t *capdns; /* counters */ static long nmissedmax; /* max value of ntransmitted - nreceived - 1 */ static long npackets; /* max packets to transmit */ -static long nreceived; /* # of packets we got back */ -static long nrepeats; /* number of duplicates */ -static long ntransmitted; /* sequence # for outbound packets = #sent */ static long ntransmitfailures; /* number of transmit failures */ static int interval = 1000; /* interval between packets in ms */ static int waittime = MAXWAIT; /* timeout for each packet */ -static long nrcvtimeout = 0; /* # of packets we got back after waittime */ - -/* timing */ -static int timing; /* flag to do timing */ -static double tmin = 999999999.0; /* minimum round trip time */ -static double tmax = 0.0; /* maximum round trip time */ -static double tsum = 0.0; /* sum of all times, for doing average */ -static double tsumsq = 0.0; /* sum of all times squared, for std. dev. */ /* for node addresses */ static u_short naflags; @@ -264,18 +249,11 @@ static struct msghdr smsghdr; static struct iovec smsgiov; static char *scmsg = 0; -static volatile sig_atomic_t seenint; -#ifdef SIGINFO -static volatile sig_atomic_t seeninfo; -#endif - static cap_channel_t *capdns_setup(void); static void fill(char *, char *); static int get_hoplim(struct msghdr *); static int get_pathmtu(struct msghdr *); static struct in6_pktinfo *get_rcvpktinfo(struct msghdr *); -static void onsignal(int); -static void onint(int); static size_t pingerlen(void); static int pinger(void); static const char *pr_addr(struct sockaddr *, int); @@ -293,7 +271,6 @@ static void pr_ip6opt(void *, size_t); static void pr_rthdr(void *, size_t); static int pr_bitrange(u_int32_t, int, int); static void pr_retip(struct ip6_hdr *, u_char *); -static void summary(void); #ifdef IPSEC #ifdef IPSEC_POLICY_IPSEC static int setpolicy(int, char *); @@ -1142,7 +1119,7 @@ ping6(int argc, char *argv[]) if (caph_rights_limit(ssend, &rights_ssend) < 0) err(1, "caph_rights_limit ssend setsockopt"); - printf("PING6(%lu=40+8+%lu bytes) ", (unsigned long)(40 + pingerlen()), + printf("PING(%lu=40+8+%lu bytes) ", (unsigned long)(40 + pingerlen()), (unsigned long)(pingerlen() - 8)); printf("%s --> ", pr_addr((struct sockaddr *)&src, sizeof(src))); printf("%s\n", pr_addr((struct sockaddr *)&dst, sizeof(dst))); @@ -1163,11 +1140,9 @@ ping6(int argc, char *argv[]) if (sigaction(SIGINT, &si_sa, 0) == -1) err(EX_OSERR, "sigaction SIGINT"); seenint = 0; -#ifdef SIGINFO if (sigaction(SIGINFO, &si_sa, 0) == -1) err(EX_OSERR, "sigaction SIGINFO"); seeninfo = 0; -#endif if (alarmtimeout > 0) { if (sigaction(SIGALRM, &si_sa, 0) == -1) err(EX_OSERR, "sigaction SIGALRM"); @@ -1186,15 +1161,11 @@ ping6(int argc, char *argv[]) int n; /* signal handling */ - if (seenint) - onint(SIGINT); -#ifdef SIGINFO if (seeninfo) { - summary(); + pr_summary(stderr); seeninfo = 0; continue; } -#endif FD_ZERO(&rfds); FD_SET(srecv, &rfds); clock_gettime(CLOCK_MONOTONIC, &now); @@ -1258,12 +1229,12 @@ ping6(int argc, char *argv[]) if (almost_done) break; almost_done = 1; - /* - * If we're not transmitting any more packets, - * change the timer to wait two round-trip times - * if we've received any packets or (waittime) - * milliseconds if we haven't. - */ + /* + * If we're not transmitting any more packets, + * change the timer to wait two round-trip times + * if we've received any packets or (waittime) + * milliseconds if we haven't. + */ intvl.tv_nsec = 0; if (nreceived) { intvl.tv_sec = 2 * tmax / 1000; @@ -1272,7 +1243,7 @@ ping6(int argc, char *argv[]) } else { intvl.tv_sec = waittime / 1000; intvl.tv_nsec = - waittime % 1000 * 1000000; + waittime % 1000 * 1000000; } } clock_gettime(CLOCK_MONOTONIC, &last); @@ -1288,7 +1259,7 @@ ping6(int argc, char *argv[]) si_sa.sa_handler = SIG_IGN; sigaction(SIGINT, &si_sa, 0); sigaction(SIGALRM, &si_sa, 0); - summary(); + pr_summary(stdout); if(packet != NULL) free(packet); @@ -1301,23 +1272,6 @@ ping6(int argc, char *argv[]) exit(EX_OSERR); } -static void -onsignal(int sig) -{ - - switch (sig) { - case SIGINT: - case SIGALRM: - seenint++; - break; -#ifdef SIGINFO - case SIGINFO: - seeninfo++; - break; -#endif - } -} - /* * pinger -- * Compose and transmit an ICMP ECHO REQUEST packet. The IP packet @@ -1469,7 +1423,7 @@ pinger(void) ntransmitfailures++; warn("sendmsg"); } - (void)printf("ping6: wrote %s %d chars, ret=%d\n", + (void)printf("ping: wrote %s %d chars, ret=%d\n", hostname, cc, i); } if (!(options & F_QUIET) && options & F_DOT) @@ -2305,59 +2259,6 @@ get_pathmtu(struct msghdr *mhdr) return(0); } -/* - * onint -- - * SIGINT handler. - */ -/* ARGSUSED */ -static void -onint(int notused __unused) -{ - /* - * When doing reverse DNS lookups, the seenint flag might not - * be noticed for a while. Just exit if we get a second SIGINT. - */ - if ((options & F_HOSTNAME) && seenint != 0) - _exit(nreceived ? 0 : 2); -} - -/* - * summary -- - * Print out statistics. - */ -static void -summary(void) -{ - - (void)printf("\n--- %s ping6 statistics ---\n", hostname); - (void)printf("%ld packets transmitted, ", ntransmitted); - (void)printf("%ld packets received, ", nreceived); - if (nrepeats) - (void)printf("+%ld duplicates, ", nrepeats); - if (ntransmitted) { - if (nreceived > ntransmitted) - (void)printf("-- somebody's duplicating packets!"); - else - (void)printf("%.1f%% packet loss", - ((((double)ntransmitted - nreceived) * 100.0) / - ntransmitted)); - } - if (nrcvtimeout) - printf(", %ld packets out of wait time", nrcvtimeout); - (void)putchar('\n'); - if (nreceived && timing) { - /* Only display average to microseconds */ - double num = nreceived + nrepeats; - double avg = tsum / num; - double stddev = sqrt(fmax(0, tsumsq / num - avg * avg)); - (void)printf( - "round-trip min/avg/max/std-dev = %.3f/%.3f/%.3f/%.3f ms\n", - tmin, avg, tmax, stddev); - (void)fflush(stdout); - } - (void)fflush(stdout); -} - /*subject type*/ static const char *niqcode[] = { "IPv6 address", @@ -2640,7 +2541,7 @@ pr_addr(struct sockaddr *addr, int addrlen) static char buf[NI_MAXHOST]; int flag = 0; - if ((options & F_HOSTNAME) == 0) + if (!(options & F_HOSTNAME)) flag |= NI_NUMERICHOST; if (cap_getnameinfo(capdns, addr, addrlen, buf, sizeof(buf), NULL, 0, diff --git a/sbin/ping/tests/ping_6_c1_s8_t1.out b/sbin/ping/tests/ping_6_c1_s8_t1.out index 81c56e6cf586..0d207e74bc3e 100644 --- a/sbin/ping/tests/ping_6_c1_s8_t1.out +++ b/sbin/ping/tests/ping_6_c1_s8_t1.out @@ -1,6 +1,6 @@ -PING6(56=40+8+8 bytes) ::1 --> ::1 +PING(56=40+8+8 bytes) ::1 --> ::1 16 bytes from ::1, icmp_seq=0 hlim= time= ms ---- localhost ping6 statistics --- +--- localhost ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss -round-trip min/avg/max/std-dev = /// ms +round-trip min/avg/max/stddev = /// ms diff --git a/sbin/ping/tests/ping_c1_s8_t1_S1.out b/sbin/ping/tests/ping_c1_s8_t1_S1.out index 81c56e6cf586..0d207e74bc3e 100644 --- a/sbin/ping/tests/ping_c1_s8_t1_S1.out +++ b/sbin/ping/tests/ping_c1_s8_t1_S1.out @@ -1,6 +1,6 @@ -PING6(56=40+8+8 bytes) ::1 --> ::1 +PING(56=40+8+8 bytes) ::1 --> ::1 16 bytes from ::1, icmp_seq=0 hlim= time= ms ---- localhost ping6 statistics --- +--- localhost ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss -round-trip min/avg/max/std-dev = /// ms +round-trip min/avg/max/stddev = /// ms diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index 1c2540cb6d15..c51823103133 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -311,12 +311,12 @@ round-trip min/avg/max/stddev = /// ms "args": "ping -6 -c1 -s8 -t1 localhost", "returncode": 0, "stdout": """\ -PING6(56=40+8+8 bytes) ::1 --> ::1 +PING(56=40+8+8 bytes) ::1 --> ::1 16 bytes from ::1, icmp_seq=0 hlim= time= ms ---- localhost ping6 statistics --- +--- localhost ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss -round-trip min/avg/max/std-dev = /// ms +round-trip min/avg/max/stddev = /// ms """, "stderr": "", }, @@ -357,12 +357,12 @@ PING 192.0.2.2 (192.0.2.2): 56 data bytes "args": "ping -A -c1 2001:db8::1", "returncode": 0, "stdout": """\ -PING6(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::1 +PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::1 16 bytes from 2001:db8::1, icmp_seq=0 hlim= time= ms ---- 2001:db8::1 ping6 statistics --- +--- 2001:db8::1 ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss -round-trip min/avg/max/std-dev = /// ms +round-trip min/avg/max/stddev = /// ms """, "stderr": "", }, @@ -373,9 +373,9 @@ round-trip min/avg/max/std-dev = /// ms "args": "ping -A -c1 2001:db8::2", "returncode": 2, "stdout": """\ -PING6(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 +PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 ---- 2001:db8::2 ping6 statistics --- +--- 2001:db8::2 ping statistics --- 1 packets transmitted, 0 packets received, 100.0% packet loss """, "stderr": "", @@ -419,14 +419,14 @@ round-trip min/avg/max/stddev = /// ms "args": "ping -A -c3 2001:db8::1", "returncode": 0, "stdout": """\ -PING6(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::1 +PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::1 16 bytes from 2001:db8::1, icmp_seq=0 hlim= time= ms 16 bytes from 2001:db8::1, icmp_seq=1 hlim= time= ms 16 bytes from 2001:db8::1, icmp_seq=2 hlim= time= ms ---- 2001:db8::1 ping6 statistics --- +--- 2001:db8::1 ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss -round-trip min/avg/max/std-dev = /// ms +round-trip min/avg/max/stddev = /// ms """, "stderr": "", }, @@ -437,9 +437,9 @@ round-trip min/avg/max/std-dev = /// ms "args": "ping -A -c3 2001:db8::2", "returncode": 2, "stdout": """\ -\x07\x07PING6(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 +\x07\x07PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 ---- 2001:db8::2 ping6 statistics --- +--- 2001:db8::2 ping statistics --- 3 packets transmitted, 0 packets received, 100.0% packet loss """, "stderr": "", @@ -481,12 +481,12 @@ PING 192.0.2.2 (192.0.2.2): 56 data bytes "args": "ping -c1 2001:db8::1", "returncode": 0, "stdout": """\ -PING6(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::1 +PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::1 16 bytes from 2001:db8::1, icmp_seq=0 hlim= time= ms ---- 2001:db8::1 ping6 statistics --- +--- 2001:db8::1 ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss -round-trip min/avg/max/std-dev = /// ms +round-trip min/avg/max/stddev = /// ms """, "stderr": "", }, @@ -497,9 +497,9 @@ round-trip min/avg/max/std-dev = /// ms "args": "ping -c1 2001:db8::2", "returncode": 2, "stdout": """\ -PING6(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 +PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 ---- 2001:db8::2 ping6 statistics --- +--- 2001:db8::2 ping statistics --- 1 packets transmitted, 0 packets received, 100.0% packet loss """, "stderr": "", @@ -527,12 +527,12 @@ round-trip min/avg/max/stddev = /// ms "args": "ping -c1 -S::1 -s8 -t1 localhost", "returncode": 0, "stdout": """\ -PING6(56=40+8+8 bytes) ::1 --> ::1 +PING(56=40+8+8 bytes) ::1 --> ::1 16 bytes from ::1, icmp_seq=0 hlim= time= ms ---- localhost ping6 statistics --- +--- localhost ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss -round-trip min/avg/max/std-dev = /// ms +round-trip min/avg/max/stddev = /// ms """, "stderr": "", }, @@ -575,14 +575,14 @@ PING 192.0.2.2 (192.0.2.2): 56 data bytes "args": "ping -c3 2001:db8::1", "returncode": 0, "stdout": """\ -PING6(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::1 +PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::1 16 bytes from 2001:db8::1, icmp_seq=0 hlim= time= ms 16 bytes from 2001:db8::1, icmp_seq=1 hlim= time= ms 16 bytes from 2001:db8::1, icmp_seq=2 hlim= time= ms ---- 2001:db8::1 ping6 statistics --- +--- 2001:db8::1 ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss -round-trip min/avg/max/std-dev = /// ms +round-trip min/avg/max/stddev = /// ms """, "stderr": "", }, @@ -593,9 +593,9 @@ round-trip min/avg/max/std-dev = /// ms "args": "ping -c3 2001:db8::2", "returncode": 2, "stdout": """\ -PING6(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 +PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 ---- 2001:db8::2 ping6 statistics --- +--- 2001:db8::2 ping statistics --- 3 packets transmitted, 0 packets received, 100.0% packet loss """, "stderr": "", @@ -636,11 +636,11 @@ PING 192.0.2.2 (192.0.2.2): 56 data bytes "args": "ping -q -c1 2001:db8::1", "returncode": 0, "stdout": """\ -PING6(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::1 +PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::1 ---- 2001:db8::1 ping6 statistics --- +--- 2001:db8::1 ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss -round-trip min/avg/max/std-dev = /// ms +round-trip min/avg/max/stddev = /// ms """, "stderr": "", }, @@ -651,9 +651,9 @@ round-trip min/avg/max/std-dev = /// ms "args": "ping -q -c1 2001:db8::2", "returncode": 2, "stdout": """\ -PING6(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 *** 34 LINES SKIPPED *** From nobody Wed Oct 11 18:01:07 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 4S5LDN0Wpbz4wTht; Wed, 11 Oct 2023 18:01:08 +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 4S5LDM72NSz4Pqm; Wed, 11 Oct 2023 18:01:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697047268; 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=VreEXkOytXb3xwQAMlM6AKJKNCBJ+uGx9J6FHaZvuMY=; b=IiS4jnS4Q2mPZCPIBDvJtkBMKAsyLwW1uqcaJbZeQ0vrvcjLn3kxZqTtIqup+/KOhMRrQ/ xGnCw63DiofmI1gZ73ufNkoWDXIoRnc7AND+1ydPe/5N9tj1FKQXfJqWZudJg4nu4U5hKO GZ1OoTMVm7oZwfimtcsKY+pMHDgMa5SzPjYUTRrJz5Hy03EVtaxJ33QctRikNnv7Mg0Iky PBZUrTvEwUbZrCMOgx6qq5aKvvtXYzm7eeZ0f6b0bwGLsBNB31qFD4GgAtyDqTxSRkZ1vp xN4Wkx/GDQA9w8gbPLO6EjQPgOh9dzrZCRKvsGkRGE36s57yAVIr1kx1RTPSQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697047268; a=rsa-sha256; cv=none; b=MkKWJoPWt6DNVA6Z4twl38m9G4FpUvDml1l/lr/0RL6T7v+SekQ/ZkhFYvrjFc07h4T/H0 LAFyAmszBkPL4CmiAGJopiknvxQ1qjhXxGxBZrR2tUPuXOF5mAQM4qzXuR9daUqZhfImTQ Oly07uRkvY6dY7YLuT27bOsY8yQFJN5kKPEMWQg7aGwyTxd6XuB+qaXHAsBWudEJJCPfGp TLK8M5VoYOCn+QKs3DrHFQ3Sag+rc0w79Yo0hvXAvYRczWmqv8BAxpS/i6v2leQPFqBFGM TSYf8Km/bMMCWlR4HMVLqD1m/8GiZZ9uP0KzNMV4hfRhAhkTPJ1QHHySHeoXfg== 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=1697047268; 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=VreEXkOytXb3xwQAMlM6AKJKNCBJ+uGx9J6FHaZvuMY=; b=tDCDgo1V7cWjASB9TT0slVdK9hpeTRtZ1yP2M3GGlOTESwlUwPwodTIH+jO5D5xCxlPlg8 B1s/fIXuuffnotkxwrX1K8AEOqHtzLBf9hb3wrVpnaQcOYcae3SaCkKRCOsYnXeVyk8Op+ uOWEG5poq7XOUiacvyfKt0Ujq7HDEFyybf8h8W7k2hFgnXuIOBQSa9VoNJzM8yQV7W+Jfv esc4JVBpCmD1/6LreGylLT3r744d40CyIzsFS40CRBE+ERgttLaMkz5lo5vut69OM+3ztL 76TkVyaEf6x4DO1bZjBu5vIATBi52/oxrcHNQzLb+FLO4tGIhBwSzYdOmjzCWA== 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 4S5LDM680NzWt3; Wed, 11 Oct 2023 18:01:07 +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 39BI173r053867; Wed, 11 Oct 2023 18:01:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BI17k2053864; Wed, 11 Oct 2023 18:01:07 GMT (envelope-from git) Date: Wed, 11 Oct 2023 18:01:07 GMT Message-Id: <202310111801.39BI17k2053864@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: 8db2c5802abe - main - ping: Fix the spacing between the time stamp and cp/dp 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: 8db2c5802abe14543504e17ab5ed6325088a63f3 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8db2c5802abe14543504e17ab5ed6325088a63f3 commit 8db2c5802abe14543504e17ab5ed6325088a63f3 Author: Jose Luis Duran AuthorDate: 2023-04-10 16:58:42 +0000 Commit: Mark Johnston CommitDate: 2023-10-11 17:48:28 +0000 ping: Fix the spacing between the time stamp and cp/dp When an echo reply packet is received, the data is compared with the sent data. When a wrong byte is detected the command displays a report with the differences. The first row (the first 8-bytes of data after the ICMP header) should include the time stamp (if data is at least 8-bytes), this value is not taken into consideration for the comparison. The remaining rows represent the data (padded pattern) received/sent, with each byte being compared for differences. Print the space before (not after), to add an extra space after cp:/dp: for better readability when the first time stamp octet is not zero-padded, and to remove trailing spaces in the output. Before: cp:99 0 0 c 1 5 c 0␣ ab cd ab cd ab cd ab cd ab cd ab cd ab cd ab cd␣ ... After: cp: 99 0 0 c 1 5 c 0 ab cd ab cd ab cd ab cd ab cd ab cd ab cd ab cd ... Reviewed by: markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/863 Differential Revision: https://reviews.freebsd.org/D39492 --- sbin/ping/ping.c | 4 ++-- sbin/ping/tests/test_ping.py | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index bbb103a7361f..fcc27d34ee54 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1261,14 +1261,14 @@ pr_pack(char *buf, ssize_t cc, struct sockaddr_in *from, struct timespec *tv) for (i = 0; i < datalen; ++i, ++cp) { if ((i % 16) == 8) (void)printf("\n\t"); - (void)printf("%2x ", *cp); + (void)printf(" %2x", *cp); } (void)printf("\ndp:"); cp = &outpack[ICMP_MINLEN]; for (i = 0; i < datalen; ++i, ++cp) { if ((i % 16) == 8) (void)printf("\n\t"); - (void)printf("%2x ", *cp); + (void)printf(" %2x", *cp); } break; } diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index c51823103133..545e680fbc9f 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -275,6 +275,8 @@ def redact(output): ("hlim=[0-9]*", "hlim="), ("ttl=[0-9]*", "ttl="), ("time=[0-9.-]*", "time="), + ("cp: .*", "cp: xx xx xx xx xx xx xx xx"), + ("dp: .*", "dp: xx xx xx xx xx xx xx xx"), ("\(-[0-9\.]+[0-9]+ ms\)", "(- ms)"), ("[0-9\.]+/[0-9.]+", "/"), ] @@ -1401,6 +1403,39 @@ ping: time of day goes back (- ms), clamping time to 0 }, id="_0_0_special_warp", ), + pytest.param( + { + "src": "192.0.2.1", + "dst": "192.0.2.2", + "icmp_type": 0, + "icmp_code": 0, + "special": "wrong", + }, + { + "returncode": 0, + "stdout": """\ +PATTERN: 0x01 +PING 192.0.2.2 (192.0.2.2): 56 data bytes +64 bytes from: icmp_seq=0 ttl= time= ms +wrong data byte #55 should be 0x1 but was 0x0 +cp: xx xx xx xx xx xx xx xx + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 +dp: xx xx xx xx xx xx xx xx + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + +--- 192.0.2.2 ping statistics --- +1 packets transmitted, 1 packets received, 0.0% packet loss +round-trip min/avg/max/stddev = /// ms +""", + "stderr": "", + "redacted": True, + }, + id="_0_0_special_wrong", + ), ] @pytest.mark.parametrize("pinger_kargs, expected", pinger_testdata) From nobody Wed Oct 11 18:01: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 4S5LDP22Zwz4wTnK; Wed, 11 Oct 2023 18:01:09 +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 4S5LDP0bcwz4PrG; Wed, 11 Oct 2023 18:01:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697047269; 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=ufrxik+aHR6HR6vV6g9AOCkdv6g2dmBFWlupaud/FWs=; b=aVOkHkO+u1xo2/vqYKYq7MI3Zim1xLHNU700lS+2vJ/BAJp3ROMk1ydnOpoT8ndg5L00jo fCC6dg8NUdEOR8R92nM7yWqHY7oXX13WkXXqd969bV6cJowm1cYPGd8SiqLbUCcI/e/22c 4olixkfv1iK8DG80lW4j3rlWMPSCounVFWnjI+PgTzc2H09Ekty2ul3A178YNQFT/Y/BuM 8rVuBQwMF+Nd6RJyaRKzNhuDZPC98UR+d/T6wLTaPJ4/lFUmO36cvb2GNhMI0PXuXpXZCo Wkq/n+4BgRaiFQLulIto02BA2KnBYT/gk6x2pBEU2m502Icl0iLu44jOCq4ZCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697047269; a=rsa-sha256; cv=none; b=ORA4/cSJXSes4PgpoSPK2XGpNDf9dAxblFcxBTyuxqmHgSlsVH3d/TpB+9qdxygp0dzdyd bWf4S0QjA2Ec0Hq1fJV2Lypx3fyXxmNKis89RS6ZrRQ3jl6y5/xHBG5kwoNalNPlWeHHXZ Uv30NxCDGwiXI7LV551kh6dStk8/6WjNJjYGCQQtMU0OSV4N3+486gBZ0CWVXXXDbL87FR SC+meM/otZ9X7oixRsG6TDsdK2VQGod6nEK7xdOGzXJyZm5b5N9H/dqbQQSmwFKGrfbOzv cDNchObInIUPm+USCnYHR59ZgYCsyboNKSfacXbVm3Zxj2bdm9pKyVSssIQfPw== 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=1697047269; 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=ufrxik+aHR6HR6vV6g9AOCkdv6g2dmBFWlupaud/FWs=; b=YgRvMv3OcLivqayRmm++mCEpxAL2yhCgNRL3C7yNGL/NGirl7/pXDfJ6s1fxZD7zk8Dxql fX3c0/s3cgaXNeIoKK2qZjRlbWuNfcaGZjLFZ3H0v9Fg/HrO+soXreWbwq+P5N7WagtA2D Pt4m1POndjfnDiuVi/ZUGxxdOzvMcSQnfJh4EE/33N/CXTfU3ssG74N/nLUzTQAXoI/inv Yv+2xT20xdooDCPUGoLA6DThPtWlr4W2Fv/kpQyNbqEljZ7KsHADaZrscKsJBm6seJh8Xe tfw85FzAchp58+2YKIkEqaaPpoFoJY8PTpKRjd7I1PdOnTuR6Dux5EoGoDzBdA== 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 4S5LDN6lzGzWSy; Wed, 11 Oct 2023 18:01:08 +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 39BI18uY053903; Wed, 11 Oct 2023 18:01:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BI18eL053900; Wed, 11 Oct 2023 18:01:08 GMT (envelope-from git) Date: Wed, 11 Oct 2023 18:01:08 GMT Message-Id: <202310111801.39BI18eL053900@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: b86e4812cce8 - main - ping: pr_iph() improvements 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: b86e4812cce88920cb592bd3b8571572373dbb9c Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b86e4812cce88920cb592bd3b8571572373dbb9c commit b86e4812cce88920cb592bd3b8571572373dbb9c Author: Jose Luis Duran AuthorDate: 2023-04-13 15:30:44 +0000 Commit: Mark Johnston CommitDate: 2023-10-11 17:48:28 +0000 ping: pr_iph() improvements Very early on, the Src/Dst IP addresses were printed in hex notation (%08x), which will always be 8-characters wide. It was later changed to use a dot-decimal notation. Depending on the IP address length, the Src and Dst headers may require a different padding. Use the source and destination IP lengths as padding for the headers. Also, print an Opts (options) header, if there are options present. It has been abbreviated to Opts to match the length of the previous Data header, removed in ef9e6dc7eebe9830511602904d3ef5218d964080. Print the header info such that no trailing spaces are produced. As some git workflows may automatically trim them, and make the tests fail (see 25b86f8559c2e7076daff56933217e95cd4398d4). Before Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 f 00 007c 0001 0 0000 40 01 d868 192.0.2.1 192.0.2.2␣ After Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 f 00 007c 0001 0 0000 40 01 d868 192.0.2.1 192.0.2.2 And with options: Before Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 f 00 007c 0001 0 0000 40 01 d868 192.0.2.1 192.0.2.2 01... After Vr HL TOS Len ID Flg off TTL Pro cks Src Dst Opts 4 f 00 007c 0001 0 0000 40 01 d868 192.0.2.1 192.0.2.2 01... Reviewed by: markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/863 Differential Revision: https://reviews.freebsd.org/D39561 --- sbin/ping/ping.c | 25 +++++++++++++++++-------- sbin/ping/tests/test_ping.py | 12 ++++++------ 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index fcc27d34ee54..3b8663772e87 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1561,13 +1561,21 @@ pr_icmph(struct icmp *icp, struct ip *oip, const u_char *const oicmp_raw) static void pr_iph(struct ip *ip, const u_char *cp) { - struct in_addr ina; + struct in_addr dst_ina, src_ina; int hlen; hlen = ip->ip_hl << 2; cp = cp + sizeof(struct ip); /* point to options */ - (void)printf("Vr HL TOS Len ID Flg off TTL Pro cks Src Dst\n"); + memcpy(&src_ina, &ip->ip_src.s_addr, sizeof(src_ina)); + memcpy(&dst_ina, &ip->ip_dst.s_addr, sizeof(dst_ina)); + + (void)printf("Vr HL TOS Len ID Flg off TTL Pro cks %*s %*s", + (int)strlen(inet_ntoa(src_ina)), "Src", + (int)strlen(inet_ntoa(dst_ina)), "Dst"); + if (hlen > (int)sizeof(struct ip)) + (void)printf(" Opts"); + (void)putchar('\n'); (void)printf(" %1x %1x %02x %04x %04x", ip->ip_v, ip->ip_hl, ip->ip_tos, ntohs(ip->ip_len), ntohs(ip->ip_id)); @@ -1576,13 +1584,14 @@ pr_iph(struct ip *ip, const u_char *cp) ntohs(ip->ip_off) & 0x1fff); (void)printf(" %02x %02x %04x", ip->ip_ttl, ip->ip_p, ntohs(ip->ip_sum)); - memcpy(&ina, &ip->ip_src.s_addr, sizeof ina); - (void)printf(" %s ", inet_ntoa(ina)); - memcpy(&ina, &ip->ip_dst.s_addr, sizeof ina); - (void)printf(" %s ", inet_ntoa(ina)); + (void)printf(" %s", inet_ntoa(src_ina)); + (void)printf(" %s", inet_ntoa(dst_ina)); /* dump any option bytes */ - while (hlen-- > (int)sizeof(struct ip)) { - (void)printf("%02x", *cp++); + if (hlen > (int)sizeof(struct ip)) { + (void)printf(" "); + while (hlen-- > (int)sizeof(struct ip)) { + (void)printf("%02x", *cp++); + } } (void)putchar('\n'); } diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index 545e680fbc9f..645940a62cb6 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -1244,8 +1244,8 @@ round-trip min/avg/max/stddev = /// ms "stdout": """\ PING 192.0.2.2 (192.0.2.2): 56 data bytes 132 bytes from 192.0.2.2: Destination Host Unreachable -Vr HL TOS Len ID Flg off TTL Pro cks Src Dst - 4 f 00 007c 0001 0 0000 40 01 d868 192.0.2.1 192.0.2.2 01010101010101010101010101010101010101010101010101010101010101010101010101010101 +Vr HL TOS Len ID Flg off TTL Pro cks Src Dst Opts + 4 f 00 007c 0001 0 0000 40 01 d868 192.0.2.1 192.0.2.2 01010101010101010101010101010101010101010101010101010101010101010101010101010101 --- 192.0.2.2 ping statistics --- @@ -1269,8 +1269,8 @@ Vr HL TOS Len ID Flg off TTL Pro cks Src Dst "stdout": """\ PING 192.0.2.2 (192.0.2.2): 56 data bytes 92 bytes from 192.0.2.2: Destination Host Unreachable -Vr HL TOS Len ID Flg off TTL Pro cks Src Dst - 4 5 00 0054 0001 2 0000 40 01 b6a4 192.0.2.1 192.0.2.2 +Vr HL TOS Len ID Flg off TTL Pro cks Src Dst + 4 5 00 0054 0001 2 0000 40 01 b6a4 192.0.2.1 192.0.2.2 --- 192.0.2.2 ping statistics --- @@ -1342,8 +1342,8 @@ ping: quoted data too short (28 bytes) from 192.0.2.2 "stdout": """\ PING 192.0.2.2 (192.0.2.2): 56 data bytes 92 bytes from 192.0.2.2: Destination Host Unreachable -Vr HL TOS Len ID Flg off TTL Pro cks Src Dst - 4 5 00 0054 0001 0 0000 40 01 f6a4 192.0.2.1 192.0.2.2 +Vr HL TOS Len ID Flg off TTL Pro cks Src Dst + 4 5 00 0054 0001 0 0000 40 01 f6a4 192.0.2.1 192.0.2.2 --- 192.0.2.2 ping statistics --- From nobody Wed Oct 11 18:01:09 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 4S5LDQ2WxJz4wTtS; Wed, 11 Oct 2023 18:01: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 4S5LDQ1KXJz4Q4f; Wed, 11 Oct 2023 18:01:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697047270; 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=k8vIKftvoW4AWiAgi09ClI4Z2QcPic2V5UvR18P/3t8=; b=JnQTcSk2CorudDFJ8O6Jf/Yukowvhm1p8H6Pk6QWJ2wkbpo/cQi145zUk9y8LRSvdNrGdH 9IRfEnuz4bAS4Yxk4tKK+ZEUsyVctpMBD/MfDuDOGJJbkSxS9R63YVV2AfsfCDKpUOxfC9 HZcnwRqooseN8fEZf89VVMdhvpos30YjrLdh4nacicqbiINeILuM7gZv41TnWPOvXh0fGf dv04+80ViEZ9qZtBOcHnXSTyvxfHeGtDnA0Nydp38N0Wn7h6i1L+swj/AMvFn6ugN36Dq0 ZcQobODn9JUg5/Q15AeKgSTTmiyEIrGn04a6bkkeP0bNAb7f4teX5IfR4MwlFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697047270; a=rsa-sha256; cv=none; b=Xx9z0rOotzSzsQkAHZv6kTPyK2dF1BJ1ARMUKaPof+ecmPu4aqGK4MgUxYN7OrANp97Kt4 fE6RvPo34d96ArJKsRKEf2vfJhcbs/S/5lrjpvI7/Mdl+Rcs7+9rxaI8qSAFY+uijv/wvJ xrw5VCuGBOMt171TChgO/dF9E2U84G3gJZAsFtirfVWQcGH/PK2dja52hfnXtbz2fHXGRB KI0GktXJmCHn4fF+QQ4vZcyp79q7uSOEg1ch0B4ta2xg+I5Px0evMmEu8iPSXR4xhcQuui s8AdxRoQHo8U2ioKBsIjVqTmlNWqwZ6LNTmCcWu4YOWuEp4gycWMTIAAnGo8JQ== 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=1697047270; 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=k8vIKftvoW4AWiAgi09ClI4Z2QcPic2V5UvR18P/3t8=; b=pULR+MDO522Rwi8ufYPhz6qfOlw7NEXq39s/iVpMYuzUNnJ+71AGEyWfu8EsYZVMs+QNYh e6ZkU3yiFHwjRE3FZjLmJjf8971m+APW48sAJZflC1b0fkp1l8NVNDUHQYNTqXkPWklTjB 8BKvZoT2bWm6d2lQCWGz6mbn+IqK/0Lu36680RwKXrNuUWDXdB408vt2OwdGlUtmSraJiK /AY0WRdOEXS/YdkBh7aTMZNjpsYD6MiTD8DjNBBXscaljhwJkP8m0r7yv4PpgqjSoZ9zg+ mQnb5hkzrDx+tzxRkI0Tf8+hB2mxhAQja8D8d0N+zukxF7e0es12NH3kz1cp9A== 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 4S5LDQ0RVQzVkm; Wed, 11 Oct 2023 18:01: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 39BI190p053949; Wed, 11 Oct 2023 18:01:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BI19jf053946; Wed, 11 Oct 2023 18:01:09 GMT (envelope-from git) Date: Wed, 11 Oct 2023 18:01:09 GMT Message-Id: <202310111801.39BI19jf053946@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: 4efaf43c6fa7 - main - ping: Require root user for pytests 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: 4efaf43c6fa76e0daa1ed5ea535d863f15415bf4 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4efaf43c6fa76e0daa1ed5ea535d863f15415bf4 commit 4efaf43c6fa76e0daa1ed5ea535d863f15415bf4 Author: Jose Luis Duran AuthorDate: 2023-10-11 13:57:11 +0000 Commit: Mark Johnston CommitDate: 2023-10-11 17:48:28 +0000 ping: Require root user for pytests atf_python may use vnet jails for creating an isolated test environment. Mark these tests that require root user privileges. Reviewed by: markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/863 --- sbin/ping/tests/test_ping.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index 645940a62cb6..900fbf45d52d 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -723,6 +723,7 @@ PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 ] @pytest.mark.parametrize("expected", testdata) + @pytest.mark.require_user("root") def test_ping(self, expected): """Test ping""" ping = subprocess.run( @@ -751,6 +752,7 @@ PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 ] @pytest.mark.parametrize("expected", ping46_testdata) + @pytest.mark.require_user("root") def test_ping_46(self, expected): """Test ping -4/ping -6""" for version in [4, 6]: From nobody Wed Oct 11 19:10: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 4S5Mmx4z53z4wZKY; Wed, 11 Oct 2023 19:10: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 4S5Mmx4Xx3z4dnr; Wed, 11 Oct 2023 19:10:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697051457; 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=imhVfE5ehvRESC2KZpbgseRp/X8X7svG3DmGx4efUTg=; b=dxhzcaKVLrarrx3vQ4+arjXwT7aFJHO3mQ3L2l3E9F14dA/AVgCkCHJf5XignklSOpDhaF FDb+eOK0CzaiR4RVIVnYK+pquVoi8mRCkeMs2Z6Gt8oIopI/PLiaGVpHap+UiduzG8WHz+ s20deE8eVNrJ16Y5u3hP6C9R43qNsNIxMiGTAv571Y85iXgxBWofhERykdfPDA2IIJWJVl n6PnheA+7Rl7w/Q8JdtfIRWM6GLc12Z7PKqvOT4uvDwyco4aOBr0E/OXvEoqGva/QYXg6J PM83ymb932uSoitJkH+Ilrz+QwqUUfi6ZQhYg67RlxcsK95rwapV1lOqsvDROg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697051457; a=rsa-sha256; cv=none; b=xC+JhsNo8ZX3kik5fY6aXwLCnCNT5UxveFZhdN4nQ0aAHIqIC2GChqMrrzWUWRzll06DzJ 1ohdvnbKCdbqOVPNVpJke1eAcUyhoTYunAw3PIOB8rexUD84rUONm/Uj1MTZf35gAICd/a m/m0JG7+j0C04YwtpB+uaAHuqlWdUl2Kn/n51v4zU/Xy2lQ1X8boUGToled127nEHPY6yw vwWXHyUUFGIVUVpNx2En2198biXtoWB6uan/8Cj2byYxwoRoARfjbNF94ACb0O1N+8gZs+ neIzTofcE554KXi4Gwg1KmzUKPtqdozYPBmhysai/9IAX62nG8FlrK1EsIvu2A== 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=1697051457; 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=imhVfE5ehvRESC2KZpbgseRp/X8X7svG3DmGx4efUTg=; b=ni/895BRh3bAoLVUsV+tx5XI94A5VHU4MfIrxUh5QjhlLOicwFdW5whQMF5sat9sClFzpC mJ/KbUqgtLbth3ZZXbcTzSGqkpeO2rmReUp8wzw53YS9h3bfjD80rjaESWvYcbwaM7M/oI YUWOmavjXyIon1zWobywucd9YyAGgDlcJaSYPCNJeqn+dZg1UIgCRdP/GiB6wr9IW9hCBP gAUfzg9jIf065SVfMKpAPnsR/Vwfj3e/QbcgtQ5EBL/7zE9nrisnNxkkzMMYQi1kRmhDP1 BuKYtBYa98P6qUojzbB8oqStcUAIoZPMycT5gzSRjeSx5YzhYoaN909O8A8Suw== 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 4S5Mmx3cQlzYly; Wed, 11 Oct 2023 19:10: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 39BJAvUv069231; Wed, 11 Oct 2023 19:10:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BJAvC8069228; Wed, 11 Oct 2023 19:10:57 GMT (envelope-from git) Date: Wed, 11 Oct 2023 19:10:57 GMT Message-Id: <202310111910.39BJAvC8069228@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 0983e80a9add - main - pkgbase: Move blacklist utilities to a new package 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0983e80a9addbd65603a430e186d2a50b4e15e29 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=0983e80a9addbd65603a430e186d2a50b4e15e29 commit 0983e80a9addbd65603a430e186d2a50b4e15e29 Author: Emmanuel Vadot AuthorDate: 2023-10-10 14:41:52 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-11 19:07:05 +0000 pkgbase: Move blacklist utilities to a new package Unbloat a bit FreeBSD-utilities. The only package that will depends on this new one is FreeBSD-ssh which not anyone have in some setup. And this will allow to have small pkgbase setup with ssh without having to bring the bloated FreeBSD-utilities package Name the package blocklist to reflect upstream futur changes. Sponsored by: Beckhoff Automation GmbH & Co. KG Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42148 --- lib/libblacklist/Makefile | 1 + release/packages/Makefile.package | 2 ++ usr.sbin/blacklistctl/Makefile | 2 ++ usr.sbin/blacklistd/Makefile | 2 ++ 4 files changed, 7 insertions(+) diff --git a/lib/libblacklist/Makefile b/lib/libblacklist/Makefile index e8d25ac7f1b8..932e186e3172 100644 --- a/lib/libblacklist/Makefile +++ b/lib/libblacklist/Makefile @@ -3,6 +3,7 @@ BLACKLIST_DIR=${SRCTOP}/contrib/blacklist .PATH: ${BLACKLIST_DIR}/lib ${BLACKLIST_DIR}/include +PACKAGE= blocklist LIB= blacklist SHLIB_MAJOR= 0 diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package index cf91873fd8cf..255ef648329d 100644 --- a/release/packages/Makefile.package +++ b/release/packages/Makefile.package @@ -17,6 +17,8 @@ bhyve_COMMENT= Bhyve Utilities bhyve_DESC= Bhyve Utilities binutils_COMMENT= Binutils binutils_DESC= Binutils +blocklist_COMMENT= Blocklist Utilities +blocklist_DESC= Blocklist Utilities bluetooth_COMMENT= Bluetooth Utilities bluetooth_DESC= Bluetooth Utilities bootloader_COMMENT= Bootloader diff --git a/usr.sbin/blacklistctl/Makefile b/usr.sbin/blacklistctl/Makefile index effba6761154..1e4778bf0953 100644 --- a/usr.sbin/blacklistctl/Makefile +++ b/usr.sbin/blacklistctl/Makefile @@ -2,6 +2,8 @@ BLACKLIST_DIR=${SRCTOP}/contrib/blacklist .PATH: ${BLACKLIST_DIR}/bin ${BLACKLIST_DIR}/port +PACKAGE= blocklist + PROG= blacklistctl SRCS= blacklistctl.c conf.c state.c support.c internal.c \ sockaddr_snprintf.c pidfile.c strtoi.c popenve.c diff --git a/usr.sbin/blacklistd/Makefile b/usr.sbin/blacklistd/Makefile index a33ea1d285b1..b6d1e236911e 100644 --- a/usr.sbin/blacklistd/Makefile +++ b/usr.sbin/blacklistd/Makefile @@ -2,6 +2,8 @@ BLACKLIST_DIR=${SRCTOP}/contrib/blacklist .PATH: ${BLACKLIST_DIR}/bin ${BLACKLIST_DIR}/port +PACKAGE= blocklist + CONFS= blacklistd.conf PROG= blacklistd SRCS= blacklistd.c conf.c run.c state.c support.c internal.c \ From nobody Wed Oct 11 19:10: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 4S5Mmy63k0z4wZNF; Wed, 11 Oct 2023 19:10: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 4S5Mmy5Plyz4dmD; Wed, 11 Oct 2023 19:10:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697051458; 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=WunLUETKkoKtMAsDqxorNndlYx2iXFKBGXwW6xgEARg=; b=oSx4ZVLOWZdUgNqZM2vKFuxZugc/xE8iLbHdgY1FH+JxL+VBL9/0uwGUSmbUccN/pZ+jfa REqDZmsnWEXe0SBH5I6+N8NkS24lwJ2K2F/K+QQaEyzwBWTTo44gc4QmTq3SeItqVsKdSz sVEvXt8YrvBI9XfesjG1prUYaWe0EYmqTULa2qGLuGTAaAzqPDkHTbPol4fynKCMMDrvO3 WQ5TDEGGHpOWnw1hSYu0NdrjERULPEFaZLugj2Xrzd7CHSdSMY6FTfvjX3FCUDH2hhUAtC ZBBoR620boW9TfNsT+SP0/r0w8dsBBq/t8VDA+CezgdqnCpv5sxEQeMefoOMtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697051458; a=rsa-sha256; cv=none; b=sojR4Y2Y0Gh2DwUVdw+PADqo8nLHsipSByW6Um5TYMMh6F36zfEa+DD5fuBRhIq5Gri8Sb NDz0H+XB7Mf2XbAAyzs+IU5jKonWYTff0dCfVTyWDfWhqxrply0axlhbqYjYXYnutqRqBW nR5eP1pV34Yu4DYgJ2BTyifKJSuxHT1NHu5KQ0I1W4Azvhflq4ZQxHKDuzedxL8NO5qK9x rnWUrZ1zn6HLeUJlJaqC6OsDkeAmLk45E8jKjYS2g1QhsCS3bygmFKPwUnegGjuLy9YN35 gYY6NWGfVVo7T66FnSTtjdpyeE/QBC4O5zO815rA7g3IFyFHrJ3+5pyq2dqBRg== 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=1697051458; 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=WunLUETKkoKtMAsDqxorNndlYx2iXFKBGXwW6xgEARg=; b=v6EK2akjB7v8zfv/VyeeIwpTahA6iJ8Kizjy4NniwhVJ5UriWgDvY41LbMBsllYtimLpyn Z/rVua+EE/O+hfxOMV0LshuEwcbQUSj61mBCdt7kPikCnTEuf6a3gQ101qf/KVjaUvztN7 Wa/z8ZjxEDv6RMjbc/Ky98lu9KIfae8HyL/iVlS7yhDEjGeILuNsbv4e0kDCNpbKUAs967 eipE8XdapiBNsIP3dnouqmQza2WnveFtNBNYYZMqFrh/YUnlvvPwQwcS1zAWQ9EzsIMWa7 E8RDGEiueFY81fAPwx/Yd0wcaN/UYNUDR+gwSgWYcZbOWzxRDEhilJFdhr0z0A== 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 4S5Mmy4H34zXxj; Wed, 11 Oct 2023 19:10: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 39BJAwG6069278; Wed, 11 Oct 2023 19:10:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BJAwsG069275; Wed, 11 Oct 2023 19:10:58 GMT (envelope-from git) Date: Wed, 11 Oct 2023 19:10:58 GMT Message-Id: <202310111910.39BJAwsG069275@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 6a804af4c0e3 - main - pkgbase: Move uuidgen to runtime package 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6a804af4c0e3ce3574e23695f587c11f5958bcbb Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=6a804af4c0e3ce3574e23695f587c11f5958bcbb commit 6a804af4c0e3ce3574e23695f587c11f5958bcbb Author: Emmanuel Vadot AuthorDate: 2023-10-10 16:56:20 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-11 19:10:14 +0000 pkgbase: Move uuidgen to runtime package This is useful to have a valid /etc/hostid and /etc/machine-id for small mfsroot based setup and not needing to install FreeBSD-utilities Sponsored by: Beckhoff Automation GmbH & Co. KG Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42149 --- bin/uuidgen/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/uuidgen/Makefile b/bin/uuidgen/Makefile index f0c4ce2e3538..234ee20300eb 100644 --- a/bin/uuidgen/Makefile +++ b/bin/uuidgen/Makefile @@ -1,4 +1,5 @@ +PACKAGE= runtime PROG= uuidgen .include From nobody Wed Oct 11 19:45:35 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 4S5NXv30Hvz4wcVw; Wed, 11 Oct 2023 19:45:35 +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 4S5NXv2Sx6z3Dry; Wed, 11 Oct 2023 19:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697053535; 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=f/MrJTwstubg1zKUByedpiYxLzuOeSGFWn20gCYbPy0=; b=wfbfMaAhwHMc37+fnaP1s4pkRCVS6tg4Fd9t5+fs8za3lXs3H22bupgH/DfPLe/onn1v1c kt40rj4W2RwwbSi3urSraAUYvN0yKbXEDJFgkxTdck+LhRK6HP7bjFuqhwdPafd9Fis3L2 L08sB9AxhtfhBfWejoNTIP8fETe4kEBUyTtSMhqqffk/JUHNJN6Eq2S3y6ninIsodlqA3Z JLi46y7N1ztVh76jpYUMKZIPLELktykN22adlJpuZqnWzFSibRo+mVQDEVVJhkl4ez9rwL 3Qu+4axNK+rj+ye0uXJjiLC+vNioTLGZ5lj3QvFYOzSZrbQREfqZyk7szHrwgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697053535; a=rsa-sha256; cv=none; b=Bqci76cCYVNWNxSE1hslCSgij812b5G69q+YFnqKR1K89qEHhL4Nvm869mREUKrMB95kco nAQGTWbsqE91gvpay4ogWvViKyraSGR9j6DkXAr4xksQj5kVMW3CSNcVGqjooJ1uGebwvk GAKm06KXsUm1g57L4hPGrrP5v5uW/CBvoFJigumbbFFUe2hBObcRFjvpKEpzqxkewFO0KN e61MaERssntW1OLZFkDJaALwDgYmsZLte97yHy5lL66AEr4L/5J4g6hOwlVpZ1/Bk+Ykcj hjndcpcc5lnP74yKCHoE4DmScIPbqoenPPD4PK5sSyusgTogri1j+7t4cjhkBw== 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=1697053535; 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=f/MrJTwstubg1zKUByedpiYxLzuOeSGFWn20gCYbPy0=; b=qJKTlldvAfEU7Ym+G7loIeNhFPmWO9+q7AMDAo2rbRPiIOZ2/St1v/DdZEuYaeAJSKjxmS MMfTP168VTjnL2teefTxrhFzZVmSe7+McRi+Q+6c0bEMtv7WRhXDjuWay3HoV8kX+xSio2 1WmwGM1TOkjT1Sg87HhEKfj89FJzTSQSq/q7GunVs25kYWGwNxHpozQrxu+l08CoeKsZTK AnxZDAFStBYbD3g35SXovn7Cq1m7B+ytCNGQ4YTtG+EDm74gHRztDqogWLft54OC/4J6Qd uCzrdzH/0dkP/4Aq2SdYYDCNee1MrPOo4p1dbBDj4p3bwIep0sghe4fozo9EXA== 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 4S5NXv1QdjzZ2y; Wed, 11 Oct 2023 19:45:35 +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 39BJjZ3t025157; Wed, 11 Oct 2023 19:45:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BJjZnC025154; Wed, 11 Oct 2023 19:45:35 GMT (envelope-from git) Date: Wed, 11 Oct 2023 19:45:35 GMT Message-Id: <202310111945.39BJjZnC025154@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: c4ffb80ef18f - main - ping: Consistently use EX_NOHOST for DNS failures. 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: c4ffb80ef18f6b581dc28c14bc579e0e7c73438c Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c4ffb80ef18f6b581dc28c14bc579e0e7c73438c commit c4ffb80ef18f6b581dc28c14bc579e0e7c73438c Author: Dag-Erling Smørgrav AuthorDate: 2023-10-11 19:44:30 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-11 19:44:30 +0000 ping: Consistently use EX_NOHOST for DNS failures. Traditionally, ping returned exit code EX_NOHOST if a DNS lookup failed. That is still the case for the legacy code in the new merged ping, but not for IPv6 targets, nor when a DNS lookup is performed in order to determine which version of the tool to invoke. While here, also make sure that the error message is consistent. Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D42159 --- sbin/ping/main.c | 10 +++++++--- sbin/ping/ping6.c | 5 +++-- sbin/ping/tests/ping_test.sh | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 5 deletions(-) diff --git a/sbin/ping/main.c b/sbin/ping/main.c index 686b412a19b7..65896a5dba7b 100644 --- a/sbin/ping/main.c +++ b/sbin/ping/main.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include "main.h" @@ -94,6 +95,7 @@ main(int argc, char *argv[]) #endif #if defined(INET) && defined(INET6) struct addrinfo hints, *res, *ai; + const char *target; int error; #endif int opt; @@ -143,6 +145,7 @@ main(int argc, char *argv[]) usage(); #if defined(INET) && defined(INET6) + target = argv[argc - 1]; memset(&hints, 0, sizeof(hints)); hints.ai_socktype = SOCK_RAW; if (feature_present("inet") && !feature_present("inet6")) @@ -151,9 +154,10 @@ main(int argc, char *argv[]) hints.ai_family = AF_INET6; else hints.ai_family = AF_UNSPEC; - error = getaddrinfo(argv[argc - 1], NULL, &hints, &res); + error = getaddrinfo(target, NULL, &hints, &res); if (res == NULL) - errx(1, "%s", gai_strerror(error)); + errx(EX_NOHOST, "cannot resolve %s: %s", + target, gai_strerror(error)); for (ai = res; ai != NULL; ai = ai->ai_next) { if (ai->ai_family == AF_INET) { freeaddrinfo(res); @@ -165,7 +169,7 @@ main(int argc, char *argv[]) } } freeaddrinfo(res); - errx(1, "Unknown host"); + errx(EX_NOHOST, "cannot resolve %s", target); #endif #ifdef INET ping4: diff --git a/sbin/ping/ping6.c b/sbin/ping/ping6.c index a71ef8a84aee..10deb57ad6bc 100644 --- a/sbin/ping/ping6.c +++ b/sbin/ping/ping6.c @@ -654,14 +654,15 @@ ping6(int argc, char *argv[]) error = cap_getaddrinfo(capdns, target, NULL, &hints, &res); if (error) - errx(1, "%s", gai_strerror(error)); + errx(EX_NOHOST, "cannot resolve %s: %s", + target, gai_strerror(error)); if (res->ai_canonname) hostname = strdup(res->ai_canonname); else hostname = target; if (!res->ai_addr) - errx(1, "cap_getaddrinfo failed"); + errx(EX_NOHOST, "cannot resolve %s", target); (void)memcpy(&dst, res->ai_addr, res->ai_addrlen); diff --git a/sbin/ping/tests/ping_test.sh b/sbin/ping/tests/ping_test.sh index 1dff25bd43a6..c30592aa7e2e 100644 --- a/sbin/ping/tests/ping_test.sh +++ b/sbin/ping/tests/ping_test.sh @@ -165,6 +165,39 @@ ping6_4_body() ping6 -4 localhost } +atf_test_case ping_nohost +ping_nohost_head() +{ + atf_set "descr" "ping a nonexistent host" +} +ping_nohost_body() +{ + atf_check -s exit:68 -e match:"cannot resolve" \ + ping nonexistent.in-addr.arpa. +} + +atf_test_case ping4_nohost +ping4_nohost_head() +{ + atf_set "descr" "ping -4 a nonexistent host" +} +ping4_nohost_body() +{ + atf_check -s exit:68 -e match:"cannot resolve" \ + ping -4 nonexistent.in-addr.arpa. +} + +atf_test_case ping6_nohost +ping6_nohost_head() +{ + atf_set "descr" "ping -6 a nonexistent host" +} +ping6_nohost_body() +{ + atf_check -s exit:68 -e match:"cannot resolve" \ + ping -6 nonexistent.in-addr.arpa. +} + atf_test_case "inject_opts" "cleanup" inject_opts_head() { @@ -227,6 +260,9 @@ atf_init_test_cases() atf_add_test_case ping_46 atf_add_test_case ping_64 atf_add_test_case ping6_4 + atf_add_test_case ping_nohost + atf_add_test_case ping4_nohost + atf_add_test_case ping6_nohost atf_add_test_case inject_opts atf_add_test_case inject_pip atf_add_test_case inject_reply From nobody Wed Oct 11 19:45: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 4S5NXw3l1Kz4wcXJ; Wed, 11 Oct 2023 19:45: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 4S5NXw2syJz3FBH; Wed, 11 Oct 2023 19:45:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697053536; 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=ly67lEY41CZ3ta+WZq4lHAgOHyd5NGXdbw4iXF33z3w=; b=gcPhs5MuSMorsyUaYu4tiXcPlrw4Oy73NCBHavkVp8xzq8H5yUZV2vbwv0+qbVfL3GNp9u QZw1TZa8WYMEYN24ER0M5E8DrfALTHv/Rsbq1eHu9myWFSzAedw3MEKQPhplIOVVrFsy/s Ix6hOynF+SgFzOeZTUVGYA0zaNU+uhJh2IWvhqoo/CzWWmzcXtAumyHLPfBvxM/gLAOnFq R21AaWRHnjfWcNLFmopwc9stfE3oKvx3/1sl0hghB/Z8vJ1V5TCLG6FbWBGNKqkF1Z358l F3wV1PcDbFYJwOhVI9TQBFzBUZ+2gT7PIUffhPpskZkciU2q2gNKUd6U0iHf1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697053536; a=rsa-sha256; cv=none; b=OcS4Fw3bxaGSulpcYCVR4BWdgUuM/cMVbzsQARLAYKf3oD5lyqOXCmxZIDmfhDTppyERM0 cBh5mxfiscWX1WhmXaEdrAWmnWCib0JilrqDq70ZwEiwOVrGO9lBNsGmtRD5cOSSVyhRNK xvWUW2wZTAFruuQ0njo0O99VfKtjFXvSgkMMjjyJtvfFYRtyy+iw1d0VuBtY1w2VcDL2qo BAPiyBuM1pedjSHOkQMuScmThNpn6wMhv5+dQ0ggEER6faGb+ASpryaikZYXOyewOyJYiv yvw3+gJCYmuSk1XQ9yZHKz6cp/zPLxZ9Hc67o+Pla6ScZ8rOQ+o2zzKdShB/uA== 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=1697053536; 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=ly67lEY41CZ3ta+WZq4lHAgOHyd5NGXdbw4iXF33z3w=; b=qLauhi3JIySKqFiYnV3JaGN8ClY2AAjK4dGgYMek0LtrepBzdaNtHSmqpI7KbeIkiO8bNE YPwdnFU0H3V3ybsQTGi/9l5BUW8B3BCN9zuyAo6R9evYO5V8KVbo25VQ8c4POcSjMWpCBJ q4p62VACzKImQxYHX2aNj3oadJ3zKWcrDjmFdYjr9QskQMk9CfPMm9hOZAcBA3j+D38a1w IOYhADuAljF/ap6CSfQAgt2Znx1HGnbxkjK6VffibrWV0mqLGFQaVuURgzuLOG1nwqR7XZ KzS7TrV3LXeNlwM9vFmBxLRpaoACVVWS8zKBT1nVgJMfzS2UpY/2vlUM33gvHw== 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 4S5NXw1gYNzZZ5; Wed, 11 Oct 2023 19:45: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 39BJjajj025208; Wed, 11 Oct 2023 19:45:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BJjaKU025205; Wed, 11 Oct 2023 19:45:36 GMT (envelope-from git) Date: Wed, 11 Oct 2023 19:45:36 GMT Message-Id: <202310111945.39BJjaKU025205@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: fc7143b48341 - main - ping: Add missing ATF boilerplate. 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: fc7143b48341fb16ef5b2262c7cd5b5c47056112 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=fc7143b48341fb16ef5b2262c7cd5b5c47056112 commit fc7143b48341fb16ef5b2262c7cd5b5c47056112 Author: Dag-Erling Smørgrav AuthorDate: 2023-10-11 19:45:06 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-10-11 19:45:06 +0000 ping: Add missing ATF boilerplate. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D42161 --- sbin/ping/tests/ping_test.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sbin/ping/tests/ping_test.sh b/sbin/ping/tests/ping_test.sh index c30592aa7e2e..5a12ace104d7 100644 --- a/sbin/ping/tests/ping_test.sh +++ b/sbin/ping/tests/ping_test.sh @@ -106,6 +106,7 @@ ping6_c1_s8_t1_body() check_ping_statistics std.out $(atf_get_srcdir)/ping_6_c1_s8_t1.out } +atf_test_case ping_c1t6 ping_c1t6_head() { atf_set "descr" "-t6 is not interpreted as -t -6 by ping" @@ -116,6 +117,7 @@ ping_c1t6_body() atf_check -s exit:0 -o ignore -e empty ping -c1 -t6 127.0.0.1 } +atf_test_case ping_c1t4 ping6_c1t4_head() { atf_set "descr" "-t4 is not interpreted as -t -4 by ping6" @@ -126,6 +128,7 @@ ping6_c1t4_body() atf_check -s exit:0 -o ignore -e empty ping6 -c1 -t4 ::1 } +atf_test_case ping_46 ping_46_head() { atf_set "descr" "-4 and -6 cannot be used simultaneously" @@ -139,6 +142,7 @@ ping_46_body() ping -4 -6 localhost } +atf_test_case ping_64 ping_64_head() { atf_set "descr" "-4 and -6 cannot be used simultaneously" @@ -152,6 +156,7 @@ ping_64_body() ping -6 -4 localhost } +atf_test_case ping6_4 ping6_4_head() { atf_set "descr" "ping6 does not accept -4" From nobody Wed Oct 11 21:09:18 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 4S5QPV4G9dz4whx8; Wed, 11 Oct 2023 21:09:18 +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 4S5QPV3dTMz3MDT; Wed, 11 Oct 2023 21:09:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697058558; 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=zu3RmOSLChWZU3cVqRFKU+Ha7h0pa+M7zT73+JMCv90=; b=m7f91Sc9fsT01qc7gn5EfiMvUDiZyEuctfY9480Fn4s1sk/uHN31U6b1DtNQKnrfut9iD/ iqBRo8luiLtFjPLZR5WTDCnzYV3iOULwAtkHMhaNVRnqgGRaze96tojN1f8yN3RMDemRdi 9Nfa84DpWMgz/u+ASuzOy0uLNOvmTcniJ+V1tXUEO1IoMxQR5g/ok7ymqi1JdEAQw6umMB TeTv97BYwN0h0OxkZklNi/4qPDLzde417G1wjT4DaqjUR0+ibQOAfEUYmnv/7hoyjwQA4K dGKitwi1V+pC0qNRZ4jn+aEmNAqFl+mZ3cS2fu3fkqcI0D7h70pxwyqMJj2VQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697058558; a=rsa-sha256; cv=none; b=vodJBd6Nwz/HY5i+Lgs1R0XPNRbt8f+DXrrD6Jiz81/ml7ThQokRUm/Mkrbndqv3iKtBRK PiNpA/FMfhjH/bNHUDHEFuKuSZ3y0rzHNGZGYya70BT+6f3ekIegQ8EqLdqDH3nMYZACFL PB87u2bXQoFG7x2K8xBitGeNxfDYehBNjqDzA2/7kfU2AR0HNh27fnIZLZdaj7AXEQTaGq //4xoH4y7utQAaeYKIRH4f3MAx1xrykx7fsAcYP/hWGDXqzvQxcCmZ4SemU2aXiE4kHJZO M4fQ/vZbdKeKlodcQaVnnjaO1sIipJI6cGc82YKMsHeMGPv2O7MdAsuX9qZ2dw== 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=1697058558; 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=zu3RmOSLChWZU3cVqRFKU+Ha7h0pa+M7zT73+JMCv90=; b=CO6TsY4Xv3GfN7CHpRT9T6B1kCZRTv5GY6tJr4ySmrC1cC4jbzOgqML0RnU/KUtGSGr3w/ PyNjGCsD0ULaeV4vBplrkFW7xTeaEbdQkayoMBtbTz2ZtJYKhD3TJv9tXzEr7/9iTDfhfY LaDVzi+5BJ7DHhhuWfQJtEgzsytSiIJoTlR+GQEGjGFm02jlEUFAaMXUozdIe/5fNQ61We dsdrDURQoqPhX7oyc8ijeClUygmU2ifvJXGG+PiaT3qJHv4dRvxWScCxJSRgPwfk4OLgaV Er++F6pd5dZqihCILiF/ER1n8gc6Kh/+yemXJa073+/PRJRVpAl/b3HbH132Eg== 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 4S5QPV2gwMzcHv; Wed, 11 Oct 2023 21:09:18 +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 39BL9Ihk058391; Wed, 11 Oct 2023 21:09:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BL9IIa058388; Wed, 11 Oct 2023 21:09:18 GMT (envelope-from git) Date: Wed, 11 Oct 2023 21:09:18 GMT Message-Id: <202310112109.39BL9IIa058388@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: b332adfa9621 - main - usb: add necessary quirks for the NOREL Systems NS1081 SD reader 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: b332adfa96218148dfbb936a9c09d00484c868e3 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=b332adfa96218148dfbb936a9c09d00484c868e3 commit b332adfa96218148dfbb936a9c09d00484c868e3 Author: Mazin Fadl AuthorDate: 2023-10-11 03:12:22 +0000 Commit: Kyle Evans CommitDate: 2023-10-11 21:08:53 +0000 usb: add necessary quirks for the NOREL Systems NS1081 SD reader Without these, the Norelsys NS1081 is completely defunct. PR: 263868 Fixes: 520b88860d7a79 ("usb(4): Automagically apply all quirks [...]") --- sys/dev/usb/quirk/usb_quirk.c | 2 ++ sys/dev/usb/usbdevs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c index c4cd84f30c65..2199880d3abd 100644 --- a/sys/dev/usb/quirk/usb_quirk.c +++ b/sys/dev/usb/quirk/usb_quirk.c @@ -355,6 +355,8 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(NETCHIP, POCKETBOOK, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(NIKON, D300, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), + USB_QUIRK(NORELSYS, NS1081, 0x0000, 0xffff, UQ_MSC_NO_RS_CLEAR_UA, + UQ_MSC_NO_INQUIRY), USB_QUIRK(OLYMPUS, C1, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_WRONG_CSWSIG), USB_QUIRK(OLYMPUS, C700, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index da712c5a5954..8a6ac22f1cf1 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -776,6 +776,7 @@ vendor ARDUINO 0x2341 Arduino SA vendor TPLINK 0x2357 TP-Link vendor WESTMOUNTAIN 0x2405 West Mountain Radio vendor TRIPPLITE 0x2478 Tripp-Lite +vendor NORELSYS 0x2537 NOREL Systems Ltd. vendor TENDA2 0x2604 Tenda vendor HIROSE 0x2631 Hirose Electric vendor NHJ 0x2770 NHJ @@ -3502,6 +3503,9 @@ product NOVATECH RTL8188CU 0x9071 RTL8188CU product NOKIA N958GB 0x0070 Nokia N95 8GBc product NOKIA2 CA42 0x1234 CA-42 cable +/* NOREL Systems Ltd. products */ +product NORELSYS NS1081 0x1081 NS1081 USB 3.0 Flash Card Reader + /* Novatel Wireless products */ product NOVATEL V640 0x1100 Merlin V620 product NOVATEL CDMA_MODEM 0x1110 Novatel Wireless Merlin CDMA From nobody Wed Oct 11 21:09: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 4S5QPW5P0wz4wjLt; Wed, 11 Oct 2023 21:09: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 4S5QPW4fVJz3MHT; Wed, 11 Oct 2023 21:09:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697058559; 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=ipQX3+5eOdWmR9qSBlOUveT9JwIn7/hpg2Kp1F5Caug=; b=jKV5KqZY3bDhNbJSEx4lpkROwn0v8ebnvPGNB8rZQQnUqK6wf1nHELAXOOMiL5PSYSQKf/ AQPZVhdwpk4eilHxpKG5zp8XNBbukrk4MEnlY0Rx5HopC4Bq6DE/UJELMuct9Nui0tj1ut kcGAxleiYXGgO8p+8hSjCvma8jeGFx2RzwYdiaEELGnTg3QhKTDYW+Oslz6ESksJOmszoD SMjYUB9SoVw0CXT2oVLd96bzuyRGF3PGWIBSK/cjLCBn2FFngNhfWT57RdtOiJHjaeMi2n 4I39l0HIjA6WZkF62LXSOMs6auoea87Ghm4NI3b5ak+XNaH4KHy5yAqLNM0y9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697058559; a=rsa-sha256; cv=none; b=tAwNcQKTJtaBB13TOy951w4Vnm7uDedxNQUzMNs9A5vgXAY1e/OF9eHYWe/+5HbwH3PJC7 ILCqkDBpi5y4qBorFXuRP+igSWlRiZOWs/zdifs8JU/9d7hVqKQRshlUqtEjcIsyulnrVq 5rVTOdjOw66nVwgaPRvpD9MLO38frnK0zYYsep7wHgvICUEJMBwHDS87heYWvD2LP3nQ9j lw3LW53tMbj2Rg2g6GXYO2KcxXE8wl7jatsaF5t7jX5OykrSM+yo44AiiABNdj9+jyKk6v 5I6oN9fpF4Peelh/T80SlZixLy5ehsPc4/PYb7AizFis7kAQw0gUqeQGQCRbaQ== 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=1697058559; 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=ipQX3+5eOdWmR9qSBlOUveT9JwIn7/hpg2Kp1F5Caug=; b=oqQWDqKhxaF3wgCaZ7nVE2RO5rrKOvKsI7FyIW0pwXE2XfSxzZBEhB5tyuREfLQgLivqrB gEuLqoQbe+H8zHS/XNYeTRKz/cd7yUHsaA0+uWvIaRpMl/ywYCBh5jz3tlbqKiP9faQDfB HASCKswmdsUx9WETASE1L1XjtIw3KR+BogRt+RNr9NuwXyU7ZBTslP6QlsuOCGlBvB996m Yq9uSBC3WeTyw9h9q6AZg28Ze5n6hmUZ6L1kngghUtYqRC+XQLiX6xrTY9gCgZ5zP2Qh0z QebvGoF+k6QZrcQ6sFK4HqPJvbLsnzRp5S9KMCZdaNI5aK+31ytcoEKcPj34lw== 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 4S5QPW3T88zcgT; Wed, 11 Oct 2023 21:09: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 39BL9JXM058447; Wed, 11 Oct 2023 21:09:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BL9JCi058444; Wed, 11 Oct 2023 21:09:19 GMT (envelope-from git) Date: Wed, 11 Oct 2023 21:09:19 GMT Message-Id: <202310112109.39BL9JCi058444@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: 94efe9f91be7 - main - usb: add quirks for the Genesys GL3220 card reader 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: 94efe9f91be7f3aa501983716db5a4378282a734 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=94efe9f91be7f3aa501983716db5a4378282a734 commit 94efe9f91be7f3aa501983716db5a4378282a734 Author: Mazin Fadl AuthorDate: 2023-10-11 03:22:12 +0000 Commit: Kyle Evans CommitDate: 2023-10-11 21:08:53 +0000 usb: add quirks for the Genesys GL3220 card reader Without these, card hotplugging does not work on the GL3220. PR: 263868 Fixes: 520b88860d7a79 ("usb(4): Automagically apply all quirks [...]") --- sys/dev/usb/quirk/usb_quirk.c | 2 ++ sys/dev/usb/usbdevs | 1 + 2 files changed, 3 insertions(+) diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c index 2199880d3abd..98515be2a06d 100644 --- a/sys/dev/usb/quirk/usb_quirk.c +++ b/sys/dev/usb/quirk/usb_quirk.c @@ -260,6 +260,8 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE), USB_QUIRK(GENESYS, GL641USB_2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_WRONG_CSWSIG), + USB_QUIRK(GENESYS, GL3220, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY, + UQ_MSC_NO_RS_CLEAR_UA), USB_QUIRK(HAGIWARA, FG, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(HAGIWARA, FGSM, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 8a6ac22f1cf1..6543f0cbaa29 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -2296,6 +2296,7 @@ product GENESYS GL3520_SS 0x0616 GL3520 4-Port USB 3.0 DataPath product GENESYS GL641USB 0x0700 GL641USB CompactFlash Card Reader product GENESYS GL641USB2IDE_2 0x0701 GL641USB USB-IDE Bridge No 2 product GENESYS GL641USB2IDE 0x0702 GL641USB USB-IDE Bridge +product GENESYS GL3220 0x0732 GL3220 USB 3.1 AiO Card Reader product GENESYS GL3233 0x0743 GL3233 USB 3.0 AiO Card Reader product GENESYS GL641USB_2 0x0760 GL641USB 6-in-1 Card Reader From nobody Wed Oct 11 21:11: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 4S5QRf5y5Bz4wjW0; Wed, 11 Oct 2023 21:11: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 4S5QRf5WT8z3NWp; Wed, 11 Oct 2023 21:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697058670; 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=XWmq9gZIvBViTZ5YTyllwuYovxG35T5M8Nx0EXjeH3U=; b=YTgBUMXIpFfOoLXW87YMt3j2PMgC6II3UPWR9f3uB9XaaA4ijm5tCkqy2wgwFpFwxSIr9L nRZuVl1Wjk7QWqlRhkNQwQ4OoX24mtUOaLEqgc+Ls1NGPRrgVyH9Qrtxg/evyfdzcxeIdH 7fNLyVZcpWBJuEKhmY04Q8OTwph0dmOzX+92C1cQ3sM1C575pzbx3ksjVKfbuDZ5YtQK2R /em5IYY7s+AbRZfynt7Nffxe/8qHJjBQrnN8sZZAv/E77RJ3mqqv5WKBnbv0OdL7DcZ3Kk zScq9unScm6sqKwWzWWNdEL0scxiuWbfQvCaBpsGHqkrhXlfT9DJWS3DmOV2yA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697058670; a=rsa-sha256; cv=none; b=r63cIKozZNZvMdx+8BelovYb7y5/EGlrYZNykMN0kkIj9luN7qDfBRm354F6soOMscL29+ +WhLxR71xSNMwqhjwJHRnnJm0CyGTO8VfOIv2cstBgY/jqhq6geuSHs8dtyXcTNxA7ea4X MNcVdFTJWqFV4AcvdQsuSilyyPGRQtLaMz8hUmJVHOwgp1BfY/FV9dQmITgmvc4DjKynqM FWn39Gd4XL7/IDO2vQeh9A0OKY1Nt50pbX6t29Zvpr+KAKEN5vLBeVzovG7AvdPe82jaWQ 8f/pQX+gw9hGQsrR8DvZ9fmZpEH7Q9N+vxse7aDJQG4v1HJjukdFSKtBjFpxcw== 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=1697058670; 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=XWmq9gZIvBViTZ5YTyllwuYovxG35T5M8Nx0EXjeH3U=; b=CuiPWuRidG6UEizF/doPpEKSXGtraj0qutVZZBUPfnuewn6lYfGyMd5/akVd1z00+m4CSM YKr2PIsWBR5kw5qRvMJshQXC3hCGwsRDVpPHi7CL1rrvtm3qQXnczOKUXu4ocUw5mxlxFw pBxivcyutUEO39fUTvWOOOeLzYLJpKTwz9XfwKG4w29aw8Ic1VKBVF21DQsOhJ2nVi30yy fgm0l1XcVZubnKQgq2bBo2tWg7hSCIvLbRL1P2TPnSjToV1bngYfXfLxamuhUQkKaxDk3i 2APKqRl+XTIUXYXUOCy29ie+KmVY4MG03jL9wnBECDC1fYrq575JDSfgeRvXyw== 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 4S5QRf4ZZdzcgf; Wed, 11 Oct 2023 21:11: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 39BLBAP2070412; Wed, 11 Oct 2023 21:11:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BLBAmC070409; Wed, 11 Oct 2023 21:11:10 GMT (envelope-from git) Date: Wed, 11 Oct 2023 21:11:10 GMT Message-Id: <202310112111.39BLBAmC070409@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 91ee2d8d9a67 - main - tcp: clear SACK state when scoreboard is forcefully freed 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: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91ee2d8d9a67c4b70612cb02d6d8bcb6a226cb6f Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=91ee2d8d9a67c4b70612cb02d6d8bcb6a226cb6f commit 91ee2d8d9a67c4b70612cb02d6d8bcb6a226cb6f Author: Richard Scheffenegger AuthorDate: 2023-10-11 20:38:34 +0000 Commit: Richard Scheffenegger CommitDate: 2023-10-11 21:09:58 +0000 tcp: clear SACK state when scoreboard is forcefully freed When a Retransmission Timeout happens during an on-going SACK loss recovery episode, the internal SACK accounting was not cleared. Reported by: pho Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D42162 --- sys/netinet/tcp_sack.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index 9a01ff684cbb..8647630bb6bc 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -888,6 +888,10 @@ tcp_free_sackholes(struct tcpcb *tp) while ((q = TAILQ_FIRST(&tp->snd_holes)) != NULL) tcp_sackhole_remove(tp, q); tp->sackhint.sack_bytes_rexmit = 0; + tp->sackhint.sacked_bytes = 0; + tp->sackhint.delivered_data = 0; + tp->sackhint.lost_bytes = 0; + tp->sackhint.hole_bytes = 0; KASSERT(tp->snd_numholes == 0, ("tp->snd_numholes == 0")); KASSERT(tp->sackhint.nexthole == NULL, From nobody Wed Oct 11 21:13: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 4S5QVr4L6Yz4wj41; Wed, 11 Oct 2023 21:13: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 4S5QVr3mLZz3Ns5; Wed, 11 Oct 2023 21:13:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697058836; 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=QhlgcrPTJxnDmVNszUcPcrTTf1+1U85znirjnGEPty4=; b=dVrA71kjP7rpJPhDLiPvDZnPHntdv741ySLaZwWFeZpvG+HM+gTQs5GzWuBR6FRPRFEfSZ MeASvWgXiYL4gR3EK4gce54eOQ/lRtPOoCofHx/pL7/qjZb91Q4ilgtMeIgM2IYw4MswQ6 0s5VrGouC2R50yIOyKXfF3ifjuSeRUV9Lz3iyq5xNjKptA7HcujQFarb64FjD44wP0hw4Z bEdex14l5BJOz7centLJYsGA4vp3gpD4bNgqO8EGNoyRlZj0haMqRMdEz75lyvjkvVQ2XQ wiDlQb5I6zg0ZtQ6WSy0bjMxNk0eTgJasbWbbjF3aOp2NdNSkmFDtXyzJFfYCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697058836; a=rsa-sha256; cv=none; b=CYOxB7dZBWcFmTBclo2BNBTtmIZstmiJJ+uuIu4fuv6n8KteIXiP2CVupfTvVnE0EzZ+4s fl85hjv1egFov6AleVxGHgcFUWJrCSW6QjUsn2Qe8Iwj/mxpwWFhD8+HMGM+1X6F9nHQFA vuOJaYvPV9jj4iRKqwBFLs5cYmFGvaiyoWndWOXOgc8BAQV3PPB7QBMDW6qd+KYM1TfhgQ bufAJLRmKpLZxjX3B+BGm1nrmJj5TYBIWDooFtT+3EGLxqrqohM7UD/u2M3aP4ygcZj+6E G4vtATlCxlfq36EriSHLAQtlNSTZBT8izZJlTs0TyjYbuBGNZtt0INrXmvnzzQ== 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=1697058836; 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=QhlgcrPTJxnDmVNszUcPcrTTf1+1U85znirjnGEPty4=; b=ObHjTshjGfAtagB/02xk3hrqEiqy4MoqJstai15WtiN3QuL0rH7Vz2vPyYU1gFq5jTlkOa 4kRGWP8op1G7cIE9FTBZtQn2lGxjj4MnKRFMkHzujxEcj6z8eZmF76v+bIED4wpSCUSVsJ R76pJFEkBJ/tRTRL5YAM91X2/F7kXY64+r3fsN2Y2+Xu9iiZg4TvyFSXgsbm89X09HMQH+ jnnkz0DWFVIA/YGzOK6Pwt98bXpHTLkjf0M264qHo6dIiwUQ2qVUr9fWXPA8UNcRrE+rxp aAUq1HNg9EPcoGqaFZFFho8GAOIGQLdPDmKF+4Bgu2siML68kn8iX5XTIu+G7g== 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 4S5QVr2qH0zcJv; Wed, 11 Oct 2023 21:13: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 39BLDuAJ075105; Wed, 11 Oct 2023 21:13:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BLDu0l075102; Wed, 11 Oct 2023 21:13:56 GMT (envelope-from git) Date: Wed, 11 Oct 2023 21:13:56 GMT Message-Id: <202310112113.39BLDu0l075102@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 569f2292cae3 - main - test: iterate both reader and writer threads starting at the actual pagesize 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: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 569f2292cae399cb216b850295036a8ae2fc66c1 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=569f2292cae399cb216b850295036a8ae2fc66c1 commit 569f2292cae399cb216b850295036a8ae2fc66c1 Author: Richard Scheffenegger AuthorDate: 2023-10-11 21:11:37 +0000 Commit: Richard Scheffenegger CommitDate: 2023-10-11 21:11:57 +0000 test: iterate both reader and writer threads starting at the actual pagesize Reviewed By: pho Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D42160 --- tools/test/stress2/misc/jumbo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/stress2/misc/jumbo.sh b/tools/test/stress2/misc/jumbo.sh index 8dcc5aa7aca3..a2d09bafaa82 100755 --- a/tools/test/stress2/misc/jumbo.sh +++ b/tools/test/stress2/misc/jumbo.sh @@ -131,7 +131,7 @@ reader(void) { if ((buf = malloc(MX)) == NULL) err(1, "malloc(%d), %s:%d", MX, __FILE__, __LINE__); setproctitle("reader"); - for (i = 4096; i < MX; i += 1024) { + for (i = sysconf(_SC_PAGESIZE); i < MX; i += 1024) { alarm(TIMEOUT); if ((n = recvfrom(msgsock, buf, i, MSG_WAITALL, NULL, NULL)) < 0) { From nobody Wed Oct 11 21:21:48 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 4S5Qgw5FF9z4wkM3; Wed, 11 Oct 2023 21:21: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 4S5Qgw4jNLz3Psm; Wed, 11 Oct 2023 21:21:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697059308; 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=iIsOetJKXKuCj2BnNT1M5rFMJYJvXdyJ3XvGrSzzuuc=; b=hAs2rcYjnrDzWGc/9UDBBrihm/y7hRiAo3uG6uUooHAiyHGvijJnEKinygV/F7mgJ22J4Q QPujMtOMAWi+fqvEWZcx5a0xv6iFETVoFuRt6QcsxEfIJiuAZjCoroA23eRpczZq+3ay41 DR1BZcgUhT+VbU2HzL1UkII7i95bpdNIWVZDDamOrxP4MVL+mxsYCxHbAU28/IbHN7cL/i HUKhYDRhnY+o8jEZ+BuxO5E0oFEcHx8KWYaeGIcuxZbtRdXllLK3ZBAiMVT35wUlIztBXl 91KYsxDLqs7mwiFqF2eCOpKBVY05oZTdsn87DRf/oDNJZE0HeOyJIbu4tdfySg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697059308; a=rsa-sha256; cv=none; b=MWgnYGO4XVZuobNxgGuR6qc6eMxANKvcewG+Wmhm8jCoOpJa+mKD6NJZoYscXIgYUsfAwg bN4p7/Iwsi4mON8dEp8o/gfX/sQ5EPo1bJHGcQOykf+O+brVD7N5twmPLmM1iOWJLJboEC nBukA3ZCKkEWV1ITVWtcVf5jV8bPS8PeCVojEYLzqNMhvqjnIEEBO7TujAYE1jdwxq8dxc KEtzDPF8aBnctu9mofnrU1aeYilyr+Uoq14MjVT+aYdZoQWUoiWxSVtMPJY9gaTwfHaerW BQ8at9csBKy9vLuqQAzNoRl4ijkC7pZNsIflfVWSjhj6qjCb7pm7HmSoIkZU4Q== 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=1697059308; 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=iIsOetJKXKuCj2BnNT1M5rFMJYJvXdyJ3XvGrSzzuuc=; b=Hk3moPzKgQ0xmWvdg6bb8NOsxG0GaDfw79Ycw3/wy+JuhT2+9USRs/FyGWLvG1XNg5DmfD PE6KYZrRqPrcfqPjl+9WSAIxJymDfZjrL1hOxsBwI16DBkuyyYhoRgeQvfokDJzIMepSPq jJTlgEon61WLsMePPjZP8FqtNHijJdu3SCU53/WEO7RQn0cIonCtZIVVq8DA1GQ9nQZlw1 qrYtUZ2G0a/zIQPtxKf1va6l72Anm6rxIGFn7SN9NhWjjQHtKw1sOtQArTzV1Mc5AHYYgY D3SJJtwIf+C5mO1ZSQAdTux9tnb/F6WlpvvjaHezr3tWwpsG9nLZvD5ZkTvCZw== 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 4S5Qgw3n2jzd3w; Wed, 11 Oct 2023 21:21:48 +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 39BLLmDo089072; Wed, 11 Oct 2023 21:21:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BLLmJ6089070; Wed, 11 Oct 2023 21:21:48 GMT (envelope-from git) Date: Wed, 11 Oct 2023 21:21:48 GMT Message-Id: <202310112121.39BLLmJ6089070@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: ff79f35bdae5 - main - riscv: Tidy panic messages for exceptions 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: ff79f35bdae5742f4e56e1dc18fffc5d9ea98876 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ff79f35bdae5742f4e56e1dc18fffc5d9ea98876 commit ff79f35bdae5742f4e56e1dc18fffc5d9ea98876 Author: John Baldwin AuthorDate: 2023-10-11 21:21:12 +0000 Commit: John Baldwin CommitDate: 2023-10-11 21:21:12 +0000 riscv: Tidy panic messages for exceptions - Remove trailing newlines - Be consistent about the format used to print pointer values - Print the trap value for access faults (it is the faulting address if non-zero) and illegal instructions (it is the first N bytes of the decoded instruction if non-zero) Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D41786 --- sys/riscv/riscv/trap.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/sys/riscv/riscv/trap.c b/sys/riscv/riscv/trap.c index ea48b02ba29b..f54efc324942 100644 --- a/sys/riscv/riscv/trap.c +++ b/sys/riscv/riscv/trap.c @@ -299,7 +299,7 @@ fatal: return; } #endif - panic("Fatal page fault at %#lx: %#016lx", frame->tf_sepc, stval); + panic("Fatal page fault at %#lx: %#lx", frame->tf_sepc, stval); } void @@ -326,7 +326,7 @@ do_trap_supervisor(struct trapframe *frame) return; #endif - CTR4(KTR_TRAP, "%s: exception=%lu, sepc=%lx, stval=%lx", __func__, + CTR4(KTR_TRAP, "%s: exception=%lu, sepc=%#lx, stval=%#lx", __func__, exception, frame->tf_sepc, frame->tf_stval); switch (exception) { @@ -334,13 +334,14 @@ do_trap_supervisor(struct trapframe *frame) case SCAUSE_STORE_ACCESS_FAULT: case SCAUSE_INST_ACCESS_FAULT: dump_regs(frame); - panic("Memory access exception at 0x%016lx\n", frame->tf_sepc); + panic("Memory access exception at %#lx: %#lx", + frame->tf_sepc, frame->tf_stval); break; case SCAUSE_LOAD_MISALIGNED: case SCAUSE_STORE_MISALIGNED: case SCAUSE_INST_MISALIGNED: dump_regs(frame); - panic("Misaligned address exception at %#016lx: %#016lx\n", + panic("Misaligned address exception at %#lx: %#lx", frame->tf_sepc, frame->tf_stval); break; case SCAUSE_STORE_PAGE_FAULT: @@ -358,16 +359,18 @@ do_trap_supervisor(struct trapframe *frame) kdb_trap(exception, 0, frame); #else dump_regs(frame); - panic("No debugger in kernel.\n"); + panic("No debugger in kernel."); #endif break; case SCAUSE_ILLEGAL_INSTRUCTION: dump_regs(frame); - panic("Illegal instruction at 0x%016lx\n", frame->tf_sepc); + panic("Illegal instruction 0x%0*lx at %#lx", + (frame->tf_stval & 0x3) != 0x3 ? 4 : 8, + frame->tf_stval, frame->tf_sepc); break; default: dump_regs(frame); - panic("Unknown kernel exception %lx trap value %lx\n", + panic("Unknown kernel exception %#lx trap value %#lx", exception, frame->tf_stval); } } @@ -400,7 +403,7 @@ do_trap_user(struct trapframe *frame) } intr_enable(); - CTR4(KTR_TRAP, "%s: exception=%lu, sepc=%lx, stval=%lx", __func__, + CTR4(KTR_TRAP, "%s: exception=%lu, sepc=%#lx, stval=%#lx", __func__, exception, frame->tf_sepc, frame->tf_stval); switch (exception) { @@ -450,7 +453,7 @@ do_trap_user(struct trapframe *frame) break; default: dump_regs(frame); - panic("Unknown userland exception %lx, trap value %lx\n", + panic("Unknown userland exception %#lx, trap value %#lx", exception, frame->tf_stval); } } From nobody Wed Oct 11 21:32: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 4S5QwJ3GwBz4wl1K; Wed, 11 Oct 2023 21:32:32 +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 4S5QwJ2mzvz3RGP; Wed, 11 Oct 2023 21:32:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697059952; 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=zHiBgS8R8HD8uxzr5HJNlew273QLYvdINIqpitxirsY=; b=E9GM+FUtWljF4hBxjIzL/t9CHTg5KKJFoDJSILx2TG5k9JwdMx7Ei3keWe+BflLLFYbzxs SRGE9YN0qTXTBOH1aFYai4E2Azos1XfiXnXTNPmRWDZkcwksRZbiNFIRIGAKjwDK4Rtahm oB3ICXKuPKNmpTR7VBkTt2NT7/GTH4ivPt6v44F6OZnhD6kunfYG51OWd2By9ABa1dN3Ym sqF5o0jVNpK9TdlBxpKBI0b2mtlqlrK/w5LmoZwB69yRgWBnZP1LKAm86TF2309QpusvU1 HxT3OsrkVX6Yja2lARx+8lS7BNBqlnfniKnVVn/Nk7bbK35kP9rJAX0em5IU+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697059952; a=rsa-sha256; cv=none; b=F3uH/SwMzce6oqT7T+NVZ3l8b3jM2kyq0jje8BvH+W358qJfmJQZA7zP7BOoR8tTcpU8zb 8wNJPQUrmYO+O96c1vU4XO/DZv64YzaThVOf7107QroxIue8Wcq0xcJg2HHN+9Vt6pb1Ir VPW6A6kjnS/f6Ze9NNoFy2bB88FLHWS7t4Hx6hFpsOGOVGxgOPaaHucsd3mlp+U/kWKIgy jB/qWBqJ1qy9g4wlelTsPlfaoLSnN9+f628kv+ckP14NYjDMxiYX8J/R78r/z6l57tCtem yzPHz3xVsgBqYrKy8g7CJx/GUlRCEfBLmm2cHcZ/uNRHdA9zt2yV8IQPu9YGhw== 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=1697059952; 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=zHiBgS8R8HD8uxzr5HJNlew273QLYvdINIqpitxirsY=; b=I0KCYycK5aPdVgl88opWHhglgtK8AVuGVdR48HMJIygc0nWTmWJIqqteZeU4djtuI9K51u kUcCnZdUB8mBMYqbPAcGizYuXvRZJ302O8/GpEp+qU6GucFb9LE8CG1HGiUl7e8S4YKA86 up21k83muhaq9a2V2djTb6YSDfrmH7NPaBVMUQ/R7jZNSvCCrKmt6ie2MK3zscgfJqfPcO bIaceWZietoTAD7IFhpDPhD3kdLJjSorbJXMHvBwFWvH3s3FP+7vuD6VQxAxJu0SxzKTKI ZrE6Yyc7oXyufM2edJlXgLNo+LJp9wKE5kwpyc4mslK5q+WU6GhzZ3umZ5M8HQ== 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 4S5QwJ1tF2zdGr; Wed, 11 Oct 2023 21:32:32 +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 39BLWWfj007466; Wed, 11 Oct 2023 21:32:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BLWWX5007463; Wed, 11 Oct 2023 21:32:32 GMT (envelope-from git) Date: Wed, 11 Oct 2023 21:32:32 GMT Message-Id: <202310112132.39BLWWX5007463@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: e839ebfc0dc5 - main - amd64: Remove a stale comment from cpu_setregs 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: e839ebfc0dc5851d383ac38740f32e96f7bd5186 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e839ebfc0dc5851d383ac38740f32e96f7bd5186 commit e839ebfc0dc5851d383ac38740f32e96f7bd5186 Author: John Baldwin AuthorDate: 2023-10-11 21:22:17 +0000 Commit: John Baldwin CommitDate: 2023-10-11 21:22:17 +0000 amd64: Remove a stale comment from cpu_setregs Reviewed by: kib, markj, emaste Differential Revision: https://reviews.freebsd.org/D42134 --- sys/amd64/amd64/machdep.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 4b81f5b9671e..440c21c918be 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -326,10 +326,6 @@ cpu_setregs(void) TSENTER(); cr0 = rcr0(); - /* - * CR0_MP, CR0_NE and CR0_TS are also set by npx_probe() for the - * BSP. See the comments there about why we set them. - */ cr0 |= CR0_MP | CR0_NE | CR0_TS | CR0_WP | CR0_AM; TSENTER2("load_cr0"); load_cr0(cr0); From nobody Wed Oct 11 21:32:33 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 4S5QwK3wnvz4wkqD; Wed, 11 Oct 2023 21:32:33 +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 4S5QwK3Rbtz3RB8; Wed, 11 Oct 2023 21:32:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697059953; 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=eXXBxGBzFkZI4CZBT+F61SNOuaid6bhr/q/KlfQTGsA=; b=r4Vh85vV9eyKYfC0uoPKzg6gxn7imeROAwTdp9KG7kn/2FwfuS+R6bJSd40pVmnrhhwAM8 tjuSGZhnNtPZcAYcsNCLqx7NzCm5g0ov7YWvuI6fVZvwlfsfj9qEK8ganb9OVozxyRF4lC nKajRdo5imn60t70l9yrflpEN3MgmVWpIiv3DxeEDT5EJFWR/EBaY4nOE0tJtqQ6pEw081 WNlxu/apTzZINklFrq9e2uHqTGH49o/zkvpwfztUp4I4MimV/RHwzoFT8oGilSz14UyJeq NHcJ5ea7diVpHKOUjzkJpJaRFOHk/Td0m+BXqO8TJBV7SVR6wMY2C0EL2f0Jew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697059953; a=rsa-sha256; cv=none; b=wKJNdhBy0AFk0cwoC933TFZuNvXu72AZKkADBs8p+ZAhRFpnZtnW30dpxEIop6umuiwqTE YL1rUg77N3b8iD9raD8U6BCPhxJUZaGqAAXBnTzNNqusdsxn7Kp8iHHuMuJx4qGAj0RC1w ZGFdz8PzpKru+vWc+iOyIjPsWr3C8RHeaYhu+Mf24hAhR7R5Nr72aWANxNpxMQqhUQNuMJ HTL6JWQOkFGpwStnvmS2nZQNv790BSqwqpF2Z0Pfw5S5l3j3moiAvImY4Sc4DO/YfLDmgI DWblZtGKV2lERoGsMflvh8FziWNUew/+wnKE2Q5X2wPePEIXRudBqDKKZGjJFw== 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=1697059953; 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=eXXBxGBzFkZI4CZBT+F61SNOuaid6bhr/q/KlfQTGsA=; b=W2NbNko5cq95Wbc52Yroths9MKron+YLKMvTNwFrQt3/oNtRaXGHy1OoyNYBXQIDmpIBME 994r70ezQdV5OAPxrW5a7MKIjfU+zZmLbY8Paai90Eh4f30Dl5BnhkMx+QfvFmHwstfwg/ OSIB6s3QgRGqBuIA1CQvqVW2duZtr0A93sPGZ2m6W9cgLTPovcr1n0G7PVYpc94JDRg/a/ Gowcg7/gMcRJlhfhmfbaFWmhIlwh8wkr7QpPiz4xD0TqnKYNh+sOYm5ElldeUAE0cFXyzf xDQWbahvdK7L8vBRVXLlsyE+pkgJaXqYvXVlYHZNCe+fBWZYdwBBpDLWZkiscQ== 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 4S5QwK2Y0mzctb; Wed, 11 Oct 2023 21:32:33 +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 39BLWXGt007513; Wed, 11 Oct 2023 21:32:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BLWXu8007510; Wed, 11 Oct 2023 21:32:33 GMT (envelope-from git) Date: Wed, 11 Oct 2023 21:32:33 GMT Message-Id: <202310112132.39BLWXu8007510@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: cc1cb9ea0c56 - main - x86: Rename {stop,start}_emulating to fpu_{enable,disable} 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: cc1cb9ea0c5607931fa9b7ecf786468d38fb8491 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cc1cb9ea0c5607931fa9b7ecf786468d38fb8491 commit cc1cb9ea0c5607931fa9b7ecf786468d38fb8491 Author: John Baldwin AuthorDate: 2023-10-11 21:32:06 +0000 Commit: John Baldwin CommitDate: 2023-10-11 21:32:06 +0000 x86: Rename {stop,start}_emulating to fpu_{enable,disable} While here, centralize the macros in . Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D42135 --- sys/amd64/amd64/fpu.c | 31 ++++++++++++++----------------- sys/amd64/vmm/vmm.c | 15 ++++++--------- sys/i386/i386/npx.c | 35 ++++++++++++++++------------------- sys/x86/include/fpu.h | 9 +++++++++ 4 files changed, 45 insertions(+), 45 deletions(-) diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index c5b84d035d91..3432e62bf7f8 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -142,9 +142,6 @@ xsaveopt64(char *addr, uint64_t mask) "memory"); } -#define start_emulating() load_cr0(rcr0() | CR0_TS) -#define stop_emulating() clts() - CTASSERT(sizeof(struct savefpu) == 512); CTASSERT(sizeof(struct xstate_hdr) == 64); CTASSERT(sizeof(struct savefpu_ymm) == 832); @@ -263,7 +260,7 @@ fpususpend(void *addr) u_long cr0; cr0 = rcr0(); - stop_emulating(); + fpu_enable(); fpusave(addr); load_cr0(cr0); } @@ -274,7 +271,7 @@ fpuresume(void *addr) u_long cr0; cr0 = rcr0(); - stop_emulating(); + fpu_enable(); fninit(); if (use_xsave) load_xcr(XCR0, xsave_mask); @@ -393,13 +390,13 @@ fpuinit(void) * It is too early for critical_enter() to work on AP. */ saveintr = intr_disable(); - stop_emulating(); + fpu_enable(); fninit(); control = __INITIAL_FPUCW__; fldcw(control); mxcsr = __INITIAL_MXCSR__; ldmxcsr(mxcsr); - start_emulating(); + fpu_disable(); intr_restore(saveintr); TSEXIT(); } @@ -430,7 +427,7 @@ fpuinitstate(void *arg __unused) cpu_thread_alloc(&thread0); saveintr = intr_disable(); - stop_emulating(); + fpu_enable(); fpusave_fxsave(fpu_initialstate); if (fpu_initialstate->sv_env.en_mxcsr_mask) @@ -473,7 +470,7 @@ fpuinitstate(void *arg __unused) } } - start_emulating(); + fpu_disable(); intr_restore(saveintr); } /* EFIRT needs this to be initialized before we can enter our EFI environment */ @@ -488,9 +485,9 @@ fpuexit(struct thread *td) critical_enter(); if (curthread == PCPU_GET(fpcurthread)) { - stop_emulating(); + fpu_enable(); fpusave(curpcb->pcb_save); - start_emulating(); + fpu_disable(); PCPU_SET(fpcurthread, NULL); } critical_exit(); @@ -741,7 +738,7 @@ restore_fpu_curthread(struct thread *td) */ PCPU_SET(fpcurthread, td); - stop_emulating(); + fpu_enable(); fpu_clean_state(); pcb = td->td_pcb; @@ -803,7 +800,7 @@ fpudna(void) * regardless of the eager/lazy FPU context switch * mode. */ - stop_emulating(); + fpu_enable(); } else { if (__predict_false(PCPU_GET(fpcurthread) != NULL)) { panic( @@ -823,7 +820,7 @@ fpu_activate_sw(struct thread *td) if ((td->td_pflags & TDP_KTHREAD) != 0 || !PCB_USER_FPU(td->td_pcb)) { PCPU_SET(fpcurthread, NULL); - start_emulating(); + fpu_disable(); } else if (PCPU_GET(fpcurthread) != td) { restore_fpu_curthread(td); } @@ -839,7 +836,7 @@ fpudrop(void) CRITICAL_ASSERT(td); PCPU_SET(fpcurthread, NULL); clear_pcb_flags(td->td_pcb, PCB_FPUINITDONE); - start_emulating(); + fpu_disable(); } /* @@ -1139,7 +1136,7 @@ fpu_kern_enter(struct thread *td, struct fpu_kern_ctx *ctx, u_int flags) if ((flags & FPU_KERN_NOCTX) != 0) { critical_enter(); - stop_emulating(); + fpu_enable(); if (curthread == PCPU_GET(fpcurthread)) { fpusave(curpcb->pcb_save); PCPU_SET(fpcurthread, NULL); @@ -1190,7 +1187,7 @@ fpu_kern_leave(struct thread *td, struct fpu_kern_ctx *ctx) CRITICAL_ASSERT(td); clear_pcb_flags(pcb, PCB_FPUNOSAVE | PCB_FPUINITDONE); - start_emulating(); + fpu_disable(); } else { KASSERT((ctx->flags & FPU_KERN_CTX_INUSE) != 0, ("leaving not inuse ctx")); diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index bf5173d9d592..64ba16cc8969 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -256,9 +256,6 @@ DEFINE_VMMOPS_IFUNC(int, vcpu_snapshot, (void *vcpui, DEFINE_VMMOPS_IFUNC(int, restore_tsc, (void *vcpui, uint64_t now)) #endif -#define fpu_start_emulating() load_cr0(rcr0() | CR0_TS) -#define fpu_stop_emulating() clts() - SDT_PROVIDER_DEFINE(vmm); static MALLOC_DEFINE(M_VM, "vm", "vm"); @@ -1291,7 +1288,7 @@ restore_guest_fpustate(struct vcpu *vcpu) fpuexit(curthread); /* restore guest FPU state */ - fpu_stop_emulating(); + fpu_enable(); fpurestore(vcpu->guestfpu); /* restore guest XCR0 if XSAVE is enabled in the host */ @@ -1299,10 +1296,10 @@ restore_guest_fpustate(struct vcpu *vcpu) load_xcr(0, vcpu->guest_xcr0); /* - * The FPU is now "dirty" with the guest's state so turn on emulation - * to trap any access to the FPU by the host. + * The FPU is now "dirty" with the guest's state so disable + * the FPU to trap any access by the host. */ - fpu_start_emulating(); + fpu_disable(); } static void @@ -1319,9 +1316,9 @@ save_guest_fpustate(struct vcpu *vcpu) } /* save guest FPU state */ - fpu_stop_emulating(); + fpu_enable(); fpusave(vcpu->guestfpu); - fpu_start_emulating(); + fpu_disable(); } static VMM_STAT(VCPU_IDLE_TICKS, "number of ticks vcpu was idle"); diff --git a/sys/i386/i386/npx.c b/sys/i386/i386/npx.c index 689796821d80..26def3f433f1 100644 --- a/sys/i386/i386/npx.c +++ b/sys/i386/i386/npx.c @@ -123,9 +123,6 @@ xsaveopt(char *addr, uint64_t mask) "memory"); } -#define start_emulating() load_cr0(rcr0() | CR0_TS) -#define stop_emulating() clts() - #define GET_FPU_CW(thread) \ (cpu_fxsr ? \ (thread)->td_pcb->pcb_save->sv_xmm.sv_env.en_cw : \ @@ -224,7 +221,7 @@ npx_probe(void) /* * Don't trap while we're probing. */ - stop_emulating(); + fpu_enable(); /* * Finish resetting the coprocessor, if any. If there is an error @@ -413,7 +410,7 @@ npxinit(bool bsp) * It is too early for critical_enter() to work on AP. */ saveintr = intr_disable(); - stop_emulating(); + fpu_enable(); if (cpu_fxsr) fninit(); else @@ -424,7 +421,7 @@ npxinit(bool bsp) mxcsr = __INITIAL_MXCSR__; ldmxcsr(mxcsr); } - start_emulating(); + fpu_disable(); intr_restore(saveintr); } @@ -458,7 +455,7 @@ npxinitstate(void *arg __unused) } saveintr = intr_disable(); - stop_emulating(); + fpu_enable(); if (cpu_fxsr) fpusave_fxsave(npx_initialstate); @@ -515,7 +512,7 @@ npxinitstate(void *arg __unused) } } - start_emulating(); + fpu_disable(); intr_restore(saveintr); } SYSINIT(npxinitstate, SI_SUB_CPU, SI_ORDER_ANY, npxinitstate, NULL); @@ -529,9 +526,9 @@ npxexit(struct thread *td) critical_enter(); if (curthread == PCPU_GET(fpcurthread)) { - stop_emulating(); + fpu_enable(); fpusave(curpcb->pcb_save); - start_emulating(); + fpu_disable(); PCPU_SET(fpcurthread, NULL); } critical_exit(); @@ -810,7 +807,7 @@ restore_npx_curthread(struct thread *td, struct pcb *pcb) */ PCPU_SET(fpcurthread, td); - stop_emulating(); + fpu_enable(); if (cpu_fxsr) fpu_clean_state(); @@ -863,7 +860,7 @@ npxdna(void) * regardless of the eager/lazy FPU context switch * mode. */ - stop_emulating(); + fpu_enable(); } else { if (__predict_false(PCPU_GET(fpcurthread) != NULL)) { printf( @@ -891,7 +888,7 @@ void npxsave(union savefpu *addr) { - stop_emulating(); + fpu_enable(); fpusave(addr); } @@ -902,7 +899,7 @@ npxswitch(struct thread *td, struct pcb *pcb) if (lazy_fpu_switch || (td->td_pflags & TDP_KTHREAD) != 0 || !PCB_USER_FPU(pcb)) { - start_emulating(); + fpu_disable(); PCPU_SET(fpcurthread, NULL); } else if (PCPU_GET(fpcurthread) != td) { restore_npx_curthread(td, pcb); @@ -925,7 +922,7 @@ npxsuspend(union savefpu *addr) return; } cr0 = rcr0(); - stop_emulating(); + fpu_enable(); fpusave(addr); load_cr0(cr0); } @@ -940,7 +937,7 @@ npxresume(union savefpu *addr) cr0 = rcr0(); npxinit(false); - stop_emulating(); + fpu_enable(); fpurstor(addr); load_cr0(cr0); } @@ -962,7 +959,7 @@ npxdrop(void) CRITICAL_ASSERT(td); PCPU_SET(fpcurthread, NULL); td->td_pcb->pcb_flags &= ~PCB_NPXINITDONE; - start_emulating(); + fpu_disable(); } /* @@ -1397,7 +1394,7 @@ fpu_kern_enter(struct thread *td, struct fpu_kern_ctx *ctx, u_int flags) if ((flags & FPU_KERN_NOCTX) != 0) { critical_enter(); - stop_emulating(); + fpu_enable(); if (curthread == PCPU_GET(fpcurthread)) { fpusave(curpcb->pcb_save); PCPU_SET(fpcurthread, NULL); @@ -1448,7 +1445,7 @@ fpu_kern_leave(struct thread *td, struct fpu_kern_ctx *ctx) CRITICAL_ASSERT(td); pcb->pcb_flags &= ~(PCB_NPXNOSAVE | PCB_NPXINITDONE); - start_emulating(); + fpu_disable(); } else { KASSERT((ctx->flags & FPU_KERN_CTX_INUSE) != 0, ("leaving not inuse ctx")); diff --git a/sys/x86/include/fpu.h b/sys/x86/include/fpu.h index e1ec6a592d21..0debf65d6fb9 100644 --- a/sys/x86/include/fpu.h +++ b/sys/x86/include/fpu.h @@ -213,4 +213,13 @@ struct savefpu_ymm { */ #define X86_XSTATE_XCR0_OFFSET 464 +#ifdef _KERNEL +/* + * CR0_MP and CR0_EM are always set. Use CR0_TS to force traps when + * FPU access is disabled. + */ +#define fpu_enable() clts() +#define fpu_disable() load_cr0(rcr0() | CR0_TS) +#endif + #endif /* !_X86_FPU_H_ */ From nobody Wed Oct 11 22:50: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 4S5Sf92jN7z4wprd; Wed, 11 Oct 2023 22:50: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 4S5Sf90Ypgz3XQR; Wed, 11 Oct 2023 22:50:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697064625; 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=G9SwekQ6X4ZmztdG46wCUlYrbybf4NS0HGpSBcfH9JI=; b=sFtUJ/bIVXyD2XLQ5wjZB5lIL+DbZUfRmDD6PPKoxdG1CKkUmOelrDBbG4h+WnNkrqiWX1 Qa5f/tniKxKyoWzGD7M17xtY+0sN7q7iKCG2V+W0IUdNs6Hjh4O5Dp2iWBGiqkoWMDC+6h iWRBcn83rMecCAdruJbC8vMW4LxSV9EVeLxfcPZ5rgj5HLY0uATzz54Rc0s/xCyluEat2g NKUMfNyjk215Ng2hBuaAkaluld365L/gV5D7jB9jV4Z1W38hhzHh5aBDquUVvA4v9QLy0j 0dQRdp11ZLEpWI4L0ajcy9xxPhpi/D/UUTMb6PTP8j6BgqYLIQKwptC3MWYnNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697064625; a=rsa-sha256; cv=none; b=nIZb74uGEk1b9iHJ9t1H4ricxMwKpSmqIb4pCsOnpdLR8DSYF19j8au5K8aurG7B2YZjIN 9ZR+MPKYUVtIo1WLxXtXopuuhgPW4AT2K8bmcHIMlXZbx7YE+VQGumigVrPFq6I0aRtPMg R0oRRzAJsvMDdyF+t8FUCvw4tsoVFJAEqjvS1vgfyr2hqnHvYbzYBDk9tMfT2vEW8yLvqA e0VMtW6UqWLi6OHcI+Ft8Uy390+P2qeRtP/hrPSm2Pq+ZZQwhWOy3ftDp+DA5gYTT12q0P QZ1fmm2J0TyQYxQqcwnNh633D7m0p0VBM9o/ytv+soUqanHXAO7Strc6i8cN3w== 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=1697064625; 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=G9SwekQ6X4ZmztdG46wCUlYrbybf4NS0HGpSBcfH9JI=; b=cdQ4WaSn/xeC+qkAgfgLVuTPFGsqn9aBE6brEaJgWhtL5SH9jGvRRELpclEwezFHzWxKR3 ixfAXVcvsU2CB/z4XkHIcHpEw4nY9+tld1ibMeyoMckCRQhnlTXe1gfbwMINuKXvg3u89i rgr3PaWx2dbc5s09WiJ9AB9dW2CrlDKfa4j+e2EX9tftJKf/8Lr5TKZ6KLtBTnPcQISJ2W ZmjZ0oBcaAJRfrD+E2SX8FvYWqjMZFuHbHELyvmedmPuk15nA86DIulKkr6hTdwDMtwFsE X4MuobutdmvMxMpDHnx/xjI/s4tssq6ms5STb88kmYG4hGjeCLLJlDPLAB/zQg== 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 4S5Sf86mCFzfyG; Wed, 11 Oct 2023 22:50: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 39BMoOcU034364; Wed, 11 Oct 2023 22:50:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BMoOVH034361; Wed, 11 Oct 2023 22:50:24 GMT (envelope-from git) Date: Wed, 11 Oct 2023 22:50:24 GMT Message-Id: <202310112250.39BMoOVH034361@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: bb679b0c4909 - main - vfs: count calls to uma_reclaim in vnlru 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: bb679b0c49094757f2aef3d8fe46c41dc8192fea Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=bb679b0c49094757f2aef3d8fe46c41dc8192fea commit bb679b0c49094757f2aef3d8fe46c41dc8192fea Author: Mateusz Guzik AuthorDate: 2023-10-11 22:48:03 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-11 22:49:34 +0000 vfs: count calls to uma_reclaim in vnlru --- sys/kern/vfs_subr.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index d21ccb4251cd..01585ac9eefd 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1711,6 +1711,10 @@ vnlru_proc_light(void) return (true); } +static u_long uma_reclaim_calls; +SYSCTL_ULONG(_vfs_vnode_vnlru, OID_AUTO, uma_reclaim_calls, CTLFLAG_RD | CTLFLAG_STATS, + &uma_reclaim_calls, 0, "Number of calls to uma_reclaim"); + static void vnlru_proc(void) { @@ -1801,8 +1805,10 @@ vnlru_proc(void) * this happens. */ if (onumvnodes + VNLRU_COUNT_SLOP + 1000 > desiredvnodes && - numvnodes <= desiredvnodes) + numvnodes <= desiredvnodes) { + uma_reclaim_calls++; uma_reclaim(UMA_RECLAIM_DRAIN); + } if (done == 0) { if (force == 0 || force == 1) { force = 2; From nobody Thu Oct 12 02:54: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 4S5Z3V03bZz4x5rf; Thu, 12 Oct 2023 02:54: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 4S5Z3T6fXmz4MLy; Thu, 12 Oct 2023 02:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697079253; 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=QzkHtBNeJ3AJsx6PQcFDoruuzqdgAuQtyJ7rM1T9yso=; b=QzcjBoG2rBDJ+k+cL87FMebLNlX3eAyFS8NMB6wYMWOvzhNPmPvy0JPJGNJm3mmEwNmrCO 83NyubLzsXI/vBFzr8lbJC2J8ihvezUudpFK54WJKJ+cjsos3JCghR2AVcGnh1MIZ+WCYW UgqrDitEeFJMLIrwhx7DKSnWWecaBumrhnPwki3J2Osh9yeF9T6gCP6IaPaRKe01DGBQ0m oowxiJCU8yyiLLz1INJj/etAvims5rSM6uRNWiW1e4oEHmxXm5SBvlsbucE4Xd7GwRbzrj vQrrz6YoaVTdUkQyOHPJ19Quclmhud+cB38bOyFJ/PmpW7eyG/Eb7Kx9yXV0fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697079253; a=rsa-sha256; cv=none; b=AuBWS0eQGPNIa87MjieE68EpcQpdX5qJd7q5UNLS+5CLE8R+TWItrbGNXpWggIvXgfzx6V F6vpL39M/J9LbjHrBt+KyHaSNekFNT8zOCDg4QC5g6mtoEgEvmKFjSe97wSJSIveHEaLHs MpgOiIZE8YIwDH5rn6HJ9YAXLKv7EjiYS5RHlOj75RvyR6AKqpY4A7RT6LFz9tFtZ5DZAi 6jENEL3YpxN/UUfjT/gcCD6lBgHp+v1lZhCCtYdANJ1xXthEMY5pwAnyLzfJmPuQ0/SF6m tHzNYKq9E27QrvxBgbJsCstITqEdkNXNExenVImH5bV7k+iBjUqgonB9xehvBg== 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=1697079253; 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=QzkHtBNeJ3AJsx6PQcFDoruuzqdgAuQtyJ7rM1T9yso=; b=IrnkZHEgMPOXCqSEL5hXGcZpXS580kQ82VWKZOrGfhtMYlGVeF7gJ06SnE/xWk/vCbzYLe gE3dIHjCXLTOUbKyfK149zU3M50QrABEfbMxixQgqgRDtlzWhcy3WOW7SEzXIjB0TdxDdX PZzgp7Kqx4GDVkewOUtfTDK13f9sdLuad4eLiXsXSALCIk/5IKObEOmaia/2oRXjFo8zWY G/UIRC7srnaTTxL7sfB0Rv6m/vY505U1+xolYcY87TQUe/HzkyBFgpmk64KbTDX6hBV2uc N+M8aqDVHtCooGfvQMTc0CwBQzjq0NIUWK7H8D9zS5kChrJV4Omul+PjIEfa7Q== 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 4S5Z3T5hqdzmxP; Thu, 12 Oct 2023 02:54: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 39C2sD1x039070; Thu, 12 Oct 2023 02:54:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39C2sDYb039067; Thu, 12 Oct 2023 02:54:13 GMT (envelope-from git) Date: Thu, 12 Oct 2023 02:54:13 GMT Message-Id: <202310120254.39C2sDYb039067@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: 989c5f6da990 - main - freebsd-update: create deep BEs by default 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: 989c5f6da99081b1f2b76ec09e91078e531e1250 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=989c5f6da99081b1f2b76ec09e91078e531e1250 commit 989c5f6da99081b1f2b76ec09e91078e531e1250 Author: Kyle Evans AuthorDate: 2023-10-12 02:51:07 +0000 Commit: Kyle Evans CommitDate: 2023-10-12 02:54:03 +0000 freebsd-update: create deep BEs by default The -r flag to bectl needs to go away, and we need to just do the right thing. In the meantime, we can apply an -r in freebsd-update as a minimal fix to stop creating partial backups in these (non-default) deep BE setups. PR: 267535 --- usr.sbin/freebsd-update/freebsd-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index c6432dcd6b0e..438e13a51154 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -916,7 +916,7 @@ install_create_be () { echo -n "Creating snapshot of existing boot environment... " VERSION=`freebsd-version -ku | sort -V | tail -n 1` TIMESTAMP=`date +"%Y-%m-%d_%H%M%S"` - bectl create ${VERSION}_${TIMESTAMP} + bectl create -r ${VERSION}_${TIMESTAMP} if [ $? -eq 0 ]; then echo "done."; else From nobody Thu Oct 12 07:04: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 4S5gby71NZz4xMvf; Thu, 12 Oct 2023 07:04: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 4S5gby6XNwz3FCl; Thu, 12 Oct 2023 07:04:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697094254; 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=BqiCWNCtvvW6PM0KH4o3eBqDdx9cnbF72pVAQF9j9zc=; b=UXtA7e7ta9tt4O7A4aZLVKDwRrk4NKk0bPylakn919F605BqDWBdgfhIctk+DKvjPNrW/b ACfD/uDd9lSOo7U3Opa5Ln8BUmDdK5OlRwzmK57W2A6z/83TLsF9aeElhLNd/6ctmTzioN UBzVuv5+3hwMt/8XbwkJ9AuvYkU2WrYnKaqXHEacXyb9raTrtbATvO0mkopuynzYk/hdha CYm6T241Iqx27qwPwjnGtHvaVyaD/EF7fZ7RCvIjc6RQqqdSepIJrus6ZnZ1d1BZVRAPF2 Uh6ac0y7PaLIPfkQ1YoSQjAt1mDDf8Wddq9JO4cU4NnOVyi5n5hpqUgY6pz6jw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697094254; a=rsa-sha256; cv=none; b=wzqDBb7yiTPNlFb9c2ZNBV1A6bq041Up85wmGiEGTUHiB4+u3kNM22WDbEwsd+4wk4LaRi XKif0NwmbZSt5qbbRIc+lTA6AbPUby8vHUGwLSqUIoJp3Bjq8RvW5XNNFuw8oBu99ediY6 BRljM9SrMeSQ2gtomuiCDDX+6fWUEOJlA46QE3KXOMtQxbs5xL4E5gYbZGjm0RBp6fKp6P Zic1Qfg01TdpCVnfWb5rsNDqXrSwHCbFzAyoYUoH3egebYfkDT6MoON74tslNCMCp+JVk8 p0IA+qXWrkJETOsAc0E+2qGoTkggXXsurWEQzZmD1aFCLIHAI69DHdgg+r64qg== 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=1697094254; 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=BqiCWNCtvvW6PM0KH4o3eBqDdx9cnbF72pVAQF9j9zc=; b=x89WPht7Mh4F5pLSrWga/QtHl1Gy76kegB0wgUgB9TpBPR/41JO9b2uikxTXfzY1oBN9q6 6uU0JC6YjNCr6aEHsAkcQg0ih5oPKUJef5/ZJR7WDXyuwhOrcD8qjYPDrRT6rhOi9VNADl QTNr4zZMpTV8RpGE8FS4b2zIfOPFKi0pTRo/fDe+rJCcoGYEkjlM0Xa0hOLAS32OpCTs6D RynKNucjCVyumceuXitOv8nhCY+MZWp3dTcNgVDlffMWk/BMtXzs4E7cV+/4CUrLJR6bEE xO7smcd6tnuRP7K93kmz3x0zYqH6l/ZUn7+1BaCEuWbPy7ayJ9yOYNp2peL+IQ== 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 4S5gby5bBjztkG; Thu, 12 Oct 2023 07:04: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 39C74ERQ058243; Thu, 12 Oct 2023 07:04:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39C74ElD058240; Thu, 12 Oct 2023 07:04:14 GMT (envelope-from git) Date: Thu, 12 Oct 2023 07:04:14 GMT Message-Id: <202310120704.39C74ElD058240@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: a92fc3122d2b - main - vfs: count recycles by vnlru and by vn_alloc separately 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: a92fc3122d2becfbf5a627af6eda5cedfac57c31 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a92fc3122d2becfbf5a627af6eda5cedfac57c31 commit a92fc3122d2becfbf5a627af6eda5cedfac57c31 Author: Mateusz Guzik AuthorDate: 2023-10-12 06:47:45 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-12 06:50:07 +0000 vfs: count recycles by vnlru and by vn_alloc separately Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/kern/vfs_subr.c | 48 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 01585ac9eefd..b14793ccd84e 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -110,7 +110,7 @@ static void delmntque(struct vnode *vp); static int flushbuflist(struct bufv *bufv, int flags, struct bufobj *bo, int slpflag, int slptimeo); static void syncer_shutdown(void *arg, int howto); -static int vtryrecycle(struct vnode *vp); +static int vtryrecycle(struct vnode *vp, bool isvnlru); static void v_init_counters(struct vnode *); static void vn_seqc_init(struct vnode *); static void vn_seqc_write_end_free(struct vnode *vp); @@ -211,6 +211,11 @@ SYSCTL_COUNTER_U64(_vfs, OID_AUTO, recycles_free, CTLFLAG_RD, &recycles_free_cou SYSCTL_COUNTER_U64(_vfs_vnode_vnlru, OID_AUTO, recycles_free, CTLFLAG_RD, &recycles_free_count, "Number of free vnodes recycled to meet vnode cache targets"); +static counter_u64_t direct_recycles_free_count; +SYSCTL_COUNTER_U64(_vfs_vnode_vnlru, OID_AUTO, direct_recycles_free, CTLFLAG_RD, + &direct_recycles_free_count, + "Number of free vnodes recycled by vn_alloc callers to meet vnode cache targets"); + static counter_u64_t vnode_skipped_requeues; SYSCTL_COUNTER_U64(_vfs_vnode_stats, OID_AUTO, skipped_requeues, CTLFLAG_RD, &vnode_skipped_requeues, "Number of times LRU requeue was skipped due to lock contention"); @@ -771,6 +776,7 @@ vntblinit(void *dummy __unused) vnodes_created = counter_u64_alloc(M_WAITOK); recycles_count = counter_u64_alloc(M_WAITOK); recycles_free_count = counter_u64_alloc(M_WAITOK); + direct_recycles_free_count = counter_u64_alloc(M_WAITOK); vnode_skipped_requeues = counter_u64_alloc(M_WAITOK); /* @@ -1317,7 +1323,7 @@ SYSCTL_INT(_vfs_vnode_vnlru, OID_AUTO, max_free_per_call, CTLFLAG_RW, * Attempt to reduce the free list by the requested amount. */ static int -vnlru_free_impl(int count, struct vfsops *mnt_op, struct vnode *mvp) +vnlru_free_impl(int count, struct vfsops *mnt_op, struct vnode *mvp, bool isvnlru) { struct vnode *vp; struct mount *mp; @@ -1403,7 +1409,7 @@ vnlru_free_impl(int count, struct vfsops *mnt_op, struct vnode *mvp) * * Check nullfs for one example (null_getwritemount). */ - vtryrecycle(vp); + vtryrecycle(vp, isvnlru); count--; if (count == 0) { break; @@ -1419,22 +1425,33 @@ vnlru_free_impl(int count, struct vfsops *mnt_op, struct vnode *mvp) * XXX: returns without vnode_list_mtx locked! */ static int -vnlru_free_locked(int count) +vnlru_free_locked_direct(int count) { int ret; mtx_assert(&vnode_list_mtx, MA_OWNED); - ret = vnlru_free_impl(count, NULL, vnode_list_free_marker); + ret = vnlru_free_impl(count, NULL, vnode_list_free_marker, false); mtx_assert(&vnode_list_mtx, MA_NOTOWNED); return (ret); } static int -vnlru_free(int count) +vnlru_free_locked_vnlru(int count) +{ + int ret; + + mtx_assert(&vnode_list_mtx, MA_OWNED); + ret = vnlru_free_impl(count, NULL, vnode_list_free_marker, true); + mtx_assert(&vnode_list_mtx, MA_NOTOWNED); + return (ret); +} + +static int +vnlru_free_vnlru(int count) { mtx_lock(&vnode_list_mtx); - return (vnlru_free_locked(count)); + return (vnlru_free_locked_vnlru(count)); } void @@ -1445,7 +1462,7 @@ vnlru_free_vfsops(int count, struct vfsops *mnt_op, struct vnode *mvp) MPASS(mvp != NULL); VNPASS(mvp->v_type == VMARKER, mvp); mtx_lock(&vnode_list_mtx); - vnlru_free_impl(count, mnt_op, mvp); + vnlru_free_impl(count, mnt_op, mvp, true); mtx_assert(&vnode_list_mtx, MA_NOTOWNED); } @@ -1702,7 +1719,7 @@ vnlru_proc_light(void) return (false); if (freecount != 0) { - vnlru_free(freecount); + vnlru_free_vnlru(freecount); } mtx_lock(&vnode_list_mtx); @@ -1748,7 +1765,7 @@ vnlru_proc(void) * try to reduce it by discarding from the free list. */ if (rnumvnodes > desiredvnodes + 10) { - vnlru_free_locked(rnumvnodes - desiredvnodes); + vnlru_free_locked_vnlru(rnumvnodes - desiredvnodes); mtx_lock(&vnode_list_mtx); rnumvnodes = atomic_load_long(&numvnodes); } @@ -1848,7 +1865,7 @@ SYSINIT(vnlru, SI_SUB_KTHREAD_UPDATE, SI_ORDER_FIRST, kproc_start, * through vgone(). */ static int -vtryrecycle(struct vnode *vp) +vtryrecycle(struct vnode *vp, bool isvnlru) { struct mount *vnmp; @@ -1893,7 +1910,10 @@ vtryrecycle(struct vnode *vp) return (EBUSY); } if (!VN_IS_DOOMED(vp)) { - counter_u64_add(recycles_free_count, 1); + if (isvnlru) + counter_u64_add(recycles_free_count, 1); + else + counter_u64_add(direct_recycles_free_count, 1); vgonel(vp); } VOP_UNLOCK(vp); @@ -1966,7 +1986,7 @@ vn_alloc_hard(struct mount *mp, u_long rnumvnodes, bool bumped) * should be chosen so that we never wait or even reclaim from * the free list to below its target minimum. */ - if (vnlru_free_locked(1) > 0) + if (vnlru_free_locked_direct(1) > 0) goto alloc; mtx_assert(&vnode_list_mtx, MA_NOTOWNED); if (mp == NULL || (mp->mnt_kern_flag & MNTK_SUSPEND) == 0) { @@ -1983,7 +2003,7 @@ vn_alloc_hard(struct mount *mp, u_long rnumvnodes, bool bumped) msleep(&vnlruproc_sig, &vnode_list_mtx, PVFS, "vlruwk", hz); if (atomic_load_long(&numvnodes) + 1 > desiredvnodes && vnlru_read_freevnodes() > 1) - vnlru_free_locked(1); + vnlru_free_locked_direct(1); else mtx_unlock(&vnode_list_mtx); } From nobody Thu Oct 12 07:04: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 4S5gc01M3hz4xMl1; Thu, 12 Oct 2023 07:04:16 +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 4S5gc00L7Dz3FMc; Thu, 12 Oct 2023 07:04:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697094256; 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=NH3SHLKmpU3OS8jz7jaevhiAWd4AzjgRldCvfI2jwh8=; b=diJXggxio3RFMx6h0TuliJD536d7YZL6LXDU7bL+CJoiqmBTffYMRHHHzyaFVU6jdj1Fw1 O5bywWebTulIhfYxXZcNkqJC5vkDlJEKWXaJqusjfVE/A0TSe8OIfCp73zS0jHCEJka0EP W5Fxji1pY3LlZheMOIQ77HKb2FWCFkpL9SFib9Y7cygXp1QUNiPiZseBIvJI2GeFbsOiJS n0nXpLj820nqwGsQYVO4e8XdeHfz++19VQycWHt4cT5p0pZeB5MnmzZdiek/p+qTZ7XKn7 Vd+XSP/UPBXxJBCaG8MAnD5pcI14UdqwwgTXimJ97srBwCCnV3q+6jpzq+rI0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697094256; a=rsa-sha256; cv=none; b=Y+I4D5TjMpJ2AYuRFUHE2jdD6gxz8gsaBjGXPATiWBCyuzZFvqucmLs9W2/wyUjF3K04O4 jfNiJzxj/TarIc+x8hsxB+ehcIPiMyievxf2wyn3JtrQ8qK5ZXYfwJ8TAimAZw2e/DuH20 6fcsvpNRK3zWQvj9AYvYMEiGmi3QkgJHtevdnHJR8TR5w+tIjBYiNgXvMTLM3VSClImYMg ptGzc2HrE0zYsXDYNnHNOF64IogRJXWnbJdXs4BGy5jgnbsDME9TvQ6TycZ9K9uphZUSJa azbYQfNDvFvUmgTo7Y/l2uklM4p0vrdvhdxPX9XIOtbYIJcTNd8zaQTud8v2SQ== 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=1697094256; 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=NH3SHLKmpU3OS8jz7jaevhiAWd4AzjgRldCvfI2jwh8=; b=bQeZgwrn6Kw/pMoAq30odW+WJIxIOiyHKoAfYj5McoCW8Mivu2eZOST6KHtaUGyEmuKG7m K34SRlZh8KPJT5LYJAfcmdfqIC/IeXJdqABXFsa9dHB4kP+vw9NxedLVeUkFrLZHjueDEz Gv/CAUVuQVyV64EhtMpNjoXn9rC3n2BzMu+hObgmXH9/I88eMTDhnpMR4BHaZp1sxRTXh7 l4xbbAT4YSEe4OCmG5WbyJbriRXcn4Qs/DWqvsnuLrT63ZJn7lQjYqXRK/1EQQ8mfTbRJc yMN/Z5Jvay7FBUOp9A37lwPC+pSVuLOBdqh/D9xQGUJNwx0Cp9ccPWWwan2ZtA== 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 4S5gbz6TrhzvCH; Thu, 12 Oct 2023 07:04: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 39C74FRS058300; Thu, 12 Oct 2023 07:04:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39C74FbP058297; Thu, 12 Oct 2023 07:04:15 GMT (envelope-from git) Date: Thu, 12 Oct 2023 07:04:15 GMT Message-Id: <202310120704.39C74FbP058297@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: 37544d976811 - main - vfs: convert recycles_count and recycles_free_count to mere u_long 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: 37544d9768110fd67527db7f2a3f7bb6fc977582 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=37544d9768110fd67527db7f2a3f7bb6fc977582 commit 37544d9768110fd67527db7f2a3f7bb6fc977582 Author: Mateusz Guzik AuthorDate: 2023-10-12 06:57:59 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-12 07:00:15 +0000 vfs: convert recycles_count and recycles_free_count to mere u_long Only vnlru ever updates them. This also removes recycles_count updates from hand-rolled debug vnode recycling via sysctl. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/kern/vfs_subr.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index b14793ccd84e..0fe2bc46446c 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -199,16 +199,19 @@ static long wantfreevnodes; static long __exclusive_cache_line freevnodes; static long freevnodes_old; -static counter_u64_t recycles_count; -SYSCTL_COUNTER_U64(_vfs, OID_AUTO, recycles, CTLFLAG_RD, &recycles_count, +static u_long recycles_count; +SYSCTL_ULONG(_vfs, OID_AUTO, recycles, CTLFLAG_RD | CTLFLAG_STATS, &recycles_count, 0, "Number of vnodes recycled to meet vnode cache targets (legacy)"); -SYSCTL_COUNTER_U64(_vfs_vnode_vnlru, OID_AUTO, recycles, CTLFLAG_RD, &recycles_count, +SYSCTL_ULONG(_vfs_vnode_vnlru, OID_AUTO, recycles, CTLFLAG_RD | CTLFLAG_STATS, + &recycles_count, 0, "Number of vnodes recycled to meet vnode cache targets"); -static counter_u64_t recycles_free_count; -SYSCTL_COUNTER_U64(_vfs, OID_AUTO, recycles_free, CTLFLAG_RD, &recycles_free_count, +static u_long recycles_free_count; +SYSCTL_ULONG(_vfs, OID_AUTO, recycles_free, CTLFLAG_RD | CTLFLAG_STATS, + &recycles_free_count, 0, "Number of free vnodes recycled to meet vnode cache targets (legacy)"); -SYSCTL_COUNTER_U64(_vfs_vnode_vnlru, OID_AUTO, recycles_free, CTLFLAG_RD, &recycles_free_count, +SYSCTL_ULONG(_vfs_vnode_vnlru, OID_AUTO, recycles_free, CTLFLAG_RD | CTLFLAG_STATS, + &recycles_free_count, 0, "Number of free vnodes recycled to meet vnode cache targets"); static counter_u64_t direct_recycles_free_count; @@ -458,7 +461,6 @@ sysctl_try_reclaim_vnode(SYSCTL_HANDLER_ARGS) goto putvnode; } - counter_u64_add(recycles_count, 1); vgone(vp); putvnode: vput(vp); @@ -492,7 +494,6 @@ sysctl_ftry_reclaim_vnode(SYSCTL_HANDLER_ARGS) if (error != 0) goto drop; - counter_u64_add(recycles_count, 1); vgone(vp); VOP_UNLOCK(vp); drop: @@ -774,8 +775,6 @@ vntblinit(void *dummy __unused) uma_prealloc(buf_trie_zone, nbuf); vnodes_created = counter_u64_alloc(M_WAITOK); - recycles_count = counter_u64_alloc(M_WAITOK); - recycles_free_count = counter_u64_alloc(M_WAITOK); direct_recycles_free_count = counter_u64_alloc(M_WAITOK); vnode_skipped_requeues = counter_u64_alloc(M_WAITOK); @@ -1282,7 +1281,7 @@ restart: vn_finished_write(mp); goto next_iter_unlocked; } - counter_u64_add(recycles_count, 1); + recycles_count++; vgonel(vp); VOP_UNLOCK(vp); vdropl_recycle(vp); @@ -1911,7 +1910,7 @@ vtryrecycle(struct vnode *vp, bool isvnlru) } if (!VN_IS_DOOMED(vp)) { if (isvnlru) - counter_u64_add(recycles_free_count, 1); + recycles_free_count++; else counter_u64_add(direct_recycles_free_count, 1); vgonel(vp); From nobody Thu Oct 12 07: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 4S5hFF6Ch9z4xPMc; Thu, 12 Oct 2023 07: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 4S5hFF5h5cz3HhT; Thu, 12 Oct 2023 07: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=1697095985; 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=kEwU2tcwXvaBKTnnMk3W1+f9qC1ma969018KAbsbDhU=; b=w+G5pgKfLgH3HAF0z/zEq9LIfb2PDbeSR3XatfqGhduMVSEJb7ZGFdpXxzNI6EhhPH5gC5 i2o+uePRtstyV+onsIwpSucdj4za0SjwJwl7/SK3Jtc32lyPcg14fysPIgEZM8fl5njGBs 6/4zL6CawA78vfxxl6DcucSSghwsJKm6n6CPrkI8ggCKUCJzoPsqs94jom/PGPaUYd7VEk 8dj0ygt+U2jaDxfK7x78W0vby9tVnw9hG4bdbmKDkATVtqkuigExql+rJ0tMzp2BPEiZ3V uefCnshWEppouA8gIpt+mqH/5AgB6xtuK+B7crLamwFSyzEo+YzRmUVlf5c/eA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697095985; a=rsa-sha256; cv=none; b=YnDvtNn0YixBGqsWqTXrfjDplaEasMV3aPnRjiDlf6uvHIbH8SX5Hd6kVEulSOswwvvqO1 wOfdlFKIgRs2QnNqFm3qUiJ9Quytn7WXdrqGIn34xcCcldQ9OcFi3dqU6PYZf52ljoE6bH ndbm7AZ5wvoxrkHoYt+BaU69I06A+EeILOeXyzHERi98kOTBCIzp+07KO2mJlOCYlTRyuc sAF1zpLUxh0JM81b7bzsQycLry2MH4jS1Lp7ocp4V30ZhtYF0Y3DM+0UlAXxjCgl24YJsP hkCJIBtCUgaRzCm9wd7oMD0p7HXlDue5q6o3pVuLyY2bgZTtdp/DWonN92lMaA== 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=1697095985; 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=kEwU2tcwXvaBKTnnMk3W1+f9qC1ma969018KAbsbDhU=; b=pItP2sJ2YGU14Z2VRilwAWIKfoFyQzHt9XR1Owrj9F5KdANvVjzF6J/DJwV9/Iw2KlwWvA dNUdX+S1M/nMOVQJD+M6UjVFzLziZbT+tnikaZMZdJ7m5XXJ3xM5ItHCnY4FSHNIm+fcXN 2gHRw54kuTQ7RtqxmCSCGezJ8p0VUNe/1Xu5Vb9iMZt0sRI1UHUa28W7LYWmOIO05l8rFk lFq8U7OujGrD5Hdav0mmsYkdyZI8V5J4kd2gBqTnx9IxDSJ+wpAnC/NvxcfQmRbvDJvhQT AwtYp8Jvc6SqgCEwqruHHjUaChS3r5PMzLytZdhUKzMuxgD0hddlCc31xP9GnA== 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 4S5hFF4l61zvfP; Thu, 12 Oct 2023 07: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 39C7X5nZ007346; Thu, 12 Oct 2023 07: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 39C7X5hF007343; Thu, 12 Oct 2023 07:33:05 GMT (envelope-from git) Date: Thu, 12 Oct 2023 07:33:05 GMT Message-Id: <202310120733.39C7X5hF007343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 257405d707d7 - main - xilinx: reset: Remove debug printfs 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 257405d707d77bc55b38e7c2bb83b8a9247a86ae Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=257405d707d77bc55b38e7c2bb83b8a9247a86ae commit 257405d707d77bc55b38e7c2bb83b8a9247a86ae Author: Emmanuel Vadot AuthorDate: 2023-10-12 07:32:32 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-12 07:32:59 +0000 xilinx: reset: Remove debug printfs Sponsored by: Beckhoff Automation GmbH & Co. KG --- sys/dev/clk/xilinx/zynqmp_reset.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/clk/xilinx/zynqmp_reset.c b/sys/dev/clk/xilinx/zynqmp_reset.c index 484f19c229c5..52074d4c62af 100644 --- a/sys/dev/clk/xilinx/zynqmp_reset.c +++ b/sys/dev/clk/xilinx/zynqmp_reset.c @@ -183,7 +183,6 @@ zynqmp_reset_assert(device_t dev, intptr_t id, bool reset) if (id > ZYNQMP_RESET_MAX) return (EINVAL); sc = device_get_softc(dev); - device_printf(dev, "%s called for id = %ld, reset =%d\n", __func__, id, reset); rv = ZYNQMP_FIRMWARE_RESET_ASSERT(sc->parent, id, reset); return (rv); } @@ -197,7 +196,6 @@ zynqmp_reset_is_asserted(device_t dev, intptr_t id, bool *reset) if (id > ZYNQMP_RESET_MAX) return (EINVAL); sc = device_get_softc(dev); - device_printf(dev, "%s called for id = %ld\n", __func__, id); rv = ZYNQMP_FIRMWARE_RESET_GET_STATUS(sc->parent, id, reset); return (rv); From nobody Thu Oct 12 10:15: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 4S5lrd70fFz4nhYL; Thu, 12 Oct 2023 10:15:29 +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 4S5lrd6Xl2z3TqC; Thu, 12 Oct 2023 10:15:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697105729; 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=2u9jBlG7YVaZXdReiVckWxUJC0UcZLzVIDKWG7aQCAM=; b=RyE3oZGyOGoprG/pX2xF4w69dbud5KB8g+i3mKicr+zmmCJtX917fWhJ58dcUGlOixx4TH cyyXr450VXN4Npge2Bt+zT9cddyty0XC244PemMg1pjKMtm1mSIRKqnuqBIFziwHYjg39w ANIH6rmSByv01Y03TLp4tHpsjGVIo3zmlNbVxcZt9CweS0YLuaPpFKyfi1rfsfVOCzy/tI DTFe3Bc/beoZrRUzcpbwldN8F31e9xT0vLqvop6dJHKhOpXXH1ANdWHcujcLtkdyM2aqVw 9opqXsRlYZAy0wUcO4mr8S0qKPrqfvdvFiZWXKVBBojW3nI6EUYrlq8gMNFLIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697105729; a=rsa-sha256; cv=none; b=BGoXVUOpOzKsVS6E2XsXzHNaP8XwLNMHk3h2y7nSvOD1HsftPFfFgeusl8Q7BajXVkn1Qk lh0AN8lp040Gi0+wsqv0OlcO66fXYAqxxrCbwZitcwvrXRoViOKcWnZaIeUWNvGd9Svgil OrE2I6R82/T/otEg/dPAtgSo9wHhGMpA7ZXymBgEOx4cjn40DLoGmvXaDZV7d3oGzDAw5y uWi5W+6t5mrfxgdqfHsXSGRoHKV6Fjdd40kS1hbQrSZ28g+Zn+Dm0K+ClOcPUTfoHUI8V/ 8EvyuTe5rMBIxvumkqgtT1wALuVq+V/gbk/vqQXTqMJDA3WSR4Yz+Mhs42yoJQ== 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=1697105729; 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=2u9jBlG7YVaZXdReiVckWxUJC0UcZLzVIDKWG7aQCAM=; b=phyysd90nn56AyzopDEQO3pzUsXYd/3hnTlkgsSRvNqJY5HL8bNWm7JygxJpGk9xqWvhFr RTWaPsL/t+L4c/Y7uWGXcINod4SYIACZlA1/wbHBdwX0hvhmlGxiOEm2q6CHeOKQu4142O I+8pSeB0bgiL+Jv8Rfw99zHg8ndacZqQidE6XxaUDovnwIAGUMrUoicNNcbYa6RAF1qVtX eDKNV11ac9rZwKesKfrFJpvQY3O/lqiCrfDC8t5haL6+1q/PmzerVDW4eq/wM03XE4YkOp Rx5GQ341RBao66aLBraW0Il6Fa2nL/qttkG2E3urtoFBjQ9CmL5+dv8kMWYA+w== 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 4S5lrd5d8Rz10Tt; Thu, 12 Oct 2023 10:15:29 +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 39CAFTWN073170; Thu, 12 Oct 2023 10:15:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39CAFTWt073167; Thu, 12 Oct 2023 10:15:29 GMT (envelope-from git) Date: Thu, 12 Oct 2023 10:15:29 GMT Message-Id: <202310121015.39CAFTWt073167@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: 51dc362d1a14 - main - boottrace: Add corresponding sysctl knob for loader tunable 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: 51dc362d1a148362dc4cfacaa3629db928523204 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=51dc362d1a148362dc4cfacaa3629db928523204 commit 51dc362d1a148362dc4cfacaa3629db928523204 Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:48 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-12 10:14:48 +0000 boottrace: Add corresponding sysctl knob for loader tunable The loader tunable 'kern.boottrace.table_size' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 --- sys/kern/kern_boottrace.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/kern_boottrace.c b/sys/kern/kern_boottrace.c index cb013d4e8be1..86fee4f47fbe 100644 --- a/sys/kern/kern_boottrace.c +++ b/sys/kern/kern_boottrace.c @@ -158,6 +158,10 @@ SYSCTL_INT(_kern_boottrace, OID_AUTO, shutdown_trace_threshold, CTLFLAG_RWTUN, &shutdown_trace_threshold, 0, "Tracing threshold (ms) below which tracing is ignored"); +SYSCTL_UINT(_kern_boottrace, OID_AUTO, table_size, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &bt.size, 0, + "Boot-time tracing table size"); + /* * Dump a trace to buffer or if buffer is NULL to console. * From nobody Thu Oct 12 10:15: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 4S5lrg10Sfz4nhfJ; Thu, 12 Oct 2023 10:15: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 4S5lrg0SmDz3V1m; Thu, 12 Oct 2023 10:15:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697105731; 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=tk0u959OLyQhslaVouKxncdqgnfNqRCF1tNA7LsPV+A=; b=A24cNfNJxKVwETNJR0ynlo8HrLw4eAa52sb3sN/zFUJgFpk4x3zt2QPGN64szJjbez49t0 IE1QdPNaDeLCGfqdcFcjDcaesKB6AMrB0dCitKrjGKyKEgtp1cvD7o8TBcJaIElknyOy9J p2QWCcO1AD2+7g+s4h+BfHQ4iHPCbD2wwQ8gh7KvYgeBnF3Iu1OGGpSE7sBEYtqNxfC8B8 9Gj6PRo1SjX4mARYrwkn2IrSHs3mGpA7Q7DtwpN3GSRArb2C6uAZGqHJClz1xiYT8aEnv6 ns9NGGGr+WJQ5u2pQ8FKzuTjoJR7cbv4OSs8arTRGDOT6JyhwkgKx5dbmymThg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697105731; a=rsa-sha256; cv=none; b=WIlWGniAoxi4zSn0v+IYW/zaMtIBX9fCyjmgI9wk1D4M3qPPNM5hl8tztGWVZkO/XMDjF+ 8DUj9RKMksfZxPLVinZydOJpDq/NCJgJg2T+cXLb/uCUPus1lbwoyPgU+/hDoybRnz6z/M q5FrpGKP9ERIO7oGVFuuC/S8ME7bKlEpJCqd3isBY6LV62XcbSINSRwXWzQ69sMcyAviQ+ 9BRhpplzbcOBTVFd1BFmkiTVlpDBvT+Y8+7k/bJNk66sAmkniek6STRwrq+iDUuKqwsENb qqdWtCy1zeqFV365nc5DOxzmJuAoY1ciXv3P4NWmHnaQFA40Dm2v0VRzNoYCDQ== 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=1697105731; 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=tk0u959OLyQhslaVouKxncdqgnfNqRCF1tNA7LsPV+A=; b=KwWohaPuWs8TET+6Ca6kq/3R9a2EUvVTxcOGlyS1ZQNuAC/5pIBOezlvqb/YAoywEWMM27 lExixvu1Lt/bsACY+hVjs649lVo6lh3uJlVBcCPWqZGjtmt6Y8ZVCAAsJcISGloPWqGYH5 MHiHCymmxC7oBQjTsoYC0EabrrkAR8o0tEkyPnvSe8vztKOnbhGLmo/Ilt3TpxQQ8pddS1 46SJOq6cXi74yqlsOYPKZAm8Q+orFvsASaPOjrCb3cOIhZ/w5JoWYKvm49ZW9TALufEp0C 6l0f7YIw1Yf+kFzR5ZinpDKkLEHq+lDYmiQws3ok66R13RpSKgW/H/KukahSnQ== 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 4S5lrf6cv2z10p2; Thu, 12 Oct 2023 10:15: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 39CAFUPA073228; Thu, 12 Oct 2023 10:15:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39CAFUwV073225; Thu, 12 Oct 2023 10:15:30 GMT (envelope-from git) Date: Thu, 12 Oct 2023 10:15:30 GMT Message-Id: <202310121015.39CAFUwV073225@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: db5d0bc868be - main - kasan: Add corresponding sysctl knob for loader tunable 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: db5d0bc868be669ed6588ebeccf8c02e76aabc41 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=db5d0bc868be669ed6588ebeccf8c02e76aabc41 commit db5d0bc868be669ed6588ebeccf8c02e76aabc41 Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:48 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-12 10:14:48 +0000 kasan: Add corresponding sysctl knob for loader tunable The loader tunable 'debug.kasan.disabled' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 --- sys/kern/subr_asan.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/kern/subr_asan.c b/sys/kern/subr_asan.c index 44c96435a499..c3664d9cf6c2 100644 --- a/sys/kern/subr_asan.c +++ b/sys/kern/subr_asan.c @@ -92,7 +92,10 @@ SYSCTL_INT(_debug_kasan, OID_AUTO, panic_on_violation, CTLFLAG_RDTUN, &panic_on_violation, 0, "Panic if an invalid access is detected"); -static bool kasan_enabled __read_mostly = false; +#define kasan_enabled (!kasan_disabled) +static bool kasan_disabled __read_mostly = true; +SYSCTL_BOOL(_debug_kasan, OID_AUTO, disabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &kasan_disabled, 0, "KASAN is disabled"); /* -------------------------------------------------------------------------- */ @@ -136,7 +139,7 @@ kasan_init(void) kasan_md_init(); /* Now officially enabled. */ - kasan_enabled = true; + kasan_disabled = false; } void @@ -180,7 +183,7 @@ kasan_code_name(uint8_t code) #define REPORT(f, ...) do { \ if (panic_on_violation) { \ - kasan_enabled = false; \ + kasan_disabled = true; \ panic(f, __VA_ARGS__); \ } else { \ struct stack st; \ From nobody Thu Oct 12 10:15: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 4S5lrh3sW8z4nhfL; Thu, 12 Oct 2023 10:15:32 +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 4S5lrh1j1dz3Tqy; Thu, 12 Oct 2023 10:15:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697105732; 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=SGhuOgV+M3UpAFBVXjEWUTkv96qGx4l90ECrpwds5HE=; b=apSc3amuUg+YK0nfKLSDby/gRJvPGIqSN5/vQif/4EYw9Xrkxs0/z00aCmrWEFlIVX8I6g G1EONcxD1gJCyVuorEdJ+xoYowbtGUHCgQPcCpJMnFXJHszeB67ub+8KaarYQ1BGENQ4M6 2e1QX/v6INMzXFgXDi5AoC7NSt54HklzR+RH8RDDn/TrZOl5rrsNT9svm9aErToS+2ESvB gIPHAQTOxbd+702PZziQWnmQrlHvKJ3/32XQzSXrrf9o4psM71W4Wf3HhNoLC9RLfb6GdR oD6K/8NVYOHIwF3aeMD7VsMWpuc+sZbJdn+fzktVcwuloa/VVk6krtVB44yFOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697105732; a=rsa-sha256; cv=none; b=DsQDmxFZ03Xg0vu/4hZsRfEllgVteVnLtxqmoOa+oWauhTGJx9dsKFnFyzuP1cyz8bMh6/ 99s/u2e2PZJjGDwxFoN2yWWdYJFZ/CWkUOpFzXENOOwv6bAPr1FWjZVP4wH6RIfCZf8eCi fw8w55zGA+fI6IZkGAl/LGgZq2aSQ1XhVsQ0WUANIkk2aoz6bKVkXPtSp4g0w+GetfOvDO JGuh5o8Uz+WNoQfFNj2DYyAUVsKEKFDRfvOi8OAjfgk7z5+dSUEDFo7dLa0HDRd/zqneku Qf6reaS78ERg76g4gFJbaPfUVLfBeq/Jd/5yVEXYKjF/6wS5ZA6GSlTl6OgR6g== 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=1697105732; 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=SGhuOgV+M3UpAFBVXjEWUTkv96qGx4l90ECrpwds5HE=; b=cyo6v4QXLK9FpvLghjw7ta8k5hDnwqxWQuBTVxwTgtyQ3e/3ej+DN6xOoYK45gKiz/L/Gy LMZGEqtpE4zE/Vxl4xIARLMkfysaLE/wHJYyNRCnWBTYuJABKNat56uLvATQcdr93gLS4/ 43IpXm/j66eh7vY865Z4DHHWOGlgrIuSUoMIDG2c9UPDiWDMN078gXxEQ1393BmFfElqGk T19WrO1wC3uxyAO5nXmngV+fj6u1g04XPUqjZo53Q33+8idJ+4Im0sp5aYvw6ivOh3Ry1Z 8eJoS0bESk5BFk1ARMz62VVyvT0+bmui6PBjPbLneTTNz4zmsMYQBYt12LsxmQ== 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 4S5lrh0W6Tz10Tv; Thu, 12 Oct 2023 10:15:32 +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 39CAFV1C073279; Thu, 12 Oct 2023 10:15:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39CAFVoQ073276; Thu, 12 Oct 2023 10:15:31 GMT (envelope-from git) Date: Thu, 12 Oct 2023 10:15:31 GMT Message-Id: <202310121015.39CAFVoQ073276@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: 1d2b743784f7 - main - kmsan: Add corresponding sysctl knob for loader tunable 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: 1d2b743784f7527a6840fe35ddb7e34cd41bc17a Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=1d2b743784f7527a6840fe35ddb7e34cd41bc17a commit 1d2b743784f7527a6840fe35ddb7e34cd41bc17a Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:49 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-12 10:14:49 +0000 kmsan: Add corresponding sysctl knob for loader tunable The loader tunable 'debug.kmsan.disabled' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 --- sys/kern/subr_msan.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/kern/subr_msan.c b/sys/kern/subr_msan.c index 57caeb454b42..54948370a14a 100644 --- a/sys/kern/subr_msan.c +++ b/sys/kern/subr_msan.c @@ -108,15 +108,13 @@ static uint8_t msan_dummy_shad[PAGE_SIZE] __aligned(PAGE_SIZE); static uint8_t msan_dummy_write_shad[PAGE_SIZE] __aligned(PAGE_SIZE); static uint8_t msan_dummy_orig[PAGE_SIZE] __aligned(PAGE_SIZE); static msan_td_t msan_thread0; -static bool kmsan_enabled __read_mostly; - static bool kmsan_reporting = false; /* * Avoid clobbering any thread-local state before we panic. */ #define kmsan_panic(f, ...) do { \ - kmsan_enabled = false; \ + kmsan_disabled = true; \ panic(f, __VA_ARGS__); \ } while (0) @@ -142,6 +140,11 @@ SYSCTL_BOOL(_debug_kmsan, OID_AUTO, panic_on_violation, CTLFLAG_RWTUN, &panic_on_violation, 0, "Panic if an invalid access is detected"); +static bool kmsan_disabled __read_mostly = true; +#define kmsan_enabled (!kmsan_disabled) +SYSCTL_BOOL(_debug_kmsan, OID_AUTO, disabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &kmsan_disabled, 0, "KMSAN is disabled"); + static MALLOC_DEFINE(M_KMSAN, "kmsan", "Kernel memory sanitizer"); /* -------------------------------------------------------------------------- */ @@ -599,7 +602,7 @@ kmsan_init(void) thread0.td_kmsan = &msan_thread0; /* Now officially enabled. */ - kmsan_enabled = true; + kmsan_disabled = false; } /* -------------------------------------------------------------------------- */ From nobody Thu Oct 12 10:15:33 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 4S5lrj3CPYz4nhYW; Thu, 12 Oct 2023 10:15:33 +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 4S5lrj2Pxsz3Ttw; Thu, 12 Oct 2023 10:15:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697105733; 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=/wx67o7ZsVtXR5LUcUg4wb+qTFtZ3fMqNv1YCmySYEs=; b=kN75tw3mLgTQL4wLAl1kNXEZu+ZGsAawuvEBrd3EJXmkAW/zhfj33snHKhkQ2FuNuDzHGZ c4EkIavDVhMqoEWBU2NC4x7G7+yuPr3k/NuxwVdpABHAYsfTWpUa67YJbPZEisJkMSRpRv Eo13vxpgC31uOK90bBEtUbQlCx9PI4L/08Z+ihbQvR/Y9TIHREx/kypxDb3jyMZmvdsvpq f5w466bqbgWBxb6sMGriDLOjrMedFt1SoVsucPYIgqFIcq1cCq3cPdhTf9+UvDoguWqA5h Jd40N0mrMKCDsLmlvDwgyu3qjI7ecbf3M59PqnIyRZn+w2zUI2Yguj4RQRkUTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697105733; a=rsa-sha256; cv=none; b=b/S7yyTawuK0Jc3tyCG6furdQLuiEfoDpZhXCf+U/KFYNRBYzy4L65uOGH59SEEYb2GmND VuwtYKmpaM+WJKq/ln2a/g8HuNMhzjBccA8WSLzXqpcel8LS4exUS3nB/0YOJrfHBC8OJq 5FWFDRG/3LHykAvnJq66bWyRNUUv46sY5aJqvgi5JIlWh+2WPa7HKzBXZPhDaTgdaUNYMr XRiAMdDX4PVd6hYTeMWxdRP4P0CUK3CM6kWEQgEKwu1LN8Id6Mc+oBNeOoywQt5q4HhuBX fWYQRt7UrNDeER9NNBydjhbtV76ZcC71UcjPcYTos19A2u0FbVrRTkbYSQk9RA== 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=1697105733; 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=/wx67o7ZsVtXR5LUcUg4wb+qTFtZ3fMqNv1YCmySYEs=; b=QX9zSMvyZMiOnfNe1ilYd4qFHa25Qr15XXbs5F3S63NCOzyQaypz43InwocdhGHfqm4stk w+RQNe9NTbv1USMxupYKr0dMVMG/G2vvZHcqlzp7I4kylMWXAf0uISdskM1701LSHEIpsZ LyqyP0RrJB4S9ATj/Q5r98pIVe+cx0N1khC5/T8c7AIWCnRKMPByq0PEtvgBUm5dVaP9It HjlEZGjmh2N2Lq4KUVYydELbsmHIxdvAN4vcAu6+//MpGUoongjm2aeXzgJUH6fnh3UKoF XlZQCoRzUkTZtMvlwXMlvZu/NpBtylAKljY27UqqhkS/cD8i9i3hn+HAiqG7aQ== 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 4S5lrj1Wglz103f; Thu, 12 Oct 2023 10:15:33 +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 39CAFX2T073331; Thu, 12 Oct 2023 10:15:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39CAFXVD073328; Thu, 12 Oct 2023 10:15:33 GMT (envelope-from git) Date: Thu, 12 Oct 2023 10:15:33 GMT Message-Id: <202310121015.39CAFXVD073328@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: a55fbda874db - main - vm_page: Add corresponding sysctl knob for loader tunable 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: a55fbda874db31b804490567c69502c891b6ff61 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a55fbda874db31b804490567c69502c891b6ff61 commit a55fbda874db31b804490567c69502c891b6ff61 Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:49 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-12 10:14:49 +0000 vm_page: Add corresponding sysctl knob for loader tunable The loader tunable 'vm.pgcache_zone_max_pcpu' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 --- sys/vm/vm_page.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 4f3c4ba2d4d7..8496a39154de 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -198,6 +198,11 @@ vm_page_init(void *dummy) bogus_page = vm_page_alloc_noobj(VM_ALLOC_WIRED); } +static int pgcache_zone_max_pcpu; +SYSCTL_INT(_vm, OID_AUTO, pgcache_zone_max_pcpu, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &pgcache_zone_max_pcpu, 0, + "Per-CPU page cache size"); + /* * The cache page zone is initialized later since we need to be able to allocate * pages before UMA is fully initialized. @@ -209,9 +214,8 @@ vm_page_init_cache_zones(void *dummy __unused) struct vm_pgcache *pgcache; int cache, domain, maxcache, pool; - maxcache = 0; - TUNABLE_INT_FETCH("vm.pgcache_zone_max_pcpu", &maxcache); - maxcache *= mp_ncpus; + TUNABLE_INT_FETCH("vm.pgcache_zone_max_pcpu", &pgcache_zone_max_pcpu); + maxcache = pgcache_zone_max_pcpu * mp_ncpus; for (domain = 0; domain < vm_ndomains; domain++) { vmd = VM_DOMAIN(domain); for (pool = 0; pool < VM_NFREEPOOL; pool++) { From nobody Thu Oct 12 10:15: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 4S5lrk4Msyz4nhSG; Thu, 12 Oct 2023 10:15:34 +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 4S5lrk3YZNz3V5R; Thu, 12 Oct 2023 10:15:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697105734; 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+gm+7TQv8BzuFCdySeoi9ZwWQX8kgNv0lyaomVfpdw=; b=DpJlD6QIYf100TzC457aqqnWQ3Cbe7eNuEchYWXgwh/BBFGtLYinLSg2Ndn4D1+CzMbLbT g67R2r4/sqJ7w5/MPAGYhgBumCFDgNtou56pBzYCbNCBSsUcvA554D/Se08XWw6gmSvimO O+BYBYklO9EpqhQCB0HRzeOsymKtmPiO7+TpT1oaPw/jV7ElKWS3EP3J7MPGNdd9IS5hgq CP31yI8KOQ89u3w4dO/4kX568B2Edk/oqRh6iM5foi5t3N5zDdj4EAVMZwmwXPa+MsYFMK bvCmGCeNDdR8F9uI60Fh6RNqA/VZjc0hT3pKpwBEpkL/dzzYUtDTrq4AztNGVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697105734; a=rsa-sha256; cv=none; b=Ar4q6P35sXxfag5VsqHQ2+tt6vyY5tU/QDpu/6Y5w8zi/wNGp3m6ztEmZrjdF56Ukhd5cA 7h0AOPpKJMEKEGz/jxYB7VP0OJCaqhmKyyQenGYDMSBQjFmUFA7xNlVXnS/dphnY8D422F pk1heunPGivY87jxO7UqhNio8TV1whMI2MN9N+D8CGZthvxjaG8XFejqWjGC1irvyCKdI3 NDelRhMisWMteeA9fgLnpofFXA4Y0Yozy+v582LGFCSdG1bInryfoP5o3CICFjzABlxyDO wfjHblIdL6CYqoPKCaAxO3YmjlyKscdpTIYT2+hEeDF7ef+COpuyzLd6RJ7WlQ== 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=1697105734; 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+gm+7TQv8BzuFCdySeoi9ZwWQX8kgNv0lyaomVfpdw=; b=shLlKi8wLRXYHI20lm0IiqrmXi7hdX0n7IdkzLtWtsWupWM2/nW5tb1CpJd3MNl6dhpykQ 4jSeK9xfcHBd/gW6iEwFqH4jCyIrMcgRiPHTNZhknlvVK+/2LyzSkb/10yxhNx2LIRYPE4 q2LnRGJZa5gA8/d2zuoxDtKQEu2xEa9WsVKGvndhs/HT5ddDP74NQ92M1JhckZVfh40GeX JTS85Bz7F0k0zEiLt/1RdxRm8JSgJwyi6cCbVJvyQUJUkVC7eC2+PxWA/QUo8Ts91TPeWu qfM4q5NDsTVYW6rA9k0u94RlOvQKOgar+dZbyp6XEYE0czAMILk0wMthzgEpHA== 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 4S5lrk2Y56z10Fv; Thu, 12 Oct 2023 10:15:34 +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 39CAFYGE073382; Thu, 12 Oct 2023 10:15:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39CAFYZT073379; Thu, 12 Oct 2023 10:15:34 GMT (envelope-from git) Date: Thu, 12 Oct 2023 10:15:34 GMT Message-Id: <202310121015.39CAFYZT073379@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: c415cfc8be1b - main - vm_phys: Add corresponding sysctl knob for loader tunable 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: c415cfc8be1b732a80f1ada6d52091e08eeb9ab5 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c415cfc8be1b732a80f1ada6d52091e08eeb9ab5 commit c415cfc8be1b732a80f1ada6d52091e08eeb9ab5 Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:49 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-12 10:14:49 +0000 vm_phys: Add corresponding sysctl knob for loader tunable The loader tunable 'vm.numa.disabled' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 --- sys/vm/vm_phys.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index 108297caac49..bc992bdfc58b 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -76,6 +76,12 @@ _Static_assert(sizeof(long long) >= sizeof(vm_paddr_t), #ifdef NUMA struct mem_affinity __read_mostly *mem_affinity; int __read_mostly *mem_locality; + +static int numa_disabled; +static SYSCTL_NODE(_vm, OID_AUTO, numa, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "NUMA options"); +SYSCTL_INT(_vm_numa, OID_AUTO, disabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &numa_disabled, 0, "NUMA-awareness in the allocators is disabled"); #endif int __read_mostly vm_ndomains = 1; @@ -627,15 +633,14 @@ vm_phys_register_domains(int ndomains, struct mem_affinity *affinity, int *locality) { #ifdef NUMA - int d, i; + int i; /* * For now the only override value that we support is 1, which * effectively disables NUMA-awareness in the allocators. */ - d = 0; - TUNABLE_INT_FETCH("vm.numa.disabled", &d); - if (d) + TUNABLE_INT_FETCH("vm.numa.disabled", &numa_disabled); + if (numa_disabled) ndomains = 1; if (ndomains > 1) { From nobody Thu Oct 12 12:01: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 4S5pBs3zCzz4wFwy; Thu, 12 Oct 2023 12:01: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 4S5pBs3Y0Kz3gGT; Thu, 12 Oct 2023 12:01:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697112085; 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=6ccX7zlVADVmCFlIgIr17hr3rinlrjIcOvNcw4FxwMg=; b=muU6US/4jpccR14wPwyEqzaoVSgtKXFR9tV19638mKmxhhk9vpP9hTWsUPLQKGb5Si/fjE w/xzb0ds80uv7cd81XnOlk41vzklKdVWUKXOfIPsVqGM50R5TYLTU2ZSMTurGrRhiruK8+ Q+wKCK6OwlWSSgKzQryoCiMR8+lWSBHUz0/Lx9Rhmx/L9nu5Hegks4a6lfNL2ADH4gJaGj aBty+2KF2EQeBIFFQ5RDSLlKOGHcCydeKU7UBON5d4XbKTWU8MzWckInLgD0FonMNqj6aH UVSWifdjJtRyMS++zzx8mOzEGrn+m2u8ARXsjVmyEiTyLEYUmcDIH58yUxvLuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697112085; a=rsa-sha256; cv=none; b=j7OCFqNy3dqc8HFD3CHgqr9/ei8vNFa73CHDoDkuerqTQRkzS/Jek27snjaWOsad5hXWFU RQPtla/huR11GWHWeMjoQhWXcGO9sRqDif+PUthSPw1NuKv/lSK8hS70E2TvI49oeTrj9C sKZwkx06X1uAcD1O4BzkuvDclw+AJZJ2e+Ib+osJ3wuJ2IXu+3YIOJFF4JgFpwBBEdHdSP QYrU/tP4ssD+NSwyvZ2Tzt10cDsuOzUYlG/qApEBMl+OqNoK7U3lccQmMhzf04uHxqCell cr5q73UWygEwKG9XSH2xEayalgDsZv9h2xbXqqWO8StRqLZrbnaC24um5H9+Jg== 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=1697112085; 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=6ccX7zlVADVmCFlIgIr17hr3rinlrjIcOvNcw4FxwMg=; b=DmM5AXYonD+YyEnOzkE2fy8N3QDUp+6262p2Fq/OZw7Rd3zyQNnaO8Sz8b3K5VkIR2+ZSH pUOCRO62xXOj72E1KU8FzplDHqvgFHFXJeD686F1a8SH9RSlSeLsjTqumfw7diQpIHQjaY iHSACBitB2LZOcp1eRpHqCaR/7ZZBWptGJeNun17p1X0rND33kq54csEiSCvqasijTqfiz j/vw7RBL0JOtoB9qZeXJrCvs6AyfeQrdKQDbm+9VXUA+Ih5dO/vVy34KUX53DLqKoFTCxC mfNMWR9bCH3em06pAp/v2K0SnguiYLiMMk1wTqtMPpc8KAnPOHBpPLjvuuvqQw== 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 4S5pBs2ctVz1341; Thu, 12 Oct 2023 12:01: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 39CC1PMj052060; Thu, 12 Oct 2023 12:01:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39CC1PDq052057; Thu, 12 Oct 2023 12:01:25 GMT (envelope-from git) Date: Thu, 12 Oct 2023 12:01:25 GMT Message-Id: <202310121201.39CC1PDq052057@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: 261cda20e11c - main - UPDATING: fix typo 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: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 261cda20e11caa272517443aab7549b35667e31f Auto-Submitted: auto-generated The branch main has been updated by ceri: URL: https://cgit.FreeBSD.org/src/commit/?id=261cda20e11caa272517443aab7549b35667e31f commit 261cda20e11caa272517443aab7549b35667e31f Author: Ceri Davies AuthorDate: 2023-10-12 12:00:56 +0000 Commit: Ceri Davies CommitDate: 2023-10-12 12:00:56 +0000 UPDATING: fix typo --- UPDATING | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/UPDATING b/UPDATING index 0064e53c7a53..b750b2b913b5 100644 --- a/UPDATING +++ b/UPDATING @@ -30,9 +30,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: 20231010: dialog(1) has been replaced in base by bsddialog(1), while most of the time replacing a dialog(1) call by a bsddialog(1) call works out of the - box, bsddialog(1) is not considered as a drop-in replacement dialog(1). + box, bsddialog(1) is not considered as a drop-in replacement for + dialog(1). - If you do depend on dialog(1) functionnality, please install cdialog + If you do depend on dialog(1) functionality, please install cdialog from ports: pkg install cdialog From nobody Thu Oct 12 15:32:18 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 4S5ttC2Q2Yz4wWjZ; Thu, 12 Oct 2023 15:32: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 4S5ttC14Ltz4dT3; Thu, 12 Oct 2023 15:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697124739; 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=JZw/NRNJDaGsDA70PC8/W1TCj7FDKSb87cMMP6y0hv0=; b=r/SEKLBuhAe4rpNkgNUF24N+tnxUCYDppLd43tiCxIZTehjwb01njXoRqvfNDPUh6z0BCS Ov3yg4GjFtmfl7JyLp1a4cNrNvl0neSPNy8HAriP8ZcvrFDBWgquOqeDagpq4jQWE4Zugg kzLejuDJ8OIO0838aPOmdUJwZa3+xP3FwHy1qMusBX1oXNqT2cwhfexIXMTA5WOCUpk07G 60x1R0eMyTm7/fQkD9x+BzlTS6egUMC/AXo/rtMLesd8dydgVKRq4XbrcYTvklyFTkfKlf MdQLX25jAPSqamaJliPkxm3IijghXU95rFP8h5vV9uzM3BnA9CzjHT4G8cB9Cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697124739; a=rsa-sha256; cv=none; b=AVtX6YmMMryFA9hDYXLdTDA+9EyyJLhN6t/GuScexVgKBgCrp4QA/D1I2LcqnRVRHu+aAU 6OTpQu9gmWQBgrzNkjkFGC2OYdUvOGDWmpbvBmtPErPyIKkalZXZjlhNPo2zFtaX+O3jLn WClhseN6qf8vRyQ4KJ57A2i9JWcQ1KGPLm3B+CivLFGfnmWRGjLC+KO/NVy2tHzEuso+jc EacIr1dwTeVFj3QixAsFCEqpEEKcWeK/bf3AVte8WIgtHJXX5L9maRW3YvVBHXw2f8+Y++ Cz0FFPfqOUPSZ9rD+EYpadTX3TsOdVkkmEEf3O4U+Ig/9jIjYcH3wrw0jTLVYg== 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=1697124739; 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=JZw/NRNJDaGsDA70PC8/W1TCj7FDKSb87cMMP6y0hv0=; b=W89miTySVPI7jIdUWd/QysGAn4KpzMo3P3dssQ+GyM66xr8BzvKZcm9D76jI9b7gAqO/gN 4Jh+8yLmlgnzvFxojJpekDmtTrhnMMupIS/aI+30KEsStDhw8DP9l9Bc2yMw/qyLUXt2mk Z/xYw73PlwqCJWjTohdX3swwMX07q6XifSY0zNkzmCsyUDm9Z96IAVQcXqXGpf27zyVEUO Lr080Ggg5GRPDFzBAqQ4yluK0sgTthqNZKHe5RBToE2UXRX7J9sZsAfLiA/9Jfu5MxntCl GTqjJ5KukTL3nNbBOar8FFuCh/vZ0QWCutwMWKj1r3082sIV2wfkcKE+FG8rwQ== 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 4S5ttC08BCz18sl; Thu, 12 Oct 2023 15:32: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 39CFWI0X006703; Thu, 12 Oct 2023 15:32:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39CFWI2J006700; Thu, 12 Oct 2023 15:32:18 GMT (envelope-from git) Date: Thu, 12 Oct 2023 15:32:18 GMT Message-Id: <202310121532.39CFWI2J006700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: be91b4797e2c - main - acpi_ged: Handle events directly 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: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be91b4797e2c8f3440f6fe3aac7e246886f9ebca Auto-Submitted: auto-generated The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=be91b4797e2c8f3440f6fe3aac7e246886f9ebca commit be91b4797e2c8f3440f6fe3aac7e246886f9ebca Author: Andrew Gallatin AuthorDate: 2023-10-12 15:15:06 +0000 Commit: Andrew Gallatin CommitDate: 2023-10-12 15:27:44 +0000 acpi_ged: Handle events directly Handle ged interrupts directly from the interrupt handler, while the interrupt source is masked, so as to conform with the acpi spec, and avoid spurious interrupts and lockups on boot. When an acpi ged interrupt is encountered, the spec requires the os (as stated in 5.6.4: General Purpose Event Handling) to leave the interrupt source masked until it runs the EOI handler. This is not a good fit for our method of queuing the work (including the EOI ack of the interrupt), via the AcpiOsExecute() taskqueue mechanism. Note this fixes a bug where an arm64 server could lock up if it encountered a ged interrupt at boot. The lockup was due to running on a single core (due to arm64 not using EARLY_AP_STARTUP), and due to that core encountering a new interrupt each time the interrupt handler unmasked the interrupt source, and having the EOI queued on a taskqueue which never got a chance to run. This is also possible on any platform when using just a single processor. The symptom of this is a lockup at boot, with: "AcpiOsExecute: failed to enqueue task, consider increasing the debug.acpi.max_tasks tunable" scrolling on console. Similarly, spurious interrupts would occur when running with multiple cores, because it was likely that the interrupt would fire again immediately, before the ged task could be run, and before an EOI could be sent to lower the interrupt line. I would typically see 3-5 copies of every ged event due to this issue. This adds a tunable, debug.acpi.ged_defer, which can be set to 1 to restore the old behavior. This was done because acpi is a complex system, and it may be theoretically possible something the ged handler does may sleep (though I cannot easily find anthing by inspection). MFC after: 1 month Reviewed by: andrew, jhb, imp Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42158 --- sys/dev/acpica/acpi_ged.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi_ged.c b/sys/dev/acpica/acpi_ged.c index e7dcc1ffb0ac..23e125f277c5 100644 --- a/sys/dev/acpica/acpi_ged.c +++ b/sys/dev/acpica/acpi_ged.c @@ -81,6 +81,11 @@ static driver_t acpi_ged_driver = { DRIVER_MODULE(acpi_ged, acpi, acpi_ged_driver, 0, 0); MODULE_DEPEND(acpi_ged, acpi, 1, 1, 1); +static int acpi_ged_defer; +SYSCTL_INT(_debug_acpi, OID_AUTO, ged_defer, CTLFLAG_RWTUN, + &acpi_ged_defer, 0, + "Handle ACPI GED via a task, rather than in the ISR"); + static void acpi_ged_evt(void *arg) { @@ -92,7 +97,12 @@ acpi_ged_evt(void *arg) static void acpi_ged_intr(void *arg) { - AcpiOsExecute(OSL_GPE_HANDLER, acpi_ged_evt, arg); + struct acpi_ged_event *evt = arg; + + if (acpi_ged_defer) + AcpiOsExecute(OSL_GPE_HANDLER, acpi_ged_evt, arg); + else + AcpiEvaluateObject(evt->ah, NULL, &evt->args, NULL); } static int acpi_ged_probe(device_t dev) From nobody Thu Oct 12 18:15: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 4S5yVB3GfLz4wjpf; Thu, 12 Oct 2023 18:15: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 4S5yVB2mkjz3R03; Thu, 12 Oct 2023 18:15:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697134514; 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=Om83XJl7QrAO/gAXDT2c2gEQOtvpueerW9EcUvS7pok=; b=czjKBP6SfWLb5jlin5M2X48LY+txZTJVTwrdelVVLmtudyPhS42fuy0wh7yEBNqlZt0wB5 IfYz0rWx6lq0pPlGDj5TkmxkOymdm9cZmXuaYDZvSR81dnqvk4o63yHVlPbnuL7eHtoswX NR/E/2hr9hiGLj+sGKI+6HaKwcEMuVX1IhWwJTFiA9v/rShwIsU2yeC+nmf2NMxR+Yy3aR zC7sudO2SXUPD6aOdjgMqIRNo7JdcjCaYpCy7facVpm8EUcmP7CqBV6RvQ1qqB+HPKAHd9 G9uzyviNlP0lhhapMU1dZGOkXrwPD72CM6FXRnYfRTAYaVH+UHRdGk+oY1SOJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697134514; a=rsa-sha256; cv=none; b=AvCo6QtXODDc4UtT1WKyFV+zg6fsWp2mB0GjpTWi4nabZJ3W1ebdF28meb4ZVuLethulnz +NfCcuNP31tsIiJSvT3y800h45uGHtP3ZtT3fZud0FdzDN4x+drXgQ2oheL+RIFdDny0Tc e8e1hRw9IDE7G3txJRFDNegUVn9lhyj71cRXVeIOaQf6jwpKaEeutYsQAGJpdCQEDCaCZS pmxQ7QSti+bd0+BYQoIbC1TwmXZc1gMKRNX+DlR9RVVNrblMGSHlkwXD9zNVZ1evoSyMSb IcT+n97iYRsgQGpSTbWA+rKPzfCc+/ZQUDdLgs9KjgQU0QRz8kGuGzSYqRkdTA== 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=1697134514; 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=Om83XJl7QrAO/gAXDT2c2gEQOtvpueerW9EcUvS7pok=; b=xsl4EKBrmhV9KyvA6tgmUbJscKnsvW+MOjZE0mKbFbaGFFeXh90073zMN7ymlaiYiJ16HF LA0cwVohnFZi+Pyx7kpHGFWxbZ1kHHpGmshk9+rKmU1UuEo1k1XgEBIIW6XY015C6uuowH 1g10KRG4HB6/zXFJqIkS6fdh1+GR8+VO8ZOGl/iRrmOkZ9VjpEfYmwoSthvJrF7kWqcvkW SxBz4GYwhpLWxQSvy56YAveVfmQnFPD4AeaOENGwyMKDjUMDRzhp7th9j2q6YgPMnAG6eP o/pTBf47t9FekGiMp4yQRZ+gBHxhwHxQlrJDdCtRd5vFfBNpZNy+dpTCJnJO7A== 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 4S5yVB1p9dzlC; Thu, 12 Oct 2023 18:15: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 39CIFEe2073927; Thu, 12 Oct 2023 18:15:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39CIFERF073924; Thu, 12 Oct 2023 18:15:14 GMT (envelope-from git) Date: Thu, 12 Oct 2023 18:15:14 GMT Message-Id: <202310121815.39CIFERF073924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 944223076fbc - main - pkgbase: Put atf_python files in FreeBSD-tests 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 944223076fbcb681a8eb3e118ddafab79b21ac3d Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=944223076fbcb681a8eb3e118ddafab79b21ac3d commit 944223076fbcb681a8eb3e118ddafab79b21ac3d Author: Emmanuel Vadot AuthorDate: 2023-10-12 17:41:38 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-12 18:15:03 +0000 pkgbase: Put atf_python files in FreeBSD-tests Sponsored by: Beckhoff Automation GmbH & Co. KG --- tests/atf_python/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/atf_python/Makefile b/tests/atf_python/Makefile index 889cdcdf9592..6b7c39948b0a 100644 --- a/tests/atf_python/Makefile +++ b/tests/atf_python/Makefile @@ -2,6 +2,8 @@ .PATH: ${.CURDIR} +PACKAGE= tests + FILES= __init__.py atf_pytest.py ktest.py utils.py SUBDIR= sys From nobody Thu Oct 12 18:56: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 4S5zPz4wXVz4wmSq; Thu, 12 Oct 2023 18:56: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 4S5zPz4PDfz3W7W; Thu, 12 Oct 2023 18:56:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697136999; 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=jArIIyQTTIOeh3RZzO+1eyDwFaSjqdYErvunbAqdPA8=; b=o73YzWqV2hgZJfEBrXpjNIna7p2xD8RSYq0g//rRNBoeicSjqcZae0WExSGlNtIxYLPRsH 7ShYNY8kK/Nw45Tu4XJyA0/SvDS2L/jAPxD0ZB38gxMrBNyEtdncPWHNJNd9n08RMxler2 0YW+eZoefx6uY14mZYGDXolIf8+7BkKlpFBUZm/4SLzHgqnVLtm/2hiWaPmkPyUgNf3oQW H3RD9/2gNg3XyJ5mveD64a8omONDy144Fteh9iBaWLZVF9R5DkGu9mlfHwpSyifX1DlZsN gHHBYZCkIKGYdWfmi3Y607sI336X2zaoeBu0g/bOur5OhDRQKBiVrnkO1Q7iDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697136999; a=rsa-sha256; cv=none; b=py1RnTFpp1Zq8nyUfJdL5L4vZC6PKWH+MmmENtV9blxTuTrvqiXseqNh86PxUBi54R46q2 C0vIGd1B1rTqPsqiA62vKqI50+eIAs7/9dK1uxhtptcaWvhG8LivD/fR2z62gK0FCTdSNI +BrDoyY1zV1B6iJqVTlTmbmHf21EAPKOoTvOU/5Z3abPRDk56K7xAfaCyHBRXZdYfwikEG inij2hddA75Dydr67hlQLpWVMiGTEHvVrGRzanEqQfBIIm1s50ke4k68vhB1rnRLLoE5cI hdrGvAmoJJYndxyzlvcwG4U9g2/7DxF/d3adMCJMW/gxKCulQSp1m+8BdTj1DQ== 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=1697136999; 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=jArIIyQTTIOeh3RZzO+1eyDwFaSjqdYErvunbAqdPA8=; b=dUWY1mqKrEbwktlHOZNf9CMbvaF8I2iMiqoX0bFYIJaSXL9wZXrCuJLme7ayxltwblpejq N1TBlmZ8v/gi5wi9PPllrmW6j0TEIthQ7zjYftPVOB17gkSNyK54yMPrZ4ozq7WSHTAkZb dONKSS+pxBjblE3nQq4KcuYRv7dnoOxuGHjiISqjMI7KmBGOMqfmRXayA1oGi5fc7KkjhG tOEgnKEocknXEUzFa+Trd4vZfLWFFRoKZXa79FX8BEuZhRTlFdacjEUUvR7xFEYZa/W7Mc PutrEigni1+Xma4yVdFJGusX8neSbPifwCLaVFI02V/1XzJ0sCBb8CZ7AxsaNw== 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 4S5zPz3RLWz1vj; Thu, 12 Oct 2023 18:56: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 39CIudB5039738; Thu, 12 Oct 2023 18:56:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39CIudCk039735; Thu, 12 Oct 2023 18:56:39 GMT (envelope-from git) Date: Thu, 12 Oct 2023 18:56:39 GMT Message-Id: <202310121856.39CIudCk039735@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 43cd6bbba053 - main - dwc: re-rewrite barrier part 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43cd6bbba053f02999d846ef297655ebec2d218b Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=43cd6bbba053f02999d846ef297655ebec2d218b commit 43cd6bbba053f02999d846ef297655ebec2d218b Author: Emmanuel Vadot AuthorDate: 2023-10-12 18:54:52 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-12 18:56:16 +0000 dwc: re-rewrite barrier part We need the DMA engine to have everything coherent *before* we set the OWN bit (the bit that tells the DMA engine that it owns the descriptor). Fixes: 487034648805 ("dwc: Rewrite barrier part") Reported by: jhb --- sys/dev/dwc/dwc1000_dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/dwc/dwc1000_dma.c b/sys/dev/dwc/dwc1000_dma.c index 4f8ae088305a..c91036f5a714 100644 --- a/sys/dev/dwc/dwc1000_dma.c +++ b/sys/dev/dwc/dwc1000_dma.c @@ -216,8 +216,8 @@ txdesc_setup(struct dwc_softc *sc, int idx, bus_addr_t paddr, sc->txdesc_ring[idx].addr1 = (uint32_t)(paddr); sc->txdesc_ring[idx].desc0 = desc0; sc->txdesc_ring[idx].desc1 = desc1; - sc->txdesc_ring[idx].desc0 |= TDESC0_OWN; wmb(); + sc->txdesc_ring[idx].desc0 |= TDESC0_OWN; } inline static uint32_t @@ -236,8 +236,8 @@ rxdesc_setup(struct dwc_softc *sc, int idx, bus_addr_t paddr) sc->rxdesc_ring[idx].desc1 = ERDESC1_RCH | MIN(MCLBYTES, ERDESC1_RBS1_MASK); - sc->rxdesc_ring[idx].desc0 = RDESC0_OWN; wmb(); + sc->rxdesc_ring[idx].desc0 = RDESC0_OWN; return (nidx); } @@ -522,8 +522,8 @@ dma1000_rxfinish_locked(struct dwc_softc *sc) m = dwc_rxfinish_one(sc, desc, sc->rxbuf_map + idx); if (m == NULL) { - desc->desc0 = RDESC0_OWN; wmb(); + desc->desc0 = RDESC0_OWN; } else { /* We cannot create hole in RX ring */ error = dma1000_setup_rxbuf(sc, idx, m); From nobody Thu Oct 12 19:18:33 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 4S5zvF2mjxz4wnVv; Thu, 12 Oct 2023 19:18:33 +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 4S5zvF2FsTz3Xc8; Thu, 12 Oct 2023 19:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697138313; 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=AVwFojtZArQ1zoGoTbWDyTz1u6G/GxB0NRkKcpP6L7g=; b=vFD3LK6GCVqk5fTtsBjSXIkeKpAnzc6rf4JM3wKaCyB8Y4xzS/a3bREWMX0S5SWiqjmaLp uwPNHej77S2If92kKDjok76lxW0G67afvv2POlFh4TiJrq23/hSisVnwMcosi1by2n1jaT GuZ3LOZ/myEp99vVAts+BleZk+eEzoH/Sge+33CzQX//hRs4nMIaApEPYnryhAHXYzE7AQ 0wnTecP5Rz9hmbm1bxCF04V51XxRf41FkM/zcym3yrBw8DC62WRZS5RH27qbJvdtk/oM9B rTAsWlcdqbvE8R9a5f9Qpc1uNk9/FxiHfI5lQu+hd9wdTD73Xu2Nxl7E1VcOgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697138313; a=rsa-sha256; cv=none; b=oA0ya8jYlmVJupyhx46KS+wy7xlJe3mZeSymm6J5X/b4m+dDcyJva30CkLRBCEmzYAt80W tU2U52M0KJ8W9nHP0FWJkrkZD4MxuoxPEGfXJvUCcl9NiLoQPc/EV5Z8SZ7OWeK7/XTQx2 Ink8XOf0NF+BETGU3ZYINF1BzazOUvXqoNtmuIR+RBkhGw94ybUDmQPYwXDoL09Q257xsy zwQQuWwf9RcI+ETxYzvj4GnDtdH79bhUx4S7epb8hxe2U+NDZuslLz/bUbVc1tOtHl1XlB zJi2zEOoQjiHiT1SdOiwxHY6QQzHAwAPh9/iLyK62bxX1Ty2tH24kejINoUleQ== 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=1697138313; 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=AVwFojtZArQ1zoGoTbWDyTz1u6G/GxB0NRkKcpP6L7g=; b=uM15WgitaVUrs1CdqbYmz23luIr57kpkiD/OG4iBDwvZHpK5zlK+s63SjJfH9JERAGNVsu V4m+wk23RnbV8q04wKINiqQL8WLp/nNTcRdZIijuOyo5BJtzwA/7KPtqa3nxBT/bY92Z+z 4bxI1dRZswhj1oIfxYRmldg/dSh/txFGo7RiWdooLktsC/8j2jWeTGE4AtWepAa7NwsZox Q6ezVCK+3gT7Q8raq8GcYMgI0ZyqwNt+dFbKipxGlc43ggiUWZeCQHUEnOGy9QEcA6cLGr nAvCuL+39WC750Pghe/Yln5w8QYc4IpXlVy5xya17hUo5zzrpcb5DUy11WA0Pg== 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 4S5zvF1JLXz2Df; Thu, 12 Oct 2023 19:18:33 +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 39CJIXM0073781; Thu, 12 Oct 2023 19:18:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39CJIXSX073778; Thu, 12 Oct 2023 19:18:33 GMT (envelope-from git) Date: Thu, 12 Oct 2023 19:18:33 GMT Message-Id: <202310121918.39CJIXSX073778@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: 4d19eceaefb7 - main - pf: Free pf_rule_items when state is not created 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: 4d19eceaefb7106d761bc9504bb0da737ae0d674 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4d19eceaefb7106d761bc9504bb0da737ae0d674 commit 4d19eceaefb7106d761bc9504bb0da737ae0d674 Author: Kajetan Staszkiewicz AuthorDate: 2023-10-12 17:43:04 +0000 Commit: Kristof Provost CommitDate: 2023-10-12 19:18:06 +0000 pf: Free pf_rule_items when state is not created This addresses the issues of pf_rule_times leaking in case of stateless rules and in case of state creation failures, like hitting the state limit. Reviewed by: kp MFC after: 1 week Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D42169 --- sys/netpfil/pf/pf.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 3dddfdd0b1a4..39d240f49dbd 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -4731,6 +4731,11 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, return (action); } } else { + while ((ri = SLIST_FIRST(&match_rules))) { + SLIST_REMOVE_HEAD(&match_rules, entry); + free(ri, M_PF_RULE_ITEM); + } + uma_zfree(V_pf_state_key_z, sk); uma_zfree(V_pf_state_key_z, nk); } @@ -4776,6 +4781,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, struct tcphdr *th = &pd->hdr.tcp; u_int16_t mss = V_tcp_mssdflt; u_short reason, sn_reason; + struct pf_krule_item *ri; /* check maximums */ if (r->max_states && @@ -4986,6 +4992,11 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, return (PF_PASS); csfailed: + while ((ri = SLIST_FIRST(match_rules))) { + SLIST_REMOVE_HEAD(match_rules, entry); + free(ri, M_PF_RULE_ITEM); + } + uma_zfree(V_pf_state_key_z, sk); uma_zfree(V_pf_state_key_z, nk); From nobody Thu Oct 12 19:51: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 4S60dP4kFDz4wqKW; Thu, 12 Oct 2023 19:51: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 4S60dP48F9z3bJT; Thu, 12 Oct 2023 19:51:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697140297; 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=rkxUdzIPmBdLOwxWvqZm+nLNvVUD8rPjNANNEFmo0B0=; b=n2yLKu+xkMGDSzD4D8ivorZFoRXa/AVzd/ElauOizuayx+YKkp5sRpsf4PgPUwqpLzZqON 6utPapfoVMSKqEge3Zema4Ez4KJAhuEEZj5drvZ3tp8enGJ8+PjmAIbUzU5lUFcdim1gsp I0w/mGEi7ph6ZvKd5HwXdiKllVvScsN7VlW72RTme4l56p0HVcpSP8wDcAPAMBJ3kUbyHM b3gmo+kQwWqX2ErVp0fJj5TjkJhdG9Bcg8NWKGWayepnBwCn3Ncb3mxjDAo3VB6SIpeX3N YJS9aRlqdmuGCev5QYXLR9FPnr5f1l+D3FpNfU0OT7KIJ6JJNmDARyeFToac7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697140297; a=rsa-sha256; cv=none; b=kCaucflxmTxnzhDnUve5IYfCUe9PA7fRgnFpMeuuQJ6ZfXThN8Pgzor9uUe2aTGnLtnw1f ajAAq06aSZekQIab65WrFy9b8Tm0BLprm6ZT3GuHLr0Wvyc+3/NSz/zC864Vq0W6wnxyOV x5sovt+ILrS2DfGjKbOuLZRbZFITZ/zAXCGxwPoJBuVbhsT4UgY/KmgV+Xuw2W22EfbRD/ oiERNCsDe6wBmOsunItE0jfqmabL/qMMCFiW7Nbpiho5VP1ROV29YjGxs/UK2EAs8399bG 040oHMaFhp8hKko+JwYrN7TjzdMCv1HxKLAyDG/gLueY0CHh8T+ajaEhgJzdvQ== 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=1697140297; 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=rkxUdzIPmBdLOwxWvqZm+nLNvVUD8rPjNANNEFmo0B0=; b=XBAsaCM4YXm89zgpzUhmT7ZSxS40VNSPKY7CJOx9Fibm64cQCb/uhuobS0034B0Tuapv20 g7TtxUBba30xFl+hyWnvp1v4TrUz+LGeoWsfLF+DuEd31YkF51cD+YL5ne53dCFUdxvk2w 5ANzsgqsmZp1Rf7/AQWaelL03pvi1ESzuVEE/q6NXG5bkbAcBx6oM7HAuT3RKJqKS9upXB PGy/IGdgeTeiIv6jcDiISeU6qbUVpR7hdT8jRmPXwMwbLx6/V04pMk0pqV0VjzqmrGGBic X/lejVQIyn5qIcYsebcXB+6weRGSNcFebqhx28+dsMVpQxBbV943XHfviPvmfA== 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 4S60dP3Bypz3P4; Thu, 12 Oct 2023 19:51: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 39CJpbnk036959; Thu, 12 Oct 2023 19:51:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39CJpb5H036956; Thu, 12 Oct 2023 19:51:37 GMT (envelope-from git) Date: Thu, 12 Oct 2023 19:51:37 GMT Message-Id: <202310121951.39CJpb5H036956@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: da202b0fe616 - main - bhyve: Document the hw.vmm.maxcpu tunable and the current limit on vCPUs 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: da202b0fe616e9314739f01493ae310e37a36d8d Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=da202b0fe616e9314739f01493ae310e37a36d8d commit da202b0fe616e9314739f01493ae310e37a36d8d Author: Yuri Pankov AuthorDate: 2023-10-12 19:49:47 +0000 Commit: John Baldwin CommitDate: 2023-10-12 19:49:47 +0000 bhyve: Document the hw.vmm.maxcpu tunable and the current limit on vCPUs Reviewed by: corvink (original version) Co-authored-by: John Baldwin Differential Revision: https://reviews.freebsd.org/D40074 --- share/man/man4/vmm.4 | 12 +++++++++++- usr.sbin/bhyve/bhyve.8 | 12 ++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/share/man/man4/vmm.4 b/share/man/man4/vmm.4 index e94f0ccaeac8..cb3276a7d8f1 100644 --- a/share/man/man4/vmm.4 +++ b/share/man/man4/vmm.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 19, 2013 +.Dd October 12, 2023 .Dt VMM 4 .Os .Sh NAME @@ -79,6 +79,16 @@ The and .Va pptdevs3 variables can be used for additional entries. +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va hw.vmm.maxcpu +Maximum number of virtual CPUs. +The default is the number of physical CPUs in the system. +.El .Sh EXAMPLES Reserve three PCI devices for use by the hypervisor: bus 10 slot 0 function 0, bus 6 slot 5 function 0, and bus 6 slot 5 function 1. diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index a07d312250b4..3cef95c816f4 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 9, 2023 +.Dd October 12, 2023 .Dt BHYVE 8 .Os .Sh NAME @@ -129,7 +129,6 @@ The default value for each of and .Ar threads is 1. -The current maximum number of guest virtual CPUs is 16. If .Ar numcpus is not specified then it will be calculated from the other arguments. @@ -143,6 +142,15 @@ and If a .Ar setting is specified more than once the last one has precedence. +.Pp +The maximum number of virtual CPUs defaults to the number of active +physical CPUs in the system available via the +.Va hw.vmm.maxcpu +.Xr sysctl 8 +variable. +The limit can be adjusted via the +.Va hw.vmm.maxcpu +loader tunable. .It Fl D Destroy the VM on guest initiated power-off. .It Fl e From nobody Thu Oct 12 20:45: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 4S61qS0KCYz4wt8x; Thu, 12 Oct 2023 20:45: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 4S61qR6jCXz3fvP; Thu, 12 Oct 2023 20:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697143523; 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=YD0ih6B5yfZy924GZ4ac4QeRWyCCvEoKepTCVkiS7YE=; b=PW12k+75UIHBjDrR53Ll9IRaqZ/eVx3jjloTFEbw8kNufARwzpXJ27N3nfcVlcA8VQVyk2 dui8ocfnSX6goCmaKIHyvVnFTJnQ7XU8AgdSM6+4cINLOVlG6FpiiBioHi5NarB0uDNEJp AYOBn6iIzCQl0POG85mhuquc4Hi8P6wsbPkV6IN4VNCtvO1k27DYIpPTdCNkb8pQqMdxrG by8Htm7AT3zwrD4u4dKGA6hVRI/OsdY4NMuMACE+fg2k87nHeKjNzOB+3htbudGIWBuy38 wyr4T6C+DOE8uPmF0+QMQP3tbBbNyDTGiy2lEFAUn9qXHF9eZLqaXkPnKEdklA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697143523; a=rsa-sha256; cv=none; b=hKqoE4qCM4BbtBvA68HdyUg8lVpNRe2ifKe7hbAiG/fT+43GK1BLsyB9TqNDz3iXdkxa2P ROWyzSv+kbNeIR7pFCy2orzgk1xHiQXlj+aEPBOyZtXw608+xYvG6fa0juBB0GjthoyErJ sGbdl+KMadcOUqfGTay/2pQfWoZbdrjtOdkcFCy2fN55bAhRFo1ZLqosCVHgFrlYvvLFb1 AGNYrqMDDtumBGwkGCklH5cUhaJR8fZcLcqVn9pnqEaJNsOgAowGmXe5lwf3tM+3+VuOVh 0GUrHRxSe5ZmSrbvXCx/fTvgAhvkgjpeoWgDFpDS6zVtf6rUwkQZrtQqDHBN6g== 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=1697143523; 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=YD0ih6B5yfZy924GZ4ac4QeRWyCCvEoKepTCVkiS7YE=; b=jqFTXqRExm0NngdshmpyeEzYn9qMoE6mLVs6dcfOBEQW2a5uDeSV/YQFNDro6ndQwRpCsX VgaYYnrbEjBoNjqcYmMLiVMgC7YSAawKoDQ8k85bLJz3AvuKYTlqHzz6c8IkAiiC4VmSR3 2cyu+x+gxuKofcDHyLwOyhWJYBFHLtEt3W+BRRZaDWTln1JVWbM/mvrvbukJ8QuniZ8brd qmywn7b8EOsob/vOsAH8Wor3hdS97dKZLM17ABaa4wa3Jk5PPYE8cFImE66lj4FQYR7JOr LoolpbaER2IR4RiRSg9BcSaRyQWjWdqu7idIl4CVdlflX/NxDwfdPQIjAUsbxA== 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 4S61qR5n6qz4Ls; Thu, 12 Oct 2023 20:45: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 39CKjNLr023020; Thu, 12 Oct 2023 20:45:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39CKjN3o023017; Thu, 12 Oct 2023 20:45:23 GMT (envelope-from git) Date: Thu, 12 Oct 2023 20:45:23 GMT Message-Id: <202310122045.39CKjN3o023017@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alfonso S. Siciliano" Subject: git: d287d3282f43 - main - libbsddialog: delete formw dependency 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: asiciliano X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d287d3282f43b92e59aa74725e72662758e96a75 Auto-Submitted: auto-generated The branch main has been updated by asiciliano: URL: https://cgit.FreeBSD.org/src/commit/?id=d287d3282f43b92e59aa74725e72662758e96a75 commit d287d3282f43b92e59aa74725e72662758e96a75 Author: Alfonso S. Siciliano AuthorDate: 2023-10-12 20:26:58 +0000 Commit: Alfonso S. Siciliano CommitDate: 2023-10-12 20:44:15 +0000 libbsddialog: delete formw dependency libbsddialog >= 0.3 has a built-in form implementation so delete formw dependency. Approved by: bapt (share/mk maintainer) Differential Revision: https://reviews.freebsd.org/D42167 --- lib/libbsddialog/Makefile | 2 +- share/mk/src.libnames.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libbsddialog/Makefile b/lib/libbsddialog/Makefile index 8b02205a0d23..2ec633b25147 100644 --- a/lib/libbsddialog/Makefile +++ b/lib/libbsddialog/Makefile @@ -21,7 +21,7 @@ INCS= bsddialog.h \ bsddialog_progressview.h MAN= bsddialog.3 -LIBADD= ncursesw tinfow formw +LIBADD= ncursesw tinfow CFLAGS+= -D_XOPEN_SOURCE_EXTENDED .include diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 6a79d0b864d3..3317350a88a3 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -280,7 +280,7 @@ _DP_9p+= casper cap_pwd cap_grp _DP_archive= z bz2 lzma bsdxml zstd .endif _DP_avl= spl -_DP_bsddialog= formw ncursesw tinfow +_DP_bsddialog= ncursesw tinfow _DP_zstd= pthread .if ${MK_BLACKLIST} != "no" _DP_blacklist+= pthread From nobody Thu Oct 12 23:48: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 4S65tj5Z1nz4x5cb; Thu, 12 Oct 2023 23:48:29 +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 4S65tj53Zgz4T25; Thu, 12 Oct 2023 23:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697154509; 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=o85CXNxCGqo1vCtNv4uxS2FzhqSYAv8E/jwGfcxmplg=; b=G9CK4slta4XdzJr2xVQ9CJzE9qZKp+/aAKpfI4xXjcB5iXlOlMQnrYGygunBu8nIRO5BJI rN5S4yO5NGvu9BkpQErQoyuULlV/4cQTfxJ6hzsrHi5esn4/p/Ube1nj0aRva/m5EPno+1 ZMsdHSXWZUKbu78dUj+I0fv07wgkfb8I/lnjH1MoVuSxmicU3bvjV8wQ7kIOHxx3eXAXjT if1C5NsEJx0McVySwlTWl9WqodckuJ0U3Hco0s5aNJL1Nw5U3nbjLcNUOq1z8yLhr5QfWc I9Gn35XXmV8rIWlIMC/JUraDuEkah786zi2Is98NM2Mpa/7LT61LvImORSHp5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697154509; a=rsa-sha256; cv=none; b=rnvgGtKQKqPA0BOWX4I3KptetEqic8tLvUAJ7RUgqZF1r9OO1Qbe67NXaREAM/546sT2dn c4KJQ7e0fXa3JpvS22JpZig1bFLhfaIiISJsO6KfB1Na/cR95qjxfaAUVvVX9SQCScBBa9 8YK4ivc/Xda11YJ6EHpT8URpIWEdWuZIE8DrnZ6mTcbDLAvetq1iJPsGaNXoy2kWSis5I9 imRVcgZdIzPZFjRvVuHMbEl5QKU6M2+nAWyM/gTlUgby2eGL8WCvG6lTs90f6itrJ0dSvW FpSZ4R0tfvPKNSDWwfLMoClBXbKa5Z5USlGaLCEUFA6YEGXlGxOhE2A+Lr3PIg== 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=1697154509; 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=o85CXNxCGqo1vCtNv4uxS2FzhqSYAv8E/jwGfcxmplg=; b=sSitQz00oTql/5X4Albziwrdwj2DIo2HJ/9FSpnMGsQcvcNUtVDhroTuUCEIKdbPAlXgKz zEycPafbUixAGwO21U2vNrd2JRPvMsD/odKzYx+r1tS7KVEhf4EqIQZ8oSaH9CDBhp+hZ/ S/pT17+1NxWNy8V/ujhsT4B+UhuB6zR3ItdPng236rXpepRseh5J+8RQFEQ2xZjruuVy0q yRegs17hpSWJ18/zlJxVEP0AqLLvKyb0DXyDiuvmwMaS2EWhlIPQHku11E7DMUdLwG+3Yc eF7G6LZk6lNUU9rT+BHxIFrozjCaGVgHxc0C7PTttZJeL/VVKRqhjKXzQj46nA== 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 4S65tj461Qz9Sb; Thu, 12 Oct 2023 23:48:29 +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 39CNmTmJ022249; Thu, 12 Oct 2023 23:48:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39CNmT9Q022246; Thu, 12 Oct 2023 23:48:29 GMT (envelope-from git) Date: Thu, 12 Oct 2023 23:48:29 GMT Message-Id: <202310122348.39CNmT9Q022246@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chuck Tuffli Subject: git: 32557d16e2c3 - main - bhyve nvme: Add NQN value 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: chuck X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32557d16e2c3c24c04eccfafd895e1514dc65b35 Auto-Submitted: auto-generated The branch main has been updated by chuck: URL: https://cgit.FreeBSD.org/src/commit/?id=32557d16e2c3c24c04eccfafd895e1514dc65b35 commit 32557d16e2c3c24c04eccfafd895e1514dc65b35 Author: Chuck Tuffli AuthorDate: 2023-10-12 22:04:17 +0000 Commit: Chuck Tuffli CommitDate: 2023-10-12 22:08:05 +0000 bhyve nvme: Add NQN value Add a NVMe Qualified Name (NQN) to the Controller Data structure using the "first format" (i.e., "... used by any organization that owns a domain name" Section 7.9 NVM-Express 1.4c 2021.06.28 Ratified). This avoids a Linux kernel warning about a missing or invalid NQN. Reviewed by: jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42058 --- usr.sbin/bhyve/pci_nvme.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index d1b15d6f3a3c..2fd49a84c768 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -514,6 +514,7 @@ static void pci_nvme_init_ctrldata(struct pci_nvme_softc *sc) { struct nvme_controller_data *cd = &sc->ctrldata; + int ret; cd->vid = 0xFB5D; cd->ssvid = 0x0000; @@ -583,6 +584,13 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc) NVME_CTRLR_DATA_FNA_FORMAT_ALL_SHIFT; cd->vwc = NVME_CTRLR_DATA_VWC_ALL_NO << NVME_CTRLR_DATA_VWC_ALL_SHIFT; + + ret = snprintf(cd->subnqn, sizeof(cd->subnqn), + "nqn.2013-12.org.freebsd:bhyve-%s-%u-%u-%u", + get_config_value("name"), sc->nsc_pi->pi_bus, + sc->nsc_pi->pi_slot, sc->nsc_pi->pi_func); + if ((ret < 0) || ((unsigned)ret > sizeof(cd->subnqn))) + EPRINTLN("%s: error setting subnqn (%d)", __func__, ret); } static void @@ -3309,7 +3317,6 @@ pci_nvme_init(struct pci_devinst *pi, nvlist_t *nvl) pci_nvme_aen_init(sc); pci_nvme_reset(sc); - done: return (error); } From nobody Fri Oct 13 00:07:27 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 4S66Jc38hTz4x6ng; Fri, 13 Oct 2023 00:07: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 4S66Jc2ckvz4VvG; Fri, 13 Oct 2023 00:07:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697155648; 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=k2UbXhmDdL2zNKnYHl1uP+tJ2XPKlGhd8j3/Nyjx5eE=; b=JuvlI6oJz+/6nG67FhnzSQ83nqW4I3M6xyQ3DHRJVvlcUfY2lDzIrIQhE2gq4r+bjVvRAs oMz0VVSc5QUu2xsBVswkrUJ5S8BXjHRb346tWAhovOuaefbj+0I+4rnoglJwV5yeigiOPZ PBHgNJoomgKci3123k4BP1yKR28wrkexrD3zZueQYWcy0F5jHNARTtMLYsM2VSx13jHauI NsS/RxusXKE0ypnYcw37+kiQXyKJQR+AS+auh2aI+1kCOngMmCZC6mzBA3A2qIlMW+TQDk MY3T1MY6+h84wb+eWf83TAXhj98UTKO3K5skjS6r7GqllFQJUfcuSh9zqSRC6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697155648; a=rsa-sha256; cv=none; b=HQh04M1sHawTkWdwI3MCEXEcNLLgsqWkFtLgML/Alq6tpoJbMxePD1fu6zwmtN6oMpI7MU C0VnFsNwvF95huUe3Dl/uCxHj0ENFHOlLhDh/FoVOEBWoviAgAgqU1zhDG7Dry+U7+nlsT +z+6hBnajqAFV49HXz9hYPSbZFBP20Llzcmufr1KFSBE6N3bgeO8YxKt8Wgnuwwp8feUR7 f1U692xXeTicyYb34b9+F1xe+oyzRScjoq+AbdDfXwuRME4hFuZVA7v6WuiFWPuJTPh2vJ 9Xdp0OZWKRMFTny7i4zxqeDoOLBNa/72MYZQLCWSz+4KD87xAlgHvcW5Ean7Fw== 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=1697155648; 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=k2UbXhmDdL2zNKnYHl1uP+tJ2XPKlGhd8j3/Nyjx5eE=; b=OxQrePrKGKU5R+r2lWqNufxYtp3PPRK5HF3vsAdYwCozyfHGaFrhx4/gvjseiJtwKcQCMM KJ2CL3i24ZE7fTrmLsOW7TRjGrW3ewowD6kkUSQ/V+UstBTXzUuOBGq/BUof+06SedsXDL 5QDAKuMYbjklYfByQi0GzScith1o6q+Hgel1xgtxpOo4sj75/crazwgdXNwh1by8wmJv3i 2OFVCq6Wa7P3aPfsvagonT3yUsnbcl7G2FQRW1NNOslqojRNryxcKt1zAD+Nlp84XZvTvV 527e1M0v9nqCVBYH1+LKot2ZYZxt0Ohil5LqEjf0bOS+LwoXuXNzwk6wJzgDyA== 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 4S66Jc1gWpzB1h; Fri, 13 Oct 2023 00:07: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 39D07SY2055351; Fri, 13 Oct 2023 00:07:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39D07R39055348; Fri, 13 Oct 2023 00:07:27 GMT (envelope-from git) Date: Fri, 13 Oct 2023 00:07:27 GMT Message-Id: <202310130007.39D07R39055348@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: 6e71235e558e - main - unbound: Import upstream 0ee44ef3 when ENOBUFS is returned 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: 6e71235e558ef579605e7f35b02f983b9a246a4a Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=6e71235e558ef579605e7f35b02f983b9a246a4a commit 6e71235e558ef579605e7f35b02f983b9a246a4a Merge: 32557d16e2c3 292d51198aa3 Author: Cy Schubert AuthorDate: 2023-10-13 00:04:25 +0000 Commit: Cy Schubert CommitDate: 2023-10-13 00:04:25 +0000 unbound: Import upstream 0ee44ef3 when ENOBUFS is returned From upstream 0ee44ef3: - Fix send of udp retries when ENOBUFS is returned. It stops looping and also waits for the condition to go away. Reported by Florian Obser. PR: 274352 MFC after: 3 days Merge commit '292d51198aa319c58f534549851e9c28486abdf4' contrib/unbound/.gitignore | 1 + contrib/unbound/util/netevent.c | 102 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 101 insertions(+), 2 deletions(-) diff --cc contrib/unbound/.gitignore index 000000000000,000000000000..b25c15b81fae new file mode 100644 --- /dev/null +++ b/contrib/unbound/.gitignore @@@ -1,0 -1,0 +1,1 @@@ ++*~ From nobody Fri Oct 13 00:20:09 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 4S66bF5Pksz4x7Hh; Fri, 13 Oct 2023 00:20:09 +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 4S66bF4tKTz4Wns; Fri, 13 Oct 2023 00:20:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697156409; 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=kjfBIdW9RuiHr1o/V9m5PzdChnZL4FThZuPQxGGkVQk=; b=AvHan+LlSHiduTIlM77DcQz1eJDYMcRm5yBdfoyAiPp+Qij3eTypMNIxjoGJnhni3RcdDA T6n35wQJoY2WDTEA5dyuZ4Cic/Gu5LagEZ2hiz1Zop591dDJDAacfFwnsJug3JBtjHZGFx +CoehPL6GLv6WFPB8xLRNwXmzQyFVigYHc9E/fw4bQeuMDqikkva9VHDFVYI+rT5k58MVR howI0jE5wMvtxXknRVHJXYtqp9vEqg+ouPFDLzHrlIAnawAT/P7AIy+hK7902JhjPO1aly RrPvwVtxYYTj68WUuXnxbp3fE0AX1wJ09otHtR47NImIr5scPa9lDUg+wHDHYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697156409; a=rsa-sha256; cv=none; b=dtKuRL+wA+e+nykuxS2HChTFUxxDwAWVG4kjFBKnzYzB7w5jHtXKZJlqqVUSZ+1RnpvpCh wpZTDvyqB5elMSD7DKAADthVJ/AqCC8yuWo3ywMuZP79yUIvkpN9+gn3YlsVmaFmILUXxU O/nmO75jjv8kh645dAYiH8tgvjYMNz5lxiBarNqIHb7ZSD5XdkibEv9hJ0fioaGyvOIYDz fEaCh+Bn+NRltygShqTRhLPvswhO5rZM0+6MzcCMpWCPAhFPe9C1KN6jOGUCYg7fbOqxiU G493oxBohUuTP2vnS/pVnpdcgmO5k2009zcPRM0KYWCts7SR1GVRdpEWxuOJ1g== 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=1697156409; 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=kjfBIdW9RuiHr1o/V9m5PzdChnZL4FThZuPQxGGkVQk=; b=NBb1psHqFG5mwle6S0Pfj7Ads/qXRx++ldaBVsmXO336RCNcqsGjwJMsdotA4DncQBY+5I YribYM1DW7eRLU9J1D0ul8DNMprikYg2dudgSbJTvEqFD0NsflpSA7D1SMvxUtx6Tn1ieK D0rXlSGU0Y2XcecR8nEX2NIjwKzIX1sf7eWVhcZa415OuYaTTFXkdaNIPfUGmTSD9JfADA 196zZiE5vQ39ovnydWV4f90B/Otu0bOOyCwnOLBb7ITNz0vLyHhrSFz/7K3c8tmcQI5I1X am0HIVQCVr1tUQ8OCIy/DFTkZ7Ru5nbybnOKivC6C71OlcsrNQkjrYPLzScq1g== 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 4S66bF3qRSzB9S; Fri, 13 Oct 2023 00:20:09 +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 39D0K9NF075908; Fri, 13 Oct 2023 00:20:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39D0K9al075899; Fri, 13 Oct 2023 00:20:09 GMT (envelope-from git) Date: Fri, 13 Oct 2023 00:20:09 GMT Message-Id: <202310130020.39D0K9al075899@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alfonso S. Siciliano" Subject: git: cdee659f93d0 - main - sade: Fix F1 help 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: asiciliano X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cdee659f93d00169c874a75e855f0f0e7a32f3f6 Auto-Submitted: auto-generated The branch main has been updated by asiciliano: URL: https://cgit.FreeBSD.org/src/commit/?id=cdee659f93d00169c874a75e855f0f0e7a32f3f6 commit cdee659f93d00169c874a75e855f0f0e7a32f3f6 Author: Alfonso S. Siciliano AuthorDate: 2023-10-13 00:07:15 +0000 Commit: Alfonso S. Siciliano CommitDate: 2023-10-13 00:19:45 +0000 sade: Fix F1 help message Fix F1 message of the disk menu because the button label is "[Modify]". This is a UI fix, no functional change. --- usr.sbin/bsdinstall/partedit/diskmenu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/partedit/diskmenu.c b/usr.sbin/bsdinstall/partedit/diskmenu.c index 6a14ee831e18..f87c7714e5a7 100644 --- a/usr.sbin/bsdinstall/partedit/diskmenu.c +++ b/usr.sbin/bsdinstall/partedit/diskmenu.c @@ -65,7 +65,7 @@ diskmenu_show(const char *title, const char *text, struct partedit_item *items, conf.text.escape = true; conf.key.f1_message="[\\Z1\\ZbC\\Znreate]: a new partition.\n" "[\\Z1\\ZbD\\Znelete]: selected partition(s).\n" - "[\\Z1\\ZbC\\Znhange]: partition type or mountpoint.\n" + "[\\Z1\\ZbM\\Znodify]: partition type or mountpoint.\n" "[\\Z1\\ZbR\\Znevert]: changes to disk setup.\n" "[\\Z1\\ZbA\\Znuto]: guided partitioning tool.\n" "[\\Z1\\ZbF\\Zninish]: will ask to apply changes."; From nobody Fri Oct 13 05:15: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 4S6F8C36hGz4wT47; Fri, 13 Oct 2023 05:15: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 4S6F8C2dTkz3QkF; Fri, 13 Oct 2023 05:15:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697174139; 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=XjnDP4Gu2l8I1Ur4ItKm3UUcaKLpTZ6NqblzDonkskw=; b=RshOg0ApbRFiXoPt3kFcsVtApq98XyBaNs0Gl/ljGnTm18YINtozL69H8fXlWzhd8dgUGa YJvBsaGXYfcEHVBiM6mGjYfqKRkOYsy8XMvwJow5aRkAH23vKljlLTnQGL9tH/0ccij/9P gmPS4tkK9vWjLtEjB8U8mO0giiqHbBXPdAMlabzbw2dggoi+i9btcmRCFoyD6jYgweQGIg RRQ0cd99ht1mr4HkfQCrwqWESdjK88TXjVs03LFiyt8ogKp3I6F65zQ5lnZ/eLURU7gLc9 792bqHTAHt3iqRjsePTcBNSVixPD8EtgDPhKm15yczewL15Bl1ZL5yVslQq54Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697174139; a=rsa-sha256; cv=none; b=eBPFLL+TqVhuKzG0E5QfE3lGIIZe3AsQZgDSNHo+VJF3mcItC1YBDj/isNYXW4qn42X9pd Ft0KKHS1gPpPlrECtajF4u6hqg4c0XailySX5Olp1ROojUuKjcKB1fLb/zSKvJrkOaPtDN BpoeCqXXSmiv5b9hh0sZr+SThRluods0NpocJfnvJTWAuz8QfmNuJIU6uSHW5s3l8IIAFI PsEbhxags20O+kTTNzDbnMW/54skjIfzu7RJPgRGPTjd8RmmxzSt0ci+UX4FP2aDNpPSeR aKDgohY8EkE+w1BPioXR9evrZ4+TWN6GkBWfGIrV5ygb90ZM2Ud2JmtyljB3og== 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=1697174139; 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=XjnDP4Gu2l8I1Ur4ItKm3UUcaKLpTZ6NqblzDonkskw=; b=ScxbDpN9IN2gaOKSFJX2VYUNbMlP6MyWdkK8emIzznvEzXWaYsO82YZJBribDzqaqcjflx 6wDYBUan5YWqM2OT0rkcCgr+HoXeyjnv/5lfKN07ZT/A/h/LWFXLYp5DOTPvxQTxgmpgd3 7MnFYKXu/PWJivU+VTuxahg+0Kr5wbCACoOCWlj9X0JYPJc1uqy/0ytJMpiqtbYVBOrEMM 13IdVYUW2emuPzrqEF1I6q/dujburxeq7Fw/IJigw+rB8h+ICNctF3CFCKKc+BM+rgQWLD OhtBYn3+rtrSuLLm4oYjDLGbsG6/RvxocZo9hOFp5CbsNXzh6R0Ufi7KMRkd9A== 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 4S6F8C1hhqzb5Z; Fri, 13 Oct 2023 05:15: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 39D5FdWw070173; Fri, 13 Oct 2023 05:15:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39D5FdA6070170; Fri, 13 Oct 2023 05:15:39 GMT (envelope-from git) Date: Fri, 13 Oct 2023 05:15:39 GMT Message-Id: <202310130515.39D5FdA6070170@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 2fed1c579c52 - main - tty/teken: fix UTF8 sequence validation logic 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2fed1c579c52d63b72fc08ffcc652ba0183f9254 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=2fed1c579c52d63b72fc08ffcc652ba0183f9254 commit 2fed1c579c52d63b72fc08ffcc652ba0183f9254 Author: Bojan Novković AuthorDate: 2023-10-13 05:14:36 +0000 Commit: Christos Margiolis CommitDate: 2023-10-13 05:14:36 +0000 tty/teken: fix UTF8 sequence validation logic This patch fixes UTF-8 sequence validation logic in teken_utf8_bytes_to_codepoint() and fixes fallback behaviour in ttydisc_rubchar() when an invalid UTF8 sequence is encountered. The code previously used __bitcount() to extract sequence length information from the leading byte. However, this assumption breaks for certain code points that have additional bits set in the first half of the leading byte (e.g. Cyrillic characters). This lead to incorrect behaviour when deleting those characters using backspaces. The code now checks the number of consecutive set bits in the leading byte starting from the MSB, as per RFC 3629. Reviewed by: christos MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42147 --- sys/kern/tty_ttydisc.c | 12 +++++++----- sys/teken/teken_wcwidth.h | 23 ++++++++++++++++++++--- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/sys/kern/tty_ttydisc.c b/sys/kern/tty_ttydisc.c index eae7162e31c0..c46579cefbb1 100644 --- a/sys/kern/tty_ttydisc.c +++ b/sys/kern/tty_ttydisc.c @@ -844,23 +844,25 @@ ttydisc_rubchar(struct tty *tp) */ ttyinq_write(&tp->t_inq, bytes, UTF8_STACKBUF, 0); + ttyinq_unputchar(&tp->t_inq); } else { /* Find codepoint and width. */ codepoint = teken_utf8_bytes_to_codepoint(bytes, nb); - if (codepoint != - TEKEN_UTF8_INVALID_CODEPOINT) { - cwidth = teken_wcwidth( - codepoint); - } else { + if (codepoint == + TEKEN_UTF8_INVALID_CODEPOINT || + (cwidth = teken_wcwidth( + codepoint)) == -1) { /* * Place all bytes back into the * inq and fall back to * default behaviour. */ + cwidth = 1; ttyinq_write(&tp->t_inq, bytes, nb, 0); + ttyinq_unputchar(&tp->t_inq); } } tp->t_column -= cwidth; diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index bc40c23a6eb7..14af2c6f9530 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -128,15 +128,32 @@ static inline teken_char_t teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) { - /* Check for malformed characters. */ - if (__bitcount(bytes[0] & 0xf0) != nbytes) + /* + * Check for malformed characters by comparing 'nbytes' + * to the byte length of the character. + * + * The table in section 3 of RFC 3629 defines 4 different + * values indicating the length of a UTF-8 byte sequence. + * + * 0xxxxxxx -> 1 byte + * 110xxxxx -> 2 bytes + * 1110xxxx -> 3 bytes + * 11110xxx -> 4 bytes + * + * The length is determined by the higher-order bits in + * the leading octet (except in the first case, where an MSB + * of 0 means a byte length of 1). Here we flip the 4 upper + * bits and count the leading zeros using __builtin_clz() + * to determine the number of bytes. + */ + if (__builtin_clz(~(bytes[0] & 0xf0) << 24) != nbytes) return (TEKEN_UTF8_INVALID_CODEPOINT); switch (nbytes) { case 1: return (bytes[0] & 0x7f); case 2: - return (bytes[0] & 0xf) << 6 | (bytes[1] & 0x3f); + return (bytes[0] & 0x1f) << 6 | (bytes[1] & 0x3f); case 3: return (bytes[0] & 0xf) << 12 | (bytes[1] & 0x3f) << 6 | (bytes[2] & 0x3f); case 4: From nobody Fri Oct 13 05:15: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 4S6F8D5t0Zz4wT6Y; Fri, 13 Oct 2023 05:15: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 4S6F8D3r9pz3Qdq; Fri, 13 Oct 2023 05:15:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697174140; 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=gXYiCf9Fh4KdhYxLaF2kPfu97nioDrJ3TULWO9dTW0U=; b=ih+K2c3x37WZl0T+a+KzvxeFPE2PwMmMZsQBZaBsUpGfe0+/H+jbFHFDLEM0tNLFSinvEB P7zMsfQ+uAGcwUnTHDdpQHD/j1sMdBWZ9RmJAJLlei6ajPUWd02dfz25zvI82hGRCeoNqN 480tHz5FTmooX4cFwZo5TTd2H9gKAJHCsM0eSV3LwqzTE9kDaqOBUY9A+oQWPt9YU05AJX HjcSR6W2AVTyS6v2wcjE/r3hqF185eHEJxx1DiO0gTOxbJuFbVEQrRxWyOAXfK9z+Uh7dg SAlGptwlZcj0pUew8j5Awe+m1OUorm//lrjezbFYvTIiYY+3s/x6d+owCyIWzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697174140; a=rsa-sha256; cv=none; b=xaocSO4qjAWYIr4bGb5O5TworYzA7vCTRb65GSc+g8pFDqw6sWE1D+IjAZF+atZv9TtrcP 2TCyIL4DocPdm85L68dhZG6mDHcnu7VvCKbWRoSOr2ivfaNF0THckNJLMIZIGik41I3+tP HOGKCHriRGxfZ+/4+lQ+ANqlQXvT1RQcIuQ+HptgrElr4qgFdWFyhKS7RtY20Ut51lygwI sVGlvcxtK4t3+Itr7eKctnvEA9ABYeYUzAo9C7xcELMXEWQIi8P5jWwEGu00yoRrOa4JQ7 VgJZSjeyCQl2ow2oj5fsOuNrmsrMObRVNBTmbeHBmEYDZchz0Xg7nCTy6W2lew== 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=1697174140; 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=gXYiCf9Fh4KdhYxLaF2kPfu97nioDrJ3TULWO9dTW0U=; b=QJe5z3zRKvolUCCAOGEYX89xnigY7gSbdXTdgjthheeYDHitNZWmJ2X/AGbbVlf6kLBiKZ lreH6vK4jV4ak9u0o/jBA+ksJCVCFvZowqP1sIZNF19Ib1Gj5SSYmwWU7qmnnhNy0ObCXW o6TE2zNKU0abh6v72xbhR8iQCwTH6pSFQkQqUDHggAgO10vgT9wGR86BFvvYcfbgXYWQhY iLqF9UIsNGjv/5VR7bK6JUQcxXZtmxXt3pXMhTP4hdjItdOAHI8ZwP5+DIoNWanLst5QS0 5Nk3pgr57X2guoQ524o7JxQVIDeT9Crx5eLqfT43k3FJnxOkUqTXJ8DL8QZtgA== 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 4S6F8D2hLpzb3g; Fri, 13 Oct 2023 05:15: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 39D5FeKr070216; Fri, 13 Oct 2023 05:15:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39D5Feua070213; Fri, 13 Oct 2023 05:15:40 GMT (envelope-from git) Date: Fri, 13 Oct 2023 05:15:40 GMT Message-Id: <202310130515.39D5Feua070213@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 90367ba750bc - main - teken: fix style in teken_wcwidth.h 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90367ba750bcbf3f9ac4609c3ec8df4ab95a22af Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=90367ba750bcbf3f9ac4609c3ec8df4ab95a22af commit 90367ba750bcbf3f9ac4609c3ec8df4ab95a22af Author: Christos Margiolis AuthorDate: 2023-10-13 05:14:57 +0000 Commit: Christos Margiolis CommitDate: 2023-10-13 05:14:57 +0000 teken: fix style in teken_wcwidth.h Reviewed by: bojan.novkovic_fer.hr MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42164 --- sys/teken/teken_wcwidth.h | 265 +++++++++++++++++++++++----------------------- 1 file changed, 135 insertions(+), 130 deletions(-) diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index 14af2c6f9530..72df62704d73 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -11,112 +11,118 @@ #define TEKEN_UTF8_INVALID_CODEPOINT -1 struct interval { - teken_char_t first; - teken_char_t last; + teken_char_t first; + teken_char_t last; }; -/* auxiliary function for binary search in interval table */ -static inline int bisearch(teken_char_t ucs, const struct interval *table, int max) { - int min = 0; - int mid; +/* Auxiliary function for binary search in interval table */ +static inline int +bisearch(teken_char_t ucs, const struct interval *table, int max) +{ + int min = 0; + int mid; - if (ucs < table[0].first || ucs > table[max].last) - return 0; - while (max >= min) { - mid = (min + max) / 2; - if (ucs > table[mid].last) - min = mid + 1; - else if (ucs < table[mid].first) - max = mid - 1; - else - return 1; - } + if (ucs < table[0].first || ucs > table[max].last) + return (0); + while (max >= min) { + mid = (min + max) / 2; + if (ucs > table[mid].last) + min = mid + 1; + else if (ucs < table[mid].first) + max = mid - 1; + else + return (1); + } - return 0; + return (0); } -static inline int teken_wcwidth(teken_char_t ucs) +static inline int +teken_wcwidth(teken_char_t ucs) { - /* sorted list of non-overlapping intervals of non-spacing characters */ - /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */ - static const struct interval combining[] = { - { 0x0300, 0x036F }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 }, - { 0x0591, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 }, - { 0x05C4, 0x05C5 }, { 0x05C7, 0x05C7 }, { 0x0600, 0x0603 }, - { 0x0610, 0x0615 }, { 0x064B, 0x065E }, { 0x0670, 0x0670 }, - { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED }, - { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A }, - { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, { 0x0901, 0x0902 }, - { 0x093C, 0x093C }, { 0x0941, 0x0948 }, { 0x094D, 0x094D }, - { 0x0951, 0x0954 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 }, - { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD }, - { 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C }, - { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D }, - { 0x0A70, 0x0A71 }, { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC }, - { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD }, - { 0x0AE2, 0x0AE3 }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C }, - { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, { 0x0B4D, 0x0B4D }, - { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 }, { 0x0BC0, 0x0BC0 }, - { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 }, - { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0CBC, 0x0CBC }, - { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD }, - { 0x0CE2, 0x0CE3 }, { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D }, - { 0x0DCA, 0x0DCA }, { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 }, - { 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E }, - { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC }, - { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 }, - { 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E }, - { 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 }, - { 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 }, - { 0x1032, 0x1032 }, { 0x1036, 0x1037 }, { 0x1039, 0x1039 }, - { 0x1058, 0x1059 }, { 0x1160, 0x11FF }, { 0x135F, 0x135F }, - { 0x1712, 0x1714 }, { 0x1732, 0x1734 }, { 0x1752, 0x1753 }, - { 0x1772, 0x1773 }, { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD }, - { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD }, - { 0x180B, 0x180D }, { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 }, - { 0x1927, 0x1928 }, { 0x1932, 0x1932 }, { 0x1939, 0x193B }, - { 0x1A17, 0x1A18 }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 }, - { 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, { 0x1B42, 0x1B42 }, - { 0x1B6B, 0x1B73 }, { 0x1DC0, 0x1DCA }, { 0x1DFE, 0x1DFF }, - { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2063 }, - { 0x206A, 0x206F }, { 0x20D0, 0x20EF }, { 0x302A, 0x302F }, - { 0x3099, 0x309A }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B }, - { 0xA825, 0xA826 }, { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F }, - { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB }, - { 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F }, - { 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x1D167, 0x1D169 }, - { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD }, - { 0x1D242, 0x1D244 }, { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F }, - { 0xE0100, 0xE01EF } - }; - - /* test for 8-bit control characters */ - if (ucs == 0) - return 0; - if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0)) - return -1; + /* + * Sorted list of non-overlapping intervals of non-spacing characters. + * Generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" + */ + static const struct interval combining[] = { + { 0x0300, 0x036F }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 }, + { 0x0591, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 }, + { 0x05C4, 0x05C5 }, { 0x05C7, 0x05C7 }, { 0x0600, 0x0603 }, + { 0x0610, 0x0615 }, { 0x064B, 0x065E }, { 0x0670, 0x0670 }, + { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED }, + { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A }, + { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, { 0x0901, 0x0902 }, + { 0x093C, 0x093C }, { 0x0941, 0x0948 }, { 0x094D, 0x094D }, + { 0x0951, 0x0954 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 }, + { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD }, + { 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C }, + { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D }, + { 0x0A70, 0x0A71 }, { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC }, + { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD }, + { 0x0AE2, 0x0AE3 }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C }, + { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, { 0x0B4D, 0x0B4D }, + { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 }, { 0x0BC0, 0x0BC0 }, + { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 }, + { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0CBC, 0x0CBC }, + { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD }, + { 0x0CE2, 0x0CE3 }, { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D }, + { 0x0DCA, 0x0DCA }, { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 }, + { 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E }, + { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC }, + { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 }, + { 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E }, + { 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 }, + { 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 }, + { 0x1032, 0x1032 }, { 0x1036, 0x1037 }, { 0x1039, 0x1039 }, + { 0x1058, 0x1059 }, { 0x1160, 0x11FF }, { 0x135F, 0x135F }, + { 0x1712, 0x1714 }, { 0x1732, 0x1734 }, { 0x1752, 0x1753 }, + { 0x1772, 0x1773 }, { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD }, + { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD }, + { 0x180B, 0x180D }, { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 }, + { 0x1927, 0x1928 }, { 0x1932, 0x1932 }, { 0x1939, 0x193B }, + { 0x1A17, 0x1A18 }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 }, + { 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, { 0x1B42, 0x1B42 }, + { 0x1B6B, 0x1B73 }, { 0x1DC0, 0x1DCA }, { 0x1DFE, 0x1DFF }, + { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2063 }, + { 0x206A, 0x206F }, { 0x20D0, 0x20EF }, { 0x302A, 0x302F }, + { 0x3099, 0x309A }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B }, + { 0xA825, 0xA826 }, { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F }, + { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB }, + { 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F }, + { 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x1D167, 0x1D169 }, + { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD }, + { 0x1D242, 0x1D244 }, { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F }, + { 0xE0100, 0xE01EF } + }; - /* binary search in table of non-spacing characters */ - if (bisearch(ucs, combining, - sizeof(combining) / sizeof(struct interval) - 1)) - return 0; + /* Test for 8-bit control characters */ + if (ucs == 0) + return (0); + if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0)) + return (-1); - /* if we arrive here, ucs is not a combining or C0/C1 control character */ + /* Binary search in table of non-spacing characters */ + if (bisearch(ucs, combining, sizeof(combining) / + sizeof(struct interval) - 1)) + return (0); - return 1 + - (ucs >= 0x1100 && - (ucs <= 0x115f || /* Hangul Jamo init. consonants */ - ucs == 0x2329 || ucs == 0x232a || - (ucs >= 0x2e80 && ucs <= 0xa4cf && - ucs != 0x303f) || /* CJK ... Yi */ - (ucs >= 0xac00 && ucs <= 0xd7a3) || /* Hangul Syllables */ - (ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */ - (ucs >= 0xfe10 && ucs <= 0xfe19) || /* Vertical forms */ - (ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */ - (ucs >= 0xff00 && ucs <= 0xff60) || /* Fullwidth Forms */ - (ucs >= 0xffe0 && ucs <= 0xffe6) || - (ucs >= 0x20000 && ucs <= 0x2fffd) || - (ucs >= 0x30000 && ucs <= 0x3fffd))); + /* + * If we arrive here, ucs is not a combining or C0/C1 control character + */ + return (1 + + (ucs >= 0x1100 && + (ucs <= 0x115f || /* Hangul Jamo init. consonants */ + ucs == 0x2329 || ucs == 0x232a || + (ucs >= 0x2e80 && ucs <= 0xa4cf && + ucs != 0x303f) || /* CJK ... Yi */ + (ucs >= 0xac00 && ucs <= 0xd7a3) || /* Hangul Syllables */ + (ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */ + (ucs >= 0xfe10 && ucs <= 0xfe19) || /* Vertical forms */ + (ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */ + (ucs >= 0xff00 && ucs <= 0xff60) || /* Fullwidth Forms */ + (ucs >= 0xffe0 && ucs <= 0xffe6) || + (ucs >= 0x20000 && ucs <= 0x2fffd) || + (ucs >= 0x30000 && ucs <= 0x3fffd)))); } /* @@ -127,39 +133,38 @@ static inline int teken_wcwidth(teken_char_t ucs) static inline teken_char_t teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) { + /* + * Check for malformed characters by comparing 'nbytes' to the byte + * length of the character. + * + * The table in section 3 of RFC 3629 defines 4 different values + * indicating the length of a UTF-8 byte sequence. + * + * 0xxxxxxx -> 1 byte + * 110xxxxx -> 2 bytes + * 1110xxxx -> 3 bytes + * 11110xxx -> 4 bytes + * + * The length is determined by the higher-order bits in the leading + * octet (except in the first case, where an MSB of 0 means a byte + * length of 1). Here we flip the 4 upper bits and count the leading + * zeros using __builtin_clz() to determine the number of bytes. + */ + if (__builtin_clz(~(bytes[0] & 0xf0) << 24) != nbytes) + return (TEKEN_UTF8_INVALID_CODEPOINT); - /* - * Check for malformed characters by comparing 'nbytes' - * to the byte length of the character. - * - * The table in section 3 of RFC 3629 defines 4 different - * values indicating the length of a UTF-8 byte sequence. - * - * 0xxxxxxx -> 1 byte - * 110xxxxx -> 2 bytes - * 1110xxxx -> 3 bytes - * 11110xxx -> 4 bytes - * - * The length is determined by the higher-order bits in - * the leading octet (except in the first case, where an MSB - * of 0 means a byte length of 1). Here we flip the 4 upper - * bits and count the leading zeros using __builtin_clz() - * to determine the number of bytes. - */ - if (__builtin_clz(~(bytes[0] & 0xf0) << 24) != nbytes) - return (TEKEN_UTF8_INVALID_CODEPOINT); - - switch (nbytes) { - case 1: - return (bytes[0] & 0x7f); - case 2: - return (bytes[0] & 0x1f) << 6 | (bytes[1] & 0x3f); - case 3: - return (bytes[0] & 0xf) << 12 | (bytes[1] & 0x3f) << 6 | (bytes[2] & 0x3f); - case 4: - return (bytes[0] & 0x7) << 18 | (bytes[1] & 0x3f) << 12 | - (bytes[2] & 0x3f) << 6 | (bytes[3] & 0x3f); - default: - return (TEKEN_UTF8_INVALID_CODEPOINT); - } + switch (nbytes) { + case 1: + return (bytes[0] & 0x7f); + case 2: + return (bytes[0] & 0x1f) << 6 | (bytes[1] & 0x3f); + case 3: + return (bytes[0] & 0xf) << 12 | (bytes[1] & 0x3f) << 6 | + (bytes[2] & 0x3f); + case 4: + return (bytes[0] & 0x7) << 18 | (bytes[1] & 0x3f) << 12 | + (bytes[2] & 0x3f) << 6 | (bytes[3] & 0x3f); + default: + return (TEKEN_UTF8_INVALID_CODEPOINT); + } } From nobody Fri Oct 13 07: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 4S6J1Q6qKYz4wchL; Fri, 13 Oct 2023 07: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 4S6J1Q6D6gz4D3w; Fri, 13 Oct 2023 07: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=1697181898; 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=eHCs9YRkaBGHSgOtWCHWIquTrWOy5SDCP+VKZufLr+s=; b=tAsFa+VI3eEANnzBPcwrlUpQpfg3Rlr+FHCgcWEU62OwTRD8Tas34Cl7NUAfGgRRHOAlG0 3lVCleq/chSAY9TKhl/RPqAJ678F86xbgcWujqHxw9WeFCrEk9qCAUoIdZaYu9khx00VDs m3HWWImYEQzC8i/B/PPnzu63OqaEJSAf7/RNlg3T9hWZsD7oq37ObLYguaaEuyPLFgtuuO ndwcAG/4wxSE3wXrwpa37mfVeIhN/XE5fztIsScdcQt8fFjzsQUZgsYFn0XNbYhrmlQBQO Gvw8fuwmtjNU6dWXLPDvKOkjpU9AFzkeStKC4lfqMhXMqqe4N49NjI4bsmvrpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697181898; a=rsa-sha256; cv=none; b=Hn5G8+LvOTUFN4wVVLPfks2Y94v5ixU9fb8SJry9UKJN0SGOcYCZ0DoiKyRenHYc7IZMG7 5+be/OuwEcfPJPFYfZrhVSC6KMu2w3nGsxJ/FqWVQYBnoy+jHHeMUOtdv+MnqaRY1o0ij8 lK+TUOU2tmuG3PgJK47sE/dyraJAkgbXejNs9UhfA9LkP/TYtHQc+UTlV2vFOzM+Cs0NJO s+9X1kCIBvgvyjgQwCA3agnrSxYV0lgiSdHd2NFifjRCTJsa/j7bWxfZoDpxMJ8B4fBgbT MkJCIhGrFL7efHXubhxeJYNsl8mFmlfg6P/GtvqA5S20h2AkTC4eoYpH2V4jNA== 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=1697181898; 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=eHCs9YRkaBGHSgOtWCHWIquTrWOy5SDCP+VKZufLr+s=; b=Twop4p9S7E02LgYWTTnvJq7MrWJPplGknssPTcqf2lyFRBQHcXuxX3BcXxE0X879l9MfwE qdzGM9R7JlIPEKao2z6Lri7u6xK5B3kM8bMI84HMd6MYIMyEsgU925G71aYcgjDkij4DUn CaxQeXpRQobsoLGkrDPgQ0wtuFFV77mev3cN24xS1E2XBB8AtNKvChzLSgmhY3RYXnSl/6 as8qBxPF7R3NeMf/kgjRj7Rjf72BiuFsUZpBpUhnKCbOMHxk7WeM2WOsrxjm1s/FHxh0D1 QE7B9e47ZjCtTGSguUaPn8h4j3bwzY6Am+JUyrZrbDuF+WPsM9UlUK3yTQOB7w== 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 4S6J1Q5FrQzfN9; Fri, 13 Oct 2023 07: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 39D7Owkq085699; Fri, 13 Oct 2023 07: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 39D7Owup085696; Fri, 13 Oct 2023 07:24:58 GMT (envelope-from git) Date: Fri, 13 Oct 2023 07:24:58 GMT Message-Id: <202310130724.39D7Owup085696@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: ab393e9548f8 - main - netlink: move NETLINK define to opt_global.h 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: ab393e9548f8cc0ee28499c411963b798ebb38a5 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ab393e9548f8cc0ee28499c411963b798ebb38a5 commit ab393e9548f8cc0ee28499c411963b798ebb38a5 Author: Kristof Provost AuthorDate: 2023-10-12 19:55:57 +0000 Commit: Kristof Provost CommitDate: 2023-10-13 07:23:47 +0000 netlink: move NETLINK define to opt_global.h Move the NETLINK define into opt_global.h so we can rely on it being set correctly, without having to remember to include opt_netlink.h. This ensures that the NETLINK define is correctly set. If not we may end up with unloadable modules, due to missing symbols (such as nlmsg_get_group_writer). PR: 274306 Reviewed by: imp, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42179 --- sys/compat/linux/linux_netlink.c | 1 - sys/conf/options | 2 +- sys/modules/carp/Makefile | 2 +- sys/modules/ktest/ktest/Makefile | 1 - sys/modules/ktest/ktest_example/Makefile | 1 - sys/modules/ktest/ktest_netlink_message_writer/Makefile | 1 - sys/modules/linux/Makefile | 3 +-- sys/modules/linux_common/Makefile | 3 +-- sys/modules/netlink/Makefile | 2 +- sys/net/if_clone.c | 2 -- sys/net/if_vlan.c | 1 - sys/netinet/ip_carp.c | 2 -- sys/netlink/ktest_netlink_message_writer.c | 2 -- sys/netlink/netlink_domain.c | 1 - sys/netlink/netlink_generic.c | 2 -- sys/netlink/netlink_glue.c | 2 -- sys/netlink/netlink_io.c | 2 -- sys/netlink/netlink_message_writer.c | 2 -- sys/netlink/netlink_module.c | 2 -- sys/netlink/route/iface.c | 2 -- sys/netlink/route/iface_drivers.c | 1 - sys/netlink/route/neigh.c | 2 -- sys/netlink/route/nexthop.c | 2 -- sys/netlink/route/rt.c | 2 -- sys/netpfil/pf/pf_nl.c | 2 -- sys/tests/ktest.c | 2 -- 26 files changed, 5 insertions(+), 42 deletions(-) diff --git a/sys/compat/linux/linux_netlink.c b/sys/compat/linux/linux_netlink.c index a6846035c22e..807cdc7a14bc 100644 --- a/sys/compat/linux/linux_netlink.c +++ b/sys/compat/linux/linux_netlink.c @@ -27,7 +27,6 @@ #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_netlink.h" #include #include diff --git a/sys/conf/options b/sys/conf/options index b6cce3b17ebb..4e74c4ab3a70 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -472,7 +472,7 @@ MBUF_PROFILING MBUF_STRESS_TEST MROUTING opt_mrouting.h NFSLOCKD -NETLINK opt_netlink.h +NETLINK opt_global.h PF_DEFAULT_TO_DROP opt_pf.h ROUTE_MPATH opt_route.h ROUTETABLES opt_route.h diff --git a/sys/modules/carp/Makefile b/sys/modules/carp/Makefile index 5506d1aaec23..d7a85043539f 100644 --- a/sys/modules/carp/Makefile +++ b/sys/modules/carp/Makefile @@ -5,6 +5,6 @@ KMOD= carp SRCS= ip_carp.c sha1.c SRCS+= device_if.h bus_if.h vnode_if.h -SRCS+= opt_carp.h opt_bpf.h opt_inet.h opt_inet6.h opt_ofed.h opt_netlink.h +SRCS+= opt_carp.h opt_bpf.h opt_inet.h opt_inet6.h opt_ofed.h .include diff --git a/sys/modules/ktest/ktest/Makefile b/sys/modules/ktest/ktest/Makefile index f72aa5d820db..264eb7b9f443 100644 --- a/sys/modules/ktest/ktest/Makefile +++ b/sys/modules/ktest/ktest/Makefile @@ -8,6 +8,5 @@ SYSDIR?=${SRCTOP}/sys KMOD= ktest SRCS= ktest.c -SRCS+= opt_netlink.h .include diff --git a/sys/modules/ktest/ktest_example/Makefile b/sys/modules/ktest/ktest_example/Makefile index 5b0c9b41f9c8..a5fe6d6d7843 100644 --- a/sys/modules/ktest/ktest_example/Makefile +++ b/sys/modules/ktest/ktest_example/Makefile @@ -8,6 +8,5 @@ SYSDIR?=${SRCTOP}/sys KMOD= ktest_example SRCS= ktest_example.c -SRCS+= opt_netlink.h .include diff --git a/sys/modules/ktest/ktest_netlink_message_writer/Makefile b/sys/modules/ktest/ktest_netlink_message_writer/Makefile index cdcd1d2c190f..2f84b2fecd72 100644 --- a/sys/modules/ktest/ktest_netlink_message_writer/Makefile +++ b/sys/modules/ktest/ktest_netlink_message_writer/Makefile @@ -8,7 +8,6 @@ SYSDIR?=${SRCTOP}/sys KMOD= ktest_netlink_message_writer SRCS= ktest_netlink_message_writer.c -SRCS+= opt_netlink.h .include diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index 51b434d91b00..d1035445ccfb 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -70,8 +70,7 @@ SRCS+= imgact_linux.c \ linux_vdso_selector_x86.c \ linux_x86.c \ linux_copyout.c \ - linux_netlink.c \ - opt_netlink.h + linux_netlink.c .endif .if ${MACHINE_CPUARCH} == "i386" diff --git a/sys/modules/linux_common/Makefile b/sys/modules/linux_common/Makefile index 07df4555d1ee..374bc32215a2 100644 --- a/sys/modules/linux_common/Makefile +++ b/sys/modules/linux_common/Makefile @@ -7,8 +7,7 @@ KMOD= linux_common SRCS= linux_common.c linux_mib.c linux_mmap.c linux_util.c linux_emul.c \ linux_dummy.c linux_errno.c linux_netlink.c \ - linux.c device_if.h vnode_if.h bus_if.h opt_inet6.h opt_inet.h \ - opt_netlink.h + linux.c device_if.h vnode_if.h bus_if.h opt_inet6.h opt_inet.h .if ${MACHINE_CPUARCH} == "amd64" SRCS+= linux_x86.c linux_vdso_selector_x86.c diff --git a/sys/modules/netlink/Makefile b/sys/modules/netlink/Makefile index 667c0b2475fe..6835be6e7bd7 100644 --- a/sys/modules/netlink/Makefile +++ b/sys/modules/netlink/Makefile @@ -5,7 +5,7 @@ SRCS = netlink_module.c netlink_domain.c netlink_io.c \ netlink_message_writer.c netlink_generic.c \ netlink_route.c route/iface.c route/iface_drivers.c route/neigh.c \ route/nexthop.c route/rt.c -SRCS+= opt_inet.h opt_inet6.h opt_route.h opt_netlink.h +SRCS+= opt_inet.h opt_inet6.h opt_route.h CFLAGS+= -DNETLINK_MODULE diff --git a/sys/net/if_clone.c b/sys/net/if_clone.c index 1a2cea94ad35..5345d613f9d6 100644 --- a/sys/net/if_clone.c +++ b/sys/net/if_clone.c @@ -32,8 +32,6 @@ * @(#)if.c 8.5 (Berkeley) 1/9/95 */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index e7a290564722..b69d8107e30d 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -46,7 +46,6 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_kern_tls.h" -#include "opt_netlink.h" #include "opt_vlan.h" #include "opt_ratelimit.h" diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index e8ed6afd3853..66ec28e49af3 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -28,8 +28,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include "opt_bpf.h" #include "opt_inet.h" diff --git a/sys/netlink/ktest_netlink_message_writer.c b/sys/netlink/ktest_netlink_message_writer.c index c13a25e05a70..e46065dd4bd2 100644 --- a/sys/netlink/ktest_netlink_message_writer.c +++ b/sys/netlink/ktest_netlink_message_writer.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 262361773fbb..7b2bbd39447d 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -30,7 +30,6 @@ * This file contains socket and protocol bindings for netlink. */ -#include "opt_netlink.h" #include #include #include diff --git a/sys/netlink/netlink_generic.c b/sys/netlink/netlink_generic.c index b28b206a7ace..b7600b2b6b71 100644 --- a/sys/netlink/netlink_generic.c +++ b/sys/netlink/netlink_generic.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/netlink_glue.c b/sys/netlink/netlink_glue.c index 29eac82aaffd..e7649c6b13dc 100644 --- a/sys/netlink/netlink_glue.c +++ b/sys/netlink/netlink_glue.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/netlink_io.c b/sys/netlink/netlink_io.c index 0745f7fdcb77..0ca71fb6219b 100644 --- a/sys/netlink/netlink_io.c +++ b/sys/netlink/netlink_io.c @@ -26,8 +26,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/netlink_message_writer.c b/sys/netlink/netlink_message_writer.c index 9fc0eddc78ec..8443cc59d9e0 100644 --- a/sys/netlink/netlink_message_writer.c +++ b/sys/netlink/netlink_message_writer.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/netlink_module.c b/sys/netlink/netlink_module.c index ba56ac6d6a17..b4073721fdc4 100644 --- a/sys/netlink/netlink_module.c +++ b/sys/netlink/netlink_module.c @@ -26,8 +26,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index b6e120933f83..0587b478431e 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include "opt_inet.h" #include "opt_inet6.h" diff --git a/sys/netlink/route/iface_drivers.c b/sys/netlink/route/iface_drivers.c index 1a7aaffa7dd7..4bf913d9c978 100644 --- a/sys/netlink/route/iface_drivers.c +++ b/sys/netlink/route/iface_drivers.c @@ -25,7 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" #include #include "opt_inet.h" #include "opt_inet6.h" diff --git a/sys/netlink/route/neigh.c b/sys/netlink/route/neigh.c index 4168b5936ddc..9914e7febf57 100644 --- a/sys/netlink/route/neigh.c +++ b/sys/netlink/route/neigh.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include "opt_inet.h" #include "opt_inet6.h" diff --git a/sys/netlink/route/nexthop.c b/sys/netlink/route/nexthop.c index 722dc5fdee4e..0d6bb5c9ec84 100644 --- a/sys/netlink/route/nexthop.c +++ b/sys/netlink/route/nexthop.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include "opt_inet.h" #include "opt_inet6.h" diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c index 2a6a0bc54e85..cfaa2167b0d2 100644 --- a/sys/netlink/route/rt.c +++ b/sys/netlink/route/rt.c @@ -26,8 +26,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include "opt_inet.h" #include "opt_inet6.h" diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index bb50b3b2b321..459a5dc6507e 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -27,8 +27,6 @@ * */ -#include "opt_netlink.h" - #include #include diff --git a/sys/tests/ktest.c b/sys/tests/ktest.c index 495fedf95dde..cd83a6aaaa3f 100644 --- a/sys/tests/ktest.c +++ b/sys/tests/ktest.c @@ -25,8 +25,6 @@ * SUCH DAMAGE. */ -#include "opt_netlink.h" - #include #include #include From nobody Fri Oct 13 07:46: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 4S6JVG6Tlxz4wdXJ; Fri, 13 Oct 2023 07:46: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 4S6JVG6DcGz4Gmb; Fri, 13 Oct 2023 07:46:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697183190; 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=aF3gU+rnXZY3lRuCinxgmRHUqMq7nWU5UZTYeQY9Iys=; b=GCMdNht2KCri/c14gejhW1kTWakmVr3R7TOfrFa1vbCaIvQaruq5rtQOhjfBpwccGMqrAW +xYpAilYqy1KYVQCutAybgZe7i0tCKtmu8jeqC++/Xvc39iFDnUXYMxOCVbI5FOf8sn2wP LpUr9mJUAdK7/FL4+z6riwACp4E+gU8GmfWN+hPRfLAtOV1WPriE7W82SM6utb7+abuyAk Og75WUZQn/aCR1jKPNYhucJqwXbtMsi5y7FxwF9atjraQCDQdRcw+GL8vvFNZkzt3qUNYX jtPpzkJIrTE+dWVzHoVC/4vuHWMnsRo2xK70Gem2UEtQu+6xLJQUSAeGrUuCtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697183190; a=rsa-sha256; cv=none; b=ujVGy+wrgKmCEMEqZby3JPuhe4ixoiPuImFH08y2dgXq8299+fHWijtuPgu4G+89FGF/Lc cLWUp6vbEUHp4rWgRBLgWYnbGIEFFi2MJcwl6RhPLtvTQPW+8NBVtLvdB0xuCmSE4RCHrs EuOTyvIKHwyVasguRo2/gJFM6hSSTqjodkIRsFZNmOEaG4iB5qAeEF8SIyfiLpYc0LzIek 3LaZelPrqk6Iym2UO7MElRVH+pWIfuhmIBaWL7pTBGF8c6bV9mJWOEljCGYyP3PJPBzEE6 lLOTdB2aAzp+JJOYodxCU6ReMIoYzW5VlyBo1FV9z5BdEcm+J8csk6KELNym9g== 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=1697183190; 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=aF3gU+rnXZY3lRuCinxgmRHUqMq7nWU5UZTYeQY9Iys=; b=dCVAYB1SpDS05NQWzC/lvUumKSU4ApE1xvHv+BTugQ2qG9jNtZn+WyDkJypqEgdQthx+v0 B88u78L81+4ollHQY/2W1wVOf/yTM9yUj4Evh1Vd+PxRgs1vr7hY2eRw5ay8zfcWCdOLur mha0V+tvbKT+lhvK5huVHnAOC0QxOCBCrJ6trfP3Ml2xB9ItLmwSF80WbrNUCDAD29zKT1 BcrRKwcBKah7x+84NXAFOW/pu2x7OHQYl06MpFH4FK7lGA0PXh14uNzCF4sckRr8rBka7x ZRN3nOaMHvrJ9O1WgztnzLXckSi/+BvDbRXD78ekgpgDG74obkDSJnJtnuGfxg== 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 4S6JVG5GWSzfxJ; Fri, 13 Oct 2023 07:46: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 39D7kUYD018751; Fri, 13 Oct 2023 07:46:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39D7kUFA018748; Fri, 13 Oct 2023 07:46:30 GMT (envelope-from git) Date: Fri, 13 Oct 2023 07:46:30 GMT Message-Id: <202310130746.39D7kUFA018748@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: 23cf27db2cc4 - main - zfs: merge openzfs/zfs@8a7407012 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: 23cf27db2cc4b0208a35b009f873971a7bb4a6bb Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=23cf27db2cc4b0208a35b009f873971a7bb4a6bb commit 23cf27db2cc4b0208a35b009f873971a7bb4a6bb Merge: ab393e9548f8 8a7407012834 Author: Martin Matuska AuthorDate: 2023-10-13 07:45:15 +0000 Commit: Martin Matuska CommitDate: 2023-10-13 07:45:15 +0000 zfs: merge openzfs/zfs@8a7407012 Notable upstream pull request merges: #15368 008baa091 FreeBSD: Reduce divergence from in-tree sources #15371 1b310dfb1 DMU: Do not pre-read holes during write #15395 8a7407012 Zpool can start allocating from metaslab before TRIMs have completed Obtained from: OpenZFS OpenZFS commit: 8a740701283495e59944839bb2607f80907d950e sys/contrib/openzfs/.gitignore | 1 + sys/contrib/openzfs/.mailmap | 189 +++++++++++ sys/contrib/openzfs/AUTHORS | 361 +++++++++++++++++++-- sys/contrib/openzfs/config/zfs-build.m4 | 1 + .../openzfs/include/os/freebsd/spl/sys/ctype.h | 2 +- sys/contrib/openzfs/man/man4/zfs.4 | 57 ---- .../openzfs/module/os/linux/zfs/zpl_file_range.c | 8 +- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 12 - sys/contrib/openzfs/module/zfs/dmu_tx.c | 8 +- sys/contrib/openzfs/module/zfs/vdev_trim.c | 28 +- sys/contrib/openzfs/rpm/generic/zfs.spec.in | 9 + sys/contrib/openzfs/scripts/Makefile.am | 1 + sys/contrib/openzfs/scripts/update_authors.pl | 322 ++++++++++++++++++ sys/contrib/openzfs/tests/runfiles/common.run | 4 - sys/contrib/openzfs/tests/runfiles/linux.run | 7 + .../openzfs/tests/test-runner/bin/zts-report.py.in | 1 - .../openzfs/tests/zfs-tests/include/tunables.cfg | 2 +- .../zfs_share/zfs_share_concurrent_shares.ksh | 39 ++- .../functional/delegate/delegate_common.kshlib | 4 +- sys/modules/zfs/zfs_config.h | 4 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 21 files changed, 938 insertions(+), 124 deletions(-) diff --cc sys/contrib/openzfs/.gitignore index 1ef47d921c28,000000000000..47d17ae16d34 mode 100644,000000..100644 --- a/sys/contrib/openzfs/.gitignore +++ b/sys/contrib/openzfs/.gitignore @@@ -1,88 -1,0 +1,89 @@@ +# +# This is the top-level .gitignore file: +# ignore everything except a list of allowed files. +# +# This is not the place for entries that are specific to +# a subdirectory. Instead add those files to the +# .gitignore file in that subdirectory. +# +# N.B. +# Please use 'git ls-files -i --exclude-standard' +# command after changing this file, to see if there are +# any tracked files which get ignored after the change. + +* + +!.github +!cmd +!config +!contrib +!etc +!include +!lib +!man +!module +!rpm +!scripts +!tests +!udev + +!.github/** +!cmd/** +!config/** +!contrib/** +!etc/** +!include/** +!lib/** +!man/** +!module/** +!rpm/** +!scripts/** +!tests/** +!udev/** + +!.editorconfig +!.cirrus.yml +!.gitignore +!.gitmodules ++!.mailmap +!AUTHORS +!autogen.sh +!CODE_OF_CONDUCT.md +!configure.ac +!copy-builtin +!COPYRIGHT +!LICENSE +!Makefile.am +!META +!NEWS +!NOTICE +!README.md +!RELEASES.md +!TEST +!zfs.release.in + +# +# Normal rules +# +*.[oa] +*.o.ur-safe +*.lo +*.la +*.mod.c +*~ +*.swp +*.gcno +*.gcda +*.pyc +*.pyo +.deps +.libs +.dirstamp +.DS_Store +modules.order +Makefile +Makefile.in +*.patch +*.orig +*.tmp +*.log diff --cc sys/contrib/openzfs/.mailmap index 000000000000,000000000000..46ef016b93f8 new file mode 100644 --- /dev/null +++ b/sys/contrib/openzfs/.mailmap @@@ -1,0 -1,0 +1,189 @@@ ++# This file maps the name+email seen in a commit back to a canonical ++# name+email. Git will replace the commit name/email with the canonical version ++# wherever it sees it. ++# ++# If there is a commit in the history with a "wrong" name or email, list it ++# here. If you regularly commit with an alternate name or email address and ++# would like to ensure that you are always listed consistently in the repo, add ++# mapping here. ++# ++# On the other hand, if you use multiple names or email addresses legitimately ++# (eg you use a company email address for your paid OpenZFS work, and a ++# personal address for your evening side projects), then don't map one to the ++# other here. ++# ++# The most common formats are: ++# ++# Canonical Name ++# Canonical Name ++# Canonical Name Commit Name ++# ++# See https://git-scm.com/docs/gitmailmap for more info. ++ ++# These maps are making names consistent where they have varied but the email ++# address has never changed. In most cases, the full name is in the ++# Signed-off-by of a commit with a matching author. ++Ahelenia Ziemiańska ++Ahelenia Ziemiańska ++Alex John ++Andreas Dilger ++Andrew Walker ++Benedikt Neuffer ++Chengfei Zhu ++Chris Lindee ++Colm Buckley ++Crag Wang ++Damian Szuberski ++Daniel Kolesa ++Debabrata Banerjee ++Finix Yan ++Gaurav Kumar ++Gionatan Danti ++Glenn Washburn ++Gordan Bobic ++Gregory Bartholomew ++hedong zhang ++InsanePrawn ++Jason Cohen ++Jason Harmening ++Jeremy Faulkner ++Jinshan Xiong ++John Poduska ++Justin Scholz ++Ka Ho Ng ++Kash Pande ++Kay Pedersen ++KernelOfTruth ++Liu Hua ++Liu Qing ++loli10K ++Matthias Blankertz ++Michael Gmelin ++Olivier Mazouffre ++Piotr Kubaj ++Quentin Zdanis ++Roberto Ricci ++Rob Norris ++Rob Norris ++Sam Lunt ++Sanjeev Bagewadi ++Stoiko Ivanov ++Tamas TEVESZ ++WHR ++Yanping Gao ++Youzhong Yang ++ ++# Commits from strange places, long ago ++Brian Behlendorf ++Brian Behlendorf ++Brian Behlendorf ++Brian Behlendorf ++Brian Behlendorf ++Herb Wartens ++Ned Bass ++Tulsi Jain ++ ++# Mappings from Github no-reply addresses ++ajs124 ++Alek Pinchuk ++Alexander Lobakin ++Alexey Smirnoff ++Allen Holl <65494904+allen-4@users.noreply.github.com> ++Ameer Hamza <106930537+ixhamza@users.noreply.github.com> ++Andrew J. Hesford <48421688+ahesford@users.noreply.github.com>> ++Andrew Sun ++Aron Xu ++Arun KV <65647132+arun-kv@users.noreply.github.com> ++Ben Wolsieffer ++bernie1995 <42413912+bernie1995@users.noreply.github.com> ++Boris Protopopov ++Brad Forschinger ++Brandon Thetford ++buzzingwires <131118055+buzzingwires@users.noreply.github.com> ++Cedric Maunoury <38213715+cedricmaunoury@users.noreply.github.com> ++Charles Suh ++Dacian Reece-Stremtan <35844628+dacianstremtan@users.noreply.github.com> ++Damian Szuberski <30863496+szubersk@users.noreply.github.com> ++Daniel Hiepler <32984777+heeplr@users.noreply.github.com> ++Daniel Kobras ++Daniel Reichelt ++David Quigley ++DHE ++Dmitri John Ledkov <19779+xnox@users.noreply.github.com> ++Dries Michiels <32487486+driesmp@users.noreply.github.com> ++Edmund Nadolski <137826107+ednadolski-ix@users.noreply.github.com> ++Érico Nogueira <34201958+ericonr@users.noreply.github.com> ++Fedor Uporov <60701163+fuporovvStack@users.noreply.github.com> ++Felix Dörre ++Felix Neumärker <34678034+xdch47@users.noreply.github.com> ++Finix Yan ++Gaurav Kumar ++George Gaydarov ++Georgy Yakovlev <168902+gyakovlev@users.noreply.github.com> ++Gerardwx ++Gian-Carlo DeFazio ++Giuseppe Di Natale ++Hajo Möller ++Harry Mallon <1816667+hjmallon@users.noreply.github.com> ++Hiếu Lê ++Jake Howard ++James Cowgill ++Jason King ++Jeff Dike <52420226+jdike@users.noreply.github.com> ++Jitendra Patidar <53164267+jsai20@users.noreply.github.com> ++João Carlos Mendes Luís ++John Eismeier <32205350+jeis2497052@users.noreply.github.com> ++John L. Hammond <35266395+jhammond-intel@users.noreply.github.com> ++John-Mark Gurney ++John Ramsden ++Jonathon Fernyhough <559369+jonathonf@users.noreply.github.com> ++Justin Hibbits ++Kevin Jin <33590050+jxdking@users.noreply.github.com> ++Kevin P. Fleming ++Krzysztof Piecuch <3964215+pikrzysztof@users.noreply.github.com> ++Kyle Evans ++Laurențiu Nicola ++loli10K ++Lorenz Hüdepohl ++Luís Henriques <73643340+lumigch@users.noreply.github.com> ++Marcin Skarbek ++Matt Fiddaman <81489167+matt-fidd@users.noreply.github.com> ++Max Zettlmeißl <6818198+maxz@users.noreply.github.com> ++Michael Niewöhner ++Michael Zhivich <33133421+mzhivich@users.noreply.github.com> ++Mo Zhou <5723047+cdluminate@users.noreply.github.com> ++Nick Mattis ++omni <79493359+omnivagant@users.noreply.github.com> ++Pablo Correa Gómez <32678034+pablofsf@users.noreply.github.com> ++Paul Zuchowski <31706010+PaulZ-98@users.noreply.github.com> ++Peter Ashford ++Peter Dave Hello ++Peter Wirdemo <4224155+pewo@users.noreply.github.com> ++Petros Koutoupis ++Ping Huang <101400146+hpingfs@users.noreply.github.com> ++Piotr P. Stefaniak ++Richard Allen <33836503+belperite@users.noreply.github.com> ++Rich Ercolani <214141+rincebrain@users.noreply.github.com> ++Rob Wing <98866084+rob-wing@users.noreply.github.com> ++Roman Strashkin ++Ryan Hirasaki <4690732+RyanHir@users.noreply.github.com> ++Samuel Wycliffe J <115969550+samwyc@users.noreply.github.com> ++Samuel Wycliffe <50765275+npc203@users.noreply.github.com> ++Savyasachee Jha ++Scott Colby ++Sean Eric Fagan ++Spencer Kinny <30333052+Spencer-Kinny@users.noreply.github.com> ++Srikanth N S <75025422+nssrikanth@users.noreply.github.com> ++Thomas Geppert ++Tim Crawford ++Tom Matthews ++Tony Perkins <62951051+tony-zfs@users.noreply.github.com> ++Torsten Wörtwein ++Tulsi Jain ++Václav Skála <33496485+vaclavskala@users.noreply.github.com> ++Violet Purcell <66446404+vimproved@users.noreply.github.com> ++Vipin Kumar Verma <75025470+vermavipinkumar@users.noreply.github.com> ++Wolfgang Bumiller ++xtouqh <72357159+xtouqh@users.noreply.github.com> ++Yuri Pankov <113725409+yuripv@users.noreply.github.com> ++Yuri Pankov <82001006+yuripv@users.noreply.github.com> diff --cc sys/contrib/openzfs/scripts/update_authors.pl index 000000000000,8dd49b5fb38d..8dd49b5fb38d mode 000000,100755..100755 --- a/sys/contrib/openzfs/scripts/update_authors.pl +++ b/sys/contrib/openzfs/scripts/update_authors.pl diff --cc sys/modules/zfs/zfs_config.h index 1990d5d99cb1,000000000000..a41af071ec5d mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1149 -1,0 +1,1149 @@@ +/* + */ + +/* 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 */ + +/* fsync_bdev() is declared in include/blkdev.h */ +/* #undef HAVE_FSYNC_BDEV */ + +/* 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 mnt_idmap* and u32 request_mask */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */ + +/* 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 */ + +/* inode_get_ctime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_CTIME */ + +/* 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_ctime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_CTIME_TO_TS */ + +/* 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 */ *** 518 LINES SKIPPED *** From nobody Fri Oct 13 09:15: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 4S6LT763Hbz4wkpG; Fri, 13 Oct 2023 09:15: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 4S6LT75Tb0z4R13; Fri, 13 Oct 2023 09:15:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697188539; 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=CIfl6rPiF3bsZA3Uv7+jHrYDyfY4j3N58ApIOR3I71o=; b=WsRSC3azr9sHVa8PgOsHyEu0J6CwT35v67Jc9t9DwqeCIy00Cg/YtZYdy+W5py+3BN613J rCWqcqhyCpwlvX8bh3Z5BH6BfwJNjZzCsaaFN2m9CdEjl+XbXGgkQyHPUR26ESnQ5NoJlM lHUJLVjMIpnpC2xayGUxX5N1p7PAWRV/0iN3Ee4wO06nSpp0PoF01Gow3whfM4M7020V9z DPJlBwwdSKM4UyvoabcxKDJkgPkRWR+UHUSCQLtMu4yz2I9dZy9pxJLc0/4LKowrbKJmsB c7cSp+PKHFfA0qV3hiosDBMi2/aP4wvH+EA5khNsbSjiR6JSTnUC4+YDFfcv7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697188539; a=rsa-sha256; cv=none; b=VP3F75nRtVzcLb53xa5gGDX1RZqg1QIXpk9vKJUd3ijDvF4qmY9Trn4xEdlmeDwKOe1CDj mdf6FiK9qXcdJHEcnble/cduRqwFzCwhZWXVUoV05nG8SPFYu67X56qi7aShvS0rWKpYKo bLT99SJPzAF+aboUL1ARzTmKLctGo2xxTMktRe3h4w2j/xa8p5OclaR/8RwyrI1w7nAEG0 +AE4yf33X8G09fNoTfqTQCaOeKlE4iJK/T77tmUR+UPcSqrK6OBJpZYYJgY0D+KDV3RQHU mDlJQWE+08PATG7ZCvjpHbc9PVMsmBtP7E9AoZR6c9FglFYxzPyjGabKAuUvfQ== 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=1697188539; 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=CIfl6rPiF3bsZA3Uv7+jHrYDyfY4j3N58ApIOR3I71o=; b=IUe8vphe6sWjrILOhquNJ/hm4eRrs9Ys+2XWWXG1Lrc0p+NhNfzXDV0B748AU9wLJhfq+x 3D8rnAV1UfMWTRHKWczvCxpSdhD8KZkS1anai0wAVTf9j/G69M7bsAoFeKqXour3LLEGMW zMwD8XtWlGLFVoutcpv9pC8ftUaPbhIjZAwLzH6ihevI4TOEV/d17Z8YUsrswCEgZZ+8kV hM1HKjR2gq54/tpvv5KkS9zj+LM/bqRzB0h+sU5bVYSqalB/loDrbw6fwnq6cJcGDcWFLJ QWOvpPizc2GszQrOXRvWMR8LpMINC1IsqBjMA+kB0RvQIDoo16KX6xzcDiqWRA== 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 4S6LT74YgwzhF4; Fri, 13 Oct 2023 09:15: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 39D9Fd8G068388; Fri, 13 Oct 2023 09:15:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39D9FdHt068385; Fri, 13 Oct 2023 09:15:39 GMT (envelope-from git) Date: Fri, 13 Oct 2023 09:15:39 GMT Message-Id: <202310130915.39D9FdHt068385@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: 81647eb60ee3 - main - pf: implement start/stop calls via netlink 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: 81647eb60ee387b0b33ac42deacd25edace2661e Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=81647eb60ee387b0b33ac42deacd25edace2661e commit 81647eb60ee387b0b33ac42deacd25edace2661e Author: Kristof Provost AuthorDate: 2023-10-10 15:20:12 +0000 Commit: Kristof Provost CommitDate: 2023-10-13 07:53:22 +0000 pf: implement start/stop calls via netlink Implement equivalents to DIOCSTART and DIOCSTOP in netlink. Provide a libpfctl implementation and add a basic test case, mostly to verify that we still return the same errors as before the conversion Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42145 --- lib/libpfctl/libpfctl.c | 28 +++++++++++++++ lib/libpfctl/libpfctl.h | 1 + sbin/pfctl/pfctl.c | 14 +++++--- sys/net/pfvar.h | 2 ++ sys/netpfil/pf/pf_ioctl.c | 72 +++++++++++++++++++++++++------------- sys/netpfil/pf/pf_nl.c | 24 +++++++++++++ sys/netpfil/pf/pf_nl.h | 2 ++ tests/sys/netpfil/pf/pass_block.sh | 38 ++++++++++++++++++++ 8 files changed, 151 insertions(+), 30 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index ca29645f9c34..51276d8bb343 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -177,6 +177,34 @@ pf_nvuint_64_array(const nvlist_t *nvl, const char *name, size_t maxelems, *nelems = elems; } +int +pfctl_startstop(int start) +{ + struct snl_state ss = {}; + struct snl_errmsg_data e = {}; + struct snl_writer nw; + struct nlmsghdr *hdr; + uint32_t seq_id; + int family_id; + + snl_init(&ss, NETLINK_GENERIC); + family_id = snl_get_genl_family(&ss, PFNL_FAMILY_NAME); + + snl_init_writer(&ss, &nw); + hdr = snl_create_genl_msg_request(&nw, family_id, + start ? PFNL_CMD_START : PFNL_CMD_STOP); + + snl_finalize_msg(&nw); + seq_id = hdr->nlmsg_seq; + + snl_send_message(&ss, hdr); + + while ((hdr = snl_read_reply_multi(&ss, seq_id, &e)) != NULL) { + } + + return (e.error); +} + static void _pfctl_get_status_counters(const nvlist_t *nvl, struct pfctl_status_counters *counters) diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index e75f93d8775e..06cd25e82c08 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -384,6 +384,7 @@ struct pfctl_syncookies { uint8_t lowwater; /* Percent */ }; +int pfctl_startstop(int start); 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); diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 759b36d9cebe..56b1d28c6fd6 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -310,10 +310,12 @@ pfctl_proto2name(int proto) int pfctl_enable(int dev, int opts) { - if (ioctl(dev, DIOCSTART)) { - if (errno == EEXIST) + int ret; + + if ((ret = pfctl_startstop(1)) != 0) { + if (ret == EEXIST) errx(1, "pf already enabled"); - else if (errno == ESRCH) + else if (ret == ESRCH) errx(1, "pfil registeration failed"); else err(1, "DIOCSTART"); @@ -331,8 +333,10 @@ pfctl_enable(int dev, int opts) int pfctl_disable(int dev, int opts) { - if (ioctl(dev, DIOCSTOP)) { - if (errno == ENOENT) + int ret; + + if ((ret = pfctl_startstop(0)) != 0) { + if (ret == ENOENT) errx(1, "pf not enabled"); else err(1, "DIOCSTOP"); diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index f5ea9bf71f0c..59579a0849d9 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2166,6 +2166,8 @@ VNET_DECLARE(struct pf_krule *, pf_rulemarker); #define V_pf_rulemarker VNET(pf_rulemarker) #endif +int pf_start(void); +int pf_stop(void); void pf_initialize(void); void pf_mtag_initialize(void); void pf_mtag_cleanup(void); diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 5a441c9723e3..38c09303a543 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2337,6 +2337,49 @@ relock_DIOCKILLSTATES: return (killed); } +int +pf_start(void) +{ + int error = 0; + + sx_xlock(&V_pf_ioctl_lock); + if (V_pf_status.running) + error = EEXIST; + else { + hook_pf(); + if (! TAILQ_EMPTY(V_pf_keth->active.rules)) + hook_pf_eth(); + V_pf_status.running = 1; + V_pf_status.since = time_second; + new_unrhdr64(&V_pf_stateid, time_second); + + DPFPRINTF(PF_DEBUG_MISC, ("pf: started\n")); + } + sx_xunlock(&V_pf_ioctl_lock); + + return (error); +} + +int +pf_stop(void) +{ + int error = 0; + + sx_xlock(&V_pf_ioctl_lock); + if (!V_pf_status.running) + error = ENOENT; + else { + V_pf_status.running = 0; + dehook_pf(); + dehook_pf_eth(); + V_pf_status.since = time_second; + DPFPRINTF(PF_DEBUG_MISC, ("pf: stopped\n")); + } + sx_xunlock(&V_pf_ioctl_lock); + + return (error); +} + static int pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) { @@ -2479,34 +2522,15 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td CURVNET_SET(TD_TO_VNET(td)); switch (cmd) { +#ifdef COMPAT_FREEBSD14 case DIOCSTART: - sx_xlock(&V_pf_ioctl_lock); - if (V_pf_status.running) - error = EEXIST; - else { - hook_pf(); - if (! TAILQ_EMPTY(V_pf_keth->active.rules)) - hook_pf_eth(); - V_pf_status.running = 1; - V_pf_status.since = time_second; - new_unrhdr64(&V_pf_stateid, time_second); - - DPFPRINTF(PF_DEBUG_MISC, ("pf: started\n")); - } + error = pf_start(); break; case DIOCSTOP: - sx_xlock(&V_pf_ioctl_lock); - if (!V_pf_status.running) - error = ENOENT; - else { - V_pf_status.running = 0; - dehook_pf(); - dehook_pf_eth(); - V_pf_status.since = time_second; - DPFPRINTF(PF_DEBUG_MISC, ("pf: stopped\n")); - } + error = pf_stop(); break; +#endif case DIOCGETETHRULES: { struct pfioc_nv *nv = (struct pfioc_nv *)addr; @@ -5416,8 +5440,6 @@ DIOCCHANGEADDR_error: break; } fail: - if (sx_xlocked(&V_pf_ioctl_lock)) - sx_xunlock(&V_pf_ioctl_lock); CURVNET_RESTORE(); #undef ERROUT_IOCTL diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 459a5dc6507e..e079edcc166d 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -336,6 +336,18 @@ pf_handle_getcreators(struct nlmsghdr *hdr, struct nl_pstate *npt) return (error); } +static int +pf_handle_start(struct nlmsghdr *hdr __unused, struct nl_pstate *npt __unused) +{ + return (pf_start()); +} + +static int +pf_handle_stop(struct nlmsghdr *hdr __unused, struct nl_pstate *npt __unused) +{ + return (pf_stop()); +} + static const struct nlhdr_parser *all_parsers[] = { &state_parser }; static int family_id; @@ -353,6 +365,18 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_getcreators, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, }, + { + .cmd_num = PFNL_CMD_START, + .cmd_name = "START", + .cmd_cb = pf_handle_start, + .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, + }, + { + .cmd_num = PFNL_CMD_STOP, + .cmd_name = "STOP", + .cmd_cb = pf_handle_stop, + .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, + }, }; void diff --git a/sys/netpfil/pf/pf_nl.h b/sys/netpfil/pf/pf_nl.h index 98525641b43d..3c8c6d3b8ed4 100644 --- a/sys/netpfil/pf/pf_nl.h +++ b/sys/netpfil/pf/pf_nl.h @@ -38,6 +38,8 @@ enum { PFNL_CMD_UNSPEC = 0, PFNL_CMD_GETSTATES = 1, PFNL_CMD_GETCREATORS = 2, + PFNL_CMD_START = 3, + PFNL_CMD_STOP = 4, __PFNL_CMD_MAX, }; #define PFNL_CMD_MAX (__PFNL_CMD_MAX -1) diff --git a/tests/sys/netpfil/pf/pass_block.sh b/tests/sys/netpfil/pf/pass_block.sh index 792b73b4a0a5..faf5c2de4de2 100644 --- a/tests/sys/netpfil/pf/pass_block.sh +++ b/tests/sys/netpfil/pf/pass_block.sh @@ -28,6 +28,43 @@ common_dir=$(atf_get_srcdir)/../common +atf_test_case "enable_disable" "cleanup" +enable_disable_head() +{ + atf_set descr 'Test enable/disable' + atf_set require.user root +} + +enable_disable_body() +{ + pft_init + + j="pass_block:enable_disable" + + vnet_mkjail ${j} + + # Disable when disabled fails + atf_check -s exit:1 -e ignore \ + jexec ${j} pfctl -d + + # Enable succeeds + atf_check -s exit:0 -e ignore \ + jexec ${j} pfctl -e + + # Enable when enabled fails + atf_check -s exit:1 -e ignore \ + jexec ${j} pfctl -e + + # Disable succeeds + atf_check -s exit:0 -e ignore \ + jexec ${j} pfctl -d +} + +enable_disable_cleanup() +{ + pft_cleanup +} + atf_test_case "v4" "cleanup" v4_head() { @@ -257,6 +294,7 @@ urpf_cleanup() atf_init_test_cases() { + atf_add_test_case "enable_disable" atf_add_test_case "v4" atf_add_test_case "v6" atf_add_test_case "noalias" From nobody Fri Oct 13 09:27: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 4S6Lkm31Mqz4wkvl; Fri, 13 Oct 2023 09:27: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 4S6Lkm2V91z4RYW; Fri, 13 Oct 2023 09:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697189248; 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=OBa5rDTIsvHq/GQEsPMk4Lin9fs57llngi1/025upis=; b=UwDH97qOLeryYdGdqAL3yoZ1C6kaxJGNgK6uAsI44Nnz69ycqb2qEtdmz9FSYrVo163Ob4 sHHzGVD5+tD0khBfx7ZVCCUpW6pfHOVNNbwZTxDp/1SIP0Ghg9S5VcvvzMk6hhS9SCGmPd yjyvbtqEG7WiJ7mZAO9+5OM74V6omfr6+qZpZ8m3whsFnxMA1a4/aAiNrtK+cFbESBlhH/ uvrKD8feLn5zdKBbvRlzE4Rb3zjT/NhoptePy30zUiLFQ4oUBRIJJgzZvcJe3stXDhrcy4 8C3pIWZhHQlYld2g71DA391p07CSDWVa6IgV97yRE+SeB03x+KPzZFJSkncFdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697189248; a=rsa-sha256; cv=none; b=VOOHZlWjnZF3/mPMyRj+3y1ioVZ+uCIfwxj6xg7Mr20nktD0sNINrcrJ7ps3r+3UfCpeaW YI54AFryKnjAubuNm6aUoyL0UnJJYEdu4R/r9OCHftII0dCdOZDRMD+/tkvy97jzbIxESc LjH3Ryi7W+o/7GyQQBR0xY5jTeX+tLeMhTxDXgG4r2dthH16E/bmCeT8CSCv8FYp+pvGiR rpFGI0FI2qJCCWy6ODtUWpJIEv3M8xiH91faJb/zrKjw91MMZDY3rPgtt/CraN65I/e9+0 ZZB4rhwJFSEcClI2d4nwgp0gELqAvavT+dMSpmiulm1VaFLOorXnqk/KdfCDzg== 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=1697189248; 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=OBa5rDTIsvHq/GQEsPMk4Lin9fs57llngi1/025upis=; b=RWL2NLycoqAZQ2BbL8y6r2OGkNMOpPwfslBtHxfQnjfkaNahRmYZMeKeXHcwXb04XdoIf9 MsWA+7BpuThCttCg+Rgu24WbyDCZe8c0AquiY5200IeKKVzEqvfktpMSpFFsOlESzNBio2 DcTP2ExewsEvhuss15T39yFPVo57P/hqAe2mE0hRjDCh8U4uvj13nkqI5/z+JPxKv3/iL1 TVl6WdPJbjdnfv9IBevpdY3glwjdR9URds/iYNgZhiF4xD/X6DIN4Ii7/AByz/W8xXhzqy gg97P56pwz+alJ90KlC8yQK0fY7NCe176QFmdCTimuKTUqnQIAB2Q5KJx4Ef8w== 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 4S6Lkm1YJNzj8J; Fri, 13 Oct 2023 09:27: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 39D9RSV4085564; Fri, 13 Oct 2023 09:27:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39D9RSUt085561; Fri, 13 Oct 2023 09:27:28 GMT (envelope-from git) Date: Fri, 13 Oct 2023 09:27:28 GMT Message-Id: <202310130927.39D9RSUt085561@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: 4095e0bcb9e8 - main - arm64 locore.S: fix 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4095e0bcb9e8fac51eedad89211a5b16af7f55ad Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4095e0bcb9e8fac51eedad89211a5b16af7f55ad commit 4095e0bcb9e8fac51eedad89211a5b16af7f55ad Author: Konstantin Belousov AuthorDate: 2023-10-09 23:55:45 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-13 09:26:44 +0000 arm64 locore.S: fix typos Reviewed by: jhb, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42143 --- sys/arm64/arm64/locore.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index f741bccf598a..b592c753aa50 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -136,7 +136,7 @@ virtdone: sub sp, sp, #BOOTPARAMS_SIZE mov x0, sp - /* Degate the delda so it is VA -> PA */ + /* Negate the delta so it is VA -> PA */ neg x29, x29 str x1, [x0, #BP_MODULEP] From nobody Fri Oct 13 09:27: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 4S6Lkn4Scvz4wl0n; Fri, 13 Oct 2023 09:27:29 +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 4S6Lkn3XlBz4RkB; Fri, 13 Oct 2023 09:27:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697189249; 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=aY2tiMRiqKUe9OtkViT86Att2j0lFJl587U31seS7fA=; b=lFh/hUHXo55v5fSccb6ciPAxP+vsNPmb+2VNuWDz6Ujowr7gXzi9L5BaEW2SoH/U4NLOvf n5QStYClyTc3fcohLDmTBUsewq+AoHGzTNhidG7vqxDo7wRD5QYfLaVMKYpXC7W7PcpJRV Y+bOXAsDliJaYula9deYHUKjcgKp/HhPX53x/Fl5VxpduLfRPeTUOf/pBD3dO4P03Uigy4 381PrAoog95hUr8EVNTLBvIeO1NHdCcIaUozBuTFgqv6FhT3gHuwbg6xuVfruMLNTvqP2Y LlmAyeoeDRYBAh4NXySXbDcqNTBRF/VqpJR9lonS1LfJESzmOjaSd3V6vIP/7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697189249; a=rsa-sha256; cv=none; b=lVLauozzmqey7P+DtgjEq3BM/3XqJ9K6Lo8eusrlOay1HKKq5xvH+5TXKiIZP5IjXDIYIT Wkth9EoV7b5RWuUcXVoM3b2xphk8xVUR2WNJ1UPGrK1IVVzEJ9ea4of9FfisOPggJckQkx aWuANIkEHh0fI9fXCBnnse4alpeIR6mUMnnPtkOKn2b7ZseWCnmK0RwIuhcWkUGDFg8thc TKd6VB5EpB8sgPPUfMg93tj+lRrRtrt4TWYKGXvpG5JVoFHCB6OG3cq4IBgBWdEkShlVhB wmHut7LZ94C281UCJ70eHKB/BIsREGCZTmaPjkjkVaiwUHeSBTdROjmm58AysA== 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=1697189249; 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=aY2tiMRiqKUe9OtkViT86Att2j0lFJl587U31seS7fA=; b=Jhg/EiuIHbymTpbJ4r2+Ef/ZE2OLfUsgkXNgW3ZvRUDHRlzoovLAgjZx2q+iuLwXKuuEAz KCDvUj5wddferivRSwo9XSshFNGDH6V2XKkcRykMW7MuerwBISF+ykPWYdKBpwPsdEvK3B b1GLJ7F+CI54g0m6Q55jkMyuPUFIKQrXcCr2gdv3Y1fpjhGP3WrOW9fOkosNIMmkfS16ns M/Biexw0M82MLTh5ZYpEWRgEMoXHDaeJougCW2h7HQlREIzUhlgKLlTWSenW1KLCKZ3//9 sIP/E73zLZ7cOGX/P0m3owVAc55tY+ZpJVYNKZsbdhwFYEL+/nVkXQXvPvJnuw== 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 4S6Lkn2ZdkzjL2; Fri, 13 Oct 2023 09:27:29 +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 39D9RTVp085623; Fri, 13 Oct 2023 09:27:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39D9RTS7085618; Fri, 13 Oct 2023 09:27:29 GMT (envelope-from git) Date: Fri, 13 Oct 2023 09:27:29 GMT Message-Id: <202310130927.39D9RTS7085618@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: ac63f7534d01 - main - arm64, riscv: Use KSTACK_PAGES for the thread0 kstack size designator 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: ac63f7534d0102352bf993ebe2c748ce2ffd432e Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ac63f7534d0102352bf993ebe2c748ce2ffd432e commit ac63f7534d0102352bf993ebe2c748ce2ffd432e Author: Konstantin Belousov AuthorDate: 2023-10-09 23:56:37 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-13 09:26:45 +0000 arm64, riscv: Use KSTACK_PAGES for the thread0 kstack size designator instead of kstack_pages. Although it is correct right now to use kstack_pages on amd64 since the kern.kstack_pages tunable is not functional on arm64, this is too fragile and wrong on riscv. Include opt_kstack_pages.h into machdep.c to get the right definition for KSTACK_PAGES. Reviewed by: jhb, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42143 --- sys/arm64/arm64/machdep.c | 3 ++- sys/riscv/riscv/machdep.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 4bfbfcaa91bd..8aa45a86fef4 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -26,6 +26,7 @@ */ #include "opt_acpi.h" +#include "opt_kstack_pages.h" #include "opt_platform.h" #include "opt_ddb.h" @@ -380,7 +381,7 @@ init_proc0(vm_offset_t kstack) proc_linkup0(&proc0, &thread0); thread0.td_kstack = kstack; - thread0.td_kstack_pages = kstack_pages; + thread0.td_kstack_pages = KSTACK_PAGES; #if defined(PERTHREAD_SSP) thread0.td_md.md_canary = boot_canary; #endif diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 6bc0b996948a..261dc8d6d840 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -33,6 +33,7 @@ * SUCH DAMAGE. */ +#include "opt_kstack_pages.h" #include "opt_platform.h" #include @@ -286,7 +287,7 @@ init_proc0(vm_offset_t kstack) proc_linkup0(&proc0, &thread0); thread0.td_kstack = kstack; - thread0.td_kstack_pages = kstack_pages; + thread0.td_kstack_pages = KSTACK_PAGES; thread0.td_pcb = (struct pcb *)(thread0.td_kstack + thread0.td_kstack_pages * PAGE_SIZE) - 1; thread0.td_pcb->pcb_fpflags = 0; From nobody Fri Oct 13 09:27: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 4S6Lkp5Dq9z4wlKN; Fri, 13 Oct 2023 09:27: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 4S6Lkp4JXPz4Rs0; Fri, 13 Oct 2023 09:27:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697189250; 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=X569ObDdPieKW3RlWWa56OiQCuwQ0ZjDTQ/cQE7M6SE=; b=ZJhL1ekmB5p2XvyaxiPubiPcHvNKFEHsrd0bnNJOZQd8iDC/A9iU0G5IWbvpRTlUXkn3/l gzkfEjcQTmWYli8IbBUT/5LMXJGTdirl1WtAwqdBAI+NOJOG4YoJfXM5ahWHYprOqilWW1 aRVhTyEWS/DvoGOjAEDuECDW1kmpuQZMaeA88eN+LVLu7l9Yn7M9jdedARktUv29NwRp5L xciyVbWk/JAkwKJCbCH9HR6xH/ETnRyWe0dLRvI7JtxdDuXKuiqjy4rTLI1iJ062D3cJiQ 4EjiQPcxV8xhJdhbKuVFqVm5s+6Y2DIcP1swu9iV1zQiR/GE87WuFzvqxuo2jA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697189250; a=rsa-sha256; cv=none; b=sxRwWoTzPzM9LvclhSdIMIAh0kwWzFmdWfvnbr6OKBa9vriXvIJokQZitVnYI5Hh1yBYe2 ERoAQ5GcoFFJaj1K56/++oHS+garTrH4XH5qsTZsgwuJGeFOTkataWpMO67TTvX6pDZ+j+ uEJkPf9oNFYKb9c9JUIp+6jCuhmAErS1spKmfGY2cYezmbgR9r9ICz+SOF0PIcvLQwmn/U f2h0mGp2gvNRH6RhtvzvN9cVN8DaGKWwGfkSDx57zUK60MmNiIR9CzP6w0f6AdXIVCgLyQ YVE5ma6Pw5uVk5lzDGFf5XL+5olat3+YIiKzxXOjjYWwBoRP7oI1nHEEKyrIaA== 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=1697189250; 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=X569ObDdPieKW3RlWWa56OiQCuwQ0ZjDTQ/cQE7M6SE=; b=qNdAe8SuNHfTL6XYprN6qqdCqIQA5+uTFWtUjAGLjrsFpbjT4iQzL77OKQazd+KdktL/HB 4uPqJ+iI8k9bV/o2Fu/UmZFBQ3RZfSgIKYC3tRqtKxcQ/oYJtjIJ6aGU3196uEy5Pz/3pi tqYaaOg7d5Eu95u41DdGwA2xPsVf8tYNHcSqbcy+hASwWwnd6RcMemvbu5hAkdEN+hsMVc V08+MykUzdlzTRHs/gFmwtjU26Rbvb21F/VZYv1XoTEvblqO2LIo4BsoadOTfTzpAN0tfe m00t/k5wr998QrQXGMPRLzxN+G6lGlwsBP78t76H1wMzZ40nOymqGtV1KfvHPA== 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 4S6Lkp3MvFzhmJ; Fri, 13 Oct 2023 09:27: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 39D9RUcM085685; Fri, 13 Oct 2023 09:27:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39D9RUtC085683; Fri, 13 Oct 2023 09:27:30 GMT (envelope-from git) Date: Fri, 13 Oct 2023 09:27:30 GMT Message-Id: <202310130927.39D9RUtC085683@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: 39cddbd7a07c - main - arm64: do not disable the kern.kstack_pages tunable on arm64 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: 39cddbd7a07c182c4f121bea5a6effa36862fc63 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=39cddbd7a07c182c4f121bea5a6effa36862fc63 commit 39cddbd7a07c182c4f121bea5a6effa36862fc63 Author: Konstantin Belousov AuthorDate: 2023-10-10 00:02:06 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-13 09:26:45 +0000 arm64: do not disable the kern.kstack_pages tunable on arm64 Add a comment explaining what is not quite correct with arm64 and riscv. Reviewed by: jhb, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42143 --- sys/kern/subr_param.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index f7d6cf848424..b7dbf606f492 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -170,9 +170,13 @@ init_param1(void) { TSENTER(); -#if !defined(__arm64__) + + /* + * arm64 and riscv currently hard-code the thread0 kstack size + * to KSTACK_PAGES, ignoring the tunable. + */ TUNABLE_INT_FETCH("kern.kstack_pages", &kstack_pages); -#endif + hz = -1; TUNABLE_INT_FETCH("kern.hz", &hz); if (hz == -1) From nobody Fri Oct 13 09:27: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 4S6Lkr1clQz4wkxh; Fri, 13 Oct 2023 09:27:32 +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 4S6Lkq5Zdwz4S58; Fri, 13 Oct 2023 09:27:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697189251; 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=b0ZRy472bo29HjdHfu2bd+VXCeH33n1jvbfDz/xBeow=; b=VghLkCtCfDbkuRdEMfdMwLo7NJEieCGMbwJz5XItYjRLoxUumofgwBNu67VpYZvwzhWFx7 0lAMozK7LiP2vOt6kWT8NyXtrY0OfS7nTfK9xaThUwNKClnxsSt9MXSTQjzV77VanhuWp0 6nwsMP5ke+2KmUW7ibsD4KXbzdU9VOvekR0zcGfc9FWnAschyW4cQH2BzJYgHSX7gImVQx reqkpFsN1UYIEyB9jtbGhp/YqL4F9tHboecJOWV98QmLTSoJOAcK89DpgeHNOso+mWrM1s +MP2TxHYe7/yKldfm8/5xukznctlEsWwtJfkD8lfIrnxPeSy2FMjatIOVIlwkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697189251; a=rsa-sha256; cv=none; b=gOpGKmiZ/ET0z4aKhszKGG+eSy5KDdtgN7xdetb0/HOyeRKRx4HwfaMW4vfta05oPVQCP8 9BECWpnfSwrwBb/jnKEwhtQoU90m0IbQD0S2UyDXVatzxNPFywrXEvkWF9/jxqyOiWIchB JnZLoiVvsaLdzknhzGUcUC58jNO2WU4XxJEyRG/OGtC9c+wWQwk/WDu1ZOC6rCTtYOjTKF cXavVAKYlfw77URizi5hE4/XBAyMYTsZirvmCeueo3Vho+JyCu86vCFR3pcPl8EOTB0xoz 78Q5aIqIn9nJtAl0NC4Zd1BwkpE5JC/FdVquD9wxK1q099PsaxTwwrZQJR3Owg== 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=1697189251; 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=b0ZRy472bo29HjdHfu2bd+VXCeH33n1jvbfDz/xBeow=; b=hFxLtYtBsqqt2fdad7zM6Xxrho3dgu2nzigyGypeTWBvupcxCgDIRk1Wx/fm9LR8bhSo10 oL34LPgiJG9yTFxTmKYlde8KHkW33Qngx6M9xkfSiYEkL+s5oTdqvEIBsee2AaEWs6IFwR F4I5TjxwIFYoNYuAsAF6jS9Xm8vzW0VHwYkdKmCXrW1b8Cls9tkQsDS8nkOABci7WK8IN0 AMe599PN2PzHPKXXUq2jgw1moU7rVB81DWo5pzUBkwoT2mUeUXB5BiloBR7xDPfYjcZcHC uLpPMv6Sbou2QasbST/5ybbdc/7dzv+Gb/HrnaMIKR96iECRxFRTNxPcpvYacg== 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 4S6Lkq4dM7zhyN; Fri, 13 Oct 2023 09:27: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 39D9RVFr085736; Fri, 13 Oct 2023 09:27:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39D9RVIj085733; Fri, 13 Oct 2023 09:27:31 GMT (envelope-from git) Date: Fri, 13 Oct 2023 09:27:31 GMT Message-Id: <202310130927.39D9RVIj085733@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: 6aa641b71d0d - main - arm64, risvc: warn about ignored kstack_pages for thread0 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: 6aa641b71d0dd1b26674f0b6dba086410f643595 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6aa641b71d0dd1b26674f0b6dba086410f643595 commit 6aa641b71d0dd1b26674f0b6dba086410f643595 Author: Konstantin Belousov AuthorDate: 2023-10-11 18:56:28 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-13 09:26:45 +0000 arm64, risvc: warn about ignored kstack_pages for thread0 Suggested by: brooks Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42143 --- sys/arm64/arm64/machdep.c | 4 ++++ sys/riscv/riscv/machdep.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 8aa45a86fef4..bb7689c19101 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -1049,6 +1049,10 @@ initarm(struct arm64_bootparams *abp) early_boot = 0; + if (bootverbose && kstack_pages != KSTACK_PAGES) + printf("kern.kstack_pages = %d ignored for thread0\n", + kstack_pages); + TSEXIT(); } diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 261dc8d6d840..d5767e240c7e 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -596,5 +596,9 @@ initriscv(struct riscv_bootparams *rvbp) early_boot = 0; + if (bootverbose && kstack_pages != KSTACK_PAGES) + printf("kern.kstack_pages = %d ignored for thread0\n", + kstack_pages); + TSEXIT(); } From nobody Fri Oct 13 14:44: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 4S6TmV4fh0z4x5WM; Fri, 13 Oct 2023 14:44: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 4S6TmV46Svz3Rpg; Fri, 13 Oct 2023 14:44:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697208266; 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=7lcb1m8Gozv2JraZFOxQpERAVKQd2kso947pUsRFmvc=; b=dVzZtBNPvaFMzJpG6ZwQzSHHAEVXwV0hUWp+2avhs/2VSojs/M3xOspDHNEpZVWv8/AaTF A2al/swcYLc393JtFiZ1NEC//LbQE2SsgfGusPMeBUbclN9R4wFmEmMPzwhRavQJcRHDoC oibXqyl07hTIykAQAjV8YK0zCMJ5I5VqrtDZBVQHMFLHSKWzsaZpzmGPiegQAAWc0oWqEt Azaqmz9droGIJZ+HCZnr1JJIXmk7GimO5Zk+mI6cIQuiqMQzBpEiw+rFF8JGIUK1pf0b5G XiY4fTXdnrwOuqVCGoyRTNLNglOkBuKWnwUt1HrEdpFEAV+a9Ch4uVGR7lW4og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697208266; a=rsa-sha256; cv=none; b=X20nYt59VZ7RavW9HuotFHeLiuvVw+NJiM3zXB6k5O8mu0BQw7MBdXgUfKXU852RD/csz6 oiEx7JG/7v6FjFFUvHF71sOq6awqz5BOR9aaf/FLuHAYeOTEhQlk0UGzYql/bL33obSP2/ mRvQv8305y9jbBCZeOU7ofBFi6n/1A5EWiWU746kB/5Q5vMenId6bKCLNuESrfhF6+5DPA 4TbXHztAhrTjyhX9amCN5skDGkHSloYbbrOcGBIpV5gVBlzJzLjqYo13R4DUPw6FoHpV0T XTPErxcsD4Fl1KmiyPaxDqP6FlE/cbuilDcHJEEfXt2CAASuqr3qvNQAF+rTwQ== 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=1697208266; 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=7lcb1m8Gozv2JraZFOxQpERAVKQd2kso947pUsRFmvc=; b=Phiu3aPaxbX1vdTymHsjTWCykqsrmqYFZkKbFhFpjb/bYqK+46RyAaTOJH9piPJkCOIIxr TullRDSyvaZBrKMHADOzBQOCuw7RUZfgXs+WhGbCwuk/LIj2q5gnNGR9nuEonZFBqplC1G Kvm7EQqe/ymzh9pSgv2go1b+j31SVzPbGb2M7UwRoQnHl2N5SYhZSGaXDNJKhRLEGMMPsq cJ8a+6fl/gIrPGTdTyy0Y7iQEucLRIXEOvn843Ph01IvgBWj8YSb1siXnWK5XlvTkWrvbM L+U8EzNaqwzBDehdsrAx7C5dBUXxTGkxCML3OI3Aak7IhPucf8U17SMC/MaA0w== 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 4S6TmV39nMzrwl; Fri, 13 Oct 2023 14:44:26 +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 39DEiQ8G014781; Fri, 13 Oct 2023 14:44:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DEiQkG014778; Fri, 13 Oct 2023 14:44:26 GMT (envelope-from git) Date: Fri, 13 Oct 2023 14:44:26 GMT Message-Id: <202310131444.39DEiQkG014778@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: 2df97575088d - main - kasan.9: Mention the loader tunable 'debug.kasan.disable' 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: 2df97575088d2efe71d6ee136a677cf50249f96d Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=2df97575088d2efe71d6ee136a677cf50249f96d commit 2df97575088d2efe71d6ee136a677cf50249f96d Author: Zhenlei Huang AuthorDate: 2023-10-13 14:42:34 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-13 14:42:34 +0000 kasan.9: Mention the loader tunable 'debug.kasan.disable' Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42165 --- share/man/man9/kasan.9 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/share/man/man9/kasan.9 b/share/man/man9/kasan.9 index 1db6e187da46..209fbb06506c 100644 --- a/share/man/man9/kasan.9 +++ b/share/man/man9/kasan.9 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 23, 2023 +.Dd October 13, 2023 .Dt KASAN 9 .Os .Sh NAME @@ -90,6 +90,12 @@ sysctl/tunable. .Pp The .Nm +runtime in a KASAN-configured kernel can be disabled by +setting the loader tunable +.Sy debug.kasan.disable=1 . +.Pp +The +.Nm runtime works by maintaining a shadow map for the kernel map. There exists a linear mapping between addresses in the kernel map and addresses in the shadow map. From nobody Fri Oct 13 14:44:27 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 4S6TmW6Yscz4x5qX; Fri, 13 Oct 2023 14:44:27 +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 4S6TmW5YLtz3Rkf; Fri, 13 Oct 2023 14:44:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697208267; 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=Z47aMn1fKkbIuGEvrJGo7U7PCsD5mVWc1M9kG/4q9ao=; b=J0hm9ibIiQB3uuRbqNmbz3PrQ2qJjinjybxV1GSfNBXCdj6qIRKy86GPjd0VY5lwjj4Rvr As3eZ+K9e5IH0icgl7H5UUG6oQwqFbWo6d4No9DBWQLXvyD2JPo3gjM4Dm5gtrsJ9t1SwY aSqrA502tAvMAVwFxC8okBHByiHqhyA683B0bGZ0GeSCdNViNW0OBUCikc7y/1H0uPvhqA fhYaWMi76nWx8MP48pP0bqan/JpBZttC708y/ClgQ13lqcJawXjHYhibqvCrS+R19aE4a1 xGPfFBNCEiiQI2+GXaqB/3d5NdbOOKpT35zX50E9YbSyg9lJFmvKhnOg4cKXdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697208267; a=rsa-sha256; cv=none; b=aIH9s3lgE+pMGZyn06GFdTiJN/8tb0/wlMiL39wD3SqcqrsPwgUesDaG3qvNPxEINbXJz6 xztkCwfRCPCezCksEMdmMsedHf3Mm/m1fO6k7gq1oFx8+j+JFwSocB2unO3j2YSMvUZo5d lpsft9+019B/0K6n/+y1c7CxGeEg0qO7TZDUFOpyn+qQEZ2X+tzdfu/CmT9wH6rESAcWf1 oRYkb9W8RyHC9RWXffMd44EPW/GdsJqZW7b9MvkDXkkjxVuhbHNl6+rUJV6avb+XVGlg0u xh/eacguTIC48tcQ2ZPMjUWq16s6imESDLHpeXVuh3rjqyJq3EVSYJn8WvRZ5w== 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=1697208267; 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=Z47aMn1fKkbIuGEvrJGo7U7PCsD5mVWc1M9kG/4q9ao=; b=gFITSCotYfhSEnkKgQ0GU3KIfMrVBFDIP8cJ3K3+0Yd4s2Z/SnLIgcxX7NYfhK+pokJI90 qHVV3oav9cFa3i+TPM/kAx4cvBwpZzkhwbK4ow/p49jnPfquamtWfH/w0QijjL5gWun2ps cuoO5kTylTZRewoso8HKzQiQSgG9wFr/DdCuBlc1VIRoRCn8AHLvl2L6m643MM1RLW2Yuq Fa0KRG+NwwaXZ4xo3vQELRyzzALLDHyp8txCLJOjeX3z3d669iQUXFoOlLazipxP/A5mSX F7Y1SalMS59YzgAttl1wMox8usvEaBCHsa2khOGYLcx/y5nyHJw0JCfP2cvF/A== 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 4S6TmW3qQTzs3h; Fri, 13 Oct 2023 14:44:27 +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 39DEiR9H014827; Fri, 13 Oct 2023 14:44:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DEiRJM014824; Fri, 13 Oct 2023 14:44:27 GMT (envelope-from git) Date: Fri, 13 Oct 2023 14:44:27 GMT Message-Id: <202310131444.39DEiRJM014824@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: 7ca90db2f3ee - main - kmsan.9: Mention the loader tunable 'debug.kmsan.disable' 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: 7ca90db2f3ee15d9d0343d76f06a90efb8426d92 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=7ca90db2f3ee15d9d0343d76f06a90efb8426d92 commit 7ca90db2f3ee15d9d0343d76f06a90efb8426d92 Author: Zhenlei Huang AuthorDate: 2023-10-13 14:42:34 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-13 14:42:34 +0000 kmsan.9: Mention the loader tunable 'debug.kmsan.disable' Reviewed by: gbe (manpages), markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42166 --- share/man/man9/kmsan.9 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/man/man9/kmsan.9 b/share/man/man9/kmsan.9 index ae9dbdc7a052..714442e4d9fe 100644 --- a/share/man/man9/kmsan.9 +++ b/share/man/man9/kmsan.9 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 10, 2021 +.Dd October 13, 2023 .Dt KMSAN 9 .Os .Sh NAME @@ -108,6 +108,10 @@ should be used only for kernel testing and development. It is not recommended to enable .Nm in systems with less than 8GB of physical RAM. +.Pp +The sanitizer in a KMSAN-configured kernel can be disabled by setting the loader +tunable +.Sy debug.kmsan.disable=1 . .Sh FUNCTIONS The .Fn kmsan_mark From nobody Fri Oct 13 16:20: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 4S6Wtz6qgsz4wRr5; Fri, 13 Oct 2023 16:20:11 +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 4S6Wtz68X1z3fTm; Fri, 13 Oct 2023 16:20:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697214011; 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=UqloKdwC5qcOhjCxjcLcYXjaYQp2MfrdOT2iKaPfYd8=; b=ot1RQLSFPPw0nq6lUWdSoKLv757RzNK3qZ+F699Q/N2Hlv/WIpqR3wQ32e155HuSd2CcrZ tMj4qyTIxBnrn/uOG1RVDd9p4NogpTGxRs5VMTIUZ2skCNUmCiMz5Vg2J84DiME/SHbnY2 1eGWJWggHS0PJDANZTUC/3RTeI6tx+jtOLFkH3T+02+jXJea6rG8AOvz2Gj8BAWq06ofXU AfsHAnBoIoRX0c9LreRcx6Tal+7B2HMhi2lXeTPCy82wypwNn2gtWwMZz/Rg8Ew0kjylYz twyGCk+xMcQas5O+C+ZJyyqit14Q4iOYm9ZuhRsZ3dPxyOGmgXSGP7y/85QzhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697214011; a=rsa-sha256; cv=none; b=ORtEvPKocqD4xJywglxYdpmrHg3dXATuHfW/ly3QkgZWqp5Xtia1a+NXwU5BJHMCvnSbdt QaaqfZo4T2elmkGn75ifgRoVYP1zkqhb7m7m5VFmNsOKMt2a5xlrXvuIEydZd9jRVdP/rM KmfKAh66JAAK1qgF83FlFqvxgpYTI95F+I/g3Fp0VAcPNWOHQF0DlJodnfa7J/X2S+ZId1 x8hVxRIhTSV1yCR2YUeYNZfW8aff1N0vFiGqPbNgu8HmelE0Peb5ylnid6spa0f2ylweoy EDKBXI0AZpuxVkh/uNGhjwsUFFC4Ji/IUjkCiSm7yzcDW3N+KZFtjtZpyEgf7A== 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=1697214011; 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=UqloKdwC5qcOhjCxjcLcYXjaYQp2MfrdOT2iKaPfYd8=; b=yKn3RqHrQM04Fyh+8EEsE5QQULsGUBFx/e1jc4oi+G1a/AHyEQMUslIWdPFQ2NqEtTunuY BASPT/T3gK56doBDNGtO28fIcnmX3Ndmu4EakiuvJp3/g4DESc5H7YX+Oo3ES1iAE0+pXQ MCO8I4dAPg9ky0wzYv2HT06GNtsgWrpqR8067lam5gx2XCXAej1qo9OjqbfrGUDOHSJVeF N/+4Wy8HT4tMmeh3UgrNJSd+KdkK1FVxtovtHpTE3UnRsvSMcoC1yObfhz9ZZ8zrEfilD9 ZS6yNoBn7y0YP4YI32yug49DBTNVsBzinbW7j/exmeTVQw8rUVHI3RrO56N5cQ== 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 4S6Wtz5C81zvR5; Fri, 13 Oct 2023 16:20: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 39DGKBGn071158; Fri, 13 Oct 2023 16:20:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DGKBon071153; Fri, 13 Oct 2023 16:20:11 GMT (envelope-from git) Date: Fri, 13 Oct 2023 16:20:11 GMT Message-Id: <202310131620.39DGKBon071153@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: a6d202077dee - main - bsdinstall: revisit the finalconfig step 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: a6d202077deedcdadc589e10399119d52f7cf71a Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a6d202077deedcdadc589e10399119d52f7cf71a commit a6d202077deedcdadc589e10399119d52f7cf71a Author: Pierre Pronchery AuthorDate: 2023-10-02 18:28:07 +0000 Commit: Ed Maste CommitDate: 2023-10-13 16:19:39 +0000 bsdinstall: revisit the finalconfig step This moves the "finalconfig" step into a dedicated script, where it uses a loop instead of recursing into itself. Reviewed by: bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42046 --- usr.sbin/bsdinstall/scripts/Makefile | 1 + usr.sbin/bsdinstall/scripts/auto | 54 +--------------------- usr.sbin/bsdinstall/scripts/finalconfig | 81 +++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+), 53 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/Makefile b/usr.sbin/bsdinstall/scripts/Makefile index 2d226f418783..e4ef00ecba59 100644 --- a/usr.sbin/bsdinstall/scripts/Makefile +++ b/usr.sbin/bsdinstall/scripts/Makefile @@ -7,6 +7,7 @@ SCRIPTS=auto \ docsinstall \ entropy \ fetchmissingdists \ + finalconfig \ hardening \ hostname \ jail \ diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index 742f319e15ad..9f4b5b52fe5d 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -370,60 +370,8 @@ fi "Would you like to add users to the installed system now?" 0 0 && \ bsdinstall adduser -finalconfig() { - exec 5>&1 - REVISIT=$(bsddialog --backtitle "$OSNAME Installer" \ - --title "Final Configuration" --no-cancel --menu \ - "Setup of your $OSNAME system is nearly complete. You can now modify your configuration choices. After this screen, you will have an opportunity to make more complex changes using a shell." 0 0 0 \ - "Exit" "Apply configuration and exit installer" \ - "Add User" "Add a user to the system" \ - "Root Password" "Change root password" \ - "Hostname" "Set system hostname" \ - "Network" "Networking configuration" \ - "Services" "Set daemons to run on startup" \ - "System Hardening" "Set security options" \ - "Time Zone" "Set system timezone" \ - "Handbook" "Install $OSNAME Handbook (requires network)" 2>&1 1>&5) - exec 5>&- - - case "$REVISIT" in - "Add User") - bsdinstall adduser - finalconfig - ;; - "Root Password") - bsdinstall rootpass - finalconfig - ;; - "Hostname") - bsdinstall hostname - finalconfig - ;; - "Network") - bsdinstall netconfig - finalconfig - ;; - "Services") - bsdinstall services - finalconfig - ;; - "System Hardening") - bsdinstall hardening - finalconfig - ;; - "Time Zone") - bsdinstall time - finalconfig - ;; - "Handbook") - bsdinstall docsinstall - finalconfig - ;; - esac -} - # Allow user to change his mind -[ -z "$BSDINSTALL_SKIP_FINALCONFIG" ] && finalconfig +[ -z "$BSDINSTALL_SKIP_FINALCONFIG" ] && bsdinstall finalconfig trap error SIGINT # SIGINT is bad again bsdinstall config || error "Failed to save config" diff --git a/usr.sbin/bsdinstall/scripts/finalconfig b/usr.sbin/bsdinstall/scripts/finalconfig new file mode 100755 index 000000000000..a1c0d804754f --- /dev/null +++ b/usr.sbin/bsdinstall/scripts/finalconfig @@ -0,0 +1,81 @@ +#!/bin/sh +#- +# Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013-2018 Devin Teske +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 + +: ${BSDDIALOG_OK=0} + +while true; do + exec 5>&1 + REVISIT=$(bsddialog --backtitle "$OSNAME Installer" \ + --title "Final Configuration" --no-cancel --menu \ + "Setup of your $OSNAME system is nearly complete. You can now modify your configuration choices. After this screen, you will have an opportunity to make more complex changes using a shell." 0 0 0 \ + "Exit" "Apply configuration and exit installer" \ + "Add User" "Add a user to the system" \ + "Root Password" "Change root password" \ + "Hostname" "Set system hostname" \ + "Network" "Networking configuration" \ + "Services" "Set daemons to run on startup" \ + "System Hardening" "Set security options" \ + "Time Zone" "Set system timezone" \ + "Handbook" "Install $OSNAME Handbook (requires network)" 2>&1 1>&5) + retval=$? + exec 5>&- + + case "$REVISIT" in + "Add User") + bsdinstall adduser + ;; + "Root Password") + bsdinstall rootpass + ;; + "Hostname") + bsdinstall hostname + ;; + "Network") + bsdinstall netconfig + ;; + "Services") + bsdinstall services + ;; + "System Hardening") + bsdinstall hardening + ;; + "Time Zone") + bsdinstall time + ;; + "Handbook") + bsdinstall docsinstall + ;; + *) + break + ;; + esac +done From nobody Fri Oct 13 16:23: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 4S6Wyp0Kpvz4wSPY; Fri, 13 Oct 2023 16:23: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 4S6Wyn6rh1z3g6y; Fri, 13 Oct 2023 16:23:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697214210; 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=qOizcCX+6jKuywu9cUnbe68Tz/fGDjUow8D7Z4aS00I=; b=jrTpaedYIk5TNa6MJetzJcLbdYhHXmQ2e220K00TYEIYH/gLZhlgZPvW+GQBbAS/mvBFp/ GqU9yyVFLxqyhAL1+RrXJ+X0eabT0XQutBz/VcJ0EDQS1c99g6xGf4T9XKCXEG6I6Ow7Rf U9IsZoXQkqebdUBTRX2DpRXi1hniDBYwWe9qHt/LY1UZs7q3pNWPfY3PMr4X7DIlrx5oQe T4yIsHsDYrZJruFKIhfD+JbjDScOsgrdoWT0DD3WQULs6j1RNEmlBMeb/wDltbKxr/WDmF mJOm/3WADPf9wzdw9NmkQRTz53sv7wwHLkAbaEMINb7Q9IvpTPQZ/um7tf/eIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697214210; a=rsa-sha256; cv=none; b=YPqiRspeSgNGTeU1G7URLBgckO/vEpp87xisb8xP5jnkXxs2Z+EDFw8hZyHwUbxKDSAGlv 1BvDsXpngtOk0k0iZhJZgz+OEE7cJGVX9k9LWt7chG+PFPnawHDi0QypohnA0vKg/B3W/n /snVGVoTn6SVVFjjbkW6XK+ex+I3IUUKuOuCMmDp2rAO0ZgXNvxqGIhFTVmcmQmC6jR6KW jIvWVMGe4fFDZRLcYuOmu9lrKZ/TncRIEosoLjgoVhy/MVgnXLcl6axcRTzw4EZ+zEI6ND cHwr1JeKUDdS7jMSKO8UnPrmUx7qFKi8Yvv0i20r68SOvOtr8l9ibO/LHAwmyQ== 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=1697214210; 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=qOizcCX+6jKuywu9cUnbe68Tz/fGDjUow8D7Z4aS00I=; b=nGwJ8UE6YP3oNq8Tw18/atLvgZdPkw+0yhMnjBYVJfsH/n1UTz/T/nVKusRdYLb+B/zmBW +kodywJT7k7F5u5DFMKFjtCQhhuaTI7me025ITyd1Z5tvOqyKyeumC9dPSbhCuvC0oaOiM 3pdyC8BqZMwiMtg8/p5+eyNN9C11kWr0/PD28CMdBehu2kHjLDxfkONMY8iB1iWzmv3m23 gEm0hwfUstLSL3L0IipqBHZxtik4Pf2pJCF1gV6K8BGheJI7EBFDs8d6tvnYj0D8Kv/k8a wBCGya/x6oyaog17QJL+ciNG3odUiBaXx8c2J9h1oEJhJFcR1p2UHFnwwKUeqQ== 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 4S6Wyn5vwBzvgX; Fri, 13 Oct 2023 16:23:29 +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 39DGNTNH081563; Fri, 13 Oct 2023 16:23:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DGNTqi081560; Fri, 13 Oct 2023 16:23:29 GMT (envelope-from git) Date: Fri, 13 Oct 2023 16:23:29 GMT Message-Id: <202310131623.39DGNTqi081560@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: ac78e3e9c581 - main - bsdinstall: Add "Finish" button to finalconfig 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: ac78e3e9c581ac3b695adeec1ae312d619a1402b Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ac78e3e9c581ac3b695adeec1ae312d619a1402b commit ac78e3e9c581ac3b695adeec1ae312d619a1402b Author: Pierre Pronchery AuthorDate: 2023-10-02 18:34:48 +0000 Commit: Ed Maste CommitDate: 2023-10-13 16:23:01 +0000 bsdinstall: Add "Finish" button to finalconfig This adds a "Finish" button to the finalconfig step, replacing the previous first choice, which was to "apply configuration and exit". The new button is the default action, while the "OK" button is renamed to "Select". Also, if an unknown option is chosen, the code flow prompts the user again instead of exiting. Reviewed by: bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42047 --- usr.sbin/bsdinstall/scripts/finalconfig | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/finalconfig b/usr.sbin/bsdinstall/scripts/finalconfig index a1c0d804754f..d7c4a1569d39 100755 --- a/usr.sbin/bsdinstall/scripts/finalconfig +++ b/usr.sbin/bsdinstall/scripts/finalconfig @@ -35,9 +35,9 @@ BSDCFG_SHARE="/usr/share/bsdconfig" while true; do exec 5>&1 REVISIT=$(bsddialog --backtitle "$OSNAME Installer" \ - --title "Final Configuration" --no-cancel --menu \ + --title "Final Configuration" --ok-label "Select" \ + --cancel-label "Finish" --default-no --menu \ "Setup of your $OSNAME system is nearly complete. You can now modify your configuration choices. After this screen, you will have an opportunity to make more complex changes using a shell." 0 0 0 \ - "Exit" "Apply configuration and exit installer" \ "Add User" "Add a user to the system" \ "Root Password" "Change root password" \ "Hostname" "Set system hostname" \ @@ -49,6 +49,10 @@ while true; do retval=$? exec 5>&- + if [ $retval -ne $BSDDIALOG_OK ]; then + break + fi + case "$REVISIT" in "Add User") bsdinstall adduser @@ -74,8 +78,5 @@ while true; do "Handbook") bsdinstall docsinstall ;; - *) - break - ;; esac done From nobody Fri Oct 13 16:33: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 4S6XB90TKYz4wSvK; Fri, 13 Oct 2023 16:33: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 4S6XB875GPz3gXZ; Fri, 13 Oct 2023 16:33:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697214801; 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=aBu4c8OBpYb+aReJlbFOkJEPuMvwIf3QHNt6MTjJEgo=; b=QXi/c/oANlhfKvSx+02v30Md9pQqmuQhqRSnwF85+uXIgNiBvEjf/zE8t4swqVmB/nnwef yTZrfNSUMSmn9CCu1OForlvAsI49lNRA2+YmrOhgJosPJ3K2v2VJbgXtVmasv42zfwSBFV ZB43cwW3BfJGPjh+U88lfP9359Xm85DOyGwLZUAhNJtPDJihHfN4haAVU2OAyImkVazc0z FIzk9c4LxYlbN19xKPRvJst/57GqorfDrMM05JWI1O23A2kCE9BoylnliLEWUvQ6ffImo1 mNWZqNiJzzBDsEhBEbhSOTUSEEgNVX0q8K7Gw1AinNMeRYhfRXukZKcejYmCQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697214801; a=rsa-sha256; cv=none; b=NKg/KAGFX9fSJIgKCYl5f8v0ONIzH92zTehWM5LcLDIWNcXQIdIAvJzUxQGztBhB4f7g5g KL6/VKI4Hx9rZPswMuVWKP+sMK/bTjE0ZAOtP8zIZRN0SBQxJd5ow3c3ZR+Prjri2SO4Me J9ZUfnT4UVPXxPX6wvDH18N4bkVCt+RLeRAHmiELtZpQYyIYWFd6XOBR2/EcXYwEdHFiMS tbuT0orxfKi4VVVsnG43nXm2yOPn+aEEuQ8b8+yTqk0pqaZ9uOcHz+8ohf4uOnQF0DKYYi 37dOkunG6PjFbJL4E6SQ4xA613PIl9icAJSKEfX7mDVEFPAr/vYa731RUYmFkw== 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=1697214801; 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=aBu4c8OBpYb+aReJlbFOkJEPuMvwIf3QHNt6MTjJEgo=; b=PDmZONwuaEicNU3VwrbvFqee/5dlUGudcpPEBoYpvuW9XLl/ftUioj6OuUs1/zV0oe5oY+ 9iaQPWskosbQdzNNliN2TQ3+2SZv8Mn18qcsyu07l0lRV+ncjUysH1cBACUM4YDvOBqSnj ySQGNHW5F0Ut4wUEWav+d3hV/mnSgW/j2PJgge45kvaGH3qylXHrDtkk222HhocZHGtczA eA8oBnpBUpPaB1p8gn6TiT6ayWPvy0dXT6KJjE8oinedGccIfvBiymU+2+wkJeUMitiU9I xpAbgK66pprB44lAp7bqCk+hMeWVjl6p95lFbAG0qR3wqvjw2d7OXYHx0GsVZw== 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 4S6XB867Yxzvkt; Fri, 13 Oct 2023 16:33: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 39DGXKJM097882; Fri, 13 Oct 2023 16:33:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DGXKUX097880; Fri, 13 Oct 2023 16:33:20 GMT (envelope-from git) Date: Fri, 13 Oct 2023 16:33:20 GMT Message-Id: <202310131633.39DGXKUX097880@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: 01ab86f7e6a6 - main - bsdinstall: reset the mirror when restarting 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: 01ab86f7e6a6bf540e7c302a7f7b385f20fa4a3f Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=01ab86f7e6a6bf540e7c302a7f7b385f20fa4a3f commit 01ab86f7e6a6bf540e7c302a7f7b385f20fa4a3f Author: Pierre Pronchery AuthorDate: 2023-10-12 20:34:06 +0000 Commit: Ed Maste CommitDate: 2023-10-13 16:32:38 +0000 bsdinstall: reset the mirror when restarting It is possible to restart the installation process upon errors, when installing normally through the `auto` script, or when setting up a jail with the `jail` script. However, some values obtained interactively from the user or guessed by some scripts are kept in the environment when restarting the process; this makes it impossible to run some steps as expected after the restart. For instance, if a bad choice of mirror was made in the `mirrorselect` phase, restarting the installer remembers the choice made, and will never prompt for a different one. Rebooting is then the only easy way out of this situation. This change only affects the `jail` script for now, as otherwise there is no way to tell if the value had been specifically set by the user before starting bsdinstall. Reviewed by: bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42183 --- usr.sbin/bsdinstall/scripts/jail | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail index ab095f44ba39..feb9d8b1c097 100755 --- a/usr.sbin/bsdinstall/scripts/jail +++ b/usr.sbin/bsdinstall/scripts/jail @@ -49,6 +49,7 @@ error() { if [ $? -ne $BSDDIALOG_OK ]; then exit else + [ -z "$MIRROR_BUTTON" ] || unset BSDINSTALL_DISTSITE exec $0 $BSDINSTALL_CHROOT fi } From nobody Fri Oct 13 16:37: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 4S6XHL5w0Fz4wStd; Fri, 13 Oct 2023 16:37:50 +0000 (UTC) (envelope-from kp@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 4S6XHL5P7zz4CYM; Fri, 13 Oct 2023 16:37:50 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697215070; 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=tbq9ZTRESpmdnSz07j4FO0DVm3Ca5eBhkdvjIGPW/L8=; b=ITnoBP+yNnml/BVH4Z+fOLu7luP93Q0dx4eZcez4wr3QqozjfJKZuqRK9riEDfX1p40OYn q10H/pEszIM3sCvddZjxLGOWuWaRTW9jt8vFkubGHbxF/SgyIjL1G0BgPqv3FzRIiLNwVX BSW9WZof+/mI3Hrzh6x9xzWPlOtAo7qRVRoUNGmPHIHfY1a3JiVjD10QBDG9SNNwl7JGgz rNq0zUCu3x0Fh6znuroufUhiyqra3S3u4Z9uUcX7sUFkrwQk3X7EfTn6XFco7p5qvYWIw0 E7DI2ZTH19J44Fz3JD/XyLYb4l9NQe5QS94PpIGl8lTcCFamV4rvMyl+fmhf6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697215070; a=rsa-sha256; cv=none; b=DXWt/UIA2k5ZciS2k9yAeuQqKSQcLC8uzfgqngRnFWpYiqcPsLgMarU5SV6pNBXcmkFjlv YtWFAL0V3GP478ZnIard1Oq/2A5koW0xMXS9NKp1BbJhpeu8jmUg2nwP6KalZdJ0XASoqq woV5AbXah+BgcsRkJkB9bLO8FKuy+eLe31Jpi+QuUlLQs5hI8ZuO3bH1UEKSZKc5+gcfHp LBPWaYOBgj63AsmsZyTovHprsQqN2uyhrd66PA7OZo0uDQkZYsX+rrSRs3151vFe+0eGqs c9waYXQy0xyJWnpdVvQcvYsj6yJpUCbXLf69H15oejDJ0qFV/omGLcGlPxoiMA== 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=1697215070; 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=tbq9ZTRESpmdnSz07j4FO0DVm3Ca5eBhkdvjIGPW/L8=; b=XyGe+hV8Ago42+6M7qHqvBpNsM6TTJWjdH/SuxdTzcYUYRmMrhmD/62aFeSxQh4/n9bLUk c/uiNv8r9ihje627COtBaLmMeTsAYiKGoZ2w9JiK20vcz53Tr4wvIE+haWoxcODadzIW/O 3M4w1WgpA4bph4FeTeYOiTCFAHLiRUbiVsc5HAIDXBpSMOJXHGoxTUpCyDv/iyTcd99R3T r/0K+d8bSAs/wJqepwGVJ7OuaMvEY7mzLp/D1lYJS5rnP5PXIcG/jiJy1tR2urCw1VImx3 jdpgK3BWdXQCpSF4kNlzdf1zX4K6igYFBTxA6y22Gaxj6bTkDOc2FxslOUGhkQ== 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 4S6XHL3k2Rz1MRG; Fri, 13 Oct 2023 16:37:50 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 44CCD3DF27; Fri, 13 Oct 2023 18:37:48 +0200 (CEST) From: Kristof Provost To: "Alexander V. Chernikov" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 5f19f790b392 - main - netlink: add snl(3) support for parsing unknown-size arrays Date: Fri, 13 Oct 2023 18:37:47 +0200 X-Mailer: MailMate (1.14r5937) Message-ID: <8CFADE61-3604-4915-9AE2-F52E6C17DB6E@FreeBSD.org> In-Reply-To: <202305271114.34RBED8O007212@gitrepo.freebsd.org> References: <202305271114.34RBED8O007212@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=UTF-8 Content-Transfer-Encoding: quoted-printable On 27 May 2023, at 13:14, Alexander V. Chernikov wrote: > The branch main has been updated by melifaro: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D5f19f790b3923354871ce049= b84c7807ecb0cad5 > > commit 5f19f790b3923354871ce049b84c7807ecb0cad5 > Author: Alexander V. Chernikov > AuthorDate: 2023-05-27 11:09:01 +0000 > Commit: Alexander V. Chernikov > CommitDate: 2023-05-27 11:13:14 +0000 > > netlink: add snl(3) support for parsing unknown-size arrays > > Reviewed by: bapt > Differential Review: https://reviews.freebsd.org/D40282 > MFC after: 2 weeks > --- > static inline bool > snl_attr_get_nla(struct snl_state *ss __unused, struct nlattr *nla, > const void *arg __unused, void *target) > @@ -878,6 +959,7 @@ snl_realloc_msg_buffer(struct snl_writer *nw, size_= t sz) > memcpy(new_base, nw->base, nw->offset); > if (nw->hdr !=3D NULL) { > int hdr_off =3D (char *)(nw->hdr) - nw->base; > + > nw->hdr =3D (struct nlmsghdr *)(void *)((char *)new_base + hdr_off);= I=E2=80=99ve been working on converting a few more pf ioctls to using net= link, and ran into an odd failure once the request got big enough. My req= uests all resulted in =E2=80=9CNo buffer space available=E2=80=9D. That t= urned out to be because they were of size zero. Some more digging showed = that the struct nlmsghdr *hdr pointer returned by snl_finalize_msg() was = different from the one returned by snl_create_msg_request(). I believe the issue is that we=E2=80=99re re-allocating the header here, = but I was still using the old struct nlmsghdr *hdr in the calling functio= n. That seems to be a pattern in other netlink code as well, e.g. https://cg= it.reebsd.org/src/tree/sbin/route/route_netlink.c#n269 where we get the s= truct nlmsghdr *hdr when we create the request. We seem to be getting away with that here, because most requests are smal= l. Still, I think we should at the very least fix that so it doesn=E2=80=99= t mislead others. Ideally I think we should avoid returning pointers that will unexpectedly= be invalidated. That is, I think we shouldn=E2=80=99t allow callers to a= ccess struct snl_writer.hdr in the first place. (Also, I don=E2=80=99t immediately see where we free the old memory. Are = we leaking that or am I missing something?) Best regards, Kristof From nobody Fri Oct 13 16:48: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 4S6XXC6443z4wTYn; Fri, 13 Oct 2023 16:48: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 4S6XXC5X72z4DVq; Fri, 13 Oct 2023 16:48:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697215739; 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=8x3yJpyzF9nC8sYrX5yvI9IwJYOzg9uu2mr/ilIML9A=; b=xgeniIo1YXBbLcdOvTk2NY5lwcHWzIDzYp9gyjLbjU7Lp8+Itc481CEFcwOWsrU8CA8g3a 9I+ZZqT+z3m6Q9aymDmHeE65ewoAcA/HgWEk+1XC/5kt/Bb+UefgZTItXanbbeTG+oHVj1 3zt7ieN6lXly9wSgMjnmeEsXHzNXrzGbqbQAOIYee2hAeA1FjWYypH2wa0H6GkUip598/8 ZSjQlWNmDO3oBHiio2OdJtsiEOvug9mQCYMLYZw9nweZaKm1Wt/BmIiER3t9B6w+/fz5XK HBxomZQwHB/0L7Yp43CCm0GTetgbTQSjfzWO7prgYX9jxPHNEWzX4Q8e6XLGOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697215739; a=rsa-sha256; cv=none; b=VJO84psJqSRONrqkNdn5OKmjm9XZCRBDnq1o4ncO7EiqVtnHp5nr/7g2WqGPNzEcQoatXT f8tlw7OVSdik6Au4WP119hyGQJUu4zP8ZL0LNHSMXrRff85u2tgJyPeMZobW9cAJ3IosJ6 hAY1mEV+eCqkRkrMStfZo0M1619xi3jtqNckBAxNyAZ26hrIJHC9uO5gPaTLDXoqAYS6Jt N3JKkClxF9Da8gh1ZbCH8/HnrvM9OyqHhNnns0C7blywwqcnic+YLYcIjB+/JeStdv5u7p G4+vJxsuk0TSpQkKIAXB6dT5aPwjT05uh6RhA0zizHC3glmezzX7Z+VcySkhRQ== 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=1697215739; 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=8x3yJpyzF9nC8sYrX5yvI9IwJYOzg9uu2mr/ilIML9A=; b=Nn376hcStRVnGUgbCJHI48nh8V4PeGCplRVEmj87Z0/RPC57e026A6NGi6z8JRv1Eox51X w8ywsmBsKnTC6Xb5Y8jG8CEhDWBYr0ZVt2aKu6M+lk5WMCSN97eMnqT9OiKB8TiFNydgxG D8SdfMXjHBPw5dfe9E8BUFQovblB5PO0fl+zVrIIpuxfjkJNLYYxIayjMuEiJBFOsB5oLm pJ6e+CSK3R9471+3EJPFjNTsmHwJQU3dfGYGiztAFXziSKUqChEL90vyW+qcP4P/vPPOa6 +aWTUljmjOn/3tdfOr1qF826UUF1o5xeS3020oMqW2ufu3X3ywZF8jDJlDCkyw== 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 4S6XXC4LSPzvpC; Fri, 13 Oct 2023 16:48: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 39DGmx3U014798; Fri, 13 Oct 2023 16:48:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DGmxSS014795; Fri, 13 Oct 2023 16:48:59 GMT (envelope-from git) Date: Fri, 13 Oct 2023 16:48:59 GMT Message-Id: <202310131648.39DGmxSS014795@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: 60b37735f305 - main - bsdinstall netconfig: avoid duplicate entries in rc.conf 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: 60b37735f305e72e67695ead029e59ea29b2bc29 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=60b37735f305e72e67695ead029e59ea29b2bc29 commit 60b37735f305e72e67695ead029e59ea29b2bc29 Author: Pierre Pronchery AuthorDate: 2023-10-13 15:45:19 +0000 Commit: Ed Maste CommitDate: 2023-10-13 16:45:54 +0000 bsdinstall netconfig: avoid duplicate entries in rc.conf This uses sysrc to write and update configuration variables in the temporary configuration file for network access, ._rc.conf.net. This replaces the previous mechanism, which was simply appending new values as they were updated. PR: 212396 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42194 --- usr.sbin/bsdinstall/scripts/netconfig | 4 ++-- usr.sbin/bsdinstall/scripts/netconfig_ipv4 | 2 +- usr.sbin/bsdinstall/scripts/netconfig_ipv6 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/netconfig b/usr.sbin/bsdinstall/scripts/netconfig index 99c129ab61f5..addf5cb527d6 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig +++ b/usr.sbin/bsdinstall/scripts/netconfig @@ -81,7 +81,7 @@ exec 5>&- IFCONFIG_PREFIX="" if is_wireless_if $INTERFACE; then NEXT_WLAN_IFACE=wlan0 # XXX - echo wlans_$INTERFACE=\"$NEXT_WLAN_IFACE\" >> $BSDINSTALL_TMPETC/._rc.conf.net + sysrc -f $BSDINSTALL_TMPETC/._rc.conf.net wlans_$INTERFACE "$NEXT_WLAN_IFACE" IFCONFIG_PREFIX="WPA " if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then ifconfig $NEXT_WLAN_IFACE create wlandev $INTERFACE @@ -115,7 +115,7 @@ fi # In case wlanconfig left an option and we do not support IPv4 we need to write # it out on its own. We cannot write it out with IPv6 as that suffix. if [ ${IPV4_AVAIL} -eq 0 -a -n ${IFCONFIG_PREFIX} ]; then - echo ifconfig_${INTERFACE}=\"${IFCONFIG_PREFIX}\" >> $BSDINSTALL_TMPETC/._rc.conf.net + sysrc -f $BSDINSTALL_TMPETC/._rc.conf.net ifconfig_$INTERFACE "${IFCONFIG_PREFIX}" fi if [ ${IPV6_AVAIL} -eq 1 ]; then bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' \ diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv4 b/usr.sbin/bsdinstall/scripts/netconfig_ipv4 index 3da1803cd0d1..9097a1f9617c 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig_ipv4 +++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv4 @@ -63,7 +63,7 @@ if [ $? -eq $BSDDIALOG_OK ]; then exec $0 ${INTERFACE} "${IFCONFIG_PREFIX}" fi fi - echo ifconfig_$INTERFACE=\"${IFCONFIG_PREFIX}DHCP\" >> $BSDINSTALL_TMPETC/._rc.conf.net + sysrc -f $BSDINSTALL_TMPETC/._rc.conf.net ifconfig_$INTERFACE "${IFCONFIG_PREFIX}DHCP" exit 0 fi diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 b/usr.sbin/bsdinstall/scripts/netconfig_ipv6 index 00ef8791de4b..99ec379197fb 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 +++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv6 @@ -73,7 +73,7 @@ while : ; do continue fi fi - echo ifconfig_${INTERFACE}_ipv6=\"inet6 accept_rtadv\" >> $BSDINSTALL_TMPETC/._rc.conf.net + sysrc -f $BSDINSTALL_TMPETC/._rc.conf.net ifconfig_${INTERFACE}_ipv6 "inet6 accept_rtadv" exit 0 else break From nobody Fri Oct 13 17:22:02 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 4S6YGM1Kg9z4wXC2; Fri, 13 Oct 2023 17:22:03 +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 4S6YGM0vbpz4GlX; Fri, 13 Oct 2023 17:22:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697217723; 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=0tPAumilFkoeHaJQX5Wj2ryGu5YWR6EEbuOCwUUEn74=; b=ysTpJvjRqjKbGx5A5k1iSxAk19/dUltnSbhyIwXvwiwxy0hO12NKXGzAeGskuweG50f3HQ cRigeabAq8ImvHG7cktkdiwoVyiRpg0enym4gy7NXMxiwzzk8isQZegWnePT1aE0xtzfkq jWwEPo1xz9CIVJHuXFueU9Q2YPMi2v3nn0PZw9L4c+zif5JWl7gO1wNTYBcgucdFfw5scq 4Ehp0TNMKI076SWkXfqlrKUb8knIsdvDM+sOU+9aMEHxO0IThZr4yxPr3SNma+OR4de5mt U3ol4fduhXNP+SwtRyIl76mgC++v7jjSUZ3oRSdQyiV62H77qIL7pvAQ8UfyBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697217723; a=rsa-sha256; cv=none; b=rpO4F5lD2MIsb0iiCa6ELJqoJfhd3qyb9m5IB8WmViKfKHwQa6W3g6XJ3QNKqjuXpASfKi 3KzBcnmlMjoW5S1Pc0cpMkoohYN6SGqHieoYCvqmOPZLvcmGlPFw+VWyTY9rDmMEKglVkX 5dd0sotl1gCx5erGZtQTRKmdwCNgt7uYfmRJAAz5GpMrAMYl7W3LUO2WpMHi1gWp7E0Sg3 pmlh1Vp8eB19dyl0aTb0dxw7OE6Iw480mn2ec9u5ahoxfR73qEAf3oP1N2Q9tsWr2Szsw+ cDzJ0svSDvTRzmB5Xcb4ZhzXhcUuGorH4K/+vpvvUTPDAHcKmy/6HbZC0DiRyA== 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=1697217723; 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=0tPAumilFkoeHaJQX5Wj2ryGu5YWR6EEbuOCwUUEn74=; b=OmIn+N7ZG0H8kAQ6cPki3XtuBqeS/HzPvi2Fqdf9EYgOopaoD+ptljPSSI331BpmqDCKHi fjt9lwuHmBuZ7iZ9SN60jXHEj8acwjhgSBN4NfZhXCfdskLFbETqftj2u11n4Bfl9XjbMh 5rQqesVjZJUz3JFVrjEELa9qudFyNzPRMEIeFGlP4pR29yM1Ok6bhqMV5/8lJaEzS6BOMu AeA48LBn06qGZ+Zc3qdhzRvTMOasWJoRC+Ya5ZGzcxBxpN/ilz+bp5oT7PWHdiQ1pBKUtd g/XIGNWujezqA03UiHK9iFg6m9jU1YpTjh6mEKFXJKfYBIFXKWk7cfBFeLN6fA== 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 4S6YGL74fwzxMT; Fri, 13 Oct 2023 17:22:02 +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 39DHM2Jq077206; Fri, 13 Oct 2023 17:22:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DHM2b6077203; Fri, 13 Oct 2023 17:22:02 GMT (envelope-from git) Date: Fri, 13 Oct 2023 17:22:02 GMT Message-Id: <202310131722.39DHM2b6077203@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: c81dd8e5fe72 - main - bpf: Add IfAPI analogue for bpf_peers_present() 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: c81dd8e5fe72d0c7ec055c8621bb2da3a3627abf Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=c81dd8e5fe72d0c7ec055c8621bb2da3a3627abf commit c81dd8e5fe72d0c7ec055c8621bb2da3a3627abf Author: Justin Hibbits AuthorDate: 2023-10-04 20:56:52 +0000 Commit: Justin Hibbits CommitDate: 2023-10-13 17:12:44 +0000 bpf: Add IfAPI analogue for bpf_peers_present() An interface's bpf could feasibly not exist, in which case bpf_peers_present() would panic from a NULL pointer dereference. Solve this by adding a new IfAPI that includes a NULL check. Since this API is used in only a handful of locations, it reduces the the NULL check scope over inserting the check into bpf_peers_present(). Sponsored by: Juniper Networks, Inc. MFC after: 1 week --- sys/dev/firewire/if_fwip.c | 4 ++-- sys/dev/hyperv/netvsc/if_hn.c | 4 ++-- sys/dev/my/if_my.c | 2 +- sys/dev/usb/usb_pf.c | 4 +--- sys/net/bpf.c | 14 ++++++++++++++ sys/net/bpf.h | 1 + 6 files changed, 21 insertions(+), 8 deletions(-) diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c index 5237c555d999..b698db6c9620 100644 --- a/sys/dev/firewire/if_fwip.c +++ b/sys/dev/firewire/if_fwip.c @@ -780,7 +780,7 @@ fwip_stream_input(struct fw_xferq *xferq) * Record the sender ID for possible BPF usage. */ src = ntohl(p[1]) >> 16; - if (bpf_peers_present(if_getbpf(ifp))) { + if (bpf_peers_present_if(ifp)) { mtag = m_tag_alloc(MTAG_FIREWIRE, MTAG_FIREWIRE_SENDER_EUID, 2*sizeof(uint32_t), M_NOWAIT); @@ -880,7 +880,7 @@ fwip_unicast_input(struct fw_xfer *xfer) goto done; } - if (bpf_peers_present(if_getbpf(ifp))) { + if (bpf_peers_present_if(ifp)) { /* * Record the sender ID for possible BPF usage. */ diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c index 7d8e1914163e..f6f885873a79 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c +++ b/sys/dev/hyperv/netvsc/if_hn.c @@ -3262,7 +3262,7 @@ hn_txpkt(if_t ifp, struct hn_tx_ring *txr, struct hn_txdesc *txd) int error, send_failed = 0, has_bpf; again: - has_bpf = bpf_peers_present(if_getbpf(ifp)); + has_bpf = bpf_peers_present_if(ifp); if (has_bpf) { /* * Make sure that this txd and any aggregated txds are not @@ -5972,7 +5972,7 @@ hn_transmit(if_t ifp, struct mbuf *m) omcast = (m->m_flags & M_MCAST) != 0; if (sc->hn_xvf_flags & HN_XVFFLAG_ACCBPF) { - if (bpf_peers_present(if_getbpf(ifp))) { + if (bpf_peers_present_if(ifp)) { m_bpf = m_copypacket(m, M_NOWAIT); if (m_bpf == NULL) { /* diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c index 2bf4573d337b..631c38df9dca 100644 --- a/sys/dev/my/if_my.c +++ b/sys/dev/my/if_my.c @@ -1152,7 +1152,7 @@ my_rxeof(struct my_softc * sc) * broadcast packet, multicast packet, matches our ethernet * address or the interface is in promiscuous mode. */ - if (bpf_peers_present(if_getbpf(ifp))) { + if (bpf_peers_present_if(ifp)) { bpf_mtap_if(ifp, m); if (if_getflags(ifp) & IFF_PROMISC && (bcmp(eh->ether_dhost, if_getlladdr(sc->my_ifp), diff --git a/sys/dev/usb/usb_pf.c b/sys/dev/usb/usb_pf.c index 43e819684857..4da59419a7c6 100644 --- a/sys/dev/usb/usb_pf.c +++ b/sys/dev/usb/usb_pf.c @@ -408,9 +408,7 @@ usbpf_xfertap(struct usb_xfer *xfer, int type) bus = xfer->xroot->bus; /* sanity checks */ - if (bus->ifp == NULL || if_getbpf(bus->ifp) == NULL) - return; - if (!bpf_peers_present(if_getbpf(bus->ifp))) + if (bus->ifp == NULL || !bpf_peers_present_if(bus->ifp)) return; totlen = usbpf_xfer_precompute_size(xfer, type); diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 8ca6e941e646..96420b709911 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -2879,6 +2879,14 @@ bpfdetach(struct ifnet *ifp) BPF_UNLOCK(); } +bool +bpf_peers_present_if(struct ifnet *ifp) +{ + struct bpf_if *bp = ifp->if_bpf; + + return (bpf_peers_present(bp) > 0); +} + /* * Get a list of available data link type of the interface. */ @@ -3162,6 +3170,12 @@ bpfdetach(struct ifnet *ifp) { } +bool +bpf_peers_present_if(struct ifnet *ifp) +{ + return (false); +} + u_int bpf_filter(const struct bpf_insn *pc, u_char *p, u_int wirelen, u_int buflen) { diff --git a/sys/net/bpf.h b/sys/net/bpf.h index 924dea5fc9f4..31968445aac1 100644 --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -428,6 +428,7 @@ void bpf_mtap2_if(struct ifnet *, void *, u_int, struct mbuf *); void bpfattach(struct ifnet *, u_int, u_int); void bpfattach2(struct ifnet *, u_int, u_int, struct bpf_if **); void bpfdetach(struct ifnet *); +bool bpf_peers_present_if(struct ifnet *); #ifdef VIMAGE int bpf_get_bp_params(struct bpf_if *, u_int *, u_int *); #endif From nobody Fri Oct 13 17:24: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 4S6YKH1wHDz4wWmB; Fri, 13 Oct 2023 17:24:35 +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 4S6YKH16hzz4HHt; Fri, 13 Oct 2023 17:24:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697217875; 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=L96dLAbjP7QYdabDkTn1aci4FjB2HOTgWxseiejHrss=; b=H/PVXbrn+2Fd8qH4KZkPDaCF6eIjfiJiGTseq7xFR1TKD6vZnZ/NvtPieV+gDAKMVw70Hu dbUqEz3WGAXJz/JJtMKHvCohYdBOF3an02q42BWzaNf00tuzhF5DAsVRTrh88IjUryYFGF PqvMis1zbZcQiHLN/MJGhidQpkfl+3pk6piMsqohRNH8IjZDwTPmJY0XwM3TFcFQKMxpyR Iw/3FmYxbvg3tiyh+uZSzcXewfbiWfDdpnknEeuNthHgHfsnN/yPh6Cl+hxvjDO39qJnxE uvtSW1DEkMEHv9buvqvcJRFy4LIGOEvcN041VgO/9jr4TaslYE0EtmXNgNfncg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697217875; a=rsa-sha256; cv=none; b=AoXhrE7HsCrHaiwg8i/wEal1Rc11PJBlDW4cmZPCsgijA3BIv4XSD3Jk/nltnieEpKyqOP mb4hovlnrMT6yRdIFpjp7g/bbBbF+amA0m8lSE4OUYIrRR50YEQQ9cevyq2fWaOKm8dyhH Wzcbr1B7ngcFmF8biTPu+9QFw50Qxp753pwj5g5gk4Jg5M44cZbjw5QNkzSA3I8EayAPiO XH4qNuUYbck0dE/Mgj/8qp6VBhpkakTXJyoWm6fd0q6m4XYe+kHNpl6lmKxMjH77Ps9c3j M8CYLHToOaE75XMv++XbN73q35ilW4exg4/irU8XP3x3A4IjLTmvlBLyh7Fxuw== 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=1697217875; 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=L96dLAbjP7QYdabDkTn1aci4FjB2HOTgWxseiejHrss=; b=AV8AzhDQfkipuCMC+ZORi4PThZ2oXdVZZdyemRJG218iKCiOCFrOdPDVGyJYqfPAQp6wof tO6IyICsZ7Tnx00AOa2nkInzC0Q7ArRI6qXbkWxeC884iLw/FNez8P5SPyK18zezHFUe3H zAQdJWwjWoISVoMOtzXayBHgHQ0LA8lD3yeCQgey3MFWBvFLVTlIzZdqlfTLim4K/DNyxp H+kwAX/kml3gDujA4CatfdXs1keK309Miz+oEqtL4N9/8u+rgohIDvJNrYPkhMrhYvAsxB i48EjjCIl85e3B+wm2UPib0qaCF8ZLfB+F6DHnxqUzGKiKFUTBM5Iq3TlXbw/w== 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 4S6YKH08BHzwV7; Fri, 13 Oct 2023 17:24:35 +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 39DHOYZZ081729; Fri, 13 Oct 2023 17:24:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DHOYGC081726; Fri, 13 Oct 2023 17:24:34 GMT (envelope-from git) Date: Fri, 13 Oct 2023 17:24:34 GMT Message-Id: <202310131724.39DHOYGC081726@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: 914ab28c598c - main - tzsetup: add support for countries in two continents 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: 914ab28c598c108bcfa5c040cc3056a8e6fc3811 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=914ab28c598c108bcfa5c040cc3056a8e6fc3811 commit 914ab28c598c108bcfa5c040cc3056a8e6fc3811 Author: Pierre Pronchery AuthorDate: 2023-07-27 16:07:22 +0000 Commit: Ed Maste CommitDate: 2023-10-13 17:23:59 +0000 tzsetup: add support for countries in two continents This supports countries located across multiple continents, as per the zone1970.tab file. This only affects Cyprus and Türkiye at the moment. PR: 236874 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41306 --- usr.sbin/tzsetup/tzsetup.c | 67 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 6 deletions(-) diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c index 5dfe840528b5..4279f888a33f 100644 --- a/usr.sbin/tzsetup/tzsetup.c +++ b/usr.sbin/tzsetup/tzsetup.c @@ -276,6 +276,7 @@ struct country { char *tlc; int nzones; struct continent *override; /* continent override */ + struct continent *alternate; /* extra continent */ TAILQ_HEAD(, zone) zones; dialogMenuItem *submenu; }; @@ -374,6 +375,18 @@ find_country(int lineno, const char *tlc) return (cp); } +static void +add_cont_to_country(struct country *cp, struct continent *cont) +{ + struct zone *zp; + + TAILQ_FOREACH(zp, &cp->zones, link) { + if (zp->continent == cont) + return; + } + cp->alternate = cont; +} + static void add_zone_to_country(int lineno, struct country *cp, const char *descr, const char *file, struct continent *cont) @@ -441,13 +454,13 @@ read_zones(void) struct country *cp; size_t len; char *line, *country_list, *tlc, *file, *descr; + char *p, *q; int lineno; - bool pass1; + int pass = 1; fp = fopen(path_zonetab, "r"); if (!fp) err(1, "%s", path_zonetab); - pass1 = true; again: lineno = 0; @@ -457,7 +470,9 @@ again: errx(1, "%s:%d: invalid format", path_zonetab, lineno); line[len - 1] = '\0'; - if (pass1) { + switch (pass) + { + case 1: /* * First pass: collect overrides, only looking for * single continent ones for the moment. @@ -481,7 +496,8 @@ again: cp = find_country(lineno, tlc); cp->override = cont; } - } else { + break; + case 2: /* Second pass: parse actual data */ if (line[0] == '#') continue; @@ -498,11 +514,34 @@ again: add_zone_to_country(lineno, cp, descr, file, cont); } + break; + case 3: + /* Third pass: collect multi-continent overrides */ + if (strncmp(line, "#@", strlen("#@")) != 0) + continue; + line += 2; + country_list = strsep(&line, "\t"); + /* Skip single-continent overrides */ + if (strchr(line, ',') == NULL) + continue; + while (line != NULL) { + cont = find_continent(lineno, line); + p = q = strdup(country_list); + if (p == NULL) + errx(1, "malloc failed"); + while (q != NULL) { + tlc = strsep(&q, ","); + cp = find_country(lineno, tlc); + add_cont_to_country(cp, cont); + } + free(p); + strsep(&line, ","); + } + break; } } - if (pass1) { - pass1 = false; + if (pass++ < 3) { errno = 0; rewind(fp); if (errno != 0) @@ -555,6 +594,12 @@ make_menus(void) if (zp2 == zp) zp->continent->nitems++; } + + for (i = 0; i < NCONTINENTS; i++) { + if (cp->alternate == continent_names[i].continent) { + continent_names[i].continent->nitems++; + } + } } /* @@ -611,6 +656,16 @@ make_menus(void) dmi->fire = set_zone_menu; dmi->data = cp; } + + if (cp->alternate != NULL) { + cont = cp->alternate; + dmi = &cont->menu[cont->nitems]; + memset(dmi, 0, sizeof(*dmi)); + asprintf(&dmi->prompt, "%d", ++cont->nitems); + dmi->title = cp->name; + dmi->fire = set_zone_menu; + dmi->data = cp; + } } } From nobody Fri Oct 13 17:32: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 4S6YVT57sJz4wXhD; Fri, 13 Oct 2023 17:32:33 +0000 (UTC) (envelope-from jhibbits@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 4S6YVT4htRz4K1y; Fri, 13 Oct 2023 17:32:33 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697218353; 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: in-reply-to:in-reply-to:references:references; bh=2pmsN9ipIA9QWPuJJ3nTKWt8ZfA9d5VE6ZVzGFhdqiA=; b=wOk08CWhPubamgP/2sZlz3WcAASISWA0Qa9jh8O5g0pB56/c9Ngj5Zi0NXZcBXQR8bV2Ej wg4Asi9YS+rS4PuoYUrvYT+h0J/PNJPNGDYXIxzc7B/CCmMwTXZ63sgL1eTFflrQOWyS6L RGCyEhhE7Hnjy2Qz7iP6vYAi0SgXomGRZaOXeKmvkX3PsxlrLLvfUicROYt75bfVE/cq1A FU8y/Qy19WeWmffS3c8iVsTJnUljB02VFz1jl6ltZgDLNay8ceMSsQotHLKUKAUH+6sVph +vthgLdJgknbX6sD6IRhruNNqv2v7xle9pPtJzJU+yHAkuVhMUSqQSHEsdef+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697218353; a=rsa-sha256; cv=none; b=IYFW7fy2hx5DEgFQejy/7erKBJcCziUIs2HpWuCBjuRRtyoNcxgsYPihnal3wbNXBEC8QG d7vaYYkajULDCaOMc90wWB+se17rcjIp61iZyOz1uOAKiecUxjAIXMbDKJDNG7C/bUfsMF TC3RkR4F8KQdguOWpIKtQX/yZDNL6fHUGo3FVUNT64DkdFUTTa5yv6O8JeR6MKFrP9fMgN UrKLjC1PnxmrAMzVFkjTGW++toKPllb1ZVXBH1JU8g7DWgxYzdH0G36iJxbMIfNIg6YoeY I10m/FBjox7NxlQLZZKFq5YrGAqd4p2kfesrie8hVvQdaxCoem8YorEKeSMP/g== 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=1697218353; 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: in-reply-to:in-reply-to:references:references; bh=2pmsN9ipIA9QWPuJJ3nTKWt8ZfA9d5VE6ZVzGFhdqiA=; b=D67BQQmm6XtqHP8KdHxEoVoJNBvVXeQFZOdPT2qBe5afLNFkw40M/IMh5yqrzmffw7BeIQ wt1vQSSzBS9f5YnqhUuaiZdsf0ZeQZc6JpHQjyEVnzFF7nN+GkLJ1J4CF8Pu4fP2yFS1ou 7YQo8biK+YbcwZKcIt85WJuecoNKNXUbZ4RRmtOZErFi7hz1cBfUMcAjdGH6KreSmjCsTg Ld8pklVe+dJ6IJnBSnuvuJozIS0a5munXUDFh+IuNzFJjIz64B1nMQQKHWKU2ytxRNlTMW eV9DrPweWX7Ewk95jCHTTzhNyM/564RVzgmb21W6QhrjhBF2/Iw/PAlSoX/9fw== Received: from ralga.knownspace (ip-163-182-7-56.dynamic.fuse.net [163.182.7.56]) (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) (Client did not present a certificate) (Authenticated sender: jhibbits) by smtp.freebsd.org (Postfix) with ESMTPSA id 4S6YVT2bKrz1NXM; Fri, 13 Oct 2023 17:32:33 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Date: Fri, 13 Oct 2023 13:32:32 -0400 From: Justin Hibbits To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: c81dd8e5fe72 - main - bpf: Add IfAPI analogue for bpf_peers_present() Message-ID: <20231013133232.574134e2@ralga.knownspace> In-Reply-To: <202310131722.39DHM2b6077203@gitrepo.freebsd.org> References: <202310131722.39DHM2b6077203@gitrepo.freebsd.org> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; powerpc64le-unknown-linux-gnu) 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 On Fri, 13 Oct 2023 17:22:02 GMT Justin Hibbits wrote: > The branch main has been updated by jhibbits: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=c81dd8e5fe72d0c7ec055c8621bb2da3a3627abf > > commit c81dd8e5fe72d0c7ec055c8621bb2da3a3627abf > Author: Justin Hibbits > AuthorDate: 2023-10-04 20:56:52 +0000 > Commit: Justin Hibbits > CommitDate: 2023-10-13 17:12:44 +0000 > > bpf: Add IfAPI analogue for bpf_peers_present() > > An interface's bpf could feasibly not exist, in which case > bpf_peers_present() would panic from a NULL pointer dereference. > Solve this by adding a new IfAPI that includes a NULL check. Since > this API is used in only a handful of locations, it reduces the the > NULL check scope over inserting the check into bpf_peers_present(). > > Sponsored by: Juniper Networks, Inc. Reviewed by: zlei > MFC after: 1 week > --- > sys/dev/firewire/if_fwip.c | 4 ++-- > sys/dev/hyperv/netvsc/if_hn.c | 4 ++-- > sys/dev/my/if_my.c | 2 +- > sys/dev/usb/usb_pf.c | 4 +--- > sys/net/bpf.c | 14 ++++++++++++++ > sys/net/bpf.h | 1 + > 6 files changed, 21 insertions(+), 8 deletions(-) > > diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c > index 5237c555d999..b698db6c9620 100644 > --- a/sys/dev/firewire/if_fwip.c > +++ b/sys/dev/firewire/if_fwip.c > @@ -780,7 +780,7 @@ fwip_stream_input(struct fw_xferq *xferq) > * Record the sender ID for possible BPF usage. > */ > src = ntohl(p[1]) >> 16; > - if (bpf_peers_present(if_getbpf(ifp))) { > + if (bpf_peers_present_if(ifp)) { > mtag = m_tag_alloc(MTAG_FIREWIRE, > MTAG_FIREWIRE_SENDER_EUID, > 2*sizeof(uint32_t), M_NOWAIT); > @@ -880,7 +880,7 @@ fwip_unicast_input(struct fw_xfer *xfer) > goto done; > } > > - if (bpf_peers_present(if_getbpf(ifp))) { > + if (bpf_peers_present_if(ifp)) { > /* > * Record the sender ID for possible BPF usage. > */ > diff --git a/sys/dev/hyperv/netvsc/if_hn.c > b/sys/dev/hyperv/netvsc/if_hn.c index 7d8e1914163e..f6f885873a79 > 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c > +++ b/sys/dev/hyperv/netvsc/if_hn.c > @@ -3262,7 +3262,7 @@ hn_txpkt(if_t ifp, struct hn_tx_ring *txr, > struct hn_txdesc *txd) int error, send_failed = 0, has_bpf; > > again: > - has_bpf = bpf_peers_present(if_getbpf(ifp)); > + has_bpf = bpf_peers_present_if(ifp); > if (has_bpf) { > /* > * Make sure that this txd and any aggregated txds > are not @@ -5972,7 +5972,7 @@ hn_transmit(if_t ifp, struct mbuf *m) > omcast = (m->m_flags & M_MCAST) != 0; > > if (sc->hn_xvf_flags & HN_XVFFLAG_ACCBPF) { > - if > (bpf_peers_present(if_getbpf(ifp))) { > + if (bpf_peers_present_if(ifp)) { > m_bpf = m_copypacket(m, > M_NOWAIT); if (m_bpf == NULL) { > /* > diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c > index 2bf4573d337b..631c38df9dca 100644 > --- a/sys/dev/my/if_my.c > +++ b/sys/dev/my/if_my.c > @@ -1152,7 +1152,7 @@ my_rxeof(struct my_softc * sc) > * broadcast packet, multicast packet, matches our > ethernet > * address or the interface is in promiscuous mode. > */ > - if (bpf_peers_present(if_getbpf(ifp))) { > + if (bpf_peers_present_if(ifp)) { > bpf_mtap_if(ifp, m); > if (if_getflags(ifp) & IFF_PROMISC && > (bcmp(eh->ether_dhost, > if_getlladdr(sc->my_ifp), diff --git a/sys/dev/usb/usb_pf.c > b/sys/dev/usb/usb_pf.c index 43e819684857..4da59419a7c6 100644 > --- a/sys/dev/usb/usb_pf.c > +++ b/sys/dev/usb/usb_pf.c > @@ -408,9 +408,7 @@ usbpf_xfertap(struct usb_xfer *xfer, int type) > bus = xfer->xroot->bus; > > /* sanity checks */ > - if (bus->ifp == NULL || if_getbpf(bus->ifp) == NULL) > - return; > - if (!bpf_peers_present(if_getbpf(bus->ifp))) > + if (bus->ifp == NULL || !bpf_peers_present_if(bus->ifp)) > return; > > totlen = usbpf_xfer_precompute_size(xfer, type); > diff --git a/sys/net/bpf.c b/sys/net/bpf.c > index 8ca6e941e646..96420b709911 100644 > --- a/sys/net/bpf.c > +++ b/sys/net/bpf.c > @@ -2879,6 +2879,14 @@ bpfdetach(struct ifnet *ifp) > BPF_UNLOCK(); > } > > +bool > +bpf_peers_present_if(struct ifnet *ifp) > +{ > + struct bpf_if *bp = ifp->if_bpf; > + > + return (bpf_peers_present(bp) > 0); > +} > + > /* > * Get a list of available data link type of the interface. > */ > @@ -3162,6 +3170,12 @@ bpfdetach(struct ifnet *ifp) > { > } > > +bool > +bpf_peers_present_if(struct ifnet *ifp) > +{ > + return (false); > +} > + > u_int > bpf_filter(const struct bpf_insn *pc, u_char *p, u_int wirelen, > u_int buflen) { > diff --git a/sys/net/bpf.h b/sys/net/bpf.h > index 924dea5fc9f4..31968445aac1 100644 > --- a/sys/net/bpf.h > +++ b/sys/net/bpf.h > @@ -428,6 +428,7 @@ void bpf_mtap2_if(struct ifnet *, void *, > u_int, struct mbuf *); void bpfattach(struct ifnet *, u_int, > u_int); void bpfattach2(struct ifnet *, u_int, u_int, struct > bpf_if **); void bpfdetach(struct ifnet *); > +bool bpf_peers_present_if(struct ifnet *); > #ifdef VIMAGE > int bpf_get_bp_params(struct bpf_if *, u_int *, u_int *); > #endif From nobody Fri Oct 13 18:13: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 4S6ZQS5xQMz4wb5W; Fri, 13 Oct 2023 18:14:08 +0000 (UTC) (envelope-from zlei@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 4S6ZQS5Ppzz4Q7N; Fri, 13 Oct 2023 18:14:08 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697220848; 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=jItv3mzLQNyeJtDZmmUQbVhZmTd1JFz/iSKvzxJNstk=; b=R+ZNxpLu0/O/8/oFmovBgPUEFxlRlkibwFAeupMPllvkH35WIetPWQtgEHadTOACWnBrBA qfbDu5YYJV5idhchcTKMixhljE39PcpUi68MNREk+HOUTIqlMekyA1hJcit0xc9biCHC0/ fAv3VKuw0zqww/hyQuBvLZqUqxKspUg/81DZsZwU/1ObGJp/GFRSDhgyIYFKITW6XLh+9A FZP4ITuRtR156PxHRQSMaJ9VYcMZfoP4GypOr/eTgHUoKI5D+2rIGNIz5He4xWeTTbML7t KoLtk1KYGu0dTjlciFzcUCd+i3ENsimEBCWa3h4aM/EnoWw2YAB1ENmlI4+s2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697220848; a=rsa-sha256; cv=none; b=ZJv07FYmOTmZuDI5CAJLdgyfQdFci5NeT/117TMXzwMufg2CB2RLhBUYE+wisykNkm2fq1 6fEnSP+qq7u63RNLpNiMHaYRnisDTfb+aVYpBHEbGGCzA2kbwtzUeirqW8dedBWTnAYMEU XDmQVw4YMDEg7oys+CT1GkBHoPwCeD1vWgvyrDYxToUz2+66NZcuyOCjwb0TLZlb4aBma1 kj5Ab00KFHh4M1FPuHT0b9eJCC75a9je5D9cEKrOxe7pOsFIZ5iNqFmQsiLR/1HTYFW7Gq qNfCKzCCcfc5M7eI7sFVQ4F/QUR1GuZA+UZP4gfqxzAhztQYRZu5MIy3HZjdZw== 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=1697220848; 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=jItv3mzLQNyeJtDZmmUQbVhZmTd1JFz/iSKvzxJNstk=; b=iTPTNjM0+w6nLMYzrfYZequ8mjpgVDOeWJrTZ9UvJgTGHy5/KqS4LYx/cJ9zkg/QwZzd0m 5IqWRVmyXu/ROsHM2irLvz/dZoGY67gRq9a/P880jSu/LLDc1P/jCVjdY0rF+hS1003pFu K3aLgTj48FcuAanbJKPJpDzjiYxzjjHeuKl1mieHq0OdBinfeP6eq8lvJfmr/2aa3UyaJ+ KWE/n64Rz3ME8Aqm/fhrHCnXnS9VlpELp9NjlmlOsY4MeDAM1nnEBApTnqqs4ea8cNYaid WqHQ6bsRhffvNNSAaN2Zon6CIMEpdVQSPt/OarKpD23N/OulD8yzTBfi4gvLrw== Received: from smtpclient.apple (unknown [IPv6:2001:19f0:6001:9db:98f0:9fe0:3545:10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4S6ZQR104pz1NM9; Fri, 13 Oct 2023 18:14:06 +0000 (UTC) (envelope-from zlei@FreeBSD.org) 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 \(3696.120.41.1.4\)) Subject: Re: git: c81dd8e5fe72 - main - bpf: Add IfAPI analogue for bpf_peers_present() From: Zhenlei Huang In-Reply-To: <202310131722.39DHM2b6077203@gitrepo.freebsd.org> Date: Sat, 14 Oct 2023 02:13:57 +0800 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: <202310131722.39DHM2b6077203@gitrepo.freebsd.org> To: Justin Hibbits X-Mailer: Apple Mail (2.3696.120.41.1.4) > On Oct 14, 2023, at 1:22 AM, Justin Hibbits = wrote: >=20 > The branch main has been updated by jhibbits: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc81dd8e5fe72d0c7ec055c8621bb2da3= a3627abf >=20 > commit c81dd8e5fe72d0c7ec055c8621bb2da3a3627abf > Author: Justin Hibbits > AuthorDate: 2023-10-04 20:56:52 +0000 > Commit: Justin Hibbits > CommitDate: 2023-10-13 17:12:44 +0000 >=20 > bpf: Add IfAPI analogue for bpf_peers_present() >=20 > An interface's bpf could feasibly not exist, in which case > bpf_peers_present() would panic from a NULL pointer dereference. = Solve > this by adding a new IfAPI that includes a NULL check. Since this = API The initial version DOES have NULL check. But that is redundant and = removed from the committed version. > is used in only a handful of locations, it reduces the the NULL = check > scope over inserting the check into bpf_peers_present(). >=20 > Sponsored by: Juniper Networks, Inc. > MFC after: 1 week > --- > sys/dev/firewire/if_fwip.c | 4 ++-- > sys/dev/hyperv/netvsc/if_hn.c | 4 ++-- > sys/dev/my/if_my.c | 2 +- > sys/dev/usb/usb_pf.c | 4 +--- > sys/net/bpf.c | 14 ++++++++++++++ > sys/net/bpf.h | 1 + > 6 files changed, 21 insertions(+), 8 deletions(-) >=20 > diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c > index 5237c555d999..b698db6c9620 100644 > --- a/sys/dev/firewire/if_fwip.c > +++ b/sys/dev/firewire/if_fwip.c > @@ -780,7 +780,7 @@ fwip_stream_input(struct fw_xferq *xferq) > * Record the sender ID for possible BPF usage. > */ > src =3D ntohl(p[1]) >> 16; > - if (bpf_peers_present(if_getbpf(ifp))) { > + if (bpf_peers_present_if(ifp)) { > mtag =3D m_tag_alloc(MTAG_FIREWIRE, > MTAG_FIREWIRE_SENDER_EUID, > 2*sizeof(uint32_t), M_NOWAIT); > @@ -880,7 +880,7 @@ fwip_unicast_input(struct fw_xfer *xfer) > goto done; > } >=20 > - if (bpf_peers_present(if_getbpf(ifp))) { > + if (bpf_peers_present_if(ifp)) { > /* > * Record the sender ID for possible BPF usage. > */ > diff --git a/sys/dev/hyperv/netvsc/if_hn.c = b/sys/dev/hyperv/netvsc/if_hn.c > index 7d8e1914163e..f6f885873a79 100644 > --- a/sys/dev/hyperv/netvsc/if_hn.c > +++ b/sys/dev/hyperv/netvsc/if_hn.c > @@ -3262,7 +3262,7 @@ hn_txpkt(if_t ifp, struct hn_tx_ring *txr, = struct hn_txdesc *txd) > int error, send_failed =3D 0, has_bpf; >=20 > again: > - has_bpf =3D bpf_peers_present(if_getbpf(ifp)); > + has_bpf =3D bpf_peers_present_if(ifp); > if (has_bpf) { > /* > * Make sure that this txd and any aggregated txds are = not > @@ -5972,7 +5972,7 @@ hn_transmit(if_t ifp, struct mbuf *m) > omcast =3D (m->m_flags & M_MCAST) !=3D 0; >=20 > if (sc->hn_xvf_flags & HN_XVFFLAG_ACCBPF) { > - if (bpf_peers_present(if_getbpf(ifp))) { > + if (bpf_peers_present_if(ifp)) { > m_bpf =3D m_copypacket(m, = M_NOWAIT); > if (m_bpf =3D=3D NULL) { > /* > diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c > index 2bf4573d337b..631c38df9dca 100644 > --- a/sys/dev/my/if_my.c > +++ b/sys/dev/my/if_my.c > @@ -1152,7 +1152,7 @@ my_rxeof(struct my_softc * sc) > * broadcast packet, multicast packet, matches our = ethernet > * address or the interface is in promiscuous mode. > */ > - if (bpf_peers_present(if_getbpf(ifp))) { > + if (bpf_peers_present_if(ifp)) { > bpf_mtap_if(ifp, m); > if (if_getflags(ifp) & IFF_PROMISC && > (bcmp(eh->ether_dhost, = if_getlladdr(sc->my_ifp), > diff --git a/sys/dev/usb/usb_pf.c b/sys/dev/usb/usb_pf.c > index 43e819684857..4da59419a7c6 100644 > --- a/sys/dev/usb/usb_pf.c > +++ b/sys/dev/usb/usb_pf.c > @@ -408,9 +408,7 @@ usbpf_xfertap(struct usb_xfer *xfer, int type) > bus =3D xfer->xroot->bus; >=20 > /* sanity checks */ > - if (bus->ifp =3D=3D NULL || if_getbpf(bus->ifp) =3D=3D NULL) > - return; > - if (!bpf_peers_present(if_getbpf(bus->ifp))) > + if (bus->ifp =3D=3D NULL || !bpf_peers_present_if(bus->ifp)) > return; >=20 > totlen =3D usbpf_xfer_precompute_size(xfer, type); > diff --git a/sys/net/bpf.c b/sys/net/bpf.c > index 8ca6e941e646..96420b709911 100644 > --- a/sys/net/bpf.c > +++ b/sys/net/bpf.c > @@ -2879,6 +2879,14 @@ bpfdetach(struct ifnet *ifp) > BPF_UNLOCK(); > } >=20 > +bool > +bpf_peers_present_if(struct ifnet *ifp) > +{ > + struct bpf_if *bp =3D ifp->if_bpf; > + > + return (bpf_peers_present(bp) > 0); > +} > + > /* > * Get a list of available data link type of the interface. > */ > @@ -3162,6 +3170,12 @@ bpfdetach(struct ifnet *ifp) > { > } >=20 > +bool > +bpf_peers_present_if(struct ifnet *ifp) > +{ > + return (false); > +} > + > u_int > bpf_filter(const struct bpf_insn *pc, u_char *p, u_int wirelen, u_int = buflen) > { > diff --git a/sys/net/bpf.h b/sys/net/bpf.h > index 924dea5fc9f4..31968445aac1 100644 > --- a/sys/net/bpf.h > +++ b/sys/net/bpf.h > @@ -428,6 +428,7 @@ void bpf_mtap2_if(struct ifnet *, void *, = u_int, struct mbuf *); > void bpfattach(struct ifnet *, u_int, u_int); > void bpfattach2(struct ifnet *, u_int, u_int, struct bpf_if **); > void bpfdetach(struct ifnet *); > +bool bpf_peers_present_if(struct ifnet *); > #ifdef VIMAGE > int bpf_get_bp_params(struct bpf_if *, u_int *, u_int *); > #endif From nobody Fri Oct 13 18:17:35 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 4S6ZVb5zCKz4wbVl; Fri, 13 Oct 2023 18:17:43 +0000 (UTC) (envelope-from zlei@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 4S6ZVb5njRz4QPV; Fri, 13 Oct 2023 18:17:43 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697221063; 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=Nwqi8VJNsnrbKBjpfqDYzG1tSE6LDEilXFNRMkCSF68=; b=lcSo3fezT5OLLycSbJt8SpyYPT4z615ehPgJFn4kHfdsta5O8Gs8QlA5/W0cje/npg+MQH CJ/t49GNfsQkP+YKgqldhNaMcqpvXHfCpCua1dfnH5o29alp1Z6Pq1XeD2mPXqMHMtd9JG 8veNqXsCql4fTIK3ZrScjnR4DixmVCYkiFupQRrAI5JbZGSrftHAe0IkCjcMfXlodJjdEi nB5vVGi8FBT1lddWvLKajpKhfbn8sqrTSQc3mYfGz5EJUSf1eRchH/xC5r3zQnYWE9w2Ro 0yIsFx2qqKOC6zW2d4UCUacRkS9KJpNTP9IDBO6PmYNdBOd8/Zypvs4adVV8AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697221063; a=rsa-sha256; cv=none; b=EfP9r3W1919LR30oriumoBOsB/yQNSwx3P8/ZccYnxORR59jntXq6fFBP03l1NY9So/1q8 Pcn/UZR8RwCthAlhpv5NjdDKh9PhFWTWLDqzbp/xizyMle3g8WZ2xZ4SXSeaaybNtgD1Y9 VIb8OaBrOfxcgSotdVKaNxu4Fq1Xhl/oCXzZhqBgpeNioTCiNkIOq3ukK98VNowPs+2adp VFGTzt6xzCmn+mc2dc6JUeND6eMKoY+3B2tB/lX92FawZHvf3NVevH36w1vk3Ikq3Jz/bd /yinfm7am3rIBZ9EHL+m4rBLFO8zasTGrYUM7aVUMYKx9SEanHdxkcI/uVa1ZQ== 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=1697221063; 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=Nwqi8VJNsnrbKBjpfqDYzG1tSE6LDEilXFNRMkCSF68=; b=ntjvMO5utURSvVsnFrlCVCxyrxGPpB37p2z4xcW6URv3EajtMx4BU+uh9867QTYOp1Y24o aZJO+UW9hrL7p3YSOh2oQ5UY9i+UeFEH3lmO6RT4ei5COZI9GYjyJnONT8C/lTvsDGFlNt FzdMlKaSXkWUr4RbgAG4yO0oyKEzq8s24+2Pj7JV2oMNSJryZ2GUy63+89DMp/gZHtulwQ BEiIPXyr3qbCFTJOf531HNSgKH67YaXxLkcq04mr8GRrdFE5x4TNHGUUhtXH+jEH+9Nws5 m/iby/NhmqgsNr0abPbwzmwjMKMGgrBDnI2Q9HAMGS+D4UG3NanMV2XcDmc+kg== Received: from smtpclient.apple (ns1.oxydns.net [45.32.91.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4S6ZVY6xXtz1NXq; Fri, 13 Oct 2023 18:17:41 +0000 (UTC) (envelope-from zlei@FreeBSD.org) From: Zhenlei Huang Message-Id: <7C71BC94-FEBF-49C9-90B3-FA326BB75EA8@FreeBSD.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_FB5A6B15-3D1D-44D2-8F02-E792D8D70297" 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 \(3696.120.41.1.4\)) Subject: Re: git: c81dd8e5fe72 - main - bpf: Add IfAPI analogue for bpf_peers_present() Date: Sat, 14 Oct 2023 02:17:35 +0800 In-Reply-To: Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: Justin Hibbits References: <202310131722.39DHM2b6077203@gitrepo.freebsd.org> X-Mailer: Apple Mail (2.3696.120.41.1.4) --Apple-Mail=_FB5A6B15-3D1D-44D2-8F02-E792D8D70297 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Oct 14, 2023, at 2:13 AM, Zhenlei Huang wrote: >=20 >=20 >=20 >> On Oct 14, 2023, at 1:22 AM, Justin Hibbits = wrote: >>=20 >> The branch main has been updated by jhibbits: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc81dd8e5fe72d0c7ec055c8621bb2da3= a3627abf >>=20 >> commit c81dd8e5fe72d0c7ec055c8621bb2da3a3627abf >> Author: Justin Hibbits >> AuthorDate: 2023-10-04 20:56:52 +0000 >> Commit: Justin Hibbits >> CommitDate: 2023-10-13 17:12:44 +0000 >>=20 >> bpf: Add IfAPI analogue for bpf_peers_present() >>=20 >> An interface's bpf could feasibly not exist, in which case >> bpf_peers_present() would panic from a NULL pointer dereference. = Solve >> this by adding a new IfAPI that includes a NULL check. Since this = API >=20 > The initial version DOES have NULL check. But that is redundant and = removed > from the committed version. See https://reviews.freebsd.org/D42082 = . >=20 >> is used in only a handful of locations, it reduces the the NULL = check >> scope over inserting the check into bpf_peers_present(). >>=20 >> Sponsored by: Juniper Networks, Inc. >> MFC after: 1 week >> --- >> sys/dev/firewire/if_fwip.c | 4 ++-- >> sys/dev/hyperv/netvsc/if_hn.c | 4 ++-- >> sys/dev/my/if_my.c | 2 +- >> sys/dev/usb/usb_pf.c | 4 +--- >> sys/net/bpf.c | 14 ++++++++++++++ >> sys/net/bpf.h | 1 + >> 6 files changed, 21 insertions(+), 8 deletions(-) >>=20 >> diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c >> index 5237c555d999..b698db6c9620 100644 >> --- a/sys/dev/firewire/if_fwip.c >> +++ b/sys/dev/firewire/if_fwip.c >> @@ -780,7 +780,7 @@ fwip_stream_input(struct fw_xferq *xferq) >> * Record the sender ID for possible BPF usage. >> */ >> src =3D ntohl(p[1]) >> 16; >> - if (bpf_peers_present(if_getbpf(ifp))) { >> + if (bpf_peers_present_if(ifp)) { >> mtag =3D m_tag_alloc(MTAG_FIREWIRE, >> MTAG_FIREWIRE_SENDER_EUID, >> 2*sizeof(uint32_t), M_NOWAIT); >> @@ -880,7 +880,7 @@ fwip_unicast_input(struct fw_xfer *xfer) >> goto done; >> } >>=20 >> - if (bpf_peers_present(if_getbpf(ifp))) { >> + if (bpf_peers_present_if(ifp)) { >> /* >> * Record the sender ID for possible BPF usage. >> */ >> diff --git a/sys/dev/hyperv/netvsc/if_hn.c = b/sys/dev/hyperv/netvsc/if_hn.c >> index 7d8e1914163e..f6f885873a79 100644 >> --- a/sys/dev/hyperv/netvsc/if_hn.c >> +++ b/sys/dev/hyperv/netvsc/if_hn.c >> @@ -3262,7 +3262,7 @@ hn_txpkt(if_t ifp, struct hn_tx_ring *txr, = struct hn_txdesc *txd) >> int error, send_failed =3D 0, has_bpf; >>=20 >> again: >> - has_bpf =3D bpf_peers_present(if_getbpf(ifp)); >> + has_bpf =3D bpf_peers_present_if(ifp); >> if (has_bpf) { >> /* >> * Make sure that this txd and any aggregated txds are = not >> @@ -5972,7 +5972,7 @@ hn_transmit(if_t ifp, struct mbuf *m) >> omcast =3D (m->m_flags & M_MCAST) !=3D 0; >>=20 >> if (sc->hn_xvf_flags & HN_XVFFLAG_ACCBPF) { >> - if (bpf_peers_present(if_getbpf(ifp))) { >> + if (bpf_peers_present_if(ifp)) { >> m_bpf =3D m_copypacket(m, = M_NOWAIT); >> if (m_bpf =3D=3D NULL) { >> /* >> diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c >> index 2bf4573d337b..631c38df9dca 100644 >> --- a/sys/dev/my/if_my.c >> +++ b/sys/dev/my/if_my.c >> @@ -1152,7 +1152,7 @@ my_rxeof(struct my_softc * sc) >> * broadcast packet, multicast packet, matches our = ethernet >> * address or the interface is in promiscuous mode. >> */ >> - if (bpf_peers_present(if_getbpf(ifp))) { >> + if (bpf_peers_present_if(ifp)) { >> bpf_mtap_if(ifp, m); >> if (if_getflags(ifp) & IFF_PROMISC && >> (bcmp(eh->ether_dhost, = if_getlladdr(sc->my_ifp), >> diff --git a/sys/dev/usb/usb_pf.c b/sys/dev/usb/usb_pf.c >> index 43e819684857..4da59419a7c6 100644 >> --- a/sys/dev/usb/usb_pf.c >> +++ b/sys/dev/usb/usb_pf.c >> @@ -408,9 +408,7 @@ usbpf_xfertap(struct usb_xfer *xfer, int type) >> bus =3D xfer->xroot->bus; >>=20 >> /* sanity checks */ >> - if (bus->ifp =3D=3D NULL || if_getbpf(bus->ifp) =3D=3D NULL) >> - return; >> - if (!bpf_peers_present(if_getbpf(bus->ifp))) >> + if (bus->ifp =3D=3D NULL || !bpf_peers_present_if(bus->ifp)) >> return; >>=20 >> totlen =3D usbpf_xfer_precompute_size(xfer, type); >> diff --git a/sys/net/bpf.c b/sys/net/bpf.c >> index 8ca6e941e646..96420b709911 100644 >> --- a/sys/net/bpf.c >> +++ b/sys/net/bpf.c >> @@ -2879,6 +2879,14 @@ bpfdetach(struct ifnet *ifp) >> BPF_UNLOCK(); >> } >>=20 >> +bool >> +bpf_peers_present_if(struct ifnet *ifp) >> +{ >> + struct bpf_if *bp =3D ifp->if_bpf; >> + >> + return (bpf_peers_present(bp) > 0); >> +} >> + >> /* >> * Get a list of available data link type of the interface. >> */ >> @@ -3162,6 +3170,12 @@ bpfdetach(struct ifnet *ifp) >> { >> } >>=20 >> +bool >> +bpf_peers_present_if(struct ifnet *ifp) >> +{ >> + return (false); >> +} >> + >> u_int >> bpf_filter(const struct bpf_insn *pc, u_char *p, u_int wirelen, u_int = buflen) >> { >> diff --git a/sys/net/bpf.h b/sys/net/bpf.h >> index 924dea5fc9f4..31968445aac1 100644 >> --- a/sys/net/bpf.h >> +++ b/sys/net/bpf.h >> @@ -428,6 +428,7 @@ void bpf_mtap2_if(struct ifnet *, void *, = u_int, struct mbuf *); >> void bpfattach(struct ifnet *, u_int, u_int); >> void bpfattach2(struct ifnet *, u_int, u_int, struct bpf_if **); >> void bpfdetach(struct ifnet *); >> +bool bpf_peers_present_if(struct ifnet *); >> #ifdef VIMAGE >> int bpf_get_bp_params(struct bpf_if *, u_int *, u_int *); >> #endif Best regards, Zhenlei --Apple-Mail=_FB5A6B15-3D1D-44D2-8F02-E792D8D70297 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On Oct 14, 2023, at 2:13 AM, Zhenlei Huang <zlei@FreeBSD.org> = wrote:



On Oct 14, 2023, at 1:22 AM, Justin = Hibbits <jhibbits@freebsd.org> wrote:

The branch main has been updated by jhibbits:
URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc81dd8e5fe72d0c7ec055= c8621bb2da3a3627abf

commit = c81dd8e5fe72d0c7ec055c8621bb2da3a3627abf
Author: =     Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: = 2023-10-04 20:56:52 +0000
Commit: =     Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: = 2023-10-13 17:12:44 +0000

  bpf: = Add IfAPI analogue for bpf_peers_present()

  An interface's bpf could feasibly not exist, in = which case
  bpf_peers_present() would panic = from a NULL pointer dereference.  Solve
  this by adding a new IfAPI that includes a NULL = check.  Since this API

The initial = version DOES have NULL check. But that is redundant and = removed
from the = committed version.



  is used in only a handful of locations, it = reduces the the NULL check
  scope over = inserting the check into bpf_peers_present().

  Sponsored by:   Juniper Networks, = Inc.
  MFC after: =      1 week
---
sys/dev/firewire/if_fwip.c    |  4 = ++--
sys/dev/hyperv/netvsc/if_hn.c |  4 ++--
sys/dev/my/if_my.c =            | =  2 +-
sys/dev/usb/usb_pf.c =          |  4 +---
sys/net/bpf.c =             &n= bsp;   | 14 ++++++++++++++
sys/net/bpf.h =             &n= bsp;   |  1 +
6 files changed, 21 = insertions(+), 8 deletions(-)

diff --git = a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c
index 5237c555d999..b698db6c9620 100644
--- = a/sys/dev/firewire/if_fwip.c
+++ = b/sys/dev/firewire/if_fwip.c
@@ -780,7 +780,7 @@ = fwip_stream_input(struct fw_xferq *xferq)
 * Record the sender ID for = possible BPF usage.
 */
src =3D = ntohl(p[1]) >> 16;
- if = (bpf_peers_present(if_getbpf(ifp))) {
+ if = (bpf_peers_present_if(ifp)) {
mtag =3D = m_tag_alloc(MTAG_FIREWIRE,
    MTAG_FIREWI= RE_SENDER_EUID,
    2*sizeof(ui= nt32_t), M_NOWAIT);
@@ -880,7 +880,7 @@ = fwip_unicast_input(struct fw_xfer *xfer)
goto = done;
}

- if = (bpf_peers_present(if_getbpf(ifp))) {
+ if = (bpf_peers_present_if(ifp)) {
/*
 * Record the sender ID for = possible BPF usage.
 */
diff --git = a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c
index 7d8e1914163e..f6f885873a79 100644
--- = a/sys/dev/hyperv/netvsc/if_hn.c
+++ = b/sys/dev/hyperv/netvsc/if_hn.c
@@ -3262,7 +3262,7 @@ = hn_txpkt(if_t ifp, struct hn_tx_ring *txr, struct hn_txdesc *txd)
= int error, send_failed =3D 0, has_bpf;

again:
- has_bpf =3D = bpf_peers_present(if_getbpf(ifp));
+ has_bpf =3D= bpf_peers_present_if(ifp);
if (has_bpf) {
/*
= =  * Make sure = that this txd and any aggregated txds are not
@@ -5972,7 = +5972,7 @@ hn_transmit(if_t ifp, struct mbuf *m)
omcast =3D = (m->m_flags & M_MCAST) !=3D 0;

if = (sc->hn_xvf_flags & HN_XVFFLAG_ACCBPF) {
- if = (bpf_peers_present(if_getbpf(ifp))) {
+ if = (bpf_peers_present_if(ifp)) {
m_bpf =3D m_copypacket(m, = M_NOWAIT);
if (m_bpf =3D=3D NULL) {
= = = = = = /*
diff --git a/sys/dev/my/if_my.c = b/sys/dev/my/if_my.c
index 2bf4573d337b..631c38df9dca = 100644
--- a/sys/dev/my/if_my.c
+++ = b/sys/dev/my/if_my.c
@@ -1152,7 +1152,7 @@ my_rxeof(struct = my_softc * sc)
 * broadcast packet, = multicast packet, matches our ethernet
 * address or the interface = is in promiscuous mode.
 */
- if = (bpf_peers_present(if_getbpf(ifp))) {
+ if = (bpf_peers_present_if(ifp)) {
bpf_mtap_if(ifp, m);
= = = if (if_getflags(ifp) & IFF_PROMISC &&
= = =     (bcmp(eh-&g= t;ether_dhost, if_getlladdr(sc->my_ifp),
diff --git = a/sys/dev/usb/usb_pf.c b/sys/dev/usb/usb_pf.c
index = 43e819684857..4da59419a7c6 100644
--- = a/sys/dev/usb/usb_pf.c
+++ b/sys/dev/usb/usb_pf.c
@@ -408,9 +408,7 @@ usbpf_xfertap(struct usb_xfer *xfer, int = type)
bus =3D xfer->xroot->bus;

= /* sanity checks */
- if (bus->ifp =3D=3D NULL || = if_getbpf(bus->ifp) =3D=3D NULL)
- = return;
- if = (!bpf_peers_present(if_getbpf(bus->ifp)))
+ if = (bus->ifp =3D=3D NULL || !bpf_peers_present_if(bus->ifp))
= = return;

totlen =3D = usbpf_xfer_precompute_size(xfer, type);
diff --git = a/sys/net/bpf.c b/sys/net/bpf.c
index = 8ca6e941e646..96420b709911 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -2879,6 +2879,14 @@ = bpfdetach(struct ifnet *ifp)
BPF_UNLOCK();
}

+bool
+bpf_peers_present_if(struct= ifnet *ifp)
+{
+ struct = bpf_if *bp =3D ifp->if_bpf;
+
+ return = (bpf_peers_present(bp) > 0);
+}
+
/*
* Get a list of available data link type of = the interface.
*/
@@ -3162,6 +3170,12 @@ = bpfdetach(struct ifnet *ifp)
{
}

+bool
+bpf_peers_present_if(struct= ifnet *ifp)
+{
+ return = (false);
+}
+
u_int
bpf_filter(const struct bpf_insn *pc, u_char *p, u_int = wirelen, u_int buflen)
{
diff --git = a/sys/net/bpf.h b/sys/net/bpf.h
index = 924dea5fc9f4..31968445aac1 100644
--- a/sys/net/bpf.h
+++ b/sys/net/bpf.h
@@ -428,6 +428,7 @@ = void =  bpf_mtap2_if(struct ifnet = *, void *, u_int, struct mbuf *);
void  bpfattach(struct ifnet *, = u_int, u_int);
void  bpfattach2(struct ifnet *, = u_int, u_int, struct bpf_if **);
void  bpfdetach(struct ifnet = *);
+bool  bpf_peers_present_if(struct = ifnet *);
#ifdef VIMAGE
int  bpf_get_bp_params(struct = bpf_if *, u_int *, u_int *);
#endif

Best regards,
Zhenlei

= --Apple-Mail=_FB5A6B15-3D1D-44D2-8F02-E792D8D70297-- From nobody Fri Oct 13 18:27:33 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 4S6Zjy1T6Bz4wbZ6; Fri, 13 Oct 2023 18:27:34 +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 4S6Zjy0wwFz4RNN; Fri, 13 Oct 2023 18:27:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697221654; 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=Ts9qm/6xeI9spNVAjewEs2BKOqCbJM727jqGKnFuuGc=; b=hKnITVjanAvWYljc7fQAEyxPruhTJgQwRB94olKRwN1+MofNMk8TSG9J266XAl831NkYTS Bz2lxs+SRUZ9P9o86KitrcmRVeaxPnsNKx6maGA8ZDBJrK5zR+GxZZ6tU/xZa70jbdwfnH NBFUvW9B3Q5/5E/c/jVQCJuwnwgTk8ZuNNiab1hc6kIOqO+H6sZiA/lkPN02rqrcveNX1N jeyUCZ+MX5u2sQZO/TvdS9q8i9931FVUwl02LhKG7xKwQdwV8WfiB0TyvUbmVdKgXitIfd LkFZTnfgLdiT0+A012KzNWX/XVs5UDMVJkBdCppQzYqfiqOmt3wVmtFF07KiBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697221654; a=rsa-sha256; cv=none; b=cC84MFQgL4f/wR1WrKa0XXlSc20w+jsASNuNbUdyTQ+cdTHJuOoLc3WT4bBSRsp33IhYs5 T+GqoQqq7mvQxzleGygQ+mzzTjLyQlA+L7Mkn4A7Uq3TMGbu/ByBiCn5gzgzQA784gYRqw jA8BcgnWNvj3sKDPnu8FgODbHXABxqIXg5R6bUbSWwiM7bJtArH/0QaxIseUmOIDYzIGYy McVegVJN0ijUzcZD45VEeccKyipbSXGbWnZhnstd8AfXUXXJW8pvjbIOhQy+OKEKNODJN5 ayx3bgmvyEGegzdl84jxkZcEEngT6fmqnlLTrKypmAPHbPJcj4N0TCtfosq5VA== 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=1697221654; 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=Ts9qm/6xeI9spNVAjewEs2BKOqCbJM727jqGKnFuuGc=; b=o6A+XZl3L9UHsfXCcS2kmDUzeGlS0Z3KVwZkN4Ybl/JtN3d1K9ouEn2iLEN83luovbbdw/ B6NwLQzaCT2bkutcpUmCFoZnqQHfOsptmLeHYYSb0P+SPma/Fs+PgzmJbHyBNIEWBQLTIz 5n6KdP8d4BqKanxYAJpz8fNR+YECqZ1oy9Oi+wbixgkPRLLS/Fq23mGWsMsOWa/5h1uSIC wxxjBSaXnrPlTJFSGyMCD8zghMgyGvyy+gaVs/cQJ64OuuLPYaIudfYNX1FK16RkMufTjA qbBiEWFg6LFFz3BCVcRO8M84zv0lSREWutq6EYc66d1HAilSJtHoZgpkuRkMMg== 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 4S6Zjx75P7zyqr; Fri, 13 Oct 2023 18:27:33 +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 39DIRX3M082744; Fri, 13 Oct 2023 18:27:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DIRXsu082741; Fri, 13 Oct 2023 18:27:33 GMT (envelope-from git) Date: Fri, 13 Oct 2023 18:27:33 GMT Message-Id: <202310131827.39DIRXsu082741@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 74e4a8d208f0 - main - pmap: add pmap_kextract(9) 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 74e4a8d208f0b3cf2525e3786f3efba71fcdb752 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=74e4a8d208f0b3cf2525e3786f3efba71fcdb752 commit 74e4a8d208f0b3cf2525e3786f3efba71fcdb752 Author: Mina Galić AuthorDate: 2023-08-23 00:12:49 +0000 Commit: Mitchell Horne CommitDate: 2023-10-13 18:27:24 +0000 pmap: add pmap_kextract(9) man page Add a man page for pmap_kextract(9), with alias to vtophys(9). This man page is based on pmap_extract(9). Add it as cross reference in pmap(9), and add comments above the function implementations. Co-authored-by: Graham Perrin Co-authored-by: mhorne Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/827 --- share/man/man9/Makefile | 2 ++ share/man/man9/pmap.9 | 1 + share/man/man9/pmap_kextract.9 | 65 ++++++++++++++++++++++++++++++++++++++++++ sys/amd64/amd64/pmap.c | 8 +++++- sys/arm64/arm64/pmap.c | 6 ++++ sys/riscv/riscv/pmap.c | 6 ++++ 6 files changed, 87 insertions(+), 1 deletion(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 0b56a47db332..6768f52a38d6 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -268,6 +268,7 @@ MAN= accept_filter.9 \ pmap_copy.9 \ pmap_enter.9 \ pmap_extract.9 \ + pmap_kextract.9 \ pmap_growkernel.9 \ pmap_init.9 \ pmap_is_modified.9 \ @@ -1807,6 +1808,7 @@ MLINKS+=PHOLD.9 PRELE.9 \ PHOLD.9 PROC_ASSERT_NOT_HELD.9 MLINKS+=pmap_copy.9 pmap_copy_page.9 MLINKS+=pmap_extract.9 pmap_extract_and_hold.9 +MLINKS+=pmap_kextract.9 vtophys.9 MLINKS+=pmap_init.9 pmap_init2.9 MLINKS+=pmap_is_modified.9 pmap_ts_referenced.9 MLINKS+=pmap_pinit.9 pmap_pinit0.9 \ diff --git a/share/man/man9/pmap.9 b/share/man/man9/pmap.9 index 3f6a0f63c264..db27fe880afc 100644 --- a/share/man/man9/pmap.9 +++ b/share/man/man9/pmap.9 @@ -97,6 +97,7 @@ operation. .Xr pmap_init2 9 , .Xr pmap_is_modified 9 , .Xr pmap_is_prefaultable 9 , +.Xr pmap_kextract 9 , .Xr pmap_map 9 , .Xr pmap_mincore 9 , .Xr pmap_object_init_pt 9 , diff --git a/share/man/man9/pmap_kextract.9 b/share/man/man9/pmap_kextract.9 new file mode 100644 index 000000000000..dd73446648f2 --- /dev/null +++ b/share/man/man9/pmap_kextract.9 @@ -0,0 +1,65 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 The FreeBSD Foundation +.\" +.\" This manual page was written by Mina Galić under +.\" sponsorship from the FreeBSD Foundation. +.\" +.Dd August 24, 2023 +.Dt PMAP_KEXTRACT 9 +.Os +.Sh NAME +.Nm pmap_kextract , +.Nm vtophys +.Nd extract a physical address from the kernel page table +.Sh SYNOPSIS +.In sys/param.h +.In vm/vm.h +.In vm/pmap.h +.Ft vm_paddr_t +.Fo pmap_kextract +.Fa "vm_offset_t va" +.Fc +.Ft vm_paddr_t +.Fo vtophys +.Fa "vm_offset_t va" +.Fc +.Sh DESCRIPTION +The +.Fn pmap_kextract +function retrieves the underlying physical memory address corresponding to the given kernel virtual address +.Fa va . +The value of +.Fa va +must correlate to an active mapping in the kernel address space. +.Pp +.Fn vtophys +is an alias for +.Fn pmap_kextract +and behaves identically. +.Sh RETURN VALUES +The +.Fn pmap_kextract +function will return the physical address +.Pq Vt vm_paddr_t +associated with the kernel virtual address +.Fa va . +.Pp +.Fn pmap_kextract +generally does not fail. +However, if supplied with an illegitimate value for +.Fa va , +the function may return zero, an invalid non-zero value, or call +.Xr panic 9 . +.Sh SEE ALSO +.Xr pmap 9 , +.Xr pmap_extract 9 +.Sh AUTHORS +.An -nosplit +This manual page was written by +.An Mina Galić Aq Mt FreeBSD@igalic.co , +based on the +.Xr pmap_extract 9 +page written by +.An Bruce M Simpson Aq Mt bms@spc.org . diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index ff83d8749313..8c438cfb4639 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -3846,7 +3846,7 @@ pmap_flush_cache_phys_range(vm_paddr_t spa, vm_paddr_t epa, vm_memattr_t mattr) * Extract the physical page address associated * with the given map/virtual_address pair. */ -vm_paddr_t +vm_paddr_t pmap_extract(pmap_t pmap, vm_offset_t va) { pdp_entry_t *pdpe; @@ -3933,6 +3933,12 @@ out: return (m); } +/* + * Routine: pmap_kextract + * Function: + * Extract the physical page address associated with the given kernel + * virtual address. + */ vm_paddr_t pmap_kextract(vm_offset_t va) { diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 6f2afa0b98a3..8c2c6f9d7b81 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1949,6 +1949,12 @@ pmap_klookup(vm_offset_t va, vm_paddr_t *pa) return (true); } +/* + * Routine: pmap_kextract + * Function: + * Extract the physical page address associated with the given kernel + * virtual address. + */ vm_paddr_t pmap_kextract(vm_offset_t va) { diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 49ee54b37918..66054898b281 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -970,6 +970,12 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) return (m); } +/* + * Routine: pmap_kextract + * Function: + * Extract the physical page address associated with the given kernel + * virtual address. + */ vm_paddr_t pmap_kextract(vm_offset_t va) { From nobody Fri Oct 13 18:28: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 4S6ZlM21hyz4wbgf; Fri, 13 Oct 2023 18:28: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 4S6ZlM1QHDz4Rl3; Fri, 13 Oct 2023 18:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697221727; 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=GCyAvIj4c5PJJEFm/ZdFHL+NZdXn4L7NoiZD91C3rgU=; b=of4tlAN9wec6/Sydunw9Y5gZEMqlV0pN2UpD+7XDtgVUlVO7suixK+umD/DAXfe7UMawEJ olb7/yqXN0qFPeZFObI9yFdEft3pBQvwhy24wB42N6qBLV4C8Z9sjQXseJK88ytUKNPLNh WsZM3dK/b4ylAS9SzvUj9OvLrfjykP3qlEQ6e1Aa8ykAevO7PD/Eu9Ey/kAfHau2fH9h5w PwNcuBDSuFtl0Enn1uMc9Rp1vt/6JuYvkVaO3t7BhQEfjTbfh36nNXdgYqkbGD8uZZTzn0 TVmpQiHRfQ0+A/YSj5ceuIwR01rPgdfFVGZVZ1bZjcKCLoS+QoH5I5ONGUyU5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697221727; a=rsa-sha256; cv=none; b=yB5rPA8MUXgrfM+Xtf3VUgs9/7RaXJ2gGqxWdBgVlpLu5luoK7PgTRpzDPPSoxXf9jidwM KGzc2GIzmL9QJ/oJEZXsT1ssVarrzVpLNCuZAxzhmKW+jwi7JyUMaQYpVUbCOzityoHlK1 cvraX3NzFlL9Jwjt9WH0/F8RrTzA9cSNVRMPuOsmn8yhxIzkMe3XBDSqh1IhPcJtefRkTp crhgnQxF6sX7Ap+2+1McLdJsWvwS8ylk9eXs0gGA9AG1qLZZlZoDgC3W2hsSDIsLX4EA+s Od+SCjTJW3CCqVqnhNwN6T+/rvUOkNahWkqhwKpPdbiheybGY1QowgF1SwpkSg== 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=1697221727; 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=GCyAvIj4c5PJJEFm/ZdFHL+NZdXn4L7NoiZD91C3rgU=; b=H9LvM3MKpRCRAQ+t4/x9onQFONbCK1YRqWpl2RYhene+ZnNe0l0d3/kUijq8PTtMbMZxka gKZWhaF7fYWA17KN0dz+bhUv+LKP3ixdMPF+NUi3unjKTGMym+Z7ybSh3YLhRYuZ3r/PAc +RWF3ouKx9XoycmTvgbD5qdUx37b9bXta0sO3AAYDt1oHt0/NVeCTbtvpjrgZGawCm7g49 XTkYR+dPXuFsTWp1BLN0GmaFwM9uA7CkFpRfIE6aT2tsfMsX8CgVM+Mf6lkojDGsArbWxN rhtnAL7tUdFdzbvt07wBMoMvuuZaXaAVJX8kWuTBKMGiLfIU4bU3arKpzt5PaA== 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 4S6ZlM0QCQzy8s; Fri, 13 Oct 2023 18:28: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 39DISk3v083068; Fri, 13 Oct 2023 18:28:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DISksG083065; Fri, 13 Oct 2023 18:28:46 GMT (envelope-from git) Date: Fri, 13 Oct 2023 18:28:46 GMT Message-Id: <202310131828.39DISksG083065@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: 5e444deec055 - main - Revert "bpf: Add IfAPI analogue for bpf_peers_present()" 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: 5e444deec055c495069988dfcba23a1e08b0f0d0 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=5e444deec055c495069988dfcba23a1e08b0f0d0 commit 5e444deec055c495069988dfcba23a1e08b0f0d0 Author: Justin Hibbits AuthorDate: 2023-10-13 18:29:02 +0000 Commit: Justin Hibbits CommitDate: 2023-10-13 18:33:31 +0000 Revert "bpf: Add IfAPI analogue for bpf_peers_present()" This reverts commit c81dd8e5fe72d0c7ec055c8621bb2da3a3627abf. Commit message needs revised. --- sys/dev/firewire/if_fwip.c | 4 ++-- sys/dev/hyperv/netvsc/if_hn.c | 4 ++-- sys/dev/my/if_my.c | 2 +- sys/dev/usb/usb_pf.c | 4 +++- sys/net/bpf.c | 14 -------------- sys/net/bpf.h | 1 - 6 files changed, 8 insertions(+), 21 deletions(-) diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c index b698db6c9620..5237c555d999 100644 --- a/sys/dev/firewire/if_fwip.c +++ b/sys/dev/firewire/if_fwip.c @@ -780,7 +780,7 @@ fwip_stream_input(struct fw_xferq *xferq) * Record the sender ID for possible BPF usage. */ src = ntohl(p[1]) >> 16; - if (bpf_peers_present_if(ifp)) { + if (bpf_peers_present(if_getbpf(ifp))) { mtag = m_tag_alloc(MTAG_FIREWIRE, MTAG_FIREWIRE_SENDER_EUID, 2*sizeof(uint32_t), M_NOWAIT); @@ -880,7 +880,7 @@ fwip_unicast_input(struct fw_xfer *xfer) goto done; } - if (bpf_peers_present_if(ifp)) { + if (bpf_peers_present(if_getbpf(ifp))) { /* * Record the sender ID for possible BPF usage. */ diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c index f6f885873a79..7d8e1914163e 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c +++ b/sys/dev/hyperv/netvsc/if_hn.c @@ -3262,7 +3262,7 @@ hn_txpkt(if_t ifp, struct hn_tx_ring *txr, struct hn_txdesc *txd) int error, send_failed = 0, has_bpf; again: - has_bpf = bpf_peers_present_if(ifp); + has_bpf = bpf_peers_present(if_getbpf(ifp)); if (has_bpf) { /* * Make sure that this txd and any aggregated txds are not @@ -5972,7 +5972,7 @@ hn_transmit(if_t ifp, struct mbuf *m) omcast = (m->m_flags & M_MCAST) != 0; if (sc->hn_xvf_flags & HN_XVFFLAG_ACCBPF) { - if (bpf_peers_present_if(ifp)) { + if (bpf_peers_present(if_getbpf(ifp))) { m_bpf = m_copypacket(m, M_NOWAIT); if (m_bpf == NULL) { /* diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c index 631c38df9dca..2bf4573d337b 100644 --- a/sys/dev/my/if_my.c +++ b/sys/dev/my/if_my.c @@ -1152,7 +1152,7 @@ my_rxeof(struct my_softc * sc) * broadcast packet, multicast packet, matches our ethernet * address or the interface is in promiscuous mode. */ - if (bpf_peers_present_if(ifp)) { + if (bpf_peers_present(if_getbpf(ifp))) { bpf_mtap_if(ifp, m); if (if_getflags(ifp) & IFF_PROMISC && (bcmp(eh->ether_dhost, if_getlladdr(sc->my_ifp), diff --git a/sys/dev/usb/usb_pf.c b/sys/dev/usb/usb_pf.c index 4da59419a7c6..43e819684857 100644 --- a/sys/dev/usb/usb_pf.c +++ b/sys/dev/usb/usb_pf.c @@ -408,7 +408,9 @@ usbpf_xfertap(struct usb_xfer *xfer, int type) bus = xfer->xroot->bus; /* sanity checks */ - if (bus->ifp == NULL || !bpf_peers_present_if(bus->ifp)) + if (bus->ifp == NULL || if_getbpf(bus->ifp) == NULL) + return; + if (!bpf_peers_present(if_getbpf(bus->ifp))) return; totlen = usbpf_xfer_precompute_size(xfer, type); diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 96420b709911..8ca6e941e646 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -2879,14 +2879,6 @@ bpfdetach(struct ifnet *ifp) BPF_UNLOCK(); } -bool -bpf_peers_present_if(struct ifnet *ifp) -{ - struct bpf_if *bp = ifp->if_bpf; - - return (bpf_peers_present(bp) > 0); -} - /* * Get a list of available data link type of the interface. */ @@ -3170,12 +3162,6 @@ bpfdetach(struct ifnet *ifp) { } -bool -bpf_peers_present_if(struct ifnet *ifp) -{ - return (false); -} - u_int bpf_filter(const struct bpf_insn *pc, u_char *p, u_int wirelen, u_int buflen) { diff --git a/sys/net/bpf.h b/sys/net/bpf.h index 31968445aac1..924dea5fc9f4 100644 --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -428,7 +428,6 @@ void bpf_mtap2_if(struct ifnet *, void *, u_int, struct mbuf *); void bpfattach(struct ifnet *, u_int, u_int); void bpfattach2(struct ifnet *, u_int, u_int, struct bpf_if **); void bpfdetach(struct ifnet *); -bool bpf_peers_present_if(struct ifnet *); #ifdef VIMAGE int bpf_get_bp_params(struct bpf_if *, u_int *, u_int *); #endif From nobody Fri Oct 13 18:28:48 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 4S6ZlN34wgz4wc4k; Fri, 13 Oct 2023 18:28: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 4S6ZlN2cKTz4Rr1; Fri, 13 Oct 2023 18:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697221728; 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=j39kjJrDSb7gxO0p7Nb476RAkuzmN71fX8G9x8Nl4w0=; b=CoiGhYQsemsx8F+KwWHO8pIafDyuy3d07T5Ap4K4RXwV0nZO4EPYn4tC2YFDpTZ7pRXJA4 AQdJdmkJRjH6vjUN7GgMAVaVum1JNEHg/Tyw2UBgD+lgqAq5DdtrLGzaa3RbQTIgkzAYsK lKlH+L8Sp7v5G4Dx+981/7OSIP6NCxLLRjg2qbH5CyKW61cAgbtFxn/ED1yjG8uggKmcxZ D/J58FHuNWLu2gmud71fyQN4EkjxhHwNlFFo3ljvI0B69A2UfL41zReRpXpBzejQuivSKo w6ruptUUPXzxd8eDRTXmmWsI2OP0g+Ht6S418jF0LL+GM8esxGHDJCleOxeKFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697221728; a=rsa-sha256; cv=none; b=Qzcukxfy8fpUyFqooyVN+SxpZinXhyJkSmOAcj4exc2Jw7ZZ+3pYSqw4fhJDD6qjJ71DTE ukKm1dClGOPpx5oRWWguympBbKFjA6Laf6HZ7IXgYTZWXXrY0zb9uY5C5jxUzOOE1EAMcs 67GhAj4rtXItoPGEg3l0K2AkZKoI+yffHKKLFrC+9LzpX6FFKE5iBsst+S8j+ovR6sYEso bK/KwNgAxPQcytD4s0BN9gZItT8jVLWRq3dof5zi/vX+IdHonpSoVnTq+nRkVb4D79iGsV 3i2pkBQLuggDeF6PbHdt8GsgsNcwpck/7MvknQOVUFq+wsfo3t5nZgnEU91RIg== 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=1697221728; 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=j39kjJrDSb7gxO0p7Nb476RAkuzmN71fX8G9x8Nl4w0=; b=o9OrfsD2mOTS/WhRExEgDk4aAOigLNWKC+u0b2WCJrxioUCXvkPB3XlLz2EHY9FPUvKskR xwXe5/IpWhgljQPGSI3j9lPa1pHVzMBcQWvsTTn9kD0G5l8kV8SNb6phTAYKu3FLe0oA2g 5HPuA6z6FUwRL6/RoyqO3wYLioOErqtuLeYmemcKnEEeEjYGknrT/3zmj8gae7/iv+06wD aRE9+AKus69c07YT8cO6zUj59H2I7X8CajtYfBnTJXeHauLRBWECCy0dycg0BpPmacTF7t PXppCu1VmoCsGHk8ntCexKaUompCZWbw5en5G81PbyMq7IG/rvugtawB15REbw== 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 4S6ZlN1M4qzy8t; Fri, 13 Oct 2023 18:28:48 +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 39DISmiN083113; Fri, 13 Oct 2023 18:28:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DISmnu083110; Fri, 13 Oct 2023 18:28:48 GMT (envelope-from git) Date: Fri, 13 Oct 2023 18:28:48 GMT Message-Id: <202310131828.39DISmnu083110@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: 8f31b879ecaf - main - bpf: Add IfAPI analogue for bpf_peers_present() 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: 8f31b879ecaf9e738dba631df4606742ee404e8e Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=8f31b879ecaf9e738dba631df4606742ee404e8e commit 8f31b879ecaf9e738dba631df4606742ee404e8e Author: Justin Hibbits AuthorDate: 2023-10-04 20:56:52 +0000 Commit: Justin Hibbits CommitDate: 2023-10-13 18:33:31 +0000 bpf: Add IfAPI analogue for bpf_peers_present() An interface's bpf could feasibly not exist, in which case bpf_peers_present() would panic from a NULL pointer dereference. Solve this by adding a new IfAPI that could deal with a NULL bpf, if such could occur in the network stack. Reviewed by: zlei Sponsored by: Juniper Networks, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42082 --- sys/dev/firewire/if_fwip.c | 4 ++-- sys/dev/hyperv/netvsc/if_hn.c | 4 ++-- sys/dev/my/if_my.c | 2 +- sys/dev/usb/usb_pf.c | 4 +--- sys/net/bpf.c | 14 ++++++++++++++ sys/net/bpf.h | 1 + 6 files changed, 21 insertions(+), 8 deletions(-) diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c index 5237c555d999..b698db6c9620 100644 --- a/sys/dev/firewire/if_fwip.c +++ b/sys/dev/firewire/if_fwip.c @@ -780,7 +780,7 @@ fwip_stream_input(struct fw_xferq *xferq) * Record the sender ID for possible BPF usage. */ src = ntohl(p[1]) >> 16; - if (bpf_peers_present(if_getbpf(ifp))) { + if (bpf_peers_present_if(ifp)) { mtag = m_tag_alloc(MTAG_FIREWIRE, MTAG_FIREWIRE_SENDER_EUID, 2*sizeof(uint32_t), M_NOWAIT); @@ -880,7 +880,7 @@ fwip_unicast_input(struct fw_xfer *xfer) goto done; } - if (bpf_peers_present(if_getbpf(ifp))) { + if (bpf_peers_present_if(ifp)) { /* * Record the sender ID for possible BPF usage. */ diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c index 7d8e1914163e..f6f885873a79 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c +++ b/sys/dev/hyperv/netvsc/if_hn.c @@ -3262,7 +3262,7 @@ hn_txpkt(if_t ifp, struct hn_tx_ring *txr, struct hn_txdesc *txd) int error, send_failed = 0, has_bpf; again: - has_bpf = bpf_peers_present(if_getbpf(ifp)); + has_bpf = bpf_peers_present_if(ifp); if (has_bpf) { /* * Make sure that this txd and any aggregated txds are not @@ -5972,7 +5972,7 @@ hn_transmit(if_t ifp, struct mbuf *m) omcast = (m->m_flags & M_MCAST) != 0; if (sc->hn_xvf_flags & HN_XVFFLAG_ACCBPF) { - if (bpf_peers_present(if_getbpf(ifp))) { + if (bpf_peers_present_if(ifp)) { m_bpf = m_copypacket(m, M_NOWAIT); if (m_bpf == NULL) { /* diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c index 2bf4573d337b..631c38df9dca 100644 --- a/sys/dev/my/if_my.c +++ b/sys/dev/my/if_my.c @@ -1152,7 +1152,7 @@ my_rxeof(struct my_softc * sc) * broadcast packet, multicast packet, matches our ethernet * address or the interface is in promiscuous mode. */ - if (bpf_peers_present(if_getbpf(ifp))) { + if (bpf_peers_present_if(ifp)) { bpf_mtap_if(ifp, m); if (if_getflags(ifp) & IFF_PROMISC && (bcmp(eh->ether_dhost, if_getlladdr(sc->my_ifp), diff --git a/sys/dev/usb/usb_pf.c b/sys/dev/usb/usb_pf.c index 43e819684857..4da59419a7c6 100644 --- a/sys/dev/usb/usb_pf.c +++ b/sys/dev/usb/usb_pf.c @@ -408,9 +408,7 @@ usbpf_xfertap(struct usb_xfer *xfer, int type) bus = xfer->xroot->bus; /* sanity checks */ - if (bus->ifp == NULL || if_getbpf(bus->ifp) == NULL) - return; - if (!bpf_peers_present(if_getbpf(bus->ifp))) + if (bus->ifp == NULL || !bpf_peers_present_if(bus->ifp)) return; totlen = usbpf_xfer_precompute_size(xfer, type); diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 8ca6e941e646..96420b709911 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -2879,6 +2879,14 @@ bpfdetach(struct ifnet *ifp) BPF_UNLOCK(); } +bool +bpf_peers_present_if(struct ifnet *ifp) +{ + struct bpf_if *bp = ifp->if_bpf; + + return (bpf_peers_present(bp) > 0); +} + /* * Get a list of available data link type of the interface. */ @@ -3162,6 +3170,12 @@ bpfdetach(struct ifnet *ifp) { } +bool +bpf_peers_present_if(struct ifnet *ifp) +{ + return (false); +} + u_int bpf_filter(const struct bpf_insn *pc, u_char *p, u_int wirelen, u_int buflen) { diff --git a/sys/net/bpf.h b/sys/net/bpf.h index 924dea5fc9f4..31968445aac1 100644 --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -428,6 +428,7 @@ void bpf_mtap2_if(struct ifnet *, void *, u_int, struct mbuf *); void bpfattach(struct ifnet *, u_int, u_int); void bpfattach2(struct ifnet *, u_int, u_int, struct bpf_if **); void bpfdetach(struct ifnet *); +bool bpf_peers_present_if(struct ifnet *); #ifdef VIMAGE int bpf_get_bp_params(struct bpf_if *, u_int *, u_int *); #endif From nobody Fri Oct 13 19:29: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 4S6c5V3b3Rz4wgLq; Fri, 13 Oct 2023 19:29:34 +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 4S6c5V36r0z4X9L; Fri, 13 Oct 2023 19:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697225374; 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=yUVWt4Jvt65dVCm0+8VCFrJExom1TYMecNCN5bxE1hs=; b=YzdhR3iVubKFmYXQSfAISx9zXKGZjXKZEATGA8sXFWCh1f0NxIP2VWhglmo4zczAiI7lkS DG8OAFkU0o+c2zqNi4Bjm7FBTNP3TwDRetANKg9frmO5AcSJC00+MXrRCl+U3jUIUHM9ef lRk6dPd2pE7UAuN8FqiJkMQ5CNvlV1IzHolLmI6DjGh7fm6JwiBwW1I/SSj9+NtlTHZkD+ c3kDpEjvUOuMVfq3ArYHZ0riGVOE4N1JmkQKF/eGZ8WQzohFDWXNbStfCR6Odvf3FNPFcQ wST0iuXfRvJAAoZdPmmViDN4IyJE1qtNIJucdS+kifPlzF13elSK6R/lf8SLPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697225374; a=rsa-sha256; cv=none; b=MhVonK9LijfgFcgxBbMV/gvFkqCeNNih1hu1MGD5POSBADndV1mQMI+Ht2ziOj7xNr6SQq B8HbabXVtGcmoL4PP+eTwF9lzIngGlPgW78VnZF0ZoWRUsez1bA07ADGBkYVQQlZeiq6F1 Zz/eHQPLFJdfzWt6YiXKEjt5adRJ+v11nmqbmdRG+73lZNYdNoI568eoBhgSHAgm4klDPb brkLlJY34SqWjIK7Xqjq1FVDN/plvmEplFr0lst5gS3lAsf70yTlSTvxy8v4i/ts/7RELf m6utHQVEAr5Z/BWIld2MxRl6vYiWUrdNWEWOyRWRk+6CE5Sd3PJumgXfLeCdrg== 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=1697225374; 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=yUVWt4Jvt65dVCm0+8VCFrJExom1TYMecNCN5bxE1hs=; b=MrAfxzTvJ9BINLvWEhVlPzvxsWTR3iTnZ6szoPU7Do2KGGz8wWdUACLti1HO6j9+nOQPrf 0Vr5Cw9Cx4tGeU9i2IC+iLQTlCuk9ZqxqmH2zh1xPGSaIq2wGbEHkw6lk25gCQgel/DEu0 8xRS9vkWSOLsQbGpwEhi8EbblFUVfxTnNbszVJae3Bq1L/XMmcKpn15CB8i59ZPNGz+dp5 CJPUEgAH2wL0R6j8gRgC4LweUysplAF+ZBaM4IHxdvKXxq3BiVZRUb5KYcFb6gErraTzgT HkWwT2ISjbFtO6vtnH8ZZeIb/BNrdAcospOeBBZsd2vj4hwB9EwcEqNOjairgw== 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 4S6c5V2C57z10wk; Fri, 13 Oct 2023 19:29:34 +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 39DJTYOc082782; Fri, 13 Oct 2023 19:29:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DJTYiF082779; Fri, 13 Oct 2023 19:29:34 GMT (envelope-from git) Date: Fri, 13 Oct 2023 19:29:34 GMT Message-Id: <202310131929.39DJTYiF082779@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: f0852344e7ab - main - bhyve: Some fwctl simplifications. 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: f0852344e7abf4d74508185e67a1b98d6cdbd026 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f0852344e7abf4d74508185e67a1b98d6cdbd026 commit f0852344e7abf4d74508185e67a1b98d6cdbd026 Author: John Baldwin AuthorDate: 2023-10-13 19:26:22 +0000 Commit: John Baldwin CommitDate: 2023-10-13 19:26:22 +0000 bhyve: Some fwctl simplifications. - Collapse IDENT_SEND/IDENT_WAIT states down to a single state. - Remove unused 'len' argument to op_data callback. The value passed in (total amount of remaining data to receive) didn't seem very useful and no op_data implementations used it. Reviewed by: corvink, markj Differential Revision: https://reviews.freebsd.org/D41286 --- usr.sbin/bhyve/amd64/fwctl.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/usr.sbin/bhyve/amd64/fwctl.c b/usr.sbin/bhyve/amd64/fwctl.c index 01b16c38f3a7..5e930cdb2051 100644 --- a/usr.sbin/bhyve/amd64/fwctl.c +++ b/usr.sbin/bhyve/amd64/fwctl.c @@ -63,8 +63,7 @@ * Back-end state-machine */ static enum state { - IDENT_WAIT, - IDENT_SEND, + IDENT, REQ, RESP } be_state; @@ -75,7 +74,7 @@ static u_int ident_idx; struct op_info { int op; int (*op_start)(uint32_t len); - void (*op_data)(uint32_t data, uint32_t len); + void (*op_data)(uint32_t data); int (*op_result)(struct iovec **data); void (*op_done)(struct iovec *data); }; @@ -120,7 +119,7 @@ errop_start(uint32_t len __unused) } static void -errop_data(uint32_t data __unused, uint32_t len __unused) +errop_data(uint32_t data __unused) { /* ignore */ @@ -192,7 +191,7 @@ fget_start(uint32_t len) } static void -fget_data(uint32_t data, uint32_t len __unused) +fget_data(uint32_t data) { assert(fget_cnt + sizeof(uint32_t) <= sizeof(fget_str)); @@ -347,7 +346,7 @@ fwctl_request_data(uint32_t value) else rinfo.req_size -= sizeof(uint32_t); - (*rinfo.req_op->op_data)(value, rinfo.req_size); + (*rinfo.req_op->op_data)(value); if (rinfo.req_size < sizeof(uint32_t)) { fwctl_request_done(); @@ -360,7 +359,6 @@ fwctl_request_data(uint32_t value) static int fwctl_request(uint32_t value) { - int ret; ret = 0; @@ -451,12 +449,11 @@ fwctl_reset(void) /* Discard partially-received request. */ memset(&rinfo, 0, sizeof(rinfo)); break; - case IDENT_WAIT: - case IDENT_SEND: + case IDENT: break; } - be_state = IDENT_SEND; + be_state = IDENT; ident_idx = 0; } @@ -472,7 +469,7 @@ fwctl_inb(void) retval = 0xff; switch (be_state) { - case IDENT_SEND: + case IDENT: retval = sig[ident_idx++]; if (ident_idx >= sizeof(sig)) be_state = REQ; @@ -580,5 +577,5 @@ fwctl_init(void) ops[OP_GET_LEN] = &fgetlen_info; ops[OP_GET] = &fgetval_info; - be_state = IDENT_WAIT; + be_state = IDENT; } From nobody Fri Oct 13 19:29:35 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 4S6c5W4bGrz4wgCs; Fri, 13 Oct 2023 19:29:35 +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 4S6c5W3sLCz4X9m; Fri, 13 Oct 2023 19:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697225375; 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=hkxiuaCPc9eVACnH0FdpOQ4M7GBlTjERPYhEhBZoNs8=; b=Jk9Gv10WstfRckfDGuxrntK3JyXAwrYGBvvPqLJ6AJjU9c/jke7lv5gEMQqMr52TB9BNgf fPQeGrPL4ommcofTKMIlvbE1dPBHHann/RDU2YKIHKJ8JOdmtsGipsZ4zO1F+nPFP4X02w LHnJ+MFp2OQHhW/iRbwxKm+W+siUAEfsgnEHTISR1LgeYOqImp8hbjuxTF+MvYsOsd5yMy uNPvknGwq5ZI1sV9T33Em3QI26r9Ya7b0yW7sKg5d2ueU+EUVvDd2wCTFrAqN+y9scCafK p/rctPS+8wQ1Qubx3ErK6VziMc0c/c3ARuHQhFaqXummhmvDDBZ90qOK4LK6wQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697225375; a=rsa-sha256; cv=none; b=u/Rdkkn3UaOsgYem6qyPUkPM/n8/Qe2HMq6R5E9dbN5KlTqh7XXRhTn1KqlLSjixfGeF6R YlJo9zEgLOChKCbQvaV4mWEfPiqRYZkYPMtQFpKQAF5sefIhanpzd607QGJDR4aD0YgJjv tu3f4DegP+pl1brsrvwgxvxTAc7yKiy7AXFHYxnghR4x+qgg/NAX8XEhfrqzI8if4nDlLc ERmZiiVRkTOVeVoNdDOGC4g3RCGej2+a2Tt5QHuXXKIVEXPvVda5Rs4AcXXkIi2vIyZEuV FyhbmlN765EnKRTH9IX3KJ9gvXryvAXR/kaUOq/OZ4nngz/tmwEhM41BjXYiTA== 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=1697225375; 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=hkxiuaCPc9eVACnH0FdpOQ4M7GBlTjERPYhEhBZoNs8=; b=tW0qRN0FnSULIkDib+Tbmnc4rMGi6Pbo8hl0WZgQrjBfLGn1a6WFJH8QLdsitN8wWXjGvb lQ7K3N5v6TsJRZ39Ubb+DFBMaAERnGLI5ZqmlGdH8iaYIUS+4fnm26CIggxojbI1xjxRKc eok8rfa0xfP+210LCIaMEeYPoKdaklUMjkMN/U2ZrT+Da87w3I32MLW70wAQUcRCeNZTAa PpRfEIzwmMjBObnU77EmIFXIjSujb4JjHCyqJOjg4XVN2Pk7y8/mYRCvpe6QbKI9KkWQUb 5ibKi8C0MZ1gZisCn1J5Ybvu9x2XCxdh0PYLQ54Z8dXUCC/QeHoOy4oBaQlAYw== 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 4S6c5W2vMLz10t3; Fri, 13 Oct 2023 19:29:35 +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 39DJTZSh082827; Fri, 13 Oct 2023 19:29:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DJTZN6082824; Fri, 13 Oct 2023 19:29:35 GMT (envelope-from git) Date: Fri, 13 Oct 2023 19:29:35 GMT Message-Id: <202310131929.39DJTZN6082824@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: edd2a9b88786 - main - bhyve ahci: Replace WPRINTF with EPRINTLN 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: edd2a9b887864d07ac5af480b4b8f35cb76443f6 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=edd2a9b887864d07ac5af480b4b8f35cb76443f6 commit edd2a9b887864d07ac5af480b4b8f35cb76443f6 Author: John Baldwin AuthorDate: 2023-10-13 19:26:58 +0000 Commit: John Baldwin CommitDate: 2023-10-13 19:26:58 +0000 bhyve ahci: Replace WPRINTF with EPRINTLN Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D42181 --- usr.sbin/bhyve/pci_ahci.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/usr.sbin/bhyve/pci_ahci.c b/usr.sbin/bhyve/pci_ahci.c index 5ffb65269608..b69c099225db 100644 --- a/usr.sbin/bhyve/pci_ahci.c +++ b/usr.sbin/bhyve/pci_ahci.c @@ -118,7 +118,6 @@ static FILE *dbg; #else #define DPRINTF(format, arg...) #endif -#define WPRINTF(format, arg...) printf(format, ##arg) #define AHCI_PORT_IDENT 20 + 1 @@ -343,7 +342,7 @@ ahci_write_fis(struct ahci_port *p, enum sata_fis_type ft, uint8_t *fis) irq = (fis[1] & (1 << 6)) ? AHCI_P_IX_PS : 0; break; default: - WPRINTF("unsupported fis type %d", ft); + EPRINTLN("unsupported fis type %d", ft); return; } if (fis[2] & ATA_S_ERROR) { @@ -1802,7 +1801,7 @@ ahci_handle_cmd(struct ahci_port *p, int slot, uint8_t *cfis) handle_packet_cmd(p, slot, cfis); break; default: - WPRINTF("Unsupported cmd:%02x", cfis[2]); + EPRINTLN("Unsupported cmd:%02x", cfis[2]); ahci_write_fis_d2h(p, slot, cfis, (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR); break; @@ -1847,7 +1846,7 @@ ahci_handle_slot(struct ahci_port *p, int slot) #endif if (cfis[0] != FIS_TYPE_REGH2D) { - WPRINTF("Not a H2D FIS:%02x", cfis[0]); + EPRINTLN("Not a H2D FIS:%02x", cfis[0]); return; } @@ -2134,7 +2133,7 @@ pci_ahci_port_write(struct pci_ahci_softc *sc, uint64_t offset, uint64_t value) case AHCI_P_TFD: case AHCI_P_SIG: case AHCI_P_SSTS: - WPRINTF("pci_ahci_port: read only registers 0x%"PRIx64"", offset); + EPRINTLN("pci_ahci_port: read only registers 0x%"PRIx64"", offset); break; case AHCI_P_SCTL: p->sctl = value; @@ -2209,7 +2208,7 @@ pci_ahci_write(struct pci_devinst *pi, int baridx, uint64_t offset, int size, else if (offset < (uint64_t)AHCI_OFFSET + sc->ports * AHCI_STEP) pci_ahci_port_write(sc, offset, value); else - WPRINTF("pci_ahci: unknown i/o write offset 0x%"PRIx64"", offset); + EPRINTLN("pci_ahci: unknown i/o write offset 0x%"PRIx64"", offset); pthread_mutex_unlock(&sc->mtx); } @@ -2307,7 +2306,7 @@ pci_ahci_read(struct pci_devinst *pi, int baridx, uint64_t regoff, int size) value = pci_ahci_port_read(sc, offset); else { value = 0; - WPRINTF("pci_ahci: unknown i/o read offset 0x%"PRIx64"", + EPRINTLN("pci_ahci: unknown i/o read offset 0x%"PRIx64"", regoff); } value >>= 8 * (regoff & 0x3); From nobody Fri Oct 13 19:31: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 4S6c7r5D0mz4wgTr; Fri, 13 Oct 2023 19:31: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 4S6c7r2ZmLz4XbX; Fri, 13 Oct 2023 19:31:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697225496; 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=+cm1zh1snPa/jJ+h2OZHSTJrHcHO4FkQmX7Y21ZMgOs=; b=JUnlBZ2K4F9fJ2PasR1DO3hwKBPpOugZOIcda5Kc5BhBmrS7r+HeGYXZD9MdwtLb6Qd1KJ rzuzB6Unp0n9AL5WfasKuw+aAZU8Xx8m/dtw2rzHHZ0qC41Xm+zJwl6zumWt7i8PoxKSeG bXFULQWhKUbPbMFr3Nd+dHC0JZ3w5K6NDfhPsAZHU+Z93dqyRTSji3CunjSHrUVENNEDo0 cHVXRWRqD7Hx4EHVTNHriUc4ghgzjoQMezmAUHgT/mEQ98XBH/HXuG1PYvuA+2SPf1MlPI 2M0OyT0zg/rXh97zhCGbCZyk3NLit/HKSd2W9bwG+27slZQ8UW7OJEwThCCFJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697225496; a=rsa-sha256; cv=none; b=aASG+0ALb3CzRG2/enrJacgonIXyhRfa6BpKjvATBZrzHbG3Aw1vWXvRNrxXlrhbKlYe/1 IqmTRowvkJqHTN61O31aecWWUXBXwjnV7wqwsz6dPIU5FmaW0RB7VOe27FUw6RlGXLfvYk tew1jye1OU2pU+HxVwAWyx/sLBDkbpkKfmxZeeDQoPQyNsy92DyHhDXY8xFsgqoOVJx1C3 Z4u7h5hxV1hjIwbhV7MBW0zHptVWcP3eevuUdbqt+49cKCqVxyMP8vdoDVelZWKmlc14+Z sqaiOworVoRK6UVTazQrbz1zjsFF6P6yGsrcY5FvOf+v+43bWCCAvw37170pKw== 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=1697225496; 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=+cm1zh1snPa/jJ+h2OZHSTJrHcHO4FkQmX7Y21ZMgOs=; b=ySbAlDc2DgaS23LdqOFfu58itbIDz1ZVy77GFPKtemix2FANadmlTtY7Gl9SERjoLE9KLA bzA5QzT2z3O+yudPzh8XGdoqGDemipp3UnZdDOaUM5LoM8RGOj2xbk/AIPK0XiaC1NWqtP iYPDjIlRNMucjwA9fvy74DDQ/nJ6RG+Yjxcz75uBlNiBGuLPUjZn2DsdLc65T8JqkpXaQT MiaECInlZLLP1I8q0iERLT0CSch81abNkL1KZ+/jz1qz2nGU+1mdL/YgmNAHvgff5tKJFZ vOOl9tHc1cFBb2nGCo5n1sj9+DrEuUJpDGNfnQbrSvMqO2s8/SdGAKa7+gg7gw== 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 4S6c7r1gJdz10S9; Fri, 13 Oct 2023 19:31: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 39DJVak5097814; Fri, 13 Oct 2023 19:31:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DJVa61097811; Fri, 13 Oct 2023 19:31:36 GMT (envelope-from git) Date: Fri, 13 Oct 2023 19:31:36 GMT Message-Id: <202310131931.39DJVa61097811@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: 2e620256bd76 - main - atf_python: Do not attempt to automatically delete lo0 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: 2e620256bd76c449c835c604e404483437743011 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2e620256bd76c449c835c604e404483437743011 commit 2e620256bd76c449c835c604e404483437743011 Author: Jose Luis Duran AuthorDate: 2023-10-12 13:15:15 +0000 Commit: Mark Johnston CommitDate: 2023-10-13 19:31:30 +0000 atf_python: Do not attempt to automatically delete lo0 Else `ifconfig lo0 destroy` will throw an: ifconfig: SIOCIFDESTROY: Invalid argument Reviewed by: markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/865 --- tests/atf_python/sys/net/vnet.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/atf_python/sys/net/vnet.py b/tests/atf_python/sys/net/vnet.py index 8942e6839b35..c58ae28d5ca9 100644 --- a/tests/atf_python/sys/net/vnet.py +++ b/tests/atf_python/sys/net/vnet.py @@ -180,6 +180,8 @@ class IfaceFactory(object): @staticmethod def is_autodeleted(iface_name: str) -> bool: + if iface_name == "lo0": + return False iface_type = re.split(r"\d+", iface_name)[0] return iface_type in IfaceFactory.AUTODELETE_TYPES From nobody Fri Oct 13 19:31: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 4S6c7s4JdLz4wgMl; Fri, 13 Oct 2023 19:31: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 4S6c7s3Zg5z4Xrs; Fri, 13 Oct 2023 19:31:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697225497; 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=UhSOwpnZuSLyYU/2m0CvkyQP2kM8/Zx5YovQe4BN9No=; b=lSnKWevzaZtwEkG/fGPZLVKUmGjl9HHkpwe55m6eG9RGcSwcPJhLk+MDBOsHKGBr3Yr1DZ rgB32J3ZGBcCxfwP7XNq7dsa9KthU1h9cPvHdDjKZEc4fePKHXnvitoe90JnP1K3MWbL09 S5SWZU9p7RHmp9915HXxEsZ21ES0VdZVLNfbMqWV8qbfBgUe5gCbQMyBYR6St8Y0l0zvjz B/UlOI7JON7l8NWV+45RGzldOEgLf8NekJg/Y25zkd8kub01PKPVnEWHYdv3nDYrSvUwRO tYWbfOn1ema+3/Rcd5jEi7U7ittB/GMw00CoGBO26fuf+24ddPrvz1M5FLeMhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697225497; a=rsa-sha256; cv=none; b=GSFLfP2T/5LyJWKlDb0DLGAOJ4bBWRvg6Ps+KatPd9xFmXb1antVV1MaQoPwHA23kumr2R umcjhFqfMMJcGI3cGg30yo8EMuN/LewD9KkM7vPeScDHD/XoysNG6q6HVXkEc7GHibIi7n iGTly/nS+qaN8hOZo/o7/ezfK3DG3Ng77785/sq1QCvlH89cMU5DESPE5bZ/lSj0bOEgxn CZg76NpMNHeEZrDyFmf3VOu9VjhIaMn/xUHrnFKRnPg0s93g4PhTOBKds/3MXEkfF2alE2 1aZAv2AUrdDpEFlYdb0y8NpvQsqSJ0pBfDus9kM/m7vVB9RIaXWk7uRHVLRrVw== 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=1697225497; 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=UhSOwpnZuSLyYU/2m0CvkyQP2kM8/Zx5YovQe4BN9No=; b=kpi0FMx/cd915ufPSJWWEEeDVhDy7IcH++UOX71B1O1FIXZ5GiAYC1ulzTPcYA6f2vpc5B bUj5lAAEg3LXlxMtvbY2DBSLe06iJ3c+MW4RC99B8ihbjp3aCDrHhxvDEpykNbvtIezSeQ Sn80W3nOan7S+GYEkzaC2HDs3lzlrbDZPeu5FmLqr/+5G/uK/qM7IMcwsr6fUbaItXWM7u XQqOH7IpMem9KaMRglwsszbXGw5ERI4W2+7BkiOTpLdP9ldRU5BjDDwTokOKSjGR/PI5W+ 9NwPHem9vsT+YRdHznMf63maq5gNyNjRYc6OwTx/e9BeOaZUquD3aIKWhLAgEg== 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 4S6c7s2d3Lz1178; Fri, 13 Oct 2023 19:31: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 39DJVb6T097859; Fri, 13 Oct 2023 19:31:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DJVbwS097856; Fri, 13 Oct 2023 19:31:37 GMT (envelope-from git) Date: Fri, 13 Oct 2023 19:31:37 GMT Message-Id: <202310131931.39DJVbwS097856@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: 7964a28ccfc9 - main - atf_python: Actually implement verbosity for run_cmd 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: 7964a28ccfc9f1d353fa851f5ecd83d17ab75b09 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7964a28ccfc9f1d353fa851f5ecd83d17ab75b09 commit 7964a28ccfc9f1d353fa851f5ecd83d17ab75b09 Author: Jose Luis Duran AuthorDate: 2023-10-12 14:51:45 +0000 Commit: Mark Johnston CommitDate: 2023-10-13 19:31:30 +0000 atf_python: Actually implement verbosity for run_cmd Reviewed by: markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/865 --- tests/atf_python/sys/net/vnet.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/atf_python/sys/net/vnet.py b/tests/atf_python/sys/net/vnet.py index c58ae28d5ca9..bfe7984b440b 100644 --- a/tests/atf_python/sys/net/vnet.py +++ b/tests/atf_python/sys/net/vnet.py @@ -19,7 +19,8 @@ from atf_python.utils import libc def run_cmd(cmd: str, verbose=True) -> str: - print("run: '{}'".format(cmd)) + if verbose: + print("run: '{}'".format(cmd)) return os.popen(cmd).read() From nobody Fri Oct 13 19: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 4S6c7t5r4Dz4wgMq; Fri, 13 Oct 2023 19: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 4S6c7t4wpTz4Xl5; Fri, 13 Oct 2023 19: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=1697225498; 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=Aki6+2wh727z1h5zSlppSZ7RYJ4oseYVpf3yW0Q3puw=; b=TLtcxPaFqLh5WER27rnRQKr0uqGvsA0/GvGgwbZlaPHV2UqL3BOSyJ+cxoVSCZuOmWCr7N aI8fZLwZumVgEOI/bGrMD8yGEP5OxQCZxNU+nnC9gbxNEjcxpbAX5KAp80z9xWCs7PY8LO /Wggeq64nfMtd+sYu8zV5ubHKicFFQitQpxOE02TSX4rgGBrx4RajJyNlX+x90bRDpNBCc +1qExaf2w8JZTZjhkEWTgNQK7/sASPu40l4otFuW+iiO0SSfsf9H2w9/ExSaY/VABB0Id/ /RoDp2+Hts86dWjtbm60fnRtZa3M77gGtsVAmmon7ch4O21UdXqwzRGIH53dlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697225498; a=rsa-sha256; cv=none; b=YNVZQqrCCuMF5so7sq38H6/muUSdjxZImEKk3UXdCqA1/swt0x0kztKQG7GmleHpGx7L4O m/9knNRG2J/I5/pE1glHDBS38ovQojt9FEiETdVRtlp1H26clyUQCqoNhgec4AxxQ7rXw3 Yrt9frKE6EoTDiroExDlYvqX5tPb8pUQ5TmcWpVYbuO4y1Wc63ZB73txVcH0GoYiAR5Ed/ YErNAzvESTF8UWTZ+qCsyBSAq+JkESIipSKONTJEq/P0lzJ/KDiuQ2k7lzAvmx5RO0DDBt rWPxru1+QCdDsOYAk9C1muCQRtaCpbnKsNPCDajbM2y8+fJaRH/jdOe1fozvjQ== 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=1697225498; 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=Aki6+2wh727z1h5zSlppSZ7RYJ4oseYVpf3yW0Q3puw=; b=EAl5wor3AY7qlHKLDo5mucq3EkKH7m4+3KENUlk5sebA96HVp9UW4oMmHWjFLWUtk2KIN6 4vSJcvt7pdrH/n+qtWNZEFw8h7vloAVM0vuXd5Kp2gdkaBo3qagkC8nWwMT9Lcu0ti8S6Y TBDMB3QqyyrBVAG+2Pgpx5CZ4/wMvk8BgvGdVvQENjdr6r2Egt8dvEkiJcbcQ7xks/obRc zS3KNMJJo3miLHvmDjPqElFe5bf9dzkqxuYtgqCJktcM1NkCtvD/3TLefhLJBjzuZrVTKz rx/6lcFRiLSr92JpKGP6mvXlerRnXpMxlynsgCrlnmqLWleLjzhZJgFXeJHDmA== 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 4S6c7t3wwWz11Jp; Fri, 13 Oct 2023 19: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 39DJVcLd097909; Fri, 13 Oct 2023 19: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 39DJVch3097906; Fri, 13 Oct 2023 19:31:38 GMT (envelope-from git) Date: Fri, 13 Oct 2023 19:31:38 GMT Message-Id: <202310131931.39DJVch3097906@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: a1eb150ce215 - main - atf_python: vnet: Use absolute paths within helpers 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: a1eb150ce215f51abbbb34aed0533bced93e5502 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a1eb150ce215f51abbbb34aed0533bced93e5502 commit a1eb150ce215f51abbbb34aed0533bced93e5502 Author: Jose Luis Duran AuthorDate: 2023-10-12 15:14:44 +0000 Commit: Mark Johnston CommitDate: 2023-10-13 19:31:30 +0000 atf_python: vnet: Use absolute paths within helpers Usually tests are run in sterile environments; however, there is a slight chance that the PATH overrides the utilities used for testing. Pedantically use absolute paths, even inside VNETs, to avoid ambiguity. Chiefly, jexec -> /usr/sbin/jexec, and ifconfig -> /sbin/ifconfig. Reviewed by: markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/865 --- tests/atf_python/sys/net/vnet.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tests/atf_python/sys/net/vnet.py b/tests/atf_python/sys/net/vnet.py index bfe7984b440b..7c855b19f2c0 100644 --- a/tests/atf_python/sys/net/vnet.py +++ b/tests/atf_python/sys/net/vnet.py @@ -82,13 +82,9 @@ class VnetInterface(object): def set_jailed(self, jailed: bool): self.jailed = jailed - def run_cmd( - self, - cmd, - verbose=False, - ): + def run_cmd(self, cmd, verbose=False): if self.vnet_name and not self.jailed: - cmd = "jexec {} {}".format(self.vnet_name, cmd) + cmd = "/usr/sbin/jexec {} {}".format(self.vnet_name, cmd) return run_cmd(cmd, verbose) @classmethod @@ -189,7 +185,7 @@ class IfaceFactory(object): def cleanup_vnet_interfaces(self, vnet_name: str) -> List[str]: """Destroys""" ifaces_lst = ToolsHelper.get_output( - "/usr/sbin/jexec {} ifconfig -l".format(vnet_name) + "/usr/sbin/jexec {} /sbin/ifconfig -l".format(vnet_name) ) for iface_name in ifaces_lst.split(): if not self.is_autodeleted(iface_name): @@ -197,7 +193,7 @@ class IfaceFactory(object): print("Skipping interface {}:{}".format(vnet_name, iface_name)) continue run_cmd( - "/usr/sbin/jexec {} ifconfig {} destroy".format(vnet_name, iface_name) + "/usr/sbin/jexec {} /sbin/ifconfig {} destroy".format(vnet_name, iface_name) ) def cleanup(self): @@ -231,7 +227,7 @@ class VnetInstance(object): def run_vnet_cmd(self, cmd): if not self.attached: - cmd = "jexec {} {}".format(self.name, cmd) + cmd = "/usr/sbin/jexec {} {}".format(self.name, cmd) return run_cmd(cmd) def disable_dad(self): @@ -269,7 +265,7 @@ class VnetFactory(object): @staticmethod def _wait_interfaces(vnet_name: str, ifaces: List[str]) -> List[str]: - cmd = "jexec {} /sbin/ifconfig -l".format(vnet_name) + cmd = "/usr/sbin/jexec {} /sbin/ifconfig -l".format(vnet_name) not_matched: List[str] = [] for i in range(50): vnet_ifaces = run_cmd(cmd).strip().split(" ") From nobody Fri Oct 13 19:31: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 4S6c7v6V5Cz4wgZn; Fri, 13 Oct 2023 19:31: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 4S6c7v5fhpz4Y0S; Fri, 13 Oct 2023 19:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697225499; 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=HqqfaW6sfSQdORgi1B3vfKeDuVXXi5Au/dQLsS4uhRY=; b=jI/odyzHnCpGmI/0RmeWtQdTY0pGAQsqFeEjBISWUDfWXrBkvPsXhsYwF5RPX4ldzY7/BI +4p/TQkPpF2ge41ZEAHCKoRJiiL5WFNwCqYS3yuwAJCMHVWIXMHRfpui9sskanLceO8rL4 AdG0803slkzaVsyIoi8PMJVEMAd5eVGpyqxV9w5z2DB8iITBDAxMjvEtL4Knl+clkr0wP9 GlIqBPK1atwn1U/q8tNBP0FImdebRBI5TfexOeBy+5hjSo9GL1I8arLtFE5b0ddQ746us6 ZzpAi2ecjg3w+yYq4r0iAlXXsw/jIV8V7OLpqME5Mel8P2hBP27hR20iTD+Plw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697225499; a=rsa-sha256; cv=none; b=gNkDnqRk7+WHkX2fAzRfdbvxqqsrCmP+DB4AL8MMiYcIxWPQZydenN7YyMOmtT0Zv/9CNc j64DfAANpuQ4BhGgDgE3mLudyrQAnFzlPI7CwITErCOAioeIi/B/kysccbLFx67HBJ9AM7 QsyKpbeo80ICTErCNIhzuf8ZO9M1INumg9sXzybtYBJea14o7CqZNTUNBRzBlKVNrjcP0v ijx0QrmaFZJBHZgRDfgmMI1VtnsMSHSvbkUtrIhjWzz20HsXGC6pjqaed/QSDoUhCd8Vx9 CN74ytBKvRNLtllow4WiMBMI7yF/RbG1i75QOTCfTToUz+STZkezzL0ijthRmQ== 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=1697225499; 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=HqqfaW6sfSQdORgi1B3vfKeDuVXXi5Au/dQLsS4uhRY=; b=DsrkXTMqFtpQ77H+aUKNjG29/He2PbHap8JMYwmrRx49WJh+dhV4di+ytYE9fFKsWy4B6I A77BSdq0zmdDYocRnCoMZOCorFHsTBTzKidEo9Czq1/4h47uvydY0O+9StF5GYxDUinuQ3 EjyK4+oEQP2D2w5D5FL5a1uRS352/7iff5JAMvTisnKQdMoC1xiYyjzT1IDuDACrjH+hW9 xqnSWXSV1htDqQ2Cf796gbxOoWFwteTJSi4q+W+S7kJlYcwx0wg5L6WlSHVRkHbPnsAji7 LsGuMMA/XVA/KwbkEnUFBEXxGIpjA4jaDwdA0kACpR9gBG7QgG8/B6S8vHa/Qg== 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 4S6c7v4kgyz11Lj; Fri, 13 Oct 2023 19:31: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 39DJVdfs097963; Fri, 13 Oct 2023 19:31:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DJVdOp097960; Fri, 13 Oct 2023 19:31:39 GMT (envelope-from git) Date: Fri, 13 Oct 2023 19:31:39 GMT Message-Id: <202310131931.39DJVdOp097960@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: 8a30ab5369f7 - main - atf_python: Set verbosity for commands in a vnet 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: 8a30ab5369f71dfea3e82e6830bcb9aa99ee08dc Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8a30ab5369f71dfea3e82e6830bcb9aa99ee08dc commit 8a30ab5369f71dfea3e82e6830bcb9aa99ee08dc Author: Jose Luis Duran AuthorDate: 2023-10-12 16:15:04 +0000 Commit: Mark Johnston CommitDate: 2023-10-13 19:31:30 +0000 atf_python: Set verbosity for commands in a vnet Reviewed by: markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/865 --- tests/atf_python/sys/net/vnet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/atf_python/sys/net/vnet.py b/tests/atf_python/sys/net/vnet.py index 7c855b19f2c0..b591501856b9 100644 --- a/tests/atf_python/sys/net/vnet.py +++ b/tests/atf_python/sys/net/vnet.py @@ -225,10 +225,10 @@ class VnetInstance(object): self.pipe = None self.subprocess = None - def run_vnet_cmd(self, cmd): + def run_vnet_cmd(self, cmd, verbose=True): if not self.attached: cmd = "/usr/sbin/jexec {} {}".format(self.name, cmd) - return run_cmd(cmd) + return run_cmd(cmd, verbose) def disable_dad(self): self.run_vnet_cmd("/sbin/sysctl net.inet6.ip6.dad_count=0") From nobody Fri Oct 13 19:31: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 4S6c7w74y2z4wgSY; Fri, 13 Oct 2023 19:31: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 4S6c7w6dCGz4Y7Y; Fri, 13 Oct 2023 19:31:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697225500; 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=+VgHxO6sclfPPxx1VBuNFS8Ir+lmIT6bCY9cAW9Hexc=; b=Ohq8DYck2Cw5c4h/vIgXx2kkmh1gfRbbwUlbs5o5yT1PseJmyd3YLn4lqSXrhlyRY44R6U 8QCrnVJO8zC4JQiODowInyEIUgRYPW9t+XMuHGOAgF1cdsVCtOtxsJAFHPC873gz3Qpu2w 7dThyfeFxIOFA0+sOCe2MzbOmoGqJ2KrCQk9AD7MLhVtT2rHNCDLwp5g6N0qepu5coCgh7 zyB67gGL5jfoTLOoZCwIitCSmWy2aezICBDoJ6MihehdwT8K5KDv63s2rIvswizjv9GLBG nIkB0kcqrUe3OWn009LsQQJ+AQmmwlm65nYZ6L62aFg+uRFQEzPuvsNZY3K0Sw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697225500; a=rsa-sha256; cv=none; b=o3slDu2hNgOKQsi/sh4XTlCNScNPwvfA+rPdW5EVElkSr1PNrrm3Pklnm2WEbuIUw2kFA/ kRJHXOgcVHdiy/Vup/yGWI5LMV33iMotaq+CFDFAVcHMzopsqGOjMGYzzwIjsOjb7zNsTF 60xRj4k3krM73tGDxFxyRiMZTfqVWja78I+1KbSqarJY9sj/8Xw9hnvQjUZ92lyDCwHvEc 7sBCHhuQym0FIJXrlTlCnfvwwqLzUVQhvuIMhMjKkHthdbh7A+2ohxaZYZZmMzmxl7cD2m Ba06sAgk/CeNTjRHv1ypxbxA2K0cmP5gZg7lwrMrk+g33+t0kURA+PWnB4uITw== 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=1697225500; 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=+VgHxO6sclfPPxx1VBuNFS8Ir+lmIT6bCY9cAW9Hexc=; b=GzKOd+duzKWdMlBe1gzUzJ4mpH2AZC/OOp5+I4OF4sGMjas17sxr2PPSBMMG0bRo+ljGbN m8OJaAnKLWDgdv9+RFFwT9SYmStsWSvaCvGRHKut2M8GwWqTyFc69Kyul34qq2STE43J0s Y4JKuRR+5jA8UpoZm2ThMWwSf1zKT+XxyFsNpYXbWqgiKaNUm8VnIx8xlhQxeiW8bcEP27 WbzfI4LnVad2Hw7sUsJ72TW/4Yp5dSu1mwau4Bt2v7qvQ4BuJLtyabt4CrtF7fUXIkPK8D JCiBMH0awejpVzQEpZvgEX0iifw3JOf92b4lIQNuCzQnI3GRWnFwuhnAzZhXYw== 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 4S6c7w5hbRz11Jq; Fri, 13 Oct 2023 19:31: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 39DJVejd098009; Fri, 13 Oct 2023 19:31:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DJVerE098006; Fri, 13 Oct 2023 19:31:40 GMT (envelope-from git) Date: Fri, 13 Oct 2023 19:31:40 GMT Message-Id: <202310131931.39DJVerE098006@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: d4a5d4952e6e - main - atf_python: Standardize custom sections 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: d4a5d4952e6ee7bf2e3786845d859d0ab7a58229 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d4a5d4952e6ee7bf2e3786845d859d0ab7a58229 commit d4a5d4952e6ee7bf2e3786845d859d0ab7a58229 Author: Jose Luis Duran AuthorDate: 2023-10-12 14:52:52 +0000 Commit: Mark Johnston CommitDate: 2023-10-13 19:31:30 +0000 atf_python: Standardize custom sections To be replaced with pytest's section/add_report_section. Reviewed by: markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/865 --- tests/atf_python/sys/net/vnet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/atf_python/sys/net/vnet.py b/tests/atf_python/sys/net/vnet.py index b591501856b9..67fe15fff69c 100644 --- a/tests/atf_python/sys/net/vnet.py +++ b/tests/atf_python/sys/net/vnet.py @@ -489,7 +489,7 @@ class VnetTestTemplate(BaseTest): # pytest test id: file::class::test_name topology_id = get_topology_id(self.test_id) - print("==== vnet cleanup ===") + print("============= vnet cleanup =============") print("# topology_id: '{}'".format(topology_id)) VnetFactory(topology_id).cleanup() IfaceFactory().cleanup() From nobody Fri Oct 13 19:50: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 4S6cYc3CB4z4whcl; Fri, 13 Oct 2023 19:50: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 4S6cYc2M0fz4b3w; Fri, 13 Oct 2023 19:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697226628; 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=qRdEIKNwl4IqJ4F8ZpRph766+dw9FRhpZpGDk0gB4VQ=; b=yJ6A48BidW7i/RrvrrubsExUGDRxVDPJNuUUhR0u7hPjvcFaTsT14Qdkl3Th4Whdym76Yr jeMk3PwRx5IIhePzYqcm1zXkUws/pkQCS6f6QUNDDni7fkExiIsrWwJboccFWIwpnnPyX8 0Te2UPcnqSkRhfpdfjNJoOeRQZLJ4TqOsWewGmT9gXZ6XK+q3KHJcaT3sXIA07HyNChcCo +6pSt5xmNlJLJBMmNQCUOwsgvmiOwpp6vEO/toUVjOe2dQ7PsdCFATuz2CuFXGTSU1/llA EF2IEyb25kI4rqKfp4kiQBOCgPVuHsx4c+dJs52RX/At4KgOOOVdCxkUlzVqFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697226628; a=rsa-sha256; cv=none; b=K5YP4MEqGrxFJl4A05OYVMQ0uxt19VQlElsyeN4CrJ1jKmDChspAlVNs/I4B8qj8dHvnj9 yvgkpmd4Z5aChmIIIo1cWSQu4CKQytHA5RzD796lZyBvHJr+4ATdjYFioqHVbz9SBpVpTu w2uOq0fro2Qq1Yy+oMnmlNimIMKXY4nrV3s9aZTBALgwy6g7Ocr4vR/OH5rRAZ61NogFii oFMTklb54ZaJzZ8d4dVrjlvLiCxc131DkR73po8smrjtPFAE0H6VHczz5EZHILKZksHgQH o4sqDA0qCM2gLgBoxqCOyogcbYXJZ0qT/SXERx4SVvz9v7wryld2/9bPgYQgnw== 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=1697226628; 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=qRdEIKNwl4IqJ4F8ZpRph766+dw9FRhpZpGDk0gB4VQ=; b=N0vaNDo5zsGjy4d2wOSPX3z7QK3KtkI30LWTarHLbky5eVVgX48C57lZQS8sro2jAhQ++c yPhKw8ekPXylHndWLhluucaowHpHL91Q1fr82vFbsZ36ZbJsvn/3Ku0nU0VI49iX8xj5la T35HwnqvKmtP1xfn1GjMSPiZPmE7Bis4ERU9PZv9UKZ0EwTluBUn6aCN39RpGUwh0v+0f8 dxWxO4uqxp9JV/BEODwdgR4T+gX8emNw0GRtEg7vk42ifWTKXO9uQjq2HPrEkKKEkrPbZx mFIGd+Tmhjc9tNZ7TwyEz32vax601ggpAhZXm559R+VRqzUSCNCFP19I5xux6g== 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 4S6cYc1QCWz11f2; Fri, 13 Oct 2023 19:50: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 39DJoS08024176; Fri, 13 Oct 2023 19:50:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DJoSed024173; Fri, 13 Oct 2023 19:50:28 GMT (envelope-from git) Date: Fri, 13 Oct 2023 19:50:28 GMT Message-Id: <202310131950.39DJoSed024173@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: 922337e8d398 - main - Handle MOVED_LIBS in list-old-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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 922337e8d3989e4f54a0338b7fc397e3e0af7832 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=922337e8d3989e4f54a0338b7fc397e3e0af7832 commit 922337e8d3989e4f54a0338b7fc397e3e0af7832 Author: Ed Maste AuthorDate: 2023-10-13 18:06:58 +0000 Commit: Ed Maste CommitDate: 2023-10-13 19:50:07 +0000 Handle MOVED_LIBS in list-old-files MOVED_LIBS is used when a library moves from one directory to another, e.g. /usr/lib/libc++.so.1 to /lib/libc++.so.1. delete-old-files and delete-old-libs are two separate steps, so that old libraries can be retained until third party software packages are rebuilt or reinstalled. Having two copies of the same shared library with the same so version (as can happen when delete-old-libs hasn't been run) causes trouble. The PR below gives one example. Libraries listed in MOVED_LIBS are logically equivalent to updating a library without changing the so version, and should be removed as soon as possible. Handle them in list-old-files and thus delete-old-files. Leave them also in *-old-libs for now, in case the user updates their tree between running delete-old-files and delete-old-libs. PR: 272642 Reviewed by: dim MFC after: 3 days Sponsored by: The FreeBSD Foundation Co-authored-by: Dimitry Andric Differential Revision: https://reviews.freebsd.org/D42197 --- Makefile.inc1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index 7776b40a9801..67dce43e5228 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -3306,6 +3306,7 @@ list-old-files: .PHONY @cd ${.CURDIR}; \ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V "OLD_FILES:ts\n" -V "OLD_FILES:Musr/share/*.gz:R:ts\n" \ + -V "MOVED_LIBS:ts\n" \ ${_ALL_libcompats:@v@-V "OLD_FILES:Mlib/*.so.*:S,^lib,usr/lib$v,:ts\n"@} \ ${_ALL_libcompats:@v@-V "OLD_FILES:Musr/lib/*:S,^usr/lib,usr/lib$v,:ts\n"@} | \ sort From nobody Fri Oct 13 22:02:48 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 4S6gVJ6rG8z4wrP6; Fri, 13 Oct 2023 22:02: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 4S6gVJ6CS0z4n4w; Fri, 13 Oct 2023 22:02:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697234568; 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=LMcGWznJvKqPX8Ba7fqc50lfCD1eNq4MFoOiB/ItJm4=; b=PWmVSapVlZzwngNfMPcI4v6EdIw6FvLgixCtW8Tfbg6LKS5jF1OTBY67MUcQo4IdFvtqaO U6GiXX5t4rhtbHlhOx+KDw5NnQGCIr9J42wVCyCRplip4Qa4UkGnWAw9P9ulXYm2wAJOzk JkSCS1JquJS2UL8Qi2gJj2TfEHopx5l3kOWuESL5tsfIiErKVvPBAdcUGiaE1SUhk3Lhav 3c4Ol00ytPTnbkP9+xM+KA7unSXwm+Dm3kyQOVJHxdRGJDFiWx/hj3hnS0kMA5DUf7sfjd QSuXSVxFOnYzkdvKH9QRympqOn95Zx1gYTjRJxmP1T/FNlaKliuCJm8AaPTVDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697234568; a=rsa-sha256; cv=none; b=L95gV3YuYLxO/hp6GeAmD0M8PySMaTYCW1otVsnl4jhSY34Cu+voSABv/iLZmFG+elwtuD Y781s8jX9FrJ/LzOtOKtTcfTFuOvcrmLzDv4/K3+aqD0XKeBE9UIFjmpzsY22UVnx4hME+ VvGREqI20O8zOBcl2CDKB5D3vnEPpO6a2ydbMj0CmUbw42xq2Lqhnk9+X0jkFd0Umk1OrA 7PkEQTcGFVnPvm3C2uWz8FWjx585JpFux/uRG2cI2NUn5EG0CX8ufVl+GSqcfBnCQBT/xw sfsHH5an289nz/caYCm+uWfablfrq8/JIaBJUdDUPh9bCs4KBGZ991lWARj3gA== 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=1697234568; 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=LMcGWznJvKqPX8Ba7fqc50lfCD1eNq4MFoOiB/ItJm4=; b=e73IPGnIUY8FBeE4Pry/IXtE3m3NS1qBBBsef54YT0vpqo3na6q7q0nr/FArBeuPWGcGKa wI+37gnZeH+aC5ISPXd5nxhCeyoknQeKsJZPF6o0MmDrCVdDA8l0WWoDBZN8a+QChpH55U LZ0QboXPC012e6hkjg43z9GICFSP+rfUqQQGgki6OaM11vzGZbyDRAgynFAy8dmvrWfkcJ R0Mk7GBCxFfa63SyNBD3a5SY3Sd8qDXXdkfJKkHycgnGBCfwAJDN7HPrkRJ4lZEgcweDow jx5bavT/f11UwIpGVFwvqpG4g/P8HO1YVy181+bvodka1s0R8wgUz6f/NuuOpA== 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 4S6gVJ5Clfz14q1; Fri, 13 Oct 2023 22:02:48 +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 39DM2mnI047667; Fri, 13 Oct 2023 22:02:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39DM2mM6047664; Fri, 13 Oct 2023 22:02:48 GMT (envelope-from git) Date: Fri, 13 Oct 2023 22:02:48 GMT Message-Id: <202310132202.39DM2mM6047664@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chuck Silvers Subject: git: c545a7b2c7db - main - prf: add setting of msgbuftrigger in paths where it is 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: chs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c545a7b2c7db90b7647ef0a4f1fce05e4d7664a0 Auto-Submitted: auto-generated The branch main has been updated by chs: URL: https://cgit.FreeBSD.org/src/commit/?id=c545a7b2c7db90b7647ef0a4f1fce05e4d7664a0 commit c545a7b2c7db90b7647ef0a4f1fce05e4d7664a0 Author: Chuck Silvers AuthorDate: 2023-10-13 22:00:34 +0000 Commit: Chuck Silvers CommitDate: 2023-10-13 22:02:37 +0000 prf: add setting of msgbuftrigger in paths where it is missing Logging things to msgbuf is supposed to set msgbuftrigger so that syslogd will notice that there is more to read from /dev/klog, but several paths do not do that. Add the missing trigger. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D42173 --- sys/kern/subr_prf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index f2be2f0dc664..5c06bf8270f6 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -422,8 +422,10 @@ static void prf_putchar(int c, int flags, int pri) { - if (flags & TOLOG) + if (flags & TOLOG) { msglogchar(c, pri); + msgbuftrigger = 1; + } if (flags & TOCONS) { if ((!KERNEL_PANICKED()) && (constty != NULL)) @@ -438,8 +440,10 @@ static void prf_putbuf(char *bufr, int flags, int pri) { - if (flags & TOLOG) + if (flags & TOLOG) { msglogstr(bufr, pri, /*filter_cr*/1); + msgbuftrigger = 1; + } if (flags & TOCONS) { if ((!KERNEL_PANICKED()) && (constty != NULL)) From nobody Sat Oct 14 02:10: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 4S6n080cfmz4x7VC; Sat, 14 Oct 2023 02:10:32 +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 4S6n0800Wxz3gpP; Sat, 14 Oct 2023 02:10:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697249432; 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=hg2BJ2MCcsIiUnHgfsm34wHX4zdZBNdMQ8XRlpFpfLg=; b=V1DanfyO9sw9QH21tD1+P2Wb+lEK3Vdmcx5On5dclP9PaJf7VoJH83SgxJIHgHQfe5iu6W dzka37hoMyaGApYTsoJ5lP+DpO27Nh6/uBfZA/BFOqK8Jg6Q6oMC2+ay4IBK7IhjsxLVTY 0b/jkNbTWC6RAfDJ6/oy7n6CoaeITlf8/GB2TvibwQSxJyoTBFYqp/4BHteBtn5I792wRc 5utLNGU++ypE1fhnyc3DXEdheq2ioKfTRBZobK1kNLtoDxN691WHbjf1vRoreGX+CLezIF PX3ixkxJDpU7Mrfti44qrnSy1ogoahlJ4M5HB2mk4b3+VNil91tHo1OsHj5UiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697249432; a=rsa-sha256; cv=none; b=PwWD9zTntoKy/wRx7GyJ6KTLZiHL8SVG+a9IpoZjj0S9VbgUrfSv3F7zuu8RbyqndWjNyu kqq/y760twwZPpOesOy6f0kVT+c0YuhaiWeB8slMAZbKmRwxqqqSVTuZkATJKDDzR55f0C khvR9ctNcCLJhtzNB0cWM4yzdjK4n2bO0O4fHyYr5K4ZA/dS6GZMv+3FaVl7FpPknasKI8 LA1OI5S2aWxVfk0kCgYxOjYceOC0ZC4IOb4ylaFYHeStLdTjOw3wAfB4Rsrr54FTDCA406 SncRZBfCohW8ElNxcUXvXFF2/n4mJ08GNZbV0/tyRbPnKEaFoDioN5NXkylT1g== 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=1697249432; 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=hg2BJ2MCcsIiUnHgfsm34wHX4zdZBNdMQ8XRlpFpfLg=; b=TYSy+HyRSsbz82rx2Whp+PRLDOLTkc/F0h9+fp8XHy7TSQkfsFIWsor5BBYyS8FqwzfDBM xPqiCBJm/QVZK6qRgsJOuaa0XzfSa3+nSyprqpF9vonkipuKqtXXIops8GJIY+KBR9wbaf JHVaEGHgTZ8oDaOkGwtQfJUHSyA5UAVC2ENcl57zyf64mMBeaF4RZ/d8Znf0b1L0M32o6l YzzDtZlewTQsjR58XEB4mSABwRnQsPSAyWQkqcZKiKffpih/edMWeCmUnZDOf+k0rvGd4X bJfL3j2jCZcDsSuVLKKgH4F+Wc7+RuPUQCtz7EUmuZkpnY5ggCB9h352NsFoSA== 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 4S6n0764KXz1Bth; Sat, 14 Oct 2023 02:10: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 39E2AVoY061128; Sat, 14 Oct 2023 02:10:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39E2AV7M061125; Sat, 14 Oct 2023 02:10:31 GMT (envelope-from git) Date: Sat, 14 Oct 2023 02:10:31 GMT Message-Id: <202310140210.39E2AV7M061125@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: a5ed6a815e38 - main - ptsname.3: accommodate upcoming POSIX Issue 8 ptsname_r 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: a5ed6a815e38d6c622cd97a6020592ded579cf7a Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a5ed6a815e38d6c622cd97a6020592ded579cf7a commit a5ed6a815e38d6c622cd97a6020592ded579cf7a Author: Ed Maste AuthorDate: 2023-10-13 20:25:53 +0000 Commit: Ed Maste CommitDate: 2023-10-14 02:10:21 +0000 ptsname.3: accommodate upcoming POSIX Issue 8 ptsname_r POSIX has accepted a proposal[1] to add glibc-compatible ptsname_r. It indicates an error by returning the error number, rather than returning -1 and setting errno. Update RETURN VALUES in ptsname_r's man page now to encourage folks to test that the return value != 0 rather than == -1. [1] https://www.austingroupbugs.net/bug_view_page.php?bug_id=508 Reported by: Collin Funk Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42204 --- lib/libc/stdlib/ptsname.3 | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdlib/ptsname.3 b/lib/libc/stdlib/ptsname.3 index 532ce9e92ae0..df23e9ae6129 100644 --- a/lib/libc/stdlib/ptsname.3 +++ b/lib/libc/stdlib/ptsname.3 @@ -29,7 +29,7 @@ .\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS .\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 17, 2020 +.Dd October 14, 2023 .Dt PTSNAME 3 .Os .Sh NAME @@ -104,7 +104,7 @@ function clears the lock held on the pseudo-terminal pair for the master device specified with .Fa fildes . .Sh RETURN VALUES -.Rv -std grantpt ptsname_r unlockpt +.Rv -std grantpt unlockpt .Pp The .Fn ptsname @@ -112,6 +112,19 @@ function returns a pointer to the name of the slave device on success; otherwise a .Dv NULL pointer is returned. +.Pp +The +.Fn ptsname_r +function returns the value 0 if successful; +otherwise a nonzero value is returned and the global variable +.Va errno +is set to indicate the error. +Note: +.Fn ptsname_r +was previously documented as returning -1 on error. +In the future it will be changed to return an error number, for POSIX +compatibility. +Therefore, callers should not check for -1. .Sh ERRORS The .Fn grantpt , From nobody Sat Oct 14 13:28: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 4S742N0t4qz4wlS2; Sat, 14 Oct 2023 13:28:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 4S742M4hpZz3T7G; Sat, 14 Oct 2023 13:28:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 39EDSEhc028126 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 14 Oct 2023 16:28:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 39EDSEhc028126 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 39EDSEvq028125; Sat, 14 Oct 2023 16:28:14 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 14 Oct 2023 16:28:14 +0300 From: Konstantin Belousov To: Mitchell Horne Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 74e4a8d208f0 - main - pmap: add pmap_kextract(9) man page Message-ID: References: <202310131827.39DIRXsu082741@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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202310131827.39DIRXsu082741@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home 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:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4S742M4hpZz3T7G On Fri, Oct 13, 2023 at 06:27:33PM +0000, Mitchell Horne wrote: > The branch main has been updated by mhorne: > > URL: https://cgit.FreeBSD.org/src/commit/?id=74e4a8d208f0b3cf2525e3786f3efba71fcdb752 > > commit 74e4a8d208f0b3cf2525e3786f3efba71fcdb752 > Author: Mina Galić > AuthorDate: 2023-08-23 00:12:49 +0000 > Commit: Mitchell Horne > CommitDate: 2023-10-13 18:27:24 +0000 > > pmap: add pmap_kextract(9) man page > > Add a man page for pmap_kextract(9), with alias to vtophys(9). This man > page is based on pmap_extract(9). > > Add it as cross reference in pmap(9), and add comments above the > function implementations. > > Co-authored-by: Graham Perrin > Co-authored-by: mhorne > Sponsored by: The FreeBSD Foundation > Pull Request: https://github.com/freebsd/freebsd-src/pull/827 > --- > share/man/man9/Makefile | 2 ++ > share/man/man9/pmap.9 | 1 + > share/man/man9/pmap_kextract.9 | 65 ++++++++++++++++++++++++++++++++++++++++++ > sys/amd64/amd64/pmap.c | 8 +++++- > sys/arm64/arm64/pmap.c | 6 ++++ > sys/riscv/riscv/pmap.c | 6 ++++ > 6 files changed, 87 insertions(+), 1 deletion(-) > > diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile > index 0b56a47db332..6768f52a38d6 100644 > --- a/share/man/man9/Makefile > +++ b/share/man/man9/Makefile > @@ -268,6 +268,7 @@ MAN= accept_filter.9 \ > pmap_copy.9 \ > pmap_enter.9 \ > pmap_extract.9 \ > + pmap_kextract.9 \ > pmap_growkernel.9 \ > pmap_init.9 \ > pmap_is_modified.9 \ > @@ -1807,6 +1808,7 @@ MLINKS+=PHOLD.9 PRELE.9 \ > PHOLD.9 PROC_ASSERT_NOT_HELD.9 > MLINKS+=pmap_copy.9 pmap_copy_page.9 > MLINKS+=pmap_extract.9 pmap_extract_and_hold.9 > +MLINKS+=pmap_kextract.9 vtophys.9 > MLINKS+=pmap_init.9 pmap_init2.9 > MLINKS+=pmap_is_modified.9 pmap_ts_referenced.9 > MLINKS+=pmap_pinit.9 pmap_pinit0.9 \ > diff --git a/share/man/man9/pmap.9 b/share/man/man9/pmap.9 > index 3f6a0f63c264..db27fe880afc 100644 > --- a/share/man/man9/pmap.9 > +++ b/share/man/man9/pmap.9 > @@ -97,6 +97,7 @@ operation. > .Xr pmap_init2 9 , > .Xr pmap_is_modified 9 , > .Xr pmap_is_prefaultable 9 , > +.Xr pmap_kextract 9 , > .Xr pmap_map 9 , > .Xr pmap_mincore 9 , > .Xr pmap_object_init_pt 9 , > diff --git a/share/man/man9/pmap_kextract.9 b/share/man/man9/pmap_kextract.9 > new file mode 100644 > index 000000000000..dd73446648f2 > --- /dev/null > +++ b/share/man/man9/pmap_kextract.9 > @@ -0,0 +1,65 @@ > +.\" > +.\" SPDX-License-Identifier: BSD-2-Clause > +.\" > +.\" Copyright (c) 2023 The FreeBSD Foundation > +.\" > +.\" This manual page was written by Mina Galić under > +.\" sponsorship from the FreeBSD Foundation. > +.\" > +.Dd August 24, 2023 > +.Dt PMAP_KEXTRACT 9 > +.Os > +.Sh NAME > +.Nm pmap_kextract , > +.Nm vtophys > +.Nd extract a physical address from the kernel page table > +.Sh SYNOPSIS > +.In sys/param.h > +.In vm/vm.h > +.In vm/pmap.h > +.Ft vm_paddr_t > +.Fo pmap_kextract > +.Fa "vm_offset_t va" > +.Fc > +.Ft vm_paddr_t > +.Fo vtophys > +.Fa "vm_offset_t va" > +.Fc > +.Sh DESCRIPTION > +The > +.Fn pmap_kextract > +function retrieves the underlying physical memory address corresponding to the given kernel virtual address Line too long. > +.Fa va . > +The value of > +.Fa va > +must correlate to an active mapping in the kernel address space. What does it mean 'correlate'? > +.Pp > +.Fn vtophys > +is an alias for > +.Fn pmap_kextract > +and behaves identically. > +.Sh RETURN VALUES > +The > +.Fn pmap_kextract > +function will return the physical address > +.Pq Vt vm_paddr_t > +associated with the kernel virtual address and 'associated'? The function returns address of physical memory mapped at the supplied kernel virtual address. > +.Fa va . > +.Pp > +.Fn pmap_kextract > +generally does not fail. > +However, if supplied with an illegitimate value for > +.Fa va , > +the function may return zero, an invalid non-zero value, or call > +.Xr panic 9 . > +.Sh SEE ALSO > +.Xr pmap 9 , > +.Xr pmap_extract 9 > +.Sh AUTHORS > +.An -nosplit > +This manual page was written by > +.An Mina Galić Aq Mt FreeBSD@igalic.co , > +based on the > +.Xr pmap_extract 9 > +page written by > +.An Bruce M Simpson Aq Mt bms@spc.org . > diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c > index ff83d8749313..8c438cfb4639 100644 > --- a/sys/amd64/amd64/pmap.c > +++ b/sys/amd64/amd64/pmap.c > @@ -3846,7 +3846,7 @@ pmap_flush_cache_phys_range(vm_paddr_t spa, vm_paddr_t epa, vm_memattr_t mattr) > * Extract the physical page address associated > * with the given map/virtual_address pair. > */ > -vm_paddr_t > +vm_paddr_t > pmap_extract(pmap_t pmap, vm_offset_t va) > { > pdp_entry_t *pdpe; > @@ -3933,6 +3933,12 @@ out: > return (m); > } > > +/* > + * Routine: pmap_kextract > + * Function: > + * Extract the physical page address associated with the given kernel > + * virtual address. > + */ > vm_paddr_t > pmap_kextract(vm_offset_t va) > { > diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c > index 6f2afa0b98a3..8c2c6f9d7b81 100644 > --- a/sys/arm64/arm64/pmap.c > +++ b/sys/arm64/arm64/pmap.c > @@ -1949,6 +1949,12 @@ pmap_klookup(vm_offset_t va, vm_paddr_t *pa) > return (true); > } > > +/* > + * Routine: pmap_kextract > + * Function: > + * Extract the physical page address associated with the given kernel > + * virtual address. > + */ > vm_paddr_t > pmap_kextract(vm_offset_t va) > { > diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c > index 49ee54b37918..66054898b281 100644 > --- a/sys/riscv/riscv/pmap.c > +++ b/sys/riscv/riscv/pmap.c > @@ -970,6 +970,12 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) > return (m); > } > > +/* > + * Routine: pmap_kextract > + * Function: > + * Extract the physical page address associated with the given kernel > + * virtual address. > + */ > vm_paddr_t > pmap_kextract(vm_offset_t va) > { From nobody Sat Oct 14 17:34: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 4S79Vr6TMlz4x2k9; Sat, 14 Oct 2023 17:35:00 +0000 (UTC) (envelope-from mhorne@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 4S79Vr5xhMz4RLv; Sat, 14 Oct 2023 17:35:00 +0000 (UTC) (envelope-from mhorne@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697304900; 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:autocrypt:autocrypt; bh=CNrJ13W5IcxumK2bBB6D8iNg8XCISW/lICLJf+8o0C4=; b=vcYYWxHikIdmJitGTVB8VUQmixkJt5954e2vZFe50BzfGqXi6wM8FWxzKf/KUu3ewOom0N vPKLuKNFDw99EZD3qMVXwkKoxibkDh5gZi6bf6py0fRFGUSaxnnQgg3uZcjbtkKjUuY4Fb DI/cLr5DiMiNZ/Z7owKkDC6etoxcSBDZJqmfurGslosCIoIUAWrkU0mDkabfzNTk/HD2Lg vcIL8XT7TOH0BZrUOXLDbygDIuLUABKiYYQKecGzjVbyVOVC3RZlrUE38LV1+wIAYtqm58 hguktcjyGHGlUPANev+dYyHZe6NWkoHdfr2tw1KYbOP5m+lyzs/mrI2KKUdh1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697304900; a=rsa-sha256; cv=none; b=RVmJLEGWqvZzTq5wJgeqse927HBclP44ass3lCy+uEIk89ytYpFEfjR6P725KLxOHpHIVf A/Mp7253X1kHB2wIVsXnJNdTEY9aMNBrOWJ7ByZg7xyrSf3L40/JXG1zhrJx6gPr3oxX+V n61eRkJSJNxYRJsCNZcfXR+KGw7WTdoKrZWtVhAR9UsNsXBrSe9XKuSYeRFTsqD2/hCWnR g+v9MJi55hfCAY1KtixuMa7ofcguAr9u2HauaLvLkytmhOZaZA8cxqLYoE3LhyovKtes0Q k9MSvR7znFc+SE9r/ySgUgK6By0pvEGxyGS0d9Q+KbzpTYs+Y0tfaltc7+IEjQ== 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=1697304900; 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:autocrypt:autocrypt; bh=CNrJ13W5IcxumK2bBB6D8iNg8XCISW/lICLJf+8o0C4=; b=p0hUjsR+rXsW2b/IQzE8LMbz+65pzFFr8wXTIH7XafiW+ZfsZPaSlFap1WTxaoStdnS7u/ m1S/99MgZh37Xj8oIejR2bnJGYEEgHhkAVt8Febaub/qUG5oCMUiZ5CgjD8UFOqGX+v06n tVvKB26Fk1M/0FtYJf4PfLfG0X30DQ8U2zfdIH80nwoXF2bARkPVRuC/V7wtKdysWtc/TQ QE5VsVa02ucINt/lrjkrbO6hnOv+iJmoPKDX8Puk2ndLTc04pao316c4QaLRBbykx+PitU vgjhs3466F/rjhK0Z0hjHwXkXo+uq+ilpSxq0zOZJ0fjlX8dYf7yZ2CkQWdeAQ== Received: from [192.168.1.151] (host-173-212-76-127.public.eastlink.ca [173.212.76.127]) (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: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id 4S79Vr30bRzqPm; Sat, 14 Oct 2023 17:35:00 +0000 (UTC) (envelope-from mhorne@freebsd.org) Message-ID: <068574a3-f63a-4830-be1d-2a8cd67c1819@freebsd.org> Date: Sat, 14 Oct 2023 14:34:58 -0300 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 Thunderbird Subject: Re: git: 74e4a8d208f0 - main - pmap: add pmap_kextract(9) man page Content-Language: en-CA To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202310131827.39DIRXsu082741@gitrepo.freebsd.org> From: Mitchell Horne Autocrypt: addr=mhorne@freebsd.org; keydata= xsBNBFyS2dQBCADdiXBG8hBVLmYbxu7aSzbwLwUf3HkGFz3rooS1kwyy+SfmjZ4UKNnl9WMx WKrJ7OAZpiNH6bLQ5nsqfx09OnpWL8c/QuPbhNdUywQoqqYpRI0K8GEn//nS9Gs0KTYwVpWb XlrzP+jf3Uh/9L5mcQmStLIH4zaaqMYHW+pMuPrvBmLIHTvLj2QjOkxslrcUdord9uvxe5Ht LU8RuTpQpHOKz705Z9/v7twFdi2HtKzpLwO6SzVyu351di1J+GihsVpcT5josQV5cHbIP3Un x+kmtKBEEc/jl/zBglF7ruWUtwgbryID+2ZPEaO1Mj+RResX4LFVMusq3uUpWRb5WJXxABEB AAHNI01pdGNoZWxsIEhvcm5lIDxtaG9ybmVARnJlZUJTRC5vcmc+wsCUBBMBCgA+AhsDBQsJ CAcCBhUKCQgLAgQWAgMBAh4BAheAFiEEkp/cYPcfabAiQvACi/gnTOdUid8FAmIyDpUFCQtC z0EACgkQi/gnTOdUid8IsQf+N8IptrrCgifT5Z0/WUVFfnHThFOKf4zBjaGswsIM8+VKsKnF 15jCWHODUHP6s+dcQ4nQi81PHPsnMfBSkGPvN/X3ess2/1KUVkH+6tAJbqXDjXhD8HT+i0NM QEFIXlLnotpgIKW3yOHjKv3ZvKw9LCvUjyNY9vOJmLk/6AbbkFh+INo65nXtQWb/hM5FVEHW S+zUoU8AqZRJoVAQfj9wmIfg/HdsxeDGKL0zkv5AwKpccvb8VJNGJbCVMgoy5uQYcUeXxcie cg0VlbFLshNQTfyhVQ85vyuHahARrUWs/k8KiYODoBnW1ChtyF8yM6VZTzSYx7pINqPq2YZy i/Htd87ATQRcktnUAQgA3zt4M4ecoQqfxpjliNLujt9klDqvmkJvWmzMuMXdzlPgGRJ0doio 9YIeEdkOt6xN0pPTK/ReCZ8WqFQ8zo23u1pwGuo0CnR58XF19wyxyUuKu/PHbt+56mC8tNHm AXsMyXQmlDqWvn/WzLY7euNRtNS4QQIwtxfM5EC4GGa5KQwxn0kM7dkUSOE/cxr+/kNbHHzb gagZR4cnNUqtPPr3dYXcibCTzgz96Lyt3/qMLXX9RTBRzu+O6E+byxWOe8ar/ZlwY2b4wTQG mhgNttkSxKtxMpZnd8+DGV/bI1P5Ct/K2GeCwNyupQGON5ymn6o7jTch+qmFX0ItkBWO4zn4 9QARAQABwsB8BBgBCgAmAhsMFiEEkp/cYPcfabAiQvACi/gnTOdUid8FAmIyDtwFCQtCz4gA CgkQi/gnTOdUid/i5gf/aQ75pJR4TJFM2vVVr6PDIwTdl0b5EchB4w4s4g/zE84XNbMOQanb BginLYEhAacLQVAvM3XdvUEhwrhaMQdjdSEB1krResL3/mbxrtKwdHSMbHA3IS3XdvxFWTB7 P5JjUSPsW6hqgoidbn4w3OxaNHhs45H2b0Nx5QiKcSyepmCZuB52gCEHnEnrdaz8TFQMXOLq 94WbTmZeIjChW3FB61m1gTf0UEFjoZAfTAUB+pbwoCa4AykIeZnDC19vjsruVU9Gy5rLglwd bjsZNfXIJGOZNEvdF8FOBwM7DlXx7SYvTJcUNoNJjOKtQ0bYGVgGqYOB/y2mTjVuKeU0eOkN Uw== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 10/14/23 10:28, Konstantin Belousov wrote: > On Fri, Oct 13, 2023 at 06:27:33PM +0000, Mitchell Horne wrote: >> The branch main has been updated by mhorne: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=74e4a8d208f0b3cf2525e3786f3efba71fcdb752 >> >> commit 74e4a8d208f0b3cf2525e3786f3efba71fcdb752 >> Author: Mina Galić >> AuthorDate: 2023-08-23 00:12:49 +0000 >> Commit: Mitchell Horne >> CommitDate: 2023-10-13 18:27:24 +0000 >> >> pmap: add pmap_kextract(9) man page >> >> Add a man page for pmap_kextract(9), with alias to vtophys(9). This man >> page is based on pmap_extract(9). >> >> Add it as cross reference in pmap(9), and add comments above the >> function implementations. >> >> Co-authored-by: Graham Perrin >> Co-authored-by: mhorne >> Sponsored by: The FreeBSD Foundation >> Pull Request: https://github.com/freebsd/freebsd-src/pull/827 >> --- >> share/man/man9/Makefile | 2 ++ >> share/man/man9/pmap.9 | 1 + >> share/man/man9/pmap_kextract.9 | 65 ++++++++++++++++++++++++++++++++++++++++++ >> sys/amd64/amd64/pmap.c | 8 +++++- >> sys/arm64/arm64/pmap.c | 6 ++++ >> sys/riscv/riscv/pmap.c | 6 ++++ >> 6 files changed, 87 insertions(+), 1 deletion(-) >> >> diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile >> index 0b56a47db332..6768f52a38d6 100644 >> --- a/share/man/man9/Makefile >> +++ b/share/man/man9/Makefile >> @@ -268,6 +268,7 @@ MAN= accept_filter.9 \ >> pmap_copy.9 \ >> pmap_enter.9 \ >> pmap_extract.9 \ >> + pmap_kextract.9 \ >> pmap_growkernel.9 \ >> pmap_init.9 \ >> pmap_is_modified.9 \ >> @@ -1807,6 +1808,7 @@ MLINKS+=PHOLD.9 PRELE.9 \ >> PHOLD.9 PROC_ASSERT_NOT_HELD.9 >> MLINKS+=pmap_copy.9 pmap_copy_page.9 >> MLINKS+=pmap_extract.9 pmap_extract_and_hold.9 >> +MLINKS+=pmap_kextract.9 vtophys.9 >> MLINKS+=pmap_init.9 pmap_init2.9 >> MLINKS+=pmap_is_modified.9 pmap_ts_referenced.9 >> MLINKS+=pmap_pinit.9 pmap_pinit0.9 \ >> diff --git a/share/man/man9/pmap.9 b/share/man/man9/pmap.9 >> index 3f6a0f63c264..db27fe880afc 100644 >> --- a/share/man/man9/pmap.9 >> +++ b/share/man/man9/pmap.9 >> @@ -97,6 +97,7 @@ operation. >> .Xr pmap_init2 9 , >> .Xr pmap_is_modified 9 , >> .Xr pmap_is_prefaultable 9 , >> +.Xr pmap_kextract 9 , >> .Xr pmap_map 9 , >> .Xr pmap_mincore 9 , >> .Xr pmap_object_init_pt 9 , >> diff --git a/share/man/man9/pmap_kextract.9 b/share/man/man9/pmap_kextract.9 >> new file mode 100644 >> index 000000000000..dd73446648f2 >> --- /dev/null >> +++ b/share/man/man9/pmap_kextract.9 >> @@ -0,0 +1,65 @@ >> +.\" >> +.\" SPDX-License-Identifier: BSD-2-Clause >> +.\" >> +.\" Copyright (c) 2023 The FreeBSD Foundation >> +.\" >> +.\" This manual page was written by Mina Galić under >> +.\" sponsorship from the FreeBSD Foundation. >> +.\" >> +.Dd August 24, 2023 >> +.Dt PMAP_KEXTRACT 9 >> +.Os >> +.Sh NAME >> +.Nm pmap_kextract , >> +.Nm vtophys >> +.Nd extract a physical address from the kernel page table >> +.Sh SYNOPSIS >> +.In sys/param.h >> +.In vm/vm.h >> +.In vm/pmap.h >> +.Ft vm_paddr_t >> +.Fo pmap_kextract >> +.Fa "vm_offset_t va" >> +.Fc >> +.Ft vm_paddr_t >> +.Fo vtophys >> +.Fa "vm_offset_t va" >> +.Fc >> +.Sh DESCRIPTION >> +The >> +.Fn pmap_kextract >> +function retrieves the underlying physical memory address corresponding to the given kernel virtual address > Line too long. > >> +.Fa va . >> +The value of >> +.Fa va >> +must correlate to an active mapping in the kernel address space. > What does it mean 'correlate'? > 'correlate' means that the relationship exists in both directions. We could describe an address as "belonging to" a VA->PA mapping, or we could say that an address "posseses" such a mapping. Maybe you have a strong opinion on why one is incorrect. Since 'correlate' is not established terminology, and needlessly confusing, I can simplify it to: "The value of va must belong to an active mapping in..." If you have a different suggestion, let me know. >> +.Pp >> +.Fn vtophys >> +is an alias for >> +.Fn pmap_kextract >> +and behaves identically. >> +.Sh RETURN VALUES >> +The >> +.Fn pmap_kextract >> +function will return the physical address >> +.Pq Vt vm_paddr_t >> +associated with the kernel virtual address > and 'associated'? > > The function returns address of physical memory mapped at the supplied > kernel virtual address. > Sure, this is more accurate. >> +.Fa va . >> +.Pp >> +.Fn pmap_kextract >> +generally does not fail. >> +However, if supplied with an illegitimate value for >> +.Fa va , >> +the function may return zero, an invalid non-zero value, or call >> +.Xr panic 9 . >> +.Sh SEE ALSO >> +.Xr pmap 9 , >> +.Xr pmap_extract 9 >> +.Sh AUTHORS >> +.An -nosplit >> +This manual page was written by >> +.An Mina Galić Aq Mt FreeBSD@igalic.co , >> +based on the >> +.Xr pmap_extract 9 >> +page written by >> +.An Bruce M Simpson Aq Mt bms@spc.org . >> diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c >> index ff83d8749313..8c438cfb4639 100644 >> --- a/sys/amd64/amd64/pmap.c >> +++ b/sys/amd64/amd64/pmap.c >> @@ -3846,7 +3846,7 @@ pmap_flush_cache_phys_range(vm_paddr_t spa, vm_paddr_t epa, vm_memattr_t mattr) >> * Extract the physical page address associated >> * with the given map/virtual_address pair. >> */ >> -vm_paddr_t >> +vm_paddr_t >> pmap_extract(pmap_t pmap, vm_offset_t va) >> { >> pdp_entry_t *pdpe; >> @@ -3933,6 +3933,12 @@ out: >> return (m); >> } >> >> +/* >> + * Routine: pmap_kextract >> + * Function: >> + * Extract the physical page address associated with the given kernel >> + * virtual address. >> + */ >> vm_paddr_t >> pmap_kextract(vm_offset_t va) >> { >> diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c >> index 6f2afa0b98a3..8c2c6f9d7b81 100644 >> --- a/sys/arm64/arm64/pmap.c >> +++ b/sys/arm64/arm64/pmap.c >> @@ -1949,6 +1949,12 @@ pmap_klookup(vm_offset_t va, vm_paddr_t *pa) >> return (true); >> } >> >> +/* >> + * Routine: pmap_kextract >> + * Function: >> + * Extract the physical page address associated with the given kernel >> + * virtual address. >> + */ >> vm_paddr_t >> pmap_kextract(vm_offset_t va) >> { >> diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c >> index 49ee54b37918..66054898b281 100644 >> --- a/sys/riscv/riscv/pmap.c >> +++ b/sys/riscv/riscv/pmap.c >> @@ -970,6 +970,12 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) >> return (m); >> } >> >> +/* >> + * Routine: pmap_kextract >> + * Function: >> + * Extract the physical page address associated with the given kernel >> + * virtual address. >> + */ >> vm_paddr_t >> pmap_kextract(vm_offset_t va) >> { From nobody Sat Oct 14 18:20: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 4S7BW60Tz8z4x5Kh; Sat, 14 Oct 2023 18:20:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 4S7BW51mb4z4WZH; Sat, 14 Oct 2023 18:20:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 39EIK8LH099686 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 14 Oct 2023 21:20:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 39EIK8LH099686 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 39EIK8Nv099685; Sat, 14 Oct 2023 21:20:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 14 Oct 2023 21:20:08 +0300 From: Konstantin Belousov To: Mitchell Horne Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 74e4a8d208f0 - main - pmap: add pmap_kextract(9) man page Message-ID: References: <202310131827.39DIRXsu082741@gitrepo.freebsd.org> <068574a3-f63a-4830-be1d-2a8cd67c1819@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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <068574a3-f63a-4830-be1d-2a8cd67c1819@freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home 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:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4S7BW51mb4z4WZH On Sat, Oct 14, 2023 at 02:34:58PM -0300, Mitchell Horne wrote: > On 10/14/23 10:28, Konstantin Belousov wrote: > > On Fri, Oct 13, 2023 at 06:27:33PM +0000, Mitchell Horne wrote: > > > The branch main has been updated by mhorne: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=74e4a8d208f0b3cf2525e3786f3efba71fcdb752 > > > > > > commit 74e4a8d208f0b3cf2525e3786f3efba71fcdb752 > > > Author: Mina Galić > > > AuthorDate: 2023-08-23 00:12:49 +0000 > > > Commit: Mitchell Horne > > > CommitDate: 2023-10-13 18:27:24 +0000 > > > > > > pmap: add pmap_kextract(9) man page > > > Add a man page for pmap_kextract(9), with alias to vtophys(9). This man > > > page is based on pmap_extract(9). > > > Add it as cross reference in pmap(9), and add comments above the > > > function implementations. > > > Co-authored-by: Graham Perrin > > > Co-authored-by: mhorne > > > Sponsored by: The FreeBSD Foundation > > > Pull Request: https://github.com/freebsd/freebsd-src/pull/827 > > > --- > > > share/man/man9/Makefile | 2 ++ > > > share/man/man9/pmap.9 | 1 + > > > share/man/man9/pmap_kextract.9 | 65 ++++++++++++++++++++++++++++++++++++++++++ > > > sys/amd64/amd64/pmap.c | 8 +++++- > > > sys/arm64/arm64/pmap.c | 6 ++++ > > > sys/riscv/riscv/pmap.c | 6 ++++ > > > 6 files changed, 87 insertions(+), 1 deletion(-) > > > > > > diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile > > > index 0b56a47db332..6768f52a38d6 100644 > > > --- a/share/man/man9/Makefile > > > +++ b/share/man/man9/Makefile > > > @@ -268,6 +268,7 @@ MAN= accept_filter.9 \ > > > pmap_copy.9 \ > > > pmap_enter.9 \ > > > pmap_extract.9 \ > > > + pmap_kextract.9 \ > > > pmap_growkernel.9 \ > > > pmap_init.9 \ > > > pmap_is_modified.9 \ > > > @@ -1807,6 +1808,7 @@ MLINKS+=PHOLD.9 PRELE.9 \ > > > PHOLD.9 PROC_ASSERT_NOT_HELD.9 > > > MLINKS+=pmap_copy.9 pmap_copy_page.9 > > > MLINKS+=pmap_extract.9 pmap_extract_and_hold.9 > > > +MLINKS+=pmap_kextract.9 vtophys.9 > > > MLINKS+=pmap_init.9 pmap_init2.9 > > > MLINKS+=pmap_is_modified.9 pmap_ts_referenced.9 > > > MLINKS+=pmap_pinit.9 pmap_pinit0.9 \ > > > diff --git a/share/man/man9/pmap.9 b/share/man/man9/pmap.9 > > > index 3f6a0f63c264..db27fe880afc 100644 > > > --- a/share/man/man9/pmap.9 > > > +++ b/share/man/man9/pmap.9 > > > @@ -97,6 +97,7 @@ operation. > > > .Xr pmap_init2 9 , > > > .Xr pmap_is_modified 9 , > > > .Xr pmap_is_prefaultable 9 , > > > +.Xr pmap_kextract 9 , > > > .Xr pmap_map 9 , > > > .Xr pmap_mincore 9 , > > > .Xr pmap_object_init_pt 9 , > > > diff --git a/share/man/man9/pmap_kextract.9 b/share/man/man9/pmap_kextract.9 > > > new file mode 100644 > > > index 000000000000..dd73446648f2 > > > --- /dev/null > > > +++ b/share/man/man9/pmap_kextract.9 > > > @@ -0,0 +1,65 @@ > > > +.\" > > > +.\" SPDX-License-Identifier: BSD-2-Clause > > > +.\" > > > +.\" Copyright (c) 2023 The FreeBSD Foundation > > > +.\" > > > +.\" This manual page was written by Mina Galić under > > > +.\" sponsorship from the FreeBSD Foundation. > > > +.\" > > > +.Dd August 24, 2023 > > > +.Dt PMAP_KEXTRACT 9 > > > +.Os > > > +.Sh NAME > > > +.Nm pmap_kextract , > > > +.Nm vtophys > > > +.Nd extract a physical address from the kernel page table > > > +.Sh SYNOPSIS > > > +.In sys/param.h > > > +.In vm/vm.h > > > +.In vm/pmap.h > > > +.Ft vm_paddr_t > > > +.Fo pmap_kextract > > > +.Fa "vm_offset_t va" > > > +.Fc > > > +.Ft vm_paddr_t > > > +.Fo vtophys > > > +.Fa "vm_offset_t va" > > > +.Fc > > > +.Sh DESCRIPTION > > > +The > > > +.Fn pmap_kextract > > > +function retrieves the underlying physical memory address corresponding to the given kernel virtual address > > Line too long. > > > > > +.Fa va . > > > +The value of > > > +.Fa va > > > +must correlate to an active mapping in the kernel address space. > > What does it mean 'correlate'? > > > > 'correlate' means that the relationship exists in both directions. We could > describe an address as "belonging to" a VA->PA mapping, or we could say that > an address "posseses" such a mapping. Maybe you have a strong opinion on why > one is incorrect. > > Since 'correlate' is not established terminology, and needlessly confusing, > I can simplify it to: > > "The value of va must belong to an active mapping in..." s/active/valid/ then it sounds as the established terminology. > > If you have a different suggestion, let me know. > > > > +.Pp > > > +.Fn vtophys > > > +is an alias for > > > +.Fn pmap_kextract > > > +and behaves identically. > > > +.Sh RETURN VALUES > > > +The > > > +.Fn pmap_kextract > > > +function will return the physical address > > > +.Pq Vt vm_paddr_t > > > +associated with the kernel virtual address > > and 'associated'? > > > > The function returns address of physical memory mapped at the supplied > > kernel virtual address. > > > > Sure, this is more accurate. > > > > +.Fa va . > > > +.Pp > > > +.Fn pmap_kextract > > > +generally does not fail. > > > +However, if supplied with an illegitimate value for > > > +.Fa va , > > > +the function may return zero, an invalid non-zero value, or call > > > +.Xr panic 9 . > > > +.Sh SEE ALSO > > > +.Xr pmap 9 , > > > +.Xr pmap_extract 9 > > > +.Sh AUTHORS > > > +.An -nosplit > > > +This manual page was written by > > > +.An Mina Galić Aq Mt FreeBSD@igalic.co , > > > +based on the > > > +.Xr pmap_extract 9 > > > +page written by > > > +.An Bruce M Simpson Aq Mt bms@spc.org . > > > diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c > > > index ff83d8749313..8c438cfb4639 100644 > > > --- a/sys/amd64/amd64/pmap.c > > > +++ b/sys/amd64/amd64/pmap.c > > > @@ -3846,7 +3846,7 @@ pmap_flush_cache_phys_range(vm_paddr_t spa, vm_paddr_t epa, vm_memattr_t mattr) > > > * Extract the physical page address associated > > > * with the given map/virtual_address pair. > > > */ > > > -vm_paddr_t > > > +vm_paddr_t > > > pmap_extract(pmap_t pmap, vm_offset_t va) > > > { > > > pdp_entry_t *pdpe; > > > @@ -3933,6 +3933,12 @@ out: > > > return (m); > > > } > > > +/* > > > + * Routine: pmap_kextract > > > + * Function: > > > + * Extract the physical page address associated with the given kernel > > > + * virtual address. > > > + */ > > > vm_paddr_t > > > pmap_kextract(vm_offset_t va) > > > { > > > diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c > > > index 6f2afa0b98a3..8c2c6f9d7b81 100644 > > > --- a/sys/arm64/arm64/pmap.c > > > +++ b/sys/arm64/arm64/pmap.c > > > @@ -1949,6 +1949,12 @@ pmap_klookup(vm_offset_t va, vm_paddr_t *pa) > > > return (true); > > > } > > > +/* > > > + * Routine: pmap_kextract > > > + * Function: > > > + * Extract the physical page address associated with the given kernel > > > + * virtual address. > > > + */ > > > vm_paddr_t > > > pmap_kextract(vm_offset_t va) > > > { > > > diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c > > > index 49ee54b37918..66054898b281 100644 > > > --- a/sys/riscv/riscv/pmap.c > > > +++ b/sys/riscv/riscv/pmap.c > > > @@ -970,6 +970,12 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) > > > return (m); > > > } > > > +/* > > > + * Routine: pmap_kextract > > > + * Function: > > > + * Extract the physical page address associated with the given kernel > > > + * virtual address. > > > + */ > > > vm_paddr_t > > > pmap_kextract(vm_offset_t va) > > > {