From nobody Mon Jan 8 04:10:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7gZk0qF5z56pc1; Mon, 8 Jan 2024 04:10:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7gZj6cPXz43H2; Mon, 8 Jan 2024 04:10:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704687021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zDlEIxSL4UH396JxVUuPW8j5b8pokBu6QufTkHLJKKs=; b=yrw267F51E142ZgxZ0MKm9InATCvRQNpGFKtSZbW/634SFlCyoK5pQzBNqc0tZNlvfDyh/ 8uzT8+Q8SrHnGin+DxZhyKQeRtXhIPTJNARthwtcVPkvB23iTU7Y+UoG4N6NtGTs9RjOIz g1rr1w3AUdHIyXSC469W2Vly1LMsrCqPSvwnb5LO6hHHq6ZR3anO3/yn/FnabkKE9Ijiem eptrVri75hCEtTcYHbUsbEVoemtV8hVj8MCFkvepgqm0/ap3yFY2RQbI8gynm6Se1nJySQ 6j0wyK9sn78woHifZ8Q3TxxIcSV6LPTyM7Uu4htQrrv2aK33zONyx7sKPgPttg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704687021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zDlEIxSL4UH396JxVUuPW8j5b8pokBu6QufTkHLJKKs=; b=SRCknwkdMBZ306zYPTz0tUBsWsvo5LKRb/UaWqrpcg/dzYwOxxsgfk9DPFvQRVNTo69yRN CG3GCbTQ0OsolGfY06AgWl8RHmXHP3gM9f4N4kvBZ8My9Gwa9taAQnccH1fRZk9EpC95Zu hjKqZIO2h0y4PqEVR2B0dlPnxYqUEI/NB/JE4NizytfR0tPV12uRiu2W8BuoTcaU1D+Gmt 8IMyvxPvkzlbPSDm1bEMWKJMEm9E/R942HAcRvBS96Dw7nltWw0nwAFLP6C8Rul49RecOw z9TobMGR9JO2c6zB+XCra1mrl53Qz+s/iISrDG3G3stegkMewBqO8soBUCB2Sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704687021; a=rsa-sha256; cv=none; b=jmm+r2kFB3ZJx99sycE/lNDQfsyEy0YwvZCC6b6N7ylvzph3N38XdSkGVuVq8RrNOAPB7e P2YNuMSsZvXQTAMlXkRmpRE+YR8Rar8qGn4M0uzuzA8japBaJpODruV6Ja81fuDkFKHkFF zfmbBPo41f8FVAZPggp22cBFbXOSOHHuGAqPQhOnWg59uXECX9B2RcbJ4Zw9fQUuGOc6xG XBbmuDfvCAp6dKdHXZd8ezJZv6KB+ufpQD2I3klZ+VWBkP4eTJOT5Km9+X4NPQT0PZ8IvJ p6VX53YMN6WGa/8bLibk3bsD8ViCImMdH4v+W71+HXMrpXATa3y9AOrLdYq+RQ== 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 4T7gZj5fgFzrty; Mon, 8 Jan 2024 04:10: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 4084ALO8066358; Mon, 8 Jan 2024 04:10:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4084ALhK066356; Mon, 8 Jan 2024 04:10:21 GMT (envelope-from git) Date: Mon, 8 Jan 2024 04:10:21 GMT Message-Id: <202401080410.4084ALhK066356@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: f26eafdfafb0 - stable/13 - ssh: Update to OpenSSH 9.4p1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: f26eafdfafb0fbd378b2f0c1e9af1dd807d852ca Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f26eafdfafb0fbd378b2f0c1e9af1dd807d852ca commit f26eafdfafb0fbd378b2f0c1e9af1dd807d852ca Author: Ed Maste AuthorDate: 2023-08-11 03:10:18 +0000 Commit: Ed Maste CommitDate: 2024-01-08 00:49:07 +0000 ssh: Update to OpenSSH 9.4p1 Excerpts from the release notes: * ssh-agent(1): PKCS#11 modules must now be specified by their full paths. Previously dlopen(3) could search for them in system library directories. * ssh(1): allow forwarding Unix Domain sockets via ssh -W. * ssh(1): add support for configuration tags to ssh(1). This adds a ssh_config(5) "Tag" directive and corresponding "Match tag" predicate that may be used to select blocks of configuration similar to the pf.conf(5) keywords of the same name. * ssh(1): add a "match localnetwork" predicate. This allows matching on the addresses of available network interfaces and may be used to vary the effective client configuration based on network location. * ssh-agent(1): improve isolation between loaded PKCS#11 modules by running separate ssh-pkcs11-helpers for each loaded provider. * ssh-agent(1), ssh(1): improve defences against invalid PKCS#11 modules being loaded by checking that the requested module contains the required symbol before loading it. * ssh(1): don't incorrectly disable hostname canonicalization when CanonicalizeHostname=yes and ProxyJump was expicitly set to "none". bz3567 Full release notes at https://www.openssh.com/txt/release-9.4 Relnotes: Yes Sponsored by: The FreeBSD Foundation (cherry picked from commit 535af610a4fdace6d50960c0ad9be0597eea7a1b) (cherry picked from commit 33a23ef2878fe525700983fb754f6f9f9f8fc4b7) --- crypto/openssh/.github/ci-status.md | 6 +- crypto/openssh/.github/configs | 45 +- crypto/openssh/.github/setup_ci.sh | 17 +- crypto/openssh/.github/workflows/c-cpp.yml | 26 +- crypto/openssh/.github/workflows/selfhosted.yml | 2 +- crypto/openssh/ChangeLog | 13191 ++++++++++--------- crypto/openssh/INSTALL | 8 +- crypto/openssh/PROTOCOL.agent | 4 +- crypto/openssh/PROTOCOL.krl | 55 +- crypto/openssh/README | 2 +- crypto/openssh/addr.c | 4 +- crypto/openssh/auth-options.c | 29 +- crypto/openssh/auth-pam.c | 4 +- crypto/openssh/auth2-gss.c | 12 +- crypto/openssh/auth2-pubkey.c | 35 +- crypto/openssh/canohost.c | 4 +- crypto/openssh/chacha.c | 3 +- crypto/openssh/channels.c | 19 +- crypto/openssh/channels.h | 8 +- crypto/openssh/cipher-aes.c | 2 +- crypto/openssh/cipher-chachapoly-libcrypto.c | 3 +- crypto/openssh/cipher-chachapoly.c | 3 +- crypto/openssh/clientloop.c | 14 +- crypto/openssh/config.h | 94 +- crypto/openssh/configure.ac | 107 +- crypto/openssh/contrib/redhat/openssh.spec | 2 +- crypto/openssh/contrib/ssh-copy-id | 75 +- crypto/openssh/contrib/ssh-copy-id.1 | 79 +- crypto/openssh/contrib/suse/openssh.spec | 2 +- crypto/openssh/gss-serv.c | 2 +- crypto/openssh/kexgexs.c | 4 +- crypto/openssh/krl.c | 280 +- crypto/openssh/krl.h | 10 +- crypto/openssh/match.c | 5 +- crypto/openssh/misc.c | 95 +- crypto/openssh/misc.h | 3 +- crypto/openssh/moduli | 868 +- crypto/openssh/monitor.c | 5 +- crypto/openssh/monitor_wrap.c | 6 +- crypto/openssh/mux.c | 76 +- crypto/openssh/openbsd-compat/bsd-getentropy.c | 6 +- crypto/openssh/openbsd-compat/bsd-snprintf.c | 31 +- .../openssh/openbsd-compat/libressl-api-compat.c | 556 +- crypto/openssh/openbsd-compat/openssl-compat.c | 20 +- crypto/openssh/openbsd-compat/openssl-compat.h | 158 +- crypto/openssh/openbsd-compat/port-linux.c | 39 +- .../openbsd-compat/regress/opensslvertest.c | 29 +- .../openssh/openbsd-compat/regress/snprintftest.c | 6 +- .../openssh/openbsd-compat/regress/strtonumtest.c | 2 +- crypto/openssh/packet.c | 4 +- crypto/openssh/poly1305.c | 3 +- crypto/openssh/progressmeter.c | 3 +- crypto/openssh/readconf.c | 108 +- crypto/openssh/readconf.h | 3 +- crypto/openssh/regress/Makefile | 10 +- crypto/openssh/regress/agent-ptrace.sh | 2 +- crypto/openssh/regress/forcecommand.sh | 8 +- crypto/openssh/regress/forward-control.sh | 6 +- crypto/openssh/regress/misc/sk-dummy/sk-dummy.c | 27 +- crypto/openssh/regress/percent.sh | 5 +- crypto/openssh/regress/sftp-chroot.sh | 23 +- .../openssh/regress/unittests/misc/test_ptimeout.c | 4 +- .../openssh/regress/unittests/sshkey/test_file.c | 2 + crypto/openssh/regress/unittests/sshsig/tests.c | 2 +- .../regress/unittests/test_helper/test_helper.c | 2 +- crypto/openssh/scp.c | 23 +- crypto/openssh/servconf.c | 20 +- crypto/openssh/sftp-client.c | 54 +- crypto/openssh/sftp-common.c | 4 +- crypto/openssh/sftp-server.c | 4 +- crypto/openssh/sftp.c | 12 +- crypto/openssh/sk-usbhid.c | 14 +- crypto/openssh/ssh-add.c | 6 +- crypto/openssh/ssh-agent.1 | 14 +- crypto/openssh/ssh-agent.c | 8 +- crypto/openssh/ssh-keygen.1 | 6 +- crypto/openssh/ssh-keygen.c | 16 +- crypto/openssh/ssh-keyscan.c | 28 +- crypto/openssh/ssh-pkcs11-client.c | 389 +- crypto/openssh/ssh-pkcs11.c | 43 +- crypto/openssh/ssh-sk.c | 8 +- crypto/openssh/ssh-xmss.c | 4 +- crypto/openssh/ssh.1 | 19 +- crypto/openssh/ssh.c | 59 +- crypto/openssh/ssh_config | 2 +- crypto/openssh/ssh_config.5 | 39 +- crypto/openssh/ssh_namespace.h | 3 + crypto/openssh/sshconnect2.c | 12 +- crypto/openssh/sshd_config | 2 +- crypto/openssh/sshd_config.5 | 14 +- crypto/openssh/sshkey.c | 18 +- crypto/openssh/sshkey.h | 4 +- crypto/openssh/sshsig.c | 11 +- crypto/openssh/version.h | 8 +- 94 files changed, 8883 insertions(+), 8229 deletions(-) diff --git a/crypto/openssh/.github/ci-status.md b/crypto/openssh/.github/ci-status.md index c57c3d83d11a..f3e088fd6043 100644 --- a/crypto/openssh/.github/ci-status.md +++ b/crypto/openssh/.github/ci-status.md @@ -6,6 +6,6 @@ master : [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/openssh.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:openssh) [![Coverity Status](https://scan.coverity.com/projects/21341/badge.svg)](https://scan.coverity.com/projects/openssh-portable) -9.2 : -[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg?branch=V_9_2)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:V_9_2) -[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg?branch=V_9_2)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_9_2) +9.3 : +[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg?branch=V_9_3)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:V_9_3) +[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg?branch=V_9_3)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_9_3) diff --git a/crypto/openssh/.github/configs b/crypto/openssh/.github/configs index 8f21fc54a268..e054eb3196b5 100755 --- a/crypto/openssh/.github/configs +++ b/crypto/openssh/.github/configs @@ -81,7 +81,8 @@ case "$config" in CFLAGS="-fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer" LDFLAGS="-fsanitize=memory" CPPFLAGS='-Dchroot=chdir -Dexplicit_bzero=bzero -DMSAN_OPTIONS=\"log_path='$SANLOGS'/msan.log\"' - CONFIGFLAGS="--without-openssl --without-zlib --without-shadow" + CONFIGFLAGS="--without-zlib --without-shadow" + LIBCRYPTOFLAGS="--without-openssl" TEST_TARGET="t-exec" ;; *-sanitize-undefined) @@ -139,6 +140,10 @@ case "$config" in CONFIGFLAGS="--with-pam" SSHD_CONFOPTS="UsePam yes" ;; + boringssl) + CONFIGFLAGS="--disable-pkcs11" + LIBCRYPTOFLAGS="--with-ssl-dir=/opt/boringssl --with-rpath=-Wl,-rpath," + ;; libressl-*) LIBCRYPTOFLAGS="--with-ssl-dir=/opt/libressl --with-rpath=-Wl,-rpath," ;; @@ -209,13 +214,15 @@ esac # The Solaris 64bit targets are special since they need a non-flag arg. case "$config" in sol64*) - CONFIGFLAGS="x86_64 --with-cflags=-m64 --with-ldflags=-m64 ${CONFIGFLAGS}" - LIBCRYPTOFLAGS="--with-ssl-dir=/usr/local/ssl64" + CONFIGFLAGS="--target=x86_64 --with-cflags=-m64 --with-ldflags=-m64 ${CONFIGFLAGS}" + LIBCRYPTOFLAGS="--with-ssl-dir=/usr/local/ssl64 --with-rpath=-Wl,-rpath," ;; esac case "${TARGET_HOST}" in aix*) + CONFIGFLAGS="--disable-security-key" + LIBCRYPTOFLAGS="--without-openssl" # These are slow real or virtual machines so skip the slowest tests # (which tend to be thw ones that transfer lots of data) so that the # test run does not time out. @@ -240,7 +247,8 @@ case "${TARGET_HOST}" in SKIP_LTESTS="forwarding multiplex proxy-connect hostkey-agent agent-ptrace" ;; minix3) - LIBCRYPTOFLAGS="--without-openssl --disable-security-key" + CONFIGFLAGS="${CONFIGFLAGS} --disable-security-key" + LIBCRYPTOFLAGS="--without-openssl" # Minix does not have a loopback interface so we have to skip any # test that relies on one. # Also, Minix seems to be very limited in the number of select() @@ -264,7 +272,8 @@ case "${TARGET_HOST}" in CONFIGFLAGS="${CONFIGFLAGS} --without-hardening --disable-security-key" ;; openwrt-*) - CONFIGFLAGS="${CONFIGFLAGS} --without-openssl --without-zlib" + CONFIGFLAGS="${CONFIGFLAGS} --without-zlib" + LIBCRYPTOFLAGS="--without-openssl" TEST_TARGET="t-exec" ;; sol10|sol11) @@ -278,7 +287,8 @@ case "${TARGET_HOST}" in ;; esac -case "`./config.guess`" in +host=`./config.guess` +case "$host" in *cygwin) SUDO="" # Don't run compat tests on cygwin as they don't currently compile. @@ -289,17 +299,34 @@ case "`./config.guess`" in # modern versions don't ship with libcrypto. LIBCRYPTOFLAGS="--without-openssl" TEST_TARGET=t-exec + case "$host" in + *-darwin22.*) + # sudo -S nobody doesn't work on macos 13 for some reason. + SKIP_LTESTS="agent-getpeereid" ;; + esac ;; esac -# If we have a local openssl/libressl, use that. +# Unless specifically configured, search for a suitable version of OpenSSL, +# otherwise build without it. if [ -z "${LIBCRYPTOFLAGS}" ]; then + LIBCRYPTOFLAGS="--without-openssl" # last-match - for i in /usr/local /usr/local/ssl /usr/local/opt/openssl; do + for i in /usr /usr/local /usr/local/ssl /usr/local/opt/openssl; do + ver="none" if [ -x ${i}/bin/openssl ]; then - LIBCRYPTOFLAGS="--with-ssl-dir=${i}" + ver="$(${i}/bin/openssl version)" fi + case "$ver" in + none) ;; + "OpenSSL 0."*|"OpenSSL 1.0."*|"OpenSSL 1.1.0"*) ;; + "LibreSSL 2."*|"LibreSSL 3.0."*) ;; + *) LIBCRYPTOFLAGS="--with-ssl-dir=${i}" ;; + esac done + if [ "${LIBCRYPTOFLAGS}" = "--without-openssl" ]; then + TEST_TARGET="t-exec" + fi fi CONFIGFLAGS="${CONFIGFLAGS} ${LIBCRYPTOFLAGS}" diff --git a/crypto/openssh/.github/setup_ci.sh b/crypto/openssh/.github/setup_ci.sh index 691c70dd7ed6..154f51bdc205 100755 --- a/crypto/openssh/.github/setup_ci.sh +++ b/crypto/openssh/.github/setup_ci.sh @@ -4,7 +4,9 @@ PACKAGES="" . .github/configs $@ -case "`./config.guess`" in +host=`./config.guess` +echo "config.guess: $host" +case "$host" in *cygwin) PACKAGER=setup echo Setting CYGWIN system environment variable. @@ -124,6 +126,10 @@ for TARGET in $TARGETS; do esac PACKAGES="${PACKAGES} putty-tools" ;; + boringssl) + INSTALL_BORINGSSL=1 + PACKAGES="${PACKAGES} cmake ninja-build" + ;; valgrind*) PACKAGES="$PACKAGES valgrind" ;; @@ -199,3 +205,12 @@ if [ ! -z "${INSTALL_LIBRESSL}" ]; then ./configure --prefix=/opt/libressl && make -j2 && sudo make install) fi fi + +if [ ! -z "${INSTALL_BORINGSSL}" ]; then + (cd ${HOME} && git clone https://boringssl.googlesource.com/boringssl && + cd ${HOME}/boringssl && mkdir build && cd build && + cmake -GNinja -DCMAKE_POSITION_INDEPENDENT_CODE=ON .. && ninja && + mkdir -p /opt/boringssl/lib && + cp ${HOME}/boringssl/build/crypto/libcrypto.a /opt/boringssl/lib && + cp -r ${HOME}/boringssl/include /opt/boringssl) +fi diff --git a/crypto/openssh/.github/workflows/c-cpp.yml b/crypto/openssh/.github/workflows/c-cpp.yml index f3163884a037..e4e2a64e05d2 100644 --- a/crypto/openssh/.github/workflows/c-cpp.yml +++ b/crypto/openssh/.github/workflows/c-cpp.yml @@ -13,7 +13,14 @@ jobs: fail-fast: false matrix: # First we test all OSes in the default configuration. - target: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019, windows-2022] + target: + - ubuntu-20.04 + - ubuntu-22.04 + - macos-11 + - macos-12 + - macos-13 + - windows-2019 + - windows-2022 config: [default] # Then we include any extra configs we want to test for specific VMs. # Valgrind slows things down quite a bit, so start them first. @@ -43,33 +50,27 @@ jobs: - { target: ubuntu-20.04, config: gcc-11-Werror } - { target: ubuntu-20.04, config: pam } - { target: ubuntu-20.04, config: kitchensink } - - { target: ubuntu-20.04, config: hardenedmalloc } + - { target: ubuntu-22.04, config: hardenedmalloc } - { target: ubuntu-20.04, config: tcmalloc } - { target: ubuntu-20.04, config: musl } + - { target: ubuntu-latest, config: boringssl } - { target: ubuntu-latest, config: libressl-master } - - { target: ubuntu-latest, config: libressl-2.2.9 } - - { target: ubuntu-latest, config: libressl-2.8.3 } - - { target: ubuntu-latest, config: libressl-3.0.2 } - { target: ubuntu-latest, config: libressl-3.2.6 } - { target: ubuntu-latest, config: libressl-3.3.6 } - { target: ubuntu-latest, config: libressl-3.4.3 } - { target: ubuntu-latest, config: libressl-3.5.3 } - { target: ubuntu-latest, config: libressl-3.6.1 } - - { target: ubuntu-latest, config: libressl-3.7.0 } + - { target: ubuntu-latest, config: libressl-3.7.2 } - { target: ubuntu-latest, config: openssl-master } - { target: ubuntu-latest, config: openssl-noec } - - { target: ubuntu-latest, config: openssl-1.0.1 } - - { target: ubuntu-latest, config: openssl-1.0.1u } - - { target: ubuntu-latest, config: openssl-1.0.2u } - - { target: ubuntu-latest, config: openssl-1.1.0h } - { target: ubuntu-latest, config: openssl-1.1.1 } - { target: ubuntu-latest, config: openssl-1.1.1k } - { target: ubuntu-latest, config: openssl-1.1.1n } - { target: ubuntu-latest, config: openssl-1.1.1q } - - { target: ubuntu-latest, config: openssl-1.1.1s } + - { target: ubuntu-latest, config: openssl-1.1.1t } - { target: ubuntu-latest, config: openssl-3.0.0 } - - { target: ubuntu-latest, config: openssl-3.0.5 } - { target: ubuntu-latest, config: openssl-3.0.7 } + - { target: ubuntu-latest, config: openssl-3.1.0 } - { target: ubuntu-latest, config: openssl-1.1.1_stable } - { target: ubuntu-latest, config: openssl-3.0 } # stable branch - { target: ubuntu-22.04, config: pam } @@ -82,6 +83,7 @@ jobs: - { target: ubuntu-22.04, config: without-openssl } - { target: macos-11, config: pam } - { target: macos-12, config: pam } + - { target: macos-13, config: pam } runs-on: ${{ matrix.target }} steps: - name: set cygwin git params diff --git a/crypto/openssh/.github/workflows/selfhosted.yml b/crypto/openssh/.github/workflows/selfhosted.yml index d38cba520500..e84db699ea31 100644 --- a/crypto/openssh/.github/workflows/selfhosted.yml +++ b/crypto/openssh/.github/workflows/selfhosted.yml @@ -25,9 +25,9 @@ jobs: - debian-i386 - dfly30 - dfly48 - - dfly58 - dfly60 - dfly62 + - dfly64 - fbsd10 - fbsd12 - fbsd13 diff --git a/crypto/openssh/ChangeLog b/crypto/openssh/ChangeLog index 40ca976a61b3..3e16fbfd346d 100644 --- a/crypto/openssh/ChangeLog +++ b/crypto/openssh/ChangeLog @@ -1,9437 +1,10174 @@ -commit 9795c4016ae35162072144df032c8b262433b462 +commit daa5b2d869ee5a16f3ef9035aa0ad3c70cf4028e Author: Damien Miller -Date: Wed Jul 19 16:27:12 2023 +1000 +Date: Thu Aug 10 11:10:22 2023 +1000 - OpenSSH 9.3p2 + depend -commit bde3635f3c9324bad132cf9ed917813d6abb599e +commit 41bfb63f5101fbacde9d8d2ada863f9ee16df194 Author: Damien Miller -Date: Wed Jul 19 16:31:09 2023 +1000 +Date: Thu Aug 10 11:05:42 2023 +1000 - update version in README + update versions in RPM specs -commit f673f2f3e5f67099018fc281a6b5fb918142472e +commit e598b92b1eecedac21667edf1fe92078eaf8f2b1 Author: Damien Miller -Date: Wed Jul 19 16:31:00 2023 +1000 +Date: Thu Aug 10 11:05:14 2023 +1000 - update RPM spec versions + update version in README -commit d7790cdce72a1b6982795baa2b4d6f0bdbb0100d -Author: Damien Miller -Date: Fri Jul 7 13:30:15 2023 +1000 +commit e797e5ffa74377c8696e3b0559a258d836479239 +Author: djm@openbsd.org +Date: Thu Aug 10 01:01:07 2023 +0000 - disallow remote addition of FIDO/PKCS11 keys + upstream: openssh-9.4 - Depends on the local client performing the session-bind@openssh.com - operation, so non-OpenSSH local client may circumvent this. + OpenBSD-Commit-ID: 71fc1e01a4c4ea061b252bd399cda7be757e6e35 -commit b23fe83f06ee7e721033769cfa03ae840476d280 +commit 3961ed02dc578517a9d2535128cff5c3a5460d28 Author: Damien Miller -Date: Thu Jul 13 12:09:34 2023 +1000 +Date: Thu Aug 10 09:08:49 2023 +1000 - terminate pkcs11 process for bad libraries + wrap poll.h include in HAVE_POLL_H -commit cb30fbdbee869f1ce11f06aa97e1cb8717a0b645 -Author: Damien Miller -Date: Thu Mar 16 08:28:19 2023 +1100 +commit e535fbe2af893046c28adfcd787c1fdbae36a24a +Author: dtucker@openbsd.org +Date: Fri Aug 4 06:32:40 2023 +0000 - depend + upstream: Apply ConnectTimeout to multiplexing local socket + + connections. If the multiplex socket exists but the connection times out, + ssh will fall back to a direct connection the same way it would if the socket + did not exist at all. ok djm@ + + OpenBSD-Commit-ID: 2fbe1a36d4a24b98531b2d298a6557c8285dc1b4 -commit 1dba63eb10c40b6fda9f5012ed6ae87e2d3d028e -Author: Damien Miller -Date: Thu Mar 16 08:27:54 2023 +1100 +commit 9d92e7b24848fcc605945f7c2e3460c7c31832ce +Author: Darren Tucker +Date: Thu Aug 3 19:35:33 2023 +1000 - crank version + Fix RNG seeding for OpenSSL w/out self seeding. + + When sshd is built with an OpenSSL that does not self-seed, it would + fail in the preauth privsep process while handling a new connection. + Sanity checked by djm@ -commit ba7532d0dac9aaf0ad7270664c43837fc9f64a5f +commit f70010d9b0b3e7e95de8aa0b961e1d74362cfb5d Author: djm@openbsd.org -Date: Wed Mar 15 21:19:57 2023 +0000 +Date: Wed Aug 2 23:04:38 2023 +0000 - upstream: openssh-9.3 + upstream: CheckHostIP has defaulted to 'no' for a while; make the - OpenBSD-Commit-ID: 8011495f2449c1029bb316bd015eab2e00509848 + commented- out config option match. From Ed Maste + + OpenBSD-Commit-ID: e66e934c45a9077cb1d51fc4f8d3df4505db58d9 -commit 6fd4daafb949b66bf555f3100f715a9ec64c3390 +commit c88a8788f9865d02b986d00405b9f0be65ad0b5a Author: dtucker@openbsd.org -Date: Tue Mar 14 07:28:47 2023 +0000 +Date: Tue Aug 1 08:15:04 2023 +0000 - upstream: Free KRL ptr in addition to its contents. + upstream: remove unnecessary if statement. - From Coverity CID 291841, ok djm@ + github PR#422 from eyalasulin999, ok djm@ - OpenBSD-Commit-ID: f146ba08b1b43af4e0d7ad8c4dae3748b4fa31b6 + OpenBSD-Commit-ID: 2b6b0dde4407e039f58f86c8d2ff584a8205ea55 -commit 1d270bd303afaf6d94e9098cbbf18e5e539e2088 -Author: dtucker@openbsd.org -Date: Tue Mar 14 07:26:25 2023 +0000 +commit 77b8b865cd5a8c79a47605c0c5b2bacf4692c4d5 +Author: jmc@openbsd.org +Date: Fri Jul 28 05:42:36 2023 +0000 - upstream: Check pointer for NULL before deref. + upstream: %C is a callable macro in mdoc(7) - None of the existing callers seem to do that, but it's worth checking. - From Coverity CID 291834, ok djm@ + so, as we do for %D, escape it; - OpenBSD-Commit-ID: a0a97113f192a7cb1a2c97b932f677f573cda7a4 + OpenBSD-Commit-ID: 538cfcddbbb59dc3a8739604319491dcb8e0c0c9 -commit d95af508e78c0cd3dce56b83853baaa59ae295cf -Author: dtucker@openbsd.org -Date: Sun Mar 12 10:40:39 2023 +0000 +commit e0f91aa9c2fbfc951e9ced7e1305455fc614d3f2 +Author: djm@openbsd.org +Date: Fri Jul 28 05:33:15 2023 +0000 - upstream: Limit number of entries in SSH2_MSG_EXT_INFO + upstream: don't need to start a command here; use ssh -N instead. - request. This is already constrained by the maximum SSH packet size but this - makes it explicit. Prompted by Coverity CID 291868, ok djm@ markus@ + Fixes failure on cygwin spotted by Darren - OpenBSD-Commit-ID: aea023819aa44a2dcb9dd0fbec10561896fc3a09 + OpenBSD-Regress-ID: ff678a8cc69160a3b862733d935ec4a383f93cfb -commit 8f287ba60d342b3e2f750e7332d2131e3ec7ecd0 -Author: dtucker@openbsd.org -Date: Sun Mar 12 09:41:18 2023 +0000 +commit f446a44f30bc680e0d026a4204844b02646c1c2d +Author: djm@openbsd.org +Date: Wed May 17 05:52:01 2023 +0000 - upstream: calloc can return NULL but xcalloc can't. + upstream: add LTESTS_FROM variable to allow skipping of tests up to - From Coverity CID 291881, ok djm@ + a specific point. e.g. "make LTESTS_FROM=t-sftp" will only run the sftp.sh + test and subsequent ones. ok dtucker@ - OpenBSD-Commit-ID: 50204b755f66b2ec7ac3cfe379d07d85ca161d2b + OpenBSD-Regress-ID: 07f653de731def074b29293db946042706fcead3 -commit 83a56a49fd50f4acf900f934279482e4ef329715 -Author: dtucker@openbsd.org -Date: Fri Mar 10 07:17:08 2023 +0000 +commit 8eb8899d612440a9b608bee7f916081d3d0b7812 +Author: djm@openbsd.org +Date: Fri May 12 06:37:42 2023 +0000 - upstream: Explicitly ignore return from fcntl + upstream: test ChrootDirectory in Match block - (... FD_CLOEXEC) here too. Coverity CID 291853. + OpenBSD-Regress-ID: a6150262f39065939f025e546af2a346ffe674c1 + +commit e43f43d3f19516222e9a143468ea0dc1b3ab67b6 +Author: djm@openbsd.org +Date: Fri May 12 06:36:27 2023 +0000 + + upstream: better error messages - OpenBSD-Commit-ID: 99d8b3da9d0be1d07ca8dd8e98800a890349e9b5 + OpenBSD-Regress-ID: 55e4186604e80259496d841e690ea2090981bc7a -commit 0fda9d704d3bbf54a5e64ce02a6fecb11fe7f047 -Author: Damien Miller -Date: Fri Mar 10 15:59:46 2023 +1100 +commit 6958f00acf3b9e0b3730f7287e69996bcf3ceda4 +Author: djm@openbsd.org +Date: Thu Jul 27 22:26:49 2023 +0000 - bounds checking for getrrsetbyname() replacement; + upstream: don't incorrectly truncate logged strings retrieved from - Spotted by Coverity in CID 405033; ok millert@ + PKCS#11 modules; based on GHPR406 by Jakub Jelen; ok markus + + OpenBSD-Commit-ID: 7ed1082f23a13b38c373008f856fd301d50012f9 -commit 89b8df518f21677045599df0ad3e5dd0f39909b5 -Author: dtucker@openbsd.org -Date: Fri Mar 10 04:06:21 2023 +0000 +commit d1ffde6b55170cd4b9a72bfd9a3f17508e6cf714 +Author: djm@openbsd.org +Date: Thu Jul 27 22:25:17 2023 +0000 - upstream: Plug mem leak on error path. Coverity CID 405026, ok djm@. + upstream: make sshd_config AuthorizedPrincipalsCommand and - OpenBSD-Commit-ID: 8212ca05d01966fb5e72205c592b2257708a2aac + AuthorizedKeysCommand accept the %D (routing domain) and a new %C (connection + address/port 4-tuple) as expansion sequences; ok markus + + OpenBSD-Commit-ID: ee9a48bf1a74c4ace71b69de69cfdaa2a7388565 -commit bf4dae0ad192c3e2f03f7223834b00d88ace3d3e -Author: Darren Tucker -Date: Fri Mar 10 14:46:57 2023 +1100 +commit 999a2886ca1844a7a74b905e5f2c8c701f9838cd +Author: djm@openbsd.org +Date: Thu Jul 27 22:23:05 2023 +0000 - Add prototypes for mkstemp replacements. + upstream: increase default KDF work-factor for OpenSSH format - Should prevent warnings due to our wrapper function. + private keys from 16 to 24; { feedback ok } x { deraadt markus } + + OpenBSD-Commit-ID: a3afb1383f8ff0a49613d449f02395d9e8d4a9ec -commit 4e04d68d6a33cdc73b831fd4b5e6124175555d3d -Author: dtucker@openbsd.org -Date: Fri Mar 10 03:01:51 2023 +0000 +commit 0fa803a1dd1c7b546c166000e23a869cf6c4ec10 +Author: Darren Tucker +Date: Thu Jul 27 02:25:09 2023 +1000 - upstream: Expliticly ignore return code from fcntl(.. FD_CLOEXEC) since + Prefer OpenSSL's SHA256 in sk-dummy.so - there's not much we can do anyway. From Coverity CID 291857, ok djm@ + Previously sk-dummy.so used libc's (or compat's) SHA256 since it may be + built without OpenSSL. In many cases, however, including both libc's + and OpenSSL's headers together caused conflicting definitions. - OpenBSD-Commit-ID: 051429dd07af8db3fec10d82cdc78d90bb051729 + We tried working around this (on OpenSSL <1.1 you could define + OPENSSL_NO_SHA, NetBSD had USE_LIBC_SHA2, various #define hacks) with + varying levels of success. Since OpenSSL >=1.1 removed OPENSSL_NO_SHA + and including most OpenSSL headers would bring sha.h in, even if it + wasn't used directly this was a constant hassle. + + Admit defeat and use OpenSSL's SHA256 unless we aren't using OpenSSL at + all. ok djm@ -commit d6d38fd77cbe091c59e1bb720c3a494df4990640 +commit 36cdb5dbf55c99c0faad06066f56a7c341258c1f +Author: Darren Tucker +Date: Thu Jul 27 10:29:44 2023 +1000 + + Retire dfly58 test VM. Add dfly64. + +commit 2d34205dab08ede9b0676efa57647fc49e6decbe Author: djm@openbsd.org -Date: Fri Mar 10 02:32:04 2023 +0000 +Date: Wed Jul 26 23:06:00 2023 +0000 - upstream: Like sshd_config, some ssh_config options are not + upstream: make ssh -f (fork after authentication) work properly in - first-match-wins. sshd_config.5 was fixed in r1.348, this is the same for - this file + multiplexed cases (inc. ControlPersist). bz3589 bz3589 Based on patches by + Peter Chubb; ok dtucker@ - OpenBSD-Commit-ID: 7be55b9351cde449b136afcc52d07aa4113b215e + OpenBSD-Commit-ID: a7a2976a54b93e6767dc846b85647e6ec26969ac -commit 7187d3f86bf8f2066cc9941f217d23b0cacae25e -Author: dtucker@openbsd.org -Date: Fri Mar 10 02:24:56 2023 +0000 +commit 076aeda86a7ee9be8fd2f0181ec7b9729a6ceb37 +Author: naddy@openbsd.org +Date: Sun Jul 23 20:04:45 2023 +0000 - upstream: Remove no-op (int) > INT_MAX checks + upstream: man page typos; ok jmc@ - since they can never be true. From Coverity CID 405031, ok djm@ + OpenBSD-Commit-ID: e6ddfef94b0eb867ad88abe07cedc8ed581c07f0 + +commit 135e7d5fe31f700e6dfc61ce914970c5ee7175ba +Author: jmc@openbsd.org +Date: Thu Jul 20 05:43:39 2023 +0000 + + upstream: tweak the allow-remote-pkcs11 text; - OpenBSD-Commit-ID: 9df3783b181e056595e2bb9edf7ed41d61cf8e84 + OpenBSD-Commit-ID: bc965460a89edf76865b7279b45cf9cbdebd558a -commit 77adde4305542ebe3005dd456122624fe2347b01 +commit 5f83342b61d1f76c141de608ed2bd293990416bd Author: Darren Tucker -Date: Fri Mar 10 13:27:29 2023 +1100 +Date: Tue Jul 25 13:00:22 2023 +1000 - Wrap mkstemp calls with umask set/restore. + Handle a couple more OpenSSL no-ecc cases. - glibc versions 2.06 and earlier did not set a umask on files created by - mkstemp created the world-writable. Wrap mkstemp to set and restore - the umask. From Coverity (CIDs 291826 291886 291891), ok djm@ + ok djm@ -commit 633d3dc2a1e9e2a013d019a0576a0771c8423713 -Author: jcs@openbsd.org -Date: Thu Mar 9 21:06:24 2023 +0000 +commit edc2ef4e418e514c99701451fae4428ec04ce538 +Author: Damien Miller +Date: Thu Jul 20 12:53:44 2023 +1000 - upstream: modify parentheses in conditionals to make it clearer what is + depend + +commit 51fda734e0d3c2df256fc03e8b060c4305be6e59 +Author: Damien Miller +Date: Thu Jul 20 12:53:21 2023 +1000 + + Bring back OPENSSL_HAS_ECC to ssh-pkcs11-client + +commit 099cdf59ce1e72f55d421c8445bf6321b3004755 +Author: djm@openbsd.org +Date: Wed Jul 19 14:03:45 2023 +0000 + + upstream: Separate ssh-pkcs11-helpers for each p11 module - being assigned and what is being checked + Make ssh-pkcs11-client start an independent helper for each provider, + providing better isolation between modules and reliability if a single + module misbehaves. - ok djm dtucker + This also implements reference counting of PKCS#11-hosted keys, + allowing ssh-pkcs11-helper subprocesses to be automatically reaped + when no remaining keys reference them. This fixes some bugs we have + that make PKCS11 keys unusable after they have been deleted, e.g. + https://bugzilla.mindrot.org/show_bug.cgi?id=3125 - OpenBSD-Commit-ID: 19c10baa46ae559474409f75a5cb3d0eade7a9b8 + ok markus@ + + OpenBSD-Commit-ID: 0ce188b14fe271ab0568f4500070d96c5657244e -commit 733030840c4772f858de95d5940ec0c37663e8b0 -Author: dtucker@openbsd.org -Date: Thu Mar 9 07:11:05 2023 +0000 +commit 29ef8a04866ca14688d5b7fed7b8b9deab851f77 +Author: djm@openbsd.org +Date: Wed Jul 19 14:02:27 2023 +0000 - upstream: Re-split the merge of the reorder-hostkeys test. + upstream: Ensure FIDO/PKCS11 libraries contain expected symbols - In the kex_proposal_populate_entries change I merged the the check for - reordering hostkeys with the actual reordering, but kex_assemble_names - mutates options.hostkeyalgorithms which renders the check ineffective. - Put the check back where it was. Spotted and tested by jsg@, ok djm@ + This checks via nlist(3) that candidate provider libraries contain one + of the symbols that we will require prior to dlopen(), which can cause + a number of side effects, including execution of constructors. - OpenBSD-Commit-ID: a7469f25a738db5567395d1881e32479a7ffc9de + Feedback deraadt; ok markus + + OpenBSD-Commit-ID: 1508a5fbd74e329e69a55b56c453c292029aefbe -commit 54ac4ab2b53ce9fcb66b8250dee91c070e4167ed +commit 1f2731f5d7a8f8a8385c6031667ed29072c0d92a Author: djm@openbsd.org -Date: Thu Mar 9 06:58:26 2023 +0000 +Date: Wed Jul 19 13:56:33 2023 +0000 - upstream: include destination constraints for smartcard keys too. + upstream: Disallow remote addition of FIDO/PKCS11 provider - Spotted by Luci Stanescu; ok deraadt@ markus@ + libraries to ssh-agent by default. - OpenBSD-Commit-ID: add879fac6903a1cb1d1e42c4309e5359c3d870f + The old behaviour of allowing remote clients from loading providers + can be restored using `ssh-agent -O allow-remote-pkcs11`. + + Detection of local/remote clients requires a ssh(1) that supports + the `session-bind@openssh.com` extension. Forwarding access to a + ssh-agent socket using non-OpenSSH tools may circumvent this control. + + ok markus@ + + OpenBSD-Commit-ID: 4c2bdf79b214ae7e60cc8c39a45501344fa7bd7c -commit bfd1ad01d974a316b60622759ad17537fa2d92b4 -Author: Darren Tucker -Date: Thu Mar 9 18:24:54 2023 +1100 +commit 892506b13654301f69f9545f48213fc210e5c5cc +Author: djm@openbsd.org +Date: Wed Jul 19 13:55:53 2023 +0000 - Limit the number of PAM environment variables. + upstream: terminate process if requested to load a PKCS#11 provider - xcalloc has its own limits, but these are specific to PAM. From - Coverity CID 405198, ok djm@ + that isn't a PKCS#11 provider; from / ok markus@ + + OpenBSD-Commit-ID: 39532cf18b115881bb4cfaee32084497aadfa05c -commit a231414970e01a35f45a295d5f93698fa1249b28 -Author: Darren Tucker -Date: Thu Mar 9 18:19:44 2023 +1100 +commit f3f56df8ec476b2de6cbdbdfdb77a2a61087829d +Author: Damien Miller +Date: Wed Jul 19 12:07:18 2023 +1000 - Limit the number of PAM environment variables. + agent_fuzz doesn't want stdint.h conditionalised + +commit 750911fd31d307a767cc86e3bfa90bbbb77b1a25 +Author: Damien Miller +Date: Tue Jul 18 15:41:12 2023 +1000 + + conditionalise stdint.h inclusion on HAVE_STDINT_H - From Coverity CID 405194, tweaks and ok djm@ + fixes build on AIX5 at least -commit 36c6c3eff5e4a669ff414b9daf85f919666e8e03 -Author: dtucker@openbsd.org -Date: Wed Mar 8 06:21:32 2023 +0000 +commit ff047504fa6e008c4092f8929881816b8993bea0 +Author: Damien Miller +Date: Tue Jul 18 15:30:45 2023 +1000 - upstream: Plug mem leak. Coverity CID 405196, ok djm@ + conditionalise match localnetwork on ifaddrs.h - OpenBSD-Commit-ID: 175f09349387c292f626da68f65f334faaa085f2 + Fixes build breakage on platforms that lack getifaddrs() -commit dfb9b736e1ccf9e6b03eea21cd961f4fd0634c98 -Author: tb@openbsd.org -Date: Wed Mar 8 05:33:53 2023 +0000 +commit b87b03282e466ca2927954ce93f5dbf0bfdc68f6 +Author: djm@openbsd.org +Date: Mon Jul 17 06:16:33 2023 +0000 - upstream: ssh-pkcs11: synchronize error messages with errors + upstream: missing match localnetwork negation check - A handful of error messages contained incorrect function names or - otherwise inaccurate descriptions. Fix them to match reality. + OpenBSD-Commit-ID: 9a08ed8dae27d3f38cf280f1b28d4e0ff41a737a + +commit 6d6e185ba29ef4274164b77eab4dc763907f8821 +Author: jmc@openbsd.org +Date: Mon Jul 17 05:41:53 2023 +0000 + + upstream: - add -P to usage() - sync the arg name to -J in usage() - input/ok djm + with that in ssh.1 - reformat usage() to match what "man ssh" does on 80width - OpenBSD-Commit-ID: 165a15db52f75b31e1804b043480c36af09f3411 + OpenBSD-Commit-ID: 5235dd7aa42e5bf90ae54579d519f92fc107036e -commit 51875897b81b5c21b80c256a29597916edbde454 -Author: guenther@openbsd.org -Date: Wed Mar 8 04:43:12 2023 +0000 +commit f1a9898283a0638667b587ee4a950afd61ab51b0 +Author: jmc@openbsd.org +Date: Mon Jul 17 05:38:10 2023 +0000 - upstream: Delete obsolete /* ARGSUSED */ lint comments. - - ok miod@ millert@ + upstream: -P before -p in SYNOPSIS; - OpenBSD-Commit-ID: 7be168a570264d59e96a7d2d22e927d45fee0e4c + OpenBSD-Commit-ID: 535f5257c779e26c6a662a038d241b017f8cab7c -commit a76085bda883c2104afb33ab0334eca190927362 -Author: Darren Tucker -Date: Wed Mar 8 17:25:37 2023 +1100 +commit eef4d7e873568e1c84c36bb4034e2c3378250a61 +Author: jsg@openbsd.org +Date: Mon Jul 17 05:36:14 2023 +0000 - Extra brackets to prevent warning. + upstream: configuation -> configuration + + OpenBSD-Commit-ID: 4776ced33b780f1db0b2902faec99312f26a726b -commit 147ae57d4dfa0508109f93b78a7d8b92819e1f83 +commit dc1dbe94cf6532bd546a3373ad436404f8850e5f Author: djm@openbsd.org -Date: Wed Mar 8 00:05:58 2023 +0000 +Date: Mon Jul 17 05:26:38 2023 +0000 - upstream: use RSA/SHA256 when testing usability of private key in + upstream: move other RCSIDs to before their respective license blocks - agent; with/ok dtucker + too no code change - OpenBSD-Commit-ID: fe1382e2fdf23fcae631308e72342bad56066a56 + OpenBSD-Commit-ID: ef5bf46b57726e4260a63b032b0b5ac3b4fe9cd4 -commit 27fd251bc906a763e70ce0f27c8abdf8bbd1e416 +commit ebe11044681caff78834ca6b78311ad19c1860b8 Author: djm@openbsd.org -Date: Wed Mar 8 00:05:37 2023 +0000 +Date: Mon Jul 17 05:22:30 2023 +0000 - upstream: use RSA/SHA256 when testing usability of private key; + upstream: Move RCSID to before license block and away from #includes, - based on fix in bz3546 by Dmitry Belyavskiy; with/ok dtucker + where it caused merge conflict in -portable for each commit :( - OpenBSD-Commit-ID: 0ef414cc363a832f9fab92a5da0234448bce2eba + OpenBSD-Commit-ID: 756ebac963df3245258b962e88150ebab9d5fc20 -commit eee9f3fc3d52ae7d2106929bb06b7f291fb0b81a +commit 05c08e5f628de3ecf6f7ea20947735bcfa3201e0 Author: djm@openbsd.org -Date: Tue Mar 7 21:47:42 2023 +0000 +Date: Mon Jul 17 05:20:15 2023 +0000 - upstream: refactor to be more readable top to bottom. Prompted by + upstream: return SSH_ERR_KRL_BAD_MAGIC when a KRL doesn't contain a - Coverity CID 405048 which was a false-positive fd leak; ok dtucker@ + valid magic number and not SSH_ERR_MESSAGE_INCOMPLETE; the former is needed + to fall back to text revocation lists in some cases; fixes t-cert-hostkey. - OpenBSD-Commit-ID: fc55ec2af622a017defb9b768bf26faefc792c00 + OpenBSD-Commit-ID: 5c670a6c0f027e99b7774ef29f18ba088549c7e1 -commit 42a06b29a4c99272bf690f9b3be520b08b448dc5 -Author: Darren Tucker -Date: Tue Mar 7 18:34:41 2023 +1100 +commit c6fad2c3d19b74f0bd0af1ef040fc74f3a1d9ebb +Author: Damien Miller +Date: Mon Jul 17 14:56:14 2023 +1000 - Add header changes missed in previous. + avoid AF_LINK on platforms that don't define it -commit 4710077096edff2e6926dd5b15bf586491d317db -Author: dtucker@openbsd.org -Date: Tue Mar 7 06:09:14 2023 +0000 +commit 919bc3d3b712c920de1ae6be5ac6561c98886d7e +Author: djm@openbsd.org +Date: Mon Jul 17 04:08:31 2023 +0000 - upstream: Fix mem leak in environment setup. + upstream: Add support for configuration tags to ssh(1). - From jjelen at redhat.com via bz#2687, ok djm@ + This adds a ssh_config(5) "Tag" directive and corresponding + "Match tag" predicate that may be used to select blocks of + configuration similar to the pf.conf(5) keywords of the same + name. - OpenBSD-Commit-ID: 9f9e4ba3cac003e6f81da3bcebd1b9ec43e7f353 + ok markus + + OpenBSD-Commit-ID: dc08358e70e702b59ac3e591827e5a96141b06a3 -commit 03acc50d0ccb78fc91d1570de1cd0fdfea646028 -Author: dtucker@openbsd.org -Date: Mon Mar 6 12:15:47 2023 +0000 +commit 3071d85a47061c1bdaf11a0ac233b501ecba862c +Author: djm@openbsd.org +Date: Mon Jul 17 04:04:36 2023 +0000 - upstream: Unit test for kex_proposal_populate_entries. + upstream: add a "match localnetwork" predicate. - OpenBSD-Regress-ID: bdb211d80d572a08bf14b49fe2a58b9ff265c006 + This allows matching on the addresses of available network interfaces + and may be used to vary the effective client configuration based on + network location (e.g. to use a ProxyJump when not on a particular *** 22641 LINES SKIPPED *** From nobody Mon Jan 8 04:10:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7gZl2gkdz56q1f; Mon, 8 Jan 2024 04:10:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7gZl1GHkz4345; Mon, 8 Jan 2024 04:10:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704687023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6rtEN8WgjTtR8Ogtthf7ggtwmSQXaRWNh2KVgMzjPuc=; b=IUID4rncuNIZmUUw9kxFOSleen0r5B660vIquvVGxvyWMbCccPfaec++X2VlADeq3Tc1Ub qs/LhFrSsQcaba3ltO0f1+Tj6tsRBHW3mpbvCnzFAE7R2HcxRbWXZXfbPxZAinMKQUXu+x cbcHOVoIYAJqM8U5JKe/gMvUHw2YhURUddYIazthfPsJJ+HoNMV0/B+Yex0DXAujP8z+3c Q+eiKD+ypbyD+X3QZdvEUlxoR38M9qpHrTbGCTlMNh9ReHUWayeA0MPkO1/AXHO/WhPQE1 HWb717X6jBKieHWuanC85n4FBk4yPf6ZAnFZqPpAV++K8A0VEfGoj95Q11mw0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704687023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6rtEN8WgjTtR8Ogtthf7ggtwmSQXaRWNh2KVgMzjPuc=; b=wkYI8WaDGysljhFuwJVeQB/wQcWd3qrkUlsI3QsC6qd5eoTH7FwSHS5NsPyO3PInQIOTgW 2Twv8WV0HvXChgHGqbpa7mVQgVK8Ebg9aLxF3XautwFOTi/GhcI0fr0eMrJxBAX+y9XbUD FvZAj42VGCWeiuj3G0nW2JPYaqRLUYPNhLdhFq/Djd8YHjQA1IAVZJVpF4LE9W9mAEZJqC AjEXOS0kxkB8BFrwUnkQXn+IMXKvbJzlZYv/VRyBMCDBH9hG9/0L35ohsjtXclMsrFIjhQ nVb1oIfUT0+CARJ8PUlxqBvGogXgUrE5W45IU7TlzEhcjfd1u7GZ/Rd/kSUb1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704687023; a=rsa-sha256; cv=none; b=pH8fuCWWIa84nqOrFeOV2t3wHDRpqj/1S1kd4pvrXLOAYM+ZBk4d2JFadr1IXh3M6gmvmm /KW3c4ZTkH9WGj5VsrzW7daIlVuSecW561H6dApYox9Eb11UDqwLRC5wHqBPeRv3lYQtqY IwHXnOGaTfPJUlF+7Hna4qvdE5cgOmCXDSa/OolDdFAX3pK3nFJlXIOlp7L4MBTBifFBW/ Ap0gyRjW+WhB+d+mz6AxfKw+xW0UwV8+A4Pe1MylJQdvglWqeYEkE0W+WVfHN/5Bqc5yVv sloMrMN2GfaiQ8dClX9C7llx1nkZN4Gc5IOB3m0Irh1n13eNeXm9ybcep/egHg== 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 4T7gZk6Z25zsMj; Mon, 8 Jan 2024 04:10:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4084AMN3066411; Mon, 8 Jan 2024 04:10:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4084AMJs066408; Mon, 8 Jan 2024 04:10:22 GMT (envelope-from git) Date: Mon, 8 Jan 2024 04:10:22 GMT Message-Id: <202401080410.4084AMJs066408@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: a4439dc6c872 - stable/13 - ssh: fix OpenSSH 9.4 regression with multiplexed sessions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: a4439dc6c87259c0b82ee8ad9d756452abb671fa Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a4439dc6c87259c0b82ee8ad9d756452abb671fa commit a4439dc6c87259c0b82ee8ad9d756452abb671fa Author: Ed Maste AuthorDate: 2023-08-20 19:16:54 +0000 Commit: Ed Maste CommitDate: 2024-01-08 00:49:07 +0000 ssh: fix OpenSSH 9.4 regression with multiplexed sessions Upstream commit message: upstream: fix regression in OpenSSH 9.4 (mux.c r1.99) that caused multiplexed sessions to ignore SIGINT under some circumstances. Reported by / feedback naddy@, ok dtucker@ OpenBSD-Commit-ID: 4d5c6c894664f50149153fd4764f21f43e7d7e5a Fixes: 535af610a4fd ("ssh: Update to OpenSSH 9.4p1") Obtained from: OpenSSH 803e22eabd3b Sponsored by: The FreeBSD Foundation (cherry picked from commit 1b91d634a58c45d7b33dee044034260f747c80d9) --- crypto/openssh/kex.c | 4 ++-- crypto/openssh/misc.c | 42 ++++++++++++++++++++++++++++++------------ crypto/openssh/misc.h | 5 +++-- crypto/openssh/mux.c | 6 ++++-- 4 files changed, 39 insertions(+), 18 deletions(-) diff --git a/crypto/openssh/kex.c b/crypto/openssh/kex.c index 251cff7af530..7c47c84ba5e6 100644 --- a/crypto/openssh/kex.c +++ b/crypto/openssh/kex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kex.c,v 1.178 2023/03/12 10:40:39 dtucker Exp $ */ +/* $OpenBSD: kex.c,v 1.179 2023/08/18 01:37:41 djm Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * @@ -1362,7 +1362,7 @@ kex_exchange_identification(struct ssh *ssh, int timeout_ms, for (;;) { if (timeout_ms > 0) { r = waitrfd(ssh_packet_get_connection_in(ssh), - &timeout_ms); + &timeout_ms, NULL); if (r == -1 && errno == ETIMEDOUT) { send_error(ssh, "Timed out waiting " "for SSH identification string."); diff --git a/crypto/openssh/misc.c b/crypto/openssh/misc.c index 4b87c4090804..956587035517 100644 --- a/crypto/openssh/misc.c +++ b/crypto/openssh/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.185 2023/08/04 06:32:40 dtucker Exp $ */ +/* $OpenBSD: misc.c,v 1.186 2023/08/18 01:37:41 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005-2020 Damien Miller. All rights reserved. @@ -313,20 +313,38 @@ set_sock_tos(int fd, int tos) * Returns 0 if fd ready or -1 on timeout or error (see errno). */ static int -waitfd(int fd, int *timeoutp, short events) +waitfd(int fd, int *timeoutp, short events, volatile sig_atomic_t *stop) { struct pollfd pfd; - struct timeval t_start; - int oerrno, r, have_timeout = (*timeoutp >= 0); + struct timespec timeout; + int oerrno, r; + sigset_t nsigset, osigset; + if (timeoutp && *timeoutp == -1) + timeoutp = NULL; pfd.fd = fd; pfd.events = events; - for (; !have_timeout || *timeoutp >= 0;) { - monotime_tv(&t_start); - r = poll(&pfd, 1, *timeoutp); + ptimeout_init(&timeout); + if (timeoutp != NULL) + ptimeout_deadline_ms(&timeout, *timeoutp); + if (stop != NULL) + sigfillset(&nsigset); + for (; timeoutp == NULL || *timeoutp >= 0;) { + if (stop != NULL) { + sigprocmask(SIG_BLOCK, &nsigset, &osigset); + if (*stop) { + sigprocmask(SIG_SETMASK, &osigset, NULL); + errno = EINTR; + return -1; + } + } + r = ppoll(&pfd, 1, ptimeout_get_tsp(&timeout), + stop != NULL ? &osigset : NULL); oerrno = errno; - if (have_timeout) - ms_subtract_diff(&t_start, timeoutp); + if (stop != NULL) + sigprocmask(SIG_SETMASK, &osigset, NULL); + if (timeoutp) + *timeoutp = ptimeout_get_ms(&timeout); errno = oerrno; if (r > 0) return 0; @@ -346,8 +364,8 @@ waitfd(int fd, int *timeoutp, short events) * Returns 0 if fd ready or -1 on timeout or error (see errno). */ int -waitrfd(int fd, int *timeoutp) { - return waitfd(fd, timeoutp, POLLIN); +waitrfd(int fd, int *timeoutp, volatile sig_atomic_t *stop) { + return waitfd(fd, timeoutp, POLLIN, stop); } /* @@ -381,7 +399,7 @@ timeout_connect(int sockfd, const struct sockaddr *serv_addr, break; } - if (waitfd(sockfd, timeoutp, POLLIN | POLLOUT) == -1) + if (waitfd(sockfd, timeoutp, POLLIN | POLLOUT, NULL) == -1) return -1; /* Completed or failed */ diff --git a/crypto/openssh/misc.h b/crypto/openssh/misc.h index fd77a7fd7273..f9bdc6eb51bd 100644 --- a/crypto/openssh/misc.h +++ b/crypto/openssh/misc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.h,v 1.103 2023/07/19 14:02:27 djm Exp $ */ +/* $OpenBSD: misc.h,v 1.104 2023/08/18 01:37:41 djm Exp $ */ /* * Author: Tatu Ylonen @@ -19,6 +19,7 @@ #include #include #include +#include /* Data structure for representing a forwarding request. */ struct Forward { @@ -57,7 +58,7 @@ char *get_rdomain(int); int set_rdomain(int, const char *); int get_sock_af(int); void set_sock_tos(int, int); -int waitrfd(int, int *); +int waitrfd(int, int *, volatile sig_atomic_t *); int timeout_connect(int, const struct sockaddr *, socklen_t, int *); int a2port(const char *); int a2tun(const char *, int *); diff --git a/crypto/openssh/mux.c b/crypto/openssh/mux.c index 3a0f87674b95..d9d5e7d994ca 100644 --- a/crypto/openssh/mux.c +++ b/crypto/openssh/mux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.99 2023/08/04 06:32:40 dtucker Exp $ */ +/* $OpenBSD: mux.c,v 1.100 2023/08/18 01:37:41 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller * @@ -1480,7 +1480,9 @@ mux_client_read(int fd, struct sshbuf *b, size_t need, int timeout_ms) case EWOULDBLOCK: #endif case EAGAIN: - if (waitrfd(fd, &timeout_ms) == -1) + if (waitrfd(fd, &timeout_ms, + &muxclient_terminate) == -1 && + errno != EINTR) return -1; /* timeout */ /* FALLTHROUGH */ case EINTR: From nobody Mon Jan 8 04:25:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7gvf4001z56rV7; Mon, 8 Jan 2024 04:25:02 +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 4T7gvf3Sdhz462L; Mon, 8 Jan 2024 04:25:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704687902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jWDOS25x1yZjo5n9YTlk8YMKNj9tp/inNLeU788B3AE=; b=jtJCRAEEIWhdT/bstqQ13DqSm7Phnly1nO3YGOSVssgxiQTdYM05KgMOkuY+LINTxoFHyF sXXnTL1tXzxATm0LsBlpB1VITEqYJqON3XA2IqsDkavgIc2WH1+THG1cl2GCH2OHaxkJk7 3/gdpmu8g3p/dx2MUuMSRLgp74+dPa+vF/I88xpCR5r4AEDqp146KM5bx5lNDanxqFV4JH t8iPihoguLcwPFYkLbZmVOlzPvqXbGzQD0UCSrBZLm6jyP/F5b/M6SzJvWDAwDkfZL+0S1 okcM6SImhNIgYTTpcrJ7ktBV685HD2HC30H9ue269QpIYMQyyHC3pwmCpG0M/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704687902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jWDOS25x1yZjo5n9YTlk8YMKNj9tp/inNLeU788B3AE=; b=Pr6yDDDJWGMrzeye3bl9+GxDUi9IsWoi2SG9dQ9SZhKUu3NWqeRl/YuQNcGoq453qUg7Ys YD69L+XuqkhPYKQiroVjV6VIWon6AE70k2O9VQWecX2O22cbeK7HdKI9apJBgZAw7gmTaf gNZpV7ng7SFv6xumXdgpmQxRjcVLCclKUsw+9meOS41x0u+VRWRZzCnT4I/VrjjbDl7jqa x9Y1Cqvglpp9pFkv9TCr7o9MStlv5DVc6KF3cLF3tSokXPugVChad0hjquDgzrTOLZpPDs sp5ocvIDAVYg78prbDutGfa6dDDcCHP9wpvIAojOMOKb1RvKgrzSK0yqZ61a2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704687902; a=rsa-sha256; cv=none; b=aK+eA7pvBsX6CXuzDSxx2GonYb8OQMvSM90+SLdb/4OXMAr6IolzYKzK9gsD9BMXmMxwrA JkGnIzVis3xiK3O0YKQ0i+8mOVALPUswL8gMtbyZEBkOEq1/8poGnFr75dQBXTRBp2zZ0R 5UE8kBMZv1ray93Kg6UU3Ibh9VIUKabKXay3wBOL2bamh+K5qOPZCQb1/MgPcopyIwZnHA NtgmOIyX5GXam6q1HKOBQxOu1mHr/ZN5r9vXcLawGhx9nrduI7BBhUChACozWgH8+Z/ZOn DmBMG8nIftfEKi2DRzPQMKgKnMUZUSezShXzB9Xg6idn+dvSuUbgQH3IPVP0Gg== 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 4T7gvf2WG1zsxs; Mon, 8 Jan 2024 04:25: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 4084P2uf090608; Mon, 8 Jan 2024 04:25:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4084P2Zr090605; Mon, 8 Jan 2024 04:25:02 GMT (envelope-from git) Date: Mon, 8 Jan 2024 04:25:02 GMT Message-Id: <202401080425.4084P2Zr090605@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: e4166d1934ab - stable/13 - ssh: regen config.h for stable/13 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: e4166d1934abc91619b89e21681a6e8305d3cdac Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e4166d1934abc91619b89e21681a6e8305d3cdac commit e4166d1934abc91619b89e21681a6e8305d3cdac Author: Ed Maste AuthorDate: 2024-01-08 04:16:28 +0000 Commit: Ed Maste CommitDate: 2024-01-08 04:16:57 +0000 ssh: regen config.h for stable/13 Sponsored by: The FreeBSD Foundation --- crypto/openssh/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/openssh/config.h b/crypto/openssh/config.h index 44ae53f6c354..e36e53c3a781 100644 --- a/crypto/openssh/config.h +++ b/crypto/openssh/config.h @@ -493,7 +493,7 @@ /* #undef HAVE_EVP_CIPHER_CTX_GET_IV */ /* Define to 1 if you have the `EVP_CIPHER_CTX_get_updated_iv' function. */ -#define HAVE_EVP_CIPHER_CTX_GET_UPDATED_IV 1 +/* #undef HAVE_EVP_CIPHER_CTX_GET_UPDATED_IV */ /* Define to 1 if you have the `EVP_CIPHER_CTX_iv' function. */ #define HAVE_EVP_CIPHER_CTX_IV 1 @@ -1414,7 +1414,7 @@ #define HAVE_SYS_CDEFS_H 1 /* Define to 1 if you have the header file. */ -#define HAVE_SYS_DIR_H 1 +/* #undef HAVE_SYS_DIR_H */ /* Define if your system defines sys_errlist[] */ #define HAVE_SYS_ERRLIST 1 From nobody Mon Jan 8 04:25:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7gw45qRFz56rJQ; Mon, 8 Jan 2024 04:25:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7gw45Y2vz466X; Mon, 8 Jan 2024 04:25:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704687924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MdOE/L7D46ZBISPazAgFyDurEoYIid97+mM9TtxdeiQ=; b=qff2WNgWJ+AMe/rQr0CBeLyCCzQymewpkk2f9xzfM4/4SMPRPNiwktekEy1618o3MVMO5C GozRu2NHQHzr0up0QAMuFxx5cYRHFQnRa6p6sD5cKTjz4uKK13D8aAOj6tavpBRmWwFkWz Z8SJ0E1kfcTgUPvDgnq/3Okybo2tmU3GAet+idYVbLRkTFwJ0bx1PTTzPjFkpzllb5RvnB w4B5TFCNvjIoZugcIAWKrLitFd/sKTYr+nzd6SR35R3T1yHe8g1RY90MIe6OFx2yc2L/Sa NA6F1/M/CCHPmpQl0CqDFw8D9xjBN2BzefH4LrGxh2WqVu/SIBoPdn8xSF5hkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704687924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MdOE/L7D46ZBISPazAgFyDurEoYIid97+mM9TtxdeiQ=; b=y22QgP4e9umkeaKofMYWEiy02tuTbvEByJ0AkaCTUWQhPyFGCIYG4vKA7wNHKxXkv0ew6k 9JnXGQ/YWU0Us9geSHKZLNMNbAg3qUxqUlqZgkywAs9s8vFqaRSw7hI1F+wMGv0QdkpMVQ Ai41iQPUBhHaiEULFefOxPfkAQhQxgNhYczhTDhinLJFBJzp9KysQIitv8FWYhMhtBSmeB 5JjLvDyhjd5EzhfOLVdhBxArE2EflYqMye4Q4rc+5MnAkK/AtRXNBnx2eKibxN37fnOkrF unfmqti+pJn7uRctEPZbVz6Pg9vQpZIRd2iJ1uo+eQkzZ7vfHpw8bJZ+zyQsAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704687924; a=rsa-sha256; cv=none; b=WHxiXhaM/BrYfeVZqvrtoOc+hgyyAVXvex/LIcTTasdGDnvcLHfSPGyyEsJFKseDs/Cf1j gD0cnosIlvlUhb6c4h1uP4rHtfq6bxiU/aIHh6qgtxdEhH9xPhQ3iajvMZRB47xm1tND/n qKyfLHJRU/zrAkXSgJdm8rfJlqCNfexFTj9bUVwysKii0p73K1dZe9ag4ApZ0iB4MsmBOD yjgyW0pVuI4znJ4NorRtkCHs2dwwmAWXU1AwjC7xBGcWgegKwR3iLpvoOKMiVhdnZd/+NJ WTX5r5gwMF9qhqwVV3fT2Vn8+CuW46Ql/EYlJ40c6dI0McmXtPwbuir8348zKQ== 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 4T7gw44b68zsdT; Mon, 8 Jan 2024 04:25: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 4084PODn090782; Mon, 8 Jan 2024 04:25:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4084POwE090779; Mon, 8 Jan 2024 04:25:24 GMT (envelope-from git) Date: Mon, 8 Jan 2024 04:25:24 GMT Message-Id: <202401080425.4084POwE090779@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 221a6bc397ad - stable/13 - ssh: Update to OpenSSH 9.5p1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 221a6bc397ad8a8400c3b4cb6e020cba56f0d68f Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=221a6bc397ad8a8400c3b4cb6e020cba56f0d68f commit 221a6bc397ad8a8400c3b4cb6e020cba56f0d68f Author: Ed Maste AuthorDate: 2023-10-09 17:28:17 +0000 Commit: Ed Maste CommitDate: 2024-01-08 04:21:51 +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 (cherry picked from commit edf8578117e8844e02c0121147f45e4609b30680) (cherry picked from commit b24ca3caa7524e650550d8a2ee1637e6efcb87f1) --- 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 | 37 +- 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, 1640 insertions(+), 1601 deletions(-) diff --git a/crypto/openssh/.github/ci-status.md b/crypto/openssh/.github/ci-status.md index f3e088fd6043..8d4cea10dba4 100644 --- a/crypto/openssh/.github/ci-status.md +++ b/crypto/openssh/.github/ci-status.md @@ -6,6 +6,10 @@ master : [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/openssh.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:openssh) [![Coverity Status](https://scan.coverity.com/projects/21341/badge.svg)](https://scan.coverity.com/projects/openssh-portable) +9.4 : +[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg?branch=V_9_4)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:V_9_4) +[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg?branch=V_9_4)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_9_4) + 9.3 : [![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg?branch=V_9_3)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:V_9_3) [![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg?branch=V_9_3)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_9_3) diff --git a/crypto/openssh/.github/configs b/crypto/openssh/.github/configs index e054eb3196b5..c7d6a55ab962 100755 --- a/crypto/openssh/.github/configs +++ b/crypto/openssh/.github/configs @@ -30,6 +30,13 @@ case "$config" in default|sol64) ;; c89) + # If we don't have LLONG_MAX, configure will figure out that it can + # get it by setting -std=gnu99, at which point we won't be testing + # C89 any more. To avoid this, feed it in via CFLAGS. + llong_max=`gcc -E -dM - +Date: Wed Oct 4 15:34:10 2023 +1100 + + crank version numbers + +commit f65f187b105d9b5c12fd750a211397d08c17c6d4 +Author: djm@openbsd.org +Date: Wed Oct 4 04:04:09 2023 +0000 + + upstream: openssh-9.5 + + OpenBSD-Commit-ID: 5e0af680480bd3b6f5560cf840ad032d48fd6b16 + +commit ffe27e54a4bb18d5d3bbd3f4cc93a41b8d94dfd2 +Author: djm@openbsd.org +Date: Wed Oct 4 04:03:50 2023 +0000 + + upstream: add some cautionary text about % token expansion and + + shell metacharacters; based on report from vinci AT protonmail.ch + + OpenBSD-Commit-ID: aa1450a54fcee2f153ef70368d90edb1e7019113 + +commit 60ec3d54fd1ebfe2dda75893fa1e870b8dffbb0d +Author: djm@openbsd.org +Date: Tue Oct 3 23:56:10 2023 +0000 + + upstream: fix link to agent draft; spotted by Jann Horn + + OpenBSD-Commit-ID: ff5bda21a83ec013db683e282256a85201d2dc4b + +commit 12e2d4b13f6f63ce2de13cbfcc9e4d0d4b4ab231 +Author: Damien Miller +Date: Wed Oct 4 10:54:04 2023 +1100 + + use portable provider allowlist path in manpage + + spotted by Jann Horn + +commit 6c2c6ffde75df95fd838039850d3dd3d84956d87 +Author: deraadt@openbsd.org +Date: Tue Sep 19 20:37:07 2023 +0000 + + upstream: typo; from Jim Spath + + OpenBSD-Commit-ID: 2f5fba917b5d4fcf93d9e0b0756c7f63189e228e + +commit b6b49130a0089b297245ee39e769231d7c763014 +Author: djm@openbsd.org +Date: Sun Sep 10 23:12:32 2023 +0000 + + upstream: rename remote_glob() -> sftp_glob() to match other API + + OpenBSD-Commit-ID: d9dfb3708d824ec02970a84d96cf5937e0887229 + +commit 21b79af6c8d2357c822c84cef3fbdb8001ed263b +Author: djm@openbsd.org +Date: Sun Sep 10 03:51:55 2023 +0000 + + upstream: typo in comment + + OpenBSD-Commit-ID: 69285e0ce962a7c6b0ab5f17a293c60a0a360a18 + +commit 41232d25532b4d2ef6c5db62efc0cf50a79d26ca +Author: Darren Tucker +Date: Sun Sep 10 15:45:38 2023 +1000 + + Use zero-call-used-regs=used with Apple compilers. + + Apple's versions of clang have version numbers that do not match the + corresponding upstream clang versions. Unfortunately, they do still + have the clang-15 zero-call-used-regs=all bug, so for now use the value + that doesn't result in segfaults. We could allowlist future versions + that are known to work. bz#3584 (and probably also our github CI + failures). + +commit 90ccc5918ea505bf156c31148b6b59a1bf5d6dc6 +Author: djm@openbsd.org +Date: Sun Sep 10 03:25:53 2023 +0000 + + upstream: randomise keystroke obfuscation intervals and average + + interval rate. ok dtucker@ + + OpenBSD-Commit-ID: 05f61d051ab418fcfc4857ff306e420037502382 + +commit bd1b9e52f5fa94d87223c90905c5fdc1a7c32aa6 +Author: djm@openbsd.org +Date: Fri Sep 8 06:34:24 2023 +0000 + + upstream: fix sizeof(*ptr) instead sizeof(ptr) in realloc (pointer here + + is char**, so harmless); spotted in CID 416964 + + OpenBSD-Commit-ID: c61caa4a5a667ee20bb1042098861e6c72c69002 + +commit c4f966482983e18601eec70a1563115de836616f +Author: djm@openbsd.org +Date: Fri Sep 8 06:10:57 2023 +0000 + + upstream: regress test recursive remote-remote directories copies where + + the directory contains a symlink to another directory. + + also remove errant `set -x` that snuck in at some point + + OpenBSD-Regress-ID: 1c94a48bdbd633ef2285954ee257725cd7bc456f + +commit 5e1dfe5014ebc194641678303e22ab3bba15f4e5 +Author: djm@openbsd.org +Date: Fri Sep 8 06:10:02 2023 +0000 + + upstream: fix recursive remote-remote copies of directories that + + contain symlinks to other directories (similar to bz3611) + + OpenBSD-Commit-ID: 7e19d2ae09b4f941bf8eecc3955c9120171da37f + +commit 7c0ce2bf98b303b6ad91493ee3247d96c18ba1f6 +Author: djm@openbsd.org +Date: Fri Sep 8 05:50:57 2023 +0000 + + upstream: regress test for recursive copies of directories containing + + symlinks to other directories. bz3611, ok dtucker@ + + OpenBSD-Regress-ID: eaa4c29cc5cddff4e72a16bcce14aeb1ecfc94b9 + +commit 2de990142a83bf60ef694378b8598706bc654b08 +Author: djm@openbsd.org +Date: Fri Sep 8 05:56:13 2023 +0000 + + upstream: the sftp code was one of my first contributions to + + OpenSSH and it shows - the function names are terrible. + + Rename do_blah() to sftp_blah() to make them less so. + + Completely mechanical except for sftp_stat() and sftp_lstat() which + change from returning a pointer to a static variable (error-prone) to + taking a pointer to a caller-provided receiver. + + OpenBSD-Commit-ID: eb54d6a72d0bbba4d623e2175cf5cc4c75dc2ba4 + +commit 249d8bd0472b53e3a2a0e138b4c030a31e83346a +Author: djm@openbsd.org +Date: Fri Sep 8 05:50:12 2023 +0000 + + upstream: fix scp in SFTP mode recursive upload and download of + + directories that contain symlinks to other directories. In scp mode, the + links would be followed, but in SFTP mode they were not. bz3611, ok dtucker@ + + OpenBSD-Commit-ID: 9760fda668eaa94a992250d7670dfbc62a45197c + +commit 0e1f4401c466fa4fdaea81b6dadc8dd1fc4cf0af +Author: djm@openbsd.org +Date: Wed Sep 6 23:36:09 2023 +0000 + + upstream: regression test for override of subsystem in match blocks + + OpenBSD-Regress-ID: 5f8135da3bfda71067084c048d717b0e8793e87c + +commit 8a1450c62035e834d8a79a5d0d1c904236f9dcfe +Author: djm@openbsd.org +Date: Wed Sep 6 23:35:35 2023 +0000 + + upstream: allow override of Sybsystem directives in sshd Match + + blocks + + OpenBSD-Commit-ID: 3911d18a826a2d2fe7e4519075cf3e57af439722 + +commit 6e52826e2a74d077147a82ead8d4fbd5b54f4e3b +Author: djm@openbsd.org +Date: Wed Sep 6 23:26:37 2023 +0000 + + upstream: allocate the subsystems array as necessary and remove the + + fixed limit of subsystems. Saves a few kb of memory in the server and makes + it more like the other options. + + OpenBSD-Commit-ID: e683dfca6bdcbc3cc339bb6c6517c0c4736a547f + +commit e19069c9fac4c111d6496b19c7f7db43b4f07b4f +Author: djm@openbsd.org +Date: Wed Sep 6 23:23:53 2023 +0000 + + upstream: preserve quoting of Subsystem commands and arguments. + + This may change behaviour of exotic configurations, but the most common + subsystem configuration (sftp-server) is unlikely to be affected. + + OpenBSD-Commit-ID: 8ffa296aeca981de5b0945242ce75aa6dee479bf + +commit 52dfe3c72d98503d8b7c6f64fc7e19d685636c0b +Author: djm@openbsd.org +Date: Wed Sep 6 23:21:36 2023 +0000 + + upstream: downgrade duplicate Subsystem directives from being a + + fatal error to being a debug message to match behaviour with just about all + other directives. + + OpenBSD-Commit-ID: fc90ed2cc0c18d4eb8e33d2c5e98d25f282588ce + +commit 1ee0a16e07b6f0847ff463d7b5221c4bf1876e25 +Author: djm@openbsd.org +Date: Wed Sep 6 23:18:15 2023 +0000 + + upstream: handle cr+lf (instead of just cr) in sshsig signature + + files + + OpenBSD-Commit-ID: 647460a212b916540016d066568816507375fd7f + +commit e1c284d60a928bcdd60bc575c6f9604663502770 +Author: job@openbsd.org +Date: Mon Sep 4 10:29:58 2023 +0000 + + upstream: Generate Ed25519 keys when invoked without arguments + + Ed25519 public keys are very convenient due to their small size. + OpenSSH has supported Ed25519 since version 6.5 (January 2014). + + OK djm@ markus@ sthen@ deraadt@ + + OpenBSD-Commit-ID: f498beaad19c8cdcc357381a60df4a9c69858b3f + +commit 694150ad92765574ff82a18f4e86322bd3231e68 +Author: djm@openbsd.org +Date: Mon Sep 4 00:08:14 2023 +0000 + + upstream: trigger keystroke timing obfucation only if the channels + + layer enqueud some data in the last poll() cycle; this avoids triggering the + obfuscatior for non-channels data like ClientAlive probes and also fixes a + related problem were the obfucations would be triggered on fully quiescent + connections. + + Based on / tested by naddy@ + + OpenBSD-Commit-ID: d98f32dc62d7663ff4660e4556e184032a0db123 + +commit b5fd97896b59a3a46245cf438cc8b16c795d9f74 +Author: djm@openbsd.org +Date: Mon Sep 4 00:04:02 2023 +0000 + + upstream: avoid bogus "obfuscate_keystroke_timing: stopping ..." + + debug messages when keystroke timing obfuscation was never started; spotted + by naddy@ + + OpenBSD-Commit-ID: 5c270d35f7d2974db5c1646e9c64188f9393be31 + +commit ccf7d913db34e49b7a6db1b8331bd402004c840d +Author: djm@openbsd.org +Date: Mon Sep 4 00:01:46 2023 +0000 + + upstream: make channel_output_poll() return a flag indicating + + whether channel data was enqueued. Will be used to improve keystroke timing + obfuscation. Problem spotted by / tested by naddy@ + + OpenBSD-Commit-ID: f9776c7b0065ba7c3bbe50431fd3b629f44314d0 + +commit 43254b326ac6e2131dbd750f9464dc62c14bd5a7 +Author: djm@openbsd.org +Date: Sun Sep 3 23:59:32 2023 +0000 + + upstream: set interactive mode for ControlPersist sessions if they + + originally requested a tty; enables keystroke timing obfuscation for most + ControlPersist sessions. Spotted by naddy@ + + OpenBSD-Commit-ID: 72783a26254202e2f3f41a2818a19956fe49a772 + +commit ff3eda68ceb2e2bb8f48e3faceb96076c3e85c20 +Author: Darren Tucker +Date: Thu Aug 31 23:02:35 2023 +1000 + + Set LLONG_MAX for C89 test. + + If we don't have LLONG_MAX, configure will figure out that it can get it + by setting -std=gnu99, at which point we won't be testing C89 any more. + To avoid this, feed it in via CFLAGS. + +commit f98031773db361424d59e3301aa92aacf423d920 +Author: djm@openbsd.org +Date: Tue Aug 29 02:50:10 2023 +0000 + + upstream: make PerSourceMaxStartups first-match-wins; ok dtucker@ + + OpenBSD-Commit-ID: dac0c24cb709e3c595b8b4f422a0355dc5a3b4e7 + +commit cfa66857db90cd908de131e0041a50ffc17c7df8 +Author: djm@openbsd.org +Date: Mon Aug 28 09:52:09 2023 +0000 + + upstream: descriptive text shouldn't be under .Cm + + OpenBSD-Commit-ID: b1afaeb456a52bc8a58f4f9f8b2f9fa8f6bf651b + +commit 01dbf3d46651b7d6ddf5e45d233839bbfffaeaec +Author: djm@openbsd.org +Date: Mon Aug 28 09:48:11 2023 +0000 + + upstream: limit artificial login delay to a reasonable maximum (5s) + + and don't delay at all for the "none" authentication mechanism. Patch by + Dmitry Belyavskiy in bz3602 with polish/ok dtucker@ + + OpenBSD-Commit-ID: 85b364676dd84cf1de0e98fc2fbdcb1a844ce515 + +commit 528da5b9d7c5da01ed7a73ff21c722e1b5326006 +Author: jmc@openbsd.org +Date: Mon Aug 28 05:32:28 2023 +0000 + + upstream: add spacing for punctuation when macro args; + + OpenBSD-Commit-ID: e80343c16ce0420b2aec98701527cf90371bd0db + +commit 3867361ca691d0956ef7d5fb8181cf554a91d84a +Author: djm@openbsd.org +Date: Mon Aug 28 04:06:52 2023 +0000 + + upstream: explicit long long type in timing calculations (doesn't + + matter, since the range is pre-clamped) + + OpenBSD-Commit-ID: f786ed902d04a5b8ecc581d068fea1a79aa772de + +commit 7603ba71264e7fa938325c37eca993e2fa61272f +Author: djm@openbsd.org +Date: Mon Aug 28 03:31:16 2023 +0000 + + upstream: Add keystroke timing obfuscation to the client. + + This attempts to hide inter-keystroke timings by sending interactive + traffic at fixed intervals (default: every 20ms) when there is only a + small amount of data being sent. It also sends fake "chaff" keystrokes + for a random interval after the last real keystroke. These are + controlled by a new ssh_config ObscureKeystrokeTiming keyword/ + + feedback/ok markus@ + + OpenBSD-Commit-ID: 02231ddd4f442212820976068c34a36e3c1b15be + +commit dce6d80d2ed3cad2c516082682d5f6ca877ef714 +Author: djm@openbsd.org +Date: Mon Aug 28 03:28:43 2023 +0000 + + upstream: Introduce a transport-level ping facility + + This adds a pair of SSH transport protocol messages SSH2_MSG_PING/PONG + to implement a ping capability. These messages use numbers in the "local + extensions" number space and are advertised using a "ping@openssh.com" + ext-info message with a string version number of "0". + + ok markus@ + + OpenBSD-Commit-ID: b6b3c4cb2084c62f85a8dc67cf74954015eb547f + +commit d2d247938b38b928f8a6e1a47a330c5584d3a358 +Author: tobhe@openbsd.org +Date: Mon Aug 21 21:16:18 2023 +0000 + + upstream: Log errors in kex_exchange_identification() with level + + verbose instead of error to reduce preauth log spam. All of those get logged + with a more generic error message by sshpkt_fatal(). + + feedback from sthen@ + ok djm@ + + OpenBSD-Commit-ID: bd47dab4695b134a44c379f0e9a39eed33047809 + +commit 9d7193a8359639801193ad661a59d1ae4dc3d302 +Author: djm@openbsd.org +Date: Mon Aug 21 04:59:54 2023 +0000 + + upstream: correct math for ClientAliveInterval that caused the + + probes to be sent less frequently than configured; from Dawid Majchrzak + + OpenBSD-Commit-ID: 641153e7c05117436ddfc58267aa267ca8b80038 + +commit 3c6ab63b383b0b7630da175941e01de9db32a256 +Author: Darren Tucker +Date: Fri Aug 25 14:48:02 2023 +1000 + + Include Portable version in sshd version string. + + bz#3608, ok djm@ + +commit 17fa6cd10a26e193bb6f65d21264d2fe553bcd87 +Author: Darren Tucker +Date: Mon Aug 21 19:47:58 2023 +1000 + + obsd-arm64 host is real hardware... + + so put in the correct config location. + +commit 598ca75c85acaaacee5ef954251e489cc20d7be9 +Author: Darren Tucker +Date: Mon Aug 21 18:38:36 2023 +1000 + + Add OpenBSD ARM64 test host. + +commit 1acac79bfbe207e8db639e8043524962037c8feb +Author: Darren Tucker +Date: Mon Aug 21 18:05:26 2023 +1000 + + Add test for zlib development branch. + +commit 84efebf352fc700e9040c8065707c63caedd36a3 +Author: djm@openbsd.org +Date: Mon Aug 21 04:36:46 2023 +0000 + + upstream: want stdlib.h for free(3) + + OpenBSD-Commit-ID: 743af3c6e3ce5e6cecd051668f0327a01f44af29 + +commit cb4ed12ffc332d1f72d054ed92655b5f1c38f621 +Author: Darren Tucker +Date: Sat Aug 19 07:39:08 2023 +1000 + + Fix zlib version check for 1.3 and future version. + + bz#3604. + +commit 25b75e21f16bccdaa472ea1889b293c9bd51a87b +Author: Darren Tucker +Date: Mon Aug 14 11:10:08 2023 +1000 + + Add 9.4 branch to CI status page. + +commit 803e22eabd3ba75485eedd8b7b44d6ace79f2052 +Author: djm@openbsd.org +Date: Fri Aug 18 01:37:41 2023 +0000 + + upstream: fix regression in OpenSSH 9.4 (mux.c r1.99) that caused + + multiplexed sessions to ignore SIGINT under some circumstances. Reported by / + feedback naddy@, ok dtucker@ + + OpenBSD-Commit-ID: 4d5c6c894664f50149153fd4764f21f43e7d7e5a + +commit e706bca324a70f68dadfd0ec69edfdd486eed23a +Author: djm@openbsd.org +Date: Wed Aug 16 16:14:11 2023 +0000 + + upstream: defence-in-depth MaxAuthTries check in monitor; ok markus + + OpenBSD-Commit-ID: 65a4225dc708e2dae71315adf93677edace46c21 + +commit d1ab7eb90474df656d5e9935bae6df0bd000d343 +Author: djm@openbsd.org +Date: Mon Aug 14 03:37:00 2023 +0000 + + upstream: add message number of SSH2_MSG_NEWCOMPRESS defined in RFC8308 + + OpenBSD-Commit-ID: 6c984171c96ed67effd7b5092f3d3975d55d6028 + +commit fa8da52934cb7dff6f660a143276bdb28bb9bbe1 +Author: Darren Tucker +Date: Sun Aug 13 15:01:27 2023 +1000 + + Add obsd72 and obsd73 test targets. + +commit f9f18006678d2eac8b0c5a5dddf17ab7c50d1e9f +Author: djm@openbsd.org +Date: Thu Aug 10 23:05:48 2023 +0000 + + upstream: better debug logging of sessions' exit status + + OpenBSD-Commit-ID: 82237567fcd4098797cbdd17efa6ade08e1a36b0 + +commit a8c57bcb077f0cfdffcf9f23866bf73bb93e185c +Author: naddy@openbsd.org +Date: Thu Aug 10 14:37:32 2023 +0000 + + upstream: drop a wayward comma, ok jmc@ + + OpenBSD-Commit-ID: 5c11fbb9592a29b37bbf36f66df50db9d38182c6 + +commit e962f9b318a238db1becc53c2bf79dd3a49095b4 Author: Damien Miller Date: Thu Aug 10 11:10:22 2023 +1000 depend -commit 41bfb63f5101fbacde9d8d2ada863f9ee16df194 +commit 0fcb60bf83130dfa428bc4422b3a3ac20fb528af Author: Damien Miller Date: Thu Aug 10 11:05:42 2023 +1000 update versions in RPM specs -commit e598b92b1eecedac21667edf1fe92078eaf8f2b1 +commit d0cee4298491314f09afa1c4383a66d913150b26 Author: Damien Miller Date: Thu Aug 10 11:05:14 2023 +1000 update version in README -commit e797e5ffa74377c8696e3b0559a258d836479239 +commit 78b4dc6684f4d35943b46b24ee645edfdb9974f5 Author: djm@openbsd.org Date: Thu Aug 10 01:01:07 2023 +0000 @@ -24,6 +511,12 @@ Date: Thu Aug 10 01:01:07 2023 +0000 OpenBSD-Commit-ID: 71fc1e01a4c4ea061b252bd399cda7be757e6e35 +commit 58ca4f0aa8c4306ac0a629c9a85fb1efaf4ff092 +Author: Darren Tucker +Date: Thu Aug 10 11:30:24 2023 +1000 + + Only include unistd.h once. + commit 3961ed02dc578517a9d2535128cff5c3a5460d28 Author: Damien Miller Date: Thu Aug 10 09:08:49 2023 +1000 @@ -9062,1113 +9555,3 @@ Date: Wed Oct 6 13:16:21 2021 +1100 fix broken OPENSSL_HAS_ECC test spotted by dtucker - -commit 16a25414f303cd6790eb967aeb962040e32c9c7a -Author: Damien Miller -Date: Fri Oct 1 22:40:06 2021 +1000 - - make sk-dummy.so work without libcrypto installed - -commit dee22129bbc61e25b1003adfa2bc584c5406ef2d -Author: Damien Miller -Date: Fri Oct 1 16:35:49 2021 +1000 - - make OPENSSL_HAS_ECC checks more thorough - - ok dtucker - -commit 872595572b6c9a584ed754165e8b7c4c9e7e1d61 -Author: Damien Miller -Date: Fri Oct 1 16:35:05 2021 +1000 - - fix FIDO key support for !OPENSSL_HAS_ECC case - - ok dtucker - -commit 489741dc68366940d369ac670b210b4834a6c272 -Author: Damien Miller -Date: Fri Oct 1 14:51:37 2021 +1000 - - enable security key support for --without-openssl - -commit c978565c8589acfe4ea37ab5099d39c84158c713 -Author: Damien Miller -Date: Fri Oct 1 13:27:50 2021 +1000 - - need stdlib.h for free(3) - -commit 76a398edfb51951b2d65d522d7b02c72304db300 -Author: dtucker@openbsd.org -Date: Thu Sep 30 05:26:26 2021 +0000 - - upstream: Fix up whitespace left by previous - - change removing privsep. No other changes. - - OpenBSD-Regress-ID: 87adec225d8afaee4d6a91b2b71203f52bf14b15 - -commit ddcb53b7a7b29be65d57562302b2d5f41733e8dd -Author: dtucker@openbsd.org -Date: Thu Sep 30 05:20:08 2021 +0000 - - upstream: Remove references to privsep. - - This removes several do..while loops but does not change the - indentation of the now-shallower loops, which will be done in a separate - whitespace-only commit to keep changes of style and substance separate. - - OpenBSD-Regress-ID: 4bed1a0249df7b4a87c965066ce689e79472a8f7 - -commit ece2fbe486164860de8df3f8b943cccca3085eff -Author: dtucker@openbsd.org -Date: Thu Sep 30 04:22:50 2021 +0000 - - upstream: Use "skip" instead of "fatal" - - if SUDO isn't set for the *-command tests. This means running "make tests" - without SUDO set will perform all of the tests that it can instead of - failing on the ones it cannot run. - - OpenBSD-Regress-ID: bd4dbbb02f34b2e8c890558ad4a696248def763a - -commit bb754b470c360e787a99fb4e88e2668198e97b41 -Author: djm@openbsd.org -Date: Fri Oct 1 04:50:36 2021 +0000 - - upstream: unbreak FIDO sk-ed25519 key enrollment for OPENSSL=no builds; - - ok dtucker@ - - OpenBSD-Commit-ID: 6323a5241728626cbb2bf0452cf6a5bcbd7ff709 - -commit 207648d7a6415dc915260ca75850404dbf9f0a0b -Author: Darren Tucker -Date: Wed Sep 29 20:03:58 2021 +1000 - - Include stdlib.h for arc4random_uniform prototype. - -commit 696aadc854582c164d5fc04933d2f3e212dc0e06 -Author: Darren Tucker -Date: Wed Sep 29 20:00:30 2021 +1000 - - Look for clang after cc and gcc. - -commit a3c6375555026d85dbf811fab566b9f76f196144 -Author: Darren Tucker -Date: Wed Sep 29 19:30:59 2021 +1000 - - Use backticks instead of $(..) for portability. - - Older shells (eg /bin/sh on Solaris 10) don't support $() syntax. - -commit 958aaa0387133d51f84fe9c8f30bca03025f2867 -Author: Darren Tucker -Date: Wed Sep 29 18:53:32 2021 +1000 - - Skip file-based tests by default on Mac OS. - - The file-based tests need OpenSSL so skip them. - -commit 55c8bdf6e9afb0f9fa8e4f10c25c7f0081b48fd0 -Author: Darren Tucker -Date: Wed Sep 29 18:42:47 2021 +1000 - - Build without OpenSSL on Mac OS. - - Modern versions don't ship enough libcrypto to build against. - -commit c9172193ea975415facf0afb356d87df21535f88 -Author: Darren Tucker -Date: Wed Sep 29 18:33:38 2021 +1000 - - Remove TEST_SSH_ECC. - - Convert the only remaining user of it to runtime detection using ssh -Q. - -commit 5e6d28b7874b0deae95d2c68947c45212d32e599 -Author: Darren Tucker -Date: Wed Sep 29 17:48:09 2021 +1000 - - Split c89 test openssl setting out. - -commit c4ac7f98e230e83c015678dc958b1ffe828564ad -Author: Darren Tucker -Date: Wed Sep 29 17:40:50 2021 +1000 - - Expand TEST_SHELL consistently with other vars. - -commit cfe5f7b0eb7621bfb0a756222de0431315c2ab8b -Author: Darren Tucker -Date: Wed Sep 29 17:26:50 2021 +1000 - - Replace `pwd` with make variable in regress cmd. - -commit 899be59da5fbc3372444bd0fbe74af48313bed33 -Author: Darren Tucker -Date: Wed Sep 29 17:14:33 2021 +1000 - - Get BUILDDIR from autoconf. - - Use this to replace `pwd`s in regress test command line. - -commit c8d92d3d4f7d560146f2f936156ec4dac3fc5811 -Author: Darren Tucker -Date: Wed Sep 29 13:28:56 2021 +1000 - - Add make clean step to tests. - -commit 360fb41ef8359619ab90b0d131c914494e55d3dd -Author: Darren Tucker -Date: Wed Sep 29 11:36:13 2021 +1000 - - Test all available clang and gcc versions. - -commit 4fb49899d7da22952d35a4bc4c9bdb2311087893 -Author: djm@openbsd.org -Date: Wed Sep 29 01:32:21 2021 +0000 - - upstream: Test certificate hostkeys held in ssh-agent too. Would have - - caught regression fixed in sshd r1.575 - - ok markus@ - - OpenBSD-Regress-ID: 1f164d7bd89f83762db823eec4ddf2d2556145ed - -commit ce4854e12e749a05646e5775e9deb8cfaf49a755 -Author: djm@openbsd.org -Date: Wed Sep 29 01:33:32 2021 +0000 - - upstream: add some debug output showing how many key file/command lines - - were processed. Useful to see whether a file or command actually has keys - present - - OpenBSD-Commit-ID: 0bd9ff94e84e03a22df8e6c12f6074a95d27f23c - -commit 15abdd523501c349b703d9a27e2bb4252ad921ef -Author: dtucker@openbsd.org -Date: Tue Sep 28 11:14:50 2021 +0000 - - upstream: Make prototype for rijndaelEncrypt match function - - including the bounds. Fixes error in portable where GCC>=11 takes notice of - the bounds. ok deraadt@ - - OpenBSD-Commit-ID: cdd2f05fd1549e1786a70871e513cf9e9cf099a6 - -commit d1d29ea1d1ef1a1a54b209f062ec1dcc8399cf03 -Author: dtucker@openbsd.org -Date: Tue Sep 28 11:10:05 2021 +0000 - - upstream: Import regenerated moduli. - - OpenBSD-Commit-ID: 4bec5db13b736b64b06a0fca704cbecc2874c8e1 - -commit 39f2111b1d5f00206446257377dcce58cc72369f -Author: Darren Tucker -Date: Wed Sep 29 10:53:55 2021 +1000 - - Add new compiler hardening flags. - - Add -fzero-call-used-regs and -ftrivial-auto-var-init to the list of - compiler hardening flags that configure checks for. These are supported - by clang and gcc, and make ROP gadgets less useful and mitigate - stack-based infoleaks respectively. ok djm@ - -commit bf944e3794eff5413f2df1ef37cddf96918c6bde -Author: Damien Miller -Date: Mon Sep 27 00:03:19 2021 +1000 - - initgroups needs grp.h - -commit 8c5b5655149bd76ea21026d7fe73ab387dbc3bc7 -Author: djm@openbsd.org -Date: Sun Sep 26 14:01:11 2021 +0000 - - upstream: openssh-8.8 - - OpenBSD-Commit-ID: 12357794602ac979eb7312a1fb190c453f492ec4 - -commit f3cbe43e28fe71427d41cfe3a17125b972710455 -Author: djm@openbsd.org -Date: Sun Sep 26 14:01:03 2021 +0000 - - upstream: need initgroups() before setresgid(); reported by anton@, - - ok deraadt@ - - OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce - -commit 8acaff41f7518be40774c626334157b1b1c5583c -Author: Damien Miller -Date: Sun Sep 26 22:16:36 2021 +1000 - - update version numbers for release - -commit d39039ddc0010baa91c70a0fa0753a2699bbf435 -Author: kn@openbsd.org -Date: Sat Sep 25 09:40:33 2021 +0000 - - upstream: RSA/SHA-1 is not used by default anymore - - OK dtucker deraadt djm - - OpenBSD-Commit-ID: 055c51a221c3f099dd75c95362f902da1b8678c6 - -commit 9b2ee74e3aa8c461eb5552a6ebf260449bb06f7e -Author: Darren Tucker -Date: Fri Sep 24 11:08:03 2021 +1000 *** 4738 LINES SKIPPED *** From nobody Mon Jan 8 04:25:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7gw60gPhz56rDC; Mon, 8 Jan 2024 04:25: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 4T7gw56X21z46Gg; Mon, 8 Jan 2024 04:25:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704687925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ICZpXTxjXa3Gj7fo8Ygn1y2AyWE/nxZbhTMjUBr6uc4=; b=SmitTZSOmpgZ2fXzCjQPiIFm5eJ1pBWgU4hbXBKK/c7TRwcJOp6Cf7cR2x+hqT/mnWMvge dhobGWIYqWeKQAmQhFMjZNxkacDnUN/wWP/oNonCg+5nEXMmUfbc5C/Fdzx48i99CghpzZ BTTeA4un+wovWsJZyQ0MPUN2frDKLukz3myTb/LgSvWnk9pyuUuJf5GlUgWMh4qCUrhnTJ gu3y9zxs/dSUMJ30a4vXVBqVkazCrec0MK7ZxnL1RN7N3kVe7cwQfDQlinTTpmByMBZOSv Ct7SqC3UzVi3WiI8ZI7Kh09IEQ7oUJHrwlAseIPrylSgVcOL2ig2UYaHumwvww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704687925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ICZpXTxjXa3Gj7fo8Ygn1y2AyWE/nxZbhTMjUBr6uc4=; b=TkZ7/DZUQ3w9iva0pZVCosAdtOsMbiNzlJ1v1/QmqbkNYCfyBccHHUYkSiKgRMB8e61fLH jFt+FuAMb6vb6ekzhUqOT0ncONimQ2u43IlUk9fOtAPGhp35Vc9cGcTU9qTCRbfPci1y4W mw32M7k20C4HJTBLAlD6OaM9qnCX1ShSXhgWI0H3KLx1Igs3mCCi/7/Dq3sKprnepgniMD BRbcGQs9bYAo+iT2n4mYdEIZ14OaMtbwEtDdA57xzk9DvW8PCfdW55j7DfCHBY2h/EQ4Ay pJ69xpRJcekz16PLbXTL9cZG4DxJHcvVqrFEl/kGQPKu0OMgrdPQrc7pO/56Yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704687925; a=rsa-sha256; cv=none; b=v7K1PJHBojqmEhwnmyW0afPP3g3TvPgvo1gih0IZbbKbAtwJ5Ktp2iZoKhL7G+gSdRJCmX zlJAS2D1SmlLD59mZZxiNbE7QYqf3ncK+nT0+88a8eAokUuCUE4XVu28aarT1+vApnjQh1 iQFPlIkS/UBcCKSwfpmRSUK0Si+iHruCaHEsK1QDdwHRJfYAACwTYUT9B1aWFLHuKv3QrT 0wvyytYa87dUrb/NySIlNowIAwJuvcAWFTT+FR2trFfp7ZEeZvDCsuVot0ei1IzU+u3lnU kRQwhX1RNijYmPiZk3s02wMuRaTtuR2LGIOEoKFC36xECpPP0nElWrgEUED4MA== 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 4T7gw55bpbzsdV; Mon, 8 Jan 2024 04:25: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 4084PPqp090833; Mon, 8 Jan 2024 04:25:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4084PPZg090830; Mon, 8 Jan 2024 04:25:25 GMT (envelope-from git) Date: Mon, 8 Jan 2024 04:25:25 GMT Message-Id: <202401080425.4084PPZg090830@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: b8d5f0482d43 - stable/13 - ssh: ban user/hostnames with most shell metacharacters List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: b8d5f0482d43a6a5dca6eb07a98c806d476e8cd9 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b8d5f0482d43a6a5dca6eb07a98c806d476e8cd9 commit b8d5f0482d43a6a5dca6eb07a98c806d476e8cd9 Author: Ed Maste AuthorDate: 2024-01-05 18:12:09 +0000 Commit: Ed Maste CommitDate: 2024-01-08 04:21:51 +0000 ssh: ban user/hostnames with most shell metacharacters Cherry-picked from OpenSSH commit 7ef3787c84b6: This makes ssh(1) refuse user or host names provided on the commandline that contain most shell metacharacters. Some programs that invoke ssh(1) using untrusted data do not filter metacharacters in arguments they supply. This could create interactions with user-specified ProxyCommand and other directives that allow shell injection attacks to occur. It's a mistake to invoke ssh(1) with arbitrary untrusted arguments, but getting this stuff right can be tricky, so this should prevent most obvious ways of creating risky situations. It however is not and cannot be perfect: ssh(1) has no practical way of interpreting what shell quoting rules are in use and how they interact with the user's specified ProxyCommand. To allow configurations that use strange user or hostnames to continue to work, this strictness is applied only to names coming from the commandline. Names specified using User or Hostname directives in ssh_config(5) are not affected. feedback/ok millert@ markus@ dtucker@ deraadt@ OpenBSD-Commit-ID: 3b487348b5964f3e77b6b4d3da4c3b439e94b2d9 (cherry picked from commit c39254c8f23379709b8e2a68dc64477d2885f1d4) --- crypto/openssh/ssh.c | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/crypto/openssh/ssh.c b/crypto/openssh/ssh.c index 8469f8edbb48..55a28f0ea1ff 100644 --- a/crypto/openssh/ssh.c +++ b/crypto/openssh/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.594 2023/09/03 23:59:32 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.599 2023/12/18 14:47:44 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -624,6 +624,41 @@ ssh_conn_info_free(struct ssh_conn_info *cinfo) free(cinfo); } +static int +valid_hostname(const char *s) +{ + size_t i; + + if (*s == '-') + return 0; + for (i = 0; s[i] != 0; i++) { + if (strchr("'`\"$\\;&<>|(){}", s[i]) != NULL || + isspace((u_char)s[i]) || iscntrl((u_char)s[i])) + return 0; + } + return 1; +} + +static int +valid_ruser(const char *s) +{ + size_t i; + + if (*s == '-') + return 0; + for (i = 0; s[i] != 0; i++) { + if (strchr("'`\";&<>|(){}", s[i]) != NULL) + return 0; + /* Disallow '-' after whitespace */ + if (isspace((u_char)s[i]) && s[i + 1] == '-') + return 0; + /* Disallow \ in last position */ + if (s[i] == '\\' && s[i + 1] == '\0') + return 0; + } + return 1; +} + /* * Main program for the ssh client. */ @@ -1122,6 +1157,10 @@ main(int ac, char **av) if (!host) usage(); + if (!valid_hostname(host)) + fatal("hostname contains invalid characters"); + if (options.user != NULL && !valid_ruser(options.user)) + fatal("remote username contains invalid characters"); options.host_arg = xstrdup(host); /* Initialize the command to execute on remote host. */ From nobody Mon Jan 8 05:41:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7jby2hBHz5710P; Mon, 8 Jan 2024 05:41: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 4T7jby1cgDz4Mqw; Mon, 8 Jan 2024 05:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704692494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PW6/SS9FjLTKNxHMID+c3XhO08Jj8+BTaqh8xqiyif4=; b=tYyMGpe1aZ7qc6ZCI6Xrm5a+EIN3arFR3A5m4KjwqrLS2bRHcdkzPIGnA0euC36yw668NY vPKP6hmpUNnTpkppr4BQWgR3qTo/2M34Rk2D9uId5HzS91H4B4OuIQnYIs2TflwL7BpQC4 k4isYHG3/SKBjJdwWyc/N1S+NEQ/Tqs9GTjyw60Fn0P3g+WpXXHOtb86n8tnMt5c23zu59 8D9iraufdoVZ+j0SiHBSvCAapbpxWawcdU4bG3YK+S433uYt+WQl2wix/vr5YklcCWzJq+ urG+BX9NoRwvMHswJ03jcQ099OCBFg7692syVr6AB3Dip0GAcLez2NGVwXvQGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704692494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PW6/SS9FjLTKNxHMID+c3XhO08Jj8+BTaqh8xqiyif4=; b=mq6UL8mnNPi04cs4NArigVRL7u9uq1zecj5DPhF8tAd8mcyqmKfGB3k9tb1epexQjnVkaV ixEohieUoYbVsn5BJ7EepSGvEYY03WBAIfFWcaoV2JXezkVAkLTxu63vPH+6AhcCgD1m83 ljxehBo5cZ8LTh+iljOGkOCUROPDqFC7oPm1esWp6yJMmAcFUCwAv9g9ByVWX0Gg6KC3Bw 4wXTYJfWywNbj3ZXbp85M5T9RbwQ/GaVWqeFzudLJ6rIaGZQy87+hjRDXvvrltl2OIY4nU CrBWYh6pSzO9L8jOJLcxNNe9i7OOYdj6wTgEIXqxye2ogTDKrveFXk7IRRXTFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704692494; a=rsa-sha256; cv=none; b=uqIVJUNkLIrp7pwi4nNAmKm/G9g2dGHYxoU8kHJmpvQ+wgSzG9c4/5ZWavtni7wTcqBt+/ 6FWKlC6SbC2f9sg/mpcVNJ2m1Is58zUHLKePyhU+lnqrcMahhjDRzaXkRpUx+sLvvJugkH +1DTUlVA8e1V5jDfGIs4TL0TMi8yciM27NyxHKWN6InjuMneVN7fTIxZJ+u6dhL1k/md2s +JQ4toYfBKM4W9luuSIU5qr7j9KgNNuEiGMDnlTSekVOmFy0BvEUrD5vgqMo8Vt91RLZnf vKPLxGUQTliv16uA/jyj8XDBedvK0PLEqYJXb0qpzj01i+s9OxtgJ9ovuEAYNA== 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 4T7jby0gFqzvDF; Mon, 8 Jan 2024 05:41: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 4085fX1G024043; Mon, 8 Jan 2024 05:41:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4085fXnt024040; Mon, 8 Jan 2024 05:41:33 GMT (envelope-from git) Date: Mon, 8 Jan 2024 05:41:33 GMT Message-Id: <202401080541.4085fXnt024040@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: 8a4577423e82 - main - ffs/ffs_rawread.c: clean up includes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 8a4577423e82c54942a9390658d059f1169187b1 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8a4577423e82c54942a9390658d059f1169187b1 commit 8a4577423e82c54942a9390658d059f1169187b1 Author: Konstantin Belousov AuthorDate: 2024-01-08 05:36:33 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-08 05:41:15 +0000 ffs/ffs_rawread.c: clean up includes Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/ufs/ffs/ffs_rawread.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/sys/ufs/ffs/ffs_rawread.c b/sys/ufs/ffs/ffs_rawread.c index affdd7095151..ef93c1ab6783 100644 --- a/sys/ufs/ffs/ffs_rawread.c +++ b/sys/ufs/ffs/ffs_rawread.c @@ -26,22 +26,21 @@ * SUCH DAMAGE. */ -#include #include +#include +#include +#include #include -#include -#include -#include +#include #include #include #include -#include -#include -#include -#include -#include -#include +#include #include +#include +#include +#include + #include #include #include @@ -53,8 +52,6 @@ #include #include #include -#include -#include static int ffs_rawread_readahead(struct vnode *vp, caddr_t udata, From nobody Mon Jan 8 06:34:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7knb6KMDz576Hl; Mon, 8 Jan 2024 06:34: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 4T7knb5mf4z4RcY; Mon, 8 Jan 2024 06:34:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704695699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VIDjRcKpWIUTn2jTJqmR1BnTjVW0KPjcHnday6KSnBw=; b=ZJZ77UJpr3ej3uwEte5M0nd+slEMhgH74k7ZrSMOqXNin7EAoo4nLbyQELOQ9frMZI71kb eWnV8I/VlMaRvSupEvuNmZf7NYdbgC5jIyZ5nnaVW9SdbvjcgAIxDyPw3tdStD3YBumB+l v+JXFBPKyxRCISxsHI9mAW39ZHfQNmOqmEnFvHOnT2F7Tx4PBVywX7zHpCfoEnIOyRBb9b tGXEkyeCZp8E1EYPop/0fc5fpnRqN4dV/hSuWG7SDWeN2EdZLSD/9eyzvaTRtiwQQxG4xY 8IT9VbSAJ2ZQ2KvActba/enA3XCS8cHxVbI6x2gyx3PGllP5u/VZAq0otNX1Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704695699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VIDjRcKpWIUTn2jTJqmR1BnTjVW0KPjcHnday6KSnBw=; b=NaccoNRpFG/XyBwbkIRf2z90a2lnOchHY9gZYEdeR7wP7jHTNuCVTS/J3SzFm4ngMc0LOi LMcwcRnVPn9/hbIMz3A4buAU+8bbV3Zy4E8asU9w+k3blMvFkFYuKXGfD+LkFQtI06P4xe 1HrOF/mjZQo5cQJx9u0eVBnh2cRaU9bqZx8kO8W/06LET5mxA8O5SRDOveV8FMl0xorgRN ilNdH+DNhy2Mj8ZvYEQga8+R/iCy7RQA9Enu7sZM2p+hTgNcjAs41vajx6PmEYHxV2igGs wnQuvJVjQwdibEwWzSPQlYXEh89FMTH2KH/Br7TtZkkFrW/hucEbK3ie/LwI1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704695699; a=rsa-sha256; cv=none; b=plIO/0GCUlui1gdJPf9kbxdmTBfpS6ODCXVLFJgaVMbQJ8/MJW7r7ylSrizbXr61SKWkOR CV643WG2nzDEkWffX/iEBYuE0DLaHRJdLm7NLaCvTAxjGzjWIebwthvPeMEod7BFaMUY0l tmDaCVX524ACKiSSbl64L+fCSFTRcANARcoL23/tTAvNxef6HwM9A+Nr27Up7bBLPZB+qe sm0BIer3B+aq2QZ/ftWxteBzyQVldr/qhdfgd2uRQkzZGjTg4n+9KKybwqsDeXGzsIWVIM Nn3CevVJU3OZ34BUpmO3vtcJZwvpku1vkXPzXbiWK574LZor6PFMwnGPBKrsRA== 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 4T7knb4pyKzwnJ; Mon, 8 Jan 2024 06:34: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 4086YxTc009613; Mon, 8 Jan 2024 06:34:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4086YxFQ009610; Mon, 8 Jan 2024 06:34:59 GMT (envelope-from git) Date: Mon, 8 Jan 2024 06:34:59 GMT Message-Id: <202401080634.4086YxFQ009610@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yoshihiro Takahashi Subject: git: 5704277ae58b - main - puc: Add support for Exar XR17V354 Quad PCI Express UART. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nyan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5704277ae58b3498fbee2d041cd18d2444f5cf98 Auto-Submitted: auto-generated The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=5704277ae58b3498fbee2d041cd18d2444f5cf98 commit 5704277ae58b3498fbee2d041cd18d2444f5cf98 Author: Teerayut Hiruntaraporn AuthorDate: 2024-01-08 06:31:19 +0000 Commit: Yoshihiro Takahashi CommitDate: 2024-01-08 06:31:19 +0000 puc: Add support for Exar XR17V354 Quad PCI Express UART. PR: 257207 MFC after: 1 week --- sys/dev/puc/pucdata.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/puc/pucdata.c b/sys/dev/puc/pucdata.c index 3114202c3a5a..f127e27e7b08 100644 --- a/sys/dev/puc/pucdata.c +++ b/sys/dev/puc/pucdata.c @@ -694,6 +694,13 @@ const struct puc_cfg puc_pci_devices[] = { .config_function = puc_config_exar_pcie }, + { 0x13a8, 0x0354, 0xffff, 0, + "Exar XR17V354", + 125000000, + PUC_PORT_4S, 0x10, 0, -1, + .config_function = puc_config_exar_pcie + }, + /* The XR17V358 uses the 125MHz PCIe clock as its reference clock. */ { 0x13a8, 0x0358, 0xffff, 0, "Exar XR17V358", From nobody Mon Jan 8 07:42:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7mHS6lC1z57DDc; Mon, 8 Jan 2024 07:42: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 4T7mHS6H1Wz4Yj5; Mon, 8 Jan 2024 07:42:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704699748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=phxYVSvJ8Uab9J2MoOb9GQPJg47gGvperffTaxsAHgo=; b=lvBTftDnx7t8opblHY8zyF47pfH70xxHw71rSVM6WjRRVYPmk6FF/iO7uI7+9sNFuqdzsQ rdiNn+VobbuM7t6ZrIEtnlRpsQtUqBSE9294a4Zsp7qklfj06FUJb7EA7x/bugF+TfRu35 cS/68+YZP6HxwfOkWCqIX8CjBljOxMkYcwbpokCpjeAFmbgYliiOP9wkpR45En5Kw8h8n9 f+DN0JYQ8aNVCRdMLQcwmfvZqyE1neWiut7GyfCavgTPd9V5sGKyfu6PXpzBwGdP2fuF0M 0bFyDVW+1uMdoXkzLfsOKliw3mL1Pl99MAxlLxupXnM51kHTX6/7BE+7XABysQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704699748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=phxYVSvJ8Uab9J2MoOb9GQPJg47gGvperffTaxsAHgo=; b=LcmzlEra+wbXir+noj7x0AarJbU0hqgKACdm+/dT0GGM7Qloyy8G+O0JU0UnrxNDRasq54 EtNgYXpTgNwRBOsCy35LteKqlWBJ7gEz1Kio/oIjflbzLeqk9YMBVsvXirZE3Re1vhbw3b UknUOB2wVY8THK0o12yeMPA8a63QvGUVNSqth72HmZpqsloiBvA8y9Wms/iE4mqmAgrhMg T69Tqx93ntKVBbINkeAjDHlH1fEZ1D04E523HOXjXfEfwoIRR8UwCVk5abJmzhMMD9o3FB N53n9ZNeM79kCSyLbTsWwQMcbsVWqwyNulD0Gig3TdmgdFRDzCqrnTosS3KS1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704699748; a=rsa-sha256; cv=none; b=KMRRo7JVBWZ3TXPGFk2je1MGXwmYw+Ifxu+voskr6ndqg60QX9PurjKAchEYGLluKd22Zt IpqzsYdOhjc6uHGXK9LYWRH+r56XZdONqLTDxWPNZgYe8UZhaYbTA+2sVVBJF7cRIJHpq6 3B0WrT4QSFVAHZSkUZBi0lBv+TTajsbiqomVSo9DogdRYaWvcvwkn/kqNmINboTu16p/rB pJhESsw5aPYHFgjjo9e9TABygGfqoM10v5aX4lSjrvegHhW/OLMi9PzkC7t3kG1wlZygzg 0OIFyaDVy6cTUmB7w4wiWSpYtnN7SM8qI2NlKForumTY6pPNwj5cwbXBwCWzqQ== 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 4T7mHS5L01zyJB; Mon, 8 Jan 2024 07:42: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 4087gSwq026292; Mon, 8 Jan 2024 07:42:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4087gSnw026289; Mon, 8 Jan 2024 07:42:28 GMT (envelope-from git) Date: Mon, 8 Jan 2024 07:42:28 GMT Message-Id: <202401080742.4087gSnw026289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yoshihiro Takahashi Subject: git: 9a622787244c - main - mii: Fix memory leak in micphy. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nyan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a622787244c4cda76d1509b0eae168bf4fd1952 Auto-Submitted: auto-generated The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=9a622787244c4cda76d1509b0eae168bf4fd1952 commit 9a622787244c4cda76d1509b0eae168bf4fd1952 Author: Jiahao LI AuthorDate: 2024-01-08 07:39:56 +0000 Commit: Yoshihiro Takahashi CommitDate: 2024-01-08 07:39:56 +0000 mii: Fix memory leak in micphy. PR: 270040 MFC after: 1 week --- sys/dev/mii/micphy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/mii/micphy.c b/sys/dev/mii/micphy.c index fa212bf43655..4783398886f5 100644 --- a/sys/dev/mii/micphy.c +++ b/sys/dev/mii/micphy.c @@ -276,6 +276,8 @@ micphy_attach(device_t dev) else ksz9021_load_values(sc, cfg->phynode); + mii_fdt_free_config(cfg); + return (0); } From nobody Mon Jan 8 11:53:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7ssL3Bpqz55T6N; Mon, 8 Jan 2024 11:53:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7ssL2dJBz54lC; Mon, 8 Jan 2024 11:53:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704714822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wlvzKCcSil3S/pmLs+9HOLXSdzDGkdfhCyy6ocTR9MU=; b=RbXuOVUlF9+JcmxrHsF4jS2ntzHU++XIW6EG2UscArDXQVHS6qGZmZGCcbDNwLaaIaVyPq +hyB+flQCs4OH+jmN7Gwhi4I0NSX3YhT5tbTYmYqxHrKbhsdH4cL+TaDkk1KJAH7CdY9D5 LqsJbrc19E3KwPmuIFD/GCTLCrTDfuAf6w9JsDrCoeMK6GJcV/o9aX/wGlPt6z56ItzCFV klfUUHgpNhTdzRp+DZ5UXXK59BdEQ63hkcODI9xYS2lycBvGFWIu4zZA626KQIpH3HeMXu TUMIVPCGTCOfqvEPyZgEwTT8Z4wcRbCbw0tt1P+aOK1vqggZyHr1fObt9ewyVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704714822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wlvzKCcSil3S/pmLs+9HOLXSdzDGkdfhCyy6ocTR9MU=; b=FRMLQ9pBzyyUOtboeergCAupODSZxiOHI9SlfRC5DhM2M8iFzsedzLhBF2Xxm353tRs8yv qgqtvDkny9ALagn3ow90Y5Po6MhH+fZP7yHcYMp14iaSoKlQVovw+a60B/JPepvNnfLwFo boC6k9attoWJIZ2bspVacKY2rLqRRTSnF+xIcdPm728SddPc4ykW8yHsQ/E+6UbMTxmS8I llumLwD68E7iPN80ZJTnGVcNt4CH8Ku0oimgWDSFXyhifqwDYeXKL+EbMOOw475DVuv4jo mhOugaU2BAvnYqfXBUHtyGK/b3NMn88gdeJk6K5+SkSek2wsSwliew29X4J/NQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704714822; a=rsa-sha256; cv=none; b=Roon0GAizHAbg1sBT8HSIMUk79AWbTYnBYEo+iMk/pvcuoBMjGUZlWZpSOX2MQAQPKz8Sx 1gc0+x4Lb1b/L5KzFJLADCgJSOEfgSE5fabaZbG+7dkOWpSb2T6cxlQhORE8spSyoJt1qE soWLBKruaJuazIcFBj92AoW2/uivcm06avEMwza6dEe5WA/CALEWg5FX1lZx8hUHXXKzR2 cTYJTdcuKTaF6RgLJCJ+movTAm4tRep2vVMI/3r7MqfrbHhmHdfVU6n9/cWMYdDt1iK8Pr GSWJRjoEfacCatGyEjE5JwCGDP5xxrPLKzJl267CFvHkIpHySvy4O+oefn4xlA== 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 4T7ssL1hLgz15t1; Mon, 8 Jan 2024 11:53: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 408BrgSu048102; Mon, 8 Jan 2024 11:53:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408Brg3s048099; Mon, 8 Jan 2024 11:53:42 GMT (envelope-from git) Date: Mon, 8 Jan 2024 11:53:42 GMT Message-Id: <202401081153.408Brg3s048099@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yoshihiro Takahashi Subject: git: 58cf91d3b72a - main - resolv: Add a required include to resolv.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nyan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 58cf91d3b72a01777bacf72d66a648a744ae3143 Auto-Submitted: auto-generated The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=58cf91d3b72a01777bacf72d66a648a744ae3143 commit 58cf91d3b72a01777bacf72d66a648a744ae3143 Author: Jan Beich AuthorDate: 2024-01-08 11:52:08 +0000 Commit: Yoshihiro Takahashi CommitDate: 2024-01-08 11:52:08 +0000 resolv: Add a required include to resolv.h Add a required include to resolv.h for sockaddr_in. This should reduce patching required when porting code written with Linux or NetBSD in mind. PR: 182466 MFC after: 1 week --- include/resolv.h | 1 + lib/libc/net/resolver.3 | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/resolv.h b/include/resolv.h index 40ca2e8a467f..f32f52bab431 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -58,6 +58,7 @@ #include #include #include +#include #include /*% diff --git a/lib/libc/net/resolver.3 b/lib/libc/net/resolver.3 index 832fa05e994b..f1220dcf9b7f 100644 --- a/lib/libc/net/resolver.3 +++ b/lib/libc/net/resolver.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 15, 2022 +.Dd January 8, 2024 .Dt RESOLVER 3 .Os .Sh NAME @@ -45,9 +45,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In netinet/in.h -.In arpa/nameser.h .In resolv.h .Ft int .Fo res_query From nobody Mon Jan 8 13:21:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7vpP2gtSz55h36 for ; Mon, 8 Jan 2024 13:21:17 +0000 (UTC) (envelope-from debdrup@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7vpP0MNkz41F3 for ; Mon, 8 Jan 2024 13:21:17 +0000 (UTC) (envelope-from debdrup@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704720077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=P2mTX31BGnNq1h+rMpp8aTjjVa0XlQkEuGSasDLYQwI=; b=ZfkHCtPsBEzz+Fv0MZnY95pX663LN3+Ak99ENTUL/fWWbV7puw89APECgN4m8UJeFSbSnY DOjDPIPiXMldhD1WmkJs3PC+IhYX8/iWeKrcPE/oh8j8Ut8M6KzB+uhJmCqCkFw2e/KZVd eu/8z2qB0dNpywJRyCtHQdMbxMQJw9x0VthSWA8holvPPcmN/2RGprBmAG1ESujXMrRuIv B5YcnOc4To1wKqWKprZrbppstktzC06nfAAsdpsLLIS6OvI84Js4BtzkOyWMtj+TrUcYtX iY8ePiS+ind4di18eaj3JkaHdtPXgBPs2OQ6orCZusSQ3rDt7DvhOanZ9qOS3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704720077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=P2mTX31BGnNq1h+rMpp8aTjjVa0XlQkEuGSasDLYQwI=; b=iOUbKibJ4BrBH7eL2V6nNn5i2StTYfhMdcpu4le/ocJHGhfvVdeY613r+wXN+QjsFe7rtG 7QsfkheONKET/YiVu1kiPsS8BErtsQZI6YdeFf0n8xo0f1rYYE2bOBv/nZjXxmDyROD+Yi MMnzPnBaQauie55aqDOoW6qRwFXcxNjnlbf3G/RElBZoj6Mm/KN8Ex6Bunzhi03loBndpx jdJtQsIWd/PtXhPpaBuN76k5veozcCYc1wD1gbWBkS0OtBBL2WjQFtSWehArjPjjd7GYJi cGVmE8ZqNqltoljo8hGL/gUP9e5NEixnISyM7nO+0qyR+AdWUJbikxD59KesnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704720077; a=rsa-sha256; cv=none; b=k/xeqPniMopzyrTeIf+2TRDatyHW1+OgjwPhaxhWmqBcCpRYNqLcFIZyDTLYQK7HPf83uB he/vtwhvyoIX1dERI+6rQk3jyg8QpEJrE6NUao/FmeFOMcky2lxexkNwNYGjEtG2SJCrq3 3iOSX6kgWSlPWyfAlhjEPuq3cg0nwKaipRb+2KORqClG9HN52YEWzeldxIANhevtTJIO/M dQHW5INDfKQUtHjHoq7iyBzzj/8Stv3UvhR2SCoZ3VqQlJPDEQzr50OGQtxdE2PV25qbTA NKhDcCX9uOBrIt1A0r/96jrswafbQKAXCW0hCCt8Luab6b2h/5LeU63/b3AuTw== Received: by freefall.freebsd.org (Postfix, from userid 1471) id D956F5242; Mon, 8 Jan 2024 13:21:16 +0000 (UTC) Date: Mon, 8 Jan 2024 14:21:14 +0100 From: Daniel Ebdrup Jensen To: dev-commits-src-all@freebsd.org Subject: Re: git: fbbdfa2b8a42 - main - nfsv4(4): mention the nfsv4_server_only setting Message-ID: <6gfbbvtl2ru527olorpbjagarvqm3w47odworfctzzmxm7aui3@hdqizf773auq> Mail-Followup-To: Daniel Ebdrup Jensen , dev-commits-src-all@freebsd.org References: <202401061822.406IMW52063237@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="x3e6ou6exrvvolmb" Content-Disposition: inline In-Reply-To: --x3e6ou6exrvvolmb Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 06, 2024 at 02:34:41PM -0700, Alan Somers wrote: >On Sat, Jan 6, 2024 at 11:22=E2=80=AFAM Daniel Ebdrup Jensen > wrote: >> >> The branch main has been updated by debdrup: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3Dfbbdfa2b8a42444c2c4de00e4= 3f14499adad8a70 >> >> commit fbbdfa2b8a42444c2c4de00e43f14499adad8a70 >> Author: Lexi Winter >> AuthorDate: 2024-01-06 18:12:02 +0000 >> Commit: Daniel Ebdrup Jensen >> CommitDate: 2024-01-06 18:21:25 +0000 >> >> nfsv4(4): mention the nfsv4_server_only setting >> >> Add note about configuring the NFSv4-only option. >> >> It is already mentioned in rc.conf(5), but documenting it here makes= it >> more likely that people see it when they need it. >> >> MFC after: 2 weeks >> Pull Request: https://github.com/freebsd/freebsd-src/pull/1008 >> --- >> usr.sbin/nfsd/nfsv4.4 | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/usr.sbin/nfsd/nfsv4.4 b/usr.sbin/nfsd/nfsv4.4 >> index 1377461c1348..aacb85c78ca2 100644 >> --- a/usr.sbin/nfsd/nfsv4.4 >> +++ b/usr.sbin/nfsd/nfsv4.4 >> @@ -208,6 +208,14 @@ if the server is using the ``@'' form= of user/group strings or >> is using the ``-manage-gids'' option for >> .Xr nfsuserd 8 . >> .Pp >> +In addition, you can set: >> +.sp >> +.Bd -literal -offset indent -compact >> +nfsv4_server_only=3D"YES" >> +.Ed >> +.sp >> +to disable support for NFSv2 and NFSv3. >> +.Pp >> You will also need to add at least one ``V4:'' line to the >> .Xr exports 5 >> file for > >Shouldn't you bump the .Dd date? Hi Alan, Yes, yes I should. I plain forgot to run igor and mandoc. I'll also take the time to fix a few overrun lines that mandoc -Tlint helpfully pointed out. Thanks for the reminder. :) Yours appreciatively, Daniel Ebdrup Jensen --x3e6ou6exrvvolmb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAABCgB9FiEEDonNJPbg/JLIMoS6Ps5hSHzN87oFAmWb9spfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDBF ODlDRDI0RjZFMEZDOTJDODMyODRCQTNFQ0U2MTQ4N0NDREYzQkEACgkQPs5hSHzN 87pmswf/SbgxJtHKvpnNkRvxjb7wdGMa533JcVEL5YpplchzOVkaUfsq/tZXkC28 S5SH3knCKrEuYDb/GUUjYY05QK/s67LZk8kSzM+Xe/cGZdiqelFLWSet+S22nFde f4jxBRQ7pL/ai2W5LsEm+RpdaJ0iCER+2uNNJyqeqyL2MUSlQ2KrMdmFWwwBxlht tDIDXbHBE5GZqNSYQl7exj+KEvDujHiUZ+P6gW4fG4/q4iJokvtP/2KNqKlOPq4V B3x/YFG9BoMxpgRWsYr2vcCtPWkRCdf755ma8xPjCsz+K7qp2RMXVojTXJv00VO6 8Nr4PFS5iyR+k983hzzeiAFXQft/Tw== =nSMw -----END PGP SIGNATURE----- --x3e6ou6exrvvolmb-- From nobody Mon Jan 8 13:56:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7wZq2H6jz55mqp; Mon, 8 Jan 2024 13:56: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 4T7wZq21Pxz44lW; Mon, 8 Jan 2024 13:56:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704722179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WESTmiLZxq7aSDT5//w+j5REmNlRUlgmv+GgFVekYFA=; b=tpfrrsIUMUILMAKmfJ03hk+wWR/B0RK5cztUBvBP8TRC88WiYxlGpGngQlK+X8itlORKl5 /FNWwvRGvNfTdZB7d2R2UfhnYADWTfZTsuaUsDYoRxwJfc6fvtAv23Y56QdJUbYPyoQ5u1 AfSqaViKZhllBYdpxpquFDGbHbjn57GxixD/4HbWb/MkkreEgVX/LtE0vuT32mKsKHPtTm hvPLTiqwXH4R/t1prqW3A0Lius4W1H8xWS8DQ8HpVlSsooMfK2osYPMBA0trkGjZJT21Lw oc9LkaPWuHA4Pcrqe0gf3JGZVqudxB7zGOIEJcZUEkiscpMCAX7kePInw6TYYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704722179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WESTmiLZxq7aSDT5//w+j5REmNlRUlgmv+GgFVekYFA=; b=X0N0EHdp6twvRXWcbvNOeY9tkN47Pa3K7t+yqW60Gtd1hWMoH9YLscf1o0SVoTwoPolJo2 s7tVUv2LaYxEa8gZuThpXccvCWFlx8OJjFYGqpr6z1Uw0+H6KY9nJ1pURCccEnedBMMKhn 2QpOGj9ikqvBgM/QyO3bCd+YeTfAhA9ICZ/kW8RBqjsJuCHAg0AFAbLOg7pcus9tFc/7Pv utzxonU7tYE58/enxxwaLJVYOKuVXWPwodktjRWJRjWfBGUTAkaxWdujdA4fbGHvWaDF5R dV6dmljqpkeTevnUCfMANvdsTEr8Tq7fDPr8del2SvQPwFAwY62E+b9Ou0muAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704722179; a=rsa-sha256; cv=none; b=l/Z0QTAhQzplKffiM7r7SDRFmA/VUhahdNBqIolrR4TOqm8LRp1BtocP3GbI+IVuW2hhou Inu5aZ0bU78E+eLQVmBjdlYHdTgmVVgiL7KB6N6TMzr4jOGYsjEh8CVEOkBM9+BvWrB5Tr 7WW28wDUf08pRD+AtZVpXV8GQCAUkvM3mlaWXRWsc0VyOqmsCC8eeAX1cUtYd3nnbBUdJ5 BVN04dM046YFTJRKPnNDkA35l1Iu0tteobkKZ/IuqVTlH/urnU7aNr/Oytq5qKdnlMyfsC 4iaVwS7b68Cywh8ffq0RcMHQPC9/e2ud2EGfGmDC7TlMVnJAmCudThuOtI4O3w== 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 4T7wZq13fvz18kK; Mon, 8 Jan 2024 13:56: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 408DuJC7049906; Mon, 8 Jan 2024 13:56:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408DuI2g049903; Mon, 8 Jan 2024 13:56:18 GMT (envelope-from git) Date: Mon, 8 Jan 2024 13:56:18 GMT Message-Id: <202401081356.408DuI2g049903@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: a25789646d71 - stable/14 - ssh: Update to OpenSSH 9.6p1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: a25789646d7130f5be166cac63d5c8b2b07c4706 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a25789646d7130f5be166cac63d5c8b2b07c4706 commit a25789646d7130f5be166cac63d5c8b2b07c4706 Author: Ed Maste AuthorDate: 2024-01-05 03:16:30 +0000 Commit: Ed Maste CommitDate: 2024-01-07 19:31:11 +0000 ssh: Update to OpenSSH 9.6p1 From the release notes, > This release contains a number of security fixes, some small features > and bugfixes. The most significant change in 9.6p1 is a set of fixes for a newly- discovered weakness in the SSH transport protocol. The fix was already merged into FreeBSD and released as FreeBSD-SA-23:19.openssh. Full release notes at https://www.openssh.com/txt/release-9.6 Relnotes: Yes Sponsored by: The FreeBSD Foundation (cherry picked from commit 069ac18495ad8fde2748bc94b0f80a50250bb01d) --- crypto/openssh/.depend | 3 +- crypto/openssh/.github/configs | 14 +- crypto/openssh/.github/setup_ci.sh | 53 +- crypto/openssh/.github/workflows/c-cpp.yml | 15 +- crypto/openssh/.github/workflows/selfhosted.yml | 21 +- crypto/openssh/ChangeLog | 12792 +++++++++++----------- crypto/openssh/Makefile.in | 14 +- crypto/openssh/PROTOCOL | 23 +- crypto/openssh/PROTOCOL.agent | 33 +- crypto/openssh/README | 2 +- crypto/openssh/auth2.c | 8 +- crypto/openssh/authfd.c | 40 +- crypto/openssh/authfd.h | 5 +- crypto/openssh/channels.c | 36 +- crypto/openssh/channels.h | 4 +- crypto/openssh/cipher.c | 23 +- crypto/openssh/cipher.h | 3 +- crypto/openssh/clientloop.c | 34 +- crypto/openssh/config.h | 9 + crypto/openssh/configure.ac | 49 +- crypto/openssh/contrib/redhat/openssh.spec | 34 +- crypto/openssh/contrib/suse/openssh.spec | 2 +- crypto/openssh/kex.c | 235 +- crypto/openssh/kex.h | 7 +- crypto/openssh/log.c | 6 +- crypto/openssh/m4/openssh.m4 | 116 +- crypto/openssh/misc.c | 41 +- crypto/openssh/misc.h | 3 +- crypto/openssh/moduli | 898 +- crypto/openssh/monitor_wrap.c | 4 +- crypto/openssh/mux.c | 4 +- crypto/openssh/openbsd-compat/port-solaris.c | 24 +- crypto/openssh/readconf.c | 57 +- crypto/openssh/readconf.h | 7 +- crypto/openssh/regress/Makefile | 10 +- crypto/openssh/regress/agent-pkcs11-cert.sh | 92 + crypto/openssh/regress/agent-pkcs11-restrict.sh | 193 + crypto/openssh/regress/agent-pkcs11.sh | 82 +- crypto/openssh/regress/conch-ciphers.sh | 11 +- crypto/openssh/regress/dropbear-ciphers.sh | 33 + crypto/openssh/regress/dropbear-kex.sh | 31 + crypto/openssh/regress/forcecommand.sh | 56 +- crypto/openssh/regress/sshsig.sh | 72 +- crypto/openssh/regress/test-exec.sh | 169 +- crypto/openssh/regress/unittests/Makefile | 3 +- crypto/openssh/regress/unittests/Makefile.inc | 4 +- crypto/openssh/scp.c | 12 +- crypto/openssh/servconf.c | 40 +- crypto/openssh/sftp-client.c | 4 +- crypto/openssh/ssh-add.1 | 14 +- crypto/openssh/ssh-add.c | 92 +- crypto/openssh/ssh-agent.c | 241 +- crypto/openssh/ssh-pkcs11-client.c | 56 +- crypto/openssh/ssh-pkcs11.h | 5 +- crypto/openssh/ssh.1 | 7 +- crypto/openssh/ssh.c | 26 +- crypto/openssh/ssh2.h | 3 +- crypto/openssh/ssh_config.5 | 83 +- crypto/openssh/ssh_namespace.h | 7 +- crypto/openssh/sshconnect.c | 10 +- crypto/openssh/sshconnect.h | 6 +- crypto/openssh/sshconnect2.c | 63 +- crypto/openssh/sshd.c | 4 +- crypto/openssh/sshd_config | 2 +- crypto/openssh/sshd_config.5 | 2 +- crypto/openssh/sshkey.c | 40 +- crypto/openssh/sshsig.c | 7 +- crypto/openssh/version.h | 6 +- secure/usr.bin/ssh-agent/Makefile | 2 +- 69 files changed, 8732 insertions(+), 7375 deletions(-) diff --git a/crypto/openssh/.depend b/crypto/openssh/.depend index 259bf3b2f136..4897698ab74a 100644 --- a/crypto/openssh/.depend +++ b/crypto/openssh/.depend @@ -28,7 +28,8 @@ auth2-passwd.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd- auth2-pubkey.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh.h ssh2.h packet.h openbsd-compat/sys-queue.h dispatch.h kex.h mac.h crypto_api.h sshbuf.h log.h ssherr.h misc.h servconf.h compat.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h auth2-pubkey.o: pathnames.h uidswap.h auth-options.h canohost.h monitor_wrap.h authfile.h match.h channels.h session.h sk-api.h auth2-pubkeyfile.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh.h log.h ssherr.h misc.h sshkey.h digest.h hostfile.h auth.h auth-pam.h audit.h loginrec.h auth-options.h authfile.h match.h -auth2.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h atomicio.h xmalloc.h ssh2.h packet.h openbsd-compat/sys-queue.h dispatch.h log.h ssherr.h sshbuf.h misc.h servconf.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h pathnames.h monitor_wrap.h digest.h +auth2.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h atomicio.h xmalloc.h ssh2.h packet.h openbsd-compat/sys-queue.h dispatch.h log.h ssherr.h sshbuf.h misc.h servconf.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h pathnames.h monitor_wrap.h digest.h kex .h +auth2.o: mac.h crypto_api.h authfd.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh.h sshbuf.h sshkey.h authfd.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h log.h ssherr.h atomicio.h misc.h authfile.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h ssh.h log.h ssherr.h authfile.h misc.h atomicio.h sshkey.h sshbuf.h krl.h bitmap.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h bitmap.h diff --git a/crypto/openssh/.github/configs b/crypto/openssh/.github/configs index c7d6a55ab962..df82faf5046b 100755 --- a/crypto/openssh/.github/configs +++ b/crypto/openssh/.github/configs @@ -108,9 +108,19 @@ case "$config" in SKIP_LTESTS=sftp-chroot ;; gcc-11-Werror) - CC="gcc" + CC="gcc-11" + # -Wnoformat-truncation in gcc 7.3.1 20180130 fails on fmt_scaled + # -Wunused-result ignores (void) so is not useful. See + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 + CFLAGS="-O2 -Wno-format-truncation -Wimplicit-fallthrough=4 -Wno-unused-parameter -Wno-unused-result" + CONFIGFLAGS="--with-pam --with-Werror" + ;; + gcc-12-Werror) + CC="gcc-12" # -Wnoformat-truncation in gcc 7.3.1 20180130 fails on fmt_scaled - CFLAGS="-Wall -Wextra -O2 -Wno-format-truncation -Wimplicit-fallthrough=4 -Wno-unused-parameter" + # -Wunused-result ignores (void) so is not useful. See + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 + CFLAGS="-O2 -Wno-format-truncation -Wimplicit-fallthrough=4 -Wno-unused-parameter -Wno-unused-result" CONFIGFLAGS="--with-pam --with-Werror" ;; clang*|gcc*) diff --git a/crypto/openssh/.github/setup_ci.sh b/crypto/openssh/.github/setup_ci.sh index 010a333a6642..d0ba7b4724e9 100755 --- a/crypto/openssh/.github/setup_ci.sh +++ b/crypto/openssh/.github/setup_ci.sh @@ -18,8 +18,7 @@ case "$host" in ;; *-darwin*) PACKAGER=brew - brew install automake - exit 0 + PACKAGES="automake" ;; *) PACKAGER=apt @@ -30,20 +29,30 @@ TARGETS=$@ INSTALL_FIDO_PPA="no" export DEBIAN_FRONTEND=noninteractive -#echo "Setting up for '$TARGETS'" - -set -ex +set -e if [ -x "`which lsb_release 2>&1`" ]; then lsb_release -a fi -# Ubuntu 22.04 defaults to private home dirs which prevent the -# agent-getpeerid test from running ssh-add as nobody. See -# https://github.com/actions/runner-images/issues/6106 -if [ ! -z "$SUDO" ] && ! "$SUDO" -u nobody test -x ~; then - echo ~ is not executable by nobody, adding perms. - chmod go+x ~ +if [ ! -z "$SUDO" ]; then + # Ubuntu 22.04 defaults to private home dirs which prevent the + # agent-getpeerid test from running ssh-add as nobody. See + # https://github.com/actions/runner-images/issues/6106 + if ! "$SUDO" -u nobody test -x ~; then + echo ~ is not executable by nobody, adding perms. + chmod go+x ~ + fi + # Some of the Mac OS X runners don't have a nopasswd sudo rule. Regular + # sudo still works, but sudo -u doesn't. Restore the sudo rule. + if ! "$SUDO" grep -E 'runner.*NOPASSWD' /etc/passwd >/dev/null; then + echo "Restoring runner nopasswd rule to sudoers." + echo 'runner ALL=(ALL) NOPASSWD: ALL' |$SUDO tee -a /etc/sudoers + fi + if ! "$SUDO" -u nobody -S test -x ~ -Date: Wed Oct 4 15:34:10 2023 +1100 +Date: Tue Dec 19 01:59:50 2023 +1100 - crank version numbers + crank versions -commit f65f187b105d9b5c12fd750a211397d08c17c6d4 -Author: djm@openbsd.org -Date: Wed Oct 4 04:04:09 2023 +0000 +commit 2f2c65cb5f1518a9c556d3e8efa27ea0ca305c6b +Author: Damien Miller +Date: Tue Dec 19 01:59:06 2023 +1100 - upstream: openssh-9.5 - - OpenBSD-Commit-ID: 5e0af680480bd3b6f5560cf840ad032d48fd6b16 + depend -commit ffe27e54a4bb18d5d3bbd3f4cc93a41b8d94dfd2 +commit e48cdee8e19059203b1aeeabec2350b8375fa61f Author: djm@openbsd.org -Date: Wed Oct 4 04:03:50 2023 +0000 +Date: Mon Dec 18 14:50:08 2023 +0000 - upstream: add some cautionary text about % token expansion and - - shell metacharacters; based on report from vinci AT protonmail.ch + upstream: regress test for agent PKCS#11-backed certificates - OpenBSD-Commit-ID: aa1450a54fcee2f153ef70368d90edb1e7019113 + OpenBSD-Regress-ID: 38f681777cb944a8cc3bf9d0ad62959a16764df9 -commit 60ec3d54fd1ebfe2dda75893fa1e870b8dffbb0d +commit 2f512f862df1d5f456f82a0334c9e8cc7208a2a1 Author: djm@openbsd.org -Date: Tue Oct 3 23:56:10 2023 +0000 +Date: Mon Dec 18 14:49:39 2023 +0000 - upstream: fix link to agent draft; spotted by Jann Horn + upstream: regress test for constrained PKCS#11 keys - OpenBSD-Commit-ID: ff5bda21a83ec013db683e282256a85201d2dc4b + OpenBSD-Regress-ID: b2f26ae95d609d12257b43aef7cd7714c82618ff -commit 12e2d4b13f6f63ce2de13cbfcc9e4d0d4b4ab231 -Author: Damien Miller -Date: Wed Oct 4 10:54:04 2023 +1100 +commit cdddd66412ca5920ed4d3ebbfa6ace12dbd9b82f +Author: djm@openbsd.org +Date: Mon Dec 18 14:48:44 2023 +0000 - use portable provider allowlist path in manpage + upstream: openssh-9.6 - spotted by Jann Horn + OpenBSD-Commit-ID: 21759837cf0e0092d9a2079f8fb562071c11016b -commit 6c2c6ffde75df95fd838039850d3dd3d84956d87 -Author: deraadt@openbsd.org -Date: Tue Sep 19 20:37:07 2023 +0000 +commit 6d51feab157cedf1e7ef5b3f8781ca8ff9c4ab1b +Author: djm@openbsd.org +Date: Mon Dec 18 14:48:08 2023 +0000 - upstream: typo; from Jim Spath + upstream: ssh-agent: record failed session-bind attempts - OpenBSD-Commit-ID: 2f5fba917b5d4fcf93d9e0b0756c7f63189e228e + Record failed attempts to session-bind a connection and refuse signing + operations on that connection henceforth. + + Prevents a future situation where we add a new hostkey type that is not + recognised by an older ssh-agent, that consequently causes session-bind + to fail (this situation is only likely to arise when people mix ssh(1) + and ssh-agent(1) of different versions on the same host). Previously, + after such a failure the agent socket would be considered unbound and + not subject to restriction. + + Spotted by Jann Horn + + OpenBSD-Commit-ID: b0fdd023e920aa4831413f640de4c5307b53552e -commit b6b49130a0089b297245ee39e769231d7c763014 +commit 7ef3787c84b6b524501211b11a26c742f829af1a Author: djm@openbsd.org -Date: Sun Sep 10 23:12:32 2023 +0000 +Date: Mon Dec 18 14:47:44 2023 +0000 - upstream: rename remote_glob() -> sftp_glob() to match other API + upstream: ban user/hostnames with most shell metacharacters - OpenBSD-Commit-ID: d9dfb3708d824ec02970a84d96cf5937e0887229 + This makes ssh(1) refuse user or host names provided on the + commandline that contain most shell metacharacters. + + Some programs that invoke ssh(1) using untrusted data do not filter + metacharacters in arguments they supply. This could create + interactions with user-specified ProxyCommand and other directives + that allow shell injection attacks to occur. + + It's a mistake to invoke ssh(1) with arbitrary untrusted arguments, + but getting this stuff right can be tricky, so this should prevent + most obvious ways of creating risky situations. It however is not + and cannot be perfect: ssh(1) has no practical way of interpreting + what shell quoting rules are in use and how they interact with the + user's specified ProxyCommand. + + To allow configurations that use strange user or hostnames to + continue to work, this strictness is applied only to names coming + from the commandline. Names specified using User or Hostname + directives in ssh_config(5) are not affected. + + feedback/ok millert@ markus@ dtucker@ deraadt@ + + OpenBSD-Commit-ID: 3b487348b5964f3e77b6b4d3da4c3b439e94b2d9 -commit 21b79af6c8d2357c822c84cef3fbdb8001ed263b +commit 0cb50eefdd29f0fec31d0e71cc4b004a5f704e67 Author: djm@openbsd.org -Date: Sun Sep 10 03:51:55 2023 +0000 +Date: Mon Dec 18 14:47:20 2023 +0000 - upstream: typo in comment + upstream: stricter handling of channel window limits - OpenBSD-Commit-ID: 69285e0ce962a7c6b0ab5f17a293c60a0a360a18 - -commit 41232d25532b4d2ef6c5db62efc0cf50a79d26ca -Author: Darren Tucker -Date: Sun Sep 10 15:45:38 2023 +1000 - - Use zero-call-used-regs=used with Apple compilers. + This makes ssh/sshd more strict in handling non-compliant peers that + send more data than the advertised channel window allows. Previously + the additional data would be silently discarded. This change will + cause ssh/sshd to terminate the connection if the channel window is + exceeded by more than a small grace allowance. - Apple's versions of clang have version numbers that do not match the - corresponding upstream clang versions. Unfortunately, they do still - have the clang-15 zero-call-used-regs=all bug, so for now use the value - that doesn't result in segfaults. We could allowlist future versions - that are known to work. bz#3584 (and probably also our github CI - failures). + ok markus@ + + OpenBSD-Commit-ID: 811e21b41831eba3dd7f67b3d409a438f20d3037 -commit 90ccc5918ea505bf156c31148b6b59a1bf5d6dc6 +commit 4448a2938abc76e6bd33ba09b2ec17a216dfb491 Author: djm@openbsd.org -Date: Sun Sep 10 03:25:53 2023 +0000 +Date: Mon Dec 18 14:46:56 2023 +0000 - upstream: randomise keystroke obfuscation intervals and average + upstream: Make it possible to load certs from PKCS#11 tokens - interval rate. ok dtucker@ + Adds a protocol extension to allow grafting certificates supplied by + ssh-add to keys loaded from PKCS#11 tokens in the agent. - OpenBSD-Commit-ID: 05f61d051ab418fcfc4857ff306e420037502382 + feedback/ok markus@ + + OpenBSD-Commit-ID: bb5433cd28ede2bc910996eb3c0b53e20f86037f -commit bd1b9e52f5fa94d87223c90905c5fdc1a7c32aa6 +commit 881d9c6af9da4257c69c327c4e2f1508b2fa754b Author: djm@openbsd.org -Date: Fri Sep 8 06:34:24 2023 +0000 +Date: Mon Dec 18 14:46:12 2023 +0000 - upstream: fix sizeof(*ptr) instead sizeof(ptr) in realloc (pointer here + upstream: apply destination constraints to all p11 keys - is char**, so harmless); spotted in CID 416964 + Previously applied only to the first key returned from each token. - OpenBSD-Commit-ID: c61caa4a5a667ee20bb1042098861e6c72c69002 + ok markus@ + + OpenBSD-Commit-ID: 36df3afb8eb94eec6b2541f063d0d164ef8b488d -commit c4f966482983e18601eec70a1563115de836616f +commit a7ed931caeb68947d30af8a795f4108b6efad761 Author: djm@openbsd.org -Date: Fri Sep 8 06:10:57 2023 +0000 +Date: Mon Dec 18 14:45:49 2023 +0000 - upstream: regress test recursive remote-remote directories copies where + upstream: add "ext-info-in-auth@openssh.com" extension - the directory contains a symlink to another directory. + This adds another transport protocol extension to allow a sshd to send + SSH2_MSG_EXT_INFO during user authentication, after the server has + learned the username that is being logged in to. - also remove errant `set -x` that snuck in at some point + This lets sshd to update the acceptable signature algoritms for public + key authentication, and allows these to be varied via sshd_config(5) + "Match" directives, which are evaluated after the server learns the + username being authenticated. - OpenBSD-Regress-ID: 1c94a48bdbd633ef2285954ee257725cd7bc456f + Full details in the PROTOCOL file + + OpenBSD-Commit-ID: 1de7da7f2b6c32a46043d75fcd49b0cbb7db7779 -commit 5e1dfe5014ebc194641678303e22ab3bba15f4e5 +commit 1edb00c58f8a6875fad6a497aa2bacf37f9e6cd5 Author: djm@openbsd.org -Date: Fri Sep 8 06:10:02 2023 +0000 +Date: Mon Dec 18 14:45:17 2023 +0000 - upstream: fix recursive remote-remote copies of directories that + upstream: implement "strict key exchange" in ssh and sshd - contain symlinks to other directories (similar to bz3611) + This adds a protocol extension to improve the integrity of the SSH + transport protocol, particular in and around the initial key exchange + (KEX) phase. - OpenBSD-Commit-ID: 7e19d2ae09b4f941bf8eecc3955c9120171da37f + Full details of the extension are in the PROTOCOL file. + + with markus@ + + OpenBSD-Commit-ID: 2a66ac962f0a630d7945fee54004ed9e9c439f14 -commit 7c0ce2bf98b303b6ad91493ee3247d96c18ba1f6 -Author: djm@openbsd.org -Date: Fri Sep 8 05:50:57 2023 +0000 +commit 59d691b886c79e70b1d1c4ab744e81fd176222fd +Author: Damien Miller +Date: Mon Dec 18 14:49:11 2023 +1100 - upstream: regress test for recursive copies of directories containing + better detection of broken -fzero-call-used-regs - symlinks to other directories. bz3611, ok dtucker@ + Use OSSH_CHECK_CFLAG_LINK() for detection of these flags and extend + test program to exercise varargs, which seems to catch more stuff. - OpenBSD-Regress-ID: eaa4c29cc5cddff4e72a16bcce14aeb1ecfc94b9 + ok dtucker@ -commit 2de990142a83bf60ef694378b8598706bc654b08 +commit aa7b21708511a6d4aed3839fc9f6e82e849dd4a1 Author: djm@openbsd.org -Date: Fri Sep 8 05:56:13 2023 +0000 +Date: Wed Dec 13 03:28:19 2023 +0000 - upstream: the sftp code was one of my first contributions to + upstream: when invoking KnownHostsCommand to determine the order of - OpenSSH and it shows - the function names are terrible. + host key algorithms to request, ensure that the hostname passed to the + command is decorated with the port number for ports other than 22. - Rename do_blah() to sftp_blah() to make them less so. + This matches the behaviour of KnownHostsCommand when invoked to look + up the actual host key. - Completely mechanical except for sftp_stat() and sftp_lstat() which - change from returning a pointer to a static variable (error-prone) to - taking a pointer to a caller-provided receiver. + bz3643, ok dtucker@ - OpenBSD-Commit-ID: eb54d6a72d0bbba4d623e2175cf5cc4c75dc2ba4 + OpenBSD-Commit-ID: 5cfabc0b7c6c7ab473666df314f377b1f15420b1 -commit 249d8bd0472b53e3a2a0e138b4c030a31e83346a -Author: djm@openbsd.org -Date: Fri Sep 8 05:50:12 2023 +0000 +commit 4086bd6652c0badccc020218a62190a7798fb72c +Author: markus@openbsd.org +Date: Fri Dec 8 09:18:39 2023 +0000 - upstream: fix scp in SFTP mode recursive upload and download of - - directories that contain symlinks to other directories. In scp mode, the - links would be followed, but in SFTP mode they were not. bz3611, ok dtucker@ + upstream: prevent leak in sshsig_match_principals; ok djm@ - OpenBSD-Commit-ID: 9760fda668eaa94a992250d7670dfbc62a45197c + OpenBSD-Commit-ID: 594f61ad4819ff5c72dfe99ba666a17f0e1030ae -commit 0e1f4401c466fa4fdaea81b6dadc8dd1fc4cf0af +commit 19d3ee2f3adf7d9a606ff015c1e153744702c4c9 Author: djm@openbsd.org -Date: Wed Sep 6 23:36:09 2023 +0000 +Date: Wed Dec 6 21:06:48 2023 +0000 - upstream: regression test for override of subsystem in match blocks + upstream: short circuit debug log processing early if we're not going - OpenBSD-Regress-ID: 5f8135da3bfda71067084c048d717b0e8793e87c + to log anything. From Kobe Housen + + OpenBSD-Commit-ID: 2bcddd695872a1bef137cfff7823044dcded90ea -commit 8a1450c62035e834d8a79a5d0d1c904236f9dcfe -Author: djm@openbsd.org -Date: Wed Sep 6 23:35:35 2023 +0000 +commit 947affad4831df015c498c00c6351ea6f13895d5 +Author: Darren Tucker +Date: Mon Nov 27 09:37:28 2023 +1100 - upstream: allow override of Sybsystem directives in sshd Match - - blocks + Add tests for OpenSSL 3.2.0 and 3.2 stable branch. + +commit 747dce36206675ca6b885010a835733df469351b +Author: Darren Tucker +Date: Sat Nov 25 09:03:38 2023 +1100 + + Use non-zero arg in compiler test program. - OpenBSD-Commit-ID: 3911d18a826a2d2fe7e4519075cf3e57af439722 + Now that we're running the test program, passing zero to the test function + can cause divide-by-zero exceptions which might show up in logs. -commit 6e52826e2a74d077147a82ead8d4fbd5b54f4e3b -Author: djm@openbsd.org -Date: Wed Sep 6 23:26:37 2023 +0000 +commit 3d44a5c56585d1c351dbc006240a591b6da502b1 +Author: dtucker@openbsd.org +Date: Fri Nov 24 00:31:30 2023 +0000 - upstream: allocate the subsystems array as necessary and remove the + upstream: Plug mem leak of msg when processing a quit message. - fixed limit of subsystems. Saves a few kb of memory in the server and makes - it more like the other options. + Coverity CID#427852, ok djm@ - OpenBSD-Commit-ID: e683dfca6bdcbc3cc339bb6c6517c0c4736a547f + OpenBSD-Commit-ID: bf85362addbe2134c3d8c4b80f16601fbff823b7 -commit e19069c9fac4c111d6496b19c7f7db43b4f07b4f -Author: djm@openbsd.org -Date: Wed Sep 6 23:23:53 2023 +0000 +commit 1d7f9b6e297877bd00973e6dc5c0642dbefc3b5f +Author: dtucker@openbsd.org +Date: Thu Nov 23 03:37:05 2023 +0000 - upstream: preserve quoting of Subsystem commands and arguments. + upstream: Include existing mux path in debug message. - This may change behaviour of exotic configurations, but the most common - subsystem configuration (sftp-server) is unlikely to be affected. + OpenBSD-Commit-ID: 1c3641be10c2f4fbad2a1b088a441d072e18bf16 + +commit f29934066bd0e561a2e516b7e584fb92d2eedee0 +Author: Darren Tucker +Date: Thu Nov 23 19:41:27 2023 +1100 + + Add an Ubuntu 22.04 test VM. - OpenBSD-Commit-ID: 8ffa296aeca981de5b0945242ce75aa6dee479bf + This is the same version as Github's runners so most of the testing on + it is over there, but having a local VM makes debugging much easier. -commit 52dfe3c72d98503d8b7c6f64fc7e19d685636c0b -Author: djm@openbsd.org -Date: Wed Sep 6 23:21:36 2023 +0000 +commit a93284a780cd3972afe5f89086b75d564ba157f3 +Author: Darren Tucker +Date: Thu Nov 23 19:36:22 2023 +1100 - upstream: downgrade duplicate Subsystem directives from being a + Add gcc-12 -Werror test on Ubuntu 22.04. - fatal error to being a debug message to match behaviour with just about all - other directives. + Explictly specify gcc-11 on Ubuntu 22.04 (it's the system compiler). + +commit 670f5a647e98b6fd95ad64f789f87ee3274b481b +Author: Darren Tucker +Date: Thu Nov 23 19:34:57 2023 +1100 + + Check return value from write to prevent warning. - OpenBSD-Commit-ID: fc90ed2cc0c18d4eb8e33d2c5e98d25f282588ce + ... and since we're testing for flags with -Werror, this caused + configure to mis-detect compiler flags. -commit 1ee0a16e07b6f0847ff463d7b5221c4bf1876e25 -Author: djm@openbsd.org -Date: Wed Sep 6 23:18:15 2023 +0000 +commit cea007d691cfedfa07a5b8599f97ce0511f53fc9 +Author: Darren Tucker +Date: Wed Nov 22 21:18:55 2023 +1100 - upstream: handle cr+lf (instead of just cr) in sshsig signature + Run compiler test program when compiling natively. - files + ok djm@ + +commit ee0d305828f13536c0a416bbf9c3e81039d9ea55 +Author: Darren Tucker +Date: Wed Nov 22 21:18:07 2023 +1100 + + Factor out compiler test program into a macro. - OpenBSD-Commit-ID: 647460a212b916540016d066568816507375fd7f + ok djm@ -commit e1c284d60a928bcdd60bc575c6f9604663502770 -Author: job@openbsd.org -Date: Mon Sep 4 10:29:58 2023 +0000 +commit de304c76316b029df460673725a9104224b9959b +Author: Darren Tucker +Date: Wed Nov 22 08:55:36 2023 +1100 - upstream: Generate Ed25519 keys when invoked without arguments + Add fbsd14 VM to test pool. + +commit 99a2df5e1994cdcb44ba2187b5f34d0e9190be91 +Author: Darren Tucker +Date: Tue Nov 21 16:19:29 2023 +1100 + + Expand -fzero-call-used-regs test to cover gcc 11. - Ed25519 public keys are very convenient due to their small size. - OpenSSH has supported Ed25519 since version 6.5 (January 2014). + It turns out that gcc also has some problems with -fzero-call-used-regs, + at least v11 on mips. Previously the test in OSSH_CHECK_CFLAG_COMPILE + was sufficient to catch it with "=all", but not sufficient for "=used". + Expand the testcase and include it in the other tests for good measure. + See bz#3629. ok djm@. + +commit ff220d4010717f7bfbbc02a2400666fb9d24f250 +Author: Darren Tucker +Date: Tue Nov 21 14:04:34 2023 +1100 + + Stop using -fzero-call-used-regs=all - OK djm@ markus@ sthen@ deraadt@ + ... since it seems to be problematic with several different versions of + clang. Only use -fzero-call-used-regs=used which is less + problematic, except with Apple's clang where we don't use it at all. + bz#3629, ok djm@ + +commit 2a19e02f36b16f0f6cc915f7d1e60ead5e36303b +Author: Darren Tucker +Date: Tue Nov 21 14:02:18 2023 +1100 + + Allow for vendor prefix on clang version numbers. - OpenBSD-Commit-ID: f498beaad19c8cdcc357381a60df4a9c69858b3f + Correctly detects the version of OpenBSD's native clang, as well as + Apple's. Spotted tb@, ok djm@. -commit 694150ad92765574ff82a18f4e86322bd3231e68 +commit c52db0114826d73eff6cdbf205e9c1fa4f7ca6c6 Author: djm@openbsd.org -Date: Mon Sep 4 00:08:14 2023 +0000 +Date: Mon Nov 20 02:50:00 2023 +0000 - upstream: trigger keystroke timing obfucation only if the channels - - layer enqueud some data in the last poll() cycle; this avoids triggering the - obfuscatior for non-channels data like ClientAlive probes and also fixes a - related problem were the obfucations would be triggered on fully quiescent - connections. + upstream: set errno=EAFNOSUPPORT when filtering addresses that don't - Based on / tested by naddy@ + match AddressFamily; yields slightly better error message if no address + matches. bz#3526 - OpenBSD-Commit-ID: d98f32dc62d7663ff4660e4556e184032a0db123 + OpenBSD-Commit-ID: 29cea900ddd8b04a4d1968da5c4a893be2ebd9e6 -commit b5fd97896b59a3a46245cf438cc8b16c795d9f74 +commit 26f3f3bbc69196d908cad6558c8c7dc5beb8d74a Author: djm@openbsd.org -Date: Mon Sep 4 00:04:02 2023 +0000 +Date: Wed Nov 15 23:03:38 2023 +0000 - upstream: avoid bogus "obfuscate_keystroke_timing: stopping ..." + upstream: when connecting via socket (the default case), filter - debug messages when keystroke timing obfuscation was never started; spotted - by naddy@ + addresses by AddressFamily if one was specified. Fixes the case where, if + CanonicalizeHostname is enabled, ssh may ignore AddressFamily. bz5326; ok + dtucker - OpenBSD-Commit-ID: 5c270d35f7d2974db5c1646e9c64188f9393be31 + OpenBSD-Commit-ID: 6c7d7751f6cd055126b2b268a7b64dcafa447439 -commit ccf7d913db34e49b7a6db1b8331bd402004c840d +commit 050c335c8da43741ed0df2570ebfbd5d1dfd0a31 Author: djm@openbsd.org -Date: Mon Sep 4 00:01:46 2023 +0000 +Date: Wed Nov 15 22:51:49 2023 +0000 - upstream: make channel_output_poll() return a flag indicating + upstream: when deciding whether to enable keystroke timing - whether channel data was enqueued. Will be used to improve keystroke timing - obfuscation. Problem spotted by / tested by naddy@ + obfuscation, only consider enabling it when a channel with a tty is open. - OpenBSD-Commit-ID: f9776c7b0065ba7c3bbe50431fd3b629f44314d0 + Avoids turning on the obfucation when X11 forwarding only is in use, + which slows it right down. Reported by Roger Marsh + + OpenBSD-Commit-ID: c292f738db410f729190f92de100c39ec931a4f1 -commit 43254b326ac6e2131dbd750f9464dc62c14bd5a7 -Author: djm@openbsd.org -Date: Sun Sep 3 23:59:32 2023 +0000 +commit 676377ce67807a24e08a54cd60ec832946cc6cae +Author: tobhe@openbsd.org +Date: Mon Nov 13 09:18:19 2023 +0000 - upstream: set interactive mode for ControlPersist sessions if they + upstream: Make sure sftp_get_limits() only returns 0 if 'limits' - originally requested a tty; enables keystroke timing obfuscation for most - ControlPersist sessions. Spotted by naddy@ + was initialized. This fixes a potential uninitialized use of 'limits' in + sftp_init() if sftp_get_limits() returned early because of an unexpected + message type. - OpenBSD-Commit-ID: 72783a26254202e2f3f41a2818a19956fe49a772 + ok djm@ + + OpenBSD-Commit-ID: 1c177d7c3becc1d71bc8763eecf61873a1d3884c -commit ff3eda68ceb2e2bb8f48e3faceb96076c3e85c20 +commit 64e0600f23c6dec36c3875392ac95b8a9100c2d6 Author: Darren Tucker -Date: Thu Aug 31 23:02:35 2023 +1000 +Date: Mon Nov 13 20:03:31 2023 +1100 - Set LLONG_MAX for C89 test. + Test current releases of LibreSSL and OpenSSL. - If we don't have LLONG_MAX, configure will figure out that it can get it - by setting -std=gnu99, at which point we won't be testing C89 any more. - To avoid this, feed it in via CFLAGS. + Retire some of the older releases. -commit f98031773db361424d59e3301aa92aacf423d920 -Author: djm@openbsd.org -Date: Tue Aug 29 02:50:10 2023 +0000 +commit c8ed7cc545879ac15f6ce428be4b29c35598bb2a +Author: dtucker@openbsd.org +Date: Wed Nov 1 02:08:38 2023 +0000 - upstream: make PerSourceMaxStartups first-match-wins; ok dtucker@ + upstream: Specify ssh binary to use - OpenBSD-Commit-ID: dac0c24cb709e3c595b8b4f422a0355dc5a3b4e7 + ... instead of relying on installed one. Fixes test failures in -portable + when running tests prior to installation. + + OpenBSD-Regress-ID: b6d6ba71c23209c616efc805a60d9a445d53a685 -commit cfa66857db90cd908de131e0041a50ffc17c7df8 -Author: djm@openbsd.org -Date: Mon Aug 28 09:52:09 2023 +0000 +commit e9fc2c48121cada1b4dcc5dadea5d447fe0093c3 +Author: Darren Tucker +Date: Wed Nov 1 13:11:31 2023 +1100 - upstream: descriptive text shouldn't be under .Cm + Put long-running test targets on hipri runners. - OpenBSD-Commit-ID: b1afaeb456a52bc8a58f4f9f8b2f9fa8f6bf651b + Some of the selfhosted test targets take a long time to run for various + reasons, so label them for "libvirt-hipri" runners so that they can + start immediately. This should reduce the time to complete all tests. -commit 01dbf3d46651b7d6ddf5e45d233839bbfffaeaec +commit 7ddf27668f0e21233f08c0ab2fe9ee3fdd6ab1e2 Author: djm@openbsd.org -Date: Mon Aug 28 09:48:11 2023 +0000 +Date: Wed Nov 1 00:29:46 2023 +0000 - upstream: limit artificial login delay to a reasonable maximum (5s) + upstream: add some tests of forced commands overriding Subsystem - and don't delay at all for the "none" authentication mechanism. Patch by - Dmitry Belyavskiy in bz3602 with polish/ok dtucker@ + directives - OpenBSD-Commit-ID: 85b364676dd84cf1de0e98fc2fbdcb1a844ce515 + OpenBSD-Regress-ID: eb48610282f6371672bdf2a8b5d2aa33cfbd322b -commit 528da5b9d7c5da01ed7a73ff21c722e1b5326006 -Author: jmc@openbsd.org -Date: Mon Aug 28 05:32:28 2023 +0000 +commit fb06f9b5a065dfbbef5916fc4accc03c0bf026dd +Author: dtucker@openbsd.org *** 20745 LINES SKIPPED *** From nobody Mon Jan 8 14:04:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7wmC5HgQz55pJN; Mon, 8 Jan 2024 14:04: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 4T7wmC4kdcz45tv; Mon, 8 Jan 2024 14:04:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704722667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AYr5C/T5/33V64Zr5gOv7ZD6DSISKP0dTGMK+F7yvzo=; b=PIeBmpjh3xnX8OtKVnkhFHefxZSNywl6FNg480ZtvFE2NkeSGs7tSLOOqNC8AMMpLPl+WW kU8IXOz845pO8DRmi+msvqBiVsBLXpdpqxdBSk8bOyT4AsytXYhntc9d5qQU+cVTKUlCKU Z58mxHUYmkGabtTUI3Vxe/tUAcMDbt6dfvYNNuPsDmo2WhGN3kX827N8/VZVDwzfyyFocG MCaFK7XewNScemfTUHRful+6bg184GND2PY9hY4oobfLLedSJvdEdktXk4q+FXNBmQQWia 6S0940fOrWnh1al0FP1umRjjbCzfhuY1+Y9skqsqzdbgccnqSczZMfRvNUJWzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704722667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AYr5C/T5/33V64Zr5gOv7ZD6DSISKP0dTGMK+F7yvzo=; b=uYx5SF5PxHJOhb9gDhanvD0xSfeEX+8E2DJ+eT0Y2kLRsITQ3sQwsbJu8v72P/1AvAdzZG GySQXI0aumI92jgi9soci8apW1ESNcjbAPBHlY42p8HjY4F/VpwoSubZVbsQ1JNesK3CmU m5xGv1W8WmffgVFRtk83oIP24zvgl6viUEPQ1S4zfGfkhLXiRpfNkDTDwpZjfhg6F2a9zN AGGKX1XuNqRRX/oGhgFojQKJphHF5deZqmD57FrXu4lyCLhOIcA/6J7J1VgXpO4OzV0MCv ewyR46fEHwfv3dQMwYNGRgAhLCP1Gfjqwney9KZad+HmG3/D6KyIqRtMGDXdTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704722667; a=rsa-sha256; cv=none; b=olieWBRkXCHfaIavnNn7rGuYu+TairUt3XxPS8DgwY2sH3NOB10ePYpTbF7PLqvw/rG1/d WLZmCrEqDGXe91OCaaxEWFICtZqBcirLXPOpoiG0yPg4k8cK9Dzebt6eQ7/LR0BoxUZUif LcfmI1A8y3VI+xmCANtFsjBudqD4dERehYUY6Ep2mBygmiPBU1FsCleYMBhYn6YgtfLJjd tR91nexicvzSYM+mKU9sI0tUiEsJZ6csHmCyf3nG7oK5SfYqLoyDnku9+jEejoXH3frMuZ 5/T/fqQID9hXj2/H5Yt5USdyLziAMcJlGsw3ilTRg6XHI2BrgCosjPCmAgXvVw== 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 4T7wmC2gcCz18Df; Mon, 8 Jan 2024 14:04: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 408E4Ri6067462; Mon, 8 Jan 2024 14:04:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408E4QF8067459; Mon, 8 Jan 2024 14:04:26 GMT (envelope-from git) Date: Mon, 8 Jan 2024 14:04:26 GMT Message-Id: <202401081404.408E4QF8067459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 2cd20d9bc807 - stable/13 - ssh: Update to OpenSSH 9.6p1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 2cd20d9bc80743d6562cb6165dc07b8391dddc27 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2cd20d9bc80743d6562cb6165dc07b8391dddc27 commit 2cd20d9bc80743d6562cb6165dc07b8391dddc27 Author: Ed Maste AuthorDate: 2024-01-05 03:16:30 +0000 Commit: Ed Maste CommitDate: 2024-01-08 13:57:12 +0000 ssh: Update to OpenSSH 9.6p1 From the release notes, > This release contains a number of security fixes, some small features > and bugfixes. The most significant change in 9.6p1 is a set of fixes for a newly- discovered weakness in the SSH transport protocol. The fix was already merged into FreeBSD and released as FreeBSD-SA-23:19.openssh. Full release notes at https://www.openssh.com/txt/release-9.6 Relnotes: Yes Sponsored by: The FreeBSD Foundation (cherry picked from commit 069ac18495ad8fde2748bc94b0f80a50250bb01d) (cherry picked from commit a25789646d7130f5be166cac63d5c8b2b07c4706) --- crypto/openssh/.depend | 3 +- crypto/openssh/.github/configs | 14 +- crypto/openssh/.github/setup_ci.sh | 53 +- crypto/openssh/.github/workflows/c-cpp.yml | 15 +- crypto/openssh/.github/workflows/selfhosted.yml | 21 +- crypto/openssh/ChangeLog | 12792 +++++++++++----------- crypto/openssh/Makefile.in | 14 +- crypto/openssh/PROTOCOL | 21 +- crypto/openssh/PROTOCOL.agent | 33 +- crypto/openssh/README | 2 +- crypto/openssh/auth2.c | 8 +- crypto/openssh/authfd.c | 40 +- crypto/openssh/authfd.h | 5 +- crypto/openssh/channels.c | 36 +- crypto/openssh/channels.h | 4 +- crypto/openssh/cipher.c | 23 +- crypto/openssh/cipher.h | 3 +- crypto/openssh/clientloop.c | 34 +- crypto/openssh/config.h | 9 + crypto/openssh/configure.ac | 49 +- crypto/openssh/contrib/redhat/openssh.spec | 34 +- crypto/openssh/contrib/suse/openssh.spec | 2 +- crypto/openssh/kex.c | 235 +- crypto/openssh/kex.h | 7 +- crypto/openssh/log.c | 6 +- crypto/openssh/m4/openssh.m4 | 116 +- crypto/openssh/misc.c | 41 +- crypto/openssh/misc.h | 3 +- crypto/openssh/moduli | 898 +- crypto/openssh/monitor_wrap.c | 4 +- crypto/openssh/mux.c | 4 +- crypto/openssh/openbsd-compat/port-solaris.c | 24 +- crypto/openssh/readconf.c | 57 +- crypto/openssh/readconf.h | 7 +- crypto/openssh/regress/Makefile | 10 +- crypto/openssh/regress/agent-pkcs11-cert.sh | 92 + crypto/openssh/regress/agent-pkcs11-restrict.sh | 193 + crypto/openssh/regress/agent-pkcs11.sh | 82 +- crypto/openssh/regress/conch-ciphers.sh | 11 +- crypto/openssh/regress/dropbear-ciphers.sh | 33 + crypto/openssh/regress/dropbear-kex.sh | 31 + crypto/openssh/regress/forcecommand.sh | 56 +- crypto/openssh/regress/sshsig.sh | 72 +- crypto/openssh/regress/test-exec.sh | 169 +- crypto/openssh/regress/unittests/Makefile | 3 +- crypto/openssh/regress/unittests/Makefile.inc | 4 +- crypto/openssh/scp.c | 12 +- crypto/openssh/servconf.c | 40 +- crypto/openssh/sftp-client.c | 4 +- crypto/openssh/ssh-add.1 | 14 +- crypto/openssh/ssh-add.c | 92 +- crypto/openssh/ssh-agent.c | 241 +- crypto/openssh/ssh-pkcs11-client.c | 56 +- crypto/openssh/ssh-pkcs11.h | 5 +- crypto/openssh/ssh.1 | 7 +- crypto/openssh/ssh.c | 26 +- crypto/openssh/ssh2.h | 3 +- crypto/openssh/ssh_config.5 | 83 +- crypto/openssh/ssh_namespace.h | 7 +- crypto/openssh/sshconnect.c | 10 +- crypto/openssh/sshconnect.h | 6 +- crypto/openssh/sshconnect2.c | 63 +- crypto/openssh/sshd.c | 4 +- crypto/openssh/sshd_config | 2 +- crypto/openssh/sshd_config.5 | 2 +- crypto/openssh/sshkey.c | 40 +- crypto/openssh/sshsig.c | 7 +- crypto/openssh/version.h | 6 +- secure/usr.bin/ssh-agent/Makefile | 2 +- 69 files changed, 8731 insertions(+), 7374 deletions(-) diff --git a/crypto/openssh/.depend b/crypto/openssh/.depend index 259bf3b2f136..4897698ab74a 100644 --- a/crypto/openssh/.depend +++ b/crypto/openssh/.depend @@ -28,7 +28,8 @@ auth2-passwd.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd- auth2-pubkey.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh.h ssh2.h packet.h openbsd-compat/sys-queue.h dispatch.h kex.h mac.h crypto_api.h sshbuf.h log.h ssherr.h misc.h servconf.h compat.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h auth2-pubkey.o: pathnames.h uidswap.h auth-options.h canohost.h monitor_wrap.h authfile.h match.h channels.h session.h sk-api.h auth2-pubkeyfile.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh.h log.h ssherr.h misc.h sshkey.h digest.h hostfile.h auth.h auth-pam.h audit.h loginrec.h auth-options.h authfile.h match.h -auth2.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h atomicio.h xmalloc.h ssh2.h packet.h openbsd-compat/sys-queue.h dispatch.h log.h ssherr.h sshbuf.h misc.h servconf.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h pathnames.h monitor_wrap.h digest.h +auth2.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h atomicio.h xmalloc.h ssh2.h packet.h openbsd-compat/sys-queue.h dispatch.h log.h ssherr.h sshbuf.h misc.h servconf.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h pathnames.h monitor_wrap.h digest.h kex .h +auth2.o: mac.h crypto_api.h authfd.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh.h sshbuf.h sshkey.h authfd.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h log.h ssherr.h atomicio.h misc.h authfile.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h ssh.h log.h ssherr.h authfile.h misc.h atomicio.h sshkey.h sshbuf.h krl.h bitmap.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h bitmap.h diff --git a/crypto/openssh/.github/configs b/crypto/openssh/.github/configs index c7d6a55ab962..df82faf5046b 100755 --- a/crypto/openssh/.github/configs +++ b/crypto/openssh/.github/configs @@ -108,9 +108,19 @@ case "$config" in SKIP_LTESTS=sftp-chroot ;; gcc-11-Werror) - CC="gcc" + CC="gcc-11" + # -Wnoformat-truncation in gcc 7.3.1 20180130 fails on fmt_scaled + # -Wunused-result ignores (void) so is not useful. See + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 + CFLAGS="-O2 -Wno-format-truncation -Wimplicit-fallthrough=4 -Wno-unused-parameter -Wno-unused-result" + CONFIGFLAGS="--with-pam --with-Werror" + ;; + gcc-12-Werror) + CC="gcc-12" # -Wnoformat-truncation in gcc 7.3.1 20180130 fails on fmt_scaled - CFLAGS="-Wall -Wextra -O2 -Wno-format-truncation -Wimplicit-fallthrough=4 -Wno-unused-parameter" + # -Wunused-result ignores (void) so is not useful. See + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 + CFLAGS="-O2 -Wno-format-truncation -Wimplicit-fallthrough=4 -Wno-unused-parameter -Wno-unused-result" CONFIGFLAGS="--with-pam --with-Werror" ;; clang*|gcc*) diff --git a/crypto/openssh/.github/setup_ci.sh b/crypto/openssh/.github/setup_ci.sh index 010a333a6642..d0ba7b4724e9 100755 --- a/crypto/openssh/.github/setup_ci.sh +++ b/crypto/openssh/.github/setup_ci.sh @@ -18,8 +18,7 @@ case "$host" in ;; *-darwin*) PACKAGER=brew - brew install automake - exit 0 + PACKAGES="automake" ;; *) PACKAGER=apt @@ -30,20 +29,30 @@ TARGETS=$@ INSTALL_FIDO_PPA="no" export DEBIAN_FRONTEND=noninteractive -#echo "Setting up for '$TARGETS'" - -set -ex +set -e if [ -x "`which lsb_release 2>&1`" ]; then lsb_release -a fi -# Ubuntu 22.04 defaults to private home dirs which prevent the -# agent-getpeerid test from running ssh-add as nobody. See -# https://github.com/actions/runner-images/issues/6106 -if [ ! -z "$SUDO" ] && ! "$SUDO" -u nobody test -x ~; then - echo ~ is not executable by nobody, adding perms. - chmod go+x ~ +if [ ! -z "$SUDO" ]; then + # Ubuntu 22.04 defaults to private home dirs which prevent the + # agent-getpeerid test from running ssh-add as nobody. See + # https://github.com/actions/runner-images/issues/6106 + if ! "$SUDO" -u nobody test -x ~; then + echo ~ is not executable by nobody, adding perms. + chmod go+x ~ + fi + # Some of the Mac OS X runners don't have a nopasswd sudo rule. Regular + # sudo still works, but sudo -u doesn't. Restore the sudo rule. + if ! "$SUDO" grep -E 'runner.*NOPASSWD' /etc/passwd >/dev/null; then + echo "Restoring runner nopasswd rule to sudoers." + echo 'runner ALL=(ALL) NOPASSWD: ALL' |$SUDO tee -a /etc/sudoers + fi + if ! "$SUDO" -u nobody -S test -x ~ -Date: Wed Oct 4 15:34:10 2023 +1100 +Date: Tue Dec 19 01:59:50 2023 +1100 - crank version numbers + crank versions -commit f65f187b105d9b5c12fd750a211397d08c17c6d4 -Author: djm@openbsd.org -Date: Wed Oct 4 04:04:09 2023 +0000 +commit 2f2c65cb5f1518a9c556d3e8efa27ea0ca305c6b +Author: Damien Miller +Date: Tue Dec 19 01:59:06 2023 +1100 - upstream: openssh-9.5 - - OpenBSD-Commit-ID: 5e0af680480bd3b6f5560cf840ad032d48fd6b16 + depend -commit ffe27e54a4bb18d5d3bbd3f4cc93a41b8d94dfd2 +commit e48cdee8e19059203b1aeeabec2350b8375fa61f Author: djm@openbsd.org -Date: Wed Oct 4 04:03:50 2023 +0000 +Date: Mon Dec 18 14:50:08 2023 +0000 - upstream: add some cautionary text about % token expansion and - - shell metacharacters; based on report from vinci AT protonmail.ch + upstream: regress test for agent PKCS#11-backed certificates - OpenBSD-Commit-ID: aa1450a54fcee2f153ef70368d90edb1e7019113 + OpenBSD-Regress-ID: 38f681777cb944a8cc3bf9d0ad62959a16764df9 -commit 60ec3d54fd1ebfe2dda75893fa1e870b8dffbb0d +commit 2f512f862df1d5f456f82a0334c9e8cc7208a2a1 Author: djm@openbsd.org -Date: Tue Oct 3 23:56:10 2023 +0000 +Date: Mon Dec 18 14:49:39 2023 +0000 - upstream: fix link to agent draft; spotted by Jann Horn + upstream: regress test for constrained PKCS#11 keys - OpenBSD-Commit-ID: ff5bda21a83ec013db683e282256a85201d2dc4b + OpenBSD-Regress-ID: b2f26ae95d609d12257b43aef7cd7714c82618ff -commit 12e2d4b13f6f63ce2de13cbfcc9e4d0d4b4ab231 -Author: Damien Miller -Date: Wed Oct 4 10:54:04 2023 +1100 +commit cdddd66412ca5920ed4d3ebbfa6ace12dbd9b82f +Author: djm@openbsd.org +Date: Mon Dec 18 14:48:44 2023 +0000 - use portable provider allowlist path in manpage + upstream: openssh-9.6 - spotted by Jann Horn + OpenBSD-Commit-ID: 21759837cf0e0092d9a2079f8fb562071c11016b -commit 6c2c6ffde75df95fd838039850d3dd3d84956d87 -Author: deraadt@openbsd.org -Date: Tue Sep 19 20:37:07 2023 +0000 +commit 6d51feab157cedf1e7ef5b3f8781ca8ff9c4ab1b +Author: djm@openbsd.org +Date: Mon Dec 18 14:48:08 2023 +0000 - upstream: typo; from Jim Spath + upstream: ssh-agent: record failed session-bind attempts - OpenBSD-Commit-ID: 2f5fba917b5d4fcf93d9e0b0756c7f63189e228e + Record failed attempts to session-bind a connection and refuse signing + operations on that connection henceforth. + + Prevents a future situation where we add a new hostkey type that is not + recognised by an older ssh-agent, that consequently causes session-bind + to fail (this situation is only likely to arise when people mix ssh(1) + and ssh-agent(1) of different versions on the same host). Previously, + after such a failure the agent socket would be considered unbound and + not subject to restriction. + + Spotted by Jann Horn + + OpenBSD-Commit-ID: b0fdd023e920aa4831413f640de4c5307b53552e -commit b6b49130a0089b297245ee39e769231d7c763014 +commit 7ef3787c84b6b524501211b11a26c742f829af1a Author: djm@openbsd.org -Date: Sun Sep 10 23:12:32 2023 +0000 +Date: Mon Dec 18 14:47:44 2023 +0000 - upstream: rename remote_glob() -> sftp_glob() to match other API + upstream: ban user/hostnames with most shell metacharacters - OpenBSD-Commit-ID: d9dfb3708d824ec02970a84d96cf5937e0887229 + This makes ssh(1) refuse user or host names provided on the + commandline that contain most shell metacharacters. + + Some programs that invoke ssh(1) using untrusted data do not filter + metacharacters in arguments they supply. This could create + interactions with user-specified ProxyCommand and other directives + that allow shell injection attacks to occur. + + It's a mistake to invoke ssh(1) with arbitrary untrusted arguments, + but getting this stuff right can be tricky, so this should prevent + most obvious ways of creating risky situations. It however is not + and cannot be perfect: ssh(1) has no practical way of interpreting + what shell quoting rules are in use and how they interact with the + user's specified ProxyCommand. + + To allow configurations that use strange user or hostnames to + continue to work, this strictness is applied only to names coming + from the commandline. Names specified using User or Hostname + directives in ssh_config(5) are not affected. + + feedback/ok millert@ markus@ dtucker@ deraadt@ + + OpenBSD-Commit-ID: 3b487348b5964f3e77b6b4d3da4c3b439e94b2d9 -commit 21b79af6c8d2357c822c84cef3fbdb8001ed263b +commit 0cb50eefdd29f0fec31d0e71cc4b004a5f704e67 Author: djm@openbsd.org -Date: Sun Sep 10 03:51:55 2023 +0000 +Date: Mon Dec 18 14:47:20 2023 +0000 - upstream: typo in comment + upstream: stricter handling of channel window limits - OpenBSD-Commit-ID: 69285e0ce962a7c6b0ab5f17a293c60a0a360a18 - -commit 41232d25532b4d2ef6c5db62efc0cf50a79d26ca -Author: Darren Tucker -Date: Sun Sep 10 15:45:38 2023 +1000 - - Use zero-call-used-regs=used with Apple compilers. + This makes ssh/sshd more strict in handling non-compliant peers that + send more data than the advertised channel window allows. Previously + the additional data would be silently discarded. This change will + cause ssh/sshd to terminate the connection if the channel window is + exceeded by more than a small grace allowance. - Apple's versions of clang have version numbers that do not match the - corresponding upstream clang versions. Unfortunately, they do still - have the clang-15 zero-call-used-regs=all bug, so for now use the value - that doesn't result in segfaults. We could allowlist future versions - that are known to work. bz#3584 (and probably also our github CI - failures). + ok markus@ + + OpenBSD-Commit-ID: 811e21b41831eba3dd7f67b3d409a438f20d3037 -commit 90ccc5918ea505bf156c31148b6b59a1bf5d6dc6 +commit 4448a2938abc76e6bd33ba09b2ec17a216dfb491 Author: djm@openbsd.org -Date: Sun Sep 10 03:25:53 2023 +0000 +Date: Mon Dec 18 14:46:56 2023 +0000 - upstream: randomise keystroke obfuscation intervals and average + upstream: Make it possible to load certs from PKCS#11 tokens - interval rate. ok dtucker@ + Adds a protocol extension to allow grafting certificates supplied by + ssh-add to keys loaded from PKCS#11 tokens in the agent. - OpenBSD-Commit-ID: 05f61d051ab418fcfc4857ff306e420037502382 + feedback/ok markus@ + + OpenBSD-Commit-ID: bb5433cd28ede2bc910996eb3c0b53e20f86037f -commit bd1b9e52f5fa94d87223c90905c5fdc1a7c32aa6 +commit 881d9c6af9da4257c69c327c4e2f1508b2fa754b Author: djm@openbsd.org -Date: Fri Sep 8 06:34:24 2023 +0000 +Date: Mon Dec 18 14:46:12 2023 +0000 - upstream: fix sizeof(*ptr) instead sizeof(ptr) in realloc (pointer here + upstream: apply destination constraints to all p11 keys - is char**, so harmless); spotted in CID 416964 + Previously applied only to the first key returned from each token. - OpenBSD-Commit-ID: c61caa4a5a667ee20bb1042098861e6c72c69002 + ok markus@ + + OpenBSD-Commit-ID: 36df3afb8eb94eec6b2541f063d0d164ef8b488d -commit c4f966482983e18601eec70a1563115de836616f +commit a7ed931caeb68947d30af8a795f4108b6efad761 Author: djm@openbsd.org -Date: Fri Sep 8 06:10:57 2023 +0000 +Date: Mon Dec 18 14:45:49 2023 +0000 - upstream: regress test recursive remote-remote directories copies where + upstream: add "ext-info-in-auth@openssh.com" extension - the directory contains a symlink to another directory. + This adds another transport protocol extension to allow a sshd to send + SSH2_MSG_EXT_INFO during user authentication, after the server has + learned the username that is being logged in to. - also remove errant `set -x` that snuck in at some point + This lets sshd to update the acceptable signature algoritms for public + key authentication, and allows these to be varied via sshd_config(5) + "Match" directives, which are evaluated after the server learns the + username being authenticated. - OpenBSD-Regress-ID: 1c94a48bdbd633ef2285954ee257725cd7bc456f + Full details in the PROTOCOL file + + OpenBSD-Commit-ID: 1de7da7f2b6c32a46043d75fcd49b0cbb7db7779 -commit 5e1dfe5014ebc194641678303e22ab3bba15f4e5 +commit 1edb00c58f8a6875fad6a497aa2bacf37f9e6cd5 Author: djm@openbsd.org -Date: Fri Sep 8 06:10:02 2023 +0000 +Date: Mon Dec 18 14:45:17 2023 +0000 - upstream: fix recursive remote-remote copies of directories that + upstream: implement "strict key exchange" in ssh and sshd - contain symlinks to other directories (similar to bz3611) + This adds a protocol extension to improve the integrity of the SSH + transport protocol, particular in and around the initial key exchange + (KEX) phase. - OpenBSD-Commit-ID: 7e19d2ae09b4f941bf8eecc3955c9120171da37f + Full details of the extension are in the PROTOCOL file. + + with markus@ + + OpenBSD-Commit-ID: 2a66ac962f0a630d7945fee54004ed9e9c439f14 -commit 7c0ce2bf98b303b6ad91493ee3247d96c18ba1f6 -Author: djm@openbsd.org -Date: Fri Sep 8 05:50:57 2023 +0000 +commit 59d691b886c79e70b1d1c4ab744e81fd176222fd +Author: Damien Miller +Date: Mon Dec 18 14:49:11 2023 +1100 - upstream: regress test for recursive copies of directories containing + better detection of broken -fzero-call-used-regs - symlinks to other directories. bz3611, ok dtucker@ + Use OSSH_CHECK_CFLAG_LINK() for detection of these flags and extend + test program to exercise varargs, which seems to catch more stuff. - OpenBSD-Regress-ID: eaa4c29cc5cddff4e72a16bcce14aeb1ecfc94b9 + ok dtucker@ -commit 2de990142a83bf60ef694378b8598706bc654b08 +commit aa7b21708511a6d4aed3839fc9f6e82e849dd4a1 Author: djm@openbsd.org -Date: Fri Sep 8 05:56:13 2023 +0000 +Date: Wed Dec 13 03:28:19 2023 +0000 - upstream: the sftp code was one of my first contributions to + upstream: when invoking KnownHostsCommand to determine the order of - OpenSSH and it shows - the function names are terrible. + host key algorithms to request, ensure that the hostname passed to the + command is decorated with the port number for ports other than 22. - Rename do_blah() to sftp_blah() to make them less so. + This matches the behaviour of KnownHostsCommand when invoked to look + up the actual host key. - Completely mechanical except for sftp_stat() and sftp_lstat() which - change from returning a pointer to a static variable (error-prone) to - taking a pointer to a caller-provided receiver. + bz3643, ok dtucker@ - OpenBSD-Commit-ID: eb54d6a72d0bbba4d623e2175cf5cc4c75dc2ba4 + OpenBSD-Commit-ID: 5cfabc0b7c6c7ab473666df314f377b1f15420b1 -commit 249d8bd0472b53e3a2a0e138b4c030a31e83346a -Author: djm@openbsd.org -Date: Fri Sep 8 05:50:12 2023 +0000 +commit 4086bd6652c0badccc020218a62190a7798fb72c +Author: markus@openbsd.org +Date: Fri Dec 8 09:18:39 2023 +0000 - upstream: fix scp in SFTP mode recursive upload and download of - - directories that contain symlinks to other directories. In scp mode, the - links would be followed, but in SFTP mode they were not. bz3611, ok dtucker@ + upstream: prevent leak in sshsig_match_principals; ok djm@ - OpenBSD-Commit-ID: 9760fda668eaa94a992250d7670dfbc62a45197c + OpenBSD-Commit-ID: 594f61ad4819ff5c72dfe99ba666a17f0e1030ae -commit 0e1f4401c466fa4fdaea81b6dadc8dd1fc4cf0af +commit 19d3ee2f3adf7d9a606ff015c1e153744702c4c9 Author: djm@openbsd.org -Date: Wed Sep 6 23:36:09 2023 +0000 +Date: Wed Dec 6 21:06:48 2023 +0000 - upstream: regression test for override of subsystem in match blocks + upstream: short circuit debug log processing early if we're not going - OpenBSD-Regress-ID: 5f8135da3bfda71067084c048d717b0e8793e87c + to log anything. From Kobe Housen + + OpenBSD-Commit-ID: 2bcddd695872a1bef137cfff7823044dcded90ea -commit 8a1450c62035e834d8a79a5d0d1c904236f9dcfe -Author: djm@openbsd.org -Date: Wed Sep 6 23:35:35 2023 +0000 +commit 947affad4831df015c498c00c6351ea6f13895d5 +Author: Darren Tucker +Date: Mon Nov 27 09:37:28 2023 +1100 - upstream: allow override of Sybsystem directives in sshd Match - - blocks + Add tests for OpenSSL 3.2.0 and 3.2 stable branch. + +commit 747dce36206675ca6b885010a835733df469351b +Author: Darren Tucker +Date: Sat Nov 25 09:03:38 2023 +1100 + + Use non-zero arg in compiler test program. - OpenBSD-Commit-ID: 3911d18a826a2d2fe7e4519075cf3e57af439722 + Now that we're running the test program, passing zero to the test function + can cause divide-by-zero exceptions which might show up in logs. -commit 6e52826e2a74d077147a82ead8d4fbd5b54f4e3b -Author: djm@openbsd.org -Date: Wed Sep 6 23:26:37 2023 +0000 +commit 3d44a5c56585d1c351dbc006240a591b6da502b1 +Author: dtucker@openbsd.org +Date: Fri Nov 24 00:31:30 2023 +0000 - upstream: allocate the subsystems array as necessary and remove the + upstream: Plug mem leak of msg when processing a quit message. - fixed limit of subsystems. Saves a few kb of memory in the server and makes - it more like the other options. + Coverity CID#427852, ok djm@ - OpenBSD-Commit-ID: e683dfca6bdcbc3cc339bb6c6517c0c4736a547f + OpenBSD-Commit-ID: bf85362addbe2134c3d8c4b80f16601fbff823b7 -commit e19069c9fac4c111d6496b19c7f7db43b4f07b4f -Author: djm@openbsd.org -Date: Wed Sep 6 23:23:53 2023 +0000 +commit 1d7f9b6e297877bd00973e6dc5c0642dbefc3b5f +Author: dtucker@openbsd.org +Date: Thu Nov 23 03:37:05 2023 +0000 - upstream: preserve quoting of Subsystem commands and arguments. + upstream: Include existing mux path in debug message. - This may change behaviour of exotic configurations, but the most common - subsystem configuration (sftp-server) is unlikely to be affected. + OpenBSD-Commit-ID: 1c3641be10c2f4fbad2a1b088a441d072e18bf16 + +commit f29934066bd0e561a2e516b7e584fb92d2eedee0 +Author: Darren Tucker +Date: Thu Nov 23 19:41:27 2023 +1100 + + Add an Ubuntu 22.04 test VM. - OpenBSD-Commit-ID: 8ffa296aeca981de5b0945242ce75aa6dee479bf + This is the same version as Github's runners so most of the testing on + it is over there, but having a local VM makes debugging much easier. -commit 52dfe3c72d98503d8b7c6f64fc7e19d685636c0b -Author: djm@openbsd.org -Date: Wed Sep 6 23:21:36 2023 +0000 +commit a93284a780cd3972afe5f89086b75d564ba157f3 +Author: Darren Tucker +Date: Thu Nov 23 19:36:22 2023 +1100 - upstream: downgrade duplicate Subsystem directives from being a + Add gcc-12 -Werror test on Ubuntu 22.04. - fatal error to being a debug message to match behaviour with just about all - other directives. + Explictly specify gcc-11 on Ubuntu 22.04 (it's the system compiler). + +commit 670f5a647e98b6fd95ad64f789f87ee3274b481b +Author: Darren Tucker +Date: Thu Nov 23 19:34:57 2023 +1100 + + Check return value from write to prevent warning. - OpenBSD-Commit-ID: fc90ed2cc0c18d4eb8e33d2c5e98d25f282588ce + ... and since we're testing for flags with -Werror, this caused + configure to mis-detect compiler flags. -commit 1ee0a16e07b6f0847ff463d7b5221c4bf1876e25 -Author: djm@openbsd.org -Date: Wed Sep 6 23:18:15 2023 +0000 +commit cea007d691cfedfa07a5b8599f97ce0511f53fc9 +Author: Darren Tucker +Date: Wed Nov 22 21:18:55 2023 +1100 - upstream: handle cr+lf (instead of just cr) in sshsig signature + Run compiler test program when compiling natively. - files + ok djm@ + +commit ee0d305828f13536c0a416bbf9c3e81039d9ea55 +Author: Darren Tucker +Date: Wed Nov 22 21:18:07 2023 +1100 + + Factor out compiler test program into a macro. - OpenBSD-Commit-ID: 647460a212b916540016d066568816507375fd7f + ok djm@ -commit e1c284d60a928bcdd60bc575c6f9604663502770 -Author: job@openbsd.org -Date: Mon Sep 4 10:29:58 2023 +0000 +commit de304c76316b029df460673725a9104224b9959b +Author: Darren Tucker +Date: Wed Nov 22 08:55:36 2023 +1100 - upstream: Generate Ed25519 keys when invoked without arguments + Add fbsd14 VM to test pool. + +commit 99a2df5e1994cdcb44ba2187b5f34d0e9190be91 +Author: Darren Tucker +Date: Tue Nov 21 16:19:29 2023 +1100 + + Expand -fzero-call-used-regs test to cover gcc 11. - Ed25519 public keys are very convenient due to their small size. - OpenSSH has supported Ed25519 since version 6.5 (January 2014). + It turns out that gcc also has some problems with -fzero-call-used-regs, + at least v11 on mips. Previously the test in OSSH_CHECK_CFLAG_COMPILE + was sufficient to catch it with "=all", but not sufficient for "=used". + Expand the testcase and include it in the other tests for good measure. + See bz#3629. ok djm@. + +commit ff220d4010717f7bfbbc02a2400666fb9d24f250 +Author: Darren Tucker +Date: Tue Nov 21 14:04:34 2023 +1100 + + Stop using -fzero-call-used-regs=all - OK djm@ markus@ sthen@ deraadt@ + ... since it seems to be problematic with several different versions of + clang. Only use -fzero-call-used-regs=used which is less + problematic, except with Apple's clang where we don't use it at all. + bz#3629, ok djm@ + +commit 2a19e02f36b16f0f6cc915f7d1e60ead5e36303b +Author: Darren Tucker +Date: Tue Nov 21 14:02:18 2023 +1100 + + Allow for vendor prefix on clang version numbers. - OpenBSD-Commit-ID: f498beaad19c8cdcc357381a60df4a9c69858b3f + Correctly detects the version of OpenBSD's native clang, as well as + Apple's. Spotted tb@, ok djm@. -commit 694150ad92765574ff82a18f4e86322bd3231e68 +commit c52db0114826d73eff6cdbf205e9c1fa4f7ca6c6 Author: djm@openbsd.org -Date: Mon Sep 4 00:08:14 2023 +0000 +Date: Mon Nov 20 02:50:00 2023 +0000 - upstream: trigger keystroke timing obfucation only if the channels - - layer enqueud some data in the last poll() cycle; this avoids triggering the - obfuscatior for non-channels data like ClientAlive probes and also fixes a - related problem were the obfucations would be triggered on fully quiescent - connections. + upstream: set errno=EAFNOSUPPORT when filtering addresses that don't - Based on / tested by naddy@ + match AddressFamily; yields slightly better error message if no address + matches. bz#3526 - OpenBSD-Commit-ID: d98f32dc62d7663ff4660e4556e184032a0db123 + OpenBSD-Commit-ID: 29cea900ddd8b04a4d1968da5c4a893be2ebd9e6 -commit b5fd97896b59a3a46245cf438cc8b16c795d9f74 +commit 26f3f3bbc69196d908cad6558c8c7dc5beb8d74a Author: djm@openbsd.org -Date: Mon Sep 4 00:04:02 2023 +0000 +Date: Wed Nov 15 23:03:38 2023 +0000 - upstream: avoid bogus "obfuscate_keystroke_timing: stopping ..." + upstream: when connecting via socket (the default case), filter - debug messages when keystroke timing obfuscation was never started; spotted - by naddy@ + addresses by AddressFamily if one was specified. Fixes the case where, if + CanonicalizeHostname is enabled, ssh may ignore AddressFamily. bz5326; ok + dtucker - OpenBSD-Commit-ID: 5c270d35f7d2974db5c1646e9c64188f9393be31 + OpenBSD-Commit-ID: 6c7d7751f6cd055126b2b268a7b64dcafa447439 -commit ccf7d913db34e49b7a6db1b8331bd402004c840d +commit 050c335c8da43741ed0df2570ebfbd5d1dfd0a31 Author: djm@openbsd.org -Date: Mon Sep 4 00:01:46 2023 +0000 +Date: Wed Nov 15 22:51:49 2023 +0000 - upstream: make channel_output_poll() return a flag indicating + upstream: when deciding whether to enable keystroke timing - whether channel data was enqueued. Will be used to improve keystroke timing - obfuscation. Problem spotted by / tested by naddy@ + obfuscation, only consider enabling it when a channel with a tty is open. - OpenBSD-Commit-ID: f9776c7b0065ba7c3bbe50431fd3b629f44314d0 + Avoids turning on the obfucation when X11 forwarding only is in use, + which slows it right down. Reported by Roger Marsh + + OpenBSD-Commit-ID: c292f738db410f729190f92de100c39ec931a4f1 -commit 43254b326ac6e2131dbd750f9464dc62c14bd5a7 -Author: djm@openbsd.org -Date: Sun Sep 3 23:59:32 2023 +0000 +commit 676377ce67807a24e08a54cd60ec832946cc6cae +Author: tobhe@openbsd.org +Date: Mon Nov 13 09:18:19 2023 +0000 - upstream: set interactive mode for ControlPersist sessions if they + upstream: Make sure sftp_get_limits() only returns 0 if 'limits' - originally requested a tty; enables keystroke timing obfuscation for most - ControlPersist sessions. Spotted by naddy@ + was initialized. This fixes a potential uninitialized use of 'limits' in + sftp_init() if sftp_get_limits() returned early because of an unexpected + message type. - OpenBSD-Commit-ID: 72783a26254202e2f3f41a2818a19956fe49a772 + ok djm@ + + OpenBSD-Commit-ID: 1c177d7c3becc1d71bc8763eecf61873a1d3884c -commit ff3eda68ceb2e2bb8f48e3faceb96076c3e85c20 +commit 64e0600f23c6dec36c3875392ac95b8a9100c2d6 Author: Darren Tucker -Date: Thu Aug 31 23:02:35 2023 +1000 +Date: Mon Nov 13 20:03:31 2023 +1100 - Set LLONG_MAX for C89 test. + Test current releases of LibreSSL and OpenSSL. - If we don't have LLONG_MAX, configure will figure out that it can get it - by setting -std=gnu99, at which point we won't be testing C89 any more. - To avoid this, feed it in via CFLAGS. + Retire some of the older releases. -commit f98031773db361424d59e3301aa92aacf423d920 -Author: djm@openbsd.org -Date: Tue Aug 29 02:50:10 2023 +0000 +commit c8ed7cc545879ac15f6ce428be4b29c35598bb2a +Author: dtucker@openbsd.org +Date: Wed Nov 1 02:08:38 2023 +0000 - upstream: make PerSourceMaxStartups first-match-wins; ok dtucker@ + upstream: Specify ssh binary to use - OpenBSD-Commit-ID: dac0c24cb709e3c595b8b4f422a0355dc5a3b4e7 + ... instead of relying on installed one. Fixes test failures in -portable + when running tests prior to installation. + + OpenBSD-Regress-ID: b6d6ba71c23209c616efc805a60d9a445d53a685 -commit cfa66857db90cd908de131e0041a50ffc17c7df8 -Author: djm@openbsd.org -Date: Mon Aug 28 09:52:09 2023 +0000 +commit e9fc2c48121cada1b4dcc5dadea5d447fe0093c3 +Author: Darren Tucker +Date: Wed Nov 1 13:11:31 2023 +1100 - upstream: descriptive text shouldn't be under .Cm + Put long-running test targets on hipri runners. - OpenBSD-Commit-ID: b1afaeb456a52bc8a58f4f9f8b2f9fa8f6bf651b + Some of the selfhosted test targets take a long time to run for various + reasons, so label them for "libvirt-hipri" runners so that they can + start immediately. This should reduce the time to complete all tests. -commit 01dbf3d46651b7d6ddf5e45d233839bbfffaeaec +commit 7ddf27668f0e21233f08c0ab2fe9ee3fdd6ab1e2 Author: djm@openbsd.org -Date: Mon Aug 28 09:48:11 2023 +0000 +Date: Wed Nov 1 00:29:46 2023 +0000 - upstream: limit artificial login delay to a reasonable maximum (5s) + upstream: add some tests of forced commands overriding Subsystem - and don't delay at all for the "none" authentication mechanism. Patch by - Dmitry Belyavskiy in bz3602 with polish/ok dtucker@ + directives - OpenBSD-Commit-ID: 85b364676dd84cf1de0e98fc2fbdcb1a844ce515 + OpenBSD-Regress-ID: eb48610282f6371672bdf2a8b5d2aa33cfbd322b -commit 528da5b9d7c5da01ed7a73ff21c722e1b5326006 -Author: jmc@openbsd.org -Date: Mon Aug 28 05:32:28 2023 +0000 +commit fb06f9b5a065dfbbef5916fc4accc03c0bf026dd *** 20737 LINES SKIPPED *** From nobody Mon Jan 8 14:46:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7xhN549lz55wNb; Mon, 8 Jan 2024 14:46: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 4T7xhN4Xfsz4D7c; Mon, 8 Jan 2024 14:46:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704725172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zMHF4bFSsCnZswS3BFXXLKBvlzbt8dZRQkzgVOUaK/k=; b=XFNScpyBA989s+CZzYGS5U9JuAxFCr3FBJWxCB43Ba3EhC4KN4jTUW+wQWFS0P2bV+bMnM dKAnekvEAQAFa+r/Kk0j0SM/3CKmBjXcclmPZRV3UnvsED1+gZsQCz11aGE6Zh+VxuXQwh jnAfo1IqDmeN0NEl0OY6zVCXqxUjxX4dkWE9/QT8jOBOWe3qfixinpdlAn5TLNZF4mwXsk q6ztdwnETikwivjPonPU9vfRM4WCIruqvBQYpiA3r8KfdtYdGnKxbKsnK2XEhTcoLyJIsZ bnrnj4tnQgkqK3s575kNMAXPqvRlPbLJBvxzTNops4yNeRNFEdr5ulHfKWkTRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704725172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zMHF4bFSsCnZswS3BFXXLKBvlzbt8dZRQkzgVOUaK/k=; b=W454ooNN5V97SyOVTvIxIrwp+6k+pxHYbdH+vqYqKiQbid3oP1G+haxeVyJPB2SvmLh7sG db5hp+TLejkNVIDFx6t1RLHDjlcuBxiKFUzsg5c47d8urHZJtuir33slO9DifNT/glsL0U u2p+g9j1jcxyx5P14a6GE1m5tqcVSYyDOAOxzoPIajJdZei1yk9MLnNrpXFfn84riD4sgr Ts7PrZ+oUuWimFFMZj/TuZ3YuSo72pJdbV6g1G6raU2jaRIlcOXaSe032M6AmUcx06ntsU gpUAn4eD56vwKZrMQagfmULSdc/mpgwjyUcJvQgIEkzBUYt2wum+/TcvfMX4kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704725172; a=rsa-sha256; cv=none; b=e8lH+/CrA9NKN/LeqbgCS+fmfP89KXqtKEHgz6GX3KIf4Vp0Ge8Qn12JQvTwk8/tzCNH1j cGWGbUIkrDRubmdWYoVv0R13/ufg0wjXF5hsS3hUeENija6XQCZnODnkJmxyFWXw2zZ4+j 968eIl9gBk4YM7YhmLUW0N0gwnKBm8wo0qgRpL9Hy7t5P/P4oPqv6vjJI8HEYSbGS/RAb/ qnzy4NbVdDkkwwMEPy38kY2UaJj5vc9KLIn0SxSGgXWua0d/F53J9bhk5TARXnr/OlNjpk Zz+hgaKv+VWcdRjuM/gZXW44Q17mZUXmH6PBCYynwOd+XjjDFDlDkZTBWxXe5w== 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 4T7xhN3W81z19mx; Mon, 8 Jan 2024 14:46: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 408EkCsH034346; Mon, 8 Jan 2024 14:46:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408EkCCh034343; Mon, 8 Jan 2024 14:46:12 GMT (envelope-from git) Date: Mon, 8 Jan 2024 14:46:12 GMT Message-Id: <202401081446.408EkCCh034343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 5669eb94fdfd - stable/14 - sound: remove Legacy Hardware section from man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 5669eb94fdfd03d89256c9ef58e5f57a151acc88 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5669eb94fdfd03d89256c9ef58e5f57a151acc88 commit 5669eb94fdfd03d89256c9ef58e5f57a151acc88 Author: Ed Maste AuthorDate: 2023-12-02 21:10:16 +0000 Commit: Ed Maste CommitDate: 2024-01-07 19:31:11 +0000 sound: remove Legacy Hardware section from man page Support for "old legacy ISA cards" was removed in 9054e296819f and preceeding commits. MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 06c083f79dd74ba2fcadccbc1b338b8db7f35ef8) --- share/man/man4/pcm.4 | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/share/man/man4/pcm.4 b/share/man/man4/pcm.4 index 95ac7f71688f..1803eaca42eb 100644 --- a/share/man/man4/pcm.4 +++ b/share/man/man4/pcm.4 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 26, 2020 +.Dd December 2, 2023 .Dt SOUND 4 .Os .Sh NAME @@ -124,33 +124,6 @@ The following bridge device drivers are available: .Pp Refer to the manual page for each bridge device driver for driver specific settings and information. -.Ss Legacy Hardware -For old legacy -.Tn ISA -cards, the driver looks for -.Tn MSS -cards at addresses -.Dv 0x530 -and -.Dv 0x604 . -These values can be overridden in -.Pa /boot/device.hints . -Non-PnP sound cards require the following lines in -.Xr device.hints 5 : -.Bd -literal -offset indent -hint.pcm.0.at="isa" -hint.pcm.0.irq="5" -hint.pcm.0.drq="1" -hint.pcm.0.flags="0x0" -.Ed -.Pp -Apart from the usual parameters, the flags field is used to specify -the secondary -.Tn DMA -channel (generally used for capture in full duplex cards). -Flags are set to 0 for cards not using a secondary -.Tn DMA -channel, or to 0x10 + C to specify channel C. .Ss Boot Variables In general, the module .Pa snd_foo From nobody Mon Jan 8 14:46:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7xhP6v93z55wnB; Mon, 8 Jan 2024 14:46: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 4T7xhP581Rz4DD8; Mon, 8 Jan 2024 14:46:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704725173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W4gdkqbkNu2fqUmMgKb9g9qzgVZKowRQkaZbexIBCbw=; b=Qm7wrum3YSuzUE1kpN0W6s7HLl8ZcJ9UzhunMyErKRBMQALttYYMNLqLP+bDGdOnUOnUHP VuPYoZCdW0U4fquIP2sThE3Xlb0/Gya7eQX4M5PJ+wnLkELEFvpjUiLZFC1YJRV2u4Vbef EIaAkBeO5i4OsUWyz5bqolH2OjFB09CaJy0Mt3GFbvblOoF911/VNJssEguGvgZu8ZC2Fk D9TUH6oDp+X5aAROqyfQvbasvHcVq/b+LGsnPYkDp/OUVXnPygctV8/W6XCJEuZ1C9M8Pj 4yOgzb2BwXOjfEMbGMB4UVGV9w71IGKbglFhLG176fGt3B1QBf+qiMPA9bRGlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704725173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W4gdkqbkNu2fqUmMgKb9g9qzgVZKowRQkaZbexIBCbw=; b=oQhexjhRhIs/ISw015yZGU+y/S7dC1GHeiQ0PbJdGzAhWDSKkitnGuWL80/p3VZoMDUhue tOr0vVBfVBRmYwtRc0NhB8xuqDOt6OIhpfjcHjyxkl/knGt2YI58VyTEKIiY/gqh9p9JHb h6n+yDbTVyFJzAA2cn9UXhOiK5Xr7DWQ0lBB59JH5THlc6PQS89qXZ/MDDTVSm40Q534Tt 3ZWhqIazHMC4EXNEQVahjqI6gbl2HVa3SLNNqvpB5Qdc4bo0+NlvxQzubjNBAe6+xSkC7g mBRXGoScCevQ6OX7Fv/o0ePVcQ08K/Bgfe9/xZCLVvzvk63IMEjwcZwE4CjGng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704725173; a=rsa-sha256; cv=none; b=FQj81/ok5lRPBxMEM9l/DyQZlunr7ZiIvuWbGEIVJNTannpICknLB2dNZfJ8n7hxW8i3Oe 7moiRIdXwE/uUQjKiBvkrWWgOBnosOPOL+SUyDxp4AOibXujlrEo7tmP9EBYtpa/RxM/3s ovJSHlxgzcVSO2ToJN2tWWyqW4X5lJVlhbMXGAm9SpMbeiMfQ/z4ZVweyHDld+TyAVkYlw wPVL1M+z1lE58JSO2KThZuy3dWOculyb+eBamxHx4l2ibJlPZRqHO5MI1B9Ge1pcXqx3Oz 5RGLyex9G5RMflMDzy56IuTq/058GeCnYYMIBkXh2RhkPvmq8jjnW+uojqiq0Q== 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 4T7xhP4DnBz1B3Z; Mon, 8 Jan 2024 14:46: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 408EkDld034394; Mon, 8 Jan 2024 14:46:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408EkDUL034391; Mon, 8 Jan 2024 14:46:13 GMT (envelope-from git) Date: Mon, 8 Jan 2024 14:46:13 GMT Message-Id: <202401081446.408EkDUL034391@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: a13066579c6f - stable/14 - libsecureboot: be more verbose about validation failures List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: a13066579c6f0b80786472505f115cadbf301c25 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a13066579c6f0b80786472505f115cadbf301c25 commit a13066579c6f0b80786472505f115cadbf301c25 Author: Stéphane Rochoy AuthorDate: 2023-12-04 09:57:43 +0000 Commit: Ed Maste CommitDate: 2024-01-07 19:39:17 +0000 libsecureboot: be more verbose about validation failures Reviewed by: imp, sjg Pull Request: https://github.com/freebsd/freebsd-src/pull/916 (cherry picked from commit 4b9d605768acabc460aa6dcfe8a1f8db35b16794) --- lib/libbearssl/Makefile.inc | 1 + lib/libbearssl/Makefile.libsa.inc | 3 +++ lib/libsecureboot/vets.c | 14 +++++++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/libbearssl/Makefile.inc b/lib/libbearssl/Makefile.inc index 764984de9067..453630d038cd 100644 --- a/lib/libbearssl/Makefile.inc +++ b/lib/libbearssl/Makefile.inc @@ -1,6 +1,7 @@ BEARSSL?= ${SRCTOP}/contrib/bearssl BEARSSL_SRC= ${BEARSSL}/src +BEARSSL_TOOLS= ${BEARSSL}/tools CFLAGS+= -I${BEARSSL}/inc CFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} diff --git a/lib/libbearssl/Makefile.libsa.inc b/lib/libbearssl/Makefile.libsa.inc index c31d3f85975a..c171e141f0db 100644 --- a/lib/libbearssl/Makefile.libsa.inc +++ b/lib/libbearssl/Makefile.libsa.inc @@ -83,3 +83,6 @@ SRCS+= \ x509/x509_decoder.c \ x509/x509_minimal.c \ +# We want find_error_name(). +SRCS+= \ + ${BEARSSL_TOOLS}/errors.c \ diff --git a/lib/libsecureboot/vets.c b/lib/libsecureboot/vets.c index 4a2aba433191..c86b198c45c5 100644 --- a/lib/libsecureboot/vets.c +++ b/lib/libsecureboot/vets.c @@ -568,9 +568,17 @@ verify_signer_xcs(br_x509_certificate *xcs, ve_error_set("Validation failed, certificate not valid as of %s", gdate(date, sizeof(date), ve_utc)); break; - default: - ve_error_set("Validation failed, err = %d", err); - break; + default: { + const char *err_desc = NULL; + const char *err_name = find_error_name(err, &err_desc); + + if (err_name == NULL) + ve_error_set("Validation failed, err = %d", + err); + else + ve_error_set("Validation failed, %s (%s)", + err_desc, err_name); + break; } } } else { tpk = mc.vtable->get_pkey(&mc.vtable, &usages); From nobody Mon Jan 8 14:46:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7xhQ6vnbz55wnD; Mon, 8 Jan 2024 14:46: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 4T7xhQ61GKz4DDC; Mon, 8 Jan 2024 14:46:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704725174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=en3BppLEqu3C+yGmvBL/PuCUigMlzpz2Q4rBYDHRDyg=; b=UVy1kZgmGvjFlhSyEbhxWbzALyAofeSSMCshERgsgfPn4KYoeEuIuOL0Tx7d3Gv9FGXlbw F4HD86n7gxOXGu9yCAtwD5YRVooWPY45O1iDZeSNCf5Ic6vDqhfplBjRcJOQrCNGMFlLbd bgSlyojdFCKQqoEJHiOP9ZuWqntFIHcnI1qjGb6O9ELTka6mlo3nYH2ke+RG5oHSmwg2R9 73KZcHhYaSLOQWcP9f0NJjK1XiCO6GM4u7WsTL/277LBmEZKtq66wxRMEUMeTRwamxL9da RjlTc9UhhoWOmaAhlhW0UebFNO0nl7HSGurPEolyCz8qy6ffFwqAf2Uyw8ySCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704725174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=en3BppLEqu3C+yGmvBL/PuCUigMlzpz2Q4rBYDHRDyg=; b=uR1eZOgBw0Wo2pAToVnj+mt4Jkd80ZDsdjGMO5a0aR3rnCetlUZOCEWk0+VgQzSXwh5wlj 1Ntiz7XWQDqvzJgRx9/DWjlG9sA7DGDXdfFQFinYXG71zA6K+8BxFLvTqD30pHMHh/FuS9 XV9ob+8TPttDNo74JaUZZWBb2/zDUV1ToppIosXzUE95e4wx3RFXkRLI1ZCpXnoL+fIqLA GCO8K9JHxXiPyZUv88E2Mifn0OX3cSfErbQTEzSOHMkrHPofrPzVhe9jECyM69gIWxxW7J M8LO5pR/w2VJiz38NyIOR/s0vyX/zsfUQAl785ErkRLOPCEVyBG3W5lb4LZ+cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704725174; a=rsa-sha256; cv=none; b=E4B93f5dapAVUlaGr6K96z13eVKdlifavIWqf+d5cSEvnot79zbG7lfPithgF1OoBL2D+w wmrTAwdITJ8Kv8Ljzt1HrecaGxpsq9SJICsDoalBbGxlOM/HaPWK8lxO5ow2cGQD9vfJTQ 1TicL99mFQPf7KojgsluoT/LLtmZH2/uX6Eqj9cFKD5I1iunMfQKthSgNQ4EJI3jD/Uj6y kbdGDAw+CJRnjdispDNF+ReUFGrEA8LknaBXRLxfnUMNQBpC0th74iD5R5faIXdyPPd8UK UOGxyMEi/cvY+7P4U9BABM1f/ZpkzQb/UUxn7zzMH0HjHkg2qpjopAN6huwQCw== 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 4T7xhQ56v6z1B47; Mon, 8 Jan 2024 14:46: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 408EkEes034440; Mon, 8 Jan 2024 14:46:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408EkEiJ034437; Mon, 8 Jan 2024 14:46:14 GMT (envelope-from git) Date: Mon, 8 Jan 2024 14:46:14 GMT Message-Id: <202401081446.408EkEiJ034437@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 4e1deb61eab2 - stable/14 - endian.h: Remove duplicate words List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 4e1deb61eab2037ab53cebf7d5dd688626d6f094 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4e1deb61eab2037ab53cebf7d5dd688626d6f094 commit 4e1deb61eab2037ab53cebf7d5dd688626d6f094 Author: Jose Luis Duran AuthorDate: 2023-12-10 16:35:56 +0000 Commit: Ed Maste CommitDate: 2024-01-07 19:39:25 +0000 endian.h: Remove duplicate words Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/920 (cherry picked from commit dff3a80f6dfe88c52326ceb2c154668f132fdb52) --- include/endian.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/endian.h b/include/endian.h index c7b78217cedd..eb25cedf0bef 100644 --- a/include/endian.h +++ b/include/endian.h @@ -35,9 +35,9 @@ /* * We don't define BIG_ENDI, LITTLE_ENDI, HIGH_HALF and LOW_HALF macros that - * glibc's endian.h defines since those appear to be internal to internal to - * glibc. We also don't try to emulate the various helper macros that glibc - * uses to limit namespace visibility. + * glibc's endian.h defines since those appear to be internal to glibc. + * We also don't try to emulate the various helper macros that glibc uses to + * limit namespace visibility. */ #endif /* _ENDIAN_H_ */ From nobody Mon Jan 8 14:46:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7xhS2xp6z55wlQ; Mon, 8 Jan 2024 14:46: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 4T7xhR72Q6z4DDN; Mon, 8 Jan 2024 14:46:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704725176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dHh1BIUJ+Ccq3gcmavL/SBgR98U1VeOa871HeDAP774=; b=dXv8rpnhYehk+aNMBrBl4hHfVsmc6TjmDGOW68BL8UcyKsZLSdw7DGzCjN6TNZkW3Ih7xh gt7LobaO86sRnmqRnneN9+zidThsaq0s51/olctfCp8Pcv4q7CaW84hClH114gp6vF45+/ F8LNfq1PAlgUwnYNatL0kkvHEuMqTXVbORlsQ4WbCCWxBEbzA6OZjfvBF0GN/XhHL687yi O4tTJ9WIViQpjD2xNLWOlhGpqBtBjrW17i6GFWARYLF1zmk8UUpyHZ8LeeUs/qgmyzwNAJ +5Ljcfr/yb0J3leCQMq1iCYUSSJd4NTRdoAbEC6LwHZXtq15dQkThes9IcgrAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704725176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dHh1BIUJ+Ccq3gcmavL/SBgR98U1VeOa871HeDAP774=; b=Q1cQpEbq/E/guvq78R1l8LPAZg3EzyaPgdApPsafmRhmNeAWdSAgfBsZbsHhII7xPh4g+Z PYGuF4VDt8bntRc0rFPGMEdDLXo6laX0KHVbEuoh7dYlK7msD+NqycaE5CA62bm12nR/PG BYzsjLLBid6H6KNbVbyNhwHw2W3wyWZaL2EVvTKRAzxP1iOcoVXn6ICSXZq5cFlqk4ZykE E9PuGeCgJm/cV3KRcGS1pmfDJZebALqHgCzz2PY1thwYKX0Z/ubqQomfxPHkUXYxgiHJ/6 DEFpLVbrVOEpncFaigXDlomQ+ywJc8WQ4TipqlJw/NXKJEYHfUFd52rWHUqGVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704725176; a=rsa-sha256; cv=none; b=nslx7pyr8XJmpAPmwm99k0k4SwZRHdi7jqeafeGAerVRb/WMGE1inOGaSMvf/NKMjShYJH 113gaJrUAC9eA5O5UUYRw0JtY0VB4YOmPNphIWxAvgGsC40ncwgLZUTNdFfIII98N8rqJV Qp70bqZY4LFJl7xN12nDy0BMr6uW0fLtufGAhqPLx6wKqbzNLYVlrBu4jaENxpUa23P0rl ds7GQs6aHK5k/VWirgbcYZ595T8Y4xKjY4JhJLbaxlZAwBZN0hlD9u5J+eStg6ct6LbXLS 5WBnGHFCGK/WIUIkAhSdwcHq/fyMIUrc7w0h80Wa8MGhEip+TN8WGpuKQUG/Nw== 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 4T7xhR67N1z19lB; Mon, 8 Jan 2024 14:46: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 408EkFkb034482; Mon, 8 Jan 2024 14:46:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408EkF8Q034479; Mon, 8 Jan 2024 14:46:15 GMT (envelope-from git) Date: Mon, 8 Jan 2024 14:46:15 GMT Message-Id: <202401081446.408EkF8Q034479@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: f8f15d7436a5 - stable/14 - crashinfo: remove unused /usr/bin/gdb support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f8f15d7436a5b771d7e5426a41750beb947e5c46 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f8f15d7436a5b771d7e5426a41750beb947e5c46 commit f8f15d7436a5b771d7e5426a41750beb947e5c46 Author: Ed Maste AuthorDate: 2022-03-08 14:32:24 +0000 Commit: Ed Maste CommitDate: 2024-01-07 19:39:57 +0000 crashinfo: remove unused /usr/bin/gdb support We have not had gdb 6.1 in the base system for some time; there is no need to check for it. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34478 (cherry picked from commit 13a974574670cc85a7db60bae6620631ad756f2a) --- usr.sbin/crashinfo/crashinfo.sh | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/usr.sbin/crashinfo/crashinfo.sh b/usr.sbin/crashinfo/crashinfo.sh index 92c843a86144..9a3d26020654 100755 --- a/usr.sbin/crashinfo/crashinfo.sh +++ b/usr.sbin/crashinfo/crashinfo.sh @@ -44,19 +44,6 @@ cleanup() [ -e $VMCORE ] && rm -f $VMCORE } -# Find a gdb binary to use and save the value in GDB. -find_gdb() -{ - local binary - - for binary in /usr/local/bin/gdb /usr/libexec/gdb; do - if [ -x ${binary} ]; then - GDB=${binary} - return - fi - done -} - # Run a single gdb command against a kernel file in batch mode. # The kernel file is specified as the first argument and the command # is given in the remaining arguments. @@ -66,11 +53,7 @@ gdb_command() k=$1 ; shift - if [ ${GDB} = /usr/local/bin/gdb ]; then - ${GDB} -batch -ex "$@" $k - else - echo -e "$@" | ${GDB} -x /dev/stdin -batch $k - fi + ${GDB} -batch -ex "$@" $k } find_kernel() @@ -173,8 +156,8 @@ if $BATCH; then exec > $FILE 2>&1 fi -find_gdb -if [ -z "$GDB" ]; then +GDB=/usr/local/bin/gdb +if [ ! -x "$GDB" ]; then echo "Unable to find a kernel debugger." echo "Please install the devel/gdb port or gdb package." exit 1 From nobody Mon Jan 8 14:46:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7xhT43NHz55wgf; Mon, 8 Jan 2024 14:46:17 +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 4T7xhT0zW6z4Cy0; Mon, 8 Jan 2024 14:46:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704725177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=23f8qd1SXI4Hzw7bgHBTh+Y3OrsQdbovT4MeBlOCcoo=; b=piuRoPe8EZOe3xj7YuhGjqiWpip8nZop1LBuTDHT4e47VXysmxVgSh9MnECe6RxJ4Gtqq3 WfjbCcQjysJjR3iPRTYR6dytYINQX5TCJ3GMOrS134v9AlHeP3RyyXhF3HeJGurJaBAC0m 0Xdt1Pfazo1GiLHyAnv9F8EB+rYA+yaGojJBnVFSrWNIGMKhf4+1Wl5jyXh6a+kLFVchTk Cs5qpFuPmnhoHGNVpwzsbtrju62VMdIg8PMU1nbKH23IByA3optbRifSDL5Z34ne9FjVTj rZSMdyokqhSULVwqJue3r8bLmxW7mmoZR/pPQo+nvuu0sZolC0JsSt5mb1nMkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704725177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=23f8qd1SXI4Hzw7bgHBTh+Y3OrsQdbovT4MeBlOCcoo=; b=ScKMYhxSQhc+J67X0qwu+deqwm4968JZ3nIH8WWgZ6uLcA1qpYtP7VC2ZwNyr9y/GUft58 w85Lg8KdmMcr0IeTDd9mTRYyBZD2YUR7yoTEPT4wdGt7OzucyHSt8PM1O5kOw3x5WowQ6V 9qA4qcXicGbZDC9YIRShxECzip1PhExCe8BPrEO1kUEd9wFM77aDTNF5+L7IEnGhjGXONB x0hxSVKK6i6XTsTtAQKFFSuTEJv108YkOH7Oii7PaTPMJ8k/f8m3Kr8A7KhRXZu8vsH8Ht ViBUrFXBmRzE4CoVpSSlz4mPI2wvR1x6C9zBcUrzEafs+gFvF9v5V9tpv4AKug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704725177; a=rsa-sha256; cv=none; b=weDQ2JUXxHsI/K2BTzc6+BrqHhS2hxL9jGc4TU881RGGW90kWCcI+Wm6entJvwFDc1svca 2+eenf7WotNfDlTPDXqdssrfjDiZ62EYaGlo9k2EjKStvZrPZp+g5hyotw7cqtuMzkQ2F+ lhsxz2ekpZDI/w+2BsHrZZHX3neHeJfQmdyslS3RrfdTIjuUG4VSKZuk06LW5l2d/qLel6 FJt/mSHdAuFxxIOPv4vxicUOInSERJSj9vQvdLHCIpDYZyUZlBu/Jv7P4T3CsEuiln+nh0 tarhBJTHX/uwiH123wpsqN8cN58DWwE8BKXPmtAxxZsPpJFfVhto2tfrdGCWnQ== 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 4T7xhT031Qz19Fv; Mon, 8 Jan 2024 14:46:17 +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 408EkGvJ034530; Mon, 8 Jan 2024 14:46:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408EkGtx034527; Mon, 8 Jan 2024 14:46:16 GMT (envelope-from git) Date: Mon, 8 Jan 2024 14:46:16 GMT Message-Id: <202401081446.408EkGtx034527@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 2b79df0ad999 - stable/14 - freebsd-update: for rollback, first create directories List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2b79df0ad999df4bc22ed0e1eff446efa4055359 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2b79df0ad999df4bc22ed0e1eff446efa4055359 commit 2b79df0ad999df4bc22ed0e1eff446efa4055359 Author: Ed Maste AuthorDate: 2023-09-29 15:28:35 +0000 Commit: Ed Maste CommitDate: 2024-01-07 19:40:06 +0000 freebsd-update: for rollback, first create directories rollback_files() tried to install files before creating the directories for those files. In some cases this is due to special handling to install certain classes of files earlier than others. Just create all directories up front when performing rollback. PR: 273950 Reviewed by: dim Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42020 (cherry picked from commit 6b27e1f2eaab9360a796c943da9d206515e1742b) --- usr.sbin/freebsd-update/freebsd-update.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 7408ef1c6721..551d40418240 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -3196,6 +3196,11 @@ rollback_setup_rollback () { # Install old files, delete new files, and update linker.hints rollback_files () { + # Create directories first. They may be needed by files we will + # install in subsequent steps (PR273950). + awk -F \| '{if ($2 == "d") print }' $1/INDEX-OLD > INDEX-OLD + install_from_index INDEX-OLD || return 1 + # Install old shared library files which don't have the same path as # a new shared library file. grep -vE '^/boot/' $1/INDEX-NEW | From nobody Mon Jan 8 15:38:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7ys92Pydz566Mj; Mon, 8 Jan 2024 15:38: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 4T7ys91k7dz4PZv; Mon, 8 Jan 2024 15:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704728333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9W2vtwab5mgH2xJVrFVQJo2pWk8k6nEeF1H6VM8DP5A=; b=LAoUpaqDrMz5BLxvVucAtvtSrwWkDermK2tHE3hdHSwgE6JYYRaPc15OsYGRQEG8z2rHec kSizwi6BS0W/gNgfmlYTHNlPiIrfykNufa7Gc6lu/Unz8//nqgPytRg/6IHVvrZGTNrteU dcXQiXxIGRtMoAzx+Ni5SQOcPQoqvIISHXFPpPXz/P7DeYwHoC/bemVvpzQohom4y2pzct JqDkFIPyX5wwHrZXv+2pHqLdjP6ln6Dl7TUjq6YC8VIqrUbUMYY0/lucQj4oMhvWuA75Jg wej3mGRvjOBM0xv9otoh3OE23akS+jqXjDSz1tews6n1l1E/2fH/sGAs6nmk9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704728333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9W2vtwab5mgH2xJVrFVQJo2pWk8k6nEeF1H6VM8DP5A=; b=aOWTcZ7yb3r2Dhkjwzz5C5BymtErZIsYhhGjMi54kW8S9ImOg4SI5nnsvRsHIj2/yzCa2k Z6sAVTAet9HmesOYdFf9J1ecUFR7hXIkIg5SLlTC82eMp60rthQfWM5nOURZaZ0KZA20u9 FyeVbiPU/szY0VbKqU00Bg/DG3/UnIjgLIqd9JL4+ANt6M0NsBo+ywfRttKj2Nea0Sd60H mz8pJ2erI9JTDOu79/cVCk/yPQ96UNepxI/R5TLDmQMRYIAAMMwZoq/GbvhA9W906bIxqt 5evN4Tpv1PVIxm3szJIWyAqtIVqPJwX1eYLpO1aJJX1omrFLsiGhgx01dXIUpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704728333; a=rsa-sha256; cv=none; b=JgKywohnJtbXb05/YR+8hUogYOhHTy52XEXXTYYSo3w1afmKochKJfoBEYLDvee6EoxJ8n lXXuddgBPHaW8ByHbdMhfWWcRRAspy+6+PgIw7HBF3QCEU6N6TFckQRiR6aRr2DbFgR26n wVqDNzpTCDCnQmRlVOp/N+3IR0HSRufXw0xsFuvvFZjbu/9zQ7fLS/CQtxTIkJaYOJmxRp a6LFebO+E1HhEaquQOt+QbnawVIhjNznX29TBvN/UAQ+Xns9V45YfSIGpPNDs4C06Yh8HS V8INi8ZN04v2qWHCKwqlTm9nLof0Mlf3mZJ32+ByjmlW8bWvGEWgC1hGqTANrw== 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 4T7ys90gW7z1Bvq; Mon, 8 Jan 2024 15:38: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 408Fcr7t018502; Mon, 8 Jan 2024 15:38:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408Fcric018499; Mon, 8 Jan 2024 15:38:53 GMT (envelope-from git) Date: Mon, 8 Jan 2024 15:38:53 GMT Message-Id: <202401081538.408Fcric018499@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: 118d0ff54d4f - main - rtw89: improve debugging and fix a sleep issue List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 118d0ff54d4f7cffe6a13a1e0cdb2fe23fbfce74 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=118d0ff54d4f7cffe6a13a1e0cdb2fe23fbfce74 commit 118d0ff54d4f7cffe6a13a1e0cdb2fe23fbfce74 Author: Bjoern A. Zeeb AuthorDate: 2023-09-06 16:47:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-01-08 15:38:22 +0000 rtw89: improve debugging and fix a sleep issue Improve log messages to be more helpful in error cases. Change one LinuxKPI sleep function as we cannot call the original one from a context we cannot sleep. Both cases were hit during testing. MFC after: 3 days --- sys/contrib/dev/rtw89/fw.c | 9 +++++++++ sys/contrib/dev/rtw89/phy.c | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/sys/contrib/dev/rtw89/fw.c b/sys/contrib/dev/rtw89/fw.c index 17e4ce7cd64a..c1dade182d88 100644 --- a/sys/contrib/dev/rtw89/fw.c +++ b/sys/contrib/dev/rtw89/fw.c @@ -903,7 +903,12 @@ static void rtw89_fw_prog_cnt_dump(struct rtw89_dev *rtwdev) for (index = 0; index < 15; index++) { val32 = rtw89_read32(rtwdev, R_AX_DBG_PORT_SEL); rtw89_err(rtwdev, "[ERR]fw PC = 0x%x\n", val32); +#if defined(__linux__) fsleep(10); +#elif defined(__FreeBSD__) + /* Seems we are called from a context we cannot sleep. */ + udelay(10); +#endif } } @@ -3890,7 +3895,11 @@ static int rtw89_hw_scan_prehandle(struct rtw89_dev *rtwdev, ret = rtw89_hw_scan_update_probe_req(rtwdev, rtwvif); if (ret) { +#if defined(__linux__) rtw89_err(rtwdev, "Update probe request failed\n"); +#elif defined(__FreeBSD__) + rtw89_err(rtwdev, "Update probe request failed: ret %d\n", ret); +#endif goto out; } ret = rtw89_hw_scan_add_chan_list(rtwdev, rtwvif, connected); diff --git a/sys/contrib/dev/rtw89/phy.c b/sys/contrib/dev/rtw89/phy.c index e2b8303d3f63..138788b2ed05 100644 --- a/sys/contrib/dev/rtw89/phy.c +++ b/sys/contrib/dev/rtw89/phy.c @@ -1439,7 +1439,11 @@ static void rtw89_phy_init_rf_nctl(struct rtw89_dev *rtwdev) ret = read_poll_timeout(rtw89_phy_nctl_poll, val, val == 0x4, 10, 1000, false, rtwdev); if (ret) +#if defined(__linux__) rtw89_err(rtwdev, "failed to poll nctl block\n"); +#elif defined(__FreeBSD__) + rtw89_err(rtwdev, "failed to poll nctl block: ret %d val %#06x\n", ret, val); +#endif nctl_table = elm_info->rf_nctl ? elm_info->rf_nctl : chip->nctl_table; rtw89_phy_init_reg(rtwdev, nctl_table, rtw89_phy_config_bb_reg, NULL); From nobody Mon Jan 8 15:38:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7ysB5hyyz566Hs; Mon, 8 Jan 2024 15:38: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 4T7ysB2V0Lz4PPh; Mon, 8 Jan 2024 15:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704728334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oPC2y8t9B3QCh9K2T5BzXyvT2On9xHG2Qfp3mLi5v6Y=; b=DgYs6ir/T4o858IKDlqtPWzg8CS9epiaHXBj78kGxX5ngdtq1olf8sotdUdbLH2y78IDMH zyzv0QBs7BMfoySs4trOqXp6dIQSqi6uFkU0f9+4fSqlseKHdJ/lRBCj4nw1xj27slOy41 PIPm2Bs+hxIJnWZRvIS3GO3eJB6hVMt3cbubr5/YF2doZvbpbBf8xQoyBRIlVSbvRYn3Zi OyvT7QO4LCCD+oSw1rKaia1C1my4x2dJ0FyC9Xh82mylT6q/47hy6PUewFaZY5XjOWncvd 6fmnU/Xt8eKY1zoMWzQoSB/niDQOSktcDT1d+69gb2Irys8+/k5B6InNln/KzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704728334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oPC2y8t9B3QCh9K2T5BzXyvT2On9xHG2Qfp3mLi5v6Y=; b=ZlDs5cbPGBNcwBlh6t6ak8ZN4XY6PbYhazc1BstsLcXyivVe3I0wNqT7qamLISKLTDBwf9 LMBdizyvZy0/TDFRcf8LJ1gvMci4uyUIRdl98gjdC+1yHUePEegzrLjoUIx73tSFepXc1X sg4xaOTDHFi/V25c3fLb/bOZwmd9TO2PzmOFA86xeY772+w872k14CyWDEiFuQgYbXtInf Kdqs/P7fTRxWmV1mrHQKxSWOF+gCwTZBIEQC1Z9FTSrqh7E7TOzMaXNSAO5MVUyOmMJ9+9 gxc2j5f8QRHJVhpmYiZkfH9vDqa3pr9TTqIwwCF/Tt//4hL9kFlpvook9+jfPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704728334; a=rsa-sha256; cv=none; b=M7TJCybX8ygvyhzKNBtC06Z3zGk0DJBCL8tH4MhWm3iWB3/fTtjVcnWvbWAs/VxOVc/lsy EI83alcXJCWU+0bNp/3kHHnnifBm/7w3XPm3EG0lRYEQlLRdkiRxWV4ldP3JhaGJ++2V0X nKogGqFK7Dv5Nn0O0zQ59K2Q8cAaJd96Y1Gd65thMSO3JXhz5KbhzupNiVwxvlNxmNt9Ee lY03+4JTENx3BLi3b0M7iB0rnPYR5ANsMu3YXQyvfOk1nkZ/1RsjTA/mnPTbQB5hGKkCLF KWST8c1+9HdTpUFxZXVda3E3AILUpZfQ0ILv1pG0UJ6zGq7KRknXjKVC6b74XQ== 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 4T7ysB1bKHz1Bvr; Mon, 8 Jan 2024 15:38: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 408Fcslq018553; Mon, 8 Jan 2024 15:38:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408FcsnK018550; Mon, 8 Jan 2024 15:38:54 GMT (envelope-from git) Date: Mon, 8 Jan 2024 15:38:54 GMT Message-Id: <202401081538.408FcsnK018550@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: c8e7f78a3d28 - main - ath10k/rtw89: make compile again after LinuxKPI changes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: c8e7f78a3d28ff6e6223ed136ada8e1e2f34965e Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c8e7f78a3d28ff6e6223ed136ada8e1e2f34965e commit c8e7f78a3d28ff6e6223ed136ada8e1e2f34965e Author: Bjoern A. Zeeb AuthorDate: 2024-01-08 15:29:09 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-01-08 15:38:22 +0000 ath10k/rtw89: make compile again after LinuxKPI changes Both drivers are not yet attached to the build so this change is for people currently trying them out. In 96ab16ebab6319dce9b3041961b0ab6e20a4fecc the sys/rman.h include was removed. In various wireless drivers we prefer to directly use bus_dma functions rather than io* LinuxKPI once. In order to cast the pointer we need sys/rman.h back for our native 'struct resource' in their pci.c implementations. Long-term we should consider providing some lkpi_-FreeBSD-specific wrapper functions to avoid this problem. MFC after: 3 days --- sys/contrib/dev/athk/ath10k/pci.c | 1 + sys/contrib/dev/rtw89/pci.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sys/contrib/dev/athk/ath10k/pci.c b/sys/contrib/dev/athk/ath10k/pci.c index 2b0b594b5466..23ff786fe45c 100644 --- a/sys/contrib/dev/athk/ath10k/pci.c +++ b/sys/contrib/dev/athk/ath10k/pci.c @@ -15,6 +15,7 @@ #include #if defined(__FreeBSD__) #include +#include #endif #include "core.h" diff --git a/sys/contrib/dev/rtw89/pci.c b/sys/contrib/dev/rtw89/pci.c index 9220f5b40d29..5639a52c2ddc 100644 --- a/sys/contrib/dev/rtw89/pci.c +++ b/sys/contrib/dev/rtw89/pci.c @@ -7,6 +7,9 @@ #endif #include +#if defined(__FreeBSD__) +#include +#endif #include "mac.h" #include "pci.h" From nobody Mon Jan 8 16:07:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7zVF11dyz56Bl8; Mon, 8 Jan 2024 16:07: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 4T7zVF02kTz4VfM; Mon, 8 Jan 2024 16:07:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704730053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JPjgjuWamQPMHaRN1isbQrAVD4uAfqmoh9nBhfWh5a8=; b=c8miXanKsUPUHTIpk4hHx7JxhIGe2wuyNq6+TBPiAgb86vVJnqTeR8Psb3EOhV1TkGyLGP cV7l/+T6MRXmgo4pSnoQ8DSv3O4eej73/v9XsbzD8PiA/0QCDQsewLCG9wbYZwxIvaeb4A IqiPBFFkdxN5+LFM+Mc9F+CzqaxefuQHTelvxSLzHROvn3Xzaj5mne4ErkS16oc9jBj96e Mq17RXW9kd04OMvAkuF7i3RoN2xLTxf9YerrHt2DazBspR+h2Gbyb1lLcgd9C4uJIAwkjU 8ZIeQFWZgPpJ4KvWfJkf4UI6YbBkoozbs+SmYUAAkZzBxrTQU87FFmHY7iyErA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704730053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JPjgjuWamQPMHaRN1isbQrAVD4uAfqmoh9nBhfWh5a8=; b=oRr+RVZ2my0sJS8TTpvbiRXyCEfX/Qut9gm/HAFn15J+oezzvUL4WGS5ql7gRsAttJpw4z i41PViNDUGEQRjEZp0CS0UmaPnK0cLj8QK/zJ+nFUoWsiBx1bzGH+5oByNKMT50loP7tSH XEN9ZizTwON6uRboOrnMjVUCJtz4c835rkfWz0yDUEPHurpYI80C5frmikTGlEIuiuT6I9 DCVDzfFQ4+sDKYHfazZNh/lw/VEp3rEsuF2ILq0hYN5qKuzVn+qdgWq7q4mKYzwDuGen8p CZ3hbaE4DKxx2hEqITqNl5OHi1VICKyLfXM/wW5IElX/p9rpLlfKzn58EBhYFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704730053; a=rsa-sha256; cv=none; b=S67/QUhlGQSzvk0j5pj4zPT40PQ+h7xBzLfe3a1ZpKfQ5mxYZjmQk8An0IphylS8mRO0Wb uW5E10n0UruEeftOxBVZZfZVqWQoRtLtd9X4p5q5chMfgZ0LbWjguTBsuMKgJONa+vWXTP ow0DByHbaAwjNkdCOUMmE+4eZAv1KoTiteaKpyfBevPmuGZI17mMdN0ouV3cjz5woBjXng rTKYz9QNRfVtkLXbGm4tIPAOqUvIeiKfFPq25hUsSOSb9u5jKwRCUfo5nQgqqNzhiGcK89 IImNbm8Vk1fgdmnv+K2VUvYojnV/MCWbThy6MdU5VdGOdNEg7lnCzuCNeFM1jw== 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 4T7zVD6Dlmz1Cn1; Mon, 8 Jan 2024 16:07: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 408G7WGm068655; Mon, 8 Jan 2024 16:07:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408G7W27068652; Mon, 8 Jan 2024 16:07:32 GMT (envelope-from git) Date: Mon, 8 Jan 2024 16:07:32 GMT Message-Id: <202401081607.408G7W27068652@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider Subject: git: 1e82d882ed33 - main - fix using man(1) with multiple pages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e82d882ed3372bcaf82451bfb865483a409ab1f Auto-Submitted: auto-generated The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=1e82d882ed3372bcaf82451bfb865483a409ab1f commit 1e82d882ed3372bcaf82451bfb865483a409ab1f Author: Wolfram Schneider AuthorDate: 2024-01-08 15:53:11 +0000 Commit: Wolfram Schneider CommitDate: 2024-01-08 16:05:50 +0000 fix using man(1) with multiple pages PR: 275978 Reported by: Mohamed Akram Fixes: 789480702e490818244af11279868ba4f3dabe6b MFC after: 1 week --- usr.bin/man/man.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index 66af46a36243..7e2151295ba7 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -1040,7 +1040,7 @@ do_man() { do_full_search "${REGEXP}" fi - for page in "$pages"; do + for page in "$@"; do decho "Searching for \"$page\"" man_find_and_display "$page" done From nobody Mon Jan 8 16:35:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T806s3HtCz56H6y; Mon, 8 Jan 2024 16:35: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 4T806s2gRYz4bFb; Mon, 8 Jan 2024 16:35:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704731749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=imWz5nne7wjiMXEOfvvvELglCPoPd0DPVFMVmagezAo=; b=Oi81NeF/t4hjRpgrXpFJ+maI6rXzTs0HQiVHyE5e7nUu8oYAAxpEjqCD0PEd/GwtMUGBWS lz3Bbt201ABsTSrS/NePr784V5yhZPPcEUYItgMnELo5OU8hfG23l/SUonR9vf1If2DFEc q3oDcQLOeWvwgU1B73yXh+CgDOw0a0vFUOyyP/6b7QtcnMTyIJlqSlmpD49CVfSWSBWrIs s/0amJGp2v59aYpFLzu7dr7gRKpQ8Ax4znmq+GAQEDkjqzICvBVr0SU7fJIuLPPnt3tn+R YYX6/1eVGewI89ya5U/sX3TzIaR5B49Pq6b7OwttFotdtlOKL+tkkgLcAs/icw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704731749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=imWz5nne7wjiMXEOfvvvELglCPoPd0DPVFMVmagezAo=; b=N8Dq8I1aRxnP/jgEWK/xKO+aTmhCGh+nmyTEeurpQBhl9y19O51tpe9CvsR9mxYucWGb69 rxSYgc/kpj5tCzieJxMpBzaM2Wq1zo7eEsY7bQvwCSxpYys1nkxoaHDIBLP/p1lC+No9oC mfQ88lOCzbKogl9bCFncD0hCewnCeCnilq/P2/7IEbqVeC27KER5fuZ2jq3QQj3gXa6B2c 3EdoKqAbVWbFnRmbjMc579+YkU6L8a+23Vgpqe2Umwkw9nGPJAScHnoWLNng5hiWKMkkDF FGDpmMTopeFYo3ZnvjErw59Vs6fM6J0tppHIJMRRi7wxS2V5x7lR1/f9QnYhGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704731749; a=rsa-sha256; cv=none; b=yovj6lH85UitGYKpIX1ylP10Z/NqYjZzjqaYZxN6DhVquHHYW9+MSQsNpdIQQ3vboYfeU0 eBBGw8ZJGNcSwE1b4YinFsl3vgfJT9jyNwe0hpD5TU87Yebwotd+VBd/AdWhAQStkUg42X 9XaNlOodWwmCg2mOpNh7zzbs4qthBvkSF40h48rtAWWby1zJhRGmeHeqBPGTJbG8KkZ8L4 /A7qP6XndoevWRPTTxSKdpi/UfA0qYwnhg1ciJv/Wm6QZzPcrJIhwdiesLYbNII9tfYb7C TmOGxETeugPfJB7yyXnCvivIYLBaawcd0bKOtECfAK6MIDEa4XPD70/+BfXxYA== 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 4T806s1l3qzF68; Mon, 8 Jan 2024 16:35: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 408GZn9P018677; Mon, 8 Jan 2024 16:35:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408GZnaV018674; Mon, 8 Jan 2024 16:35:49 GMT (envelope-from git) Date: Mon, 8 Jan 2024 16:35:49 GMT Message-Id: <202401081635.408GZnaV018674@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: ba719a0fec8f - main - Fix "version introduced" in numerous manual pages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ba719a0fec8f831aef4b23de0ff36fd47bb26651 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ba719a0fec8f831aef4b23de0ff36fd47bb26651 commit ba719a0fec8f831aef4b23de0ff36fd47bb26651 Author: Tom Hukins AuthorDate: 2023-09-25 15:22:51 +0000 Commit: Ed Maste CommitDate: 2024-01-08 16:35:16 +0000 Fix "version introduced" in numerous manual pages MFC after: 1 week Pull request: https://github.com/freebsd/freebsd-src/pull/853 --- bin/ls/ls.1 | 2 +- lib/libc/gen/posix_spawn_file_actions_addopen.3 | 2 +- lib/libc/sys/fork.2 | 2 +- sbin/mount/mntopts.3 | 2 +- share/man/man4/igc.4 | 2 +- share/man/man4/mac_priority.4 | 2 +- share/man/man4/tslog.4 | 2 +- share/man/man7/growfs.7 | 2 +- share/man/man9/kasan.9 | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/ls/ls.1 b/bin/ls/ls.1 index fdfcb50beb06..4f680d97ea0b 100644 --- a/bin/ls/ls.1 +++ b/bin/ls/ls.1 @@ -925,7 +925,7 @@ command appeared in The .Fl v option was added in -.Fx 14.0 . +.Fx 13.2 . .Sh BUGS To maintain backward compatibility, the relationships between the many options are quite complex. diff --git a/lib/libc/gen/posix_spawn_file_actions_addopen.3 b/lib/libc/gen/posix_spawn_file_actions_addopen.3 index ef6348daa4ba..80bc91454471 100644 --- a/lib/libc/gen/posix_spawn_file_actions_addopen.3 +++ b/lib/libc/gen/posix_spawn_file_actions_addopen.3 @@ -270,6 +270,6 @@ The and .Fn posix_spawn_file_actions_addclosefrom_np functions first appeared in -.Fx 14.0 . +.Fx 13.1 . .Sh AUTHORS .An \&Ed Schouten Aq Mt ed@FreeBSD.org diff --git a/lib/libc/sys/fork.2 b/lib/libc/sys/fork.2 index e4cd3deea512..32dbc7a39711 100644 --- a/lib/libc/sys/fork.2 +++ b/lib/libc/sys/fork.2 @@ -265,4 +265,4 @@ implementation must be async-signal safe. The .Fn _Fork function appeared in -.Fx 14.0 . +.Fx 13.1 . diff --git a/sbin/mount/mntopts.3 b/sbin/mount/mntopts.3 index fe2073c3dc71..2480be2bdc9e 100644 --- a/sbin/mount/mntopts.3 +++ b/sbin/mount/mntopts.3 @@ -376,4 +376,4 @@ The and .Fn chkdoreload functions were added in -.Fx 14.0 . +.Fx 13.2 . diff --git a/share/man/man4/igc.4 b/share/man/man4/igc.4 index 97b40b6ffb92..f77581edd00b 100644 --- a/share/man/man4/igc.4 +++ b/share/man/man4/igc.4 @@ -151,7 +151,7 @@ address. The .Nm device driver first appeared in -.Fx 14.0 . +.Fx 13.1 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/mac_priority.4 b/share/man/man4/mac_priority.4 index 868d027d5233..c63197d5fc29 100644 --- a/share/man/man4/mac_priority.4 +++ b/share/man/man4/mac_priority.4 @@ -125,4 +125,4 @@ MAC first appeared in and .Nm first appeared in -.Fx 14.0 . +.Fx 13.1 . diff --git a/share/man/man4/tslog.4 b/share/man/man4/tslog.4 index 40397d14c3e2..e7f69a8d6f3f 100644 --- a/share/man/man4/tslog.4 +++ b/share/man/man4/tslog.4 @@ -101,7 +101,7 @@ first appeared in .Fx 12.0 . Support for tracing boot loaders and userland process was added in -.Fx 14.0 . +.Fx 13.2 . .Ss TSLOG vs. Boottrace .Nm is oriented towards system developers while diff --git a/share/man/man7/growfs.7 b/share/man/man7/growfs.7 index 241c12cd28f1..43648d8d9f2b 100644 --- a/share/man/man7/growfs.7 +++ b/share/man/man7/growfs.7 @@ -132,7 +132,7 @@ The manual page first appeared in .Fx 10.1 . The ability to add a swap partition was added in -.Fx 14.0 . +.Fx 13.2 . .Sh AUTHORS The man page and script were written by .An John-Mark Gurney Aq Mt jmg@FreeBSD.org . diff --git a/share/man/man9/kasan.9 b/share/man/man9/kasan.9 index 209fbb06506c..77d7e8f46aa8 100644 --- a/share/man/man9/kasan.9 +++ b/share/man/man9/kasan.9 @@ -163,7 +163,7 @@ should be 0. was ported from .Nx and first appeared in -.Fx 14.0 . +.Fx 13.1 . .Sh BUGS Accesses to kernel memory outside of the kernel map are ignored by the .Nm From nobody Mon Jan 8 17:50:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T81mW1Q1Dz56FRQ; Mon, 8 Jan 2024 17:50: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 4T81mW0lF1z3xS0; Mon, 8 Jan 2024 17:50:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704736203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aLqCQSnx8NwqYbh5C2BhoxXd1lVpFefAqty3JE0WJso=; b=wmk78iph9WPNqT6gnxyaVkZL7TvKTRuZX+wPwW4+8d8ckhu4hOZO9Au/5yl3py0Ypc1Ap7 /CRvREKgFF9/YrP04Cnn92ZiR3jO8YB/Bp/0oMdR65NlTdEXq+gI8JFsReINzjXc5mELO+ eccKI8ni1zgBkbOWi2goIOfXOFs523MkI0lyDgTUpi3Ld99m9NHnUquKeuIx6jsqRx3+Py 41mQd1lQy9NvioM25YoYFgt0wxOT7L7F7PBSh8xZJ81+v5uNAXZC5vxWDcC25cZwZnONu1 yNKXzQ3h3ekCxYvTw3FjIzDfG8f0gksEKSKG17vVYy46p0Gr229NN8Q0FnBMrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704736203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aLqCQSnx8NwqYbh5C2BhoxXd1lVpFefAqty3JE0WJso=; b=VuW9WPMD7DEb7JQ7IqpYLI6PstZszKmkx4HzZVydFumdkyLC2qYeHEUdGWxXBL5EEp2D4f jfDGzgyjlpo/NAiCSrzG3FiTzedoo7YUSABtnZfz3zUvsGP7dqUmm6awn3+pCZu+KnqNqa bU1oWi1UkE5a+5V5wwkPoYJ+Gyv9/PhFMZK6alYj/ttKcBQ1rDHBL4hHt6QCcmU3kVV9bT VBQGtLgv8b7gk0DHXpp413DeWj+dtBbBdiN9IF7CPPA0BmvN3+Ype9hJWzzBR8dH7EPdZZ 5Or4Vu2WsNvxWRZwmw3mKNPlFzaeGdkklIf++BCw8QW93O7nR+4J/A03oKKMlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704736203; a=rsa-sha256; cv=none; b=PY62FV6HdHlhFC3QVQys0VH6ZKkOP6FsvFXLPNIw5QkJzKanlJ3EOSAQvA4lnvNq/m7jXx sWM4CQj8stfdD/bmPsyWmKzgbQTCtap2c3YjUBVMbPyloCCp4LOEvqMRbMotIZJsFkh+iT Gbv43SwrDDSIZtNoMba/OP5WB+w/mnTOELVQmZrRIIBdA1l8o0pvcd7rHxWurUwiipF2q5 lVrsj3iOMOKExZlZm5JzM+TzMwuwaKR/OTZ7Ufv1EQbedn8x5rqMem/a1dTnSK8acoS3uh BNAORwx6KAXYXnSIFtzU6YQ/awoV8OMv4KRKHxAXjupIdnZcWCWlHsJYmaiiLg== 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 4T81mV6x4dzHFS; Mon, 8 Jan 2024 17:50: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 408Ho220041184; Mon, 8 Jan 2024 17:50:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408Ho27l041179; Mon, 8 Jan 2024 17:50:02 GMT (envelope-from git) Date: Mon, 8 Jan 2024 17:50:02 GMT Message-Id: <202401081750.408Ho27l041179@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: a4a838a31ac2 - main - bhyveload: make error printing consistent List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: a4a838a31ac24e19c8ee68d45cf5234615d0b958 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a4a838a31ac24e19c8ee68d45cf5234615d0b958 commit a4a838a31ac24e19c8ee68d45cf5234615d0b958 Author: Kyle Evans AuthorDate: 2024-01-08 17:49:40 +0000 Commit: Kyle Evans CommitDate: 2024-01-08 17:49:40 +0000 bhyveload: make error printing consistent Previously we used a mix of perror(3) + exit(3) and err(3); standardize on the latter instead. This does remove one free() in an error path, because we're decidedly leaking a lot more than just the loader name there (loader handle, vcpu, vmctx...) anyways. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43331 --- usr.sbin/bhyveload/bhyveload.c | 49 ++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 33 deletions(-) diff --git a/usr.sbin/bhyveload/bhyveload.c b/usr.sbin/bhyveload/bhyveload.c index 4f16f58bfc9f..4d89393424f4 100644 --- a/usr.sbin/bhyveload/bhyveload.c +++ b/usr.sbin/bhyveload/bhyveload.c @@ -861,18 +861,14 @@ main(int argc, char** argv) need_reinit = 0; error = vm_create(vmname); if (error) { - if (errno != EEXIST) { - perror("vm_create"); - exit(1); - } + if (errno != EEXIST) + err(1, "vm_create"); need_reinit = 1; } ctx = vm_open(vmname); - if (ctx == NULL) { - perror("vm_open"); - exit(1); - } + if (ctx == NULL) + err(1, "vm_open"); /* * If we weren't given an explicit loader to use, we need to support the @@ -882,10 +878,8 @@ main(int argc, char** argv) cap_rights_t rights; bootfd = open("/boot", O_DIRECTORY | O_PATH); - if (bootfd == -1) { - perror("open"); - exit(1); - } + if (bootfd == -1) + err(1, "open"); /* * bootfd will be used to do a lookup of our loader and do an @@ -893,19 +887,15 @@ main(int argc, char** argv) * to the more usual lookup rights. */ if (caph_rights_limit(bootfd, cap_rights_init(&rights, - CAP_FSTATAT, CAP_LOOKUP, CAP_MMAP_RX, CAP_READ)) < 0) { - perror("caph_rights_limit"); - exit(1); - } + CAP_FSTATAT, CAP_LOOKUP, CAP_MMAP_RX, CAP_READ)) < 0) + err(1, "caph_rights_limit"); } vcpu = vm_vcpu_open(ctx, BSP); caph_cache_catpages(); - if (caph_enter() < 0) { - perror("caph_enter"); - exit(1); - } + if (caph_enter() < 0) + err(1, "caph_enter"); /* * setjmp in the case the guest wants to swap out interpreter, @@ -921,26 +911,19 @@ main(int argc, char** argv) if (need_reinit) { error = vm_reinit(ctx); - if (error) { - perror("vm_reinit"); - exit(1); - } + if (error) + err(1, "vm_reinit"); } vm_set_memflags(ctx, memflags); error = vm_setup_memory(ctx, mem_size, VM_MMAP_ALL); - if (error) { - perror("vm_setup_memory"); - exit(1); - } + if (error) + err(1, "vm_setup_memory"); loader_open(bootfd); func = dlsym(loader_hdl, "loader_main"); - if (!func) { - printf("%s\n", dlerror()); - free(loader); - return (1); - } + if (!func) + errx(1, "dlsym: %s", dlerror()); tcgetattr(consout_fd, &term); oldterm = term; From nobody Mon Jan 8 18:39:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T82t52tDvz56P59; Mon, 8 Jan 2024 18:39: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 4T82t52G1Qz49Kc; Mon, 8 Jan 2024 18:39:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704739197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MU5MgoSskyuyJNiJma12eJkWewmkX0eVUf8jTStsXKE=; b=S+APjGaYGSgPWnY9yxlbgT4OBpTQqe/VcPUywxFSobyXC5JzCJomVrtvptjAsv1X83kv+1 9a/HpNfSQtV20WEgci4pYmIjLKQ7vzbcX117d0zzlje4unbc5BjsDtGaSWbOL5o14xg5e4 6CLuO9+wtyRx5T8uussjzn3sQe7prcfiW5IzLs3TDMkbWqvjFkSWiCPUqyenwWTDKF4KBM XTiC2BF9qOuRIkg6Ahvb5ZNzboZcUo5O+30AJfr64PyCVOlNZ2WHdIGztbHUYueo5sx8yL jO2p6xda41zVr36RwZ6ytrE7v26mA2gio4YlkkGyw6HpheDtE976wyATVYWiQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704739197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MU5MgoSskyuyJNiJma12eJkWewmkX0eVUf8jTStsXKE=; b=Gf1v8ICiw4jZpmLWHVklvSKwBWFh6HttR+kwuou5+wtn+98GEKmWiIctV3QY/6qvfKd5gp 9VK/U2rY8zrU01sXqVgECHdOYUIGjB4/KwqUTFJjC+vBfzjYm4TtXxFbRU/O3s/U2eX7E6 3z4JXVz2VrCif0UUXB47gN3x/FcbIvy1ZgJa9h8u4T1XT7jVNcWbzRbWtjiLfD7HdWTwAg GVpRXQu+ljgp8ymsnBUZ2wNyqU0J+LdFW6jcGkLXSBdhqkhcOjGKmimzbrE52LAQ6WrlfL 4H9RqKVY3Da21zwRcU6B2/SY1XPThiKs6BOV1nanb/dkWWiEXnuEfr4sh+TLCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704739197; a=rsa-sha256; cv=none; b=o//9V69JW4gWJKaui+5rzMciVUyjTqxsV9Dhv4fAeAzS7KWXD0gR9kMKUPeU0/z5UzVkkw bbK6O9SZFjSEeKKr+QpfCha2Yer2+ibYNzWAgpKpGp7nlcYiLDbzibnFad3gqR+7ElwMLV TO/Iv9En9wtIJaKXByRaZBLyVnBgUENjbjJqs6oW4F/Qm1hw2fSQ8qOAwf6LDb73SYJN35 zN3mExVKCUV6pKNBF1IJOLh7WIDK6cD1suuLgJErLt4GeH9t8wdcKcgKlriFBQi9l8IaCH bSGBrE9KkVYZ7PXSvJixDYZOwwg2nYxlPrE2BuLVhNI2QpaXwQuTKUdTLsZp+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 4T82t518y4zJPb; Mon, 8 Jan 2024 18:39: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 408Idvfb023941; Mon, 8 Jan 2024 18:39:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408Idvbr023938; Mon, 8 Jan 2024 18:39:57 GMT (envelope-from git) Date: Mon, 8 Jan 2024 18:39:57 GMT Message-Id: <202401081839.408Idvbr023938@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: f4574e2dc5a4 - main - tcp: prevent spurious empty segments and fix uncommon panic List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: f4574e2dc5a4719379496338257526aba484751b Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=f4574e2dc5a4719379496338257526aba484751b commit f4574e2dc5a4719379496338257526aba484751b Author: Richard Scheffenegger AuthorDate: 2024-01-08 08:25:39 +0000 Commit: Richard Scheffenegger CommitDate: 2024-01-08 09:52:49 +0000 tcp: prevent spurious empty segments and fix uncommon panic Only try sending more data on pure ACKs when there is more data available in the send buffer. In the case of a retransmitted SYN not being sent due to an internal error, the snd_una/snd_nxt accounting could be off, leading to a panic. Pulling snd_nxt up to snd_una prevents this from happening. Reported by: fengdreamer@126.com Reviewed by: cc, tuexen, #transport MFC after: 1 week Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43343 --- sys/netinet/tcp_input.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 4a6100fc969b..0014c11d9daa 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1866,7 +1866,13 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, tcp_timer_activate(tp, TT_REXMT, TP_RXTCUR(tp)); sowwakeup(so); - if (sbavail(&so->so_snd)) + /* + * Only call tcp_output when there + * is new data available to be sent + * or we need to send an ACK. + */ + if (SEQ_GT(tp->snd_una + sbavail(&so->so_snd), + tp->snd_max) || tp->t_flags & TF_ACKNOW) (void) tcp_output(tp); goto check_delack; } @@ -2033,6 +2039,8 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, tp->rcv_adv += min(tp->rcv_wnd, TCP_MAXWIN << tp->rcv_scale); tp->snd_una++; /* SYN is acked */ + if (SEQ_LT(tp->snd_nxt, tp->snd_una)) + tp->snd_nxt = tp->snd_una; /* * If not all the data that was sent in the TFO SYN * has been acked, resend the remainder right away. From nobody Mon Jan 8 18:39:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T82t653vlz56P5D; Mon, 8 Jan 2024 18:39: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 4T82t62x3Kz49WY; Mon, 8 Jan 2024 18:39:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704739198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y37I0X1cAbCHc6K40IptlPxNInojeZ8kte9CdoAjloA=; b=FqHEy5Hl7hX9w9/TRFKEB+R45QoCo1hqOOZ7xKJMRgoxs+tpx8bHdZJQMqIJeQl6c4hEG4 Nt4ccxt1V7rBZ+F5YSfCvB9sEfvJq0pH9F7ghWRNogXjnoCSAOAa5noCQDKjPyi6uUCU3p +1ge1XEMxKW3qsdgLpGuOjgq5Rfvkc/kymjDiB73SeIQ//yypySRFYmvCtv9hKcNYG9N4d GWcn/wre6lp43VeWV6P4C6oyFaIqJpVKtcTKpPeQC7cxB1ioPuXUSYCjkODnjXTIoZXbzk BXoAGfMK5JBsxgDsjJ3jhgbc3sYBjlzKMa11wJxx8NdJdKwUbLJMwJvvHKFKfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704739198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y37I0X1cAbCHc6K40IptlPxNInojeZ8kte9CdoAjloA=; b=mG/xrisG0PX5IDJgKFwhDVNTGh9wQNWC9Lutf9b9I35dUvntBMO/Q3mt1UVO1RXE6uTjNr GPpqpbqSkTGOxyTVDBfSFzP+FUNwC9CC376DwEIXr1fsDSIWGNUmLdCEkuQFhyM+/H1B9A 2Hpfm1gmEm4an01DhAfpMFXuHxd+1DxOoluw2DiEQwBmhqarjfd0bz2B6H/AiFdEJ6VYWR 1Nj9AADUyqQWZ8MfkTxqguqjnof1Gx1Qz6OIFCqASNoNA1dLlMaW26dsXr9a3uzT+a3VWW nf4LSKVAiZgqcteoepw5btx1UsBadD1tLzcDwVAP8TwzKwXGik94lkju0XNnrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704739198; a=rsa-sha256; cv=none; b=DSCgZUyCCq6HuqNJ7OfyASUYlJsDq7ti2xmtJA8Ymtui3wbmaDoKhjcq4W7Gl8CBugZu1m EtXQ7NFN+61NqOfu/B1uFYKIuvZbhcTxJa8yEqwBRXY1n+Rajf9G83iylCTZxXsBW5GvPC 5PUamkxTOaM870uRw1/K4uPIu6tlW+qVAFUBt6YqIHtSh8gKbYRQys1n2pE0YfUyUPOmdG 8sNqwb96GHJsuHBvOunVI+xfZwLEhY8JaiB7zWd3y+Vy7AESDN5Z7U8dNvPz/UZSl457oP kWmkb0pbOa92K+d39M/u5CdIIYUDYga0aRaq4b5Tni581Y42LjEMliVI2OItuA== 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 4T82t61sTvzJYd; Mon, 8 Jan 2024 18:39: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 408IdwG7023992; Mon, 8 Jan 2024 18:39:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408Idw03023989; Mon, 8 Jan 2024 18:39:58 GMT (envelope-from git) Date: Mon, 8 Jan 2024 18:39:58 GMT Message-Id: <202401081839.408Idw03023989@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: 429f14f83ae1 - main - tcp: clean PRR state after ECN congestion recovery. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 429f14f83ae1f6357a9455d4f075522420b01b03 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=429f14f83ae1f6357a9455d4f075522420b01b03 commit 429f14f83ae1f6357a9455d4f075522420b01b03 Author: Richard Scheffenegger AuthorDate: 2024-01-08 08:28:01 +0000 Commit: Richard Scheffenegger CommitDate: 2024-01-08 09:53:04 +0000 tcp: clean PRR state after ECN congestion recovery. PRR state was not properly reset on subsequent ECN CE events. Clean up after local transmission failures too. Reviewed by: tuexen, cc, #transport MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43170 --- sys/netinet/tcp_input.c | 1 + sys/netinet/tcp_output.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 0014c11d9daa..ed5f28490852 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -483,6 +483,7 @@ cc_post_recovery(struct tcpcb *tp, struct tcphdr *th) /* XXXLAS: EXIT_RECOVERY ? */ tp->t_bytes_acked = 0; tp->sackhint.delivered_data = 0; + tp->sackhint.prr_delivered = 0; tp->sackhint.prr_out = 0; } diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 8d863ffcf432..1ff6f5bee39a 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1663,6 +1663,8 @@ timer: if (flags & TH_FIN) tp->snd_nxt--; } + if (IN_RECOVERY(tp->t_flags)) + tp->sackhint.prr_out -= len; } SOCKBUF_UNLOCK_ASSERT(&so->so_snd); /* Check gotos. */ switch (error) { From nobody Mon Jan 8 19:31:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T841d002Tz56Wl1; Mon, 8 Jan 2024 19:31: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 4T841c6D0jz4KsJ; Mon, 8 Jan 2024 19:31:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704742292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ScmTeHF+qeWD4rRqp+DqpRBtl++laYKmtPj6KXuAyL4=; b=L2wLDOVlgi5tgjiOrm0S2qeBKivuiHYD07BDGUIt6+IFBSo9H2Vv8UZ8wNKBftL28xuYTP QDj3t8RmBgsI+9vpVCMqgkwQ+QQLnXQmYd8Ae47tcAFPALYktFGQqnVBKL/uwIehT7Vv9Q JxvNvlKRsksjq3gHa3kS5ZWbFvsI7WL/HQpbTVXHxUn5MNmgp1gmVJyYuSO/sgb0GHi1qr 3OgWGe79PLSH6zV+m1LaCMqpa+4pVrJ57lcwj5QgYZ5MR/TCG6KPbN5Gda9LsG1dSbAP+W q+4R9EnO4FEBSPQvEAdZ6wXHH0auzUjc02MElQecHx+F4kjqO53S7Q8/fsE9Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704742292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ScmTeHF+qeWD4rRqp+DqpRBtl++laYKmtPj6KXuAyL4=; b=PmaHxxQZQlyxHeqviyinhdUIAn478POnW8qpZVqNTNpg9ADz+ikPKFqQCr0f+NhmaWXjj2 CQi9hZ5fANrLp6iMhyKF4WBGeBcV9dApKN8ZZwjQziAZT/YEBDz9rdpDWYtU6A0/25FaRW HvJnQpb1vG+oA6XkI9E+3b4Mb46tshLtXwGGglLjupY4+sRiQn5ZSpJ62t6P0eF0CYu3Q+ /L+MzXoLb6Fg68fz5YEADt8FPqdt0UcgnArlPOgk81yWFqh15HDVRneXtyo2v9ax8dRmOC oudOdJgA7+H+ruUHoArzHVQZyI0T/un3nt71SVJvdMG8YZrxlTeNky7MexMLlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704742292; a=rsa-sha256; cv=none; b=y4jBt4pZrOA/fvWT+EpwrCAYso92LDObuIGHCws2wt3W/LK4I1kZn0htre8zfxRqY9fj3R zU7lA23kEZicCJYpJXYxeu68Dv9hBRgTrYbpLtVOyrjCX2lvaoPQneE5UTMOddh/rah0Ov roAg99cGK6PlzE0z9CWMd3yS9iAiSo3R2dRKo3HwYSow2ZGS1GfsuG4Q0hLL6opQSun8dN vNpk+TSMrH8x6olBQcmwUpBxgmtoaDvORoPwRGOBgqW4gDgkzLC2ktxIJ4dqwUcDOadlq9 4Mq/WAZvjdKq25HvYyYTA/ZZf1+FGC8Dkx9JMJzDHy4WU/e35KzmsWKBrIyyQg== 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 4T841c5H1GzKkn; Mon, 8 Jan 2024 19:31: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 408JVWtv019120; Mon, 8 Jan 2024 19:31:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408JVW9i019117; Mon, 8 Jan 2024 19:31:32 GMT (envelope-from git) Date: Mon, 8 Jan 2024 19:31:32 GMT Message-Id: <202401081931.408JVW9i019117@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: 20010b86fe0e - main - netlink: Add sysctl descriptions for net.netlink tree List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 20010b86fe0e181bdad947449fced07bf3fb9cb6 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=20010b86fe0e181bdad947449fced07bf3fb9cb6 commit 20010b86fe0e181bdad947449fced07bf3fb9cb6 Author: Ed Maste AuthorDate: 2023-10-12 01:38:00 +0000 Commit: Ed Maste CommitDate: 2024-01-08 19:31:31 +0000 netlink: Add sysctl descriptions for net.netlink tree Reviewed by: markj, melifaro Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43368 --- sys/netlink/netlink_glue.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netlink/netlink_glue.c b/sys/netlink/netlink_glue.c index e4b52ffb191b..164bea1aba61 100644 --- a/sys/netlink/netlink_glue.c +++ b/sys/netlink/netlink_glue.c @@ -50,8 +50,10 @@ #include /* Standard bits: built-in the kernel */ -SYSCTL_NODE(_net, OID_AUTO, netlink, CTLFLAG_RD, 0, ""); -SYSCTL_NODE(_net_netlink, OID_AUTO, debug, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, ""); +SYSCTL_NODE(_net, OID_AUTO, netlink, CTLFLAG_RD, 0, + "RFC3549 Netlink network state socket family"); +SYSCTL_NODE(_net_netlink, OID_AUTO, debug, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "Netlink per-subsystem debug levels"); MALLOC_DEFINE(M_NETLINK, "netlink", "Memory used for netlink packets"); From nobody Mon Jan 8 20:07:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T84px4KDmz56crc; Mon, 8 Jan 2024 20:07: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 4T84px3kP8z4Pf8; Mon, 8 Jan 2024 20:07:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704744441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FGqfUn1JsPnOwtZZUMIQM37bQitYwu9TB68Du/++tOg=; b=WFjm+5LtzKltSEJbVfQoahmfH0rMATW3a1oZDPJuAXHbgrvibp6UOqXJnIUHZCaddYWO08 oeZBzUpKILsVTeapb1uqYM/5AxLUMfBVyZ4Teb325dY0KjcxR2tG3FnsNY6ZAp2y+/iZ4C 2mX7umyoiByLA2cX1gQ/qoAY9+ke4wLZutyre99bf4tjviL7jKTX1TQpXyVwqFEt5RO1rH TbKHiyDrvl259AJ8X2Xuhz9c9kNUyp0D0e00mFaGc09mnsD/WPRBL/iIv4b+DwdEkQUqc9 5IP1HG57RddCMKItJyRf8FTnc7e9Xq6HhZZCPCbSYMZtDSx29+FaczalgzGMYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704744441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FGqfUn1JsPnOwtZZUMIQM37bQitYwu9TB68Du/++tOg=; b=ectGY1+YyCeYu8QtSgfKqtqaGA/7ZPux4e0ugb82Yik34bHnJ0CWza8YrOW1Dae58Xhzu1 ivu6BHAOdS9Ij9818rQWSIgJN5P9YD66RuC8dOZdnextbvie2JRErCo6JFyxSVgtvqSDp2 eAo/ODNKfiBpJbfVQTPxEAsEV0Bh7+UOEB4Q0HiKAx3L7BLYUyNWoZYoQQ9ZYRbOAy305W j9RXmla9MQBWWBcvUjgazWVN9nj8ky2GLDnSTtONW0HYbUJvvM9b/YBmzvu+Ur5EEvrm4E 0lHi3ldkG4LWswkexFqNpJM7PR5XXkdiKAHfU5+OkmsPfWitTgw/j1M3hIftQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704744441; a=rsa-sha256; cv=none; b=K3X5ky4dB1WZjUVUIdih8AROxW4NJPuFm6slqxVnjMw64wSebI9c5Q+oBz0WBFhW6TMTte FVyOdnjc5Pizb/IdAvY7kLrbb94nz+n+sYIpgjUNBxNh0ZRVii9Qm6k3CZHKUrNP65Wo3x dp21cus9/qxo9+NYPDvKW3QHrE+zn05hbcfVTUjLuIpbwP1BZ49YUbvAP/unIDAQQvSmh0 ofFIQQ1wnwvu2hWcgih7+VmtpMeG4llTCiQGzJxWZ0JyKURZ1BhcTqdDVDr9ppcZ9FAnqA L7GFjClI5raNX0PdpbXy8mp1CL/K9Q3jfdxgqVhaiBQgzq+H2e2N7OBZLXd/eA== 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 4T84px2msLzLBW; Mon, 8 Jan 2024 20:07: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 408K7LrY074319; Mon, 8 Jan 2024 20:07:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408K7Ltc074316; Mon, 8 Jan 2024 20:07:21 GMT (envelope-from git) Date: Mon, 8 Jan 2024 20:07:21 GMT Message-Id: <202401082007.408K7Ltc074316@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: df8a58b17a19 - main - cxgbe(4): Add support for netmap offsets. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df8a58b17a1907ed3b4597475d1cb8eacc9636de Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=df8a58b17a1907ed3b4597475d1cb8eacc9636de commit df8a58b17a1907ed3b4597475d1cb8eacc9636de Author: Navdeep Parhar AuthorDate: 2024-01-05 01:39:31 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-08 20:04:07 +0000 cxgbe(4): Add support for netmap offsets. PR: 253069 MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_netmap.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/t4_netmap.c b/sys/dev/cxgbe/t4_netmap.c index 64fba4410364..0377f65acc3e 100644 --- a/sys/dev/cxgbe/t4_netmap.c +++ b/sys/dev/cxgbe/t4_netmap.c @@ -1003,7 +1003,7 @@ cxgbe_nm_tx(struct adapter *sc, struct sge_nm_txq *nm_txq, usgl->cmd_nsge = htobe32(V_ULPTX_CMD(ULP_TX_SC_DSGL) | V_ULPTX_NSGE(1)); usgl->len0 = htobe32(slot->len); - usgl->addr0 = htobe64(ba); + usgl->addr0 = htobe64(ba + nm_get_offset(kring, slot)); slot->flags &= ~(NS_REPORT | NS_BUF_CHANGED); cpl = (void *)(usgl + 1); @@ -1269,7 +1269,7 @@ cxgbe_nm_attach(struct vi_info *vi) bzero(&na, sizeof(na)); na.ifp = vi->ifp; - na.na_flags = NAF_BDG_MAYSLEEP; + na.na_flags = NAF_BDG_MAYSLEEP | NAF_OFFSETS; /* Netmap doesn't know about the space reserved for the status page. */ na.num_tx_desc = vi->qsize_txq - sc->params.sge.spg_len / EQ_ESIZE; @@ -1286,7 +1286,7 @@ cxgbe_nm_attach(struct vi_info *vi) na.nm_register = cxgbe_netmap_reg; na.num_tx_rings = vi->nnmtxq; na.num_rx_rings = vi->nnmrxq; - na.rx_buf_maxsize = MAX_MTU; + na.rx_buf_maxsize = MAX_MTU + sc->params.sge.fl_pktshift; netmap_attach(&na); /* This adds IFCAP_NETMAP to if_capabilities */ } @@ -1368,6 +1368,14 @@ service_nm_rxq(struct sge_nm_rxq *nm_rxq) handle_nm_sge_egr_update(sc, ifp, cpl); break; case CPL_RX_PKT: + /* + * Note that the application must have netmap + * offsets (NETMAP_REQ_OPT_OFFSETS) enabled on + * the ring or its rx will not work correctly + * when fl_pktshift > 0. + */ + nm_write_offset(kring, &ring->slot[fl_cidx], + sc->params.sge.fl_pktshift); ring->slot[fl_cidx].len = G_RSPD_LEN(lq) - sc->params.sge.fl_pktshift; ring->slot[fl_cidx].flags = 0; From nobody Tue Jan 9 00:30:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8Bf31Vvxz55Lyf; Tue, 9 Jan 2024 00:30: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 4T8Bf30ydmz4BnQ; Tue, 9 Jan 2024 00:30:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704760203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QjvL+7JicxroIag1T4qI9giG7LK89c3pRx7377YmfkQ=; b=r7FYDgfIpRL2qp9NIopeomRusaf1goFqQkN7O2ZStDlfxKOWEs0sfY4LMnUh0UA3i16geF yzD+1ljOoRyaI7t+QBPkf74EJI9O4QNMMwvWhekus0PwYj/iWG78QD5Xp7yIry29I/d7kg aX8Sx+rdI1YMJ07d2HaY2lA9lo6UCBR1gQI744GAX4YHHx9hmYqnPA9xqJM8bDsPKNYVO8 i4PHbH7ryex8dgwria4J6n5QlE4UL7liXCYQFgFpmd9rtN7KrmwY7XQ0No6pn/kjnt2qbV WEjKmfkmB8NPEZ7hifANOdCYmv+bUa2p/XYFpohLFeOesJ1voTdBZQ7ExM/kJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704760203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QjvL+7JicxroIag1T4qI9giG7LK89c3pRx7377YmfkQ=; b=FRZY92PZkAYkDtvK3kzRXFhwit7sH5usXBh2ukEQ1L422/N+AH9XB7i5qy3B3ooQlbjRmr cS1HjPBeETllgM/NuGG9rohJLd/BpIrCRslOs+mY0opxDTMZs+tJDo3T/e338/ZUK2/dCI Y0ctPIuVA4orB5fZdfwxcQcW79udtRolzl0hcd9Ff30YT8f6xyZxeFGq7StBVCA7Lpm1RZ HBaNTTAc6xbe2czCcya5hMxe/2vT5beQ0G92wxX3N2sBovjjTIiNyos8PQKpf09rpqNxVz uZXJCzhyZrpXOsFCY6+ohzG/Z7UIUVgypyvDBSt6AKH42fAiu+aen4yCuADayQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704760203; a=rsa-sha256; cv=none; b=f/zdEtAW0RoMVk2MCSIv/s/1tlEHH4L6PiNCUqMcrYQM8CuYLRh6ibyoKlHJw3/RpRlj9T 9yzf76ML+Lq70Jjb0uzkRMRYEWry1xRcAegbcIatHEsGugXDvnm07DhtzduxPH59WlnPIO 7djWIoL98gTAgobymq6Q8qS1/41+G140nwWoFN+MSEWJvCGe/VDCgwe8pd0Iql2guRm8/Q R6sTLlp59XRKZNEY7c0IDR9uhn4nA9Rg4km7L9t7ltDtyYMumlgoeIpjwGrKg1X4BlTKgt Lq8s2qWZrniaVw4avttwF3GMqOBNXVYlNghtjEvQ5LoaErrxnQHFLK7w8y4i4Q== 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 4T8Bf3038lzTcK; Tue, 9 Jan 2024 00:30: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 4090U2Vp013996; Tue, 9 Jan 2024 00:30:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4090U2hx013991; Tue, 9 Jan 2024 00:30:02 GMT (envelope-from git) Date: Tue, 9 Jan 2024 00:30:02 GMT Message-Id: <202401090030.4090U2hx013991@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: ac84975e4a1f - stable/14 - unix/dgram: bump maximum datagram size limit to 8k List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ac84975e4a1f89a608a3c6ba8f8322b19a83421e Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=ac84975e4a1f89a608a3c6ba8f8322b19a83421e commit ac84975e4a1f89a608a3c6ba8f8322b19a83421e Author: Gleb Smirnoff AuthorDate: 2023-12-01 23:37:29 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-09 00:26:38 +0000 unix/dgram: bump maximum datagram size limit to 8k This is important for wpa_supplicant operation on a crowded network. Note: we actually need an API to increase maximum datagram size on a socket. Previously SO_SNDBUF magically acted like that, but that was an undocumented "feature". Also move the comment to the proper line. Previously it was the receive buffer that imposed the limit. Now notion of buffer size and maximum datagram are separate. Reviewed by: bz, tuexen, karels Differential Revision: https://reviews.freebsd.org/D42830 PR: 274990 (cherry picked from commit be7c095ac99ad29fd72b780c7d58949a38656c66) --- sys/kern/uipc_usrreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index f12693f3982a..5d39e5ea91c1 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -153,8 +153,8 @@ static struct task unp_defer_task; #endif static u_long unpst_sendspace = PIPSIZ; static u_long unpst_recvspace = PIPSIZ; -static u_long unpdg_maxdgram = 2*1024; -static u_long unpdg_recvspace = 16*1024; /* support 8KB syslog msgs */ +static u_long unpdg_maxdgram = 8*1024; /* support 8KB syslog msgs */ +static u_long unpdg_recvspace = 16*1024; static u_long unpsp_sendspace = PIPSIZ; /* really max datagram size */ static u_long unpsp_recvspace = PIPSIZ; From nobody Tue Jan 9 00:30:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8Bf42sDwz55M6S; Tue, 9 Jan 2024 00:30:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8Bf41X3Xz4BH4; Tue, 9 Jan 2024 00:30:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704760204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1S3Y4tLy/kOEG9KZsFf3hNX2BdL4wWuAB1YQ4ChlTwc=; b=xKdYtcwPYAuJNTKFWGk+kdVBeuoh0D1XpyucKB5zyjENmy2DCIIOlz2ItVX/FOuUKJmZhI /gA0FRDRniJb+hvnE0F0oetUMG7ndOPwuDNZvv6tMOBZW4De2yOUInxKZiLu7AI6/1G9hx obCR/kUrQw4g35iQn+ewHkJF3wmLqoTUBhJKVhGjtRWdGpbPNhIHyoL9+QwVsNjrSDCdkW erj0XIsfzu4ZzFaf8TX5y1iEgbJ8N/F260B7guQWloRF7JoDuW7YBnq2QthkkRLUDh3aAv y2MGY/sX6t2JZe5PMRlFiEaFf7GDSMHLA3/7aY5l2CuNu2YK0OowoBtxIIn5aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704760204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1S3Y4tLy/kOEG9KZsFf3hNX2BdL4wWuAB1YQ4ChlTwc=; b=h0pu+ljxq7xOWXMNjGptjbJbIyvu5UQf/UMjsfSL71+4i5mpmuJ1d8WjZPWWFNOqZz9wIC 4wvJMq5OlYjaIxUxMETQr2RW4xBGHiQpL9raf+VGJkS2i91KIOhb1/Al2K/Y4UjL9Uf0JE PaM3Glxg78R3FIdZl8v2nZMvWfMSvP6Cos2m4/fhbWozREwbgdC2kEcTGpYuOd32+8e2F1 CwYbXRCdMDHEafJ7rd43NLjP5SsMUG49xQt/icVl25cEa2rGnD0g15TBFj4yOMTVU5Bn+b hMd4Bo9MCsoNtbS3mcstfuHQE04SK82jHxNPZNYnh5JIktWDFBx/2Z0RjlQQ2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704760204; a=rsa-sha256; cv=none; b=CZ+z7NJxRwepSepQPBxp4FwDMvgXQm6ECPt0Osoruzu05K20FTFWZjmNtFHWrDReHxVXZl 5WUBiq9xhZONkjm9fXGo8Cfw15u8DcSVrCBCBjpWSGBMjheXbKLMQYD+jQG5u0esXojAf7 JEiZ10b5t20vXpU00hocknfbgAaLt7NEq/TlyW0p6DTjxqiLZz0eZqV59HD9jbte2DhGay DIzWPNuYLdIzrMnFtLbO8k3VntR51ajZ78vPBtHl++I4ziH9flIXmoBWwXV7QjIhmB6wED oRdHdWXIc+aPSx07occsnsE4j8E5NUv7VPu2b69ECaNU9nLDNuxIX0eWDMb7+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 4T8Bf40bBDzSst; Tue, 9 Jan 2024 00:30:04 +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 4090U37h014281; Tue, 9 Jan 2024 00:30:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4090U3hi014277; Tue, 9 Jan 2024 00:30:03 GMT (envelope-from git) Date: Tue, 9 Jan 2024 00:30:03 GMT Message-Id: <202401090030.4090U3hi014277@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: 7cfc847aba13 - stable/14 - pfil: don't leak pfil_head_t on interface detach List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7cfc847aba1356c34ea12d73f6ac72793056fcde Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=7cfc847aba1356c34ea12d73f6ac72793056fcde commit 7cfc847aba1356c34ea12d73f6ac72793056fcde Author: Gleb Smirnoff AuthorDate: 2023-12-21 18:53:49 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-09 00:29:05 +0000 pfil: don't leak pfil_head_t on interface detach PR: 256714 Submitted by: jcaplan@blackberry.com (cherry picked from commit c1c55da49fd55c01771f8cf1f7255a37b79735d7) --- sys/net/pfil.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net/pfil.c b/sys/net/pfil.c index 4b4eeca362c1..3ceffcefb758 100644 --- a/sys/net/pfil.c +++ b/sys/net/pfil.c @@ -295,6 +295,7 @@ pfil_head_unregister(pfil_head_t ph) free(link, M_PFIL); } PFIL_UNLOCK(); + free(ph, M_PFIL); } pfil_hook_t From nobody Tue Jan 9 00:30:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8Bf556GSz55M6W; Tue, 9 Jan 2024 00:30: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 4T8Bf51tMKz4BNZ; Tue, 9 Jan 2024 00:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704760205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q7Se/8tYWqcsiT2kunfeUPSnVEqIzYeHb+APY/W+Tmk=; b=H7Om2GXqn1UP5rCCF7XeLqtA0SxfV6+ur/2hpKfJjGrXakD64vTBkK1J+AM1PVsq6mV60v 2ZT0MR/sOHEgzudEKDM9jfQb2L7FiS3p3vLYdUrPt0NalpOPXR/ecR0f+BN93cox03nD4A xecEomk/isUTyyrCMHNXz63Lid8tFI6n3kF6RbwaUpTHDjSuULX7ia2le6QIO4wJZNEymK 9CRLcRXHxZRpAFzDm3YyMTAfLC0fclZDVyMxh5DdjYA1wp8s51BEvg3k3bd/r21F4B/qZp RMVdoQL/x7dhJxW957oSOfyH/jjNQDlL7528mXcuT9bAXCOcp2k4C2XhfLJpWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704760205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q7Se/8tYWqcsiT2kunfeUPSnVEqIzYeHb+APY/W+Tmk=; b=gT0xBaWUpUvmLdMMCFUZpFWQD/lIDQNtnvAu4YIrYPCphDPCQ8fxQ/2/x7JZRnuYUeMqXX GMtLS6UTaLB5das0dkTFXMZ2NXkKZbRA5Ie0ZaYjyACpy1l1Vfwa+qV8kW1RjhRmosba/J HzC2MfzWJL07AbBGdTfLNwOXPcjbYPftSIDUMrlq8aZOyubhjsEn3aXx8RIeJJEkLvwkjZ puGg9cYu+SxbXsOtw6jCrK78Li+u5Yh5F/orsosrasRAS2a1H6VIaEhPHqBoSQ37d6oBdE PPk2OwtL4ha7Oj3Nuw5CcEHbgWR9rD78hdGrs0pmVeDOx0xqbQczmYtFp1bwEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704760205; a=rsa-sha256; cv=none; b=Xdp9KBE4ofC9dbfBFLugsvIc2ts2zai9b5oMR/DxW9IZMiST2PYOm5059rQrSobgIpIPXo gYWQVD9vDQmvtCYYw+GdwH3lmYtHEgQdn5fPXOFUk9CSQqkeQ6xALaM/+8RbRFDGOY/eC6 umwl7zOeM6edjVAx1Qn/FfFNAN+LhVY9ANXJcjspNuHfhwcIuuCx6O1UdPiMXy0zNJJpmC v2PNMH1FNeZiQUB3P8/94rvts0KHUZeBIAC4OJh0kLhBM4t70coqx+Z8DurYHP3jtKzGdY L4ASh+Q7j1+YcX+evOI3QYZx+I+1e4UdfSt7bEi4LHOS3L/txa9WrzT+s8LdEw== 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 4T8Bf50ygBzSsv; Tue, 9 Jan 2024 00:30: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 4090U5rW014561; Tue, 9 Jan 2024 00:30:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4090U5Q6014554; Tue, 9 Jan 2024 00:30:05 GMT (envelope-from git) Date: Tue, 9 Jan 2024 00:30:05 GMT Message-Id: <202401090030.4090U5Q6014554@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: 2bfe735277b8 - stable/14 - inpcb: reoder inpcb destruction List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2bfe735277b8858dd7ad937e0bf2286bdfb45182 Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=2bfe735277b8858dd7ad937e0bf2286bdfb45182 commit 2bfe735277b8858dd7ad937e0bf2286bdfb45182 Author: Gleb Smirnoff AuthorDate: 2023-12-27 16:34:37 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-09 00:29:38 +0000 inpcb: reoder inpcb destruction First, merge in_pcbdetach() with in_pcbfree(). The comment for in_pcbdetach() was no longer correct. Then, make sure we remove the inpcb from the hash before we commit any destructive actions on it. There are couple functions that rely on the hash lock skipping SMR + inpcb lock to lookup an inpcb. Although there are no known functions that similarly rely on the global inpcb list lock, also do list removal before destructive actions. PR: 273890 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43122 (cherry picked from commit a13039e2709277b1c3b159e694cc909a5e044151) --- sys/netinet/in_pcb.c | 39 +++++++++++++++------------------------ sys/netinet/in_pcb.h | 1 - sys/netinet/raw_ip.c | 1 - sys/netinet/tcp_syncache.c | 2 -- sys/netinet/tcp_usrreq.c | 2 -- sys/netinet/udp_usrreq.c | 1 - sys/netinet6/raw_ip6.c | 1 - sys/netinet6/udp6_usrreq.c | 1 - 8 files changed, 15 insertions(+), 33 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 2586c107ceaf..a54b93812c55 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1405,26 +1405,6 @@ in_pcbdisconnect(struct inpcb *inp) } #endif /* INET */ -/* - * in_pcbdetach() is responsibe for disassociating a socket from an inpcb. - * For most protocols, this will be invoked immediately prior to calling - * in_pcbfree(). However, with TCP the inpcb may significantly outlive the - * socket, in which case in_pcbfree() is deferred. - */ -void -in_pcbdetach(struct inpcb *inp) -{ - - KASSERT(inp->inp_socket != NULL, ("%s: inp_socket == NULL", __func__)); - -#ifdef RATELIMIT - if (inp->inp_snd_tag != NULL) - in_pcbdetach_txrtlmt(inp); -#endif - inp->inp_socket->so_pcb = NULL; - inp->inp_socket = NULL; -} - /* * inpcb hash lookups are protected by SMR section. * @@ -1735,19 +1715,30 @@ in_pcbfree(struct inpcb *inp) #endif INP_WLOCK_ASSERT(inp); - KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); + KASSERT(inp->inp_socket != NULL, ("%s: inp_socket == NULL", __func__)); KASSERT((inp->inp_flags & INP_FREED) == 0, ("%s: called twice for pcb %p", __func__, inp)); - inp->inp_flags |= INP_FREED; + /* + * in_pcblookup_local() and in6_pcblookup_local() may return an inpcb + * from the hash without acquiring inpcb lock, they rely on the hash + * lock, thus in_pcbremhash() should be the first action. + */ + if (inp->inp_flags & INP_INHASHLIST) + in_pcbremhash(inp); INP_INFO_WLOCK(pcbinfo); inp->inp_gencnt = ++pcbinfo->ipi_gencnt; pcbinfo->ipi_count--; CK_LIST_REMOVE(inp, inp_list); INP_INFO_WUNLOCK(pcbinfo); - if (inp->inp_flags & INP_INHASHLIST) - in_pcbremhash(inp); +#ifdef RATELIMIT + if (inp->inp_snd_tag != NULL) + in_pcbdetach_txrtlmt(inp); +#endif + inp->inp_flags |= INP_FREED; + inp->inp_socket->so_pcb = NULL; + inp->inp_socket = NULL; RO_INVALIDATE_CACHE(&inp->inp_route); #ifdef MAC diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index 19d281937b52..4844bbee3b54 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -672,7 +672,6 @@ int in_pcbconnect(struct inpcb *, struct sockaddr_in *, struct ucred *, bool); int in_pcbconnect_setup(struct inpcb *, struct sockaddr_in *, in_addr_t *, u_short *, in_addr_t *, u_short *, struct ucred *); -void in_pcbdetach(struct inpcb *); void in_pcbdisconnect(struct inpcb *); void in_pcbdrop(struct inpcb *); void in_pcbfree(struct inpcb *); diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index e6e8b7a56680..04b12b6587dd 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -862,7 +862,6 @@ rip_detach(struct socket *so) ip_rsvp_force_done(so); if (so == V_ip_rsvpd) ip_rsvp_done(); - in_pcbdetach(inp); in_pcbfree(inp); } diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 2c381ef600d6..20c77930556e 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -803,7 +803,6 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) } inp = sotoinpcb(so); if ((tp = tcp_newtcpcb(inp)) == NULL) { - in_pcbdetach(inp); in_pcbfree(inp); sodealloc(so); goto allocfail; @@ -1051,7 +1050,6 @@ allocfail: return (NULL); abort: - in_pcbdetach(inp); in_pcbfree(inp); sodealloc(so); if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) { diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 8b0b3c296c62..767045480abf 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -177,7 +177,6 @@ tcp_usr_attach(struct socket *so, int proto, struct thread *td) tp = tcp_newtcpcb(inp); if (tp == NULL) { error = ENOBUFS; - in_pcbdetach(inp); in_pcbfree(inp); goto out; } @@ -215,7 +214,6 @@ tcp_usr_detach(struct socket *so) ("%s: inp %p not dropped or embryonic", __func__, inp)); tcp_discardcb(tp); - in_pcbdetach(inp); in_pcbfree(inp); } diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index cbda7f536262..708a4e6b730d 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1634,7 +1634,6 @@ udp_detach(struct socket *so) KASSERT(inp->inp_faddr.s_addr == INADDR_ANY, ("udp_detach: not disconnected")); INP_WLOCK(inp); - in_pcbdetach(inp); in_pcbfree(inp); } diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index d790a397f551..66fe0afbe918 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -689,7 +689,6 @@ rip6_detach(struct socket *so) /* xxx: RSVP */ INP_WLOCK(inp); free(inp->in6p_icmp6filt, M_PCB); - in_pcbdetach(inp); in_pcbfree(inp); } diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 4e69608b71de..35d68e164145 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -1203,7 +1203,6 @@ udp6_detach(struct socket *so) KASSERT(inp != NULL, ("udp6_detach: inp == NULL")); INP_WLOCK(inp); - in_pcbdetach(inp); in_pcbfree(inp); } From nobody Tue Jan 9 00:32:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8Bhy2d8gz55MKZ; Tue, 9 Jan 2024 00:32: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 4T8Bhy1nXyz4Dvr; Tue, 9 Jan 2024 00:32:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704760354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TEBNb+0tS1AAfsALh5nA2zNSdsDQfdj6nylp7y3YpqI=; b=DbnL6gMKlaqmYqmvg+awyG1HVsCbfV+Vl6i7KtTGir+oYL0BTxMPt6E9/VqZ3fXNQxZCu0 8QPC6V+xNkhir4EHzPrvXXOqzCthlXhQhi/NDbcLax8ErnoFue6Pk9UB/+E6WSKBbI4vhE L4m0M5tGQf8zIK1kV2cprSCpHD8vgJnpQVmAagDXOaMH/WmkA47oO4Y7+0hFii/u3R7m1L y/VLjmm4ff9U4TZ+k2m2BAa7J/DhQq0o3UTJ8+A60a2GzkyoH0VFyYUnLLSNHXOar7pVgh aeYK6Ti7FrCSVVPk2M6138NWKNBIJPYXmLbA+7tMHmKwzMfFmF92f0IndPWNqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704760354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TEBNb+0tS1AAfsALh5nA2zNSdsDQfdj6nylp7y3YpqI=; b=vFCFRkYArMfq81/SYByeYfhwDaj0/+PrqTBMCHYbAMJh0/unsj5nP6FbvwXXqRG2CBB+61 Pa+GzEjRIOkAozBJZAtW7w/KbG3H+hytOSlMqd1U3Y78AEmDqQujPE3/5KmcvpMryvNI4m KSEQVqtTiCILbWPqvqajWJ8CIHdfNVM/sxo6jjzRoVoeSAmD3mmEL6XgaXXfCAxKjslH+w DvNa7KxHMVbKn7hiM/v+iPjKeH695rwoBgWAHeibiDwF2ualloEEEyiDrnZhSvwVZrebJf kSwSB0s2dD/E764PwEn/HFrkccTGYqbt0K+AgiDG1IdesIXo++ieUr7bPSMUoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704760354; a=rsa-sha256; cv=none; b=AH8qOVpx6orom3+N5qdA+2E2wfCx71JERdPQcCBDs9AKk6VxiM5BtwA/TnHugCTDYUilVm yBF3DqFyPkdK6IzEZ3I4tAfAzuVlfXdzWg5ataRxVh/QPsol5Qv8wMzAY93ijiqce47pll GNAK9pJAkflyFKQ/oQV1CwMbWo3Qf2+zvsU7QC/LI0nD7k2Cc+WLCFZUp/BBc3ZbdoT3pS 2WFWV9BqFppR8h0OQGILRHJmh+wjzrylJLIeVNXN/d0q0++d4ppDfA5XRm2Nvi3oCr8NBM GwRVWwApvQ8HiNty4d3vj1DV3hOh3hZHHJWAfQm3oWkJFGTMq/fjNsCJhVHwqg== 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 4T8Bhy0rYszV3t; Tue, 9 Jan 2024 00:32: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 4090WY8d027331; Tue, 9 Jan 2024 00:32:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4090WYPK027328; Tue, 9 Jan 2024 00:32:34 GMT (envelope-from git) Date: Tue, 9 Jan 2024 00:32:34 GMT Message-Id: <202401090032.4090WYPK027328@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: f7459ca1e768 - stable/13 - pfil: don't leak pfil_head_t on interface detach List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f7459ca1e768d76f6abe640f7dbcdc8f1aac0edb Auto-Submitted: auto-generated The branch stable/13 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f7459ca1e768d76f6abe640f7dbcdc8f1aac0edb commit f7459ca1e768d76f6abe640f7dbcdc8f1aac0edb Author: Gleb Smirnoff AuthorDate: 2023-12-21 18:53:49 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-09 00:31:38 +0000 pfil: don't leak pfil_head_t on interface detach PR: 256714 Submitted by: jcaplan@blackberry.com (cherry picked from commit c1c55da49fd55c01771f8cf1f7255a37b79735d7) --- sys/net/pfil.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net/pfil.c b/sys/net/pfil.c index 33b6be9fdade..f23702d2d905 100644 --- a/sys/net/pfil.c +++ b/sys/net/pfil.c @@ -251,6 +251,7 @@ pfil_head_unregister(pfil_head_t ph) free(link, M_PFIL); } PFIL_UNLOCK(); + free(ph, M_PFIL); } pfil_hook_t From nobody Tue Jan 9 01:00:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8CJy092vz55RNW; Tue, 9 Jan 2024 01:00: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 4T8CJx6kNMz4JZj; Tue, 9 Jan 2024 01:00:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704762017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XJUgVFEDL2oq32HvF1J/nA8ewY+JBWIOTbr+iWKlwDI=; b=reStRTaNJe5tMwc9qp/8qAyR5HfjyiNNSPdPmt0C01IcMQUgh2HfYtDykEarVX6qaZ1JO7 g7pT2taLtm7IlBZ9tz2I66O93/omv5QBXLK1fzKJN8CQmlpd0AESry6tpuiUDxU5YPh1MG jF04OlhLZsnd7HzsvMuJnZa//EjlMWqwZscmlOgylS5KUDF4RVFZTNypvt6qB7bAGYaYNR JXnQ65SHd5r9Nw2tW9JU9Hpaq65rwUOPCAhEQSYiEzStdR7sp0qGb2vpzmFSL/XT3qS3rY 8AiTVQji2MD7pyYH0RQVju+JFQsaZuY3hg7IDXojOX4nkvmEBEfiKLKRzbnV9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704762017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XJUgVFEDL2oq32HvF1J/nA8ewY+JBWIOTbr+iWKlwDI=; b=wt6PQdxqdDNQnbliyZZq3g00oMjqb8/r1KrVsxzvzJCKAFDSlFdmUfe3mmpQZDGnjIHPRz 3dv2jlWQDuaJNm8R3OGpJB9fi1XhI4TmwWkRP60v20QgelK69s7F5TwWgko8ehpMV7V37P vIlGViFRgJbU5dX+1551llBqu6QjB5tIJMGJr+avMtR5lwJOFUw36Fa+3AUbaVNIhkt2jU o1ixdBH/HLZY6shJlGfhQdrF+ZHrUmiJ9QR1rPlemVnoEKLUDTIoJRrHim1+UjU/MA6YlR 8e6N9ZuWm4jqQUVI1Y2ZxmbPFrHpODv3q78CjmLUjuSE9xnGCZ4bDfu2YDSAUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704762017; a=rsa-sha256; cv=none; b=vIBMuY/e2veFa743Y9r0jxmRE6nVMcgfI22s1xNDjgSQbc3RMfvukmK9/txAuiyb7E92VC gp785piG9G83/tX5Pl5+cBuUlpaAjh7uGieWm39py1C6bWKJoN9p3umSkocL+Yo0F7hF2C l0Z3Iqb05C0agiVgXmSfYIiHOzj+Xt9xKae1rcdCCc7yAqh4sc/OV2CVqiUi7i84bzt/dd uF97wIh0y+NKNJ3ZRCm0e6lBmuvZhdcDlIkwOaKlZ2oy0PqTogW8QLGlns2IMat/rIelC8 OLBhvdZAxGdP/qq2jLLtVVbLiy9VcP9sTMahvrx05j5cO8/dVk6d9w2AZ464tQ== 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 4T8CJx5njtzVP7; Tue, 9 Jan 2024 01:00:17 +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 40910HOx071750; Tue, 9 Jan 2024 01:00:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40910HeR071742; Tue, 9 Jan 2024 01:00:17 GMT (envelope-from git) Date: Tue, 9 Jan 2024 01:00:17 GMT Message-Id: <202401090100.40910HeR071742@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 775958df04c4 - stable/14 - libdtrace: Fix TCP data offset handling in the tcpinfo_t translator List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 775958df04c4c94c69a37e25715efbd97138be0b Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=775958df04c4c94c69a37e25715efbd97138be0b commit 775958df04c4c94c69a37e25715efbd97138be0b Author: Mark Johnston AuthorDate: 2024-01-01 21:33:30 +0000 Commit: Mark Johnston CommitDate: 2024-01-09 00:56:57 +0000 libdtrace: Fix TCP data offset handling in the tcpinfo_t translator The header gives an offset in 32-bit words, and the translator is supposed to convert that to a byte count. But, the conversion was incorrect. Reviewed by: tuexen, rscheff MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43264 (cherry picked from commit c3268c23de45b75b44102a02e96f44b0ff2f6ba7) --- cddl/lib/libdtrace/tcp.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cddl/lib/libdtrace/tcp.d b/cddl/lib/libdtrace/tcp.d index ea3a553ebf53..4e1061e6c7c1 100644 --- a/cddl/lib/libdtrace/tcp.d +++ b/cddl/lib/libdtrace/tcp.d @@ -263,7 +263,7 @@ translator tcpinfo_t < struct tcphdr *p > { tcp_dport = p == NULL ? 0 : ntohs(p->th_dport); tcp_seq = p == NULL ? -1 : ntohl(p->th_seq); tcp_ack = p == NULL ? -1 : ntohl(p->th_ack); - tcp_offset = p == NULL ? -1 : (p->th_off >> 2); + tcp_offset = p == NULL ? -1 : (p->th_off << 2); tcp_flags = p == NULL ? 0 : p->th_flags; tcp_window = p == NULL ? 0 : ntohs(p->th_win); tcp_checksum = p == NULL ? 0 : ntohs(p->th_sum); @@ -282,7 +282,7 @@ translator tcpinfoh_t < struct tcphdr *p > { tcp_dport = p == NULL ? 0 : ntohs(p->th_dport); tcp_seq = p == NULL ? -1 : p->th_seq; tcp_ack = p == NULL ? -1 : p->th_ack; - tcp_offset = p == NULL ? -1 : (p->th_off >> 2); + tcp_offset = p == NULL ? -1 : (p->th_off << 2); tcp_flags = p == NULL ? 0 : p->th_flags; tcp_window = p == NULL ? 0 : p->th_win; tcp_checksum = p == NULL ? 0 : ntohs(p->th_sum); From nobody Tue Jan 9 01:00:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8CJz1j4Mz55RR0; Tue, 9 Jan 2024 01:00: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 4T8CJz0XgRz4Jj4; Tue, 9 Jan 2024 01:00:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704762019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R9c0eRvLP4BPIlIN6fzIIw9PqDnX8alhW5NLsDNhEsY=; b=p0SyOF9b11HGHY+VV+BOkOgp8vRasi2oEVW3y/kjUC2NqzeK5ZncphrJOVU7IPCSpJZ9Jg qg95V4MONUpbhmuU+1/rGNoWX8xy2NSMRclocSxtrorgKikMkpgRcW24H/CmxWBfO3k7qm a6eV97e0/dfUKW9Wqd4/pttZ/n/XI103uWH0dI5eTfktNHjEwGZG5a7kKIYxZR1sxZWDgr 5GSXIDYSi0yUIhpM04oNi5tb65MM0WJYyhFYWKdYngCYNp8j2B2O5PiivdecEkf2BQeweY pXS/e2MzJ01cR4In+CJ677LNWWDJn5CVIXO9HwYzuEv1Kw693g49WxdxzWDBtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704762019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R9c0eRvLP4BPIlIN6fzIIw9PqDnX8alhW5NLsDNhEsY=; b=xadq9SvZcEbmySFUzNr3ZMpmAOtDAHotbw0NP3KdjxMcyT/5OkgUEGO5XmC6jf35LPqFe2 C/ZmnEZXlbnY9p0wlFyXjmxyCa4641KHXxwq1VmyKb2YF/nOALFdlRCJ0y6soLnGmsCJ2i zAWSC/63T+gxE3Vu2xECjGR9+xvM4cvNlBaTJi3SdJbrP1Y5lK06mVXrcVHFv8CkHhjX7X YMsdGEEU+/zJvWknyHrotwPMgy1RzA3DszwfZE30zGPm9Buxy0YtQ9Gd0c3liPKhTWry8P mxYz/2XLFId5c0LtLquxSyAeisMj/ubZizk0L++krwIqwx+me7FaQpIZrhc9Tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704762019; a=rsa-sha256; cv=none; b=M+DnwcNM/cBvM4R3HHeVYbzrTO0W94lZ4iIiS64uJBnCft4zXY2MHDGedMMSf0h/DIWBR4 33m0w8qT/By6li3oh6M04KBmxmNAEPW2tYCwaVtINi/znqE2YG9L0stPkiKGfKKyJGfwn7 r4Fp+2Ij9RmypldEn5LkLM5zmlcglYyOh+USdeaol1djAPwiPW25gtoBEE/RfED7AV5Y0i UKJaZZP2ILmn0zvqZvaW4Sop0nRbEGOhGFW3YQahecUC+M60yP/qqqmEH/0aOHB3f5a8yY W+yMB+8VAdNzG3zaZr0qYFOgwG2ElGgjd7a0Br0X/c8QsBJhz+HVjkAjo2sx7Q== 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 4T8CJy6mTHzW0x; Tue, 9 Jan 2024 01:00: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 40910ImT072181; Tue, 9 Jan 2024 01:00:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40910I1x072178; Tue, 9 Jan 2024 01:00:18 GMT (envelope-from git) Date: Tue, 9 Jan 2024 01:00:18 GMT Message-Id: <202401090100.40910I1x072178@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 4cbf6ad75e3e - stable/14 - makefs: Fix ZFS cross-reference sections List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 4cbf6ad75e3e2232018aee73d2b7bb0b8f48658b Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4cbf6ad75e3e2232018aee73d2b7bb0b8f48658b commit 4cbf6ad75e3e2232018aee73d2b7bb0b8f48658b Author: Jose Luis Duran AuthorDate: 2024-01-02 13:30:29 +0000 Commit: Mark Johnston CommitDate: 2024-01-09 00:58:59 +0000 makefs: Fix ZFS cross-reference sections MFC after: 1 week Fixes: 240afd8c1fcc ("makefs: Add ZFS support") Pull Request: https://github.com/freebsd/freebsd-src/pull/979 (cherry picked from commit 518a1fd7d3492b8caa8a97d2027c3e7b17abbb0c) --- usr.sbin/makefs/makefs.8 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8 index 5c3d88b4ac1b..a5e15a045ec6 100644 --- a/usr.sbin/makefs/makefs.8 +++ b/usr.sbin/makefs/makefs.8 @@ -33,7 +33,8 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 5, 2022 +.Dd January 2, 2024 + .Dt MAKEFS 8 .Os .Sh NAME @@ -571,7 +572,7 @@ The root of the staged directory tree is mapped to .Va rootpath . .Pp Dataset properties, as described in -.Xr zfsprops 8 , +.Xr zfsprops 7 , may be specified following the dataset name. The following properties may be set for a dataset: .Pp @@ -585,11 +586,11 @@ The following properties may be set for a dataset: .El .Sh SEE ALSO .Xr mtree 5 , +.Xr zfsconcepts 7 , +.Xr zfsprops 7 , +.Xr zpoolprops 7 , .Xr mtree 8 , -.Xr newfs 8 , -.Xr zfsconcepts 8 , -.Xr zfsprops 8 , -.Xr zpoolprops 8 +.Xr newfs 8 .Sh HISTORY The .Nm From nobody Tue Jan 9 01:00:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8CK04pG7z55RXh; Tue, 9 Jan 2024 01:00:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8CK01Z2Mz4JlT; Tue, 9 Jan 2024 01:00:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704762020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=er3xOyhJXZe9vsZk1tqG7TuUULDuS02ye8ftJQQ0aMk=; b=RZbLwTRHg8UWR6INdepP2/Txo/SK4xkVU0ypIiWFxGCpCJ5cSpWsk8z2zgM6tQ6BdlmUz6 Ivrl1D/32lDpQggqj4XFq+XJM9N34XEYYDNVF/pO6nCxyRUNgjYn9S61AmF4r7Vg56znI2 xbQ3lLtBWKCzg2hMZyPKbvFA6rCJvz/FoafQPcnE/UrJXSStjl0l3VyV0pOi0zA3jAs8IR T8dJ88eRxTwiF1EkVsiIFic+hQbsoQ42UTV9ORI9jz+giTXLo/LsMrV8ql+RcOeIC+cgzv OID0VN5J3wTI05tkP+M4sA9Gh6lW83Ne/PzQDI4iTIfu6ljAsrtHdqQR+JKjUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704762020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=er3xOyhJXZe9vsZk1tqG7TuUULDuS02ye8ftJQQ0aMk=; b=wmnZrLrpDCPPiMbaeFOxjdwbOBnyFSUGf7YJJXvFDIbvUscMrNpfF/kxeqyTygSp1SaVLu 4JLMzbBCOfkcgZ4OYQDTq5FPBl75v1UXuma4pb5LQlISwFQMWELgHfNI9ycj7jLncGAJpT +F5j5jHybhnh1J5jYdmwzbJfAlMMLYf4XVEMmYJdwvNH/gFHSzKN+jDVrvGcSmy7zQ/9Yj qBoZx1Olu3s2J9W0umDkNyisGvN9Rd26X4EZ/QMa1fSbLn8/36ujxCkZ5FZV99P4YbmU+9 CKARWDC39wYpvGCAWB3zFPfLkDySd6RBqKkIhAyBdQaQ5bYf4f744spJ52WJPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704762020; a=rsa-sha256; cv=none; b=d2FTEoXYlP8pTM6k+GcShL+GHzxigkp+u8cFi6g9j9QObriqL8yR57WpfCwXuiGK6d2UeO DkRq40uNLR0JB2Fcg3rwDnipunZJpqZ7FsV1P/12vR189htSVNiw6xCNWmuv3XDf/+gWHU IdUWTDOyd80CCu0wFOvXXpUhtXAadZrYoKDdceDcoMmXkXqJSszAl17pAO0nKS3x3f6lwj 6s7noaTCuvF+ZhIt6czV/BNlA3zXC37KyMoekwE0inahcSsZQTPW93jAWhKQ8V9IfZ4YD9 uXIQpAnOfmpSRwaXanbiRcCTAblPVzZwU9gIw7Hi/6GPK6UvYos3iPfwbMI9QA== 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 4T8CK00bbVzVmy; Tue, 9 Jan 2024 01:00: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 40910J7K072226; Tue, 9 Jan 2024 01:00:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40910Jcf072223; Tue, 9 Jan 2024 01:00:19 GMT (envelope-from git) Date: Tue, 9 Jan 2024 01:00:19 GMT Message-Id: <202401090100.40910Jcf072223@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 3aa8b74da97c - stable/14 - release: Add missing /var/crash ZFS dataset List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 3aa8b74da97c439c9fe71c31a2aff59825e10e2b Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3aa8b74da97c439c9fe71c31a2aff59825e10e2b commit 3aa8b74da97c439c9fe71c31a2aff59825e10e2b Author: Jose Luis Duran AuthorDate: 2024-01-02 17:38:55 +0000 Commit: Mark Johnston CommitDate: 2024-01-09 00:59:11 +0000 release: Add missing /var/crash ZFS dataset This matches the layout from bsdinstall. MFC after: 1 week Fixes: 89585511cc05 ("release: Add support for creating ZFS-based VM images") Pull Request: https://github.com/freebsd/freebsd-src/pull/981 (cherry picked from commit adc215de9cabadb89eb4a1c99e047906eacaa58a) --- release/tools/vmimage.subr | 1 + 1 file changed, 1 insertion(+) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index f8b132875cdc..6eaf17b07948 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -200,6 +200,7 @@ buildfs() { -o fs=zroot/usr/obj \ -o fs=zroot/var\;mountpoint=/var\;canmount=off \ -o fs=zroot/var/audit\;setuid=off\;exec=off \ + -o fs=zroot/var/crash\;setuid=off\;exec=off \ -o fs=zroot/var/log\;setuid=off\;exec=off \ -o fs=zroot/var/mail\;atime=on \ -o fs=zroot/var/tmp\;setuid=off \ From nobody Tue Jan 9 01:00:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8CK14ylfz55RNZ; Tue, 9 Jan 2024 01:00: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 4T8CK129VXz4JgV; Tue, 9 Jan 2024 01:00:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704762021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ha65tsMzhQ3jnc+EFV0fDCKpOwNxvI3f3taLGMRI5Xo=; b=PGI/AYSDp/YSzJQ5QhvCK8GICrg4vV3hz7HF5XCQCF8BeNVJ9iP2sS9+b6cr0XeymEigW9 bsTuzz17/oyTbpUCAh6zIY9qjInW284GA4rdDDFeZHDi9USVPtDgbcw0PDSL+C0wrlu90h 5y8+fq/O+BwV/J/2RH6CKs6AHIF/d+A8sWi7CrIeZagSVppV6Ok4b9Ttq+JB6yE88mlZS3 F8fGu73eI5X4hTqhxD75REPTNAA7ffjcGBT82UH7cK7P4ExutGntWzODTszQc9CpPnZbPf 2qrS9hIvY9OtAwN6UzBbwItJ9YZypzWeAiZxmnqrwi72OkS7gwsWGSyig+fLkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704762021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ha65tsMzhQ3jnc+EFV0fDCKpOwNxvI3f3taLGMRI5Xo=; b=Q17jNAosFiA8NfLr+NZldsankqsL/smROkhLD+/UePRpCca5ffL7kWXd/A6Wf+y4RF3R+K 0pFcbJFMhh7NJWLB/8PgcYB0pgDgX+GY5NlGIELvzQ5mbnFrbnyIFUodpYzkOUWd9+DUHh tL5LFyG82ZJiFygAoHyP1kkfPrU9zd/YnCiLsBflSh3i3BJKC/jwjZKiod/caQs0pmRCUr gQbL81LXXhh1yUEJ0EJfYEF6iC7nP3HYebo5S7ocBToRmipuQktm4ZfBCgpEZStIl1yMEQ 2KU/Vt5Xzd3KTzcM21Qw/CAbCGlUamYEjAUB8gbFPgav+qL0pUnL0kS18Fk+Pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704762021; a=rsa-sha256; cv=none; b=e3cyC+Negspyo3/uaWFoTx12lR1Xk2l1mIkb22J1ALX0PpjYj5uguEpDld3WK0uwcNPGVS bKuOVaEDaKZRYpRG3V3XRdjXD6PQ1EBgTiTn9HcutdK+uP5TgyVmSKzpSjvqSqgzMN55XI pQUZfH8y9KiFopKuhXkGttYzu//1rhRSmbZusTHpF97GLjD0B9I41/zrCp4pNBth/O2/Zu Y+vioF9nlzwjzhnwszWeh2lEf1R8A9LzfFc7/GNEqZdAz0v1Jj6gf4MzHtNUVi2gzNMrTZ kSvaUWiB6QYzZ0Nb0NE942VOhx8qQwrnNtVauA74SazvRT0hEI2eftg49v3rAw== 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 4T8CK11Gn3zVn0; Tue, 9 Jan 2024 01:00: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 40910Lno072262; Tue, 9 Jan 2024 01:00:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40910L45072259; Tue, 9 Jan 2024 01:00:21 GMT (envelope-from git) Date: Tue, 9 Jan 2024 01:00:21 GMT Message-Id: <202401090100.40910L45072259@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 009c8a3d2d76 - stable/14 - ctfconvert: Handle DW_AT_data_bit_offset List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 009c8a3d2d76ed8bedc5ea0316979f18f9ae2791 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=009c8a3d2d76ed8bedc5ea0316979f18f9ae2791 commit 009c8a3d2d76ed8bedc5ea0316979f18f9ae2791 Author: Mark Johnston AuthorDate: 2024-01-02 04:12:29 +0000 Commit: Mark Johnston CommitDate: 2024-01-09 00:59:54 +0000 ctfconvert: Handle DW_AT_data_bit_offset This attribute is new in DWARF 4 and supersedes DW_AT_bit_offset. PR: 276059 Reported by: rscheff Tested by: rscheff MFC after: 1 week (cherry picked from commit 78cd75393ec79565c63927bf200f06f839a1dc05) --- cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c index ec5a3c58856d..42faaad65db5 100644 --- a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c +++ b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c @@ -1004,7 +1004,9 @@ die_sou_create(dwarf_t *dw, Dwarf_Die str, Dwarf_Off off, tdesc_t *tdp, else ml->ml_size = tdesc_bitsize(ml->ml_type); - if (die_unsigned(dw, mem, DW_AT_bit_offset, &bitoff, 0)) { + if (die_unsigned(dw, mem, DW_AT_data_bit_offset, &bitoff, 0)) { + ml->ml_offset += bitoff; + } else if (die_unsigned(dw, mem, DW_AT_bit_offset, &bitoff, 0)) { #if BYTE_ORDER == _BIG_ENDIAN ml->ml_offset += bitoff; #else From nobody Tue Jan 9 01:01:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8CKy1fyBz55RbD; Tue, 9 Jan 2024 01: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 4T8CKx6hksz4KrK; Tue, 9 Jan 2024 01: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=1704762069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7XnGkB1osFqOmT4SbGs9OgrO9ue2AzlsNAgVEmBMHXQ=; b=ItkWZciY3uSVym3TYGnyLX3jBXodQTrNcM8ivjXae34UKSYgqJ9nO+JVXdXb6nogvLteCb YY0b7FvQ8ZbAgT+GKQb2yALftIgE7vDi3teX4N4xAOdXS/wHOZfiyLQ8cAkcX+i1y09nJL y92apfRq1QTerRSLTDr7x6M9cKzOXrIZbuUAxUBD/w56Oc4uZmHGGtvc8JXXeUZ+/oReKB +bz4hrc7XW1rPY28lvElVsrYKdez6Kh4oAIAcqn1C62BZFcApgtKtuUQ139QofSQT/QcEH 2VPyt0MSAhIwgdKY1vYy/JYdegk/5MWs0srbqDdRnzXI+tla6vH7JXyWrovR7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704762069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7XnGkB1osFqOmT4SbGs9OgrO9ue2AzlsNAgVEmBMHXQ=; b=cDpUg5fpSnFkPybROBidcnbl4n7VPFast7rIWaEexUOP7TIuYyrrAZP1rjlfUquUP3t6Zp beQZ5vi9zKuWtiaoHv1jhLXynf7Cy9VQFDKXnJRJ6a5PGAHhtr6mxG5CQ+F5ryrWagXyTe EO1FgRVQp517ZU92xeLBTBoxcKh8DDHud26xKZX55G29ukoSfsdDb6qKGPElge8XQwi+u8 0G69n4IDwru2WLRfpbujhqdEvyPEos2d98XKTM7RqIi30Qf4RsyTfiUYPggSBX6To3P1hn nEABxN1gYXjEX40sAGwQkLyr4ju/R+uxKpm0P+wSlNQv7NuhaqV/TW95/0I8LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704762069; a=rsa-sha256; cv=none; b=GpPQKhk/xdm1A0o2QGMdNYJak/IDrI+POjLejTighv74Z7OoGjsk8V78mXYlLI+CcPaPQO ThODHbgKY20IVrD6RRRAza1438oQqUj+0vzel3KcYuEAMglOqYc9e5Fd5sKwiO3VFJIH35 H2Ec+nDpwqLMd5wvqJC+g0BP19UFBMr3eYw9+DzH0xN2h/4PhMEyukOuUSqyZcADNlyiax H7CzmkaqGk/pP7aXiae13cMe48V9rgMEXpjBC9JY3xtiHYIF29Fmb4kMaowquqih/+pB9F cafWe5hfrYZ5c2YPHhYiN5fsP7Pb6SkgYt9MS7AnBn2O8bu61jhADAFde4SWAw== 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 4T8CKx5n7KzVkh; Tue, 9 Jan 2024 01:01: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 409119A7075095; Tue, 9 Jan 2024 01: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 409119Yf075092; Tue, 9 Jan 2024 01:01:09 GMT (envelope-from git) Date: Tue, 9 Jan 2024 01:01:09 GMT Message-Id: <202401090101.409119Yf075092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: cc8af47b6d4c - stable/13 - libdtrace: Fix TCP data offset handling in the tcpinfo_t translator List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: cc8af47b6d4ce9c40ed03ace7c130409fe0962a0 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cc8af47b6d4ce9c40ed03ace7c130409fe0962a0 commit cc8af47b6d4ce9c40ed03ace7c130409fe0962a0 Author: Mark Johnston AuthorDate: 2024-01-01 21:33:30 +0000 Commit: Mark Johnston CommitDate: 2024-01-09 01:00:30 +0000 libdtrace: Fix TCP data offset handling in the tcpinfo_t translator The header gives an offset in 32-bit words, and the translator is supposed to convert that to a byte count. But, the conversion was incorrect. Reviewed by: tuexen, rscheff MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43264 (cherry picked from commit c3268c23de45b75b44102a02e96f44b0ff2f6ba7) --- cddl/lib/libdtrace/tcp.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cddl/lib/libdtrace/tcp.d b/cddl/lib/libdtrace/tcp.d index 2ccbd574055d..32a1afce9ae2 100644 --- a/cddl/lib/libdtrace/tcp.d +++ b/cddl/lib/libdtrace/tcp.d @@ -263,7 +263,7 @@ translator tcpinfo_t < struct tcphdr *p > { tcp_dport = p == NULL ? 0 : ntohs(p->th_dport); tcp_seq = p == NULL ? -1 : ntohl(p->th_seq); tcp_ack = p == NULL ? -1 : ntohl(p->th_ack); - tcp_offset = p == NULL ? -1 : (p->th_off >> 2); + tcp_offset = p == NULL ? -1 : (p->th_off << 2); tcp_flags = p == NULL ? 0 : p->th_flags; tcp_window = p == NULL ? 0 : ntohs(p->th_win); tcp_checksum = p == NULL ? 0 : ntohs(p->th_sum); @@ -282,7 +282,7 @@ translator tcpinfoh_t < struct tcphdr *p > { tcp_dport = p == NULL ? 0 : ntohs(p->th_dport); tcp_seq = p == NULL ? -1 : p->th_seq; tcp_ack = p == NULL ? -1 : p->th_ack; - tcp_offset = p == NULL ? -1 : (p->th_off >> 2); + tcp_offset = p == NULL ? -1 : (p->th_off << 2); tcp_flags = p == NULL ? 0 : p->th_flags; tcp_window = p == NULL ? 0 : p->th_win; tcp_checksum = p == NULL ? 0 : ntohs(p->th_sum); From nobody Tue Jan 9 01:01:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8CKz3GJ4z55RhB; Tue, 9 Jan 2024 01:01: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 4T8CKz0ZFRz4Kjl; Tue, 9 Jan 2024 01:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704762071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QtCh//DrZEJJH7vzpFUp5NNhW5LIf4MFVfJ1r6Rb72Q=; b=ie1yQQd8CJQpF9Gf06+O161ZGOjXT22RoJpLIHFwTw41Qnuq5eDxodgva0d0GcFGJj4T12 AI3icjIPY+LZx47sWdfn6Nob/K7V7hyMJL9zyN7tegGID9OvrsHGxa1e/UGd9K5AaxMggI UsXNmoXB+KNmPg28zqghsdtcdKw54ZtHcJNJok4g7abOkbf9cECEIPRPmghktbbp+zFZjG U3rVqtHmUN/sk6e+HGWcBLwylziY8neR5HRS1XWy+fASUhVB72ua5foc6qIGk8+3pZtiN+ hG5NLf0nlKYCI3M/+cR9F1Xki/EGe6z8dtn4KW0XGcm6R3q9o8u1uSZBH5ASxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704762071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QtCh//DrZEJJH7vzpFUp5NNhW5LIf4MFVfJ1r6Rb72Q=; b=nZ8Hrs/P/rsgbZbmc8OK2Wynjd++zKA8anU2pGBw0kuLxEaPRPqjhfJaNR6YsA8NbrN6XP 2w1KaZlgDEyTAZoei38c/Znjn/7h1ZCkxsNFDYA/KPBFNkIUKECsV7W2pOVG1e4NUrlotS LkckUU8Z+TKcuPY6F/P1ghz7U8nqUxcn/XRr3rE4evt4GnWFNfETmZLH0wUElYhIGXqzU8 GaL93jEJXSNUG//bTJVlpu3fYn3vkfMGc+BsRviWPovDDLO2tYEEsAnC53KRBge+bCWTuN /o5A+DB/BE8M5Ju1fD/PMZVps/tUg6QiPVQCijzumQR9cEpKqBQpX54kK5Sxag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704762071; a=rsa-sha256; cv=none; b=YL9CJC+jID0+Ey0tt9q+/39xgsVIkEDTCIxMLefubyfODfoXmUr2+36/t2l8CW7lxaipLu Xlp3q64aSg4CTy7Y1ETiq3kXn9ehUNOuBQrImtb5IILTR6z7fWWHWRjNIWwX+bM4nSb3lH GruZzus1aD8DiOBS4nF3I7nwt036eb35tpVD4Xt3Lnd9H5T+pc5Sx10t1zP0o1AeUEEuB5 /LX89LXWl/f26y6JpHae8hUQRDf0ZiZPLKj7Z+/pG6iULbuOiKb8dm3d+P5wJWS7uiDYEM Xs6p0HifMe58Nyh4/3nnM3/Dc5VLXQpcwNWK2o2oUxxd4yATdk4UgFKTK/9jYw== 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 4T8CKy6lvKzVkj; Tue, 9 Jan 2024 01: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 40911A32075135; Tue, 9 Jan 2024 01:01:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40911AOS075132; Tue, 9 Jan 2024 01:01:10 GMT (envelope-from git) Date: Tue, 9 Jan 2024 01:01:10 GMT Message-Id: <202401090101.40911AOS075132@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 693dbc0070f9 - stable/13 - ctfconvert: Handle DW_AT_data_bit_offset List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 693dbc0070f97cc6744796d40eeab63e3305492e Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=693dbc0070f97cc6744796d40eeab63e3305492e commit 693dbc0070f97cc6744796d40eeab63e3305492e Author: Mark Johnston AuthorDate: 2024-01-02 04:12:29 +0000 Commit: Mark Johnston CommitDate: 2024-01-09 01:00:31 +0000 ctfconvert: Handle DW_AT_data_bit_offset This attribute is new in DWARF 4 and supersedes DW_AT_bit_offset. PR: 276059 Reported by: rscheff Tested by: rscheff MFC after: 1 week (cherry picked from commit 78cd75393ec79565c63927bf200f06f839a1dc05) --- cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c index 861fda0931af..1de5741ae207 100644 --- a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c +++ b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c @@ -1004,7 +1004,9 @@ die_sou_create(dwarf_t *dw, Dwarf_Die str, Dwarf_Off off, tdesc_t *tdp, else ml->ml_size = tdesc_bitsize(ml->ml_type); - if (die_unsigned(dw, mem, DW_AT_bit_offset, &bitoff, 0)) { + if (die_unsigned(dw, mem, DW_AT_data_bit_offset, &bitoff, 0)) { + ml->ml_offset += bitoff; + } else if (die_unsigned(dw, mem, DW_AT_bit_offset, &bitoff, 0)) { #if BYTE_ORDER == _BIG_ENDIAN ml->ml_offset += bitoff; #else From nobody Tue Jan 9 01:01:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8CLL09fTz55Rdq; Tue, 9 Jan 2024 01:01: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 4T8CLK6MnYz4LD5; Tue, 9 Jan 2024 01:01:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704762089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QGZRcpk4ZvoXn+4whPiEuAOx/ctjhmAbSHL+dkuSUME=; b=Be+HNT1hsMcddm60Oamzmw4YmqKDfooMWFbQ3EPp/6kjlijBnPUhdr12pipTeMgZpvnoQn 7oocO3m96GVq9t36Zhg0BU12ogfI0c5Pgq5496mD2i8UZ7T9dIiLXzQlZdaq8fUY+Aeofz 1E8nct7i74aFOYe9MvutUqTcYA4YZvGMGGYihnImYdSVgPh9mitC07wXxmxDu2zWaa4YcV d26K4qp1OuLljlWaQUo+XzPSGNFxW4Sdw77fUd4R3HEFiIA1pc1cnOHhqbUyZYeGGVKzMK STyP4/MKYgu0O9g+Tx1gtaSLW0bvrj7n/XEQhrgnqOYslEbTl1deLz1dNI9vvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704762089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QGZRcpk4ZvoXn+4whPiEuAOx/ctjhmAbSHL+dkuSUME=; b=Z69bYsb2+VPDRiE02MY+s5WiF7wKtiqKgGKoxLMkowGmmzBJp3eyNB1BFpYlc94VSbUBQf 270xjMSDCTJAluWh6wk7MYhmPS2AxG1fhgFCvPhybSk0bDaIz4EPr/uDYH2AruoTliQ0Yc TkzTdlqdip1NgSo/MNIel7AgnlL5IkzJQjRdsYD8kj5zFe1FDN+vfDFiGJTBRkpv/7eRfI YGBFGyfbtyNpqKM+TnYtTBiadq5YquIIsrH/m3tQ7bvru8vEKROO4OZZ1s+gL3Iio2Lfl9 CX2eeMSnqi8UDy2ZfUNW70WfAROKK6XGDngieS1VJGyKAoFOgrVwV7AgXpPuGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704762089; a=rsa-sha256; cv=none; b=jq+fYEkrKHafuH5xpCinoSgbjvH8SJ1d9RyJ3l9Fq84wijQsxN8vpC0D+oWW/lQQwTmvQV xWdAu2RDfa6jj6cNoUx12jFjlcYYASvjW1WLvrJpClF947ml1LWmc02gFUM/xdYnO/avRQ actDE5oBYdWbfSMvR7dSbz54dmZM1uXwtwSKQyr4YmvHQbKTZlCA3R0RrQY14XO+g5z7Gn uYdeWzbt+jFvTy73Rr+ncCCtVMmWT7RUKLDfEXB5tsjIcF734nNEd9nIzj2W1t0tZsRwbR fYkorjJX+aBRFiRvVCCObyyKFqgamd2GEN3NVTs1Fkxyri08EcYusBQf0vhhVw== 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 4T8CLK5RFQzVPY; Tue, 9 Jan 2024 01:01: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 40911TRp076219; Tue, 9 Jan 2024 01:01:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40911TcF076216; Tue, 9 Jan 2024 01:01:29 GMT (envelope-from git) Date: Tue, 9 Jan 2024 01:01:29 GMT Message-Id: <202401090101.40911TcF076216@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: 78258ee013cf - main - kldxref: Correct contract number in license ACK List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 78258ee013cfec2145060cc4c25d66f075db36d3 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=78258ee013cfec2145060cc4c25d66f075db36d3 commit 78258ee013cfec2145060cc4c25d66f075db36d3 Author: John Baldwin AuthorDate: 2024-01-09 01:01:05 +0000 Commit: John Baldwin CommitDate: 2024-01-09 01:01:05 +0000 kldxref: Correct contract number in license ACK Reviewed by: brooks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D43371 --- usr.sbin/kldxref/elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/kldxref/elf.c b/usr.sbin/kldxref/elf.c index cc9bf9e6cb38..e5fe90169d2c 100644 --- a/usr.sbin/kldxref/elf.c +++ b/usr.sbin/kldxref/elf.c @@ -7,7 +7,7 @@ * of Cambridge Computer Laboratory (Department of Computer Science * and Technology) under Defense Advanced Research Projects Agency * (DARPA) contract HR0011-18-C-0016 ("ECATS"), as part of the DARPA - * SSITH research programme and under DARPA Contract No. HR001122S0003 + * SSITH research programme and under DARPA Contract No. HR001123C0031 * ("MTSS"). * * Redistribution and use in source and binary forms, with or without From nobody Tue Jan 9 01:21:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8Cmx4wstz55V0k; Tue, 9 Jan 2024 01:21: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 4T8Cmx3Dnbz4N1g; Tue, 9 Jan 2024 01:21:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704763265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yBz/wcImfEYmc2NbWWos+bMu35012l8nrR0FDYIlBbI=; b=hi+JOz+UVLfiGZUJxjy+7lMhHKiWBNtUSXthX+QySzIduJshg9ITY1/4rwcQOGfDnA9htP BJRyy/SApux48uE1qaBo8wtgNJ6vXHCSxnnnyKQZUNWd2NF01E5Zqy8uVgvF9/YCt8s85/ BqEIlyRf7hxylgejDHj0bn5LdmUglpRu8w5XBc19OkltKGKrmDVNKTP2xWhMU9h9dk/tc5 psnZqeTYfMHsALwjSHbKJKs5DgNNihi0p0HI9dPHqIvLmfG7mEe2RMSaYGouaLhmCoNL/Q an+9dNsaMVFU/mOzNVMA7/OXtJ9EmznY8CX6w06Wi2VNgIugitTdOvyixB75EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704763265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yBz/wcImfEYmc2NbWWos+bMu35012l8nrR0FDYIlBbI=; b=rP0wHKjuVt6WqSYyrtCVMSf8ewMMn82f3prrU/nNGqvEHLgx09JsTFOdxEDA3PvPR0CF6o AjSbaSFGLCBU3txlGIdpSC48BjQ2b05Ebn2+aoIaOFvoJTdYUlbu2azMgTVBvaLM3boYOJ Wy/dASvdsaEbsUAWIhrkUHEH/zxFIkNddPGLX3K3SKvof6ik36dB8Sm6e2X2hObzaZsWKc MrcvY7+wxRnpjFlMFnvMcHFyQpLnOqf6r01Cm5eHZbWuMh8NjHFIRVpMEHbdIV4+JWlBd5 OOemNrPgSxsZSSEVQ7301zoQ/wSYCizf+FlT402gE9uEKxeEC3Ht/7Y7eTHAQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704763265; a=rsa-sha256; cv=none; b=fecsmgXp+66qoHHGlFjEjoTBZ3BymfbnVViBiWCer9x99qAHQ+gYLxXTqC8E75cgXoiUEB hrJRS7azUGPqQjxu+pyQKgkylrBjI9Scf2OW8EeryYEFxrdhJ7SdE4zGabM6YtKMrA7Ir+ a/P6l7lQa6+04lb342bIqG7OKVmJ+wYjr9asYnSk0FUhikzQ4+UKr4Upp9NSw2NbJlLAtW fXUQI9ASpN8hBwWJEXP1J9f52WSsKu4HNQS8bk7IQEvN3FeiEOETNVBQy7hRDgm7zKe2yW R589Q/3OLmN1vD98YEM4Pjf5S+zZK05qveu7LBr9UgaBVuf0caRYw5qeB6Pi0A== 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 4T8Cmx2JkSzWvN; Tue, 9 Jan 2024 01:21: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 4091L58R009389; Tue, 9 Jan 2024 01:21:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4091L5nR009386; Tue, 9 Jan 2024 01:21:05 GMT (envelope-from git) Date: Tue, 9 Jan 2024 01:21:05 GMT Message-Id: <202401090121.4091L5nR009386@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: af9f4ac57ade - main - netlink: just return EOPNOTSUPP on shutdown(2) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af9f4ac57ade116293c0a65c5201658b5e424ff6 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=af9f4ac57ade116293c0a65c5201658b5e424ff6 commit af9f4ac57ade116293c0a65c5201658b5e424ff6 Author: Gleb Smirnoff AuthorDate: 2024-01-09 01:20:30 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-09 01:20:30 +0000 netlink: just return EOPNOTSUPP on shutdown(2) This matches what Linux does. Reviewed by: melifaro, tuexen Differential Revision: https://reviews.freebsd.org/D43366 --- sys/netlink/netlink_domain.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 4630c12b54a8..7660dcada103 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -545,15 +545,6 @@ nl_pru_disconnect(struct socket *so) return (ENOTCONN); } -static int -nl_pru_shutdown(struct socket *so) -{ - NL_LOG(LOG_DEBUG3, "socket %p, PID %d", so, curproc->p_pid); - MPASS(sotonlpcb(so) != NULL); - socantsendmore(so); - return (0); -} - static int nl_sockaddr(struct socket *so, struct sockaddr *sa) { @@ -990,7 +981,6 @@ nl_setsbopt(struct socket *so, struct sockopt *sopt) .pr_disconnect = nl_pru_disconnect, \ .pr_sosend = nl_sosend, \ .pr_soreceive = nl_soreceive, \ - .pr_shutdown = nl_pru_shutdown, \ .pr_sockaddr = nl_sockaddr, \ .pr_close = nl_close From nobody Tue Jan 9 01:21:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8Cmy66kNz55VJs; Tue, 9 Jan 2024 01:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8Cmy4Sz2z4Mqb; Tue, 9 Jan 2024 01:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704763266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=de5hE8J7ixn1ZE9+4Jd8EcdUT3/QgXvGDrtSc1B0M/k=; b=lVWwhM/zybYTcCNRdeCL+ylErRMmaZXThlJAUr97zcRzka4KnPmv9OUaD/2wgRNiGUcjjx rL0uBv4Oy8vK2qKgbQdf7Ol5GynhVdQihMes9Dhf+u3FNjdQuH9mav1kEe7ohY5zR3toX7 SuMUvX9erVbbworJZrL2fAgxrEWsQTa//TnfApVzVIYctPfop8maD+QUCdUh6VyOSq/fs8 MDGi6RFdPGrIGcZnhP7A+Mg6byazLJXfkJUo/Z0cSCI1m/WU8CQB02l4TET1CGVQLvnfcN o5R6xCo31yVQWyijIX668r4+1qAGRBaDCMg4WJuRU4RJAMmrQSqHzOyHxsLKmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704763266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=de5hE8J7ixn1ZE9+4Jd8EcdUT3/QgXvGDrtSc1B0M/k=; b=Z3/jDW8wDAWYV3Xgcu/3KZRiytnK2FDggzU0/IbXeNkuauRZ7rBpSril4OUj4K7Jyx49JS 2KLQogBEJojLTsP0nErUL2L/zGKAi9TbKxE10fap8nQTvOaIYkYBsBdSrXKwUJMAFEvjuc 4Ow6mVpmaAo6OU5JEuwBlORdt79LsSxeHJrkiRjVzFxJJE0/4RMDmFfCRMTrNtFIjLz1kT lxPSkfRvYSdnTei4J3cDiV2d8i49z8cSq/Vovx7NR480un+jiFxdvJmxdDnZUrue3ciDL5 qGh8mN3oOCJjEE8aBqa+R2uVwp/71+QlOSkeWkC/wNZjnW1iu6+LffiOF2Z8pA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704763266; a=rsa-sha256; cv=none; b=YRfme55sPnJPV86fmIxWpFTQt1UweLp/AhiVmH9fIIvR8cO7pe7xtcx2hlws4kXebtxGtX JZVIioRcnBCe2dvkQPPK+5HUbRD9ZxQS++o7OrhjOAdqacjL8w4mS2S49xIxze9I23sH1u /fhhxy1vltCmmifld7kc+eLMcv99WeQsm90wNPse3Pfoq3DubosYSFafw1vsVqE/4+qA8a B0+epW7jJz/6fFAwaRK0//zYTQdENoadJyaN+n+cgvMAHoSolwr6NSqwQ+fHvO+39TU547 c9Jcc2CKT5vMDf1T65yut5swg+YzOijvlJlzFj/NdXoi/zsbGGnGClKZqgBsRg== 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 4T8Cmy3ZvwzWmg; Tue, 9 Jan 2024 01:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4091L6Ds009455; Tue, 9 Jan 2024 01:21:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4091L6Gn009452; Tue, 9 Jan 2024 01:21:06 GMT (envelope-from git) Date: Tue, 9 Jan 2024 01:21:06 GMT Message-Id: <202401090121.4091L6Gn009452@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 59ce044a7856 - main - sockets: on shutdown(2) do sorflush() only in case of generic sockbuf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 59ce044a7856b16803f7eb0aa5c54cfe6e13cff7 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=59ce044a7856b16803f7eb0aa5c54cfe6e13cff7 commit 59ce044a7856b16803f7eb0aa5c54cfe6e13cff7 Author: Gleb Smirnoff AuthorDate: 2024-01-09 01:20:31 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-09 01:20:31 +0000 sockets: on shutdown(2) do sorflush() only in case of generic sockbuf This is a quick plug to fix panic with Netlink which has protocol specific buffers. Note that PF_UNIX/SOCK_DGRAM, which also has its own buffers, avoids the panic due to being SOCK_DGRAM. A correct but more complicated fix that needs to be done is to merge pr_shutdown, pr_flush and dom_dispose into one protocol method that may call sorflush for generic sockets or do their own stuff for protocol which has own buffers. Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D43367 Reported-by: syzbot+a58e1615881c01a51653@syzkaller.appspotmail.com --- sys/kern/uipc_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index efa349d140ff..3409a7085df6 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -3007,7 +3007,7 @@ soshutdown(struct socket *so, int how) pr = so->so_proto; if (pr->pr_flush != NULL) pr->pr_flush(so, how); - if (how != SHUT_WR) + if (how != SHUT_WR && !(pr->pr_flags & PR_SOCKBUF)) sorflush(so); if (how != SHUT_RD) { error = pr->pr_shutdown(so); From nobody Tue Jan 9 03:08:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8G8r0l6zz55qSq; Tue, 9 Jan 2024 03:08: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 4T8G8r0FyLz4bxC; Tue, 9 Jan 2024 03:08:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704769708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zJmk4fP67Kl7W1PRY66o4zY+I/yiyN9Qpo19KL+M5AY=; b=ah6fEKetGwQD+4RwThlCrpcsY8BZ1ea7NgeAtkHpRzLuSaiymgx6Vgbzk5IKngE2j/1utf Rq+M0UyRtgwa9xCg7lEIkQCIJitznlcVMW4rCJgnM7QZId3pgvX6R4jsQZXnGx26884FPl LVQJh0jf6zP/lwcecxap6m07g305GMX9Ph98DaCF3M/768eI1VUp3Ko2ZpkcS78qPos75+ kk+XzJpAcWskDeYWy7pTMc/UAkYib3W5Xw8Yh7WlUVA+aAYmu6cDHnKnQKC3GOOtkCUQiX 0gFk+BL5OtdeiT16Tsz2OpK3pyGBuNCeM2pB2yh/QoCQCXpUsHsIiP8A2paCTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704769708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zJmk4fP67Kl7W1PRY66o4zY+I/yiyN9Qpo19KL+M5AY=; b=gtDWnKnUV1I1XBQjVxV3iqoqLHBF7jZ7l9S5bEbI9jA2JRg6IueGo+edk3fK9bgulIirsp 1EZ62YKTHMQC2B1zo+qaO1iVVrzVxuWOjEO0OMxzYO0VYMzzJ3/z1SOB2lxT/Wc9A7858X 9hBCgq4jn9XmntX+is1Klpyuk632squ03G9BYvYoRsokxDGQ96ZBUSu9CEYLIm+xuAM+KX sq4ZfrMqkvFuv+pcp1GLmM/IsTPtip/1uDTvwKz6cMicFzTenAZgXFfDDRRAuD0m08kHa/ F++9Rkoo1WfaBx5f6lIjFIGhK478nIPMWIGNIZXVhAyAfihN6vUiz0K/vLbUoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704769708; a=rsa-sha256; cv=none; b=hYosPjisklVg7UGTdUu2HQfkPcqTru8uzKKyygRwzHK+25kx3kXms7ajD1kJRxHOW2OQNp fuvjS7JshsRfL2JhcMAec/hnxS4vQ05MZ2N/51aT2X4TQqFwwFIct7ZfD954BMm5jS3PBm eg6fcXfjV8gNO4k3O0KLizi6syEKx8057+jYXMysgSACbCeJGqGz0kjF5XbOS5a3SB/XdQ WFUwntLQ3WzZG3HLcsZGh3ivT71anjPoD0PmUSgOuQeVareJZh4++aZPXyozIQgt8Lh/kz R97ZSnuewls9ZhpCdQrjcbo9NUt1iotxeWEtjhlnYzKPGR/ap1l1lPgbs7rDCA== 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 4T8G8q6QWZzZNW; Tue, 9 Jan 2024 03:08: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 40938RK9082383; Tue, 9 Jan 2024 03:08:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40938Rm4082380; Tue, 9 Jan 2024 03:08:27 GMT (envelope-from git) Date: Tue, 9 Jan 2024 03:08:27 GMT Message-Id: <202401090308.40938Rm4082380@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: cef5e56f3fea - main - bhyveload: add CAP_SEEK to our dirfd rights List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: cef5e56f3fea33d6c421276af49f2967453ad4ff Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=cef5e56f3fea33d6c421276af49f2967453ad4ff commit cef5e56f3fea33d6c421276af49f2967453ad4ff Author: Kyle Evans AuthorDate: 2024-01-09 03:08:16 +0000 Commit: Kyle Evans CommitDate: 2024-01-09 03:08:16 +0000 bhyveload: add CAP_SEEK to our dirfd rights In the case of hostbase_fd, this is infact a bug fix; we have a seek callback that the host: filesystem may use in loader, and we really don't have a good excuse to break it. bootfd-derived fds will only be used with fdlopen(3) and rtld doesn't seem to need pread / lseek at all for it today, but there's no reason to break if it finds a good reason to later. Suggested by: markj --- usr.sbin/bhyveload/bhyveload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyveload/bhyveload.c b/usr.sbin/bhyveload/bhyveload.c index 4d89393424f4..5250e2120938 100644 --- a/usr.sbin/bhyveload/bhyveload.c +++ b/usr.sbin/bhyveload/bhyveload.c @@ -755,7 +755,7 @@ hostbase_open(const char *base) err(EX_OSERR, "open"); if (caph_rights_limit(hostbase_fd, cap_rights_init(&rights, CAP_FSTATAT, - CAP_LOOKUP, CAP_READ)) < 0) + CAP_LOOKUP, CAP_PREAD)) < 0) err(EX_OSERR, "caph_rights_limit"); } @@ -887,7 +887,7 @@ main(int argc, char** argv) * to the more usual lookup rights. */ if (caph_rights_limit(bootfd, cap_rights_init(&rights, - CAP_FSTATAT, CAP_LOOKUP, CAP_MMAP_RX, CAP_READ)) < 0) + CAP_FSTATAT, CAP_LOOKUP, CAP_MMAP_RX, CAP_PREAD)) < 0) err(1, "caph_rights_limit"); } From nobody Tue Jan 9 04:22:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8HpW3TQCz563lH; Tue, 9 Jan 2024 04:22: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 4T8HpW0S09z4lcn; Tue, 9 Jan 2024 04:22:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704774163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wU2aXlIUnITOmDVvHe/b8tN40+Aw9cSKP6Ik6/afJgw=; b=GhhNo6Te/qGd96wt17IP0NhPYmABuIugcF5NFfuOBY3upKw5z+y7UxC/b4blNebLIi87SM NXaDrgP1tysQEF3P3sWfhDRduP7C6GC89wLJnuRrRSIh41O3JeyRHqW/Q10KEs9h+4TU4O vJJlZWfgtY+tKzmBrrnOTScGepnQdli0eseXhc84LyG03olsPGzrstHf8ki2lwJln4LDfg YenLC9x+kA3/5G9uLoKeuRaCj1DPmf0DF95TBhZsbBX/CzE84TXT4Mk7M9ZGJ8AuSR9+9A sedl3xqVut/IGIajlNlIFiOyETfI/xCJe9xDaLQ7E8TobTLlcN0wWNMv8bRTbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704774163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wU2aXlIUnITOmDVvHe/b8tN40+Aw9cSKP6Ik6/afJgw=; b=EIrmP+8KJyEpbhdyYJ5VLWPmwEmT4UiOpafdue/6sMOrc07gks3mTGUa1UuVNNcneSaVc7 ac6v8cqYEvGiuOQk4hSXziXWcUACUyKq+q6eVnuY1JsoVi7rXWH7rQkF/FT/0p/97roUXv /gNkvvc5Hm71jMaK5LNgayRIGMIS3GkzklghepgvfPIr0uRSvqTvPvi+dnkTOW/nfHH6Z6 BZKIPMusDOZwCYzF5rdI3S6+m7Uqh74fNVo+RaKzkCv/9eyp5gA2OLLQWD8Bhrn2BoVmeu 1/exavkD7vdm9XkLaqkA/xRAieil8vpfV6eovhoPEKwBCcgtpFxoETSKGAgYyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704774163; a=rsa-sha256; cv=none; b=ZyJ5d/+/KztBZGPY36KK9QabdCP0WULvqdA/kifeMbbqY8wbYWw27mCp7ALkYfHhW6pO9K HRpfiKGaEZmgv4/TJHMWfFUyxG8T+e6fRlyEezazYIKE8h3I84WhBcmMiefExWuCaUVmeN OippB6v5AileWPGwdz2BZAdt7iBt8KX4EY0MfL60TVsWu0P/9Rod36jVdmYOEJF0fUZYLn abcwCKYACnHEbuvfXk7uYlrGFwBvENtnEZXfglrX9pD+gsDFSfrq2ll50wRFKqW69dIltC mEfn8ktnGAzpCFrfNlml/16IZw3NHRfXsXDtgherCFH1V1Gz6G+7daEI3QRlEw== 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 4T8HpV6dwRzcHc; Tue, 9 Jan 2024 04:22: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 4094MgEW015281; Tue, 9 Jan 2024 04:22:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4094Mgd3015279; Tue, 9 Jan 2024 04:22:42 GMT (envelope-from git) Date: Tue, 9 Jan 2024 04:22:42 GMT Message-Id: <202401090422.4094Mgd3015279@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: 5d1ecf0b6184 - main - build: only inspect the first word of toolchain tools List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 5d1ecf0b6184748a51bca01b497c808c3e13aa67 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=5d1ecf0b6184748a51bca01b497c808c3e13aa67 commit 5d1ecf0b6184748a51bca01b497c808c3e13aa67 Author: Kyle Evans AuthorDate: 2024-01-09 04:21:36 +0000 Commit: Kyle Evans CommitDate: 2024-01-09 04:22:25 +0000 build: only inspect the first word of toolchain tools CC/CXX/CPP/LD may all have arguments supplied in various circumstances, which break the logic here. We only need to determine which of these tools we're expecting to invoke from PATH, which just requires examination of the first word. Limit our scope to exactly that. Patch suggested by: jrtc27 Reviewed by: imp, jrtc27 Differential Revision: https://reviews.freebsd.org/D43372 --- tools/build/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/build/Makefile b/tools/build/Makefile index 187d5593564d..e60c8694d56d 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -370,9 +370,9 @@ _WRAP_HOST_TOOL= ${_LINK_HOST_TOOL} .endif .for var in CC CXX CPP LD .for X in $${_empty_var_} X -.if !empty(${X}${var}) && !${${X}${var}:M/*} && \ - !${_toolchain_tools_to_symlink:U:M${${X}${var}}} -_toolchain_tools_to_symlink+= ${${X}${var}} +.if !empty(${X}${var}) && !${${X}${var}:[1]:M/*} && \ + !${_toolchain_tools_to_symlink:U:M${${X}${var}:[1]}} +_toolchain_tools_to_symlink+= ${${X}${var}:[1]} .endif .endfor .endfor From nobody Tue Jan 9 10:19:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8Rkl1tH7z571dR; Tue, 9 Jan 2024 10:19:59 +0000 (UTC) (envelope-from olce@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 4T8Rkl0Bjrz4V4l; Tue, 9 Jan 2024 10:19:59 +0000 (UTC) (envelope-from olce@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704795599; 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=z3YdflRZyBSeEL44OapQ6KDY+nqS8MTIvxlJ++jaaM4=; b=YtmYIDqeQM+9EjgPgNB+3cPfy0tPR/YMr0onQC1UNC5ZKWRIK/k9YpSKxfRw0t/+P+MS0o pE3xXGW6/mHzrh+BlJSSszktUR77ory4hcKQt74egVB5hmW0bKBNjYhDCyfa/tiDjJ2wpf M//YLtUwy9tfOSVxWFuCCh29XppTpDSy1KNO/XtpkvHgbmO/AyUO8GfXT0QNBXqlkSrNvq hRwYXFdjUe1czGHWz6YaJBFgM/tVxeuCQxSJBWW31YgZJ41vdUUzr+txSxQOSbY4nd63Ep BPYxhQnN2+R1SPxMaGs+GNp0cRLKPzbR2CPESNpJjNYbQsbu+B6pHTTjkMTu/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704795599; 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=z3YdflRZyBSeEL44OapQ6KDY+nqS8MTIvxlJ++jaaM4=; b=AqQDxxML7bnyBQGiO0HsKVPGS/d9uYbMHYrUXJO56rNgpXT+GJ7tv7V9wm1jHwM1T+9MH3 B2xqEdia9xhl3B2PsZVUWFIcc5OGCcT5I6xiKQGuedoq5h4KawDjH6UDmxz5Qzj5+h8qLi bhrfkz2Cwa+aIiJrNb3P3QgSukzdIWqVTME158HhmN9abbVjTjd9wvKbKxptM/Ybv0EDgO Nvk2u7RTlhOdrQp6XxaAzTcVDVlsJwggvZLRd/5k4uBEjLLwFzR6e0R9ZbolAb0jeuWTwz amNljoRoV/eEUOF+EYQZ1Yz7OKtxBFtzdoOKcLk1MWHZkgkcTos0l9x+z3K8Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704795599; a=rsa-sha256; cv=none; b=ga4dDMWQ4805mi2UIGlbib80kHGNpYNsnroy5jtb2Qk11FWg8qfK+Qiv6gwE37nRmBqu1a qK2GwQWuF3nMm5PRivJpJDEWSt7Qv1OGurFo6Cio0pEV8g4BDNJjNqC6fsu43m6sytcOTx 3v0KEBkGsdLd6X5x3iBKVwf05X0/PieMks/vU9uv7JcYN1hTSEQuChnaAX7kJarCzyr9ji IFKDVOup8bUINY6bs/alGDJZORq9ZIxqj/uuKmvCfL92BFO0iUOt0NdGBq7TSL8XDghwAB eWCvm0pJ3vHYQBN+8N7YtE/RCVxQjSLkDOo7jchMC3CKcB0zt5F6lage5SR7xQ== Received: from ravel.localnet (lfbn-nic-1-525-172.w90-118.abo.wanadoo.fr [90.118.140.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: olce/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4T8Rkk1qXmzJw2; Tue, 9 Jan 2024 10:19:58 +0000 (UTC) (envelope-from olce@freebsd.org) From: Olivier Certner To: Xin LI , Mike Karels Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2f036705f337 - main - Document the two recent newsyslog(8) change (-c option and configuration option). Date: Tue, 09 Jan 2024 11:19:48 +0100 Message-ID: <2683023.poxlI1A5LX@ravel> In-Reply-To: <90D0905E-AA46-4351-AEE0-9ED9D835DB50@karels.net> References: <202312290846.3BT8kOiO029918@gitrepo.freebsd.org> <90D0905E-AA46-4351-AEE0-9ED9D835DB50@karels.net> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart6134885.r39cKavRk3"; micalg="pgp-sha384"; protocol="application/pgp-signature" --nextPart6134885.r39cKavRk3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Olivier Certner To: Xin LI , Mike Karels Date: Tue, 09 Jan 2024 11:19:48 +0100 Message-ID: <2683023.poxlI1A5LX@ravel> In-Reply-To: <90D0905E-AA46-4351-AEE0-9ED9D835DB50@karels.net> MIME-Version: 1.0 Hi, Sorry not to have gotten to that earlier. I had initially expressed on IRC that I found the newsyslog changes great, = but now reading Mike's arguments and proposals I have serious doubts on the= current approach. > Sorry not to have noticed this in the review; it was only when I saw this > message that it sunk in that we now have *three* ways to specify compress= ion, > and I'm not even sure what the precedence is. I would have thought that > would replace -c. It's a mess if the config file has entries > that specify J and X flags as well as none, the config file has > zstd, and the -c option is given as well. We now have a knob > to override the knob to override a knob. The only reason to keep -c that > I can think of is to specify a different compression in a single invocati= on, > but as noted, changing compression requires manual operations that make > it unreasonable to change it invocation by invocation. I agree. Two possibilies that I can think of from here: Remove '-c' or mak= e it enable compression regardless of the log files' individual settings. =20 > I still think it would be much better to add an option letter to select > the default compression as specified by . This would eliminate > the need for "legacy", and it would add the ability to have both a global > default and an exception. I think the redefinition of the existing flags > to have different meanings if is given is messy. I didn't think about that at first. I agree. If people want to be able to override compression settings globally, which = I find useful, one could introduce another directive such as taking a boolean to request to apply the option regardless= of the individual compression letters. Another possibility is just to rename "" to ""= (so, this time, not a boolean) and keep its current behavior. This would = match one of the suggestions above about '-c', but then there's the questio= n of which one takes precedence, and I think that the command-line specific= ation should prevail (for practical purposes and POLA). =20 > The entry for -c says that we plan to change the default to "none" in 15.= 0. > Hopefully that would be done via and not -c. However, there > was significant pushback on "none" being the default. I think the default should be "no ", i.e., no directive.= This may plea for having "none" mean "don't change anything" (as if the d= irective wasn't there) and have something else to deactivate compression, s= uch as "no_compression" (which is really an override). If "none" is confus= ing, then just forego it completely, and have 'newsyslog' plain fail on it = (but keep "no_compression" as just described). If there is consensus, I'd then change the 'J' flag currently used for all = log files to the new chosen flag for generic compression, and have set to "bzip2" in a first step (for POLA). Then, it could be c= hanged to something else, e.g., 'zstd'. Setting it to 'none' seems to me the worst solution (but far from being the= end of the world). More deeply, I remember having seen at least two claims that using filesyst= em's compression is better, without arguments. I don't agree with that in = practice. The only advantage of in-filesystem compression, besides the adm= inistrative simplification that you can also get with the override above, i= s to get O(1) random access to big log files, and I don't see any compellin= g and common use case for it. You certainly want to get to the end of the = current log quickly, but that one precisely is not handled by 'newsyslog' a= nd stays uncompressed (at the application level). When you want to search = for strings or patterns, you have to grep the whole file anyway. You may w= ant to immediately reach the end of some historical log file, e.g., when ma= nually going back in time from the current log, but this should have neglig= ible latency, and if it doesn't, than just use more and smaller log archive= s. Same thing if you have a more sophisticated setup with an index of log = text: Jumping to a particular location in the log file should have negligib= le latency, else apply the same recipe. If your setup with index requires = a single, never rotated, log file, then you're not even using 'newsyslog' i= n the first place (or should not). Although I agree that in this case usin= g a compressed filesystem (or a randomly accessible archive) can make sense= (if your index doesn't already cover the results expected from your search= es), I very much doubt this is a common setup. Moreover, using in-filesystem compression can lead to degrading the compres= sion ratio, since the compression method on ZFS is chosen per dataset, whic= h includes a bunch of other files and use cases preventing the administrato= r from choosing the best, and slowest, compression methods. To avoid this = problem, one can use a separate dataset for /var/log (anyone?), but changin= g this on already running systems is a greater burden than just changing th= e compression settings in the 'newsyslog' configuration files. I'd like people who disagree with this to present arguments for their case,= if for nothing else to share their experience and best practices on log ma= nagement. Thanks and regards. =2D-=20 Olivier Certner --nextPart6134885.r39cKavRk3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmWdHcQACgkQjKEwQJce JifhlA//ehOBZnBNEhdAuixFk+drmEXD5UMclOJZV84mpsZRH/McOZ6dKs1Maq9M 91gvyQI3waZADOWkPkE1iyTywm1GgpvUq7JuQ1QzITOLPl3shQCgn6sxUOCNG4ly wKh/L6w5bvAqaFN8zj/RBpSeXfPADFowZ7tUNPZQlr4sGpMO34fp0KEL29rQQVxI wyPTEepfYDDewhxtOOPwJXs3uwMfS3UHAHlnZv0FjYH/oEPXF2plc5X1mDuw1SGg nFE2kRrfA1kZf8yu4XspLRZ/ADaCHko0xw3DE11gxMElQ/9QKZ3vk1yOwtim8UVN h4maCUVo6QHylbIR8nhDu+VdSBZb2wavoVFom7zfBd5xWgzzzBKRVc48JSMMqXMb aRi8Jk4fDQqZ0heH5abtE8R1sFKxDojYHj57hKJXZvcrs7jEqwdL8N1UT4MHGbyA b9E0iroTdcDD7EGvm7wd3z24bPb9pj5mJ1XOa5CYvPqSlNMpAfxTlu/041is3xSh 82+mT2UckYtVlp71xzDFipFZ5sLdwZD8/JkD6yojzN7CphhsBBf+dbVzDi2KqZzP SR/7xr6+J4cqZlRXIPFL59aNLcwIBBg0hcjBc6T4yiG/qf85fvMbxveQI7tHz18g Gpq4izGlh/UFmXz91BoAn1FV7D/zzELTfrUbynLBsNM69MSz7/w= =PJpJ -----END PGP SIGNATURE----- --nextPart6134885.r39cKavRk3-- From nobody Tue Jan 9 10:31:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8S0Q1Rb4z573RB; Tue, 9 Jan 2024 10:31: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 4T8S0Q10KSz4XVH; Tue, 9 Jan 2024 10:31:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704796310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A7FAwSBkj60VMMKIHbRI2S3WUr6Bt138eDrkMLWmol8=; b=ktyIO7qL9NPAK+mRPvUmmeDrPfEuRJQCQvMIJ3QDDLr0YaeITLE8Rjc4Yn8GFLKkYKd4uh tnYf5QhmknP4rQw8Z4R2vrBOZw8IhjHXWL9o0M+ZX1lf84FSzRAYNTABleghq7OvWB4Q/e UWerlnqOftW4hFpVKLLltjsOH0P+pX2dwPzvcHT4IIbT8bdiE9nxnX0td9wnxcNIkTeWnA af3AlicgiDIFiCDSxtcE+j5LVscasoBMLW0e17BDhJm3Wh3jxOkaifZ0kqlTCGT3rwkqWx rbq8ON+TlloGP1Vfpvj/KODGizYjeP/QC46CGCQ0WBf/gGzfpdg9evmKAcQHbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704796310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A7FAwSBkj60VMMKIHbRI2S3WUr6Bt138eDrkMLWmol8=; b=V8NaFQJqgLuN5oONUBQI64bi+nkjpSZAGIWYmeHqn+A7KLxA83yFj22094k1/Py6dqo5bi XC2QOGs8XwpfahJwxxmp0DOBbcxSItD41lTRg0uSl2sy5LXcJdhtBwvhGuGnkqVMBOsI82 3Kjo0JxKbd9r6Fa/15er3LRHHKYV1qP/tLstK2YYUiVIHfGMaAHUhdeL1UVtItUnFdt6sJ ijTnN7F0etR6anU5dTs4soEj4evcV1YLTIwZFGVu7SMYwr/vrVPNR80xfUXCvGwOkOm+tx hoZzebHdb/fg3ifMcv+tKU23tQhQXSbNWFrOOUduDX/1VW0XL7DzJh0bH14kIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704796310; a=rsa-sha256; cv=none; b=OPR1/3V5C2MSHFG2DXloQ0sh46G1d1TFjxdbM54YXQ8xp11cgaHsdpfPSnX4PLA1mcPtkN lcDVwPyzKjWyps3VDXyfU5ZOmnb1sIqRqSZKBKq6NjxTZ8OYhtmeA4ViXB3n17xvmXMrOk vI5gyhbbNFt3SRZ2JGC3M0VYPHbOM5QfOD1OmOkFmgBeWqzkE3tPLp+dFycFtJNE1XQnOv j2xaCAYRGKfc5rOj+21QwbP6nrk8RwS7VQWR1DL3GfBJeDLmGZc8ZrijPfBOsQrXMpTlpS aimacZuJ+ofTe85QkqTMpgeM4jAlvT9UlL2YvSTPL5c1gWZ61J5/OuR1pnmaWw== 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 4T8S0Q05PJznK5; Tue, 9 Jan 2024 10:31: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 409AVnwc036130; Tue, 9 Jan 2024 10:31:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409AVn10036127; Tue, 9 Jan 2024 10:31:49 GMT (envelope-from git) Date: Tue, 9 Jan 2024 10:31:49 GMT Message-Id: <202401091031.409AVn10036127@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: f1bc2f67a3e0 - main - stress2: Reduce idle time. Remove debug output List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f1bc2f67a3e0dd5120c3345c11bd3205b4348b8a Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=f1bc2f67a3e0dd5120c3345c11bd3205b4348b8a commit f1bc2f67a3e0dd5120c3345c11bd3205b4348b8a Author: Peter Holm AuthorDate: 2024-01-09 10:28:26 +0000 Commit: Peter Holm CommitDate: 2024-01-09 10:28:26 +0000 stress2: Reduce idle time. Remove debug output --- tools/test/stress2/misc/mmap10.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tools/test/stress2/misc/mmap10.sh b/tools/test/stress2/misc/mmap10.sh index a29768c36691..0bb7845f4d15 100755 --- a/tools/test/stress2/misc/mmap10.sh +++ b/tools/test/stress2/misc/mmap10.sh @@ -40,18 +40,22 @@ sed '1,/^EOF/d' < $here/$0 > mmap10.c mycc -o mmap10 -Wall -Wextra -O2 -g mmap10.c -lpthread || exit 1 rm -f mmap10.c -daemon sh -c "(cd $here/../testcases/swap; ./swap -t 2m -i 20 -k)" +daemon sh -c "(cd $here/../testcases/swap; ./swap -t 2m -i 20 -k > /dev/null)" +ulimit -c 0 sleep `jot -r 1 0 9` for i in `jot 2`; do - /tmp/mmap10 & + su $testuser -c /tmp/mmap10 & done -sleep 300 +start=`date +%s` while pgrep -q mmap10; do - pkill -9 mmap10 + [ $((`date +%s` - start)) -ge 300 ] && break + sleep 2 +done +while pgrep -q 'mmap10|swap'; do + pkill -9 mmap10 swap sleep 2 done wait -killall -q swap rm -f /tmp/mmap10 /tmp/mmap10.core exit 0 @@ -76,6 +80,7 @@ EOF #define N (128 * 1024 / (int)sizeof(u_int32_t)) #define PARALLEL 50 +static int debug = 0; /* set to "1" for debug output */ void *p; u_int32_t r[N]; @@ -169,7 +174,7 @@ tmlock(void *arg __unused) if (munlock(makeptr(), len) == 0) n++; } - if (n < 10) + if (debug == 1 && n < 10) fprintf(stderr, "Note: tmlock() only succeeded %d times.\n", n); @@ -193,7 +198,7 @@ tmprotect(void *arg __unused) n++; usleep(1000); } - if (n < 10) + if (debug == 1 && n < 10) fprintf(stderr, "Note: tmprotect() only succeeded %d times.\n", n); @@ -215,7 +220,7 @@ tmlockall(void *arg __unused) munlockall(); usleep(1000); } - if (n < 10) + if (debug == 1 && n < 10) fprintf(stderr, "Note: tmlockall() only succeeded %d times.\n", n); From nobody Tue Jan 9 10:31:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8S0R4ThKz573kB; Tue, 9 Jan 2024 10:31:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8S0R1ccCz4XVJ; Tue, 9 Jan 2024 10:31:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704796311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mb0ZGZV/xAkcLrFc/emoook+fBnjOBeGsIfEmbZsYNg=; b=An38guzulnHMMKqUsYLFCQTSKz3FTWCQXDEnU5XFILgewDOGLYSjexneAuF3NdKXZBKdiZ D7d7wttwdbTgbM5C8QRoUU+fvbTIOrcszCkaf0ANfyf1CKh07x93lsy08kZ2lUVb1H6GAq WXuL21e4C/2SpAFa/A9zKkxJXc7rPCNxEr6fMPt5doWwMRy3ZuTbe5pOiZM59X9hZySTHo NetLu613eJLQEI43dGsc7E+rFA/Y8eWUrJN1d/jFPIXjgi0f9J7tultvVHiVa1/T4Y0pBL OFjBgp7LN+FRfjDuzfAyAwW+0vOA860Vl6IN0BN2kiLCSzwBna8K3TFZwyUegw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704796311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mb0ZGZV/xAkcLrFc/emoook+fBnjOBeGsIfEmbZsYNg=; b=GLEffbP4gwQy6YmJP05WQ0/TlDR3cB7h75xD+Q51mx9dcGDtc0jDH39fpxHFEM2dxme6uW FiPE4WGXUyYV7XMQXs8qd5vDbP7+43xtkr+tx9yjcOF//hPYJb0Xx//n6crJ51jwBgxUMc 34pKwdcbtiys1umhcHoCmCLFZioZQLWYdr/6cJGwRmsiUuwL+E75u6UWu60f9M0BBdYR/q bH4F38FMexIOiFeVk27D+0c0LW2G1/eW0/ouCl1MwSHVqZFa6YssjOM5bmAcRXjNcmLNVb yVfwf+SdhljxO0/w4dGUKayyK6Jldouz99qOvmEd6wY7WXjM212C3b1ivZa7QQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704796311; a=rsa-sha256; cv=none; b=C2tdM0XVv067em7kf0Q8MKWdA3Dg8ABAmgSNje+Nn1dpDtxT9yhg0DQQfFUwfsaY2ROJjv aAmD0fUN8qyHhWfAh/81eeVyjsWIOQiJ7QwvrwEtyoksWc7QhfkkB054Z4JRLMW7XdQnPt c+aUPfCCr0eU3cgyNiu2gUPXFdO5aKP1JxcjK4AJWtjF85JtQT3ZqAe2EhJYmTNlK04CO2 GNCD/9fg8mzK3IybqXKbE/QWiZ6mAua4d212JQz8EKLLzG3cRZYYnl7Vgijj5ToFRvPVGi OLffx10hb3UwPxcCKjP6NE7QYzg8++jKU9Ob+X/Qma+eXif1bRDit+bD05+vRA== 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 4T8S0R0j8Tzmg9; Tue, 9 Jan 2024 10:31:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 409AVpIN036172; Tue, 9 Jan 2024 10:31:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409AVpbu036169; Tue, 9 Jan 2024 10:31:51 GMT (envelope-from git) Date: Tue, 9 Jan 2024 10:31:51 GMT Message-Id: <202401091031.409AVpbu036169@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: bd9ddbc9cd25 - main - stress2: Remove useless test scenario List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd9ddbc9cd2543a417b22ca3f7705ed4e4eb59ca Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=bd9ddbc9cd2543a417b22ca3f7705ed4e4eb59ca commit bd9ddbc9cd2543a417b22ca3f7705ed4e4eb59ca Author: Peter Holm AuthorDate: 2024-01-09 10:31:05 +0000 Commit: Peter Holm CommitDate: 2024-01-09 10:31:05 +0000 stress2: Remove useless test scenario --- tools/test/stress2/misc/vmstat2.sh | 41 -------------------------------------- 1 file changed, 41 deletions(-) diff --git a/tools/test/stress2/misc/vmstat2.sh b/tools/test/stress2/misc/vmstat2.sh deleted file mode 100755 index f258b43719bb..000000000000 --- a/tools/test/stress2/misc/vmstat2.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -# -# SPDX-License-Identifier: BSD-2-Clause -# -# Copyright (c) 2019 Dell EMC Isilon -# -# 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. -# - -# "0xFFFFFFFFFFFFFFFF in vmstat output" seen. - -(cd ../testcases/swap; ./swap -t 2m -i 20 -h -l 100 &) -sleep .5 -s=0 -while pgrep -q swap; do - vmstat -z | awk '{if (length($4) > 11) { print $0; exit 1}}' || - { pkill swap; s=1; } - sleep 2 -done -wait -exit $s From nobody Tue Jan 9 11:15:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8SzB2S4jz578jy; Tue, 9 Jan 2024 11:15: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 4T8SzB1bKVz4gmm; Tue, 9 Jan 2024 11:15:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704798950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m7SZqTYF1QVxS5z5pmt4ZtU9gPI4VcNjMgxvzlwBaho=; b=EiRpb4UytJJQBnMaHmkfBoCkBRnkvmFylBJrM7GoNSXUHJvmoPVSOF87bU0iX7FW1ie3g+ mI48Y0nK3QDkJDrivtdjmYELYo02lxiKGbJzmIFEw12LJTDiVeLqgEP0rgcZOyH3fdjJu7 VYrE1wIFAte5Q2lz84ypJMagpnWMxsFn9smAgt8byWA6fQ32C0bxcD6ySgTX0jBclzUbg6 n0w1oJvyLfRzPF19mYBLKoNuLblzVpVVTa37k73Bq8ksBToYljc30nABoMSxE8CztCUdyd X0UeKHID4/PxqecCI3K3y/AciYaciadSiFHMkGb6EdAMtH/ogxgWrhRx9Cd0Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704798950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m7SZqTYF1QVxS5z5pmt4ZtU9gPI4VcNjMgxvzlwBaho=; b=xeDpWQeMUm3Vkt5p4Y8spAHQFFD22bIkurf3XcwVdMl15gYsPqOD1G4BkoG9+ZxWZDv0PK 4p+tt4V2Q091s++AEAzPVYwBNjgeB9TYoVqeobPX8bxutmWXLjx8kqTn7G7/8XNA+VbjvZ ODRJqWNmw1QG8NEwASnTxWt/1fiWEQOK8LKnQ20gbNJRhKoXhuTlaz1KfpNybvV7j5vTnK 5q3Y0wRCoufXIpxL+JNdfsUyNDjjTeanQjWGPobA7vzvV9ywiFOr3O3t0BoBZtAfSQ9mRn 8zn3YlvJ5ph1Al/Lejx2hEVdBMq4e09x1Y2/s2VKBaoVzOKcEbtljBYc4EmxwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704798950; a=rsa-sha256; cv=none; b=MZCFk8tO4UICUMdsg+FKTJhIaQv2R4z6di+GUv/yRzthhuIQIHzLIGDP2q1oOb0t34708N 51KiNX7mNhlb014QRhXTSPjQY0BiFmYBT/5ATt29cRh5boxbHLn3gIgBoRA1LVwzU592D2 yMpOEKVQ4fWGZfh0XemasdCE2N5maQLYR7mPn5Sw6IJCy+mAYDPLLvHvAezjMp0t0G69GD aSKxMJeQP2x38WRzEqb1iPOeVV++bp1EHVG47FemhLvFDSih9zhyql3+nWEzFW9EYBMO9m WaX4dx0skomtSM+aC1ntRPvQ9dGsI+XlHv3FFXxPfBXDCf+8YQvBXAIVIL56RA== 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 4T8SzB0f7ZzpbT; Tue, 9 Jan 2024 11:15: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 409BFnGa006990; Tue, 9 Jan 2024 11:15:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409BFnUC006987; Tue, 9 Jan 2024 11:15:49 GMT (envelope-from git) Date: Tue, 9 Jan 2024 11:15:49 GMT Message-Id: <202401091115.409BFnUC006987@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Daniel Ebdrup Jensen Subject: git: c925f0720f58 - main - nfsv4(4): Belatedly bump .Dd List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: debdrup X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c925f0720f58bf6021aeeb4dd1fafbc7421b209c Auto-Submitted: auto-generated The branch main has been updated by debdrup: URL: https://cgit.FreeBSD.org/src/commit/?id=c925f0720f58bf6021aeeb4dd1fafbc7421b209c commit c925f0720f58bf6021aeeb4dd1fafbc7421b209c Author: Daniel Ebdrup Jensen AuthorDate: 2024-01-08 13:36:19 +0000 Commit: Daniel Ebdrup Jensen CommitDate: 2024-01-09 11:14:56 +0000 nfsv4(4): Belatedly bump .Dd I forgot to do it when making the commit, so hat-tip to asomers@ Reported by: asomers@ Fixes: fbbdfa2b8a42 (nfsv4(4): mention the nfsv4_server_only..) MFC with: fbbdfa2b8a42 --- usr.sbin/nfsd/nfsv4.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/nfsd/nfsv4.4 b/usr.sbin/nfsd/nfsv4.4 index aacb85c78ca2..13f4ec942eba 100644 --- a/usr.sbin/nfsd/nfsv4.4 +++ b/usr.sbin/nfsd/nfsv4.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 20, 2019 +.Dd January 8, 2024 .Dt NFSV4 4 .Os .Sh NAME From nobody Tue Jan 9 11:15:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8SzC3FBgz5790M; Tue, 9 Jan 2024 11:15:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8SzC2YKlz4gk6; Tue, 9 Jan 2024 11:15:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704798951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YmGMlkz0THnCtQ45efthSsaT8nYpBt0HeHkFeHmYInA=; b=t9ntiZU/Le5VifDMT0DdEjpO9cZ6zuBVgck8qHNGYgxNWXUIgerVqQ4ElS6fr89peS4Z/8 5wVu8HREi7G45OlKlVbfCoTDYaDLnxnjAbPfSb85GQnHuYTdPf11wmuzdPkMu5vWsNHyab ljZdGDuHkbse9RtoI8c8DIGW/ZtQUebbKEYtWL3NeELwPyZ+sDEcQHeOzckXrjBvQnOJxD N7i1Hbe2brimoTnU1X+6rxPY7R3Ve1m21DKhfbsd92DFQiJnavxa9V+pUGI6rmgLDgFqIL AVO+CrQMYtVaHHsfxIT2ADKK6ug3WvaQpAkW/pIkVleatfoMLCMx4lAGrcq9vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704798951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YmGMlkz0THnCtQ45efthSsaT8nYpBt0HeHkFeHmYInA=; b=etw/xEi3yR1KXk2bXIGau2ezuJXdedzvMKuuxGb2zMO3eE0KwbzTW2ertxUw7mvQJxm/BE NCdKd2QsCA+A4z+KfSXp9dYAojnublkFQ0ZQ4KGH5pcD+5DMW+OOaGCRbfFSYUEfLWf+8t xWye/UGdXdkrLjiHD1p9CLlEwzuQ/84Uyycgcge0mQ4+qsuAinBFgEZFvBjpmIA6WCs32q tpG7/qtDtc49I8lsQRbpOpR0Fvv2TZUPg3lsZN4oFOmIwIGjywzGBQmmsUpe6bv+yz5GO6 8xB8BbMZ/JOX2l2Iv0ztC4vUxgWCeD38cFqaBOqlmgensgHWPnRyHxQkfw8iQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704798951; a=rsa-sha256; cv=none; b=H1I7cKYNDbbbNdll6h+ul6qnlk4R9ug9YBpF1Uc3ZEZmZNcfUEcSAlnOw8x1IoT3iiTmGH cT7ZtngOG5ri0BtPHTWnlXUt97XAsZk8xTKo8HOqKKG+jdytLMypkwW4fzIdyTKPnYlAQp ioyuBQnvoK+BY4doDI9et+1aSg6mWkxBsEM92TEUaZfy2qI50YuXyAjz7fEbYDWNKspT3P q0S7BwEk45/X7yP/wIDBJlaPw23a0Q5v0tBLaz7uy/tvEnAXfYXPH/doGL0A1DCpwINeZ4 9numyv1DRtcYLVLpCy74/cIRNa7CqhYidFXbdUIhqHqkpnfJAgcGtUEHlVgnqQ== 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 4T8SzC1fDBzpZL; Tue, 9 Jan 2024 11:15:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 409BFpuk007044; Tue, 9 Jan 2024 11:15:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409BFp7G007041; Tue, 9 Jan 2024 11:15:51 GMT (envelope-from git) Date: Tue, 9 Jan 2024 11:15:51 GMT Message-Id: <202401091115.409BFp7G007041@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Daniel Ebdrup Jensen Subject: git: 45486372ca8d - main - nfsv4(4): Reflow lines to 80 character limit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: debdrup X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 45486372ca8da6385bee3eaed2f0279c94db0476 Auto-Submitted: auto-generated The branch main has been updated by debdrup: URL: https://cgit.FreeBSD.org/src/commit/?id=45486372ca8da6385bee3eaed2f0279c94db0476 commit 45486372ca8da6385bee3eaed2f0279c94db0476 Author: Daniel Ebdrup Jensen AuthorDate: 2024-01-08 13:50:10 +0000 Commit: Daniel Ebdrup Jensen CommitDate: 2024-01-09 11:14:57 +0000 nfsv4(4): Reflow lines to 80 character limit In belatedly fixing a mistake made in fbbdfa2b8a42, I noticed that igor and mandoc -Tlint had a few more things to say. As such, I'm reflowing a few lines and fixing a contraction. MFC with: fbbdfa2b8a42 --- usr.sbin/nfsd/nfsv4.4 | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/usr.sbin/nfsd/nfsv4.4 b/usr.sbin/nfsd/nfsv4.4 index 13f4ec942eba..e96e507e23ad 100644 --- a/usr.sbin/nfsd/nfsv4.4 +++ b/usr.sbin/nfsd/nfsv4.4 @@ -154,8 +154,8 @@ either client or server, this daemon must be running. The form where the numbers are in the strings can only be used for AUTH_SYS. To configure your systems this way, the .Xr nfsuserd 8 -daemon does not need to be running on the server, but the following sysctls need to be -set to 1 on the server. +daemon does not need to be running on the server, but the following sysctls +need to be set to 1 on the server. .sp .Bd -literal -offset indent -compact vfs.nfs.enable_uidtostring @@ -177,8 +177,8 @@ report a lot of ``nobody'' and ``nogroup'' ownerships. .Pp Although uid/gid numbers are no longer used in the .Nm -protocol except optionally in the above strings, they will still be in the RPC authentication fields when -using AUTH_SYS (sec=sys), which is the default. +protocol except optionally in the above strings, they will still be in the RPC +authentication fields when using AUTH_SYS (sec=sys), which is the default. As such, in this case both the user/group name and number spaces must be consistent between the client and server. .Pp @@ -306,7 +306,8 @@ are set in Without a functioning callback path, a server will never issue Delegations to a client. .sp -For NFSv4.0, by default, the callback address will be set to the IP address acquired via +For NFSv4.0, by default, the callback address will be set to the IP address +acquired via .Fn rtalloc in the kernel and port# 7745. To override the default port#, a command line option for @@ -324,9 +325,9 @@ N.N.N.N.N.N where the first 4 Ns are the host IP address and the last two are the port# in network byte order (all decimal #s in the range 0-255). .Pp -For NFSv4.1 and NFSv4.2, the callback path (called a backchannel) uses the same TCP connection as the mount, -so none of the above applies and should work through gateways without -any issues. +For NFSv4.1 and NFSv4.2, the callback path (called a backchannel) uses the +same TCP connection as the mount, so none of the above applies and should +work through gateways without any issues. .Pp To build a kernel with the client that supports .Nm @@ -354,7 +355,7 @@ It occurs when an nfsd thread tries to do an NFSv4 .Fn VOP_RECLAIM / Close RPC as part of acquiring a new vnode. If all other nfsd threads are blocked waiting for lock(s) held by this nfsd -thread, then there isn't an nfsd thread to service the Close RPC. +thread, then there is no nfsd thread to service the Close RPC. .Sh FILES .Bl -tag -width /var/db/nfs-stablerestart.bak -compact .It Pa /var/db/nfs-stablerestart From nobody Tue Jan 9 12:57:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8WDg1THnz57PMV; Tue, 9 Jan 2024 12:57: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 4T8WDg10fPz4wrc; Tue, 9 Jan 2024 12:57:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704805059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zVruVdWr85vIM9DYTyZ0X9ZSMaeHSGu8EkAnFS6OjQU=; b=WmmGHGeOpukFhctTC1oR0YvZwn4fC3EEacsYu0BuO9Rh/1ZPDRo1zn5p79Kha99Vkx8pTL 14Np0qjY7CH/nVTm2qYcXyrb8aPY8IZoAlV2ihWEUtRinf4rZ8c0r26yRcDpzExYbjfWyF Ywbw3x2K9qEIUaNgl+JfAKAVKRJIr9ncpe7NlFegj8HQfl1v8qHTG98n6A2HKdtEz1QXCn Mv8I71fhnsm3rooT4h2FueZ0G5ZIsxJ/m+FPLTiCkkpC/fTAUamBSIIlmbTdGXgRTvrOz4 E/FYVOWxM2EYy+nxe9czx/tsBh/r7kAmFjHbLwLsjE2hxxri8NhvvV3Df5pLDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704805059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zVruVdWr85vIM9DYTyZ0X9ZSMaeHSGu8EkAnFS6OjQU=; b=gW67XxzXXs2Bs/2v5GVlBAniyCmKkH3UH0yX3bQC6MWKy9umC4TLLRlXXqv7hXvdTAiGfy qbxDefpP9RdbXMjyFJYa5CkxdjGjo5SQYYTw1F0xgsdumqtNTDnVJtaAHIheIyXCvtiNqG srF6Mx/3pd7SqXUle299Kpax3GIMLacZGclDP4GEzeewoar3gX22+BopXT6LIIhqj8K0Dy /9gLh0ct8TF/7kt792zKM1Nl5gzTplSZXcAvmVL21n/0O9AUDNVJJLTCNaPf3pRvq3ue7q YkXdU7CrxJsQ6blvseOJLx3qJcTQmnmvYyDOq8ee/1+MKHkGP5gHh+Fskka0lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704805059; a=rsa-sha256; cv=none; b=Hzu4mO9sw3KCBoijOZkV9m0779XwG7VOkBjbutUP5pfmxsZz1m13bqhyTeR+JDWtO2tvS3 4D92KxE7JrbXM/PI0TsR9EPXYwvSRUoiaFvsz8uTFAMOMeqwlYGlUrfx3RmeF5qT4ZJ+f0 a4g0imTNcPR3nTnJIbtwfnErmSmVflqfbMx0X/MLzm/2NMD2I6d10P+vBjQmpiFbSRDTg+ KvClRjHvTGwl1UiLazudMIq1Jr/fhjQHgazdU4u2uCGCm5y4I0wz4lWbROC8dPKgfbSkN3 wjtr7DIjTbCBsa0DBKPjjP7DudDct5VzFi8hUyYpz6Lvn1azS3nqcywSj0+/Dw== 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 4T8WDg03nXzrhY; Tue, 9 Jan 2024 12:57: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 409Cvcb8075888; Tue, 9 Jan 2024 12:57:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409Cvctt075885; Tue, 9 Jan 2024 12:57:38 GMT (envelope-from git) Date: Tue, 9 Jan 2024 12:57:38 GMT Message-Id: <202401091257.409Cvctt075885@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 541d89067add - stable/14 - tcp: Make use of enum for sack_changed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 541d89067addcc7fec96214225c82e43d2ce037e Auto-Submitted: auto-generated The branch stable/14 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=541d89067addcc7fec96214225c82e43d2ce037e commit 541d89067addcc7fec96214225c82e43d2ce037e Author: Richard Scheffenegger AuthorDate: 2024-01-06 19:07:39 +0000 Commit: Richard Scheffenegger CommitDate: 2024-01-09 12:54:48 +0000 tcp: Make use of enum for sack_changed No functional change. Reviewed By: tuexen, #transport MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43346 (cherry picked from commit 893ed42eca32f7b5e3a5b8cef3f364be0d9cf3ef) --- sys/netinet/tcp_input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 512da877846a..2d7a6fa11b4e 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2506,7 +2506,8 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, goto dropafterack; } if (tcp_is_sack_recovery(tp, &to)) { - if (((sack_changed = tcp_sack_doack(tp, &to, th->th_ack)) != 0) && + sack_changed = tcp_sack_doack(tp, &to, th->th_ack); + if ((sack_changed != SACK_NOCHANGE) && (tp->t_flags & TF_LRD)) { tcp_sack_lost_retransmission(tp, th); } From nobody Tue Jan 9 13:30:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8WyL5MBXz57TVY; Tue, 9 Jan 2024 13:30: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 4T8WyL4YRSz51QJ; Tue, 9 Jan 2024 13:30:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704807018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0R0qFnwZTV5G2Ule9d+O9l8XPiioarJmHliKDA1xl+0=; b=bUJHQb4eJRmwung5l2Vi/5g6EGLLlX0BqzFdi5ulRYADyFjaZy9SbvQJBIF2w3BYxP/fjH 2DF+aMAUTB9MqSfDV5Q5+Kq8mLUC7oo9cjdTEpZxGKFQraiv71vHeVYWFi/rzzHC5cnZMb XMtFLeBqjWfrLdFFT9J/J6pxgg7sUoWrMxmpJ0q70GRpvoZnJrE1sBJOl2JRffsfnaPKhj e1EZXUM4rCFPcZMPtsbkve5up1KFOwBUfJACyf6lI03sumXCBqpni0bTPMnRt2u9sh8+/b CkGSz2tdkeVlfxpOB36ywUUSvkVbaoBkS2ePmjzkkU9lpzGxsJqTlZ1hhMp1Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704807018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0R0qFnwZTV5G2Ule9d+O9l8XPiioarJmHliKDA1xl+0=; b=VQGcK4DLwx9EE8ipgi3SIr+NINA8wNXiEGgNUFVkHJ13JgIP0nTkxa6jf3bndukonAN9Lx XG87FsexP6Ua1D26fnbQFbzdQKoB/TniwuqBn+wJ/tnmXkoEgp1PfQtjHpcd/TptA+lqCR igni5F+JenPPRHIvIpAkPbzVsmUus6VSO628z5Q85Js92TCXXlcFszeUowmtGaTer9eyEY kehEKO18jgC7RSAZPGdpEV2VieoTNLIS+D32fM96oaq1sCBlgea2r4uh6LOpM3B/9YBenZ 5vOmbD/lbkG8E6uDf5C0t/09IfpS18v2QsxTInDEReMa8/jbLKAyenNAgEs1bA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704807018; a=rsa-sha256; cv=none; b=pbutu8ZoOLugInINkP0i8vZI+5VFvbhogo6/N+0Tes2Hv04y0Zv/SlMqLti6mw+/+WiNUV cKcPuWvtPv/ZwdpljXVv6pO3IeeDzlUFprvQuzxr6ZcaKx1BcDedW3Vb+4kZEsDrcVzB4Y /qfHK+5o80/Q4BxxSQ5v3Gkr+1NQnhp8FsLql+1RCM5dnn1lL92Y5QvNIZxmGintIRjJ8b 1ToOq7KiAk6BPQDU02mmNAJIpZVa4MhGkRasbQIxCPQRPuEJIWvvF4KpLGhIdWQba2yipn xKvt3oEzX55Jkircl1I2ihTz3hO7QAVNPYOLwuSbVtDfOLgr5uVCT/AyFf+/Qw== 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 4T8WyL3dhCzsLl; Tue, 9 Jan 2024 13:30: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 409DUIZf035751; Tue, 9 Jan 2024 13:30:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409DUIbv035748; Tue, 9 Jan 2024 13:30:18 GMT (envelope-from git) Date: Tue, 9 Jan 2024 13:30:18 GMT Message-Id: <202401091330.409DUIbv035748@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 4d312aa05141 - main - libthr: thr_attr.c: More style and clarity fixes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4d312aa051414ad77d3515f258230d01ad11d6dc Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=4d312aa051414ad77d3515f258230d01ad11d6dc commit 4d312aa051414ad77d3515f258230d01ad11d6dc Author: Olivier Certner AuthorDate: 2024-01-04 15:10:40 +0000 Commit: Olivier Certner CommitDate: 2024-01-09 13:29:25 +0000 libthr: thr_attr.c: More style and clarity fixes The change of argument for sizeof() (from a type to an object) is to be consistent with the change done for the malloc() code just above in the preceding commit touching this file. Consider bit flags as integers and test whether they are set with an explicit comparison with 0. Use an explicit flag value (PTHREAD_SCOPE_SYSTEM) in place of a variable that has this value at point of substitution. All other changes are straightforward. Suggested by: kib Reviewed by: kib Approved by: emaste (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43327 --- lib/libthr/thread/thr_attr.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/libthr/thread/thr_attr.c b/lib/libthr/thread/thr_attr.c index 0ccc31b22c13..bbb143da1a7d 100644 --- a/lib/libthr/thread/thr_attr.c +++ b/lib/libthr/thread/thr_attr.c @@ -117,8 +117,7 @@ _thr_attr_destroy(pthread_attr_t *attr) if (attr == NULL || *attr == NULL) return (EINVAL); - if ((*attr)->cpuset != NULL) - free((*attr)->cpuset); + free((*attr)->cpuset); free(*attr); *attr = NULL; return (0); @@ -151,7 +150,7 @@ _thr_attr_get_np(pthread_t pthread, pthread_attr_t *dstattr) return (error); attr = pthread->attr; - if (pthread->flags & THR_FLAGS_DETACHED) + if ((pthread->flags & THR_FLAGS_DETACHED) != 0) attr.flags |= PTHREAD_DETACHED; error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, TID(pthread), @@ -180,7 +179,7 @@ _thr_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate) if (attr == NULL || *attr == NULL || detachstate == NULL) return (EINVAL); - if ((*attr)->flags & PTHREAD_DETACHED) + if (((*attr)->flags & PTHREAD_DETACHED) != 0) *detachstate = PTHREAD_CREATE_DETACHED; else *detachstate = PTHREAD_CREATE_JOINABLE; @@ -258,7 +257,7 @@ _thr_attr_getscope(const pthread_attr_t * __restrict attr, if (attr == NULL || *attr == NULL || contentionscope == NULL) return (EINVAL); - *contentionscope = (*attr)->flags & PTHREAD_SCOPE_SYSTEM ? + *contentionscope = ((*attr)->flags & PTHREAD_SCOPE_SYSTEM) != 0 ? PTHREAD_SCOPE_SYSTEM : PTHREAD_SCOPE_PROCESS; return (0); } @@ -321,7 +320,7 @@ _thr_attr_init(pthread_attr_t *attr) if ((pattr = malloc(sizeof(*pattr))) == NULL) return (ENOMEM); - memcpy(pattr, &_pthread_attr_default, sizeof(struct pthread_attr)); + memcpy(pattr, &_pthread_attr_default, sizeof(*pattr)); *attr = pattr; return (0); } @@ -449,7 +448,7 @@ _thr_attr_setscope(pthread_attr_t *attr, int contentionscope) return (EINVAL); if (contentionscope == PTHREAD_SCOPE_SYSTEM) - (*attr)->flags |= contentionscope; + (*attr)->flags |= PTHREAD_SCOPE_SYSTEM; else (*attr)->flags &= ~PTHREAD_SCOPE_SYSTEM; return (0); @@ -546,6 +545,7 @@ _pthread_attr_setaffinity_np(pthread_attr_t *pattr, size_t cpusetsize, if (cpusetsize > kern_size) { /* Kernel checks invalid bits, we check it here too. */ size_t i; + for (i = kern_size; i < cpusetsize; ++i) if (((const char *)cpusetp)[i] != 0) return (EINVAL); From nobody Tue Jan 9 13:30:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8WyM6Qdbz57Th5; Tue, 9 Jan 2024 13:30: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 4T8WyM5g8wz51T4; Tue, 9 Jan 2024 13:30:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704807019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uNcywDGOJElVWHNsNbA40ZclSpMRg0UDqxB3I2lOvq8=; b=IVak+dOx+p62nIkFu0+SMYtzzABt1MqvPQQ2SOh9Gfs2bOmhKvD3zq8KRAH1WxQEIBGgA6 hQrj41s0loiu+qm71F0fOtZ3iHayF0k3t0d3gwOCljDhA7XitA8NgZ7ZLdRCHolxSr71NO 018Fuif7hHDbMIu5b4mN7CVdk7X8BCT8Q7YLULbU0NFHuj9RQ8U2OTFIf0efGiwOdVALvo o+mcxT38vUAjQkn5HPUnjbz5B5bZnF7BRRdiwN31xPYdp2/TkcQzaZ+aXfkAybmID+c8Ef 2SbpQDt59Kas9jqmvlPASFoFaCXuMp4WFX/xkJac4lDl6HXaslf6LJf3RQMplA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704807019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uNcywDGOJElVWHNsNbA40ZclSpMRg0UDqxB3I2lOvq8=; b=vTFNPmo/ffw4+jTB6tHEYW0cYbJevpeD/8jbZriUMh+VW9r8u5q1MgqgMVj/ar77Dx9C2s PMuXTwJ4s5Q4LV5nTjboc3C3ERq0KKiJNZdbC4JsYHoKW0thORo40GYetUmnEy6gMnpCzS v+MKTGP6vcbqmzUC7sNkhXler087ygDNZHQEWWJhMRVvChZrFVS0obE+4skoN+UuC5HrE3 9kQ3Ku/LqzDVndS+8ctTopczSnS7hBuH8t1IOQK6x1B81nOLrEp4zozRMYAkl6Ia4nW/AF 2UtG2Ct/LdzX6rDhVNrGRphQejRNMydMjpocvQc15sohoSrma58hdYVpjPwpIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704807019; a=rsa-sha256; cv=none; b=rUp+DUkU4krME5pN9ZuXh8Px5sKrZXjl5csizp3XyqEvQoJ1yMbIYhxH9pKutrMgm1UOul zqnayf6FgNwQNrsDpU0SaQXSbNOnCO2I3l6B33SFfShVAOGPqk7A/fuMyoCma3wZ52wOOr xYZPnjgBZpD7d0lSPhojfYiaZKBf6/a1nqoN8ielU6LicYXYrxS06+GOdHkkId3VS0aXxs r+jsyNSZ4ocHRhm1vsyJZfOERgiqMrAxYO/nPSczmluyW2NAE3iqWWEoitlLyEDZRNcQY3 o86LoZqAZG1aPQdPpo6RUSQ6M6P4AcgXiowVvif5FaYcYZh1TTo78HanbAKOAw== 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 4T8WyM4l2vzsfr; Tue, 9 Jan 2024 13:30: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 409DUJ8V035796; Tue, 9 Jan 2024 13:30:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409DUJXu035793; Tue, 9 Jan 2024 13:30:19 GMT (envelope-from git) Date: Tue, 9 Jan 2024 13:30:19 GMT Message-Id: <202401091330.409DUJXu035793@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 15bb0300eeca - main - libhtr: pthread_attr_setaffinity_np(): Replace calloc() with malloc() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 15bb0300eeca233827a6a13cd2ed883e0034979d Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=15bb0300eeca233827a6a13cd2ed883e0034979d commit 15bb0300eeca233827a6a13cd2ed883e0034979d Author: Olivier Certner AuthorDate: 2024-01-04 15:20:50 +0000 Commit: Olivier Certner CommitDate: 2024-01-09 13:29:26 +0000 libhtr: pthread_attr_setaffinity_np(): Replace calloc() with malloc() Using calloc() instead of malloc() is useless here since the allocated memory is to be wholly crushed by the memcpy() call that follows. Suggested by: kib Reviewed by: emaste, kib Approved by: emaste (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43328 --- lib/libthr/thread/thr_attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libthr/thread/thr_attr.c b/lib/libthr/thread/thr_attr.c index bbb143da1a7d..561037fa5eb4 100644 --- a/lib/libthr/thread/thr_attr.c +++ b/lib/libthr/thread/thr_attr.c @@ -551,7 +551,7 @@ _pthread_attr_setaffinity_np(pthread_attr_t *pattr, size_t cpusetsize, return (EINVAL); } if (attr->cpuset == NULL) { - attr->cpuset = calloc(1, kern_size); + attr->cpuset = malloc(kern_size); if (attr->cpuset == NULL) return (errno); attr->cpusetsize = kern_size; From nobody Tue Jan 9 14:32:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8YL04Qz0z55QHv; Tue, 9 Jan 2024 14:32: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 4T8YL03Yv4z57n9; Tue, 9 Jan 2024 14:32:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704810744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SF0fq8QVeF/GosYLyejTOf5s/UW7jFFZTjOZe24RLl8=; b=qimItXZPCtxFf9/kNlQCj4uy7WHaSXt2d/7rIULe6SUNv9aZncJzVo138sSkpXGWOsUhcW E2IfH88Vy0taMn3+GeDb6BbSBy4Dp8QyyKVR6ApuH7O4YyNrYDtydcgmNUMRthcKObDPya /UCtJReAM/bSvuqmnHRA4gLG9a5I2TzvNwwcqB0ZdaN6UrdAbm6VpKQ3ed5elDgPqK4eqc 2ZCixVGFX/tBqP2z22h87tLkzCxhtizWXMqDVMFTUa7uw65lH/Cgn7/N9/BrI1jCm+LrKH BJU2bypZNNtVaGCAxbrJpovot2/iYmgOrMLiun+WPAJVgUggxMFbrQweOPZ0Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704810744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SF0fq8QVeF/GosYLyejTOf5s/UW7jFFZTjOZe24RLl8=; b=j2id3HabRh86Z9YHDnc3fS93rfY7owGOthW6JVC+DNZ0lUFx5QO+piU/0a/xoQSKjtoxQH Ehi0l1kjnnkuZrTRh/DaFXhC1XFunTwXj16PFV/N89oHx25kbRQpmHGlhlLJChgY+j67kR SmGYB4OzO+qLMjYyTnqdCi0m6b+9yyy1nY9SRTBVRLb77llbz3SeMVa3iNS+VnCgqshUuU gGu7/IOW/3pG+VeStLqS3wXZtW9sh2X0In2lw/1XB9VmWA05bX23ZrhX6sCJEwzXILRUs8 C4SP47jVXTOUmpyJsQy7543EP6GqkPsVDqxMDDcGuzpxU64f73kyYcdmF1sqmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704810744; a=rsa-sha256; cv=none; b=xdvD0oVWbmWTz4BEI1FUAgMDoJX9Tb9+dypcdykpLnTgWh4FmEKPO5qjTjGvUeMoVTQh5b gYQ3rLEjQ+VTzJHTrGXFHmO+0pqsvobYgeCf307ZnWQhKSEtK+yajjyfx2zHS3yticf63a qKY/3R2ne8C1r1wW9uruIBieZjaL2m0VdXeXbY+f8bNsksbB9WxAJHjiKW5IebMIs3pLw5 9UoKynjsHXAhlHLyyWpzgVMWNrvMtXs5UoyNy133JMpaSYwZLfeS973fODxz2Kc51elVJG jzJJKwczSuHrLpY+j1ZIqgJyQwS3X+OVQnIWmMdcxC6Mh46HQcsqeK3jvUNoUQ== 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 4T8YL02f1TzvJp; Tue, 9 Jan 2024 14:32: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 409EWOmO043708; Tue, 9 Jan 2024 14:32:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409EWOuv043705; Tue, 9 Jan 2024 14:32:24 GMT (envelope-from git) Date: Tue, 9 Jan 2024 14:32:24 GMT Message-Id: <202401091432.409EWOuv043705@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: ddf7fbbb57e2 - main - Intel FPGA: Support programming larger bitfiles. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ddf7fbbb57e271b392d1aea4866bf5df800a7cf9 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=ddf7fbbb57e271b392d1aea4866bf5df800a7cf9 commit ddf7fbbb57e271b392d1aea4866bf5df800a7cf9 Author: Ruslan Bukin AuthorDate: 2024-01-09 14:18:53 +0000 Commit: Ruslan Bukin CommitDate: 2024-01-09 14:18:53 +0000 Intel FPGA: Support programming larger bitfiles. Issue data claim command after every chunk of data programmed, so we can reuse the SVC buffer for the next chunk. Tested on Terasic DE10 Pro. Sponsored by: UKRI --- sys/arm64/intel/stratix10-soc-fpga-mgr.c | 82 +++++++++++++++++++++++--------- 1 file changed, 59 insertions(+), 23 deletions(-) diff --git a/sys/arm64/intel/stratix10-soc-fpga-mgr.c b/sys/arm64/intel/stratix10-soc-fpga-mgr.c index 177fb694c870..baa35b9a85a6 100644 --- a/sys/arm64/intel/stratix10-soc-fpga-mgr.c +++ b/sys/arm64/intel/stratix10-soc-fpga-mgr.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2019 Ruslan Bukin + * Copyright (c) 2019-2024 Ruslan Bukin * * This software was developed by SRI International and the University of * Cambridge Computer Laboratory (Department of Computer Science and @@ -32,6 +32,9 @@ /* * Intel Stratix 10 FPGA Manager. + * + * FPGA Programming Example: + * dd if=cheri.core.rbf of=/dev/fpga_partial0 bs=512k */ #include @@ -57,7 +60,7 @@ #include #include -#define SVC_BUF_SIZE (2 * 1024 * 1024) +#define SVC_BUF_SIZE (512 * 1024) struct fpgamgr_s10_softc { struct cdev *mgr_cdev; @@ -109,12 +112,45 @@ fpga_open(struct cdev *dev, int flags __unused, return (0); } +static int +fpga_submit(struct cdev *dev) +{ + struct fpgamgr_s10_softc *sc; + struct s10_svc_msg msg; + int ret; + + sc = dev->si_drv1; + + bzero(&msg, sizeof(struct s10_svc_msg)); + msg.command = COMMAND_RECONFIG_DATA_SUBMIT; + msg.payload = (void *)sc->mem.paddr; + msg.payload_length = sc->mem.fill; + ret = s10_svc_send(sc->s10_svc_dev, &msg); + if (ret != 0) { + device_printf(sc->dev, "Failed to submit data\n"); + s10_svc_free_memory(sc->s10_svc_dev, &sc->mem); + sc->opened = 0; + return (ENXIO); + } + + /* Claim memory buffer back. */ + bzero(&msg, sizeof(struct s10_svc_msg)); + msg.command = COMMAND_RECONFIG_DATA_CLAIM; + ret = s10_svc_send(sc->s10_svc_dev, &msg); + if (ret) + device_printf(sc->dev, "Can't claim buffer back.\n"); + + return (ret); +} + static int fpga_write(struct cdev *dev, struct uio *uio, int ioflag) { struct fpgamgr_s10_softc *sc; vm_offset_t addr; + int error; int amnt; + int ret; sc = dev->si_drv1; @@ -127,11 +163,22 @@ fpga_write(struct cdev *dev, struct uio *uio, int ioflag) while (uio->uio_resid > 0) { addr = sc->mem.vaddr + sc->mem.fill; - if (sc->mem.fill >= SVC_BUF_SIZE) - return (ENOMEM); amnt = MIN(uio->uio_resid, (SVC_BUF_SIZE - sc->mem.fill)); - uiomove((void *)addr, amnt, uio); + error = uiomove((void *)addr, amnt, uio); + if (error) { + device_printf(sc->dev, "uiomove returned error %d\n", + error); + break; + } sc->mem.fill += amnt; + if (sc->mem.fill == SVC_BUF_SIZE) { + ret = fpga_submit(dev); + if (ret) { + sx_xunlock(&sc->sx); + return (ret); + } + sc->mem.fill = 0; + } } sx_xunlock(&sc->sx); @@ -144,7 +191,6 @@ fpga_close(struct cdev *dev, int flags __unused, int fmt __unused, struct thread *td __unused) { struct fpgamgr_s10_softc *sc; - struct s10_svc_msg msg; int ret; sc = dev->si_drv1; @@ -156,25 +202,15 @@ fpga_close(struct cdev *dev, int flags __unused, return (ENXIO); } - /* Submit bitstream */ - bzero(&msg, sizeof(struct s10_svc_msg)); - msg.command = COMMAND_RECONFIG_DATA_SUBMIT; - msg.payload = (void *)sc->mem.paddr; - msg.payload_length = sc->mem.fill; - ret = s10_svc_send(sc->s10_svc_dev, &msg); - if (ret != 0) { - device_printf(sc->dev, "Failed to submit data\n"); - s10_svc_free_memory(sc->s10_svc_dev, &sc->mem); - sc->opened = 0; - sx_xunlock(&sc->sx); - return (0); + if (sc->mem.fill > 0) { + ret = fpga_submit(dev); + if (ret) { + sx_xunlock(&sc->sx); + return (ret); + } + sc->mem.fill = 0; } - /* Claim memory buffer back */ - bzero(&msg, sizeof(struct s10_svc_msg)); - msg.command = COMMAND_RECONFIG_DATA_CLAIM; - s10_svc_send(sc->s10_svc_dev, &msg); - s10_svc_free_memory(sc->s10_svc_dev, &sc->mem); sc->opened = 0; sx_xunlock(&sc->sx); From nobody Tue Jan 9 16:27:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8bty4Grkz55nWR; Tue, 9 Jan 2024 16:27: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 4T8bty3BYVz47q4; Tue, 9 Jan 2024 16:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704817658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WX0Y9FUDkC1HHPlJ9W64UwkEThnD+bHDQZqiRdfauec=; b=fGnwge6vDcbIoQYJWg1/vtzUbLPsqYBrSefpaRozAuzZdCBpcbGGFFG6MpQDq3wC/+oUyk O4jXnpYQa/H2G9RxGEsXJbwx9jLzrshAhnrQZx5j2a1Wz2y2R9ZmLN3nAXJOzxkCvR1CJh ZMhWxN2UKGahQkS6mkOQuH8Ajk0RnLNHzAkS4UzaK8N0qGSn7IAOYLrjpL48uQhUtevX16 qLz7f3FYg0OOld6c3Dyvc3yqk3JXuUdxGSP473x6WsRck+tvygpf16twpbS30fcgwlGDXT HZUvJSxm2hxKI4mDZWTAEf/wCOc8D4+Ypa/4YSXE74kNuCLS+0lj6c1JuRYTTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704817658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WX0Y9FUDkC1HHPlJ9W64UwkEThnD+bHDQZqiRdfauec=; b=o/AyyNJyiBfy8w4k7WF+JYE64SC+fgJF973wnpLIpC3b1QeQSmyRRYrJzu9+iuJ5hze7TR 0DmhKlRfgBFRTYT7zEg6uXApL/f1jT5A4IIKU0CwfU0tWVwf2ZAM1AsOuWrH7zsvr2GF4x HX/ubo09usrwwQl3+8CewRYvlfGRqWj3OfjyiwDh+ikQaPTv7awHLCZaLp5I5XmBm86J2a jzsF+6sEIT0smCVL8ibyrjmL9JzUlitMrOZwIhA40/Y8mh77lE5jeme+dGiwiE/NLdDnIV Izn66Bmrsw1At6diLxEHQBzOwWGimHj3dBUhVGzG/5va9RTGUq4uzDpzcivhxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704817658; a=rsa-sha256; cv=none; b=MDU+xnrAq7VVjPAJt8M6T0o7lkrDMVJ+l9TyTfqRX8hTeDG/1jIg+2eiFXYgGcaQ+s5T3e /150XWx/rzOFswQl7nJGED49X469SX25z+gMetHjVHsOklS4PzpRyU2GcEjNiTStc4Xrw9 seZ1gTdPZ7C6M+GmnTgSaB89Q/89vPBYJ1E9IWFWHAjp7rfgqF6J4vkS+SafQZxoGWwqLG /bae7rQ8duQJQZzD43st5ftv2Ml5SOtfF8EKpgvvBTHesDKQcAPfhfUXul+919Xvf6S8xz HVIhOtIwNpIMRhHygwEP6q4D/WkSsZNdY52aZQ6Swe4/bDS994a5ykOE/q509g== 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 4T8bty2Gh8zy0x; Tue, 9 Jan 2024 16:27: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 409GRcgo028834; Tue, 9 Jan 2024 16:27:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409GRcI0028831; Tue, 9 Jan 2024 16:27:38 GMT (envelope-from git) Date: Tue, 9 Jan 2024 16:27:38 GMT Message-Id: <202401091627.409GRcI0028831@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: c2356a440db9 - main - asa: Rewrite to fix line termination issue. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: c2356a440db91c106867d45c94b3d6d7bc0e50f0 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c2356a440db91c106867d45c94b3d6d7bc0e50f0 commit c2356a440db91c106867d45c94b3d6d7bc0e50f0 Author: Dag-Erling Smørgrav AuthorDate: 2024-01-09 14:09:41 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-01-09 16:27:15 +0000 asa: Rewrite to fix line termination issue. The standard is somewhat unclear, but on the balance, I believe that the phrase “the rest of the input line” should be interpreted to mean the rest of the input line including the terminating newline if and only if there is one. This means the current implementation is incorrect on two points: - First, it suppresses the previous line's newline in the '1' case. - Second, it unconditionally emits a newline at the end of the output for non-empty input, even if the input did not end with a newline. Resolve this by rewriting the main loop. Instead of special-casing the first line and then assuming that every line ends with a newline, we remember how each line ends and emit that either at the beginning of the next line or at the end of the file except in the one case ('+') where the standard explicitly says not to. While here, try to reduce diff to upstream a little and update their RCS tag to reflect the fact that while we've diverged significantly from them, we've incorporated all their changes. Remove the useless second RCS tag. We also update the tests to account for the change in interpretation of the '1' case and add a test case for unterminated input. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D43326 --- usr.bin/asa/asa.c | 102 +++++++++++++++++++----------------------- usr.bin/asa/tests/asa_test.sh | 15 ++++++- 2 files changed, 59 insertions(+), 58 deletions(-) diff --git a/usr.bin/asa/asa.c b/usr.bin/asa/asa.c index 757278442a52..9839dbf8a722 100644 --- a/usr.bin/asa/asa.c +++ b/usr.bin/asa/asa.c @@ -1,4 +1,4 @@ -/* $NetBSD: asa.c,v 1.11 1997/09/20 14:55:00 lukem Exp $ */ +/* $NetBSD: asa.c,v 1.17 2016/09/05 00:40:28 sevan Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause @@ -32,13 +32,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include -#if 0 -#ifndef lint -__RCSID("$NetBSD: asa.c,v 1.11 1997/09/20 14:55:00 lukem Exp $"); -#endif -#endif #include +#include #include #include #include @@ -50,38 +45,33 @@ static void usage(void) __dead2; int main(int argc, char *argv[]) { - int ch, exval; FILE *fp; - const char *fn; + int ch, exval; while ((ch = getopt(argc, argv, "")) != -1) { switch (ch) { - case '?': default: usage(); - /*NOTREACHED*/ } } argc -= optind; argv += optind; exval = 0; - if (argc == 0) + if (*argv == NULL) { asa(stdin); - else { - while ((fn = *argv++) != NULL) { - if (strcmp(fn, "-") == 0) { + } else { + do { + if (strcmp(*argv, "-") == 0) { asa(stdin); + } else if ((fp = fopen(*argv, "r")) == NULL) { + warn("%s", *argv); + exval = 1; } else { - if ((fp = fopen(fn, "r")) == NULL) { - warn("%s", fn); - exval = 1; - continue; - } asa(fp); fclose(fp); } - } + } while (*++argv != NULL); } if (fflush(stdout) != 0) @@ -93,7 +83,6 @@ main(int argc, char *argv[]) static void usage(void) { - fprintf(stderr, "usage: asa [file ...]\n"); exit(1); } @@ -101,52 +90,53 @@ usage(void) static void asa(FILE *f) { - size_t len; char *buf; + size_t len; + bool eol = false; - if ((buf = fgetln(f, &len)) != NULL) { - if (buf[len - 1] == '\n') - buf[--len] = '\0'; - /* special case the first line */ + while ((buf = fgetln(f, &len)) != NULL) { + /* in all cases but '+', terminate previous line, if any */ + if (buf[0] != '+' && eol) + putchar('\n'); + /* examine and translate the control character */ switch (buf[0]) { + default: + /* + * “It is suggested that implementations treat + * characters other than 0, 1, and '+' as + * in the absence of any compelling reason to do + * otherwise” (POSIX.1-2017) + */ + case ' ': + /* nothing */ + break; case '0': putchar('\n'); break; case '1': putchar('\f'); break; - } - - if (len > 1 && buf[0] && buf[1]) - printf("%.*s", (int)(len - 1), buf + 1); - - while ((buf = fgetln(f, &len)) != NULL) { - if (buf[len - 1] == '\n') - buf[--len] = '\0'; - switch (buf[0]) { - default: - case ' ': - putchar('\n'); - break; - case '0': - putchar('\n'); - putchar('\n'); - break; - case '1': - putchar('\f'); - break; - case '+': + case '+': + /* + * “If the '+' is the first character in the + * input, it shall be equivalent to .” + * (POSIX.1-2017) + */ + if (eol) putchar('\r'); - break; - } - - if (len > 1 && buf[0] && buf[1]) - printf("%.*s", (int)(len - 1), buf + 1); + break; } - - putchar('\n'); + /* trim newline if there is one */ + if ((eol = (buf[len - 1] == '\n'))) + --len; + /* print the rest of the input line */ + if (len > 1 && buf[0] && buf[1]) + fwrite(buf + 1, 1, len - 1, stdout); } - + /* terminate the last line, if any */ + if (eol) + putchar('\n'); + /* check for output errors */ if (ferror(stdout) != 0) err(1, "stdout"); } diff --git a/usr.bin/asa/tests/asa_test.sh b/usr.bin/asa/tests/asa_test.sh index 429342d530e4..91515bb55d95 100644 --- a/usr.bin/asa/tests/asa_test.sh +++ b/usr.bin/asa/tests/asa_test.sh @@ -38,8 +38,8 @@ one_head() { atf_set descr "First character on line is '1'" } one_body() { - printf " %s\n1%s\n" "$a" "$b" >infile - printf "%s\f%s\n" "$a" "$b" >outfile + printf "1%s\n1%s\n" "$a" "$b" >infile + printf "\f%s\n\f%s\n" "$a" "$b" >outfile atf_check_asa infile outfile } @@ -87,6 +87,16 @@ dashdash_body() { atf_check -o inline:"$a $b\n" asa -- -infile } +atf_test_case unterminated +unterminated_head() { + atf_set descr "Unterminated input" +} +unterminated_body() { + printf " %s\n %s" "$a" "$b" >infile + printf "%s\n%s" "$a" "$b" >outfile + atf_check_asa infile outfile +} + atf_init_test_cases() { atf_add_test_case space @@ -96,4 +106,5 @@ atf_init_test_cases() atf_add_test_case plus_top atf_add_test_case stdout atf_add_test_case dashdash + atf_add_test_case unterminated } From nobody Tue Jan 9 16:45:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8cHR2ddMz55qtc; Tue, 9 Jan 2024 16:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8cHR23qqz4Bq9; Tue, 9 Jan 2024 16: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=1704818723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3n1XOXAo9QVurvzuHm2ePc0LeaZuWyYOuytZzq/TZpc=; b=tAHipj922sV5SkIc+fO3CC0L9D93q04kdai9IfYqq/corYneq/8xp8OoyGxTIDl1qmAvU3 lgbi3eYXuLcug/eRGGxUSiJBYZ2yJ9xQt/QV/xFC12g5Y4HUZNiz1sFvp6g2AYivEdqjL0 Gp1onylWWPZShLUMc58SH5/XY+/fFK4yX5AFsLH/6jAatv1nxEIsnCF/Nb3uz+Pt1sfMx0 F9yY9iD7atcJgyNHNmqGhHyIlJyUaO1NLQv1FOk9rMj19btOiwIiua3gjUHB0STIsdqnhB UnFPb3sDCFoO1R7attjsd2jSJWFxKiOsCHvlSRuoCZgPm6yGHApWgMAMzSL+HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704818723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3n1XOXAo9QVurvzuHm2ePc0LeaZuWyYOuytZzq/TZpc=; b=XPrjR41ZA0tVxxogxPZ5jNXpfymw7XUMy1TAjTVUKtyBEUpPd3MQLErXD63+WYphYVmJaO 1TrXuLjSUurtxm1btvWfLfQhH9NqEqv0SY9aauKGrbwki39Hv1ODHITBqrLN2LzJHibZJY 6YAiNaw6Ocs1yA97sY+8AiX8Rz/6ygfI89Frup6ARIAlKLlLg6pSkV9q/5y+hf9pvCYXbk 7vfiYM2z+LXmTAt83qbr9b8WGk3vgUO6neeeDULat5iORlbcifD00yenzhCI5SEDyKRE94 65LmSiIFELzw0hMkFGN8luJQOq+u+q/CCE/DXvhpdYKJxeeupFvYuWpgSefPJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704818723; a=rsa-sha256; cv=none; b=sYpdbDzPhU7piZuTrnhSYSG4uuuQUrfX2w/GjoY+732YttXH5mLYufWwKuzlRl5eu4N/dQ Cbhpe3MgCad4e0mB08t3z4v7T1JUQ5ADKDjAJc7zsq0vMCy4L3RoErJ5aCA2AY4eJSXCaj ejNja1I8ROXClyCCk/7ZdW0X/WNA7CxhZs8ljzgfImC/TUTO8AiBoXKuiQhz4lUs7+2akK 9quGJtWApow3jiB1KRyqOYiKeBE89Xl5suyyh9+8fcP0jYF4Y/60BgcT0OGzQ3GQ5fOknr kLZx6+sWA4tQYVfupUbmc5MIUlROIrmmxMtkg1Onyh/9Cb8vf/b5gAjmSOIdsA== 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 4T8cHR16bMzyXk; Tue, 9 Jan 2024 16: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 409GjNhP061266; Tue, 9 Jan 2024 16: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 409GjNvW061263; Tue, 9 Jan 2024 16:45:23 GMT (envelope-from git) Date: Tue, 9 Jan 2024 16:45:23 GMT Message-Id: <202401091645.409GjNvW061263@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: ec1d620c778f - stable/14 - vmrun.sh: add missing options in usage message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: ec1d620c778f59814020db228d69f66c76389ade Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=ec1d620c778f59814020db228d69f66c76389ade commit ec1d620c778f59814020db228d69f66c76389ade Author: Christos Margiolis AuthorDate: 2024-01-02 18:20:08 +0000 Commit: Christos Margiolis CommitDate: 2024-01-09 16:44:47 +0000 vmrun.sh: add missing options in usage message Reviewed by: markj Sponsored by; The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43269 (cherry picked from commit 029b10b16a4f1823b2546aa51e8f200ab23e929f) --- share/examples/bhyve/vmrun.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/examples/bhyve/vmrun.sh b/share/examples/bhyve/vmrun.sh index ff568b1da71c..d2cc371e472f 100755 --- a/share/examples/bhyve/vmrun.sh +++ b/share/examples/bhyve/vmrun.sh @@ -53,7 +53,7 @@ errmsg() { usage() { local msg=$1 - echo "Usage: vmrun.sh [-aAEhiTv] [-c ] [-C ]" \ + echo "Usage: vmrun.sh [-aAEhiTuvw] [-c ] [-C ]" \ "[-d ]" echo " [-e ] [-f ]" \ "[-F ]" @@ -62,6 +62,7 @@ usage() { echo " [-L ]" echo " [-m ]" \ "[-n ]" + echo " [-p ]" echo " [-P ] [-t ] " echo "" echo " -h: display this help message" From nobody Tue Jan 9 16:45:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8cHS3b06z55qnm; Tue, 9 Jan 2024 16: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 4T8cHS32Rpz4C6n; Tue, 9 Jan 2024 16:45:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704818724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CVE2rVSiAjq2+PSEwhLk44+01Y3RtBh9rbGIRR08qwA=; b=AVCoeqCWm5YJ+m7E/k+fAPaEwU1ERicTsHfeRlXveivvXfyRjuh14QuKmv/flQZsyKo9IH kB42Bm83Tshzjg4oYLP2MwRlIraDnstuMVJ/ViRSYPDPgb4vx61FrcQ9dJ8cZNPCiiqIya q83HzaQ4pAkz4FvgNnyC51J3AKJcFr7rHJnu5TEC1fCCtGA5O5Oa1big7D2HMBctM3aWFf oBrwNYQoi/BLilfOFDn9/PhMDvBuqz84Y2O/xEO6Qqk2ZToHpFo1fR5NJ/DvalgWga4sp/ b1FdafdJxhOKK9kuxm/1JEHaWd46vEFcyG8/hYE1A+02IygICT4fPECHj5yPww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704818724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CVE2rVSiAjq2+PSEwhLk44+01Y3RtBh9rbGIRR08qwA=; b=Aar9b1W0kKrRLWZ0Ep3h5FobXBtf52k6wq3DloM+/eqAlyMsdLQLHbabaSlf8/uVd8IdVT ZC/R2n513zTn1vMSBMF95gc/Nv26jxEwAwMfAS03DeQNg42YA4uetpN6hVeou914VcO6V7 g7y8SRGt7Jnidh8yO+ZTCCrSao9zxN5ZdwXzEVoUsh6AAaMUG5FYv5IBAL5z3VK50cTseI sDSX7jWV7LUPhYDyU5EfuUWhA6UlDbf4D+mHU1FDP3aG7o9OYKg1jXoIe3/wlUn4+oyDkA rKcGKN0iRdc6J0nWpTrIat7g960ygzY+xtMEG/zUUYzQJDOgY6EBPtJt+NB+XA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704818724; a=rsa-sha256; cv=none; b=ATVJt0Ju9xYPmcdJLgys9pSXPnFd6Ty6jqpsx2x+VntTltbAIPNh8czIjbjvoCtzld+vQ5 qgnUQ+7K4SOqecboPHRcZD7zQxbiGyBdfNfsMpEfLG554F2+vO4IGi5UaxUqjfCl9qgRCi 4FV9TPadJcZs+OzqXD2P9Dy8rLDLibpem6byzTsMtqyCY3PCRh2D9GMdIhbxv6g2N7sEji eJY4Bs1zgeLGQXliSkFadhjAFuUw2hHbJ/QitsjiPrM6pvEDZnmXx9mD1sO1s6Tzqysz8d IRAl1k2CGdsKQn+59GVc7sOxhKIa89yv3oGCacNNJwpNGSKmQ1M7EG4AQnkp5Q== 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 4T8cHS26N7zym7; Tue, 9 Jan 2024 16:45: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 409GjOEm061324; Tue, 9 Jan 2024 16:45:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409GjOjJ061321; Tue, 9 Jan 2024 16:45:24 GMT (envelope-from git) Date: Tue, 9 Jan 2024 16:45:24 GMT Message-Id: <202401091645.409GjOjJ061321@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 644327466048 - stable/14 - vmrun.sh: allow device name arguments in pci-passthru option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 644327466048248c848e1f598496692ec741de33 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=644327466048248c848e1f598496692ec741de33 commit 644327466048248c848e1f598496692ec741de33 Author: Christos Margiolis AuthorDate: 2024-01-02 18:20:42 +0000 Commit: Christos Margiolis CommitDate: 2024-01-09 16:45:05 +0000 vmrun.sh: allow device name arguments in pci-passthru option This is more intuitive than having to run `pciconf -l` and figure out the bus/slot/func entry manually. Reviewed by: markj Sponsored by; The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43270 (cherry picked from commit 2ee77056d2d4f9d43bd316ce6dc91bf5e4b0848b) --- share/examples/bhyve/vmrun.sh | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/share/examples/bhyve/vmrun.sh b/share/examples/bhyve/vmrun.sh index d2cc371e472f..323d8e22a041 100755 --- a/share/examples/bhyve/vmrun.sh +++ b/share/examples/bhyve/vmrun.sh @@ -62,7 +62,7 @@ usage() { echo " [-L ]" echo " [-m ]" \ "[-n ]" - echo " [-p ]" + echo " [-p ]" echo " [-P ] [-t ] " echo "" echo " -h: display this help message" @@ -87,8 +87,8 @@ usage() { echo " -m: memory size (default: ${DEFAULT_MEMSIZE})" echo " -n: network adapter emulation type" \ "(default: ${DEFAULT_NIC})" - echo " -p: pass-through a host PCI device at bus/slot/func" \ - "(e.g. 10/0/0)" + echo " -p: pass-through a host PCI device (e.g ppt0 or" \ + "bus/slot/func)" echo " -P: UEFI GOP VNC port (default: ${DEFAULT_VNCPORT})" echo " -t: tap device for virtio-net (default: $DEFAULT_TAPDEV)" echo " -T: Enable tablet device (for UEFI GOP)" @@ -351,10 +351,21 @@ while [ 1 ]; do i=0 while [ $i -lt $pass_total ] ; do - eval "pass=\$pass_dev${i}" - devargs="$devargs -s $nextslot:0,passthru,${pass} " - nextslot=$(($nextslot + 1)) - i=$(($i + 1)) + eval "pass=\$pass_dev${i}" + bsfform="$(echo "${pass}" | grep "^[0-9]\+/[0-9]\+/[0-9]\+$")" + if [ -z "${bsfform}" ]; then + bsf="$(pciconf -l "${pass}" 2>/dev/null)" + if [ $? -ne 0 ]; then + errmsg "${pass} is not a host PCI device" + exit 1 + fi + bsf="$(echo "${bsf}" | awk -F: '{print $2"/"$3"/"$4}')" + else + bsf="${pass}" + fi + devargs="$devargs -s $nextslot:0,passthru,${bsf} " + nextslot=$(($nextslot + 1)) + i=$(($i + 1)) done efiargs="" From nobody Tue Jan 9 16:47:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8cL723WXz55rg1; Tue, 9 Jan 2024 16:47: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 4T8cL71YX6z4Ccm; Tue, 9 Jan 2024 16:47:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704818863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8uU/Ql+LUYMko18miyuxYL2zr+CgT4cEPkqS+ZSVlNY=; b=ZW9xMWniFFD3O1xfLbXeXmNIuKP00iUlMW4AAV8jkkGsAhUnhRE7rBPT5+j/V/N3Et7UC8 bCk1X3+KX5Ek3Ef9hCavjcx3B68BUoXpFx2RaS+mXgVLhMztT4YqSHJ4B2Xwl0ju7MWvKx rp3pk4u0P3PZvP+h5o5LjIdj+28B0LkAhvAWhk6iwLbUYyw14f8cSgtQFcH60Ixbm/Ri0z vwxcfXUj1JtvvZnFjfywnI+65I4Udml5TXP7JbmR/IsShPoxGt8L0Pq06vosuBhrudv7nh UYoo6lSLhvVfC8d94UEs5AVxqi5hAFn/irTxDL1CMvoa1b9JpPuhHQGI2R/CzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704818863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8uU/Ql+LUYMko18miyuxYL2zr+CgT4cEPkqS+ZSVlNY=; b=CgAEE9oVs5rhwPmc//MNgAvznvdY3HCm989dHHJ2Y+xVMp7NNGRIhN2q8uV64GNp5SBK9i 3sENgJfgYVQW042eRVOF33dWHZPUbqCyunqFME7tSSpw4BrgBrvm7qQEfgT2N1SJ2038pt 0sp3sC0FMQZdjuJjyhUUB2rJeeAx87B5Z2jlFIYicB9TDQKUkFUvrkgOZVtC8yMG+TNZj4 oi4KU9CxrJQdyFoS2A9DZFT/hcUGnK3WJIWurMAC6jkPzwsSgLNt1+uvd5RnDiPV8k75zF O7J4RnA3ip05pWrFh+xws6L45lpiXmxUw8lqfLpMAkhxut1EUuzW9VhbnrdFqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704818863; a=rsa-sha256; cv=none; b=nKEZCQsFpffVRNh8QM1AYrSRFgWlIIKAVrVvhApxapvzzpFjTvnDL5NekfwjOQ3fVXlCzt SS9C8S1hKcrobHoqaujEjh/Ge/dqeIZQD5VpPxb4WSk1tQtStlKVDnncMOGLPMAxpoURyc foj6aWFqey/YQ+7L7zy6D34MpwdM69gr2sEvl4YPDaOs19hEu94hr8CYVaxfYPO+stbkIn fut+2qK7YMFn8T2fCjMyvZuJtkzzuw2uISUgxQDeoUQlPng/CCsWByvpq4zZrNTHUwOBCZ VChIGHbhfPwhbB3fbhz9ytSy2fiiQsc5yh7C8Q3sLstSep4amU33BYogAoPoqQ== 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 4T8cL70bmRzycq; Tue, 9 Jan 2024 16:47: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 409Glg8b061820; Tue, 9 Jan 2024 16:47:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409GlgVt061817; Tue, 9 Jan 2024 16:47:42 GMT (envelope-from git) Date: Tue, 9 Jan 2024 16:47:42 GMT Message-Id: <202401091647.409GlgVt061817@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 4566bff5c90e - stable/13 - vmrun.sh: add missing options in usage message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 4566bff5c90e99c872ed2f6e00e46b1bac0caba6 Auto-Submitted: auto-generated The branch stable/13 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=4566bff5c90e99c872ed2f6e00e46b1bac0caba6 commit 4566bff5c90e99c872ed2f6e00e46b1bac0caba6 Author: Christos Margiolis AuthorDate: 2024-01-02 18:20:08 +0000 Commit: Christos Margiolis CommitDate: 2024-01-09 16:47:28 +0000 vmrun.sh: add missing options in usage message Reviewed by: markj Sponsored by; The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43269 (cherry picked from commit 029b10b16a4f1823b2546aa51e8f200ab23e929f) --- share/examples/bhyve/vmrun.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/examples/bhyve/vmrun.sh b/share/examples/bhyve/vmrun.sh index ff568b1da71c..d2cc371e472f 100755 --- a/share/examples/bhyve/vmrun.sh +++ b/share/examples/bhyve/vmrun.sh @@ -53,7 +53,7 @@ errmsg() { usage() { local msg=$1 - echo "Usage: vmrun.sh [-aAEhiTv] [-c ] [-C ]" \ + echo "Usage: vmrun.sh [-aAEhiTuvw] [-c ] [-C ]" \ "[-d ]" echo " [-e ] [-f ]" \ "[-F ]" @@ -62,6 +62,7 @@ usage() { echo " [-L ]" echo " [-m ]" \ "[-n ]" + echo " [-p ]" echo " [-P ] [-t ] " echo "" echo " -h: display this help message" From nobody Tue Jan 9 16:47:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8cL83Cqqz55rxF; Tue, 9 Jan 2024 16:47: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 4T8cL82VQ5z4Ccs; Tue, 9 Jan 2024 16:47:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704818864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8t9x56yqE3Zp7BDGnUTLmIXZydxf+uLeoIeUSL6ni5Y=; b=ibEogFFtViXnwesAq11D/S81s7ljSD4P/BqAYYed4i/9Us56UhFkugM+aq5AN/fElAE6rD mw+gLFW2Kd8Mtb4viB0MopUrzoor904fwYvhnZqqyNN1C99FsDyYtpQXVqTkb9juZZB21Y gouXh3puh3P9iH03b9H9K95jx7fw8gcFYPG57N0MdSBek0VZvVyGVVwLL4mVr/+VgTUEBV TBQ9MT7t8puOSgAFfPh/Xc47fYShLTFcHN1JxRRlZha1UbTY9q935chmp+PgNv3FZtSBlW 6wtE6bzBniUcizaJq7PBB8y5AuQFxsrhPaPTY+io245Deq8u6nBRiiztwxD9WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704818864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8t9x56yqE3Zp7BDGnUTLmIXZydxf+uLeoIeUSL6ni5Y=; b=imYpkVDN0KfarrGJ303NQFkWCuVYiItJretzvupuY+Ih55aUdqER9RB32hF6zKOKUipw7Y jfEBqc0eulq8tgof9/QE3nTSL/9QgghNpk3K5/jp0A4KPgWK7KHE/jDAIO+V+fokf61cSD 2v/8t4z+V9OJ36XMYJ21nrEO1+x8697gJjGJqwL4U4hhivITApxEBQrCnbiPW7BOEF58kk 8JcPDxRlDrd74OFFycl5vagHGl3rRx0ASsqDSj3sNYgQgPdGZldG5oIE8no7iqesbf6Jt7 g0EX5RmE/HKNOJkj8ec5NyevAbcXswgaKYta3DYEPGKQN/B68zoCXpNafC1qNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704818864; a=rsa-sha256; cv=none; b=qlaDsDITaTUSGlWYyTyBFxYnXYWGFMN2I+LO87hOh6bnsP9Btf/a2JE2GKJitpkCAvzRhN zaH3LdOrDdSsN37W79uZx1WvLJa1VdlO7UlkdO14dH3560Zau1BQwl0fKEIa/agfJbzAH6 f1DHiorTOC6hx0ft71+QZmwWz55F9Xe/F3jPpf+kbVaIjDU4JdBdq5kNCZ4rdU4yp3GSFW sO2WOLyW3A1uleY2NqaX3AObHSGlXszz/NENQKRJOBwa3+8m4vK0OT7ZWPTbUsNuDRczax P89xYb/CINIX/rNBX1+4AQeTQIcXPtUU3vcCopMk9YdpDTIXxc5DRi+KXtvC1Q== 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 4T8cL81Zvjzxyg; Tue, 9 Jan 2024 16:47: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 409Gli9D061872; Tue, 9 Jan 2024 16:47:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409GliOi061869; Tue, 9 Jan 2024 16:47:44 GMT (envelope-from git) Date: Tue, 9 Jan 2024 16:47:44 GMT Message-Id: <202401091647.409GliOi061869@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: a00a507e2d5f - stable/13 - vmrun.sh: allow device name arguments in pci-passthru option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: a00a507e2d5f4f5de7e7bbafc6df419a1565da24 Auto-Submitted: auto-generated The branch stable/13 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=a00a507e2d5f4f5de7e7bbafc6df419a1565da24 commit a00a507e2d5f4f5de7e7bbafc6df419a1565da24 Author: Christos Margiolis AuthorDate: 2024-01-02 18:20:42 +0000 Commit: Christos Margiolis CommitDate: 2024-01-09 16:47:36 +0000 vmrun.sh: allow device name arguments in pci-passthru option This is more intuitive than having to run `pciconf -l` and figure out the bus/slot/func entry manually. Reviewed by: markj Sponsored by; The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43270 (cherry picked from commit 2ee77056d2d4f9d43bd316ce6dc91bf5e4b0848b) --- share/examples/bhyve/vmrun.sh | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/share/examples/bhyve/vmrun.sh b/share/examples/bhyve/vmrun.sh index d2cc371e472f..323d8e22a041 100755 --- a/share/examples/bhyve/vmrun.sh +++ b/share/examples/bhyve/vmrun.sh @@ -62,7 +62,7 @@ usage() { echo " [-L ]" echo " [-m ]" \ "[-n ]" - echo " [-p ]" + echo " [-p ]" echo " [-P ] [-t ] " echo "" echo " -h: display this help message" @@ -87,8 +87,8 @@ usage() { echo " -m: memory size (default: ${DEFAULT_MEMSIZE})" echo " -n: network adapter emulation type" \ "(default: ${DEFAULT_NIC})" - echo " -p: pass-through a host PCI device at bus/slot/func" \ - "(e.g. 10/0/0)" + echo " -p: pass-through a host PCI device (e.g ppt0 or" \ + "bus/slot/func)" echo " -P: UEFI GOP VNC port (default: ${DEFAULT_VNCPORT})" echo " -t: tap device for virtio-net (default: $DEFAULT_TAPDEV)" echo " -T: Enable tablet device (for UEFI GOP)" @@ -351,10 +351,21 @@ while [ 1 ]; do i=0 while [ $i -lt $pass_total ] ; do - eval "pass=\$pass_dev${i}" - devargs="$devargs -s $nextslot:0,passthru,${pass} " - nextslot=$(($nextslot + 1)) - i=$(($i + 1)) + eval "pass=\$pass_dev${i}" + bsfform="$(echo "${pass}" | grep "^[0-9]\+/[0-9]\+/[0-9]\+$")" + if [ -z "${bsfform}" ]; then + bsf="$(pciconf -l "${pass}" 2>/dev/null)" + if [ $? -ne 0 ]; then + errmsg "${pass} is not a host PCI device" + exit 1 + fi + bsf="$(echo "${bsf}" | awk -F: '{print $2"/"$3"/"$4}')" + else + bsf="${pass}" + fi + devargs="$devargs -s $nextslot:0,passthru,${bsf} " + nextslot=$(($nextslot + 1)) + i=$(($i + 1)) done efiargs="" From nobody Tue Jan 9 17:54:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8dqg2dq6z564Tc; Tue, 9 Jan 2024 17:54:55 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) (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 4T8dqf3RkXz4PDb; Tue, 9 Jan 2024 17:54:54 +0000 (UTC) (envelope-from delphij@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=lRPldvO7; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of delphij@gmail.com designates 2a00:1450:4864:20::12a as permitted sender) smtp.mailfrom=delphij@gmail.com Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-50e759ece35so3507777e87.3; Tue, 09 Jan 2024 09:54:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704822891; x=1705427691; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=5mZsy/JTUe+sTCTNaF1cZMd04lfgT7jHMhpTfTfIa30=; b=lRPldvO7m7q4P0yV0Btujq6v8aSDEImgf5gJIuwq1pch8XHKIn1+8oYfxQUOLL3yQY pL13onNo4+siUPV70vxpenTlWmKu2vVYRMe9DAFVDVumsM/bgDSvEmW6E9VhFzb1Ffsc 7dgx5iAbw8oHtzpqitde7sMtk3Nt25DiYKl7XG5LIBDhsh/4Vu/hinALMmiW1GBN1bzb 019//eMkQlHkPOyljUPPIoPkZ0yRXwWZxqKoXJuMu0EOQ+zTWtftOF6w0SogXXfujIOY +muwNuz4Y63CCvEyPirynWKcW62Nfn1tX/OPz0Yy5YMLnKq4RmX5DL/L7hSLkLfpZD3u TSqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704822891; x=1705427691; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5mZsy/JTUe+sTCTNaF1cZMd04lfgT7jHMhpTfTfIa30=; b=mfMhAxe18iDCHxU/8oQS+/Ly5rPdiSWMWA4GM+tzUtMahU5WjhtvVIAyedRuhNcWiN /PxcdoE/glUNODN8XIjaHOb6N1Kfb7QmK7rO6NXmsgRjBjGHa1KJOpHH/q8/ByWihjom uMwZuLspbyCvOto44wKuI1vjxrc1GzEt0Atl2u3pNiaRGUdNIsFqtP9Kgm2IHiysXCzz AThU5jQ/BnUQClIa5omcotZAHjO9i2JnSJCQFL04vPfjswdC5wKDrh2KN8xhfYFJ1rC1 3vgvQOIbuxvtDEJCPwku+xut16J2dVwI8Tt0MRn54SvkyXE0lNdo7RU2xNE8+gj1OoKs kNGQ== X-Gm-Message-State: AOJu0YyJxMr+aVLepMdCPB3Ba68vE1Im/ldJGF1OJPgyGniij1jYO8ND j+mLtNxa47PI+kUEGEWB05c318saVBFtSmoT8V+DynzrPFE= X-Google-Smtp-Source: AGHT+IG8aXxgrVvl2Wd1LwlER1KlD2iwoAucSXli1V7r6SC4sKK5TUyHgSLM1viGlY9PskjVeB8giFoi+FuQEy6HwV4= X-Received: by 2002:a05:6512:312d:b0:50e:7224:ad4f with SMTP id p13-20020a056512312d00b0050e7224ad4fmr1940673lfd.59.1704822890939; Tue, 09 Jan 2024 09:54:50 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202312290846.3BT8kOiO029918@gitrepo.freebsd.org> <90D0905E-AA46-4351-AEE0-9ED9D835DB50@karels.net> In-Reply-To: <90D0905E-AA46-4351-AEE0-9ED9D835DB50@karels.net> From: Xin LI Date: Tue, 9 Jan 2024 09:54:39 -0800 Message-ID: Subject: Re: git: 2f036705f337 - main - Document the two recent newsyslog(8) change (-c option and configuration option). To: Mike Karels Cc: Xin LI , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000d1cc79060e870261" X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.95)[-0.954]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::12a:from]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FREEFALL_USER(0.00)[delphij]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCPT_COUNT_FIVE(0.00)[5]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-Rspamd-Queue-Id: 4T8dqf3RkXz4PDb --000000000000d1cc79060e870261 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Mike, On Fri, Dec 29, 2023 at 7:25=E2=80=AFAM Mike Karels wrote= : > On 29 Dec 2023, at 2:46, Xin LI wrote: > > > The branch main has been updated by delphij: > [...] > > > +61174ad88e33: > > + newsyslog(8) now supports specifying a global compression method > directly > > + at the beginning of the newsyslog.conf file, which will make > newsyslog(8) > > + to behave like the corresponding option was passed to the newly > added > > + '-c' option. For example: > > + > > + none > > + > > +906748d208d3: > > + newsyslog(8) now accepts a new option, '-c' which overrides all > historical > > + compression flags by treating their meaning as "treat the file as > compressible" > > + rather than "compress the file with that specific method." > > + > > + The following choices are available: > > + * none: Do not compress, regardless of flag. > > + * legacy: Historical behavior (J=3Dbzip2, X=3Dxz, Y=3Dzstd, Z=3D= gzip). > > + * bzip2, xz, zstd, gzip: apply the specified compression method. > > + > > + We plan to change the default to 'none' in FreeBSD 15.0. > > Sorry not to have noticed this in the review; it was only when I saw this > message that it sunk in that we now have *three* ways to specify > compression, > and I'm not even sure what the precedence is. I would have thought that > The current precedence is that command line takes highest priority; when it's not present, overrides all lines with any compression method. The meaning of J/X/Y/Z is changed to "this file is compressible", unless newsyslog is in legacy mode. It's intentional to discourage the use of different compression types for different files (because the current newsyslog.conf(5) format uses one character to represent compression method and without a change to e.g. UCL or some other configuration language, supporting additional compression methods would be much more messier). > would replace -c. It's a mess if the config file has entries > that specify J and X flags as well as none, the config file has > zstd, and the -c option is given as well. We now have a knob > newsyslog would issue a warning if both -c is given and the configuration file has . Part of the reason to introduce was that it would move the configuration to one place (newsyslog.conf) and there were concerns that having -c in newsyslog in /etc/crontab is counterintuitive (as raised in some earlier discussion). > to override the knob to override a knob. The only reason to keep -c that > I can think of is to specify a different compression in a single > invocation, > but as noted, changing compression requires manual operations that make > it unreasonable to change it invocation by invocation. > The intention of -c was to be added to /etc/crontab, but with the introduction of it's probably a good idea to just remove the command line option or at least leave it undocumented? > Also, using the -c option or (except with legacy) loses the > ability to specify different compression types for different files. > This (the ability of specifying different compression types for different files) is what I deliberately wanted to get rid of. Compression types only make a meaningful difference when files are sufficiently large, and the purpose of newsyslog is to not allow log files to grow to an unmanageable size. Rotating files when they are large and also requesting to compress them means the system would have prolonged "bursts" of CPU workload at integral hours, which would be even worse for busy systems where logs tend to have more contents. > People have objected to the term "legacy" as well. > I don't agree. Calling it "legacy" would send a clear signal that the historical way is discouraged (for people who are using a different compression method, merging upstream change would be a very painful process). We already have 4 letters to represent 4 different compression methods, that's almost 1/3 of all valid configuration letters, and we should stop doing that because the legacy way is causing problems and won't scale when new compression methods are added. > I still think it would be much better to add an option letter to select > the default compression as specified by . This would eliminate > the need for "legacy", and it would add the ability to have both a global > default and an exception. I think the redefinition of the existing flags > to have different meanings if is given is messy. > I insist the default should be anything except "legacy" -- legacy is for backward compatibility and should serve that purpose only. The entry for -c says that we plan to change the default to "none" in 15.0. > Hopefully that would be done via and not -c. However, there > Yes, my intention was to add a line to newsyslog.conf ( https://reviews.freebsd.org/D43169 ) instead of adding it to /etc/crontab. > was significant pushback on "none" being the default. > I think we should provide a reasonable default. Compression was useful back in the 90's, but not so much nowadays and makes grep'ing the logs harder (and for those who want compression, they could choose e.g. 'bzip2' anyways). This change would also make porter's lives a lot easier as they could install their newsyslog.conf.d files with e.g. 'J' to indicate that the file can be compressed, without messing up with the administrator's decision to not compress or compress it with some other compressor. --000000000000d1cc79060e870261 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, Mike,

On Fri, Dec 29, 2023 at 7:25= =E2=80=AFAM Mike Karels <mike@karels.= net> wrote:
On 29 Dec 2023, at 2:46, Xin LI wrote:

> The branch main has been updated by delphij:
[..= .]=C2=A0
>
> +61174ad88e33:
> +=C2=A0 =C2=A0 =C2=A0newsyslog(8) now supports specifying a global com= pression method directly
> +=C2=A0 =C2=A0 =C2=A0at the beginning of the newsyslog.conf file, whic= h will make newsyslog(8)
> +=C2=A0 =C2=A0 =C2=A0to behave like the corresponding option was passe= d to the newly added
> +=C2=A0 =C2=A0 =C2=A0'-c' option. For example:
> +
> +=C2=A0 =C2=A0 =C2=A0<compress> none
> +
> +906748d208d3:
> +=C2=A0 =C2=A0 =C2=A0newsyslog(8) now accepts a new option, '-c= 9; which overrides all historical
> +=C2=A0 =C2=A0 =C2=A0compression flags by treating their meaning as &q= uot;treat the file as compressible"
> +=C2=A0 =C2=A0 =C2=A0rather than "compress the file with that spe= cific method."
> +
> +=C2=A0 =C2=A0 =C2=A0The following choices are available:
> +=C2=A0 =C2=A0 =C2=A0 * none: Do not compress, regardless of flag.
> +=C2=A0 =C2=A0 =C2=A0 * legacy: Historical behavior (J=3Dbzip2, X=3Dxz= , Y=3Dzstd, Z=3Dgzip).
> +=C2=A0 =C2=A0 =C2=A0 * bzip2, xz, zstd, gzip: apply the specified com= pression method.
> +
> +=C2=A0 =C2=A0 =C2=A0We plan to change the default to 'none' i= n FreeBSD 15.0.

Sorry not to have noticed this in the review; it was only when I saw this message that it sunk in that we now have *three* ways to specify compressio= n,
and I'm not even sure what the precedence is.=C2=A0 I would have though= t that

The current precedence is that comma= nd line takes highest priority; when it's not present, <compress>= overrides all lines with any compression method.

The meaning of J/X= /Y/Z is changed to "this file is compressible", unless newsyslog = is in legacy mode.=C2=A0 It's intentional to discourage the use of diff= erent compression types for different files (because the current newsyslog.= conf(5) format uses one character to represent compression method and witho= ut a change to e.g. UCL or some other configuration language, supporting ad= ditional compression methods would be much more messier).
= =C2=A0
<compress> would replace -c.=C2=A0 It's a mess if the config file= has entries
that specify J and X flags as well as none, the config file has
<compress> zstd, and the -c option is given as well.=C2=A0 We now hav= e a knob

newsyslog would issue a warning if= both -c is given and the configuration file has <compress>.
<= br>
Part of the reason to introduce <compress> was that it would mov= e the configuration to one place (newsyslog.conf) and there were concerns t= hat having -c in newsyslog in /etc/crontab is counterintuitive=C2=A0(as rai= sed in some earlier discussion).
=C2=A0
to override the knob to override a knob. The only reason to keep -c that I can think of is to specify a different compression in a single invocation= ,
but as noted, changing compression requires manual operations that make
it unreasonable to change it invocation by invocation.

The intention of -c was to be added to /etc/crontab, but with t= he introduction of <compress> it's probably a good idea to just r= emove the command line option or at least leave it undocumented?=C2=A0
= =C2=A0
Also, using the -c option or <compress> (except with legacy) loses th= e
ability to specify different compression types for different files.

This (the ability of specifying different=C2=A0com= pression types for different files) is what I deliberately wanted to get ri= d of.

Compression types only make a meaningful difference when= files are sufficiently large, and the purpose of newsyslog is to not allow= log files to grow to an unmanageable size.=C2=A0 Rotating files when they = are large and also requesting to compress them means the system would have = prolonged "bursts" of CPU workload at integral hours, which would= be even worse for busy systems where logs tend to have more contents.
=C2=A0
People have objected to the term "legacy" as well.

I don't agree.

Calling it "legacy" w= ould send a clear signal that the historical way is discouraged (for people= who are using a different compression method, merging upstream change woul= d be a very painful process).=C2=A0 We already have 4 letters to represent = 4 different compression methods, that's almost 1/3 of all valid configu= ration letters, and we should stop doing that because the legacy way is cau= sing problems and won't scale when new compression methods are added.
=C2=A0
I insist the default should be anything except "= ;legacy" -- legacy is for backward compatibility and should serve that= purpose only.

The entry for -c says that we plan to change the default to= "none" in 15.0.
Hopefully that would be done via <compress> and not -c.=C2=A0 However= , there

Yes, my intention was to add a line= to newsyslog.conf ( https:/= /reviews.freebsd.org/D43169 ) instead of adding it to /etc/crontab.
=C2=A0
was significant pushback on "none" being the default.

I think we should provide a reasonable default.=C2=A0 Compr= ession was useful back in the 90's, but not so much nowadays and makes = grep'ing=C2=A0the logs harder (and for those who want compression, they= could choose e.g. 'bzip2' anyways).=C2=A0 This change would also m= ake porter's lives a lot easier as they could install their newsyslog.c= onf.d files with e.g. 'J' to indicate that the file can be compress= ed, without messing up with the administrator's decision to not compres= s or compress it with some other compressor.
--000000000000d1cc79060e870261-- From nobody Tue Jan 9 18:00:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8dxY1tBgz5656m; Tue, 9 Jan 2024 18:00: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 4T8dxY0xxlz4PjC; Tue, 9 Jan 2024 18:00:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704823201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tHgE46vjHa/Q+mDcVEBVY/AjqcjQZOyDqdK40mw1hHE=; b=gaq0VfCNWBolYogbMgLWjl+PG7SKcWFpp31XLim4vO25GPSbKxA11+EhSJ9uPZ5p0ZcBzh RG6YaBS/n78A9peNl11k4P27v4AjzRajp52mQ5JIROiVuKA/84QNC8xArJD8+OuHeLc9Pm tN46lE0FZn7rm5Nebz5+SUoe3d/FcGhxK84gClkxOT8F+rghvo2NhtL71iFp4QgzbZvdMf rCeiZemfRVTLkIU56WsdYDeHOs8w5YgoZifxTgZ+TteiqHl/HeUnl09BOFQje/q646WKwG XOk0R2NOKj3hJS4cEWlJyPqpeGKtX1pPIGf5RIID2HggXTb71E2QnPTGZcMfSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704823201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tHgE46vjHa/Q+mDcVEBVY/AjqcjQZOyDqdK40mw1hHE=; b=eQtyQF5yBMsKndDXDtjY8aWYKyAGOrZacoU1zClSPhqZQSjU5qyQc5+S0WoHUXXic8BCIE sEUMBvZV4z0IT3N2iHrsVmmPNOsTssZw7QNrZDesM3EozZgiYU700I/P4ddLXsbkZsF1VD PZGhEMrR6cCC1jOrBfJ7sVxFdM8KJStWkJsQ4bhYS99u90Q6NoyDkGmemzwZW2eBlrovoQ XlwGnrTP/FedHea6b4mPuwxzB562Qg34eZBV+iFvxMxbXxbFSv+DmrjEFcUQDe0VWZIDGv VM6iVGrqyb/sBdnSRda34DCq1NrOkCs/iN/tcGiBcpIBlOY3XU6/YNB5yXBU1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704823201; a=rsa-sha256; cv=none; b=SHUhjzPY99AJ/ay/sxVQ1vhfpthMDDNJ2LRQimGMZE3Mw5VqNi9lUZ1iqv3VXV00ITKRaE 1tS4gfWkEQdalMe8MDmDrF/51KR3o+P/V8ObXje+pFgwW7zDTCgaEWJrwKM10IxFURUOhQ pootctciSKpUc3dsPXXAMyyeR21kvl1ej9jWuKE1xiVo988TYDn0haxF/GyKj9YttUR24+ YzHTIMutr1jVAlkbMABDLEBmexx4UdLV+QaJ3SrbtXQun64Ls2j1fWVyqWUOvO8X5P25oP gly2GnFYvCq6QlJqSg40gS+0iPSDZC8KLPfvMLofVIkBUsc2OkahLAeSqdIEZw== 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 4T8dxY03rqz10yT; Tue, 9 Jan 2024 18:00: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 409I00HY082190; Tue, 9 Jan 2024 18:00:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409I00Dm082169; Tue, 9 Jan 2024 18:00:00 GMT (envelope-from git) Date: Tue, 9 Jan 2024 18:00:00 GMT Message-Id: <202401091800.409I00Dm082169@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 6cba7aec21bc - stable/13 - linuxkpi: Handle direct-mapped addresses in linux_free_kmem() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 6cba7aec21bcd957478a987f9391fd33a4babdac Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6cba7aec21bcd957478a987f9391fd33a4babdac commit 6cba7aec21bcd957478a987f9391fd33a4babdac Author: Mark Johnston AuthorDate: 2023-10-17 14:26:18 +0000 Commit: Mark Johnston CommitDate: 2024-01-09 17:59:49 +0000 linuxkpi: Handle direct-mapped addresses in linux_free_kmem() See the analysis in PR 271333. It is possible for driver code to allocate a page, store its address as returned by page_address(), then call free_page() on that address. On most systems that'll result in the LinuxKPI calling kmem_free() with a direct-mapped address, which is not legal. Fix the problem by making linux_free_kmem() check the address to see whether it's direct-mapped or not, and handling it appropriately. PR: 271333, 274515 Reviewed by: hselasky, bz Tested by: trasz MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40028 (cherry picked from commit 6223d0b67af923f53d962a9bf594dc37004dffe8) --- sys/compat/linuxkpi/common/src/linux_page.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index d59435ba934f..e732d6ff5047 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -145,6 +145,14 @@ linux_alloc_pages(gfp_t flags, unsigned int order) return (page); } +static void +_linux_free_kmem(vm_offset_t addr, unsigned int order) +{ + size_t size = ((size_t)PAGE_SIZE) << order; + + kmem_free(addr, size); +} + void linux_free_pages(struct page *page, unsigned int order) { @@ -163,7 +171,7 @@ linux_free_pages(struct page *page, unsigned int order) vaddr = (vm_offset_t)page_address(page); - linux_free_kmem(vaddr, order); + _linux_free_kmem(vaddr, order); } } @@ -185,9 +193,17 @@ linux_alloc_kmem(gfp_t flags, unsigned int order) void linux_free_kmem(vm_offset_t addr, unsigned int order) { - size_t size = ((size_t)PAGE_SIZE) << order; + KASSERT((addr & PAGE_MASK) == 0, + ("%s: addr %p is not page aligned", __func__, (void *)addr)); - kmem_free(addr, size); + if (addr >= VM_MIN_KERNEL_ADDRESS && addr < VM_MAX_KERNEL_ADDRESS) { + _linux_free_kmem(addr, order); + } else { + vm_page_t page; + + page = PHYS_TO_VM_PAGE(DMAP_TO_PHYS(addr)); + linux_free_pages(page, order); + } } static int From nobody Tue Jan 9 18:05:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8fBg1PBdz566s6; Tue, 9 Jan 2024 18:11:23 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.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 4T8fBf6J0pz4Stn; Tue, 9 Jan 2024 18:11:22 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Authentication-Results: mx1.freebsd.org; none Date: Tue, 09 Jan 2024 19:05:54 +0100 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: c2356a440db9 - main - asa: Rewrite to fix line termination issue. Message-ID: <20240109180554.UYZwm9Yl@steffen%sdaoden.eu> In-Reply-To: <202401091627.409GRcI0028831@gitrepo.freebsd.org> References: <202401091627.409GRcI0028831@gitrepo.freebsd.org> Mail-Followup-To: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org User-Agent: s-nail v14.9.24-585-g9999e323b6 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4T8fBf6J0pz4Stn 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:15987, ipnet:217.144.128.0/20, country:DE] Dag-Erling Sm=C3=B8rgrav wrote in <202401091627.409GRcI0028831@gitrepo.freebsd.org>: |The branch main has been updated by des: | |URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc2356a440db91c106867d45c94= b\ |3d6d7bc0e50f0 | |commit c2356a440db91c106867d45c94b3d6d7bc0e50f0 |Author: Dag-Erling Sm=C3=B8rgrav |AuthorDate: 2024-01-09 14:09:41 +0000 |Commit: Dag-Erling Sm=C3=B8rgrav |CommitDate: 2024-01-09 16:27:15 +0000 | | asa: Rewrite to fix line termination issue. | =20 | The standard is somewhat unclear, but on the balance, I believe \ ... | - Second, it unconditionally emits a newline at the end of the output | for non-empty input, even if the input did not end with a newline. ... I want to point out that POSIX only knows about text files which end with a LF newline. Otherwise it is not a text file. (I think Stallman and emacs joke on this by allowing something else, iirc from before Y2K when i shortly used it, and, funnily, from some thread on another ML just last week or so, where it was claimed that this could have roots in emacse not rooting in UNIX.) That is (sorry for that) "3.387 Text File" is a "file that contains characters organized into zero or more lines. The lines do not contain NUL characters and none can exceed {LINE_MAX} bytes in length, including the character". And "3.185 Line" is a "sequence of zero or more non- characters plus a terminating character". Crystal clear thus (:)). P.S.: numbers are from Draft 4 of upcoming POSIX standard. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From nobody Tue Jan 9 18:17:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8fL92rFLz567qk; Tue, 9 Jan 2024 18:17: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 4T8fL92BvTz4Vwt; Tue, 9 Jan 2024 18:17:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704824273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IQy8e/1CHw5ex2aAnNS7VZ4rPSyfcpUBwARRhIioEFE=; b=WiUMJQnne1T0zRvVvLpHl9dyWpy4Urcl8gwoJ0lVWcymwJDLqgBhiqWVR+uxitFcg3+uO0 gkqBuIgZ1EjurKU5qAuHQOAXELLkAa5jOtnHzQvCL9gofDisejxLTTWhjn/tZhVd/KAAtn SY45EHCgpBkEVhTnkhnqAyud/jZmSJNckJiX9bhm3exyoK0ndokqhNRir9xhmfBNs12n5X GGpwFJPGGOVywiSH9Vg99v7lTMVLPf4+bB3Z4YpywXXGDeziKCdD5GKVXDfhZgEfFdgK74 O+iBNMcky0Ccwmagd7dFC8N/kGMal2eBTls1BA01ITPPEm+jBZtmz+9fBOBDIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704824273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IQy8e/1CHw5ex2aAnNS7VZ4rPSyfcpUBwARRhIioEFE=; b=hcaTUVM/jKi7VZKWZFfp3hwbhPl92lq44JLJq3lwfKBBJcHxl25G/hHyloOuwC6/FQSazN cWvCSldfHfkB5DO3JMjyjMQOxL9a6looNTVVjcv09ATlj4tJFVcIJtmShhumK5xBE070Pq aBEOure7mYeXNLjEE8MHJXqvMY3AKPZwUhtsLNFIr+ewxyaHbQks+BYAMAxp40bajAycfH l19c4Rw5GDwnumlCNuqjrtMS6i2p1Xaysc379t4/KcmfFcKR3nRLurwTUykH4fQcb1312N ybox9cvEPX5tTxDcjmCYUzT5n6LVY55OkGz8+TODWcy3Y1sNv9hvj3BaLGNAGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704824273; a=rsa-sha256; cv=none; b=e0n7eA5CrGIo0U6xfJZGU+V0XZ4KbeULCXfDK4EYXSqyS+hi4OV3oLm8B6PWDuubMBkq7g +m8F1dVdoanMyJ79jBp4aN3h3xjm2MmXlsleO7L2HqByMZ8I6F61gamN9eyzElrqhstCuV UwChzHctN8nyNDxPUp8Zkh4WoMioya9rbymE3zOmU990mrLqH/cXGdmcAFHkJAmMDaUx1c 9LNe4P5kW/bOMojVhm4/BJL6/8bZ0hfjGJZJGVs/pavoFKMwzrpVDiY1F+HpuEeWR2aSoX mDwNFQ3qcNaTNjr2ybUAfNivR0G2AmxbNP6lcvNeTxy8XOiZ9OfSVvkKibS2XA== 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 4T8fL90g76z11tk; Tue, 9 Jan 2024 18:17: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 409IHqua015123; Tue, 9 Jan 2024 18:17:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409IHqik015121; Tue, 9 Jan 2024 18:17:52 GMT (envelope-from git) Date: Tue, 9 Jan 2024 18:17:52 GMT Message-Id: <202401091817.409IHqik015121@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Gmelin Subject: git: 731704f5ea2f - main - bsdinstall: Fix installation script splitting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grembo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 731704f5ea2f6f9d7e3c4b5ed2ad1a3cba703f42 Auto-Submitted: auto-generated The branch main has been updated by grembo: URL: https://cgit.FreeBSD.org/src/commit/?id=731704f5ea2f6f9d7e3c4b5ed2ad1a3cba703f42 commit 731704f5ea2f6f9d7e3c4b5ed2ad1a3cba703f42 Author: Michael Gmelin AuthorDate: 2024-01-06 16:55:31 +0000 Commit: Michael Gmelin CommitDate: 2024-01-09 18:14:17 +0000 bsdinstall: Fix installation script splitting This allows writing setup scripts that contain lines starting with "#!", e.g., a shebang when creating a shell script using cat: #!/bin/sh echo "Populate rc.local" cat >/etc/rc.local<pathb; else print}' \ + "$SCRIPT" $TMPDIR/bsdinstall-installscript-setup \ + >$TMPDIR/bsdinstall-installscript-preamble + + . $TMPDIR/bsdinstall-installscript-preamble fi test ! -d $BSDINSTALL_DISTDIR && mkdir -p $BSDINSTALL_DISTDIR @@ -146,8 +151,9 @@ cp /etc/localtime $1/etc cp /var/db/zoneinfo $1/var/db # Run post-install script -if [ -f $TMPDIR/bsdinstall-installscript-ab ]; then - cp $TMPDIR/bsdinstall-installscript-ab $BSDINSTALL_CHROOT/tmp/installscript +if [ -f $TMPDIR/bsdinstall-installscript-setup ]; then + cp $TMPDIR/bsdinstall-installscript-setup \ + $BSDINSTALL_CHROOT/tmp/installscript chmod a+x $BSDINSTALL_CHROOT/tmp/installscript mount -t devfs devfs "$BSDINSTALL_CHROOT/dev" chroot $BSDINSTALL_CHROOT /tmp/installscript $@ 2>&1 diff --git a/usr.sbin/bsdinstall/scripts/script b/usr.sbin/bsdinstall/scripts/script index ae1c6b3011fa..00ded5f8e24d 100755 --- a/usr.sbin/bsdinstall/scripts/script +++ b/usr.sbin/bsdinstall/scripts/script @@ -88,10 +88,15 @@ shift f_dprintf "Began Installation at %s" "$( date )" rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC +rm -f $TMPDIR/bsdinstall-installscript-setup -split -a 2 -p '^#!.*' "$SCRIPT" $TMPDIR/bsdinstall-installscript- +# split script into preamble and setup script at first shebang +awk 'BEGIN {pathb=ARGV[2]; ARGV[2]=""} /^#!/{b=1} { + if (b) print >pathb; else print}' \ + "$SCRIPT" $TMPDIR/bsdinstall-installscript-setup \ + >$TMPDIR/bsdinstall-installscript-preamble -. $TMPDIR/bsdinstall-installscript-aa +. $TMPDIR/bsdinstall-installscript-preamble : ${DISTRIBUTIONS="kernel.txz base.txz"}; export DISTRIBUTIONS export BSDINSTALL_DISTDIR @@ -158,8 +163,9 @@ if [ ! -f $BSDINSTALL_CHROOT/etc/resolv.conf -a -f /etc/resolv.conf ]; then fi # Run post-install script -if [ -f $TMPDIR/bsdinstall-installscript-ab ]; then - cp $TMPDIR/bsdinstall-installscript-ab $BSDINSTALL_CHROOT/tmp/installscript +if [ -f $TMPDIR/bsdinstall-installscript-setup ]; then + cp $TMPDIR/bsdinstall-installscript-setup \ + $BSDINSTALL_CHROOT/tmp/installscript chmod a+x $BSDINSTALL_CHROOT/tmp/installscript chroot $BSDINSTALL_CHROOT /tmp/installscript $@ 2>&1 rm $BSDINSTALL_CHROOT/tmp/installscript From nobody Tue Jan 9 18:43:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8fw16Snrz56Cr0; Tue, 9 Jan 2024 18:43:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8fw152mZz4ZFx; Tue, 9 Jan 2024 18:43:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704825825; h=from:from:reply-to:subject: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=yarCYYJdDDb0pAsYIBZCUrwMmqXJ3aLC53zh8Mkbd98=; b=wt4QCJWeRuFHMgDJy50CAwEED/ud+VYlVcacbAkbooH7xomIJnIBRIOd2l3cqRhQlbo/L0 uzTXpqq0v6bA13zR6H642M7YlGbTbZ67Yy27mwE5T5H63WAEK8UHXleWISAUrJ8iBZ381O ElY2cdPKtg3Ual92UD7dnvaOFNiG80umCRMZAFI5fcvd44hXgUtk4qD9uaLiLMkp+TmOgH BEDZAfVU51BmEM17CwhcSa+qNSY/XnxSG/TrFTtJNx4eTU6fd3i7vxhhd30PdKFBuDn9PI Df3lp1+pZn1G25kRuX66HbxE2fJ46QC1mgkHzehuXpqwZp9RKtQq14ps6O60hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704825825; h=from:from:reply-to:subject: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=yarCYYJdDDb0pAsYIBZCUrwMmqXJ3aLC53zh8Mkbd98=; b=Ri2LeIn55vPlUUNHac66yHTzu217J+168VF36mk9VvipCq1rkR1j+u6adzW0XzbCVXPVGO 1Oss/qpLkBVQoQfC3Ol7yW9YwV5TFfMhL8jqqFjJFL5lH316QI/4i3NhK1wP9YgkOQrIFU 6EM5AYwJYujAWa5Opz9CxCHKjTKLByD/8KfkaPXRWyqY5F3gZrTTmqdJvK6HYrqBnJzInl veNz2uctGSvVXjJmvC8NBzq03fsPQYziB+eO36esVrSj5lJqBrOG3dzlx6Wf45X9yphHRN Vi0gqaY1/O8dAeCXwQYPxFdgN4XVde8S8D9qyiZjnFPJYnfp5Q/iYksIh1Y+zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704825825; a=rsa-sha256; cv=none; b=kA9SaZJht7O3UEImIt8ISeNP44unJE28O6h5mp0kXVbXZl6bvzRvW55bGXY+RW76FU4BKn hCuaG9LhGIvDceU5ILetT1YDyTX395zW1uE4HulbQ2ymgzZ/qVM35Qp29iAM/RHiDxMafM v44DisT+3Pth6zrQ3PNfx6etyaHSHI5bXSIe4ODexC+Qmn6emHDP89kByh/ebbpX4OKdQ0 IvS6nhi5oA7MA0Cs3msJl/GALJZlRywXCbwtxA/Q9cicGnlvQB5LEaql8n9PCIEIDII6gG oeQgW81L+HZNxMQ3B+CM3J2g/2n93FZHOX06lAbSauN6xLBJqF9LxV59Z4I/2A== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4T8fw1203qzVDQ; Tue, 9 Jan 2024 18:43:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <637f3964-c65e-42cf-97a1-342e9447cd69@FreeBSD.org> Date: Tue, 9 Jan 2024 12:43:44 -0600 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: c2356a440db9 - main - asa: Rewrite to fix line termination issue. Content-Language: en-US To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202401091627.409GRcI0028831@gitrepo.freebsd.org> <20240109180554.UYZwm9Yl@steffen%sdaoden.eu> From: Kyle Evans In-Reply-To: <20240109180554.UYZwm9Yl@steffen%sdaoden.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 1/9/24 12:05, Steffen Nurpmeso wrote: > Dag-Erling Smørgrav wrote in > <202401091627.409GRcI0028831@gitrepo.freebsd.org>: > |The branch main has been updated by des: > | > |URL: https://cgit.FreeBSD.org/src/commit/?id=c2356a440db91c106867d45c94b\ > |3d6d7bc0e50f0 > | > |commit c2356a440db91c106867d45c94b3d6d7bc0e50f0 > |Author: Dag-Erling Smørgrav > |AuthorDate: 2024-01-09 14:09:41 +0000 > |Commit: Dag-Erling Smørgrav > |CommitDate: 2024-01-09 16:27:15 +0000 > | > | asa: Rewrite to fix line termination issue. > | > | The standard is somewhat unclear, but on the balance, I believe \ > ... > | - Second, it unconditionally emits a newline at the end of the output > | for non-empty input, even if the input did not end with a newline. > ... > > I want to point out that POSIX only knows about text files which > end with a LF newline. Otherwise it is not a text file. (I think > Stallman and emacs joke on this by allowing something else, iirc > from before Y2K when i shortly used it, and, funnily, from some > thread on another ML just last week or so, where it was claimed > that this could have roots in emacse not rooting in UNIX.) > It notably defines a text file as zero or more lines, and doesn't say anything about incomplete lines -- just that none of the lines contain NUL characters. One can conclude without further information that a trailing LF is not at all required in any circumstance, it's just an incomplete line. From nobody Tue Jan 9 18:58:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8gDs1V75z56FxQ; Tue, 9 Jan 2024 18:58: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 4T8gDs10W9z4bpp; Tue, 9 Jan 2024 18:58:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ywSNpW5bRnt9NtlUVSegyRoL1DBvRJ0GFFWMCDIj/T8=; b=OTvSJuZhJliVrWiZ9rYOI/MgTlMy99H9e/Cemwx6IX/ISb3TWcAfVGWLJLwFiRVUKKiIfC RmZ0wQfYJUJHPyt0JKjI947ks3AVm6/cNw+NxL4IH4Ni6DfH+5ikaY0DH9BI8FMUA4zbwS b86xwZOMIsg5DCmZMt6FNXwIk3UXaT3r4B2kJgs5RVMpWtvLI6lLxGtp5DA0kW9XGqxQl4 eg1i5OZNlajpvr4HEfv8YvSMJTE/ig7Jg0JWbUEEjvB8VMa3o0kfo5k1ruVrciS6kWTf0P X0LLNwwJZyKwbEvKkak5vKe4slCtE+5iZFwpxaP5IU73Lty5SBic4RPhavEfig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ywSNpW5bRnt9NtlUVSegyRoL1DBvRJ0GFFWMCDIj/T8=; b=SxexQP8JY+fwDHyKgkXJI3dqNt7b+e1UF5onW6QEqVR4Ll5Nf3bqQ8ZWTQ5kPl+Y1nSM3L 8fAbOLlhr04Q604/N0c68P4qOUzaR9L+CtVfWU1/XJFL3CASTaNF0XiwgHNyzqktJ9VTXN TJ1HmskC113WxAFWxpVFWeFd9SmYRCcK54kov83ljzEkYK1U54wnWLWdnAtp3F7HKviseu b6DyP4bTY0/f6cQigblHo14P2RfhSoj26oK4nuOG/zYSfcH/TebydYhF75okXWXa3GEJWb XBzKoCB0Ry9zeOy0n+qQEYQfQHA+/Hx8H4Jle5owx2dTcSVji8D/Ocp+30TAzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704826701; a=rsa-sha256; cv=none; b=ScqhbHj99gOpr5Epazwc3K3MvX7esiItTpgC03rkVv5dH1AvbcOjbi+rrDWrs7SGE8e8Ud m7ooTwkPmFotzR427zUG99Oi434f2vMosfMPGF7zniTakW86RiIqkwpF8byCU5Ejd3uHR/ tPVBZ13wGKB95Mdjh0/uQ2hUyFJgQ6MHYb/7GsKOceDYrY0wIGGvhEHxzcHeYQZ3kv/+UU gnZsaafMHZ2oRrEhkYzzc+X/YqY9QM+ekTUVU4/Gf1LlGmGbVHsL47/BshilLWO8clZapt l7n/1b4IvKtM07XO/SBA/Vn4CiKrsq0h6+Wk5hX8/3vXCUgofEpDbbTKsQ3P9w== 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 4T8gDs033Jz12hl; Tue, 9 Jan 2024 18:58: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 409IwK29081455; Tue, 9 Jan 2024 18:58:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409IwKlf081453; Tue, 9 Jan 2024 18:58:20 GMT (envelope-from git) Date: Tue, 9 Jan 2024 18:58:20 GMT Message-Id: <202401091858.409IwKlf081453@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: 6631e2f9b49e - main - kldxref: Workaround incorrect PT_DYNAMIC in existing powerpc kernels List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 6631e2f9b49e08f53c7beb560ee8509c343b3927 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6631e2f9b49e08f53c7beb560ee8509c343b3927 commit 6631e2f9b49e08f53c7beb560ee8509c343b3927 Author: John Baldwin AuthorDate: 2024-01-09 18:57:48 +0000 Commit: John Baldwin CommitDate: 2024-01-09 18:57:48 +0000 kldxref: Workaround incorrect PT_DYNAMIC in existing powerpc kernels Existing powerpc kernels include additional sections beyond .dynamic in the PT_DYNAMIC segment. Relax the requirement for an exact size match of the section and segment for PowerPC files as a workaround. Reported by: jrtc27 Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D43123 --- usr.sbin/kldxref/ef.c | 11 ++++++++++- usr.sbin/kldxref/ef.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/usr.sbin/kldxref/ef.c b/usr.sbin/kldxref/ef.c index fd0782ff1dd0..1ef27f2bc54a 100644 --- a/usr.sbin/kldxref/ef.c +++ b/usr.sbin/kldxref/ef.c @@ -248,8 +248,17 @@ ef_parse_dynamic(elf_file_t ef, const GElf_Phdr *phdyn) dynamic_idx = -1; for (i = 0; i < nshdr; i++) { if (shdr[i].sh_type == SHT_DYNAMIC) { + /* + * PowerPC kernels contain additional sections + * beyond .dynamic in PT_DYNAMIC due to a linker + * script bug. Permit a section with a smaller + * size as a workaround. + */ if (shdr[i].sh_offset != phdyn->p_offset || - shdr[i].sh_size != phdyn->p_filesz) { + ((elf_machine(ef->ef_efile) == EM_PPC || + elf_machine(ef->ef_efile) == EM_PPC64) ? + shdr[i].sh_size > phdyn->p_filesz : + shdr[i].sh_size != phdyn->p_filesz)) { warnx(".dynamic section doesn't match phdr"); error = EFTYPE; goto out; diff --git a/usr.sbin/kldxref/ef.h b/usr.sbin/kldxref/ef.h index 2909704bf2d1..25dc5216b169 100644 --- a/usr.sbin/kldxref/ef.h +++ b/usr.sbin/kldxref/ef.h @@ -100,6 +100,7 @@ struct elf_file { int ef_fd; }; +#define elf_machine(ef) ((ef)->ef_hdr.e_machine) #define elf_class(ef) ((ef)->ef_hdr.e_ident[EI_CLASS]) #define elf_encoding(ef) ((ef)->ef_hdr.e_ident[EI_DATA]) From nobody Tue Jan 9 19:02:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8gL36xv9z56Gvx; Tue, 9 Jan 2024 19:02:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8gL36P3yz4cP1; Tue, 9 Jan 2024 19:02:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZXkxKF84jE31J3t/1bjdfwLM3UY3eF+ScoVOz+JAKDU=; b=lG2yJMBT7laSrXUqT9y7Nwzuq9nNB40hiYOyUAkBO3PmHP3A7/mcDqm11XveCq8sMtm1Bn hc+ukxP1pMr6iu8pjbiL+AY4a/SQWu2RPr3cxYZVbHp96OkbE9UqxpL6Jkb+6MO70KSECs /hn/AUW4XbjIQmSXb+ftrXyn6ji+3/RKlQl+Vg/ioPfv6j2qw7TQhEesRWcRfZp+6Ah9dm amS7Fvyhm+a4ugf0aOggDQ0JJNIQG84uJw5jOU1V1dV39zVIkD/P4HOSxNhLt4cdhPXCg+ 1urP6r69zmrFsuV70uYhX6az+ySDM5+CyZDtkD1oc6Z4HuI14pAqPqAwTIwF+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZXkxKF84jE31J3t/1bjdfwLM3UY3eF+ScoVOz+JAKDU=; b=VPMtaTh8liNZFpZC4bamxGtGNyulblHZXYk2H6+FNf6mdWkHKWdu638paDDrjTJ2zfi93N 3BeGh+w+pw1efWdBF5dkGCrw7Okyhddy0LxNom/L/sWt6NVtf+TFgjJu1mb/gh1n4BMCnz 14XN00sPqW1aMTKxrCwMqGJpgDCYSlqcEDcyrGQDw3CX1GA63Uj56beOIIv/T4lx45vEAY oT7Udz/e8Wp+0texafhlf1OJAyl8goBoLmrvYzCQR7bPbDgikMUWNYyxiue+z7Dvbkh9Du 6pTB9HCkKI4GwqdbodSQn0G6gYWGtsLCen+k6znfHJV/hVzsyKY79cJmZq69XA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704826971; a=rsa-sha256; cv=none; b=imZbR8bvW/QlIYjCFpcj25ResMBYjxKfKW3bcfmhKQ74EDSt3+6glEd7BMF6XzhmXzcbqE mCfyNcKy7iVPWetZc9d9IgSMeS8Gh6JBB0zhqspjI9+HqiaNNNyhngK2mIYe3Bke+Ww4K3 jhxK6KDqJRr1vL381AZw1wiM1YIMFvqWgrB1EafqUK7Yf4I60rRdFFp7/rFB3PHEO5wmyo KnZM5XbU93rX58/kDZQuwuhKoB/5SPWD/mc4kjW2Q4ltD263j//B+6srTdewsyBoc79XkN cT9DPRPwM6c4xHnRFZ0rJMD7PCa9FtvBGcKSAlNa6SAnO9hVMkS9d9K0U9VkzQ== 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 4T8gL35S2wz136n; Tue, 9 Jan 2024 19:02:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 409J2phd098614; Tue, 9 Jan 2024 19:02:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409J2pkj098611; Tue, 9 Jan 2024 19:02:51 GMT (envelope-from git) Date: Tue, 9 Jan 2024 19:02:51 GMT Message-Id: <202401091902.409J2pkj098611@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: 6977311633c7 - main - net80211 amdpu: Simplify a few loops that drain an mbufq List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 6977311633c73f594ff3dae150d6d1fe06105a8f Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6977311633c73f594ff3dae150d6d1fe06105a8f commit 6977311633c73f594ff3dae150d6d1fe06105a8f Author: John Baldwin AuthorDate: 2024-01-09 18:59:48 +0000 Commit: John Baldwin CommitDate: 2024-01-09 18:59:48 +0000 net80211 amdpu: Simplify a few loops that drain an mbufq These loops already handled a NULL return from mbufq_dequeue when the queue was empty, so remove a redundant check of mbufq_len before dequeueing. Reviewed by: bz Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43336 --- sys/net80211/ieee80211_ht.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index ea59bb622dd8..5297b741d9b9 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -517,7 +517,7 @@ ampdu_rx_purge_slot(struct ieee80211_rx_ampdu *rap, int i) struct mbuf *m; /* Walk the queue, removing frames as appropriate */ - while (mbufq_len(&rap->rxa_mq[i]) != 0) { + for (;;) { m = mbufq_dequeue(&rap->rxa_mq[i]); if (m == NULL) break; @@ -812,7 +812,7 @@ ampdu_dispatch_slot(struct ieee80211_rx_ampdu *rap, struct ieee80211_node *ni, struct mbuf *m; int n = 0; - while (mbufq_len(&rap->rxa_mq[i]) != 0) { + for (;;) { m = mbufq_dequeue(&rap->rxa_mq[i]); if (m == NULL) break; From nobody Tue Jan 9 19:02:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8gL50kqxz56GdG; Tue, 9 Jan 2024 19:02: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 4T8gL473skz4ckn; Tue, 9 Jan 2024 19:02:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YDP5Dgy1R37w2f2HXF9SDv8Y5QuttzXjWOyUte0tyvA=; b=pqNox7y1+Jdm7o7r9CpdzwDMgb2CvbTL/r5eJC9VNwvV7VHxhwemKYbb+N9hCu2Z2jhFG8 G3SCnQe4BhASLQ5UgCTYsLS3WoTAEVcaXXeUPF0IOA5vzVbQpcBJGN1pqc5sw7wyik+o+7 oksNkSIjbmXI/AMvFJIYzBHwdNmoF6o4olrW/kglblm2QpcGzGPPWnESBAIV6v7ETuutT4 oKTk4Kh/XwUjEhwpzl2F/pHYAApPwcBF+jX8MRkufaU8ZyVxaPtVFQ/vLUezA5MYRNnmH3 d29u4qehziNEgnsE5G3dFJDnq20wVoIkNZw6E2dvv8IuINRM9eWCuV9aNxRXWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YDP5Dgy1R37w2f2HXF9SDv8Y5QuttzXjWOyUte0tyvA=; b=VOGRYUgzu+G0eh9J99rgnTLx+EfCavuPi9IGFWPdKKjz5GBODQsXJHD/k+kaJ6jeKDmzmt Kcrbyqw+FS96zy5Ld0GEpWGFZtTEeAcs8ijVSJRrBbKFhXmd2vojUOzK99qqc/h2H0sDdd sIDDZxRbog4XxbCLONT7SN6raqgehG9forhg6PD8MQ8ePSGhJ/QguNqe4ue5GEAjm0bldp mWHKDYlpTuHJt0OoN0/WwRrE/mfI4+pGB2dSCRXWB+nQoDvmiQ10cKN74KsSQR5aPlzUEf gntaNOC2iRtTYZSrFk3p6T77iCuOmj0cixPuAAfVn0lMvrcU1SjLFA2JcGbmIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704826973; a=rsa-sha256; cv=none; b=p0h59+ofeYugAwRCk6qhYN+vjmXXRsLICFte7M3RNuO3G6vOTMsuIAqwcLdJclfXr6GFJU 69Al8FLtEWmrAOPyKqgfVfCbRrwzxOPgzocI+vGEksIzonPdsOVgTiuGK8hLuzmRQ7FI+O RqtMCuCIMGmqtZSAxEJJygsYOfNl//oMbmOGidiVENnnFg2WbrErot6vdojipx3PX1l8Wk 1iiJXFGERNt8g5zt8rs0h4TXdctEDG/7QzWLFSmQZWiHx6g0MXfxSwh9uM8wwbjkU8rKAi Vwuw92hMyU0B6w4/LucfTQnMZMfnsSWYcnvPkSZGYw45hZbxfSqFtxvRbQj0KQ== 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 4T8gL466X8z134k; Tue, 9 Jan 2024 19:02:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 409J2qNS098650; Tue, 9 Jan 2024 19:02:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409J2qJw098647; Tue, 9 Jan 2024 19:02:52 GMT (envelope-from git) Date: Tue, 9 Jan 2024 19:02:52 GMT Message-Id: <202401091902.409J2qJw098647@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: 76f405ed6354 - main - mbuf: Add mbufq_empty List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 76f405ed63540aa2d989c231f70277062e76ccfb Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=76f405ed63540aa2d989c231f70277062e76ccfb commit 76f405ed63540aa2d989c231f70277062e76ccfb Author: John Baldwin AuthorDate: 2024-01-09 19:00:19 +0000 Commit: John Baldwin CommitDate: 2024-01-09 19:00:19 +0000 mbuf: Add mbufq_empty Complement to the existing mbufq_full Reviewed by: bz Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43337 --- sys/sys/mbuf.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index bb15557b5b6c..b84898fc268e 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -1607,6 +1607,12 @@ mbufq_last(const struct mbufq *mq) return (STAILQ_LAST(&mq->mq_head, mbuf, m_stailqpkt)); } +static inline bool +mbufq_empty(const struct mbufq *mq) +{ + return (mq->mq_len == 0); +} + static inline int mbufq_full(const struct mbufq *mq) { From nobody Tue Jan 9 19:02:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8gL649F2z56GXc; Tue, 9 Jan 2024 19:02: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 4T8gL61QMfz4cl1; Tue, 9 Jan 2024 19:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I/BIjG+Gsmpkfpmh+r59IadWo510p0jaVFq3NRsCjmY=; b=nio2bXr2jffzuLw4W84prCloV5XpTgZZDIkQb8m6JsKpNxPPZV61TLZvRsqg7IwtSy/Vt+ pj1+pPWC0CmPowG+Dojw8I1j10MrvEBAFeHswNiz8hM8PLLBSePqJjrvjT03EU24Ingq2n toBK9aLkzBblgSrVmGuWVxp7Aji6N/ROvB6bnRA5AbMLhRZN+/g6ZCSpnutNojN/mPJP4o bVMPL4xd3ypB4gvI62yaX7b86SrkHSDi01yN5xP4AYlgrrHtxiDX/TP4mS2qkXQyDhKQ2w +obckwxB7D3XmxpKuQiNXbKW4I/7fBIKYais/2HX7rnDikh+d3EqISmHcEjCrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I/BIjG+Gsmpkfpmh+r59IadWo510p0jaVFq3NRsCjmY=; b=b/QeO1piJTugGf8Bu3KsCyLam4aXB/4BfRSxdxOPOOinzpy6rdGS9EU534UGAmq3LB0/dM rYQQAYmqnU6LWIfpXcXk2vZKbXysekcOyGp0PpmBe5so8FkZz9cQLrKB6/SRA2CURqpnfl xyuDoeJb5NZ8VqTD+naTAX2lBiichrTrlUGfR4GE74C3UafMDDjcGCKxNl6wzOUyv6VT0+ rlqv9ybBOw/VtOi4i/H2k0dURBFkYCaKzCcPE9DoxFHST5Wln4IksNqKpvVWjOFY5BCDTc NvZAO4juyMorN1cShV4tSH0ql3XbiPra2Jy/Z/h8+QCMFB0XJeddUIm7Fv4cZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704826974; a=rsa-sha256; cv=none; b=OMRq5Dh9dVdqVLUz+3aEs1z0q7aUclS7NIMgz90nGCrfr/KfHS6waf5YSn15/+NOgqbg+K l0dJLUTM446iMTuqR6OiysSjzpnTtfcWsT60Ct4IOzX+Q//yFZ3+XGq4q4Omm3gP2SekPc cioLSbw53eDJJYeenXEyIju+CorrvLT30V8573J4clI3eFp+HCjeV9vwHpbSKE3i0ejk3k rOOhlNavCWyoxpP02kLclAvzIoe95CarpdNQA2VvI4rsOtw/+YwC+Fk+UjAvtzc5nM8aEX 58Pipw1eNdWF4qACC0o3qMgVy+mN/M0ZIfm0OQWUmMLkR9gCV0zG2lBhIxH99A== 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 4T8gL60TZkz12Sk; Tue, 9 Jan 2024 19:02: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 409J2r8i098706; Tue, 9 Jan 2024 19:02:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409J2rNO098703; Tue, 9 Jan 2024 19:02:53 GMT (envelope-from git) Date: Tue, 9 Jan 2024 19:02:53 GMT Message-Id: <202401091902.409J2rNO098703@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: 8cb9b68f5821 - main - sys: Use mbufq_empty instead of comparing mbufq_len against 0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 8cb9b68f5821e45c63ee08d8ee3029ca523ac174 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8cb9b68f5821e45c63ee08d8ee3029ca523ac174 commit 8cb9b68f5821e45c63ee08d8ee3029ca523ac174 Author: John Baldwin AuthorDate: 2024-01-09 19:00:46 +0000 Commit: John Baldwin CommitDate: 2024-01-09 19:00:46 +0000 sys: Use mbufq_empty instead of comparing mbufq_len against 0 Reviewed by: bz, emaste Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43338 --- sys/compat/linuxkpi/common/src/linux_80211.c | 2 +- sys/dev/cxgb/cxgb_sge.c | 4 ++-- sys/dev/cxgbe/tom/t4_tom.c | 4 ++-- sys/net/if_epair.c | 2 +- sys/net80211/ieee80211_ddb.c | 2 +- sys/net80211/ieee80211_ht.c | 6 +++--- sys/netinet/igmp.c | 2 +- sys/netinet6/mld6.c | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index aa90100a328c..edd2423c59b5 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3346,7 +3346,7 @@ lkpi_ic_node_free(struct ieee80211_node *ni) /* Flush mbufq (make sure to release ni refs!). */ #ifdef __notyet__ - KASSERT(mbufq_len(&lsta->txq) == 0, ("%s: lsta %p has txq len %d != 0\n", + KASSERT(mbufq_empty(&lsta->txq), ("%s: lsta %p has txq len %d != 0\n", __func__, lsta, mbufq_len(&lsta->txq))); #endif /* Drain taskq. */ diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index ca5ff3f1d417..f57494065aec 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -1838,7 +1838,7 @@ check_desc_avail(adapter_t *adap, struct sge_txq *q, * the control queue is only used for binding qsets which happens * at init time so we are guaranteed enough descriptors */ - if (__predict_false(mbufq_len(&q->sendq))) { + if (__predict_false(!mbufq_empty(&q->sendq))) { addq_exit: (void )mbufq_enqueue(&q->sendq, m); return 1; } @@ -1954,7 +1954,7 @@ again: reclaim_completed_tx_imm(q); } q->in_use++; } - if (mbufq_len(&q->sendq)) { + if (!mbufq_empty(&q->sendq)) { setbit(&qs->txq_stopped, TXQ_CTRL); if (should_restart_tx(q) && diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index e5b173964451..77b6ba5d4032 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -323,8 +323,8 @@ release_offload_resources(struct toepcb *toep) * that a normal connection's socket's so_snd would have been purged or * drained. Do _not_ clean up here. */ - MPASS(mbufq_len(&toep->ulp_pduq) == 0); - MPASS(mbufq_len(&toep->ulp_pdu_reclaimq) == 0); + MPASS(mbufq_empty(&toep->ulp_pduq)); + MPASS(mbufq_empty(&toep->ulp_pdu_reclaimq)); #ifdef INVARIANTS if (ulp_mode(toep) == ULP_MODE_TCPDDP) ddp_assert_empty(toep); diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index 2fa016c8f35c..7bc218321f01 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -177,7 +177,7 @@ epair_tx_start_deferred(void *arg, int pending) * end up starving ourselves in a multi-epair routing configuration. */ mtx_lock(&q->mtx); - if (mbufq_len(&q->q) > 0) { + if (!mbufq_empty(&q->q)) { resched = true; q->state = EPAIR_QUEUE_WAKING; } else { diff --git a/sys/net80211/ieee80211_ddb.c b/sys/net80211/ieee80211_ddb.c index cd4a4f191745..0042d5d4aeb6 100644 --- a/sys/net80211/ieee80211_ddb.c +++ b/sys/net80211/ieee80211_ddb.c @@ -222,7 +222,7 @@ _db_show_rxampdu(const char *sep, int ix, const struct ieee80211_rx_ampdu *rap) db_printf("%s age %d nframes %d\n", sep, rap->rxa_age, rap->rxa_nframes); for (i = 0; i < IEEE80211_AGGR_BAWMAX; i++) - if (mbufq_len(&rap->rxa_mq[i]) > 0) { + if (!mbufq_empty(&rap->rxa_mq[i])) { db_printf("%s m[%2u:%4u] ", sep, i, IEEE80211_SEQ_ADD(rap->rxa_start, i)); STAILQ_FOREACH(m, &rap->rxa_mq[i].mq_head, diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index 5297b741d9b9..c747d29735a6 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -567,7 +567,7 @@ ampdu_rx_add_slot(struct ieee80211_rx_ampdu *rap, int off, int tid, /* * Get the rxs of the final mbuf in the slot, if one exists. */ - if (mbufq_len(&rap->rxa_mq[off]) != 0) { + if (!mbufq_empty(&rap->rxa_mq[off])) { rxs_final = ieee80211_get_rx_params_ptr(mbufq_last(&rap->rxa_mq[off])); } @@ -597,7 +597,7 @@ ampdu_rx_add_slot(struct ieee80211_rx_ampdu *rap, int off, int tid, * If the list is empty OR we have determined we can put more * driver decap'ed AMSDU frames in here, then insert. */ - if ((mbufq_len(&rap->rxa_mq[off]) == 0) || (toss_dup == 0)) { + if (mbufq_empty(&rap->rxa_mq[off]) || (toss_dup == 0)) { if (mbufq_enqueue(&rap->rxa_mq[off], m) != 0) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT | IEEE80211_MSG_11N, ni->ni_macaddr, @@ -1075,7 +1075,7 @@ again: /* * Dispatch as many packets as we can. */ - KASSERT((mbufq_len(&rap->rxa_mq[0]) == 0), ("unexpected dup")); + KASSERT(mbufq_empty(&rap->rxa_mq[0]), ("unexpected dup")); ampdu_dispatch(ni, m); ampdu_rx_dispatch(rap, ni); return CONSUMED; diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index 74cf7a557d9a..1655963e6cff 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -3383,7 +3383,7 @@ igmp_v3_dispatch_general_query(struct igmp_ifsoftc *igi) * many packets, we should finish sending them before starting of * queuing the new reply. */ - if (mbufq_len(&igi->igi_gq) != 0) + if (!mbufq_empty(&igi->igi_gq)) goto send; ifp = igi->igi_ifp; diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c index 3c07d6fa1d6b..5dd192a69fa9 100644 --- a/sys/netinet6/mld6.c +++ b/sys/netinet6/mld6.c @@ -2993,7 +2993,7 @@ mld_v2_dispatch_general_query(struct mld_ifsoftc *mli) * many packets, we should finish sending them before starting of * queuing the new reply. */ - if (mbufq_len(&mli->mli_gq) != 0) + if (!mbufq_empty(&mli->mli_gq)) goto send; ifp = mli->mli_ifp; From nobody Tue Jan 9 19:09:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8gV65fJGz56HXl; Tue, 9 Jan 2024 19:09: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 4T8gV65QNRz4dyh; Tue, 9 Jan 2024 19:09:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704827390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4dl5Oyb/x/Iq6jgC6nu6GLPu/+Io+zGEi7awy8CW0Hw=; b=aDlkYbaQYKiP0CAN0B1GbtaNq28MWhm781Qi0KE0t7TodJlW+CWqPvxad/UCZOgi6rNG3R rSsnTFoMy2FAL/562UN4zj0fqn5HyA5SYlt9z2JyQldjVj0CYDirjZBYWAvVUi2JTbgPLj FSyF+0sgwJ6DgiCmYwkWfVtVLoPAdVEpFFhlhUUZ1FwOqC1xqWFQXD/4y9Mn7oQ+QgNNuH J+o+yI81L5se1koZcVMztKPwCLPDcvUCRMVzBHQWYLgfgrZtdDrfEsMfrLU74s+6cZgNwB TAm4MVb4QZldJUmAgxk6KIgZD1xUD45TnoylETsWBXd8BQTzA+WgJ5vF+GHdgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704827390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4dl5Oyb/x/Iq6jgC6nu6GLPu/+Io+zGEi7awy8CW0Hw=; b=KQwnUlGMZaiJ/tSGJlA3ajpYGm6CQRMinGmDsEINJ6kFxLRZWigZfpCFNBut1PTo7l3sUG 3q9wYi1JQqefueF5Zkdadtu/nuaveTWHE+W9PQSdtvhNL3Jxt5fka1Cv2pg2qoxO7FOPvl KX2DodldaTSo6s2mA9/tEhaPbRpoFvXVbAx3XwtdEWZXjVxdsY/cHR1l22bu8ha75ozYuw bEpJ9TRde9j8fuYkn+c8+gsOYUJMdOkjkUYSsOyrqPXqZkiYeg4aYhted7DaDEubwOfE+N MrKh5BVWwXDnU/gb2ioUmf0IaDa+lVAckwESfNNijheMkvOkag6rmKTns0nK3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704827390; a=rsa-sha256; cv=none; b=TgeyWU+5ldY5QUjivkvujTSqSr9eZQsJ26nsgP/OiQ14rfjA9KZRcRNBFkNjTtwIVXRPxx qBm4u25cUu5107itaRMWmOsrAQ23wTlKnUDnlE6qkrsRrgRIXrvYysbxjfU/mF6QXi6jKr 53zmxSkQJgaRxV6t/pYPPYV2/83u91bI5LvNgWnsHVVhU7AvxEHFs6up7os4FaIe957OCe 76H4szWTj2vQWrHOBqKcCdKwdudIX99rsPWOM0qQ06iHSzBczQZlKoVx1JV8Oa+iPYkptA DlWJRlAiFYqamPILZdYoa1zrbb+Jm121wyjEq86uP/UJw38SIKTrZrgrauUadg== 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 4T8gV64TBNz12Sv; Tue, 9 Jan 2024 19:09: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 409J9oGm099746; Tue, 9 Jan 2024 19:09:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409J9orQ099743; Tue, 9 Jan 2024 19:09:50 GMT (envelope-from git) Date: Tue, 9 Jan 2024 19:09:50 GMT Message-Id: <202401091909.409J9orQ099743@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: a9b615120628 - main - memdesc: Helper function to construct mbuf chain backed by memdesc buffer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: a9b615120628411cc20af730edb291c52be02f66 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a9b615120628411cc20af730edb291c52be02f66 commit a9b615120628411cc20af730edb291c52be02f66 Author: John Baldwin AuthorDate: 2024-01-09 19:05:03 +0000 Commit: John Baldwin CommitDate: 2024-01-09 19:09:43 +0000 memdesc: Helper function to construct mbuf chain backed by memdesc buffer memdesc_alloc_ext_mbufs constructs a chain of external (M_EXT or M_EXTPG) mbufs backed by a data buffer described by a memory descriptor. Since memory descriptors are not an actual buffer just a description of a buffer, the caller is required to supply a couple of helper routines to manage allocation of the raw mbufs and associating them with a reference to the underlying buffer. Reviewed by: markj Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D42933 --- sys/kern/subr_memdesc.c | 474 ++++++++++++++++++++++++++++++++++++++++++++++++ sys/sys/memdesc.h | 36 ++++ 2 files changed, 510 insertions(+) diff --git a/sys/kern/subr_memdesc.c b/sys/kern/subr_memdesc.c index 9ba9d7fe031b..ff8aad7731cd 100644 --- a/sys/kern/subr_memdesc.c +++ b/sys/kern/subr_memdesc.c @@ -33,9 +33,14 @@ #include #include #include +#include #include #include +/* + * memdesc_copyback copies data from a source buffer into a buffer + * described by a memory descriptor. + */ static void phys_copyback(vm_paddr_t pa, int off, int size, const void *src) { @@ -180,6 +185,10 @@ memdesc_copyback(struct memdesc *mem, int off, int size, const void *src) } } +/* + * memdesc_copydata copies data from a buffer described by a memory + * descriptor into a destination buffer. + */ static void phys_copydata(vm_paddr_t pa, int off, int size, void *dst) { @@ -323,3 +332,468 @@ memdesc_copydata(struct memdesc *mem, int off, int size, void *dst) __assert_unreachable(); } } + +/* + * memdesc_alloc_ext_mbufs allocates a chain of external mbufs backed + * by the storage of a memory descriptor's data buffer. + */ +static struct mbuf * +vaddr_ext_mbuf(memdesc_alloc_ext_mbuf_t *ext_alloc, void *cb_arg, int how, + void *buf, size_t len, size_t *actual_len) +{ + *actual_len = len; + return (ext_alloc(cb_arg, how, buf, len)); +} + +static bool +can_append_paddr(struct mbuf *m, vm_paddr_t pa) +{ + u_int last_len; + + /* Can always append to an empty mbuf. */ + if (m->m_epg_npgs == 0) + return (true); + + /* Can't append to a full mbuf. */ + if (m->m_epg_npgs == MBUF_PEXT_MAX_PGS) + return (false); + + /* Can't append a non-page-aligned address to a non-empty mbuf. */ + if ((pa & PAGE_MASK) != 0) + return (false); + + /* Can't append if the last page is not a full page. */ + last_len = m->m_epg_last_len; + if (m->m_epg_npgs == 1) + last_len += m->m_epg_1st_off; + return (last_len == PAGE_SIZE); +} + +/* + * Returns amount of data added to an M_EXTPG mbuf. + */ +static size_t +append_paddr_range(struct mbuf *m, vm_paddr_t pa, size_t len) +{ + size_t appended; + + appended = 0; + + /* Append the first page. */ + if (m->m_epg_npgs == 0) { + m->m_epg_pa[0] = trunc_page(pa); + m->m_epg_npgs = 1; + m->m_epg_1st_off = pa & PAGE_MASK; + m->m_epg_last_len = PAGE_SIZE - m->m_epg_1st_off; + if (m->m_epg_last_len > len) + m->m_epg_last_len = len; + m->m_len = m->m_epg_last_len; + len -= m->m_epg_last_len; + pa += m->m_epg_last_len; + appended += m->m_epg_last_len; + } + KASSERT(len == 0 || (pa & PAGE_MASK) == 0, + ("PA not aligned before full pages")); + + /* Full pages. */ + while (len >= PAGE_SIZE && m->m_epg_npgs < MBUF_PEXT_MAX_PGS) { + m->m_epg_pa[m->m_epg_npgs] = pa; + m->m_epg_npgs++; + m->m_epg_last_len = PAGE_SIZE; + m->m_len += PAGE_SIZE; + pa += PAGE_SIZE; + len -= PAGE_SIZE; + appended += PAGE_SIZE; + } + + /* Final partial page. */ + if (len > 0 && m->m_epg_npgs < MBUF_PEXT_MAX_PGS) { + KASSERT(len < PAGE_SIZE, ("final page is full page")); + m->m_epg_pa[m->m_epg_npgs] = pa; + m->m_epg_npgs++; + m->m_epg_last_len = len; + m->m_len += len; + appended += len; + } + + return (appended); +} + +static struct mbuf * +paddr_ext_mbuf(memdesc_alloc_extpg_mbuf_t *extpg_alloc, void *cb_arg, int how, + vm_paddr_t pa, size_t len, size_t *actual_len, bool can_truncate) +{ + struct mbuf *m, *tail; + size_t appended; + + if (can_truncate) { + vm_paddr_t end; + + /* + * Trim any partial page at the end, but not if it's + * the only page. + */ + end = trunc_page(pa + len); + if (end > pa) + len = end - pa; + } + *actual_len = len; + + m = tail = extpg_alloc(cb_arg, how); + if (m == NULL) + return (NULL); + while (len > 0) { + if (!can_append_paddr(tail, pa)) { + MBUF_EXT_PGS_ASSERT_SANITY(tail); + tail->m_next = extpg_alloc(cb_arg, how); + if (tail->m_next == NULL) + goto error; + tail = tail->m_next; + } + + appended = append_paddr_range(tail, pa, len); + KASSERT(appended > 0, ("did not append anything")); + KASSERT(appended <= len, ("appended too much")); + + pa += appended; + len -= appended; + } + + MBUF_EXT_PGS_ASSERT_SANITY(tail); + return (m); +error: + m_freem(m); + return (NULL); +} + +static struct mbuf * +vlist_ext_mbuf(memdesc_alloc_ext_mbuf_t *ext_alloc, void *cb_arg, int how, + struct bus_dma_segment *vlist, u_int sglist_cnt, size_t offset, + size_t len, size_t *actual_len) +{ + struct mbuf *m, *n, *tail; + size_t todo; + + *actual_len = len; + + while (vlist->ds_len <= offset) { + KASSERT(sglist_cnt > 1, ("out of sglist entries")); + + offset -= vlist->ds_len; + vlist++; + sglist_cnt--; + } + + m = tail = NULL; + while (len > 0) { + KASSERT(sglist_cnt >= 1, ("out of sglist entries")); + + todo = len; + if (todo > vlist->ds_len - offset) + todo = vlist->ds_len - offset; + + n = ext_alloc(cb_arg, how, (char *)(uintptr_t)vlist->ds_addr + + offset, todo); + if (n == NULL) + goto error; + + if (m == NULL) { + m = n; + tail = m; + } else { + tail->m_next = n; + tail = n; + } + + offset = 0; + vlist++; + sglist_cnt--; + len -= todo; + } + + return (m); +error: + m_freem(m); + return (NULL); +} + +static struct mbuf * +plist_ext_mbuf(memdesc_alloc_extpg_mbuf_t *extpg_alloc, void *cb_arg, int how, + struct bus_dma_segment *plist, u_int sglist_cnt, size_t offset, size_t len, + size_t *actual_len, bool can_truncate) +{ + vm_paddr_t pa; + struct mbuf *m, *tail; + size_t appended, totlen, todo; + + while (plist->ds_len <= offset) { + KASSERT(sglist_cnt > 1, ("out of sglist entries")); + + offset -= plist->ds_len; + plist++; + sglist_cnt--; + } + + totlen = 0; + m = tail = extpg_alloc(cb_arg, how); + if (m == NULL) + return (NULL); + while (len > 0) { + KASSERT(sglist_cnt >= 1, ("out of sglist entries")); + + pa = plist->ds_addr + offset; + todo = len; + if (todo > plist->ds_len - offset) + todo = plist->ds_len - offset; + + /* + * If truncation is enabled, avoid sending a final + * partial page, but only if there is more data + * available in the current segment. Also, at least + * some data must be sent, so only drop the final page + * for this segment if the segment spans multiple + * pages or some other data is already queued. + */ + else if (can_truncate) { + vm_paddr_t end; + + end = trunc_page(pa + len); + if (end <= pa && totlen != 0) { + /* + * This last segment is only a partial + * page. + */ + len = 0; + break; + } + todo = end - pa; + } + + offset = 0; + len -= todo; + totlen += todo; + + while (todo > 0) { + if (!can_append_paddr(tail, pa)) { + MBUF_EXT_PGS_ASSERT_SANITY(tail); + tail->m_next = extpg_alloc(cb_arg, how); + if (tail->m_next == NULL) + goto error; + tail = tail->m_next; + } + + appended = append_paddr_range(tail, pa, todo); + KASSERT(appended > 0, ("did not append anything")); + + pa += appended; + todo -= appended; + } + } + + MBUF_EXT_PGS_ASSERT_SANITY(tail); + *actual_len = totlen; + return (m); +error: + m_freem(m); + return (NULL); +} + +static struct mbuf * +vmpages_ext_mbuf(memdesc_alloc_extpg_mbuf_t *extpg_alloc, void *cb_arg, int how, + vm_page_t *ma, size_t offset, size_t len, size_t *actual_len, + bool can_truncate) +{ + struct mbuf *m, *tail; + + while (offset >= PAGE_SIZE) { + ma++; + offset -= PAGE_SIZE; + } + + if (can_truncate) { + size_t end; + + /* + * Trim any partial page at the end, but not if it's + * the only page. + */ + end = trunc_page(offset + len); + if (end > offset) + len = end - offset; + } + *actual_len = len; + + m = tail = extpg_alloc(cb_arg, how); + if (m == NULL) + return (NULL); + + /* First page. */ + m->m_epg_pa[0] = VM_PAGE_TO_PHYS(*ma); + ma++; + m->m_epg_npgs = 1; + m->m_epg_1st_off = offset; + m->m_epg_last_len = PAGE_SIZE - offset; + if (m->m_epg_last_len > len) + m->m_epg_last_len = len; + m->m_len = m->m_epg_last_len; + len -= m->m_epg_last_len; + + /* Full pages. */ + while (len >= PAGE_SIZE) { + if (tail->m_epg_npgs == MBUF_PEXT_MAX_PGS) { + MBUF_EXT_PGS_ASSERT_SANITY(tail); + tail->m_next = extpg_alloc(cb_arg, how); + if (tail->m_next == NULL) + goto error; + tail = tail->m_next; + } + + tail->m_epg_pa[tail->m_epg_npgs] = VM_PAGE_TO_PHYS(*ma); + ma++; + tail->m_epg_npgs++; + tail->m_epg_last_len = PAGE_SIZE; + tail->m_len += PAGE_SIZE; + len -= PAGE_SIZE; + } + + /* Last partial page. */ + if (len > 0) { + if (tail->m_epg_npgs == MBUF_PEXT_MAX_PGS) { + MBUF_EXT_PGS_ASSERT_SANITY(tail); + tail->m_next = extpg_alloc(cb_arg, how); + if (tail->m_next == NULL) + goto error; + tail = tail->m_next; + } + + tail->m_epg_pa[tail->m_epg_npgs] = VM_PAGE_TO_PHYS(*ma); + ma++; + tail->m_epg_npgs++; + tail->m_epg_last_len = len; + tail->m_len += len; + } + + MBUF_EXT_PGS_ASSERT_SANITY(tail); + return (m); +error: + m_freem(m); + return (NULL); +} + +/* + * Somewhat similar to m_copym but optionally avoids a partial mbuf at + * the end. + */ +static struct mbuf * +mbuf_subchain(struct mbuf *m0, size_t offset, size_t len, + size_t *actual_len, bool can_truncate, int how) +{ + struct mbuf *m, *tail; + size_t totlen; + + while (offset >= m0->m_len) { + offset -= m0->m_len; + m0 = m0->m_next; + } + + /* Always return at least one mbuf. */ + totlen = m0->m_len - offset; + if (totlen > len) + totlen = len; + + m = m_get(how, MT_DATA); + if (m == NULL) + return (NULL); + m->m_len = totlen; + if (m0->m_flags & (M_EXT | M_EXTPG)) { + m->m_data = m0->m_data + offset; + mb_dupcl(m, m0); + } else + memcpy(mtod(m, void *), mtodo(m0, offset), m->m_len); + + tail = m; + m0 = m0->m_next; + len -= totlen; + while (len > 0) { + /* + * If truncation is enabled, don't send any partial + * mbufs besides the first one. + */ + if (can_truncate && m0->m_len > len) + break; + + tail->m_next = m_get(how, MT_DATA); + if (tail->m_next == NULL) + goto error; + tail = tail->m_next; + tail->m_len = m0->m_len; + if (m0->m_flags & (M_EXT | M_EXTPG)) { + tail->m_data = m0->m_data; + mb_dupcl(tail, m0); + } else + memcpy(mtod(tail, void *), mtod(m0, void *), + tail->m_len); + + totlen += tail->m_len; + m0 = m0->m_next; + len -= tail->m_len; + } + *actual_len = totlen; + return (m); +error: + m_freem(m); + return (NULL); +} + +struct mbuf * +memdesc_alloc_ext_mbufs(struct memdesc *mem, + memdesc_alloc_ext_mbuf_t *ext_alloc, + memdesc_alloc_extpg_mbuf_t *extpg_alloc, void *cb_arg, int how, + size_t offset, size_t len, size_t *actual_len, bool can_truncate) +{ + struct mbuf *m; + size_t done; + + switch (mem->md_type) { + case MEMDESC_VADDR: + m = vaddr_ext_mbuf(ext_alloc, cb_arg, how, + (char *)mem->u.md_vaddr + offset, len, &done); + break; + case MEMDESC_PADDR: + m = paddr_ext_mbuf(extpg_alloc, cb_arg, how, mem->u.md_paddr + + offset, len, &done, can_truncate); + break; + case MEMDESC_VLIST: + m = vlist_ext_mbuf(ext_alloc, cb_arg, how, mem->u.md_list, + mem->md_nseg, offset, len, &done); + break; + case MEMDESC_PLIST: + m = plist_ext_mbuf(extpg_alloc, cb_arg, how, mem->u.md_list, + mem->md_nseg, offset, len, &done, can_truncate); + break; + case MEMDESC_UIO: + panic("uio not supported"); + case MEMDESC_MBUF: + m = mbuf_subchain(mem->u.md_mbuf, offset, len, &done, + can_truncate, how); + break; + case MEMDESC_VMPAGES: + m = vmpages_ext_mbuf(extpg_alloc, cb_arg, how, mem->u.md_ma, + mem->md_offset + offset, len, &done, can_truncate); + break; + default: + __assert_unreachable(); + } + if (m == NULL) + return (NULL); + + if (can_truncate) { + KASSERT(done <= len, ("chain too long")); + } else { + KASSERT(done == len, ("short chain with no limit")); + } + KASSERT(m_length(m, NULL) == done, ("length mismatch")); + if (actual_len != NULL) + *actual_len = done; + return (m); +} diff --git a/sys/sys/memdesc.h b/sys/sys/memdesc.h index 24a2c2da6347..f1880fee2cda 100644 --- a/sys/sys/memdesc.h +++ b/sys/sys/memdesc.h @@ -163,4 +163,40 @@ void memdesc_copyback(struct memdesc *mem, int off, int size, const void *src); void memdesc_copydata(struct memdesc *mem, int off, int size, void *dst); +/* + * This routine constructs a chain of M_EXT mbufs backed by a data + * buffer described by a memory descriptor. Some buffers may require + * multiple mbufs. For memory descriptors using unmapped storage + * (e.g. memdesc_vmpages), M_EXTPG mbufs are used. + * + * Since memory descriptors are not an actual buffer, just a + * description of the buffer, the caller is required to supply a + * couple of helper routines to manage allocation of the raw mbufs and + * associate them with a reference to the underlying buffer. + * + * The memdesc_alloc_ext_mbuf_t callback is passed the callback + * argument as its first argument, the how flag as its second + * argument, and the pointer and length of a KVA buffer. This + * callback should allocate an mbuf for the KVA buffer, either by + * making a copy of the data or using m_extaddref(). + * + * The memdesc_alloc_extpg_mbuf_t callback is passed the callback + * argument as its first argument and the how flag as its second + * argument. It should return an empty mbuf allocated by + * mb_alloc_ext_pgs. + * + * If either of the callbacks returns NULL, any partially allocated + * chain is freed and this routine returns NULL. + * + * If can_truncate is true, then this function might return a short + * chain to avoid gratuitously splitting up a page. + */ +typedef struct mbuf *memdesc_alloc_ext_mbuf_t(void *, int, void *, size_t); +typedef struct mbuf *memdesc_alloc_extpg_mbuf_t(void *, int); + +struct mbuf *memdesc_alloc_ext_mbufs(struct memdesc *mem, + memdesc_alloc_ext_mbuf_t *ext_alloc, + memdesc_alloc_extpg_mbuf_t *extpg_alloc, void *cb_arg, int how, + size_t offset, size_t len, size_t *actual_len, bool can_truncate); + #endif /* _SYS_MEMDESC_H_ */ From nobody Tue Jan 9 19:29:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8gwG5bDdz56M3C; Tue, 9 Jan 2024 19:29:02 +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 4T8gwG4lWbz4hqH; Tue, 9 Jan 2024 19:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704828542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0jCaV/7D0MkQNYRHoVvhqPIXTTw5Er1RpfQ2+JUiJRc=; b=THYzobzwTTBqQND9RwxM6bskUrZPfpf9Xfv5mXlMKhHpqDVRCBN79Hl3rY+aj5Jq2YYkef /xBAOTp/UzIYIILoludm4vQMusAQdiqUayBeGZbYLUXrVCEJZdRA3/8THckxxzLso89tTF DFE+/z8POnfgCDPsnD0uvPCKGQkj7SRNEF0LkN5UzFRSavkn8EJrCbuOz6gZkDbligQetx 77/Vb3pL1x7CJoJq8fR6dJ+n2ou3XnEoV+KXiCE8juGO2Jj6yrZpsQQRvDk5JBh6ad74Fy 6UePZxq3+5QWBLUdYbL13Yr85E7SEoQtZeqeTT0N1D4dmqICpyfEBh0J7L0ZFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704828542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0jCaV/7D0MkQNYRHoVvhqPIXTTw5Er1RpfQ2+JUiJRc=; b=FDQYqXYnU6JPbTWZBCe1z7597Gca8oHZcRuHnA0iiw6JZb6v3qEg0kM58YreApOfddrZX0 S/0O6h3ZDCqKemsr9pCDsR+JCsDT+VX2MiMkoTa/tNRdQauzn51+GBP+0rtfbgjzCV5RO6 klgYHMwykexawkVATfOGrsHt1uTLCArUfFWpVQFWBqz9o8UydTtPVp7TRXq9+M/f/9dbuZ 2yTxFbw/dIng7GItz4uL6CtP5ctK0PQHqnAY/bJtSrthDERzulobwAM6+hgvjBtSvA6neR DGSr7TvR2Z9NnsHpqedp3Bg8qZsQKVKYFEPs7xf+ynJZLKhXTRWkX7O+PN++kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704828542; a=rsa-sha256; cv=none; b=MX8og5tIBGHUtIeEXHzcKny7yxz6GsBf2PYDPcDmLMqODD5MVOM8d5dd1Ep/i3M9wxrWcI QdnlJDi6y7SJs7ya9UYu83bZOIR4xO9VSW2GCvu4cUbBmNSSWdq/es2rqeGhmzwFIg5nk4 0qKfG+nur9j5vBRNX5s52RZZgOG3K5RD6+0EAaeIbCqGrQuT2I9idjFnHMO7LItrZBYeou Uf0AIqm4DQQfRbq1wVUsOpM1ltXQ5TrUKwWw80Gh1iOTFhOupcYzxQ/V1kcMHgAUcNzAIc cTz87m8fpXxuMMRwpwLfHO7mRIxPa859hbEAkzdV0ukQiDvaAfas4DCErPdRlA== 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 4T8gwG3pmlz13fP; Tue, 9 Jan 2024 19:29: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 409JT2Tj032975; Tue, 9 Jan 2024 19:29:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409JT2F2032972; Tue, 9 Jan 2024 19:29:02 GMT (envelope-from git) Date: Tue, 9 Jan 2024 19:29:02 GMT Message-Id: <202401091929.409JT2F2032972@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: c6a488511ab1 - main - acpi: Only reserve resources enumerated via _CRS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: c6a488511ab1fbae8d16264b9e83c85024c9e1ce Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c6a488511ab1fbae8d16264b9e83c85024c9e1ce commit c6a488511ab1fbae8d16264b9e83c85024c9e1ce Author: John Baldwin AuthorDate: 2024-01-09 19:23:10 +0000 Commit: John Baldwin CommitDate: 2024-01-09 19:23:10 +0000 acpi: Only reserve resources enumerated via _CRS In particular, don't reserve resources added by drivers via other means (e.g. acpi_bus_alloc_gas which calls bus_alloc_resource right after adding the resource). The intention of reserved resources is to ensure that a resource range that a bus driver knows is assigned to a device is reserved by the system even if no driver is attached to the device. This prevents other "wildcard" resource requests from conflicting with these resources. For ACPI, the only resources the bus driver knows about for unattached devices are the resources returned from _CRS. All of these resources are already reserved now via acpi_reserve_resources called from acpi_probe_children. As such, remove the logic from acpi_set_resource to try to reserve resources when they are set. This permits RF_SHAREABLE to work with acpi_bus_alloc_gas without requiring hacks like the current one for CPU device resources in acpi_set_resource. Reported by: gallatin (RF_SHAREABLE not working) Diagnosed by: jrtc27 --- sys/dev/acpica/acpi.c | 36 ------------------------------------ sys/dev/acpica/acpivar.h | 1 - 2 files changed, 37 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 22d2b10ff905..9196c446ae80 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -1376,11 +1376,9 @@ acpi_reserve_resources(device_t dev) struct resource_list_entry *rle; struct resource_list *rl; struct acpi_device *ad; - struct acpi_softc *sc; device_t *children; int child_count, i; - sc = device_get_softc(dev); if (device_get_children(dev, &children, &child_count) != 0) return; for (i = 0; i < child_count; i++) { @@ -1422,14 +1420,12 @@ acpi_reserve_resources(device_t dev) } } free(children, M_TEMP); - sc->acpi_resources_reserved = 1; } static int acpi_set_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t count) { - struct acpi_softc *sc = device_get_softc(dev); struct acpi_device *ad = device_get_ivars(child); struct resource_list *rl = &ad->ad_rl; ACPI_DEVICE_INFO *devinfo; @@ -1485,38 +1481,6 @@ acpi_set_resource(device_t dev, device_t child, int type, int rid, /* Add the resource. */ end = (start + count - 1); resource_list_add(rl, type, rid, start, end, count); - - /* Don't reserve resources until the system resources are allocated. */ - if (!sc->acpi_resources_reserved) - return (0); - - /* Don't reserve system resources. */ - if (ACPI_ID_PROBE(dev, child, sysres_ids, NULL) <= 0) - return (0); - - /* - * Don't reserve IRQ resources. There are many sticky things to - * get right otherwise (e.g. IRQs for psm, atkbd, and HPET when - * using legacy routing). - */ - if (type == SYS_RES_IRQ) - return (0); - - /* - * Don't reserve resources for CPU devices. Some of these - * resources need to be allocated as shareable, but reservations - * are always non-shareable. - */ - if (device_get_devclass(child) == devclass_find("cpu")) - return (0); - - /* - * Reserve the resource. - * - * XXX: Ignores failure for now. Failure here is probably a - * BIOS/firmware bug? - */ - resource_list_reserve(rl, dev, child, type, &rid, start, end, count, 0); return (0); } diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 5be0939ee6bb..4d76a77cdbf8 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -55,7 +55,6 @@ struct acpi_softc { int acpi_enabled; int acpi_sstate; int acpi_sleep_disabled; - int acpi_resources_reserved; struct sysctl_ctx_list acpi_sysctl_ctx; struct sysctl_oid *acpi_sysctl_tree; From nobody Tue Jan 9 19:29:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8gx01WXyz56Lh2; Tue, 9 Jan 2024 19:29:40 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8gwz4kMPz4j0s; Tue, 9 Jan 2024 19:29:39 +0000 (UTC) (envelope-from delphij@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a28a6cef709so352774866b.1; Tue, 09 Jan 2024 11:29:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704828577; x=1705433377; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jy10zpfYdaHwHNgS/wEOKNr80eU6gbw3rVYx4vuB18Y=; b=DUzCRVPA6nCPG+O7AzZCCvqIrbx5jkjPct/DwVvmrMoSS4gV/XKw0RyZdbHjuaYZzI +56vfy4G1JE0b8BfVMZS7BpRlmMKjq8g9L1eX4kykXWB3N3xDi1AbT5hX32WQFc26dg8 ONGG2D47TlfeZzgvHYLQrUtLGOjIb2p9YT2/a3DVBAd0Lg7Fq+MWXE6DiJtpdjp44wYx 7I6p3JLYtyLOcIGzxbaLFogsTqAFMZOYF4s/ujBBjxjGFq8BnHSDwgaAQ240AbXPW9+U 3C4vdreAh1j95kUTGvje75LgNMOom8TlcAUHejPAWO/1Ae/O5ygeLtnnRPnoLsCh6Fyc WqRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704828577; x=1705433377; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jy10zpfYdaHwHNgS/wEOKNr80eU6gbw3rVYx4vuB18Y=; b=o3GY0qJ4envodwskyVqt3lq8dtq6nlVu/+UOu8oRF8ecPV1yF4VHu2yqGG1QEXs+V/ oAhobiXWvZianJ7UFAx4YV+z/RmlYIP8Lyx24ymlFdae5Ksyahcv1XikyfsKlxt95Z7B gIleAfyhw6B35DON1H9zNzp1/lQ/hMKWe1Ea++l5QRw1EzqNgtF0YmFeyqc5h36dVa/P l1lS5m3V/G7wC6yOaUeFXvaPmL1CNsV7WBWNS3ZlJxNf3QBatdHex0xZHL50rVMx/I2T kQFEKLHhbQBQZXwZX+YTgdVMkrDTBkJ9MWNylStDQnOBDogwbPCL8xe9+BU1dkz37ZQP 40Eg== X-Gm-Message-State: AOJu0Yx24mJ6mmpdJCXmTdup55MzfISL3/5aVPfEvEMec7TWsmoXB6hL IBUlBE/7QxSXYZJGIyfWIP3T7NgzXet3/U9PwNjNx+mPdhE= X-Google-Smtp-Source: AGHT+IF2q22F48sRef3W5UFcNIGuMx3+1w2B3AUCtY0jxJBlotyV148XLYo4riCM25fkvQeZ/MONpyiB1PQkzoKaz7k= X-Received: by 2002:a17:906:1cd:b0:a29:e2e7:8faa with SMTP id 13-20020a17090601cd00b00a29e2e78faamr825656ejj.101.1704828576684; Tue, 09 Jan 2024 11:29:36 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202312290846.3BT8kOiO029918@gitrepo.freebsd.org> <90D0905E-AA46-4351-AEE0-9ED9D835DB50@karels.net> <2683023.poxlI1A5LX@ravel> In-Reply-To: <2683023.poxlI1A5LX@ravel> From: Xin LI Date: Tue, 9 Jan 2024 11:29:25 -0800 Message-ID: Subject: Re: git: 2f036705f337 - main - Document the two recent newsyslog(8) change (-c option and configuration option). To: Olivier Certner Cc: Xin LI , Mike Karels , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000b760b8060e8855d6" X-Rspamd-Queue-Id: 4T8gwz4kMPz4j0s X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] --000000000000b760b8060e8855d6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Olivier, On Tue, Jan 9, 2024 at 2:19=E2=80=AFAM Olivier Certner w= rote: > [...] > > Sorry not to have noticed this in the review; it was only when I saw th= is > > message that it sunk in that we now have *three* ways to specify > compression, > > and I'm not even sure what the precedence is. I would have thought tha= t > > would replace -c. It's a mess if the config file has entrie= s > > that specify J and X flags as well as none, the config file has > > zstd, and the -c option is given as well. We now have a kno= b > > to override the knob to override a knob. The only reason to keep -c tha= t > > I can think of is to specify a different compression in a single > invocation, > > but as noted, changing compression requires manual operations that make > > it unreasonable to change it invocation by invocation. > > I agree. Two possibilies that I can think of from here: Remove '-c' or > make it enable compression regardless of the log files' individual settin= gs. > I am open to removing '-c'. Could you please clarify what you mean by "make it enable compression" -- did you mean that we mark all log files to be compressible? (It's probably not a good idea as some "log" files may be binary and not really compressible). > > > I still think it would be much better to add an option letter to select > > the default compression as specified by . This would elimina= te > > the need for "legacy", and it would add the ability to have both a glob= al > > default and an exception. I think the redefinition of the existing fla= gs > > to have different meanings if is given is messy. > > I didn't think about that at first. I agree. > > If people want to be able to override compression settings globally, whic= h > I find useful, one could introduce another directive such as > taking a boolean to request to apply the > option regardless of the individual compression letters. > > Another possibility is just to rename "" to > "" (so, this time, not a boolean) and keep its current > behavior. This would match one of the suggestions above about '-c', but > then there's the question of which one takes precedence, and I think that > the command-line specification should prevail (for practical purposes and > POLA). > > > The entry for -c says that we plan to change the default to "none" in > 15.0. > > Hopefully that would be done via and not -c. However, there > > was significant pushback on "none" being the default. > > I think the default should be "no ", i.e., no > directive. This may plea for having "none" mean "don't change anything" > (as if the directive wasn't there) and have something else to deactivate > compression, such as "no_compression" (which is really an override). If > "none" is confusing, then just forego it completely, and have 'newsyslog' > plain fail on it (but keep "no_compression" as just described). > > If there is consensus, I'd then change the 'J' flag currently used for al= l > log files to the new chosen flag for generic compression, and have > set to "bzip2" in a first step (for POLA). Then, it > could be changed to something else, e.g., 'zstd'. > > Setting it to 'none' seems to me the worst solution (but far from being > the end of the world). > Changing the meaning of all four legacy compression type letters to "file is compressible" is part of the intention. The goal is to discourage using them as a way to specify a compression type, in favor of using the administrator configured value. That's said, 'none' is a reasonable default in many ways as explained before (it makes grep'ing easier, compression is not really that helpful in the modern world because hard drives are larger than the 90's and it reduces the times data gets rewritten to SSDs and avoids hourly CPU load bursts for busy systems). 'bzip2' could be a good second best default (because for most configurations it's how the log files are compressed with today's defaults), but if the administrator has already configured their systems to use a different method, this would break their configuration anyways. > More deeply, I remember having seen at least two claims that using > filesystem's compression is better, without arguments. I don't agree wit= h > that in practice. The only advantage of in-filesystem compression, besid= es > the administrative simplification that you can also get with the override > above, is to get O(1) random access to big log files, and I don't see any > compelling and common use case for it. You certainly want to get to the > end of the current log quickly, but that one precisely is not handled by > 'newsyslog' and stays uncompressed (at the application level). When you > want to search for strings or patterns, you have to grep the whole file > anyway. You may want to immediately reach the end of some historical log > file, e.g., when manually going back in time from the current log, but th= is > should have negligible latency, and if it doesn't, than just use more and > smaller log archives. Same thing if you have a more sophisticated setup > with an index of log text: Jumping to a particular location in the log fi= le > should have negligible latency, else apply the same recipe. If your setu= p > with index requires a single, never rotated, log file, then you're not ev= en > using 'newsyslog' in the first place (or should not). Although I agree > that in this case using a compressed filesystem (or a randomly accessible > archive) can make sense (if your index doesn't already cover the results > expected from your searches), I very much doubt this is a common setup. > There are other benefits of not compressing rotated logs. For busy systems, the hourly newsyslog run would process larger logs and cause CPU workload bursts. And when logs are compressed, the data is read back and compressed data is rewritten to disk / SSDs, causing additional wear of the flash storage, and all that comes with no significant benefit for modern hardware. (I don't think it's common to have log files indexed after rotation; a more common use case would be to use [u]grep to look up for a certain pattern). > Moreover, using in-filesystem compression can lead to degrading the > compression ratio, since the compression method on ZFS is chosen per > dataset, which includes a bunch of other files and use cases preventing t= he > administrator from choosing the best, and slowest, compression methods. = To > avoid this problem, one can use a separate dataset for /var/log (anyone?)= , > but changing this on already running systems is a greater burden than jus= t > changing the compression settings in the 'newsyslog' configuration files. > Yes, and that's not a big concern. Achieving the maximum compression ratio is probably never the goal for most scenarios (not limited to logs, but also other places) where compression is used, and one always has to balance between the cost and benefit. If the person is distributing a release image to many thousands of users over the Internet, it would make a lot of sense to try the best compression for an 5% reduction of size because that adds up to the bandwidth cost and optimizes the experience for users, but it doesn't make as much sense to save, let's say a few MBs of disk space at the expense of spending a few more minutes every hour, the added "bursts" of slower response time for a server, and that's usually undesirable for production. Cheers, --000000000000b760b8060e8855d6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, Olivier,

On Tue, Jan 9, 2024 at 2:19= =E2=80=AFAM Olivier Certner <olce@fr= eebsd.org> wrote:
[...]
> Sorry not to have noticed this in the review; it was only when I saw t= his
> message that it sunk in that we now have *three* ways to specify compr= ession,
> and I'm not even sure what the precedence is.=C2=A0 I would have t= hought that
> <compress> would replace -c.=C2=A0 It's a mess if the config= file has entries
> that specify J and X flags as well as none, the config file has
> <compress> zstd, and the -c option is given as well.=C2=A0 We no= w have a knob
> to override the knob to override a knob. The only reason to keep -c th= at
> I can think of is to specify a different compression in a single invoc= ation,
> but as noted, changing compression requires manual operations that mak= e
> it unreasonable to change it invocation by invocation.

I agree.=C2=A0 Two possibilies that I can think of from here: Remove '-= c' or make it enable compression regardless of the log files' indiv= idual settings.

I am open to removing '= -c'.

Could you please clarify what you mean by "make it ena= ble compression" -- did you mean that we mark all log files to be comp= ressible?=C2=A0 (It's probably not a good idea as some "log" = files may be binary and not really compressible).=C2=A0

> I still think it would be much better to add an option letter to selec= t
> the default compression as specified by <compress>.=C2=A0 This w= ould eliminate
> the need for "legacy", and it would add the ability to have = both a global
> default and an exception.=C2=A0 I think the redefinition of the existi= ng flags
> to have different meanings if <compress> is given is messy.

I didn't think about that at first.=C2=A0 I agree.

If people want to be able to override compression settings globally, which = I find useful, one could introduce another directive such as <compress_o= verride> taking a boolean to request to apply the <compress> optio= n regardless of the individual compression letters.

Another possibility is just to rename "<compress>" to "= ;<compress_override>" (so, this time, not a boolean) and keep it= s current behavior.=C2=A0 This would match one of the suggestions above abo= ut '-c', but then there's the question of which one takes prece= dence, and I think that the command-line specification should prevail (for = practical purposes and POLA).

> The entry for -c says that we plan to change the default to "none= " in 15.0.
> Hopefully that would be done via <compress> and not -c.=C2=A0 Ho= wever, there
> was significant pushback on "none" being the default.

I think the default should be "no <compress_override>", i.e= ., no directive.=C2=A0 This may plea for having "none" mean "= ;don't change anything" (as if the directive wasn't there) and= have something else to deactivate compression, such as "no_compressio= n" (which is really an override).=C2=A0 If "none" is confusi= ng, then just forego it completely, and have 'newsyslog' plain fail= on it (but keep "no_compression" as just described).

If there is consensus, I'd then change the 'J' flag currently u= sed for all log files to the new chosen flag for generic compression, and h= ave <compress_override> set to "bzip2" in a first step (for= POLA).=C2=A0 Then, it could be changed to something else, e.g., 'zstd&= #39;.

Setting it to 'none' seems to me the worst solution (but far from b= eing the end of the world).

Changing the m= eaning of all four legacy compression type letters to "file is compres= sible" is part of the intention.=C2=A0 The goal is to discourage using= them as a way to specify a compression type, in favor of using the adminis= trator configured value.

That's said, 'none' is a = reasonable default in many ways as=C2=A0explained before (it makes grep'= ;ing easier, compression is not really that helpful in the modern world bec= ause hard drives are larger than the 90's and it reduces the times data= gets rewritten to SSDs and=C2=A0avoids hourly CPU load bursts for busy sys= tems).

'bzip2' could be a good second best default (because = for most configurations it's how the log files are compressed with toda= y's defaults), but if the administrator has already configured their sy= stems to use a different method, this would break their configuration anywa= ys.
=C2=A0
More deeply, I remember having seen at least two claims that using filesys= tem's compression is better, without arguments.=C2=A0 I don't agree= with that in practice.=C2=A0 The only advantage of in-filesystem compressi= on, besides the administrative simplification that you can also get with th= e override above, is to get O(1) random access to big log files, and I don&= #39;t see any compelling and common use case for it.=C2=A0 You certainly wa= nt to get to the end of the current log quickly, but that one precisely is = not handled by 'newsyslog' and stays uncompressed (at the applicati= on level).=C2=A0 When you want to search for strings or patterns, you have = to grep the whole file anyway.=C2=A0 You may want to immediately reach the = end of some historical log file, e.g., when manually going back in time fro= m the current log, but this should have negligible latency, and if it doesn= 't, than just use more and smaller log archives.=C2=A0 Same thing if yo= u have a more sophisticated setup with an index of log text: Jumping to a p= articular location in the log file should have negligible latency, else app= ly the same recipe.=C2=A0 If your setup with index requires a single, never= rotated, log file, then you're not even using 'newsyslog' in t= he first place (or should not).=C2=A0 Although I agree that in this case us= ing a compressed filesystem (or a randomly accessible archive) can make sen= se (if your index doesn't already cover the results expected from your = searches), I very much doubt this is a common setup.
<= br>
There are other benefits of not compressing rotated logs.=C2=A0 F= or busy systems, the hourly newsyslog run would process larger logs and cau= se CPU workload bursts.

And when logs are compressed, the data= is read back and compressed data is rewritten to disk / SSDs, causing addi= tional wear of the flash storage, and all that comes with no significant be= nefit for modern hardware.

(I don't think it's common to hav= e log files indexed after rotation; a more common use case would be to use = [u]grep to look up for a certain pattern).
=C2=A0
Moreover, using in-filesystem compression can lead to degrading the compres= sion ratio, since the compression method on ZFS is chosen per dataset, whic= h includes a bunch of other files and use cases preventing the administrato= r from choosing the best, and slowest, compression methods.=C2=A0 To avoid = this problem, one can use a separate dataset for /var/log (anyone?), but ch= anging this on already running systems is a greater burden than just changi= ng the compression settings in the 'newsyslog' configuration files.=

Yes, and that's not a big concern.=C2= =A0 Achieving the maximum compression ratio is probably never the goal for = most scenarios (not limited to logs, but also other places) where compressi= on is used, and one always has to balance between the cost and benefit.

If the person is distributing a release image to many thousa= nds of users over the Internet, it would make a lot of sense to try the bes= t compression for an 5% reduction of size because that adds up to the bandw= idth cost and optimizes the experience for users, but it doesn't make a= s much sense to save, let's say a few MBs of disk space at the expense = of spending a few more minutes every hour, the added "bursts" of = slower response time for a server, and that's usually undesirable for p= roduction.

Cheers,
--000000000000b760b8060e8855d6-- From nobody Tue Jan 9 19:59:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8hbF4yChz56RKT for ; Tue, 9 Jan 2024 19:59: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 4T8hbF4MgWz4llq; Tue, 9 Jan 2024 19:59:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704830361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vDvAXLmXN37Q2IxzmpRZHBGX/iKcyScC8JioEmlEa8s=; b=TU/mwNAoCUZ1mcmyaDq0C5Ofd2BC099w3vkNpFr7ahf6Gqos1RmAOy6nr19cZ5SiGen3Rw N+7NBk2WxehM+C8OCLQuxmWa0rFDstDZ7BE43p1tivJh3cZkMz2jUBRmK1fFuhwQSYeFxH 0KU02haV7bZTc3vQLgmADYeINu60uQYncOTyf3/EFZ5q24kLdFQiFKTpu3W+D+WZNaJm2M DqgVAWxrrYW/0xaIJgWnl8wPj5KmhN4WqtVToanxupEMZBd17e2roVEJX2XvhdTHgzxgMc LrOD8mO60kU1JyA2/3YbdsTbfLWvPh/zWnCL65Dlk/6vff77Uitsa3h31efUDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704830361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vDvAXLmXN37Q2IxzmpRZHBGX/iKcyScC8JioEmlEa8s=; b=VRJOzkS2CkikKZtEIYK8InqMoUzOxtbtTzW6QOt1AM0w3t/KGbUkMCEKF8D2kvsL3HPz6J N1IG6z3Wv2VTOlFMRXUZT2L1kpTuN83qHYE4j/pBkE2KTZbb8+Wm1RdtCtJSNc4ofuLeVz C+trO7hKB7F3ex1LMjAveZTlqLFKxs+moExYVHfMIVEd9SIk3c7DHnBSbuezWGr+xYvBmZ Q1oPsJ4//wgl8sTbKKqVL7QS8KfHc+X14NmAEBeCbWNY8kJF7XbG/Q52py0ty+6kyMysck GXlRJtXMjrOva3TUrUrmcxF12SluGM1hM39Q5Y2aGtfdEaZKxzBJBKiuZRF1yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704830361; a=rsa-sha256; cv=none; b=AL8ttB5YJ7YdbxM07XW1qg0xhNc/iaWpfIqK5SOy0DyzYHrwEPJnRi9kSZAWeRV1BQyCZ0 UGQY2jMdsxbuXL/1LmhBPgusDwaMSTy6xYLKE61j43JYH/aRadMVp1NFEo0oyMsd51vuaJ Hevg1T6LWvQm2g8c4Jv5bAZnu4Xbum6/8I6y7xLsgT7nLQOkMV39YWF/sOeduxdYT4A4Gq fBj9g5YOEZIw64Fmo1mz5nVHSv2qxP5S/c97F9FJCscvH3DI7s1/KDmEaBpLDuqLq0vTO6 Uy+ydaW15TfaiotEYXfQgYFa0FvgZLTptm4wxnZvx9yWBj47joM4kGG0kSHDZw== 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 4T8hbF3JxSz14Ct; Tue, 9 Jan 2024 19:59: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 409JxLbr082721; Tue, 9 Jan 2024 19:59:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409JxLVI082720; Tue, 9 Jan 2024 19:59:21 GMT (envelope-from git) Date: Tue, 9 Jan 2024 19:59:21 GMT Message-Id: <202401091959.409JxLVI082720@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 305bb9bb90e3 - Create tag vendor/llvm-project/llvmorg-18-init-16595-g7c00a5be5cde List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/tags/vendor/llvm-project/llvmorg-18-init-16595-g7c00a5be5cde X-Git-Reftype: annotated tag X-Git-Commit: 305bb9bb90e3732200d6506509b907ab7c61d4e8 Auto-Submitted: auto-generated The annotated tag vendor/llvm-project/llvmorg-18-init-16595-g7c00a5be5cde has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/llvm-project/llvmorg-18-init-16595-g7c00a5be5cde tag vendor/llvm-project/llvmorg-18-init-16595-g7c00a5be5cde Tagger: Dimitry Andric TaggerDate: 2024-01-09 19:58:41 +0000 Tag llvm-project main llvmorg-18-init-16595-g7c00a5be5cde. commit aca2e42c67292825f835f094eb0c4df5ce6013db Author: Dimitry Andric AuthorDate: 2024-01-09 19:58:18 +0000 Commit: Dimitry Andric CommitDate: 2024-01-09 19:58:18 +0000 Vendor import of llvm-project main llvmorg-18-init-16595-g7c00a5be5cde. From nobody Tue Jan 9 19:59:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8hbF4yDcz56R25 for ; Tue, 9 Jan 2024 19:59: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 4T8hbF4S3rz4lnp; Tue, 9 Jan 2024 19:59:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704830361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6tPN8gcwlwSYZRGAg2r8RuhPQr+bgy4CZaC0JmAt6+8=; b=axH9YD+R+H3STsf+qqZShL1jFS3ez+Wyrr7d+LU8CYbv+bDegVHohiHho8QVv2sotSQBgO BtKpI6oULXlWMyKrrvvMI9aN3uzd8H9UL3qU49poAVCWkb4DKnoTLqkF7ZhDslSSaoUV0X B2KzG2xZaJGNwZO6cNMdCOBbvdlMX54LMOPqHiiE00UZLCjlKtOr+1tzONhonsHDRkCiP4 v/4HPEKD0TWCH6BB3k7X9588a2hSF4Xhoudhvw2NewUJqTlzw/dVIQZepY3NUDc77NNTH1 R5RX1UfqkA8zEZ401aReoMjlb+wRNMJNfRxw7sr16mcv/0ihx3w0h4qAf/6olg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704830361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6tPN8gcwlwSYZRGAg2r8RuhPQr+bgy4CZaC0JmAt6+8=; b=PGawHNqLEik7CGn7+G126go2j9ewYUBqQehKxGFGlErYBuqScvRNQrLhQgkha1H8sDCDMB TxIf3co28CdVRcO0YrG4RwCfB9+hgLiLylD/iRIdE4/DmVCEzhGQkJnqEI9Sqru1slhFY5 X4YfONAPdCba5+qEpzSuLAjoXYJZQ4K9EvRuMyfJcME8VhY9i8iN740llQ4dncCehCmP9X Fk3s9BbD5cGcD0/v9grv3lK5Ca87yM0UoZzeIw6AhPN0aBj4XWpGAhKd7NFt57lMVGwzFc 1w/6bugRVI0udXRXT+5crbLCIO4B2rHSNHp/92JTHJgYtXZTTN1oYgni8HGSCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704830361; a=rsa-sha256; cv=none; b=Cj57BKdNmBir06oA+Ojc0HdYBBYPQhdKDucJLZPLBulBQEjkYKDVgc+5gMwLqduzFRByeI fA6NbBoZbSOKNy07KFuIf9oO6MDLm1jsJvbAPT/kE28GIb4VEW4eHkEFjX8XeK3zjh0ztm yUvS1xKATdC73l4TG4a/me3Xk0Yw9WiwNVqxEYjxBWwcQwK2cRA7eFzXA+7ykhHM6nqTV9 NfRIFmrdbUtdpBWZSe9NMKCvE2rToLHwvDQ2ENw6YtXbuoUdggpVb44mpF06fp5FPvmqC6 T/CBnKZH1WK8fRvRcUSRL8vwkWLnwkypvsqCcZ3Q1sBGaTKGOHmHcRAWhgyZ9Q== 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 4T8hbF32pLz14Cs; Tue, 9 Jan 2024 19:59: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 409JxLXi082702; Tue, 9 Jan 2024 19:59:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409JxL4L082701; Tue, 9 Jan 2024 19:59:21 GMT (envelope-from git) Date: Tue, 9 Jan 2024 19:59:21 GMT Message-Id: <202401091959.409JxL4L082701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 77dbea07356e..aca2e42c6729 - vendor/llvm-project/main - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/vendor/llvm-project/main X-Git-Reftype: branch X-Git-Commit: aca2e42c67292825f835f094eb0c4df5ce6013db X-Git-Oldrev: 77dbea07356e1ab2f37a777d4d1ddc5dd3e301c2 X-Git-Newrev: aca2e42c67292825f835f094eb0c4df5ce6013db Auto-Submitted: auto-generated The branch vendor/llvm-project/main has been updated by dim: URL: https://cgit.FreeBSD.org/src/log/?id=77dbea07356e..aca2e42c6729 aca2e42c6729 Vendor import of llvm-project main llvmorg-18-init-16595-g7c00a5be5cde. From nobody Tue Jan 9 20:23:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8j6t6652z56Vdc; Tue, 9 Jan 2024 20:23: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 4T8j6t5DLkz4nwh; Tue, 9 Jan 2024 20:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704831798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fSFChKjytCH6znT9zeEb7OY8LhO0Im9J2aQG0P00UVo=; b=it4VISxdkuSg4mpNuYbNAVeEcj/wjQB5HhCVt15rYU1S4dzNqq487UvpPG12g609xhEPh3 TGhnrCd1W3O4G5Vo82EVOe+KXIdJR3Nzk+nQ38fs5cP/nf6Y4BBE4oYenWLAZ0jy3h0Iu0 68WHEl3k34U8iKBJ62sSY8C2MGG6SPbC84xZFLYrSbx1gi7kNiBAfVavumscko5fWkPydF sXMVnPnS/Z11IL6cDux+2Uw1WHVurlerR+l4wLPMdIWGRCCOxIA66wXjs3VJeNtzBqLD2/ oJAIkp9E4sayKBVIgVd/u86mp7Ci+bHWbaZEm6uHHr0uVTy/N/HM4cZCT/PrLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704831798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fSFChKjytCH6znT9zeEb7OY8LhO0Im9J2aQG0P00UVo=; b=shqQIvZIvZXpJCuruzOEeGjKlIGW/9X9Pg+5JJ4ebl8wMCiLoTafWg21KFpC7EFY88iufQ iaqsilN0vO+/w7v1MmDSeTEPPihn9lTiDoZZIQ0/+iOUL7tsixpoC6GtZ3C/TkA62iB9f9 U9td0pa6lhvIQlkwHJoqWPw6Xc/AD29qur+s/QY1UwHl3g9sHoFwb2IN11m5HpfRo9A0I8 1WSHgdebwLDQ5RbWIEyf9PsVImVtxBDHTUuN4QokrazIroqiP1bKVsosYFoQLP3B0CF87s ZT7iZZgemhU3nNPX7Qhhf6XUdZol9Xaj89+36g0jyE1dBsHjLfhgka6f04fTMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704831798; a=rsa-sha256; cv=none; b=JWQhuUeWAEphkh0bgZx3WYxbWdmhG2GqadDwIjPQ83bPNbnCN3VOk6c1wnvYAaIn9I/szl JDzCw3EoTFPPDhs1oHwwLuWlplNF8NxjtEybInk6M4JtFbpvwn4gG5JIygyWCPvwRZEqLY 3pf1cDsNBBL+2kXH6anyDDhbAuh7HOS7UKYLFBGTlBQwv7xrc1GIeh093ZZKd/3Qob1dT7 CilAAPRLnvdWOd2WzrvRqlDUFxH0E0hTO0bnw82LKEbn1kNwYnlYXsE2knFPzRuHr56M3o j+yqdTY9Nku44I1fH8fdT/Ch5aUeHeoaSjU/FzsIpt/11Yqe06g4ElyTHLszOw== 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 4T8j6t4HbDz14cg; Tue, 9 Jan 2024 20:23: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 409KNIfQ032490; Tue, 9 Jan 2024 20:23:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409KNImd032487; Tue, 9 Jan 2024 20:23:18 GMT (envelope-from git) Date: Tue, 9 Jan 2024 20:23:18 GMT Message-Id: <202401092023.409KNImd032487@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: 0013741108bc - main - powerpc_mmu_radix: add leaf page for wired mappings when pmap_enter(psind=1) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0013741108bc515dbaa56b2b9ca4043cdf6c9e5f Auto-Submitted: auto-generated The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=0013741108bc515dbaa56b2b9ca4043cdf6c9e5f commit 0013741108bc515dbaa56b2b9ca4043cdf6c9e5f Author: Robert Wing AuthorDate: 2024-01-09 20:12:38 +0000 Commit: Robert Wing CommitDate: 2024-01-09 20:23:18 +0000 powerpc_mmu_radix: add leaf page for wired mappings when pmap_enter(psind=1) This applies the fix to powerpc's pmap as was done in commit aa3bcaad51076ceb and d0941ed9b5c39d92 for amd64 and riscv pmaps, respectively. Reported by: Jenkins Reviewed by: bojan.novkovic_fer.hr, markj Fixes: e4078494f344bcba8709216bd601efa3dd05f6b3 Differential Revision: https://reviews.freebsd.org/D43339 --- sys/powerpc/aim/mmu_radix.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c index abcb8ae151c4..45461b21dba1 100644 --- a/sys/powerpc/aim/mmu_radix.c +++ b/sys/powerpc/aim/mmu_radix.c @@ -607,6 +607,7 @@ static boolean_t pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, struc static void pmap_invalidate_page(pmap_t pmap, vm_offset_t start); static void pmap_invalidate_all(pmap_t pmap); static int pmap_change_attr_locked(vm_offset_t va, vm_size_t size, int mode, bool flush); +static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); /* * Internal flags for pmap_enter()'s helper functions. @@ -3183,6 +3184,7 @@ pmap_enter_l3e(pmap_t pmap, vm_offset_t va, pml3_entry_t newpde, u_int flags, struct spglist free; pml3_entry_t oldl3e, *l3e; vm_page_t mt, pdpg; + vm_page_t uwptpg; KASSERT((newpde & (PG_M | PG_RW)) != PG_RW, ("pmap_enter_pde: newpde is missing PG_M")); @@ -3237,6 +3239,26 @@ pmap_enter_l3e(pmap_t pmap, vm_offset_t va, pml3_entry_t newpde, u_int flags, KASSERT(be64toh(*l3e) == 0, ("pmap_enter_pde: non-zero pde %p", l3e)); } + + /* + * Allocate 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 = pmap_l3e_pindex(va); + if (pmap_insert_pt_page(pmap, uwptpg)) { + vm_page_unwire_noq(uwptpg); + vm_page_free(uwptpg); + return (KERN_RESOURCE_SHORTAGE); + } + pmap_resident_count_inc(pmap, 1); + uwptpg->ref_count = NPTEPG; + pmap_fill_ptp((pt_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(uwptpg)), + newpde); + } if ((newpde & PG_MANAGED) != 0) { /* * Abort this mapping if its PV entry could not be created. @@ -3253,6 +3275,16 @@ pmap_enter_l3e(pmap_t pmap, vm_offset_t va, pml3_entry_t newpde, u_int flags, pmap_invalidate_page(pmap, va); vm_page_free_pages_toq(&free, true); } + 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_pde: failure for va %#lx" " in pmap %p", va, pmap); return (KERN_RESOURCE_SHORTAGE); From nobody Tue Jan 9 21:02:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8jzj19V2z56N1d for ; Tue, 9 Jan 2024 21:02: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 4T8jzj0N0dz3xZc; Tue, 9 Jan 2024 21:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704834129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S0lmSOZQqMTjpUKhyhLH7BgHRThDCtTK8IvTh+SwMJQ=; b=Yo3BLXtqHsdHNxhca7bGpV4wlrLmE/UxvrgLpCtpJ39NavokL0ANpHSX8uThqCZ6mIqEvt 7LHSzkV1AI+dQIzgGnVf6kG4Kl93f2s+IFEWlo5SJ/B6jwcjRPFGwrJSP4kNoXyeJ5VpFn jHBosQT8NvIZEtlMy4w5LfhpcsLdOQkMNlHMMWIDXp+RDRBoSibhNrHTHeWtc2uZmb8830 JnxDnZSTHH2sB361nODgojyCmvmj6+RNFv102KF3nzpSaOj1cAieCXIoB52HkCC+zMSXFz OYfKAyNGy+49kIfP3u6S89z1oZXGOPs34x0x0CW7Mq/ybvl2h5i3LiPL16/SNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704834129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S0lmSOZQqMTjpUKhyhLH7BgHRThDCtTK8IvTh+SwMJQ=; b=njXlyJ0ap+CzOtwxdKh6fdMvK1J4thqPtfm9S8FNYMtXGzkGX/mhyggf1hE7c18gB6wo+/ KBnKZM9tjlUBqJ5SI0MgdnNfw87AEM7aydRLZBhh7wT2lAneCiviwcDyso4PlALeId2mRH NnpI1To5GF1nHc1i4TmXjhI/EMPhA0BwVaW660QbrwbhpEi7+IBkm9A3OlNOMWlIjV0hL+ 864PfWRqHGmdaJcFMsrRWmwCPpg6YGrZ9fj6LxPWeuveAkjMwfPxQ98fiV/tGkezs1Oz9a edPr6mHL5K8X5DVEyLNTxYtPW+9PL+QqkuVhRecBdybDEKmMyCk/H/l7c+Smog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704834129; a=rsa-sha256; cv=none; b=KOSxhjM4ZlQyzm8x4QMEPVQLggKmvNIN4OsyCm5THq5MvH4ANRrqnM9XzHbw1/WKyztqTO i2chwxS8xv1zudVYGXmNDTnUjcoD9TfNwuFPUdGBNY8p90iVKMoksPH6vwYwhk9NMh3Gk0 SMoi+jYpKItZnG7DyJDWWoNn9bXk5jTPPp5NG+d5yb712BiqhK9fKDFlb2lGuOpFKKdN+D mifuLtog/yeZkIKEINgSwTSJTRcm0gDRhWmPKdpugbT1bV6LJo10SqZS+ZJgmNQQ/CYjkM mpBksjSTKv96pdAuEbyrrXKCE2ml+I8pyiWlMCbHhghqQY5ITNbP+jmH3bquhg== 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 4T8jzh6Yqpz15nf; Tue, 9 Jan 2024 21:02: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 409L28kl000169; Tue, 9 Jan 2024 21:02:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409L28FA000166; Tue, 9 Jan 2024 21:02:08 GMT (envelope-from git) Date: Tue, 9 Jan 2024 21:02:08 GMT Message-Id: <202401092102.409L28FA000166@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: John Baldwin Subject: git: 7253cdc56981 - internal/admin - Safekeep several inactive commit bits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/internal/admin X-Git-Reftype: branch X-Git-Commit: 7253cdc56981b58c58356f8d0a71fee5adf18690 Auto-Submitted: auto-generated The branch internal/admin has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7253cdc56981b58c58356f8d0a71fee5adf18690 commit 7253cdc56981b58c58356f8d0a71fee5adf18690 Author: John Baldwin AuthorDate: 2024-01-09 20:58:19 +0000 Commit: John Baldwin CommitDate: 2024-01-09 21:01:33 +0000 Safekeep several inactive commit bits Thank you to the following folks for their years of service as a src committer: - bcran - donner - freqlabs - markm - nwhitehorn - rstone - rwatson - scottph - trasz Approved by: core --- access | 9 --------- 1 file changed, 9 deletions(-) diff --git a/access b/access index 4284dd949ef8..746e73ceff74 100644 --- a/access +++ b/access @@ -31,7 +31,6 @@ asomers avatar avg bapt -bcran bdrewery br brd @@ -54,14 +53,12 @@ delphij des dfr dim -donner dougm dsl dteske emaste erj eugen -freqlabs fsu gad gallatin @@ -101,7 +98,6 @@ lwhsu manu marius markj -markm mav maxim mckusick @@ -116,7 +112,6 @@ mw netchild ngie np -nwhitehorn nyan obrien oh @@ -139,10 +134,7 @@ royger rpokala rrs rscheff -rstone -rwatson bb+lists.freebsd.cvs-committers@cyrus.watson.org schweikh -scottph se sef sjg @@ -155,7 +147,6 @@ theraven thj tijl tmunro -trasz tsoome tuexen ume From nobody Tue Jan 9 21:05:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8k3y0WLRz56NqP; Tue, 9 Jan 2024 21:05: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 4T8k3x6c4Gz3yvH; Tue, 9 Jan 2024 21:05:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704834349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iTsm+A1RVymSwJketEP/JZRayJtbhxO6M05KKy0/BNU=; b=OibkSeoXcBWp6XN7y8x9L/pc8ja1Mola0LWORQny2CjwyNUun74CPpdMIIaT6xEL4Mp9e7 HhrWk+Iuohl8EE0U5eXTFobqdbkOxoS7UYDCGxFnRZXhg8ULjutjsSpbh/BdjGJtO/0p8b oRIO6LDWmal+Psx4HfLaVfpGsD0ETMged7kA/rSiUULN2sxLM4m9mQxdzXYeEOVgq+aT6q K4WX5dp706wAB+kvbDLJ3rc1c4641tgrIkjCD1q9X9tuUjJK3rBiYOiXqgoS6V8ftFlN9s SEe8UX2gXpYpsa4c1bfad6oqjOCtpyawLlSapS8KzlJm910kghAQC+yufbotrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704834349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iTsm+A1RVymSwJketEP/JZRayJtbhxO6M05KKy0/BNU=; b=VeYD7E0s2it9CsMt2YTmqx+cCVM52gtfe9oCkOwE5qK7bmsp71RJnUAazomzBap9L/8Q5w MiVV6sV1STTkBfQVLlsiDIaDufgNykBfVR1VrqxQPVdXUQKyorsdEU5mNtS4tzsWySqG1o eCiypcSsB2kAO3ckYKm2XcbtRXlUIjQYh5eP2N+Rgyin16FfIm3nP0DEau/0dWA/9GOq3z uRcYmFTsqCliE0TeaVgwKBcV9dX49caIN7GQrH2NNym7LZVcL2NyhyCuuSpogNfJ0wNL9S OemXreNZ4ZY/0mXoDE4VN+Wjpn3c8syWvHTgNp4N47ptWSjeyKF0O+emXxKkGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704834349; a=rsa-sha256; cv=none; b=TyUsvbar+/LGSVbvRgdt+iubiV4toKDsFanAi//H6xZlBUTqjt12rwwMVworuREMGxf1HF 1OW8vsh9XNobFbAadcEdJ5W3XohLK+66+XmfiU3x/LqZIHKoK8UzVB+GmG+3sPK7NFBu2O sbo2IxgxDGfYx80ZcRlfAa+TAYsOGhFtuEyDPhSNkbUU7YAvPyGNMRZU20qNzRxVRCcOoN IhBMmXESvM2QHqFlsxxKSSJs2Es1ivKnl29IUFuVNjKhnf5+qRYtWJugudVlG7XuyMjp4N 8AyB/jiJeVepYVxS5quPqwJfeAWWGppVvg/k4P8ucJ1NAgufqPE1oio1RU6Otw== 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 4T8k3x5g2xz15qd; Tue, 9 Jan 2024 21:05: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 409L5nSb000773; Tue, 9 Jan 2024 21:05:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409L5nUl000770; Tue, 9 Jan 2024 21:05:49 GMT (envelope-from git) Date: Tue, 9 Jan 2024 21:05:49 GMT Message-Id: <202401092105.409L5nUl000770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 09fa78d438a7 - main - netlink: fix regression with group writers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09fa78d438a7729f3fbe055d65f0fca4d05c0971 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=09fa78d438a7729f3fbe055d65f0fca4d05c0971 commit 09fa78d438a7729f3fbe055d65f0fca4d05c0971 Author: Gleb Smirnoff AuthorDate: 2024-01-09 21:01:28 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-09 21:01:28 +0000 netlink: fix regression with group writers Refactoring of argument list to nl_send_one() led to derefercing wrong union member. Rename nl_send_one() to a more generic name, isolate anew nl_send_one() as the callback only for the normal writer and provide correct argument to nl_send() from nl_send_group(). Fixes: ff5ad900d2a0793659241eee96be53e6053b5081 --- sys/netlink/netlink_domain.c | 4 ++-- sys/netlink/netlink_io.c | 3 +-- sys/netlink/netlink_message_writer.c | 7 +++++++ sys/netlink/netlink_var.h | 4 +--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 7660dcada103..4790845d1d31 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -233,7 +233,7 @@ nl_send_group(struct nl_writer *nw) copy = nl_buf_copy(nb); if (copy != NULL) { nw->buf = copy; - (void)nl_send_one(nw); + (void)nl_send(nw, nlp_last); } else { NLP_LOCK(nlp_last); if (nlp_last->nl_socket != NULL) @@ -246,7 +246,7 @@ nl_send_group(struct nl_writer *nw) } if (nlp_last != NULL) { nw->buf = nb; - (void)nl_send_one(nw); + (void)nl_send(nw, nlp_last); } else nl_buf_free(nb); diff --git a/sys/netlink/netlink_io.c b/sys/netlink/netlink_io.c index fb8e0a46e8dd..5f50c40f71d8 100644 --- a/sys/netlink/netlink_io.c +++ b/sys/netlink/netlink_io.c @@ -194,9 +194,8 @@ nl_taskqueue_handler(void *_arg, int pending) * If no queue overrunes happened, wakes up socket owner. */ bool -nl_send_one(struct nl_writer *nw) +nl_send(struct nl_writer *nw, struct nlpcb *nlp) { - struct nlpcb *nlp = nw->nlp; struct socket *so = nlp->nl_socket; struct sockbuf *sb = &so->so_rcv; struct nl_buf *nb; diff --git a/sys/netlink/netlink_message_writer.c b/sys/netlink/netlink_message_writer.c index 0b85378b41b6..50305e3d9d80 100644 --- a/sys/netlink/netlink_message_writer.c +++ b/sys/netlink/netlink_message_writer.c @@ -65,6 +65,13 @@ nlmsg_get_buf(struct nl_writer *nw, u_int len, bool waitok) return (true); } +static bool +nl_send_one(struct nl_writer *nw) +{ + + return (nl_send(nw, nw->nlp)); +} + bool _nlmsg_get_unicast_writer(struct nl_writer *nw, int size, struct nlpcb *nlp) { diff --git a/sys/netlink/netlink_var.h b/sys/netlink/netlink_var.h index c8f0d02a0dab..ddf30b373446 100644 --- a/sys/netlink/netlink_var.h +++ b/sys/netlink/netlink_var.h @@ -130,9 +130,7 @@ void nl_osd_unregister(void); void nl_set_thread_nlp(struct thread *td, struct nlpcb *nlp); /* netlink_io.c */ -#define NL_IOF_UNTRANSLATED 0x01 -#define NL_IOF_IGNORE_LIMIT 0x02 -bool nl_send_one(struct nl_writer *); +bool nl_send(struct nl_writer *, struct nlpcb *); void nlmsg_ack(struct nlpcb *nlp, int error, struct nlmsghdr *nlmsg, struct nl_pstate *npt); void nl_on_transmit(struct nlpcb *nlp); From nobody Tue Jan 9 21:08:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8k6c5gxpz56P04; Tue, 9 Jan 2024 21:08: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 4T8k6c56DYz40VC; Tue, 9 Jan 2024 21:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704834488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rcQ9wyFpANgQ3Vkb6s77ylG6tsZZHlcuJAoYXmPAsSg=; b=CouM9QbdUuABTBVnYH2hTHGmDzdqYxyWqJuWoP5cmpmkIaf0urtXA9DpDbcKGXym8UmYql NJXUFn2Zzj+L2Ps8GDTxUmqSxZ47+lv8M1/b6FjH7Y00fPBElImFLjnUwFfvlemMr5Sgyl 75ElGjq7Q2Hxte4snawCAkZ3B9oq73AajJLZIBINzIpRxUWVrMd3Ez6Ld2lLTWUugU2FON 0MVW6MkVO4PKglrQEOBn0rsDtTN6hKIN8w5dbYP3kMC4UJlAPQnwuU4tDP7VvOUZrI91Si MP575C9eE10e+ZBElw4mRn9up315LGTxg6PuwiHO/BFQ2r7ifuqOva/CNYAFyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704834488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rcQ9wyFpANgQ3Vkb6s77ylG6tsZZHlcuJAoYXmPAsSg=; b=B/weJtdlVshN5PDn6umZwOX5fAs4n29BWu7jwtRYJhLCfIcjcW6NWrBmvWqMUxlxfF84Ty 0+/QqKcd3c7d7sjaBP/upVxglW9aEEZVyW4ajt52zjtWlg4O6P7eClhVZOBdSiaCn7KGqj yc5eXd9oRJN8IUwQOIYFx4zMXnBdGEYzGo9EmsftnrfOLgxIxzc3dAUBUsQJE4OG38VQfh YFlQ6aHO/B+m2zCuwLPRz5IaaAqZWkPq5ph/iY5Bu+B2frBG1jrjUADc80Lua28JGINg4O hYVmBSa0dkDSHLHu0EbE4cZhKFbAOkdOObbtKG6PSM7YQSuJ8L1mzvog9Iattw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704834488; a=rsa-sha256; cv=none; b=nQjokicSSy/SNuv6kQ8RvNp4j2EX6iHQ7R78PfX5+v/f0ckpZ5DcCa2ECa/1SXJCwC8ISm DNw9v0uxGChK0MxVY4G1pESEipw1k32H5Vy8yFqo0O+Y9skfB0KNY2PN+eQJjn7Y6GYXZu KQ9dDs+vezRdUycpoA1Hx3oE52p/cbdkh3ZYg4V26c4NFIQnqqBx/WRZuWlCiI3/aeiUfx cV+2+VkpMa7ikqx08X5eXBvmp59qD0xfVBv9hjf9eUHdwtAUk9UFtXNABO73M6EwFWTZZt QxAG58W3obECm5UtqVxb23aivbpbiiQrIq3+nU42vyYMpUeNRn9OIE+Mro6EDQ== 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 4T8k6c49tzz15tV; Tue, 9 Jan 2024 21:08: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 409L88v4001234; Tue, 9 Jan 2024 21:08:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409L88aR001231; Tue, 9 Jan 2024 21:08:08 GMT (envelope-from git) Date: Tue, 9 Jan 2024 21:08:08 GMT Message-Id: <202401092108.409L88aR001231@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: 5cd08d9ecf52 - main - apei: Mark ReadAckRegister resource as shareable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 5cd08d9ecf52d37229f4888e38631cb91ce97eb9 Auto-Submitted: auto-generated The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=5cd08d9ecf52d37229f4888e38631cb91ce97eb9 commit 5cd08d9ecf52d37229f4888e38631cb91ce97eb9 Author: Andrew Gallatin AuthorDate: 2024-01-09 20:52:07 +0000 Commit: Andrew Gallatin CommitDate: 2024-01-09 21:07:34 +0000 apei: Mark ReadAckRegister resource as shareable Work around vendors who use the same address for multiple ReadAckRegisters in their ACPI HEST table. This allows apei to attach cleanly on Ampere Altra servers. Note the issue is not specific to Ampere, I've run into it with at least one other vendor (whose server is not yet released). Sponsored by: Netflix Reviewed by: jhb --- sys/dev/acpica/acpi_apei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi_apei.c b/sys/dev/acpica/acpi_apei.c index 6a3d9d10edd4..9cfd46c97430 100644 --- a/sys/dev/acpica/acpi_apei.c +++ b/sys/dev/acpica/acpi_apei.c @@ -711,7 +711,7 @@ apei_attach(device_t dev) if (ge->v1.Header.Type == ACPI_HEST_TYPE_GENERIC_ERROR_V2) { ge->res2_rid = rid++; acpi_bus_alloc_gas(dev, &ge->res2_type, &ge->res2_rid, - &ge->v2.ReadAckRegister, &ge->res2, 0); + &ge->v2.ReadAckRegister, &ge->res2, RF_SHAREABLE); if (ge->res2 == NULL) device_printf(dev, "Can't allocate ack resource.\n"); } From nobody Tue Jan 9 21:51:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8l4g4XLkz56WxD; Tue, 9 Jan 2024 21:51: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 4T8l4g40HDz49WC; Tue, 9 Jan 2024 21:51:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704837091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vIwwXqMi1IpUPUMlkJvavTblHBUXgXtqjkCiP+ns+io=; b=shy781xjXd8RbRMNe7tqFhRH2ikTMjVk27oQhWjCYN4aoPBkqk7F144Jnt07uSUKAtFLRm fNTwn/6bCbj24EHcdSjjZKIvII/ZKGXUzPLoydklkR+FAuNyiG7KAnfNEhKWrHpet9wJtF BY6ModCj79iPWKX1nn+Lvwf4Kc4V3LqBbN62Ywn5ohHIybI7K90Rq0LYYfsbPPEe25Qesm rbtqgnkS6LrPbfpemOs44u58XqEe51z8F0NPl5FtqN3FOGRU7Q0TOb1rc/0jgcSyyLUysT 9ZLCVTBSzHMe/VTO+AgTfNfg1EXiNl61P1GfI2BAtOFiakK7NlRDVWoJtZEX2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704837091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vIwwXqMi1IpUPUMlkJvavTblHBUXgXtqjkCiP+ns+io=; b=DsOAeMHkJw++dURgCgVIkO3vgVZKaKzxMMrck7ZXVNkrYdxX9BAh0Zqg9pSrh7tqDvIiF7 86CvvEd1HM2f1SaOjOHUfr4z+UhGXd+RkyltSn8deicP7+6hzD+6t8OWmzrrn3thqkBGFK pBJGR69LzqaY4TQyN3E+UIXqw/GLbSk+OleuPtVId4XDZ7T4CVEr7QSsM8E2KoYIY36a1+ bIZUMF8oHAz8YJ9Lv3/cV2GtdlRvu0gdJAk4waBCKWmopgMQhOIMXIKkjHGeeWZRLW7c29 snVuzXjHEXPGTh0mKWMnlQoXaU/dgYvqtnJc45sz4bycETOKEq8Ef8MvBd7JZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704837091; a=rsa-sha256; cv=none; b=JPcITQ6Srgfejg4s/80XEETpeLwGfrH820u1I0/8yOfSTuM0GCkws2X9H2H56M5+cSOJ5H cWsk5OERcLIdEd7Btkxxy0NQZFuhwVYfbTqSiggOISKIrKuhwWtayZuJySavLuLKwTM43T 52ye0mSD+jmfewEOSFSef6TzIYorpbTT6fCkzHmCRRxOFow05nxq0klivucVdvLbcxwZxZ NBW7AX8JncpKoPek6sP0Bjk7CjnHK9OycWpsH4PjMbYYVXerZqZyU66TscL5p0dXBjfQVs eQwQov0eZ10yEDTNXby1H+XKbZgIrcDfPYnKLQ+MbAgvPmZeSKPc/tcczKZnfQ== 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 4T8l4g33Txz17Lr; Tue, 9 Jan 2024 21:51: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 409LpVMg078296; Tue, 9 Jan 2024 21:51:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409LpVss078293; Tue, 9 Jan 2024 21:51:31 GMT (envelope-from git) Date: Tue, 9 Jan 2024 21:51:31 GMT Message-Id: <202401092151.409LpVss078293@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 9ea86c8f67a6 - main - cxgbe(4): Use the correct size for the CIM LA on the T6. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9ea86c8f67a65ca00f79f3cd83aa977b38589f39 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=9ea86c8f67a65ca00f79f3cd83aa977b38589f39 commit 9ea86c8f67a65ca00f79f3cd83aa977b38589f39 Author: Navdeep Parhar AuthorDate: 2024-01-09 21:22:16 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-09 21:27:00 +0000 cxgbe(4): Use the correct size for the CIM LA on the T6. The logic analyzer in the T6 CIM block has a different capture size than previous chips. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/common/common.h | 1 + sys/dev/cxgbe/common/t4_hw.c | 7 +++++-- sys/dev/cxgbe/common/t4_hw.h | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h index cd1e648f8e59..0861e3df4bee 100644 --- a/sys/dev/cxgbe/common/common.h +++ b/sys/dev/cxgbe/common/common.h @@ -313,6 +313,7 @@ struct chip_params { u32 sge_fl_db; u16 mps_tcam_size; u16 rss_nentries; + u16 cim_la_size; }; /* VF-only parameters. */ diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index 41063d5c7d76..c18243e4b681 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -9303,6 +9303,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .sge_fl_db = F_DBPRIO, .mps_tcam_size = NUM_MPS_CLS_SRAM_L_INSTANCES, .rss_nentries = RSS_NENTRIES, + .cim_la_size = CIMLA_SIZE, }, { /* T5 */ @@ -9317,6 +9318,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .sge_fl_db = F_DBPRIO | F_DBTYPE, .mps_tcam_size = NUM_MPS_T5_CLS_SRAM_L_INSTANCES, .rss_nentries = RSS_NENTRIES, + .cim_la_size = CIMLA_SIZE, }, { /* T6 */ @@ -9331,6 +9333,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .sge_fl_db = 0, .mps_tcam_size = NUM_MPS_T5_CLS_SRAM_L_INSTANCES, .rss_nentries = T6_RSS_NENTRIES, + .cim_la_size = CIMLA_SIZE_T6, }, }; @@ -9386,11 +9389,11 @@ int t4_prep_adapter(struct adapter *adapter, u32 *buf) /* Cards with real ASICs have the chipid in the PCIe device id */ t4_os_pci_read_cfg2(adapter, PCI_DEVICE_ID, &device_id); if (device_id >> 12 == chip_id(adapter)) - adapter->params.cim_la_size = CIMLA_SIZE; + adapter->params.cim_la_size = adapter->chip_params->cim_la_size; else { /* FPGA */ adapter->params.fpga = 1; - adapter->params.cim_la_size = 2 * CIMLA_SIZE; + adapter->params.cim_la_size = 2 * adapter->chip_params->cim_la_size; } ret = get_vpd_params(adapter, &adapter->params.vpd, device_id, buf); diff --git a/sys/dev/cxgbe/common/t4_hw.h b/sys/dev/cxgbe/common/t4_hw.h index e943acb8dec9..79ec690cd5e6 100644 --- a/sys/dev/cxgbe/common/t4_hw.h +++ b/sys/dev/cxgbe/common/t4_hw.h @@ -66,7 +66,8 @@ enum { CIM_NUM_IBQ = 6, /* # of CIM IBQs */ CIM_NUM_OBQ = 6, /* # of CIM OBQs */ CIM_NUM_OBQ_T5 = 8, /* # of CIM OBQs for T5 adapter */ - CIMLA_SIZE = 2048, /* # of 32-bit words in CIM LA */ + CIMLA_SIZE = 256 * 8, /* 256 rows * ceil(235/32) 32-bit words */ + CIMLA_SIZE_T6 = 256 * 10, /* 256 rows * ceil(311/32) 32-bit words */ CIM_PIFLA_SIZE = 64, /* # of 192-bit words in CIM PIF LA */ CIM_MALA_SIZE = 64, /* # of 160-bit words in CIM MA LA */ CIM_IBQ_SIZE = 128, /* # of 128-bit words in a CIM IBQ */ From nobody Tue Jan 9 22:16:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8ldT0rdxz56bSV; Tue, 9 Jan 2024 22:16: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 4T8ldS5ydsz4GGL; Tue, 9 Jan 2024 22:16:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704838588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bFFHuXcRcOPiB9UWKQnJlLaIyuOC/eQX0OnKBPwWK1I=; b=C8O+CSnLa7SvuyRqv0yyHhJYsCrAOaaColIKph/Bpht4WG2SOuaeLrV2GD3OElNkUJC6zH CFeNtmqFNVXhrsnsVqRMY2331lmjEC8gl7qmFte3cfBPcsci3616SEnXrfm4H+2bujjND7 3zjIv9E6TuudGEmzFMp3m65YLx/LaiprXPuqq37k2aV5jJ/9M9mvpK27TsKACooIysXMli dVw7egF5A6XY6UewyjlK2KM55QLQWmQsXRDjYP9Uh8AWor+20w4wEFpEsoiS24XLJIxfx7 1GI7O7tWm0M0NF0O1LTNyiTgyOwJmZF7/mottUVN8Tmb5rG1jugYHLKqkmMbKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704838588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bFFHuXcRcOPiB9UWKQnJlLaIyuOC/eQX0OnKBPwWK1I=; b=EF8q32bruebvBLORtLpRI3QERk8xIs9aRwEAVWHxzKGxUVu1ZvELed/YQ5m+KJpdrDJMGv a3UMl2KLlX5E4AxNCvcll2PnPA13mtoYP3m50Q/yNtIFETT5pCSXxVck115LN0d5qe+7wP MsBK4kTsRSUr2opZvZ+4fKfDHOX4vN/6AOakUM75MSc55bPbU8rNLuhy3Mgqg+o6uE7GxV 36hOqxWS18kTdjw5j2AT1ShzjcOgTn8EUJSNs2Wo5FHcQFkGPqaXXUomKs6QnxAnVBUMl8 k9GO88W9ZH4BjeDRyYj8J0LblD5swtSjYGcqwHGl3ml6I6xnijSbhfJlps8W7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704838588; a=rsa-sha256; cv=none; b=ojnmd6KCri9F6j55xiLcdk6iLIm5g58H3gPeZszVgL0ey3lbCViigvwL8A2nV2jRt7tOW0 T+RR0mLpcK1FdkbtAHNb+vNLrUPJa+aXbKQBxheYiwRbnhyvjSgDJ+3a5NrKgQzVrxVGik LWF7xuWmuHD0j+SvhXfmlNqr377Lwm5e2GRp47WsuNoeglRbC8qwqH/MLIhwKhAwWpf6mA 9opcYuefMe/nOSTQJcvcSz6t+eMM/xkGfYmJLcQVicQGD41h3dY158BXSYwKZGp93XB5Vd ReMZmBxh9KmI2DNHBys0HAuZ4WWE+3ELR6TI6Jr1Ec+lJyr+Q+0U/Iuy1rDLmA== 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 4T8ldS525Lz17rF; Tue, 9 Jan 2024 22:16: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 409MGSIL019011; Tue, 9 Jan 2024 22:16:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409MGSc5019008; Tue, 9 Jan 2024 22:16:28 GMT (envelope-from git) Date: Tue, 9 Jan 2024 22:16:28 GMT Message-Id: <202401092216.409MGSc5019008@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: 0d6d28ce5650 - main - e1000(4): Remove disconnected SYSCTL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d6d28ce5650d1cd23dbe4bbac87fb103b3e2d3d Auto-Submitted: auto-generated The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=0d6d28ce5650d1cd23dbe4bbac87fb103b3e2d3d commit 0d6d28ce5650d1cd23dbe4bbac87fb103b3e2d3d Author: Marius Strobl AuthorDate: 2024-01-09 21:41:49 +0000 Commit: Marius Strobl CommitDate: 2024-01-09 22:15:44 +0000 e1000(4): Remove disconnected SYSCTL The global hw.em.rx_process_limit knob has been replaced by the device- specific dev.IF.N.iflib.rx_budget along with the conversion to iflib(4). While at it, remove the - besides initialization of tx_process_limit - unused {r,t}x_process_limit members. --- sys/dev/e1000/if_em.c | 11 ----------- sys/dev/e1000/if_em.h | 2 -- 2 files changed, 13 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 8488f72c4cde..690d6dfa3218 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -542,13 +542,6 @@ static int em_debug_sbp = false; SYSCTL_INT(_hw_em, OID_AUTO, sbp, CTLFLAG_RDTUN, &em_debug_sbp, 0, "Show bad packets in promiscuous mode"); -/* How many packets rxeof tries to clean at a time */ -static int em_rx_process_limit = 100; -SYSCTL_INT(_hw_em, OID_AUTO, rx_process_limit, CTLFLAG_RDTUN, - &em_rx_process_limit, 0, - "Maximum number of received packets to process " - "at a time, -1 means unlimited"); - /* Energy efficient ethernet - default to OFF */ static int eee_setting = 1; SYSCTL_INT(_hw_em, OID_AUTO, eee_setting, CTLFLAG_RDTUN, &eee_setting, 0, @@ -561,8 +554,6 @@ static int em_max_interrupt_rate = 8000; SYSCTL_INT(_hw_em, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN, &em_max_interrupt_rate, 0, "Maximum interrupts per second"); - - /* Global used in WOL setup with multiport cards */ static int global_quad_port_a = 0; @@ -832,8 +823,6 @@ em_if_attach_pre(if_ctx_t ctx) sc->media = iflib_get_media(ctx); hw = &sc->hw; - sc->tx_process_limit = scctx->isc_ntxd[0]; - /* Determine hardware and mac info */ em_identify_hardware(ctx); diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h index ebf0be7426a0..244762e8ed0d 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -480,8 +480,6 @@ struct e1000_softc { u16 num_vlans; u32 txd_cmd; - u32 tx_process_limit; - u32 rx_process_limit; u32 rx_mbuf_sz; /* Management and WOL features */ From nobody Tue Jan 9 22:16:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8ldV1XzXz56bLC; Tue, 9 Jan 2024 22:16: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 4T8ldT6Tq5z4GRX; Tue, 9 Jan 2024 22:16:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704838589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSe0+Bdmykx3y9TGmIBEHhUkMoF6buOMegiB9XMn0lI=; b=Z+A0UiBORm+UfYbG9y1QlbOIk0JoX+AO2VPc6M7nvxm9yVMmbewSt6Vgeage3UmwtDCMWb djKaBQTP9mcCGhnPJAsdd+oL5XBNrLRC4pwjVAVDDou3Pp/6pPwy017wEcTx3bhVbGmyqe fV+0GqUXoJ3w2g3cpdxNVVOsO7j4K1B65svgErNsFHbm7uTOnhA35F5odeTBNNi65pxt7x 1HssL2R9vIDORAMpVyet7zW5Z/XAtiuSMWuzvyP9HgVTuI7gsZ+s0baArPfgSsSXQ+BfWr uVBIVmTwIefgfyRYW1EEE6UGDNuIUuBcf2qme1nyG4nUYN6uMcxkCNuTl1U4Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704838589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSe0+Bdmykx3y9TGmIBEHhUkMoF6buOMegiB9XMn0lI=; b=ltw59TH/XY2cSJgtL3FAxDPLMZwm+wTxPhO4W0QVLe8/tEDRccPHKGlPCcMLoy4JqETvtm JutwVN2DHN7Vwe4D0VEiYoKw0v7XDhC34i8YmKvw24msK0e/glxnDOu4kt3XTXkR22raRu Yo3TUrDnLSgi6kroVdnoHir3CTQlcIACm1X3ztQzUJill79cDDXWCxH24NMaB+jXd1qaJt r1M5Qj+FWIesNrql/EjypuT5FbSVnKDMrR9oVIf4Ql1I24y3w6TEYjtrgUEcLvRI1LcvKq LMJyH4yjWqlVsAbkHlnGh0E88g/crJAdw6cJeA0HSSU19vSL5fL1r5uqk5BNiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704838589; a=rsa-sha256; cv=none; b=MDNMfxU3AvRN7dh2eFO9hP1WEZBkEd/+W3aI5L7Dnj23U6VUF1xsLnKWuAaKmJ/jh6l2UP ZoewSAPOeetwrTjjS2W7vZnAn7slyJPEdhSUX8qp4t2MKOg2uqKol9vlgjjOwKWzm8tHzl 2ceGxMjEGN/1oQZx9ORBlQFX9fAj5R2sCsyzr5fcqyZsFYS9pRLculnujcD9LmR1iXZgVg pVY2mQXNT0DrEgYj/KWs1C8Qz7sBR+673V7aMv/YtglUhyF8a+BhEpfSub+de5SbTWKYWX 1xDKeUSmyoH+J/UxcAtTRGzGpZB0qMlCBlXQ5M1sygkbJK0JB85PyTxi7h1GgA== 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 4T8ldT5ZNSz17Wp; Tue, 9 Jan 2024 22:16: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 409MGTVr019057; Tue, 9 Jan 2024 22:16:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409MGTMA019054; Tue, 9 Jan 2024 22:16:29 GMT (envelope-from git) Date: Tue, 9 Jan 2024 22:16:29 GMT Message-Id: <202401092216.409MGTMA019054@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: f221d35be7a5 - main - igb(4): Remove disconnected SYSCTL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f221d35be7a5749e2a1246c81adc9c03c1dc545c Auto-Submitted: auto-generated The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=f221d35be7a5749e2a1246c81adc9c03c1dc545c commit f221d35be7a5749e2a1246c81adc9c03c1dc545c Author: Marius Strobl AuthorDate: 2024-01-09 22:01:46 +0000 Commit: Marius Strobl CommitDate: 2024-01-09 22:15:44 +0000 igb(4): Remove disconnected SYSCTL The global hw.igb.rx_process_limit knob never was adhered to by the in-tree version of this driver but similar functionality is available via the device-specific dev.igb.N.iflib.rx_budget. While at it, remove the - besides initialization of tx_process_limit - unused {r,t}x_process_limit members. --- share/man/man4/igc.4 | 6 +----- sys/dev/igc/if_igc.c | 9 --------- sys/dev/igc/if_igc.h | 2 -- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/share/man/man4/igc.4 b/share/man/man4/igc.4 index f77581edd00b..cf36e584a679 100644 --- a/share/man/man4/igc.4 +++ b/share/man/man4/igc.4 @@ -3,7 +3,7 @@ .\" Copyright 2021 Rubicon Communications, LLC (Netgate) .\" SPDX-License-Identifier: BSD-3-Clause .\" -.Dd May 10, 2021 +.Dd January 9, 2023 .Dt IGC 4 .Os .Sh NAME @@ -118,10 +118,6 @@ maximum delay in which a transmit interrupt is generated. .It Va hw.igc.sbp Show bad packets when in promiscuous mode. Default is false. -.It Va hw.igc.rx_process_limit -Maximum number of received packets to process at a time. -Default is 100. -A value of -1 means unlimited. .It Va hw.igc.eee_setting Disable or enable Energy Efficient Ethernet. Default 1 (disabled). diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index a0f0906e30da..bfa33c82f7ba 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -254,13 +254,6 @@ static int igc_debug_sbp = true; SYSCTL_INT(_hw_igc, OID_AUTO, sbp, CTLFLAG_RDTUN, &igc_debug_sbp, 0, "Show bad packets in promiscuous mode"); -/* How many packets rxeof tries to clean at a time */ -static int igc_rx_process_limit = 100; -SYSCTL_INT(_hw_igc, OID_AUTO, rx_process_limit, CTLFLAG_RDTUN, - &igc_rx_process_limit, 0, - "Maximum number of received packets to process " - "at a time, -1 means unlimited"); - /* Energy efficient ethernet - default to OFF */ static int igc_eee_setting = 1; SYSCTL_INT(_hw_igc, OID_AUTO, eee_setting, CTLFLAG_RDTUN, &igc_eee_setting, 0, @@ -466,8 +459,6 @@ igc_if_attach_pre(if_ctx_t ctx) adapter->media = iflib_get_media(ctx); hw = &adapter->hw; - adapter->tx_process_limit = scctx->isc_ntxd[0]; - /* SYSCTL stuff */ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), diff --git a/sys/dev/igc/if_igc.h b/sys/dev/igc/if_igc.h index 7a30f5956016..0c22ce9f76f4 100644 --- a/sys/dev/igc/if_igc.h +++ b/sys/dev/igc/if_igc.h @@ -372,8 +372,6 @@ struct igc_adapter { u32 txd_cmd; - u32 tx_process_limit; - u32 rx_process_limit; u32 rx_mbuf_sz; /* Management and WOL features */ From nobody Tue Jan 9 23:00:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8mc66mDrz56jKb; Tue, 9 Jan 2024 23:00:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8mc66CtWz4LWt; Tue, 9 Jan 2024 23:00:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704841222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YrxaW6p+ytZitJE80S723t681LJGXL0nmf24Pj6EiDc=; b=h2wSMuUYPUqTEtB9YC1xWXJiU8rwa/wZRjQrNC/zMEAjf++nHKIyKrPI3GFfd3LkZyGBs3 RfQZizl/RcfVekDF7ybBT2fC4GVUdhZvbp9YH2MMcP02ll48zEYqXKcdO+j4hdIUmhRfAR DVQlg44fc6rgqHKdEcv7dUw9J0cxasG3CUuFCuwX1iHC4KTtHQE5NAinAqjDvb1KaAEguQ ZsdYF7EIdgoP/r/eAETZkXR4KlPYgFYMpZTeYefjrBZ7ulQplHj/Br2S3DguGnVkgxHCgz R7P2mNPILmwstd9ipfQOPZkf6HhK2kuCqLbarmgJ9oCmkDGD09V8hmTcW5HuUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704841222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YrxaW6p+ytZitJE80S723t681LJGXL0nmf24Pj6EiDc=; b=HQ6EaRVGdOQM7Tpd8Tgy4PkAXDjFGnu+T5pLKG4AJzFt+J5nzEXJ/4F8HP1ClDymvytj8J QUNxOLrLtxNpbcseYEX50dfyR2rMsGWDbmGbu7Vh+eYl4StKlzAI0TXEOmc6nvlt3uesxK Z6JVVdKi3aB6hpPsiZ/kTJMIIP5wTCS58S3ewlRraOrfdMVb9yibrjx2kRL3ysdOMb/oeg M3b7d3+Ep3GwFRrLEGdfru+Q4lx2mHQpHckOQyv1VjZQFzsCKIOTw5UuHNwl3wHsShqaSP EC2xXOWU4kcx4QFtTN8QepI7Evb6jSAH7SPQ1Wy3zh92w5eDFiPbyM02CMxUZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704841222; a=rsa-sha256; cv=none; b=BkXfSOWzAckimxZsWvJzeIgy21VWU7jSNCO13w3tWQhYX+vqm+okPORULyrEZ1jTUwWMFW qdNe88WT9b+RKt0A3MrHbQEcUg4bPxK9WgQlE7AgErRanHe7Ez8oWlO9knj/4/uOhYlhND iuHHju4R+XfZRvvjcm7hN4BKQ7YdQr1EsrklvQ/EJRYcjeCdswxVg6mJBAF229NLDCDCHa jngCdpP94VWue+PD6gN7gqefDsZL20PqpbP+jSfJhvm6EGZ8Q+Mv6ggGkzTFNsoVKeXxFR LyyPVHoBb+wMS/1LYCKl9wykVDLhy/KL3sE2SidF8Lwh2xzf7Ucfuc/GQH42Bw== 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 4T8mc65GCFz18pP; Tue, 9 Jan 2024 23:00:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 409N0MnA095359; Tue, 9 Jan 2024 23:00:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409N0MdC095356; Tue, 9 Jan 2024 23:00:22 GMT (envelope-from git) Date: Tue, 9 Jan 2024 23:00:22 GMT Message-Id: <202401092300.409N0MdC095356@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 8e2c2992da7a - main - socket_msg_trunc: allocate a large enough buffer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e2c2992da7aab7213b6349ff54dbaf1dcc05678 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8e2c2992da7aab7213b6349ff54dbaf1dcc05678 commit 8e2c2992da7aab7213b6349ff54dbaf1dcc05678 Author: Brooks Davis AuthorDate: 2024-01-09 19:35:37 +0000 Commit: Brooks Davis CommitDate: 2024-01-09 22:59:29 +0000 socket_msg_trunc: allocate a large enough buffer Allocate 9000 bytes to match the largest requsted size. Add a check to prevent the list of sizes and buffer size from getting out of sync again. Reviewed by: markj Found with: CheriBSD Differential Revision: https://reviews.freebsd.org/D43340 --- tests/sys/kern/socket_msg_trunc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/sys/kern/socket_msg_trunc.c b/tests/sys/kern/socket_msg_trunc.c index ff0499c4540d..b0ea724f0de0 100644 --- a/tests/sys/kern/socket_msg_trunc.c +++ b/tests/sys/kern/socket_msg_trunc.c @@ -44,7 +44,7 @@ static void check_recvmsg(int cs, int ss, struct sockaddr *sa, const size_t sizes[], size_t nsizes) { - char buf[4096]; + char buf[9000]; memset(buf, 0xFF, sizeof(buf)); for (size_t i = 0; i < nsizes; i++) { @@ -52,6 +52,8 @@ check_recvmsg(int cs, int ss, struct sockaddr *sa, const size_t sizes[], size_t sz = sizes[i]; char tbuf[1]; + ATF_REQUIRE(sz <= sizeof(buf)); + rc = sendto(cs, buf, sz, 0, sa, sa->sa_len); ATF_REQUIRE_MSG(rc != -1, "sendto failed: %s", strerror(errno)); ATF_REQUIRE((size_t)rc == sz); From nobody Tue Jan 9 23:00:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8mc81GQ9z56jKg; Tue, 9 Jan 2024 23:00: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 4T8mc76wsGz4LPQ; Tue, 9 Jan 2024 23:00:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704841224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kWqJbMN8mDDyo8JJJesq6FRYZ5+sGMtQmq7tdde7ad0=; b=LemJOsozo1s8tkQsDyS4mojj4nfgbnYra6ya+VDBlcfBfE8rPmOXhFeHCuIXjRuQnBLuOo 2ZvAkxldGaIn1BKCmsy3ZfGL0J4R+lx899c+EwRkU4sv77LrxDdbwfRcX8US13KVmiENbW EkrK9Khltr9bupZENBkcs/0xMJj+TiONnD84mXaFFC++M1TDQHTX7NZIPGDWk5NCrboDNo ENYIMXCfky8W2NaBnvtiomkDQLnh6i7zbSwEYY/i7VKV76QV9afc4UU/z+PwadpagT+kUy IYK5qUW1VVXFnFni2TTKC6RUmq/QRG9i9DtAaFZdrN7Exd5VrC28OFUb8SE6dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704841224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kWqJbMN8mDDyo8JJJesq6FRYZ5+sGMtQmq7tdde7ad0=; b=RlytJ8PkPLiV1JIBS5FIIoYCcO6TFOUhK6VohpPOEyu1FWj2YuD6omOXP3EZ+gS2y5mI4a VWxkHwIjtv0FSLTT416t5k6VGs/+2vOlbLVeVntFnKgTtB0FD2ATiH5hPoAe43ZRxIvtBs i0jwoE7NWyFUWuZe5mCLX5x1bLRwzZV/av+9YusBm+/T8gO35xPU4AROhrfbRJ8kVFk5kG /9NASxG6+MYfgTI7/vgyCJGa3kWIKHtV3Su/OM4abgb3TpIj8Pq4yzrJ8t/MKWEAasigG1 kCryX0OfOLK+3+s0Z6KPE9QFnEyrFR2Bkvathd1r2NO4OaAzG28qQNB6FDGtsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704841224; a=rsa-sha256; cv=none; b=og+S7gJOjR013GSSRjNTqA2IRSyPDcGj8hjq0txaKi6fjATbJ/keUNHXpUqNv5NfAHqmVT 5kIFRGZjLpPCDi4NRq+KEQfaXN90iLxvAiQEKb2IgfRwQ48a6WtbzHd+bj97Lkqu/8J1xn traHRmf/SJ1X7ShIsFY7v6G0j6vaznwZDwvyaeVLSzCeOBxBwJjRYRhwxse4oUZ9++a8vr qKH9I/oFffhABBybxFr9rxmKf46OD3leTaG2Tu8GTpq7tiDfiXcPHacs0wvI6N18d/7Jdg 2BxsxGEtKAFyqBUs2E/UlQSHSSPzlpeP67tLPWqzq4CbpN7cD0FKEo35vGdSoA== 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 4T8mc7606Sz18pQ; Tue, 9 Jan 2024 23:00: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 409N0N0F095398; Tue, 9 Jan 2024 23:00:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409N0N7R095395; Tue, 9 Jan 2024 23:00:23 GMT (envelope-from git) Date: Tue, 9 Jan 2024 23:00:23 GMT Message-Id: <202401092300.409N0N7R095395@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 13f345cdecd3 - main - powerpc64/SYS.h: implement _SYSCALL_BODY() macro List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 13f345cdecd3e208b9226e3b1dcc39737ab2881b Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=13f345cdecd3e208b9226e3b1dcc39737ab2881b commit 13f345cdecd3e208b9226e3b1dcc39737ab2881b Author: Brooks Davis AuthorDate: 2024-01-09 19:37:42 +0000 Commit: Brooks Davis CommitDate: 2024-01-09 22:59:29 +0000 powerpc64/SYS.h: implement _SYSCALL_BODY() macro Add _SYSCALL_BODY() macro which invokes the syscall via _SYCALL() and calls cerror as required. Use to implement PSEUDO() and RSYSCALL(). Reviewed by: jhibbits Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D43322 --- lib/libc/powerpc64/SYS.h | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/lib/libc/powerpc64/SYS.h b/lib/libc/powerpc64/SYS.h index dccd08b63541..bf8bc6cc0e27 100644 --- a/lib/libc/powerpc64/SYS.h +++ b/lib/libc/powerpc64/SYS.h @@ -40,11 +40,7 @@ li 0,(SYS_##name); \ sc -#define PSEUDO(name) \ - .text; \ - .align 2; \ -ENTRY(__sys_##name); \ - WEAK_REFERENCE(__sys_##name, _##name); \ +#define _SYSCALL_BODY(name) \ _SYSCALL(name); \ bnslr; \ mflr %r0; \ @@ -55,7 +51,14 @@ ENTRY(__sys_##name); \ addi %r1,%r1,48; \ ld %r0,16(%r1); \ mtlr %r0; \ - blr; \ + blr + +#define PSEUDO(name) \ + .text; \ + .align 2; \ +ENTRY(__sys_##name); \ + WEAK_REFERENCE(__sys_##name, _##name); \ + _SYSCALL_BODY(name); \ END(__sys_##name) #define RSYSCALL(name) \ @@ -64,16 +67,5 @@ END(__sys_##name) ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, name); \ WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - bnslr; \ - \ - mflr %r0; \ - std %r0,16(%r1); \ - stdu %r1,-48(%r1); \ - bl CNAME(HIDENAME(cerror)); \ - nop; \ - addi %r1,%r1,48; \ - ld %r0,16(%r1); \ - mtlr %r0; \ - blr; \ + _SYSCALL_BODY(name); \ END(__sys_##name) From nobody Wed Jan 10 00:05:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8p3Z4XNdz56tJG; Wed, 10 Jan 2024 00:05:46 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.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 4T8p3Z2JfCz4SFL; Wed, 10 Jan 2024 00:05:46 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Authentication-Results: mx1.freebsd.org; none Date: Wed, 10 Jan 2024 01:05:22 +0100 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: Kyle Evans Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: c2356a440db9 - main - asa: Rewrite to fix line termination issue. Message-ID: <20240110000522.BLC0pwdG@steffen%sdaoden.eu> In-Reply-To: <637f3964-c65e-42cf-97a1-342e9447cd69@FreeBSD.org> References: <202401091627.409GRcI0028831@gitrepo.freebsd.org> <20240109180554.UYZwm9Yl@steffen%sdaoden.eu> <637f3964-c65e-42cf-97a1-342e9447cd69@FreeBSD.org> Mail-Followup-To: Kyle Evans , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org User-Agent: s-nail v14.9.24-588-g826cef48a3 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4T8p3Z2JfCz4SFL 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:15987, ipnet:217.144.128.0/20, country:DE] Kyle Evans wrote in <637f3964-c65e-42cf-97a1-342e9447cd69@FreeBSD.org>: |On 1/9/24 12:05, Steffen Nurpmeso wrote: |> Dag-Erling Sm=C3=B8rgrav wrote in |> <202401091627.409GRcI0028831@gitrepo.freebsd.org>: |>|The branch main has been updated by des: |>| |>|URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc2356a440db91c106867d45c= 94b\ |>|3d6d7bc0e50f0 |>| |>|commit c2356a440db91c106867d45c94b3d6d7bc0e50f0 |>|Author: Dag-Erling Sm=C3=B8rgrav |>|AuthorDate: 2024-01-09 14:09:41 +0000 |>|Commit: Dag-Erling Sm=C3=B8rgrav |>|CommitDate: 2024-01-09 16:27:15 +0000 |>| |>| asa: Rewrite to fix line termination issue. |>| |>| The standard is somewhat unclear, but on the balance, I believe \ |> ... |>| - Second, it unconditionally emits a newline at the end of the outp= ut |>| for non-empty input, even if the input did not end with a newline. |> ... |>=20 |> I want to point out that POSIX only knows about text files which |> end with a LF newline. Otherwise it is not a text file. (I think |> Stallman and emacs joke on this by allowing something else, iirc |> from before Y2K when i shortly used it, and, funnily, from some |> thread on another ML just last week or so, where it was claimed |> that this could have roots in emacse not rooting in UNIX.) | |It notably defines a text file as zero or more lines, and doesn't say=20 |anything about incomplete lines -- just that none of the lines contain=20 |NUL characters. One can conclude without further information that a=20 |trailing LF is not at all required in any circumstance, it's just an=20 |incomplete line. I must admit i have not looked at the actual changeset code, only the commit message. (I have waited until the "ghost hour" passed until i answered this.) --End of <637f3964-c65e-42cf-97a1-342e9447cd69@FreeBSD.org> --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From nobody Wed Jan 10 00:58:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8qDK3TDCz5739d; Wed, 10 Jan 2024 00:58: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 4T8qDK2wGRz4ckj; Wed, 10 Jan 2024 00:58:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704848305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IpJprHIl4F+uDzMu+o6T5IfZiZ8BEZ/QIGL+GRoGfLs=; b=r+xxP3kFVayoDsL0xQ5GvfFoK5CPsceSqZyEbk4ujHOxWSI80AmSPjyToWZpVLlP3dBRaW +e0jYosWT+xiTYzkUGX4AGsmLgpTLVNuxYug1kX0B9gt7b5+slIXA8zZc2JURW0SefzEVP Ez5gUswvyfoX0WvAKyeFHaIhlOlhM9lFKviHiiow9Ts0zNpNSpBygnw7HOtksd9hXZzO0a wsNyP4BzfEvRfTS9v7/uDbg6AHPtju443QrNvHCPsfRDZcAnFzUdLLWxi6u554yy0NhbuG KW18H2EOXbt6rSROgVwaQbtFLHY0DiUqkbj72OSdyybbRhh/EN++4vE4rYUZGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704848305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IpJprHIl4F+uDzMu+o6T5IfZiZ8BEZ/QIGL+GRoGfLs=; b=uiTxnV/1TnQYkHMvXq64dSvzwOiwxzwg7ZxPziPQZVheuY5blVR7LdUKhKpuesXi1YGlYf nZ2Wm1WbyoqPlUsQjAar+c4NXYmE0qgHkBiVzSlzFxkS+mNzk4dFE7biNBkkfOmZq2iyLL o4+ZGjQV6NCkWrYWRCvK0cfJqR53B4DJJEulTDY6IOkmWoA+tJxCEFsAm3vn8VxKG9gz1a 2thsHe18vxyB+O4q930RWI74fVokHWFhr7DrHH2mDR57c9RYReRnl98b6JNNgrpyl1+3PB vncGyF455fITtp/pqtE4sUrB0Izkia02yvVyxDi6iItZUnAd5NB8rvoFwUBndA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704848305; a=rsa-sha256; cv=none; b=B4pOS9PpMAT2nyEWXCSRefE94XterUBk3BAFtBT5qKUpSICTLlM1uwN9nd7bgCkoUzZUHR wMMNFBeEcRl7jpWiDFy5YjAuIecdatJjzfUv1ZHoWnJMgxSBVlGNSZkesi2JbrpDbbR5nO WS5AnwDHS8p6MXaEacmMBIuswHUCSOQwxxEOKoVMuhmY82uAKKR0wqCGJUdByRCjI+v+MT 0WNoT1W+CKqe03dqvpxHgGoP5OKvyAGLLgk/aZGE0DTOahAqOYDxLkjEPceyoMfkjBkG2X 3qFwKQKrVDCIuC1yaMnUi1v1FmWzlTyNd5cG+dmpdK7RMasqosxkorrr7UrTPA== 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 4T8qDK1gl8z1CkS; Wed, 10 Jan 2024 00:58: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 40A0wPki087538; Wed, 10 Jan 2024 00:58:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40A0wPUS087535; Wed, 10 Jan 2024 00:58:25 GMT (envelope-from git) Date: Wed, 10 Jan 2024 00:58:25 GMT Message-Id: <202401100058.40A0wPUS087535@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 8338ea1d3cc7 - main - tests/netlink: add minimal test for a group writer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8338ea1d3cc705f08674285a884d3aa485bf6290 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=8338ea1d3cc705f08674285a884d3aa485bf6290 commit 8338ea1d3cc705f08674285a884d3aa485bf6290 Author: Gleb Smirnoff AuthorDate: 2024-01-10 00:56:51 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-10 00:56:51 +0000 tests/netlink: add minimal test for a group writer Subscribe a socket for RTNLGRP_IPV4_ROUTE announcements, add & delete a route and check that announcements came in. --- tests/sys/netlink/netlink_socket.c | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/tests/sys/netlink/netlink_socket.c b/tests/sys/netlink/netlink_socket.c index 51a3824a31f2..3015a585199b 100644 --- a/tests/sys/netlink/netlink_socket.c +++ b/tests/sys/netlink/netlink_socket.c @@ -39,6 +39,9 @@ #include #include +#include +#include + #include static struct itimerval itv = { @@ -253,6 +256,51 @@ ATF_TC_BODY(sizes, tc) cmsg_check(&msg); } +/* + * Check that NETLINK_ADD_MEMBERSHIP subscribes us. Add & delete a temporary + * route and check if announcements came in. + */ +ATF_TC_WITHOUT_HEAD(membership); +ATF_TC_BODY(membership, tc) +{ + struct { + struct nlmsghdr hdr; + struct rtmsg rtm; + struct nlattr rta_dst; + struct in_addr dst; + struct nlattr rta_oif; + uint32_t oif; + } msg = { + .hdr.nlmsg_type = RTM_NEWROUTE, + .hdr.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_EXCL, + .hdr.nlmsg_len = sizeof(msg), + .rtm.rtm_family = AF_INET, + .rtm.rtm_protocol = RTPROT_STATIC, + .rtm.rtm_type = RTN_UNICAST, + .rtm.rtm_dst_len = 32, + .rta_dst.nla_type = RTA_DST, + .rta_dst.nla_len = sizeof(struct in_addr) + + sizeof(struct nlattr), + .dst.s_addr = inet_addr("127.0.0.127"), + .rta_oif.nla_type = RTA_OIF, + .rta_oif.nla_len = sizeof(uint32_t) + sizeof(struct nlattr), + .oif = 1, + }; + int fd; + + ATF_REQUIRE((fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) != -1); + ATF_REQUIRE(setsockopt(fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, + &(int){RTNLGRP_IPV4_ROUTE}, sizeof(int)) == 0); + ATF_REQUIRE(send(fd, &msg, sizeof(msg), 0) == sizeof(msg)); + msg.hdr.nlmsg_type = RTM_DELROUTE; + msg.hdr.nlmsg_len -= sizeof(struct nlattr) + sizeof(uint32_t); + ATF_REQUIRE(send(fd, &msg, msg.hdr.nlmsg_len, 0) == msg.hdr.nlmsg_len); + ATF_REQUIRE(recv(fd, &msg, sizeof(msg), 0) == sizeof(msg)); + ATF_REQUIRE(msg.hdr.nlmsg_type == RTM_NEWROUTE); + ATF_REQUIRE(recv(fd, &msg, sizeof(msg), 0) == sizeof(msg)); + ATF_REQUIRE(msg.hdr.nlmsg_type == RTM_DELROUTE); +} + ATF_TP_ADD_TCS(tp) { if (modfind("netlink") == -1) @@ -261,6 +309,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, overflow); ATF_TP_ADD_TC(tp, peek); ATF_TP_ADD_TC(tp, sizes); + ATF_TP_ADD_TC(tp, membership); return (atf_no_error()); } From nobody Wed Jan 10 03:07:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8t5m07YSz55R6C; Wed, 10 Jan 2024 03:07: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 4T8t5l71dkz4vN1; Wed, 10 Jan 2024 03:07:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704856075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p1gt3bcNQNS1RbOagrsdIgJdHuAVfiGXxSRs22GQKOE=; b=AB5dJxCTZcrpmOMhY0/Hv3ibqSjNWZf1dVerfrz7EjAuPyHvN9eYrLERYKM/P2ePswKx6P 4oBx+28Bu5Uqbd2l/JAredp/rK0tpnnx5cZxEcH/o0AtozvYQ9ej6mKpwQoPikffvFX0I5 EcnIrw9n7zB25eBTRymaa8AkPmu4AgaEsXn+HMrGbRCvdNjXOHz43zfv2MgNazPjFHuiFJ isYkSKUlIrZDyTwR0kJQQu4RznJJSzeIqqnNHT9lJ68ZuOeL5AVr/TsmJId82E6/vlhZiP C7DpEBxAZIyqZ+nMdMxytaI9cR0IJGx1Ybjd3BuSl+4JUqcTGvTQf6myUEBpBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704856075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p1gt3bcNQNS1RbOagrsdIgJdHuAVfiGXxSRs22GQKOE=; b=PaJb7COoXuVskGKscVhgrkziz5aMApVzDiNGpja3s1Ghw8sIDxKHSOn2Gw6lm6MrM9cqC1 y4QtxAj4XPCMipHrE8wuCYQZDTT2lBjcNoWKmRFoMEISe9CNVBBim2Wvb3CMuWY+UJF2WL jAIG5Zt/xG3A3GPSUkawT7eH6WABd7EF/a/AuFfg9KYRX55xhrIOhIE6ImpELK+odQpPIo iDop0g/JG/teBaD3xmEk6uTLVD1lhzKCAr1SaDa7qNOzNowxUJl+pWxmZnr9NqOEr99uFc k9T/PmrDrqWeaO1XI4HQT2SaPSpTJ9fYxmdBgUr7OX/ZPVlFKH1mGymfNX/w7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704856075; a=rsa-sha256; cv=none; b=XDLhUdbVrQFAeW8tklGpwP9WwCvFEUFO/kY+v5hu+n5SC4d9qogUybQHUDXx1LbUDEBa7U y5R1l9z8jBqrq/KIZnmyVHRLU/v+LlGZztbIHNmLUHRDwVSSu/Vkc/yJpb0IyldiHE/Dwa 13wYd2CUf4+rq+tipceZGAIeTkuA9XoaeJlxnX69rzJLU3MR7mXYCd9OzynUwCyICAfReR YJpmrRFKCvYkn7bZftO4bHaGGKAwSWZDjr71UHavoKs9ET8vgx3VcJrjpw6UzDyqwYbVT9 LaXBXFdATO9cjQNwYv8ud7v1vE8MBxTuvHu4ZqdPQniRAqeQBSJRKlK8y8B00g== 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 4T8t5l652XzJ5R; Wed, 10 Jan 2024 03:07: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 40A37tnX007888; Wed, 10 Jan 2024 03:07:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40A37tjG007885; Wed, 10 Jan 2024 03:07:55 GMT (envelope-from git) Date: Wed, 10 Jan 2024 03:07:55 GMT Message-Id: <202401100307.40A37tjG007885@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 677a7402cea4 - stable/13 - sys/*/conf/*, docs: fix links to handbook List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 677a7402cea46eb253a241b443471ab072e2b6a7 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=677a7402cea46eb253a241b443471ab072e2b6a7 commit 677a7402cea46eb253a241b443471ab072e2b6a7 Author: Ceri Davies AuthorDate: 2021-05-20 08:26:02 +0000 Commit: Ed Maste CommitDate: 2024-01-10 03:07:46 +0000 sys/*/conf/*, docs: fix links to handbook While here, fix all links to older en_US.ISO8859-1 documentation in the src/ tree. PR: 255026 Reported by: Michael Büker Reviewed by: dbaio Differential Revision: https://reviews.freebsd.org/D30265 (cherry picked from commit c1a148873d6488f1dac1cfb207a5927cef89888e) --- bin/timeout/timeout.1 | 4 ++-- release/Makefile | 1 - share/man/man4/mac.4 | 2 +- share/man/man7/release.7 | 4 ++-- share/man/man9/mac.9 | 4 ++-- share/man/man9/pci.9 | 4 ++-- sys/amd64/conf/GENERIC | 2 +- sys/amd64/conf/GENERIC-KCSAN | 2 +- sys/amd64/conf/MINIMAL | 2 +- sys/arm/conf/ALPINE | 2 +- sys/arm/conf/APALIS-IMX6 | 2 +- sys/arm/conf/ARMADAXP | 2 +- sys/arm/conf/COLIBRI-VF50 | 2 +- sys/arm/conf/COSMIC | 2 +- sys/arm/conf/EFIKA_MX | 2 +- sys/arm/conf/GENERIC | 2 +- sys/arm/conf/IMX53 | 2 +- sys/arm/conf/IMX6 | 2 +- sys/arm/conf/JETSON-TK1 | 2 +- sys/arm/conf/QUARTZ | 2 +- sys/arm/conf/RPI-B | 2 +- sys/arm/conf/SOCDK | 2 +- sys/arm/conf/SOCFPGA | 2 +- sys/arm/conf/SOCKIT | 2 +- sys/arm/conf/SOCKIT-BERI | 2 +- sys/arm/conf/TEGRA124 | 2 +- sys/arm/conf/VERSATILEPB | 2 +- sys/arm/conf/VYBRID | 2 +- sys/arm/conf/ZEDBOARD | 2 +- sys/arm64/conf/GENERIC | 2 +- sys/arm64/conf/GENERIC-UP | 2 +- sys/contrib/zstd/FREEBSD-upgrade | 2 +- sys/i386/conf/GENERIC | 2 +- sys/i386/conf/MINIMAL | 2 +- sys/mips/conf/ERL | 2 +- sys/mips/conf/OCTEON1 | 2 +- sys/mips/conf/XLP64 | 2 +- sys/mips/conf/XLPN32 | 2 +- sys/powerpc/conf/GENERIC | 2 +- sys/powerpc/conf/GENERIC64 | 2 +- sys/powerpc/conf/GENERIC64LE | 2 +- sys/riscv/conf/GENERIC | 2 +- usr.bin/fortune/datfiles/freebsd-tips | 3 +-- usr.sbin/lpr/lpd/printcap | 2 +- usr.sbin/mergemaster/mergemaster.8 | 5 ++--- usr.sbin/ppp/ppp.8 | 8 +++----- 46 files changed, 52 insertions(+), 57 deletions(-) diff --git a/bin/timeout/timeout.1 b/bin/timeout/timeout.1 index e3be41f884dc..921fe1160023 100644 --- a/bin/timeout/timeout.1 +++ b/bin/timeout/timeout.1 @@ -178,7 +178,7 @@ $ echo $? .Pp Try to .Xr fetch 1 -the single page version of the +the PDF version of the .Fx Handbook. Send a @@ -188,7 +188,7 @@ signal after 1 minute and send a signal 5 seconds later if the process refuses to stop: .Bd -literal -offset indent $ timeout -k 5s 1m fetch \\ -> https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/book.html +> https://download.freebsd.org/ftp/doc/en/books/handbook/book.pdf .Ed .Sh SEE ALSO .Xr kill 1 , diff --git a/release/Makefile b/release/Makefile index 212d32623fb3..7e6bc566961c 100644 --- a/release/Makefile +++ b/release/Makefile @@ -35,7 +35,6 @@ WORLDDIR?= ${.CURDIR}/.. PORTSDIR?= /usr/ports -RELNOTES_LANG?= en_US.ISO8859-1 .if !defined(TARGET) || empty(TARGET) TARGET= ${MACHINE} diff --git a/share/man/man4/mac.4 b/share/man/man4/mac.4 index fe19b36a8306..4a4081d899f0 100644 --- a/share/man/man4/mac.4 +++ b/share/man/man4/mac.4 @@ -221,7 +221,7 @@ man page. .Rs .%B "The FreeBSD Handbook" .%T "Mandatory Access Control" -.%U https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/mac.html +.%U https://docs.FreeBSD.org/en/books/handbook/mac/ .Re .Sh HISTORY The diff --git a/share/man/man7/release.7 b/share/man/man7/release.7 index 548ba540f6c0..78cac0dde34e 100644 --- a/share/man/man7/release.7 +++ b/share/man/man7/release.7 @@ -719,11 +719,11 @@ variable in .Xr sysctl 8 .Rs .%T "FreeBSD Release Engineering" -.%U https://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/freebsd-releng/ +.%U https://docs.freebsd.org/en/articles/freebsd-releng/ .Re .Rs .%T "FreeBSD Developers' Handbook" -.%U https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/developers-handbook/ +.%U https://docs.freebsd.org/en/books/developers-handbook/ .Re .Sh HISTORY .Fx diff --git a/share/man/man9/mac.9 b/share/man/man9/mac.9 index d5be03949e9b..661c46569bc0 100644 --- a/share/man/man9/mac.9 +++ b/share/man/man9/mac.9 @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 25, 2015 +.Dd May 20, 2021 .Dt MAC 9 .Os .Sh NAME @@ -155,7 +155,7 @@ for information on the MAC Framework APIs. .Xr VFS 9 .Rs .%T "The FreeBSD Architecture Handbook" -.%U "https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/arch-handbook/" +.%U "https://docs.freebsd.org/en/books/arch-handbook/" .Re .Sh HISTORY The diff --git a/share/man/man9/pci.9 b/share/man/man9/pci.9 index da7981cc00a5..3c3e54bf8760 100644 --- a/share/man/man9/pci.9 +++ b/share/man/man9/pci.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 15, 2017 +.Dd May 20, 2021 .Dt PCI 9 .Os .Sh NAME @@ -1102,7 +1102,7 @@ is unattached but with valid instance variables. .Rs .%B FreeBSD Developers' Handbook .%T NewBus -.%U https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/developers-handbook/ +.%U https://docs.freebsd.org/en/books/developers-handbook/ .Re .Rs .%A Shanley diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 57254059ca1c..28d2f29a7876 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/amd64/conf/GENERIC-KCSAN b/sys/amd64/conf/GENERIC-KCSAN index f38d695c5aaf..a0970f2a46a4 100644 --- a/sys/amd64/conf/GENERIC-KCSAN +++ b/sys/amd64/conf/GENERIC-KCSAN @@ -12,7 +12,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index b5b821e1f5c6..9af1b14f5733 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -14,7 +14,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/ALPINE b/sys/arm/conf/ALPINE index 7cc93f994813..6937a790a8c6 100644 --- a/sys/arm/conf/ALPINE +++ b/sys/arm/conf/ALPINE @@ -3,7 +3,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/APALIS-IMX6 b/sys/arm/conf/APALIS-IMX6 index fa215f0c0660..5507699f80cd 100644 --- a/sys/arm/conf/APALIS-IMX6 +++ b/sys/arm/conf/APALIS-IMX6 @@ -3,7 +3,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/ARMADAXP b/sys/arm/conf/ARMADAXP index e74fb588df12..e198651e69b3 100644 --- a/sys/arm/conf/ARMADAXP +++ b/sys/arm/conf/ARMADAXP @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/COLIBRI-VF50 b/sys/arm/conf/COLIBRI-VF50 index 3b55affb0ff5..6f3d4b3259c2 100644 --- a/sys/arm/conf/COLIBRI-VF50 +++ b/sys/arm/conf/COLIBRI-VF50 @@ -3,7 +3,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/COSMIC b/sys/arm/conf/COSMIC index efb17ccfe539..047e112fcb58 100644 --- a/sys/arm/conf/COSMIC +++ b/sys/arm/conf/COSMIC @@ -3,7 +3,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/EFIKA_MX b/sys/arm/conf/EFIKA_MX index c81bed74a4f6..b7180da50314 100644 --- a/sys/arm/conf/EFIKA_MX +++ b/sys/arm/conf/EFIKA_MX @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC index d21a45d77c33..be9ebe344d62 100644 --- a/sys/arm/conf/GENERIC +++ b/sys/arm/conf/GENERIC @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/IMX53 b/sys/arm/conf/IMX53 index 420478e42a17..b482e561226e 100644 --- a/sys/arm/conf/IMX53 +++ b/sys/arm/conf/IMX53 @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/IMX6 b/sys/arm/conf/IMX6 index 5ef7149bc72a..6fe75f75b1ec 100644 --- a/sys/arm/conf/IMX6 +++ b/sys/arm/conf/IMX6 @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/JETSON-TK1 b/sys/arm/conf/JETSON-TK1 index 06f753850e2a..bc57d67e59ad 100644 --- a/sys/arm/conf/JETSON-TK1 +++ b/sys/arm/conf/JETSON-TK1 @@ -3,7 +3,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/QUARTZ b/sys/arm/conf/QUARTZ index 85dcf42ad968..2b247be5defa 100644 --- a/sys/arm/conf/QUARTZ +++ b/sys/arm/conf/QUARTZ @@ -3,7 +3,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/RPI-B b/sys/arm/conf/RPI-B index a03f7af6c6ef..3f2b9eba510b 100644 --- a/sys/arm/conf/RPI-B +++ b/sys/arm/conf/RPI-B @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/SOCDK b/sys/arm/conf/SOCDK index 40776eb0b807..c0804a2c13e5 100644 --- a/sys/arm/conf/SOCDK +++ b/sys/arm/conf/SOCDK @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/SOCFPGA b/sys/arm/conf/SOCFPGA index 7c7229a461a4..9fbd21b6e6ef 100644 --- a/sys/arm/conf/SOCFPGA +++ b/sys/arm/conf/SOCFPGA @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/SOCKIT b/sys/arm/conf/SOCKIT index 423e633a724b..0dc59480aff5 100644 --- a/sys/arm/conf/SOCKIT +++ b/sys/arm/conf/SOCKIT @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/SOCKIT-BERI b/sys/arm/conf/SOCKIT-BERI index 776f9cb4b32d..e85d1b13e817 100644 --- a/sys/arm/conf/SOCKIT-BERI +++ b/sys/arm/conf/SOCKIT-BERI @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/TEGRA124 b/sys/arm/conf/TEGRA124 index c800746fb45c..dc733facc39b 100644 --- a/sys/arm/conf/TEGRA124 +++ b/sys/arm/conf/TEGRA124 @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/VERSATILEPB b/sys/arm/conf/VERSATILEPB index c51e7768c2fb..0e24b2472583 100644 --- a/sys/arm/conf/VERSATILEPB +++ b/sys/arm/conf/VERSATILEPB @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/VYBRID b/sys/arm/conf/VYBRID index 026600440247..bee77fcb6559 100644 --- a/sys/arm/conf/VYBRID +++ b/sys/arm/conf/VYBRID @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm/conf/ZEDBOARD b/sys/arm/conf/ZEDBOARD index de3a55909694..29f28a0cbf35 100644 --- a/sys/arm/conf/ZEDBOARD +++ b/sys/arm/conf/ZEDBOARD @@ -5,7 +5,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm64/conf/GENERIC b/sys/arm64/conf/GENERIC index a1fa345d4918..41f9ee5ae311 100644 --- a/sys/arm64/conf/GENERIC +++ b/sys/arm64/conf/GENERIC @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/arm64/conf/GENERIC-UP b/sys/arm64/conf/GENERIC-UP index 76d73fae89c0..f99a4ce4ddc9 100644 --- a/sys/arm64/conf/GENERIC-UP +++ b/sys/arm64/conf/GENERIC-UP @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/contrib/zstd/FREEBSD-upgrade b/sys/contrib/zstd/FREEBSD-upgrade index dfcad88572b2..fb46da059004 100644 --- a/sys/contrib/zstd/FREEBSD-upgrade +++ b/sys/contrib/zstd/FREEBSD-upgrade @@ -11,4 +11,4 @@ we don't want. Please find instructions for importing new releases and merging to HEAD here: -https://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/subversion-primer.html#idp45937784 +https://docs.freebsd.org/en/articles/committers-guide/#vendor-import-git diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index d8ebd111cd1d..5f3824a9b611 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/i386/conf/MINIMAL b/sys/i386/conf/MINIMAL index ff41e634b048..a5103dcf559b 100644 --- a/sys/i386/conf/MINIMAL +++ b/sys/i386/conf/MINIMAL @@ -18,7 +18,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/mips/conf/ERL b/sys/mips/conf/ERL index 28db1ea23326..fa468ae1a1ac 100644 --- a/sys/mips/conf/ERL +++ b/sys/mips/conf/ERL @@ -5,7 +5,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/mips/conf/OCTEON1 b/sys/mips/conf/OCTEON1 index e7a5ee3552d6..8ef8c7ac613b 100644 --- a/sys/mips/conf/OCTEON1 +++ b/sys/mips/conf/OCTEON1 @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/mips/conf/XLP64 b/sys/mips/conf/XLP64 index 883f2856dc54..140faaae647b 100644 --- a/sys/mips/conf/XLP64 +++ b/sys/mips/conf/XLP64 @@ -3,7 +3,7 @@ # For more information on this file, please read the handbook section on # Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/mips/conf/XLPN32 b/sys/mips/conf/XLPN32 index c8380df242d1..58eabe500ba8 100644 --- a/sys/mips/conf/XLPN32 +++ b/sys/mips/conf/XLPN32 @@ -3,7 +3,7 @@ # For more information on this file, please read the handbook section on # Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC index bf7423488bc2..95fdc72571a3 100644 --- a/sys/powerpc/conf/GENERIC +++ b/sys/powerpc/conf/GENERIC @@ -4,7 +4,7 @@ # For more information on this file, please read the handbook section on # Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64 index 672aa92b4cc0..0bce690358a8 100644 --- a/sys/powerpc/conf/GENERIC64 +++ b/sys/powerpc/conf/GENERIC64 @@ -4,7 +4,7 @@ # For more information on this file, please read the handbook section on # Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE index c43e644594ea..34751066f356 100644 --- a/sys/powerpc/conf/GENERIC64LE +++ b/sys/powerpc/conf/GENERIC64LE @@ -4,7 +4,7 @@ # For more information on this file, please read the handbook section on # Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index a4824ae3a02f..db6ae4b5b1a3 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -4,7 +4,7 @@ # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # -# https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-config # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the diff --git a/usr.bin/fortune/datfiles/freebsd-tips b/usr.bin/fortune/datfiles/freebsd-tips index d1edb8688f23..489926778233 100644 --- a/usr.bin/fortune/datfiles/freebsd-tips +++ b/usr.bin/fortune/datfiles/freebsd-tips @@ -64,8 +64,7 @@ If you need a reminder to leave your terminal, type "leave +hhmm" where % If you need to ask a question on the FreeBSD-questions mailing list then - https://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/\ - freebsd-questions/index.html + https://docs.freebsd.org/en/articles/freebsd-questions contains lots of useful advice to help you get the best results. % diff --git a/usr.sbin/lpr/lpd/printcap b/usr.sbin/lpr/lpd/printcap index 96eb0fccff0e..193f872763ab 100644 --- a/usr.sbin/lpr/lpd/printcap +++ b/usr.sbin/lpr/lpd/printcap @@ -21,7 +21,7 @@ # # Do also refer to the "printing" section of the handbook. # -# https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/printing.html +# https://docs.freebsd.org/en/books/handbook/printing/ # # A local copy can be found under # diff --git a/usr.sbin/mergemaster/mergemaster.8 b/usr.sbin/mergemaster/mergemaster.8 index 203fdf474518..695f1bba3474 100644 --- a/usr.sbin/mergemaster/mergemaster.8 +++ b/usr.sbin/mergemaster/mergemaster.8 @@ -467,9 +467,8 @@ comparison, use: .Pp .Pa /usr/src/etc/Makefile .Rs -.%U https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html -.%T The Cutting Edge (using make world) -.%A Nik Clayton +.%U https://docs.freebsd.org/en/books/handbook/cutting-edge/#makeworld +.%T The FreeBSD Handbook .Re .Sh HISTORY The diff --git a/usr.sbin/ppp/ppp.8 b/usr.sbin/ppp/ppp.8 index 9c7a7bc69519..ff7d0d3dea7b 100644 --- a/usr.sbin/ppp/ppp.8 +++ b/usr.sbin/ppp/ppp.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 11, 2020 +.Dd May 20, 2021 .Dt PPP 8 .Os .Sh NAME @@ -5958,12 +5958,10 @@ and .Dq show ?\& to get online information about what is available. .It -The following URLs contain useful information: +The following URL contains useful information: .Bl -bullet -compact .It -https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/faq/ppp.html -.It -https://www.FreeBSD.org/doc/handbook/userppp.html +https://docs.freebsd.org/en/books/handbook/ppp-and-slip/ .El .El .Sh FILES From nobody Wed Jan 10 06:10:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T8y801yXZz562N6; Wed, 10 Jan 2024 06:10: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 4T8y8004KGz4b78; Wed, 10 Jan 2024 06:10:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704867008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tr+tS2HsY3pDhAWOl0/9mkvUTMpRaUyeDk1dah0ZkfQ=; b=KupuUMAvD1RIfn4i1QLStuIeULAwwqZzupU3CousAhsdMz1YumJxu/x67gD1kpTQgzrQnP yre1Td48gI2SWb3obZ+OEU2i9V/qmA08zxNnRaDOGT/5kCClgYn9Y3VUnROD7ZRQXOH2YO qdsVXSB6z3MjqamiUU/xf/CFOP348FTUojPpU8f91JEG1+nM8wCnsMTAv9ityKzaY8yNdh AmCj9GiIPMGMzh0RUn1CqWF8eXs/OdOIlHs+T71w7kCAafdXBfPvJiibIFewq4nE1r8ujJ hxyVZi3PMp6d4iZOGfqPA0rqwPlYC/Tixem4wkllCnvxz57iO04FWhAq7ExMAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704867008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tr+tS2HsY3pDhAWOl0/9mkvUTMpRaUyeDk1dah0ZkfQ=; b=s6TDMls1Viqc9HQUsy8m0QJT3e/pE5Sv/vNcb8aPB9jm2Br8j65qujmazAg4mxM4gA9uh4 VmfZFuYQop+rfT73WFYV8HU1/EHcNbzwPOZxe76JZWZYHGpo4/GXu8c7fXJMSLjTMIIUot eFmB6NkG8AFTGwwD1jkNZ7TjVZIaSi3/zi2SJGdsBCUk2Y9yBVSa5ziVzwrZFG6fURFKKm z0m+qdSqJSnYoqpCkULueGlG7MXX9He9NjOCUrtmSbhN58Fl0jas0kpLHlyDX7fRxiXm5D fTXw02QFYCxT5ip2/9tVLfE1LDmTkp1K8vV1TDLv2p5zbWKKXVbqIv0IWKP1Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704867008; a=rsa-sha256; cv=none; b=QzlrzE0rrizttBzoZHCtSYWcfq41Ey9Z4675XGDYrLIXbl9FpPwfTicoLNYj1Sr4xwuphk 9I95wSqTqdEC790uLZpes6FXdxL87ksX1mL8WmWRZc2y7fKdO/W3HTVwqhA1HWJo38P1Me R5GyjPVZfyMVaXt/isSZLANv1zwt2h9OfLYMb0z3ZMx7fck+RHVsoyUkvo1LuqIW7v8u22 d5aYekxScalrY9OvMsv2EHoVqMWSb28UXJ11gHeWtC3WnEIZ43gy3FUw104sxGMMsKmV6/ doA4uBwBrDO2S/pCOtHP2t0162TH9GxREpzF1XglbLfaKWTRm4sMNJR7UkDJZg== 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 4T8y7z6Gq0zNZY; Wed, 10 Jan 2024 06:10: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 40A6A7OF012215; Wed, 10 Jan 2024 06:10:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40A6A7te012210; Wed, 10 Jan 2024 06:10:07 GMT (envelope-from git) Date: Wed, 10 Jan 2024 06:10:07 GMT Message-Id: <202401100610.40A6A7te012210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "David E. O'Brien" Subject: git: dafd0d685531 - main - History for arc4random_*() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obrien X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dafd0d685531e8bc42d51b2128c287137791894b Auto-Submitted: auto-generated The branch main has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=dafd0d685531e8bc42d51b2128c287137791894b commit dafd0d685531e8bc42d51b2128c287137791894b Author: David E. O'Brien AuthorDate: 2024-01-06 06:01:00 +0000 Commit: David E. O'Brien CommitDate: 2024-01-10 06:09:47 +0000 History for arc4random_*() --- lib/libc/gen/arc4random.3 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/libc/gen/arc4random.3 b/lib/libc/gen/arc4random.3 index 62b62e883e9c..1d5b3b9f43cb 100644 --- a/lib/libc/gen/arc4random.3 +++ b/lib/libc/gen/arc4random.3 @@ -132,6 +132,17 @@ functions using .Sh HISTORY These functions first appeared in .Ox 2.1 . +.Fn arc4random +first appeared in +.Fx 3.0 . +.Fn arc4random_buf +and +.Fn arc4random_uniform +first appeared in +.Fx 8.0 . +.Fn arc4random_stir +was removed in +.Fx 12.0 . .Pp The original version of this random number generator used the RC4 (also known as ARC4) algorithm. From nobody Wed Jan 10 07:45:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T90GH5p9Jz56K80; Wed, 10 Jan 2024 07:45: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 4T90GH3zxKz4rdF; Wed, 10 Jan 2024 07:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704872743; h=from:from:reply-to:subject:subject: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+pzVczgbZUOMvXRsv3VD0y2ndvSIN1nCv4DWL3CClM=; b=HP+4dyv0EiK/TFzAuIOk/MDJ1VgqBqvxoA+dIRFxJ2hEyieRZt6KIIb9cTUcjMzdF7D+T9 yCpGHpRok2zEhpGWmN03g9V4SIG8qIcPpFpG6Rd6qdeuF9Ik1Kl+/fYQfC6z+q5JsLtOTI 0eYcsBVDGP7J6DmEVYUytJ0sH4npf2w4h8hiyrCwRiGJ8RI+K01GP8mDB3n7xmlOsSlLL+ NETT44W7aKuNIuhxWzhjLXm0SB/IZq3FlRD/+w4Ovw4I1HQomr2BrSiFwd6794q1yUpjey URRz4fBpeXI/PKBpE71FVXmEvJ1k/RnbTVeG/VGU1STCySH/gSTLowXAdav44Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704872743; h=from:from:reply-to:subject:subject: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+pzVczgbZUOMvXRsv3VD0y2ndvSIN1nCv4DWL3CClM=; b=jEdLLveWlshfX2PRZIeLRlLoU79jcteobKGOq+9dmgIkTLwXAz3VR13ojHznOGCV4Ewu/c D53GgZMdq57OLg+qqrtQ/7KZIvbKr0gW/tUCjZAHyDxeS6NefmP4v5knwsSGlWXoIK1eFf iZNl01DomGCpjEawvPdGQy/li7ru8N2eZ4kGspNk1r908n+snCOaFW3zT0E7q/FMRH9shC eLITW4PWxAzOQH2bGhzawLZJL3qsMnxyS1y+WHHewYi0B6Bbf2qEmU3nBXr/xiIo4VjMaE nVFog5dF3k+hSAadiH7CgYQeljvNbRStb5yIfkDpgf4O8+QmpE7HAcp63LwWBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704872743; a=rsa-sha256; cv=none; b=Dk/cDYrNQkon6dRN31m2JuZ+9QJLSWdiqe3f16VlATOAMejsVy+8phiXfVhP2FXXHbvmzA QrXVnORLzs/6DkqZzXE6QuXewRKyfbn5myjlk87WEaWi6wuRXX8Xnso27MazV2+QsjRaWT OpBBeBiG+w+zn/pD+WjBKXxWA5wxRLAcEiLsG004qOexcQ+9AS2WFpchPuMCQRjJ5s4eTD 40GNzYfjDq6xBfyyLn2tJ2Ra4w4z5AwgaUklEJ/ymfURv0LuIgnlH7pO3X94DWtTMEGNVh FdP9vEgeISD60hLoHq//YjhvxlkMlnRPsDN0OQWmiBzVdJfxRZK00XyLLoggAA== 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 4T90GH34VvzR0Z; Wed, 10 Jan 2024 07:45: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 40A7jhob075354; Wed, 10 Jan 2024 07:45:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40A7jhDe075351; Wed, 10 Jan 2024 07:45:43 GMT (envelope-from git) Date: Wed, 10 Jan 2024 07:45:43 GMT Message-Id: <202401100745.40A7jhDe075351@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 13720136fbf9 - main - tcpsso: fix when used without -i option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 13720136fbf951a7b472ce086c9cf2de702799ab Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=13720136fbf951a7b472ce086c9cf2de702799ab commit 13720136fbf951a7b472ce086c9cf2de702799ab Author: Michael Tuexen AuthorDate: 2024-01-10 07:33:09 +0000 Commit: Michael Tuexen CommitDate: 2024-01-10 07:33:09 +0000 tcpsso: fix when used without -i option Since fdb987bebddf it is not possible anymore to use inp_next iterator for bound, but unconnected sockets. This applies to TCP listening sockets. Therefore the metioned commit broke tcpsso on listening sockets if the -i option was not used. Fix this by iterating through all endpoints instead of only through the bound, but unconnected ones. Reviewed by: markj Fixes: fdb987bebddf ("inpcb: Split PCB hash tables") Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D43353 --- sys/netinet/in_pcb.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index fa0d7309058e..981654577deb 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2950,25 +2950,22 @@ sysctl_setsockopt(SYSCTL_HANDLER_ARGS, struct inpcbinfo *pcbinfo, htons(params->sop_inc.inc6_zoneid & 0xffff); } #endif - if (params->sop_inc.inc_lport != htons(0)) { - if (params->sop_inc.inc_fport == htons(0)) - inpi.hash = INP_PCBHASH_WILD(params->sop_inc.inc_lport, + if (params->sop_inc.inc_lport != htons(0) && + params->sop_inc.inc_fport != htons(0)) { +#ifdef INET6 + if (params->sop_inc.inc_flags & INC_ISIPV6) + inpi.hash = INP6_PCBHASH( + ¶ms->sop_inc.inc6_faddr, + params->sop_inc.inc_lport, + params->sop_inc.inc_fport, pcbinfo->ipi_hashmask); else -#ifdef INET6 - if (params->sop_inc.inc_flags & INC_ISIPV6) - inpi.hash = INP6_PCBHASH( - ¶ms->sop_inc.inc6_faddr, - params->sop_inc.inc_lport, - params->sop_inc.inc_fport, - pcbinfo->ipi_hashmask); - else #endif - inpi.hash = INP_PCBHASH( - ¶ms->sop_inc.inc_faddr, - params->sop_inc.inc_lport, - params->sop_inc.inc_fport, - pcbinfo->ipi_hashmask); + inpi.hash = INP_PCBHASH( + ¶ms->sop_inc.inc_faddr, + params->sop_inc.inc_lport, + params->sop_inc.inc_fport, + pcbinfo->ipi_hashmask); } while ((inp = inp_next(&inpi)) != NULL) if (inp->inp_gencnt == params->sop_id) { From nobody Wed Jan 10 08:07:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T90lD3qBLz56Nhh for ; Wed, 10 Jan 2024 08:07:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T90lD13kfz4vLY; Wed, 10 Jan 2024 08:07:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704874040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nS2mZKhA5r4ilYqBNfC3xWVF1Sn0jpb6rvtAi36Nabw=; b=MX2eudWw/P3wiqQw6pL3QSo0kq1y0+bEcIyCQwnD1NxUf1Im3Q2+Vf1eA7No1Qx2876G9J /qpyKvtMA6rOKVpOlUEf/BvGJuXo5zZ8m70OtpeYy0gM7gDQvBiCZMGhD8FR44R+DjnRot DaQwL88QXVHGNBiaQBo7jetDd8TX+24QWYnIBoOuNFZcAN1Uue9ZRNb9HGE2F6+Gei7vnL /kjVAeMtuwPbj5X+wJUt4jz7TlHFqst3orf8RXqiMuNtrSmNpE4lsxJBpX4vgqI8f/hI2y aPL02M3eikylyCsXdb3lmbFed6dSvggFZ9hD79+1q5Avt7JS9R1YuZJHvO4VSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704874040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nS2mZKhA5r4ilYqBNfC3xWVF1Sn0jpb6rvtAi36Nabw=; b=vlYOTpMXdxHVIGw2R9uu6XKuPWFvv02s3gEc2st+uKGnfTlM5ol7ULIeM60kivWb8m7YSd sx6et6drbl6n5wCub2SEMkB3hxc/a1ZGCUkx+9N3couPhs2BxHAjLUTamGWq9wZ808X0MW IoQh6dyBke6A2S31sGAlyeAVwGp4f2WIoL9A9dSdc3ALaAY9JjnmGPy/p+/EMHHYVCiCuW iiFf9BeBl+LueKu6p+RHVhoYoqxPGCn172ExA3T5Isf/obYg2e0W37drjHyZBInjNAe3pX Wq49DnIqP/FyGatEudlf0Ii8rCzlMxTaMIajS1/Zre7+A2Ue0bKSvr96sYIuSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704874040; a=rsa-sha256; cv=none; b=o4iUGWWaxC3mK8O9l02Ww9FVIrudhN7SabdAROOcIhrGpli0HUp980eP+h9Bbdl20G63jW tDn6sDQmZ0NFpzEXS56xyd6EGaqBt8I+Ie7l54WL9hDoFIErVQ1J0Si+rdSa6+NdNW3Zsi AAav+CmiOh8Oiclmc4Rj6rV8E42PK0sRYUNzjDRwuUTsKTSrLxaBpKQcf/uVs1GSxA5ipg zHhkLsSWmrJl1Esgpo6AOCSRGIIhkjhIRc9snbOBQczkVKwzK9ZjiLVKmOMS+dCqy7eSjh z+4TiKfCe/taEaem3DVvlwAFXOQP4x+XEDOyDSw18VrWTChPSNwAuJdZJ8Qgxw== 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 4T90lC75VgzS0p; Wed, 10 Jan 2024 08:07: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 40A87J6l009791; Wed, 10 Jan 2024 08:07:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40A87J3j009790; Wed, 10 Jan 2024 08:07:19 GMT (envelope-from git) Date: Wed, 10 Jan 2024 08:07:19 GMT Message-Id: <202401100807.40A87J3j009790@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 07e95b4670dc..a382e21194c1 - vendor/openzfs/master - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/vendor/openzfs/master X-Git-Reftype: branch X-Git-Commit: a382e21194c1690951d2eee8ebd98bc096f01c83 X-Git-Oldrev: 07e95b4670dc421ec726a2b4efa97a22fe572005 X-Git-Newrev: a382e21194c1690951d2eee8ebd98bc096f01c83 Auto-Submitted: auto-generated The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=07e95b4670dc..a382e21194c1 7b89149c9f12 Linux 6.2 compat: add check for kernel_neon_* availability 9e0d12e3100a ZIL: Update Linux tracing after #15635 bd3f90c0c1db zpoolprops.7: Remove unnecessary .Ns 7ecaa0758005 make zdb_decompress_block check decompression reliably 255741fc9755 Improve block sizes checks during cloning e78aca3b332d Fix livelist assertions for dedup and cloning a382e21194c1 Add Gotify notification support to ZED From nobody Wed Jan 10 08:48:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T91fQ5K7Yz56Vjr; Wed, 10 Jan 2024 08:48: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 4T91fQ2sXlz421h; Wed, 10 Jan 2024 08:48:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704876494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+aZ/ZWPUKpFpXE5EFkV5MPSN6HPoURuiHEO0lUGH8Os=; b=gFVLfqAv1YEB0hIsdFi66MSQA+EqdXerLk/PyvhvhstNOE8A20Unp3iKQvEUn7NVuWLJso I2L/apuB9DyTJDLTzPCCSu9QLvJHAA6Uw+gXwJ7NjTUmMQgYCAoAp2FGcoXhnxYSobnrjq k2ytlOs5g8rqOggbwCH7RLzVnUrQvlXd9dAv4ehOkdyvRUXYpOPj9UjJUkbEMW4vLwQ1Ku /PMEQn3ne6YquY7I9foPcB5LmjbdQpMDSloVnKbgANGTSv6z/wOqZqgAAT4h7KDMhI3OEa ywqDrC2+nEGAp0+k7I7wu7OTgjGpLjSc5nAFdR03fmoXsGojbsa15XHuoGgpxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704876494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+aZ/ZWPUKpFpXE5EFkV5MPSN6HPoURuiHEO0lUGH8Os=; b=sVIInBmqIwVrOKVUMWY5pNSxXHqIFjl6fHUtChd+h5jePGRIDfE5541DOo+A2LWv4c7RUg gulToHHeBubFW1rV/Kd5VATGJxjeW6u2rh2/eWYkJQVsKZmmyhDjeilyeFwOz54YJQ/7hE Lg/d6IGF6kWKZjn4cR8p9cIbeXzSLeLGntTH+RqQC0NBlVBVNISqyTTPHWSk4I4ZplNHHf VaZ2rj+BnBK1D6trAvMAj7QyXih5KxGY8eDIQhuxSDjAQhF4HHzwGB3XTV8TfKxs4noofh hrK/JLS+BdJ3C/fg/eFswkHsYpeKwmTf0R/+lUhJSS+NGg4PXkBbPkT12GACvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704876494; a=rsa-sha256; cv=none; b=PH5AF6MOWmlg1qY9Ng39nt+Pa/9pDIrqdtk6QEMc4IEakbRA06DL8FLTB9abt7YQ7OOzVo eKtu6D4ZFkAPrcz2gpOskZ71eCaNa2U05F5nBpk4Crof2Us2EeykoeXuyCQO3ce7cgMh1L pV65kWi95M69E/t5d153C4Z0Zg23MdIlR0EbatwmqLC3CmapxjQOzRcQseEnqHxhLkKKJW IV345HilUIB+cGfUTwfNKu+V0aYLDKWolmpOu/RWj8d/4+Kxme8TKwPWdMHIXbGeCZAKqg F0ttvFVqwaCcezFRwgPFOu/lwCuNUg9g9FaYge5ZTnMVdIKhqkDziZcy0x7O6A== 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 4T91fQ10M4zSQx; Wed, 10 Jan 2024 08:48: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 40A8mE0G077051; Wed, 10 Jan 2024 08:48:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40A8mDMI077044; Wed, 10 Jan 2024 08:48:13 GMT (envelope-from git) Date: Wed, 10 Jan 2024 08:48:13 GMT Message-Id: <202401100848.40A8mDMI077044@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: f552d7adebb1 - main - zfs: merge openzfs/zfs@a382e2119 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: f552d7adebb13e24f65276a6c4822bffeeac3993 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=f552d7adebb13e24f65276a6c4822bffeeac3993 commit f552d7adebb13e24f65276a6c4822bffeeac3993 Merge: 13720136fbf9 a382e21194c1 Author: Martin Matuska AuthorDate: 2024-01-10 08:07:45 +0000 Commit: Martin Matuska CommitDate: 2024-01-10 08:18:25 +0000 zfs: merge openzfs/zfs@a382e2119 Notable upstream pull request merges: #15693 a382e2119 Add Gotify notification support to ZED #15732 e78aca3b3 Fix livelist assertions for dedup and cloning #15733 7ecaa0758 make zdb_decompress_block check decompression reliably #15735 255741fc9 Improve block sizes checks during cloning Obtained from: OpenZFS OpenZFS commit: a382e21194c1690951d2eee8ebd98bc096f01c83 sys/contrib/openzfs/cmd/zdb/zdb.c | 11 ++- sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh | 95 ++++++++++++++++++++++ sys/contrib/openzfs/cmd/zed/zed.d/zed.rc | 21 +++++ sys/contrib/openzfs/config/kernel-fpu.m4 | 23 +++++- .../include/os/linux/kernel/linux/simd_aarch64.h | 6 ++ .../include/os/linux/kernel/linux/simd_arm.h | 6 ++ .../openzfs/include/os/linux/zfs/sys/trace_zil.h | 14 +++- sys/contrib/openzfs/man/man7/zpoolprops.7 | 4 +- sys/contrib/openzfs/module/zfs/dsl_deadlist.c | 31 ++++--- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 31 +++++-- sys/modules/zfs/zfs_config.h | 28 ++++++- sys/modules/zfs/zfs_gitrev.h | 2 +- 12 files changed, 233 insertions(+), 39 deletions(-) diff --cc sys/modules/zfs/zfs_config.h index f6b8ad1fc472,000000000000..bd060bc882c9 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1152 -1,0 +1,1176 @@@ +/* + */ + +/* 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 */ + +/* Define to 1 if you have the `execvpe' function. */ +/* #undef HAVE_EXECVPE */ + +/* 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_atime() exists in linux/fs.h */ ++/* #undef HAVE_INODE_GET_ATIME */ ++ +/* inode_get_ctime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_CTIME */ + ++/* inode_get_mtime() exists in linux/fs.h */ ++/* #undef HAVE_INODE_GET_MTIME */ ++ +/* 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_atime_to_ts() exists in linux/fs.h */ ++/* #undef HAVE_INODE_SET_ATIME_TO_TS */ ++ +/* 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_set_mtime_to_ts() exists in linux/fs.h */ ++/* #undef HAVE_INODE_SET_MTIME_TO_TS */ ++ +/* 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 has kernel_neon_* functions */ ++/* #undef HAVE_KERNEL_NEON */ ++ +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* kernel_read() take loff_t pointer */ +/* #undef HAVE_KERNEL_READ_PPOS */ + +/* timer_list.function gets a timer_list */ +/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */ + +/* struct timer_list has a flags member */ +/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */ + +/* timer_setup() is available */ +/* #undef HAVE_KERNEL_TIMER_SETUP */ + +/* kernel_write() take loff_t pointer */ +/* #undef HAVE_KERNEL_WRITE_PPOS */ + +/* kmem_cache_create_usercopy() exists */ +/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */ + +/* kstrtoul() exists */ +/* #undef HAVE_KSTRTOUL */ + +/* ktime_get_coarse_real_ts64() exists */ +/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */ + +/* ktime_get_raw_ts64() exists */ +/* #undef HAVE_KTIME_GET_RAW_TS64 */ + +/* kvmalloc exists */ +/* #undef HAVE_KVMALLOC */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* linux/blk-cgroup.h exists */ +/* #undef HAVE_LINUX_BLK_CGROUP_HEADER */ + +/* lseek_execute() is available */ +/* #undef HAVE_LSEEK_EXECUTE */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Noting that make_request_fn() returns void */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */ + +/* iops->mkdir() takes umode_t */ +/* #undef HAVE_MKDIR_UMODE_T */ + +/* Define to 1 if you have the `mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* lookup_bdev() wants mode arg */ +/* #undef HAVE_MODE_LOOKUP_BDEV */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* new_sync_read()/new_sync_write() are available */ +/* #undef HAVE_NEW_SYNC_READ */ + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* percpu_counter_add_batch() is defined */ +/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */ + +/* percpu_counter_init() wants gfp_t */ +/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */ + +/* posix_acl_chmod() exists */ +/* #undef HAVE_POSIX_ACL_CHMOD */ + +/* posix_acl_from_xattr() needs user_ns */ +/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */ + +/* posix_acl_release() is available */ +/* #undef HAVE_POSIX_ACL_RELEASE */ + +/* posix_acl_release() is GPL-only */ +/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */ + +/* posix_acl_valid() wants user namespace */ +/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* iops->put_link() cookie */ +/* #undef HAVE_PUT_LINK_COOKIE */ + +/* iops->put_link() delayed */ +/* #undef HAVE_PUT_LINK_DELAYED */ + +/* iops->put_link() nameidata */ +/* #undef HAVE_PUT_LINK_NAMEIDATA */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename2() exists */ +/* #undef HAVE_RENAME2 */ + +/* struct inode_operations_wrapper takes .rename2() */ +/* #undef HAVE_RENAME2_OPERATIONS_WRAPPER */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* REQ_DISCARD is defined */ +/* #undef HAVE_REQ_DISCARD */ + +/* REQ_FLUSH is defined */ +/* #undef HAVE_REQ_FLUSH */ + +/* REQ_OP_DISCARD is defined */ +/* #undef HAVE_REQ_OP_DISCARD */ + +/* REQ_OP_FLUSH is defined */ +/* #undef HAVE_REQ_OP_FLUSH */ + +/* REQ_OP_SECURE_ERASE is defined */ +/* #undef HAVE_REQ_OP_SECURE_ERASE */ + +/* REQ_PREFLUSH is defined */ +/* #undef HAVE_REQ_PREFLUSH */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* struct rw_semaphore has member activity */ +/* #undef HAVE_RWSEM_ACTIVITY */ + +/* struct rw_semaphore has atomic_long_t member count */ +/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */ + +/* linux/sched/signal.h exists */ +/* #undef HAVE_SCHED_SIGNAL_HEADER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() exists, takes 3 args */ +/* #undef HAVE_SET_ACL */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* set_cached_acl() is usable */ +/* #undef HAVE_SET_CACHED_ACL_USABLE */ + +/* set_special_state() exists */ +/* #undef HAVE_SET_SPECIAL_STATE */ + ++/* shrinker_register exists */ ++/* #undef HAVE_SHRINKER_REGISTER */ ++ +/* struct shrink_control exists */ +/* #undef HAVE_SHRINK_CONTROL_STRUCT */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* signal_stop() exists */ +/* #undef HAVE_SIGNAL_STOP */ + +/* new shrinker callback wants 2 args */ +/* #undef HAVE_SINGLE_SHRINKER_CALLBACK */ + +/* cs->count_objects exists */ +/* #undef HAVE_SPLIT_SHRINKER_CALLBACK */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + ++/* have super_block s_shrink */ ++/* #undef HAVE_SUPER_BLOCK_S_SHRINK */ ++ ++/* have super_block s_shrink pointer */ ++/* #undef HAVE_SUPER_BLOCK_S_SHRINK_PTR */ ++ +/* super_setup_bdi_name() exits */ +/* #undef HAVE_SUPER_SETUP_BDI_NAME */ + +/* super_block->s_user_ns exists */ +/* #undef HAVE_SUPER_USER_NS */ + +/* sync_blockdev() is declared in include/blkdev.h */ +/* #undef HAVE_SYNC_BLOCKDEV */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* i_op->tmpfile() exists */ +/* #undef HAVE_TMPFILE */ + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the `udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +/* user_namespace->ns.inum exists */ +/* #undef HAVE_USER_NS_COMMON_INUM */ + +/* iops->getattr() takes a vfsmount */ +/* #undef HAVE_VFSMOUNT_IOPS_GETATTR */ + +/* fops->clone_file_range() is available */ +/* #undef HAVE_VFS_CLONE_FILE_RANGE */ + +/* fops->copy_file_range() is available */ +/* #undef HAVE_VFS_COPY_FILE_RANGE */ + +/* fops->dedupe_file_range() is available */ +/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */ + +/* aops->direct_IO() uses iovec */ +/* #undef HAVE_VFS_DIRECT_IO_IOVEC */ + +/* aops->direct_IO() uses iov_iter without rw */ +/* #undef HAVE_VFS_DIRECT_IO_ITER */ + +/* aops->direct_IO() uses iov_iter with offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_OFFSET */ + +/* aops->direct_IO() uses iov_iter with rw and offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET */ + +/* filemap_dirty_folio exists */ +/* #undef HAVE_VFS_FILEMAP_DIRTY_FOLIO */ + +/* file_operations_extend takes .copy_file_range() and .clone_file_range() */ *** 241 LINES SKIPPED *** From nobody Wed Jan 10 11:51:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T95jc64gmz56lmR; Wed, 10 Jan 2024 11:51: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 4T95jc5cJMz4SB4; Wed, 10 Jan 2024 11:51:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704887476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3rICxalQZWJ8I8xyyAn2oI+gsyjsJwGogwrvA0Sii/0=; b=pyzj+IUU4l+WVpGsrDzyNLPndAWRsdUaMOGm87pMv923OVLrzPd8rAJrl61rt3vRv0/nxm r+SG0KIyH/AcDoX5+3c8fBudWtPLjN6YAZZxmfMM+HUhTFIGBqGw4Ps1rWL/HtOco6wDhT Z9wu9jTbSwa3eCeGxCKcowCyFrecJAvUqBAeJ74P9dvzg4yTqd482JDyp2+afH/gsNvP9P c2MDyenZurpQ2J2DuuV/Y/hxpGMFAIfg7lX3Mnwqa04EjHipVL9ZfPx5KV/KROBg/I428h 2J/pp5gdUExzG7QwhMzeEOI2SdcvGTy0JjS69TH+HFZREj7BRqRF4vy7FwoFcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704887476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3rICxalQZWJ8I8xyyAn2oI+gsyjsJwGogwrvA0Sii/0=; b=kpl6rA+VoDVNp4l9LsvVvgQjFxQ4StM0lF+rBbm2f8e25WifJm8m7oSeYdOM+tpHuMVKxt 8nH8sqPfdWV3PzxrjabtB2IkdUu1UP8l4f/CeTNhzY7idJCd4Sep3N0EsRpVt+cp/rP8tb AyKzQcrkXJ1h21QUufwXdEyMa1Wz8ZDoedRATKit3IhGbezPi5ekEDWC7l2nD3/PeZEGxs T14o3VpDAiejUlti1mv/3ZQBa0Cwe5Xvy18JyvGJkiKkk2KM2iqjysDnQI/GbAIA72dG8k rlN5xlY5QMS7JfXrgUn/Hb4DKJDaaNoJ8JyI513CzMLYF+tXBJX5/wmmtX8+jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704887476; a=rsa-sha256; cv=none; b=l4E2UWr/LEssE+p3MZLCEZC40wun6UQtZShpD7qCFNYbPJafjbKPEUJ4Yy7xrzncm8TcQo wVaW3i5wPry0Vyi8SE3M6EB7YzPMO7a9b1yA/+Ct0JsoVycckMb8qmIJf9XEed6j5dCq1T H2mUXOI8htMX+1NcmxtFIKsGxqO++6GPRrzTBw25+vcdiFdy1/i89ak1zoSeWWZER2LN4Q yjmJpBxxOHbrejUn935epbnb+tPrsaxXACIHRpw6I2LVlpO28+bf6SytKXxiSdjtUQ9a8/ arIEJ8CktgRt4yFGqBKzLJkJuMaf9nH1AWICs4OxiE2HR9C4BqtlHYK76hXMxQ== 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 4T95jc4glPzZZD; Wed, 10 Jan 2024 11:51:16 +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 40ABpG32089034; Wed, 10 Jan 2024 11:51:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ABpG4x089031; Wed, 10 Jan 2024 11:51:16 GMT (envelope-from git) Date: Wed, 10 Jan 2024 11:51:16 GMT Message-Id: <202401101151.40ABpG4x089031@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yoshihiro Takahashi Subject: git: 1fa4ddcc6de6 - main - periodic: Fix periodic reports when log files are not compressed. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nyan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fa4ddcc6de6a0c46416f719a5b7efa1169f51ce Auto-Submitted: auto-generated The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=1fa4ddcc6de6a0c46416f719a5b7efa1169f51ce commit 1fa4ddcc6de6a0c46416f719a5b7efa1169f51ce Author: Yoshihiro Takahashi AuthorDate: 2024-01-10 11:48:56 +0000 Commit: Yoshihiro Takahashi CommitDate: 2024-01-10 11:48:56 +0000 periodic: Fix periodic reports when log files are not compressed. The modern zcat(1) is capable of handling compressed and uncompressed text files, so we can simply use zcat command. PR: 253168 Reviewed by: delphij MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43357 --- usr.sbin/periodic/etc/security/800.loginfail | 7 +------ usr.sbin/periodic/etc/security/900.tcpwrap | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/usr.sbin/periodic/etc/security/800.loginfail b/usr.sbin/periodic/etc/security/800.loginfail index 4329728f9505..c5a3a972aaa1 100755 --- a/usr.sbin/periodic/etc/security/800.loginfail +++ b/usr.sbin/periodic/etc/security/800.loginfail @@ -49,12 +49,7 @@ catmsgs() { sort -t. -r -n -k 2,2 | while read f do - case $f in - *.gz) zcat -f $f;; - *.bz2) bzcat -f $f;; - *.xz) xzcat -f $f;; - *.zst) zstdcat -f $f;; - esac + zcat -f $f done [ -f ${LOG}/auth.log ] && cat $LOG/auth.log } diff --git a/usr.sbin/periodic/etc/security/900.tcpwrap b/usr.sbin/periodic/etc/security/900.tcpwrap index ae081ded6a95..55fa58f4df39 100755 --- a/usr.sbin/periodic/etc/security/900.tcpwrap +++ b/usr.sbin/periodic/etc/security/900.tcpwrap @@ -49,12 +49,7 @@ catmsgs() { sort -t. -r -n -k 2,2 | while read f do - case $f in - *.gz) zcat -f $f;; - *.bz2) bzcat -f $f;; - *.xz) xzcat -f $f;; - *.zst) zstdcat -f $f;; - esac + zcat -f $f done [ -f ${LOG}/messages ] && cat $LOG/messages } From nobody Wed Jan 10 13:50:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T98Ls1XKtz570xX; Wed, 10 Jan 2024 13:50:13 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail2.karels.net (mail2.karels.net [3.19.118.201]) (using TLSv1.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 "freebsd", Issuer "freebsd" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T98Lr6Svlz4lgL; Wed, 10 Jan 2024 13:50:12 +0000 (UTC) (envelope-from mike@karels.net) Authentication-Results: mx1.freebsd.org; none Received: from mail2.karels.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by mail2.karels.net (8.17.1/8.17.1) with ESMTP id 40ADo6rG045777; Wed, 10 Jan 2024 07:50:06 -0600 (CST) (envelope-from mike@karels.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=karels.net; s=mail2; t=1704894606; bh=r59yicVtm8ZWIkZfGFnnm3yQrKXhXrnHessHxH0vAi0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=nQWNyAGQR02AovNR1tPCjxM1px5xgKChqzSSrUfaVBJvfeSrshNgtmMcpcSpsZXt7 u13xD9oF2R8N2t7Q0IB1oRcp+7dD3fqG/SXsEKkOW9iwPbr0A77IKXH3INHLdjqfxD qUvbhZG1qx2VB0G9wB7zWVqA2/9fj9Hg1H974CSLWvvmRv4N+NdwIyv/uYC2H+Dsrb Ca69Rwj0R3riNvWXOenuFYDfGqJTfODtQ0iw34yHBbOIdIlEpzu1dhfRlc1KDEz+mi 91rYTRGwELsHJn3krXX6XxKZaPjJu2xr2TFLZkoCu1BAJ1yn1TTlHysSzYMK5wW9OU ALH+iKrn1otWQ== Received: from [10.0.2.130] ([73.62.165.147]) by mail2.karels.net with ESMTPSA id 8z13Eo6gnmXPsgAAs/W3XQ (envelope-from ); Wed, 10 Jan 2024 07:50:06 -0600 From: Mike Karels To: Xin LI Cc: Xin LI , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2f036705f337 - main - Document the two recent newsyslog(8) change (-c option and configuration option). Date: Wed, 10 Jan 2024 07:50:05 -0600 X-Mailer: MailMate (1.14r6015) Message-ID: In-Reply-To: References: <202312290846.3BT8kOiO029918@gitrepo.freebsd.org> <90D0905E-AA46-4351-AEE0-9ED9D835DB50@karels.net> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4T98Lr6Svlz4lgL X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.16.0.0/14, country:US] On 9 Jan 2024, at 11:54, Xin LI wrote: > Hi, Mike, > > On Fri, Dec 29, 2023 at 7:25 AM Mike Karels wrote: > >> On 29 Dec 2023, at 2:46, Xin LI wrote: >> >>> The branch main has been updated by delphij: >> [...] > >> >>> +61174ad88e33: >>> + newsyslog(8) now supports specifying a global compression method >> directly >>> + at the beginning of the newsyslog.conf file, which will make >> newsyslog(8) >>> + to behave like the corresponding option was passed to the newly >> added >>> + '-c' option. For example: >>> + >>> + none >>> + >>> +906748d208d3: >>> + newsyslog(8) now accepts a new option, '-c' which overrides all >> historical >>> + compression flags by treating their meaning as "treat the file as >> compressible" >>> + rather than "compress the file with that specific method." >>> + >>> + The following choices are available: >>> + * none: Do not compress, regardless of flag. >>> + * legacy: Historical behavior (J=bzip2, X=xz, Y=zstd, Z=gzip). >>> + * bzip2, xz, zstd, gzip: apply the specified compression method. >>> + >>> + We plan to change the default to 'none' in FreeBSD 15.0. >> >> Sorry not to have noticed this in the review; it was only when I saw this >> message that it sunk in that we now have *three* ways to specify >> compression, >> and I'm not even sure what the precedence is. I would have thought that >> > > The current precedence is that command line takes highest priority; when > it's not present, overrides all lines with any compression > method. > > The meaning of J/X/Y/Z is changed to "this file is compressible", unless > newsyslog is in legacy mode. It's intentional to discourage the use of > different compression types for different files (because the current > newsyslog.conf(5) format uses one character to represent compression method > and without a change to e.g. UCL or some other configuration language, > supporting additional compression methods would be much more messier). Not if you adopted my suggestion of adding a letter to specify the default compression as specified by . And then J/X/Y/Z would not be overloaded. Why do you want to discourage the use of different compression types for different files? If the feature wasn't there and was being considered, I would say it wasn't worth doing. But it's there, and can't be removed anytime soon. I see no cost in retaining it indefinitely. >> would replace -c. It's a mess if the config file has entries >> that specify J and X flags as well as none, the config file has >> zstd, and the -c option is given as well. We now have a knob >> > > newsyslog would issue a warning if both -c is given and the configuration > file has . > > Part of the reason to introduce was that it would move the > configuration to one place (newsyslog.conf) and there were concerns that > having -c in newsyslog in /etc/crontab is counterintuitive (as raised in > some earlier discussion). > > >> to override the knob to override a knob. The only reason to keep -c that >> I can think of is to specify a different compression in a single >> invocation, >> but as noted, changing compression requires manual operations that make >> it unreasonable to change it invocation by invocation. >> > > The intention of -c was to be added to /etc/crontab, but with the > introduction of it's probably a good idea to just remove the > command line option or at least leave it undocumented? I agree that -c should be removed. Retaining it as an undocumented option seems like a recipe for confusion, and there is not much utility in varying the compression type from one invocation to the next. Mixing types without manually converting the existing files would lead to a mess. >> Also, using the -c option or (except with legacy) loses the >> ability to specify different compression types for different files. >> > > This (the ability of specifying different compression types for different > files) is what I deliberately wanted to get rid of. > > Compression types only make a meaningful difference when files are > sufficiently large, and the purpose of newsyslog is to not allow log files > to grow to an unmanageable size. Rotating files when they are large and > also requesting to compress them means the system would have prolonged > "bursts" of CPU workload at integral hours, which would be even worse for > busy systems where logs tend to have more contents. That's a tradeoff that different people (and systems) might differ on. For systems that produce large log files and are not CPU-constrained, it's a perfectly reasonable choice. I have a firewall that produces large logs and runs on a virtual machine, so the disk is not that large. >> People have objected to the term "legacy" as well. >> > > I don't agree. > > Calling it "legacy" would send a clear signal that the historical way is > discouraged (for people who are using a different compression method, > merging upstream change would be a very painful process). We already have > 4 letters to represent 4 different compression methods, that's almost 1/3 > of all valid configuration letters, and we should stop doing that because > the legacy way is causing problems and won't scale when new compression > methods are added. See my point above. If a new letter was adopted for "the default", then new compression methods would not require a letter, they could be limited to specification with . >> I still think it would be much better to add an option letter to select >> the default compression as specified by . This would eliminate >> the need for "legacy", and it would add the ability to have both a global >> default and an exception. I think the redefinition of the existing flags >> to have different meanings if is given is messy. >> > > I insist the default should be anything except "legacy" -- legacy is for > backward compatibility and should serve that purpose only. I think that bzip2 is the only reasonable default, as switching a system automatically on an upgrade would leave a mess of old compressed files unless people convert manually. Providing a conversion script would be a help though. I don't know why you are so determined to change the default. Changing to "none" is reasonable on many systems, changing to a better method is fine (with manual conversion), and "legacy" methods would include all currently- supported methods. That doesn't sound like legacy to me. It's mostly the configuration mechanism that would be legacy. > The entry for -c says that we plan to change the default to "none" in 15.0. >> Hopefully that would be done via and not -c. However, there >> > > Yes, my intention was to add a line to newsyslog.conf ( > https://reviews.freebsd.org/D43169 ) instead of adding it to /etc/crontab. > > >> was significant pushback on "none" being the default. >> > > I think we should provide a reasonable default. Compression was useful > back in the 90's, but not so much nowadays and makes grep'ing the logs > harder (and for those who want compression, they could choose e.g. 'bzip2' > anyways). This change would also make porter's lives a lot easier as they > could install their newsyslog.conf.d files with e.g. 'J' to indicate that > the file can be compressed, without messing up with the administrator's > decision to not compress or compress it with some other compressor. Or, using my proposal, they could use the new option letter for the default. I think the new default newsyslog.conf should have " bzip2" and use the a new option letter in all the existing entries. That would make it easier to change the default on individual systems without extra hassle in changing the default; only one line would change. As noted above, using compression is perfectly reasonable on many systems. Almost all of my servers run on virtual machines, so don't have unlimited disk space. And support for compression is unlikely to be removed, so pushing for its use to be reduced doesn't seem useful. Mike From nobody Wed Jan 10 14:20:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T991x3WdDz573xj; Wed, 10 Jan 2024 14:20: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 4T991x33yXz4q51; Wed, 10 Jan 2024 14:20:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704896437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IrFvxwzz1RL8phAsoMV08/53CnzCcGYjdgM9Vb8HcHc=; b=p59wHFG+3JfRObubGnbIDrQNAD0bFJD5LQ7KAVkzP4h5JAaJo5dlRMaAEdBu7bMXtJ3Gkv 0wnKz6TGWwdb7Hj8Nd01ifv8VjaGU4Udjug6Faz+a25MSCCiHJksMAS4deKxnGXRooX++g LAn9b9e89dY/3trOctlxEqAcMK2VLQyH5FiRzpu3LY6G7FjMIG8sSjVT7flm/OQislfOBn QKJnLSUBjrUbXQICUfjYxgJqjMwh5Y1anMQmgXw9zLnaJrzWjVUUDzKW6oAmmsSnu2fkoL ibyjR62P7hSrLM4Q8evNvopWFw26Xfu7Av2kGHkl3MIS8zRWejCkyR9bX6C6Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704896437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IrFvxwzz1RL8phAsoMV08/53CnzCcGYjdgM9Vb8HcHc=; b=xjlu7XQ9dAWsfB7w/Mbm8t+TmJX5xCqIlLiSAmbMzirDDe+de1nWZTd81sdkdlJJt/YLiR 1Cskoq+Q9V6ycUdc2A0V33GC0/pxdOA3LNM4M6IlKDuhWrzylR0R0hlVdpUNamfUPv7qAJ Yj+c87eb+EWnDrM2ODtLV/coqJz3IFcaZCnDsLlohgnc8hZFr7rC3z4ii6icb7X1V1kM96 kOHRT4vsV4/1fYM0Ps/NgBI4HauKEczm0S1zqhbp+8X1/f4sjBB/OQNB4D4QWCRF0Q6huJ yJYvf607dZuDkjXAWvBrFgUIfVBpvKm0S+mlUDVHdbuVjLQjJO860eNnlnPfmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704896437; a=rsa-sha256; cv=none; b=bdC+YP3oZR+jdWBDm+ZpH0dNfPwxIY9MgBZXbOEzu43GTK44IXk8rQrjZPsaSAVIm5gEej 9y1h8z5RGIPvb9rpMe63M+UbNt5Cptab9/NL77xNweTZODSxdaOcZRM8KyzQ2ZB56ci6P+ gFdmMVh2nnHNn01PO8HPIsKer/nj1OJA/m6gjuMn1seFPN01StbgEADmCHXcVJB5W2ItBZ DeOJxn4hlcqLUOBYIHucwcnIoUqFvGBDQ60d7/3wcLgVjE3A9s579npBhkei1EmHep6wg9 fwH45/3gG7yzrlOYFWAXxcnKgcdvUDfhxxVf9b+shxE14QIbulXA1PDzHjsqTQ== 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 4T991x27nvzfDF; Wed, 10 Jan 2024 14:20: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 40AEKbRD041711; Wed, 10 Jan 2024 14:20:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AEKbmc041708; Wed, 10 Jan 2024 14:20:37 GMT (envelope-from git) Date: Wed, 10 Jan 2024 14:20:37 GMT Message-Id: <202401101420.40AEKbmc041708@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 1165116ada35 - stable/13 - IPv6: fix problem with duplicate port assignment with v4-mapped addrs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 1165116ada353364e1d1570d1d23bb3d18d28394 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1165116ada353364e1d1570d1d23bb3d18d28394 commit 1165116ada353364e1d1570d1d23bb3d18d28394 Author: Mike Karels AuthorDate: 2022-07-29 14:23:23 +0000 Commit: Ed Maste CommitDate: 2024-01-10 13:50:55 +0000 IPv6: fix problem with duplicate port assignment with v4-mapped addrs In in_pcb_lport_dest(), if an IPv6 socket does not match any other IPv6 socket using in6_pcblookup_local(), and if the socket can also connect to IPv4 (the INP_IPV4 vflag is set), check for IPv4 matches as well. Otherwise, we can allocate a port that is used by an IPv4 socket (possibly one created from IPv6 via the same procedure), and then connect() can fail with EADDRINUSE, when it could have succeeded if the bound port was not in use. PR: 265064 Submitted by: firk at cantconnect.ru (with modifications) Reviewed by: bz, melifaro Differential Revision: https://reviews.freebsd.org/D36012 (cherry picked from commit 637f317c6d9c0c689677f499fc78ac545b192071) --- sys/netinet/in_pcb.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 4c4f4050595a..61079db56bdb 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -758,7 +758,7 @@ in_pcb_lport_dest(struct inpcb *inp, struct sockaddr *lsa, u_short *lportp, } #ifdef INET - laddr.s_addr = INADDR_ANY; + laddr.s_addr = INADDR_ANY; /* used by INET6+INET below too */ if ((inp->inp_vflag & (INP_IPV4|INP_IPV6)) == INP_IPV4) { if (lsa != NULL) laddr = ((struct sockaddr_in *)lsa)->sin_addr; @@ -809,9 +809,16 @@ in_pcb_lport_dest(struct inpcb *inp, struct sockaddr *lsa, u_short *lportp, #endif } else { #ifdef INET6 - if ((inp->inp_vflag & INP_IPV6) != 0) + if ((inp->inp_vflag & INP_IPV6) != 0) { tmpinp = in6_pcblookup_local(pcbinfo, &inp->in6p_laddr, lport, lookupflags, cred); +#ifdef INET + if (tmpinp == NULL && + (inp->inp_vflag & INP_IPV4)) + tmpinp = in_pcblookup_local(pcbinfo, + laddr, lport, lookupflags, cred); +#endif + } #endif #if defined(INET) && defined(INET6) else From nobody Wed Jan 10 14:33:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T99KH0Y9nz5754V; Wed, 10 Jan 2024 14:33:55 +0000 (UTC) (envelope-from olce@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 4T99KH03cwz4qvB; Wed, 10 Jan 2024 14:33:55 +0000 (UTC) (envelope-from olce@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704897235; 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=J+NRgPOifgI+ZPdoiiiw5BfKy+B2Fv2doCiSWvzU8q4=; b=ZqqLc4BGKd/6WNQA0jWVrmTSXv02LCHykVQLx6DrSLYlBqugHVB3lpLTU2XSNqe7PtPZGe u5vwd4n4V72zYtbBN5WioqMtowp2AT13C8pFGesbwpxzQKynKiUnpILNhfg5JqNBc9NC6H oDFbOJdimW7zH1pSQTaGmjsyve9FqYFf9T8aJig0WHdhDXkKMgtF+aqBzpboB+dKJ0oth2 7+so5bNx5ybs6H7kmkNtz4Ff0KDBl4wePajJLU+d40JDstnNU23A0+J4XB9W//GBeDxHD4 gUJUbQDO/2tFRKJlaHtyZFd3knDrlOXUQLNjQ71RbQlmLyBcj1rA96efXEwebA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704897235; 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=J+NRgPOifgI+ZPdoiiiw5BfKy+B2Fv2doCiSWvzU8q4=; b=wCjTzOT8tJwarFiYBNyp6TC9KsQCRxVL4HY1mHJkTLOs0qj5WRZN+PF/dICoB4WkQb9NE2 4rIfCvBir1wsXWcmIHj8fbOWncimzB8lkJwKzAQYLLObSwjk5Kf0TY5C5KcOXb3v5rU4hK 27XB8WPQ/MIBuzlBsdq8aChcB3VLn+BnIgHk7GNGfQR07XHMhrBUprXFIftTy2rg9tlv6j /78bBs8qTi3b0ikkQM+BUg3P0mVA5oKQJUuYKWf5IVdZT9vccfBXn9qvXsXgZAggOS05bt uSl/oVB7aQ3GS4iySuC4JLzJwwJEZgFXXnJYkBLz8x9t7P3GNNJPxGjApAn54A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704897235; a=rsa-sha256; cv=none; b=Ytt6xR6rXsxfcBobgcP7XMPtSPX6uS8W59RIoLKkg+Wosufsa/AQTG3yJO2/aN7StRRC2h f7jrNKbtMPJcYhep2Ep65ZijzDjVzWxA37WpEfYI4ptDQegbjtU3K6GP1TyW6MZmU7jzk/ v/bkjpHcAvvmrUDXnveIp2ZlTaDK/vOb92v3RRdXhSMl9X8Bv7XhDPKlEiK5m7wJOLHunu QQxUQGZH+IbxNI37BTreSQvtFDGueNz5pDSfVwFuwA/YrnRJMH9um31AV62t75QeNsQ8SA ED5oZXJerdJFW8aXKkyXc2btom2Q6/pJW89L2rAakaCdju1tRqyJfMsTZgjx6Q== Received: from ravel.localnet (lfbn-nic-1-525-172.w90-118.abo.wanadoo.fr [90.118.140.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: olce/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4T99KF6Wlfz16ZZ; Wed, 10 Jan 2024 14:33:53 +0000 (UTC) (envelope-from olce@freebsd.org) From: Olivier Certner To: Xin LI Cc: Xin LI , Mike Karels , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2f036705f337 - main - Document the two recent newsyslog(8) change (-c option and configuration option). Date: Wed, 10 Jan 2024 15:33:45 +0100 Message-ID: <3130778.jP0jbBhz4e@ravel> In-Reply-To: References: <202312290846.3BT8kOiO029918@gitrepo.freebsd.org> <2683023.poxlI1A5LX@ravel> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2003580.XuNk7dGF6U"; micalg="pgp-sha384"; protocol="application/pgp-signature" --nextPart2003580.XuNk7dGF6U Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Olivier Certner To: Xin LI Date: Wed, 10 Jan 2024 15:33:45 +0100 Message-ID: <3130778.jP0jbBhz4e@ravel> MIME-Version: 1.0 Hi Xin, Thanks for responding. There were several ideas in my mail, some of them contradictory, and at tim= es not grouped properly. I hope it still was intelligible enough. I was mostly concerned about the (future) change of default value, and stil= l am. But I'm also surprised by the premises some of your choices (includi= ng the default value) are based on. To me, they look generally weak, and e= ven for some do not seem to make sense. This is (also) what I would like t= o discuss. I'm probably far from having the most stringent or intensive us= e of log files in this community, and I'm not an expert of SSD wear-levelin= g either. So maybe it's just me, but then I'd ask for the minimum educatio= n to understand your reasoning and learn from it. > I am open to removing '-c'. An alternative I developed later in my initial mail (it was not apparent at= the point you responsed to) is to have '-c' (on the command-line) override= (in some configuration file), and I think this is what you've d= one (and responded to Mike). I'm fine with it since I have the feeling it'= s the general rule for most utilities where it's possible to request the sa= me behavior on the command-line and from configuration files (in other word= s, it respects POLA). My main concern here is that, if you keep '-c', you = document it, as well as its relation to . I'm saying this becaus= e you evoked the possibility of not documenting it on purpose in some other= message, which I think can't be justified here. =20 > Could you please clarify what you mean by "make it enable compression" -- > did you mean that we mark all log files to be compressible? (It's probab= ly > not a good idea as some "log" files may be binary and not really > compressible). Yes, I meant exactly that. In this alternative, you simply ignore compress= ion letters but also their absence, and compress everything the same. I un= derstand your point about binary files, but I would be surprised if that lo= gs even formatted as binary files aren't significantly compressible (albeit= less than text) in most cases, and even if they aren't, it would only be a= very minor annoyance (files are not going to get longer; for other (non-)a= nnoyances, see below). Moreover, all log files in base are text files, and= that is also the case for all ports/applications I use, so I find it stran= ge not to cater to what is probably the vast majority of use cases (or do y= ou disagree with that?). Doing so would have also the benefit that application writers just don't ha= ve to bother wondering whether their logs should be compressed or not. Wha= t would that decision based on? Basing it on format (text or binary) is mo= st probably flawed, as I've just said above. I don't think it can be based= on content either, which I suspect will always be compressible for log fil= es (there will be redundancy, like timestamps, identifiers, etc.). And I s= ee this more as an administrative decision (e.g., do I have plenty of disk = space or not?), which is independent. So shifting that decision to the adm= inistrator once and for all makes sense. If you don't like this way to mak= e it happen, I'm suggesting another one next. > Changing the meaning of all four legacy compression type letters to "file > is compressible" is part of the intention. The goal is to discourage usi= ng > them as a way to specify a compression type, in favor of using the > administrator configured value. As I've just explained, I see a lot of value in having an administrator dec= iding on a global behavior. I will use this functionality most likely. I had been hesitating between preserving the current meaning of the compres= sion letters, for POLA in general, and having the configuration directive o= verride them. That's why I mentioned an alternative where the override wou= ld have to be explicit, through an additional, different directive. This i= dea could be reused like this: Have '' affect only files without = compression letters, and have '' affect only those with = them, and perhaps also have the specified value of one of them used as the = default for the other (e.g., if '' is set, it also affec= ts by default files without compression letters). I'm mentioning this for = completeness in case it fulfills the needs of others. I probably won't use= this refinement personally. And, concerning POLA, there are different lev= els of it. Forgetting a moment about the change in default value, being ab= le to override compression letters with a directive in the configuration fi= le is a bit surprising, but after more pondering I now do not consider it t= o be terribly annoying if sufficiently publicized. > That's said, 'none' is a reasonable default in many ways as explained > before (it makes grep'ing easier, compression is not really that helpful = in > the modern world because hard drives are larger than the 90's and it > reduces the times data gets rewritten to SSDs and avoids hourly CPU load > bursts for busy systems). This is where my main disagreement is currently. Most arguments have been = addressed in my previous mails, so for each I'll do a small wrap-up and add= a few new thoughts. "it makes grep'ing easier": Our zgrep(1) works on any compressed file, and = even on uncompressed ones, so is a drop-in replacement for grep(1). I fail= to see anything hard about using it. Scripts already using grep(1) don't = even need to be modified, via a combination of PATH or symlink tweaking. W= e could even go so far as having grep(1) itself behave like zgrep(1), which= could be a great usability win for newcomers as well. "compression is not really that helpful in the modern world because hard dr= ives are larger than the 90's": I certainly don't think so. I manipulate G= Bs of (text) log files. On build logs, I typically see ratios of 1/10, whi= ch is huge. The space I'm saving is not only used to save more logs, but a= lso for unrelated purposes, and prevents me from having to buy or dedicate = more hard disks to this use. And I'm not even talking about embedded syste= ms, which are much more constrained, or virtual machines. "it reduces the times data gets rewritten to SSDs": Surely, but does it mat= ter? I don't think so. A single rewrite of log data in most use cases shou= ldn't have any visible effect on wear-leveling, except for SSDs where this = is the only and continuous job, but then you can have your equivalent to 's= yslog' compressing on the fly, or can use ZFS with compression. If really,= you're reaching the disk I/O limits on your machine and can't afford the e= xtra bandwidth for reading and compressing, shouldn't you be sending the lo= gs via network to another machine doing exactly that processing? And is th= is a use case common enough to warrant making non-compression the new newsy= slog(8)'s default? I don't think so. "avoids hourly CPU load bursts for busy systems": That can, and should, be = solved by configuration. You're free to choose a higher frequency, to avoi= d busy hours if there are less loaded ones, and to rotate logs on a smaller= size limit, all of which will mitigate the problem to the point of almost = non-existence. And if the "almost" is still significant to your workload, = then see the previous point. Again, is this common or important enough? F= or now, I doubt it. And there is an advantage of having application-contro= lled compression: At least you can control exactly when the bursts occur, w= hich you can't with ZFS (which has to compress blocks also). > 'bzip2' could be a good second best default (because for most > configurations it's how the log files are compressed with today's > defaults), but if the administrator has already configured their systems = to > use a different method, this would break their configuration anyways. Yes for 'bzip2' as a good default, for POLA. If the administrator configur= ed its system, then the best default would be 'legacy'. That's why I was h= esitating with always keeping the original meaning to the compression lette= rs. > There are other benefits of not compressing rotated logs. For busy > systems, the hourly newsyslog run would process larger logs and cause CPU > workload bursts. >=20 > And when logs are compressed, the data is read back and compressed data is > rewritten to disk / SSDs, causing additional wear of the flash storage, a= nd > all that comes with no significant benefit for modern hardware. >=20 > (I don't think it's common to have log files indexed after rotation; a mo= re > common use case would be to use [u]grep to look up for a certain pattern). I think I've already addressed most of these points in the previous mail an= d above. I've read and, I think, understood your points. So please save us time and= refrain from repeating them. This is not going to make me change my curre= nt mind that they all are weak at best. On the other hand, please, after a careful reading of my objections, respon= d with comments, critiques or rebuttals as you see fit. I may learn things= in the process, and you might as well too. =20 > Yes, and that's not a big concern. Achieving the maximum compression rat= io > is probably never the goal for most scenarios (not limited to logs, but > also other places) where compression is used, and one always has to balan= ce > between the cost and benefit. We are talking about logs, or at least use cases for newsyslog(8). A frequ= ent use case for it (it's certainly the primary for me) is long-term storag= e of old logs that are unfrequently read/processed. Achieving a high compr= ession ratio is important here, to save the space used in absolute terms *a= nd* with respect to the expected (in a statistical sense) utility of these = (i.e., low). > If the person is distributing a release image to many thousands of users > over the Internet, it would make a lot of sense to try the best compressi= on > for an 5% reduction of size because that adds up to the bandwidth cost and > optimizes the experience for users, but it doesn't make as much sense to > save, let's say a few MBs of disk space at the expense of spending a few > more minutes every hour, the added "bursts" of slower response time for a > server, and that's usually undesirable for production. Really, I don't see where these figures can come from. Here is a very quic= k example on a typical (for me) build log file of about ~70MB: * Method * Compression ratio * Elapsed time (s) * ************************************************************ gzip (default) | 95.3%, or / 21.2 | 0.426 xz (default) | 96.9%, or / 32.6 | 5.619 zstd (default) | 95.6%, or / 22.5 | 0.088 I could multiply them to convince you in a more serious manner statisticall= y. But already, I think you can agree that "a few MBs of disk space at the= expense of spending a few more minutes" is way, way off, even if you're still using xz(1). Thanks and regards. =2D-=20 Olivier Certner --nextPart2003580.XuNk7dGF6U Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmWeqskACgkQjKEwQJce JifYiBAAtUnuhiJBAeBwmCXFY3bHnIfipM8KGlfUdKbkzzhuU1zyDitZoc1r1e7P Nq25SclCV41JqIaY62bxFrLohGLDFfO1pIx98qIBL9/HTTAqiwnzDpUqL+u2zh6b ghYJpXW0q1E+yl0jFHYh6xhQjZV42jBeNROAgS2uM+V5u64AFyBM4xfz6txCb18O i6gNjP7KzZbh3qwG708YNx+gWHyt6JwzAYNebXsP+1SgdDpr7f6jKO6TXwBXaKo7 pJSJ1hgipzeC26H/zPgcFlUpQndWtnRGR6T4zaCRUr6Qy5jTxNBFLPG+1LzN9PiG PuXSVd69RAKLZ7nS4U2iTnN5tWg8JWuSH1XRUbxGukmM7fTfh98pAl246bgpgv1K bfng7W9UGV8YMoCJURhwDdXc9/9Xh9rJ9OhqGcBcu0yI5Y7p43TrG7713uGQBx3g xT34+PEgkAu9+Kf3VztPVyBe810RnCqNvZpQ1GW5TylzWipV8k4pReI2OI0e/KdM OXhOtbqkCXoAhhDcB5vRjLjQrLkRD5tE9dBRuHgPIxue6mRxWR97ty4A81Adr8fw n/tNt8ez8uB4W0fYFxfsFWZ+tqnqJqg3oDd8kBIapdpHS4jMXAb0c2sS5HrrP+9j luiEEDU4A2THRL7rOQdtFirM1zuKQBo0GcMte7l7gkmddfKJcOI= =3pjz -----END PGP SIGNATURE----- --nextPart2003580.XuNk7dGF6U-- From nobody Wed Jan 10 16:38:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9D4l50s2z57K9F; Wed, 10 Jan 2024 16:38: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 4T9D4l4kq0z58qv; Wed, 10 Jan 2024 16:38:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704904695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4s7eIC9WQUt8RmM8BekgMiTQlODY3evPEP1SWu7Kk9k=; b=aofwUCBnqGvp75BSj5WYDsI/Go0b+OWO3SDgW00DDXuL+mRWDbFT37otKAS5HMC5+WqhhC PdNyEysAdp1lz7SxV8eHxYGUhVUnLbsF1K9Rs8SVmGjGOsmnzE03AMjK9Hp+N691Vr+oUA 5UArlsU1KA2Oz2wnu7mV5DKkSrHP/ltjn+07KNFjQRFIjDUuK29wZO8W4rPwgO80hLzlU7 vA3yyoP2m07SDxQhT+0TaBspYWRR20sK1FLgzK5ddvlLMGlVa4dJVR+dHDi/cgq34p7kjh grGFZnf/1e7ztLGDCJykuOEkZQmPAF15zS1dR4tbGZAnbdWOGlUY3KLqI/LUcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704904695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4s7eIC9WQUt8RmM8BekgMiTQlODY3evPEP1SWu7Kk9k=; b=GHQD9zuE0bR01bXPxt6XKC9Vc3+jt6EPqqZQ6qN8liNKo6sxsDhHnyxcH33Ky73tyCw4XB dAnvZ7OiAOPHqQV51Z/hp7E37jlKrctGCD/SP/70+TnL4BLarD0deBDf3N8Oe8CDPLkWKh au5GUHwYql5UV0Rs+t8je5W9TMfzjW8J/WTB0SYGU7aG5g3ti1lDl/PC7SLenCJ8swgloJ kzMAPX/eBhNjo5RYegymXiXUyNysL/JXgnhWm12f4ZvXVSq/ZrRIjLa3boqovl6O16Uhqs lAavrUEF4784fZiS8qxmy/o08MfWHgsqpmcQI5OnPylQdtRf67dpALUA6KWi7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704904695; a=rsa-sha256; cv=none; b=LyNwtSYZM/lKiG4Gmw1PJmuUsfT/zZhU649PTUvk/4Hp9IfkpfX7aPkDv7SroegI+jLRbf 0McvV3FJL7BaODiJVxfHMaWm3wRLj9zME6fLnNEJGdXpUzUtp4M/Sn0COGNnKQpMHR6vTO BR66+BZhtOCAVSg4EyosyqxOaqQ+iybQVRdmwt+qt38LFG5xCd7t9A0M1aiswsoVjSsnBT IGzNJRZMLP/DRLxiz3v5b30b5NR7GTGKJRG1SHcZCY/eoaK1BQOe3eAg6pxBd2nbi1aNoJ ZrvtHuD3XkqbY/rBKICEYGl34sRW5/okqcmZkr7jE9N9iGBWEokB8OroZHnCkw== 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 4T9D4l3pN2zhtJ; Wed, 10 Jan 2024 16:38: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 40AGcFlM069220; Wed, 10 Jan 2024 16:38:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AGcFAv069217; Wed, 10 Jan 2024 16:38:15 GMT (envelope-from git) Date: Wed, 10 Jan 2024 16:38:15 GMT Message-Id: <202401101638.40AGcFAv069217@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: aa339f1d5df9 - main - vendor/bc: upgrade to version 6.7.2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa339f1d5df9e38f36a34eb522355c4eebcae6c4 Auto-Submitted: auto-generated The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=aa339f1d5df9e38f36a34eb522355c4eebcae6c4 commit aa339f1d5df9e38f36a34eb522355c4eebcae6c4 Author: Stefan Eßer AuthorDate: 2023-10-30 09:10:24 +0000 Commit: Stefan Eßer CommitDate: 2024-01-10 16:34:49 +0000 vendor/bc: upgrade to version 6.7.2 This update improves the implementation of the power function p() and adds 3 new functions to the extended math library: min(), max(), and i2rand(). (cherry picked from commit 0b4a06ab29a0da80f6cb5c99189054cb8e2f756c) --- contrib/bc/Makefile.in | 2 +- contrib/bc/NEWS.md | 22 + contrib/bc/configure.sh | 8 +- contrib/bc/gen/lib2.bc | 45 +- contrib/bc/include/bcl.h | 3 - contrib/bc/include/version.h | 2 +- contrib/bc/manuals/algorithms.md | 69 +++ contrib/bc/manuals/bc/A.1 | 35 +- contrib/bc/manuals/bc/A.1.md | 28 +- contrib/bc/manuals/bc/E.1 | 3 +- contrib/bc/manuals/bc/E.1.md | 2 +- contrib/bc/manuals/bc/EH.1 | 3 +- contrib/bc/manuals/bc/EH.1.md | 2 +- contrib/bc/manuals/bc/EHN.1 | 3 +- contrib/bc/manuals/bc/EHN.1.md | 2 +- contrib/bc/manuals/bc/EN.1 | 3 +- contrib/bc/manuals/bc/EN.1.md | 2 +- contrib/bc/manuals/bc/H.1 | 35 +- contrib/bc/manuals/bc/H.1.md | 28 +- contrib/bc/manuals/bc/HN.1 | 35 +- contrib/bc/manuals/bc/HN.1.md | 28 +- contrib/bc/manuals/bc/N.1 | 35 +- contrib/bc/manuals/bc/N.1.md | 28 +- contrib/bc/src/num.c | 10 +- contrib/bc/src/vm.c | 2 +- contrib/bc/tests/bc/lib2.txt | 1 + contrib/bc/tests/bc/lib2_results.txt | 4 +- contrib/bc/tests/bc/scripts/all.txt | 1 + contrib/bc/tests/bc/scripts/i2rand.bc | 29 + contrib/bc/tests/bc/scripts/i2rand.txt | 1000 ++++++++++++++++++++++++++++++++ contrib/bc/tests/script.sh | 2 +- 31 files changed, 1390 insertions(+), 82 deletions(-) diff --git a/contrib/bc/Makefile.in b/contrib/bc/Makefile.in index 55e2e4a6270a..e1309cd6d6b3 100644 --- a/contrib/bc/Makefile.in +++ b/contrib/bc/Makefile.in @@ -554,7 +554,7 @@ clean_config: clean clean_benchmarks clean_coverage: @printf 'Cleaning coverage files...\n' @$(RM) -f *.gcov - @$(RM) -f *.html + @$(RM) -f *.html *.css @$(RM) -f *.gcda *.gcno @$(RM) -f *.profraw @$(RM) -f $(GCDA) $(GCNO) diff --git a/contrib/bc/NEWS.md b/contrib/bc/NEWS.md index de3b35026fea..d4b160d74d35 100644 --- a/contrib/bc/NEWS.md +++ b/contrib/bc/NEWS.md @@ -1,5 +1,27 @@ # News +## 6.7.2 + +This is a production release to remove some debugging code that I accidentally +committed. + +## 6.7.1 + +This is a production release with a bug fix for `SIGINT` only being handled +once. + +## 6.7.0 + +This is a production release with three new functions in the [extended math +library][16]: `min()`, `max()`, and `i2rand()`. + +## 6.6.1 + +This is a production release with an improved `p()` function in the [extended +math library][16]. + +Users who don't care do not need to upgrade. + ## 6.6.0 This is a production release with two bug fixes and one change. diff --git a/contrib/bc/configure.sh b/contrib/bc/configure.sh index 4ba957131d52..35d55058f8f1 100755 --- a/contrib/bc/configure.sh +++ b/contrib/bc/configure.sh @@ -1364,13 +1364,7 @@ if [ "$debug" -eq 1 ]; then CFLAGS="-O0" fi - ccbase=$(basename "$CC") - - if [ "$ccbase" = "clang" ]; then - CFLAGS="-gdwarf-4 $CFLAGS" - else - CFLAGS="-g $CFLAGS" - fi + CFLAGS="-g $CFLAGS" else diff --git a/contrib/bc/gen/lib2.bc b/contrib/bc/gen/lib2.bc index ba3f76b1803a..df51d0c07a8d 100644 --- a/contrib/bc/gen/lib2.bc +++ b/contrib/bc/gen/lib2.bc @@ -34,10 +34,34 @@ */ define p(x,y){ - auto a + auto a,i,s,z + if(y==0)return 1@scale + if(x==0){ + if(y>0)return 0 + return 1/0 + } a=y$ if(y==a)return(x^a)@scale - return e(y*l(x)) + z=0 + if(x<1){ + y=-y + a=-a + z=x + x=1/x + } + if(y<0){ + return e(y*l(x)) + } + i=x^a + s=scale + scale+=length(i)+5 + if(z){ + x=1/z + i=x^a + } + i*=e((y-a)*l(x)) + scale=s + return i@scale } define r(x,p){ auto t,n @@ -66,6 +90,14 @@ define f(n){ for(r=1;n>1;--n)r*=n return r } +define max(a,b){ + if(a>b)return a + return b +} +define min(a,b){ + if(an)return 0 @@ -242,6 +274,15 @@ define frand(p){ return irand(A^p)>>p } define ifrand(i,p){return irand(abs(i)$)+frand(p)} +define i2rand(a,b){ + auto n,x + a=a$ + b=b$ + if(a==b)return a + n=min(a,b) + x=max(a,b) + return irand(x-n+1)+n +} define srand(x){ if(irand(2))return -x return x diff --git a/contrib/bc/include/bcl.h b/contrib/bc/include/bcl.h index 0908e215182c..d3a9f42cdcf8 100644 --- a/contrib/bc/include/bcl.h +++ b/contrib/bc/include/bcl.h @@ -36,9 +36,6 @@ #ifndef BC_BCL_H #define BC_BCL_H -// TODO: Add a generation index when building with Valgrind to check for -// use-after-free's or double frees. - #include #include #include diff --git a/contrib/bc/include/version.h b/contrib/bc/include/version.h index a4df383e284a..1cd13e9878c1 100644 --- a/contrib/bc/include/version.h +++ b/contrib/bc/include/version.h @@ -37,6 +37,6 @@ #define BC_VERSION_H /// The current version. -#define VERSION 6.6.0 +#define VERSION 6.7.2 #endif // BC_VERSION_H diff --git a/contrib/bc/manuals/algorithms.md b/contrib/bc/manuals/algorithms.md index 4d7a0edc54c4..ce27bf026b69 100644 --- a/contrib/bc/manuals/algorithms.md +++ b/contrib/bc/manuals/algorithms.md @@ -193,6 +193,74 @@ The algorithm used is to use the formula `e(y*l(x))`. It has a complexity of `O(n^3)` because both `e()` and `l()` do. +However, there are details to this algorithm, described by the author, +TediusTimmy, in GitHub issue [#69][12]. + +First, check if the exponent is 0. If it is, return 1 at the appropriate +`scale`. + +Next, check if the number is 0. If so, check if the exponent is greater than +zero; if it is, return 0. If the exponent is less than 0, error (with a divide +by 0) because that is undefined. + +Next, check if the exponent is actually an integer, and if it is, use the +exponentiation operator. + +At the `z=0` line is the start of the meat of the new code. + +`z` is set to zero as a flag and as a value. What I mean by that will be clear +later. + +Then we check if the number is less than 0. If it is, we negate the exponent +(and the integer version of the exponent, which we calculated earlier to check +if it was an integer). We also save the number in `z`; being non-zero is a flag +for later and a value to be used. Then we store the reciprocal of the number in +itself. + +All of the above paragraph will not make sense unless you remember the +relationship `l(x) == -l(1/x)`; we negated the exponent, which is equivalent to +the negative sign in that relationship, and we took the reciprocal of the +number, which is equivalent to the reciprocal in the relationship. + +But what if the number is negative? We ignore that for now because we eventually +call `l(x)`, which will raise an error if `x` is negative. + +Now, we can keep going. + +If at this point, the exponent is negative, we need to use the original formula +(`e(y * l(x))`) and return that result because the result will go to zero +anyway. + +But if we did *not* return, we know the exponent is *not* negative, so we can +get clever. + +We then compute the integral portion of the power by computing the number to +power of the integral portion of the exponent. + +Then we have the most clever trick: we add the length of that integer power (and +a little extra) to the `scale`. Why? Because this will ensure that the next part +is calculated to at least as many digits as should be in the integer *plus* any +extra `scale` that was wanted. + +Then we check `z`, which, if it is not zero, is the original value of the +number. If it is not zero, we need to take the take the reciprocal *again* +because now we have the correct `scale`. And we *also* have to calculate the +integer portion of the power again. + +Then we need to calculate the fractional portion of the number. We do this by +using the original formula, but we instead of calculating `e(y * l(x))`, we +calculate `e((y - a) * l(x))`, where `a` is the integer portion of `y`. It's +easy to see that `y - a` will be just the fractional portion of `y` (the +exponent), so this makes sense. + +But then we *multiply* it into the integer portion of the power. Why? Because +remember: we're dealing with an exponent and a power; the relationship is +`x^(y+z) == (x^y)*(x^z)`. + +So we multiply it into the integer portion of the power. + +Finally, we set the result to the `scale`. + ### Rounding (`bc` Math Library 2 Only) This is implemented in the function `r(x,p)`. @@ -327,3 +395,4 @@ It has a complexity of `O(n^3)` because of arctangent. [9]: https://en.wikipedia.org/wiki/Root-finding_algorithms#Newton's_method_(and_similar_derivative-based_methods) [10]: https://en.wikipedia.org/wiki/Euclidean_algorithm [11]: https://en.wikipedia.org/wiki/Atan2#Definition_and_computation +[12]: https://github.com/gavinhoward/bc/issues/69 diff --git a/contrib/bc/manuals/bc/A.1 b/contrib/bc/manuals/bc/A.1 index 5de2d3529bcf..fc75b5c70ac3 100644 --- a/contrib/bc/manuals/bc/A.1 +++ b/contrib/bc/manuals/bc/A.1 @@ -1357,8 +1357,7 @@ Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement .PP -The \[lq]expressions in a \f[B]stream\f[R] statement may also be -strings. +The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string as though the string had appeared as its own statement. @@ -1579,6 +1578,14 @@ the rounding mode round away from \f[B]0\f[R] \f[B]f(x)\f[R] Returns the factorial of the truncated absolute value of \f[B]x\f[R]. .TP +\f[B]max(a, b)\f[R] +Returns \f[B]a\f[R] if \f[B]a\f[R] is greater than \f[B]b\f[R]; +otherwise, returns \f[B]b\f[R]. +.TP +\f[B]min(a, b)\f[R] +Returns \f[B]a\f[R] if \f[B]a\f[R] is less than \f[B]b\f[R]; otherwise, +returns \f[B]b\f[R]. +.TP \f[B]perm(n, k)\f[R] Returns the permutation of the truncated absolute value of \f[B]n\f[R] of the truncated absolute value of \f[B]k\f[R], if \f[B]k <= n\f[R]. @@ -1589,6 +1596,10 @@ Returns the combination of the truncated absolute value of \f[B]n\f[R] of the truncated absolute value of \f[B]k\f[R], if \f[B]k <= n\f[R]. If not, it returns \f[B]0\f[R]. .TP +\f[B]fib(n)\f[R] +Returns the Fibonacci number of the truncated absolute value of +\f[B]n\f[R]. +.TP \f[B]l2(x)\f[R] Returns the logarithm base \f[B]2\f[R] of \f[B]x\f[R]. .RS @@ -1759,7 +1770,7 @@ Functions\f[R] subsection below). .RE .TP \f[B]frand(p)\f[R] -Generates a pseudo-random number between \f[B]0\f[R] (inclusive) and +Generates a pseudo-random integer between \f[B]0\f[R] (inclusive) and \f[B]1\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will @@ -1768,14 +1779,22 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and \f[B]seed\f[R] is \f[I]not\f[R] changed. .TP \f[B]ifrand(i, p)\f[R] -Generates a pseudo-random number that is between \f[B]0\f[R] (inclusive) -and the truncated absolute value of \f[B]i\f[R] (exclusive) with the -number of decimal digits after the decimal point equal to the truncated -absolute value of \f[B]p\f[R]. +Generates a pseudo-random integer that is between \f[B]0\f[R] +(inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive) +with the number of decimal digits after the decimal point equal to the +truncated absolute value of \f[B]p\f[R]. If the absolute value of \f[B]i\f[R] is greater than or equal to \f[B]2\f[R], and \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will change the value of \f[B]seed\f[R]; otherwise, \f[B]0\f[R] -is returned and \f[B]seed\f[R] is not changed. +is returned, and \f[B]seed\f[R] is not changed. +.TP +\f[B]i2rand(a, b)\f[R] +Takes the truncated value of \f[B]a\f[R] and \f[B]b\f[R] and uses them +as inclusive bounds to enerate a pseudo-random integer. +If the difference of the truncated values of \f[B]a\f[R] and \f[B]b\f[R] +is \f[B]0\f[R], then the truncated value is returned, and \f[B]seed\f[R] +is \f[I]not\f[R] changed. +Otherwise, this function will change the value of \f[B]seed\f[R]. .TP \f[B]srand(x)\f[R] Returns \f[B]x\f[R] with its sign flipped with probability diff --git a/contrib/bc/manuals/bc/A.1.md b/contrib/bc/manuals/bc/A.1.md index 3f34f451c9ed..3e593e16b481 100644 --- a/contrib/bc/manuals/bc/A.1.md +++ b/contrib/bc/manuals/bc/A.1.md @@ -1068,7 +1068,7 @@ like any other expression that is printed. ## Stream Statement -The "expressions in a **stream** statement may also be strings. +The expressions in a **stream** statement may also be strings. If a **stream** statement is given a string, it prints the string as though the string had appeared as its own statement. In other words, the **stream** @@ -1259,6 +1259,14 @@ The extended library is a **non-portable extension**. : Returns the factorial of the truncated absolute value of **x**. +**max(a, b)** + +: Returns **a** if **a** is greater than **b**; otherwise, returns **b**. + +**min(a, b)** + +: Returns **a** if **a** is less than **b**; otherwise, returns **b**. + **perm(n, k)** : Returns the permutation of the truncated absolute value of **n** of the @@ -1269,6 +1277,10 @@ The extended library is a **non-portable extension**. : Returns the combination of the truncated absolute value of **n** of the truncated absolute value of **k**, if **k \<= n**. If not, it returns **0**. +**fib(n)** + +: Returns the Fibonacci number of the truncated absolute value of **n**. + **l2(x)** : Returns the logarithm base **2** of **x**. @@ -1418,7 +1430,7 @@ The extended library is a **non-portable extension**. **frand(p)** -: Generates a pseudo-random number between **0** (inclusive) and **1** +: Generates a pseudo-random integer between **0** (inclusive) and **1** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If **p** is not **0**, then calling this function will change the value of **seed**. If **p** is **0**, @@ -1426,12 +1438,20 @@ The extended library is a **non-portable extension**. **ifrand(i, p)** -: Generates a pseudo-random number that is between **0** (inclusive) and the +: Generates a pseudo-random integer that is between **0** (inclusive) and the truncated absolute value of **i** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If the absolute value of **i** is greater than or equal to **2**, and **p** is not **0**, then calling this function will change the value of - **seed**; otherwise, **0** is returned and **seed** is not changed. + **seed**; otherwise, **0** is returned, and **seed** is not changed. + +**i2rand(a, b)** + +: Takes the truncated value of **a** and **b** and uses them as inclusive + bounds to enerate a pseudo-random integer. If the difference of the + truncated values of **a** and **b** is **0**, then the truncated value is + returned, and **seed** is *not* changed. Otherwise, this function will + change the value of **seed**. **srand(x)** diff --git a/contrib/bc/manuals/bc/E.1 b/contrib/bc/manuals/bc/E.1 index ecb8b128712a..24f49c701b46 100644 --- a/contrib/bc/manuals/bc/E.1 +++ b/contrib/bc/manuals/bc/E.1 @@ -1122,8 +1122,7 @@ Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement .PP -The \[lq]expressions in a \f[B]stream\f[R] statement may also be -strings. +The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string as though the string had appeared as its own statement. diff --git a/contrib/bc/manuals/bc/E.1.md b/contrib/bc/manuals/bc/E.1.md index 5411dcf6cc70..b5d77d2c76b2 100644 --- a/contrib/bc/manuals/bc/E.1.md +++ b/contrib/bc/manuals/bc/E.1.md @@ -892,7 +892,7 @@ like any other expression that is printed. ## Stream Statement -The "expressions in a **stream** statement may also be strings. +The expressions in a **stream** statement may also be strings. If a **stream** statement is given a string, it prints the string as though the string had appeared as its own statement. In other words, the **stream** diff --git a/contrib/bc/manuals/bc/EH.1 b/contrib/bc/manuals/bc/EH.1 index 507e7f4a9a7a..35672fe5c4e6 100644 --- a/contrib/bc/manuals/bc/EH.1 +++ b/contrib/bc/manuals/bc/EH.1 @@ -1122,8 +1122,7 @@ Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement .PP -The \[lq]expressions in a \f[B]stream\f[R] statement may also be -strings. +The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string as though the string had appeared as its own statement. diff --git a/contrib/bc/manuals/bc/EH.1.md b/contrib/bc/manuals/bc/EH.1.md index 6f4c43263003..a8a42b06be2e 100644 --- a/contrib/bc/manuals/bc/EH.1.md +++ b/contrib/bc/manuals/bc/EH.1.md @@ -892,7 +892,7 @@ like any other expression that is printed. ## Stream Statement -The "expressions in a **stream** statement may also be strings. +The expressions in a **stream** statement may also be strings. If a **stream** statement is given a string, it prints the string as though the string had appeared as its own statement. In other words, the **stream** diff --git a/contrib/bc/manuals/bc/EHN.1 b/contrib/bc/manuals/bc/EHN.1 index e00fcd578b1c..72790726a4f4 100644 --- a/contrib/bc/manuals/bc/EHN.1 +++ b/contrib/bc/manuals/bc/EHN.1 @@ -1122,8 +1122,7 @@ Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement .PP -The \[lq]expressions in a \f[B]stream\f[R] statement may also be -strings. +The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string as though the string had appeared as its own statement. diff --git a/contrib/bc/manuals/bc/EHN.1.md b/contrib/bc/manuals/bc/EHN.1.md index 6f7a33210205..a38767eb0101 100644 --- a/contrib/bc/manuals/bc/EHN.1.md +++ b/contrib/bc/manuals/bc/EHN.1.md @@ -892,7 +892,7 @@ like any other expression that is printed. ## Stream Statement -The "expressions in a **stream** statement may also be strings. +The expressions in a **stream** statement may also be strings. If a **stream** statement is given a string, it prints the string as though the string had appeared as its own statement. In other words, the **stream** diff --git a/contrib/bc/manuals/bc/EN.1 b/contrib/bc/manuals/bc/EN.1 index ea842eac7e97..a972005515a6 100644 --- a/contrib/bc/manuals/bc/EN.1 +++ b/contrib/bc/manuals/bc/EN.1 @@ -1122,8 +1122,7 @@ Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement .PP -The \[lq]expressions in a \f[B]stream\f[R] statement may also be -strings. +The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string as though the string had appeared as its own statement. diff --git a/contrib/bc/manuals/bc/EN.1.md b/contrib/bc/manuals/bc/EN.1.md index 189193bf2a03..1c8e855e6f59 100644 --- a/contrib/bc/manuals/bc/EN.1.md +++ b/contrib/bc/manuals/bc/EN.1.md @@ -892,7 +892,7 @@ like any other expression that is printed. ## Stream Statement -The "expressions in a **stream** statement may also be strings. +The expressions in a **stream** statement may also be strings. If a **stream** statement is given a string, it prints the string as though the string had appeared as its own statement. In other words, the **stream** diff --git a/contrib/bc/manuals/bc/H.1 b/contrib/bc/manuals/bc/H.1 index d477dc8ab24b..a26aee4f2d11 100644 --- a/contrib/bc/manuals/bc/H.1 +++ b/contrib/bc/manuals/bc/H.1 @@ -1357,8 +1357,7 @@ Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement .PP -The \[lq]expressions in a \f[B]stream\f[R] statement may also be -strings. +The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string as though the string had appeared as its own statement. @@ -1579,6 +1578,14 @@ the rounding mode round away from \f[B]0\f[R] \f[B]f(x)\f[R] Returns the factorial of the truncated absolute value of \f[B]x\f[R]. .TP +\f[B]max(a, b)\f[R] +Returns \f[B]a\f[R] if \f[B]a\f[R] is greater than \f[B]b\f[R]; +otherwise, returns \f[B]b\f[R]. +.TP +\f[B]min(a, b)\f[R] +Returns \f[B]a\f[R] if \f[B]a\f[R] is less than \f[B]b\f[R]; otherwise, +returns \f[B]b\f[R]. +.TP \f[B]perm(n, k)\f[R] Returns the permutation of the truncated absolute value of \f[B]n\f[R] of the truncated absolute value of \f[B]k\f[R], if \f[B]k <= n\f[R]. @@ -1589,6 +1596,10 @@ Returns the combination of the truncated absolute value of \f[B]n\f[R] of the truncated absolute value of \f[B]k\f[R], if \f[B]k <= n\f[R]. If not, it returns \f[B]0\f[R]. .TP +\f[B]fib(n)\f[R] +Returns the Fibonacci number of the truncated absolute value of +\f[B]n\f[R]. +.TP \f[B]l2(x)\f[R] Returns the logarithm base \f[B]2\f[R] of \f[B]x\f[R]. .RS @@ -1759,7 +1770,7 @@ Functions\f[R] subsection below). .RE .TP \f[B]frand(p)\f[R] -Generates a pseudo-random number between \f[B]0\f[R] (inclusive) and +Generates a pseudo-random integer between \f[B]0\f[R] (inclusive) and \f[B]1\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will @@ -1768,14 +1779,22 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and \f[B]seed\f[R] is \f[I]not\f[R] changed. .TP \f[B]ifrand(i, p)\f[R] -Generates a pseudo-random number that is between \f[B]0\f[R] (inclusive) -and the truncated absolute value of \f[B]i\f[R] (exclusive) with the -number of decimal digits after the decimal point equal to the truncated -absolute value of \f[B]p\f[R]. +Generates a pseudo-random integer that is between \f[B]0\f[R] +(inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive) +with the number of decimal digits after the decimal point equal to the +truncated absolute value of \f[B]p\f[R]. If the absolute value of \f[B]i\f[R] is greater than or equal to \f[B]2\f[R], and \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will change the value of \f[B]seed\f[R]; otherwise, \f[B]0\f[R] -is returned and \f[B]seed\f[R] is not changed. +is returned, and \f[B]seed\f[R] is not changed. +.TP +\f[B]i2rand(a, b)\f[R] +Takes the truncated value of \f[B]a\f[R] and \f[B]b\f[R] and uses them +as inclusive bounds to enerate a pseudo-random integer. +If the difference of the truncated values of \f[B]a\f[R] and \f[B]b\f[R] +is \f[B]0\f[R], then the truncated value is returned, and \f[B]seed\f[R] +is \f[I]not\f[R] changed. +Otherwise, this function will change the value of \f[B]seed\f[R]. .TP \f[B]srand(x)\f[R] Returns \f[B]x\f[R] with its sign flipped with probability diff --git a/contrib/bc/manuals/bc/H.1.md b/contrib/bc/manuals/bc/H.1.md index 2cb0b4eb27cc..24cae156d4c2 100644 --- a/contrib/bc/manuals/bc/H.1.md +++ b/contrib/bc/manuals/bc/H.1.md @@ -1068,7 +1068,7 @@ like any other expression that is printed. ## Stream Statement -The "expressions in a **stream** statement may also be strings. +The expressions in a **stream** statement may also be strings. If a **stream** statement is given a string, it prints the string as though the string had appeared as its own statement. In other words, the **stream** @@ -1259,6 +1259,14 @@ The extended library is a **non-portable extension**. : Returns the factorial of the truncated absolute value of **x**. +**max(a, b)** + +: Returns **a** if **a** is greater than **b**; otherwise, returns **b**. + +**min(a, b)** + +: Returns **a** if **a** is less than **b**; otherwise, returns **b**. + **perm(n, k)** : Returns the permutation of the truncated absolute value of **n** of the @@ -1269,6 +1277,10 @@ The extended library is a **non-portable extension**. : Returns the combination of the truncated absolute value of **n** of the truncated absolute value of **k**, if **k \<= n**. If not, it returns **0**. +**fib(n)** + +: Returns the Fibonacci number of the truncated absolute value of **n**. + **l2(x)** : Returns the logarithm base **2** of **x**. @@ -1418,7 +1430,7 @@ The extended library is a **non-portable extension**. **frand(p)** -: Generates a pseudo-random number between **0** (inclusive) and **1** +: Generates a pseudo-random integer between **0** (inclusive) and **1** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If **p** is not **0**, then calling this function will change the value of **seed**. If **p** is **0**, @@ -1426,12 +1438,20 @@ The extended library is a **non-portable extension**. **ifrand(i, p)** -: Generates a pseudo-random number that is between **0** (inclusive) and the +: Generates a pseudo-random integer that is between **0** (inclusive) and the truncated absolute value of **i** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If the absolute value of **i** is greater than or equal to **2**, and **p** is not **0**, then calling this function will change the value of - **seed**; otherwise, **0** is returned and **seed** is not changed. + **seed**; otherwise, **0** is returned, and **seed** is not changed. + +**i2rand(a, b)** + +: Takes the truncated value of **a** and **b** and uses them as inclusive + bounds to enerate a pseudo-random integer. If the difference of the + truncated values of **a** and **b** is **0**, then the truncated value is + returned, and **seed** is *not* changed. Otherwise, this function will + change the value of **seed**. **srand(x)** diff --git a/contrib/bc/manuals/bc/HN.1 b/contrib/bc/manuals/bc/HN.1 index 10d9621c42ee..3f567180a168 100644 --- a/contrib/bc/manuals/bc/HN.1 +++ b/contrib/bc/manuals/bc/HN.1 @@ -1357,8 +1357,7 @@ Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement .PP -The \[lq]expressions in a \f[B]stream\f[R] statement may also be -strings. +The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string as though the string had appeared as its own statement. @@ -1579,6 +1578,14 @@ the rounding mode round away from \f[B]0\f[R] \f[B]f(x)\f[R] Returns the factorial of the truncated absolute value of \f[B]x\f[R]. .TP +\f[B]max(a, b)\f[R] +Returns \f[B]a\f[R] if \f[B]a\f[R] is greater than \f[B]b\f[R]; +otherwise, returns \f[B]b\f[R]. +.TP +\f[B]min(a, b)\f[R] +Returns \f[B]a\f[R] if \f[B]a\f[R] is less than \f[B]b\f[R]; otherwise, +returns \f[B]b\f[R]. +.TP \f[B]perm(n, k)\f[R] Returns the permutation of the truncated absolute value of \f[B]n\f[R] of the truncated absolute value of \f[B]k\f[R], if \f[B]k <= n\f[R]. @@ -1589,6 +1596,10 @@ Returns the combination of the truncated absolute value of \f[B]n\f[R] of the truncated absolute value of \f[B]k\f[R], if \f[B]k <= n\f[R]. If not, it returns \f[B]0\f[R]. .TP +\f[B]fib(n)\f[R] +Returns the Fibonacci number of the truncated absolute value of +\f[B]n\f[R]. +.TP \f[B]l2(x)\f[R] Returns the logarithm base \f[B]2\f[R] of \f[B]x\f[R]. .RS @@ -1759,7 +1770,7 @@ Functions\f[R] subsection below). .RE .TP \f[B]frand(p)\f[R] -Generates a pseudo-random number between \f[B]0\f[R] (inclusive) and +Generates a pseudo-random integer between \f[B]0\f[R] (inclusive) and \f[B]1\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will @@ -1768,14 +1779,22 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and \f[B]seed\f[R] is \f[I]not\f[R] changed. .TP \f[B]ifrand(i, p)\f[R] -Generates a pseudo-random number that is between \f[B]0\f[R] (inclusive) -and the truncated absolute value of \f[B]i\f[R] (exclusive) with the -number of decimal digits after the decimal point equal to the truncated -absolute value of \f[B]p\f[R]. +Generates a pseudo-random integer that is between \f[B]0\f[R] +(inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive) +with the number of decimal digits after the decimal point equal to the +truncated absolute value of \f[B]p\f[R]. If the absolute value of \f[B]i\f[R] is greater than or equal to \f[B]2\f[R], and \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will change the value of \f[B]seed\f[R]; otherwise, \f[B]0\f[R] -is returned and \f[B]seed\f[R] is not changed. +is returned, and \f[B]seed\f[R] is not changed. +.TP +\f[B]i2rand(a, b)\f[R] +Takes the truncated value of \f[B]a\f[R] and \f[B]b\f[R] and uses them +as inclusive bounds to enerate a pseudo-random integer. +If the difference of the truncated values of \f[B]a\f[R] and \f[B]b\f[R] +is \f[B]0\f[R], then the truncated value is returned, and \f[B]seed\f[R] +is \f[I]not\f[R] changed. +Otherwise, this function will change the value of \f[B]seed\f[R]. .TP \f[B]srand(x)\f[R] Returns \f[B]x\f[R] with its sign flipped with probability diff --git a/contrib/bc/manuals/bc/HN.1.md b/contrib/bc/manuals/bc/HN.1.md index 25f136a21e0a..09ea524d95c2 100644 --- a/contrib/bc/manuals/bc/HN.1.md +++ b/contrib/bc/manuals/bc/HN.1.md @@ -1068,7 +1068,7 @@ like any other expression that is printed. ## Stream Statement -The "expressions in a **stream** statement may also be strings. +The expressions in a **stream** statement may also be strings. If a **stream** statement is given a string, it prints the string as though the string had appeared as its own statement. In other words, the **stream** @@ -1259,6 +1259,14 @@ The extended library is a **non-portable extension**. : Returns the factorial of the truncated absolute value of **x**. +**max(a, b)** + +: Returns **a** if **a** is greater than **b**; otherwise, returns **b**. + +**min(a, b)** + +: Returns **a** if **a** is less than **b**; otherwise, returns **b**. + **perm(n, k)** : Returns the permutation of the truncated absolute value of **n** of the @@ -1269,6 +1277,10 @@ The extended library is a **non-portable extension**. : Returns the combination of the truncated absolute value of **n** of the truncated absolute value of **k**, if **k \<= n**. If not, it returns **0**. +**fib(n)** + +: Returns the Fibonacci number of the truncated absolute value of **n**. + **l2(x)** : Returns the logarithm base **2** of **x**. @@ -1418,7 +1430,7 @@ The extended library is a **non-portable extension**. **frand(p)** -: Generates a pseudo-random number between **0** (inclusive) and **1** +: Generates a pseudo-random integer between **0** (inclusive) and **1** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If **p** is not **0**, then calling this function will change the value of **seed**. If **p** is **0**, @@ -1426,12 +1438,20 @@ The extended library is a **non-portable extension**. **ifrand(i, p)** -: Generates a pseudo-random number that is between **0** (inclusive) and the +: Generates a pseudo-random integer that is between **0** (inclusive) and the truncated absolute value of **i** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If the absolute value of **i** is greater than or equal to **2**, and **p** is not **0**, then calling this function will change the value of - **seed**; otherwise, **0** is returned and **seed** is not changed. + **seed**; otherwise, **0** is returned, and **seed** is not changed. + +**i2rand(a, b)** + +: Takes the truncated value of **a** and **b** and uses them as inclusive + bounds to enerate a pseudo-random integer. If the difference of the + truncated values of **a** and **b** is **0**, then the truncated value is + returned, and **seed** is *not* changed. Otherwise, this function will + change the value of **seed**. **srand(x)** diff --git a/contrib/bc/manuals/bc/N.1 b/contrib/bc/manuals/bc/N.1 index f39e51277b65..79e053ec41fa 100644 --- a/contrib/bc/manuals/bc/N.1 +++ b/contrib/bc/manuals/bc/N.1 @@ -1357,8 +1357,7 @@ Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement .PP -The \[lq]expressions in a \f[B]stream\f[R] statement may also be -strings. +The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string as though the string had appeared as its own statement. @@ -1579,6 +1578,14 @@ the rounding mode round away from \f[B]0\f[R] \f[B]f(x)\f[R] Returns the factorial of the truncated absolute value of \f[B]x\f[R]. .TP +\f[B]max(a, b)\f[R] +Returns \f[B]a\f[R] if \f[B]a\f[R] is greater than \f[B]b\f[R]; +otherwise, returns \f[B]b\f[R]. +.TP +\f[B]min(a, b)\f[R] +Returns \f[B]a\f[R] if \f[B]a\f[R] is less than \f[B]b\f[R]; otherwise, +returns \f[B]b\f[R]. +.TP \f[B]perm(n, k)\f[R] Returns the permutation of the truncated absolute value of \f[B]n\f[R] of the truncated absolute value of \f[B]k\f[R], if \f[B]k <= n\f[R]. @@ -1589,6 +1596,10 @@ Returns the combination of the truncated absolute value of \f[B]n\f[R] of the truncated absolute value of \f[B]k\f[R], if \f[B]k <= n\f[R]. If not, it returns \f[B]0\f[R]. .TP +\f[B]fib(n)\f[R] +Returns the Fibonacci number of the truncated absolute value of +\f[B]n\f[R]. +.TP \f[B]l2(x)\f[R] Returns the logarithm base \f[B]2\f[R] of \f[B]x\f[R]. .RS @@ -1759,7 +1770,7 @@ Functions\f[R] subsection below). .RE .TP \f[B]frand(p)\f[R] -Generates a pseudo-random number between \f[B]0\f[R] (inclusive) and +Generates a pseudo-random integer between \f[B]0\f[R] (inclusive) and \f[B]1\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will @@ -1768,14 +1779,22 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and \f[B]seed\f[R] is \f[I]not\f[R] changed. .TP \f[B]ifrand(i, p)\f[R] -Generates a pseudo-random number that is between \f[B]0\f[R] (inclusive) -and the truncated absolute value of \f[B]i\f[R] (exclusive) with the -number of decimal digits after the decimal point equal to the truncated -absolute value of \f[B]p\f[R]. +Generates a pseudo-random integer that is between \f[B]0\f[R] +(inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive) +with the number of decimal digits after the decimal point equal to the +truncated absolute value of \f[B]p\f[R]. If the absolute value of \f[B]i\f[R] is greater than or equal to \f[B]2\f[R], and \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will change the value of \f[B]seed\f[R]; otherwise, \f[B]0\f[R] -is returned and \f[B]seed\f[R] is not changed. +is returned, and \f[B]seed\f[R] is not changed. +.TP +\f[B]i2rand(a, b)\f[R] +Takes the truncated value of \f[B]a\f[R] and \f[B]b\f[R] and uses them +as inclusive bounds to enerate a pseudo-random integer. +If the difference of the truncated values of \f[B]a\f[R] and \f[B]b\f[R] +is \f[B]0\f[R], then the truncated value is returned, and \f[B]seed\f[R] +is \f[I]not\f[R] changed. +Otherwise, this function will change the value of \f[B]seed\f[R]. .TP \f[B]srand(x)\f[R] Returns \f[B]x\f[R] with its sign flipped with probability diff --git a/contrib/bc/manuals/bc/N.1.md b/contrib/bc/manuals/bc/N.1.md index 56a4b2274d29..d4a08817c952 100644 --- a/contrib/bc/manuals/bc/N.1.md +++ b/contrib/bc/manuals/bc/N.1.md @@ -1068,7 +1068,7 @@ like any other expression that is printed. ## Stream Statement -The "expressions in a **stream** statement may also be strings. +The expressions in a **stream** statement may also be strings. If a **stream** statement is given a string, it prints the string as though the string had appeared as its own statement. In other words, the **stream** @@ -1259,6 +1259,14 @@ The extended library is a **non-portable extension**. : Returns the factorial of the truncated absolute value of **x**. +**max(a, b)** + +: Returns **a** if **a** is greater than **b**; otherwise, returns **b**. + +**min(a, b)** + +: Returns **a** if **a** is less than **b**; otherwise, returns **b**. + **perm(n, k)** : Returns the permutation of the truncated absolute value of **n** of the @@ -1269,6 +1277,10 @@ The extended library is a **non-portable extension**. : Returns the combination of the truncated absolute value of **n** of the truncated absolute value of **k**, if **k \<= n**. If not, it returns **0**. +**fib(n)** + +: Returns the Fibonacci number of the truncated absolute value of **n**. + **l2(x)** : Returns the logarithm base **2** of **x**. @@ -1418,7 +1430,7 @@ The extended library is a **non-portable extension**. **frand(p)** -: Generates a pseudo-random number between **0** (inclusive) and **1** +: Generates a pseudo-random integer between **0** (inclusive) and **1** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If **p** is not **0**, then calling this function will change the value of **seed**. If **p** is **0**, @@ -1426,12 +1438,20 @@ The extended library is a **non-portable extension**. **ifrand(i, p)** -: Generates a pseudo-random number that is between **0** (inclusive) and the +: Generates a pseudo-random integer that is between **0** (inclusive) and the truncated absolute value of **i** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If the absolute value of **i** is greater than or equal to **2**, and **p** is not **0**, then calling this function will change the value of - **seed**; otherwise, **0** is returned and **seed** is not changed. + **seed**; otherwise, **0** is returned, and **seed** is not changed. *** 1146 LINES SKIPPED *** From nobody Wed Jan 10 16:38:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9D4n06Cvz57K7G; Wed, 10 Jan 2024 16:38:17 +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 4T9D4m5tKBz58lB; Wed, 10 Jan 2024 16:38:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704904696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YuK4fVUqyFu26HN2o8ml+2eC7cW7vN/6lwZ1MSdBZq8=; b=O6h69LLuWuvWJ8Lw/5nEKsP55wclMf76PLuVbXD7WZoIrzeOYyGOS/iQaaZgi2zOlELt+6 Y8O5mqNSN2X1SaAZbzbn2/SAglZ4I+Xtx66SXi8ejFd9ng3MOS3cYgY/ZnmzzQXEh1tmm3 PcW3qXKFAJG+HDBAnPU4t4nWK8P+0tbaeOcPh3Znxkn1CcsdAjEGIlByI7mqYqtvz8FxE/ Zsbb4f9ipcXSEWx3pkvnb/1xSfgsIZPfa5o8awgDplqym7rUFfRs1iz/p85oGd2ssyTExi 9WBqDw6Q4k362kddt/oPTNqycGHgjzYYOHBraDSo3wJj/eRGCx+nP5AFgJAadA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704904696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YuK4fVUqyFu26HN2o8ml+2eC7cW7vN/6lwZ1MSdBZq8=; b=syZZqwLLdHE1kFTrTwpXNjgXg9Y7MCquSvXD8/LvGCgcFeBcTlDKTrJZTjtNssiHJNeSCZ Mg6QAEyBUpBzu8W/Rh4rS/mVNyp2assftvn475+q4urCKiG2Fpv4tG+X1w4iJQCAPJbJ70 SD80x7EpGzx5l+9o+16N2a/tsF+LyMwwLd0l/AugHoljLsCxo/9HbCvw4W8WFWoNA2vRpo 0U4STK5qAeNGs42LFX/Fy4CTwTPGHTjv8M2XJGSE73+zBtl0CLwgS5GTiMfOLzwVodl09t oQOHWXg+kyR4VXvunV/y57A2ThBjUDQT2jByvbGCygfTG39nhc781rJsGPnyDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704904696; a=rsa-sha256; cv=none; b=OoSuSPaH+6CbQMUBHGrN1WO1U82Vj7JpLeAhIx7UGmLPGbNJqtor72EIjuZPZ5gMN/pDsv HKDHEiW9o4BQKBW95L5ZnLSnuzgHzOz7sflxR+BUbe2Fp2cyIViJyCpcQ2f6lhv3Auu//P 4FiOM4rGXV6VIokjAhxamY+rXFoVW9jrAkDhSk+/uBhMj2Rd0dl9Ukffcx0UmvVXF2cJ7C 1n1+G0J4V3sR0qT6S7CDAqQrw/LWFSUl1UNZNu6lqwU5J9YsFTJh4/wB+sNVOWrl7coJ9k BJIMhYvc4Ek27VtUj7ITNdTXrxJL7c5FUYygBHAROuFCnEyjNElgywjjnrQZHg== 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 4T9D4m4pjdzjp1; Wed, 10 Jan 2024 16:38:16 +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 40AGcGqp069271; Wed, 10 Jan 2024 16:38:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AGcGGc069268; Wed, 10 Jan 2024 16:38:16 GMT (envelope-from git) Date: Wed, 10 Jan 2024 16:38:16 GMT Message-Id: <202401101638.40AGcGGc069268@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: e6857bd4d7b4 - main - vendor/bc: upgrade to version 6.7.4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6857bd4d7b4bf39ea32b9dcd34f8371164c356e Auto-Submitted: auto-generated The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=e6857bd4d7b4bf39ea32b9dcd34f8371164c356e commit e6857bd4d7b4bf39ea32b9dcd34f8371164c356e Author: Stefan Eßer AuthorDate: 2024-01-02 13:05:20 +0000 Commit: Stefan Eßer CommitDate: 2024-01-10 16:35:14 +0000 vendor/bc: upgrade to version 6.7.4 Documentation updates only, no functional changes to the software. (cherry picked from commit a3f3a7b4dc80d577e4c8fc64dfbbb359d2e24228) --- contrib/bc/NEWS.md | 14 ++++- contrib/bc/configure.sh | 18 +++--- contrib/bc/include/version.h | 2 +- contrib/bc/manuals/bc/A.1 | 139 ++++++++++++------------------------------ contrib/bc/manuals/bc/A.1.md | 20 +++--- contrib/bc/manuals/bc/E.1 | 112 +++++++++------------------------- contrib/bc/manuals/bc/EH.1 | 110 +++++++++------------------------ contrib/bc/manuals/bc/EHN.1 | 109 +++++++++------------------------ contrib/bc/manuals/bc/EN.1 | 111 +++++++++------------------------ contrib/bc/manuals/bc/H.1 | 137 ++++++++++++----------------------------- contrib/bc/manuals/bc/H.1.md | 20 +++--- contrib/bc/manuals/bc/HN.1 | 136 ++++++++++++----------------------------- contrib/bc/manuals/bc/HN.1.md | 20 +++--- contrib/bc/manuals/bc/N.1 | 138 ++++++++++++----------------------------- contrib/bc/manuals/bc/N.1.md | 20 +++--- contrib/bc/manuals/bcl.3 | 43 +++---------- contrib/bc/manuals/dc/A.1 | 49 ++------------- contrib/bc/manuals/dc/E.1 | 48 ++------------- contrib/bc/manuals/dc/EH.1 | 46 ++------------ contrib/bc/manuals/dc/EHN.1 | 45 ++------------ contrib/bc/manuals/dc/EN.1 | 47 ++------------ contrib/bc/manuals/dc/H.1 | 47 ++------------ contrib/bc/manuals/dc/HN.1 | 46 ++------------ contrib/bc/manuals/dc/N.1 | 48 ++------------- 24 files changed, 392 insertions(+), 1133 deletions(-) diff --git a/contrib/bc/NEWS.md b/contrib/bc/NEWS.md index d4b160d74d35..240e02f11388 100644 --- a/contrib/bc/NEWS.md +++ b/contrib/bc/NEWS.md @@ -1,5 +1,17 @@ # News +## 6.7.4 + +This is a production release to fix problems in the `bc` manual. + +Users only need to update if desired. + +## 6.7.3 + +This is a production release to fix the library build on Mac OSX. + +Users on other platforms do *not* need to update. + ## 6.7.2 This is a production release to remove some debugging code that I accidentally @@ -773,7 +785,7 @@ function, `strdup()`, which is not in POSIX 2001, and it is in the X/Open System Interfaces group 2001. It is, however, in POSIX 2008, and since POSIX 2008 is old enough to be supported anywhere that I care, that should be the requirement. -Second, the BcVm global variable was put into `bss`. This actually slightly +Second, the `BcVm` global variable was put into `bss`. This actually slightly reduces the size of the executable from a massive code shrink, and it will stop `bc` from allocating a large set of memory when `bc` starts. diff --git a/contrib/bc/configure.sh b/contrib/bc/configure.sh index 35d55058f8f1..9292f094bb17 100755 --- a/contrib/bc/configure.sh +++ b/contrib/bc/configure.sh @@ -461,7 +461,7 @@ find_src_files() { fi - _find_src_files_files=$(find "$scriptdir/src/" -depth -name "*.c" -print | LC_ALL=C sort) + _find_src_files_files=$(find "$scriptdir/src" -depth -name "*.c" -print | LC_ALL=C sort) _find_src_files_result="" @@ -772,7 +772,7 @@ predefined_build() { dc_default_digit_clamp=0;; GDH) - CFLAGS="-flto -Weverything -Wno-padded -Wno-unsafe-buffer-usage -Werror -pedantic -std=c11" + CFLAGS="-flto -Weverything -Wno-padded -Wno-unsafe-buffer-usage -Wno-poison-system-directories -Werror -pedantic -std=c11" bc_only=0 dc_only=0 coverage=0 @@ -806,7 +806,7 @@ predefined_build() { dc_default_digit_clamp=1;; DBG) - CFLAGS="-Weverything -Wno-padded -Wno-unsafe-buffer-usage -Werror -pedantic -std=c11" + CFLAGS="-Weverything -Wno-padded -Wno-unsafe-buffer-usage -Wno-poison-system-directories -Werror -pedantic -std=c11" bc_only=0 dc_only=0 coverage=0 @@ -1367,12 +1367,7 @@ if [ "$debug" -eq 1 ]; then CFLAGS="-g $CFLAGS" else - CPPFLAGS="-DNDEBUG $CPPFLAGS" - - if [ "$strip_bin" -ne 0 ]; then - LDFLAGS="-s $LDFLAGS" - fi fi # Set optimization CFLAGS. @@ -1694,6 +1689,11 @@ else apple="" fi +# We can't use the linker's strip flag on Mac OSX. +if [ "$debug" -eq 0 ] && [ "$apple" == "" ] && [ "$strip_bin" -ne 0 ]; then + LDFLAGS="-s $LDFLAGS" +fi + # Test OpenBSD. This is not in an if statement because regardless of whatever # the user says, we need to know if we are on OpenBSD to activate _BSD_SOURCE. # No, I cannot `#define _BSD_SOURCE` in a header because OpenBSD's patched GCC @@ -1866,6 +1866,8 @@ dc_tests=$(gen_std_test_targets dc) dc_script_tests=$(gen_script_test_targets dc) dc_err_tests=$(gen_err_test_targets dc) +printf 'unneeded: %s\n' "$unneeded" + # Print out the values; this is for debugging. printf 'Version: %s\n' "$version" diff --git a/contrib/bc/include/version.h b/contrib/bc/include/version.h index 1cd13e9878c1..d481cb10abf1 100644 --- a/contrib/bc/include/version.h +++ b/contrib/bc/include/version.h @@ -37,6 +37,6 @@ #define BC_VERSION_H /// The current version. -#define VERSION 6.7.2 +#define VERSION 6.7.4 #endif // BC_VERSION_H diff --git a/contrib/bc/manuals/bc/A.1 b/contrib/bc/manuals/bc/A.1 index fc75b5c70ac3..1810beaf9291 100644 --- a/contrib/bc/manuals/bc/A.1 +++ b/contrib/bc/manuals/bc/A.1 @@ -25,14 +25,12 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2023" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "November 2023" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME -.PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS -.PP \f[B]bc\f[R] [\f[B]-cCghilPqRsvVw\f[R]] [\f[B]--digit-clamp\f[R]] [\f[B]--no-digit-clamp\f[R]] [\f[B]--global-stacks\f[R]] [\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] @@ -48,7 +46,6 @@ bc - arbitrary-precision decimal arithmetic language and calculator [\f[B]-S\f[R] \f[I]scale\f[R]] [\f[B]--scale\f[R]=\f[I]scale\f[R]] [\f[B]-E\f[R] \f[I]seed\f[R]] [\f[B]--seed\f[R]=\f[I]seed\f[R]] .SH DESCRIPTION -.PP bc(1) is an interactive processor for a language first standardized in 1991 by POSIX. (See the \f[B]STANDARDS\f[R] section.) @@ -77,7 +74,6 @@ If parsing scripts meant for other bc(1) implementations still does not work, that is a bug and should be reported. See the \f[B]BUGS\f[R] section. .SH OPTIONS -.PP The following are the options that bc(1) accepts. .TP \f[B]-C\f[R], \f[B]--no-digit-clamp\f[R] @@ -189,19 +185,16 @@ without worrying that the change will affect other functions. Thus, a hypothetical function named \f[B]output(x,b)\f[R] that simply printed \f[B]x\f[R] in base \f[B]b\f[R] could be written like this: .IP -.nf -\f[C] +.EX define void output(x, b) { obase=b x } -\f[R] -.fi +.EE .PP instead of like this: .IP -.nf -\f[C] +.EX define void output(x, b) { auto c c=obase @@ -209,8 +202,7 @@ define void output(x, b) { x obase=c } -\f[R] -.fi +.EE .PP This makes writing functions much easier. .PP @@ -228,12 +220,10 @@ converter, it is possible to replace that capability with various shell aliases. Examples: .IP -.nf -\f[C] +.EX alias d2o=\[dq]bc -e ibase=A -e obase=8\[dq] alias h2b=\[dq]bc -e ibase=G -e obase=2\[dq] -\f[R] -.fi +.EE .PP Second, if the purpose of a function is to set \f[B]ibase\f[R], \f[B]obase\f[R], \f[B]scale\f[R], or \f[B]seed\f[R] globally for any @@ -251,11 +241,9 @@ If a function desires to not affect the sequence of pseudo-random numbers of its parents, but wants to use the same \f[B]seed\f[R], it can use the following line: .IP -.nf -\f[C] +.EX seed = seed -\f[R] -.fi +.EE .PP If the behavior of this option is desired for every run of bc(1), then users could make sure to define \f[B]BC_ENV_ARGS\f[R] and include this @@ -485,7 +473,6 @@ This is a \f[B]non-portable extension\f[R]. .PP All long options are \f[B]non-portable extensions\f[R]. .SH STDIN -.PP If no files or expressions are given by the \f[B]-f\f[R], \f[B]--file\f[R], \f[B]-e\f[R], or \f[B]--expression\f[R] options, then bc(1) reads from \f[B]stdin\f[R]. @@ -502,7 +489,6 @@ Second, after an \f[B]if\f[R] statement, bc(1) doesn\[cq]t know if an \f[B]else\f[R] statement will follow, so it will not execute until it knows there will not be an \f[B]else\f[R] statement. .SH STDOUT -.PP Any non-error output is written to \f[B]stdout\f[R]. In addition, if history (see the \f[B]HISTORY\f[R] section) and the prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output @@ -511,7 +497,7 @@ to \f[B]stdout\f[R]. \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in -\f[B]bc >&-\f[R], it will quit with an error. +\f[B]bc >&-\f[R], it will quit with an error. This is done so that bc(1) can report problems when \f[B]stdout\f[R] is redirected to a file. .PP @@ -519,13 +505,12 @@ If there are scripts that depend on the behavior of other bc(1) implementations, it is recommended that those scripts be changed to redirect \f[B]stdout\f[R] to \f[B]/dev/null\f[R]. .SH STDERR -.PP Any error output is written to \f[B]stderr\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in -\f[B]bc 2>&-\f[R], it will quit with an error. +\f[B]bc 2>&-\f[R], it will quit with an error. This is done so that bc(1) can exit with an error code when \f[B]stderr\f[R] is redirected to a file. .PP @@ -533,7 +518,6 @@ If there are scripts that depend on the behavior of other bc(1) implementations, it is recommended that those scripts be changed to redirect \f[B]stderr\f[R] to \f[B]/dev/null\f[R]. .SH SYNTAX -.PP The syntax for bc(1) programs is mostly C-like, with some differences. This bc(1) follows the POSIX standard (see the \f[B]STANDARDS\f[R] section), which is a much more thorough resource for the language this @@ -618,7 +602,6 @@ These are \f[B]non-portable extensions\f[R]. .PP Either semicolons or newlines may separate statements. .SS Comments -.PP There are two kinds of comments: .IP "1." 3 Block comments are enclosed in \f[B]/*\f[R] and \f[B]*/\f[R]. @@ -627,7 +610,6 @@ Line comments go from \f[B]#\f[R] until, and not including, the next newline. This is a \f[B]non-portable extension\f[R]. .SS Named Expressions -.PP The following are named expressions in bc(1): .IP "1." 3 Variables: \f[B]I\f[R] @@ -684,7 +666,6 @@ Named expressions are required as the operand of of \f[B]assignment\f[R] operators (see the \f[I]Operators\f[R] subsection). .SS Operands -.PP The following are valid operands in bc(1): .IP " 1." 4 Numbers (see the \f[I]Numbers\f[R] subsection below). @@ -829,7 +810,6 @@ where a reproducible stream of pseudo-random numbers is \f[I]ESSENTIAL\f[R]. In any other case, use a non-seeded pseudo-random number generator. .SS Numbers -.PP Numbers are strings made up of digits, uppercase letters, and at most \f[B]1\f[R] period for a radix. Numbers can have up to \f[B]BC_NUM_MAX\f[R] digits. @@ -901,7 +881,6 @@ number string \f[B]FFeA\f[R], the resulting decimal number will be Accepting input as scientific notation is a \f[B]non-portable extension\f[R]. .SS Operators -.PP The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. @@ -1018,9 +997,9 @@ The operators will be described in more detail below. .TP \f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] -operators behave exactly like they would in C. -They require a named expression (see the \f[I]Named Expressions\f[R] -subsection) as an operand. +operators behave exactly like they would in C. They require a named +expression (see the \f[I]Named Expressions\f[R] subsection) as an +operand. .RS .PP The prefix versions of these operators are more efficient; use them @@ -1192,7 +1171,6 @@ This is \f[I]not\f[R] a short-circuit operator. This is a \f[B]non-portable extension\f[R]. .RE .SS Statements -.PP The following items are statements: .IP " 1." 4 \f[B]E\f[R] @@ -1270,11 +1248,9 @@ occur before the \f[B]quit\f[R] statement before exiting. .PP In other words, for the bc(1) code below: .IP -.nf -\f[C] +.EX for (i = 0; i < 3; ++i) i; quit -\f[R] -.fi +.EE .PP Other bc(1) implementations will print nothing, and this bc(1) will print \f[B]0\f[R], \f[B]1\f[R], and \f[B]2\f[R] on successive lines @@ -1305,7 +1281,6 @@ run with either the \f[B]-s\f[R] or \f[B]-w\f[R] command-line options Printing numbers in scientific notation and/or engineering notation is a \f[B]non-portable extension\f[R]. .SS Strings -.PP If strings appear as a statement by themselves, they are printed without a trailing newline. .PP @@ -1324,7 +1299,6 @@ resets (see the \f[B]RESET\f[R] section). Assigning strings to variables and array elements and passing them to functions are \f[B]non-portable extensions\f[R]. .SS Print Statement -.PP The \[lq]expressions\[rq] in a \f[B]print\f[R] statement may also be strings. If they are, there are backslash escape sequences that are interpreted @@ -1356,7 +1330,6 @@ character to be printed as-is. Any non-string expression in a print statement shall be assigned to \f[B]last\f[R], like any other expression that is printed. .SS Stream Statement -.PP The expressions in a \f[B]stream\f[R] statement may also be strings. .PP If a \f[B]stream\f[R] statement is given a string, it prints the string @@ -1370,17 +1343,14 @@ The result is then printed as though \f[B]obase\f[R] is \f[B]256\f[R] and each digit is interpreted as an 8-bit ASCII character, making it a byte stream. .SS Order of Evaluation -.PP All expressions in a statment are evaluated left to right, except as necessary to maintain order of operations. This means, for example, assuming that \f[B]i\f[R] is equal to \f[B]0\f[R], in the expression .IP -.nf -\f[C] +.EX a[i++] = i++ -\f[R] -.fi +.EE .PP the first (or 0th) element of \f[B]a\f[R] is set to \f[B]1\f[R], and \f[B]i\f[R] is equal to \f[B]2\f[R] at the end of the expression. @@ -1389,28 +1359,23 @@ This includes function arguments. Thus, assuming \f[B]i\f[R] is equal to \f[B]0\f[R], this means that in the expression .IP -.nf -\f[C] +.EX x(i++, i++) -\f[R] -.fi +.EE .PP the first argument passed to \f[B]x()\f[R] is \f[B]0\f[R], and the second argument is \f[B]1\f[R], while \f[B]i\f[R] is equal to \f[B]2\f[R] before the function starts executing. .SH FUNCTIONS -.PP Function definitions are as follows: .IP -.nf -\f[C] +.EX define I(I,...,I){ auto I,...,I S;...;S return(E) } -\f[R] -.fi +.EE .PP Any \f[B]I\f[R] in the parameter list or \f[B]auto\f[R] list may be replaced with \f[B]I[]\f[R] to make a parameter or \f[B]auto\f[R] var an @@ -1438,18 +1403,15 @@ equivalent to \f[B]return (0)\f[R], unless the function is a \f[B]void\f[R] function (see the \f[I]Void Functions\f[R] subsection below). .SS Void Functions -.PP Functions can also be \f[B]void\f[R] functions, defined as follows: .IP -.nf -\f[C] +.EX define void I(I,...,I){ auto I,...,I S;...;S return } -\f[R] -.fi +.EE .PP They can only be used as standalone expressions, where such an expression would be printed alone, except in a print statement. @@ -1465,15 +1427,12 @@ The word \[lq]void\[rq] is only treated specially right after the .PP This is a \f[B]non-portable extension\f[R]. .SS Array References -.PP For any array in the parameter list, if the array is declared in the form .IP -.nf -\f[C] +.EX *I[] -\f[R] -.fi +.EE .PP it is a \f[B]reference\f[R]. Any changes to the array in the function are reflected, when the @@ -1483,7 +1442,6 @@ Other than this, all function arguments are passed by value. .PP This is a \f[B]non-portable extension\f[R]. .SH LIBRARY -.PP All of the functions below, including the functions in the extended math library (see the \f[I]Extended Library\f[R] subsection below), are available when the \f[B]-l\f[R] or \f[B]--mathlib\f[R] command-line @@ -1491,7 +1449,6 @@ flags are given, except that the extended math library is not available when the \f[B]-s\f[R] option, the \f[B]-w\f[R] option, or equivalents are given. .SS Standard Library -.PP The standard (see the \f[B]STANDARDS\f[R] section) defines the following functions for the math library: .TP @@ -1544,7 +1501,6 @@ This is a transcendental function (see the \f[I]Transcendental Functions\f[R] subsection below). .RE .SS Extended Library -.PP The extended library is \f[I]not\f[R] loaded when the \f[B]-s\f[R]/\f[B]--standard\f[R] or \f[B]-w\f[R]/\f[B]--warn\f[R] options are given since they are not part of the library defined by the @@ -1866,7 +1822,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]bnot8(x)\f[R] Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as -though it has \f[B]8\f[R] binary digits (1 unsigned byte). +though it has \f[B]8\f[R] binary digits (\f[B]1\f[R] unsigned byte). .RS .PP If you want to a use signed two\[cq]s complement argument, use @@ -1875,7 +1831,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]bnot16(x)\f[R] Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as -though it has \f[B]16\f[R] binary digits (2 unsigned bytes). +though it has \f[B]16\f[R] binary digits (\f[B]2\f[R] unsigned bytes). .RS .PP If you want to a use signed two\[cq]s complement argument, use @@ -1884,7 +1840,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]bnot32(x)\f[R] Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as -though it has \f[B]32\f[R] binary digits (4 unsigned bytes). +though it has \f[B]32\f[R] binary digits (\f[B]4\f[R] unsigned bytes). .RS .PP If you want to a use signed two\[cq]s complement argument, use @@ -1893,7 +1849,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]bnot64(x)\f[R] Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as -though it has \f[B]64\f[R] binary digits (8 unsigned bytes). +though it has \f[B]64\f[R] binary digits (\f[B]8\f[R] unsigned bytes). .RS .PP If you want to a use signed two\[cq]s complement argument, use @@ -1921,7 +1877,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]brev8(x)\f[R] Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as -though it has 8 binary digits (1 unsigned byte). +though it has 8 binary digits (\f[B]1\f[R] unsigned byte). .RS .PP If you want to a use signed two\[cq]s complement argument, use @@ -1930,7 +1886,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]brev16(x)\f[R] Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as -though it has 16 binary digits (2 unsigned bytes). +though it has 16 binary digits (\f[B]2\f[R] unsigned bytes). .RS .PP If you want to a use signed two\[cq]s complement argument, use @@ -1939,7 +1895,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]brev32(x)\f[R] Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as -though it has 32 binary digits (4 unsigned bytes). +though it has 32 binary digits (\f[B]4\f[R] unsigned bytes). .RS .PP If you want to a use signed two\[cq]s complement argument, use @@ -1948,7 +1904,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]brev64(x)\f[R] Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as -though it has 64 binary digits (8 unsigned bytes). +though it has 64 binary digits (\f[B]8\f[R] unsigned bytes). .RS .PP If you want to a use signed two\[cq]s complement argument, use @@ -2001,7 +1957,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]brol32(x, p)\f[R] Does a left bitwise rotatation of the truncated absolute value of -\f[B]x\f[R], as though it has \f[B]32\f[R] binary digits (\f[B]2\f[R] +\f[B]x\f[R], as though it has \f[B]32\f[R] binary digits (\f[B]4\f[R] unsigned bytes), by the number of places equal to the truncated absolute value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]32\f[R]. .RS @@ -2012,7 +1968,7 @@ If you want to a use signed two\[cq]s complement argument, use .TP \f[B]brol64(x, p)\f[R] Does a left bitwise rotatation of the truncated absolute value of -\f[B]x\f[R], as though it has \f[B]64\f[R] binary digits (\f[B]2\f[R] +\f[B]x\f[R], as though it has \f[B]64\f[R] binary digits (\f[B]8\f[R] unsigned bytes), by the number of places equal to the truncated absolute value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]64\f[R]. .RS @@ -2457,7 +2413,6 @@ This is a \f[B]void\f[R] function (see the \f[I]Void Functions\f[R] subsection of the \f[B]FUNCTIONS\f[R] section). .RE .SS Transcendental Functions -.PP All transcendental functions can return slightly inaccurate results, up to 1 ULP (https://en.wikipedia.org/wiki/Unit_in_the_last_place). This is unavoidable, and the article at @@ -2513,7 +2468,6 @@ The transcendental functions in the extended math library are: .IP \[bu] 2 \f[B]d2r(x)\f[R] .SH RESET -.PP When bc(1) encounters an error or a signal that it has a non-default handler for, it resets. This means that several things happen. @@ -2534,7 +2488,6 @@ Note that this reset behavior is different from the GNU bc(1), which attempts to start executing the statement right after the one that caused an error. .SH PERFORMANCE -.PP Most bc(1) implementations use \f[B]char\f[R] types to calculate the value of \f[B]1\f[R] decimal digit at a time, but that can be slow. This bc(1) does something different. @@ -2557,7 +2510,6 @@ checking. This integer type depends on the value of \f[B]BC_LONG_BIT\f[R], but is always at least twice as large as the integer type used to store digits. .SH LIMITS -.PP The following are the limits on bc(1): .TP \f[B]BC_LONG_BIT\f[R] @@ -2626,7 +2578,6 @@ large (at least on 64-bit machines) that there should not be any point at which they become a problem. In fact, memory should be exhausted before these limits should be hit. .SH ENVIRONMENT VARIABLES -.PP As \f[B]non-portable extensions\f[R], bc(1) recognizes the following environment variables: .TP @@ -2765,7 +2716,6 @@ This environment variable overrides the default, which can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options. .RE .SH EXIT STATUS -.PP bc(1) returns the following exit statuses: .TP \f[B]0\f[R] @@ -2844,7 +2794,6 @@ These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the \f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE -.PP Per the standard (see the \f[B]STANDARDS\f[R] section), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] @@ -2858,7 +2807,6 @@ bc(1) may also reset on \f[B]SIGINT\f[R] instead of exit, depending on the contents of, or default for, the \f[B]BC_SIGINT_RESET\f[R] environment variable (see the \f[B]ENVIRONMENT VARIABLES\f[R] section). .SH TTY MODE -.PP If \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are all connected to a TTY, then \[lq]TTY mode\[rq] is considered to be available, and thus, bc(1) can turn on TTY mode, subject to some @@ -2882,7 +2830,6 @@ required in the bc(1) standard (see the \f[B]STANDARDS\f[R] section), and interactive mode requires only \f[B]stdin\f[R] and \f[B]stdout\f[R] to be connected to a terminal. .SS Command-Line History -.PP Command-line history is only enabled if TTY mode is, i.e., that \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the \f[B]BC_TTY_MODE\f[R] environment variable (see the @@ -2890,7 +2837,6 @@ a TTY and the \f[B]BC_TTY_MODE\f[R] environment variable (see the TTY mode. See the \f[B]COMMAND LINE HISTORY\f[R] section for more information. .SS Prompt -.PP If TTY mode is available, then a prompt can be enabled. Like TTY mode itself, it can be turned on or off with an environment variable: \f[B]BC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R] @@ -2911,7 +2857,6 @@ and \f[B]--no-read-prompt\f[R] options. See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections for more details. .SH SIGNAL HANDLING -.PP Sending a \f[B]SIGINT\f[R] will cause bc(1) to do one of two things. .PP If bc(1) is not in interactive mode (see the \f[B]INTERACTIVE MODE\f[R] @@ -2946,7 +2891,6 @@ The one exception is \f[B]SIGHUP\f[R]; in that case, and only when bc(1) is in TTY mode (see the \f[B]TTY MODE\f[R] section), a \f[B]SIGHUP\f[R] will cause bc(1) to clean up and exit. .SH COMMAND LINE HISTORY -.PP bc(1) supports interactive command-line editing. .PP If bc(1) can be in TTY mode (see the \f[B]TTY MODE\f[R] section), @@ -2964,14 +2908,11 @@ the arrow keys. .PP \f[B]Note\f[R]: tabs are converted to 8 spaces. .SH LOCALES -.PP This bc(1) ships with support for adding error messages for different locales and thus, supports \f[B]LC_MESSAGES\f[R]. .SH SEE ALSO -.PP dc(1) .SH STANDARDS -.PP bc(1) is compliant with the IEEE Std 1003.1-2017 (\[lq]POSIX.1-2017\[rq]) specification at https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . @@ -2991,13 +2932,13 @@ the value of \f[B]LC_NUMERIC\f[R]. This bc(1) supports error messages for different locales, and thus, it supports \f[B]LC_MESSAGES\f[R]. .SH BUGS -.PP Before version \f[B]6.1.0\f[R], this bc(1) had incorrect behavior for the \f[B]quit\f[R] statement. .PP No other bugs are known. Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHORS -.PP -Gavin D. -Howard and contributors. +Gavin D. Howard \c +.MT gavin@gavinhoward.com +.ME \c +\ and contributors. diff --git a/contrib/bc/manuals/bc/A.1.md b/contrib/bc/manuals/bc/A.1.md index 3e593e16b481..77004822f73d 100644 --- a/contrib/bc/manuals/bc/A.1.md +++ b/contrib/bc/manuals/bc/A.1.md @@ -1513,7 +1513,7 @@ The extended library is a **non-portable extension**. **bnot8(x)** : Does a bitwise not of the truncated absolute value of **x** as though it has - **8** binary digits (1 unsigned byte). + **8** binary digits (**1** unsigned byte). If you want to a use signed two's complement argument, use **s2u(x)** to convert. @@ -1521,7 +1521,7 @@ The extended library is a **non-portable extension**. **bnot16(x)** : Does a bitwise not of the truncated absolute value of **x** as though it has - **16** binary digits (2 unsigned bytes). + **16** binary digits (**2** unsigned bytes). If you want to a use signed two's complement argument, use **s2u(x)** to convert. @@ -1529,7 +1529,7 @@ The extended library is a **non-portable extension**. **bnot32(x)** : Does a bitwise not of the truncated absolute value of **x** as though it has - **32** binary digits (4 unsigned bytes). + **32** binary digits (**4** unsigned bytes). If you want to a use signed two's complement argument, use **s2u(x)** to convert. @@ -1537,7 +1537,7 @@ The extended library is a **non-portable extension**. **bnot64(x)** : Does a bitwise not of the truncated absolute value of **x** as though it has - **64** binary digits (8 unsigned bytes). + **64** binary digits (**8** unsigned bytes). If you want to a use signed two's complement argument, use **s2u(x)** to convert. @@ -1561,7 +1561,7 @@ The extended library is a **non-portable extension**. **brev8(x)** : Runs a bit reversal on the truncated absolute value of **x** as though it - has 8 binary digits (1 unsigned byte). + has 8 binary digits (**1** unsigned byte). If you want to a use signed two's complement argument, use **s2u(x)** to convert. @@ -1569,7 +1569,7 @@ The extended library is a **non-portable extension**. **brev16(x)** : Runs a bit reversal on the truncated absolute value of **x** as though it - has 16 binary digits (2 unsigned bytes). + has 16 binary digits (**2** unsigned bytes). If you want to a use signed two's complement argument, use **s2u(x)** to convert. @@ -1577,7 +1577,7 @@ The extended library is a **non-portable extension**. **brev32(x)** : Runs a bit reversal on the truncated absolute value of **x** as though it - has 32 binary digits (4 unsigned bytes). + has 32 binary digits (**4** unsigned bytes). If you want to a use signed two's complement argument, use **s2u(x)** to convert. @@ -1585,7 +1585,7 @@ The extended library is a **non-portable extension**. **brev64(x)** : Runs a bit reversal on the truncated absolute value of **x** as though it - has 64 binary digits (8 unsigned bytes). + has 64 binary digits (**8** unsigned bytes). If you want to a use signed two's complement argument, use **s2u(x)** to convert. @@ -1632,7 +1632,7 @@ The extended library is a **non-portable extension**. **brol32(x, p)** : Does a left bitwise rotatation of the truncated absolute value of **x**, as - though it has **32** binary digits (**2** unsigned bytes), by the number of + though it has **32** binary digits (**4** unsigned bytes), by the number of places equal to the truncated absolute value of **p** modded by **2** to the power of **32**. @@ -1642,7 +1642,7 @@ The extended library is a **non-portable extension**. **brol64(x, p)** : Does a left bitwise rotatation of the truncated absolute value of **x**, as - though it has **64** binary digits (**2** unsigned bytes), by the number of + though it has **64** binary digits (**8** unsigned bytes), by the number of places equal to the truncated absolute value of **p** modded by **2** to the power of **64**. diff --git a/contrib/bc/manuals/bc/E.1 b/contrib/bc/manuals/bc/E.1 index 24f49c701b46..549c1adae8a1 100644 --- a/contrib/bc/manuals/bc/E.1 +++ b/contrib/bc/manuals/bc/E.1 @@ -25,14 +25,12 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2023" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "November 2023" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME -.PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS -.PP \f[B]bc\f[R] [\f[B]-cCghilPqRsvVw\f[R]] [\f[B]--digit-clamp\f[R]] [\f[B]--no-digit-clamp\f[R]] [\f[B]--global-stacks\f[R]] [\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] @@ -44,7 +42,6 @@ bc - arbitrary-precision decimal arithmetic language and calculator [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION -.PP bc(1) is an interactive processor for a language first standardized in 1991 by POSIX. (See the \f[B]STANDARDS\f[R] section.) @@ -73,7 +70,6 @@ If parsing scripts meant for other bc(1) implementations still does not work, that is a bug and should be reported. See the \f[B]BUGS\f[R] section. .SH OPTIONS -.PP The following are the options that bc(1) accepts. .TP \f[B]-C\f[R], \f[B]--no-digit-clamp\f[R] @@ -174,19 +170,16 @@ without worrying that the change will affect other functions. Thus, a hypothetical function named \f[B]output(x,b)\f[R] that simply printed \f[B]x\f[R] in base \f[B]b\f[R] could be written like this: .IP -.nf -\f[C] +.EX define void output(x, b) { obase=b x } -\f[R] -.fi +.EE .PP instead of like this: .IP -.nf -\f[C] +.EX define void output(x, b) { auto c c=obase @@ -194,8 +187,7 @@ define void output(x, b) { x obase=c } -\f[R] -.fi +.EE .PP This makes writing functions much easier. .PP @@ -209,12 +201,10 @@ converter, it is possible to replace that capability with various shell aliases. Examples: .IP -.nf -\f[C] +.EX alias d2o=\[dq]bc -e ibase=A -e obase=8\[dq] alias h2b=\[dq]bc -e ibase=G -e obase=2\[dq] -\f[R] -.fi +.EE .PP Second, if the purpose of a function is to set \f[B]ibase\f[R], \f[B]obase\f[R], or \f[B]scale\f[R] globally for any other purpose, it @@ -441,7 +431,6 @@ This is a \f[B]non-portable extension\f[R]. .PP All long options are \f[B]non-portable extensions\f[R]. .SH STDIN -.PP If no files or expressions are given by the \f[B]-f\f[R], \f[B]--file\f[R], \f[B]-e\f[R], or \f[B]--expression\f[R] options, then bc(1) reads from \f[B]stdin\f[R]. @@ -458,7 +447,6 @@ Second, after an \f[B]if\f[R] statement, bc(1) doesn\[cq]t know if an \f[B]else\f[R] statement will follow, so it will not execute until it knows there will not be an \f[B]else\f[R] statement. .SH STDOUT -.PP Any non-error output is written to \f[B]stdout\f[R]. In addition, if history (see the \f[B]HISTORY\f[R] section) and the prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output @@ -467,7 +455,7 @@ to \f[B]stdout\f[R]. \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in -\f[B]bc >&-\f[R], it will quit with an error. +\f[B]bc >&-\f[R], it will quit with an error. This is done so that bc(1) can report problems when \f[B]stdout\f[R] is redirected to a file. .PP @@ -475,13 +463,12 @@ If there are scripts that depend on the behavior of other bc(1) implementations, it is recommended that those scripts be changed to redirect \f[B]stdout\f[R] to \f[B]/dev/null\f[R]. .SH STDERR -.PP Any error output is written to \f[B]stderr\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in -\f[B]bc 2>&-\f[R], it will quit with an error. +\f[B]bc 2>&-\f[R], it will quit with an error. This is done so that bc(1) can exit with an error code when \f[B]stderr\f[R] is redirected to a file. .PP @@ -489,7 +476,6 @@ If there are scripts that depend on the behavior of other bc(1) implementations, it is recommended that those scripts be changed to redirect \f[B]stderr\f[R] to \f[B]/dev/null\f[R]. .SH SYNTAX -.PP The syntax for bc(1) programs is mostly C-like, with some differences. This bc(1) follows the POSIX standard (see the \f[B]STANDARDS\f[R] section), which is a much more thorough resource for the language this @@ -568,7 +554,6 @@ These are \f[B]non-portable extensions\f[R]. .PP Either semicolons or newlines may separate statements. .SS Comments -.PP There are two kinds of comments: .IP "1." 3 Block comments are enclosed in \f[B]/*\f[R] and \f[B]*/\f[R]. @@ -577,7 +562,6 @@ Line comments go from \f[B]#\f[R] until, and not including, the next newline. This is a \f[B]non-portable extension\f[R]. .SS Named Expressions -.PP The following are named expressions in bc(1): .IP "1." 3 Variables: \f[B]I\f[R] @@ -606,7 +590,6 @@ Named expressions are required as the operand of of \f[B]assignment\f[R] operators (see the \f[I]Operators\f[R] subsection). .SS Operands -.PP The following are valid operands in bc(1): .IP " 1." 4 Numbers (see the \f[I]Numbers\f[R] subsection below). @@ -710,7 +693,6 @@ otherwise. See the \f[B]OPTIONS\f[R] section. This is a \f[B]non-portable extension\f[R]. .SS Numbers -.PP Numbers are strings made up of digits, uppercase letters, and at most *** 6187 LINES SKIPPED *** From nobody Wed Jan 10 16:38:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9D4p1mRNz57K4b; Wed, 10 Jan 2024 16:38: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 4T9D4p0ctzz58lR; Wed, 10 Jan 2024 16:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704904698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fEofxro69WxT8keXAu0P2TmFkeEiQbiqQpmLMloIoow=; b=s0+dqsZYNradFGGT2XTTrZdBQcGYybZ4On3khptix7sWv6ziTkpwDFEha+SKgViPYQUeYa 8JVIztbGGnytVYYKs2EJssGkICQorifHlonRLBAUcbSQaLiXqOMEIQeo70hM/t1qPjptGk 4vOVhyG4FhR/9ixelzlj3ZARgWBtUvljZxzZ6eP+HDplSXTRceUy6UBHlgxA4xSMvF8P3L 5nSYsAZKSFxlalz1jNepUTAB51jF21FwvaDRk87gHol0zXYYR33lMPcbWWBGa7Wjj0Nmug gwSPelENi6UyxTbxCkS1Gpf9wB1TT9k5EBHWEK8twpmV6TvoaZTw6y9E8t2IQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704904698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fEofxro69WxT8keXAu0P2TmFkeEiQbiqQpmLMloIoow=; b=uBLiYqedOhK4JMTbH06kXkyFxylJktDpFrZMaFSqZ7fgbuNkOgh6I6wcKGlrC7V5MA/4Vf rgXzLJdZzt4rBtyJsfQemH1Jm6qHKgItNIuz4NqMWuLCMG4BwczVyHz8cEW9AF1zmM9WDC b+bY8S+JnNo1L0pFqi4WiMiNufohXxiTJCiEfEolS2F50M4oihDUK92mK++edeV4xzWUjp fscjGkBVgoOjk6v3HudSQP8LwHK/P/8nhpVhsJ/hB2hmByKufp9owCZocm/yStXDvFM2fe woZwxc6jLgBP3cdenxFUtuOS7NPyHgLK+aLIuUhYtCkAFhEv9ZWKfvGmJ0+wYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704904698; a=rsa-sha256; cv=none; b=h/wflxX+7FppY7JBSR5NIAj9p3HOyaORdvLTi0ERw1AoGzhG0ygzyPYh29lgCFGF856HVq U2fdAcy09WBbWuMEcGlhtwEZj65zBRAoXi3bNFoITE+/hPBjUdLO9c6nbZoVr5Yy3UD18D x/Iv7NdPZVKmlGYziFf7fb/pChOCO5EpxTfZnnXetkhwNp9PwhpejG9KKnjua8O0HqhGRI aDN8q75PsAd8nrbZ8E7Q6VELRzePo0ehZmKMpzcJSZPHtX5TgDlR2cjCJBHRPTrBS9hBLK FdkxTXgAJprKWrLgDDmlL3O4lqyMObLXzs50HMMHT1T57bTSjtKvs+SsMStT/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 4T9D4n5ty6zjkV; Wed, 10 Jan 2024 16:38:17 +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 40AGcHDg069317; Wed, 10 Jan 2024 16:38:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AGcHGO069314; Wed, 10 Jan 2024 16:38:17 GMT (envelope-from git) Date: Wed, 10 Jan 2024 16:38:17 GMT Message-Id: <202401101638.40AGcHGO069314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: f4fbc49d201f - main - vendor/bc: upgrade to version 6.7.5 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4fbc49d201f81c481a33fac6ba28e19faf96260 Auto-Submitted: auto-generated The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=f4fbc49d201f81c481a33fac6ba28e19faf96260 commit f4fbc49d201f81c481a33fac6ba28e19faf96260 Author: Stefan Eßer AuthorDate: 2024-01-04 23:07:46 +0000 Commit: Stefan Eßer CommitDate: 2024-01-10 16:36:29 +0000 vendor/bc: upgrade to version 6.7.5 This update fixes a bug that line breaks in printed numbers may not match the line length set by the user. The value is printed correctly, just not split as specified in some situations. (cherry picked from commit 52a5ec1b178fd07651446c7e31b1512794a04dbf) --- contrib/bc/NEWS.md | 9 + contrib/bc/include/bc.h | 2 +- contrib/bc/include/history.h | 4 - contrib/bc/include/num.h | 6 +- contrib/bc/include/version.h | 2 +- contrib/bc/scripts/sqrt_frac_guess.bc | 126 +++++++ contrib/bc/scripts/sqrt_int_guess.bc | 94 +++++ contrib/bc/scripts/sqrt_random.bc | 129 +++++++ contrib/bc/scripts/sqrt_random.sh | 77 ++++ contrib/bc/src/num.c | 41 ++- contrib/bc/src/program.c | 4 +- contrib/bc/tests/bc/scripts/all.txt | 1 + contrib/bc/tests/bc/scripts/print2.bc | 63 ++++ contrib/bc/tests/bc/scripts/print2.txt | 650 +++++++++++++++++++++++++++++++++ contrib/bc/tests/bc/sqrt.txt | 2 + contrib/bc/tests/bc/sqrt_results.txt | 2 + contrib/bc/vs/bc.vcxproj | 4 + contrib/bc/vs/bcl.vcxproj | 6 + 18 files changed, 1200 insertions(+), 22 deletions(-) diff --git a/contrib/bc/NEWS.md b/contrib/bc/NEWS.md index 240e02f11388..32e74de31231 100644 --- a/contrib/bc/NEWS.md +++ b/contrib/bc/NEWS.md @@ -1,5 +1,14 @@ # News +## 6.7.5 + +This is a production release to fix one small bug. + +The bug is that sometimes numbers are printed to incorrect line lengths. The +number is always correct; the line is just longer than the limit. + +Users who do not care do not need to update. + ## 6.7.4 This is a production release to fix problems in the `bc` manual. diff --git a/contrib/bc/include/bc.h b/contrib/bc/include/bc.h index 73a85aa406a0..17fd0b9d171f 100644 --- a/contrib/bc/include/bc.h +++ b/contrib/bc/include/bc.h @@ -276,7 +276,7 @@ bc_lex_token(BcLex* l); * @return True if i is an expression token, false otherwise. */ #define BC_PARSE_EXPR(i) \ - (bc_parse_exprs[(((i) & (uchar) ~(0x07)) >> 3)] & (1 << (7 - ((i) &0x07)))) + (bc_parse_exprs[(((i) & (uchar) ~(0x07)) >> 3)] & (1 << (7 - ((i) & 0x07)))) /** * Returns the operator (by lex token) that is at the top of the operator diff --git a/contrib/bc/include/history.h b/contrib/bc/include/history.h index 19c5a0fe27f7..64402c4dffa1 100644 --- a/contrib/bc/include/history.h +++ b/contrib/bc/include/history.h @@ -173,10 +173,6 @@ typedef struct BcHistory #include #include -#if BC_DEBUG_CODE -#include -#endif // BC_DEBUG_CODE - /// Default columns. #define BC_HIST_DEF_COLS (80) diff --git a/contrib/bc/include/num.h b/contrib/bc/include/num.h index d24c206cbe51..6c9dee107f2f 100644 --- a/contrib/bc/include/num.h +++ b/contrib/bc/include/num.h @@ -211,9 +211,9 @@ struct BcRNG; #define BC_NUM_KARATSUBA_ALLOCS (6) /** - * Rounds @a s (scale) up to the next power of BC_BASE_DIGS. This also check for - * overflow and gives a fatal error if that happens because we just can't go - * over the limits we have imposed. + * Rounds @a s (scale) up to the next power of BC_BASE_DIGS. This will also + * check for overflow and gives a fatal error if that happens because we just + * can't go over the limits we have imposed. * @param s The scale to round up. * @return @a s rounded up to the next power of BC_BASE_DIGS. */ diff --git a/contrib/bc/include/version.h b/contrib/bc/include/version.h index d481cb10abf1..e2576269345d 100644 --- a/contrib/bc/include/version.h +++ b/contrib/bc/include/version.h @@ -37,6 +37,6 @@ #define BC_VERSION_H /// The current version. -#define VERSION 6.7.4 +#define VERSION 6.7.5 #endif // BC_VERSION_H diff --git a/contrib/bc/scripts/sqrt_frac_guess.bc b/contrib/bc/scripts/sqrt_frac_guess.bc new file mode 100644 index 000000000000..5938cfcc7cba --- /dev/null +++ b/contrib/bc/scripts/sqrt_frac_guess.bc @@ -0,0 +1,126 @@ +#! /usr/bin/bc +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2018-2023 Gavin D. Howard and contributors. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. +# + +scale = 20 + +# Adjust this number to try ranges below different powers of 10. +shift = 4 + +# Adjust this to try extra digits. For example, a value of one means that one +# digit is checked (such as 0.09 through 0.01), a value of two means that two +# digits are checked (0.090 through 0.010), etc. +max = shift + 2 + +n = (9 >> shift) +inc = (1 >> max) +stop = (1 >> shift) + +# Uncomment this to test the high part of the ranges. +#n += (1 - (1 >> max + 5)) >> shift + +for (i = n; i >= stop; i -= inc) +{ + # This is the lower limit. + t1 = sqrt(1/(3*i)) + + # Start with the inverse. + t2 = (1/i) + + # And take half its length of course. + l = length(t2$)/2 + + temp = i + odd = 0 + + # We go by powers of 10 below, but there is a degenerate case: an exact + # power of 10, for which length() will return one digit more. So we check + # for that and fix it. + while (temp < 1) + { + temp <<= 1 + odd = !odd + } + + if (temp == 1) + { + odd = !odd + } + + print "i: ", i, "\n" + print "t2: ", t2, "\n" + #print "l: ", l, "\n" + print "odd: ", odd, "\n" + + if (odd) + { + # Limit between 6 and 7.5. + limit1 = 6.7 >> (l$ * 2 + 1) + + # Limit between 1.5 and 1.83-ish. + limit2 = 1.7 >> (l$ * 2 + 1) + print "limit1: ", limit1, "\n" + print "limit2: ", limit2, "\n" + + if (i >= limit1) + { + t2 = (t2 >> l$) + } + else if (i >= limit2) + { + t2 = (t2 >> l$) / 2 + } + else + { + t2 = (t2 >> l$) / 4 + } + } + else + { + # Limit between 2.4 and 3. + limit = 2.7 >> (l$ * 2) + print "limit: ", limit, "\n" + + if (i >= limit) + { + t2 = (t2 >> l$) * 2 + } + else + { + t2 = (t2 >> l$) + } + } + #t2 = 1 + t3 = sqrt(5/(3*i)) + good = (t1 < t2 && t2 < t3) + + print t1, " < ", t2, " < ", t3, ": ", good, "\n\n" + if (!good) sqrt(-1) +} + +halt diff --git a/contrib/bc/scripts/sqrt_int_guess.bc b/contrib/bc/scripts/sqrt_int_guess.bc new file mode 100644 index 000000000000..551a06eb2e6d --- /dev/null +++ b/contrib/bc/scripts/sqrt_int_guess.bc @@ -0,0 +1,94 @@ +#! /usr/bin/bc -l +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2018-2023 Gavin D. Howard and contributors. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. +# + +# Adjust this number to try ranges above different powers of 10. +max = 0 + +n = (1 << max) + +# Uncomment this to test the high part of the ranges. +#n += (1 - (1 >> 10)) + +n + +# Loop from the start number to the next power of 10. +for (i = n; i < (n$ << 1); i += 1) +{ + # This is the lower limit. + t1 = sqrt(1/(3*i)) + + l = length(i$)/2 + + print "i: ", i, "\n" + #print "l: ", l, "\n" + + if (l$ != l) + { + # Limit between 2.4 and 3. + limit = 2.7 << (l$ * 2) + #print "limit: ", limit, "\n" + + if (i >= limit) + { + t2 = 1/(i >> (l$)) * 2 + } + else + { + t2 = 1/(i >> (l$)) + } + } + else + { + # Limit between 3.8-ish and 4.8 + limit = 4.3 << (l$ * 2 - 1) + #print "limit: ", limit, "\n" + + if (i >= limit) + { + t2 = 1/(i >> (l$ - 1)) * 8 + } + else + { + t2 = 1/(i >> (l$ - 1)) * 4 + } + } + + # This is the upper limit. + t3 = sqrt(5/(3*i)) + + # This is true when the guess is in between the limits. + good = (t1 < t2 && t2 < t3) + + print t1, " < ", t2, " < ", t3, ": ", good, "\n" + + # Error if we have a problem. + if (!good) sqrt(-1) +} + +halt diff --git a/contrib/bc/scripts/sqrt_random.bc b/contrib/bc/scripts/sqrt_random.bc new file mode 100644 index 000000000000..ff08348f4977 --- /dev/null +++ b/contrib/bc/scripts/sqrt_random.bc @@ -0,0 +1,129 @@ +#! /usr/bin/bc +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2018-2023 Gavin D. Howard and contributors. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. +# + +scale = 0 + +bits = rand() + +# This extracts a bit and takes it out of the original value. +# +# Here, I am getting a bit to say whether we should have a value that is less +# than 1. +bits = divmod(bits, 2, negpow[]) + +# Get a bit that will say whether the value should be an exact square. +bits = divmod(bits, 2, square[]) + +# See below. This is to help bias toward small numbers. +pow = 4 + +# I want to bias toward small numbers, so let's give a 50 percent chance to +# values below 16 or so. +bits = divmod(bits, 2, small[]) + +# Let's keep raising the power limit by 2^4 when the bit is zero. +while (!small[0]) +{ + pow += 4 + bits = divmod(bits, 2, small[]) +} + +limit = 2^pow + +# Okay, this is the starting number. +num = irand(limit) + 1 + +# Figure out if we should have (more) fractional digits. +bits = divmod(bits, 2, extra_digits[]) + +if (square[0]) +{ + # Okay, I lied. If we need a perfect square, square now. + num *= num + + # If we need extra digits, we need to multiply by an even power of 10. + if (extra_digits[0]) + { + extra = (irand(8) + 1) * 2 + } + else + { + extra = 0 + } + + # If we need a number less than 1, just take the inverse, which will still + # be a perfect square. + if (negpow[0]) + { + scale = length(num) + 5 + num = 1/num + scale = 0 + + num >>= extra + } + else + { + num <<= extra + } +} +else +{ + # Get this for later. + l = length(num) + + # If we need extra digits. + if (extra_digits[0]) + { + # Add up to 32 decimal places. + num += frand(irand(32) + 1) + } + + # If we need a value less than 1... + if (negpow[0]) + { + # Move right until the number is + num >>= l + } +} + +bits = divmod(bits, 2, zero_scale[]) + +# Do we want a zero scale? +if (zero_scale[0]) +{ + print "scale = 0\n" +} +else +{ + print "scale = 20\n" +} + +print "sqrt(", num, ")\n" + +halt diff --git a/contrib/bc/scripts/sqrt_random.sh b/contrib/bc/scripts/sqrt_random.sh new file mode 100755 index 000000000000..694c72003192 --- /dev/null +++ b/contrib/bc/scripts/sqrt_random.sh @@ -0,0 +1,77 @@ +#! /bin/sh +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2018-2023 Gavin D. Howard and contributors. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. +# + +scriptdir=$(dirname "$0") + +gnu=/usr/bin/bc +gdh=/usr/local/bin/bc + +if [ "$#" -lt 1 ]; then + printf 'err: must provide path to new bc\n' + exit 1 +fi + +new="$1" +shift + +unset BC_LINE_LENGTH && unset BC_ENV_ARGS + +gdh_fail_file="sqrt_fails.bc" +new_fail_file="new_sqrt_fails.bc" + +rm -rf "$gdh_fail_file" +rm -rf "$new_fail_file" + +while [ true ]; do + + tst=$("$gdh" -l "$scriptdir/sqrt_random.bc") + err=$? + + if [ "$err" -ne 0 ]; then + printf 'err: failed to create test\n' + exit 2 + fi + + good=$(printf '%s\n' "$tst" | "$gnu" -l) + + gdh_out=$(printf '%s\n' "$tst" | "$gdh" -l) + new_out=$(printf '%s\n' "$tst" | "$new" -l) + + gdh_good=$(printf '%s == %s\n' "$good" "$gdh_out" | "$gnu") + new_good=$(printf '%s == %s\n' "$good" "$new_out" | "$gnu") + + if [ "$gdh_good" -eq 0 ]; then + printf '%s\n' "$tst" >> "$gdh_fail_file" + fi + + if [ "$new_good" -eq 0 ]; then + printf '%s\n' "$tst" >> "$new_fail_file" + fi + +done diff --git a/contrib/bc/src/num.c b/contrib/bc/src/num.c index e45aa62ddd0f..ac0f828008f8 100644 --- a/contrib/bc/src/num.c +++ b/contrib/bc/src/num.c @@ -3207,12 +3207,30 @@ bc_num_printNum(BcNum* restrict n, BcBigDig base, size_t len, assert(ptr != NULL); // While the first three arguments should be self-explanatory, the last - // needs explaining. I don't want to print a newline when the last digit - // to be printed could take the place of the backslash rather than being - // pushed, as a single character, to the next line. That's what that - // last argument does for bc. + // needs explaining. I don't want to print a backslash+newline when the + // last digit to be printed could take the place of the backslash rather + // than being pushed, as a single character, to the next line. That's + // what that last argument does for bc. + // + // First, it needs to check if newlines are completely disabled. If they + // are not disabled, it needs to check the next part. + // + // If the number has a scale, then because we are printing just the + // integer part, there will be at least two more characters (a radix + // point plus at least one digit). So if there is a scale, a backslash + // is necessary. + // + // Finally, the last condition checks to see if we are at the end of the + // stack. If we are *not* (i.e., the index is not one less than the + // stack length), then a backslash is necessary because there is at + // least one more character for at least one more digit). Otherwise, if + // the index is equal to one less than the stack length, we want to + // disable backslash printing. + // + // The function that prints bases 17 and above will take care of not + // printing a backslash in the right case. print(*ptr, len, false, - !newline || (n->scale != 0 || i == stack.len - 1)); + !newline || (n->scale != 0 || i < stack.len - 1)); } // We are done if there is no fractional part. @@ -4091,13 +4109,14 @@ bc_num_sqrt(BcNum* restrict a, BcNum* restrict b, size_t scale) // Square root needs half of the length of the parameter. req = bc_vm_growSize(BC_MAX(rdx, BC_NUM_RDX_VAL(a)), len >> 1); + req = bc_vm_growSize(req, 1); BC_SIG_LOCK; // Unlike the binary operators, this function is the only single parameter // function and is expected to initialize the result. This means that it // expects that b is *NOT* preallocated. We allocate it here. - bc_num_init(b, bc_vm_growSize(req, 1)); + bc_num_init(b, req); BC_SIG_UNLOCK; @@ -4130,13 +4149,12 @@ bc_num_sqrt(BcNum* restrict a, BcNum* restrict b, size_t scale) bc_num_init(&num2, len); bc_num_setup(&half, half_digs, sizeof(half_digs) / sizeof(BcDig)); - // There is a division by two in the formula. We setup a number that's 1/2 + // There is a division by two in the formula. We set up a number that's 1/2 // so that we can use multiplication instead of heavy division. - bc_num_one(&half); + bc_num_setToZero(&half, 1); half.num[0] = BC_BASE_POW / 2; half.len = 1; BC_NUM_RDX_SET_NP(half, 1); - half.scale = 1; bc_num_init(&f, len); bc_num_init(&fprime, len); @@ -4156,8 +4174,9 @@ bc_num_sqrt(BcNum* restrict a, BcNum* restrict b, size_t scale) pow = bc_num_intDigits(a); // The code in this if statement calculates the initial estimate. First, if - // a is less than 0, then 0 is a good estimate. Otherwise, we want something - // in the same ballpark. That ballpark is pow. + // a is less than 1, then 0 is a good estimate. Otherwise, we want something + // in the same ballpark. That ballpark is half of pow because the result + // will have half the digits. if (pow) { // An odd number is served by starting with 2^((pow-1)/2), and an even diff --git a/contrib/bc/src/program.c b/contrib/bc/src/program.c index 2f26589166e3..c9d268dfde82 100644 --- a/contrib/bc/src/program.c +++ b/contrib/bc/src/program.c @@ -3780,7 +3780,7 @@ bc_program_printStr(const BcProgram* p, const char* restrict code, size_t idx = bc_program_index(code, bgn); char* s; - s = *((char**) bc_vec_item(p->strs, idx)); + s = *((char**) bc_vec_item(&p->strs, idx)); bc_vm_printf(" (\"%s\") ", s); } @@ -3803,7 +3803,7 @@ bc_program_printInst(const BcProgram* p, const char* restrict code, else if (inst == BC_INST_NUM) { size_t idx = bc_program_index(code, bgn); - BcConst* c = bc_vec_item(p->consts, idx); + BcConst* c = bc_vec_item(&p->consts, idx); bc_vm_printf("(%s)", c->val); } else if (inst == BC_INST_CALL || diff --git a/contrib/bc/tests/bc/scripts/all.txt b/contrib/bc/tests/bc/scripts/all.txt index 0008d70193c6..7b49f7c4e77a 100644 --- a/contrib/bc/tests/bc/scripts/all.txt +++ b/contrib/bc/tests/bc/scripts/all.txt @@ -3,6 +3,7 @@ divide.bc subtract.bc add.bc print.bc +print2.bc parse.bc root.bc array.bc diff --git a/contrib/bc/tests/bc/scripts/print2.bc b/contrib/bc/tests/bc/scripts/print2.bc new file mode 100644 index 000000000000..5f3466929f77 --- /dev/null +++ b/contrib/bc/tests/bc/scripts/print2.bc @@ -0,0 +1,63 @@ +#! /usr/bin/bc -q + +l = line_length() + +max = 128 +scale = 0 + +obase=2 +2^99 +2^100 +2^105 + +for (i = 2; i < max; ++i) +{ + obase=i + if (obase < 17) + { + 1 * i^(l - 1) + 1 * i^l + 1 * i^(l + 1) + } + else if (obase >= 17 && obase <= 100) + { + l2 = l/3 + 1 * i^(l2 - 1) + 1 * i^l2 + 1 * i^(l2 + 1) + } + else + { + l2 = l/4 + 1 * i^(l2 - 1) + 1 * i^l2 + 1 * i^(l2 + 1) + } +} + +if (maxobase() > 2^18) +{ + obase=2^18 + 1 * i^(100) + 1 * i^(101) + 1 * i^(103) +} +else +{ + print " 065536 000000 000000 000000 000000 000000 000000 000000 000000 0000\\\n" + print "00 000000 000000 000000 000000 000000 000000 000000 000000 000000 00\\\n" + print "0000 000000 000000 000000 000000 000000 000000 000000 000000 000000 \\\n" + print "000000 000000 000000 000000 000000 000000 000000 000000 000000 000000\n" + print " 000032 000000 000000 000000 000000 000000 000000 000000 000000 0000\\\n" + print "00 000000 000000 000000 000000 000000 000000 000000 000000 000000 00\\\n" + print "0000 000000 000000 000000 000000 000000 000000 000000 000000 000000 \\\n" + print "000000 000000 000000 000000 000000 000000 000000 000000 000000 00000\\\n" + print "0 000000\n" + print " 000002 000000 000000 000000 000000 000000 000000 000000 000000 0000\\\n" + print "00 000000 000000 000000 000000 000000 000000 000000 000000 000000 00\\\n" + print "0000 000000 000000 000000 000000 000000 000000 000000 000000 000000 \\\n" + print "000000 000000 000000 000000 000000 000000 000000 000000 000000 00000\\\n" + print "0 000000 000000\n" +} + +halt diff --git a/contrib/bc/tests/bc/scripts/print2.txt b/contrib/bc/tests/bc/scripts/print2.txt new file mode 100644 index 000000000000..208f0ed2e479 --- /dev/null +++ b/contrib/bc/tests/bc/scripts/print2.txt @@ -0,0 +1,650 @@ +10000000000000000000000000000000000000000000000000000000000000000000\ +00000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00000000000000000000000000000000000000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 *** 532 LINES SKIPPED *** From nobody Wed Jan 10 17:50:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9FhD6jpzz55V3j; Wed, 10 Jan 2024 17: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 4T9FhD6G67z46ps; Wed, 10 Jan 2024 17: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=1704909036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rlj6HKiUt6hAe7I3Iu0jjEiZIaEyTxojcL5qbQV3dGI=; b=FLpcreNezM7rej+YuD8ccWzc/Obw4qwJUeFJlgkMQ1oxTFrfqYDjvMf140nLzz/pRzC/zV H29QuGUPx4i91XMX58GgetnkSCMTyzkzuks00+6gQ6COtgEuNln40hBUZEfz4ojJG7/krL ypx0b+E7+Up6OURx9W3TvXLAaCtBm23OVEBuopwG6aXDE/AxD5oxfbhHWqJfuiBPwwZvC/ z//7XcBXjiO95QLFyKWtKGEMhBhazyZql1+vKm20YcRjesvRWlpeQ5Uf1LkA5YrmIQNP+X Gp45B9z0HcUqZC3YAHHw4NB9sg/jITcbQKhAgA6ZoE9737IwuxXmj/EpudWSsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704909036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rlj6HKiUt6hAe7I3Iu0jjEiZIaEyTxojcL5qbQV3dGI=; b=iQa9dS9mhfgOVhZrrNXigJi/CvQMxpTkIayAFYRsrfxfU+JhuVZV6mtszlbzOsWSytGyLY kHDdb1weFDZyygsA6grxrI5hhH3ZReU2dX9SkRcXBQe67ehMWm9WOq1d6GSzeChBHRZCCN ypFz1uZGDIpZxwtOzYOPvLb8tcFu7N4bkTOHKYJJEZfVGO06dvSsgKPoWtyM4IKFSxys6c gCdsBZg1kfiQh95hxKH4wggmS2sNxpbjII9ZNEbU/lqzi/UX12GSvcXx2ZZP0bQtkUYDx8 HsQeuz1rElDHiguE+dhfVAcxoPiRGFHblvx9TNzI+c3rS/Glqv39LYPPniI8PQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704909036; a=rsa-sha256; cv=none; b=DvozWccUcgsCB4F/LNiCYw2AOkBk0SKX36ePCuXF6y+T2DIEv2Ve4qDtJQ+Ob5ZB7m4L28 Ou36F4kVLHjJxiRrIQdSniQoU0H8FjqdmTdUYpByF4E3nzBerqhD3y/uXvLOAaWzNrZnke fCLI0xqF5RyvSaQIJknvpDZkHehHPN4eIOl8ahodjmA1gpxns4fqqwlihc/r0VdyPrHxMk gxZFnI6krFLqimJrEE5nV9/t1sQYgHgBwKq6DSYjVfI0l/JKPvZ6hTLrbMrh+4HkJbBakx Itca21yYw00LiuK7ZiUSafanX05+Fr9X/OzZlnTcW8tuSgZcYgNyx0aZNH2nKQ== 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 4T9FhD5KkKzl8H; Wed, 10 Jan 2024 17: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 40AHoaBe098274; Wed, 10 Jan 2024 17: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 40AHoalp098271; Wed, 10 Jan 2024 17:50:36 GMT (envelope-from git) Date: Wed, 10 Jan 2024 17:50:36 GMT Message-Id: <202401101750.40AHoalp098271@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: aadb4a1b3fd1 - main - pthread_attr_get_np(): Use malloc(), report ENOMEM, don't tamper on error List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aadb4a1b3fd185d547087f6eafca6ce0b4df3291 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=aadb4a1b3fd185d547087f6eafca6ce0b4df3291 commit aadb4a1b3fd185d547087f6eafca6ce0b4df3291 Author: Olivier Certner AuthorDate: 2024-01-04 17:45:52 +0000 Commit: Olivier Certner CommitDate: 2024-01-10 17:50:19 +0000 pthread_attr_get_np(): Use malloc(), report ENOMEM, don't tamper on error Similarly as in the previous commit, using calloc() instead of malloc() is useless here in the regular case since the subsequent call to cpuset_getaffinify() is going to completely fill the allocated memory. However, there is an additional complication. This function tries to allocate memory to hold the cpuset if it previously wasn't, and does so before the thread lock is acquired, which can fail on a bad thread ID. In this case, it is necessary to deallocate the memory allocated in this function so that the attributes object appears unmodified to the caller when an error is returned. Without this, a subsequent call to pthread_attr_getaffinity_np() would expose uninitialized memory (not a security problem per se, since it comes from the same process) instead of returning a full mask as it would before the failing call to pthread_attr_get_np(). So the caller would be able to notice a change in the state of the attributes object even if pthread_attr_get_np() reported failure, which would be quite surprising. A similar problem that could occur on failure of cpuset_setaffinity() has been fixed. Finally, we shall always report memory allocation failure. This already goes for pthread_attr_init(), so, if for nothing else, just be consistent. Reviewed by: emaste, kib Approved by: emaste (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43329 --- lib/libthr/thread/thr_attr.c | 45 ++++++++++++++++++++++++----------------- lib/libthr/thread/thr_private.h | 2 -- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/lib/libthr/thread/thr_attr.c b/lib/libthr/thread/thr_attr.c index 561037fa5eb4..3c03225c33cb 100644 --- a/lib/libthr/thread/thr_attr.c +++ b/lib/libthr/thread/thr_attr.c @@ -129,8 +129,9 @@ __weak_reference(_thr_attr_get_np, _pthread_attr_get_np); int _thr_attr_get_np(pthread_t pthread, pthread_attr_t *dstattr) { - struct pthread_attr attr, *dst; + struct pthread_attr *dst; struct pthread *curthread; + cpuset_t *cpuset; size_t kern_size; int error; @@ -138,35 +139,43 @@ _thr_attr_get_np(pthread_t pthread, pthread_attr_t *dstattr) return (EINVAL); kern_size = _get_kern_cpuset_size(); - if (dst->cpuset == NULL) { - dst->cpuset = calloc(1, kern_size); - dst->cpusetsize = kern_size; - } + if ((cpuset = malloc(kern_size)) == NULL) + return (ENOMEM); + } else + cpuset = dst->cpuset; curthread = _get_curthread(); /* Arg 0 is to include dead threads. */ if ((error = _thr_find_thread(curthread, pthread, 0)) != 0) - return (error); - - attr = pthread->attr; - if ((pthread->flags & THR_FLAGS_DETACHED) != 0) - attr.flags |= PTHREAD_DETACHED; + goto free_and_exit; error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, TID(pthread), - dst->cpusetsize, dst->cpuset); - if (error == -1) + kern_size, cpuset); + if (error == -1) { + THR_THREAD_UNLOCK(curthread, pthread); error = errno; + goto free_and_exit; + } - THR_THREAD_UNLOCK(curthread, pthread); + /* + * From this point on, we can't fail, so we can start modifying 'dst'. + */ - if (error == 0) - memcpy(&dst->pthread_attr_start_copy, - &attr.pthread_attr_start_copy, - offsetof(struct pthread_attr, pthread_attr_end_copy) - - offsetof(struct pthread_attr, pthread_attr_start_copy)); + *dst = pthread->attr; + if ((pthread->flags & THR_FLAGS_DETACHED) != 0) + dst->flags |= PTHREAD_DETACHED; + THR_THREAD_UNLOCK(curthread, pthread); + + dst->cpuset = cpuset; + dst->cpusetsize = kern_size; return (0); + +free_and_exit: + if (dst->cpuset == NULL) + free(cpuset); + return (error); } __weak_reference(_thr_attr_getdetachstate, pthread_attr_getdetachstate); diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index 3475029f8996..3fc4d02c611e 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -261,7 +261,6 @@ struct pthread_atfork { }; struct pthread_attr { -#define pthread_attr_start_copy sched_policy int sched_policy; int sched_inherit; int prio; @@ -271,7 +270,6 @@ struct pthread_attr { void *stackaddr_attr; size_t stacksize_attr; size_t guardsize_attr; -#define pthread_attr_end_copy cpuset cpuset_t *cpuset; size_t cpusetsize; }; From nobody Wed Jan 10 17:50:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9FhG15zPz55V1P; Wed, 10 Jan 2024 17: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 4T9FhF70wLz46pv; Wed, 10 Jan 2024 17: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=1704909038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aG5ZluH+4tWJLb7+/5c9aMKv321s7nUuyHkguldv8dc=; b=LMdLvJEmlVyr1K4b9BopbXYoeAsDZkv4aXXtU/dKozRfOf7wHge5Ky7YAAaPyQD54Ccg/Y dkyXPm+z1vPP7eDM38v1l4AWkgVPeYEGcNqMm6fXc/QWoF+eZOThiMVFiiHuUf1WFqBk0+ DESfPCcWcU2sQj4drxhqxJv9k/owXCV8c0kH5eb3TOIF+2jVXTdXLiOMypSQdhJER/Q6t/ b3jGFAuAuS/EQIN9gAroKg5lIYUELaEsLIcvbFzllYZIYpQfJiXBzUKO9X97q6Q/afTIQ9 X95FX5jOmPtG645hLFXJtj+jZBY/jnwwotDsLqGw5FIaD6J9UGdL7ZZpwc4yzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704909038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aG5ZluH+4tWJLb7+/5c9aMKv321s7nUuyHkguldv8dc=; b=TpBt8pNQzNGgJDxcqx5zuNBcPWdpz8d9iA4HkVcI0a1LNO3Xh4hcM2tmTnE8fk2LAnmURb /E+BRk2tx9y3VSZ85hBh03dtDaklmV+scMlbSvmc09I+Q3GKzlBp6CHVtyLzttyuzogbjX 0EAiHSgxpKeIGCKpK0cvnh2yUMlkPyrbAYDOKXfTkiAdFA75DxAAAJ1INCnmRQ6qM7M3tY vAFG8Hjm7K9ZxioHToaYag4BJyn10FGIx1lBAbkbAFmmdTQgkAkyrCVZmoaQwOHFGZnlF9 vaCKw8wuT8RijAcHgqzGFYfTE9HG3HKYjR0vi+OYsz2ilYAWFeZsOAtqQq6QzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704909038; a=rsa-sha256; cv=none; b=oZImTwalug2Pw4hhMo2tNjgzCmaf9raZqgjXC+RPxFviNKJHzszXS85ehaluSZ9kCvhcUI N0zEwD2Zk6SD7+z7Vyt0zIIgOx14w78sWxDNy6pIuhkOBDZahzqU3De45oFNQY/tUj86GT 1NEK6690o+hG2MP00xTVlboK7pA4a4HHovBnkb01UdfddP+CzXJW/rawvPjp/0ecbIVHao Xdw0sqgMtbf/mMVKYe/X4gYUIlVQlGtYwkMV2rSgoo+5eG85XBcGdtXt7JLl0bC8/8I47Z 0Y13ZTRp+TYsObgwB1hJRNIR4FTbIXCbcyXUv3O1xZGgott71OZd0b5Fj09ddA== 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 4T9FhF663wzlVt; Wed, 10 Jan 2024 17:50: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 40AHob6s098307; Wed, 10 Jan 2024 17:50:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AHob5v098304; Wed, 10 Jan 2024 17:50:37 GMT (envelope-from git) Date: Wed, 10 Jan 2024 17:50:37 GMT Message-Id: <202401101750.40AHob5v098304@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 6211cd4be32d - main - pthread_attr_get_np(3): Revamp List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6211cd4be32dfdc51b5ac452d4ead98a36ec42a6 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=6211cd4be32dfdc51b5ac452d4ead98a36ec42a6 commit 6211cd4be32dfdc51b5ac452d4ead98a36ec42a6 Author: Olivier Certner AuthorDate: 2024-01-05 13:14:48 +0000 Commit: Olivier Certner CommitDate: 2024-01-10 17:50:19 +0000 pthread_attr_get_np(3): Revamp Fix and more thoroughly describe the attributes object lifecycle. Also, correct the text about which attributes' values are reported. Add the ENOMEM error. While here, rephrase unclear passages, add references and fix the example's style. Reviewed by: kib, emaste Approved by: emaste (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43330 --- share/man/man3/pthread_attr_get_np.3 | 84 +++++++++++++++++++++--------------- 1 file changed, 49 insertions(+), 35 deletions(-) diff --git a/share/man/man3/pthread_attr_get_np.3 b/share/man/man3/pthread_attr_get_np.3 index a13835287d7f..07153586c1b2 100644 --- a/share/man/man3/pthread_attr_get_np.3 +++ b/share/man/man3/pthread_attr_get_np.3 @@ -1,5 +1,10 @@ .\" Copyright (c) 2002,2003 Alexey Zelkin .\" All rights reserved. +.\" Copyright (c) 2024 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Olivier Certner +.\" at Kumacom SARL under sponsorship from the +.\" FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -22,12 +27,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 12, 2021 +.Dd January 5, 2024 .Dt PTHREAD_ATTR_GET_NP 3 .Os .Sh NAME .Nm pthread_attr_get_np -.Nd get attributes of existent thread +.Nd get attributes of an existing thread .Sh LIBRARY .Lb libpthread .Sh SYNOPSIS @@ -37,51 +42,54 @@ .Sh DESCRIPTION The .Fn pthread_attr_get_np -function is used to get existent thread's attributes. -Most fields of -.Vt pthread_attr_t -structure are exact values of attributes provided at thread creation -time (as parameter to -.Xr pthread_create 3 -function), except for the stack address. -.Pp -Value returned as -.Fa dst -is supposed to be used in conjunction with -.Fn pthread_attr_get* -functions to retrieve individual values from +function is used to retrieve the attributes of the specified thread into an +existing .Vt pthread_attr_t structure. -Parameter -.Fa dst -should point to allocated memory area big enough to fit this structure. +The attributes' values are the current ones for the target thread, except for +the stack top address if not properly aligned for the architecture, since in +this case its value has been adjusted internally before use. .Pp -It is HIGHLY RECOMMENDED to use +Argument +.Fa dst +must be a pointer to a valid attributes object +.Po +it was initialized at some point by .Xr pthread_attr_init 3 -function to allocate attribute storage. -.Sh IMPLEMENTATION NOTES -The -.Fn pthread_attr_get_np -function will always return a pointer to the thread's real stack address, -regardless of its value in the original attributes structure. +and was not destroyed since then +.Pc . +After a successful call to +.Fn pthread_attr_get_np , +the individual attributes' values can be retrieved as usual via the +corresponding accessor functions as documented in +.Xr pthread_attr 3 . +After a failed call to +.Fn pthread_attr_get_np , +the object pointed to by +.Fa dst +is left unmodified, and can continue to be used as if the failed call never +happened. .Sh RETURN VALUES If successful, .Fn pthread_attr_get_np function returns 0. Otherwise, an error number is returned to indicate the error. .Sh EXAMPLES +This function retrieves the stack size of the thread specified by the +.Fa pid +argument: .Bd -literal size_t -my_thread_stack_size(pthread_t pid) +my_thread_stack_size(pthread_t tid) { - pthread_attr_t attr; - size_t size; + pthread_attr_t attr; + size_t size; - pthread_attr_init(&attr); - pthread_attr_get_np(pid, &attr); - pthread_attr_getstacksize(&attr, &size); - pthread_attr_destroy(&attr); - return(size); + pthread_attr_init(&attr); + pthread_attr_get_np(tid, &attr); + pthread_attr_getstacksize(&attr, &size); + pthread_attr_destroy(&attr); + return (size); } .Ed .Sh ERRORS @@ -90,12 +98,16 @@ The function will fail if: .Bl -tag -width Er .It Bq Er EINVAL -Invalid value for one of given parameters. +One of the arguments has an invalid value. .It Bq Er ESRCH No thread could be found corresponding to that specified by the given thread ID. +.It Bq Er ENOMEM +There was not enough memory to allocate additional storage needed by the attributes +object's implementation. .El .Sh SEE ALSO +.Xr pthread_attr 3 , .Xr pthread_attr_destroy 3 , .Xr pthread_attr_getdetachstate 3 , .Xr pthread_attr_getinheritsched 3 , @@ -111,4 +123,6 @@ thread ID. The .Fn pthread_attr_get_np function and this manual page were written by -.An Alexey Zelkin Aq Mt phantom@FreeBSD.org . +.An Alexey Zelkin Aq Mt phantom@FreeBSD.org , +and the latter was revised by +.An Olivier Certner Aq Mt olce@FreeBSD.org . From nobody Wed Jan 10 17:50:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9FhH3MqPz55Txy; Wed, 10 Jan 2024 17: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 4T9FhH0sH6z46xh; Wed, 10 Jan 2024 17: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=1704909039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UrQmzkCquLAHENX2awvo9IByKhG9SACnmxrZuxC/ZHE=; b=eitCyByR6ZrbqJCRJ3gZDqDe84wQ0LN7VDNfeQc7cb3qAar3q/CW8TxSml2/1GOnzYW6JH kfRJB2qrhQ+IvaiVjxG+cMSHXUmOAcvVwrKjoUTNbALvNv7fgD8FEA0u7mogO0ZgoVZ5dp L6xYjKH+CeQGNU1z77MKI5MFqu1am17Ev5yOSFJ3ZyXIHJ+RMx+KXNVI3KtuLS+dfGraJc ioxFCp+NsmU+L8HaN/4tN00yIIGs8ZlOZWwRXqEP9/bLtjY0XlKkXcmmHNugOwlp3fPWKr C/tBaEaOvQkHkDLPiGhavYsDr2RheScwE3gpP309AVuglToLLvMUvqYvIi1Ucg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704909039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UrQmzkCquLAHENX2awvo9IByKhG9SACnmxrZuxC/ZHE=; b=B4LuNSfe/pQ3dBnoxAOpZDBpVtSXybcnDr6C9MGFdNhOsCV1wppERpAzSI8GQ1gSCgBSVU 1GDyJyExLvevDbxxYpgRssNrwly3tYvSGUpTt8Fz1emeIYEdmPWD1Aj9Es09PTyvc8xvuS k/C74IeVY1jCXPObLnbWdiGFLj7Qrq/myiRNJQCuHZs41k6+LNH2ggCuKDJq11TEGCqVuV yfIOswg+bGcPccLdNpRIWcPPpEvMheXZSJjYftHmaK1l1QtM0cA9tNXKn/sSQpb2AHztHl TDqor91wyi9uRxNeBnFCTeSTZpz423CCIYW3/cCd++z6jXk9E0XGm5rJ5cAJlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704909039; a=rsa-sha256; cv=none; b=npvpzMa1eBskW43+pPvrSPPMVHvzu+seIhghoFhvRhEWEMbzpPgWO4i+RqaxMgC+azz8xJ fRNLiKrnwEoIIMCUQAQAjZbo8+nUvhyP1Dqh19TPQqGXwHmNLuAKgIP9MVaZULfp91Pmdr 4/UUfPejf26/RAaXeyUa0tYjDHkusD8Kdeh7aozVPChC8QCpYCe1z/9OEBgCgm3XWHyKvM WeggQ4c3T8FYF5hR86UXCsqYHtgI8c3tWVedl00nPulso60LwY+mxVhCaO94rH64Svat9g ICEZX0R9fwzZAyTurTpAz2OKaU0NjeUZ1JLeGxL4PPbWG+lfyrrKcPwGJtyjjQ== 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 4T9FhG73QTzl38; Wed, 10 Jan 2024 17: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 40AHocbX098344; Wed, 10 Jan 2024 17: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 40AHocNR098341; Wed, 10 Jan 2024 17:50:38 GMT (envelope-from git) Date: Wed, 10 Jan 2024 17:50:38 GMT Message-Id: <202401101750.40AHocNR098341@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: a1e37beb45d2 - main - cr_bsd_visible(): Style fixes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1e37beb45d270ae9926eff3b93e9398d08c94e5 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=a1e37beb45d270ae9926eff3b93e9398d08c94e5 commit a1e37beb45d270ae9926eff3b93e9398d08c94e5 Author: Olivier Certner AuthorDate: 2024-01-05 15:23:19 +0000 Commit: Olivier Certner CommitDate: 2024-01-10 17:50:19 +0000 cr_bsd_visible(): Style fixes Explicitly test for non-zero return codes. Separate assignment and testing of 'error' in distinct lines. Reviewed by: emaste, kib Approved by: emaste (mentor) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43335 --- sys/kern/kern_prot.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 0ebedcd72fc3..be8e0b14add2 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1463,11 +1463,14 @@ cr_bsd_visible(struct ucred *u1, struct ucred *u2) { int error; - if ((error = cr_canseeotheruids(u1, u2))) + error = cr_canseeotheruids(u1, u2); + if (error != 0) return (error); - if ((error = cr_canseeothergids(u1, u2))) + error = cr_canseeothergids(u1, u2); + if (error != 0) return (error); - if ((error = cr_canseejailproc(u1, u2))) + error = cr_canseejailproc(u1, u2); + if (error != 0) return (error); return (0); } From nobody Wed Jan 10 18:20:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMG6mJKz55YJk; Wed, 10 Jan 2024 18:20: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 4T9GMG6Fnlz4GRR; Wed, 10 Jan 2024 18:20:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=24+5dsP2sB4PFN5kwR/h0W8TL4Zk4Rfyk3Rtu2YVJ+Q=; b=kDMXpKZh+/3uGxZPzw81M4VWLsSz62XB99/NzpCIqyRSkwBYHVs5DFW521etGo/wR2r9D0 1tDWnEmAABN0110nEO4ZXuVnckWLkFxV3aFMFN4dAnHxrlFegUCduGlWxZDeq3deqWBuwL LuLCCmkQxRwTAPVr11dM5n8sLeIAKx72TWh+EEBpfkmo9im0fBAPYQEoT9nttfMNU5qHzE IZTwI19OocQjluLATSMWJq/OqZ1jsMMVwCh7hIT6BS22KHs8yEfnJsLU4cUVBqX4+0IAro bo+HC+rJqkpx1T0vRZd5LyLuzVM8S6UHCs3+sKq/vQt6MeBj/GUiPQB4WnolZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=24+5dsP2sB4PFN5kwR/h0W8TL4Zk4Rfyk3Rtu2YVJ+Q=; b=lbePXSiKvEKcHAHMUubznxB5k7ebqxKl9qgyx1mYIHP6+QyW52o8ivU8Mq1vNZw//x0HSB q0P3KwtGiAMpJ5ElKOVTWqAQpePn6675hWneAFKrnOMDiZRt4DYo8Cncv23YQReDJxMc23 WN6YwMixjNEo0BHvzVrZ6tOaYfyGSWlIAtjWFiMxA9IoTQ2yH7jfask76IQPNjah+61sv+ WvoELPFUo1wOLmzwFzYivpKYzkybXOMx19p0jjrgGcw3T+7BZrUrwnm+qafSVPo+SxzgVX jnw4urdXvNiYVAFz2KmNOvhLwdXppd4F6XH0bKy5BBKbTNtLcKab5OI5Th3sDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910858; a=rsa-sha256; cv=none; b=Kki15A3LHDKMoeyxPtb2rlPku8GGV2TaFBDTW2AT8M6v2oc7ecXlKhS9pGBrBOJUsLXPcv vLz6OW6ouhOPukksvtoGpNmmMyxN6dclHgy1ptVKON7rlf1HZ9jHU/dlu7kPUnjao9Cmfk zhywTXvlV/BYOYu/SAOtt/tpqgy7dMDOloE94NzOu79m/HM8Yb/WSxDVvkH3u39QFHQx0f 8uqAqM9DXeU1YACdnMy7F5GsINyHdvvKFR+VSGazARJwGAHuGpdqukQd97okhpl4Xo0VId NeR8//L6oMSbx2waVLjCCaSOQMxEIk6zQUTZpFz4ArKJL4SWSDoPYPoQ10ZSgw== 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 4T9GMG5JSwzmNY; Wed, 10 Jan 2024 18:20: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 40AIKwpO052607; Wed, 10 Jan 2024 18:20:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIKw8O052604; Wed, 10 Jan 2024 18:20:58 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:20:58 GMT Message-Id: <202401101820.40AIKw8O052604@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: 3c2b2a28b9c1 - main - iicbus: Move rockchip driver into the common directory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 3c2b2a28b9c102d9aa368663ea250fd644f96b46 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=3c2b2a28b9c102d9aa368663ea250fd644f96b46 commit 3c2b2a28b9c102d9aa368663ea250fd644f96b46 Author: Emmanuel Vadot AuthorDate: 2023-12-25 18:21:52 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:10 +0000 iicbus: Move rockchip driver into the common directory No need to keep it under sys/arm64/rockchip It's easier to find which controller we support by looking under one directory. While here remove the condition on SOC option, device rk_i2c is enough as all Rockchip SoC that we support have this controller. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43184 --- sys/arm/rockchip/files.rk32xx | 2 +- sys/conf/files.arm64 | 2 +- sys/{arm64 => dev/iicbus/controller}/rockchip/rk_i2c.c | 0 sys/modules/rockchip/rk_i2c/Makefile | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm/rockchip/files.rk32xx b/sys/arm/rockchip/files.rk32xx index 0f2774fd76cc..e8f838fb186a 100644 --- a/sys/arm/rockchip/files.rk32xx +++ b/sys/arm/rockchip/files.rk32xx @@ -2,7 +2,7 @@ kern/kern_clocksource.c standard arm/rockchip/rk32xx_machdep.c standard arm/rockchip/rk32xx_mp.c optional smp -arm64/rockchip/rk_i2c.c standard +dev/iicbus/controller/rockchip/rk_i2c.c standard arm64/rockchip/rk_iodomain.c standard arm64/rockchip/rk_gpio.c standard arm64/rockchip/rk_grf.c standard diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index e6f525e63e64..21ad400bc2a7 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -344,6 +344,7 @@ ice_ddp.fw optional ice_ddp \ dev/iicbus/controller/twsi/mv_twsi.c optional twsi fdt dev/iicbus/controller/twsi/a10_twsi.c optional twsi fdt dev/iicbus/controller/twsi/twsi.c optional twsi fdt +dev/iicbus/controller/rockchip/rk_i2c.c optional rk_i2c fdt dev/ipmi/ipmi.c optional ipmi dev/ipmi/ipmi_acpi.c optional ipmi acpi @@ -660,7 +661,6 @@ arm64/rockchip/rk3568_combphy.c optional fdt rk_combphy soc_rockchip_rk3568 arm64/rockchip/rk3568_pcie.c optional fdt pci soc_rockchip_rk3568 arm64/rockchip/rk3568_pciephy.c optional fdt pci soc_rockchip_rk3568 arm64/rockchip/rk_dwc3.c optional fdt rk_dwc3 soc_rockchip_rk3399 | fdt rk_dwc3 soc_rockchip_rk3568 -arm64/rockchip/rk_i2c.c optional fdt rk_i2c soc_rockchip_rk3328 | fdt rk_i2c soc_rockchip_rk3399 | fdt rk_i2c soc_rockchip_rk3568 arm64/rockchip/rk_i2s.c optional fdt sound soc_rockchip_rk3328 | fdt sound soc_rockchip_rk3399 arm64/rockchip/rk_otp.c optional fdt soc_rockchip_rk3568 arm64/rockchip/rk_otp_if.m optional fdt soc_rockchip_rk3568 diff --git a/sys/arm64/rockchip/rk_i2c.c b/sys/dev/iicbus/controller/rockchip/rk_i2c.c similarity index 100% rename from sys/arm64/rockchip/rk_i2c.c rename to sys/dev/iicbus/controller/rockchip/rk_i2c.c diff --git a/sys/modules/rockchip/rk_i2c/Makefile b/sys/modules/rockchip/rk_i2c/Makefile index b90b65f1410d..3cf847e1d1cc 100644 --- a/sys/modules/rockchip/rk_i2c/Makefile +++ b/sys/modules/rockchip/rk_i2c/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/arm64/rockchip +.PATH: ${SRCTOP}/sys/dev/iicbus/controller/rockchip KMOD= rk_i2c SRCS= rk_i2c.c From nobody Wed Jan 10 18:20:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMJ1MFpz55YDM; Wed, 10 Jan 2024 18:21: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 4T9GMJ0VQqz4GK3; Wed, 10 Jan 2024 18:21:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4XVJnmPLLZbWqLbmrgR1GFL8Rs+FPP7j37gtXsrDwR0=; b=ZJ+tscTqze31N7LF3NI8VqkWI9Xqim8K8YOkjvvcnSubDwhSoF3jrHDbg74IUwLbvEcUtl H4YfwkjsqeDsn11DuPcUouVLGdZfFfAhceBcopbrqXdUloNXjnXl7FRTJFSlLSh478j5F+ sqRFQLibbB4LYWamW0hIlpEWexeWyZvsvfdpb6BfimRg99aDTrBe5ifIPRqsctwSwrxYoP N0n+AGdu72diFQdBUJ6Yh3EiRux6U9HT3kHFXpZ5GEi9dr5IlG1yUGoLY6EH4FSL3RBcBo r7GRZkLrxQaCP6zewpYF01zNCJg5pgviFTWv0p3pQ/qG8Nt34PZ3HFDvO+lv3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4XVJnmPLLZbWqLbmrgR1GFL8Rs+FPP7j37gtXsrDwR0=; b=sfNQ7jrkjvJ3jq8r9dV2TV5mW8v5Dv9W0DwAwOTNVLyeT9hxSaKMDZAlbzP+nxDks3wHv+ XIjDPy56e//IdSOHMiNlH7+snW3Z1VTpWFyUAFgEZSW30uHnYuELaTKzUnHsmicTEUImha pBJGXG8m+Dc4dAc85EDR+6FtCmYDxODzf8Asakk7RQjIf3UU99Jr6zkUfhwukcbmFKZXAU dgWbOeOZFnBLV3PLJDt5r5PDFO33Z8mUPDqIlFSQIrfHy/Qmda+bLxGiE07ICkmYwrHeXX EQ+YfJp0KbqVaRVeVUNGnLw5JU7Pr3IoRs3dz1RXWaxQY1V/Cs7b7rJ2lwSNXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910860; a=rsa-sha256; cv=none; b=dr1TqLCiyiZNMCmLD0mYRlgJ335XcZiuxiq7ksRxsYUP5d0LNGLD/vz9w2oJ7Io2uE53Yi c77C71mplj0ZEFaRiAonqZkeD6yTY0QdgMqngqT2ef6Bh9ucp+PdQfeU1sG4gw8L1s44xm 3ceEwe5bqoILQos9Qok/HQZ/z3eIc0hq4W5y9ABzkC9woM3sYHdFpaYtWBdw+8iW6esS4E I/hYjfVY+a4m2ugCEGPE+yEtIqkWt7cGBTR6WG2b/r3nso38S8tbXfUwO6J0Qgpq7sL07Y oysv5n+p3a76j27HqFdSqdbVrJ8JjRLS2m8Pfeq19yvDI5jj6xD1ivTwmiU8Bg== 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 4T9GMH6PRbzmNZ; Wed, 10 Jan 2024 18:20: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 40AIKxeo052661; Wed, 10 Jan 2024 18:20:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIKxng052658; Wed, 10 Jan 2024 18:20:59 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:20:59 GMT Message-Id: <202401101820.40AIKxng052658@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: 994c943a0098 - main - spibus: Move rockchip driver into the common directory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 994c943a0098e38bff96f9f9169cbb38542c39c1 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=994c943a0098e38bff96f9f9169cbb38542c39c1 commit 994c943a0098e38bff96f9f9169cbb38542c39c1 Author: Emmanuel Vadot AuthorDate: 2023-12-25 18:30:05 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:13 +0000 spibus: Move rockchip driver into the common directory No need to keep it under sys/arm64/rockchip It's easier to find which controller we support by looking under one directory. Sponsored by: Beckhoff Automation GmbH & Co. KG --- sys/conf/files.arm64 | 3 ++- sys/{arm64 => dev/spibus/controller}/rockchip/rk_spi.c | 0 sys/modules/rockchip/rk_spi/Makefile | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 21ad400bc2a7..fa7c4e6362c4 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -391,6 +391,8 @@ dev/sdhci/sdhci_xenon_fdt.c optional sdhci_xenon sdhci fdt dev/sram/mmio_sram.c optional fdt mmio_sram dev/sram/mmio_sram_if.m optional fdt mmio_sram +dev/spibus/controller/rockchip/rk_spi.c optional fdt rk_spi + dev/uart/uart_cpu_arm64.c optional uart dev/uart/uart_dev_mu.c optional uart uart_mu fdt dev/uart/uart_dev_pl011.c optional uart pl011 @@ -675,7 +677,6 @@ arm64/rockchip/rk_grf.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_r arm64/rockchip/rk_pinctrl.c optional fdt rk_pinctrl soc_rockchip_rk3328 | fdt rk_pinctrl soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 arm64/rockchip/rk_gpio.c optional fdt rk_gpio soc_rockchip_rk3328 | fdt rk_gpio soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 arm64/rockchip/rk_iodomain.c optional fdt rk_iodomain -arm64/rockchip/rk_spi.c optional fdt rk_spi arm64/rockchip/rk_usb2phy.c optional fdt rk_usb2phy soc_rockchip_rk3328 | fdt rk_usb2phy soc_rockchip_rk3399 | fdt rk_usb2phy soc_rockchip_rk3568 arm64/rockchip/rk_typec_phy.c optional fdt rk_typec_phy soc_rockchip_rk3399 arm64/rockchip/rk_tsadc_if.m optional fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 diff --git a/sys/arm64/rockchip/rk_spi.c b/sys/dev/spibus/controller/rockchip/rk_spi.c similarity index 100% rename from sys/arm64/rockchip/rk_spi.c rename to sys/dev/spibus/controller/rockchip/rk_spi.c diff --git a/sys/modules/rockchip/rk_spi/Makefile b/sys/modules/rockchip/rk_spi/Makefile index 614ea680ce56..70526cdaf2c2 100644 --- a/sys/modules/rockchip/rk_spi/Makefile +++ b/sys/modules/rockchip/rk_spi/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/arm64/rockchip +.PATH: ${SRCTOP}/sys/dev/spibus/controller/rockchip KMOD= rk_spi SRCS= rk_spi.c From nobody Wed Jan 10 18:21:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMK3cRxz55YDS; Wed, 10 Jan 2024 18:21: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 4T9GMK1Yyqz4GKG; Wed, 10 Jan 2024 18:21:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IP7oNYTGYNFaFpPNgvdP0KKM4SUHcjFWJwOC+Qt5XR4=; b=J6TApTF5KRk1/d6xbZHIrCQAnZEa10nSQ4Knw9J60SGafHfNsS4X+YsHo7cEPZ1BNVkiOK K+PkTjArgqqg+XLySkUFozdiYv3miVe4uKXCKXRxFz4TMayzLvFtRsR751PkYlf1JCsu5a aoxuaoaBxgTuxaSzd1YhIjru4LjBTWisI7CeVmhCrUqy8kcA1BYbw36CaWDymRU2PVlZCX qjeiH+LcUIyvH3BRivLAvYfjNy0ElTGOnHKxrr+rKNX+rVfa1wcJT6Y91LIZ1idPuYY9Fi aQk5amXWgObYDU4OQp3v4QwFOyJDWDI3KgwbVcCPCIdTyABcETKikq9lta787g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IP7oNYTGYNFaFpPNgvdP0KKM4SUHcjFWJwOC+Qt5XR4=; b=NTykG8iblcgQeIMBsdWJnty+jC539wtylJA7ptK10/RG3CHDjahR/CEaUjMozV3oxZzYoP myQG668et/6s2kXIXOb4K6JFaWXEz/uJ4sjPHdergQ/aHhSk8dU7d5yJg+izLrF3fSygVm OzbThLfys/TjyMly8rMtnL1btFsUzgZDkHz0y2hYDZJSr46iO99eLnJVfiPXQigqiRvZH2 lfRts1Dhfx0EbZDtYbwVPo5AlVEO7Kl+X9d9gZnO0fLM/CnjrvlB81VYjZOKWi3K/AUT7/ 8Z6NrEArRIQlMs3lFmzEPNYPTPS881KXnsSnqIxr+1qzRhx6Dbz+sMXFBhDNMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910861; a=rsa-sha256; cv=none; b=nDgJStSCy+m6/Mo+VFILCpQqJteC77Z5HdleefC5y4Kccbfj7KpGc5JakM69PyRbNvv/MM X9RW7FDY62KrUFhhdmtNRTgtNIc56j4oCLeij5c/ZoG8rPZsO/kbN/pDUsG2d2Mb1rlSWz 57ZsjxkC2WmyzUglM8ClZx8Rn2wCL7Gv7OJo9kkU+3EeSraqC4f4UUg0Q5exy6JdCnTVlc GOThzzdabOsJjlcvGY464yOUztcI6F+qO7SYhCVsM1uak/fbUM8eob6CsWvJwG1UvS14ei nmsBhGh7CsvHQy+Bhl5xk3eWb0Kz/NVz7ek319Uz6a05NPUv9k3baUpAgZ9Ohg== 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 4T9GMK0LVrzmJK; Wed, 10 Jan 2024 18:21: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 40AIL0tb052722; Wed, 10 Jan 2024 18:21:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIL0G4052719; Wed, 10 Jan 2024 18:21:00 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:00 GMT Message-Id: <202401101821.40AIL0G4052719@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: ec2b0ccdeed2 - main - spibus: Move allwinner driver into the common directory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ec2b0ccdeed2cbd3f49b7a992023c351e239389b Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=ec2b0ccdeed2cbd3f49b7a992023c351e239389b commit ec2b0ccdeed2cbd3f49b7a992023c351e239389b Author: Emmanuel Vadot AuthorDate: 2023-12-25 18:33:02 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:15 +0000 spibus: Move allwinner driver into the common directory No need to keep it under sys/arm/allwinner It's easier to find which controller we support by looking under one directory. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43185 --- sys/conf/files.arm64 | 2 +- sys/{arm => dev/spibus/controller}/allwinner/aw_spi.c | 0 sys/modules/allwinner/aw_spi/Makefile | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index fa7c4e6362c4..1a141963a37e 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -391,6 +391,7 @@ dev/sdhci/sdhci_xenon_fdt.c optional sdhci_xenon sdhci fdt dev/sram/mmio_sram.c optional fdt mmio_sram dev/sram/mmio_sram_if.m optional fdt mmio_sram +dev/spibus/controller/allwinner/aw_spi.c optional fdt aw_spi dev/spibus/controller/rockchip/rk_spi.c optional fdt rk_spi dev/uart/uart_cpu_arm64.c optional uart @@ -444,7 +445,6 @@ arm/allwinner/aw_r_intc.c optional aw_r_intc fdt arm/allwinner/aw_rsb.c optional aw_rsb fdt arm/allwinner/aw_rtc.c optional aw_rtc fdt arm/allwinner/aw_sid.c optional aw_sid nvmem fdt -arm/allwinner/aw_spi.c optional aw_spi fdt arm/allwinner/aw_syscon.c optional aw_syscon syscon fdt arm/allwinner/aw_thermal.c optional aw_thermal nvmem fdt arm/allwinner/aw_usbphy.c optional ehci aw_usbphy fdt diff --git a/sys/arm/allwinner/aw_spi.c b/sys/dev/spibus/controller/allwinner/aw_spi.c similarity index 100% rename from sys/arm/allwinner/aw_spi.c rename to sys/dev/spibus/controller/allwinner/aw_spi.c diff --git a/sys/modules/allwinner/aw_spi/Makefile b/sys/modules/allwinner/aw_spi/Makefile index e26ffd6589e5..3bab8c70e417 100644 --- a/sys/modules/allwinner/aw_spi/Makefile +++ b/sys/modules/allwinner/aw_spi/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/arm/allwinner +.PATH: ${SRCTOP}/sys/dev/spibus/controller/allwinner/ KMOD= aw_spi SRCS= aw_spi.c From nobody Wed Jan 10 18:21:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GML43Ffz55YQ3; Wed, 10 Jan 2024 18:21:02 +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 4T9GML24Jjz4GHQ; Wed, 10 Jan 2024 18:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3GK75PMIHeL5P1/HjJ5MBP5Yv/vOkecN/CtMIEmdUmc=; b=wxrXmo8oStx0PMg08vbL6n9VYaxBaQnfEqExDI8Rrm2cgWB9Lz37wstpIR+rq1LcTKqALM iVCsEWHFM+HUHwq+z75cZvi3F5W3KWE9OaP6F7yCriek8ciarejRSpt4jxU/rav9lTzBx4 9VC/c+w9e+OhQ5Tdx6q5aNfuyVK36TLsToilG7FOMUDUyXfTQLjDIp6xOQ9DUFMY7eYyEW YvPdGKqnVovZdzIq83EmutyWKh6CRolF6KtcjWKOg+Yv2dFGixHmmzCWkWBb2GwZe6tuRG DamCsCrTzt9sGzNV6BB8lDqJWaod1+LJdn/qDhszo16IEmw/DEjf5SFjC3kIKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3GK75PMIHeL5P1/HjJ5MBP5Yv/vOkecN/CtMIEmdUmc=; b=CmJX2MEcSJ/mz0NHkHfP2odwjxrJcjm82yfDSN4MNa+qltkzHOaIfA4xzjzeqUpjq+yMCu IdwAgJIOaA5tu96FDvp2l+KXLgZiAi/zkMarHadz+4803ObDzwf/8R4CJALvB+ORWqyL+L 0ZXMDqy9Wst9yvQmQHd9Q+426U8IfaXq6O14klUmQFoo6YwRN7bPgg9FHXv4fPgadjM0MT v3z+J7rycx92bFykvRw0Vzr10Sur10ihqQJq9mdrX9Lm7piyDy2qznJ4eEL5z0r0EwQUFM lHVGgkmAuTXApb0/JkFo2KqfHyzZ7RAZXJQUIc4G4yrAw/REHfrYAj7ZrQRoQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910862; a=rsa-sha256; cv=none; b=RDkpD/rNRexzf5VVrqDJc+bq+sm47xtdaySw4YGbtdgQ8vv7NIUmKaBEfeMrjkhxAxGBff T6S70dPqpdjtvsfEVmBbKdiKYsYt+VSptEPILJzvQTNEtTwZ7/8tGzfVZG2w1TD65vtIzc He5ME6dtbU9cG5QHBmsDIEMgID1xi0D2Ylo2RPKQkbodeygu/fptBxWIioxZ+u4vdZ0QtF yZfRdwfPxgFcLK6C6rRedruDFdg1SOICCj1TabzDoLU/Izv42pS8lWZicVXOKSzBCXASxL KILDKphN4RWRwaVAV2yJQ6gqcCKk/aBKN+olwOcdfSMzb+K5zt97I1TdO4UB0g== 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 4T9GML1BDWzmJL; Wed, 10 Jan 2024 18:21: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 40AIL2iF052775; Wed, 10 Jan 2024 18:21:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIL247052772; Wed, 10 Jan 2024 18:21:02 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:02 GMT Message-Id: <202401101821.40AIL247052772@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: 2e3507c25e42 - main - pwm: Move rockchip driver into the common directory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 2e3507c25e42292b45a5482e116d278f5515d04d Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=2e3507c25e42292b45a5482e116d278f5515d04d commit 2e3507c25e42292b45a5482e116d278f5515d04d Author: Emmanuel Vadot AuthorDate: 2023-12-25 18:38:54 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:17 +0000 pwm: Move rockchip driver into the common directory No need to keep it under sys/arm64/rockchip It's easier to find which controller we support by looking under one directory. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43186 --- sys/arm/rockchip/files.rk32xx | 2 +- sys/conf/files.arm64 | 3 ++- sys/{arm64 => dev/pwm/controller}/rockchip/rk_pwm.c | 0 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/arm/rockchip/files.rk32xx b/sys/arm/rockchip/files.rk32xx index e8f838fb186a..5393b7784108 100644 --- a/sys/arm/rockchip/files.rk32xx +++ b/sys/arm/rockchip/files.rk32xx @@ -8,7 +8,7 @@ arm64/rockchip/rk_gpio.c standard arm64/rockchip/rk_grf.c standard arm64/rockchip/rk_pinctrl.c standard arm64/rockchip/rk_pmu.c standard -arm64/rockchip/rk_pwm.c standard +dev/pwm/controller/rockchip/rk_pwm.c standard arm64/rockchip/rk_tsadc.c standard arm64/rockchip/rk_tsadc_if.m standard arm64/rockchip/rk_usbphy.c standard diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 1a141963a37e..c5f8207f01f5 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -380,6 +380,8 @@ dev/psci/psci.c standard dev/psci/smccc_arm64.S standard dev/psci/smccc.c standard +dev/pwm/controller//rockchip/rk_pwm.c optional fdt rk_pwm + dev/random/armv8rng.c optional armv8_rng !random_loadable dev/safexcel/safexcel.c optional safexcel fdt @@ -681,7 +683,6 @@ arm64/rockchip/rk_usb2phy.c optional fdt rk_usb2phy soc_rockchip_rk3328 | fdt arm64/rockchip/rk_typec_phy.c optional fdt rk_typec_phy soc_rockchip_rk3399 arm64/rockchip/rk_tsadc_if.m optional fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 arm64/rockchip/rk_tsadc.c optional fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 -arm64/rockchip/rk_pwm.c optional fdt rk_pwm arm64/rockchip/rk_pcie.c optional fdt pci soc_rockchip_rk3399 arm64/rockchip/rk_pcie_phy.c optional fdt pci soc_rockchip_rk3399 diff --git a/sys/arm64/rockchip/rk_pwm.c b/sys/dev/pwm/controller/rockchip/rk_pwm.c similarity index 100% rename from sys/arm64/rockchip/rk_pwm.c rename to sys/dev/pwm/controller/rockchip/rk_pwm.c From nobody Wed Jan 10 18:21:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMN5rpRz55YHB; Wed, 10 Jan 2024 18:21:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9GMN3ltkz4GXd; Wed, 10 Jan 2024 18:21:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gu/ZhJBTOBHU80yrvDqOLXjqrNznRGX8P5jaDahiq58=; b=yEPGxgHV9WhhbSaQQ7Dn8EMJsmKoMmtbqTXF0ZutD4R14EgRdErKo+K98eMP20g2YTuGsu i8hGSr+Lo7TCmO4rqmnsk82DiioJys4Cttnj9GfX/fJ++0uvBsFrtAur2d8Hzd9wnXJbWO k07Etrx9v22Z9apCIC+eYF2CYxiwaLVWz/aezGbQJJZYZrLPXomdSIMwkdx1KlQNmsy1v3 /ODaE4ITC2GPefbMwVwY3S33mn7tiZ4AoVgUTuATShlJqQldym1Sxb+3zg/CuxSlPmiZl/ aIf9UsMfuJ+Tc7rPbrUiPHwvn0uPG4ep3gvwM+vzksBjlP0q5E1kDZOlR2I7HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gu/ZhJBTOBHU80yrvDqOLXjqrNznRGX8P5jaDahiq58=; b=WKQGz2TfdtCdLIACRDkZbbgwgSoa0nJ+bjcM5wR9nAKmuHPHhBduDynGIAA8F3JSMk1XoR /QgKebVNctI609eWZkSgXcMpygy7A+xOE4Q5q4QlTrctTjV85n7NeJhJC7WcXx7iVP+kk6 whsXn+z5IjSGT+R0tlx1eslNU2S455pZRg5IYsiBwNn71c3aA3OI921cOU3mNXlHOFcXBh oU1ih2vb9XvI/WUJyHXFLhVG4XE6FIX+zMxbngM2VrkLdEj3lnnZn8kUMkQd4ay5gzOTqb 2SAVx06K8gueQDubKn8Dv0AF6iR2znkVhDGBWC3rgFQc2eFW/2K5gYdqzngKRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910864; a=rsa-sha256; cv=none; b=afpaw3cJZCr8PDz+iDBm0hFcguuBFPFudCevbL03x9XH+J14ObOz5oC3F/cWlKTu/tH3Zq qORsXyEPsKKnvg6+CdbNafvIpo7gJBns0lp+W23Q2MqK0uEho6mpPY2xqMu5c/GUFaxW81 K2qwwzpfZZCXBbHfXz7Exd0rV8YcmnWO7QI8ToGUE73tBc9R5WwIdgqlZTDVIrmMCTAR1G U6042CN1U/CSWVxTXUvwJm3VifNw+f1Dtprmae6DbeFAF3r5bmAm1ZZ1tFjynmon2K6i+P pcyJ0BeWRPSgksbB0NmUyfgzPYO+l3Bys1UxUwzO1RbBh+UlWBzGCM0mdAqV0w== 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 4T9GMN2rl3zmLW; Wed, 10 Jan 2024 18:21:04 +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 40AIL48w052882; Wed, 10 Jan 2024 18:21:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIL4V8052879; Wed, 10 Jan 2024 18:21:04 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:04 GMT Message-Id: <202401101821.40AIL4V8052879@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: e37e8677fe55 - main - clk: Move allwinner driver into the common directory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: e37e8677fe55ddd0685c764e17ac58707787758a Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=e37e8677fe55ddd0685c764e17ac58707787758a commit e37e8677fe55ddd0685c764e17ac58707787758a Author: Emmanuel Vadot AuthorDate: 2023-12-25 19:01:52 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:20 +0000 clk: Move allwinner driver into the common directory No need to keep it under sys/arm/allwinner/clkng It's easier to find which controller we support by looking under one directory. It will also be shared with Allwinner RiscV SoC. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43188 --- sys/arm/allwinner/a10/files.a10 | 2 +- sys/arm/allwinner/a13/files.a13 | 2 +- sys/arm/allwinner/a20/files.a20 | 2 +- sys/arm/allwinner/a31/files.a31 | 2 +- sys/arm/allwinner/a83t/files.a83t | 4 +-- sys/arm/allwinner/files.allwinner | 22 ++++++++-------- sys/arm/allwinner/h3/files.h3 | 4 +-- sys/conf/files.arm64 | 30 +++++++++++----------- sys/{arm => dev/clk}/allwinner/aw_ccu.c | 0 .../clkng => dev/clk/allwinner}/aw_ccung.c | 4 +-- .../clkng => dev/clk/allwinner}/aw_ccung.h | 18 ++++++------- .../allwinner/clkng => dev/clk/allwinner}/aw_clk.h | 0 .../clkng => dev/clk/allwinner}/aw_clk_frac.c | 4 +-- .../clkng => dev/clk/allwinner}/aw_clk_frac.h | 0 .../clkng => dev/clk/allwinner}/aw_clk_m.c | 4 +-- .../clkng => dev/clk/allwinner}/aw_clk_m.h | 0 .../clkng => dev/clk/allwinner}/aw_clk_mipi.c | 4 +-- .../clkng => dev/clk/allwinner}/aw_clk_mipi.h | 0 .../clkng => dev/clk/allwinner}/aw_clk_nkmp.c | 4 +-- .../clkng => dev/clk/allwinner}/aw_clk_nkmp.h | 2 +- .../clkng => dev/clk/allwinner}/aw_clk_nm.c | 4 +-- .../clkng => dev/clk/allwinner}/aw_clk_nm.h | 0 .../clkng => dev/clk/allwinner}/aw_clk_nmm.c | 4 +-- .../clkng => dev/clk/allwinner}/aw_clk_nmm.h | 0 .../clkng => dev/clk/allwinner}/aw_clk_np.c | 4 +-- .../clkng => dev/clk/allwinner}/aw_clk_np.h | 0 .../clk/allwinner}/aw_clk_prediv_mux.c | 4 +-- .../clk/allwinner}/aw_clk_prediv_mux.h | 2 +- .../clkng => dev/clk/allwinner}/ccu_a10.c | 2 +- .../clkng => dev/clk/allwinner}/ccu_a13.c | 2 +- .../clkng => dev/clk/allwinner}/ccu_a31.c | 2 +- .../clkng => dev/clk/allwinner}/ccu_a64.c | 2 +- .../clkng => dev/clk/allwinner}/ccu_a83t.c | 2 +- .../clkng => dev/clk/allwinner}/ccu_de2.c | 2 +- .../allwinner/clkng => dev/clk/allwinner}/ccu_h3.c | 2 +- .../allwinner/clkng => dev/clk/allwinner}/ccu_h6.c | 2 +- .../clkng => dev/clk/allwinner}/ccu_h6_r.c | 2 +- .../clkng => dev/clk/allwinner}/ccu_sun8i_r.c | 2 +- 38 files changed, 73 insertions(+), 73 deletions(-) diff --git a/sys/arm/allwinner/a10/files.a10 b/sys/arm/allwinner/a10/files.a10 index 46fbb208f998..f21b937b1b45 100644 --- a/sys/arm/allwinner/a10/files.a10 +++ b/sys/arm/allwinner/a10/files.a10 @@ -1,4 +1,4 @@ arm/allwinner/a10/a10_intc.c standard arm/allwinner/a10/a10_padconf.c standard -arm/allwinner/clkng/ccu_a10.c standard +dev/clk/allwinner/ccu_a10.c standard diff --git a/sys/arm/allwinner/a13/files.a13 b/sys/arm/allwinner/a13/files.a13 index 6bf013e96b42..ec248227e058 100644 --- a/sys/arm/allwinner/a13/files.a13 +++ b/sys/arm/allwinner/a13/files.a13 @@ -1,3 +1,3 @@ arm/allwinner/a13/a13_padconf.c standard -arm/allwinner/clkng/ccu_a13.c standard +dev/clk/allwinner/ccu_a13.c standard diff --git a/sys/arm/allwinner/a20/files.a20 b/sys/arm/allwinner/a20/files.a20 index f708638ff294..663047867e45 100644 --- a/sys/arm/allwinner/a20/files.a20 +++ b/sys/arm/allwinner/a20/files.a20 @@ -1,3 +1,3 @@ arm/allwinner/a20/a20_padconf.c standard -arm/allwinner/clkng/ccu_a10.c standard +dev/clk/allwinner/ccu_a10.c standard diff --git a/sys/arm/allwinner/a31/files.a31 b/sys/arm/allwinner/a31/files.a31 index 69bf5514b0e7..9b3ac550b6fa 100644 --- a/sys/arm/allwinner/a31/files.a31 +++ b/sys/arm/allwinner/a31/files.a31 @@ -1,5 +1,5 @@ -arm/allwinner/clkng/ccu_a31.c standard +dev/clk/allwinner/ccu_a31.c standard arm/allwinner/a31/a31_padconf.c standard arm/allwinner/a31/a31_r_padconf.c standard arm/allwinner/a31/a31s_padconf.c standard diff --git a/sys/arm/allwinner/a83t/files.a83t b/sys/arm/allwinner/a83t/files.a83t index f7c47185279c..3a641f12fa5e 100644 --- a/sys/arm/allwinner/a83t/files.a83t +++ b/sys/arm/allwinner/a83t/files.a83t @@ -1,5 +1,5 @@ -arm/allwinner/clkng/ccu_a83t.c standard -arm/allwinner/clkng/ccu_sun8i_r.c standard +dev/clk/allwinner/ccu_a83t.c standard +dev/clk/allwinner/ccu_sun8i_r.c standard arm/allwinner/a83t/a83t_padconf.c standard arm/allwinner/a83t/a83t_r_padconf.c standard diff --git a/sys/arm/allwinner/files.allwinner b/sys/arm/allwinner/files.allwinner index a136b2e050ac..ae5a7bb7403d 100644 --- a/sys/arm/allwinner/files.allwinner +++ b/sys/arm/allwinner/files.allwinner @@ -33,16 +33,16 @@ arm/allwinner/aw_thermal.c optional aw_thermal arm/allwinner/aw_cir.c optional aw_cir evdev arm/allwinner/aw_reset.c standard -arm/allwinner/aw_ccu.c standard +dev/clk/allwinner/aw_ccu.c standard arm/allwinner/aw_gmacclk.c standard -arm/allwinner/clkng/aw_ccung.c standard -arm/allwinner/clkng/aw_clk_frac.c standard -arm/allwinner/clkng/aw_clk_m.c standard -arm/allwinner/clkng/aw_clk_mipi.c standard -arm/allwinner/clkng/aw_clk_nkmp.c standard -arm/allwinner/clkng/aw_clk_nm.c standard -arm/allwinner/clkng/aw_clk_np.c standard -arm/allwinner/clkng/aw_clk_nmm.c standard -arm/allwinner/clkng/aw_clk_prediv_mux.c standard -arm/allwinner/clkng/ccu_de2.c standard +dev/clk/allwinner/aw_ccung.c standard +dev/clk/allwinner/aw_clk_frac.c standard +dev/clk/allwinner/aw_clk_m.c standard +dev/clk/allwinner/aw_clk_mipi.c standard +dev/clk/allwinner/aw_clk_nkmp.c standard +dev/clk/allwinner/aw_clk_nm.c standard +dev/clk/allwinner/aw_clk_np.c standard +dev/clk/allwinner/aw_clk_nmm.c standard +dev/clk/allwinner/aw_clk_prediv_mux.c standard +dev/clk/allwinner/ccu_de2.c standard diff --git a/sys/arm/allwinner/h3/files.h3 b/sys/arm/allwinner/h3/files.h3 index f4c90e5e9ed4..89c73165ff1a 100644 --- a/sys/arm/allwinner/h3/files.h3 +++ b/sys/arm/allwinner/h3/files.h3 @@ -1,5 +1,5 @@ -arm/allwinner/clkng/ccu_h3.c standard -arm/allwinner/clkng/ccu_sun8i_r.c standard +dev/clk/allwinner/ccu_h3.c standard +dev/clk/allwinner/ccu_sun8i_r.c standard arm/allwinner/h3/h3_padconf.c standard arm/allwinner/h3/h3_r_padconf.c standard diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index db5ef64eb583..00a16553e6d6 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -456,21 +456,21 @@ arm/allwinner/axp81x.c optional axp81x fdt arm/allwinner/if_awg.c optional awg syscon aw_sid nvmem fdt # Allwinner clock driver -arm/allwinner/clkng/aw_ccung.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_frac.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_m.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_mipi.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_nkmp.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_nm.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_nmm.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_np.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_prediv_mux.c optional aw_ccu fdt -arm/allwinner/clkng/ccu_a64.c optional soc_allwinner_a64 aw_ccu fdt -arm/allwinner/clkng/ccu_h3.c optional soc_allwinner_h5 aw_ccu fdt -arm/allwinner/clkng/ccu_h6.c optional soc_allwinner_h6 aw_ccu fdt -arm/allwinner/clkng/ccu_h6_r.c optional soc_allwinner_h6 aw_ccu fdt -arm/allwinner/clkng/ccu_sun8i_r.c optional aw_ccu fdt -arm/allwinner/clkng/ccu_de2.c optional aw_ccu fdt +dev/clk/allwinner/aw_ccung.c optional aw_ccu fdt +dev/clk/allwinner/aw_clk_frac.c optional aw_ccu fdt +dev/clk/allwinner/aw_clk_m.c optional aw_ccu fdt +dev/clk/allwinner/aw_clk_mipi.c optional aw_ccu fdt +dev/clk/allwinner/aw_clk_nkmp.c optional aw_ccu fdt +dev/clk/allwinner/aw_clk_nm.c optional aw_ccu fdt +dev/clk/allwinner/aw_clk_nmm.c optional aw_ccu fdt +dev/clk/allwinner/aw_clk_np.c optional aw_ccu fdt +dev/clk/allwinner/aw_clk_prediv_mux.c optional aw_ccu fdt +dev/clk/allwinner/ccu_a64.c optional soc_allwinner_a64 aw_ccu fdt +dev/clk/allwinner/ccu_h3.c optional soc_allwinner_h5 aw_ccu fdt +dev/clk/allwinner/ccu_h6.c optional soc_allwinner_h6 aw_ccu fdt +dev/clk/allwinner/ccu_h6_r.c optional soc_allwinner_h6 aw_ccu fdt +dev/clk/allwinner/ccu_sun8i_r.c optional aw_ccu fdt +dev/clk/allwinner/ccu_de2.c optional aw_ccu fdt # Allwinner padconf files arm/allwinner/a64/a64_padconf.c optional soc_allwinner_a64 fdt diff --git a/sys/arm/allwinner/aw_ccu.c b/sys/dev/clk/allwinner/aw_ccu.c similarity index 100% rename from sys/arm/allwinner/aw_ccu.c rename to sys/dev/clk/allwinner/aw_ccu.c diff --git a/sys/arm/allwinner/clkng/aw_ccung.c b/sys/dev/clk/allwinner/aw_ccung.c similarity index 99% rename from sys/arm/allwinner/clkng/aw_ccung.c rename to sys/dev/clk/allwinner/aw_ccung.c index b37719fa7770..2a6cbd8b9a20 100644 --- a/sys/arm/allwinner/clkng/aw_ccung.c +++ b/sys/dev/clk/allwinner/aw_ccung.c @@ -49,8 +49,8 @@ #include -#include -#include +#include +#include #ifdef __aarch64__ #include "opt_soc.h" diff --git a/sys/arm/allwinner/clkng/aw_ccung.h b/sys/dev/clk/allwinner/aw_ccung.h similarity index 87% rename from sys/arm/allwinner/clkng/aw_ccung.h rename to sys/dev/clk/allwinner/aw_ccung.h index 5dbcb729da40..61d99fc3d50f 100644 --- a/sys/arm/allwinner/clkng/aw_ccung.h +++ b/sys/dev/clk/allwinner/aw_ccung.h @@ -28,15 +28,15 @@ #ifndef __CCU_NG_H__ #define __CCU_NG_H__ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/sys/arm/allwinner/clkng/aw_clk.h b/sys/dev/clk/allwinner/aw_clk.h similarity index 100% rename from sys/arm/allwinner/clkng/aw_clk.h rename to sys/dev/clk/allwinner/aw_clk.h diff --git a/sys/arm/allwinner/clkng/aw_clk_frac.c b/sys/dev/clk/allwinner/aw_clk_frac.c similarity index 99% rename from sys/arm/allwinner/clkng/aw_clk_frac.c rename to sys/dev/clk/allwinner/aw_clk_frac.c index 506ba0fa177b..696f6c2ebfbf 100644 --- a/sys/arm/allwinner/clkng/aw_clk_frac.c +++ b/sys/dev/clk/allwinner/aw_clk_frac.c @@ -29,8 +29,8 @@ #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/clkng/aw_clk_frac.h b/sys/dev/clk/allwinner/aw_clk_frac.h similarity index 100% rename from sys/arm/allwinner/clkng/aw_clk_frac.h rename to sys/dev/clk/allwinner/aw_clk_frac.h diff --git a/sys/arm/allwinner/clkng/aw_clk_m.c b/sys/dev/clk/allwinner/aw_clk_m.c similarity index 98% rename from sys/arm/allwinner/clkng/aw_clk_m.c rename to sys/dev/clk/allwinner/aw_clk_m.c index 90a347b1af86..d57434617d23 100644 --- a/sys/arm/allwinner/clkng/aw_clk_m.c +++ b/sys/dev/clk/allwinner/aw_clk_m.c @@ -29,8 +29,8 @@ #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/clkng/aw_clk_m.h b/sys/dev/clk/allwinner/aw_clk_m.h similarity index 100% rename from sys/arm/allwinner/clkng/aw_clk_m.h rename to sys/dev/clk/allwinner/aw_clk_m.h diff --git a/sys/arm/allwinner/clkng/aw_clk_mipi.c b/sys/dev/clk/allwinner/aw_clk_mipi.c similarity index 98% rename from sys/arm/allwinner/clkng/aw_clk_mipi.c rename to sys/dev/clk/allwinner/aw_clk_mipi.c index 89a51b859eb3..e57b5347994a 100644 --- a/sys/arm/allwinner/clkng/aw_clk_mipi.c +++ b/sys/dev/clk/allwinner/aw_clk_mipi.c @@ -29,8 +29,8 @@ #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/clkng/aw_clk_mipi.h b/sys/dev/clk/allwinner/aw_clk_mipi.h similarity index 100% rename from sys/arm/allwinner/clkng/aw_clk_mipi.h rename to sys/dev/clk/allwinner/aw_clk_mipi.h diff --git a/sys/arm/allwinner/clkng/aw_clk_nkmp.c b/sys/dev/clk/allwinner/aw_clk_nkmp.c similarity index 99% rename from sys/arm/allwinner/clkng/aw_clk_nkmp.c rename to sys/dev/clk/allwinner/aw_clk_nkmp.c index 963787a4bd94..73bf6a2fafe3 100644 --- a/sys/arm/allwinner/clkng/aw_clk_nkmp.c +++ b/sys/dev/clk/allwinner/aw_clk_nkmp.c @@ -29,8 +29,8 @@ #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/clkng/aw_clk_nkmp.h b/sys/dev/clk/allwinner/aw_clk_nkmp.h similarity index 97% rename from sys/arm/allwinner/clkng/aw_clk_nkmp.h rename to sys/dev/clk/allwinner/aw_clk_nkmp.h index 2c6986c8d722..f6d75cd3737a 100644 --- a/sys/arm/allwinner/clkng/aw_clk_nkmp.h +++ b/sys/dev/clk/allwinner/aw_clk_nkmp.h @@ -27,7 +27,7 @@ #ifndef __AW_CLK_NKMP_H__ #define __AW_CLK_NKMP_H__ -#include +#include struct aw_clk_nkmp_def { struct clknode_init_def clkdef; diff --git a/sys/arm/allwinner/clkng/aw_clk_nm.c b/sys/dev/clk/allwinner/aw_clk_nm.c similarity index 99% rename from sys/arm/allwinner/clkng/aw_clk_nm.c rename to sys/dev/clk/allwinner/aw_clk_nm.c index 4419b94d2c42..5692ce2c8b99 100644 --- a/sys/arm/allwinner/clkng/aw_clk_nm.c +++ b/sys/dev/clk/allwinner/aw_clk_nm.c @@ -29,8 +29,8 @@ #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/clkng/aw_clk_nm.h b/sys/dev/clk/allwinner/aw_clk_nm.h similarity index 100% rename from sys/arm/allwinner/clkng/aw_clk_nm.h rename to sys/dev/clk/allwinner/aw_clk_nm.h diff --git a/sys/arm/allwinner/clkng/aw_clk_nmm.c b/sys/dev/clk/allwinner/aw_clk_nmm.c similarity index 98% rename from sys/arm/allwinner/clkng/aw_clk_nmm.c rename to sys/dev/clk/allwinner/aw_clk_nmm.c index 3fff86042d31..754c313271cb 100644 --- a/sys/arm/allwinner/clkng/aw_clk_nmm.c +++ b/sys/dev/clk/allwinner/aw_clk_nmm.c @@ -31,8 +31,8 @@ #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/clkng/aw_clk_nmm.h b/sys/dev/clk/allwinner/aw_clk_nmm.h similarity index 100% rename from sys/arm/allwinner/clkng/aw_clk_nmm.h rename to sys/dev/clk/allwinner/aw_clk_nmm.h diff --git a/sys/arm/allwinner/clkng/aw_clk_np.c b/sys/dev/clk/allwinner/aw_clk_np.c similarity index 98% rename from sys/arm/allwinner/clkng/aw_clk_np.c rename to sys/dev/clk/allwinner/aw_clk_np.c index e23fb3ec8733..a06b0fa16796 100644 --- a/sys/arm/allwinner/clkng/aw_clk_np.c +++ b/sys/dev/clk/allwinner/aw_clk_np.c @@ -31,8 +31,8 @@ #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/clkng/aw_clk_np.h b/sys/dev/clk/allwinner/aw_clk_np.h similarity index 100% rename from sys/arm/allwinner/clkng/aw_clk_np.h rename to sys/dev/clk/allwinner/aw_clk_np.h diff --git a/sys/arm/allwinner/clkng/aw_clk_prediv_mux.c b/sys/dev/clk/allwinner/aw_clk_prediv_mux.c similarity index 98% rename from sys/arm/allwinner/clkng/aw_clk_prediv_mux.c rename to sys/dev/clk/allwinner/aw_clk_prediv_mux.c index 17e580c7471a..3a64726ca776 100644 --- a/sys/arm/allwinner/clkng/aw_clk_prediv_mux.c +++ b/sys/dev/clk/allwinner/aw_clk_prediv_mux.c @@ -29,8 +29,8 @@ #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/clkng/aw_clk_prediv_mux.h b/sys/dev/clk/allwinner/aw_clk_prediv_mux.h similarity index 97% rename from sys/arm/allwinner/clkng/aw_clk_prediv_mux.h rename to sys/dev/clk/allwinner/aw_clk_prediv_mux.h index b95d8e281978..2de2f01a654e 100644 --- a/sys/arm/allwinner/clkng/aw_clk_prediv_mux.h +++ b/sys/dev/clk/allwinner/aw_clk_prediv_mux.h @@ -26,7 +26,7 @@ #ifndef __AW_CLK_PREDIV_MUX_H__ #define __AW_CLK_PREDIV_MUX_H__ -#include +#include struct aw_clk_prediv_mux_def { struct clknode_init_def clkdef; diff --git a/sys/arm/allwinner/clkng/ccu_a10.c b/sys/dev/clk/allwinner/ccu_a10.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_a10.c rename to sys/dev/clk/allwinner/ccu_a10.c index a96d3d305414..0a14583a9f04 100644 --- a/sys/arm/allwinner/clkng/ccu_a10.c +++ b/sys/dev/clk/allwinner/ccu_a10.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_a13.c b/sys/dev/clk/allwinner/ccu_a13.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_a13.c rename to sys/dev/clk/allwinner/ccu_a13.c index c485b2bc72c4..2bddcd382040 100644 --- a/sys/arm/allwinner/clkng/ccu_a13.c +++ b/sys/dev/clk/allwinner/ccu_a13.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_a31.c b/sys/dev/clk/allwinner/ccu_a31.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_a31.c rename to sys/dev/clk/allwinner/ccu_a31.c index 633838ee348a..d6db0ab03fe7 100644 --- a/sys/arm/allwinner/clkng/ccu_a31.c +++ b/sys/dev/clk/allwinner/ccu_a31.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_a64.c b/sys/dev/clk/allwinner/ccu_a64.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_a64.c rename to sys/dev/clk/allwinner/ccu_a64.c index 70e2e98da9f2..73cbe147c398 100644 --- a/sys/arm/allwinner/clkng/ccu_a64.c +++ b/sys/dev/clk/allwinner/ccu_a64.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_a83t.c b/sys/dev/clk/allwinner/ccu_a83t.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_a83t.c rename to sys/dev/clk/allwinner/ccu_a83t.c index 35561b04f602..1cb49d99ccbc 100644 --- a/sys/arm/allwinner/clkng/ccu_a83t.c +++ b/sys/dev/clk/allwinner/ccu_a83t.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_de2.c b/sys/dev/clk/allwinner/ccu_de2.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_de2.c rename to sys/dev/clk/allwinner/ccu_de2.c index d50aaf5d5e32..de490a88bafa 100644 --- a/sys/arm/allwinner/clkng/ccu_de2.c +++ b/sys/dev/clk/allwinner/ccu_de2.c @@ -48,7 +48,7 @@ #include -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_h3.c b/sys/dev/clk/allwinner/ccu_h3.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_h3.c rename to sys/dev/clk/allwinner/ccu_h3.c index 7d2a1be6a21d..fb6e26542b8a 100644 --- a/sys/arm/allwinner/clkng/ccu_h3.c +++ b/sys/dev/clk/allwinner/ccu_h3.c @@ -50,7 +50,7 @@ #include "opt_soc.h" #endif -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_h6.c b/sys/dev/clk/allwinner/ccu_h6.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_h6.c rename to sys/dev/clk/allwinner/ccu_h6.c index 9cdbe935f2cf..0a378d9c3980 100644 --- a/sys/arm/allwinner/clkng/ccu_h6.c +++ b/sys/dev/clk/allwinner/ccu_h6.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_h6_r.c b/sys/dev/clk/allwinner/ccu_h6_r.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_h6_r.c rename to sys/dev/clk/allwinner/ccu_h6_r.c index 070cbfb38f12..7d87b3082682 100644 --- a/sys/arm/allwinner/clkng/ccu_h6_r.c +++ b/sys/dev/clk/allwinner/ccu_h6_r.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/clkng/ccu_sun8i_r.c b/sys/dev/clk/allwinner/ccu_sun8i_r.c similarity index 99% rename from sys/arm/allwinner/clkng/ccu_sun8i_r.c rename to sys/dev/clk/allwinner/ccu_sun8i_r.c index 4e6289c1bfba..e970dd1de95c 100644 --- a/sys/arm/allwinner/clkng/ccu_sun8i_r.c +++ b/sys/dev/clk/allwinner/ccu_sun8i_r.c @@ -46,7 +46,7 @@ #include #include -#include +#include #include #include From nobody Wed Jan 10 18:21:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMM5tg4z55YDW; Wed, 10 Jan 2024 18:21: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 4T9GMM2ZxKz4GN3; Wed, 10 Jan 2024 18:21:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h1nwcSD1P8b8eHxb09D/PNOYW9cq5RfnPb78nAxrtoE=; b=ghu3x/aK0/b7KCzoLi49c88Gg/jjX3VqZ0nDuUseYF9tLQexI/dBPZqpFideOzGRVI5W0W 6CP06jgx/fNuZww3Ina1/h5kNXessjEQneNjgKEls/mHD5NcnBZALSdQvE1mEck1TVmac8 f4uZe/PQ9J1bsIlldBniDrKkZSi0AvxAMG6jUeA2eKPegkUX1X4SD/jGlIoGKj0r7QSV4T 4rtbHqpcJ6T8MgD2lOx74WLwYOt4weHW42dCCRc57/J7wt8uCtKdCbGEbt/XpJF+ln+4J/ +arHMCtUr/r8QM9+o35AFVQd2hvT1Qn5s4da4dy1Dy3gOjWshGKHRlvacQrJEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h1nwcSD1P8b8eHxb09D/PNOYW9cq5RfnPb78nAxrtoE=; b=cBk5YbslNl0+iN2t1pQH2Npdpb5z4CYj/0AxDXDEf+JhtPCvgLH5SyuNr6cRxoHFOVHJMH qJmfXra8ddKD5VVajMM0MmCnlG2lNOzpli2VmRMs3oSKQST/VGmkdVfdqCMVtpsGeojJ2Q 8jh5QxHNOFsoj+1HLjlknTXxpkPtYD5nbuGXtcBdu0AxgtBtpCPQfr+LMb8g5BEQp/2FkZ uJsIxej49DZAybzbkVWYZj1InT7L4LeAGNrfuG24qMfyioimvRgYRgWyifjngK3bh1bc+W q7PBIz0HhBKXFynX5xZoLE6tsgSdI5oGiM9IoADVJeXDZQ1baPrgr1AQq+8MGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910863; a=rsa-sha256; cv=none; b=urdG44ubSU+BfFBSW0gn7LCltupxApSYEeeMNxvk+X9aUWUrLCRbQI/XuA4RGiLM+sq15e vfJVF5DMx7PVUJZXZtvFO3py8GLa1V/bzq9bcOYynxwxXs/UlVVOr75MUZsZfqCgg3Njvo ocr7sKRgLqNa1TJmVsm1/IQujnYU7Uow05HBPXHIaCXg8e1eVQGIc+8w/gN5riWuQ/p6YJ 7RKm931NfbwdkFLYJCEw9JRjdS+9Zn3CInuwkg+18sBOsBhDOJ8wN6yzInruSp6YxE8ZFF 6C0i6DxT48vlmkwxBpdOzwDDFuJAOrzjC7/bdXIvSmQ0s4+6VOX2VPWwV0P4ag== 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 4T9GMM1hdBzm6K; Wed, 10 Jan 2024 18:21: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 40AIL3eO052831; Wed, 10 Jan 2024 18:21:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIL3OA052828; Wed, 10 Jan 2024 18:21:03 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:03 GMT Message-Id: <202401101821.40AIL3OA052828@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: 02e912089377 - main - pwm: Move allwinner driver into the common directory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 02e9120893770924227138ba49df1edb3896112a Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=02e9120893770924227138ba49df1edb3896112a commit 02e9120893770924227138ba49df1edb3896112a Author: Emmanuel Vadot AuthorDate: 2023-12-25 18:42:03 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:19 +0000 pwm: Move allwinner driver into the common directory No need to keep it under sys/arm/allwinner It's easier to find which controller we support by looking under one directory. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43187 --- sys/conf/files.arm64 | 2 +- sys/{arm => dev/pwm/controller}/allwinner/aw_pwm.c | 0 sys/modules/allwinner/aw_pwm/Makefile | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index c5f8207f01f5..db5ef64eb583 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -380,6 +380,7 @@ dev/psci/psci.c standard dev/psci/smccc_arm64.S standard dev/psci/smccc.c standard +dev/pwm/controller/allwinner/aw_pwm.c optional fdt aw_pwm dev/pwm/controller//rockchip/rk_pwm.c optional fdt rk_pwm dev/random/armv8rng.c optional armv8_rng !random_loadable @@ -442,7 +443,6 @@ arm/allwinner/aw_i2s.c optional fdt sound aw_i2s arm/allwinner/aw_mmc.c optional mmc aw_mmc fdt | mmccam aw_mmc fdt arm/allwinner/aw_nmi.c optional aw_nmi fdt \ compile-with "${NORMAL_C} -I$S/contrib/device-tree/include" -arm/allwinner/aw_pwm.c optional aw_pwm fdt arm/allwinner/aw_r_intc.c optional aw_r_intc fdt arm/allwinner/aw_rsb.c optional aw_rsb fdt arm/allwinner/aw_rtc.c optional aw_rtc fdt diff --git a/sys/arm/allwinner/aw_pwm.c b/sys/dev/pwm/controller/allwinner/aw_pwm.c similarity index 100% rename from sys/arm/allwinner/aw_pwm.c rename to sys/dev/pwm/controller/allwinner/aw_pwm.c diff --git a/sys/modules/allwinner/aw_pwm/Makefile b/sys/modules/allwinner/aw_pwm/Makefile index 2ffc5baab879..8aac8f5ebe8a 100644 --- a/sys/modules/allwinner/aw_pwm/Makefile +++ b/sys/modules/allwinner/aw_pwm/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/arm/allwinner +.PATH: ${SRCTOP}/sys/dev/pwm/controller/allwinner KMOD= aw_pwm SRCS= aw_pwm.c From nobody Wed Jan 10 18:21:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMP6b1Qz55YXW; Wed, 10 Jan 2024 18:21: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 4T9GMP556Sz4GXq; Wed, 10 Jan 2024 18:21:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7MHf1+MUh4yZQjI0b+RJIfW8IsfgXhM5/kEXFUica/o=; b=MqHFSsyGA2t9tnm+PAPRLExX3VP0xwM5+Ujq+TWDfnCMb2ZZR4Gdws9dS2ZJPFOlbSbw6w WLFjBh2HuQwuHGzfaNi6zhgp+aPEvBmgTaj5I40PYDs4iKHYZZE9SBtOApwm6K3dk7/Zue QJoGGYr9KbgNe1ibTZymzM3IndYl3nyJh6ESH6P2CeY3E4zz9EVfHVoSI55GOnEcPAj5vk bJtJVYakP7G52yQXyBaI01gkdJBSw6QYwYMMte5av077rgRe/BMinfmcYeHxeafvnrs2kS vMNCGW7hE3GzC05vEjdud7dO49iBEV6s9XmxGLcUzgQmc5u+Ei4QCaEbvFiL3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7MHf1+MUh4yZQjI0b+RJIfW8IsfgXhM5/kEXFUica/o=; b=FmVr1utdbufcQyNJ6spQIj6M8JSifR8r+NCrFCjHbJSMcmrIPeGaVnn3VZlUXT8ivw1Kda V5tQTzkkmErEzOn7DHJzwg/36JQSKGAkYjiWFKUUnV5soIkr3VTzyXWno38iIZKrF002UF x/2+26xYuzSaF7zdzm+FdayvzsrNhcSkSnbGEgI6kI+1ttpJgI/8gp8Vc/2Bz8hUYQ0Hlt x6w0mx2EWyx+89f15tiFBjnDvvOLkwQPtCGy7ruzD5Hnmz+RTYzvH2twAp2AYFeM3OCAqc oPHhVBuzEBUhBfrXm4RJ3j36lEgtZRbYU74k6rtmvV/MZve1WNfRLHpG+mb2ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910865; a=rsa-sha256; cv=none; b=xrSOi8rno0LmUxgG+Fs7VEe1Mc/OwckDTR713SKVcBYdosCetT8AJtT6lWhpwvWWtG7CHv DdLoXhjKxHSbWYZP+M/cQIQTEB02Bx8095OuLJeJjE+CqVMf/B9MhgcwEsk8KksPaFu3ZK N2R44/dZPaYnEyEAgEDYYj7qoXrTuaZW4X+ARkEWSFkzaTFAqqnB1p4somAOOjL4EJECEY QbeFPBu76En3AjA7R5CHRULotYX4VdvclxfqyQi6+adUJWwv6WGnh4O1rbh6K2vpe8tylR zDZIFvDaQI9Re22Sm2pyvt0ZSuKgr6XumIVvNkNrYRBLMIsBk63XKK2kw3sN9w== 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 4T9GMP3nryzmNr; Wed, 10 Jan 2024 18:21: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 40AIL5F3052933; Wed, 10 Jan 2024 18:21:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIL5bC052930; Wed, 10 Jan 2024 18:21:05 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:05 GMT Message-Id: <202401101821.40AIL5bC052930@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: 77f222415832 - main - clk: Move rockchip driver into the common directory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 77f222415832c58c2e307f74f1200941efe868d9 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=77f222415832c58c2e307f74f1200941efe868d9 commit 77f222415832c58c2e307f74f1200941efe868d9 Author: Emmanuel Vadot AuthorDate: 2023-12-25 19:27:20 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:22 +0000 clk: Move rockchip driver into the common directory No need to keep it under sys/arm64/rockchip/clk It's easier to find which controller we support by looking under one directory. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43189 --- sys/arm/rockchip/files.rk32xx | 16 +++++++-------- sys/conf/files.arm64 | 24 +++++++++++----------- .../rockchip/clk => dev/clk/rockchip}/rk3288_cru.c | 2 +- .../rockchip/clk => dev/clk/rockchip}/rk3328_cru.c | 2 +- .../rockchip/clk => dev/clk/rockchip}/rk3399_cru.c | 4 ++-- .../clk => dev/clk/rockchip}/rk3399_cru_dt.h | 0 .../clk => dev/clk/rockchip}/rk3399_pmucru.c | 2 +- .../rockchip/clk => dev/clk/rockchip}/rk3568_cru.c | 2 +- .../clk => dev/clk/rockchip}/rk3568_pmucru.c | 2 +- .../clk => dev/clk/rockchip}/rk_clk_armclk.c | 2 +- .../clk => dev/clk/rockchip}/rk_clk_armclk.h | 0 .../clk => dev/clk/rockchip}/rk_clk_composite.c | 2 +- .../clk => dev/clk/rockchip}/rk_clk_composite.h | 0 .../clk => dev/clk/rockchip}/rk_clk_fract.c | 2 +- .../clk => dev/clk/rockchip}/rk_clk_fract.h | 0 .../clk => dev/clk/rockchip}/rk_clk_gate.c | 2 +- .../clk => dev/clk/rockchip}/rk_clk_gate.h | 0 .../rockchip/clk => dev/clk/rockchip}/rk_clk_mux.c | 4 ++-- .../rockchip/clk => dev/clk/rockchip}/rk_clk_mux.h | 0 .../rockchip/clk => dev/clk/rockchip}/rk_clk_pll.c | 2 +- .../rockchip/clk => dev/clk/rockchip}/rk_clk_pll.h | 0 .../rockchip/clk => dev/clk/rockchip}/rk_cru.c | 10 ++++----- .../rockchip/clk => dev/clk/rockchip}/rk_cru.h | 12 +++++------ 23 files changed, 45 insertions(+), 45 deletions(-) diff --git a/sys/arm/rockchip/files.rk32xx b/sys/arm/rockchip/files.rk32xx index 5393b7784108..5f15a22cc334 100644 --- a/sys/arm/rockchip/files.rk32xx +++ b/sys/arm/rockchip/files.rk32xx @@ -12,14 +12,14 @@ dev/pwm/controller/rockchip/rk_pwm.c standard arm64/rockchip/rk_tsadc.c standard arm64/rockchip/rk_tsadc_if.m standard arm64/rockchip/rk_usbphy.c standard -arm64/rockchip/clk/rk_clk_armclk.c standard -arm64/rockchip/clk/rk_clk_composite.c standard -arm64/rockchip/clk/rk_clk_fract.c standard -arm64/rockchip/clk/rk_clk_gate.c standard -arm64/rockchip/clk/rk_clk_mux.c standard -arm64/rockchip/clk/rk_clk_pll.c standard -arm64/rockchip/clk/rk_cru.c standard -arm64/rockchip/clk/rk3288_cru.c standard +dev/clk/rockchip/rk_clk_armclk.c standard +dev/clk//rockchip/rk_clk_composite.c standard +dev/clk//rockchip/rk_clk_fract.c standard +dev/clk//rockchip/rk_clk_gate.c standard +dev/clk//rockchip/rk_clk_mux.c standard +dev/clk//rockchip/rk_clk_pll.c standard +dev/clk//rockchip/rk_cru.c standard +dev/clk//rockchip/rk3288_cru.c standard dev/dwc/if_dwc_rk.c standard dev/iicbus/pmic/act8846.c standard diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 00a16553e6d6..6c761b37f191 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -687,18 +687,18 @@ arm64/rockchip/rk_pcie.c optional fdt pci soc_rockchip_rk3399 arm64/rockchip/rk_pcie_phy.c optional fdt pci soc_rockchip_rk3399 # RockChip Clock support -arm64/rockchip/clk/rk_cru.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 -arm64/rockchip/clk/rk_clk_armclk.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 -arm64/rockchip/clk/rk_clk_composite.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 -arm64/rockchip/clk/rk_clk_fract.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 -arm64/rockchip/clk/rk_clk_gate.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 -arm64/rockchip/clk/rk_clk_mux.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 -arm64/rockchip/clk/rk_clk_pll.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 -arm64/rockchip/clk/rk3328_cru.c optional fdt soc_rockchip_rk3328 -arm64/rockchip/clk/rk3399_cru.c optional fdt soc_rockchip_rk3399 -arm64/rockchip/clk/rk3399_pmucru.c optional fdt soc_rockchip_rk3399 -arm64/rockchip/clk/rk3568_cru.c optional fdt soc_rockchip_rk3568 -arm64/rockchip/clk/rk3568_pmucru.c optional fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk_cru.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk_clk_armclk.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk_clk_composite.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk_clk_fract.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk_clk_gate.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk_clk_mux.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk_clk_pll.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 | fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk3328_cru.c optional fdt soc_rockchip_rk3328 +dev/clk/rockchip/rk3399_cru.c optional fdt soc_rockchip_rk3399 +dev/clk/rockchip/rk3399_pmucru.c optional fdt soc_rockchip_rk3399 +dev/clk/rockchip/rk3568_cru.c optional fdt soc_rockchip_rk3568 +dev/clk/rockchip/rk3568_pmucru.c optional fdt soc_rockchip_rk3568 # Xilinx arm/xilinx/uart_dev_cdnc.c optional uart soc_xilinx_zynq fdt diff --git a/sys/arm64/rockchip/clk/rk3288_cru.c b/sys/dev/clk/rockchip/rk3288_cru.c similarity index 99% rename from sys/arm64/rockchip/clk/rk3288_cru.c rename to sys/dev/clk/rockchip/rk3288_cru.c index b7b106dc849a..354a293ff7f2 100644 --- a/sys/arm64/rockchip/clk/rk3288_cru.c +++ b/sys/dev/clk/rockchip/rk3288_cru.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include diff --git a/sys/arm64/rockchip/clk/rk3328_cru.c b/sys/dev/clk/rockchip/rk3328_cru.c similarity index 99% rename from sys/arm64/rockchip/clk/rk3328_cru.c rename to sys/dev/clk/rockchip/rk3328_cru.c index 4c8562240a12..6a9583250516 100644 --- a/sys/arm64/rockchip/clk/rk3328_cru.c +++ b/sys/dev/clk/rockchip/rk3328_cru.c @@ -42,7 +42,7 @@ #include #include -#include +#include #define CRU_CLKSEL_CON(x) (0x100 + (x) * 0x4) #define CRU_CLKGATE_CON(x) (0x200 + (x) * 0x4) diff --git a/sys/arm64/rockchip/clk/rk3399_cru.c b/sys/dev/clk/rockchip/rk3399_cru.c similarity index 99% rename from sys/arm64/rockchip/clk/rk3399_cru.c rename to sys/dev/clk/rockchip/rk3399_cru.c index d1b066b50c47..45d6592ceb73 100644 --- a/sys/arm64/rockchip/clk/rk3399_cru.c +++ b/sys/dev/clk/rockchip/rk3399_cru.c @@ -43,9 +43,9 @@ #include #include -#include +#include -#include +#include #define CRU_CLKSEL_CON(x) (0x100 + (x) * 0x4) #define CRU_CLKGATE_CON(x) (0x300 + (x) * 0x4) diff --git a/sys/arm64/rockchip/clk/rk3399_cru_dt.h b/sys/dev/clk/rockchip/rk3399_cru_dt.h similarity index 100% rename from sys/arm64/rockchip/clk/rk3399_cru_dt.h rename to sys/dev/clk/rockchip/rk3399_cru_dt.h diff --git a/sys/arm64/rockchip/clk/rk3399_pmucru.c b/sys/dev/clk/rockchip/rk3399_pmucru.c similarity index 99% rename from sys/arm64/rockchip/clk/rk3399_pmucru.c rename to sys/dev/clk/rockchip/rk3399_pmucru.c index f95afbad11ee..706bf444aaf2 100644 --- a/sys/arm64/rockchip/clk/rk3399_pmucru.c +++ b/sys/dev/clk/rockchip/rk3399_pmucru.c @@ -43,7 +43,7 @@ #include #include -#include +#include #define CRU_CLKSEL_CON(x) (0x80 + (x) * 0x4) #define CRU_CLKGATE_CON(x) (0x100 + (x) * 0x4) diff --git a/sys/arm64/rockchip/clk/rk3568_cru.c b/sys/dev/clk/rockchip/rk3568_cru.c similarity index 99% rename from sys/arm64/rockchip/clk/rk3568_cru.c rename to sys/dev/clk/rockchip/rk3568_cru.c index f5992323c3bd..4d7f569a3de2 100644 --- a/sys/arm64/rockchip/clk/rk3568_cru.c +++ b/sys/dev/clk/rockchip/rk3568_cru.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include diff --git a/sys/arm64/rockchip/clk/rk3568_pmucru.c b/sys/dev/clk/rockchip/rk3568_pmucru.c similarity index 99% rename from sys/arm64/rockchip/clk/rk3568_pmucru.c rename to sys/dev/clk/rockchip/rk3568_pmucru.c index 9805f743346c..0756dc5392bf 100644 --- a/sys/arm64/rockchip/clk/rk3568_pmucru.c +++ b/sys/dev/clk/rockchip/rk3568_pmucru.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include diff --git a/sys/arm64/rockchip/clk/rk_clk_armclk.c b/sys/dev/clk/rockchip/rk_clk_armclk.c similarity index 99% rename from sys/arm64/rockchip/clk/rk_clk_armclk.c rename to sys/dev/clk/rockchip/rk_clk_armclk.c index 1caae0505444..3d462e74d92b 100644 --- a/sys/arm64/rockchip/clk/rk_clk_armclk.c +++ b/sys/dev/clk/rockchip/rk_clk_armclk.c @@ -31,7 +31,7 @@ #include -#include +#include #include "clkdev_if.h" diff --git a/sys/arm64/rockchip/clk/rk_clk_armclk.h b/sys/dev/clk/rockchip/rk_clk_armclk.h similarity index 100% rename from sys/arm64/rockchip/clk/rk_clk_armclk.h rename to sys/dev/clk/rockchip/rk_clk_armclk.h diff --git a/sys/arm64/rockchip/clk/rk_clk_composite.c b/sys/dev/clk/rockchip/rk_clk_composite.c similarity index 99% rename from sys/arm64/rockchip/clk/rk_clk_composite.c rename to sys/dev/clk/rockchip/rk_clk_composite.c index 791668ff2e9c..a37ddcd6ecb2 100644 --- a/sys/arm64/rockchip/clk/rk_clk_composite.c +++ b/sys/dev/clk/rockchip/rk_clk_composite.c @@ -32,7 +32,7 @@ #include #include -#include +#include #include "clkdev_if.h" #include "syscon_if.h" diff --git a/sys/arm64/rockchip/clk/rk_clk_composite.h b/sys/dev/clk/rockchip/rk_clk_composite.h similarity index 100% rename from sys/arm64/rockchip/clk/rk_clk_composite.h rename to sys/dev/clk/rockchip/rk_clk_composite.h diff --git a/sys/arm64/rockchip/clk/rk_clk_fract.c b/sys/dev/clk/rockchip/rk_clk_fract.c similarity index 99% rename from sys/arm64/rockchip/clk/rk_clk_fract.c rename to sys/dev/clk/rockchip/rk_clk_fract.c index f32585b43c21..f559e9c71852 100644 --- a/sys/arm64/rockchip/clk/rk_clk_fract.c +++ b/sys/dev/clk/rockchip/rk_clk_fract.c @@ -31,7 +31,7 @@ #include -#include +#include #include "clkdev_if.h" diff --git a/sys/arm64/rockchip/clk/rk_clk_fract.h b/sys/dev/clk/rockchip/rk_clk_fract.h similarity index 100% rename from sys/arm64/rockchip/clk/rk_clk_fract.h rename to sys/dev/clk/rockchip/rk_clk_fract.h diff --git a/sys/arm64/rockchip/clk/rk_clk_gate.c b/sys/dev/clk/rockchip/rk_clk_gate.c similarity index 98% rename from sys/arm64/rockchip/clk/rk_clk_gate.c rename to sys/dev/clk/rockchip/rk_clk_gate.c index d82035d4e624..053236d043e6 100644 --- a/sys/arm64/rockchip/clk/rk_clk_gate.c +++ b/sys/dev/clk/rockchip/rk_clk_gate.c @@ -32,7 +32,7 @@ #include -#include +#include #include "clkdev_if.h" diff --git a/sys/arm64/rockchip/clk/rk_clk_gate.h b/sys/dev/clk/rockchip/rk_clk_gate.h similarity index 100% rename from sys/arm64/rockchip/clk/rk_clk_gate.h rename to sys/dev/clk/rockchip/rk_clk_gate.h diff --git a/sys/arm64/rockchip/clk/rk_clk_mux.c b/sys/dev/clk/rockchip/rk_clk_mux.c similarity index 98% rename from sys/arm64/rockchip/clk/rk_clk_mux.c rename to sys/dev/clk/rockchip/rk_clk_mux.c index 3e9dbe542582..e42d5819378a 100644 --- a/sys/arm64/rockchip/clk/rk_clk_mux.c +++ b/sys/dev/clk/rockchip/rk_clk_mux.c @@ -37,8 +37,8 @@ #include #include -#include -#include +#include +#include #include "clkdev_if.h" #include "syscon_if.h" diff --git a/sys/arm64/rockchip/clk/rk_clk_mux.h b/sys/dev/clk/rockchip/rk_clk_mux.h similarity index 100% rename from sys/arm64/rockchip/clk/rk_clk_mux.h rename to sys/dev/clk/rockchip/rk_clk_mux.h diff --git a/sys/arm64/rockchip/clk/rk_clk_pll.c b/sys/dev/clk/rockchip/rk_clk_pll.c similarity index 99% rename from sys/arm64/rockchip/clk/rk_clk_pll.c rename to sys/dev/clk/rockchip/rk_clk_pll.c index 7df0e1491c9d..f89fdeb0c341 100644 --- a/sys/arm64/rockchip/clk/rk_clk_pll.c +++ b/sys/dev/clk/rockchip/rk_clk_pll.c @@ -31,7 +31,7 @@ #include -#include +#include #include "clkdev_if.h" diff --git a/sys/arm64/rockchip/clk/rk_clk_pll.h b/sys/dev/clk/rockchip/rk_clk_pll.h similarity index 100% rename from sys/arm64/rockchip/clk/rk_clk_pll.h rename to sys/dev/clk/rockchip/rk_clk_pll.h diff --git a/sys/arm64/rockchip/clk/rk_cru.c b/sys/dev/clk/rockchip/rk_cru.c similarity index 96% rename from sys/arm64/rockchip/clk/rk_cru.c rename to sys/dev/clk/rockchip/rk_cru.c index b1043fde4507..81760bcd74a1 100644 --- a/sys/arm64/rockchip/clk/rk_cru.c +++ b/sys/dev/clk/rockchip/rk_cru.c @@ -50,11 +50,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "clkdev_if.h" #include "hwreset_if.h" diff --git a/sys/arm64/rockchip/clk/rk_cru.h b/sys/dev/clk/rockchip/rk_cru.h similarity index 96% rename from sys/arm64/rockchip/clk/rk_cru.h rename to sys/dev/clk/rockchip/rk_cru.h index 5d45dc6ab859..3249c8c8f13c 100644 --- a/sys/arm64/rockchip/clk/rk_cru.h +++ b/sys/dev/clk/rockchip/rk_cru.h @@ -34,12 +34,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include /* Macro for defining various types of clocks. */ From nobody Wed Jan 10 18:21:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMR1Bn6z55YHJ; Wed, 10 Jan 2024 18:21:07 +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 4T9GMQ5grtz4Gk7; Wed, 10 Jan 2024 18:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=19ubGhRse8DmeDItw4kdsi8ST+AVgsLRz3Gt4j1gbyM=; b=qcH+/BH/Ihpr38BwhTX96Kpi/ed/iBHPDV+55z4JvYkIoSDDLCy7IF1POKLa6cnQR0UNGf W+VeG0LkGnMm7chrhk/JQKTbztSlw4ci1ZRWn8Y4O/Bwv970N1p/zBZO+2o8LJbLV9wYsU tdxZWbczbkYcE2AoyVqc7Ltt15bjFnOtxTuTV20olj2tD5ctZqiGoWNMLCkj4yvhyGsLME SRRGsEdK05wpgbBAGCUKqBP763zCcHevkWYJb54VVmz1t94/6xQqzeR5Snp88QCkHMGQzZ el1BVOlnF8+Aiqi09CwzWB4rQ70XAN783EYkSnRtiAWlgw4xcuTn7YZnFgSBhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=19ubGhRse8DmeDItw4kdsi8ST+AVgsLRz3Gt4j1gbyM=; b=OTHe6JasVlWrNHK+dSKI9+LTPwceCXwI2TmHs21nxoNOFA6BqncOvusRw/Hhiw7pSelw5g yKj+tVeEVK6jxQ098fHIl6qIN6wZJi4kKKFBrqOR+8CFlB5PRR7PK1lxjobkUJ0HzGA4po Fdi+bLN98m/KhdpA9xdoFHk6G6cBMzul7Igkq6dMKG2ff5Ss8P18kajOtZFyi6R6K7eOv8 tUIQVz1SqgPijThsv11ze7IFszhCOuIf0WeSKa3H0mghHmwPZFb+wRMNTdctrPVWZA1kH/ 9BbJExG4EYyP4pBR0G0fHtpt1QgCEoF2S0oJUFbyDxX11TA/Q7uSq3V5q1exXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910866; a=rsa-sha256; cv=none; b=CtMRZgWlLwGvtoOnSXMZKfqcvQq82lc8vXvRothG3o87uK/6EBzIKr/Pchtp2zFnK2z0v9 voEYpfQ5crqK9S6jO1A5JjM3f70ircZpSTM9n62cVfCikI3QiScy8Y2nOjM1wgvEaaoAgs Rid/yjEBCAXNdGu/b7trGIr2t9IiRzri68coiMcVYOr+xaq78/rtc1BcZoH7fBerl2nJcj 1o7NnwCbDDlIh9tiCOEYepkoFW2uIlDfHrXBy5i7KzYW6UjhNmJbxX8bTO8bxguZs2gp2H hrzNs572m9VclM/mLWUI805x+J5s691DEK4T335E5Ut6FrpywBZi9AtYPBbwCw== 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 4T9GMQ4n7szmJR; Wed, 10 Jan 2024 18:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40AIL6a4052985; Wed, 10 Jan 2024 18:21:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIL638052982; Wed, 10 Jan 2024 18:21:06 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:06 GMT Message-Id: <202401101821.40AIL638052982@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: fe75646a0234 - main - usb: dwc3: Move driver under a subdirectory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: fe75646a0234a261c0013bf1840fdac4acaf0cec Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=fe75646a0234a261c0013bf1840fdac4acaf0cec commit fe75646a0234a261c0013bf1840fdac4acaf0cec Author: Emmanuel Vadot AuthorDate: 2023-12-25 20:06:41 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:24 +0000 usb: dwc3: Move driver under a subdirectory dwc3 is big enough to have its own subdirectory. While here only make it depend on kernel option dwc3 and rk_dwc3 without any SOC options. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43190 --- sys/conf/files.arm | 2 +- sys/conf/files.arm64 | 7 ++++--- sys/{arm/allwinner => dev/usb/controller/dwc3}/aw_dwc3.c | 0 sys/dev/usb/controller/{ => dwc3}/dwc3.c | 5 ++--- sys/dev/usb/controller/{ => dwc3}/dwc3.h | 0 sys/{arm64/rockchip => dev/usb/controller/dwc3}/rk_dwc3.c | 0 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 075b05e36d78..28e80016d97b 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -104,7 +104,7 @@ dev/psci/smccc_arm.S optional psci dev/syscons/scgfbrndr.c optional sc dev/uart/uart_cpu_fdt.c optional uart fdt -dev/usb/controller/dwc3.c optional fdt dwc3 +dev/usb/controller/dwc3/dwc3.c optional fdt dwc3 dev/usb/controller/generic_xhci.c optional xhci dev/usb/controller/generic_xhci_fdt.c optional xhci fdt diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 6c761b37f191..0eed3db41b16 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -402,7 +402,6 @@ dev/uart/uart_dev_mu.c optional uart uart_mu fdt dev/uart/uart_dev_pl011.c optional uart pl011 dev/usb/controller/dwc_otg_hisi.c optional dwcotg fdt soc_hisi_hi6220 -dev/usb/controller/dwc3.c optional xhci acpi dwc3 | xhci fdt dwc3 dev/usb/controller/ehci_mv.c optional ehci_mv fdt dev/usb/controller/generic_ehci.c optional ehci dev/usb/controller/generic_ehci_acpi.c optional ehci acpi @@ -415,6 +414,10 @@ dev/usb/controller/generic_xhci.c optional xhci dev/usb/controller/generic_xhci_acpi.c optional xhci acpi dev/usb/controller/generic_xhci_fdt.c optional xhci fdt +dev/usb/controller/dwc3/dwc3.c optional xhci acpi dwc3 | xhci fdt dwc3 +dev/usb/controller/dwc3/aw_dwc3.c optional xhci fdt dwc3 aw_dwc3 +dev/usb/controller/dwc3/rk_dwc3.c optional xhci fdt dwc3 rk_dwc3 + dev/vnic/mrml_bridge.c optional vnic fdt dev/vnic/nic_main.c optional vnic pci dev/vnic/nicvf_main.c optional vnic pci pci_iov @@ -437,7 +440,6 @@ arm/allwinner/a33_codec.c optional fdt sound a33_codec arm/allwinner/a64/sun50i_a64_acodec.c optional fdt sound a64_codec arm/allwinner/sunxi_dma_if.m optional a31_dmac arm/allwinner/aw_cir.c optional evdev aw_cir fdt -arm/allwinner/aw_dwc3.c optional aw_dwc3 fdt arm/allwinner/aw_gpio.c optional gpio aw_gpio fdt arm/allwinner/aw_i2s.c optional fdt sound aw_i2s arm/allwinner/aw_mmc.c optional mmc aw_mmc fdt | mmccam aw_mmc fdt @@ -664,7 +666,6 @@ arm64/rockchip/rk3399_emmcphy.c optional fdt rk_emmcphy soc_rockchip_rk3399 arm64/rockchip/rk3568_combphy.c optional fdt rk_combphy soc_rockchip_rk3568 arm64/rockchip/rk3568_pcie.c optional fdt pci soc_rockchip_rk3568 arm64/rockchip/rk3568_pciephy.c optional fdt pci soc_rockchip_rk3568 -arm64/rockchip/rk_dwc3.c optional fdt rk_dwc3 soc_rockchip_rk3399 | fdt rk_dwc3 soc_rockchip_rk3568 arm64/rockchip/rk_i2s.c optional fdt sound soc_rockchip_rk3328 | fdt sound soc_rockchip_rk3399 arm64/rockchip/rk_otp.c optional fdt soc_rockchip_rk3568 arm64/rockchip/rk_otp_if.m optional fdt soc_rockchip_rk3568 diff --git a/sys/arm/allwinner/aw_dwc3.c b/sys/dev/usb/controller/dwc3/aw_dwc3.c similarity index 100% rename from sys/arm/allwinner/aw_dwc3.c rename to sys/dev/usb/controller/dwc3/aw_dwc3.c diff --git a/sys/dev/usb/controller/dwc3.c b/sys/dev/usb/controller/dwc3/dwc3.c similarity index 99% rename from sys/dev/usb/controller/dwc3.c rename to sys/dev/usb/controller/dwc3/dwc3.c index bf3001c0389e..d97b0b11d44c 100644 --- a/sys/dev/usb/controller/dwc3.c +++ b/sys/dev/usb/controller/dwc3/dwc3.c @@ -53,8 +53,9 @@ #include #include +#include #include -#include +#include #ifdef FDT #include @@ -74,8 +75,6 @@ #include #endif -#include "generic_xhci.h" - struct snps_dwc3_softc { struct xhci_softc sc; device_t dev; diff --git a/sys/dev/usb/controller/dwc3.h b/sys/dev/usb/controller/dwc3/dwc3.h similarity index 100% rename from sys/dev/usb/controller/dwc3.h rename to sys/dev/usb/controller/dwc3/dwc3.h diff --git a/sys/arm64/rockchip/rk_dwc3.c b/sys/dev/usb/controller/dwc3/rk_dwc3.c similarity index 100% rename from sys/arm64/rockchip/rk_dwc3.c rename to sys/dev/usb/controller/dwc3/rk_dwc3.c From nobody Wed Jan 10 18:21:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMV47K5z55YSQ; Wed, 10 Jan 2024 18:21: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 4T9GMV21cnz4GTB; Wed, 10 Jan 2024 18:21:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O/rV6hCzAAv1UT3tlTwShp/UEKr8xTr369W8BXeTK8g=; b=NP0cNS0rnLRLkb5rPSZ6eORHAXLG5SoC1Ga+MERMDeKXaXG2jE+5BPc3IkWQt2XZ2+sin5 Qo9CPJgd2L3rgtl5MprhkvddrkGCl11JK3RZg9NqoSXbSrswJr5l3Xwxlyr1bkBKE2GqN3 cw5hdqhNOkQ4Wz6QG6p4Yp2QeA9dtX0Ip1lofXft3y2OOoFggL6fAwl5BK4UT86WnVA237 TpSHptp5g0OOH2dmIidEyEwnrhrOtwepJTR0NSgxUXtET2nMgA1OsriLy+UkPNKnuoFJyI gAUHifpXOKdvWgfv79D+ZfWF1tE0gusgDZcsm7XvWek51DJ53KF9fz60gpJkqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O/rV6hCzAAv1UT3tlTwShp/UEKr8xTr369W8BXeTK8g=; b=q3C/AK3Lwg8m4GirBweB1PXN30Eax6KA8oeoB1Vhf73yJTFRnabKMqIQxNYSoSfffMwshq L3U/AUz7J/xu/RnAWJOdd+oWSAtaDUJMDuKqZnEx3q7Qflw7R9thtPYbQSBmLzUxMKX3B4 LC/qAc8CDZYzxND8WhWqDDIJBievJUIZ9hrQeHG6fwoLpoYfJ7y3HIG0vmueCqBeioQeig pyP7ZQw2TaHGtrQz9BJx2bQ39wkvdbVKwTO7Rhd9Ue1o9YkwQlMNJwsEHZJJyV82g/X6C8 tqyFWbeyoZmApPsiQMC+dzyME3SgFEm19Xuh5Q1z3mRDoW7E0SDslXmg8gnGqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910870; a=rsa-sha256; cv=none; b=BwasyNBlky9FtjR3Gjb3hpdyR/ogHAW+4Ng0a6SpDBYBcaWQoZwixmYltTmFwIKZairfza ZZVWFD9K/DOw3BrGPdhpXplYDh8EQd8neNYZ/XXFN2iS1gkM8AB0gfxqlM2fI3M8QcopNl 5xhasWtT6BICCrg4FAoJzWk19MUWh66tDgFniTJHMXPJfsBANs7hFp1Jxb6R0BDOBX1mbi SvxLjAGpD7tLxuxIt9dE3t9h8gghz2VglE+/3u0ALMlc4m49uMDUfi6wIRHh6nJ7+Np6Kq Zy+0KtG2OyjFudTy26kQ/MSnrIsZiqmNYN3rRQe9X7mRoYnqyH5CFZt9JLq5JQ== 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 4T9GMV10DkzmNt; Wed, 10 Jan 2024 18:21: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 40AILAhV053133; Wed, 10 Jan 2024 18:21:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AILAZk053130; Wed, 10 Jan 2024 18:21:10 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:10 GMT Message-Id: <202401101821.40AILAZk053130@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: e51b3d8e53ce - main - nvmem: Move nvmem code in dev/nvmem List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: e51b3d8e53cee7d6a36e34e1cd4d588593d71b40 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=e51b3d8e53cee7d6a36e34e1cd4d588593d71b40 commit e51b3d8e53cee7d6a36e34e1cd4d588593d71b40 Author: Emmanuel Vadot AuthorDate: 2023-12-26 17:51:22 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:31 +0000 nvmem: Move nvmem code in dev/nvmem We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: dab, imp Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43193 --- sys/arm/allwinner/aw_thermal.c | 2 +- sys/conf/files | 4 ++-- sys/dev/{extres => }/nvmem/nvmem.c | 0 sys/dev/{extres => }/nvmem/nvmem.h | 6 +++--- sys/dev/{extres => }/nvmem/nvmem_if.m | 0 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/arm/allwinner/aw_thermal.c b/sys/arm/allwinner/aw_thermal.c index d9293b5cb171..bdb7e2dacc4e 100644 --- a/sys/arm/allwinner/aw_thermal.c +++ b/sys/arm/allwinner/aw_thermal.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include diff --git a/sys/conf/files b/sys/conf/files index 95228194fc5a..e07ac548d93a 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1682,8 +1682,6 @@ dev/extres/phy/phydev_if.m optional phy fdt dev/extres/phy/phynode_if.m optional phy dev/extres/phy/phy_usb.c optional phy dev/extres/phy/phynode_usb_if.m optional phy -dev/extres/nvmem/nvmem.c optional nvmem fdt -dev/extres/nvmem/nvmem_if.m optional nvmem dev/extres/regulator/regdev_if.m optional regulator fdt dev/extres/regulator/regnode_if.m optional regulator dev/extres/regulator/regulator.c optional regulator @@ -2531,6 +2529,8 @@ dev/nvme/nvme_sim.c optional nvme scbus dev/nvme/nvme_sysctl.c optional nvme dev/nvme/nvme_test.c optional nvme dev/nvme/nvme_util.c optional nvme +dev/nvmem/nvmem.c optional nvmem fdt +dev/nvmem/nvmem_if.m optional nvmem dev/oce/oce_hw.c optional oce pci dev/oce/oce_if.c optional oce pci dev/oce/oce_mbox.c optional oce pci diff --git a/sys/dev/extres/nvmem/nvmem.c b/sys/dev/nvmem/nvmem.c similarity index 100% rename from sys/dev/extres/nvmem/nvmem.c rename to sys/dev/nvmem/nvmem.c diff --git a/sys/dev/extres/nvmem/nvmem.h b/sys/dev/nvmem/nvmem.h similarity index 95% rename from sys/dev/extres/nvmem/nvmem.h rename to sys/dev/nvmem/nvmem.h index f9589b1e0b2c..83e24577787c 100644 --- a/sys/dev/extres/nvmem/nvmem.h +++ b/sys/dev/nvmem/nvmem.h @@ -23,8 +23,8 @@ * SUCH DAMAGE. */ -#ifndef _DEV_EXTRES_NVMEM_H_ -#define _DEV_EXTRES_NVMEM_H_ +#ifndef _DEV_NVMEM_H_ +#define _DEV_NVMEM_H_ int nvmem_get_cell_len(phandle_t node, const char *name); int nvmem_read_cell_by_name(phandle_t node, const char *name, void *cell, size_t buflen); @@ -32,4 +32,4 @@ int nvmem_read_cell_by_idx(phandle_t node, int idx, void *cell, size_t buflen); int nvmem_write_cell_by_name(phandle_t node, const char *name, void *cell, size_t buflen); int nvmem_write_cell_by_idx(phandle_t node, int idx, void *cell, size_t buflen); -#endif /* _DEV_EXTRES_NVMEM_H_ */ +#endif /* _DEV_NVMEM_H_ */ diff --git a/sys/dev/extres/nvmem/nvmem_if.m b/sys/dev/nvmem/nvmem_if.m similarity index 100% rename from sys/dev/extres/nvmem/nvmem_if.m rename to sys/dev/nvmem/nvmem_if.m From nobody Wed Jan 10 18:21:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMT4M8Fz55YS7; Wed, 10 Jan 2024 18:21: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 4T9GMT0s0Zz4Gf7; Wed, 10 Jan 2024 18:21:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jn9GUEELuGexs3ncINsYzJk7GcL0RG8hZ5a7yj3L8K8=; b=o6tyXSJLhQb94uG49jNyv7JgU0Q/Mz2IfWgiOcoPCZGMBmMt3YALtVk6t0BEdt8uvYBk0R hcnv3NQoPNs3GYwHtpxb3O5nEEkn77ODTYwZ12haxbphQbuDb6NGr9W4dA30cMJrC4s/4L zfVZ8alS5rT3fo8C5cYHvgzs/GJ1vQukILhzPkyIvTZF/ETwQokLB+BsRIIXgPvSiPL8rJ EWeVjWudCQLhCCff25PNfl+lENLpfz1r5x2H4D/ZkYcIjPaQsB4B3AUtsQ6wcUFluF/w12 Dsju0JYhvTfyevz5u7w9flHxqF2iS133L+k/hoQbWE708rFjPs24YsLW+f1QIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jn9GUEELuGexs3ncINsYzJk7GcL0RG8hZ5a7yj3L8K8=; b=TrBbUhEjyZ+gxRfdRUQBvJH/Vz+BO5/mUAHGskCrhGFP89IcyvmioFDLccFzC6i/BOYS7C LCXYA/zLshDOWcmZcjXdavmPw3J/HX+/j0Gk2ZTP0Xr0No59esMocSqIS0x+lVvKyWdNZe x6NQ9z+eFlDQHzccdT8u+hPPXx3tW7oA9K8wIVc5u8eubIOofOfkT3b3kXf0BX2bJxdfGC dzKa25lujT9xoV8Na0242uy1j1tDm4FUoobHelZsnlhah/vunLepf69C0qhjRCM4umodjR /+vo5Ug/SQT7Ivpzr2lKlhHocTt7PSPYbJ3jeA8Mo/DZV89gVo/y81jOAG2s3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910869; a=rsa-sha256; cv=none; b=U9HXtRbaRqY5d47ow7bC/y6DDuufilyMuRjo57diREHPXY5Ruhn10j84F52EpFQdGCsotl RtRMNq3k2r2F1mA04EpNwSs9bYcXZfC8TQtfa7goP2b0csRLtfOOcP2busZnZZjtfnTr5F +FZiHnkLFcmvr1wW3rd5k3Y/2FzAMSpDFeWBfLB/X3CZS0EusRQyoXxLtGLNSQ3jxAfQXD p3XJOn0SsTrQQpHRY2f7w8VzQber9jYVIbXJ4E6tOyuICezz7rFaO5zjRwAyo5TNYbhV9U uceuwg/w62iNJHiap3YLaVtyq2+wVTvgpA14maqHDgWO/zwDcvIl0vSMva0x+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 4T9GMS747dzmJS; Wed, 10 Jan 2024 18:21: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 40AIL88m053078; Wed, 10 Jan 2024 18:21:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIL8l4053075; Wed, 10 Jan 2024 18:21:08 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:08 GMT Message-Id: <202401101821.40AIL8l4053075@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: 1f469a9fc498 - main - hwreset: Move reset code in dev/hwreset List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 1f469a9fc498c3d406ef7c4e347232678f49da0a Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=1f469a9fc498c3d406ef7c4e347232678f49da0a commit 1f469a9fc498c3d406ef7c4e347232678f49da0a Author: Emmanuel Vadot AuthorDate: 2023-12-26 17:49:19 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:28 +0000 hwreset: Move reset code in dev/hwreset We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: imp Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43192 --- sys/arm/allwinner/a10_codec.c | 2 +- sys/arm/allwinner/a31_dmac.c | 2 +- sys/arm/allwinner/a33_codec.c | 2 +- sys/arm/allwinner/a64/sun50i_a64_acodec.c | 2 +- sys/arm/allwinner/aw_cir.c | 2 +- sys/arm/allwinner/aw_gpio.c | 2 +- sys/arm/allwinner/aw_i2s.c | 2 +- sys/arm/allwinner/aw_mmc.c | 2 +- sys/arm/allwinner/aw_reset.c | 2 +- sys/arm/allwinner/aw_rsb.c | 2 +- sys/arm/allwinner/aw_thermal.c | 2 +- sys/arm/allwinner/aw_usb3phy.c | 2 +- sys/arm/allwinner/aw_usbphy.c | 2 +- sys/arm/allwinner/if_awg.c | 2 +- sys/arm/nvidia/drm2/tegra_dc.c | 2 +- sys/arm/nvidia/drm2/tegra_hdmi.c | 2 +- sys/arm/nvidia/drm2/tegra_host1x.c | 2 +- sys/arm/nvidia/tegra124/tegra124_car.c | 2 +- sys/arm/nvidia/tegra124/tegra124_pmc.c | 2 +- sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c | 2 +- sys/arm/nvidia/tegra_ahci.c | 2 +- sys/arm/nvidia/tegra_efuse.c | 2 +- sys/arm/nvidia/tegra_ehci.c | 2 +- sys/arm/nvidia/tegra_i2c.c | 2 +- sys/arm/nvidia/tegra_pcie.c | 2 +- sys/arm/nvidia/tegra_sdhci.c | 2 +- sys/arm/nvidia/tegra_soctherm.c | 2 +- sys/arm/nvidia/tegra_uart.c | 2 +- sys/arm/nvidia/tegra_usbphy.c | 2 +- sys/arm/nvidia/tegra_xhci.c | 2 +- sys/arm/qualcomm/ipq4018_usb_hs_phy.c | 2 +- sys/arm/qualcomm/ipq4018_usb_ss_phy.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_car.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_pmc.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c | 2 +- sys/arm64/rockchip/rk3568_combphy.c | 2 +- sys/arm64/rockchip/rk3568_pcie.c | 2 +- sys/arm64/rockchip/rk3568_pciephy.c | 2 +- sys/arm64/rockchip/rk_i2s.c | 2 +- sys/arm64/rockchip/rk_pcie.c | 2 +- sys/arm64/rockchip/rk_pcie_phy.c | 2 +- sys/arm64/rockchip/rk_tsadc.c | 2 +- sys/arm64/rockchip/rk_typec_phy.c | 2 +- sys/arm64/rockchip/rk_usbphy.c | 2 +- sys/conf/files | 6 +++--- sys/dev/clk/allwinner/aw_ccung.c | 2 +- sys/dev/clk/allwinner/ccu_de2.c | 2 +- sys/dev/clk/rockchip/rk_cru.c | 2 +- sys/dev/clk/xilinx/zynqmp_reset.c | 2 +- sys/dev/dwc/dwc1000_core.c | 2 +- sys/dev/dwc/dwc1000_dma.c | 2 +- sys/dev/dwc/if_dwc.c | 2 +- sys/dev/dwc/if_dwc_aw.c | 2 +- sys/dev/dwc/if_dwc_rk.c | 2 +- sys/dev/dwc/if_dwc_socfpga.c | 2 +- sys/dev/eqos/if_eqos_fdt.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_atu.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_mdio.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_mib.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_mirror.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_port.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_psgmii.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_vtu.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_main.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_phy.c | 2 +- sys/dev/{extres => }/hwreset/hwreset.c | 2 +- sys/dev/{extres => }/hwreset/hwreset.h | 6 +++--- sys/dev/{extres => }/hwreset/hwreset_array.c | 2 +- sys/dev/{extres => }/hwreset/hwreset_if.m | 0 sys/dev/iicbus/controller/twsi/a10_twsi.c | 2 +- sys/dev/mmc/host/dwmmc_var.h | 2 +- sys/dev/qcom_dwc3/qcom_dwc3.c | 2 +- sys/dev/qcom_gcc/qcom_gcc_ipq4018.c | 2 +- sys/dev/qcom_gcc/qcom_gcc_ipq4018_reset.c | 2 +- sys/dev/qcom_qup/qcom_spi.c | 2 +- sys/dev/qcom_qup/qcom_spi_hw.c | 2 +- sys/dev/spibus/controller/allwinner/aw_spi.c | 2 +- sys/dev/spibus/controller/rockchip/rk_spi.c | 2 +- sys/dev/uart/uart_dev_snps.c | 2 +- sys/dev/usb/controller/dwc3/aw_dwc3.c | 2 +- sys/dev/usb/controller/dwc3/rk_dwc3.c | 2 +- sys/dev/usb/controller/generic_ehci_fdt.c | 2 +- sys/dev/usb/controller/generic_ohci.c | 2 +- sys/dev/usb/controller/musb_otg_allwinner.c | 2 +- sys/dev/usb/controller/xlnx_dwc3.c | 2 +- sys/riscv/sifive/fu740_pci_dw.c | 2 +- 87 files changed, 90 insertions(+), 90 deletions(-) diff --git a/sys/arm/allwinner/a10_codec.c b/sys/arm/allwinner/a10_codec.c index fc4937351f3b..421d1c015691 100644 --- a/sys/arm/allwinner/a10_codec.c +++ b/sys/arm/allwinner/a10_codec.c @@ -48,7 +48,7 @@ #include #include -#include +#include #include "sunxi_dma_if.h" #include "mixer_if.h" diff --git a/sys/arm/allwinner/a31_dmac.c b/sys/arm/allwinner/a31_dmac.c index 988444c4b1c5..9dc98342a159 100644 --- a/sys/arm/allwinner/a31_dmac.c +++ b/sys/arm/allwinner/a31_dmac.c @@ -47,7 +47,7 @@ #include #include -#include +#include #include "sunxi_dma_if.h" diff --git a/sys/arm/allwinner/a33_codec.c b/sys/arm/allwinner/a33_codec.c index d71562b08c9b..4bf2863b74ef 100644 --- a/sys/arm/allwinner/a33_codec.c +++ b/sys/arm/allwinner/a33_codec.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include diff --git a/sys/arm/allwinner/a64/sun50i_a64_acodec.c b/sys/arm/allwinner/a64/sun50i_a64_acodec.c index f99d5385d897..f9ada20ec554 100644 --- a/sys/arm/allwinner/a64/sun50i_a64_acodec.c +++ b/sys/arm/allwinner/a64/sun50i_a64_acodec.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include "syscon_if.h" diff --git a/sys/arm/allwinner/aw_cir.c b/sys/arm/allwinner/aw_cir.c index 7e9fdfca80bf..5ebb57f48040 100644 --- a/sys/arm/allwinner/aw_cir.c +++ b/sys/arm/allwinner/aw_cir.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/aw_gpio.c b/sys/arm/allwinner/aw_gpio.c index b77972ac0187..f72dbf88099f 100644 --- a/sys/arm/allwinner/aw_gpio.c +++ b/sys/arm/allwinner/aw_gpio.c @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #if defined(__aarch64__) diff --git a/sys/arm/allwinner/aw_i2s.c b/sys/arm/allwinner/aw_i2s.c index 376405056f51..87dfb109363f 100644 --- a/sys/arm/allwinner/aw_i2s.c +++ b/sys/arm/allwinner/aw_i2s.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include "syscon_if.h" diff --git a/sys/arm/allwinner/aw_mmc.c b/sys/arm/allwinner/aw_mmc.c index 7c783f69880c..d229fba1e07d 100644 --- a/sys/arm/allwinner/aw_mmc.c +++ b/sys/arm/allwinner/aw_mmc.c @@ -53,7 +53,7 @@ #include #include -#include +#include #include #include "opt_mmccam.h" diff --git a/sys/arm/allwinner/aw_reset.c b/sys/arm/allwinner/aw_reset.c index da2879ce20c8..4fadaf2bfef4 100644 --- a/sys/arm/allwinner/aw_reset.c +++ b/sys/arm/allwinner/aw_reset.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include "hwreset_if.h" diff --git a/sys/arm/allwinner/aw_rsb.c b/sys/arm/allwinner/aw_rsb.c index 08522caff725..fa599ddcb3dd 100644 --- a/sys/arm/allwinner/aw_rsb.c +++ b/sys/arm/allwinner/aw_rsb.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include "iicbus_if.h" diff --git a/sys/arm/allwinner/aw_thermal.c b/sys/arm/allwinner/aw_thermal.c index 4f1e02612347..d9293b5cb171 100644 --- a/sys/arm/allwinner/aw_thermal.c +++ b/sys/arm/allwinner/aw_thermal.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/aw_usb3phy.c b/sys/arm/allwinner/aw_usb3phy.c index 058fce6061a7..b49a9a86b6e9 100644 --- a/sys/arm/allwinner/aw_usb3phy.c +++ b/sys/arm/allwinner/aw_usb3phy.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/aw_usbphy.c b/sys/arm/allwinner/aw_usbphy.c index 33c11e62ef7c..09725783fd22 100644 --- a/sys/arm/allwinner/aw_usbphy.c +++ b/sys/arm/allwinner/aw_usbphy.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/if_awg.c b/sys/arm/allwinner/if_awg.c index 516cbefc6272..6c38a65b5040 100644 --- a/sys/arm/allwinner/if_awg.c +++ b/sys/arm/allwinner/if_awg.c @@ -60,7 +60,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_dc.c b/sys/arm/nvidia/drm2/tegra_dc.c index 637ea3981acc..f4168f161f5e 100644 --- a/sys/arm/nvidia/drm2/tegra_dc.c +++ b/sys/arm/nvidia/drm2/tegra_dc.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_hdmi.c b/sys/arm/nvidia/drm2/tegra_hdmi.c index 1c5e86bde498..174a9718bbfa 100644 --- a/sys/arm/nvidia/drm2/tegra_hdmi.c +++ b/sys/arm/nvidia/drm2/tegra_hdmi.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_host1x.c b/sys/arm/nvidia/drm2/tegra_host1x.c index 284c5c2e8465..4384ab0bc976 100644 --- a/sys/arm/nvidia/drm2/tegra_host1x.c +++ b/sys/arm/nvidia/drm2/tegra_host1x.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra124/tegra124_car.c b/sys/arm/nvidia/tegra124/tegra124_car.c index 440f5a5b1044..57d7760494a6 100644 --- a/sys/arm/nvidia/tegra124/tegra124_car.c +++ b/sys/arm/nvidia/tegra124/tegra124_car.c @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra124/tegra124_pmc.c b/sys/arm/nvidia/tegra124/tegra124_pmc.c index 6b42659d453a..83bd0a1e6983 100644 --- a/sys/arm/nvidia/tegra124/tegra124_pmc.c +++ b/sys/arm/nvidia/tegra124/tegra124_pmc.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c index eb749a2ffbc9..0b611abc39cb 100644 --- a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c +++ b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_ahci.c b/sys/arm/nvidia/tegra_ahci.c index eeb49d6ea5a8..de60f02e97ea 100644 --- a/sys/arm/nvidia/tegra_ahci.c +++ b/sys/arm/nvidia/tegra_ahci.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_efuse.c b/sys/arm/nvidia/tegra_efuse.c index 9e151f6ed564..35d9380a18a5 100644 --- a/sys/arm/nvidia/tegra_efuse.c +++ b/sys/arm/nvidia/tegra_efuse.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/nvidia/tegra_ehci.c b/sys/arm/nvidia/tegra_ehci.c index 1d34ed45dd90..033b7b9794fb 100644 --- a/sys/arm/nvidia/tegra_ehci.c +++ b/sys/arm/nvidia/tegra_ehci.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_i2c.c b/sys/arm/nvidia/tegra_i2c.c index 1849ae33e3a2..1b959c5c5bbe 100644 --- a/sys/arm/nvidia/tegra_i2c.c +++ b/sys/arm/nvidia/tegra_i2c.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_pcie.c b/sys/arm/nvidia/tegra_pcie.c index 82e282146d68..a22ae02ce4bc 100644 --- a/sys/arm/nvidia/tegra_pcie.c +++ b/sys/arm/nvidia/tegra_pcie.c @@ -48,7 +48,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_sdhci.c b/sys/arm/nvidia/tegra_sdhci.c index 6877b7021980..2b152227d95f 100644 --- a/sys/arm/nvidia/tegra_sdhci.c +++ b/sys/arm/nvidia/tegra_sdhci.c @@ -49,7 +49,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_soctherm.c b/sys/arm/nvidia/tegra_soctherm.c index 0018833e5a43..fa6d0d9fa5cd 100644 --- a/sys/arm/nvidia/tegra_soctherm.c +++ b/sys/arm/nvidia/tegra_soctherm.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/nvidia/tegra_uart.c b/sys/arm/nvidia/tegra_uart.c index 31f92d34a6d3..e18b77ecc321 100644 --- a/sys/arm/nvidia/tegra_uart.c +++ b/sys/arm/nvidia/tegra_uart.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_usbphy.c b/sys/arm/nvidia/tegra_usbphy.c index 438ba719170c..2499a568fe4c 100644 --- a/sys/arm/nvidia/tegra_usbphy.c +++ b/sys/arm/nvidia/tegra_usbphy.c @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_xhci.c b/sys/arm/nvidia/tegra_xhci.c index e80e34f38c38..21ce4dc0540d 100644 --- a/sys/arm/nvidia/tegra_xhci.c +++ b/sys/arm/nvidia/tegra_xhci.c @@ -53,7 +53,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/qualcomm/ipq4018_usb_hs_phy.c b/sys/arm/qualcomm/ipq4018_usb_hs_phy.c index 75bfa931e8e3..618911fef640 100644 --- a/sys/arm/qualcomm/ipq4018_usb_hs_phy.c +++ b/sys/arm/qualcomm/ipq4018_usb_hs_phy.c @@ -36,7 +36,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm/qualcomm/ipq4018_usb_ss_phy.c b/sys/arm/qualcomm/ipq4018_usb_ss_phy.c index 22dc92ffd2ec..66ef4c9fe732 100644 --- a/sys/arm/qualcomm/ipq4018_usb_ss_phy.c +++ b/sys/arm/qualcomm/ipq4018_usb_ss_phy.c @@ -36,7 +36,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm64/nvidia/tegra210/tegra210_car.c b/sys/arm64/nvidia/tegra210/tegra210_car.c index 2046782805d6..bff91024192f 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_car.c +++ b/sys/arm64/nvidia/tegra210/tegra210_car.c @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm64/nvidia/tegra210/tegra210_pmc.c b/sys/arm64/nvidia/tegra210/tegra210_pmc.c index a04ec212a8c7..0f0343a317ce 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_pmc.c +++ b/sys/arm64/nvidia/tegra210/tegra210_pmc.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c b/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c index bfcd8894034a..75662386427f 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c +++ b/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk3568_combphy.c b/sys/arm64/rockchip/rk3568_combphy.c index f9ba38e663ad..5152f3eed0d1 100644 --- a/sys/arm64/rockchip/rk3568_combphy.c +++ b/sys/arm64/rockchip/rk3568_combphy.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk3568_pcie.c b/sys/arm64/rockchip/rk3568_pcie.c index b8ad5b8a33f5..5343a5dd3f2c 100644 --- a/sys/arm64/rockchip/rk3568_pcie.c +++ b/sys/arm64/rockchip/rk3568_pcie.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk3568_pciephy.c b/sys/arm64/rockchip/rk3568_pciephy.c index 0f1aa5d280a8..f277253b577d 100644 --- a/sys/arm64/rockchip/rk3568_pciephy.c +++ b/sys/arm64/rockchip/rk3568_pciephy.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk_i2s.c b/sys/arm64/rockchip/rk_i2s.c index fb1c23b80eb9..3f7cd71eda27 100644 --- a/sys/arm64/rockchip/rk_i2s.c +++ b/sys/arm64/rockchip/rk_i2s.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_pcie.c b/sys/arm64/rockchip/rk_pcie.c index cccb04ffdcd9..cc6c842a6f6a 100644 --- a/sys/arm64/rockchip/rk_pcie.c +++ b/sys/arm64/rockchip/rk_pcie.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk_pcie_phy.c b/sys/arm64/rockchip/rk_pcie_phy.c index d4c8c3eb2587..88ba4035ebb9 100644 --- a/sys/arm64/rockchip/rk_pcie_phy.c +++ b/sys/arm64/rockchip/rk_pcie_phy.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_tsadc.c b/sys/arm64/rockchip/rk_tsadc.c index 8b99c384da48..ff5fd722d0f0 100644 --- a/sys/arm64/rockchip/rk_tsadc.c +++ b/sys/arm64/rockchip/rk_tsadc.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk_typec_phy.c b/sys/arm64/rockchip/rk_typec_phy.c index 6e75394377e4..7f49da5e2208 100644 --- a/sys/arm64/rockchip/rk_typec_phy.c +++ b/sys/arm64/rockchip/rk_typec_phy.c @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_usbphy.c b/sys/arm64/rockchip/rk_usbphy.c index 6f9001470df8..46859d1442e3 100644 --- a/sys/arm64/rockchip/rk_usbphy.c +++ b/sys/arm64/rockchip/rk_usbphy.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/conf/files b/sys/conf/files index 8b28d6428584..95228194fc5a 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1682,9 +1682,6 @@ dev/extres/phy/phydev_if.m optional phy fdt dev/extres/phy/phynode_if.m optional phy dev/extres/phy/phy_usb.c optional phy dev/extres/phy/phynode_usb_if.m optional phy -dev/extres/hwreset/hwreset.c optional hwreset -dev/extres/hwreset/hwreset_array.c optional hwreset -dev/extres/hwreset/hwreset_if.m optional hwreset dev/extres/nvmem/nvmem.c optional nvmem fdt dev/extres/nvmem/nvmem_if.m optional nvmem dev/extres/regulator/regdev_if.m optional regulator fdt @@ -1783,6 +1780,9 @@ dev/hptiop/hptiop.c optional hptiop scbus dev/hwpmc/hwpmc_logging.c optional hwpmc dev/hwpmc/hwpmc_mod.c optional hwpmc dev/hwpmc/hwpmc_soft.c optional hwpmc +dev/hwreset/hwreset.c optional hwreset +dev/hwreset/hwreset_array.c optional hwreset +dev/hwreset/hwreset_if.m optional hwreset dev/ichiic/ig4_acpi.c optional ig4 acpi iicbus dev/ichiic/ig4_iic.c optional ig4 iicbus dev/ichiic/ig4_pci.c optional ig4 pci iicbus diff --git a/sys/dev/clk/allwinner/aw_ccung.c b/sys/dev/clk/allwinner/aw_ccung.c index f446b77b6226..751ebba6c349 100644 --- a/sys/dev/clk/allwinner/aw_ccung.c +++ b/sys/dev/clk/allwinner/aw_ccung.c @@ -47,7 +47,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/clk/allwinner/ccu_de2.c b/sys/dev/clk/allwinner/ccu_de2.c index 4bd29d139c11..cc4debdbfc89 100644 --- a/sys/dev/clk/allwinner/ccu_de2.c +++ b/sys/dev/clk/allwinner/ccu_de2.c @@ -46,7 +46,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/clk/rockchip/rk_cru.c b/sys/dev/clk/rockchip/rk_cru.c index a7d1b26166f1..6b0978e885b5 100644 --- a/sys/dev/clk/rockchip/rk_cru.c +++ b/sys/dev/clk/rockchip/rk_cru.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/clk/xilinx/zynqmp_reset.c b/sys/dev/clk/xilinx/zynqmp_reset.c index 52074d4c62af..c89a4c8ff58c 100644 --- a/sys/dev/clk/xilinx/zynqmp_reset.c +++ b/sys/dev/clk/xilinx/zynqmp_reset.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/dwc/dwc1000_core.c b/sys/dev/dwc/dwc1000_core.c index d25c31e66e28..ba895f991b50 100644 --- a/sys/dev/dwc/dwc1000_core.c +++ b/sys/dev/dwc/dwc1000_core.c @@ -55,7 +55,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/dwc/dwc1000_dma.c b/sys/dev/dwc/dwc1000_dma.c index e89ccee5b0ff..c510c252072c 100644 --- a/sys/dev/dwc/dwc1000_dma.c +++ b/sys/dev/dwc/dwc1000_dma.c @@ -50,7 +50,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index be44a6be193b..17657045b73c 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -60,7 +60,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/dwc/if_dwc_aw.c b/sys/dev/dwc/if_dwc_aw.c index 981f621e3f27..2a0dfaa33715 100644 --- a/sys/dev/dwc/if_dwc_aw.c +++ b/sys/dev/dwc/if_dwc_aw.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/dwc/if_dwc_rk.c b/sys/dev/dwc/if_dwc_rk.c index 76fd11dfd109..c78fb447d6d3 100644 --- a/sys/dev/dwc/if_dwc_rk.c +++ b/sys/dev/dwc/if_dwc_rk.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/dwc/if_dwc_socfpga.c b/sys/dev/dwc/if_dwc_socfpga.c index ae2bcac54a95..5a95d133c197 100644 --- a/sys/dev/dwc/if_dwc_socfpga.c +++ b/sys/dev/dwc/if_dwc_socfpga.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/eqos/if_eqos_fdt.c b/sys/dev/eqos/if_eqos_fdt.c index 9c36f658bad1..5601c8b778e2 100644 --- a/sys/dev/eqos/if_eqos_fdt.c +++ b/sys/dev/eqos/if_eqos_fdt.c @@ -51,7 +51,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_hw.c b/sys/dev/etherswitch/ar40xx/ar40xx_hw.c index c017419be0ff..cdc13366eef3 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_hw.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_hw.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_hw_atu.c b/sys/dev/etherswitch/ar40xx/ar40xx_hw_atu.c index a3facf4a6199..4ddcc58a2cfc 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_hw_atu.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_hw_atu.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_hw_mdio.c b/sys/dev/etherswitch/ar40xx/ar40xx_hw_mdio.c index 43c2d8744054..793507b9aaa2 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_hw_mdio.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_hw_mdio.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_hw_mib.c b/sys/dev/etherswitch/ar40xx/ar40xx_hw_mib.c index 6fdc9e96fd81..73110753c915 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_hw_mib.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_hw_mib.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_hw_mirror.c b/sys/dev/etherswitch/ar40xx/ar40xx_hw_mirror.c index 7e440f54e3ac..fff97147d878 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_hw_mirror.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_hw_mirror.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_hw_port.c b/sys/dev/etherswitch/ar40xx/ar40xx_hw_port.c index e701f3ae28ba..a540f9b7498e 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_hw_port.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_hw_port.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_hw_psgmii.c b/sys/dev/etherswitch/ar40xx/ar40xx_hw_psgmii.c index 0f0704c41aba..67a2bcbc7a6c 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_hw_psgmii.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_hw_psgmii.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_hw_vtu.c b/sys/dev/etherswitch/ar40xx/ar40xx_hw_vtu.c index 3c3800847438..15f5f61f8b2d 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_hw_vtu.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_hw_vtu.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_main.c b/sys/dev/etherswitch/ar40xx/ar40xx_main.c index d8cbfd836a9b..757dbe23071e 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_main.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_main.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/etherswitch/ar40xx/ar40xx_phy.c b/sys/dev/etherswitch/ar40xx/ar40xx_phy.c index 079a92983503..b9a308e3620d 100644 --- a/sys/dev/etherswitch/ar40xx/ar40xx_phy.c +++ b/sys/dev/etherswitch/ar40xx/ar40xx_phy.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/extres/hwreset/hwreset.c b/sys/dev/hwreset/hwreset.c similarity index 99% rename from sys/dev/extres/hwreset/hwreset.c rename to sys/dev/hwreset/hwreset.c index eda8878229d4..82ffa3491a11 100644 --- a/sys/dev/extres/hwreset/hwreset.c +++ b/sys/dev/hwreset/hwreset.c *** 274 LINES SKIPPED *** From nobody Wed Jan 10 18:21:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMS0pcTz55YHK; Wed, 10 Jan 2024 18:21: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 4T9GMS00Gkz4Gmd; Wed, 10 Jan 2024 18:21:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VStBh2gj/3EvLycuh4oz1IXQcn2YUSCOPBZ05fp0MDI=; b=M+fUZl8d0nfriK2SjzqQsWtklgiYrVsJXgdW7zNzOJyTZ7IOMrKuELKCGTE6ZFohWCdpQ3 Ru/Nhe/9TrwZRXKdpjlg36GW3u6AmQNyOy3OJeJbI9tbYkewyNNhIU6iDCfQHQHwvb7Bxk gOO4SxTgG1lL34qgsmFsTPpa7h+Ythp1zg5ffPl1lIGvAF4XLCaO88IHGWV8QpeA28c0Ey NLqVeEt7+PUXLK0kmRs4xZxXLRcTxT7RS2YEsJOQyPWLeI42VRofuHx8Kyo5SNVqaZPqpS UFvvLaewILBSA6HGj4GTntHgGQUeNUfnhf4wEnNYGc5jBUiPoqoXV2RLI9m9Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VStBh2gj/3EvLycuh4oz1IXQcn2YUSCOPBZ05fp0MDI=; b=f/ApWMAe3i75jf3J+RKLKm6H4enVqixc27H3qS+4FOjDsv5AbOMBg7hx3n7iP3cD8YnOxf AqLxQpe/dnT/03C+wg38Kl/yjLQ8X1+gkzZ4GUDgeCFDst+P9GiGokTB+bCOhz5ePswFIs Co1GiiGUf8NAogYvdy6REOhsWo9Cgyg1Hs/v5LxPPopMXL3Fqtu8EpnWcZ0bH9eND8hDZB kZNjIfEgqXERWgO6vMrdNVxYuSy/Fuc2Dhx3UANzy16x+kvSVyNYTezLZmWwGi3H/XDapU /ch3HenZH4J2VPWnHrsP5/cmAgjFIMeYQY6Tqangd445vbRwW8FsLNNoAAolMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910868; a=rsa-sha256; cv=none; b=W9yAOry6/mHeGKB3ushMR7CxN5DCl6bptWXEfFrrHvwsiLihJiHMQ5lJEW7dgIHFVxZ17V kMW0yg/sy1M1DTGCGqNaDljEeDBoXauJWSXzmsulZvNs1pbS0hQyUD8BIjvTDPauA80lFb cusCWy20ldfgK78i9kwf+O/JCufVG+QEe0qgQ7TRAgalBMrh71A88cwzf479+d5wTViHoC OjJxxJnK7B5cPsUtdVRfN6vD/J13wQqGyndxf5VT8Rxru2ef4RpUDz8g3Qt8WpTKrjtUhu X1CvCYXgvL8isJVsA0U998IPG2mxyiCXGtrsZIE5sm+TFR/1JyshQZ5pd8VNXA== 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 4T9GMR6CWkzmLY; Wed, 10 Jan 2024 18:21: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 40AIL70i053030; Wed, 10 Jan 2024 18:21:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIL7iN053027; Wed, 10 Jan 2024 18:21:07 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:07 GMT Message-Id: <202401101821.40AIL7iN053027@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: be82b3a0bf72 - main - clk: Move clock code in dev/clk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: be82b3a0bf72ed3b5f01ac9fcd8dcd3802e3c742 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=be82b3a0bf72ed3b5f01ac9fcd8dcd3802e3c742 commit be82b3a0bf72ed3b5f01ac9fcd8dcd3802e3c742 Author: Emmanuel Vadot AuthorDate: 2023-12-26 17:43:48 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:26 +0000 clk: Move clock code in dev/clk We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: mhorne Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43191 --- sys/arm/allwinner/a10_ahci.c | 2 +- sys/arm/allwinner/a10_codec.c | 2 +- sys/arm/allwinner/a10_dmac.c | 2 +- sys/arm/allwinner/a10_timer.c | 2 +- sys/arm/allwinner/a31_dmac.c | 2 +- sys/arm/allwinner/a33_codec.c | 2 +- sys/arm/allwinner/a64/sun50i_a64_acodec.c | 2 +- sys/arm/allwinner/aw_cir.c | 2 +- sys/arm/allwinner/aw_gmacclk.c | 4 ++-- sys/arm/allwinner/aw_gpio.c | 2 +- sys/arm/allwinner/aw_i2s.c | 2 +- sys/arm/allwinner/aw_mmc.c | 2 +- sys/arm/allwinner/aw_rsb.c | 2 +- sys/arm/allwinner/aw_rtc.c | 2 +- sys/arm/allwinner/aw_thermal.c | 2 +- sys/arm/allwinner/aw_usb3phy.c | 2 +- sys/arm/allwinner/aw_usbphy.c | 2 +- sys/arm/allwinner/if_awg.c | 2 +- sys/arm/allwinner/if_emac.c | 2 +- sys/arm/freescale/imx/imx_gpio.c | 2 +- sys/arm/freescale/imx/imx_i2c.c | 2 +- sys/arm/freescale/vybrid/vf_i2c.c | 2 +- sys/arm/mv/clk/a37x0_nb_periph_clk_driver.c | 4 ++-- sys/arm/mv/clk/a37x0_periph_clk_driver.c | 4 ++-- sys/arm/mv/clk/a37x0_sb_periph_clk_driver.c | 4 ++-- sys/arm/mv/clk/a37x0_tbg.c | 2 +- sys/arm/mv/clk/a37x0_tbg_pll.c | 2 +- sys/arm/mv/clk/a37x0_tbg_pll.h | 2 +- sys/arm/mv/clk/a37x0_xtal.c | 4 ++-- sys/arm/mv/clk/armada38x_coreclk.c | 2 +- sys/arm/mv/clk/armada38x_gateclk.c | 4 ++-- sys/arm/mv/clk/armada38x_gen.c | 2 +- sys/arm/mv/clk/armada38x_gen.h | 2 +- sys/arm/mv/clk/periph.c | 10 +++++----- sys/arm/mv/clk/periph.h | 8 ++++---- sys/arm/mv/clk/periph_clk_d.c | 10 +++++----- sys/arm/mv/clk/periph_clk_fixed.c | 10 +++++----- sys/arm/mv/clk/periph_clk_gate.c | 10 +++++----- sys/arm/mv/clk/periph_clk_mux_gate.c | 10 +++++----- sys/arm/mv/mv_ap806_clock.c | 2 +- sys/arm/mv/mv_cp110_clock.c | 4 ++-- sys/arm/nvidia/drm2/tegra_bo.c | 2 +- sys/arm/nvidia/drm2/tegra_dc.c | 2 +- sys/arm/nvidia/drm2/tegra_drm_subr.c | 2 +- sys/arm/nvidia/drm2/tegra_fb.c | 2 +- sys/arm/nvidia/drm2/tegra_hdmi.c | 2 +- sys/arm/nvidia/drm2/tegra_host1x.c | 2 +- sys/arm/nvidia/tegra124/tegra124_car.c | 8 ++++---- sys/arm/nvidia/tegra124/tegra124_clk_per.c | 2 +- sys/arm/nvidia/tegra124/tegra124_clk_pll.c | 2 +- sys/arm/nvidia/tegra124/tegra124_clk_super.c | 2 +- sys/arm/nvidia/tegra124/tegra124_coretemp.c | 2 +- sys/arm/nvidia/tegra124/tegra124_cpufreq.c | 2 +- sys/arm/nvidia/tegra124/tegra124_pmc.c | 2 +- sys/arm/nvidia/tegra_ahci.c | 2 +- sys/arm/nvidia/tegra_efuse.c | 2 +- sys/arm/nvidia/tegra_ehci.c | 2 +- sys/arm/nvidia/tegra_i2c.c | 2 +- sys/arm/nvidia/tegra_mc.c | 2 +- sys/arm/nvidia/tegra_pcie.c | 2 +- sys/arm/nvidia/tegra_rtc.c | 2 +- sys/arm/nvidia/tegra_sdhci.c | 2 +- sys/arm/nvidia/tegra_soctherm.c | 2 +- sys/arm/nvidia/tegra_uart.c | 2 +- sys/arm/nvidia/tegra_usbphy.c | 2 +- sys/arm/nvidia/tegra_xhci.c | 2 +- sys/arm/ti/am335x/am335x_dmtimer.c | 2 +- sys/arm/ti/am335x/am335x_dmtpps.c | 2 +- sys/arm/ti/am335x/am335x_lcd.c | 2 +- sys/arm/ti/am335x/am335x_musb.c | 2 +- sys/arm/ti/clk/clock_common.c | 2 +- sys/arm/ti/clk/ti_clk_clkctrl.c | 2 +- sys/arm/ti/clk/ti_clk_clkctrl.h | 2 +- sys/arm/ti/clk/ti_clk_dpll.c | 2 +- sys/arm/ti/clk/ti_clk_dpll.h | 2 +- sys/arm/ti/clk/ti_divider_clock.c | 2 +- sys/arm/ti/clk/ti_dpll_clock.c | 2 +- sys/arm/ti/clk/ti_gate_clock.c | 2 +- sys/arm/ti/clk/ti_mux_clock.c | 2 +- sys/arm/ti/ti_pruss.c | 2 +- sys/arm/ti/ti_sdhci.c | 2 +- sys/arm/ti/ti_sysc.c | 2 +- sys/arm64/freescale/imx/clk/imx_clk_composite.c | 2 +- sys/arm64/freescale/imx/clk/imx_clk_composite.h | 2 +- sys/arm64/freescale/imx/clk/imx_clk_frac_pll.c | 2 +- sys/arm64/freescale/imx/clk/imx_clk_frac_pll.h | 2 +- sys/arm64/freescale/imx/clk/imx_clk_gate.c | 2 +- sys/arm64/freescale/imx/clk/imx_clk_gate.h | 2 +- sys/arm64/freescale/imx/clk/imx_clk_mux.c | 2 +- sys/arm64/freescale/imx/clk/imx_clk_mux.h | 2 +- sys/arm64/freescale/imx/clk/imx_clk_sscg_pll.c | 2 +- sys/arm64/freescale/imx/clk/imx_clk_sscg_pll.h | 2 +- sys/arm64/freescale/imx/imx_ccm_clk.h | 10 +++++----- sys/arm64/nvidia/tegra210/tegra210_car.c | 8 ++++---- sys/arm64/nvidia/tegra210/tegra210_clk_per.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_clk_pll.c | 8 ++++---- sys/arm64/nvidia/tegra210/tegra210_clk_super.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_coretemp.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_cpufreq.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_pmc.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c | 2 +- sys/arm64/qoriq/clk/ls1028a_clkgen.c | 2 +- sys/arm64/qoriq/clk/ls1028a_flexspi_clk.c | 2 +- sys/arm64/qoriq/clk/ls1046a_clkgen.c | 2 +- sys/arm64/qoriq/clk/ls1088a_clkgen.c | 2 +- sys/arm64/qoriq/clk/lx2160a_clkgen.c | 2 +- sys/arm64/qoriq/clk/qoriq_clk_pll.c | 4 ++-- sys/arm64/qoriq/clk/qoriq_clk_pll.h | 2 +- sys/arm64/qoriq/clk/qoriq_clkgen.c | 2 +- sys/arm64/qoriq/clk/qoriq_clkgen.h | 4 ++-- sys/arm64/qoriq/qoriq_therm.c | 2 +- sys/arm64/rockchip/rk3328_codec.c | 2 +- sys/arm64/rockchip/rk3399_emmcphy.c | 2 +- sys/arm64/rockchip/rk3568_combphy.c | 2 +- sys/arm64/rockchip/rk3568_pcie.c | 2 +- sys/arm64/rockchip/rk3568_pciephy.c | 2 +- sys/arm64/rockchip/rk_gpio.c | 2 +- sys/arm64/rockchip/rk_i2s.c | 2 +- sys/arm64/rockchip/rk_pcie.c | 2 +- sys/arm64/rockchip/rk_pcie_phy.c | 2 +- sys/arm64/rockchip/rk_tsadc.c | 2 +- sys/arm64/rockchip/rk_typec_phy.c | 2 +- sys/arm64/rockchip/rk_usb2phy.c | 2 +- sys/arm64/rockchip/rk_usbphy.c | 2 +- sys/conf/files | 18 +++++++++--------- sys/dev/ahci/ahci_fsl_fdt.c | 2 +- sys/dev/cadence/if_cgem.c | 2 +- sys/dev/clk/allwinner/aw_ccu.c | 2 +- sys/dev/clk/allwinner/aw_ccung.c | 4 ++-- sys/dev/clk/allwinner/aw_ccung.h | 6 +++--- sys/dev/clk/allwinner/aw_clk_frac.c | 2 +- sys/dev/clk/allwinner/aw_clk_frac.h | 2 +- sys/dev/clk/allwinner/aw_clk_m.c | 2 +- sys/dev/clk/allwinner/aw_clk_m.h | 2 +- sys/dev/clk/allwinner/aw_clk_mipi.c | 2 +- sys/dev/clk/allwinner/aw_clk_mipi.h | 2 +- sys/dev/clk/allwinner/aw_clk_nkmp.c | 2 +- sys/dev/clk/allwinner/aw_clk_nm.c | 2 +- sys/dev/clk/allwinner/aw_clk_nm.h | 2 +- sys/dev/clk/allwinner/aw_clk_nmm.c | 2 +- sys/dev/clk/allwinner/aw_clk_nmm.h | 2 +- sys/dev/clk/allwinner/aw_clk_np.c | 2 +- sys/dev/clk/allwinner/aw_clk_np.h | 2 +- sys/dev/clk/allwinner/aw_clk_prediv_mux.c | 2 +- sys/dev/clk/allwinner/ccu_a10.c | 6 +++--- sys/dev/clk/allwinner/ccu_a13.c | 6 +++--- sys/dev/clk/allwinner/ccu_a31.c | 6 +++--- sys/dev/clk/allwinner/ccu_a64.c | 6 +++--- sys/dev/clk/allwinner/ccu_a83t.c | 6 +++--- sys/dev/clk/allwinner/ccu_de2.c | 6 +++--- sys/dev/clk/allwinner/ccu_h3.c | 6 +++--- sys/dev/clk/allwinner/ccu_h6.c | 6 +++--- sys/dev/clk/allwinner/ccu_h6_r.c | 6 +++--- sys/dev/clk/allwinner/ccu_sun8i_r.c | 6 +++--- sys/dev/{extres => }/clk/clk.c | 2 +- sys/dev/{extres => }/clk/clk.h | 7 ++++--- sys/dev/{extres => }/clk/clk_bus.c | 0 sys/dev/{extres => }/clk/clk_div.c | 2 +- sys/dev/{extres => }/clk/clk_div.h | 8 ++++---- sys/dev/{extres => }/clk/clk_fixed.c | 2 +- sys/dev/{extres => }/clk/clk_fixed.h | 8 ++++---- sys/dev/{extres => }/clk/clk_gate.c | 2 +- sys/dev/{extres => }/clk/clk_gate.h | 8 ++++---- sys/dev/{extres => }/clk/clk_link.c | 2 +- sys/dev/{extres => }/clk/clk_link.h | 8 ++++---- sys/dev/{extres => }/clk/clk_mux.c | 2 +- sys/dev/{extres => }/clk/clk_mux.h | 9 +++++---- sys/dev/{extres => }/clk/clkdev_if.m | 0 sys/dev/{extres => }/clk/clknode_if.m | 0 sys/dev/clk/rockchip/rk3288_cru.c | 8 ++++---- sys/dev/clk/rockchip/rk3328_cru.c | 6 +++--- sys/dev/clk/rockchip/rk3399_cru.c | 6 +++--- sys/dev/clk/rockchip/rk3399_pmucru.c | 6 +++--- sys/dev/clk/rockchip/rk3568_cru.c | 6 +++--- sys/dev/clk/rockchip/rk3568_pmucru.c | 6 +++--- sys/dev/clk/rockchip/rk_clk_armclk.c | 2 +- sys/dev/clk/rockchip/rk_clk_armclk.h | 2 +- sys/dev/clk/rockchip/rk_clk_composite.c | 2 +- sys/dev/clk/rockchip/rk_clk_composite.h | 2 +- sys/dev/clk/rockchip/rk_clk_fract.c | 2 +- sys/dev/clk/rockchip/rk_clk_fract.h | 2 +- sys/dev/clk/rockchip/rk_clk_gate.c | 2 +- sys/dev/clk/rockchip/rk_clk_gate.h | 2 +- sys/dev/clk/rockchip/rk_clk_mux.c | 2 +- sys/dev/clk/rockchip/rk_clk_mux.h | 2 +- sys/dev/clk/rockchip/rk_clk_pll.c | 2 +- sys/dev/clk/rockchip/rk_clk_pll.h | 2 +- sys/dev/clk/rockchip/rk_cru.c | 8 ++++---- sys/dev/clk/rockchip/rk_cru.h | 10 +++++----- sys/dev/clk/xilinx/zynqmp_clk_div.c | 2 +- sys/dev/clk/xilinx/zynqmp_clk_fixed.c | 2 +- sys/dev/clk/xilinx/zynqmp_clk_gate.c | 2 +- sys/dev/clk/xilinx/zynqmp_clk_mux.c | 2 +- sys/dev/clk/xilinx/zynqmp_clk_pll.c | 2 +- sys/dev/clk/xilinx/zynqmp_clock.c | 4 ++-- sys/dev/cpufreq/cpufreq_dt.c | 2 +- sys/dev/dwc/dwc1000_core.c | 2 +- sys/dev/dwc/dwc1000_dma.c | 2 +- sys/dev/dwc/if_dwc.c | 2 +- sys/dev/dwc/if_dwc_aw.c | 2 +- sys/dev/dwc/if_dwc_rk.c | 2 +- sys/dev/dwc/if_dwc_socfpga.c | 2 +- sys/dev/dwwdt/dwwdt.c | 2 +- sys/dev/eqos/if_eqos.c | 2 +- sys/dev/eqos/if_eqos_fdt.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_atu.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_mdio.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_mib.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_mirror.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_port.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_psgmii.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_hw_vtu.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_main.c | 2 +- sys/dev/etherswitch/ar40xx/ar40xx_phy.c | 2 +- sys/dev/firmware/arm/scmi.c | 2 +- sys/dev/firmware/arm/scmi_clk.c | 2 +- sys/dev/flash/flexspi/flex_spi.c | 2 +- sys/dev/hdmi/dwc_hdmi_fdt.c | 2 +- sys/dev/iicbus/controller/cadence/cdnc_i2c.c | 2 +- sys/dev/iicbus/controller/opencores/iicoc_fdt.c | 2 +- sys/dev/iicbus/controller/rockchip/rk_i2c.c | 2 +- sys/dev/iicbus/controller/twsi/a10_twsi.c | 2 +- sys/dev/iicbus/controller/twsi/mv_twsi.c | 2 +- sys/dev/iicbus/controller/twsi/twsi.h | 2 +- sys/dev/iicbus/pmic/rockchip/rk8xx_clocks.c | 2 +- sys/dev/mmc/host/dwmmc.c | 2 +- sys/dev/mmc/host/dwmmc_rockchip.c | 2 +- sys/dev/mmc/host/dwmmc_var.h | 2 +- sys/dev/mmc/mmc_pwrseq.c | 2 +- sys/dev/neta/if_mvneta.c | 2 +- sys/dev/ofw/ofw_cpu.c | 2 +- sys/dev/pci/pci_dw_mv.c | 2 +- sys/dev/pwm/controller/allwinner/aw_pwm.c | 2 +- sys/dev/pwm/controller/rockchip/rk_pwm.c | 2 +- sys/dev/qcom_clk/qcom_clk_apssdiv.c | 8 ++++---- sys/dev/qcom_clk/qcom_clk_branch2.c | 8 ++++---- sys/dev/qcom_clk/qcom_clk_fdiv.c | 8 ++++---- sys/dev/qcom_clk/qcom_clk_fepll.c | 8 ++++---- sys/dev/qcom_clk/qcom_clk_rcg2.c | 8 ++++---- sys/dev/qcom_clk/qcom_clk_ro_div.c | 8 ++++---- sys/dev/qcom_dwc3/qcom_dwc3.c | 2 +- sys/dev/qcom_gcc/qcom_gcc_ipq4018_clock.c | 8 ++++---- sys/dev/qcom_qup/qcom_spi.c | 2 +- sys/dev/qcom_qup/qcom_spi_hw.c | 2 +- sys/dev/sdhci/sdhci_fdt.c | 4 ++-- sys/dev/sdhci/sdhci_fsl_fdt.c | 2 +- sys/dev/spibus/controller/allwinner/aw_spi.c | 2 +- sys/dev/spibus/controller/rockchip/rk_spi.c | 2 +- sys/dev/uart/uart_dev_imx.c | 2 +- sys/dev/uart/uart_dev_snps.c | 2 +- sys/dev/usb/controller/dwc3/aw_dwc3.c | 2 +- sys/dev/usb/controller/dwc3/dwc3.c | 2 +- sys/dev/usb/controller/dwc3/rk_dwc3.c | 2 +- sys/dev/usb/controller/generic_ehci_fdt.c | 2 +- sys/dev/usb/controller/generic_ohci.c | 2 +- sys/dev/usb/controller/musb_otg_allwinner.c | 2 +- sys/dev/usb/controller/usb_nop_xceiv.c | 2 +- sys/dev/usb/controller/xlnx_dwc3.c | 2 +- sys/riscv/sifive/fu740_pci_dw.c | 2 +- sys/riscv/sifive/sifive_prci.c | 6 +++--- sys/riscv/sifive/sifive_spi.c | 2 +- sys/riscv/sifive/sifive_uart.c | 2 +- 263 files changed, 400 insertions(+), 398 deletions(-) diff --git a/sys/arm/allwinner/a10_ahci.c b/sys/arm/allwinner/a10_ahci.c index 74765e1a30dd..a0717a0e9dfa 100644 --- a/sys/arm/allwinner/a10_ahci.c +++ b/sys/arm/allwinner/a10_ahci.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include /* diff --git a/sys/arm/allwinner/a10_codec.c b/sys/arm/allwinner/a10_codec.c index 711d2203f9a5..fc4937351f3b 100644 --- a/sys/arm/allwinner/a10_codec.c +++ b/sys/arm/allwinner/a10_codec.c @@ -47,7 +47,7 @@ #include -#include +#include #include #include "sunxi_dma_if.h" diff --git a/sys/arm/allwinner/a10_dmac.c b/sys/arm/allwinner/a10_dmac.c index d5d27748a9d9..e711c5268b2d 100644 --- a/sys/arm/allwinner/a10_dmac.c +++ b/sys/arm/allwinner/a10_dmac.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include "sunxi_dma_if.h" diff --git a/sys/arm/allwinner/a10_timer.c b/sys/arm/allwinner/a10_timer.c index 890cb2332396..18fb2a56da3a 100644 --- a/sys/arm/allwinner/a10_timer.c +++ b/sys/arm/allwinner/a10_timer.c @@ -42,7 +42,7 @@ #include #include -#include +#include #if defined(__aarch64__) #include "opt_soc.h" diff --git a/sys/arm/allwinner/a31_dmac.c b/sys/arm/allwinner/a31_dmac.c index 0a291becbb9d..988444c4b1c5 100644 --- a/sys/arm/allwinner/a31_dmac.c +++ b/sys/arm/allwinner/a31_dmac.c @@ -46,7 +46,7 @@ #include #include -#include +#include #include #include "sunxi_dma_if.h" diff --git a/sys/arm/allwinner/a33_codec.c b/sys/arm/allwinner/a33_codec.c index a0d455676430..d71562b08c9b 100644 --- a/sys/arm/allwinner/a33_codec.c +++ b/sys/arm/allwinner/a33_codec.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/a64/sun50i_a64_acodec.c b/sys/arm/allwinner/a64/sun50i_a64_acodec.c index b5ab13efac41..f99d5385d897 100644 --- a/sys/arm/allwinner/a64/sun50i_a64_acodec.c +++ b/sys/arm/allwinner/a64/sun50i_a64_acodec.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/aw_cir.c b/sys/arm/allwinner/aw_cir.c index bc326e6d6afa..7e9fdfca80bf 100644 --- a/sys/arm/allwinner/aw_cir.c +++ b/sys/arm/allwinner/aw_cir.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/aw_gmacclk.c b/sys/arm/allwinner/aw_gmacclk.c index 46672c8fcb0f..99e69674bd25 100644 --- a/sys/arm/allwinner/aw_gmacclk.c +++ b/sys/arm/allwinner/aw_gmacclk.c @@ -39,8 +39,8 @@ #include #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/allwinner/aw_gpio.c b/sys/arm/allwinner/aw_gpio.c index 5dd9a211acf4..b77972ac0187 100644 --- a/sys/arm/allwinner/aw_gpio.c +++ b/sys/arm/allwinner/aw_gpio.c @@ -52,7 +52,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/aw_i2s.c b/sys/arm/allwinner/aw_i2s.c index 8c159de7da6d..376405056f51 100644 --- a/sys/arm/allwinner/aw_i2s.c +++ b/sys/arm/allwinner/aw_i2s.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include "syscon_if.h" diff --git a/sys/arm/allwinner/aw_mmc.c b/sys/arm/allwinner/aw_mmc.c index 466ada8942c6..7c783f69880c 100644 --- a/sys/arm/allwinner/aw_mmc.c +++ b/sys/arm/allwinner/aw_mmc.c @@ -52,7 +52,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/aw_rsb.c b/sys/arm/allwinner/aw_rsb.c index 40627ebf8448..08522caff725 100644 --- a/sys/arm/allwinner/aw_rsb.c +++ b/sys/arm/allwinner/aw_rsb.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include "iicbus_if.h" diff --git a/sys/arm/allwinner/aw_rtc.c b/sys/arm/allwinner/aw_rtc.c index 92bb73efc1f5..9938601f17ce 100644 --- a/sys/arm/allwinner/aw_rtc.c +++ b/sys/arm/allwinner/aw_rtc.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include diff --git a/sys/arm/allwinner/aw_thermal.c b/sys/arm/allwinner/aw_thermal.c index 99e302571220..4f1e02612347 100644 --- a/sys/arm/allwinner/aw_thermal.c +++ b/sys/arm/allwinner/aw_thermal.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/allwinner/aw_usb3phy.c b/sys/arm/allwinner/aw_usb3phy.c index e2bf9c068538..058fce6061a7 100644 --- a/sys/arm/allwinner/aw_usb3phy.c +++ b/sys/arm/allwinner/aw_usb3phy.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/allwinner/aw_usbphy.c b/sys/arm/allwinner/aw_usbphy.c index 4125a13b36c2..33c11e62ef7c 100644 --- a/sys/arm/allwinner/aw_usbphy.c +++ b/sys/arm/allwinner/aw_usbphy.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/allwinner/if_awg.c b/sys/arm/allwinner/if_awg.c index acc99083ad93..516cbefc6272 100644 --- a/sys/arm/allwinner/if_awg.c +++ b/sys/arm/allwinner/if_awg.c @@ -59,7 +59,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/allwinner/if_emac.c b/sys/arm/allwinner/if_emac.c index c704e7830cbc..f581d361d3d9 100644 --- a/sys/arm/allwinner/if_emac.c +++ b/sys/arm/allwinner/if_emac.c @@ -75,7 +75,7 @@ #include #include -#include +#include #include "miibus_if.h" diff --git a/sys/arm/freescale/imx/imx_gpio.c b/sys/arm/freescale/imx/imx_gpio.c index d3d01d3cb857..c5e92992a36b 100644 --- a/sys/arm/freescale/imx/imx_gpio.c +++ b/sys/arm/freescale/imx/imx_gpio.c @@ -59,7 +59,7 @@ #endif #ifdef IMX_ENABLE_CLOCKS -#include +#include #endif #include "gpio_if.h" diff --git a/sys/arm/freescale/imx/imx_i2c.c b/sys/arm/freescale/imx/imx_i2c.c index 7014ea4ea7e3..f8769d29e7f7 100644 --- a/sys/arm/freescale/imx/imx_i2c.c +++ b/sys/arm/freescale/imx/imx_i2c.c @@ -75,7 +75,7 @@ #endif #ifdef IMX_ENABLE_CLOCKS -#include +#include #endif #define I2C_ADDR_REG 0x00 /* I2C slave address register */ diff --git a/sys/arm/freescale/vybrid/vf_i2c.c b/sys/arm/freescale/vybrid/vf_i2c.c index 38717c186814..cc0b32bb4759 100644 --- a/sys/arm/freescale/vybrid/vf_i2c.c +++ b/sys/arm/freescale/vybrid/vf_i2c.c @@ -54,7 +54,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/mv/clk/a37x0_nb_periph_clk_driver.c b/sys/arm/mv/clk/a37x0_nb_periph_clk_driver.c index 423a42b80e06..b102f05d25c1 100644 --- a/sys/arm/mv/clk/a37x0_nb_periph_clk_driver.c +++ b/sys/arm/mv/clk/a37x0_nb_periph_clk_driver.c @@ -35,8 +35,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/sys/arm/mv/clk/a37x0_periph_clk_driver.c b/sys/arm/mv/clk/a37x0_periph_clk_driver.c index e8d90a0c9904..4456537ea785 100644 --- a/sys/arm/mv/clk/a37x0_periph_clk_driver.c +++ b/sys/arm/mv/clk/a37x0_periph_clk_driver.c @@ -35,8 +35,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/sys/arm/mv/clk/a37x0_sb_periph_clk_driver.c b/sys/arm/mv/clk/a37x0_sb_periph_clk_driver.c index 0429c8ae12f8..910525411c7f 100644 --- a/sys/arm/mv/clk/a37x0_sb_periph_clk_driver.c +++ b/sys/arm/mv/clk/a37x0_sb_periph_clk_driver.c @@ -35,8 +35,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/sys/arm/mv/clk/a37x0_tbg.c b/sys/arm/mv/clk/a37x0_tbg.c index d8f0f5203455..32ec1c83b102 100644 --- a/sys/arm/mv/clk/a37x0_tbg.c +++ b/sys/arm/mv/clk/a37x0_tbg.c @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include "clkdev_if.h" diff --git a/sys/arm/mv/clk/a37x0_tbg_pll.c b/sys/arm/mv/clk/a37x0_tbg_pll.c index 83115dc5741d..da8ff83cc898 100644 --- a/sys/arm/mv/clk/a37x0_tbg_pll.c +++ b/sys/arm/mv/clk/a37x0_tbg_pll.c @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/mv/clk/a37x0_tbg_pll.h b/sys/arm/mv/clk/a37x0_tbg_pll.h index 2bb4fa6ab478..6c79c44c64db 100644 --- a/sys/arm/mv/clk/a37x0_tbg_pll.h +++ b/sys/arm/mv/clk/a37x0_tbg_pll.h @@ -29,7 +29,7 @@ #ifndef _TBG_CLK_PLL_H_ #define _TBG_CLK_PLL_H_ -#include +#include struct a37x0_tbg_pll_reg_def { uint32_t offset; diff --git a/sys/arm/mv/clk/a37x0_xtal.c b/sys/arm/mv/clk/a37x0_xtal.c index e4ce8a90a24e..67a791b8d34a 100644 --- a/sys/arm/mv/clk/a37x0_xtal.c +++ b/sys/arm/mv/clk/a37x0_xtal.c @@ -35,8 +35,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/sys/arm/mv/clk/armada38x_coreclk.c b/sys/arm/mv/clk/armada38x_coreclk.c index 21e630d18b06..f0f7767397b5 100644 --- a/sys/arm/mv/clk/armada38x_coreclk.c +++ b/sys/arm/mv/clk/armada38x_coreclk.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/arm/mv/clk/armada38x_gateclk.c b/sys/arm/mv/clk/armada38x_gateclk.c index c50a65b3396e..24355d9c9dac 100644 --- a/sys/arm/mv/clk/armada38x_gateclk.c +++ b/sys/arm/mv/clk/armada38x_gateclk.c @@ -38,8 +38,8 @@ #include #include #include -#include -#include +#include +#include #include "clkdev_if.h" diff --git a/sys/arm/mv/clk/armada38x_gen.c b/sys/arm/mv/clk/armada38x_gen.c index 13951a33da55..b225c927f0d2 100644 --- a/sys/arm/mv/clk/armada38x_gen.c +++ b/sys/arm/mv/clk/armada38x_gen.c @@ -30,7 +30,7 @@ #include -#include +#include #include diff --git a/sys/arm/mv/clk/armada38x_gen.h b/sys/arm/mv/clk/armada38x_gen.h index ad46e38728fa..7275bd528529 100644 --- a/sys/arm/mv/clk/armada38x_gen.h +++ b/sys/arm/mv/clk/armada38x_gen.h @@ -27,7 +27,7 @@ #ifndef _ARMADA38X_GEN_H_ #define _ARMADA38X_GEN_H_ -#include +#include struct armada38x_gen_clknode_def { diff --git a/sys/arm/mv/clk/periph.c b/sys/arm/mv/clk/periph.c index 98445fa8bc6a..986016f77b8f 100644 --- a/sys/arm/mv/clk/periph.c +++ b/sys/arm/mv/clk/periph.c @@ -35,11 +35,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/sys/arm/mv/clk/periph.h b/sys/arm/mv/clk/periph.h index 3eada61665a2..f23f641b8f1d 100644 --- a/sys/arm/mv/clk/periph.h +++ b/sys/arm/mv/clk/periph.h @@ -29,10 +29,10 @@ #ifndef _PERIPH_H_ #define _PERIPH_H_ -#include -#include -#include -#include +#include +#include +#include +#include #define TBG_SEL 0x0 #define DIV_SEL0 0x4 diff --git a/sys/arm/mv/clk/periph_clk_d.c b/sys/arm/mv/clk/periph_clk_d.c index 0e8659d56e18..f3dc3a30a8b6 100644 --- a/sys/arm/mv/clk/periph_clk_d.c +++ b/sys/arm/mv/clk/periph_clk_d.c @@ -35,11 +35,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/sys/arm/mv/clk/periph_clk_fixed.c b/sys/arm/mv/clk/periph_clk_fixed.c index d3c1f0deafa8..e0e6f446716c 100644 --- a/sys/arm/mv/clk/periph_clk_fixed.c +++ b/sys/arm/mv/clk/periph_clk_fixed.c @@ -35,11 +35,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/sys/arm/mv/clk/periph_clk_gate.c b/sys/arm/mv/clk/periph_clk_gate.c index 803b5f8ed7e1..538077eb444f 100644 --- a/sys/arm/mv/clk/periph_clk_gate.c +++ b/sys/arm/mv/clk/periph_clk_gate.c @@ -35,11 +35,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/sys/arm/mv/clk/periph_clk_mux_gate.c b/sys/arm/mv/clk/periph_clk_mux_gate.c index 6016a7b1c1a4..f96d034228b4 100644 --- a/sys/arm/mv/clk/periph_clk_mux_gate.c +++ b/sys/arm/mv/clk/periph_clk_mux_gate.c @@ -35,11 +35,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/sys/arm/mv/mv_ap806_clock.c b/sys/arm/mv/mv_ap806_clock.c index b926a58aca0c..f41f5e09c4dd 100644 --- a/sys/arm/mv/mv_ap806_clock.c +++ b/sys/arm/mv/mv_ap806_clock.c @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/mv/mv_cp110_clock.c b/sys/arm/mv/mv_cp110_clock.c index 604195da1ab4..45f8476df5b3 100644 --- a/sys/arm/mv/mv_cp110_clock.c +++ b/sys/arm/mv/mv_cp110_clock.c @@ -39,8 +39,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_bo.c b/sys/arm/nvidia/drm2/tegra_bo.c index 1ffd65de9d36..c27b9f39c508 100644 --- a/sys/arm/nvidia/drm2/tegra_bo.c +++ b/sys/arm/nvidia/drm2/tegra_bo.c @@ -32,7 +32,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_dc.c b/sys/arm/nvidia/drm2/tegra_dc.c index 81177180056c..637ea3981acc 100644 --- a/sys/arm/nvidia/drm2/tegra_dc.c +++ b/sys/arm/nvidia/drm2/tegra_dc.c @@ -36,7 +36,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_drm_subr.c b/sys/arm/nvidia/drm2/tegra_drm_subr.c index 920419cc777e..060445966d68 100644 --- a/sys/arm/nvidia/drm2/tegra_drm_subr.c +++ b/sys/arm/nvidia/drm2/tegra_drm_subr.c @@ -32,7 +32,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_fb.c b/sys/arm/nvidia/drm2/tegra_fb.c index 23994060700b..d6a74a32fffb 100644 --- a/sys/arm/nvidia/drm2/tegra_fb.c +++ b/sys/arm/nvidia/drm2/tegra_fb.c @@ -32,7 +32,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_hdmi.c b/sys/arm/nvidia/drm2/tegra_hdmi.c index c45ca1721ff0..1c5e86bde498 100644 --- a/sys/arm/nvidia/drm2/tegra_hdmi.c +++ b/sys/arm/nvidia/drm2/tegra_hdmi.c @@ -36,7 +36,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_host1x.c b/sys/arm/nvidia/drm2/tegra_host1x.c index 080fbef659a1..284c5c2e8465 100644 --- a/sys/arm/nvidia/drm2/tegra_host1x.c +++ b/sys/arm/nvidia/drm2/tegra_host1x.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra124/tegra124_car.c b/sys/arm/nvidia/tegra124/tegra124_car.c index ebb30b29aaa9..440f5a5b1044 100644 --- a/sys/arm/nvidia/tegra124/tegra124_car.c +++ b/sys/arm/nvidia/tegra124/tegra124_car.c @@ -38,10 +38,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra124/tegra124_clk_per.c b/sys/arm/nvidia/tegra124/tegra124_clk_per.c index 95af7a75b21b..90edc6d3a8ec 100644 --- a/sys/arm/nvidia/tegra124/tegra124_clk_per.c +++ b/sys/arm/nvidia/tegra124/tegra124_clk_per.c @@ -33,7 +33,7 @@ #include -#include +#include *** 3041 LINES SKIPPED *** From nobody Wed Jan 10 18:21:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMW4TGlz55YDv; Wed, 10 Jan 2024 18:21: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 4T9GMW2nvKz4GTN; Wed, 10 Jan 2024 18:21:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7LcN7DzbGxmfmDM3yJFyhvCBe3b3ByyMB3shS230AA=; b=LHLUzJwp6+QeSLKYelyUpsfRhxBxuFxWREIXYEqydjRlIQn8rFG/DbxFCiXVkNrxBgIXUJ fsyj5TmLMHBpGuKaAAjI5eGV9J0E8zYwldJkIQRBTP4/cwDyzfzJJlO3s6xmRApNx71bJw SAtlluzpb6i7Zjwc6DTZDwLt7oaKlsDhjgsW1AncchI+trY7tp+88gJav+4oibQiEQzG3D cDqKimA+58ZsnMxIHBP7Lkslp1wUPSHfjPyF/ydDcCZPENFxO2zmFBDr6GRJ2DWPXT7KFt hvTNBWuMF0ywtcpYGFOCdj6B1Vy+hkJQfwdM1ilnDBTRxcgORiD2nOJUn8lC2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7LcN7DzbGxmfmDM3yJFyhvCBe3b3ByyMB3shS230AA=; b=b/6aQZEt+3AONz249LKyBNBYfLkwWhET/XnYmFfjX3CNbbtsvj91Ghh/M9DcINM3/efsKp CFQfleXklP27X6oGpbZa2T6+DLytsUz7I2z4Bw6dedPZrh0YDu2hHjU00q6+s2KeLG2bZB +YllzgN8XevxhYnehu8wF5JZaKMRq+iAOy9IpBO3kYd2UK/OVMli3NRYxRTcUtLf38qnVm AErKXE8xH00xUqIOgk1jgRznHSxi/jw95hssFFdUSn/HUJvqGlm+q7vLxlXT0j/7b36VFh nNhiTepLpb46b7EWWp/DCXNnQAlW8hkjpZ7ICCvELXI3uOFHAtWUf797BFHh6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910871; a=rsa-sha256; cv=none; b=l65CHTIbB56cyozeozoVWJ4+YJuvGZTUOUFax3qIvmlNM00g69QO9gYpicdNEhKXPz/INz 2t86VOquY2CNjUKeW6t6QHu7io0B42V7b9OetS129gun2F1RlNyoz+7vNiKQiNmHScIdf5 uZZlwVJxxkYVK7T4u60u+rNNvebsQrrIeFaUoXCWqGA+1cBoeilfuAZ1hu2021ENw17Ra8 yUV83V2Ae+0Efc9zi8r8SUH97fXMJSrJedzWxWwipVEa8Fo3+x9EiTYLL02lVP+xA1zW6l L3+dic4sHnWDtlGamRrD7HJInYswGj+IaYrKYPmlXjmfnOWFF+5vdiSKbqD0rw== 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 4T9GMW1vLWzmXj; Wed, 10 Jan 2024 18:21: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 40AILBlI053178; Wed, 10 Jan 2024 18:21:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AILBoS053175; Wed, 10 Jan 2024 18:21:11 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:11 GMT Message-Id: <202401101821.40AILBoS053175@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: b2f0caf16099 - main - regulator: Move regulator code in dev/regulator List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: b2f0caf160993c30a0d0e3d52e8a2d03616908cd Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=b2f0caf160993c30a0d0e3d52e8a2d03616908cd commit b2f0caf160993c30a0d0e3d52e8a2d03616908cd Author: Emmanuel Vadot AuthorDate: 2023-12-26 17:54:53 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:32 +0000 regulator: Move regulator code in dev/regulator We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: emaste, imp Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43194 --- sys/arm/allwinner/a10_ahci.c | 2 +- sys/arm/allwinner/a64/sun50i_a64_acodec.c | 2 +- sys/arm/allwinner/aw_gpio.c | 2 +- sys/arm/allwinner/aw_mmc.c | 2 +- sys/arm/allwinner/aw_usb3phy.c | 2 +- sys/arm/allwinner/aw_usbphy.c | 2 +- sys/arm/allwinner/axp209.c | 2 +- sys/arm/allwinner/axp81x.c | 2 +- sys/arm/allwinner/if_awg.c | 2 +- sys/arm/nvidia/as3722.c | 2 +- sys/arm/nvidia/as3722_regulators.c | 2 +- sys/arm/nvidia/drm2/tegra_hdmi.c | 2 +- sys/arm/nvidia/tegra124/tegra124_cpufreq.c | 2 +- sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c | 2 +- sys/arm/nvidia/tegra_ahci.c | 2 +- sys/arm/nvidia/tegra_pcie.c | 2 +- sys/arm/nvidia/tegra_usbphy.c | 2 +- sys/arm/nvidia/tegra_xhci.c | 2 +- sys/arm/qualcomm/ipq4018_usb_hs_phy.c | 2 +- sys/arm/qualcomm/ipq4018_usb_ss_phy.c | 2 +- sys/arm64/nvidia/tegra210/max77620.c | 2 +- sys/arm64/nvidia/tegra210/max77620_regulators.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_cpufreq.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c | 2 +- sys/arm64/rockchip/rk3568_combphy.c | 2 +- sys/arm64/rockchip/rk3568_pcie.c | 2 +- sys/arm64/rockchip/rk3568_pciephy.c | 2 +- sys/arm64/rockchip/rk_iodomain.c | 2 +- sys/arm64/rockchip/rk_pcie.c | 2 +- sys/arm64/rockchip/rk_usb2phy.c | 2 +- sys/arm64/rockchip/rk_usbphy.c | 2 +- sys/conf/files | 10 +++++----- sys/dev/cpufreq/cpufreq_dt.c | 2 +- sys/dev/dwc/if_dwc_aw.c | 2 +- sys/dev/dwc/if_dwc_rk.c | 2 +- sys/dev/eqos/if_eqos_fdt.c | 2 +- sys/dev/gpio/gpioregulator.c | 2 +- sys/dev/iicbus/pmic/act8846.c | 2 +- sys/dev/iicbus/pmic/act8846_regulator.c | 2 +- sys/dev/iicbus/pmic/fan53555.c | 2 +- sys/dev/iicbus/pmic/rockchip/rk8xx_regulators.c | 2 +- sys/dev/iicbus/pmic/silergy/sy8106a.c | 2 +- sys/dev/iicbus/pmic/silergy/syr827.c | 2 +- sys/dev/mmc/host/dwmmc_var.h | 2 +- sys/dev/mmc/mmc_fdt_helpers.c | 2 +- sys/dev/mmc/mmc_fdt_helpers.h | 2 +- sys/dev/mmc/mmc_helpers.h | 2 +- sys/dev/pwm/pwm_backlight.c | 2 +- sys/dev/{extres => }/regulator/regdev_if.m | 0 sys/dev/{extres => }/regulator/regnode_if.m | 0 sys/dev/{extres => }/regulator/regulator.c | 2 +- sys/dev/{extres => }/regulator/regulator.h | 7 ++++--- sys/dev/{extres => }/regulator/regulator_bus.c | 0 sys/dev/{extres => }/regulator/regulator_fixed.c | 2 +- sys/dev/{extres => }/regulator/regulator_fixed.h | 8 ++++---- sys/dev/sdhci/sdhci_xenon.c | 2 +- sys/dev/sdhci/sdhci_xenon_acpi.c | 2 +- sys/dev/sound/fdt/simple_amplifier.c | 2 +- sys/dev/usb/controller/usb_nop_xceiv.c | 2 +- 59 files changed, 66 insertions(+), 65 deletions(-) diff --git a/sys/arm/allwinner/a10_ahci.c b/sys/arm/allwinner/a10_ahci.c index a0717a0e9dfa..b7aa991b6543 100644 --- a/sys/arm/allwinner/a10_ahci.c +++ b/sys/arm/allwinner/a10_ahci.c @@ -44,7 +44,7 @@ #include #include -#include +#include /* * Allwinner a1x/a2x/a8x SATA attachment. This is just the AHCI register diff --git a/sys/arm/allwinner/a64/sun50i_a64_acodec.c b/sys/arm/allwinner/a64/sun50i_a64_acodec.c index f9ada20ec554..12c9a86cf361 100644 --- a/sys/arm/allwinner/a64/sun50i_a64_acodec.c +++ b/sys/arm/allwinner/a64/sun50i_a64_acodec.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include "syscon_if.h" diff --git a/sys/arm/allwinner/aw_gpio.c b/sys/arm/allwinner/aw_gpio.c index f72dbf88099f..cee2cf056f42 100644 --- a/sys/arm/allwinner/aw_gpio.c +++ b/sys/arm/allwinner/aw_gpio.c @@ -54,7 +54,7 @@ #include #include #include -#include +#include #if defined(__aarch64__) #include "opt_soc.h" diff --git a/sys/arm/allwinner/aw_mmc.c b/sys/arm/allwinner/aw_mmc.c index d229fba1e07d..929cbd8f3ed8 100644 --- a/sys/arm/allwinner/aw_mmc.c +++ b/sys/arm/allwinner/aw_mmc.c @@ -54,7 +54,7 @@ #include #include #include -#include +#include #include "opt_mmccam.h" diff --git a/sys/arm/allwinner/aw_usb3phy.c b/sys/arm/allwinner/aw_usb3phy.c index b49a9a86b6e9..fdf54ef79250 100644 --- a/sys/arm/allwinner/aw_usb3phy.c +++ b/sys/arm/allwinner/aw_usb3phy.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include "phynode_if.h" diff --git a/sys/arm/allwinner/aw_usbphy.c b/sys/arm/allwinner/aw_usbphy.c index 09725783fd22..855be90d7fb8 100644 --- a/sys/arm/allwinner/aw_usbphy.c +++ b/sys/arm/allwinner/aw_usbphy.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include "phynode_if.h" diff --git a/sys/arm/allwinner/axp209.c b/sys/arm/allwinner/axp209.c index b4e00988031e..239ead02d0e0 100644 --- a/sys/arm/allwinner/axp209.c +++ b/sys/arm/allwinner/axp209.c @@ -51,7 +51,7 @@ #include #include -#include +#include #include diff --git a/sys/arm/allwinner/axp81x.c b/sys/arm/allwinner/axp81x.c index ac9f9ee9e8ba..fc1a168595e5 100644 --- a/sys/arm/allwinner/axp81x.c +++ b/sys/arm/allwinner/axp81x.c @@ -47,7 +47,7 @@ #include #include -#include +#include #include "gpio_if.h" #include "iicbus_if.h" diff --git a/sys/arm/allwinner/if_awg.c b/sys/arm/allwinner/if_awg.c index 6c38a65b5040..9834be083870 100644 --- a/sys/arm/allwinner/if_awg.c +++ b/sys/arm/allwinner/if_awg.c @@ -61,7 +61,7 @@ #include #include -#include +#include #include #include "syscon_if.h" diff --git a/sys/arm/nvidia/as3722.c b/sys/arm/nvidia/as3722.c index 537cd4f6e24a..ca5f7372aed1 100644 --- a/sys/arm/nvidia/as3722.c +++ b/sys/arm/nvidia/as3722.c @@ -41,7 +41,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/as3722_regulators.c b/sys/arm/nvidia/as3722_regulators.c index 912c0d964961..331dfb72f4b5 100644 --- a/sys/arm/nvidia/as3722_regulators.c +++ b/sys/arm/nvidia/as3722_regulators.c @@ -36,7 +36,7 @@ #include -#include +#include #include #include diff --git a/sys/arm/nvidia/drm2/tegra_hdmi.c b/sys/arm/nvidia/drm2/tegra_hdmi.c index 174a9718bbfa..e5ce30ac2eb3 100644 --- a/sys/arm/nvidia/drm2/tegra_hdmi.c +++ b/sys/arm/nvidia/drm2/tegra_hdmi.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra124/tegra124_cpufreq.c b/sys/arm/nvidia/tegra124/tegra124_cpufreq.c index 7cf83978557e..a537d9397722 100644 --- a/sys/arm/nvidia/tegra124/tegra124_cpufreq.c +++ b/sys/arm/nvidia/tegra124/tegra124_cpufreq.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c index 0b611abc39cb..43c7e345d12c 100644 --- a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c +++ b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_ahci.c b/sys/arm/nvidia/tegra_ahci.c index de60f02e97ea..bf60971e2b7c 100644 --- a/sys/arm/nvidia/tegra_ahci.c +++ b/sys/arm/nvidia/tegra_ahci.c @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_pcie.c b/sys/arm/nvidia/tegra_pcie.c index a22ae02ce4bc..c9b5f46c4e30 100644 --- a/sys/arm/nvidia/tegra_pcie.c +++ b/sys/arm/nvidia/tegra_pcie.c @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_usbphy.c b/sys/arm/nvidia/tegra_usbphy.c index 2499a568fe4c..eeaca9fcc07c 100644 --- a/sys/arm/nvidia/tegra_usbphy.c +++ b/sys/arm/nvidia/tegra_usbphy.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_xhci.c b/sys/arm/nvidia/tegra_xhci.c index 21ce4dc0540d..5bd7e6b7736e 100644 --- a/sys/arm/nvidia/tegra_xhci.c +++ b/sys/arm/nvidia/tegra_xhci.c @@ -55,7 +55,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm/qualcomm/ipq4018_usb_hs_phy.c b/sys/arm/qualcomm/ipq4018_usb_hs_phy.c index 618911fef640..953887ad9906 100644 --- a/sys/arm/qualcomm/ipq4018_usb_hs_phy.c +++ b/sys/arm/qualcomm/ipq4018_usb_hs_phy.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/qualcomm/ipq4018_usb_ss_phy.c b/sys/arm/qualcomm/ipq4018_usb_ss_phy.c index 66ef4c9fe732..b60be5896595 100644 --- a/sys/arm/qualcomm/ipq4018_usb_ss_phy.c +++ b/sys/arm/qualcomm/ipq4018_usb_ss_phy.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/nvidia/tegra210/max77620.c b/sys/arm64/nvidia/tegra210/max77620.c index a27edf01889d..b33d73e71f90 100644 --- a/sys/arm64/nvidia/tegra210/max77620.c +++ b/sys/arm64/nvidia/tegra210/max77620.c @@ -40,7 +40,7 @@ #include -#include +#include #include #include #include diff --git a/sys/arm64/nvidia/tegra210/max77620_regulators.c b/sys/arm64/nvidia/tegra210/max77620_regulators.c index 3bfed6815711..af1a5af20ec3 100644 --- a/sys/arm64/nvidia/tegra210/max77620_regulators.c +++ b/sys/arm64/nvidia/tegra210/max77620_regulators.c @@ -37,7 +37,7 @@ #include -#include +#include #include #include diff --git a/sys/arm64/nvidia/tegra210/tegra210_cpufreq.c b/sys/arm64/nvidia/tegra210/tegra210_cpufreq.c index 99b54b224e89..9b248a09bd58 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_cpufreq.c +++ b/sys/arm64/nvidia/tegra210/tegra210_cpufreq.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c b/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c index 75662386427f..944f4e645533 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c +++ b/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk3568_combphy.c b/sys/arm64/rockchip/rk3568_combphy.c index 5152f3eed0d1..99144b3315b1 100644 --- a/sys/arm64/rockchip/rk3568_combphy.c +++ b/sys/arm64/rockchip/rk3568_combphy.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk3568_pcie.c b/sys/arm64/rockchip/rk3568_pcie.c index 5343a5dd3f2c..9874efdb1ec9 100644 --- a/sys/arm64/rockchip/rk3568_pcie.c +++ b/sys/arm64/rockchip/rk3568_pcie.c @@ -51,7 +51,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk3568_pciephy.c b/sys/arm64/rockchip/rk3568_pciephy.c index f277253b577d..50471ea55130 100644 --- a/sys/arm64/rockchip/rk3568_pciephy.c +++ b/sys/arm64/rockchip/rk3568_pciephy.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk_iodomain.c b/sys/arm64/rockchip/rk_iodomain.c index 695d941e4f9c..e872ee5a45ed 100644 --- a/sys/arm64/rockchip/rk_iodomain.c +++ b/sys/arm64/rockchip/rk_iodomain.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_pcie.c b/sys/arm64/rockchip/rk_pcie.c index cc6c842a6f6a..ca85637589ee 100644 --- a/sys/arm64/rockchip/rk_pcie.c +++ b/sys/arm64/rockchip/rk_pcie.c @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk_usb2phy.c b/sys/arm64/rockchip/rk_usb2phy.c index 367d4fef61cc..d06dce90c27b 100644 --- a/sys/arm64/rockchip/rk_usb2phy.c +++ b/sys/arm64/rockchip/rk_usb2phy.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include "clkdev_if.h" diff --git a/sys/arm64/rockchip/rk_usbphy.c b/sys/arm64/rockchip/rk_usbphy.c index 46859d1442e3..c2020373d040 100644 --- a/sys/arm64/rockchip/rk_usbphy.c +++ b/sys/arm64/rockchip/rk_usbphy.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/conf/files b/sys/conf/files index e07ac548d93a..f0d4250a4537 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1682,11 +1682,6 @@ dev/extres/phy/phydev_if.m optional phy fdt dev/extres/phy/phynode_if.m optional phy dev/extres/phy/phy_usb.c optional phy dev/extres/phy/phynode_usb_if.m optional phy -dev/extres/regulator/regdev_if.m optional regulator fdt -dev/extres/regulator/regnode_if.m optional regulator -dev/extres/regulator/regulator.c optional regulator -dev/extres/regulator/regulator_bus.c optional regulator fdt -dev/extres/regulator/regulator_fixed.c optional regulator dev/extres/syscon/syscon.c optional syscon dev/extres/syscon/syscon_generic.c optional syscon fdt dev/extres/syscon/syscon_if.m optional syscon @@ -2800,6 +2795,11 @@ dev/random/fortuna.c optional !random_loadable !random_fenestrasx dev/random/hash.c optional !random_loadable dev/rccgpio/rccgpio.c optional rccgpio gpio dev/re/if_re.c optional re +dev/regulator/regdev_if.m optional regulator fdt +dev/regulator/regnode_if.m optional regulator +dev/regulator/regulator.c optional regulator +dev/regulator/regulator_bus.c optional regulator fdt +dev/regulator/regulator_fixed.c optional regulator dev/rl/if_rl.c optional rl pci dev/rndtest/rndtest.c optional rndtest # diff --git a/sys/dev/cpufreq/cpufreq_dt.c b/sys/dev/cpufreq/cpufreq_dt.c index 4dae7142b380..929eebfe7dc5 100644 --- a/sys/dev/cpufreq/cpufreq_dt.c +++ b/sys/dev/cpufreq/cpufreq_dt.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include "cpufreq_if.h" diff --git a/sys/dev/dwc/if_dwc_aw.c b/sys/dev/dwc/if_dwc_aw.c index 2a0dfaa33715..460b24b0401a 100644 --- a/sys/dev/dwc/if_dwc_aw.c +++ b/sys/dev/dwc/if_dwc_aw.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/dwc/if_dwc_rk.c b/sys/dev/dwc/if_dwc_rk.c index c78fb447d6d3..fca9f879247b 100644 --- a/sys/dev/dwc/if_dwc_rk.c +++ b/sys/dev/dwc/if_dwc_rk.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/eqos/if_eqos_fdt.c b/sys/dev/eqos/if_eqos_fdt.c index 5601c8b778e2..114f83f3bf37 100644 --- a/sys/dev/eqos/if_eqos_fdt.c +++ b/sys/dev/eqos/if_eqos_fdt.c @@ -52,7 +52,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/gpio/gpioregulator.c b/sys/dev/gpio/gpioregulator.c index 1f18bd6fd709..1fddb7dedc10 100644 --- a/sys/dev/gpio/gpioregulator.c +++ b/sys/dev/gpio/gpioregulator.c @@ -40,7 +40,7 @@ #include -#include +#include #include "regdev_if.h" diff --git a/sys/dev/iicbus/pmic/act8846.c b/sys/dev/iicbus/pmic/act8846.c index af3ee0ede5e5..5e166247f79b 100644 --- a/sys/dev/iicbus/pmic/act8846.c +++ b/sys/dev/iicbus/pmic/act8846.c @@ -41,7 +41,7 @@ #include -#include +#include #include #include #include diff --git a/sys/dev/iicbus/pmic/act8846_regulator.c b/sys/dev/iicbus/pmic/act8846_regulator.c index 551b537bb64f..9a711db2fbef 100644 --- a/sys/dev/iicbus/pmic/act8846_regulator.c +++ b/sys/dev/iicbus/pmic/act8846_regulator.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/iicbus/pmic/fan53555.c b/sys/dev/iicbus/pmic/fan53555.c index 12940bad5c67..7693770428e2 100644 --- a/sys/dev/iicbus/pmic/fan53555.c +++ b/sys/dev/iicbus/pmic/fan53555.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include "regdev_if.h" diff --git a/sys/dev/iicbus/pmic/rockchip/rk8xx_regulators.c b/sys/dev/iicbus/pmic/rockchip/rk8xx_regulators.c index 7e637176531d..f640c6668376 100644 --- a/sys/dev/iicbus/pmic/rockchip/rk8xx_regulators.c +++ b/sys/dev/iicbus/pmic/rockchip/rk8xx_regulators.c @@ -33,7 +33,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/iicbus/pmic/silergy/sy8106a.c b/sys/dev/iicbus/pmic/silergy/sy8106a.c index 76a39415349d..7c00c67f38d9 100644 --- a/sys/dev/iicbus/pmic/silergy/sy8106a.c +++ b/sys/dev/iicbus/pmic/silergy/sy8106a.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include "iicbus_if.h" #include "regdev_if.h" diff --git a/sys/dev/iicbus/pmic/silergy/syr827.c b/sys/dev/iicbus/pmic/silergy/syr827.c index afc2bacfcd02..d48a3c92e665 100644 --- a/sys/dev/iicbus/pmic/silergy/syr827.c +++ b/sys/dev/iicbus/pmic/silergy/syr827.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include "iicbus_if.h" #include "regdev_if.h" diff --git a/sys/dev/mmc/host/dwmmc_var.h b/sys/dev/mmc/host/dwmmc_var.h index ebfc738eb8af..c524fd88f00a 100644 --- a/sys/dev/mmc/host/dwmmc_var.h +++ b/sys/dev/mmc/host/dwmmc_var.h @@ -33,7 +33,7 @@ #include #include -#include +#include #include "opt_mmccam.h" diff --git a/sys/dev/mmc/mmc_fdt_helpers.c b/sys/dev/mmc/mmc_fdt_helpers.c index 8742b90d4f9c..0fb76dbfe522 100644 --- a/sys/dev/mmc/mmc_fdt_helpers.c +++ b/sys/dev/mmc/mmc_fdt_helpers.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/mmc/mmc_fdt_helpers.h b/sys/dev/mmc/mmc_fdt_helpers.h index 8b14138d882d..f22ce65b10ea 100644 --- a/sys/dev/mmc/mmc_fdt_helpers.h +++ b/sys/dev/mmc/mmc_fdt_helpers.h @@ -31,7 +31,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/mmc/mmc_helpers.h b/sys/dev/mmc/mmc_helpers.h index 2788d1eb0ecc..db2ed0a3959a 100644 --- a/sys/dev/mmc/mmc_helpers.h +++ b/sys/dev/mmc/mmc_helpers.h @@ -30,7 +30,7 @@ #include -#include +#include struct mmc_helper { device_t dev; diff --git a/sys/dev/pwm/pwm_backlight.c b/sys/dev/pwm/pwm_backlight.c index 0a5cf4c34d6f..ce3c0a6e1bd9 100644 --- a/sys/dev/pwm/pwm_backlight.c +++ b/sys/dev/pwm/pwm_backlight.c @@ -47,7 +47,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/extres/regulator/regdev_if.m b/sys/dev/regulator/regdev_if.m similarity index 100% rename from sys/dev/extres/regulator/regdev_if.m rename to sys/dev/regulator/regdev_if.m diff --git a/sys/dev/extres/regulator/regnode_if.m b/sys/dev/regulator/regnode_if.m similarity index 100% rename from sys/dev/extres/regulator/regnode_if.m rename to sys/dev/regulator/regnode_if.m diff --git a/sys/dev/extres/regulator/regulator.c b/sys/dev/regulator/regulator.c similarity index 99% rename from sys/dev/extres/regulator/regulator.c rename to sys/dev/regulator/regulator.c index 68e76f09a05e..6b49c6e93aae 100644 --- a/sys/dev/extres/regulator/regulator.c +++ b/sys/dev/regulator/regulator.c @@ -45,7 +45,7 @@ #include #include #endif -#include +#include #ifdef FDT #include "regdev_if.h" diff --git a/sys/dev/extres/regulator/regulator.h b/sys/dev/regulator/regulator.h similarity index 98% rename from sys/dev/extres/regulator/regulator.h rename to sys/dev/regulator/regulator.h index 4ef07f9acf12..e11dec515019 100644 --- a/sys/dev/extres/regulator/regulator.h +++ b/sys/dev/regulator/regulator.h @@ -24,8 +24,9 @@ * SUCH DAMAGE. */ -#ifndef _DEV_EXTRES_REGULATOR_H_ -#define _DEV_EXTRES_REGULATOR_H_ +#ifndef _DEV_REGULATOR_H_ +#define _DEV_REGULATOR_H_ + #include "opt_platform.h" #include @@ -151,4 +152,4 @@ int regulator_range_volt_to_sel8(struct regulator_range *ranges, int nranges, int regulator_range_sel8_to_volt(struct regulator_range *ranges, int nranges, uint8_t sel, int *volt); -#endif /* _DEV_EXTRES_REGULATOR_H_ */ +#endif /* _DEV_REGULATOR_H_ */ diff --git a/sys/dev/extres/regulator/regulator_bus.c b/sys/dev/regulator/regulator_bus.c similarity index 100% rename from sys/dev/extres/regulator/regulator_bus.c rename to sys/dev/regulator/regulator_bus.c diff --git a/sys/dev/extres/regulator/regulator_fixed.c b/sys/dev/regulator/regulator_fixed.c similarity index 99% rename from sys/dev/extres/regulator/regulator_fixed.c rename to sys/dev/regulator/regulator_fixed.c index d39e83c93037..d9ebbe017e11 100644 --- a/sys/dev/extres/regulator/regulator_fixed.c +++ b/sys/dev/regulator/regulator_fixed.c @@ -42,7 +42,7 @@ #include #endif #include -#include +#include #ifdef FDT #include "regdev_if.h" diff --git a/sys/dev/extres/regulator/regulator_fixed.h b/sys/dev/regulator/regulator_fixed.h similarity index 90% rename from sys/dev/extres/regulator/regulator_fixed.h rename to sys/dev/regulator/regulator_fixed.h index 2d1abe01b9af..33213252d653 100644 --- a/sys/dev/extres/regulator/regulator_fixed.h +++ b/sys/dev/regulator/regulator_fixed.h @@ -24,11 +24,11 @@ * SUCH DAMAGE. */ -#ifndef _DEV_EXTRES_REGULATOR_FIXED_H_ -#define _DEV_EXTRES_REGULATOR_FIXED_H_ +#ifndef _DEV_REGULATOR_FIXED_H_ +#define _DEV_REGULATOR_FIXED_H_ #include -#include +#include struct regnode_fixed_init_def { struct regnode_init_def reg_init_def; @@ -39,4 +39,4 @@ struct regnode_fixed_init_def { int regnode_fixed_register(device_t dev, struct regnode_fixed_init_def *init_def); -#endif /*_DEV_EXTRES_REGULATOR_FIXED_H_*/ +#endif /*_DEV_REGULATOR_FIXED_H_*/ diff --git a/sys/dev/sdhci/sdhci_xenon.c b/sys/dev/sdhci/sdhci_xenon.c index d8f66e655e50..4a823b896ca8 100644 --- a/sys/dev/sdhci/sdhci_xenon.c +++ b/sys/dev/sdhci/sdhci_xenon.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/sdhci/sdhci_xenon_acpi.c b/sys/dev/sdhci/sdhci_xenon_acpi.c index c792e3cf2e48..01b6c14dc5f2 100644 --- a/sys/dev/sdhci/sdhci_xenon_acpi.c +++ b/sys/dev/sdhci/sdhci_xenon_acpi.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/sound/fdt/simple_amplifier.c b/sys/dev/sound/fdt/simple_amplifier.c index 45505be4d3e3..c6379dd08450 100644 --- a/sys/dev/sound/fdt/simple_amplifier.c +++ b/sys/dev/sound/fdt/simple_amplifier.c @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include "opt_snd.h" diff --git a/sys/dev/usb/controller/usb_nop_xceiv.c b/sys/dev/usb/controller/usb_nop_xceiv.c index 25fc13cb0020..e9503a35531a 100644 --- a/sys/dev/usb/controller/usb_nop_xceiv.c +++ b/sys/dev/usb/controller/usb_nop_xceiv.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include "phynode_if.h" From nobody Wed Jan 10 18:21:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMX6jhzz55YDw; Wed, 10 Jan 2024 18:21: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 4T9GMX3f0pz4GlD; Wed, 10 Jan 2024 18:21:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7xp6CMkvtEhHXBWn1+jrDcua0Eh+vIhFcuBu4L7LPZw=; b=k3o4IEh3IPII9MU+FQPY8ROTQieP1W4HE4lvkxlx6zuR+W3bD+BSOQnqcCUwVLyJefh9bc hoilDeGbnXKLHax42CqstYyQTrLsmnRr/OutDqcgv2O/4Asr3JRGKSULGfP70wZtkTJ2aT MzdZmjpolya7JUn09fbAqIs4DigkhjkoOx+6VNnxVJZJ9fQOZMPJQmvNrPf0hlDAJvxZIw dEmzwVPRB8/VeTrz4xrvaQJ5Ru4fT2vzlrlVp7Cifn7oyPhbvT1OJ1sbgx0pB5/kzoSvTl zSCujfcax04kQjw5GH01BSBsk6Wkooafy2d7lHTs/yWceIY5dqj6ycGLEi+WkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7xp6CMkvtEhHXBWn1+jrDcua0Eh+vIhFcuBu4L7LPZw=; b=mx9i0sr6ulQRxIHayC7DlH6YApU3U2uv7c3zxNQBmNlNnk4GutTPHujlMLCDSqCqquCihE 4iqIQ3HyJKeh3WQhbfQwNez+rsAmMOY9ipECnMqHpZfQC3SFbiYU7VWKqGhZmSb30OxGPI fOZlO67/Y0aTpkEDW5tjxTv1yZGPIg7jw9jnhUfrs4w4n7mZBmsmWwpF1kbKVpj308+D2r a48xDqBkLN/YYClF8NSELt8xWMt3q/xk4L7EKKcWGRZ8Espm9L6k9HFzvDHI9pxbaUKdRl /UG8zBEqJTR4QjX1cjFJjlBJ2C9SFrwfaZNExLOX0O8Pb6Xzg8AB9g7DZtYEOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910872; a=rsa-sha256; cv=none; b=EtyOitm5uZ7EvSJ6ZkNyagO0oCb2Mj5WhT38rpmKMtOtSTNh/r+WxJrcSQHFc+nhvDLw0m XChYSvvmQyEKQqtOpm1nezKlZe8xljh3HKhq6iXA+XrX4gICdLAM/Af4JeQtqIYmCex42j q9sTlQuGRz3vul7lr8+GzdAdfv+PbyWE50YEoT7RHVODG4dH0S2f1zM6qK/L/GvrcEzZXk PsVG4M6c3mWMuT9PEIsduZQt4h/WFUyLWgBA3kZDQUcF/QufVNfrSWjIwe9CgjxKNa6Npy r6pkM1GDFoiQd+W0Gov7BhTknB6LQtOV/agMStVlQaYRjpN1vcGTnzXzP4vJog== 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 4T9GMX2lMrzmXk; Wed, 10 Jan 2024 18:21: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 40AILCYR053227; Wed, 10 Jan 2024 18:21:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AILCnZ053224; Wed, 10 Jan 2024 18:21:12 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:12 GMT Message-Id: <202401101821.40AILCnZ053224@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: 950a6087ec18 - main - phy: Move phy code in dev/phy List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 950a6087ec18cd22464b3297573f54a6d9223c99 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=950a6087ec18cd22464b3297573f54a6d9223c99 commit 950a6087ec18cd22464b3297573f54a6d9223c99 Author: Emmanuel Vadot AuthorDate: 2023-12-26 17:56:52 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:34 +0000 phy: Move phy code in dev/phy We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: emaste, imp Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43195 --- sys/arm/allwinner/aw_usb3phy.c | 2 +- sys/arm/allwinner/aw_usbphy.c | 2 +- sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c | 2 +- sys/arm/nvidia/tegra_ahci.c | 2 +- sys/arm/nvidia/tegra_ehci.c | 2 +- sys/arm/nvidia/tegra_pcie.c | 2 +- sys/arm/nvidia/tegra_usbphy.c | 2 +- sys/arm/nvidia/tegra_xhci.c | 2 +- sys/arm/qualcomm/ipq4018_usb_hs_phy.c | 2 +- sys/arm/qualcomm/ipq4018_usb_ss_phy.c | 2 +- sys/arm/ti/am335x/am335x_usb_phy.c | 2 +- sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c | 2 +- sys/arm64/rockchip/rk3399_emmcphy.c | 2 +- sys/arm64/rockchip/rk3568_combphy.c | 2 +- sys/arm64/rockchip/rk3568_pcie.c | 2 +- sys/arm64/rockchip/rk3568_pciephy.c | 2 +- sys/arm64/rockchip/rk_pcie.c | 2 +- sys/arm64/rockchip/rk_pcie_phy.c | 4 ++-- sys/arm64/rockchip/rk_typec_phy.c | 2 +- sys/arm64/rockchip/rk_usb2phy.c | 2 +- sys/arm64/rockchip/rk_usbphy.c | 2 +- sys/conf/files | 10 +++++----- sys/dev/pci/pci_dw_mv.c | 2 +- sys/dev/{extres => }/phy/phy.c | 4 ++-- sys/dev/{extres => }/phy/phy.h | 7 ++++--- sys/dev/{extres => }/phy/phy_internal.h | 6 +++--- sys/dev/{extres => }/phy/phy_usb.c | 4 ++-- sys/dev/{extres => }/phy/phy_usb.h | 8 ++++---- sys/dev/{extres => }/phy/phydev_if.m | 0 sys/dev/{extres => }/phy/phynode_if.m | 2 +- sys/dev/{extres => }/phy/phynode_usb_if.m | 0 sys/dev/qcom_dwc3/qcom_dwc3.c | 2 +- sys/dev/sdhci/sdhci_fdt.c | 2 +- sys/dev/usb/controller/dwc3/aw_dwc3.c | 2 +- sys/dev/usb/controller/dwc3/dwc3.c | 2 +- sys/dev/usb/controller/dwc3/rk_dwc3.c | 2 +- sys/dev/usb/controller/generic_ehci_fdt.c | 4 ++-- sys/dev/usb/controller/generic_ohci.c | 4 ++-- sys/dev/usb/controller/generic_xhci_fdt.c | 2 +- sys/dev/usb/controller/musb_otg_allwinner.c | 4 ++-- sys/dev/usb/controller/usb_nop_xceiv.c | 2 +- sys/dev/usb/controller/xlnx_dwc3.c | 2 +- 42 files changed, 58 insertions(+), 57 deletions(-) diff --git a/sys/arm/allwinner/aw_usb3phy.c b/sys/arm/allwinner/aw_usb3phy.c index fdf54ef79250..66033ef22a18 100644 --- a/sys/arm/allwinner/aw_usb3phy.c +++ b/sys/arm/allwinner/aw_usb3phy.c @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include "phynode_if.h" diff --git a/sys/arm/allwinner/aw_usbphy.c b/sys/arm/allwinner/aw_usbphy.c index 855be90d7fb8..b0ef7d9da0a9 100644 --- a/sys/arm/allwinner/aw_usbphy.c +++ b/sys/arm/allwinner/aw_usbphy.c @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include "phynode_if.h" diff --git a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c index 43c7e345d12c..b03fb9e0c3bf 100644 --- a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c +++ b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_ahci.c b/sys/arm/nvidia/tegra_ahci.c index bf60971e2b7c..c5d4dbff977c 100644 --- a/sys/arm/nvidia/tegra_ahci.c +++ b/sys/arm/nvidia/tegra_ahci.c @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_ehci.c b/sys/arm/nvidia/tegra_ehci.c index 033b7b9794fb..e8126a88ba87 100644 --- a/sys/arm/nvidia/tegra_ehci.c +++ b/sys/arm/nvidia/tegra_ehci.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_pcie.c b/sys/arm/nvidia/tegra_pcie.c index c9b5f46c4e30..cb0c1c7ec4d4 100644 --- a/sys/arm/nvidia/tegra_pcie.c +++ b/sys/arm/nvidia/tegra_pcie.c @@ -49,7 +49,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_usbphy.c b/sys/arm/nvidia/tegra_usbphy.c index eeaca9fcc07c..cdf6f7f5833f 100644 --- a/sys/arm/nvidia/tegra_usbphy.c +++ b/sys/arm/nvidia/tegra_usbphy.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/nvidia/tegra_xhci.c b/sys/arm/nvidia/tegra_xhci.c index 5bd7e6b7736e..f7d541fabee4 100644 --- a/sys/arm/nvidia/tegra_xhci.c +++ b/sys/arm/nvidia/tegra_xhci.c @@ -54,7 +54,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/qualcomm/ipq4018_usb_hs_phy.c b/sys/arm/qualcomm/ipq4018_usb_hs_phy.c index 953887ad9906..97f65766466c 100644 --- a/sys/arm/qualcomm/ipq4018_usb_hs_phy.c +++ b/sys/arm/qualcomm/ipq4018_usb_hs_phy.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/qualcomm/ipq4018_usb_ss_phy.c b/sys/arm/qualcomm/ipq4018_usb_ss_phy.c index b60be5896595..e9b880319bbc 100644 --- a/sys/arm/qualcomm/ipq4018_usb_ss_phy.c +++ b/sys/arm/qualcomm/ipq4018_usb_ss_phy.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm/ti/am335x/am335x_usb_phy.c b/sys/arm/ti/am335x/am335x_usb_phy.c index 04675d1f18ba..05b1c085aea3 100644 --- a/sys/arm/ti/am335x/am335x_usb_phy.c +++ b/sys/arm/ti/am335x/am335x_usb_phy.c @@ -83,7 +83,7 @@ ti_usb_phy_attach(device_t dev) sc = device_get_softc(dev); sc->dev = dev; - /* FIXME: Add dev/extres/phy/ interface */ + /* FIXME: Add dev/phy/ interface */ return (bus_generic_attach(dev)); } diff --git a/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c b/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c index 944f4e645533..4b9b566a79b7 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c +++ b/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk3399_emmcphy.c b/sys/arm64/rockchip/rk3399_emmcphy.c index 70c96e4daf4e..8799dcb06b5d 100644 --- a/sys/arm64/rockchip/rk3399_emmcphy.c +++ b/sys/arm64/rockchip/rk3399_emmcphy.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk3568_combphy.c b/sys/arm64/rockchip/rk3568_combphy.c index 99144b3315b1..1f9c0003b531 100644 --- a/sys/arm64/rockchip/rk3568_combphy.c +++ b/sys/arm64/rockchip/rk3568_combphy.c @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include diff --git a/sys/arm64/rockchip/rk3568_pcie.c b/sys/arm64/rockchip/rk3568_pcie.c index 9874efdb1ec9..d55bfb1bcc73 100644 --- a/sys/arm64/rockchip/rk3568_pcie.c +++ b/sys/arm64/rockchip/rk3568_pcie.c @@ -50,7 +50,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk3568_pciephy.c b/sys/arm64/rockchip/rk3568_pciephy.c index 50471ea55130..83ee77decdb9 100644 --- a/sys/arm64/rockchip/rk3568_pciephy.c +++ b/sys/arm64/rockchip/rk3568_pciephy.c @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include diff --git a/sys/arm64/rockchip/rk_pcie.c b/sys/arm64/rockchip/rk_pcie.c index ca85637589ee..69ae4254a235 100644 --- a/sys/arm64/rockchip/rk_pcie.c +++ b/sys/arm64/rockchip/rk_pcie.c @@ -46,7 +46,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/arm64/rockchip/rk_pcie_phy.c b/sys/arm64/rockchip/rk_pcie_phy.c index 88ba4035ebb9..7e9077d33eb8 100644 --- a/sys/arm64/rockchip/rk_pcie_phy.c +++ b/sys/arm64/rockchip/rk_pcie_phy.c @@ -45,8 +45,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/sys/arm64/rockchip/rk_typec_phy.c b/sys/arm64/rockchip/rk_typec_phy.c index 7f49da5e2208..df29d514cf37 100644 --- a/sys/arm64/rockchip/rk_typec_phy.c +++ b/sys/arm64/rockchip/rk_typec_phy.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk_usb2phy.c b/sys/arm64/rockchip/rk_usb2phy.c index d06dce90c27b..ec8a4ba89e37 100644 --- a/sys/arm64/rockchip/rk_usb2phy.c +++ b/sys/arm64/rockchip/rk_usb2phy.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk_usbphy.c b/sys/arm64/rockchip/rk_usbphy.c index c2020373d040..f91c8167df62 100644 --- a/sys/arm64/rockchip/rk_usbphy.c +++ b/sys/arm64/rockchip/rk_usbphy.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/conf/files b/sys/conf/files index f0d4250a4537..f63f844e7942 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1677,11 +1677,6 @@ dev/evdev/evdev_mt.c optional evdev dev/evdev/evdev_utils.c optional evdev dev/evdev/uinput.c optional evdev uinput dev/exca/exca.c optional cbb -dev/extres/phy/phy.c optional phy -dev/extres/phy/phydev_if.m optional phy fdt -dev/extres/phy/phynode_if.m optional phy -dev/extres/phy/phy_usb.c optional phy -dev/extres/phy/phynode_usb_if.m optional phy dev/extres/syscon/syscon.c optional syscon dev/extres/syscon/syscon_generic.c optional syscon fdt dev/extres/syscon/syscon_if.m optional syscon @@ -2591,6 +2586,11 @@ dev/pci/pci_user.c optional pci dev/pci/pcib_if.m standard dev/pci/pcib_support.c standard dev/pci/vga_pci.c optional pci +dev/phy/phy.c optional phy +dev/phy/phydev_if.m optional phy fdt +dev/phy/phynode_if.m optional phy +dev/phy/phy_usb.c optional phy +dev/phy/phynode_usb_if.m optional phy dev/pms/freebsd/driver/ini/src/agtiapi.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sadisc.c optional pmspcv \ diff --git a/sys/dev/pci/pci_dw_mv.c b/sys/dev/pci/pci_dw_mv.c index 4f0671cb23d9..97d957932d42 100644 --- a/sys/dev/pci/pci_dw_mv.c +++ b/sys/dev/pci/pci_dw_mv.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/dev/extres/phy/phy.c b/sys/dev/phy/phy.c similarity index 99% rename from sys/dev/extres/phy/phy.c rename to sys/dev/phy/phy.c index 8861102b8508..07ffd85377c9 100644 --- a/sys/dev/extres/phy/phy.c +++ b/sys/dev/phy/phy.c @@ -40,8 +40,8 @@ #include #endif -#include -#include +#include +#include #ifdef FDT #include "phydev_if.h" diff --git a/sys/dev/extres/phy/phy.h b/sys/dev/phy/phy.h similarity index 98% rename from sys/dev/extres/phy/phy.h rename to sys/dev/phy/phy.h index a72904a10e2b..ae610ab74d10 100644 --- a/sys/dev/extres/phy/phy.h +++ b/sys/dev/phy/phy.h @@ -23,8 +23,9 @@ * */ -#ifndef DEV_EXTRES_PHY_H -#define DEV_EXTRES_PHY_H +#ifndef _DEV_PHY_H_ +#define _DEV_PHY_H_ + #include "opt_platform.h" #include @@ -148,4 +149,4 @@ int phy_get_by_ofw_property(device_t consumer, phandle_t node, char *name, phy_t *phy); #endif -#endif /* DEV_EXTRES_PHY_H */ +#endif /* _DEV_PHY_H_ */ diff --git a/sys/dev/extres/phy/phy_internal.h b/sys/dev/phy/phy_internal.h similarity index 96% rename from sys/dev/extres/phy/phy_internal.h rename to sys/dev/phy/phy_internal.h index 7f680a1c87fb..d5872d84b8c9 100644 --- a/sys/dev/extres/phy/phy_internal.h +++ b/sys/dev/phy/phy_internal.h @@ -23,8 +23,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DEV_EXTRES_PHY_INTERNAL_H -#define DEV_EXTRES_PHY_INTERNAL_H +#ifndef _DEV_PHY_INTERNAL_H_ +#define _DEV_PHY_INTERNAL_H_ /* Forward declarations. */ struct phy; @@ -78,4 +78,4 @@ struct phy { extern struct sx phynode_topo_lock; -#endif /* DEV_EXTRES_PHY_INTERNAL_H */ +#endif /* _DEV_PHY_INTERNAL_H_ */ diff --git a/sys/dev/extres/phy/phy_usb.c b/sys/dev/phy/phy_usb.c similarity index 97% rename from sys/dev/extres/phy/phy_usb.c rename to sys/dev/phy/phy_usb.c index 9e5556cf7f49..6a4fb17ca199 100644 --- a/sys/dev/extres/phy/phy_usb.c +++ b/sys/dev/phy/phy_usb.c @@ -32,8 +32,8 @@ #include -#include -#include +#include +#include /* * USB phy controller methods. diff --git a/sys/dev/extres/phy/phy_usb.h b/sys/dev/phy/phy_usb.h similarity index 95% rename from sys/dev/extres/phy/phy_usb.h rename to sys/dev/phy/phy_usb.h index ae175c6700c5..eaaff6ee700c 100644 --- a/sys/dev/extres/phy/phy_usb.h +++ b/sys/dev/phy/phy_usb.h @@ -24,10 +24,10 @@ * SUCH DAMAGE. */ -#ifndef _DEV_EXTRES_PHY_USB_H_ -#define _DEV_EXTRES_PHY_USB_H_ +#ifndef _DEV_PHY_USB_H_ +#define _DEV_PHY_USB_H_ -#include +#include #include "phynode_usb_if.h" #define PHY_USB_MODE_UNKNOWN 0 @@ -80,4 +80,4 @@ int phynode_usb_get_mode(struct phynode *phynode, int *usb_mode); int phy_usb_set_mode(phy_t phy, int usb_mode); int phy_usb_get_mode(phy_t phy, int *usb_mode); -#endif /*_DEV_EXTRES_PHY_USB_H_*/ +#endif /*_DEV_PHY_USB_H_*/ diff --git a/sys/dev/extres/phy/phydev_if.m b/sys/dev/phy/phydev_if.m similarity index 100% rename from sys/dev/extres/phy/phydev_if.m rename to sys/dev/phy/phydev_if.m diff --git a/sys/dev/extres/phy/phynode_if.m b/sys/dev/phy/phynode_if.m similarity index 98% rename from sys/dev/extres/phy/phynode_if.m rename to sys/dev/phy/phynode_if.m index 18b798227109..425deb6bcfbe 100644 --- a/sys/dev/extres/phy/phynode_if.m +++ b/sys/dev/phy/phynode_if.m @@ -26,7 +26,7 @@ INTERFACE phynode; HEADER { - #include + #include struct phynode; } diff --git a/sys/dev/extres/phy/phynode_usb_if.m b/sys/dev/phy/phynode_usb_if.m similarity index 100% rename from sys/dev/extres/phy/phynode_usb_if.m rename to sys/dev/phy/phynode_usb_if.m diff --git a/sys/dev/qcom_dwc3/qcom_dwc3.c b/sys/dev/qcom_dwc3/qcom_dwc3.c index 71c95096e5cf..cd58b9ef7705 100644 --- a/sys/dev/qcom_dwc3/qcom_dwc3.c +++ b/sys/dev/qcom_dwc3/qcom_dwc3.c @@ -47,7 +47,7 @@ #include #include -#include +#include #include static struct ofw_compat_data compat_data[] = { diff --git a/sys/dev/sdhci/sdhci_fdt.c b/sys/dev/sdhci/sdhci_fdt.c index bf9f81108467..3914c96b5165 100644 --- a/sys/dev/sdhci/sdhci_fdt.c +++ b/sys/dev/sdhci/sdhci_fdt.c @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include diff --git a/sys/dev/usb/controller/dwc3/aw_dwc3.c b/sys/dev/usb/controller/dwc3/aw_dwc3.c index 67331f2f1be9..802c46bdae28 100644 --- a/sys/dev/usb/controller/dwc3/aw_dwc3.c +++ b/sys/dev/usb/controller/dwc3/aw_dwc3.c @@ -47,7 +47,7 @@ #include #include -#include +#include static struct ofw_compat_data compat_data[] = { { "allwinner,sun50i-h6-dwc3", 1 }, diff --git a/sys/dev/usb/controller/dwc3/dwc3.c b/sys/dev/usb/controller/dwc3/dwc3.c index e0ad19fb835f..a44c2371b891 100644 --- a/sys/dev/usb/controller/dwc3/dwc3.c +++ b/sys/dev/usb/controller/dwc3/dwc3.c @@ -66,7 +66,7 @@ #include #include -#include +#include #endif #ifdef DEV_ACPI diff --git a/sys/dev/usb/controller/dwc3/rk_dwc3.c b/sys/dev/usb/controller/dwc3/rk_dwc3.c index b34ec4880895..b3345fb4a67b 100644 --- a/sys/dev/usb/controller/dwc3/rk_dwc3.c +++ b/sys/dev/usb/controller/dwc3/rk_dwc3.c @@ -47,7 +47,7 @@ #include #include -#include +#include #include enum rk_dwc3_type { diff --git a/sys/dev/usb/controller/generic_ehci_fdt.c b/sys/dev/usb/controller/generic_ehci_fdt.c index e88895d20664..af22d0bdef73 100644 --- a/sys/dev/usb/controller/generic_ehci_fdt.c +++ b/sys/dev/usb/controller/generic_ehci_fdt.c @@ -56,8 +56,8 @@ #include #include -#include -#include +#include +#include #include "generic_ehci.h" diff --git a/sys/dev/usb/controller/generic_ohci.c b/sys/dev/usb/controller/generic_ohci.c index b71c269cfdcd..f3a9e0481bb2 100644 --- a/sys/dev/usb/controller/generic_ohci.c +++ b/sys/dev/usb/controller/generic_ohci.c @@ -55,8 +55,8 @@ #include #include -#include -#include +#include +#include #include "generic_usb_if.h" diff --git a/sys/dev/usb/controller/generic_xhci_fdt.c b/sys/dev/usb/controller/generic_xhci_fdt.c index a5c3f190783f..66fc1ab65a23 100644 --- a/sys/dev/usb/controller/generic_xhci_fdt.c +++ b/sys/dev/usb/controller/generic_xhci_fdt.c @@ -51,7 +51,7 @@ #include #include -#include +#include #include "generic_xhci.h" diff --git a/sys/dev/usb/controller/musb_otg_allwinner.c b/sys/dev/usb/controller/musb_otg_allwinner.c index a8961bed6385..3bfe2b525138 100644 --- a/sys/dev/usb/controller/musb_otg_allwinner.c +++ b/sys/dev/usb/controller/musb_otg_allwinner.c @@ -60,8 +60,8 @@ #include #include -#include -#include +#include +#include #ifdef __arm__ #include diff --git a/sys/dev/usb/controller/usb_nop_xceiv.c b/sys/dev/usb/controller/usb_nop_xceiv.c index e9503a35531a..9821f4b5e92a 100644 --- a/sys/dev/usb/controller/usb_nop_xceiv.c +++ b/sys/dev/usb/controller/usb_nop_xceiv.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include "phynode_if.h" diff --git a/sys/dev/usb/controller/xlnx_dwc3.c b/sys/dev/usb/controller/xlnx_dwc3.c index facc44823523..9b9d10e81ad8 100644 --- a/sys/dev/usb/controller/xlnx_dwc3.c +++ b/sys/dev/usb/controller/xlnx_dwc3.c @@ -49,7 +49,7 @@ #include #include -#include +#include #include static struct ofw_compat_data compat_data[] = { From nobody Wed Jan 10 18:21:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GMY5gKvz55YQW; Wed, 10 Jan 2024 18:21: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 4T9GMY4Sqzz4GZB; Wed, 10 Jan 2024 18:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h7AZwRBaTVEjQ5B4OUcjdMlxV1iAI0b/otZ4gjT2x8M=; b=VWiyJ57MJfP9fUB+vg1cEOlsp863wc7+jIkbwExfIudEbmhyU95fawCiSVPCfooDQXvGsf gbGWasLtPlYekV7ooNAnOY6oVBXy6bu3bA9ZED2dIgLACuu1N5yt7D5Akk+ajDbF15B5qT nfQwf0MZwLfp7Ra3p3XeLK3lxSrKjkkmsuFFz9E5YKGc0DHGUrdGdlkcPvaJT9JC8STuxB WBBqqSnM22TalKHfip6XZkuZEC/Y8kF6w4Ki0iYUx3marEFE72t/8iLBJaxlcWhIEVDev6 57DIY1/lvuCTr61MjHijOSbrioEAslpC6nX7rgMg6rc6azg4rn8LYTct2KtT0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704910873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h7AZwRBaTVEjQ5B4OUcjdMlxV1iAI0b/otZ4gjT2x8M=; b=C7f+cjCUmKMknlaiVn4zuIUYu5cAWm41eJ2GoKo5817TlMe/6jJYKiKPa6aYaDjl6GA+Kt c8lA3lqPLrX2ElDJoF0Npk2SXnLYeGEzJkip34/5j9YolyDnQsOU3jsm44FxV5qDqsqSVU wT6Qnhx5OKzh2gOHkoC0lYSAit7oDmMyc1BwpzNHYYDH8nF8KlivoA3Tu0qGjyTK6aqDjr pAOQr4hYQFrEE99Rx1V0WotCKpDiOf/t+TMuSPhVa/TfaOLjstmGLHEkmbNx0fko1+lbzC LKftlTP5pPfoFklGfBYU6dGg3u17M+KPMaKQh6cIGzRTaTvKdQQojS7u1JrmVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704910873; a=rsa-sha256; cv=none; b=fnMzAsIeOTh7hi7mvzKsJNFvjxD4kCYyADZ+4WujyaWDoE+L72Qnlg1j82DMbSwB49rAj8 KYJ6TnxS9qjtyGcGI5Kd9d+PnIxuM0LH02ubLnOe3MiXq7YfaUIWWizW2vFVjRiuz3RZE9 pUAw4Jm2jf2g6EKxMBBq4PyfsilpH9yO1ChiyHbl5Ebe2fP/oIkeB01FVRfzW6rppOB/LF vKvwqS+0O54XPCSrZ7kwMIaF89Y3morneH9MhYdiAY2W2rPhztCFi4FmzDokLVvugdoR/8 PhbWN6oFO+vwOn4xvq+7l4ZSSoEN8G9mq9tQ/Gcm4SIivriNKTDkiFV7ubX+Dg== 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 4T9GMY3ZmYzm5Q; Wed, 10 Jan 2024 18:21: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 40AILDYn053276; Wed, 10 Jan 2024 18:21:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AILD4I053273; Wed, 10 Jan 2024 18:21:13 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:21:13 GMT Message-Id: <202401101821.40AILD4I053273@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: 62e8ccc3a489 - main - syscon: Move syscon code in dev/syscon List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 62e8ccc3a489434af379c7f47da71545bc1e14ee Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=62e8ccc3a489434af379c7f47da71545bc1e14ee commit 62e8ccc3a489434af379c7f47da71545bc1e14ee Author: Emmanuel Vadot AuthorDate: 2023-12-26 17:58:15 +0000 Commit: Emmanuel Vadot CommitDate: 2024-01-10 18:20:37 +0000 syscon: Move syscon code in dev/syscon We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: mhorne Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43196 --- sys/arm/allwinner/aw_syscon.c | 4 ++-- sys/arm/allwinner/if_awg.c | 2 +- sys/arm/mv/clk/a37x0_xtal.c | 2 +- sys/arm/mv/mv_ap806_clock.c | 2 +- sys/arm/mv/mv_cp110_clock.c | 2 +- sys/arm/mv/mv_cp110_icu_bus.c | 2 +- sys/arm/mv/mv_thermal.c | 2 +- sys/arm/mv/mvebu_gpio.c | 2 +- sys/arm/mv/mvebu_pinctrl.c | 2 +- sys/arm/ti/am335x/am335x_musb.c | 2 +- sys/arm/ti/am335x/am335x_pwmss.c | 2 +- sys/arm/ti/am335x/am335x_scm.c | 2 +- sys/arm/ti/cpsw/if_cpsw.c | 2 +- sys/arm/ti/ti_scm_syscon.c | 2 +- sys/arm64/rockchip/rk3328_codec.c | 2 +- sys/arm64/rockchip/rk3399_emmcphy.c | 2 +- sys/arm64/rockchip/rk3568_combphy.c | 2 +- sys/arm64/rockchip/rk3568_pciephy.c | 2 +- sys/arm64/rockchip/rk_grf.c | 2 +- sys/arm64/rockchip/rk_i2s.c | 2 +- sys/arm64/rockchip/rk_iodomain.c | 2 +- sys/arm64/rockchip/rk_otp.c | 2 +- sys/arm64/rockchip/rk_pcie_phy.c | 2 +- sys/arm64/rockchip/rk_pinctrl.c | 2 +- sys/arm64/rockchip/rk_pmu.c | 2 +- sys/arm64/rockchip/rk_tsadc.c | 2 +- sys/arm64/rockchip/rk_typec_phy.c | 2 +- sys/arm64/rockchip/rk_usb2phy.c | 2 +- sys/arm64/rockchip/rk_usbphy.c | 4 ++-- sys/conf/files | 8 ++++---- sys/dev/clk/rockchip/rk_clk_composite.c | 2 +- sys/dev/clk/rockchip/rk_clk_mux.c | 2 +- sys/dev/dwc/if_dwc_rk.c | 2 +- sys/dev/eqos/if_eqos_fdt.c | 2 +- sys/dev/fdt/simple_mfd.c | 2 +- sys/dev/qcom_dwc3/qcom_dwc3.c | 2 +- sys/dev/sdhci/sdhci_fdt.c | 2 +- sys/dev/sdhci/sdhci_fsl_fdt.c | 2 +- sys/dev/{extres => }/syscon/syscon.c | 0 sys/dev/{extres => }/syscon/syscon.h | 0 sys/dev/{extres => }/syscon/syscon_generic.c | 0 sys/dev/{extres => }/syscon/syscon_generic.h | 0 sys/dev/{extres => }/syscon/syscon_if.m | 0 sys/dev/{extres => }/syscon/syscon_power.c | 0 sys/dev/usb/controller/dwc3/rk_dwc3.c | 2 +- sys/dev/usb/controller/xlnx_dwc3.c | 2 +- sys/riscv/riscv/riscv_syscon.c | 4 ++-- 47 files changed, 47 insertions(+), 47 deletions(-) diff --git a/sys/arm/allwinner/aw_syscon.c b/sys/arm/allwinner/aw_syscon.c index 3f6e8260c2c9..6a880a9b617e 100644 --- a/sys/arm/allwinner/aw_syscon.c +++ b/sys/arm/allwinner/aw_syscon.c @@ -41,8 +41,8 @@ #include #include -#include -#include +#include +#include static struct ofw_compat_data compat_data[] = { {"allwinner,sun50i-a64-system-controller", 1}, diff --git a/sys/arm/allwinner/if_awg.c b/sys/arm/allwinner/if_awg.c index 9834be083870..29a75e5a4d9b 100644 --- a/sys/arm/allwinner/if_awg.c +++ b/sys/arm/allwinner/if_awg.c @@ -62,7 +62,7 @@ #include #include #include -#include +#include #include "syscon_if.h" #include "miibus_if.h" diff --git a/sys/arm/mv/clk/a37x0_xtal.c b/sys/arm/mv/clk/a37x0_xtal.c index 67a791b8d34a..195c26259e63 100644 --- a/sys/arm/mv/clk/a37x0_xtal.c +++ b/sys/arm/mv/clk/a37x0_xtal.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/mv/mv_ap806_clock.c b/sys/arm/mv/mv_ap806_clock.c index f41f5e09c4dd..6d15d5687088 100644 --- a/sys/arm/mv/mv_ap806_clock.c +++ b/sys/arm/mv/mv_ap806_clock.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/mv/mv_cp110_clock.c b/sys/arm/mv/mv_cp110_clock.c index 45f8476df5b3..9edc01e95074 100644 --- a/sys/arm/mv/mv_cp110_clock.c +++ b/sys/arm/mv/mv_cp110_clock.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm/mv/mv_cp110_icu_bus.c b/sys/arm/mv/mv_cp110_icu_bus.c index 43429292c9f1..75c0bee75414 100644 --- a/sys/arm/mv/mv_cp110_icu_bus.c +++ b/sys/arm/mv/mv_cp110_icu_bus.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include static struct ofw_compat_data compat_data[] = { diff --git a/sys/arm/mv/mv_thermal.c b/sys/arm/mv/mv_thermal.c index 8004fdd38289..9240666ec726 100644 --- a/sys/arm/mv/mv_thermal.c +++ b/sys/arm/mv/mv_thermal.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/arm/mv/mvebu_gpio.c b/sys/arm/mv/mvebu_gpio.c index 001369bb3a02..a2001589867c 100644 --- a/sys/arm/mv/mvebu_gpio.c +++ b/sys/arm/mv/mvebu_gpio.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include diff --git a/sys/arm/mv/mvebu_pinctrl.c b/sys/arm/mv/mvebu_pinctrl.c index 658a4b615cf7..7e9ecda1a67a 100644 --- a/sys/arm/mv/mvebu_pinctrl.c +++ b/sys/arm/mv/mvebu_pinctrl.c @@ -39,7 +39,7 @@ #include #include -#include +#include #include diff --git a/sys/arm/ti/am335x/am335x_musb.c b/sys/arm/ti/am335x/am335x_musb.c index b24f12990640..93cb7cef41b9 100644 --- a/sys/arm/ti/am335x/am335x_musb.c +++ b/sys/arm/ti/am335x/am335x_musb.c @@ -67,7 +67,7 @@ #include #include #include -#include +#include #include "syscon_if.h" #define USBCTRL_REV 0x00 diff --git a/sys/arm/ti/am335x/am335x_pwmss.c b/sys/arm/ti/am335x/am335x_pwmss.c index c4a045503b1e..8766c706b807 100644 --- a/sys/arm/ti/am335x/am335x_pwmss.c +++ b/sys/arm/ti/am335x/am335x_pwmss.c @@ -45,7 +45,7 @@ #include -#include +#include #include "syscon_if.h" #include "am335x_pwm.h" diff --git a/sys/arm/ti/am335x/am335x_scm.c b/sys/arm/ti/am335x/am335x_scm.c index 1a4fd0ed6325..214a9dfdf18b 100644 --- a/sys/arm/ti/am335x/am335x_scm.c +++ b/sys/arm/ti/am335x/am335x_scm.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include "syscon_if.h" #define TZ_ZEROC 2731 diff --git a/sys/arm/ti/cpsw/if_cpsw.c b/sys/arm/ti/cpsw/if_cpsw.c index 223d24019cb8..c2651c33e1b1 100644 --- a/sys/arm/ti/cpsw/if_cpsw.c +++ b/sys/arm/ti/cpsw/if_cpsw.c @@ -72,7 +72,7 @@ #include #include -#include +#include #include "syscon_if.h" #include diff --git a/sys/arm/ti/ti_scm_syscon.c b/sys/arm/ti/ti_scm_syscon.c index af77bc54f150..7286be7b8f2c 100644 --- a/sys/arm/ti/ti_scm_syscon.c +++ b/sys/arm/ti/ti_scm_syscon.c @@ -46,7 +46,7 @@ #include #include "syscon_if.h" -#include +#include #include "clkdev_if.h" #include diff --git a/sys/arm64/rockchip/rk3328_codec.c b/sys/arm64/rockchip/rk3328_codec.c index ff6f2a3da881..91d73ee4ca34 100644 --- a/sys/arm64/rockchip/rk3328_codec.c +++ b/sys/arm64/rockchip/rk3328_codec.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk3399_emmcphy.c b/sys/arm64/rockchip/rk3399_emmcphy.c index 8799dcb06b5d..97b2123e89fd 100644 --- a/sys/arm64/rockchip/rk3399_emmcphy.c +++ b/sys/arm64/rockchip/rk3399_emmcphy.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk3568_combphy.c b/sys/arm64/rockchip/rk3568_combphy.c index 1f9c0003b531..c5d35fa0b8e2 100644 --- a/sys/arm64/rockchip/rk3568_combphy.c +++ b/sys/arm64/rockchip/rk3568_combphy.c @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk3568_pciephy.c b/sys/arm64/rockchip/rk3568_pciephy.c index 83ee77decdb9..fc6156e596ed 100644 --- a/sys/arm64/rockchip/rk3568_pciephy.c +++ b/sys/arm64/rockchip/rk3568_pciephy.c @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk_grf.c b/sys/arm64/rockchip/rk_grf.c index e2ee9a89b832..7e4911c1b048 100644 --- a/sys/arm64/rockchip/rk_grf.c +++ b/sys/arm64/rockchip/rk_grf.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include static struct ofw_compat_data compat_data[] = { diff --git a/sys/arm64/rockchip/rk_i2s.c b/sys/arm64/rockchip/rk_i2s.c index 3f7cd71eda27..6d3db56919d7 100644 --- a/sys/arm64/rockchip/rk_i2s.c +++ b/sys/arm64/rockchip/rk_i2s.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_iodomain.c b/sys/arm64/rockchip/rk_iodomain.c index e872ee5a45ed..ed61b99481f2 100644 --- a/sys/arm64/rockchip/rk_iodomain.c +++ b/sys/arm64/rockchip/rk_iodomain.c @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_otp.c b/sys/arm64/rockchip/rk_otp.c index 1d8191ff1f90..7b8935106534 100644 --- a/sys/arm64/rockchip/rk_otp.c +++ b/sys/arm64/rockchip/rk_otp.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include "rk_otp.h" diff --git a/sys/arm64/rockchip/rk_pcie_phy.c b/sys/arm64/rockchip/rk_pcie_phy.c index 7e9077d33eb8..cfaf26e8fbb3 100644 --- a/sys/arm64/rockchip/rk_pcie_phy.c +++ b/sys/arm64/rockchip/rk_pcie_phy.c @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_pinctrl.c b/sys/arm64/rockchip/rk_pinctrl.c index 1c873292b852..4892b0bf236c 100644 --- a/sys/arm64/rockchip/rk_pinctrl.c +++ b/sys/arm64/rockchip/rk_pinctrl.c @@ -48,7 +48,7 @@ #include -#include +#include #include "gpio_if.h" #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_pmu.c b/sys/arm64/rockchip/rk_pmu.c index 92a1fbae9413..0e5b9380d66d 100644 --- a/sys/arm64/rockchip/rk_pmu.c +++ b/sys/arm64/rockchip/rk_pmu.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include static struct ofw_compat_data compat_data[] = { diff --git a/sys/arm64/rockchip/rk_tsadc.c b/sys/arm64/rockchip/rk_tsadc.c index ff5fd722d0f0..a8a64b69d7d3 100644 --- a/sys/arm64/rockchip/rk_tsadc.c +++ b/sys/arm64/rockchip/rk_tsadc.c @@ -46,7 +46,7 @@ #include #include -#include +#include #include #include diff --git a/sys/arm64/rockchip/rk_typec_phy.c b/sys/arm64/rockchip/rk_typec_phy.c index df29d514cf37..07b3ed9d93c8 100644 --- a/sys/arm64/rockchip/rk_typec_phy.c +++ b/sys/arm64/rockchip/rk_typec_phy.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_usb2phy.c b/sys/arm64/rockchip/rk_usb2phy.c index ec8a4ba89e37..3f6c0b19f10a 100644 --- a/sys/arm64/rockchip/rk_usb2phy.c +++ b/sys/arm64/rockchip/rk_usb2phy.c @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include "clkdev_if.h" #include "syscon_if.h" diff --git a/sys/arm64/rockchip/rk_usbphy.c b/sys/arm64/rockchip/rk_usbphy.c index f91c8167df62..f9acbdff6d79 100644 --- a/sys/arm64/rockchip/rk_usbphy.c +++ b/sys/arm64/rockchip/rk_usbphy.c @@ -40,11 +40,11 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include "phynode_if.h" #include "phynode_usb_if.h" diff --git a/sys/conf/files b/sys/conf/files index f63f844e7942..6a089de5bb98 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1677,10 +1677,6 @@ dev/evdev/evdev_mt.c optional evdev dev/evdev/evdev_utils.c optional evdev dev/evdev/uinput.c optional evdev uinput dev/exca/exca.c optional cbb -dev/extres/syscon/syscon.c optional syscon -dev/extres/syscon/syscon_generic.c optional syscon fdt -dev/extres/syscon/syscon_if.m optional syscon -dev/extres/syscon/syscon_power.c optional syscon syscon_power dev/fb/fbd.c optional fbd | vt dev/fb/fb_if.m standard dev/fb/splash.c optional sc splash @@ -3140,6 +3136,10 @@ dev/ste/if_ste.c optional ste pci dev/stge/if_stge.c optional stge dev/sym/sym_hipd.c optional sym \ dependency "$S/dev/sym/sym_{conf,defs}.h" +dev/syscon/syscon.c optional syscon +dev/syscon/syscon_generic.c optional syscon fdt +dev/syscon/syscon_if.m optional syscon +dev/syscon/syscon_power.c optional syscon syscon_power dev/syscons/blank/blank_saver.c optional blank_saver dev/syscons/daemon/daemon_saver.c optional daemon_saver dev/syscons/dragon/dragon_saver.c optional dragon_saver diff --git a/sys/dev/clk/rockchip/rk_clk_composite.c b/sys/dev/clk/rockchip/rk_clk_composite.c index 2b6c889913b8..14f3229df5dd 100644 --- a/sys/dev/clk/rockchip/rk_clk_composite.c +++ b/sys/dev/clk/rockchip/rk_clk_composite.c @@ -30,7 +30,7 @@ #include #include -#include +#include #include diff --git a/sys/dev/clk/rockchip/rk_clk_mux.c b/sys/dev/clk/rockchip/rk_clk_mux.c index fba57f794d16..97c1ad6f2f1c 100644 --- a/sys/dev/clk/rockchip/rk_clk_mux.c +++ b/sys/dev/clk/rockchip/rk_clk_mux.c @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include diff --git a/sys/dev/dwc/if_dwc_rk.c b/sys/dev/dwc/if_dwc_rk.c index fca9f879247b..83f2bad167fb 100644 --- a/sys/dev/dwc/if_dwc_rk.c +++ b/sys/dev/dwc/if_dwc_rk.c @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/eqos/if_eqos_fdt.c b/sys/dev/eqos/if_eqos_fdt.c index 114f83f3bf37..1d2aa53d158c 100644 --- a/sys/dev/eqos/if_eqos_fdt.c +++ b/sys/dev/eqos/if_eqos_fdt.c @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include diff --git a/sys/dev/fdt/simple_mfd.c b/sys/dev/fdt/simple_mfd.c index 2bed3e552760..3ca7578d234d 100644 --- a/sys/dev/fdt/simple_mfd.c +++ b/sys/dev/fdt/simple_mfd.c @@ -50,7 +50,7 @@ struct simplebus_devinfo *simple_mfd_setup_dinfo(device_t dev, phandle_t node, struct simplebus_devinfo *di); #include "syscon_if.h" -#include +#include MALLOC_DECLARE(M_SYSCON); diff --git a/sys/dev/qcom_dwc3/qcom_dwc3.c b/sys/dev/qcom_dwc3/qcom_dwc3.c index cd58b9ef7705..5fc93b871ad1 100644 --- a/sys/dev/qcom_dwc3/qcom_dwc3.c +++ b/sys/dev/qcom_dwc3/qcom_dwc3.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include static struct ofw_compat_data compat_data[] = { { "qcom,dwc3", 1}, diff --git a/sys/dev/sdhci/sdhci_fdt.c b/sys/dev/sdhci/sdhci_fdt.c index 3914c96b5165..e7dda316539c 100644 --- a/sys/dev/sdhci/sdhci_fdt.c +++ b/sys/dev/sdhci/sdhci_fdt.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/sys/dev/sdhci/sdhci_fsl_fdt.c b/sys/dev/sdhci/sdhci_fsl_fdt.c index 12ce8c13342c..c04bdefb1382 100644 --- a/sys/dev/sdhci/sdhci_fsl_fdt.c +++ b/sys/dev/sdhci/sdhci_fsl_fdt.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include #include diff --git a/sys/dev/extres/syscon/syscon.c b/sys/dev/syscon/syscon.c similarity index 100% rename from sys/dev/extres/syscon/syscon.c rename to sys/dev/syscon/syscon.c diff --git a/sys/dev/extres/syscon/syscon.h b/sys/dev/syscon/syscon.h similarity index 100% rename from sys/dev/extres/syscon/syscon.h rename to sys/dev/syscon/syscon.h diff --git a/sys/dev/extres/syscon/syscon_generic.c b/sys/dev/syscon/syscon_generic.c similarity index 100% rename from sys/dev/extres/syscon/syscon_generic.c rename to sys/dev/syscon/syscon_generic.c diff --git a/sys/dev/extres/syscon/syscon_generic.h b/sys/dev/syscon/syscon_generic.h similarity index 100% rename from sys/dev/extres/syscon/syscon_generic.h rename to sys/dev/syscon/syscon_generic.h diff --git a/sys/dev/extres/syscon/syscon_if.m b/sys/dev/syscon/syscon_if.m similarity index 100% rename from sys/dev/extres/syscon/syscon_if.m rename to sys/dev/syscon/syscon_if.m diff --git a/sys/dev/extres/syscon/syscon_power.c b/sys/dev/syscon/syscon_power.c similarity index 100% rename from sys/dev/extres/syscon/syscon_power.c rename to sys/dev/syscon/syscon_power.c diff --git a/sys/dev/usb/controller/dwc3/rk_dwc3.c b/sys/dev/usb/controller/dwc3/rk_dwc3.c index b3345fb4a67b..f53f446a29f3 100644 --- a/sys/dev/usb/controller/dwc3/rk_dwc3.c +++ b/sys/dev/usb/controller/dwc3/rk_dwc3.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include enum rk_dwc3_type { RK3399 = 1, diff --git a/sys/dev/usb/controller/xlnx_dwc3.c b/sys/dev/usb/controller/xlnx_dwc3.c index 9b9d10e81ad8..b0680db97d22 100644 --- a/sys/dev/usb/controller/xlnx_dwc3.c +++ b/sys/dev/usb/controller/xlnx_dwc3.c @@ -50,7 +50,7 @@ #include #include #include -#include +#include static struct ofw_compat_data compat_data[] = { { "xlnx,zynqmp-dwc3", 1 }, diff --git a/sys/riscv/riscv/riscv_syscon.c b/sys/riscv/riscv/riscv_syscon.c index 7442b982f2ab..3dac114edd4f 100644 --- a/sys/riscv/riscv/riscv_syscon.c +++ b/sys/riscv/riscv/riscv_syscon.c @@ -43,8 +43,8 @@ #include #include -#include -#include +#include +#include static struct ofw_compat_data compat_data[] = { {"sifive,test0", 1}, From nobody Wed Jan 10 18:44:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9GtZ1gDRz55ckw; Wed, 10 Jan 2024 18:44: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 4T9GtZ15KBz4NPk; Wed, 10 Jan 2024 18:44:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704912278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+FTdJaAIp8lcgQDof/17jumRgOh9ZglPDie4vMzO2kw=; b=gnnl5QyjtFtrpjiU1FE9dzJ9I2Z6ygjH4J6s9u+TOMfAhh2BcqszqDctJ1Io/HYnFJoQ5c FpyiHKWPYmlxOqMMEpz81RqbDAVUXxL9fu/GLFOA3vy0QTVUjmOEn8Z/i4UbQ4Qo4ArSse LUK9nALF5glrdrxFGUZLiLUxdiqitq0h2xLypgUkI3zfv9h3cTXi9hOPQISdhf8tOuAnTz hAwPAjggzshyvOlKw51uGo+byEKWx9gtmb1xFdB4GGGOx8lg++DDJEHCBnvexhO4P5rFoe MVTHNCYTBAfseWes4iGcuk687f16PEZrpvXDK5KRgpkOlxlKwntvZpiwcTYESw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704912278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+FTdJaAIp8lcgQDof/17jumRgOh9ZglPDie4vMzO2kw=; b=l1skBrvg7N7Rw0trMyQw6mfJHQLPACyAQZbgDijuDIBE2xQEo6s2XmxtrJOYCf69CWb0BS FxB1iTZEURF+FhR7XuK9cK8c3Krb2BNAjhpnrADzbdpQeAUJQyB63dkQTPM8GNroCSuGg5 qDGsW3xvlLkB5ugQcnrXqDKVTxn5IIrd6J7n57+dYRtzXXgKgk9caan6RE0I0pJqT00+2/ OQHXZvBSBMvCkQzDcbKx4oJU0g8kf0AJYtmlERPjgG25Jbg05+1lcUMO2X3MLqGX9jQgyY xdAPz862khjbfkbapBdcRIJr2XIREIFEqto2APp4LDTkSPYYohyGcb5O3WJ89A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704912278; a=rsa-sha256; cv=none; b=ZC6H2v3cpXLx4rSO8sbWY5vRvTpAFOafzKXoE7Tfk1236RbCvp7ipCMEeoEhYJODK3dAvC vtmy3fzu+x5WOGcDYxVjrGuwRHm2LvdkoccxyPzlPcY5ypavvtmLiHBwhMpf4qItZDE9pa nIvgDrVOQFVt7tQ63VG4+rYJMhQ/hvUrgU1blx4vkCYTZ9TMh3rPXoBeD4YHu5QDm3+qfs wzO9UJH66WdiFRaveyRqgbgHsOuGweWk/NsvmN8nQhiff53xSDz8jctP5KQxRcNLtw1dvl FqI6EsFJ1vM0QF0lNX+Qr7h6dAeFNLrA4S8o6mRjpp64pFWtXrGv+arXpNRYmA== 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 4T9GtZ05SWzmtW; Wed, 10 Jan 2024 18:44: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 40AIib3s093673; Wed, 10 Jan 2024 18:44:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIibCk093670; Wed, 10 Jan 2024 18:44:37 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:44:37 GMT Message-Id: <202401101844.40AIibCk093670@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 3159e314f194 - stable/14 - Fix udp IPv4-mapped address List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 3159e314f194bd8db98dd4516f46350b2fbe44f0 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3159e314f194bd8db98dd4516f46350b2fbe44f0 commit 3159e314f194bd8db98dd4516f46350b2fbe44f0 Author: Richard Kümmel AuthorDate: 2023-12-15 11:49:45 +0000 Commit: Ed Maste CommitDate: 2024-01-10 16:37:44 +0000 Fix udp IPv4-mapped address Do not use the cached route if the destination isn't the same. This fix a problem where an UDP packet will be sent via the wrong route and interface if a previous one was sent via them. PR: 275774 Reviewed by: glebius, tuexen Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 7df9da47e8f04267330e1baa751f07c0c4aaf2ac) --- sys/netinet/udp_usrreq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 708a4e6b730d..75dec9d5f5aa 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1055,6 +1055,7 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, uint16_t cscov = 0; uint32_t flowid = 0; uint8_t flowtype = M_HASHTYPE_NONE; + bool use_cached_route; inp = sotoinpcb(so); KASSERT(inp != NULL, ("udp_send: inp == NULL")); @@ -1091,9 +1092,8 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, * We will need network epoch in either case, to safely lookup into * pcb hash. */ - if (sin == NULL || - (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0) || - (flags & PRUS_IPV6) != 0) + use_cached_route = sin == NULL || (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0); + if (use_cached_route || (flags & PRUS_IPV6) != 0) INP_WLOCK(inp); else INP_RLOCK(inp); @@ -1443,7 +1443,7 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, else UDP_PROBE(send, NULL, inp, &ui->ui_i, inp, &ui->ui_u); error = ip_output(m, inp->inp_options, - INP_WLOCKED(inp) ? &inp->inp_route : NULL, ipflags, + use_cached_route ? &inp->inp_route : NULL, ipflags, inp->inp_moptions, inp); INP_UNLOCK(inp); NET_EPOCH_EXIT(et); From nobody Wed Jan 10 18:51:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9H2y0P0fz55dPK; Wed, 10 Jan 2024 18:51: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 4T9H2y06Pfz4PhT; Wed, 10 Jan 2024 18:51:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704912714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kySqlvO/+KKFSYAWLysr8qPWNYW7rqZofFVH0mToQOw=; b=kWEjJ9zu/x19wQMyalox5Alt52zc/tV/NuP9PlOcKhdmnH5fPfUaMadOd1LG1TrYVLHQRJ BBEUqtxxtOQfSjooBgVu/IOx0WqujN/Za4SZnXm0CQhCpaauHY8bKxb48bVcwokHoT2Ajv WXIZGYUXdbAWwzU4df/FuvyXjHo1h0VcJzJTqmcBUfCGz9wnDOyJN/YEJB4ATBjI2cpDea bOfbLo2p3FzykYE/HfHFenX1+VcPYSwYMZNydqNdpN2xpa7PZYj/NVH/sWRlLJgYg7I/kP pJmBEP7LM8rjIymQKP66SQuzKogsJNuEtBClcVcRpGlGZr8iXttIL+Bjvmkn5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704912714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kySqlvO/+KKFSYAWLysr8qPWNYW7rqZofFVH0mToQOw=; b=Pqx77iYIKvPKYY8MmKpuLQ/Mu1MhcYVR6vgRckjbbxgb0ssR7hJfJRiy04PyzC+CqoaZx0 p6imUo8a3htnQU7knam8qoJpugVtdkhw8kKjylEg6JYRLBfJJSxl0VvkKGlO3WvR+YsdRx lLlstpL1se/BXYpA9a3N0BWVNYA95J/nr/4/6rXWNqw0+hwzRAOqfpPgMF9bpSeinBnuy2 h1pXGD6Z2H/lkX4wv3NfpVKJhPSBTHlYk7GWDvOyoKw0Hw7Pgf3QK/anHZwUTkoxAAXFYz nP0dvMyFldahz13eGjCS/MIQjj8pCwsjD2PAlfD6EgYMe9626cjaaL+k7K6Z/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704912714; a=rsa-sha256; cv=none; b=pj1k8H9n22Y5C33xbtLD67pGSN6irQGNw1f35CZTeMSLqVWMSvvH5h+MrGhNmtjSzrPx3x 9nxWcMCHFjGVFzIxhaJ/L4EWhtsijHBIjN8Vv/2JpTfbJUmMrIz7b8VaTR5gL/FbrS4eS0 MLsFi7QLhspr12+VuXJdCWlzg6OniuMusmod5ysL5UOx1AII8gsHIVnQEhPC50EKKOiCb+ m5TApYlm11xkg1BPIgKEmySqAKvQNzXMSjopeABRVjVP5yG77GMzTN1E+ZRVvV8jJDgY8/ 0mFd3esgiLXx9NSWjVf+TJBIUYXbCiCfkHIDdZY+R8+iefkX3AhOwBZVA4dERQ== 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 4T9H2x6Dz6zmrJ; Wed, 10 Jan 2024 18:51: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 40AIprp8010118; Wed, 10 Jan 2024 18:51:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AIprr2010115; Wed, 10 Jan 2024 18:51:53 GMT (envelope-from git) Date: Wed, 10 Jan 2024 18:51:53 GMT Message-Id: <202401101851.40AIprr2010115@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 38fe4bc08264 - stable/14 - dtc: Sync with upstream commit 26a0fe5 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 38fe4bc08264652cd33964ba6042bd4c0faf6b76 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=38fe4bc08264652cd33964ba6042bd4c0faf6b76 commit 38fe4bc08264652cd33964ba6042bd4c0faf6b76 Author: Jose Luis Duran AuthorDate: 2023-09-26 16:37:52 +0000 Commit: Ed Maste CommitDate: 2024-01-10 18:50:53 +0000 dtc: Sync with upstream commit 26a0fe5 - 0206c0f ("Handle top-level /delete-node/ directives.") - d612a9e ("Remove C++11 standard constrain") - Remove extra white lines after the $FreeBSD$ tag removal Reviewed by: kevans (earlier), theraven, emaste Differential Revision: https://reviews.freebsd.org/D41482 (cherry picked from commit 29a55fd09b0a3cc4c888f7a630fde41694699343) (cherry picked from commit f147cf0ee2b2642c0a133a71c8a5dc018518d923) --- usr.bin/dtc/HACKING | 1 - usr.bin/dtc/Makefile | 3 +- usr.bin/dtc/fdt.cc | 134 ++++++++++++++++++++++++++++++++++++++++----------- usr.bin/dtc/fdt.hh | 24 ++++++--- 4 files changed, 122 insertions(+), 40 deletions(-) diff --git a/usr.bin/dtc/HACKING b/usr.bin/dtc/HACKING index 9447c4f6ebf9..ef858c8885c0 100644 --- a/usr.bin/dtc/HACKING +++ b/usr.bin/dtc/HACKING @@ -1,4 +1,3 @@ - Notes for people hacking on dtc =============================== diff --git a/usr.bin/dtc/Makefile b/usr.bin/dtc/Makefile index d242ed80e8b1..9b1aff13511f 100644 --- a/usr.bin/dtc/Makefile +++ b/usr.bin/dtc/Makefile @@ -1,4 +1,3 @@ - PROG_CXX=dtc SRCS= dtc.cc input_buffer.cc string.cc dtb.cc fdt.cc checking.cc MAN= dtc.1 @@ -7,7 +6,7 @@ WARNS?= 3 CXXFLAGS+= -fno-rtti -fno-exceptions -CXXSTD= c++11 +CXXSTD= c++17 NO_SHARED?=NO diff --git a/usr.bin/dtc/fdt.cc b/usr.bin/dtc/fdt.cc index 5ab9ba10d2f0..f0b98cfe720c 100644 --- a/usr.bin/dtc/fdt.cc +++ b/usr.bin/dtc/fdt.cc @@ -861,7 +861,15 @@ node::node(const string &n, node_ptr node::create_special_node(const string &name, const std::vector &props) { - node_ptr n(new node(name, props)); + // Work around for the fact that we can't call make_shared on something + // with a private constructor. Instead create a subclass with a public + // constructor that is visible only in this function and construct that + // instead. + struct constructable_node : public node + { + constructable_node(const string &n, const std::vector &p) : node(n, p) {} + }; + node_ptr n{std::make_shared(name, props)}; return n; } @@ -1035,12 +1043,31 @@ node::parse(text_input_buffer &input, string &&address, define_map *defines) { - node_ptr n(new node(input, - tree, - std::move(name), - std::move(label), - std::move(address), - defines)); + // Work around for the fact that we can't call make_shared on something + // with a private constructor. Instead create a subclass with a public + // constructor that is visible only in this function and construct that + // instead. + struct constructable_node : public node + { + constructable_node(text_input_buffer &input, + device_tree &tree, + std::string &&n, + std::unordered_set &&l, + std::string &&a, + define_map*m) : node(input, + tree, + std::move(n), + std::move(l), + std::move(a), + m) + {} + }; + node_ptr n{std::make_shared(input, + tree, + std::move(name), + std::move(label), + std::move(address), + defines)}; if (!n->valid) { n = 0; @@ -1208,7 +1235,7 @@ node::write_dts(FILE *file, int indent) } void -device_tree::collect_names_recursive(node_ptr &n, node_path &path) +device_tree::collect_names_recursive(node_ptr parent, node_ptr n, node_path &path) { path.push_back(std::make_pair(n->name, n->unit_address)); for (const string &name : n->labels) @@ -1218,9 +1245,13 @@ device_tree::collect_names_recursive(node_ptr &n, node_path &path) auto iter = node_names.find(name); if (iter == node_names.end()) { - node_names.insert(std::make_pair(name, n.get())); + node_names.insert(std::make_pair(name, n)); node_paths.insert(std::make_pair(name, path)); ordered_node_paths.push_back({name, path}); + if (parent) + { + node_name_parents.insert({name, parent}); + } } else { @@ -1236,7 +1267,7 @@ device_tree::collect_names_recursive(node_ptr &n, node_path &path) } for (auto &c : n->child_nodes()) { - collect_names_recursive(c, path); + collect_names_recursive(n, c, path); } // Now we collect the phandles and properties that reference // other nodes. @@ -1264,7 +1295,7 @@ device_tree::collect_names_recursive(node_ptr &n, node_path &path) else { uint32_t phandle = p->begin()->get_as_uint32(); - used_phandles.insert(std::make_pair(phandle, n.get())); + used_phandles.insert(std::make_pair(phandle, n)); } } } @@ -1280,11 +1311,11 @@ device_tree::collect_names() ordered_node_paths.clear(); cross_references.clear(); fixups.clear(); - collect_names_recursive(root, p); + collect_names_recursive(nullptr, root, p); } property_ptr -device_tree::assign_phandle(node *n, uint32_t &phandle) +device_tree::assign_phandle(node_ptr n, uint32_t &phandle) { // If there is an existing phandle, use it property_ptr p = n->get_property("phandle"); @@ -1329,11 +1360,11 @@ device_tree::assign_phandle(node *n, uint32_t &phandle) } void -device_tree::assign_phandles(node_ptr &n, uint32_t &next) +device_tree::assign_phandles(node_ptr n, uint32_t &next) { if (!n->labels.empty()) { - assign_phandle(n.get(), next); + assign_phandle(n, next); } for (auto &c : n->child_nodes()) @@ -1391,14 +1422,14 @@ device_tree::resolve_cross_references(uint32_t &phandle) for (auto &i : sorted_phandles) { string target_name = i.get().val.string_data; - node *target = nullptr; + node_ptr target; string possible; // If the node name is a path, then look it up by following the path, // otherwise jump directly to the named node. if (target_name[0] == '/') { string path; - target = root.get(); + target = root; std::istringstream ss(target_name); string path_element; // Read the leading / @@ -1412,14 +1443,14 @@ device_tree::resolve_cross_references(uint32_t &phandle) string node_name, node_address; std::getline(nss, node_name, '@'); std::getline(nss, node_address, '@'); - node *next = nullptr; + node_ptr next; for (auto &c : target->child_nodes()) { if (c->name == node_name) { if (c->unit_address == node_address) { - next = c.get(); + next = c; break; } else @@ -1478,8 +1509,8 @@ device_tree::resolve_cross_references(uint32_t &phandle) bool device_tree::garbage_collect_marked_nodes() { - std::unordered_set previously_referenced_nodes; - std::unordered_set newly_referenced_nodes; + std::unordered_set previously_referenced_nodes; + std::unordered_set newly_referenced_nodes; auto mark_referenced_nodes_used = [&](node &n) { @@ -1489,7 +1520,7 @@ device_tree::garbage_collect_marked_nodes() { if (v.is_phandle()) { - node *nx = node_names[v.string_data]; + node_ptr nx = node_names[v.string_data]; if (nx == nullptr) { // Try it again, but as a path @@ -1534,8 +1565,9 @@ device_tree::garbage_collect_marked_nodes() while (!newly_referenced_nodes.empty()) { - previously_referenced_nodes = std::move(newly_referenced_nodes); - for (auto *n : previously_referenced_nodes) + previously_referenced_nodes = newly_referenced_nodes; + newly_referenced_nodes.clear(); + for (auto &n : previously_referenced_nodes) { mark_referenced_nodes_used(*n); } @@ -1617,7 +1649,38 @@ device_tree::parse_file(text_input_buffer &input, while (valid && !input.finished()) { node_ptr n; - if (input.consume('/')) + if (input.consume("/delete-node/")) + { + // Top-level /delete-node/ directives refer to references that must + // be deleted later. + input.next_token(); + auto expect = [&](auto token, const char *msg) + { + if (!input.consume(token)) + { + input.parse_error(msg); + valid = false; + } + input.next_token(); + return valid; + }; + if (expect('&', "Expected reference after top-level /delete-node/.")) + { + string ref = input.parse_node_name(); + if (ref == string()) + { + input.parse_error("Expected label name for top-level /delete-node/."); + valid = false; + } + else + { + deletions.push_back(std::move(ref)); + } + expect(';', "Missing semicolon."); + } + continue; + } + else if (input.consume('/')) { input.next_token(); n = node::parse(input, *this, string(), string_set(), string(), &defines); @@ -1732,7 +1795,7 @@ device_tree::write(int fd) strings_writer.write_to_file(fd); } -node* +node_ptr device_tree::referenced_node(property_value &v) { if (v.is_phandle()) @@ -2032,6 +2095,19 @@ device_tree::parse_dts(const string &fn, FILE *depfile) } } collect_names(); + for (auto &ref : deletions) + { + auto parent = node_name_parents[ref]; + auto node = node_names[ref]; + if (!parent) + { + fprintf(stderr, "Top-level /delete-node/ directive refers to label %s, which is not found.\n", ref.c_str()); + } + else + { + parent->delete_children_if([&](node_ptr &child) { return child == node; }); + } + } // Return value indicates whether we've dirtied the tree or not and need to // recollect names if (garbage_collect && garbage_collect_marked_nodes()) @@ -2127,7 +2203,7 @@ device_tree::parse_dts(const string &fn, FILE *depfile) { continue; } - node *n = local_fixups.get(); + node_ptr n = local_fixups; for (auto &p : i.path) { // Skip the implicit root @@ -2142,7 +2218,7 @@ device_tree::parse_dts(const string &fn, FILE *depfile) { if (c->unit_address == p.second) { - n = c.get(); + n = c; found = true; break; } @@ -2157,7 +2233,7 @@ device_tree::parse_dts(const string &fn, FILE *depfile) path += p.second; } n->add_child(node::create_special_node(path, symbols)); - n = (--n->child_end())->get(); + n = *(--(n->child_end())); } } assert(n); diff --git a/usr.bin/dtc/fdt.hh b/usr.bin/dtc/fdt.hh index 86c9ff153b80..fad9609d40bb 100644 --- a/usr.bin/dtc/fdt.hh +++ b/usr.bin/dtc/fdt.hh @@ -71,7 +71,7 @@ typedef std::shared_ptr property_ptr; /** * Owning pointer to a node. */ -typedef std::unique_ptr node_ptr; +typedef std::shared_ptr node_ptr; /** * Map from macros to property pointers. */ @@ -663,7 +663,7 @@ class node /** * Deletes any children from this node. */ - inline void delete_children_if(bool (*predicate)(node_ptr &)) + inline void delete_children_if(std::function predicate) { children.erase(std::remove_if(children.begin(), children.end(), predicate), children.end()); } @@ -761,7 +761,11 @@ class device_tree * Mapping from names to nodes. Only unambiguous names are recorded, * duplicate names are stored as (node*)-1. */ - std::unordered_map node_names; + std::unordered_map node_names; + /** + * Mapping from names to the nodes that contain them. + */ + std::unordered_map node_name_parents; /** * A map from labels to node paths. When resolving cross references, * we look up referenced nodes in this and replace the cross reference @@ -779,6 +783,10 @@ class device_tree * These should be expanded to the full path of their targets. */ std::vector cross_references; + /** + * Labels collected from top-level /delete-node/ directives. + */ + std::vector deletions; /** * The location of something requiring a fixup entry. */ @@ -827,7 +835,7 @@ class device_tree * find phandles that were provided by the user explicitly when we are * doing checking. */ - std::unordered_map used_phandles; + std::unordered_map used_phandles; /** * Paths to search for include files. This contains a set of * nul-terminated strings, which are not owned by this class and so @@ -864,19 +872,19 @@ class device_tree * used in resolving cross references. Also collects phandle * properties that have been explicitly added. */ - void collect_names_recursive(node_ptr &n, node_path &path); + void collect_names_recursive(node_ptr parent, node_ptr n, node_path &path); /** * Assign a phandle property to a single node. The next parameter * holds the phandle to be assigned, and will be incremented upon * assignment. */ - property_ptr assign_phandle(node *n, uint32_t &next); + property_ptr assign_phandle(node_ptr n, uint32_t &next); /** * Assign phandle properties to all nodes that have been referenced and * require one. This method will recursively visit the tree starting at * the node that it is passed. */ - void assign_phandles(node_ptr &n, uint32_t &next); + void assign_phandles(node_ptr n, uint32_t &next); /** * Calls the recursive version of this method on every root node. */ @@ -925,7 +933,7 @@ class device_tree * is in source form, then we have a string that we can use to index * the cross_references array and so we can just look that up. */ - node *referenced_node(property_value &v); + node_ptr referenced_node(property_value &v); /** * Writes this FDT as a DTB to the specified output. */ From nobody Wed Jan 10 23:32:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9PH76FsKz56TBC; Wed, 10 Jan 2024 23:32:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9PH75PnNz45h7; Wed, 10 Jan 2024 23:32:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AJJ12TdM7aYOtNBe8a9+DntvY9Fy7GXzBlPMH6akHJo=; b=LDkz0zU9dCrTbpWce4RplJXyyhST+sI/mrRg+6effeDpFh3f7FTmpHGWVJMngPPAeHvoKk Drujaz0Xn0P5WgariO8UfkIlLm4hMIG2VUTE87fNjw8GYfoYHprJsyoX3kOsDPop/tH/YL sxTsoFRxrgn/g/fTyieLcu3Kxh7PYxs4ast1j1C1e/HY7V36TjIQ3k3bTnHTcBTuV1+dZ8 RT0A4tcDGg8zhbGY/olXiPoraV1d8ZMWZEIVrPQ7ZSPZNhf382Qcqo1+i1Sbn785MOqPbH +NX9JhQQUaHcOXQeH3+BWrOxLBZNiH7JJ87vlBDx0eYx3VeX1G8lHiRE2ZYOVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AJJ12TdM7aYOtNBe8a9+DntvY9Fy7GXzBlPMH6akHJo=; b=M9g80cwfLG7zH6nsrnjtpM5tG0j369gfhbWfSidl1rbJXhBiwDTBy5Z0Yo/Mj1ikTXX/0k kowlCv1GV3KKtmgt//J5/BZqVXOWnx9D5SvhLN3+qLLfJVJkKPmJ9Hwb9K9E76Dv1ZEUYO CyS+NMoOLcgsT2KqKpVrdZhNLxmu377aqYTpAn2G+i87iGUJ1eoM3g9vJ2SeUdxLWavWRe L647BYzLX3dEsrjqJDcanUgCxBvtFQbEUqvHTiUEcWnaAI7q9Q6oVWUBVJ3BQCKNygZFxj Gbmy7HL9oFRRc1/YmFiZnHqYF5ERxVDgheR5lilMKecHAtl6CHimb82MUNanXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704929571; a=rsa-sha256; cv=none; b=Cy3t1lo1kEZy3JdtB6/pPTUgwo2qKKVN1TA5UzDMqOQYjTwPKggVnXJEItzDdWg1VpIZQ9 +N9AGL18xCYCPN1bR8TFg4y0xb4x3eP6WlOOE2C+/xYlcO/fyr2tyG0qItLmq36hXyz9IU 0l0AAMwNmQX2MeI99ChaB0raOP1aQnMPYaNw0ddxb8Slf+y1DahJPw0ufUbw64ZcH/zbC9 vQmByy1WxU5eO3AXr7EPUZDLGtKbjgkPq5BoNh0JbXsmmwOCUSwx8/P9w7s7V2KzQ4+JeH 9y9inVG2/U5sjYM7r31CgXo6mi/ZkM0oLLCdr+gKgp+Tes8Z9r1WyjwqiLZ4SQ== 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 4T9PH74TGRzvv1; Wed, 10 Jan 2024 23:32:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40ANWpKH097862; Wed, 10 Jan 2024 23:32:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ANWpYp097859; Wed, 10 Jan 2024 23:32:51 GMT (envelope-from git) Date: Wed, 10 Jan 2024 23:32:51 GMT Message-Id: <202401102332.40ANWpYp097859@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: 93f27766a7e1 - main - dtrace: Add the 'oformat' libdtrace option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 93f27766a7e1af009c5b1e4ca538632857c91aa1 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=93f27766a7e1af009c5b1e4ca538632857c91aa1 commit 93f27766a7e1af009c5b1e4ca538632857c91aa1 Author: Domagoj Stolfa AuthorDate: 2024-01-03 14:58:01 +0000 Commit: Mark Johnston CommitDate: 2024-01-10 23:14:26 +0000 dtrace: Add the 'oformat' libdtrace option This option can be used to specify a format to use in DTrace output. The following formats are supported: - json - xml - html - none (default DTrace output) This is implemented using libxo and integrated into libdtrace. Client code only works with the following API: - dtrace_oformat_setup(dtrace_hdl_t *) -- to be called when output is starting. - dtrace_oformat_teardown(dtrace_hdl_t *) -- to be called when output is finished - dtrace_oformat(dtrace_hdl_t *) -- check if oformat is enabled. - dtrace_set_outfp(FILE *) -- sets the output file for oformat. - Ensure that oformat is correctly checked in the drop handler and record processing callbacks. This commit also adds tests which check if the generated output is valid (JSON, XML) and extends the dtrace(1) describing the structured output. Reviewed by: markj Discussed with: phil MFC after: 2 months Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D41745 --- Makefile.inc1 | 3 + cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 | 416 +++++- cddl/contrib/opensolaris/cmd/dtrace/dtrace.c | 72 +- .../dtrace/test/tst/common/oformat/tst.agg.avg.ksh | 66 + .../test/tst/common/oformat/tst.agg.count.ksh | 66 + .../test/tst/common/oformat/tst.agg.llquantize.ksh | 73 + .../test/tst/common/oformat/tst.agg.lquantize.ksh | 73 + .../dtrace/test/tst/common/oformat/tst.agg.max.ksh | 66 + .../dtrace/test/tst/common/oformat/tst.agg.min.ksh | 66 + .../test/tst/common/oformat/tst.agg.quantize.ksh | 73 + .../test/tst/common/oformat/tst.agg.stddev.ksh | 66 + .../dtrace/test/tst/common/oformat/tst.agg.sum.ksh | 66 + .../dtrace/test/tst/common/oformat/tst.aggmod.ksh | 66 + .../test/tst/common/oformat/tst.aggstack.ksh | 66 + .../dtrace/test/tst/common/oformat/tst.aggsym.ksh | 66 + .../test/tst/common/oformat/tst.aggustack.ksh | 66 + .../dtrace/test/tst/common/oformat/tst.aggusym.ksh | 66 + .../dtrace/test/tst/common/oformat/tst.drop.ksh | 61 + .../cmd/dtrace/test/tst/common/oformat/tst.mod.ksh | 57 + .../dtrace/test/tst/common/oformat/tst.print.ksh | 60 + .../dtrace/test/tst/common/oformat/tst.printf.ksh | 57 + .../dtrace/test/tst/common/oformat/tst.printm.ksh | 57 + .../dtrace/test/tst/common/oformat/tst.stack.ksh | 61 + .../cmd/dtrace/test/tst/common/oformat/tst.sym.ksh | 57 + .../dtrace/test/tst/common/oformat/tst.trace.ksh | 66 + .../test/tst/common/oformat/tst.tracemem.ksh | 57 + .../dtrace/test/tst/common/oformat/tst.umod.ksh | 57 + .../dtrace/test/tst/common/oformat/tst.ustack.ksh | 61 + .../dtrace/test/tst/common/oformat/tst.usym.ksh | 57 + .../lib/libdtrace/common/dt_aggregate.c | 17 +- .../opensolaris/lib/libdtrace/common/dt_consume.c | 1540 +++++++++++++++++--- .../opensolaris/lib/libdtrace/common/dt_handle.c | 37 +- .../opensolaris/lib/libdtrace/common/dt_impl.h | 7 + .../opensolaris/lib/libdtrace/common/dt_oformat.h | 34 + .../opensolaris/lib/libdtrace/common/dt_open.c | 3 + .../opensolaris/lib/libdtrace/common/dt_options.c | 14 + .../opensolaris/lib/libdtrace/common/dt_print.c | 266 +++- .../opensolaris/lib/libdtrace/common/dt_printf.h | 6 + .../opensolaris/lib/libdtrace/common/dt_subr.c | 42 + .../opensolaris/lib/libdtrace/common/dtrace.h | 22 + cddl/lib/libdtrace/Makefile | 2 +- cddl/usr.sbin/dtrace/Makefile | 2 +- cddl/usr.sbin/dtrace/tests/common/Makefile | 1 + cddl/usr.sbin/dtrace/tests/common/oformat/Makefile | 42 + cddl/usr.sbin/dtrace/tests/dtrace.test.mk | 2 +- etc/mtree/BSD.tests.dist | 2 + share/mk/src.libnames.mk | 2 +- 47 files changed, 3906 insertions(+), 279 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index e6a6e9d479d3..34b49ee319ec 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -3139,6 +3139,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ ${_cddl_lib_libctf} ${_cddl_lib_libzfsbootenv} \ lib/libufs \ lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \ + lib/libxo \ ${_secure_lib_libcrypto} ${_secure_lib_libssl} \ ${_lib_libldns} ${_secure_lib_libssh} @@ -3194,6 +3195,7 @@ _generic_libs+= ${_DIR} .endfor lib/libtacplus__L: lib/libmd__L lib/libpam/libpam__L +lib/libxo__L: lib/libutil__L .if ${MK_CDDL} != "no" _cddl_lib_libumem= cddl/lib/libumem @@ -3234,6 +3236,7 @@ lib/libbe__L: cddl/lib/libzfs__L cddl/lib/libzfsbootenv__L _cddl_lib_libctf= cddl/lib/libctf _cddl_lib= cddl/lib cddl/lib/libctf__L: lib/libz__L cddl/lib/libspl__L +cddl/lib/libdtrace__L: lib/libxo__L .endif # cddl/lib/libdtrace requires lib/libproc and lib/librtld_db _prebuild_libs+= lib/libprocstat lib/libproc lib/librtld_db diff --git a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 index 1745519c2c1a..ab8c672a95a1 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 +++ b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 @@ -18,7 +18,9 @@ .\" CDDL HEADER END .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. .\" -.Dd February 24, 2023 +.\" $FreeBSD$ +.\" +.Dd September 8, 2023 .Dt DTRACE 1 .Os .Sh NAME @@ -27,7 +29,8 @@ .Sh SYNOPSIS .Nm .Op Fl 32 | Fl 64 -.Op Fl aACdeFGhHlqSvVwZ +.Op Fl aACdeFGhHlOqSvVwZ +.Op Fl -libxo .Op Fl b Ar bufsz .Op Fl c Ar cmd .Op Fl D Ar name Op Ns = Ns value @@ -355,6 +358,11 @@ writing D programs. The specified .Ar path is added after the default library search path. +.It Fl -libxo +Generate output via +.Xr libxo 3 . +This option is the same as specifying +.Sy oformat . .It Fl m Oo Ar provider : Oc Ar module Oo Oo Ar predicate Oc Ar action Oc Specify module name to trace or list .Fl ( l @@ -398,6 +406,14 @@ argument can be suffixed with an optional D probe clause. More than one .Fl n option can be specified on the command line at a time. +.It Fl O +This option causes +.Nm +to print all the aggregations upon exiting if +.Sy oformat +or +.Fl -libxo +are specified. .It Fl o Ar output Specify the .Ar output @@ -650,6 +666,32 @@ Number of whitespace characters to use when indenting and .Fn ustack output. +.It Sy oformat Ns = Ns Ar format +Specify the format to use for output. +Setting +.Sy oformat +to +.Ql text +makes +.Nm +use regular human-readable output which is its default behavior. +The options passed to +.Sy oformat +are directly forwarded to +.Xr libxo 3 . +Some of the supported formatters include +.Ql json , +.Ql xml +and +.Ql html . +Note that this option will cause +.Nm +to not produce any output unless printing functions are explicitly called, +or the +.Fl O +flag is specified. +For more information see +.Sx STRUCTURED OUTPUT . .It Sy statusrate Ns = Ns Ar time Rate of status checking. .It Sy switchrate Ns = Ns Ar time @@ -776,6 +818,376 @@ or .Fl i options) contain descriptions that do not match any known probes. .El +.Sh STRUCTURED OUTPUT +.Nm +supports structured output using +.Xr libxo 3 . +The output will always have a top-level object called +.Dq dtrace , +followed by a list of objects +.Dq probes . +Each of the probe objects will to have a timestamp which is generated at +output time rather than probe firing time, an identifier for the CPU on +which the probe was executed, and the probe's full specification: +.Bd -literal +{ + "dtrace": { + "probes": [ + { + "timestamp": ..., + "cpu": ..., + "id": ..., + "provider": ..., + "module": ..., + "function": ..., + "name": ..., + "output": [ + ... (script-specific output) + ] + } + ] + } +} + + + + + ... + ... + ... + ... + ... + ... + ... + + ... (script-specific output) + + + +.Ed +.Pp +It is also possible for XML output to take the following form if some +of the fields are empty (in this example, module and function values +are absent): +.Bd -literal + + + + ... + + + ... + + ... (script-specific output) + + + +.Ed +.Pp +Similarly, +.Sy oformat +can be used to generate HTML: +.Bd -literal +
+
...
+
+
...
+
+
...
+
+
...
+
+
...
+
+
...
+
+
...
+
...
+
+.Ed +.Pp +Unlike JSON and XML, the +.Dq output +array is not present. +Instead, data is simply formatted into a div of class +.Dq data +and a data-tag is associated with each of the keys. +.Pp +The +.Dq output +array's contents depend on the probes' actions and is explained below. +The examples here are presented in JSON form as opposed to XML or HTML, +however the conversion explained above applies for all output formats. +.Pp +Any scalar output, such as output produced by the +.Fn trace +action is of form: +.Bd -literal +{ + "value": ... +} +.Ed +.Pp +The +.Fn printf +action begins with an object containing the formatted output of the +.Fn printf +action. +Subsequent objects contains the value of each of the arguments to +.Fn printf +in its raw form as if the +.Fn trace +action was used instead. +A +.Fn printf +statement which contains no arguments other than the message will only have +one object following the message object and its value will always be 0. +This is an artefact of the implementation and can safely be ignored. +.Bd -literal +# dtrace --libxo json,pretty -n 'BEGIN { printf("... %Y, ..", walltimestamp); }' + +{ + "message": "... 2023 Sep 7 16:49:02, .." +}, +{ + "value": 1694105342633402400 +}, +{ + ... +} +.Ed +.Pp +Scalar aggregations are aggregations which produce a single value for a given +key. +These aggregations include +.Fn count , +.Fn min , +.Fn max , +.Fn stddev +and +.Fn sum . +Each one of them is represented by the key containing their name. +For example, the output of a +.Fn stddev +aggregation will contain a key +.Dq stddev +inside an +.Dq aggregation-data +object: +.Bd -literal +{ + "aggregation-data": [ + { + "keys": [ + ... + ], + "stddev": ... + } + ], + "aggregation-name": ... +} +.Ed +.Pp +The +.Dq keys +field remains consistent across all aggregations, however +.Fn quantize , +.Fn lquantize +and +.Fn llquantize +need to be treated differently. +.Sy oformat +will create a new array of objects called +.Dq buckets . +Each of the objects contains a +.Dq value +and a +.Dq count +field which are +the left-hand side and the right-hand side of human-readable +.Nm +output respectively. +The full object has the following format: +.Bd -literal +{ + "aggregation-data": [ + ... + { + "keys": [ + ... + ], + "buckets": [ + { + "value": 32, + "count": 0 + }, + { + "value": 64, + "count": 17 + }, + ... + ], + }, + ... + ] + "aggregation-name": ... +} +.Ed +.Pp +Similar to scalar aggregations, named scalar actions such as +.Fn mod , +.Fn umod , +.Fn usym , +.Fn tracemem +and +.Fn printm +will output an object with the key being equal to the +name of the action. +For example, +.Fn printm +output would produce the following object: +.Bd -literal +{ + "printm": "0x4054171100" +} +.Ed +.Pp +.Fn sym +is slightly different. +While it will create a +.Dq sym +field which contains its value, in some cases it will also create additional +fields +.Dq object , +.Dq name +and +.Dq offset : +.Bd -literal +# dtrace -x oformat=json,pretty -On 'BEGIN { sym((uintptr_t)&`prison0); }' + +{ + "sym": "kernel`prison0", + "object": "kernel", + "name": "prison0" +} + +# dtrace --libxo json,pretty -On 'BEGIN { sym((uintptr_t)curthread); }' + +{ + "sym": "0xfffffe00c18d2000", + "offset": "0xfffffe00c18d2000" +} +.Ed +.Pp +.Fn stack +and +.Fn ustack +actions unroll each of the stack frames into its own object in an array. +The only real difference between them is that the +.Fn stack +action will produce a list called +.Dq stack-frames +while +.Fn ustack +will produce one called +.Dq ustack-frames . +The following is an example of their +.Sy oformat +output: +.Bd -literal +{ + "stack-frames": [ + { + "symbol": "dtrace.ko`dtrace_dof_create+0x35", + "module": "dtrace.ko", + "name": "dtrace_dof_create", + "offset": "0x35" + }, + { + "symbol": "dtrace.ko`dtrace_ioctl+0x81c", + "module": "dtrace.ko", + "name": "dtrace_ioctl", + "offset": "0x81c" + }, + ... + ] +} + +{ + "ustack-frames": [ + { + "symbol": "libc.so.7`ioctl+0xa", + "module": "libc.so.7", + "name": "ioctl", + "offset": "0xa" + }, + { + "symbol": "libdtrace.so.2`dtrace_go+0xf3", + "module": "libdtrace.so.2", + "name": "dtrace_go", + "offset": "0xf3" + }, + ... + ] +} +.Ed +.Pp +The +.Fn print +action produces a +.Dq type +list in the following form: +.Bd -literal +{ + "type": [ + { + "object-name": "kernel", + "name": "struct thread", + "ctfid": 2372 + }, + { + "member-name": "td_lock", + "name": "struct mtx *volatile", + "ctfid": 2035, + "value": "0xffffffff82158440" + }, + ... +} +.Ed +.Pp +If the type is invalid, a +.Dq warning +object will be produced containing the diagnostic message as well as two +possible optional fields: +.Dq type-identifier +which contains the CTF identifier of the type and +.Dq size containing the size of an integer, enum or float. +The fields generated will depend on the kind of error that was encountered +while processing the trace data. +.Pp +Finally, +.Sy oformat +provides a special pseudo-probe to represent drops. +As +.Nm +polls for various kinds of drops +.Sy oformat +will produce output similar to the following in order to represent drops: +.Bd -literal +{ + "cpu": -1, + "id": -1, + "provider": "dtrace", + "module": "INTERNAL", + "function": "INTERNAL", + "name": "DROP", + "timestamp": ..., + "count": ..., + "total": ..., + "kind": 2, + "msg": "... dynamic variable drops\n" +} +.Ed .Sh OPERANDS You can specify zero or more additional arguments on the .Nm diff --git a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c index cdc476a43b08..dc68c6ef5f72 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c +++ b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c @@ -26,6 +26,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2023, Domagoj Stolfa. All rights reserved. */ #include @@ -55,6 +56,9 @@ #include #endif +#undef NORETURN /* needed because libxo redefines it */ +#include + typedef struct dtrace_cmd { void (*dc_func)(struct dtrace_cmd *); /* function to compile arg */ dtrace_probespec_t dc_spec; /* probe specifier context */ @@ -77,7 +81,7 @@ typedef struct dtrace_cmd { #define E_USAGE 2 static const char DTRACE_OPTSTR[] = - "3:6:aAb:Bc:CdD:ef:FGhHi:I:lL:m:n:o:p:P:qs:SU:vVwx:X:Z"; + "3:6:aAb:Bc:CdD:ef:FGhHi:I:lL:m:n:o:Op:P:qs:SU:vVwx:X:Z"; static char **g_argv; static int g_argc; @@ -167,6 +171,7 @@ usage(FILE *fp) "\t-m enable or list probes matching the specified module name\n" "\t-n enable or list probes matching the specified probe name\n" "\t-o set output file\n" + "\t-O print output upon exiting (specific to oformat)\n" "\t-p grab specified process-ID and cache its symbol tables\n" "\t-P enable or list probes matching the specified provider name\n" "\t-q set quiet mode (only output explicitly traced data)\n" @@ -907,7 +912,10 @@ errhandler(const dtrace_errdata_t *data, void *arg) static int drophandler(const dtrace_dropdata_t *data, void *arg) { - error(data->dtdda_msg); + if (!dtrace_oformat(g_dtp)) { + error(data->dtdda_msg); + } + return (DTRACE_HANDLE_OK); } @@ -1126,7 +1134,9 @@ chew(const dtrace_probedata_t *data, void *arg) } if (!g_flowindent) { - if (!g_quiet) { + if (dtrace_oformat(g_dtp)) { + dtrace_oformat_probe(g_dtp, data, cpu, pd); + } else if (!g_quiet) { char name[DTRACE_FUNCNAMELEN + DTRACE_NAMELEN + 2]; (void) snprintf(name, sizeof (name), "%s:%s", @@ -1313,7 +1323,8 @@ main(int argc, char *argv[]) g_ofp = stdout; int done = 0, mode = 0; - int err, i, c; + int err, i, c, new_argc, libxo_specified; + int print_upon_exit = 0; char *p, **v; struct ps_prochandle *P; pid_t pid; @@ -1336,6 +1347,15 @@ main(int argc, char *argv[]) (g_psv = malloc(sizeof (struct ps_prochandle *) * argc)) == NULL) fatal("failed to allocate memory for arguments"); + new_argc = xo_parse_args(argc, argv); + if (new_argc < 0) + return (usage(stderr)); + + if (new_argc != argc) + libxo_specified = 1; + + argc = new_argc; + g_argv[g_argc++] = argv[0]; /* propagate argv[0] to D as $0/$$0 */ argv[0] = g_pname; /* rewrite argv[0] for getopt errors */ @@ -1532,6 +1552,10 @@ main(int argc, char *argv[]) } else if (g_mode == DMODE_ANON) (void) dtrace_setopt(g_dtp, "linkmode", "primary"); + + if (libxo_specified) + dtrace_oformat_configure(g_dtp); + /* * Now that we have libdtrace open, make a second pass through argv[] * to perform any dtrace_setopt() calls and change any compiler flags. @@ -1624,6 +1648,10 @@ main(int argc, char *argv[]) dcp->dc_arg = optarg; break; + case 'O': + print_upon_exit = 1; + break; + case 'q': if (dtrace_setopt(g_dtp, "quiet", 0) != 0) dfatal("failed to set -q"); @@ -1765,6 +1793,11 @@ main(int argc, char *argv[]) (void) dtrace_getopt(g_dtp, "quiet", &opt); g_quiet = opt != DTRACEOPT_UNSET; + if (dtrace_oformat(g_dtp)) { + if (dtrace_setopt(g_dtp, "quiet", 0) != 0) + dfatal("failed to set quiet (caused by oformat)"); + } + /* * Now make a fifth and final pass over the options that have been * turned into programs and saved in g_cmdv[], performing any mode- @@ -1777,6 +1810,9 @@ main(int argc, char *argv[]) if (g_ofile != NULL && (g_ofp = fopen(g_ofile, "a")) == NULL) fatal("failed to open output file '%s'", g_ofile); + if (dtrace_oformat(g_dtp)) + dtrace_set_outfp(g_ofp); + for (i = 0; i < g_cmdc; i++) exec_prog(&g_cmdv[i]); @@ -1811,6 +1847,9 @@ main(int argc, char *argv[]) if ((g_ofp = fopen(g_ofile, "a")) == NULL) fatal("failed to open output file '%s'", g_ofile); + if (dtrace_oformat(g_dtp)) + dtrace_set_outfp(g_ofp); + for (i = 0; i < g_cmdc; i++) { anon_prog(&g_cmdv[i], dtrace_dof_create(g_dtp, g_cmdv[i].dc_prog, 0), i); @@ -1971,12 +2010,21 @@ main(int argc, char *argv[]) g_pslive = g_psc; /* count for prochandler() */ + dtrace_oformat_setup(g_dtp); do { if (!g_intr && !done) dtrace_sleep(g_dtp); #ifdef __FreeBSD__ - if (g_siginfo) { + /* + * XXX: Supporting SIGINFO with oformat makes little sense, as + * it can't really produce sensible DTrace output. + * + * If needed, we could support it by having an imaginary + * "SIGINFO" probe that we can construct in the output but leave + * it out for now. + */ + if (g_siginfo && !dtrace_oformat(g_dtp)) { (void)dtrace_aggregate_print(g_dtp, g_ofp, NULL); g_siginfo = 0; } @@ -2013,14 +2061,24 @@ main(int argc, char *argv[]) clearerr(g_ofp); } while (!done); - oprintf("\n"); + if (!dtrace_oformat(g_dtp)) + oprintf("\n"); - if (!g_impatient) { + /* + * Since there is no way to format a probe here and machine-readable + * output makes little sense without explicitly asking for it, we print + * nothing upon Ctrl-C if oformat is specified. If the user wishes to + * get output upon exit, they must write an explicit dtrace:::END probe + * to do so. + */ + if ((!g_impatient && !dtrace_oformat(g_dtp)) || + (!g_impatient && print_upon_exit)) { if (dtrace_aggregate_print(g_dtp, g_ofp, NULL) == -1 && dtrace_errno(g_dtp) != EINTR) dfatal("failed to print aggregations"); } + dtrace_oformat_teardown(g_dtp); dtrace_close(g_dtp); return (g_status); } diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.avg.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.avg.ksh new file mode 100644 index 000000000000..daf5c7f4e9bb --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.avg.ksh @@ -0,0 +1,66 @@ +#!/usr/bin/ksh +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2023 Domagoj Stolfa +# + +bname=`basename $0` +dtraceout=/tmp/dtrace.$bname + +script() +{ + $dtrace -o $dtraceout.$1 -x oformat=$1 -s /dev/stdin <<__EOF__ +syscall:::entry +{ + @[probefunc] = avg(tid); +} + +tick-5s +{ + exit(0); +} + +END +{ + printa(@); +} +__EOF__ +} + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +script json +jq . $dtraceout.json + +if [ $? != 0 ]; then + echo $bname: failed to produce valid JSON. see $dtraceout.json + exit 1 +fi + +script xml +xmllint $dtraceout.xml + +if [ $? != 0 ]; then + echo $bname: failed to produce valid XML. see $dtraceout.xml + exit 1 +fi + +rm $dtraceout.json +rm $dtraceout.xml + +exit 0 diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.count.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.count.ksh new file mode 100644 index 000000000000..ab7c5fa28471 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.count.ksh @@ -0,0 +1,66 @@ +#!/usr/bin/ksh +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2023 Domagoj Stolfa +# + +bname=`basename $0` +dtraceout=/tmp/dtrace.$bname + +script() +{ + $dtrace -o $dtraceout.$1 -x oformat=$1 -s /dev/stdin <<__EOF__ +syscall:::entry +{ + @[execname] = count(); +} + +tick-5s +{ + exit(0); +} + +END +{ + printa(@); +} +__EOF__ +} + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +script json +jq . $dtraceout.json + +if [ $? != 0 ]; then + echo $bname: failed to produce valid JSON. see $dtraceout.json + exit 1 +fi + +script xml +xmllint $dtraceout.xml + +if [ $? != 0 ]; then + echo $bname: failed to produce valid XML. see $dtraceout.xml + exit 1 +fi + +rm $dtraceout.json +rm $dtraceout.xml + +exit 0 diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.llquantize.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.llquantize.ksh new file mode 100644 index 000000000000..380335de000a --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/oformat/tst.agg.llquantize.ksh @@ -0,0 +1,73 @@ +#!/usr/bin/ksh +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2023 Domagoj Stolfa +# + +bname=`basename $0` +dtraceout=/tmp/dtrace.$bname + +script() +{ + $dtrace -o $dtraceout.$1 -x oformat=$1 -s /dev/stdin <<__EOF__ +syscall:::entry +{ + self->ts = timestamp; +} + +syscall:::return +/self->ts/ +{ + @[probefunc] = llquantize(timestamp - self->ts, 2, 1, 32, 32); + self->ts = 0; +} + +tick-5s +{ + exit(0); +} + +END +{ + printa(@); +} +__EOF__ +} + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +script json +jq . $dtraceout.json + +if [ $? != 0 ]; then + echo $bname: failed to produce valid JSON. see $dtraceout.json + exit 1 +fi + +script xml +xmllint $dtraceout.xml + +if [ $? != 0 ]; then + echo $bname: failed to produce valid XML. see $dtraceout.xml + exit 1 *** 4641 LINES SKIPPED *** From nobody Wed Jan 10 23:32:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9PH86zVjz56T3q; Wed, 10 Jan 2024 23:32:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9PH86Cybz45cc; Wed, 10 Jan 2024 23:32:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e9EjUNtuPh00qLm7SFJND/ySStBTdf+Sk2jGn6DClUg=; b=a0+FttQMmiU3vecIHDU0qd2gCGx+Bgz4UitrWI+4e1Tp9yPXjN9TGWElfARMwXdQ9mS4ln HL/8FfPUYMRx6CRAI+/YSIl1+E5p+AXXWX7QXRIoNqShqOLixaFcnX8yILJWv2Al5aB61p 6MFKF54u8iDSXwMfqQfXzZ8dr3ogcFlc1sSMJYvOBrrn6ikuHP6kf/G4JGjNTFPLcD2xDw x4Y12PKYnP6CUT+Hk94/eGHkEyuOeBji/QTJzldInbSwkjMDrH0YNpWLs1+vWfEj0CxK/r khnMaWWLQ3F+WjDhJjo1le9jNOm+89tzwoTjS0fI15wvXMhHz6bXY330fs074Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e9EjUNtuPh00qLm7SFJND/ySStBTdf+Sk2jGn6DClUg=; b=U4LpBqZrJt8kgurIs8kqSGOLgIhhs8xbMz14IyWSrrimYqIneYzJ5OpWXrsY1M+nV60Mq2 rORlkJhRsIWN6R1XLWJQoUz5xKhZjFRUSqrj4nz4Izh2zvtzBNF/LxQ2DwU7VWWeFU+f4U 8Ah2HpyeiO1wA9GNpViq5cA54E6bPEGOQYB1bMml54PgNJqOQEARhRxJFvBfSmqXkIlvW+ xKnGnnD4/TnR4QUvOkF4HQ0MBDNbEwjXWxq0x4fyZOxmk2PqbmQy0TcDdVbSXbIlkqJacr 6E1+H4K3Zm1HtdX4E5y++DMyVsS/k6LPirIYqswVZppMok2+DXU6gZr/hHZtdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704929572; a=rsa-sha256; cv=none; b=D0y5a9TKN+1eKP2HhsoF40Z/WHfRwp3kpkXKaeRyymqrrLW2M0TA9+DreysKMigMZ12z1x veTrjjqmykoTLIXj+69sz1P14lIeXTbvypjVqvDIVDSAFCmaF7qo/ADOvfmXaVVUEDYffL UAEJmYdkmQ8SxoGnYMthNFUevXkOQszFt34qf/GInYtzs3Vo5i+LXavZDxzEuY6yy1wsn/ FEhZ2IpDMNyVUOrThivjn2LuITBJaccAOxcFtMsf1/L82XjFSFTcQxDqYSKh4umuTlkqud yI8xnd0fIOzMg7ac0yt6S0GEg2PYAK6dx/NJ17VSdeI/sp87zS2y52ALTGI3iA== 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 4T9PH85GGbzvv2; Wed, 10 Jan 2024 23:32:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40ANWqF7097913; Wed, 10 Jan 2024 23:32:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ANWqUI097910; Wed, 10 Jan 2024 23:32:52 GMT (envelope-from git) Date: Wed, 10 Jan 2024 23:32:52 GMT Message-Id: <202401102332.40ANWqUI097910@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: e25922b34ed2 - main - dtrace tests: Run ksh with -p List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: e25922b34ed2b7b4bf0ae4de2f7ec82b04153384 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e25922b34ed2b7b4bf0ae4de2f7ec82b04153384 commit e25922b34ed2b7b4bf0ae4de2f7ec82b04153384 Author: Mark Johnston AuthorDate: 2024-01-09 15:39:39 +0000 Commit: Mark Johnston CommitDate: 2024-01-10 23:17:59 +0000 dtrace tests: Run ksh with -p In particular, avoid loading the user's .profile file, since that can have undesirable side effects. Most tests were already careful to do this. MFC after: 1 week --- .../cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe | 2 +- .../cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe | 2 +- .../cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe | 2 +- .../cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe | 2 +- .../cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe | 2 +- .../cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe | 2 +- .../cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe | 2 +- .../opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe | 2 +- .../opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe | 2 +- .../cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe | 2 +- cddl/usr.sbin/dtrace/tests/tools/dtest.sh | 4 ++-- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe index e360d25b465b..4985133fb2a6 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe index e360d25b465b..4985133fb2a6 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe index e360d25b465b..4985133fb2a6 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe index e360d25b465b..4985133fb2a6 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe index e360d25b465b..4985133fb2a6 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe index e360d25b465b..4985133fb2a6 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe index e360d25b465b..4985133fb2a6 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe index ddd0f60f63ce..b9365eaafe3d 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe index 6369bc561412..9b9e2659786d 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe index 5acce76efc6c..d15d0668cfc1 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe @@ -1,4 +1,4 @@ -#!/usr/bin/env ksh +#!/usr/local/bin/ksh -p # # CDDL HEADER START # diff --git a/cddl/usr.sbin/dtrace/tests/tools/dtest.sh b/cddl/usr.sbin/dtrace/tests/tools/dtest.sh index e87562d2fe45..83f7a6c875da 100755 --- a/cddl/usr.sbin/dtrace/tests/tools/dtest.sh +++ b/cddl/usr.sbin/dtrace/tests/tools/dtest.sh @@ -70,7 +70,7 @@ runtest() err.*.ksh|tst.*.ksh) expr "$TFILE" : 'err.*' >/dev/null && exstatus=1 - tst=$TFILE ksh "$TFILE" /usr/sbin/dtrace >$STDOUT 2>$STDERR + tst=$TFILE ksh -p "$TFILE" /usr/sbin/dtrace >$STDOUT 2>$STDERR status=$? if [ $status -ne $exstatus ]; then @@ -86,7 +86,7 @@ runtest() if [ $retval -eq 0 ] && \ head -n 1 $STDOUT | grep -q -E '^#!/.*ksh$'; then - ksh $STDOUT + ksh -p $STDOUT retval=$? fi From nobody Wed Jan 10 23:32:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9PHB2g6tz56TJB; Wed, 10 Jan 2024 23:32: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 4T9PHB05mRz464f; Wed, 10 Jan 2024 23:32:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9FJXD5aVyoutyHlWoOJ8UY8IJJXc+FP5809lrFONirM=; b=WMCY92GZ1RgV8So8yKGGmWOJVUtW7TDRwUj3CV9/YAnqKo32eFaJiOTQT1lxRTKp32Wxu8 3+rqTOsuSdI0YPEt5RLl5r0KO0Qo9g+p52CjmY1OS34iByO32GcXszPMpihJLc7qD+h4Ae qgeuS8MLCh5TAqCICLw6S22tIVkWhGgBpE3zB6/52Q93CZnmpMg+De8ztcyzcC6zzJ8Aqi qcx0t52NzLSkAlFt3nxi1PNgMEbTvZNwhid+KWTj1L2Gi78IBhGYg/flc+vg1xYGq8TfTX A8zd31ihkVyCSdbNckpLtVZA0l6hJJ2hD2gCont+0DbfNKbthGsMiG+ka0b6RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9FJXD5aVyoutyHlWoOJ8UY8IJJXc+FP5809lrFONirM=; b=X/1g2ajpxC55oULks5PuICrfokX1agq34ejwZPtMB6W/p7Oeo7y/Y4IuR12F5SByfvSo5B g9N0E+4xLWg4Rh84OlagptSyjRbYQ5TM30tv5ghFe2daKT3U11a6Z23jwrcfRsQ7IQd1+P meAN10U4DBIuyrXZgPu/i/hmXOYSrBkWEIcuhxU8OSeI2nHl3cMz6ksK2Q7pGHvH5If3wH DdGiI68V6UWGJt0gdyAhAOJ6DbzvUdEEv9JHLvMi+JROvUJe9dAqw5FfP3/e2KBbAR/WOt CEf/N8OBiuYIWTmu4RnO61mTxlTRSVJyb74ANWMpIisBtzsoxzlYfLyhClnrQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704929574; a=rsa-sha256; cv=none; b=krRwi53sAFftCo9EmbCr1nwUw5n9/AcxCS89OoHv46gAPavISa1StiuZDFHaNL1xy9uTey 5Q3jgGFxUd3+RLG/TxhJKk59jCMqQ64V8CsBEV0AkfUdi11JsU7bm5ExcfUV8d/Pvn6ceY upGhPiFyxGF+Uw001T7MFdvuqbvO+KdOuKLA4FxbsiAF22OClvEFBO3CnImG4eC1IcDxj7 BuHXhfK0cXqCRUmlFQZ516X6JKWYF2+Tt6kLFi6kP8TiQ0XCv+xCsGtludVx7cbNktZgFu GSmqQW5OX28JjD0pCyvlBudfJzeC5A+4jz045BuHKTB4tqiS4WXRKy/HxHwjMA== 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 4T9PH96K5Qzvff; Wed, 10 Jan 2024 23:32: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 40ANWrfV097969; Wed, 10 Jan 2024 23:32:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ANWrpV097966; Wed, 10 Jan 2024 23:32:53 GMT (envelope-from git) Date: Wed, 10 Jan 2024 23:32:53 GMT Message-Id: <202401102332.40ANWrpV097966@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: 9f5dd61e1400 - main - dtrace tests: Stop hard-coding an incorrect path to sleep(1) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 9f5dd61e14004d546ba3d3c9052f85bb325b58b4 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9f5dd61e14004d546ba3d3c9052f85bb325b58b4 commit 9f5dd61e14004d546ba3d3c9052f85bb325b58b4 Author: Mark Johnston AuthorDate: 2024-01-10 20:19:22 +0000 Commit: Mark Johnston CommitDate: 2024-01-10 23:18:01 +0000 dtrace tests: Stop hard-coding an incorrect path to sleep(1) MFC after: 1 week --- cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.icmp.ksh | 2 +- cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.udp.ksh | 2 +- .../opensolaris/cmd/dtrace/test/tst/common/proc/tst.startexit.ksh | 2 +- .../opensolaris/cmd/dtrace/test/tst/i86xpv/xdt/tst.schedargs.ksh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.icmp.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.icmp.ksh index b1cac20fc8db..6def4da1062b 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.icmp.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.icmp.ksh @@ -59,7 +59,7 @@ pinger() { while true; do ping -A inet localhost - /usr/bin/sleep 1 + sleep 1 done } diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.udp.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.udp.ksh index a492124c9c17..10a83cbd06fd 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.udp.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/mib/tst.udp.ksh @@ -54,7 +54,7 @@ rupper() { while true; do rup localhost - /usr/bin/sleep 1 + sleep 1 done } diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.startexit.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.startexit.ksh index 429173806f35..76996bfcb413 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.startexit.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.startexit.ksh @@ -68,7 +68,7 @@ EOF sleeper() { while true; do - /usr/bin/sleep 1 + sleep 1 done } diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/i86xpv/xdt/tst.schedargs.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/i86xpv/xdt/tst.schedargs.ksh index 5b14fc989138..c74a278c1347 100755 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/i86xpv/xdt/tst.schedargs.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/i86xpv/xdt/tst.schedargs.ksh @@ -45,7 +45,7 @@ outf=/tmp/sched.args.$$ script() { - $dtrace -c '/usr/bin/sleep 10' -o $outf -qs /dev/stdin < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 66bfb4b2ee49 - main - dtrace tests: Require perl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 66bfb4b2ee49e435152316434ae322d8f3f19d3d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=66bfb4b2ee49e435152316434ae322d8f3f19d3d commit 66bfb4b2ee49e435152316434ae322d8f3f19d3d Author: Mark Johnston AuthorDate: 2024-01-10 20:22:14 +0000 Commit: Mark Johnston CommitDate: 2024-01-10 23:18:27 +0000 dtrace tests: Require perl A number of tests use it, so just require it globally as we do with other tools. MFC after: 1 week --- cddl/usr.sbin/dtrace/tests/dtrace.test.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/usr.sbin/dtrace/tests/dtrace.test.mk b/cddl/usr.sbin/dtrace/tests/dtrace.test.mk index d37329b928f0..001dc6253f82 100644 --- a/cddl/usr.sbin/dtrace/tests/dtrace.test.mk +++ b/cddl/usr.sbin/dtrace/tests/dtrace.test.mk @@ -12,7 +12,7 @@ ${TESTGROUP}EXEPACKAGE= ${PACKAGE} TESTWRAPPER= t_dtrace_contrib ATF_TESTS_SH+= ${TESTWRAPPER} -TEST_METADATA.t_dtrace_contrib+= required_files="/usr/local/bin/ksh /usr/local/bin/jq /usr/local/bin/xmllint" +TEST_METADATA.t_dtrace_contrib+= required_files="/usr/local/bin/ksh /usr/local/bin/jq /usr/local/bin/perl /usr/local/bin/xmllint" TEST_METADATA.t_dtrace_contrib+= required_user="root" GENTEST?= ${.CURDIR:H:H}/tools/gentest.sh From nobody Wed Jan 10 23:32:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9PHD66PRz56THN; Wed, 10 Jan 2024 23:32: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 4T9PHD2PzVz45nx; Wed, 10 Jan 2024 23:32:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4LqT4BpWsTd5XFXi5WBKHYj/btbFn6JVFbJOID+/rD8=; b=IVHvM3m3ZlLcp6sDdNFxwVQN9Tkqf+JJ4iUh+O+pqXYUnowX4yGSkwVjJFD8yHAcCG3spT pXmvOGydN1WTpnlA2vEL3zbFvGM55lnZkPxstNRVnpfXn2MgYrA2N6uhqGm5uIY740TEAZ sArg9nGON3wC6HOMNimOXkPY/l6/ADL4lcEhtLcyP+YYpfYqzGDSNZRv/pjTPocRMuEgP9 esAP7scpbYvsKtjOFJui60J4TN8ZbfrWsj0qknLucXSi00+GABTRFMTqWbIenaOvU3gAeF gNBSluoA8nBRadKGJKapko1K5tW1ByWU8uAuTtgfygBE5vxPdXVxcv7wgFGBMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4LqT4BpWsTd5XFXi5WBKHYj/btbFn6JVFbJOID+/rD8=; b=vSRH0W2OLhDcKXStRDVwvD3q7XOziwjXWTGWHKaKdArF5o5nyBga8/qxko6dlooAJ7jRmX lgGpWHw9YkgYAH0KBQck1CXch6dr/6OQi7mooz8yrADZSXpW1kPS4xSZWCyYJu70cAOuf3 eyWS4I6V1JS3IWj9NGBy7JJDtUl9HSKsFVGYfRAzO2EkJdXTG/IEGs+MSzk5DTt+6IM5TK C9YLvRybbap62NScUWPLljuierFmUI589g7PhEHQUfBLCRXDF/uByscbNKUBGh6hKJog1b T3XsdFBUh8/j9cbhwhqCmtVFOUPGVb0WAvxnY8W9RcFvurIhF9jF8otP5TGurg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704929576; a=rsa-sha256; cv=none; b=tpQhDjsiHhlPs3YsOoCJoYe2ScyOqiIyZJ4CrD6T+ZFg/dX4om5la2p52viH+lL6bS5mic UueIETG1cyGasVfrqmtAv0lyRrD+iVsX/V62mWmGFUadiCfEujofWPp2PDNHmD7x4BV34q 4DU3CYgsGbp3liLVteIypRje0A3ZShOH6b3e8kvmlcFRUBA04XL5MLvIlAaMOece/CyEWj 5PvAGF+2uxOyMa8dtQs47MxvKEfxldjOEixIAuVqZ6bi5nYLTUcyVYdXVIMbmt3wgq4nYP Ski5CG3t0B8sieS7376RHWXSCUCSTi0Q5aG5/uDqx853dOT0qmua2NdhHEZMxQ== 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 4T9PHD1F78zvM6; Wed, 10 Jan 2024 23:32: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 40ANWusg098068; Wed, 10 Jan 2024 23:32:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ANWubw098065; Wed, 10 Jan 2024 23:32:56 GMT (envelope-from git) Date: Wed, 10 Jan 2024 23:32:56 GMT Message-Id: <202401102332.40ANWubw098065@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: ba10366037c5 - main - dtrace tests: Catch up with ping(8) output changes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ba10366037c5ea7f2fcb9e3654491316dae3f049 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ba10366037c5ea7f2fcb9e3654491316dae3f049 commit ba10366037c5ea7f2fcb9e3654491316dae3f049 Author: Mark Johnston AuthorDate: 2024-01-10 21:38:00 +0000 Commit: Mark Johnston CommitDate: 2024-01-10 23:19:00 +0000 dtrace tests: Catch up with ping(8) output changes MFC after: 1 week --- .../opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out index 2e94ff35de88..7f7368f13900 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out @@ -1,6 +1,6 @@ -PING6(56=40+8+8 bytes) ::1 --> ::1 +PING(56=40+8+8 bytes) ::1 --> ::1 1 packets transmitted, 1 packets received, 0.0% packet loss 2 ip:::send (args[2]: 6 16, args[5]: 6 0 16) 2 ip:::send (args[2]: 6 16, args[5]: 6 0 16) From nobody Wed Jan 10 23:32:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9PHG0Wkjz56T44; Wed, 10 Jan 2024 23:32: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 4T9PHF3Ll2z45tG; Wed, 10 Jan 2024 23:32:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RmZ+BikW8IZpw4jwlJFqxHP7OFB45ah08i0ZymzMKos=; b=UU7vceGTIqqXSFs2T3AY4HQbJxUKAIEpIFLdsK+1W/str+NcIAlD1clOe+g87zhv+iKFbS 4n3bmxKgWaCPp7na+Tyro+bUJemyvRSFkDzxxHfe7sdxCL4HLxntp+QsvgHx++NgreNALA TpFwSIw0xLuPM9NJ3RNQUeiH9URbkAQySapeR//Xxlg4RwkQh4igLNe4tgtE/O2SK3n8hJ 2mT2S6bOLxE2TkUttX12Q0EZM5ETPONE/dsuttbfbfFfKIpBVN6oviyH8xzlXnyye45jeA 005EtklIpEpi5h6Ks9ymBVSifqCEJV++Z5RJsK2f2jQ5aOUKq89PS24DXlkCKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704929577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RmZ+BikW8IZpw4jwlJFqxHP7OFB45ah08i0ZymzMKos=; b=wX2mi2nhSxp+YP7TCCQePK4NzdWcHkx7IZkSNU8oCIn4qIGyCND/fEx71BDy/NnuRZ30Sg kTw44mLHrcfOFN9eVWRnwQ36QC2XN0q8hCK8txIVsci0lx5e2Px3PYi6aPKr3hc6WHx9wi kl1b1S3oFEpPIc1KzAKU1iELK8AXu634oVEO+engE8NdqRCqwW+z5l3EV8ZtPLL0VLU3nk 9XsCCCOsIftWJNZoMVwYsQ4yLhLWsrI+WoC56SZ7EwEk4WHWOPc0gB/TSaxpHOLMB3uzRA NOrrmSfEsONupf+c54ZXsrq8fkoEUuSZKIX4nJ+juD+cxb5Zj0Sm/ZmZ/CQM3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704929577; a=rsa-sha256; cv=none; b=me6raJPi53bdd+RudT6pc8VnP+7/ju27bk+CwnK5gO4Tz0U4dSAcGmCtUZTRYJ3q4nBfVN AXpo4cXMgrS1Mstp4LCKJ8+EvQx1droxAB/QnF0wICZ+WR4xl74o5Y0pBHjX0A+EzydzTc jyaxQ3/x8W/3C7tK235RieEsj6R4fomhilaUaTl2wsNxGH8j6d9C/5KqNGyzbORYTPze5O GhbBa7f2j3rF7d4lnKvfsN77XxZDN69tvZ8ix5Sv/LTJT8c17qUUMXyZdm1mACxQlmT2oQ JsP2WXHSBxRVMaMhp/1+Pk8VVyNMZUkJ1BVJKEyXoVD4avL7dmklKRZKZAlFmA== 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 4T9PHF2GJKzvv3; Wed, 10 Jan 2024 23:32: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 40ANWvFp098136; Wed, 10 Jan 2024 23:32:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ANWvcu098133; Wed, 10 Jan 2024 23:32:57 GMT (envelope-from git) Date: Wed, 10 Jan 2024 23:32:57 GMT Message-Id: <202401102332.40ANWvcu098133@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: a61d2c7fbd3c - main - dtrace tests: Diff expected and actual output upon a miscompare List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: a61d2c7fbd3c87126db93dfe83b9f96fea3156f8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a61d2c7fbd3c87126db93dfe83b9f96fea3156f8 commit a61d2c7fbd3c87126db93dfe83b9f96fea3156f8 Author: Mark Johnston AuthorDate: 2024-01-10 21:38:30 +0000 Commit: Mark Johnston CommitDate: 2024-01-10 23:19:36 +0000 dtrace tests: Diff expected and actual output upon a miscompare This makes quick diagnosis of test failures easier. MFC after: 1 week --- cddl/usr.sbin/dtrace/tests/tools/dtest.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cddl/usr.sbin/dtrace/tests/tools/dtest.sh b/cddl/usr.sbin/dtrace/tests/tools/dtest.sh index 83f7a6c875da..d2f3dc4ed8df 100755 --- a/cddl/usr.sbin/dtrace/tests/tools/dtest.sh +++ b/cddl/usr.sbin/dtrace/tests/tools/dtest.sh @@ -119,6 +119,10 @@ test stdout: -- $(cat $STDOUT) -- +test stdout diff: +-- +$(diff -u $EXOUT $STDOUT) +-- __EOF__ fi if [ $(stat -f '%z' $STDERR) -gt 0 ]; then From nobody Thu Jan 11 00:06:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9Q1z3Ngqz56XW0; Thu, 11 Jan 2024 00:06: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 4T9Q1z2W9wz4Fhm; Thu, 11 Jan 2024 00:06:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704931591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xM01cijgw1g7Mcq7hB7uHn+nsDjNsTdYj4Kst5x9QrE=; b=of58EB6eCwOeYLtBNp7UN7iEVmCYchEOth5tDLD70vlgzaLIA9SEjayyR1EOJ1vAwcE2dZ ZoahYrbBxion4cl3RolQ8kDK7QlwOpiSL4aMtJrU+tWNh38lh3LnONGbdCVZju4eONOlyd SL64JNPgJzi6A0EwLzvSygDUGK1NGz8mftRJ8+JxS1KM4M0H9JOf+RVtD3Pzl2GoQk6q6J pLputHBAl1kTP8E4o08rpPhzcDvHRavENPa2CbAOFXrsciZ6BnaFNJ691m0h0WjqlckWp4 /pXmO5Gw4Gu7ZLxiekSNoxtieKIJbbQaHI4gTdWjCXfJIZCFbYjP3Rg+OQZZiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704931591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xM01cijgw1g7Mcq7hB7uHn+nsDjNsTdYj4Kst5x9QrE=; b=UJRAxEM0DT3nnuQSGRALyEA39Mb3/61pCSPECkTQkZwflJI1eTZlxDBue7JC3kDHQscRN6 0+RW4MIJ4d+hJc2ZX9ezHuES0K1iT5l+guoqjfqjeYRTVjPDvfV5WMx67cl5cFFlxJFFnq CMXnEp7klPMQ3QrysLYbpTMVYhVwUuk2H2sS5hRgw6kZEPcuaLijtSKvI4knO6Fhgo+JTs bKANIFDCb+7MXcJyDWfu9EPe8HFe9FSLhmXPGDdWdEzUDIZLjhxic7236Am8M7iGJzluoO e3cNaWvnHNjEQ1lS33dHx/7iO7Jrr08xMwn6nkJqMpbj8vy6ljCwsyIItsO8qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704931591; a=rsa-sha256; cv=none; b=rHTpFZ1x2HvNSgb2mCuvBX1gRRItWT+1E2Suk8Xe760Xjkc6zr46uVNAnXTzyaxqWrWhWW 8N1N+VTTONaWJZ6YylEV2WLs1Kmii+wQMLXPcQTaqqvVXkZgbbvElDb122SXU39LhfOjLq FDjPoV+CHopea3HoINOEmPN7m6NyGVqFh8QyqnHK3G5hpP+TQ3Vtf/B+dIv8yfP2wJ2s32 tezmgyMWEtF8eMfGJMUG3OVZTM6KApK1ALakBrAzPmcY1A6OW3xZjXOlfQ8+Q09rdv0xIk GwHz+TfATBmy7R4t+OmQTj0iHZ1gIgepVQhO0CFMYeYAWP4YVWpxh9vusy4AoQ== 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 4T9Q1z1YMLzwxH; Thu, 11 Jan 2024 00:06: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 40B06VOU052075; Thu, 11 Jan 2024 00:06:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B06VAx052072; Thu, 11 Jan 2024 00:06:31 GMT (envelope-from git) Date: Thu, 11 Jan 2024 00:06:31 GMT Message-Id: <202401110006.40B06VAx052072@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 8a3fafc82114 - main - acpi/apm: Improve APM ioctl interface emulation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a3fafc821149e800747cd92afee092fd131c402 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8a3fafc821149e800747cd92afee092fd131c402 commit 8a3fafc821149e800747cd92afee092fd131c402 Author: Warner Losh AuthorDate: 2024-01-03 23:18:23 +0000 Commit: Warner Losh CommitDate: 2024-01-11 00:05:00 +0000 acpi/apm: Improve APM ioctl interface emulation The apm(8) program documents certain states, but doesn't document the 'unknown' state. It reports things correctly for systems with a battery, but incorrectly for systems without one. Emulate the old interface a little better by saying ac power is online if we have no status (instead of unknown), the battery has a high charge of 255% if there's no battery (instead of -1). Programs, like emacs, expect to see only the documented values and misbehave when they see something else. This is closer to what would happen on old-school APM machines. Sadly (or not) I have no access to old-school APM machines to 100% confirm this, but reading the spec, old code and testing with emacs' mode line with battery suggests these values are more correct. emacs has never been converted to acpi_conf due to permissions issues with acpi devices. Fixing the kernel is preferable to hacking apm(8) for these special cases because other programs that use these interfaces will also be more correct. The kernel also has more data with which to decide what to return. Sponsored by: Netflix MFC After: 1 week --- sys/x86/acpica/acpi_apm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/x86/acpica/acpi_apm.c b/sys/x86/acpica/acpi_apm.c index ffefcdf733c2..fcc1663b9a84 100644 --- a/sys/x86/acpica/acpi_apm.c +++ b/sys/x86/acpica/acpi_apm.c @@ -141,18 +141,18 @@ acpi_capm_get_info(apm_info_t aip) aip->ai_capabilities= 0xff00; /* unknown */ if (acpi_acad_get_acline(&acline)) - aip->ai_acline = APM_UNKNOWN; /* unknown */ + aip->ai_acline = 1; /* no info -- on-line best guess */ else aip->ai_acline = acline; /* on/off */ if (acpi_battery_get_battinfo(NULL, &batt) != 0) { - aip->ai_batt_stat = APM_UNKNOWN; - aip->ai_batt_life = APM_UNKNOWN; - aip->ai_batt_time = -1; /* unknown */ - aip->ai_batteries = ~0U; /* unknown */ + aip->ai_batt_stat = 0; /* "high" old I/F has no unknown state */ + aip->ai_batt_life = 255; /* N/A, not -1 */ + aip->ai_batt_time = -1; /* unknown */ + aip->ai_batteries = ~0U; /* unknown */ } else { aip->ai_batt_stat = acpi_capm_convert_battstate(&batt); - aip->ai_batt_life = batt.cap; + aip->ai_batt_life = (batt.cap == -1) ? 255 : batt.cap; aip->ai_batt_time = (batt.min == -1) ? -1 : batt.min * 60; aip->ai_batteries = acpi_battery_get_units(); } @@ -186,11 +186,11 @@ acpi_capm_get_pwstatus(apm_pwstatus_t app) app->ap_batt_stat = acpi_capm_convert_battstate(&batt); app->ap_batt_flag = acpi_capm_convert_battflags(&batt); - app->ap_batt_life = batt.cap; + app->ap_batt_life = (batt.cap == -1) ? 255 : batt.cap; app->ap_batt_time = (batt.min == -1) ? -1 : batt.min * 60; if (acpi_acad_get_acline(&acline)) - app->ap_acline = APM_UNKNOWN; + app->ap_acline = 1; /* no info -- on-line best guess */ else app->ap_acline = acline; /* on/off */ From nobody Thu Jan 11 00:41:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9QpK4TtGz56bXX; Thu, 11 Jan 2024 00:41: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 4T9QpJ70xFz4JJd; Thu, 11 Jan 2024 00:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704933689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Eka27TyUNzvK8ogwuXBBq1FK6M55vnZZ2MUYPmEyrE0=; b=T/6S/Y5S+xxwIbWrakG18kMpLavyympZeKxxq461Ob0QVLihY7KISVfU3THe3QLE6JxgxX zxqsX2kLiCRc5+TYNnUpSjIGGXrBOejl6nyMQpt+mZiNoilw3khmYx/UsOviZj95lcJ4uA do5uvoU5t7Wn8B3Fu4hPFqXaPkIqjDcjNkw4k+6xe8lApTRy2yH21q25Y9LvieeXOxN2zO 0MdjqvTuhj6rHQv74PcJ6ezexoxPi80Uhy5djQL29xzIkfLWZlnP+S4itXhBRlJHlrSEa0 uTG+JTdrZd//QpZ/EpbzJ2NzrELGutr1rJHiqW+24ggExoFrB8FvtuwC+fabkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704933689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Eka27TyUNzvK8ogwuXBBq1FK6M55vnZZ2MUYPmEyrE0=; b=dUdVP366bdfPk7dK+2Qeku4BP6C6ZprePqCJ3i6y0HBxYKZWUW/ccsObCGfuk08/diSHhK AuFQl8DKPh4D268+dZ39ggOD9o0FjwDj91G6EIzw9hpWnRkWzW7IDWGQRV56uky5U1psd3 cTyv+AOTD003zehel4Ujl/l3RRAHWdNrWeeizPptQLBTj7L7QV6/VNnd3JPClC6KYPTY4H nsHwRd+EcilxO95zvEcAC/9qejU1di55ImBxZB49z0YpqTgA9mDKBFkaW6xKhl0x8nv8XA SFYjP+pG+HO17MgJwUnuxnvkWr3TCDcYu2l6dxyZ04ry5yHoTqy0f65lfxCdOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704933689; a=rsa-sha256; cv=none; b=JD6kDhgUN+GUGVZ+xGyAD+Fbkim1stG2FWWvOZKTo6KRBnKgLVG+gN8NP52mr4k+n3FG6W w80IR7V7U5v45VndGFNXC2xBXGZdiYl2MkjsyNQ/JImZ//D4kbXZLYz63TcrETt20kOk1d FY2v9htqtmOclX6en54h+JyWF6qtKqtNbqcCcqcP34dNcNv51KMyeOuhEa1SJtVgMrKK5a TEy4qLFDrxlXMZKYcsP+TAlwU4LeRiK01gTTpHGZTdgwpLkNkqQjT5fiG8WYn+MAq8Hq3K iYe+iK5PAhXVOpvV6/eyZm5BNVBQqvYxhTWktEYnARsTnY2PXcWrJWGJ5zvb2Q== 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 4T9QpJ5qqYzxby; Thu, 11 Jan 2024 00:41: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 40B0fSTw013224; Thu, 11 Jan 2024 00:41:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B0fS1k013221; Thu, 11 Jan 2024 00:41:28 GMT (envelope-from git) Date: Thu, 11 Jan 2024 00:41:28 GMT Message-Id: <202401110041.40B0fS1k013221@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 8923d34c6cbf - stable/13 - tcp: clean PRR state after ECN congestion recovery. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 8923d34c6cbf68d506abd9fcf8a790a77eb952ad Auto-Submitted: auto-generated The branch stable/13 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=8923d34c6cbf68d506abd9fcf8a790a77eb952ad commit 8923d34c6cbf68d506abd9fcf8a790a77eb952ad Author: Richard Scheffenegger AuthorDate: 2024-01-08 08:28:01 +0000 Commit: Richard Scheffenegger CommitDate: 2024-01-11 00:40:14 +0000 tcp: clean PRR state after ECN congestion recovery. PRR state was not properly reset on subsequent ECN CE events. Clean up after local transmission failures too. Reviewed by: tuexen, cc, #transport MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43170 (cherry picked from commit 429f14f83ae1f6357a9455d4f075522420b01b03) --- sys/netinet/tcp_input.c | 1 + sys/netinet/tcp_output.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 9a5b9b05f210..262e95d08071 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -529,6 +529,7 @@ cc_post_recovery(struct tcpcb *tp, struct tcphdr *th) /* XXXLAS: EXIT_RECOVERY ? */ tp->t_bytes_acked = 0; tp->sackhint.delivered_data = 0; + tp->sackhint.prr_delivered = 0; tp->sackhint.prr_out = 0; } diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 3e1a2320f331..834bce35f5ba 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1691,6 +1691,8 @@ timer: if (flags & TH_FIN) tp->snd_nxt--; } + if (IN_RECOVERY(tp->t_flags)) + tp->sackhint.prr_out -= len; } SOCKBUF_UNLOCK_ASSERT(&so->so_snd); /* Check gotos. */ switch (error) { From nobody Thu Jan 11 00:41:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9QpJ1hH8z56bvS; Thu, 11 Jan 2024 00:41: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 4T9QpH5v15z4JLv; Thu, 11 Jan 2024 00:41:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704933687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C1SBthQKoX3KQkncNs3ffTUt3Tu0nmzAhP3Jsteb+6Y=; b=Kl88IZsI+0wh+IPzTaCG61LEy3wkC+uX7OCunW2QEfC+MJs2x3vcupEkKLcucJGoM7TB8G 0JmZ2MyhAUTaJwyCNN1Yp2l9wT7yxNuJXecRAiJFc932YVOfyJ7jC1emh2jRXsDZE0IebU sRyaR6czkpUSD0JRjyB/cuMm1iW35+wrXESyhsWpWrRrXVqxqnfXwA6/l/HY/yYFfX7IgI BPFsHe+foxfSWIcoInPS1Bv2McZD/3wLZXGEwlgmRJr6p3TQ9F5A8PCE0TI5XxdqoRBxgl izhupKRH0migufWmgbbKWQmMOo3A9TnYIJMSDCoxjAcGX4UxdVAkzXtliZZ0/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704933687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C1SBthQKoX3KQkncNs3ffTUt3Tu0nmzAhP3Jsteb+6Y=; b=p1ubTFK4D1NikqJG98gl7c8GEbBd7LMF0m7ITB8WNM2m0SA1wDHK1GJwjS/Jbr767SNoJ/ 8ypaC976203o/AS4h8Jxwjk6gufbP6ZePmoslZJAYsE9TABmLYB4exDBfUytr18MyETfNa 3niMXUpF1Q0fZAJy+iHMGrnthhB71j4QxPWj6oUJp3G/f4xtNcZtEsB1fcoP47QtRrQjmh YkhMkbtbaFL7EBKG4RiHzpv+RFUC37US+QJAdOEFqkkouWJgaBI9+bN0hnc0ZLD31Iypzt xKDZGnlW5lkw/WFB+JC/S9g/dBwfLnFJKhDQXtQVt/qt+kD/HNt5r+sTX5i3gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704933687; a=rsa-sha256; cv=none; b=nOJsk9ffEoOjxgey/swU2KdSyiiOcanJLhjsbNBvlblj599rmFAiDIFpugVY6g3YYpbvKE BBLvNxYUPIGAQOVZzq+tj0xuYfTLZeyjhLzU0hvQkBhIJmlIV7p7kOCZwVcc/u8ctoomYp woDBfPujMyEycvFbGt5EIK9XDvXL7XBI2qNcuSIvM8bFROeaQeS1MHglM5wj4eHUFzN5iR AR4LVI62oqDbanwPuY0nd2xVkGK5r8phGkwugLDaYrGWrADp+rqq0yvmDGuz1vpnlulZcc KCzkJ0FseGfA3ZbYfrkRuIJlXHhxTrD57yQY7EWAWnh7E2BbnmvelfLscLM1rA== 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 4T9QpH4zz5zxBg; Thu, 11 Jan 2024 00:41: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 40B0fR9w013173; Thu, 11 Jan 2024 00:41:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B0fRTx013170; Thu, 11 Jan 2024 00:41:27 GMT (envelope-from git) Date: Thu, 11 Jan 2024 00:41:27 GMT Message-Id: <202401110041.40B0fRTx013170@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: d730ffcd6ad3 - stable/13 - tcp: Undo the consumption of sequence space by FIN in case of a transient error. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: d730ffcd6ad3da47d9a1af00a534a78861280f54 Auto-Submitted: auto-generated The branch stable/13 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=d730ffcd6ad3da47d9a1af00a534a78861280f54 commit d730ffcd6ad3da47d9a1af00a534a78861280f54 Author: Richard Scheffenegger AuthorDate: 2022-07-14 00:49:10 +0000 Commit: Richard Scheffenegger CommitDate: 2024-01-11 00:38:36 +0000 tcp: Undo the consumption of sequence space by FIN in case of a transient error. If an error occurs while processing a TCP segment with some data and the FIN flag, the back out of the sequence number advance does not take into account the increase by 1 due to the FIN flag. Reviewed By: jch, gnn, #transport, tuexen Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D2970 (cherry picked from commit 66605ff791b12a2c3bb4570379db0e14d29fca4c) --- sys/netinet/tcp_output.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 3ed4d34fd061..3e1a2320f331 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1684,8 +1684,13 @@ timer: tp->sackhint.sack_bytes_rexmit -= len; KASSERT(tp->sackhint.sack_bytes_rexmit >= 0, ("sackhint bytes rtx >= 0")); - } else + KASSERT((flags & TH_FIN) == 0, + ("error while FIN with SACK rxmit")); + } else { tp->snd_nxt -= len; + if (flags & TH_FIN) + tp->snd_nxt--; + } } SOCKBUF_UNLOCK_ASSERT(&so->so_snd); /* Check gotos. */ switch (error) { From nobody Thu Jan 11 00:42:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9QqR24tpz56cTN; Thu, 11 Jan 2024 00:42: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 4T9QqR1fzBz4JmQ; Thu, 11 Jan 2024 00:42:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704933747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=prvkYTjgGPnmi0LKOzzjxve1fNeGgKhWYYaVDKjQ1NM=; b=RVWRBijBJUw0Id7iramjKgYcGi2iNZVgEaYE20cfPc2JPvO5q/piw9+7cxOOzE4tJPPsfb uIX60lrruD1d9KWmaTcxe9MMNzxV9wNRoO2k7h6ohdPLJxrrCdkhY40ZRlDIDYJ1VGguXs H3eWiF2AMVPuxqeTeAKx+6uzQkW35DDWx3ee2EoH9uWMhnFuUp5wzotdo2gogTxRUzi/0H 6f9nVOiNxAHZoMaRiZJmrrQNBXrGmdYhEm3858EDANjmg5esJ7fqIBTuNteX5ea5rdpFx+ PnRF6hD7qrfcsGoTag/drQbhk8ViQatJNWl8vifb6OdoOLhkbn5b07pkj6LVeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704933747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=prvkYTjgGPnmi0LKOzzjxve1fNeGgKhWYYaVDKjQ1NM=; b=K7w/IBYN6ajS+7ZWheQnsO3ltMKufsoT9onvA1OXKYDzz63HBfbZbI3XGcfnw8zVwsOVUR AvUQMiNX0q0KzGkIfj9FP9gcTn5U4tEGfYUO8KqAuL8fPhWm7kTnqhyoNjSutIi1C9pHYp RcnvA7pfxwSKqnV0fWyoDucGYjI243q2GHvINrOLSU4hpSi7iAwQgrEk47aSOD11A4R8s7 O2zpEYkVXJi87YlgV7TZXOlrudw2cxL8GUzc1VnZ8IF/4YXaIqy3+Fj3F4o1CJ/ZWIhRi3 eP5aFt5lpePn6+CjDB4HSzZfUoApw+W0yxDYyX07crCrTFZoFN7x1wZ2/yFVog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704933747; a=rsa-sha256; cv=none; b=XuAZsnRrqXNoKUpEBN22yAWrmVJcDdLk5H4tBv0/r1fjDirB1ITuTGV94uCk993V184/Jt pGGsnvcOR77gQnuGZ67VSVAIQVF2JX8ezgI9s+1bI+fMPmhO2WgMRw7qt9g0ng8xvVCdZi 7nqYU/VANi7yXSAmVNX8T964QFCNIHCJxzUwdi0stzSvdA5jMDSpSuoXDKfWD3Rf5BCgCZ TRsTnjCEE0kMhvUcXRA6r7DD3iWqYeIXeuYUsyEciCjbpMFcpoUjCqDKvhTejM5mU6oOpB jaMNYgEf4sg33nCNQVK9Hfm1x49jZQV0lNe0gXhRcqRW1EGgwKf+AaTP4G+7cA== 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 4T9QqR0kW1zxSf; Thu, 11 Jan 2024 00:42: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 40B0gR5D020272; Thu, 11 Jan 2024 00:42:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B0gRJX020269; Thu, 11 Jan 2024 00:42:27 GMT (envelope-from git) Date: Thu, 11 Jan 2024 00:42:27 GMT Message-Id: <202401110042.40B0gRJX020269@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 407054ed4891 - stable/14 - tcp: clean PRR state after ECN congestion recovery. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 407054ed48916e8d19d0b8d0cb9f5df16a27c69c Auto-Submitted: auto-generated The branch stable/14 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=407054ed48916e8d19d0b8d0cb9f5df16a27c69c commit 407054ed48916e8d19d0b8d0cb9f5df16a27c69c Author: Richard Scheffenegger AuthorDate: 2024-01-08 08:28:01 +0000 Commit: Richard Scheffenegger CommitDate: 2024-01-11 00:33:53 +0000 tcp: clean PRR state after ECN congestion recovery. PRR state was not properly reset on subsequent ECN CE events. Clean up after local transmission failures too. Reviewed by: tuexen, cc, #transport MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43170 (cherry picked from commit 429f14f83ae1f6357a9455d4f075522420b01b03) --- sys/netinet/tcp_input.c | 1 + sys/netinet/tcp_output.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 2d7a6fa11b4e..9eefef3ea81e 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -487,6 +487,7 @@ cc_post_recovery(struct tcpcb *tp, struct tcphdr *th) /* XXXLAS: EXIT_RECOVERY ? */ tp->t_bytes_acked = 0; tp->sackhint.delivered_data = 0; + tp->sackhint.prr_delivered = 0; tp->sackhint.prr_out = 0; } diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 8efea91e116f..549218badcec 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1665,6 +1665,8 @@ timer: if (flags & TH_FIN) tp->snd_nxt--; } + if (IN_RECOVERY(tp->t_flags)) + tp->sackhint.prr_out -= len; } SOCKBUF_UNLOCK_ASSERT(&so->so_snd); /* Check gotos. */ switch (error) { From nobody Thu Jan 11 01:14:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9RXN4r8mz56gGl; Thu, 11 Jan 2024 01:14: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 4T9RXN4H71z4QHp; Thu, 11 Jan 2024 01:14:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704935668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TzfcxPEzdxNZbTrlWHYnljKm9Mj6tGE2dO0rj5m5g8c=; b=bkK5VArlHv9+IE/152SbvZ4FLmbp6LM5mSPiqzT2rj/CgVY4/KIpFaY4fjtjjughTeGcIe LB+BDjlbtrtV9spQoOIZ+KyqSD8YV6lnLL2qRWWheEr60u0Oh9fGtxwAdqHlg8nogdJ3dK EG2Cf6amzt4m9MixPEde2FfMNZSHOjg8nQM85tAclSw2eMTnSdJX6Gg1N/YO64saFwFwGk LEC1+faPBGhKbP8W6XKn0bnf4GruJ89+KsH1D9W1GvJ94DIM3NsGSL+i1VDUoPJZ9tcB/w 0oY3sXWf7pdqw6b9hqWzbvNFHAJGrG7kqgD2t3M69rOIzqlwBXe+7TH81m+rdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704935668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TzfcxPEzdxNZbTrlWHYnljKm9Mj6tGE2dO0rj5m5g8c=; b=fqMvXWe80tQ1K7IoO3jeyzhItz24xX7YG3AnPC20aOyM3jnnxIg1UK6wXnUXtX9KR/F6sF QBVkXlTIDYNl6z4ZVbBbsleYSITk9UsBAGUrix7eY/Wxi40m7RdvytWw4rpHy4Q2Ixshap DA+O34nHTbEZa67ktnFVjIaMa5mw/Eiy9D9OrFEDWtaT/caY5B2Ys/urKH+8PqRkK//bRX LViVFHturnof0HAf+PHRKvo8ttMdcsEGdPkb0nyspQ7rrESXMgWB3CdjiIp4DXb/oPj/9r cD/YdDFBZQEHXEDNdujDmJPoq3BUzchuuBhKBXuEHjiC4EZDrEa0uxl1b+QNDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704935668; a=rsa-sha256; cv=none; b=TVneXdlj09T5TNhMO7HflYI4fGxl6dLkVwkOt56t5QDDJNis6k+JIeCzKolYm3BUCCSrLG z+Vil++NXeUEvDGIx41C3pJZYAIi8w5y+3qtLCHzaiPP1/ECVMmhV+m2/8FyRX/LyPOoh1 puwHrLOu2ZsIWhtVLmUJspPlXXAfPYTa5iJB7l5LqzKCpufKFK+qIf8XE2PRe3UCDR7+4o iIcOxvJU8QWNnBZUBuAvnWhiiFDFElq1/dXQzsSKKAZN72RAngIWT1ckceYazUwT6mJZRU FhJuICrOtKoKFyL29GXeS7H+EEt8QgrXAmpzN68VUX/zZtCqjDH3W9CGN/VzqQ== 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 4T9RXN3Lrbzy8w; Thu, 11 Jan 2024 01:14: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 40B1ESBQ072273; Thu, 11 Jan 2024 01:14:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B1ESoV072270; Thu, 11 Jan 2024 01:14:28 GMT (envelope-from git) Date: Thu, 11 Jan 2024 01:14:28 GMT Message-Id: <202401110114.40B1ESoV072270@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 5c4da68ad785 - stable/14 - copy_file_range.2: Clarify that only regular files work List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5c4da68ad785e955976e7b73c281213abb85c23a Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=5c4da68ad785e955976e7b73c281213abb85c23a commit 5c4da68ad785e955976e7b73c281213abb85c23a Author: Rick Macklem AuthorDate: 2023-12-29 22:59:00 +0000 Commit: Rick Macklem CommitDate: 2024-01-11 01:13:23 +0000 copy_file_range.2: Clarify that only regular files work PR#273962 reported that copy_file_range(2) did not work on shared memory objects and returned EINVAL. Although the reporter felt this was incorrect, it is what the Linux copy_file_range(2) syscall does. Since there was no collective agreement that the FreeBSD semantics should be changed to no longer be Linux compatible, copy_file_range(2) still works on regular files only. This man page update clarifies that. If, someday, copy_file_range(2) is changed to support non-regular files, then the man page will need to be updated to reflect that. PR: 273962 (cherry picked from commit 84b4342c0d7ac8a3187309a978d41e6765154cc1) --- lib/libc/sys/copy_file_range.2 | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/libc/sys/copy_file_range.2 b/lib/libc/sys/copy_file_range.2 index c9fa593b7f4c..bcd9170842d5 100644 --- a/lib/libc/sys/copy_file_range.2 +++ b/lib/libc/sys/copy_file_range.2 @@ -23,13 +23,13 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 2, 2021 +.Dd December 28, 2023 .Dt COPY_FILE_RANGE 2 .Os .Sh NAME .Nm copy_file_range -.Nd kernel copy of a byte range from one file to another -or within one file +.Nd kernel copy of a byte range from one regular file to another +or within one regular file .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -178,9 +178,17 @@ are reset to the initial values for the system call. .Fa infd and .Fa outfd -refer to the same file and the byte ranges overlap or +refer to the same file and the byte ranges overlap. +.It Bq Er EINVAL +The .Fa flags -is not zero. +argument is not zero. +.It Bq Er EINVAL +Either +.Fa infd +or +.Fa outfd +refers to a file object that is not a regular file. .It Bq Er EIO An I/O error occurred while reading/writing the files. .It Bq Er EINTEGRITY From nobody Thu Jan 11 01:21:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9RhL2nYDz56h6C; Thu, 11 Jan 2024 01:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9RhL2LP2z4RNQ; Thu, 11 Jan 2024 01:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704936082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f0A7caeh/KeVSPgLSvb3noVkmrdRJOnv89dF6BTOjhU=; b=Z7ylAbusq7mXpI5TfTYXTAbQQxpVBFBERDRN36BOnGYQKwNAfO6a2nwRjgEhll1fKcFMeg VRKijohSm264+2o4YOL1DexrKi88YbXmCL3RV5kHrurXw8AwuzBb5UMauGGdZvkyTzL1gT c/Vt7AbizEpk46eWpmsbNgxrm5l7GU1dWriNGO4uOMX4VjsIXdvLCN0UGl3w2w8f2nAuyr X7cpNT47nKpSUJFhnxXgG1smUunzGtR8YBwMGDG+n618ZxQix9HuVdTLOjvVEn1olxUYbE 3r5KpMCaLxUgG5GymRGqiwY1+NWd2LurM/7qcw1PUa2a1390EUzwmqKanLOyyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704936082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f0A7caeh/KeVSPgLSvb3noVkmrdRJOnv89dF6BTOjhU=; b=dsdZK8Uv8TqyB05a+xFgnolbzxSP9NsqpQkKX2BuyXJEgqaCuJJWif41XxIxsUX2u38R0I Zh/eeM7yMVGMFfRLL0VjW0JAYefTZGB+exzmVimsASoW4HNviHVbsVEk4GVmiyU7Zyt9n1 Wi7CxUSrgWtAVXsvsEjzbVQapwM+WaRhKgClfpvN+GD73I6gDedWe8UH2YzTYaOfTF1r4O f6JYRJFBLFli6RunmCI7ecO0Yc2dQQHMPTySMxCtsFUi7kz+miNQuXiR5N+0WjSMVKDtn0 kk/vrFrt2mESL9AzWKekwgP2rOrz3gu8KkQ53MNzOY/iX1zQepZEBFqWdxdc3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704936082; a=rsa-sha256; cv=none; b=mDYKmhDizvkOg/6v5fmKhpxtAmqKFdM1G1PYgNQzsgMqjN/XLiVgRDVYHMXSxIr2G/r0C0 53RxuBL0l6Q0R3jCkbeAZxnAe+uUC/nMbNxjx9SnWd2tkdu+O6yN/9LSsN2tU/m13dlXFj gv5ho49tbJk54LME0liSCGO6b14KVfeA5qHxM0b/G40NTMx3MKNAps+xLn1zg+lrh/vr5x 11+sazefL3gMNoM99acHZG7Obj5R/Jc1zit6yGFGKFMIzGXVeJuxkHaz9UooX2Ew2yQKci aPlp5+AdOpYpaH/P5T12TmwgH2KLRLg7n+6FmojU3Z1t77NwPQHp1t/oD992/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 4T9RhL1QFczyX5; Thu, 11 Jan 2024 01:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40B1LMHI085145; Thu, 11 Jan 2024 01:21:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B1LMln085142; Thu, 11 Jan 2024 01:21:22 GMT (envelope-from git) Date: Thu, 11 Jan 2024 01:21:22 GMT Message-Id: <202401110121.40B1LMln085142@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 6561a7141b56 - stable/13 - copy_file_range.2: Clarify that only regular files work List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6561a7141b5603235d18538f6c66322ed7fc67d3 Auto-Submitted: auto-generated The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=6561a7141b5603235d18538f6c66322ed7fc67d3 commit 6561a7141b5603235d18538f6c66322ed7fc67d3 Author: Rick Macklem AuthorDate: 2023-12-29 22:59:00 +0000 Commit: Rick Macklem CommitDate: 2024-01-11 01:20:35 +0000 copy_file_range.2: Clarify that only regular files work PR#273962 reported that copy_file_range(2) did not work on shared memory objects and returned EINVAL. Although the reporter felt this was incorrect, it is what the Linux copy_file_range(2) syscall does. Since there was no collective agreement that the FreeBSD semantics should be changed to no longer be Linux compatible, copy_file_range(2) still works on regular files only. This man page update clarifies that. If, someday, copy_file_range(2) is changed to support non-regular files, then the man page will need to be updated to reflect that. PR: 273962 (cherry picked from commit 84b4342c0d7ac8a3187309a978d41e6765154cc1) --- lib/libc/sys/copy_file_range.2 | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/libc/sys/copy_file_range.2 b/lib/libc/sys/copy_file_range.2 index c9fa593b7f4c..bcd9170842d5 100644 --- a/lib/libc/sys/copy_file_range.2 +++ b/lib/libc/sys/copy_file_range.2 @@ -23,13 +23,13 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 2, 2021 +.Dd December 28, 2023 .Dt COPY_FILE_RANGE 2 .Os .Sh NAME .Nm copy_file_range -.Nd kernel copy of a byte range from one file to another -or within one file +.Nd kernel copy of a byte range from one regular file to another +or within one regular file .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -178,9 +178,17 @@ are reset to the initial values for the system call. .Fa infd and .Fa outfd -refer to the same file and the byte ranges overlap or +refer to the same file and the byte ranges overlap. +.It Bq Er EINVAL +The .Fa flags -is not zero. +argument is not zero. +.It Bq Er EINVAL +Either +.Fa infd +or +.Fa outfd +refers to a file object that is not a regular file. .It Bq Er EIO An I/O error occurred while reading/writing the files. .It Bq Er EINTEGRITY From nobody Thu Jan 11 01:23:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9RkR3K6lz56gLJ; Thu, 11 Jan 2024 01:23: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 4T9RkR2jRSz4SkL; Thu, 11 Jan 2024 01:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704936191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TGOuRl9fxyNWKJCX61gld5pg5WzgGw7MRp7alcnMKDI=; b=NPsJgkMW7XYuI+5T1KHoIk5fQY4+0qL2A/kzpXV8ToVzlsFwRsolkQVLTicOo62t0UdlCq 3zyofl3IPNSSrAumzj/T3B4QrQORt/TgV5wBUDhgA0L7HBKVaftK9P/3bVWg8A3PJl8AC5 bHC6TiiXYcgduzFX7TYksoktdIGWr2aGk/2Wsx2TpSsYokQprvBGvYc4JakvX01tNFEGuK W99KTM1v74Dv9Y1QsjdAR5okox3c2CEPrw55i4Do+SnexpxLvvvycz3da0KpnG/sX0wRyb Dr+DnAUPZ0fYRFvk81pgx9Gcdqd6sw9hCLPbBZICGCHKARcLpV4/4uTwIKxdbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704936191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TGOuRl9fxyNWKJCX61gld5pg5WzgGw7MRp7alcnMKDI=; b=XZzK3cKjY7IfnRZtQr1m6xAr1RVk7Ne3zkgy2yjLFaev4e9WUaIZSqsTCzin0ZF52r14/l LqTu8cns8EVoMaL0TtUg5cTP+Y3qUXFZZ+Uhc+6O9SIxPe3zQ2zJh63YnZ9X90G1cFy2CL AKubhOhfYDVEK2u0mk5hm8HnmKDRhPAgldWMga7izRBGt3Ofnz2XNA8sS2uPzjcI4J9au5 MTHnSYPHrKrbwo3qibpOOM58ObGZnZRrE4gqrMJ78Q8wZX1lnqB/kxshT0yhgZbe037dsX HEdp0chMpGWLg9ahIeLTu9UylxX1VcT0Zt3bn0+b9AkhUaxZFXG3vlMXrjb8kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704936191; a=rsa-sha256; cv=none; b=gE4mG8zpAaxaQcNM1NOIa7vFsNJqF+bQhGeL/94TRLsDhqiz9sXf4WgAdjbbX3tUiBm2Y3 XDhEkR9LYJ1BnX/ZUe+sES1r6hZEtfqp8h9ChSDdAYwVCuoQWSGPhy9wQhhMCct4AV3BWV A8jYtXelXs67zwvicqMujdTnu5yowUrAY2GPVYUKS2kdDHvMxovFB3WzpHacRXmXB8pOZY 7CciZFjqNcfYYuIb3x+A1bCwzk+gI14f4zhcZpboAvioGVhdInZrV+VFdn1dTW2FbYO2mJ a4j1EpZlU06uF+j4dgHoNLcSg3GqO1VDDqDFdHc5iOwIQkkmqSwzGfSr6AaY/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 4T9RkR1lxBzywP; Thu, 11 Jan 2024 01:23: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 40B1NB0x088857; Thu, 11 Jan 2024 01:23:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B1NBlr088854; Thu, 11 Jan 2024 01:23:11 GMT (envelope-from git) Date: Thu, 11 Jan 2024 01:23:11 GMT Message-Id: <202401110123.40B1NBlr088854@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 3a89a5d54daa - stable/14 - udplite: fix checksum computation on the sender side List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 3a89a5d54daa4d044b3f2b36c44f72c3333e3284 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3a89a5d54daa4d044b3f2b36c44f72c3333e3284 commit 3a89a5d54daa4d044b3f2b36c44f72c3333e3284 Author: Michael Tuexen AuthorDate: 2023-11-01 09:24:56 +0000 Commit: Ed Maste CommitDate: 2024-01-11 01:22:52 +0000 udplite: fix checksum computation on the sender side Don't fill the fields of the UDP/IP header not used for the checksum computation before performing the checksum computation. Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42275 (cherry picked from commit aa64a8f5c35c13b1c325f1a4597c987a37bec5da) --- sys/netinet/udp_usrreq.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 75dec9d5f5aa..4ea0efad3491 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1330,8 +1330,12 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, * into network format. */ ui = mtod(m, struct udpiphdr *); - bzero(ui->ui_x1, sizeof(ui->ui_x1)); /* XXX still needed? */ - ui->ui_v = IPVERSION << 4; + /* + * Filling only those fields of udpiphdr that participate in the + * checksum calculation. The rest must be zeroed and will be filled + * later. + */ + bzero(ui->ui_x1, sizeof(ui->ui_x1)); ui->ui_pr = pr; ui->ui_src = laddr; ui->ui_dst = faddr; @@ -1356,16 +1360,6 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, cscov_partial = (cscov == 0) ? 0 : 1; } - /* - * Set the Don't Fragment bit in the IP header. - */ - if (inp->inp_flags & INP_DONTFRAG) { - struct ip *ip; - - ip = (struct ip *)&ui->ui_i; - ip->ip_off |= htons(IP_DF); - } - if (inp->inp_socket->so_options & SO_DONTROUTE) ipflags |= IP_ROUTETOIF; if (inp->inp_socket->so_options & SO_BROADCAST) @@ -1399,9 +1393,16 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, m->m_pkthdr.csum_flags = CSUM_UDP; m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum); } + /* + * After finishing the checksum computation, fill the remaining fields + * of udpiphdr. + */ + ((struct ip *)ui)->ip_v = IPVERSION; + ((struct ip *)ui)->ip_tos = tos; ((struct ip *)ui)->ip_len = htons(sizeof(struct udpiphdr) + len); - ((struct ip *)ui)->ip_ttl = inp->inp_ip_ttl; /* XXX */ - ((struct ip *)ui)->ip_tos = tos; /* XXX */ + if (inp->inp_flags & INP_DONTFRAG) + ((struct ip *)ui)->ip_off |= htons(IP_DF); + ((struct ip *)ui)->ip_ttl = inp->inp_ip_ttl; UDPSTAT_INC(udps_opackets); /* From nobody Thu Jan 11 01:23:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9RkS4SHbz56hL5; Thu, 11 Jan 2024 01:23: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 4T9RkS3wTRz4Sh0; Thu, 11 Jan 2024 01:23:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704936192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kBUq6wHRy8TZjRisIVgj8Ri3P/eBB4UJKEiFg6Up3S4=; b=iZ5YK+pwTdpmsbhVn4vqjLQXnWuHALRsZZP09nZqt47jf2n3Svo9mRwsqRqHH9ZK4c5M/J kjQEDg673EBIjqexmWpLSwgF2qry70Wigunbfa0nxDfpGj+1Fyfu9zBPTjbuguYmqz02qW TwDuSAoytHqFjeL3JI3L4yIa1vYg0yAEQBxEQTj0TnbLqmIp33mr9kAyk+1nX3GvASbRPP MdBDxiAb027UUufOVOzp7GsMc/fFHeY9SWRx8dByvwPGH27HFYGGFeKN4khwE0HaFWnX6G EJT498yVS8Ov7G+Bh/P6xLg35qNz+E5ABffOfwWG0n3zcozvJngsnmmfDIawCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704936192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kBUq6wHRy8TZjRisIVgj8Ri3P/eBB4UJKEiFg6Up3S4=; b=G8728ji1nXU02b+d5GK+xnWa79OjexotsRpZGQopo/ssf3JUTnv1sDlT/bpNmB6cbcGDXw PVx/dkVdXxQ1sWS709t7SW0niMXUuLh6chK8nVF4zdVwKs59qCsXbr24lYRHb6sQmpLFHB 7OY+5ToJ+ArQY/56HLcT02m0ex896haBFSaBE871tQUZf67A5WCvXjBgSipTkBOCh2H0wo uwynbMXL42pZKV7NSsnplC6CiQAoD29mOoTgJdyX5NIdonfgys3X+pmqFj5FJqTJZ3+Z+r hBy/7fKD0K+uiVg+OvyIDZFAnbEemQXmzMDxcBQuA7FXXogZMK+gIe1OTX2GpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704936192; a=rsa-sha256; cv=none; b=w8dddyOKy7/fA6/+EzkawVG0Rp0BZ94bN3Hb4SftgswphmrVKUrGcGOieHnhCXd8naim4N 59Z4ElEY8aaTekTHGlCfhJMM+BIqy9JvvpnfLdZHLkt2qmVtyQ9k5fy2dQRseXgMiwwX/4 uzIe8F4zDh0lvhishV5QDPe2tdAdg0I/+doXYQ7yJK89fuHCKvkDA8BKkB2/+/awDdrJkw fUpexdTIVKHuwwWHUWJbMMRcPXUpmgqv+YNxEkiAC1rqP5muUmQj8c83PzRKKP3gGd8es9 cntW3CU3NUpRenMJg84dkNx1OegH6rEfgP/11ylMhcmZ7q2k8LeclqPhcRndGA== 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 4T9RkS31c3zyk3; Thu, 11 Jan 2024 01:23: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 40B1NCVo088905; Thu, 11 Jan 2024 01:23:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B1NCQj088902; Thu, 11 Jan 2024 01:23:12 GMT (envelope-from git) Date: Thu, 11 Jan 2024 01:23:12 GMT Message-Id: <202401110123.40B1NCQj088902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: a4925f0f8cf7 - stable/14 - udplite: make socketoption available on IPv6 sockets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: a4925f0f8cf76c32140d7c2077aa9628de20630f Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a4925f0f8cf76c32140d7c2077aa9628de20630f commit a4925f0f8cf76c32140d7c2077aa9628de20630f Author: Michael Tuexen AuthorDate: 2023-11-05 14:28:54 +0000 Commit: Ed Maste CommitDate: 2024-01-11 01:22:52 +0000 udplite: make socketoption available on IPv6 sockets This patch allows the IPPROTO_UDPLITE-level socket options UDPLITE_SEND_CSCOV and UDPLITE_RECV_CSCOV to be used on AF_INET6 sockets in addition to AF_INET sockets. Reviewed by: ae, rscheff MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42430 (cherry picked from commit 03c3a70abe5e9fa259b954de78ae69229fa9c99f) --- sys/netinet/udp_usrreq.c | 8 ++++++++ sys/netinet6/udp6_usrreq.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 4ea0efad3491..7329600ecc79 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -897,6 +897,10 @@ udp_ctloutput(struct socket *so, struct sockopt *sopt) #if defined(IPSEC) || defined(IPSEC_SUPPORT) #ifdef INET case UDP_ENCAP: + if (!INP_CHECK_SOCKAF(so, AF_INET)) { + INP_WUNLOCK(inp); + return (EINVAL); + } if (!IPSEC_ENABLED(ipv4)) { INP_WUNLOCK(inp); return (ENOPROTOOPT); @@ -944,6 +948,10 @@ udp_ctloutput(struct socket *so, struct sockopt *sopt) #if defined(IPSEC) || defined(IPSEC_SUPPORT) #ifdef INET case UDP_ENCAP: + if (!INP_CHECK_SOCKAF(so, AF_INET)) { + INP_WUNLOCK(inp); + return (EINVAL); + } if (!IPSEC_ENABLED(ipv4)) { INP_WUNLOCK(inp); return (ENOPROTOOPT); diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 35d68e164145..c8b38c24d193 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -1243,7 +1243,7 @@ udp6_disconnect(struct socket *so) #define UDP6_PROTOSW \ .pr_type = SOCK_DGRAM, \ .pr_flags = PR_ATOMIC|PR_ADDR|PR_CAPATTACH, \ - .pr_ctloutput = ip6_ctloutput, \ + .pr_ctloutput = udp_ctloutput, \ .pr_abort = udp6_abort, \ .pr_attach = udp6_attach, \ .pr_bind = udp6_bind, \ From nobody Thu Jan 11 01:25:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9RmX2c6Pz56hW6; Thu, 11 Jan 2024 01:25: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 4T9RmX1nG3z4T6c; Thu, 11 Jan 2024 01:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704936300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nZ6PYsSVVdSwaZLSNJEbsJPx4GYvzVv0MDuHkcuW+k0=; b=rnMAzBTa6JgJqjy7jhIUJMYcbdpMFaJVhLKZm7Gb19wdQI3QfKZy1+HPO1W6RBKDWQDBbN lIiOc1SRlfCbV09+OPP4KmgMOysJS2ZGIYqfHOyIHwfQV1TvgpsEQowBEOM0ggAMYf40qn Krh9oaqqIUeV+1z5ymnj/Qhx4npEDLwO8H/GQRvFPjeNu42+5SYsOqgLM+8ClpY6K/oRBm r423nI7C5Y54w1vtIDw8FTogFbrdFK9Mt7Nol91LCTTjBUbKXM0edmpUtOS7xuHpsSoXPa NqPuhjvOCILVM4qdWuhVVCSg4FqXmHovC0VOGXeYmbpN/P3TpvM5BBXOHVthWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704936300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nZ6PYsSVVdSwaZLSNJEbsJPx4GYvzVv0MDuHkcuW+k0=; b=FSH57zQl6Vr6JVoPHevZd7mglRRUq6+T97cLcmbUhoLLIfoI5yzVcgj1m6Pr4fDUl36cl3 rHamrW9bEONcIXUC5TI3ShiygIHOWF6f0TTcN38sUF+z1P8aPMvzcgK2oHrgkn0Kry1Mzj fCjFDw1ZzOf3uQQv9YbqYl5zh78oVgbpyPVrLiI8M1Lqv7BYn5vyn99DjsJmJ9vCrqNcMt MnkRIEpKV7PVZys8In6pXaksmZMt0MWr3SJBYN6jx95f/bGvm72HY321VTlDo1oikcFilI xe/o4lvAi+Uk8KjEPISuQmM1kfPurcEcqXS6sF+I0c44aWnIi/EpN04OD50T3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704936300; a=rsa-sha256; cv=none; b=wHi/Wtbk7A+Pc01F607M3GIL/ftAC3ox4uo24PotyS+g+6a8vHlaMya690Zzo5+Mmkz7r8 gJZ5DhXmfiuedycts6g/AuNNEXEQK3am5UOvB3UUjyWEHM/4Uas6nryWcMV/1ZRNmVepXa Cw+rIpxdg7wlJtAVqJ67Nt/113XibwV3UwkQDknWHnCeLBV2wMT4iDl9KsiyCsgFpabfTz Sd4ToucgPKsBESvjePvDur6yzAp20IC1YIa+V2lSNUhxZJlWqcRgz7kRpILg6XTfmBKN3/ zpt/sfgEmagzLP2K66lHi5diefYkyQt7MFfD77tyjA3RTN2O9y6xxf7v6esPzw== 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 4T9RmX0qZhzyRj; Thu, 11 Jan 2024 01:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40B1P0T5089238; Thu, 11 Jan 2024 01:25:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B1P083089235; Thu, 11 Jan 2024 01:25:00 GMT (envelope-from git) Date: Thu, 11 Jan 2024 01:25:00 GMT Message-Id: <202401110125.40B1P083089235@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 01641167c966 - stable/14 - efibootmgr: provide explicit error message if run as non-root List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 01641167c9660e98122c3f6174878d534a83b57e Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=01641167c9660e98122c3f6174878d534a83b57e commit 01641167c9660e98122c3f6174878d534a83b57e Author: Ed Maste AuthorDate: 2023-10-15 17:21:52 +0000 Commit: Ed Maste CommitDate: 2024-01-11 01:23:56 +0000 efibootmgr: provide explicit error message if run as non-root This should be less confusing for new users. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42213 (cherry picked from commit c08ba4a588d517e3c5fe00cee0927294d2490993) --- usr.sbin/efibootmgr/efibootmgr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.sbin/efibootmgr/efibootmgr.c b/usr.sbin/efibootmgr/efibootmgr.c index b0d023e3539c..8dcf9876486d 100644 --- a/usr.sbin/efibootmgr/efibootmgr.c +++ b/usr.sbin/efibootmgr/efibootmgr.c @@ -1101,8 +1101,11 @@ main(int argc, char *argv[]) /* * find_dev can operate without any efi variables */ - if (!efi_variables_supported() && !opts.find_dev) - errx(1, "efi variables not supported on this system. root? kldload efirt?"); + if (!efi_variables_supported() && !opts.find_dev) { + if (errno == EACCES && geteuid() != 0) + errx(1, "must be run as root"); + errx(1, "efi variables not supported on this system. kldload efirt?"); + } read_vars(); From nobody Thu Jan 11 01:25:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9RmY3X4Cz56hCt; Thu, 11 Jan 2024 01:25:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9RmY2kp5z4TBP; Thu, 11 Jan 2024 01:25:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704936301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ncvc1W1H0e4qVKLPA+HNHci+LZqH0g/ihXRCmaF4R8I=; b=SiQd5i41j8BlsCwjP275ffUqmJPHJHhGObfxGg4DTOSdGIY7yg8SnHQFpHj1a8VPf2mlrB 0+HhIpC8oMu/eqyueXQpxVIkJ+g053TSNsv/hwn/ycWoHOqWT0ONqBXbPo5GfQ9Xjjxsq7 U6MMjer06Zkov0FmV/Ttzg1Kb9PahG7bc9lL5jxoEj+k85FbfxXcCd4igimU2PmSJp08gM zOTluPGMpWDus7NBLs+CGj67pRLTI9zFqBqUYFynir1Bur3lzy4JlP9TXC40sWpJFysnfR ONU+letZKjwYseJ/vIquBHfG7fW1IeP/9NlZJsLWGEVmZ5JtCpWqXwjEN7RCuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704936301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ncvc1W1H0e4qVKLPA+HNHci+LZqH0g/ihXRCmaF4R8I=; b=oFTSiBCK/v+JNEUAG9yhON3HTUcbkyNtKEyxofytvMNhptO97t6X/UoKvDrZtJYxxRIPUo +I+WYX9jtL+m47H/NghbNkpPTrkHlmXQhXnE5dvjWcH4DqmTnUYeh3VKYaW103wCfbE9iM z5nfaKLktLDpMNCy6LBnwUKGeOpmggyAMBNJLwuUnSDrxvvcTmePmcm8GfmbDC6eI/QXsE zbvjQA9VXCqId2SA4uRDEkFWwEBRdr0sqd7YIBb8b7XzGqqwjeqiXDGzvqapp9RVo87ywd pzoxdyrVaR0PAIM2XhdXTFactb8dq3P1hvPJT43oX3O1mJFSIGyOV6L/Mpf2FA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704936301; a=rsa-sha256; cv=none; b=p+fz6A+mvwYvhKDkfqi0FgTbYxk4CTcS7vKfRgVZmPBkzOWwqjKvFXuMBv1yi4Zkhpi/RE tYA88jW4zhvjL6n4f07AgJPA+TewZeXQWa6khNsFw5AmZQwb7jtTQhKVyaQY45Dmq6jHOL 8+QSa7YHjoTmqW/KOADAaS0aP8LqOXf5UDj6M6m/kO+fIhG8XcT+b2y8P22D2dlR6Ohoyw 7/nb0Feskqh+TRxciQ0rHzG0NZfdq89gUvy+cJIZI/+z+oDkoEoVkl4rp4aT/hM/mEWUQ1 /nim6AYI06xhnYXkS/dR/U+69XJ/xgviM0XyKSXDkWt1YcxEMdBxqJV5uY3FPQ== 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 4T9RmY1qx8zywR; Thu, 11 Jan 2024 01:25: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 40B1P1io089287; Thu, 11 Jan 2024 01:25:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B1P1KN089284; Thu, 11 Jan 2024 01:25:01 GMT (envelope-from git) Date: Thu, 11 Jan 2024 01:25:01 GMT Message-Id: <202401110125.40B1P1KN089284@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: b4d11915c73f - stable/14 - intrng: switch from MAXCPU to mp_ncpus List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: b4d11915c73f199501672b278be86e1f63790036 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b4d11915c73f199501672b278be86e1f63790036 commit b4d11915c73f199501672b278be86e1f63790036 Author: Elliott Mitchell AuthorDate: 2023-09-26 17:06:04 +0000 Commit: Ed Maste CommitDate: 2024-01-11 01:23:56 +0000 intrng: switch from MAXCPU to mp_ncpus MAXCPU could be on the large side, while the hardware may not have many processors at all. As such only allocate counters for processors which actually exist, rather than always allocating for the maximum potentially allowed number. Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D41462 (cherry picked from commit 2f0b059eeafc545a4ab1835d6a5290e1e2ebb47f) --- sys/kern/subr_intr.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index 6535c42f2404..49fe20cdc890 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -175,11 +175,11 @@ intr_irq_init(void *dummy __unused) /* * - 2 counters for each I/O interrupt. - * - MAXCPU counters for each IPI counters for SMP. + * - mp_maxid + 1 counters for each IPI counters for SMP. */ nintrcnt = intr_nirq * 2; #ifdef SMP - nintrcnt += INTR_IPI_COUNT * MAXCPU; + nintrcnt += INTR_IPI_COUNT * (mp_maxid + 1); #endif intrcnt = mallocarray(nintrcnt, sizeof(u_long), M_INTRNG, @@ -312,18 +312,18 @@ intr_ipi_setup_counters(const char *name) mtx_lock(&isrc_table_lock); /* - * We should never have a problem finding MAXCPU contiguous counters, - * in practice. Interrupts will be allocated sequentially during boot, - * so the array should fill from low to high index. Once reserved, the - * IPI counters will never be released. Similarly, we will not need to - * allocate more IPIs once the system is running. + * We should never have a problem finding mp_maxid + 1 contiguous + * counters, in practice. Interrupts will be allocated sequentially + * during boot, so the array should fill from low to high index. Once + * reserved, the IPI counters will never be released. Similarly, we + * will not need to allocate more IPIs once the system is running. */ - bit_ffc_area(intrcnt_bitmap, nintrcnt, MAXCPU, &index); + bit_ffc_area(intrcnt_bitmap, nintrcnt, mp_maxid + 1, &index); if (index == -1) panic("Failed to allocate %d counters. Array exhausted?", - MAXCPU); - bit_nset(intrcnt_bitmap, index, index + MAXCPU - 1); - for (i = 0; i < MAXCPU; i++) { + mp_maxid + 1); + bit_nset(intrcnt_bitmap, index, index + mp_maxid); + for (i = 0; i < mp_maxid + 1; i++) { snprintf(str, INTRNAME_LEN, "cpu%d:%s", i, name); intrcnt_setname(str, index + i); } From nobody Thu Jan 11 01:28:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9Rrg2Tr4z56hYM; Thu, 11 Jan 2024 01:28: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 4T9Rrg1j7dz4Tpv; Thu, 11 Jan 2024 01:28:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704936515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G+n95o/CxJTweVosF04FW2kFAWVau1WHO2UbTmvGuzM=; b=WrPglSiMOpGrbekizd04WUvR6m3ROOl167/jhEQat3vuJRSGA7mqhyhGWajNrHjJkDer0G YsvZEiBztL60BV/xUincYhdELT33grYxdotQ9gcMWQk6cEGMaQpM8YJldqIRsvlp+NrCAO BciPqCLNpL50RgFcZPOyNUcSxdBl2ZJwdm/LuAaziWiha/hseF1PpIBmEaTV3gtUZ0o0TY uD1GtGqon81MiLu0UIBhHxD5sx7SeBtQjjcXftSnmXformZNNESZpXqOejLFj31kvW5gqP zDlEA/txnAkwKnNbRuSCYtwkvxOcTISYRu3oLh0/PU35+8a+9wMtca4I5RCW7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704936515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G+n95o/CxJTweVosF04FW2kFAWVau1WHO2UbTmvGuzM=; b=Vrcv0z2w7VNj+zghx0vrdt3UsLvklGe4NAvF6QdfURUg/3jrRhFTqnOLWNKGkslQ7iIBJs RgpzxOWLBhHq9ayI7GCqgadG00wjT+EcjH7iQ9M483M4aqBUuGw87FQ+b65/EBgJlPFlGu GIAfGSQ/825pyv6GJiTPdrKXVyUCMJ0bW/y3AxZAjz0lMtimCubgHh6V1AEy/s3qDuKb4v OPFi6KtMb4kNrt5nFUP7sY6W6MYkeuChFB3jVGRfATkE2VHXdmb+ohO2+yfcplxmEeOzTi BCAl3N64XpCvfpM7QXQgu//7fDGaiIhyePQpEkUbGXyIY7eujr7IR6Z+scnTgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704936515; a=rsa-sha256; cv=none; b=el3p5U3RM2xngPko6cLpqE1fObztCPbmtgvRjmhXvhestTIRGKkw3XaVjtId4GR91GnbQ7 9U73YeE+L9nOGgiMgNRqMWK9ypJ+L4nBRP6CePmcf/leKd7xzYmJfn7c9VU1NS5lwX2BuQ LOrP2HM5IjNH/O38nwgmXyVFOJWJc1DIbqreyiGSOjXAh6VJLDfxdTjAL8U8cd9zZxWgO6 ukWH/bX+zSqr8YFDbfF6RmeSU+t7iImy8B8vQqGBjgveqAlWu9yBW97EvS2ARKPk4WjAw6 qaz0X1IihLi9Dplpjy85qoEkrFoWyOjEGPxuyPErHcludqbIqx17KKaSwdU7Rg== 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 4T9Rrg0mLjzymT; Thu, 11 Jan 2024 01:28: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 40B1SZfc089894; Thu, 11 Jan 2024 01:28:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B1SZoM089891; Thu, 11 Jan 2024 01:28:35 GMT (envelope-from git) Date: Thu, 11 Jan 2024 01:28:35 GMT Message-Id: <202401110128.40B1SZoM089891@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 47c22dcb5e2c - stable/13 - efibootmgr: add missing break for 'u' case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 47c22dcb5e2cf6b4888517287f97ba81ecbbb29c Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=47c22dcb5e2cf6b4888517287f97ba81ecbbb29c commit 47c22dcb5e2cf6b4888517287f97ba81ecbbb29c Author: Ed Maste AuthorDate: 2023-02-23 14:52:14 +0000 Commit: Ed Maste CommitDate: 2024-01-11 01:28:27 +0000 efibootmgr: add missing break for 'u' case Reviewed by: imp, zlei Reported by: Coverity CID: 1505695 Fixes: 9a7915299484 ("efibootmgr: Add --efidev (-u) to dis...") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38747 (cherry picked from commit 17a5a290032ef75ed4aa8a2aa68b3a7e08935c1c) --- usr.sbin/efibootmgr/efibootmgr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/efibootmgr/efibootmgr.c b/usr.sbin/efibootmgr/efibootmgr.c index b779d7572070..b0d023e3539c 100644 --- a/usr.sbin/efibootmgr/efibootmgr.c +++ b/usr.sbin/efibootmgr/efibootmgr.c @@ -287,6 +287,7 @@ parse_args(int argc, char *argv[]) case 'u': opts.find_dev = true; opts.dev = strdup(optarg); + break; case 'v': opts.verbose = true; break; From nobody Thu Jan 11 01:28:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9Rrh2stJz56hkL; Thu, 11 Jan 2024 01:28: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 4T9Rrh2SL1z4TsL; Thu, 11 Jan 2024 01:28:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704936516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k36IPm8tX540YWbqnsBsXDcynC+fPmoqES2HbU1CWSk=; b=vleTbp6Z9Kpy6RhB0BEJG7GKtpGKt8OVXRYesubvcxzFXuqUqywZtBxR7x/MSkgLTEiqnz 0llJIieuEs3fHjcBKwLlFT//Obwkz05ZssaGAk/TB3nk0kt8hXLc/JKch/qGmw5b59Chyn C+AhkkTJL72HrVziA5pI2tSt4y7uPYfQopSuJ3mr+l+phQKTAOyLyMIxxqqxpji6jvWMH1 n3YweDnDIzSMDAWjY76qSdyJRF6p/reJ8YRVpqNRSbQ+ySOEkjbzBe1EahxGb1eu2H0cgl Tf8HKBuqsEVBLn8K3ch8k/NlooYmtTgc3MwGUNtwIIr9oJ6EVrtamFnV4QmSTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704936516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k36IPm8tX540YWbqnsBsXDcynC+fPmoqES2HbU1CWSk=; b=sudSZDYDZoILd11YJaFSpYHOFbNf4MBlxLt2uNhrS+GX/1LcjEegvJPR4ego5QcLisrgjg xGb9CwrfdRU2jED0y8wMfeRZ8yBe3DsC7DTRHIgbQVAAUWRw0DDqkQsdH6j7xocxotvM1V K54GckZ5EJLQx1Q29foxHUKZ1vP7NlcQEFLRZ9iCOxdi5WB/egJV/6iZOgyOtsdiFHuBj8 Gf/TYxXcLQtVpYlDnr5j5fuzUKVRCsN7ls/JuIE3pwACiCHtH3HcDpK9bJB5hpu3euYsKi dNixxICZ0nhQnClG1oUDHiyYENrzWjEQ7mazi2MyONqkJ/+pYbHinKvykLJAmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704936516; a=rsa-sha256; cv=none; b=dufdMKX5Xbm/3vCF8RzA4DwTp0Z7fpdY/o7Fqt/SrUsiKH90HWjpN7gNUjygO0Fj4EDpQT UIpMxWweGZeejuKjPpolWSlT+acX94omFmMtpw79fGfPLly4oDn/a8fuTiademO7OS3MoP xVsPMjTBdMXZV8IWVlibRIyPKzyOG0ySs8mwDnysnZoiY5OxwxiQ1z9MxQ/mAkl5SQxtxe 9JFYkxjEDzqFKjLGeV4B2PesKyWoclh9EE5FBfbyzMVbsSAImKmRhLWXY2imXbhK6huf6J uEt/N7wiE/WGbm1BF+3Vpzn4TB0yANRdI1nilIjleK4dhzCPvYNtvNJfArOReA== 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 4T9Rrh1YwkzywV; Thu, 11 Jan 2024 01:28: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 40B1Sara089951; Thu, 11 Jan 2024 01:28:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B1SaqN089948; Thu, 11 Jan 2024 01:28:36 GMT (envelope-from git) Date: Thu, 11 Jan 2024 01:28:36 GMT Message-Id: <202401110128.40B1SaqN089948@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 0b0e479d052e - stable/13 - efibootmgr: provide explicit error message if run as non-root List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 0b0e479d052e4018a90b1ca98f7bcffb8ffd817d Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0b0e479d052e4018a90b1ca98f7bcffb8ffd817d commit 0b0e479d052e4018a90b1ca98f7bcffb8ffd817d Author: Ed Maste AuthorDate: 2023-10-15 17:21:52 +0000 Commit: Ed Maste CommitDate: 2024-01-11 01:28:27 +0000 efibootmgr: provide explicit error message if run as non-root This should be less confusing for new users. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42213 (cherry picked from commit c08ba4a588d517e3c5fe00cee0927294d2490993) (cherry picked from commit 01641167c9660e98122c3f6174878d534a83b57e) --- usr.sbin/efibootmgr/efibootmgr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.sbin/efibootmgr/efibootmgr.c b/usr.sbin/efibootmgr/efibootmgr.c index b0d023e3539c..8dcf9876486d 100644 --- a/usr.sbin/efibootmgr/efibootmgr.c +++ b/usr.sbin/efibootmgr/efibootmgr.c @@ -1101,8 +1101,11 @@ main(int argc, char *argv[]) /* * find_dev can operate without any efi variables */ - if (!efi_variables_supported() && !opts.find_dev) - errx(1, "efi variables not supported on this system. root? kldload efirt?"); + if (!efi_variables_supported() && !opts.find_dev) { + if (errno == EACCES && geteuid() != 0) + errx(1, "must be run as root"); + errx(1, "efi variables not supported on this system. kldload efirt?"); + } read_vars(); From nobody Thu Jan 11 04:52:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9XMY2n8dz56Pg4; Thu, 11 Jan 2024 04:52: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 4T9XMY24ysz40X3; Thu, 11 Jan 2024 04:52:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OYDqz5WxzK2EDUKVZzou94ut5S+Q70c5uPGcg6l5Yb8=; b=qCV9Jzf6hpMAps83nvmrrWNgg9CpKUz7k6xlFvxvMNLBJa3nLIOiFxMmCaT6Kq4hwbIYzW LFPknpwS21DbITCfrquPUiD+YJSJ2LpPCsnkG2fubT124KuuhsOhFKDCwTgrGOrebr4i8P lFYVSpyWjwb2+fySGpK7WxhHX3Zesy11GunuPVg21My5SYDaEOMd/lGSgVLyQpjew3GFsv KAu8p0EIzi2m2OkuPrvwV4lv2nn0OtwAz2YmIu9ujLFB5bpARjvPRmx6MKRFHs720+5pz8 XSLOunuLrwtzlgHAphvpZDTgyzvf9yO2hUTpQa+FwLmOXH0KarOdDcCf/IRdDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OYDqz5WxzK2EDUKVZzou94ut5S+Q70c5uPGcg6l5Yb8=; b=Kr4tTQmqpm6YRJ4Iwgti2WjAleYIt56ITo48hU0BA5Ci3EfhCkMjxOZSRoL2BkaN94cu43 w3CZmJQ1t5ItC+uBfvDwKLpNJCYEQOwlA0jlOOs4BgYwi/PzOuvN5jwCMyd0VdRchjKSE9 oPtqN7IaHs7x0y2iiZ6Xdcz3ZOCoYquKoVIuycbWeBk45e4vocbGUJTGRQjBalm+cKa82t i/+SvwqNoVBUqF7XA9rFTl+dxDZP6IbTdvG/AW+mtp19NNF90XvJnsMLoRbHE8YRLfmtG1 bU3Ffr5vcWwgmzOVl1leZH6TRFsKJj2BHFH5pWjnBYQPQNLe1+99EcAZcmh8Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704948729; a=rsa-sha256; cv=none; b=grf8BJCzxoSg/oMYK2E9c44VyGIgjQXrznOYiiI6uGuKSdSlAVqG19w/1lyhvdWMjyf3rS ab8LpLBGOQOLvxDiMHHFEUGwzwmDUYYyXrFnvD/mpoxjYnXjD1JupHuCnLZnvCSzvF1+bs SjJfwEgqePZZlT5PxYDNycSrghtcQZtivMFXxsZ25jsKqRzGgAs+OBQCVDF6+KLraFDWGS MtTw780gIJOq5jpmL8vyinpXj6Nvi4WCHMh2J611XUrghWCGunrccLchrYpShLu+W7YDl5 fRnY9wb4HJl9MzJJ5khv7viblBn3aw/0Mel6i+UizfiaZLtANbL+Cm/UFF5hrg== 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 4T9XMY18Fjz150s; Thu, 11 Jan 2024 04:52: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 40B4q9Da041416; Thu, 11 Jan 2024 04:52:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B4q9tn041413; Thu, 11 Jan 2024 04:52:09 GMT (envelope-from git) Date: Thu, 11 Jan 2024 04:52:09 GMT Message-Id: <202401110452.40B4q9tn041413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 6ee181b9d5f0 - main - tests/net: enable if_clone_test:epair_ipv6_up_stress List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ee181b9d5f00cfe337419370ba4590d939cce84 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=6ee181b9d5f00cfe337419370ba4590d939cce84 commit 6ee181b9d5f00cfe337419370ba4590d939cce84 Author: Gleb Smirnoff AuthorDate: 2024-01-11 04:51:53 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-11 04:51:53 +0000 tests/net: enable if_clone_test:epair_ipv6_up_stress The panic mentioned was fixed in f5a365e51feea75d1e5ebc86c53808d8cae7b6d7. PR: 225438 --- tests/sys/net/if_clone_test.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/sys/net/if_clone_test.sh b/tests/sys/net/if_clone_test.sh index de7384d9053c..864ff86a7d44 100755 --- a/tests/sys/net/if_clone_test.sh +++ b/tests/sys/net/if_clone_test.sh @@ -284,7 +284,6 @@ tap_ipv6_up_stress_head() } tap_ipv6_up_stress_body() { - atf_skip "Quickly panics: if_delmulti_locked: inconsistent ifp 0xfffff80150e44000" do_up_stress "tap" "6" "" } tap_ipv6_up_stress_cleanup() From nobody Thu Jan 11 04:52:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9XMZ55NDz56PRX; Thu, 11 Jan 2024 04:52: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 4T9XMZ2mJ5z40Qg; Thu, 11 Jan 2024 04:52:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e8x4dxX/+gEgBJOWNsmEn9vueeWtiO0JQW99L/Vj1ik=; b=TPcn/qOoaQMz/XbV8ZYF1HqNTz9bVu5PKmnzaBCJnAERJfK6590RadxM/a/mhgnEnw7cnj jfRoQOqh37J28x4fBbN0J/vB0A8DEA00omPmIoHihOaxNjjRuRlJ9md5xYvklV+ZboMLJR Hed4+hy87GGFOsqvz8lZohQ8FZrVc5OVjTTP7na3BFRjFDkWsUq+0B92sXvgyTTLcChCeT LPWybfcCVNOYPoVl8dll2TyT1/b+TRvksGsb3WT7Vh+maj0tYl/tFfJrNHHe6QSdYezJEq o1pKt5gDK99gRWwolLBMUn7ExJEn/4jf34RHl1fJiucIO21OPgjlh41h1DwFbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e8x4dxX/+gEgBJOWNsmEn9vueeWtiO0JQW99L/Vj1ik=; b=eB6GOZ7KPqChU6GSZxCVVFGvYm4RTwtt2JPMlv5v3ACPAgcefZP56WczumXMaC5UXpKZ6D 75JUBi+Wt/8xAWhdyl3OJYaXE/euDxBz944mJqAdupeiHrBuK2NnOpySRAorZzjhyYHCaK NofEIessfNb4LxXhv39XnaZ0rzop28C9AFgAEEDnAcTftAJwN3b0VxXUw/E9k/sG4VWkuo apPrj3g+WAx6GJQkNngBE0Z8R0R3AvaeAD4CNq8Pcpi15X91cjrfAZ08z6GjBo7yluXcKt 3FYtxL2ZGhD/H+KMdxxFARmVWx/TgClJxS0IAPVYvrI6ReIchkkj9Um387qiDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704948730; a=rsa-sha256; cv=none; b=UsNSQSiTqlos2dT+2HKuhT6RTkN9GZixRzeqpXZ7G2AyVbOoMMtuW6gB87vHqwbWyaso7U nB2lP9mZ92p2yr2IX4EQsWq6q/IDHcasAUEuKJgwIOWVBjGJl0fV291OZj/dfq+91FA+nf JXhslCtfxmD4hcE6FwFwVaoJFzOfHVD/jScvBlfXLTnVMaw/W6Oa6mUvLjNzluuVtbDaKw CVytHnrnVp8RP7SwkQrhCoo/SGuWBH0n+AFCRTdfJg/1T64dHZE5aA2/il5gT1V3u2etHg jGGtCoNOADhhMyUWm0RBnXdRhhbWEIKNDq4HRw+LqUGkHYw02QmElaFkFljeFg== 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 4T9XMZ1r8wz14lb; Thu, 11 Jan 2024 04:52: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 40B4qAWF041467; Thu, 11 Jan 2024 04:52:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B4qA5i041464; Thu, 11 Jan 2024 04:52:10 GMT (envelope-from git) Date: Thu, 11 Jan 2024 04:52:10 GMT Message-Id: <202401110452.40B4qA5i041464@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: effa0f6c0aad - main - tests/netlink: mark a test that requires tun(4) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: effa0f6c0aad54a07917af6986d71cd0a57223b8 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=effa0f6c0aad54a07917af6986d71cd0a57223b8 commit effa0f6c0aad54a07917af6986d71cd0a57223b8 Author: Gleb Smirnoff AuthorDate: 2024-01-11 04:51:53 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-11 04:51:53 +0000 tests/netlink: mark a test that requires tun(4) --- tests/sys/netlink/test_rtnl_route.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sys/netlink/test_rtnl_route.py b/tests/sys/netlink/test_rtnl_route.py index 20f2c3ce3ee2..370c8a74a2de 100644 --- a/tests/sys/netlink/test_rtnl_route.py +++ b/tests/sys/netlink/test_rtnl_route.py @@ -48,6 +48,7 @@ class TestRtNlRoute(NetlinkTestTemplate, SingleVnetTestTemplate): @pytest.mark.timeout(5) def test_add_route6_ll_if_gw(self): + self.require_module("if_tun") tun_ifname = IfaceFactory().create_iface("", "tun")[0].name tun_ifindex = socket.if_nametoindex(tun_ifname) @@ -68,6 +69,7 @@ class TestRtNlRoute(NetlinkTestTemplate, SingleVnetTestTemplate): @pytest.mark.timeout(5) def test_add_route4_ll_if_gw(self): + self.require_module("if_tun") tun_ifname = IfaceFactory().create_iface("", "tun")[0].name tun_ifindex = socket.if_nametoindex(tun_ifname) From nobody Thu Jan 11 04:52:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9XMb60TRz56PjV; Thu, 11 Jan 2024 04:52: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 4T9XMb3Ppxz40XB; Thu, 11 Jan 2024 04:52:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/KWehZoBD+8S3U9zsIX+Ml1dCH75ohHXIehKwhGOits=; b=O9tzfqHTALChocCc9bjcJ4Kz7DwlJN5FjpC4q/7hJmwlYcWVYoiqLN9RcsxN5kpTfwPY1s G7XMPRNxgnkbvF56b0240979BPz/KaQJE6VNtKYw2ff6J3PNiRLxS5Xpu+K1vwX0IU1uhF H30Rv/jP4L/G3z0WSXMIE7CRN3T3pd8n+rPM3sji+VpwMWT6wgWFi7LBgNrl3AmArYq/NU 4uT2kF66xeaUDq++/1/Av2efpPMxinzsZJpn/4N+6xJRcilxtaPql4Et5D/SvIhyYAaZ6O XcwsuhU1gyJzYH+DqiEbbMp6nzy93x400AetRqi9oiArN+zL1O8AXICNDqWw6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/KWehZoBD+8S3U9zsIX+Ml1dCH75ohHXIehKwhGOits=; b=O39BDkq/H5OOV8UY3n7u+bVrzh27T04vp2TdviXqPFiMZ5Knw0zQWxRuV5VQ7y5B3Ag31Z NqSMS3vYSHc0Ho1OYOpTEGxDxxrfpEGBc+N/X1p26KR36Q40UVmJNpJv6YouuC3CyIMqnH rHqIHRQA036B+1HzJ8RzpvReaAg41WYGkk78Vl3XMA+0GNFKUFw3+FuVlyThNI4cL3+B8K y7al6wqoG4Uji2opwr4J+FUF/jPVvXWmoFhuTdT2gFO/9i0h2oJncAHdZEon3W12L/46cG sWCfYl3Mi1rHSJ/wpFhPcX9NvkoJpPEePjZLZEybkM6WTsUsGTvpYuirFXdgiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704948731; a=rsa-sha256; cv=none; b=Egvf8GQSPHw0JFA/p1JhF9elpJ2XoU1X14wYj7j4AO9OS2fcY/Q/JbnMyDgZ+w24AphuXG REhzQZNTVOp0QzfUO3jf4wHsYLKCXaeacPV62hOQwBqDyTk27qKLglnP/yN633MHhIYoF6 Ynu8VVOAGq481SnUtbaTCcyrLOrESX6K+KdEe78+WyhV7kAYE1mlUNnmzo0cr9WJJteZtp NqiX4AvZGCjiOog0VfxFhRjnfCaJR+fmkv+uED8gzcQd4wkcNdONLs7DJgdq69W9rvzEeZ 9Ua017L3zvVmAXw668+EnKjHf5Mu8nZETl85Gnobwx2roo1z1y00UnCh0bpr+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 4T9XMb2VJgz14Bd; Thu, 11 Jan 2024 04:52: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 40B4qBZP041509; Thu, 11 Jan 2024 04:52:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B4qBCN041506; Thu, 11 Jan 2024 04:52:11 GMT (envelope-from git) Date: Thu, 11 Jan 2024 04:52:11 GMT Message-Id: <202401110452.40B4qBCN041506@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 26caf57e0b0c - main - tests/netlink: improve recently added netlink_socket:membership List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 26caf57e0b0c02771b58ed99bc37b4810249d58e Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=26caf57e0b0c02771b58ed99bc37b4810249d58e commit 26caf57e0b0c02771b58ed99bc37b4810249d58e Author: Gleb Smirnoff AuthorDate: 2024-01-11 04:51:53 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-11 04:51:53 +0000 tests/netlink: improve recently added netlink_socket:membership Change sequence of syscalls: instead of "add, delete, check, check" run sequence "add, check, delete, check". Seems to make more sense. Do minimal parsing of incoming messages: find the IPv4 address there and compare it to the original. --- tests/sys/netlink/netlink_socket.c | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/tests/sys/netlink/netlink_socket.c b/tests/sys/netlink/netlink_socket.c index 3015a585199b..6dcc894b6695 100644 --- a/tests/sys/netlink/netlink_socket.c +++ b/tests/sys/netlink/netlink_socket.c @@ -256,6 +256,19 @@ ATF_TC_BODY(sizes, tc) cmsg_check(&msg); } +static struct nlattr * +nla_RTA_DST(struct nlattr *start, ssize_t len) +{ + struct nlattr *nla; + + for (nla = start; (char *)nla < (char *)start + len; + nla = (struct nlattr *)((char *)nla + NLA_ALIGN(nla->nla_len))) { + if (nla->nla_type == RTA_DST) + return (nla); + } + + return (NULL); +} /* * Check that NETLINK_ADD_MEMBERSHIP subscribes us. Add & delete a temporary * route and check if announcements came in. @@ -270,7 +283,7 @@ ATF_TC_BODY(membership, tc) struct in_addr dst; struct nlattr rta_oif; uint32_t oif; - } msg = { + } reply, msg = { .hdr.nlmsg_type = RTM_NEWROUTE, .hdr.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_EXCL, .hdr.nlmsg_len = sizeof(msg), @@ -286,19 +299,32 @@ ATF_TC_BODY(membership, tc) .rta_oif.nla_len = sizeof(uint32_t) + sizeof(struct nlattr), .oif = 1, }; + struct nlattr *nla; int fd; ATF_REQUIRE((fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) != -1); ATF_REQUIRE(setsockopt(fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &(int){RTNLGRP_IPV4_ROUTE}, sizeof(int)) == 0); + ATF_REQUIRE(send(fd, &msg, sizeof(msg), 0) == sizeof(msg)); + ATF_REQUIRE(recv(fd, &reply, sizeof(reply), 0) == sizeof(reply)); + ATF_REQUIRE(reply.hdr.nlmsg_type == msg.hdr.nlmsg_type); + ATF_REQUIRE(reply.rtm.rtm_type == msg.rtm.rtm_type); + ATF_REQUIRE(reply.rtm.rtm_dst_len == msg.rtm.rtm_dst_len); + ATF_REQUIRE(nla = nla_RTA_DST(&reply.rta_dst, sizeof(reply))); + ATF_REQUIRE(memcmp(&msg.dst, (char *)nla + sizeof(struct nlattr), + sizeof(struct in_addr)) == 0); + msg.hdr.nlmsg_type = RTM_DELROUTE; msg.hdr.nlmsg_len -= sizeof(struct nlattr) + sizeof(uint32_t); ATF_REQUIRE(send(fd, &msg, msg.hdr.nlmsg_len, 0) == msg.hdr.nlmsg_len); - ATF_REQUIRE(recv(fd, &msg, sizeof(msg), 0) == sizeof(msg)); - ATF_REQUIRE(msg.hdr.nlmsg_type == RTM_NEWROUTE); - ATF_REQUIRE(recv(fd, &msg, sizeof(msg), 0) == sizeof(msg)); - ATF_REQUIRE(msg.hdr.nlmsg_type == RTM_DELROUTE); + ATF_REQUIRE(recv(fd, &reply, sizeof(reply), 0) == sizeof(reply)); + ATF_REQUIRE(reply.hdr.nlmsg_type == msg.hdr.nlmsg_type); + ATF_REQUIRE(reply.rtm.rtm_type == msg.rtm.rtm_type); + ATF_REQUIRE(reply.rtm.rtm_dst_len == msg.rtm.rtm_dst_len); + ATF_REQUIRE(nla = nla_RTA_DST(&reply.rta_dst, sizeof(reply))); + ATF_REQUIRE(memcmp(&msg.dst, (char *)nla + sizeof(struct nlattr), + sizeof(struct in_addr)) == 0); } ATF_TP_ADD_TCS(tp) From nobody Thu Jan 11 04:52:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9XMc6nPKz56PjX; Thu, 11 Jan 2024 04:52: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 4T9XMc4WpCz40Lj; Thu, 11 Jan 2024 04:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ovMU9FU3KOPstT/sokHle8HZvPY9cAu+SrixlLVC1DE=; b=dfnM4s3lPzszfkAVmMJ8IFXtfZ7bT70rNEJ+EWoV2/8CR5qTFak4Cwzw5gN3wtHWGMmZgZ 0oN/h8iTL3gDAjEoTUb+H3IKTu/EiCuLYIlaSLPjPBMMSdUZhfcvUotzNo0Y6xDLSwyR0f pUDKt/JFe/az7NO7obOcY62XZg70WJKA8KV6k/paqcN6ZNHmn6CiqO0x1fobWeYDDhZlrX wzmGmKpUZ03zgzjN8S085+w3WCeEAFb+JcchXOsy7oa6Rwc8EWpzdrk+W/ODypfNHTyfbu ZuYIE5vmVr0LV94Q4BxFG1MRR0aX7Dg6pKN2mmVwEmy/fD1PIYzk3XgwWJFkHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ovMU9FU3KOPstT/sokHle8HZvPY9cAu+SrixlLVC1DE=; b=YRYYYWW2ERusenFdIWsP6ZX72UkNMOTwH3ozvqm9DjiVk5LfUMP47WtLgvVMTPM8d7/fej AXRMbwNtQtP3rfPIfWCCD7CtHZ7GvBRZoTsqImqULi/CuHJvyMvfMQxeHVFEQQSOt5jAiN nqLyMGcrYOoEP0nLFtUqe8HqYG0mRv+qjpIbSu9q0FveIiRdaW8PQOShncSWW+RAprDjEJ UnItVqymH7HlbPiFBPEZgk4tKh3tTNyaOIVgofeAktCpsVH43BvFSg48mdFWAFOtLMJUTg UK7RLLoK8MEnDcGkA0HOXrmhdX/rDh1KMBkTbcPI0E7XoMB7GzFnGjizr1BwsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704948732; a=rsa-sha256; cv=none; b=BP++09CYDnOw+pW3k6LsRY+6oLjd0ngBOAd0f8cw6cfhEvLJZ8p2ToMC+kZSlxgOSYbKmS u8AmdqSaSFInZZi0kKF1sdh5Htndjelr9ZFMhKQ+LzO+gnBNE4/2qd2umPqrvg6Vb7zjim uZ2hh8wf2srh8SsrmaUrDia9Sh/IyE9xaH2JFf09+6uVLrobgLMsDG7z7RVfA7/4XA7Uuk 4rYPBepY3cu2ZCEnhC37Jq5MMaiRrkh5ISLOy0fr2WmVcDpk35zZ81AvgDCrrIdxjipJJg OocdU75RaNXR72ZdD3bIVdA607TtZaEByGzAjRguFSEAmfON3yOqpkHeKqWe9Q== 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 4T9XMc3YGvz14Wn; Thu, 11 Jan 2024 04:52: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 40B4qC7v041572; Thu, 11 Jan 2024 04:52:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B4qCTq041569; Thu, 11 Jan 2024 04:52:12 GMT (envelope-from git) Date: Thu, 11 Jan 2024 04:52:12 GMT Message-Id: <202401110452.40B4qCTq041569@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: e6f4c3146065 - main - netlink: improve edge case when reading out truncated last nlmsg in nb List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6f4c31460658697827aed7f29ec6e960d6f0a87 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=e6f4c31460658697827aed7f29ec6e960d6f0a87 commit e6f4c31460658697827aed7f29ec6e960d6f0a87 Author: Gleb Smirnoff AuthorDate: 2024-01-11 04:51:53 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-11 04:51:53 +0000 netlink: improve edge case when reading out truncated last nlmsg in nb When there is not enough space for one full message we return it truncated. This enters special block of code that previously may leave empty buffer with offset == datalen in the queue. Avoid that, as dealing later with empty buffers causes more pain than just avoiding them. While here add missing msgrcv increment. --- sys/netlink/netlink_domain.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 4790845d1d31..94989af73dfe 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -762,11 +762,23 @@ nl_soreceive(struct socket *so, struct sockaddr **psa, struct uio *uio, } else if (len == 0 && uio->uio_resid > 0) { flags |= MSG_TRUNC; partlen = uio->uio_resid; - if (!peek) { - /* XXX: may leave empty nb */ + if (peek) + goto nospace; + datalen += hdr->nlmsg_len; + if (nb->offset + hdr->nlmsg_len == + nb->datalen) { + /* + * Avoid leaving empty nb. + * Process last nb normally. + * Trust uiomove() to care + * about negative uio_resid. + */ + nb = TAILQ_NEXT(nb, tailq); + overflow = 0; + partlen = 0; + } else nb->offset += hdr->nlmsg_len; - datalen += hdr->nlmsg_len; - } + msgrcv++; } else partlen = 0; goto nospace; From nobody Thu Jan 11 04:52:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9XMf061pz56Psv; Thu, 11 Jan 2024 04:52: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 4T9XMd5Rspz40Nf; Thu, 11 Jan 2024 04:52:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0NiGnVdArcqsHethmyJEuFrWPD2ZdwNQ+MWInW1cYa8=; b=D+jTwHmzl0QviJQvINOCIvRQpSF0956I6XPHShX1/A89gqKa0dW1nulnn3Q83Or1SM2u4s 07w8HhDQDN7flP5/mylwrIO0c1BmUCR9jZ7ZCm/5ZU0i0FuoQieX1MCYZNxkKR40rAyBzt sClhLQ5TqruMqRx/AogoQQbkMDW+WW83D1JUMUpJRZiEZvJfavs4U7QRAc4lWhuP3iq4WD cPSnvV9tA6X+Er2zjh/HRH48TflFClX4J09cgo4PeFT8K5U717wX8QQv0zOEI7i4uSqscv f8udwEhvh/x741KQNrhej/yZpIIyW27mtQTkUGj6sZunyj4LwU9AoqrR69Pgmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0NiGnVdArcqsHethmyJEuFrWPD2ZdwNQ+MWInW1cYa8=; b=je+jidk5k0fvV5tvinx0+TujPEOa3kqa2DzhufC0TfWF70uMDvKZ5MoCHTE27cc+D6ReOC qS/mWuS5TRvWXUcO3s0TU2NFq24y0x0bkF17XTzhHYmM4vvK/BXfkSE8/vuFVsYJBlKJ3w 4on0xWEjsR9pK9gpr/JEikVaUsgCSdSmU9yoSTEAvJN8Q9FyOzkuZPHxigwtRo+44WN7ce JjFl3fDOxg1M4C9iQTW7I0TZROTinyoPwxYRLIVTsY4uXTOK/6laEuldsnl6qThSvgencF gsCRNv13G+UTrfvR3cvhdZvEj8ZV9CSHFzUARKxnxp25rAIi9lZEepkEbgNTEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704948733; a=rsa-sha256; cv=none; b=uTq19YzingLkKASnUTirQK4K6/UgLl6D5G8i0rRLYRTnC39inRwzr2a1XbtRmD3oVhCgqB 822HJFwZMBqdIYZTObI6YcFvtE31ISvT9/xIYPQayUWfAaVtPwhN6/v9ykcv5dwSkdpItp dTSPqyXTIbP06qft8AW6T476euh7OQBnCgGNDFXk39v0CVtyGTky/kvN/4C/O2UHqzSD1Q rbEi4RXkD6oO4FFk8SJVio+3e6AcRFu0HLNdNbQw1ev6YbNwUBLzhYvbfv6psl8kL2H04Y MzzFb0cuc0zAJUHWXycFyDWTNQ/mbmmhd/ddwFDaPf/BhAVZiSe2izkDazKBSA== 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 4T9XMd4YWBz14yN; Thu, 11 Jan 2024 04:52: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 40B4qDq8041627; Thu, 11 Jan 2024 04:52:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B4qDOK041624; Thu, 11 Jan 2024 04:52:13 GMT (envelope-from git) Date: Thu, 11 Jan 2024 04:52:13 GMT Message-Id: <202401110452.40B4qDOK041624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: f75d7fac109b - main - netlink: avoid putting empty mbufs on the socket queue List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f75d7fac109bf8e322b07456c5361ee62f5635c2 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f75d7fac109bf8e322b07456c5361ee62f5635c2 commit f75d7fac109bf8e322b07456c5361ee62f5635c2 Author: Gleb Smirnoff AuthorDate: 2024-01-11 04:51:53 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-11 04:51:53 +0000 netlink: avoid putting empty mbufs on the socket queue When processing incoming Netlink messages in nl_process_nbuf() kernel always allocates a writer with a buffer to put generated reply to. However, certain messages aren't replied. That makes nlmsg_flush() to put an empty buffer to the socket. Avoid doing that because avoiding is much easier than dealing with empty buffers on the receiver side. --- sys/netlink/netlink_domain.c | 7 +------ sys/netlink/netlink_io.c | 2 ++ sys/netlink/netlink_message_writer.c | 11 +++++++++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 94989af73dfe..7ecafbf99d26 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -740,12 +740,7 @@ nl_soreceive(struct socket *so, struct sockaddr **psa, struct uio *uio, TAILQ_FOREACH(nb, &sb->nl_queue, tailq) { u_int offset; - /* - * XXXGL: zero length buffer may be at the tail of a queue - * when a writer overflows socket buffer. When this is - * improved, use MPASS(nb->offset < nb->datalen). - */ - MPASS(nb->offset <= nb->datalen); + MPASS(nb->offset < nb->datalen); offset = nb->offset; while (offset < nb->datalen) { hdr = (struct nlmsghdr *)&nb->data[offset]; diff --git a/sys/netlink/netlink_io.c b/sys/netlink/netlink_io.c index 5f50c40f71d8..61d9d657556a 100644 --- a/sys/netlink/netlink_io.c +++ b/sys/netlink/netlink_io.c @@ -201,6 +201,8 @@ nl_send(struct nl_writer *nw, struct nlpcb *nlp) struct nl_buf *nb; MPASS(nw->hdr == NULL); + MPASS(nw->buf != NULL); + MPASS(nw->buf->datalen > 0); IF_DEBUG_LEVEL(LOG_DEBUG2) { struct nlmsghdr *hdr = (struct nlmsghdr *)nw->buf->data; diff --git a/sys/netlink/netlink_message_writer.c b/sys/netlink/netlink_message_writer.c index 50305e3d9d80..59bc6aabaa3f 100644 --- a/sys/netlink/netlink_message_writer.c +++ b/sys/netlink/netlink_message_writer.c @@ -100,6 +100,7 @@ _nlmsg_ignore_limit(struct nl_writer *nw) bool _nlmsg_flush(struct nl_writer *nw) { + bool result; if (__predict_false(nw->hdr != NULL)) { /* Last message has not been completed, skip it. */ @@ -109,8 +110,14 @@ _nlmsg_flush(struct nl_writer *nw) nw->hdr = NULL; } - NL_LOG(LOG_DEBUG2, "OUT"); - bool result = nw->cb(nw); + if (nw->buf->datalen == 0) { + MPASS(nw->num_messages == 0); + nl_buf_free(nw->buf); + nw->buf = NULL; + return (true); + } + + result = nw->cb(nw); nw->num_messages = 0; if (!result) { From nobody Thu Jan 11 04:52:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9XMg2smMz56PPT; Thu, 11 Jan 2024 04:52: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 4T9XMf6sdzz40Xx; Thu, 11 Jan 2024 04:52:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cd/foy3TbtE+vTvbklZTpJexNMSkyTtwDccXdn7MT1g=; b=F4/dy0vXRVxwRBQrmb3+y/h5rUzGXi3J+Uho5Ku8niNmYTxD6Fvl3wOQNmFUzK8tF5/N2Y wchZUIIZsaG1e7pfmf7FF+4DE/F1FcFan+zCf0T1PLoHaZ343VMEbg0eQww6t26kF2nrMC nt6lrE6AxukepxYxlX/aKkiTeUzBVfpKQMgrl9eBAa+BBdRXHaZ6lBJanxs5ZhJi2Q8NvP G13sngC0L0sg4TPqy01SuLNG3VARoNi7rwiwIJrDyZ8jfo6u9jnw0BsmquGRcsSXLGdCdo iE+Btgs6kkI7qwBKXhbKqoZDgmY15tpPyLONc+rTBau3x6UaVOnYOBARmBmJcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704948735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cd/foy3TbtE+vTvbklZTpJexNMSkyTtwDccXdn7MT1g=; b=ShsUK46e+D1suVlqMixMge/Uj8i36PPOGEsuIClwQ3RbjQaMi8ZFji7NlzUfc2UR5O5emH +Kl2RJlC++Gci+AKZmJL9elxgD4AjbEwW5rv6fxWGDVWlGseqKhf4kUMbGN/5KE2rGq6uO yNNRUiTvKhSItJTJf6L/41etgcAe8ItRBjwb+DbAZZWN64e4HxemUuAZcid3SXt3HJpUD6 X8HKUazvrEN+++747bQoNcJqbhCUbAyDg6MMWvxoITVaVmNOp383kEJUKS2byKYRsM+b28 2V4uFFFZGKCkhp1NQbmezgxl4dxGlDB2JTNPDcSYnjHQoddyfUiL0J+cSqj93A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704948735; a=rsa-sha256; cv=none; b=dHCnFAOCO/FnOeUjX33u7Yp+ZaUU7prqFcPkcbUIaQXSHRi6fGALM4Y9gUiZck3DLkS1Yd nZ6TmnZBZwOyosAyEe5g7GzJOs+1dpSEPyKcGnoRjyogv9c9EhV0VAslP4goQnjAkKKEVc u3jeLVFQBhkZ/CPFDgnn1B+A2kY/a/MuGXsxhZT2JTbUqotaCTzvrk0RY/IJ4PS+1weF4m SHKzzKNGTVJuoKFpbTjqCPOnjKrcNYGwExkHvAB5KiHaxBjBK92W/xp32WNPpaICTzw0Xu ydTxeNoDD6nRkoBV9s6KuimWJ1b/2Ov3/2Kf7aPSkDNIXdL9Fr1Vq41nBKrXAw== 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 4T9XMf5y3Rz14ld; Thu, 11 Jan 2024 04:52: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 40B4qE38041685; Thu, 11 Jan 2024 04:52:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B4qEaU041682; Thu, 11 Jan 2024 04:52:14 GMT (envelope-from git) Date: Thu, 11 Jan 2024 04:52:14 GMT Message-Id: <202401110452.40B4qEaU041682@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: d9b1f6fbf993 - main - netlink: fix bug with socket buffer character counter underflow List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9b1f6fbf9935a9d54c78987a04af7cda3740c56 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d9b1f6fbf9935a9d54c78987a04af7cda3740c56 commit d9b1f6fbf9935a9d54c78987a04af7cda3740c56 Author: Gleb Smirnoff AuthorDate: 2024-01-11 04:51:53 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-11 04:51:53 +0000 netlink: fix bug with socket buffer character counter underflow Cover case when an nb that we are now reading in full had been partially read by previous read(2) and now has positive offset. Throw couple assertions that helped to catch that earlier. --- sys/netlink/netlink_domain.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index 7ecafbf99d26..777aff43000a 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -744,6 +744,7 @@ nl_soreceive(struct socket *so, struct sockaddr **psa, struct uio *uio, offset = nb->offset; while (offset < nb->datalen) { hdr = (struct nlmsghdr *)&nb->data[offset]; + MPASS(nb->offset + hdr->nlmsg_len <= nb->datalen); if (uio->uio_resid < len + hdr->nlmsg_len) { overflow = len + hdr->nlmsg_len - uio->uio_resid; @@ -784,7 +785,7 @@ nl_soreceive(struct socket *so, struct sockaddr **psa, struct uio *uio, msgrcv++; } MPASS(offset == nb->datalen); - datalen += nb->datalen; + datalen += nb->datalen - nb->offset; } nospace: last = nb; @@ -796,6 +797,7 @@ nospace: TAILQ_FIRST(&sb->nl_queue) = last; last->tailq.tqe_prev = &TAILQ_FIRST(&sb->nl_queue); } + MPASS(sb->sb_acc >= datalen); sb->sb_acc -= datalen; sb->sb_ccc -= datalen; } From nobody Thu Jan 11 05:33:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9YHS3915z56VSB; Thu, 11 Jan 2024 05:33: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 4T9YHS2bTdz45s7; Thu, 11 Jan 2024 05:33:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lpMIfhMSNQ3e7kvim8Z6DWiRNJ/9t1fyVspI0XtKsRA=; b=lgOmLgNDIDw0chgyup/C4hdd68C4jM8cRTRr9S6E0gsBJFKq0g2LZ+n04NMZ/VgZmvBdak 9ZbUvztazng1FLtXqM5rqzfPKWhPG/yS6WJuky9nGDHsduzOlGDQcc6foVcRldqeydXloJ Z0tS75RgG3NEWzB3D+jjLfRMn56/RsDkb1HjEhkFS5IOlDrfmbgEwxMsUQDW5aLT9aURDA tGpA4yT4Wwfi82LRYHtJmPRHe1X2vCXyxpZRvd5C/lSOFTwZSLV5xUR+sfTaB2lD+7aGa+ xLtAGP+NM1LP6rEs+JEOG+uwW1nQkjqcWBiD81CmABQq+jN82YtmywoaDfjn8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lpMIfhMSNQ3e7kvim8Z6DWiRNJ/9t1fyVspI0XtKsRA=; b=FiOSHuMRSbShN6nMWVtNGvntYJLhC98kJwjdFC1FOeff4IfjZXIZdUSNDWlJbsIVPc9vqc Kp8nHls/W6H9Uilj14C0D2BrR7YadfaBjPgvMsZAuEjEqY9qtGdhRahHHkZjaum+r0BJX8 lqCu/5lKfqhHbV9ajaYwThmBbHOSmcBhlxBY+Xpco5RLAX7s8/y9eyL46eRyiWIMqK/fqT 34uHbh8Jz03xZhJxDM16XE/Q/9Iw/Fx1nK4rCLopGFeS2QeoGDMvWXZF+hQyekobu5CBJg McupvcskAe8MWQHXTt6dcLSD3sJemXoymlnJmmCUOekbIx0Dmnv3fcUF0Azqag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704951220; a=rsa-sha256; cv=none; b=mayiIJBqEXGSP4zGB0FamdhbntplNjZxE0djep7QkGn/950QdxKysl+0iwNRpVeKQamWAu cUHPj7aZ2HhhCObf/2/O+hiWs33FA0fLoVrgRr7X0pGk8FwGJkPmBecp8txEmG3jbuXWgp mdQk+puBI8Q5/QuihXcsqBdSqt3h4QuaAl852+JOcUsvbO9PHasy+opRnbU0djmIQq0TnA UZbnPxMbYhphNkiFXwjRQw7Xk3anqtum+7vmBgLl+RCCKXuxxHxHOevi1vuGMX4UPqJ/0O 7JrSmzqzWnBRQrtzLNSNlQl1JGN8kTpQ2dqpvhS026tX8wZ0ue7A9gg/gg+wUg== 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 4T9YHS1hKJz15W3; Thu, 11 Jan 2024 05:33: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 40B5Xe6P009230; Thu, 11 Jan 2024 05:33:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B5Xeom009227; Thu, 11 Jan 2024 05:33:40 GMT (envelope-from git) Date: Thu, 11 Jan 2024 05:33:40 GMT Message-Id: <202401110533.40B5Xeom009227@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: 2a2aec721fff - stable/14 - cxgbe(4): Destroy the tick mutex during VI detach. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2a2aec721fff347d9603987a839b58040c67cab2 Auto-Submitted: auto-generated The branch stable/14 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=2a2aec721fff347d9603987a839b58040c67cab2 commit 2a2aec721fff347d9603987a839b58040c67cab2 Author: Navdeep Parhar AuthorDate: 2023-12-27 21:00:29 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-11 05:22:30 +0000 cxgbe(4): Destroy the tick mutex during VI detach. This avoids a mutex reinitialization when the VI is detached and reattached. Fixes: 516fe911a6b7 cxgbe(4): Always use the per-VI callout to read interface stats. Sponsored by: Chelsio Communications (cherry picked from commit 8b144c015c9cce0bc99a7fbdc43f22f51a946d2c) --- sys/dev/cxgbe/t4_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index a32cd9a3f2df..570208e2c562 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -2733,6 +2733,7 @@ cxgbe_vi_detach(struct vi_info *vi) #endif cxgbe_uninit_synchronized(vi); callout_drain(&vi->tick); + mtx_destroy(&vi->tick_mtx); sysctl_ctx_free(&vi->ctx); vi_full_uninit(vi); From nobody Thu Jan 11 05:33:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9YHT47fRz56VXR; Thu, 11 Jan 2024 05:33:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9YHT3jqFz46BG; Thu, 11 Jan 2024 05:33:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0cE/b3WwNLlDkEx75nErSz5qusbhVUVzHECJmeYmawU=; b=hFEdwAHU4MjJkzPNL7m7fUOcJLG9yRu/AIH7eZ8UPKdrQNlKD3mvK/2T7WJFJYCP0iR+QL 6lDVvoZQHBtGENEz+gHHLHr02Ii+yOkCaLesOT6Yw4FIPRuDhgRX4eJHzhjjBTTfzJ6Djl XE7lNKcgipUlSrXgi40XWIe/9WrI/j7SCn/kUGWstSIkxDlPa7mOUo64iJl3/Udh+oxU7m w8UcMbxQhu8O/u9GppVqeZ7sP7s1kp4NzWkO19ER/AbNiVKT5sVxdIzKcjrfunGQr9Gtco RijuViMdDdLm9h5SF9b+pe0V/Aue1FT9ICfCBZmRXN3yqzXVPD3Is3xN22w2aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0cE/b3WwNLlDkEx75nErSz5qusbhVUVzHECJmeYmawU=; b=nxxIpHSTPQsFYaJehLd2kp6OAE2EUtbxDL3cPjSWpjtmxEvluOTdZOjjxeF1JlSKGsLs8d HMtzpwsKyY9KcJkef8khPD5aRQFDW+3EaRGDlNlGC7rj19XoL+hp4ILXrklGD39QURja7R p3NDFzvDn6QzTekAX7BnNoGuzctIg6xFsq7WT6rIFZpxnxprbJU9iwt6sXkUYEBKNljLxm mvLLmJBV3orsivMQg6T9UvHV4SJs6YUXWpA+HAiKwmQ13fL/nRiw8EWonlX+cxM1EqafIZ uqM4hW+rdFD4WGeCOf+CvcIsrvbMuomuPCjdmp6ro+fCTX7hr2EciJrw/dMYHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704951221; a=rsa-sha256; cv=none; b=pDPj/2eQyDJzigU5fdrK8ZOwO63W/UT4fN/h8/KC3PdO59tnJokM4Cm6UsDSaXPFO1lZdP TRB4BKAwLPHI1vxnmTdUU5+1glNLWNBjxaLPOXo5EPDcnCmcXvPWWroCsSTvcWzUIVGnKn eSGGXYc9eVtdNVofAKjKeYGRW5ylXBLrePXrZRDsUlLjJyzsMP+rfJh9i/C8S2yIoMqHY6 1xbZqQFOFyG4lFkEZtaS2X6AFe/DAB4RRTum+L5CZW9EGtQQhDGueueHtF9+eVzbv7TRUs AsU8uu+HQcBaHA9qDs6ju9ofhVxkn8wvtX+LYkiO9+WGL71/aaY85GWYX3d4hw== 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 4T9YHT2p8Xz15yw; Thu, 11 Jan 2024 05:33:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40B5Xf0e009272; Thu, 11 Jan 2024 05:33:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B5XfsZ009269; Thu, 11 Jan 2024 05:33:41 GMT (envelope-from git) Date: Thu, 11 Jan 2024 05:33:41 GMT Message-Id: <202401110533.40B5XfsZ009269@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: 7d98a455a3ea - stable/14 - cxgbe(4): Fix virtual interface reattach. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7d98a455a3ea91eadbd3c84c6cd85314f5e29529 Auto-Submitted: auto-generated The branch stable/14 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=7d98a455a3ea91eadbd3c84c6cd85314f5e29529 commit 7d98a455a3ea91eadbd3c84c6cd85314f5e29529 Author: Navdeep Parhar AuthorDate: 2024-01-02 21:20:45 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-11 05:22:31 +0000 cxgbe(4): Fix virtual interface reattach. Replace the DOOMED flag with a transient DETACHING flag that is cleared when VI is detached. This fixes VI reattach when only the VI and not the parent nexus is detached. The old flag was never cleared and prevented subsequent synch op's related to the VI. PR: 275260 Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D43287 Sponsored by: Chelsio Communications (cherry picked from commit 0201eb29dde9dccbf796f81fbf18f3b21798183d) --- sys/dev/cxgbe/adapter.h | 10 ++++++---- sys/dev/cxgbe/t4_main.c | 33 +++++++++++++++++++-------------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index ddb8621a2300..c3105ecacffd 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -170,7 +170,7 @@ enum { FIXED_IFMEDIA = (1 << 4), /* ifmedia list doesn't change. */ /* VI flags */ - DOOMED = (1 << 0), + VI_DETACHING = (1 << 0), VI_INIT_DONE = (1 << 1), /* 1 << 2 is unused, was VI_SYSCTL_CTX */ TX_USES_VM_WR = (1 << 3), @@ -184,8 +184,9 @@ enum { DF_VERBOSE_SLOWINTR = (1 << 4), /* Chatty slow intr handler */ }; -#define IS_DOOMED(vi) ((vi)->flags & DOOMED) -#define SET_DOOMED(vi) do {(vi)->flags |= DOOMED;} while (0) +#define IS_DETACHING(vi) ((vi)->flags & VI_DETACHING) +#define SET_DETACHING(vi) do {(vi)->flags |= VI_DETACHING;} while (0) +#define CLR_DETACHING(vi) do {(vi)->flags &= ~VI_DETACHING;} while (0) #define IS_BUSY(sc) ((sc)->flags & CXGBE_BUSY) #define SET_BUSY(sc) do {(sc)->flags |= CXGBE_BUSY;} while (0) #define CLR_BUSY(sc) do {(sc)->flags &= ~CXGBE_BUSY;} while (0) @@ -1355,8 +1356,9 @@ int t4_map_bar_2(struct adapter *); int t4_setup_intr_handlers(struct adapter *); void t4_sysctls(struct adapter *); int begin_synchronized_op(struct adapter *, struct vi_info *, int, char *); -void doom_vi(struct adapter *, struct vi_info *); void end_synchronized_op(struct adapter *, int); +void begin_vi_detach(struct adapter *, struct vi_info *); +void end_vi_detach(struct adapter *, struct vi_info *); int update_mac_settings(if_t, int); int adapter_init(struct adapter *); int vi_init(struct vi_info *); diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 570208e2c562..3b6cb7285e64 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -2755,17 +2755,14 @@ cxgbe_detach(device_t dev) device_delete_children(dev); sysctl_ctx_free(&pi->ctx); - doom_vi(sc, &pi->vi[0]); - + begin_vi_detach(sc, &pi->vi[0]); if (pi->flags & HAS_TRACEQ) { sc->traceq = -1; /* cloner should not create ifnet */ t4_tracer_port_detach(sc); } - cxgbe_vi_detach(&pi->vi[0]); ifmedia_removeall(&pi->media); - - end_synchronized_op(sc, 0); + end_vi_detach(sc, &pi->vi[0]); return (0); } @@ -3595,12 +3592,10 @@ vcxgbe_detach(device_t dev) vi = device_get_softc(dev); sc = vi->adapter; - doom_vi(sc, vi); - + begin_vi_detach(sc, vi); cxgbe_vi_detach(vi); t4_free_vi(sc, sc->mbox, sc->pf, 0, vi->viid); - - end_synchronized_op(sc, 0); + end_vi_detach(sc, vi); return (0); } @@ -6245,7 +6240,7 @@ begin_synchronized_op(struct adapter *sc, struct vi_info *vi, int flags, ADAPTER_LOCK(sc); for (;;) { - if (vi && IS_DOOMED(vi)) { + if (vi && IS_DETACHING(vi)) { rc = ENXIO; goto done; } @@ -6284,14 +6279,13 @@ done: /* * Tell if_ioctl and if_init that the VI is going away. This is * special variant of begin_synchronized_op and must be paired with a - * call to end_synchronized_op. + * call to end_vi_detach. */ void -doom_vi(struct adapter *sc, struct vi_info *vi) +begin_vi_detach(struct adapter *sc, struct vi_info *vi) { - ADAPTER_LOCK(sc); - SET_DOOMED(vi); + SET_DETACHING(vi); wakeup(&sc->flags); while (IS_BUSY(sc)) mtx_sleep(&sc->flags, &sc->sc_lock, 0, "t4detach", 0); @@ -6304,6 +6298,17 @@ doom_vi(struct adapter *sc, struct vi_info *vi) ADAPTER_UNLOCK(sc); } +void +end_vi_detach(struct adapter *sc, struct vi_info *vi) +{ + ADAPTER_LOCK(sc); + KASSERT(IS_BUSY(sc), ("%s: controller not busy.", __func__)); + CLR_BUSY(sc); + CLR_DETACHING(vi); + wakeup(&sc->flags); + ADAPTER_UNLOCK(sc); +} + /* * {begin|end}_synchronized_op must be called from the same thread. */ From nobody Thu Jan 11 05:33:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9YHV6c8tz56Vdd; Thu, 11 Jan 2024 05:33:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9YHV5nFQz46Yd; Thu, 11 Jan 2024 05:33:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nDccLs+Zkdm7MlK08wVhNUBwGotLwclhPVVpoh9pkJA=; b=AMWPJWIqmbfyxBYzoqAcspqHZqZSf5/sBfMSVIf8f4gP/VVtGroCE2AbeFKZVEmIxT3q89 2ph7iah29FSBOPGrHws8sxAxH+DePxqjVxhjGZWi8ngMTWdHgiM6P1zRaNnRkZUTtlGjQF yZHWwd68y/egevrHs2Q8HRoB7YpbEIYurAthKWgOYnO6bmqQxL8vgZAZ8fQU0MBLi1J49z GZySw6DxHnxo3T3I1QwxnyMElhxzIpwK4pnyrxeejSuLUMQP7z4Vib/m7vQXttFfgH59vO HaA6ZSZg81XEnY1pE96QAgMeecPqPzKGrvWP9JmVQfkK9oP+6bj5Kfbbiw+zoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nDccLs+Zkdm7MlK08wVhNUBwGotLwclhPVVpoh9pkJA=; b=HSCCvJPViT/nQlLyTgBXB+Vc6/Mrk68FzadcCHOIDbz6LOZn8fLCCFfqxX8gAk6riGudXs Z8ToJYzV46Io3Wvo73gdA+lwYQptwpWgzkY2hP6Me5BJKtskM5S8VbbTbhXQloqtiBvfcq OD/2sVF9De3K/lB/XE4dlT/Hs9yMF9/E6EiLw6aNihH1uX8S0SdOCl/hFgIzmpMvIJTL1u 8p3TLVRRkC47pPARNIionM4Ta0MBjYMVgTrpalZocnQhv4Tf9MHy6yaAxjcyq8zPxN80oy Kzrqr4wbcKJuBPh4pu/tc0JwJLiq8lugV/Sy/KsVDic2TTCn7Spc7istSbwAKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704951222; a=rsa-sha256; cv=none; b=Ge3HgzTZoQhpLeR6qHmA9FQErsrqK2xRp/HMFGtB4CV/ryU+3IlSAkl5cNpStM2yKCgnld f+2y2Twa/v8gQKN/qE2SI8mQ69WU+PZCsHH9lvGecovOxwrtMQ6bCpFNcavPX0rbq3ykt9 xUmYCOW48j57LD7PFAM48+swdfMiecj0yaUJ+TnM+h3SELoOOHF30ftkLfsDvo4wkpTkgJ 0imgqvge9fg9Kgcnru/jErNHGBIYetTVbj2qEKFqJypgbC2y6UL4qK7Bo58xPUAZoL74mK uaOCavL7+si/xpU3f9sr7I1Bimstgi2Ku9Ske9Goq7eU7Fz3gUhwUDEdmofojw== 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 4T9YHV4q2hz15Z7; Thu, 11 Jan 2024 05:33: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 40B5XgN9009323; Thu, 11 Jan 2024 05:33:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B5Xg49009316; Thu, 11 Jan 2024 05:33:42 GMT (envelope-from git) Date: Thu, 11 Jan 2024 05:33:42 GMT Message-Id: <202401110533.40B5Xg49009316@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: c2628605787d - stable/14 - cxgbe(4): Update firmwares to 1.27.5.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c2628605787d3436d61503babb6aeb5f53751ea2 Auto-Submitted: auto-generated The branch stable/14 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=c2628605787d3436d61503babb6aeb5f53751ea2 commit c2628605787d3436d61503babb6aeb5f53751ea2 Author: Navdeep Parhar AuthorDate: 2024-01-04 19:37:21 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-11 05:22:31 +0000 cxgbe(4): Update firmwares to 1.27.5.0 Version : 1.27.5.0 Date : 10/10/2023 ===================== Fixes ----- BASE: - Fixed handling the Remote Fault with AN, causing the link failure. ===================== Obtained from: Chelsio Communications Sponsored by: Chelsio Communications (cherry picked from commit b1e82d33193b83d86d46483b4ddfe295becd80c4) --- sys/conf/files | 6 +++--- .../{t4fw-1.27.4.0.bin => t4fw-1.27.5.0.bin} | Bin 570880 -> 570880 bytes sys/dev/cxgbe/firmware/t4fw_interface.h | 6 +++--- .../{t5fw-1.27.4.0.bin => t5fw-1.27.5.0.bin} | Bin 678912 -> 678912 bytes .../{t6fw-1.27.4.0.bin => t6fw-1.27.5.0.bin} | Bin 730624 -> 730624 bytes sys/modules/cxgbe/t4_firmware/Makefile | 2 +- sys/modules/cxgbe/t5_firmware/Makefile | 2 +- sys/modules/cxgbe/t6_firmware/Makefile | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index a8c1893b1341..39b68a79e20f 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1455,7 +1455,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.27.4.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.27.5.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -1489,7 +1489,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.27.4.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.27.5.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t5fw.fw" @@ -1523,7 +1523,7 @@ t6fw.fwo optional cxgbe \ no-implicit-rule \ clean "t6fw.fwo" t6fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t6fw-1.27.4.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t6fw-1.27.5.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t6fw.fw" diff --git a/sys/dev/cxgbe/firmware/t4fw-1.27.4.0.bin b/sys/dev/cxgbe/firmware/t4fw-1.27.5.0.bin similarity index 99% rename from sys/dev/cxgbe/firmware/t4fw-1.27.4.0.bin rename to sys/dev/cxgbe/firmware/t4fw-1.27.5.0.bin index 9addb9e25422..0c7842564913 100644 Binary files a/sys/dev/cxgbe/firmware/t4fw-1.27.4.0.bin and b/sys/dev/cxgbe/firmware/t4fw-1.27.5.0.bin differ diff --git a/sys/dev/cxgbe/firmware/t4fw_interface.h b/sys/dev/cxgbe/firmware/t4fw_interface.h index 0ebc404bb72e..686bb55d658b 100644 --- a/sys/dev/cxgbe/firmware/t4fw_interface.h +++ b/sys/dev/cxgbe/firmware/t4fw_interface.h @@ -10001,17 +10001,17 @@ enum fw_hdr_chip { enum { T4FW_VERSION_MAJOR = 1, T4FW_VERSION_MINOR = 27, - T4FW_VERSION_MICRO = 4, + T4FW_VERSION_MICRO = 5, T4FW_VERSION_BUILD = 0, T5FW_VERSION_MAJOR = 1, T5FW_VERSION_MINOR = 27, - T5FW_VERSION_MICRO = 4, + T5FW_VERSION_MICRO = 5, T5FW_VERSION_BUILD = 0, T6FW_VERSION_MAJOR = 1, T6FW_VERSION_MINOR = 27, - T6FW_VERSION_MICRO = 4, + T6FW_VERSION_MICRO = 5, T6FW_VERSION_BUILD = 0, }; diff --git a/sys/dev/cxgbe/firmware/t5fw-1.27.4.0.bin b/sys/dev/cxgbe/firmware/t5fw-1.27.5.0.bin similarity index 59% rename from sys/dev/cxgbe/firmware/t5fw-1.27.4.0.bin rename to sys/dev/cxgbe/firmware/t5fw-1.27.5.0.bin index b32f270b1866..875f421c7523 100644 Binary files a/sys/dev/cxgbe/firmware/t5fw-1.27.4.0.bin and b/sys/dev/cxgbe/firmware/t5fw-1.27.5.0.bin differ diff --git a/sys/dev/cxgbe/firmware/t6fw-1.27.4.0.bin b/sys/dev/cxgbe/firmware/t6fw-1.27.5.0.bin similarity index 76% rename from sys/dev/cxgbe/firmware/t6fw-1.27.4.0.bin rename to sys/dev/cxgbe/firmware/t6fw-1.27.5.0.bin index a47f287848f1..f951578d642b 100644 Binary files a/sys/dev/cxgbe/firmware/t6fw-1.27.4.0.bin and b/sys/dev/cxgbe/firmware/t6fw-1.27.5.0.bin differ diff --git a/sys/modules/cxgbe/t4_firmware/Makefile b/sys/modules/cxgbe/t4_firmware/Makefile index fb8eeb0d6c8e..15928bdb0207 100644 --- a/sys/modules/cxgbe/t4_firmware/Makefile +++ b/sys/modules/cxgbe/t4_firmware/Makefile @@ -16,7 +16,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T4FW_VER= 1.27.4.0 +T4FW_VER= 1.27.5.0 FIRMWS+= t4fw-${T4FW_VER}.bin:t4fw:${T4FW_VER} .include diff --git a/sys/modules/cxgbe/t5_firmware/Makefile b/sys/modules/cxgbe/t5_firmware/Makefile index 2876d1a6b041..cf2c3e9006bd 100644 --- a/sys/modules/cxgbe/t5_firmware/Makefile +++ b/sys/modules/cxgbe/t5_firmware/Makefile @@ -16,7 +16,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T5FW_VER= 1.27.4.0 +T5FW_VER= 1.27.5.0 FIRMWS+= t5fw-${T5FW_VER}.bin:t5fw:${T5FW_VER} .include diff --git a/sys/modules/cxgbe/t6_firmware/Makefile b/sys/modules/cxgbe/t6_firmware/Makefile index 7ac481c4bdb9..5bc7c8e8e0b6 100644 --- a/sys/modules/cxgbe/t6_firmware/Makefile +++ b/sys/modules/cxgbe/t6_firmware/Makefile @@ -16,7 +16,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T6FW_VER= 1.27.4.0 +T6FW_VER= 1.27.5.0 FIRMWS+= t6fw-${T6FW_VER}.bin:t6fw:${T6FW_VER} .include From nobody Thu Jan 11 05:33:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9YHX1N2Pz56VZk; Thu, 11 Jan 2024 05:33: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 4T9YHW6gwxz468V; Thu, 11 Jan 2024 05:33:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2uYY/V4YmXhg8tjUN9lmyYZjzAOtko+bGC5Exeos3kM=; b=Bwo048jOlJK5h+eEDFpKXQyHl+nZuWS/WzPr0zL5AXQh6wytF1Y45mZmegvxO+PBV9qYum OaKwHgA8sW6jrN5u19fEZy38LnSRWRPPSMSFhdxg0zHGHB5UAYNTs5ywf62pEKF1KyQwF7 lK5woJU0w0u5x5PDMcmfQVNxZWfsdui+Rtb3B6qic50bW939xGViQVUjpfJRGKqq0uBbKV Y68IClUBsEGGbDheJLezmdnd0oUiAB0Q+ELC7STg3jpP7ZAftDG/mEcNicqJDzrGHtQBUa QDJgA/dZf1txPhBJe8M1dj89l9JWOS4Bkn7s9tQwhvQDIuohUihdqFooz8efNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2uYY/V4YmXhg8tjUN9lmyYZjzAOtko+bGC5Exeos3kM=; b=iG0iJ844rNxFO1Tlsk0nwoV8T+L+9w9mYUSu0yf2w94fqtzPpEdRGnUmOqm7P6J2J3VGtB BCZnkZ2m7+HjZSQCfQL6cWJtSm6iNP8waxjSpxytoCe9wXj5FzsPPH5FY/ZuNa8hbFSDco bAWJESqZ1HmH+NBIDPOF7SyaXiK/gSxPs1y+IzASfupsP453I0KcPsv/AoSChtD7q+pIUk HOPdysD+L01Y1btB5iGNuDBjV++oEzXwm6n4j0WfxFQRjpfAiRgBtldWVpRKny6nakc1Wo uh9bwMhy6RBZ/KLWA4U8p3KDraMJLcQxJ3j7aNBk7DHKMC8JehUjX8EVshQYwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704951223; a=rsa-sha256; cv=none; b=U3Nu3prVzxSl0uQlLJdfdtWf7UmIJaWkvGmX0FJmk95ltDE/VDe8R64tlzNO2VGNqLTNtV b/YMcG+us6Y8c/tsIQfxgQuXeEr8t/brGM17ADwPmIDwBnxLmhV2+iTxpZlOWKBowaABYC p6Gb3lRPsSfNzdWjo+fJzTI5BCZcUHpxpuIgqGypH6A6WlVwQIF3NSa4MJ1GF9ePVaahtu vu05u20X+v6oaSyXLhmps6+BpJnZmakUr2vwXVPkABALhrv9HObOtNtZK3m/lzQobJwGvI V+Njvul3UPdE8mjAF+on+utDDz4QA/GIJ6zy+dEgepPMeWXGP93Y8rSiSqXJdQ== 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 4T9YHW5lsDz15yx; Thu, 11 Jan 2024 05:33: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 40B5Xhlg009369; Thu, 11 Jan 2024 05:33:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B5Xheb009366; Thu, 11 Jan 2024 05:33:43 GMT (envelope-from git) Date: Thu, 11 Jan 2024 05:33:43 GMT Message-Id: <202401110533.40B5Xheb009366@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: c4bac077581e - stable/14 - cxgbe(4): Add support for netmap offsets. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c4bac077581ee38a3c64cd3a76cb9dd974dd749b Auto-Submitted: auto-generated The branch stable/14 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=c4bac077581ee38a3c64cd3a76cb9dd974dd749b commit c4bac077581ee38a3c64cd3a76cb9dd974dd749b Author: Navdeep Parhar AuthorDate: 2024-01-05 01:39:31 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-11 05:22:31 +0000 cxgbe(4): Add support for netmap offsets. PR: 253069 Sponsored by: Chelsio Communications (cherry picked from commit df8a58b17a1907ed3b4597475d1cb8eacc9636de) --- sys/dev/cxgbe/t4_netmap.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/t4_netmap.c b/sys/dev/cxgbe/t4_netmap.c index 64fba4410364..0377f65acc3e 100644 --- a/sys/dev/cxgbe/t4_netmap.c +++ b/sys/dev/cxgbe/t4_netmap.c @@ -1003,7 +1003,7 @@ cxgbe_nm_tx(struct adapter *sc, struct sge_nm_txq *nm_txq, usgl->cmd_nsge = htobe32(V_ULPTX_CMD(ULP_TX_SC_DSGL) | V_ULPTX_NSGE(1)); usgl->len0 = htobe32(slot->len); - usgl->addr0 = htobe64(ba); + usgl->addr0 = htobe64(ba + nm_get_offset(kring, slot)); slot->flags &= ~(NS_REPORT | NS_BUF_CHANGED); cpl = (void *)(usgl + 1); @@ -1269,7 +1269,7 @@ cxgbe_nm_attach(struct vi_info *vi) bzero(&na, sizeof(na)); na.ifp = vi->ifp; - na.na_flags = NAF_BDG_MAYSLEEP; + na.na_flags = NAF_BDG_MAYSLEEP | NAF_OFFSETS; /* Netmap doesn't know about the space reserved for the status page. */ na.num_tx_desc = vi->qsize_txq - sc->params.sge.spg_len / EQ_ESIZE; @@ -1286,7 +1286,7 @@ cxgbe_nm_attach(struct vi_info *vi) na.nm_register = cxgbe_netmap_reg; na.num_tx_rings = vi->nnmtxq; na.num_rx_rings = vi->nnmrxq; - na.rx_buf_maxsize = MAX_MTU; + na.rx_buf_maxsize = MAX_MTU + sc->params.sge.fl_pktshift; netmap_attach(&na); /* This adds IFCAP_NETMAP to if_capabilities */ } @@ -1368,6 +1368,14 @@ service_nm_rxq(struct sge_nm_rxq *nm_rxq) handle_nm_sge_egr_update(sc, ifp, cpl); break; case CPL_RX_PKT: + /* + * Note that the application must have netmap + * offsets (NETMAP_REQ_OPT_OFFSETS) enabled on + * the ring or its rx will not work correctly + * when fl_pktshift > 0. + */ + nm_write_offset(kring, &ring->slot[fl_cidx], + sc->params.sge.fl_pktshift); ring->slot[fl_cidx].len = G_RSPD_LEN(lq) - sc->params.sge.fl_pktshift; ring->slot[fl_cidx].flags = 0; From nobody Thu Jan 11 05:33:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9YHY35ZFz56VXT; Thu, 11 Jan 2024 05:33: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 4T9YHY19j1z46Tb; Thu, 11 Jan 2024 05:33:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rWnGoXc0s8pjboCHvLNxizV6DdvECthyps2jbXtP5sw=; b=Lkse7w0ruEd0K9FaDf1K/Q8feAZnjxFrsf7BMrpTgNqOlJq2jzF/Dewm8+StzF7+htPeNt RyX13tD7+CiVSiRs4boLlQET/Lnp9HDWVenwnKsLEEVQUSFVzItmMNtlxZs5OtgFw0Ehds W/aRU2qCEqjC7aZsQ6PArc3qNo6brcTiN6Lq9QrXgPqRG5pOEKGDlwJcg++AlIKTuVy+0s aYKeDbIS90X7dO1EWxl7k8YoQo6E3w62VgdzUy6S1hIB8+YAh8MEEx3ZlVRqbUAtuG0Ud/ tErUwzOcJFqJdiBWWjAr//9aQEGe+NEGAYODSA0BgC2MFLQngh/JXoWaY1w+8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rWnGoXc0s8pjboCHvLNxizV6DdvECthyps2jbXtP5sw=; b=DaYK1Gshha+0BAzaWEdyIHC4O0PI+j6QBOQjA4AZO0kBpbbjLqVJnCR00r/HSevGpiU1zK TvGccom5jxB4obI52ZqhCNiDCeDKCPILb9VUuReUpzXH/BcH3sSrrD7oAaAgOgEen7AM0H oiA8+Xkji/pe2Q5FOw7xPGle+BF7pS5ErZBFRznw9nesPQx9ENBqlYplB4f5sMQc7zgFwI dDJa5OHxGg2zF6g93ETZQ3L9urgQdk6nSe35ipODyUmncHDD+20XsUWg4dOXKMZqbq72Jg tsFlh6B1FnYNWvbg00H/AqzmKP8UIHwMqCr/DYShbH2ut3TToO/idxBcw8Fbyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704951225; a=rsa-sha256; cv=none; b=TsN1pu1brJKz6Rkusj76MZJAwpawon0emJq9bPAOXJT9XdtPdWeT49+CHL5SK+rFIomv1U 5jHye1d2GFW3SA3FB54PZegmYwTsnk33tloEtqQJk06kSkwHYEqAm/mnzPbal+sRe+nYkN HHfO3rXmmvogoYSc79me9OLfIAnEJEwDSNHXWKrm0+E8xnubgIvQjgRpfW+Z2tfael6IAQ TIMjDFXw1mNn463rRfKEbpgJEvv7S25tmyv5rZqJE0zgrn9OhsmuQQbLm8tWZKPSRmGJ5X Gn9JkFGFYB1kQoTjBpwXA9OiarMt2oK1IVoVU3Y/AKxscg4sBJy01cN/N2zb2g== 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 4T9YHY09wxz15yy; Thu, 11 Jan 2024 05:33: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 40B5Xirr009437; Thu, 11 Jan 2024 05:33:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B5Xisd009434; Thu, 11 Jan 2024 05:33:44 GMT (envelope-from git) Date: Thu, 11 Jan 2024 05:33:44 GMT Message-Id: <202401110533.40B5Xisd009434@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: d7623fdcf0f0 - stable/14 - cxgbe(4): Use the correct size for the CIM LA on the T6. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d7623fdcf0f028773afae1b8e1d54c4cd7eccf40 Auto-Submitted: auto-generated The branch stable/14 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=d7623fdcf0f028773afae1b8e1d54c4cd7eccf40 commit d7623fdcf0f028773afae1b8e1d54c4cd7eccf40 Author: Navdeep Parhar AuthorDate: 2024-01-09 21:22:16 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-11 05:22:31 +0000 cxgbe(4): Use the correct size for the CIM LA on the T6. The logic analyzer in the T6 CIM block has a different capture size than previous chips. Sponsored by: Chelsio Communications (cherry picked from commit 9ea86c8f67a65ca00f79f3cd83aa977b38589f39) --- sys/dev/cxgbe/common/common.h | 1 + sys/dev/cxgbe/common/t4_hw.c | 7 +++++-- sys/dev/cxgbe/common/t4_hw.h | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h index cd1e648f8e59..0861e3df4bee 100644 --- a/sys/dev/cxgbe/common/common.h +++ b/sys/dev/cxgbe/common/common.h @@ -313,6 +313,7 @@ struct chip_params { u32 sge_fl_db; u16 mps_tcam_size; u16 rss_nentries; + u16 cim_la_size; }; /* VF-only parameters. */ diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index 41063d5c7d76..c18243e4b681 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -9303,6 +9303,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .sge_fl_db = F_DBPRIO, .mps_tcam_size = NUM_MPS_CLS_SRAM_L_INSTANCES, .rss_nentries = RSS_NENTRIES, + .cim_la_size = CIMLA_SIZE, }, { /* T5 */ @@ -9317,6 +9318,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .sge_fl_db = F_DBPRIO | F_DBTYPE, .mps_tcam_size = NUM_MPS_T5_CLS_SRAM_L_INSTANCES, .rss_nentries = RSS_NENTRIES, + .cim_la_size = CIMLA_SIZE, }, { /* T6 */ @@ -9331,6 +9333,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .sge_fl_db = 0, .mps_tcam_size = NUM_MPS_T5_CLS_SRAM_L_INSTANCES, .rss_nentries = T6_RSS_NENTRIES, + .cim_la_size = CIMLA_SIZE_T6, }, }; @@ -9386,11 +9389,11 @@ int t4_prep_adapter(struct adapter *adapter, u32 *buf) /* Cards with real ASICs have the chipid in the PCIe device id */ t4_os_pci_read_cfg2(adapter, PCI_DEVICE_ID, &device_id); if (device_id >> 12 == chip_id(adapter)) - adapter->params.cim_la_size = CIMLA_SIZE; + adapter->params.cim_la_size = adapter->chip_params->cim_la_size; else { /* FPGA */ adapter->params.fpga = 1; - adapter->params.cim_la_size = 2 * CIMLA_SIZE; + adapter->params.cim_la_size = 2 * adapter->chip_params->cim_la_size; } ret = get_vpd_params(adapter, &adapter->params.vpd, device_id, buf); diff --git a/sys/dev/cxgbe/common/t4_hw.h b/sys/dev/cxgbe/common/t4_hw.h index e943acb8dec9..79ec690cd5e6 100644 --- a/sys/dev/cxgbe/common/t4_hw.h +++ b/sys/dev/cxgbe/common/t4_hw.h @@ -66,7 +66,8 @@ enum { CIM_NUM_IBQ = 6, /* # of CIM IBQs */ CIM_NUM_OBQ = 6, /* # of CIM OBQs */ CIM_NUM_OBQ_T5 = 8, /* # of CIM OBQs for T5 adapter */ - CIMLA_SIZE = 2048, /* # of 32-bit words in CIM LA */ + CIMLA_SIZE = 256 * 8, /* 256 rows * ceil(235/32) 32-bit words */ + CIMLA_SIZE_T6 = 256 * 10, /* 256 rows * ceil(311/32) 32-bit words */ CIM_PIFLA_SIZE = 64, /* # of 192-bit words in CIM PIF LA */ CIM_MALA_SIZE = 64, /* # of 160-bit words in CIM MA LA */ CIM_IBQ_SIZE = 128, /* # of 128-bit words in a CIM IBQ */ From nobody Thu Jan 11 05:34:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9YJL0sLnz56Vgr; Thu, 11 Jan 2024 05:34: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 4T9YJK62SXz47gp; Thu, 11 Jan 2024 05:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JmJAy/+0Y+JH6sCFb4deoqMcgG1UQ7iUg4C8DzBtNBM=; b=lcVdJftNUlM8JI0ZsYpkolGIEMDMbQPeaBvU7Hhxu7wfXYLPEDDeIvgKo4h95pOxVVwOqW W6OKCv+VjN76BFBD28HBDWrvauF1UbSPrTKlCjUor3q5aphXuoL8ZPgBd0ShuqOFg+DWcJ lRv9neXHfHNPwe0wVzVzVrZjSkkzCbwQ8ay0iEdIN7sNIYACE+GRGBuENz+cNZXSAWfzqA grHChAU63Ri6Kx70x8ralIKS31ipUW+ew/1TG8mLt2xQvjEibKOaqZHE1iU3htAKtrjUnN q8bVPDz+AKN5+RLt1IKpmsVn+FC/QNDYdX9yqDpOS9E3+1I0Sn9qGkYKCHI5KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JmJAy/+0Y+JH6sCFb4deoqMcgG1UQ7iUg4C8DzBtNBM=; b=h0jhDSvhVjK3OanMSv6WBvYnYebjkdIhX7oOGtNdx+/VA6pmIfQZEtq6TtuWx7RXsTa1oZ Yf5mfHKfFPTnb3ckJrH9fKFvbu+NHcevarqWB+zswdR+zrrNAFefY3NUT9f3yZQ/F7yAWE KWjM/wnrmabpmTxnId9nhgQlbOr4C7hzEfocRQZPdfGriD09uDsGd2MyRmwVMCUTNA4TuO vkdIWktzKMneDn/LuiEAZn6MUALGL/QeQNWB5kvxeUhWQSWRhnMYpTqNvwjHZjgVVuqlOk r6uPfjNH89vu9e8Zl+bBDtp8n/TTIRu/dY/L2ISck5o1fETJ+JXHP1y3aJSI1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704951265; a=rsa-sha256; cv=none; b=s1LkBrR+AAjUP/fWPObIxo0ug9th7wqT/bZUTpErSDUot1885vNt9rxOS1/NNiRTkajsbT uK7l4ctZPjbdEzNPSYOWrumCV05xW9vD1la9xkf1Lpd/DAZylbG73TooFgU21eV6N0aBBm PaN6LXzcar9HVMrlju/z+6v/fOePZwbhq/SSQE0BQ8qdF3uCcNMV7jwG9wvBw61kESF1v0 Bvq1i7K2j3UJQqHu0h9Mq126H53L+H7WOaTwnTp9AR3Nh8i77k0gDBnsX6AX7oMvtihfGk fFZvCUB7KhT1xSiGbCK9oyT9cH5HZtfWel97r05yr1bOJYXLRncgsFDRM4qY5g== 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 4T9YJK4w3zz15DM; Thu, 11 Jan 2024 05:34: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 40B5YPjH009717; Thu, 11 Jan 2024 05:34:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B5YPF9009714; Thu, 11 Jan 2024 05:34:25 GMT (envelope-from git) Date: Thu, 11 Jan 2024 05:34:25 GMT Message-Id: <202401110534.40B5YPF9009714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: 3368fcf147a7 - stable/13 - cxgbe(4): Remove dead code. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3368fcf147a7190018eb342dae90490915d9d219 Auto-Submitted: auto-generated The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=3368fcf147a7190018eb342dae90490915d9d219 commit 3368fcf147a7190018eb342dae90490915d9d219 Author: Navdeep Parhar AuthorDate: 2023-03-30 18:43:43 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-11 05:06:58 +0000 cxgbe(4): Remove dead code. Fixes: e7e084442227 cxgbe(4): Replace T4_PKT_TIMESTAMP with something slightly less hackish. Sponsored by: Chelsio Communications (cherry picked from commit 21b778fbeb93d4b6a1e426cceb3b4d2c7e6e3dac) --- sys/dev/cxgbe/t4_sge.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 40fb54b4eecf..3e15e1507f68 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -78,11 +78,7 @@ #include "t4_l2t.h" #include "t4_mp_ring.h" -#ifdef T4_PKT_TIMESTAMP -#define RX_COPY_THRESHOLD (MINCLSIZE - 8) -#else #define RX_COPY_THRESHOLD MINCLSIZE -#endif /* Internal mbuf flags stored in PH_loc.eight[1]. */ #define MC_NOMAP 0x01 From nobody Thu Jan 11 05:34:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9YJM21d3z56VSr; Thu, 11 Jan 2024 05:34: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 4T9YJL6pdZz47dW; Thu, 11 Jan 2024 05:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k0NZbHd34HDH3uEAZth6+WyQ7Ov/NOkKcmnbw4qLfw0=; b=RiXiKrIWGXthL0sbpaIwgE1MFpjc9lg0votZvBdQ4wX8Rf1FxOd++ZRSaFCbv0ERn9c+ja R+ZUuUeaf9pidG9OWsGQ2pR7EQG9PtGXrLiwkRVpaStWcAl0KfKIxfljhLsWBCcgGHDlIt yEt4err2UA9i/9LMHLAepLEbq07Z/dG/w6zuHUCZ/cciTSd+N7E1Uzf0FB25QDRwYZ/3pe 4KrFjU96pzlXYTICS2FgIcWzciPs0UEE6Ht4a5iNySOaZyHwuEJttaYQAjWxC0qLFJB0T9 6GVRYPfmzmLcavtgVpJ5mE0YzOH8tfepq72FEimD0ePj5Ko3/L5mH6/vxqEK6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k0NZbHd34HDH3uEAZth6+WyQ7Ov/NOkKcmnbw4qLfw0=; b=GFrP2NRQ0Avg/katyB4vV6z/N0J4CRZRNy+lwDZjwQ9RN4HelJDwfGfl1cbqk7YYexBFYP lKsM810FaX/EtcCpa8qkm8r75+dyD4RUgHY2VRR+phORdiUz3pj5iicTFKL/bM/lpoUUI7 z84I2TaDAj8F7YsBjz+WL+lCxKeS4L94qevGys3b2lTXwWnUGLVpknOf9Sfa6/M7ceiDL7 /HB6ITq+WzWXqN0AQlisMDg1t1MQZnuxjc053IC3CvZC98sfBPdr0BGrEOdpHxsWiXNqLv Ttu+Bd0C6FGBEIxyy0i8gHVNBX0Morv+RfVvSvxL8QwhOGPHEaU3HsDRICp7oQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704951267; a=rsa-sha256; cv=none; b=iKUZnSmConCeQ6kge7TWTZ24eduirMI+DTKdOt/yQxgna7xNQTawUbiCZFSlTggK9IeL0T 9exUgoxEt+gMtsiXKUtnhnC5hKCm9GdW7sXfv9EbgMwEyeG5QI9ru7GHZmaFUIOxyjwekL PI98+4yuItYlhtPdwLraQxAfqiyPvflDTtdAz0kRUwXi5jhMwyLU0K9KetOtvI/SH9VERm Y14lhZHr+99JI05ZTQlBg0xdG6bGbne09YrTHzGVqpYuVpR0JIPeYU0mx7AFVCRLuT76zB 9H+/JqxKK2SgbkHWhrqZY/DmHJT5PkRAPXX1k0I5OIhvIByr+emRNkvyuL45XA== 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 4T9YJL5w1fz1601; Thu, 11 Jan 2024 05:34: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 40B5YQGa009765; Thu, 11 Jan 2024 05:34:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B5YQxb009762; Thu, 11 Jan 2024 05:34:26 GMT (envelope-from git) Date: Thu, 11 Jan 2024 05:34:26 GMT Message-Id: <202401110534.40B5YQxb009762@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: 0e3fce67f1e5 - stable/13 - cxgbe(4): Allow tracing filters on loopback ports. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0e3fce67f1e5899be93f334022803ce9a52e7a13 Auto-Submitted: auto-generated The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=0e3fce67f1e5899be93f334022803ce9a52e7a13 commit 0e3fce67f1e5899be93f334022803ce9a52e7a13 Author: Navdeep Parhar AuthorDate: 2023-04-02 00:16:02 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-11 05:06:58 +0000 cxgbe(4): Allow tracing filters on loopback ports. Each physical port has an associated loopback tx channel and anything transmitted over that channel by the driver is looped back internally by the hardware as if received on that physical port. This change allows tracing filters to be installed in this loopback path. Sponsored by: Chelsio Communications (cherry picked from commit 9f354cd3d0170f0deba2a548e7894d48aa67ee23) --- sys/dev/cxgbe/t4_tracer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/t4_tracer.c b/sys/dev/cxgbe/t4_tracer.c index db5b1d27becb..adb6d89b6362 100644 --- a/sys/dev/cxgbe/t4_tracer.c +++ b/sys/dev/cxgbe/t4_tracer.c @@ -387,7 +387,8 @@ t4_set_tracer(struct adapter *sc, struct t4_tracer *t) goto done; } tp.port = sc->port[t->tp.port - 4]->tx_chan + 4; - } + } else + tp.port = t->tp.port; tpp = &tp; done: if (rc == 0) { From nobody Thu Jan 11 05:34:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9YJN2mG0z56VXj; Thu, 11 Jan 2024 05:34: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 4T9YJN13wVz47ws; Thu, 11 Jan 2024 05:34:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OcdhsvNIsYS+oEc2yD5oQHxuuCcOCXe/oj6oh8PkKkk=; b=CTFcK85eh9QbieOqZ2GVlbPjQNfhuCz2+rZ1Lqu7W1r/Y5rIvyUPIU5cISp/vQZbl+rHJK a9JZ2nhQ1keJFEL7lnvCrcAistF2jXDp040hli1pJqubYUn/8FSpTsdzf02CYKsCvDwZVf xfV1xcOvx44/WCB1nBNLQpMQeFCHCr2AK3+NsNAC+hXDQuPBQcP6R2k2F5WSzs2iO3+elR auNcrZrxg+qZf3t2jpM4oEwGmazIqEs0ygroHAjKh1yYhMAc8NvR+9VSybDh2vq5mmAfht dPwJYDZ3/BluxR/xzQocZv9Axw5Qvcv7VP34XjddrQ0F0MuvTzcP5DDGLJa/zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OcdhsvNIsYS+oEc2yD5oQHxuuCcOCXe/oj6oh8PkKkk=; b=JWd07UJmJSTZX8V3O6SM1Qy2qwNPieq+Djzp2L4cUsD5QxLgXe+/N8+2uasGV3GzrJeVNX 7wbW5PM6mcUEWoM/P1YN7dVNg9rETRbmASeGint23lveNVekK9SzC19ZQYD+tkr5EKskAt T/v4IWPutnvnk99ns31qrJURSxA1dy3Hv5als4QoszTzbMYRnLWXHjJUcyVJm29cscA0S1 iXKI729MzEL3P4oewBU8e8ar3MXJjxnxuA3eVCjsjHlbmCUey4DsHiDn7HDkoQMfHw6A2+ 29qxWb8S4VwuoDxj0nMjsGJ0ycI7KoU3znW14G49WyI0rwZ0ncD2zsUZx9z3wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704951268; a=rsa-sha256; cv=none; b=lhRJiBZEdZZe7yY3mcpq3jAbFmA4Nc4gUjkT5NxZ+U30czByGXwCE5rNPwPBVRCSAIsQhq 6pVvA7zC3fsYz5F1iV8axKFhNbgt5Q51T2b8YOCyo3iIMNsutFigxkQLntdnrXDRAFg2cC P6GRdFDvqvuLJcU1fDHwKe5HkzpWlvFI8VM2fOkMn76omVWum7UNue43+PUkJ0pIO3GNhA 7I1QfAi7vdnL9k064O8WRGbkj9/UlArM19BPWNOU7+1u2+4NpCqblDD0iWPnxJCHClLKPu +EmwWLzIPxNpNXqHGPWmRybwtmF/iLEMNePyFJKPsYCqac715xlfALVRxAGrog== 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 4T9YJM73qKz15S7; Thu, 11 Jan 2024 05:34: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 40B5YRLa009834; Thu, 11 Jan 2024 05:34:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B5YRuq009829; Thu, 11 Jan 2024 05:34:27 GMT (envelope-from git) Date: Thu, 11 Jan 2024 05:34:27 GMT Message-Id: <202401110534.40B5YRuq009829@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: f0eedbcd8039 - stable/13 - cxgbetool(8): Add support for tracing loopback traffic for a port. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f0eedbcd80395190ff120b37beb59097827a1892 Auto-Submitted: auto-generated The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=f0eedbcd80395190ff120b37beb59097827a1892 commit f0eedbcd80395190ff120b37beb59097827a1892 Author: Navdeep Parhar AuthorDate: 2023-04-02 00:43:20 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-11 05:06:58 +0000 cxgbetool(8): Add support for tracing loopback traffic for a port. Use lo to tap the loopback for port . Sponsored by: Chelsio Communications (cherry picked from commit 4913a24e7910edf5a3f52536b780d1b1d4bb73a4) --- usr.sbin/cxgbetool/cxgbetool.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/usr.sbin/cxgbetool/cxgbetool.c b/usr.sbin/cxgbetool/cxgbetool.c index 6f9031240515..c02bc7fdc054 100644 --- a/usr.sbin/cxgbetool/cxgbetool.c +++ b/usr.sbin/cxgbetool/cxgbetool.c @@ -122,7 +122,7 @@ usage(FILE *fp) "\tsched-queue bind NIC queues to TX Scheduling class\n" "\tstdio interactive mode\n" "\ttcb read TCB\n" - "\ttracer tx|rx set and enable a tracer\n" + "\ttracer tx|rx|lo set and enable a tracer\n" "\ttracer disable|enable disable or enable a tracer\n" "\ttracer list list all tracers\n" ); @@ -2476,17 +2476,24 @@ set_tracer(uint8_t idx, int argc, const char *argv[]) t.valid = 1; if (argc != 1) { - warnx("must specify tx or rx."); + warnx("must specify one of tx/rx/lo"); return (EINVAL); } len = strlen(argv[0]); if (len != 3) { - warnx("argument must be 3 characters (tx or rx)"); + warnx("argument must be 3 characters (tx/rx/lo). eg. tx0"); return (EINVAL); } - if (strncmp(argv[0], "tx", 2) == 0) { + if (strncmp(argv[0], "lo", 2) == 0) { + port = argv[0][2] - '0'; + if (port < 0 || port > 3) { + warnx("'%c' in %s is invalid", argv[0][2], argv[0]); + return (EINVAL); + } + port += 8; + } else if (strncmp(argv[0], "tx", 2) == 0) { port = argv[0][2] - '0'; if (port < 0 || port > 3) { warnx("'%c' in %s is invalid", argv[0][2], argv[0]); From nobody Thu Jan 11 05:34:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9YJP3mclz56VfH; Thu, 11 Jan 2024 05:34: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 4T9YJP1c3Mz47pF; Thu, 11 Jan 2024 05:34:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FVlkx0hXvihMja/WYDThAl5vS6ut7kxMs9R9r4zAuRo=; b=H7XgtTreu8zFnJ5EAjIbed7reiEGRSZzPTu0w36KiXmF0sYTm8pNFKcyEZMfC9QazPFmiV Mqs+e4F8tD5kSudQZfA5LCGwc/hSmvKIw/Ul9Kryo1vhWABtqzwa5UUUxfbYZyF1zK3EHK L3gsWK7LHzBVTFQSDo8ddiMBZC17TBgGMDcf4uQltB7nut0UEQMx6fxSayYXjqRfd24YT9 lvzRAmqVX1H8VPqrsZIJYhvxCxbe3UKG816dvZy5waBYK3PSBR16Ux6HR0EDWVcbhWRryT wUdt5vlR137T0pxVVbc1HQQjiULcMuSAjA6av2gk+uZLkw1tHMNU6jrr2jetyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FVlkx0hXvihMja/WYDThAl5vS6ut7kxMs9R9r4zAuRo=; b=QYEbGKoMstWktNlmrjpWgwLVsmMYCuqZRbt4dlrLhs0sN2mcVX+2YfuMZqQ2mcyRMUuIfu D7jgl1JR69WyhbAtfCejsbDthLLzlbi61nP324xIQkHgbl5MdlmU31wc+14luL477jw0if Rm8jDdRGkdpqKK90AvC/XgYMN5krIFHWjXSjDBZLMJ+6GoUPHF4O9ITvLnjMXAJ1Mfl1oI oShB0+o4be2czf7ZEp9QC2tXjiymDIcX143zIrcWhDAjxhpIWBksdjiD8XmLMt5WXd0UIR M7jm8L5+1oxBNp66o8XX2fQYOSDBEEIhIJHiU3naNBKAlPHF/OUyc9qaTXigzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704951269; a=rsa-sha256; cv=none; b=oIPFhh/dz79P+wJEt5YKjJ9D1b5UZubkvu5vFU7tnEOh/KRKxp0whpRWNipSx++l8AUwDa hblFU9D+w04tRs/PhDoZUDeONKHzBWptdni9s8CTr6TIiyaCN730J/l/iFXlL3MgvdBVTa gsPSVmLejpnRo5xIm/EXw9OvTpPgCNfJNSD2ZMotwWtZdlbDTsteENdqtBUry4gcAzf4nX ffCX4pqjra9kAzmt0npuApOuTLgkV0cVoVVt9j+rYXzFtZuf1fUjv7/W6tGIlYPiipj3mz qsNA9/9jqbiwEGbPnJ9rS4Q7/mmNwJrSIqN+dKtF/qT0KFa18y68fISuTXiQxQ== 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 4T9YJP0jFxz15S8; Thu, 11 Jan 2024 05:34: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 40B5YT48009892; Thu, 11 Jan 2024 05:34:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B5YTtV009889; Thu, 11 Jan 2024 05:34:29 GMT (envelope-from git) Date: Thu, 11 Jan 2024 05:34:29 GMT Message-Id: <202401110534.40B5YTtV009889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: 8b7e008183c9 - stable/13 - cxgbe/iw_cxgbe: debug routines to dump STAG (steering tag) entries. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8b7e008183c94f8763c18390a9dc95c75b5f55b3 Auto-Submitted: auto-generated The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=8b7e008183c94f8763c18390a9dc95c75b5f55b3 commit 8b7e008183c94f8763c18390a9dc95c75b5f55b3 Author: Navdeep Parhar AuthorDate: 2023-04-06 17:52:15 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-11 05:06:58 +0000 cxgbe/iw_cxgbe: debug routines to dump STAG (steering tag) entries. t4_dump_stag to dump hw state for a known STAG. t4_dump_all_stag to dump hw state for all valid STAGs. This routine walks the entire STAG region looking for valid entries and this can take a while for some configurations. Sponsored by: Chelsio Communications (cherry picked from commit 7adf138ba9b90db5ed0f1e8cd68e787fb63fa760) --- sys/dev/cxgbe/iw_cxgbe/ev.c | 82 ++++++++++++++++++++++++++++++++++++--- sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h | 2 + 2 files changed, 79 insertions(+), 5 deletions(-) diff --git a/sys/dev/cxgbe/iw_cxgbe/ev.c b/sys/dev/cxgbe/iw_cxgbe/ev.c index f163fb27ed44..7185bda1e2ed 100644 --- a/sys/dev/cxgbe/iw_cxgbe/ev.c +++ b/sys/dev/cxgbe/iw_cxgbe/ev.c @@ -39,6 +39,82 @@ #include "iw_cxgbe.h" +static void print_tpte(struct adapter *sc, const u32 stag, + const struct fw_ri_tpte *tpte) +{ + const __be64 *p = (const void *)tpte; + + CH_ERR(sc, "stag idx 0x%x valid %d key 0x%x state %d pdid %d " + "perm 0x%x ps %d len 0x%016llx va 0x%016llx\n", + stag & 0xffffff00, + G_FW_RI_TPTE_VALID(ntohl(tpte->valid_to_pdid)), + G_FW_RI_TPTE_STAGKEY(ntohl(tpte->valid_to_pdid)), + G_FW_RI_TPTE_STAGSTATE(ntohl(tpte->valid_to_pdid)), + G_FW_RI_TPTE_PDID(ntohl(tpte->valid_to_pdid)), + G_FW_RI_TPTE_PERM(ntohl(tpte->locread_to_qpid)), + G_FW_RI_TPTE_PS(ntohl(tpte->locread_to_qpid)), + (long long)(((u64)ntohl(tpte->len_hi) << 32) | ntohl(tpte->len_lo)), + (long long)(((u64)ntohl(tpte->va_hi) << 32) | ntohl(tpte->va_lo_fbo))); + CH_ERR(sc, "stag idx 0x%x: %016llx %016llx %016llx %016llx\n", + stag & 0xffffff00, + (long long)be64_to_cpu(p[0]), (long long)be64_to_cpu(p[1]), + (long long)be64_to_cpu(p[2]), (long long)be64_to_cpu(p[3])); +} + +void t4_dump_stag(struct adapter *sc, const u32 stag) +{ + struct fw_ri_tpte tpte __aligned(sizeof(__be64)) = {0}; + const u32 offset = sc->vres.stag.start + ((stag >> 8) * 32); + + if (offset > sc->vres.stag.start + sc->vres.stag.size - 32) { + CH_ERR(sc, "stag 0x%x is invalid for current configuration.\n", + stag); + return; + } + read_via_memwin(sc, 0, offset, (u32 *)&tpte, 32); + print_tpte(sc, stag, &tpte); +} + +void t4_dump_all_stag(struct adapter *sc) +{ + struct fw_ri_tpte tpte __aligned(sizeof(__be64)) = {0}; + const u32 first = sc->vres.stag.start; + const u32 last = first + sc->vres.stag.size - 32; + u32 offset, i; + + for (i = 0, offset = first; offset <= last; i++, offset += 32) { + tpte.valid_to_pdid = 0; + read_via_memwin(sc, 0, offset, (u32 *)&tpte, 4); + if (tpte.valid_to_pdid != 0) { + read_via_memwin(sc, 0, offset, (u32 *)&tpte, 32); + print_tpte(sc, i << 8, &tpte); + } + } +} + +static void dump_err_cqe(struct c4iw_dev *dev, struct t4_cqe *err_cqe) +{ + struct adapter *sc = dev->rdev.adap; + __be64 *p = (void *)err_cqe; + + CH_ERR(sc, "AE qpid 0x%x opcode %d status 0x%x " + "type %d wrid.hi 0x%x wrid.lo 0x%x\n", + CQE_QPID(err_cqe), CQE_OPCODE(err_cqe), + CQE_STATUS(err_cqe), CQE_TYPE(err_cqe), + CQE_WRID_HI(err_cqe), CQE_WRID_LOW(err_cqe)); + CH_ERR(sc, "%016llx %016llx %016llx %016llx\n", + (long long)be64_to_cpu(p[0]), (long long)be64_to_cpu(p[1]), + (long long)be64_to_cpu(p[2]), (long long)be64_to_cpu(p[3])); + + /* + * Ingress WRITE and READ_RESP errors provide + * the offending stag, so parse and log it. + */ + if (RQ_TYPE(err_cqe) && (CQE_OPCODE(err_cqe) == FW_RI_RDMA_WRITE || + CQE_OPCODE(err_cqe) == FW_RI_READ_RESP)) + t4_dump_stag(sc, CQE_WRID_STAG(err_cqe)); +} + static void post_qp_event(struct c4iw_dev *dev, struct c4iw_cq *chp, struct c4iw_qp *qhp, struct t4_cqe *err_cqe, @@ -56,11 +132,7 @@ static void post_qp_event(struct c4iw_dev *dev, struct c4iw_cq *chp, return; } - printf("AE qpid 0x%x opcode %d status 0x%x " - "type %d wrid.hi 0x%x wrid.lo 0x%x\n", - CQE_QPID(err_cqe), CQE_OPCODE(err_cqe), - CQE_STATUS(err_cqe), CQE_TYPE(err_cqe), - CQE_WRID_HI(err_cqe), CQE_WRID_LOW(err_cqe)); + dump_err_cqe(dev, err_cqe); if (qhp->attr.state == C4IW_QP_STATE_RTS) { attrs.next_state = C4IW_QP_STATE_TERMINATE; diff --git a/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h b/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h index 89b05fd0a2e3..2e6abf6171c0 100644 --- a/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h +++ b/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h @@ -984,4 +984,6 @@ u32 c4iw_get_qpid(struct c4iw_rdev *rdev, struct c4iw_dev_ucontext *uctx); void c4iw_put_qpid(struct c4iw_rdev *rdev, u32 qid, struct c4iw_dev_ucontext *uctx); void c4iw_ev_dispatch(struct c4iw_dev *dev, struct t4_cqe *err_cqe); +void t4_dump_stag(struct adapter *sc, const u32 stag); +void t4_dump_all_stag(struct adapter *sc); #endif From nobody Thu Jan 11 05:34:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9YJQ4whtz56Vmj; Thu, 11 Jan 2024 05:34: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 4T9YJQ2Xsbz47th; Thu, 11 Jan 2024 05:34:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XPHiN71a+5mnry5zAWzYFP7teUUY54q1+qQ5HH3A7fc=; b=JcMwFbLhb0aZ5NevSzchk8R80A8/BHWF78fJRUGz8k2LI/yh5AidJSEL6ChfpWSi+NlE2g VOZ1pGp+sb4w1ddJtdTKGrUAY3SZVBkfB+1Kb7dm906eeWkmSNEfPx3Medc7rk6D000PMN m7njuP7hHDMWZTHUnxeLA6Eb6PFCiAyPkC8q+onF938LFdG4kIagd9Pm1g7Wny9/VQt+vg SiRZRGwQ1l/utSdQVOl2YukOS48EzSUrQiKwKJQy549Lys7zUtvLXDzNlrcIjVCctyEMay 7Gh2M1MibL75NELWBUWiyVE67tyXA6sBoBckIWas7QvRZtawDRog3LMU7pm3Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XPHiN71a+5mnry5zAWzYFP7teUUY54q1+qQ5HH3A7fc=; b=K12kCxyhcTsjWwfr7gc5n7RguHFen5ff5jcUIZ7yHC1XMHc/25JEC6zuARMVdJ/czNrPUw iYaFR7G9nl2k0Z/iQ9JEVLqfxSbbIuUyjkjZQou69e9cGXoHmFTEsF7sZoMWy3x2uHAtb3 YJ8rPFZBi93hfsTQHr3YCk3etKAnbcKCSt+n0glQF/G/P49yMTo9bJI5oG6HjcRQxTKkUg RKO8KgQLuJgT89fZ9Zm3xfyYGxLkCEjBlgP5z6hwVwrhcfKiIBvSCePYrn3DAQquK1V9Re 99RjhqkP7qcmcliy1iwPTV7iIesA5aBUnzg1SKpCUPgcth+SEjbF0XRA8ahWlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704951270; a=rsa-sha256; cv=none; b=m1FCYqYIO3IzGxq3AbnJKWKEYNyIGCjcmNvS2RTIKwac5I/orCDMOnb+NmHQx5zA615r2C IQiyOgri+fBf2I6Usk4i4hPx+mWS4M+/yxkGGF5Cx4afNiTNR76r3xD9GXNKXdl/wEiPTm 0CQX3z43XHU9M69wNhCF0jXKWBjEqEEAyEaqmnhUc3Try1r0tcUfrMJXI36IpPUis2ZmT6 iachbM1hvIypL7iPAFdwZP+sDVaFl/jb3TWOMeoePcBzGM2QPrWsQTMA5Ct9kQkt7YRZLi 52qZmTCgRYGNsGtgguCZYimVwExnH0x8z8RI31gcbV4FdOPqa8cGb98ZMqdl1A== 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 4T9YJQ1VNXz15QX; Thu, 11 Jan 2024 05:34: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 40B5YUiN009955; Thu, 11 Jan 2024 05:34:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B5YUA1009953; Thu, 11 Jan 2024 05:34:30 GMT (envelope-from git) Date: Thu, 11 Jan 2024 05:34:30 GMT Message-Id: <202401110534.40B5YUA1009953@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: b9ead2c2e71c - stable/13 - cxgbe(4): Dump the firmware log before falling back to a minimal config. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b9ead2c2e71c732e488e9f358ec36e1d4417e0d2 Auto-Submitted: auto-generated The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=b9ead2c2e71c732e488e9f358ec36e1d4417e0d2 commit b9ead2c2e71c732e488e9f358ec36e1d4417e0d2 Author: Navdeep Parhar AuthorDate: 2023-04-20 19:43:45 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-11 05:06:59 +0000 cxgbe(4): Dump the firmware log before falling back to a minimal config. It might have errors that explain why the attempted configuration failed. Sponsored by: Chelsio Communications (cherry picked from commit 27913351047b2f49c49c5f3dfc3bcbe3672eea36) --- sys/dev/cxgbe/t4_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index ebc341419946..8a4b31209501 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -5161,6 +5161,7 @@ partition_resources(struct adapter *sc) retry: rc = apply_cfg_and_initialize(sc, cfg_file, &caps_allowed); if (rc != 0 && fallback) { + dump_devlog(sc); device_printf(sc->dev, "failed (%d) to configure card with \"%s\" profile, " "will fall back to a basic configuration and retry.\n", From nobody Thu Jan 11 05:34:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9YJS23Srz56VkF; Thu, 11 Jan 2024 05:34: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 4T9YJR5YHJz47xJ; Thu, 11 Jan 2024 05:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4KkthGv9/l8ZIp6hAXExZuh8kmDP8cBu1A7DHc4MedY=; b=wIFpkggfVDhBNLx5cxCwHqwyx9n4wDUqAL0Jya1TyLSX769IcMGnUK4pqT7f3cOQ+tdoeR 8A/fuEQhwb+O70iH2uTnpg2eXMJyySINQafr3HeWlithGQDNf1QPWQT0RZpXaKGqcoPjoB 6pncwPrXYXLGBv0qSnaOU8pLSginaitsvCgqxdqgEppZjfN4AtXk66RGrBSR1adSLMsndz LVLSKEyh71Q3gwbYL0N20sqOXawXAkiD4Evkeju99gXcEcAPq0D3b2XBIcbtY/BcFI7P2T ghr8yyV9L4XJ7aXr1TE8BxMEMtWt6Gtz6l8oUvW2p8E48V6QR2uz7p9poBI9SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4KkthGv9/l8ZIp6hAXExZuh8kmDP8cBu1A7DHc4MedY=; b=ATF27Sm8ot6Fo2VSJW6Y7cYQIXjbI+z8O7N/8jZ0+ECjUkzuMqy+Ai6wfpSlT94wjAnBb+ 3CKQOLbPA7ySckim/FKifVrtj06fA4nEcPH+ybYSBZ/RAxqc85z+sIS2rp+9PGd4OkntEF xDtC62BN+CTCeHhbu83KdCpFG9LoOIkggPGgoI4gS3dIoIs7fuCl26wWotCSmKbf6N6iMs rOuLdB8Rv32vOXn7WtPHTvAIBRCR+i4imBECteD7v7SYzWIyrCmQOb7BQzTiYvQbj4FA5p Q2TCoWIKpYWD+kve9gmEjR/1i43DbYwN0a/WicSNXcvylYcQOHu15hdonA3ZDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704951271; a=rsa-sha256; cv=none; b=xDaNAij9KVHB1uNIKxQEzgaCHQ6yPuVz48BZDS9HaurdsHJOxsruEINmWIbBuLo1EhfSBO Fcxob/ZM56TsUF2QJFGHXJ6+mzb5meV8H800K0vFqAYfI6fwCHkdSMEtbICE10yzIuBWQ4 JXTSluBoIVVm4QzKsHbwD1oA3MA0SoL/DfDLLyL/5+l29p+bKMq9BEBLn5DfTdgfiw8CUR aWphL0SYIG4Amg5nugQDKhoPp6qD0kW2GNYX8EIUO1wEOF+cC9Ag6MxgmjM/j5e+aTIiQE G2mJghxc/cAB04S8/JvfpHYHlrMJpr/8nsnhV9DPLPrKbQW7RHUd/DKLzUvf+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 4T9YJR3ljvz15S9; Thu, 11 Jan 2024 05:34: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 40B5YVeN010000; Thu, 11 Jan 2024 05:34:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B5YVkG009997; Thu, 11 Jan 2024 05:34:31 GMT (envelope-from git) Date: Thu, 11 Jan 2024 05:34:31 GMT Message-Id: <202401110534.40B5YVkG009997@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: 5f884ac086ed - stable/13 - cxgbe(4): Update firmwares to version 1.27.3.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5f884ac086ed52121fc878efaabd0e2ff0f97d77 Auto-Submitted: auto-generated The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=5f884ac086ed52121fc878efaabd0e2ff0f97d77 commit 5f884ac086ed52121fc878efaabd0e2ff0f97d77 Author: Navdeep Parhar AuthorDate: 2023-04-21 01:24:57 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-11 05:06:59 +0000 cxgbe(4): Update firmwares to version 1.27.3.0 These are the changes since the last update (copy-pasted from the release notes for Chelsio Unified Wire v3.18.0.0): ==================== Version : 1.27.3.0 Date : 04/07/2023 Fixes ----- BASE: - Fixed a hang if module eeprom reads gives invalid data. - KR backlplane no-fec link problem fixed. OFLD: - iscsi ddp errors fixed. - iwarp connection abort in rare cases causing NIC traffic hang fixed. ENHANCEMENTS ------------ BASE: - Cisco GLC-TE 1G modules support added. ==================== Version : 1.27.1.0 Date : 12/02/2022 Fixes ----- BASE: - memwrite dsgl cannot be used for T5. OFLD: - Enabled FCoE in SO adapters. - TOE-TLS crash fixed. - iscsi hang fixed. Sponsored by: Chelsio Communications (cherry picked from commit ca5391bd8579fd404dc31880b4d8744f43d22adb) --- sys/conf/files | 6 +++--- .../{t4fw-1.27.0.0.bin => t4fw-1.27.3.0.bin} | Bin 570880 -> 570880 bytes sys/dev/cxgbe/firmware/t4fw_interface.h | 6 +++--- sys/dev/cxgbe/firmware/t5fw-1.27.0.0.bin | Bin 677376 -> 0 bytes sys/dev/cxgbe/firmware/t5fw-1.27.3.0.bin | Bin 0 -> 678912 bytes sys/dev/cxgbe/firmware/t6fw-1.27.0.0.bin | Bin 729600 -> 0 bytes sys/dev/cxgbe/firmware/t6fw-1.27.3.0.bin | Bin 0 -> 730624 bytes sys/modules/cxgbe/t4_firmware/Makefile | 2 +- sys/modules/cxgbe/t5_firmware/Makefile | 2 +- sys/modules/cxgbe/t6_firmware/Makefile | 2 +- 10 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 4b624a71c772..b6a0503c087f 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1528,7 +1528,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.27.0.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.27.3.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -1562,7 +1562,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.27.0.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.27.3.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t5fw.fw" @@ -1596,7 +1596,7 @@ t6fw.fwo optional cxgbe \ no-implicit-rule \ clean "t6fw.fwo" t6fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t6fw-1.27.0.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t6fw-1.27.3.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t6fw.fw" diff --git a/sys/dev/cxgbe/firmware/t4fw-1.27.0.0.bin b/sys/dev/cxgbe/firmware/t4fw-1.27.3.0.bin similarity index 60% rename from sys/dev/cxgbe/firmware/t4fw-1.27.0.0.bin rename to sys/dev/cxgbe/firmware/t4fw-1.27.3.0.bin index dcae4d1b8a2b..e1576783a65c 100644 Binary files a/sys/dev/cxgbe/firmware/t4fw-1.27.0.0.bin and b/sys/dev/cxgbe/firmware/t4fw-1.27.3.0.bin differ diff --git a/sys/dev/cxgbe/firmware/t4fw_interface.h b/sys/dev/cxgbe/firmware/t4fw_interface.h index 39ab58428304..1c12f60b0fe4 100644 --- a/sys/dev/cxgbe/firmware/t4fw_interface.h +++ b/sys/dev/cxgbe/firmware/t4fw_interface.h @@ -10001,17 +10001,17 @@ enum fw_hdr_chip { enum { T4FW_VERSION_MAJOR = 1, T4FW_VERSION_MINOR = 27, - T4FW_VERSION_MICRO = 0, + T4FW_VERSION_MICRO = 3, T4FW_VERSION_BUILD = 0, T5FW_VERSION_MAJOR = 1, T5FW_VERSION_MINOR = 27, - T5FW_VERSION_MICRO = 0, + T5FW_VERSION_MICRO = 3, T5FW_VERSION_BUILD = 0, T6FW_VERSION_MAJOR = 1, T6FW_VERSION_MINOR = 27, - T6FW_VERSION_MICRO = 0, + T6FW_VERSION_MICRO = 3, T6FW_VERSION_BUILD = 0, }; diff --git a/sys/dev/cxgbe/firmware/t5fw-1.27.0.0.bin b/sys/dev/cxgbe/firmware/t5fw-1.27.0.0.bin deleted file mode 100644 index 1158b9567336..000000000000 Binary files a/sys/dev/cxgbe/firmware/t5fw-1.27.0.0.bin and /dev/null differ diff --git a/sys/dev/cxgbe/firmware/t5fw-1.27.3.0.bin b/sys/dev/cxgbe/firmware/t5fw-1.27.3.0.bin new file mode 100644 index 000000000000..fcae45a4df35 Binary files /dev/null and b/sys/dev/cxgbe/firmware/t5fw-1.27.3.0.bin differ diff --git a/sys/dev/cxgbe/firmware/t6fw-1.27.0.0.bin b/sys/dev/cxgbe/firmware/t6fw-1.27.0.0.bin deleted file mode 100644 index 0652ae751b82..000000000000 Binary files a/sys/dev/cxgbe/firmware/t6fw-1.27.0.0.bin and /dev/null differ diff --git a/sys/dev/cxgbe/firmware/t6fw-1.27.3.0.bin b/sys/dev/cxgbe/firmware/t6fw-1.27.3.0.bin new file mode 100644 index 000000000000..31bd7019e51e Binary files /dev/null and b/sys/dev/cxgbe/firmware/t6fw-1.27.3.0.bin differ diff --git a/sys/modules/cxgbe/t4_firmware/Makefile b/sys/modules/cxgbe/t4_firmware/Makefile index 08476a462ba0..8bb9afa2e8a6 100644 --- a/sys/modules/cxgbe/t4_firmware/Makefile +++ b/sys/modules/cxgbe/t4_firmware/Makefile @@ -16,7 +16,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T4FW_VER= 1.27.0.0 +T4FW_VER= 1.27.3.0 FIRMWS+= t4fw-${T4FW_VER}.bin:t4fw:${T4FW_VER} .include diff --git a/sys/modules/cxgbe/t5_firmware/Makefile b/sys/modules/cxgbe/t5_firmware/Makefile index 292bb93a9475..273710ecf7d8 100644 --- a/sys/modules/cxgbe/t5_firmware/Makefile +++ b/sys/modules/cxgbe/t5_firmware/Makefile @@ -16,7 +16,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T5FW_VER= 1.27.0.0 +T5FW_VER= 1.27.3.0 FIRMWS+= t5fw-${T5FW_VER}.bin:t5fw:${T5FW_VER} .include diff --git a/sys/modules/cxgbe/t6_firmware/Makefile b/sys/modules/cxgbe/t6_firmware/Makefile index 771142b55d0d..c2acdd6dc72a 100644 --- a/sys/modules/cxgbe/t6_firmware/Makefile +++ b/sys/modules/cxgbe/t6_firmware/Makefile @@ -16,7 +16,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T6FW_VER= 1.27.0.0 +T6FW_VER= 1.27.3.0 FIRMWS+= t6fw-${T6FW_VER}.bin:t6fw:${T6FW_VER} .include From nobody Thu Jan 11 05:34:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9YJT0frGz56VY3; Thu, 11 Jan 2024 05:34: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 4T9YJS6BNqz47s4; Thu, 11 Jan 2024 05:34:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p+bSSpnaTIfsIsG9iyaz7oerrAWiqIf/Watvcb90G/0=; b=q+GK+F3g5NrCqHKQhtvEH39ogF6TtZ7gtAzmy+LW7wmCYjWH/svLomxMnesvpEnt6JQpJ1 Kz/ZESFjBh3U8FBOG28BM/78jzIbY5w14hevP+DRHveozVdme5OQ6dBIj7H4g7R0XnxwFq OytvH/GBlpcPuSmZlc6m07ub3wyfgN/sAmsJXCcs3enhw7hEufnCSgQrg/XdgP8rab+DK9 XbiH4bXMpVJceZ/nRBvikIbyx6Ipp1JD5qDDj3kubJ31lbPjBN02oE5bWKrQTbNBMI+9yj qXFR9cWXyXQnxQKLV2AgSBsPnkFqpBE6o4LNoiTIF7y7s20fEEJdoyoLF+xrQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p+bSSpnaTIfsIsG9iyaz7oerrAWiqIf/Watvcb90G/0=; b=c+7ddYxbtaoZuw4H497OKtAz5G0+w0ZsQ4g/vtC3SwVSAuV86y28xFq8xPfpOmJQ+3TjeH 3VPslkshMLs69yokuo+WCFpMQjpOEU4TdDaN+Cs/iJBKGPeAsDz56Hm8n+pCFS9ssHn3oZ s1vsBrHXkKZyUmgf/ICnTnyqCmPBPkvmOOuRdoDlotKakh2inNBXy8ti/H8POSWXUMsSD6 J69/A+7QdLT271yDingTrs0bZbpIFYNcYOANtulb6CyAA3hvO2NYgCR9bLME3JwSlhuoKb i5CdOq6G0Q1ZgJCaQXXQOGwaAtqX8ebLns8N17rnWaIQ6FMKQ+2iLVb99tfiEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704951272; a=rsa-sha256; cv=none; b=iSMqYSqK5y08U9K/VzHmkoG6i6N+vQWrvLPz099gEHXdwVlDkfnEsNfV4HkIF8L65P2ouT SkF895bYVH55pfw6n0eBbVUhGptrM6RnOZvRsRFzgHAsefU0alfD3eIbRtzRfuqAlyciM2 FZJ+Zx9Q7lXsQJNsNdkPgYyAbTVS+2q4iK3bYD3OKJkbYWigibcxaOlox5yttoFLhPD8t2 U3v1e1/ellkGID1qW9YuBrAecfl5jh7k4nGa89BlZT0iTjYgc6IzNtucDASkmVVWDoJ+sD +jzv223ZUOyntnGNoctnZhbqXbg/WTtRCy/RbE4bYIsuY8dmy4b8UhDJ09lKGg== 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 4T9YJS51nsz168Q; Thu, 11 Jan 2024 05:34: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 40B5YWGp010042; Thu, 11 Jan 2024 05:34:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B5YWqK010039; Thu, 11 Jan 2024 05:34:32 GMT (envelope-from git) Date: Thu, 11 Jan 2024 05:34:32 GMT Message-Id: <202401110534.40B5YWqK010039@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: fe77cfce0180 - stable/13 - cxgbe(4): Update firmwares to 1.27.4.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fe77cfce018023df294f97ffbc3bc903cf1a78fa Auto-Submitted: auto-generated The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=fe77cfce018023df294f97ffbc3bc903cf1a78fa commit fe77cfce018023df294f97ffbc3bc903cf1a78fa Author: Navdeep Parhar AuthorDate: 2023-08-16 12:42:00 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-11 05:06:59 +0000 cxgbe(4): Update firmwares to 1.27.4.0 This is the list of changes since last release, taken from the release notes of Chelsio Unified Wire 3.18.0.1. Version : 1.27.4.0 Date : 07/05/2023 ======================================= Fixes ----- BASE: - Handle 40G to 100G cable change. - Avoid unnecessary i2c read. ======================================= Obtained from: Chelsio Communications Sponsored by: Chelsio Communications (cherry picked from commit 8a2e880ab07f3cd04a0f458809fba5d4eacf75f1) --- sys/conf/files | 6 +++--- .../{t4fw-1.27.3.0.bin => t4fw-1.27.4.0.bin} | Bin 570880 -> 570880 bytes sys/dev/cxgbe/firmware/t4fw_interface.h | 6 +++--- .../{t5fw-1.27.3.0.bin => t5fw-1.27.4.0.bin} | Bin 678912 -> 678912 bytes .../{t6fw-1.27.3.0.bin => t6fw-1.27.4.0.bin} | Bin 730624 -> 730624 bytes sys/modules/cxgbe/t4_firmware/Makefile | 2 +- sys/modules/cxgbe/t5_firmware/Makefile | 2 +- sys/modules/cxgbe/t6_firmware/Makefile | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index b6a0503c087f..bfe53409263a 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1528,7 +1528,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.27.3.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.27.4.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -1562,7 +1562,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.27.3.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.27.4.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t5fw.fw" @@ -1596,7 +1596,7 @@ t6fw.fwo optional cxgbe \ no-implicit-rule \ clean "t6fw.fwo" t6fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t6fw-1.27.3.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t6fw-1.27.4.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t6fw.fw" diff --git a/sys/dev/cxgbe/firmware/t4fw-1.27.3.0.bin b/sys/dev/cxgbe/firmware/t4fw-1.27.4.0.bin similarity index 99% rename from sys/dev/cxgbe/firmware/t4fw-1.27.3.0.bin rename to sys/dev/cxgbe/firmware/t4fw-1.27.4.0.bin index e1576783a65c..9addb9e25422 100644 Binary files a/sys/dev/cxgbe/firmware/t4fw-1.27.3.0.bin and b/sys/dev/cxgbe/firmware/t4fw-1.27.4.0.bin differ diff --git a/sys/dev/cxgbe/firmware/t4fw_interface.h b/sys/dev/cxgbe/firmware/t4fw_interface.h index 1c12f60b0fe4..0ebc404bb72e 100644 --- a/sys/dev/cxgbe/firmware/t4fw_interface.h +++ b/sys/dev/cxgbe/firmware/t4fw_interface.h @@ -10001,17 +10001,17 @@ enum fw_hdr_chip { enum { T4FW_VERSION_MAJOR = 1, T4FW_VERSION_MINOR = 27, - T4FW_VERSION_MICRO = 3, + T4FW_VERSION_MICRO = 4, T4FW_VERSION_BUILD = 0, T5FW_VERSION_MAJOR = 1, T5FW_VERSION_MINOR = 27, - T5FW_VERSION_MICRO = 3, + T5FW_VERSION_MICRO = 4, T5FW_VERSION_BUILD = 0, T6FW_VERSION_MAJOR = 1, T6FW_VERSION_MINOR = 27, - T6FW_VERSION_MICRO = 3, + T6FW_VERSION_MICRO = 4, T6FW_VERSION_BUILD = 0, }; diff --git a/sys/dev/cxgbe/firmware/t5fw-1.27.3.0.bin b/sys/dev/cxgbe/firmware/t5fw-1.27.4.0.bin similarity index 60% rename from sys/dev/cxgbe/firmware/t5fw-1.27.3.0.bin rename to sys/dev/cxgbe/firmware/t5fw-1.27.4.0.bin index fcae45a4df35..b32f270b1866 100644 Binary files a/sys/dev/cxgbe/firmware/t5fw-1.27.3.0.bin and b/sys/dev/cxgbe/firmware/t5fw-1.27.4.0.bin differ diff --git a/sys/dev/cxgbe/firmware/t6fw-1.27.3.0.bin b/sys/dev/cxgbe/firmware/t6fw-1.27.4.0.bin similarity index 76% rename from sys/dev/cxgbe/firmware/t6fw-1.27.3.0.bin rename to sys/dev/cxgbe/firmware/t6fw-1.27.4.0.bin index 31bd7019e51e..a47f287848f1 100644 Binary files a/sys/dev/cxgbe/firmware/t6fw-1.27.3.0.bin and b/sys/dev/cxgbe/firmware/t6fw-1.27.4.0.bin differ diff --git a/sys/modules/cxgbe/t4_firmware/Makefile b/sys/modules/cxgbe/t4_firmware/Makefile index 8bb9afa2e8a6..fb8eeb0d6c8e 100644 --- a/sys/modules/cxgbe/t4_firmware/Makefile +++ b/sys/modules/cxgbe/t4_firmware/Makefile @@ -16,7 +16,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T4FW_VER= 1.27.3.0 +T4FW_VER= 1.27.4.0 FIRMWS+= t4fw-${T4FW_VER}.bin:t4fw:${T4FW_VER} .include diff --git a/sys/modules/cxgbe/t5_firmware/Makefile b/sys/modules/cxgbe/t5_firmware/Makefile index 273710ecf7d8..2876d1a6b041 100644 --- a/sys/modules/cxgbe/t5_firmware/Makefile +++ b/sys/modules/cxgbe/t5_firmware/Makefile @@ -16,7 +16,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T5FW_VER= 1.27.3.0 +T5FW_VER= 1.27.4.0 FIRMWS+= t5fw-${T5FW_VER}.bin:t5fw:${T5FW_VER} .include diff --git a/sys/modules/cxgbe/t6_firmware/Makefile b/sys/modules/cxgbe/t6_firmware/Makefile index c2acdd6dc72a..7ac481c4bdb9 100644 --- a/sys/modules/cxgbe/t6_firmware/Makefile +++ b/sys/modules/cxgbe/t6_firmware/Makefile @@ -16,7 +16,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T6FW_VER= 1.27.3.0 +T6FW_VER= 1.27.4.0 FIRMWS+= t6fw-${T6FW_VER}.bin:t6fw:${T6FW_VER} .include From nobody Thu Jan 11 05:34:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9YJV3zlkz56Vmm; Thu, 11 Jan 2024 05:34: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 4T9YJV0PqFz483T; Thu, 11 Jan 2024 05:34:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pS7FklCcfjkouG62f0tV5Pz9WcvS5wu4EqDekQM+ICQ=; b=tphgPWRZDNQmvakrn7jMOWSciShWdQfvjT7Bx4/zKM/yhup1JLmD7MVR2F/N6sLdc8xbGa mfXCJIOrjVsAwbgaUmjrIxjGLW1yi6ISZF1fWnlPEpvBBxgtxa2zpxbtaLqvssKNQ6yHQ6 V55/mDkOCBgAcq3ka3LtLMPfSfVGSdBwPfSdgPoHHdcm2yAhyqV2sgCuxE/G/3VSo52/WV JfCzI6YLXgOqpNQ3oOQkoPXerondMeONGerGLEsCKj+nU3Y+J4gLLVxtaL1DnUhvqx+bK9 hNMFYUEi+taZK677VQQUpwb9G1zYxoS6C6jVO00ULfDNX5lra7VCX1oSzf0qpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pS7FklCcfjkouG62f0tV5Pz9WcvS5wu4EqDekQM+ICQ=; b=u6XNeDARc0RJJ7pq5Km6mWIolrr8gUkDf2fLWBBLczum5P6C+yaBcEmw1cNI5sUpc+qw1h 3Kp0FxoH/7AHg7fmFww85kGtbzd5YIR01ll7mDZ3DTFziZuEPRhJFmFdIbVu/k56rZ1kO4 bHAjWweQORqXXjx42hp582II50Fq2pV1Vdme/RvmGzRGDuv03E5ais3V952stxeI3MG53W /q7P8CqdfyujgN+AXaAppCBIwsAhsBoha1hk/HhbR3pUeVGyaq5C+QU3q4+MCLDPb2R/a9 umZLTCiU841c//RLHJll0EmJvEfcV1wWdjPbowG55671YjISYkh/nAm/Mbduqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704951274; a=rsa-sha256; cv=none; b=OdLtDUd8wSOD41npHNNOS21HzGCmZiS8OXtLdWtYRfTOeM+I2WNK6bQQ2qB8JsD7sBpPef Oo+c2V+PEM7W9M9qTrdMhAHn+n/3rGew5QKkfSNdiwqrh6mLGWUahtUkStme2OLnV8STiU f0pLmPG0oLRy1GmFwpfTQS4iV2GK4rNC60sTpTREukQ4QXCDvM3BUEUHhMFfsQN/rqF8s8 vhvmh/EPOCvO5ALgchJSYsQPsFPCpJvZBROoAz+iV15arFiyAKjnWr8bBJ5uhgjyTWqxzd UuKFx7cqlVIchwLn2nIZf+fdm4yYyWALLFPrLS8TVWvWDUTIzIrYH71W3QbV/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 4T9YJT64rRz15cG; Thu, 11 Jan 2024 05:34: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 40B5YXD9010100; Thu, 11 Jan 2024 05:34:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B5YXN8010097; Thu, 11 Jan 2024 05:34:33 GMT (envelope-from git) Date: Thu, 11 Jan 2024 05:34:33 GMT Message-Id: <202401110534.40B5YXN8010097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: 86ad0ace9c05 - stable/13 - cxgbe(4): Destroy the tick mutex during VI detach. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 86ad0ace9c057173a3f935e48115782ac5516ecf Auto-Submitted: auto-generated The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=86ad0ace9c057173a3f935e48115782ac5516ecf commit 86ad0ace9c057173a3f935e48115782ac5516ecf Author: Navdeep Parhar AuthorDate: 2023-12-27 21:00:29 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-11 05:06:59 +0000 cxgbe(4): Destroy the tick mutex during VI detach. This avoids a mutex reinitialization when the VI is detached and reattached. Fixes: 516fe911a6b7 cxgbe(4): Always use the per-VI callout to read interface stats. Sponsored by: Chelsio Communications (cherry picked from commit 8b144c015c9cce0bc99a7fbdc43f22f51a946d2c) --- sys/dev/cxgbe/t4_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 8a4b31209501..afe3c42b48b2 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -2750,6 +2750,7 @@ cxgbe_vi_detach(struct vi_info *vi) #endif cxgbe_uninit_synchronized(vi); callout_drain(&vi->tick); + mtx_destroy(&vi->tick_mtx); sysctl_ctx_free(&vi->ctx); vi_full_uninit(vi); From nobody Thu Jan 11 05:34:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9YJW2fHMz56VhT; Thu, 11 Jan 2024 05:34: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 4T9YJW0g3fz47vc; Thu, 11 Jan 2024 05:34:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fDmMFrRs+I5bHNfcNjaA8HiQVCKjvqPsdt2M8Gk+jTo=; b=kbgGjClQrjUumN3L+099LUggBFtyI9xhgj6oUtTPpfRGCzfrHQBjqSRByX7dUfaZHcgwau m89UB1i4RGnTgCR/LrETkN2srXuIRLp5dGYmpWGOdjcHr+Q6tJWVOLX9R8gLC2eyrqzYpz Pet5Hnf7wiCs/Z+D/nqThT3stx+BeNkDRCJCTzqQUB/q4oUI/kq+nZ0svrQ4KW3kxk5n0H d0DfXOP1l7/kX249FeQqDotYNPd5rXCV1TLZZ9jBWb5xcDji5/SGR2xWYPbNNUsKhujjvv l6K1zXj5COaZEN67vmr0xFfV6VnKCEVDC1NaXW7sznqoNY+AFEM/foyR5EtfvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fDmMFrRs+I5bHNfcNjaA8HiQVCKjvqPsdt2M8Gk+jTo=; b=BrKWWmJFSnNUBfFeiZVrEDJciSa0etYXYoalxIXSlfKSqi8pQr09JcMS5LEBVIV3HlCKdg zH/obtzLzuglVD/+CPlxuqWROsnSUl3ifEr+7PhI7WDX0fZanjlHDjXp9qwX1Wt2PHFeXB dDl8tyBDSwI6YQMi9jYn+30UxvJ4GThAn6KzC4FMOlfhQ7F7bv7/YQy4EYLbcGAlFp6xIT lisc6BB2c4YgBr/o2783pLAl+sBTTEAwAlJsiXUIAL/VhUR5L93/px7GAumojYVp/z3DHQ bJD+STtDqNKx/emqXZ0KKrrdqlnVcrTmfm+v5oTrHhg0mIZoqO6nK203Aarh3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704951275; a=rsa-sha256; cv=none; b=GMhQEZ160odfyW9h03XHq7pkiJJDM2QPFF5qYg5kl7VmhImXHpDR3uXd7X6oYvQm6j/ixR ulvq4G9Hkk6J51/BcUnyGRddBc/FI+MccyPmP7nycZm/qoFXNUXz+gqr6IYPMcn8J6Wedz wYLnT1s7CE0j4cVW9dHLopENmp6liNJzI2l9b50QYGMGR1L5/M1AKTsHo6XIFsfS0VYnss k+/59al6sjXK5DeiHRhBXIIrQtsYBfDA7N4N5NxuJoBHczWsYD6EqnOXrhbH2zcuD8j51F iL7e1+9w42FxKK9H6iEfvySpNt94hC3Cp+jZ66rmxP44mxvADntWYCUzGjQFjg== 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 4T9YJV6tfbz15cH; Thu, 11 Jan 2024 05:34: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 40B5YYUx010143; Thu, 11 Jan 2024 05:34:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B5YYo1010140; Thu, 11 Jan 2024 05:34:34 GMT (envelope-from git) Date: Thu, 11 Jan 2024 05:34:34 GMT Message-Id: <202401110534.40B5YYo1010140@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: 3a507508e365 - stable/13 - cxgbe(4): Fix virtual interface reattach. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3a507508e3657b4946ee401638a043f2f073da81 Auto-Submitted: auto-generated The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=3a507508e3657b4946ee401638a043f2f073da81 commit 3a507508e3657b4946ee401638a043f2f073da81 Author: Navdeep Parhar AuthorDate: 2024-01-02 21:20:45 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-11 05:06:59 +0000 cxgbe(4): Fix virtual interface reattach. Replace the DOOMED flag with a transient DETACHING flag that is cleared when VI is detached. This fixes VI reattach when only the VI and not the parent nexus is detached. The old flag was never cleared and prevented subsequent synch op's related to the VI. PR: 275260 Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D43287 Sponsored by: Chelsio Communications (cherry picked from commit 0201eb29dde9dccbf796f81fbf18f3b21798183d) --- sys/dev/cxgbe/adapter.h | 10 ++++++---- sys/dev/cxgbe/t4_main.c | 33 +++++++++++++++++++-------------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 58ea1eb3f29a..1896596df737 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -174,7 +174,7 @@ enum { FIXED_IFMEDIA = (1 << 4), /* ifmedia list doesn't change. */ /* VI flags */ - DOOMED = (1 << 0), + VI_DETACHING = (1 << 0), VI_INIT_DONE = (1 << 1), /* 1 << 2 is unused, was VI_SYSCTL_CTX */ TX_USES_VM_WR = (1 << 3), @@ -188,8 +188,9 @@ enum { DF_VERBOSE_SLOWINTR = (1 << 4), /* Chatty slow intr handler */ }; -#define IS_DOOMED(vi) ((vi)->flags & DOOMED) -#define SET_DOOMED(vi) do {(vi)->flags |= DOOMED;} while (0) +#define IS_DETACHING(vi) ((vi)->flags & VI_DETACHING) +#define SET_DETACHING(vi) do {(vi)->flags |= VI_DETACHING;} while (0) +#define CLR_DETACHING(vi) do {(vi)->flags &= ~VI_DETACHING;} while (0) #define IS_BUSY(sc) ((sc)->flags & CXGBE_BUSY) #define SET_BUSY(sc) do {(sc)->flags |= CXGBE_BUSY;} while (0) #define CLR_BUSY(sc) do {(sc)->flags &= ~CXGBE_BUSY;} while (0) @@ -1301,8 +1302,9 @@ int t4_map_bar_2(struct adapter *); int t4_setup_intr_handlers(struct adapter *); void t4_sysctls(struct adapter *); int begin_synchronized_op(struct adapter *, struct vi_info *, int, char *); -void doom_vi(struct adapter *, struct vi_info *); void end_synchronized_op(struct adapter *, int); +void begin_vi_detach(struct adapter *, struct vi_info *); +void end_vi_detach(struct adapter *, struct vi_info *); int update_mac_settings(struct ifnet *, int); int adapter_init(struct adapter *); int vi_init(struct vi_info *); diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index afe3c42b48b2..cbf15b5270ff 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -2772,17 +2772,14 @@ cxgbe_detach(device_t dev) device_delete_children(dev); sysctl_ctx_free(&pi->ctx); - doom_vi(sc, &pi->vi[0]); - + begin_vi_detach(sc, &pi->vi[0]); if (pi->flags & HAS_TRACEQ) { sc->traceq = -1; /* cloner should not create ifnet */ t4_tracer_port_detach(sc); } - cxgbe_vi_detach(&pi->vi[0]); ifmedia_removeall(&pi->media); - - end_synchronized_op(sc, 0); + end_vi_detach(sc, &pi->vi[0]); return (0); } @@ -3662,12 +3659,10 @@ vcxgbe_detach(device_t dev) vi = device_get_softc(dev); sc = vi->adapter; - doom_vi(sc, vi); - + begin_vi_detach(sc, vi); cxgbe_vi_detach(vi); t4_free_vi(sc, sc->mbox, sc->pf, 0, vi->viid); - - end_synchronized_op(sc, 0); + end_vi_detach(sc, vi); return (0); } @@ -6313,7 +6308,7 @@ begin_synchronized_op(struct adapter *sc, struct vi_info *vi, int flags, ADAPTER_LOCK(sc); for (;;) { - if (vi && IS_DOOMED(vi)) { + if (vi && IS_DETACHING(vi)) { rc = ENXIO; goto done; } @@ -6352,14 +6347,13 @@ done: /* * Tell if_ioctl and if_init that the VI is going away. This is * special variant of begin_synchronized_op and must be paired with a - * call to end_synchronized_op. + * call to end_vi_detach. */ void -doom_vi(struct adapter *sc, struct vi_info *vi) +begin_vi_detach(struct adapter *sc, struct vi_info *vi) { - ADAPTER_LOCK(sc); - SET_DOOMED(vi); + SET_DETACHING(vi); wakeup(&sc->flags); while (IS_BUSY(sc)) mtx_sleep(&sc->flags, &sc->sc_lock, 0, "t4detach", 0); @@ -6372,6 +6366,17 @@ doom_vi(struct adapter *sc, struct vi_info *vi) ADAPTER_UNLOCK(sc); } +void +end_vi_detach(struct adapter *sc, struct vi_info *vi) +{ + ADAPTER_LOCK(sc); + KASSERT(IS_BUSY(sc), ("%s: controller not busy.", __func__)); + CLR_BUSY(sc); + CLR_DETACHING(vi); + wakeup(&sc->flags); + ADAPTER_UNLOCK(sc); +} + /* * {begin|end}_synchronized_op must be called from the same thread. */ From nobody Thu Jan 11 05:34:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9YJX5yhYz56Vsq; Thu, 11 Jan 2024 05:34: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 4T9YJX2KnSz481b; Thu, 11 Jan 2024 05:34:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7UiIIXwT02BXriqmQ7WE+B/yKyjALxWd20dxQsMr9mE=; b=ZwWF2gEYMCbLlZ2kSCLAKBq4YIuUpfKDhFFzWYwXVlL7hf3oMrZwjhFVvqU079brdh3mbx VdA1c6iExHGtNBBslQOU4lebHNIptP5KxZsmxlNkSMxE+thtEGm9Ad7oWYCxCkNXvXoJvL 1+c5fTWJLJ/gQKzx95K2BjQH1jtuJ8/NfLtObNaATbYdpMFAFTyXDyNFEY3+E11805kX9I pfyfcjWE5LncuAqILjYQdRV1sR1QNWJQ++adkUBk6SQdaXcE0bKr2FHEH3DJ+yJdjNvShc +OEDX07tcGhm/z0D6SgJg5lF/qRPpKJmZiBUMgwJu7xvUW4xTWYtkQOLXlmQpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7UiIIXwT02BXriqmQ7WE+B/yKyjALxWd20dxQsMr9mE=; b=F8/oMMWzrfoHFnSxmlOjLA+DP7VvWSbpvBVkhG7T16huFBdtUJ3sVQH5d6X4EZ3DJNTHKZ Kw50JkAbKAPQDh6MsLfWLdVYkE6lta2dwrIkqqBAjpZpJfJp0oOq2Z7+0rokCfdlZicAeB CoKxvVrDYdDIFwULNPCH/kj7DA4QFQPo5b2/eDM7AQOSfwGpByq5iz8Zf7+cwVM4Ck1RZa +arjSki1G1ibSyHBaRMdmc0rjxaEFJiFQqal+V/dcxQyYcPkaQT2017097l8M8SMyQIDz9 jfEwS5hSvJrcI1MDt+gi8DXBEmIyOrGqcc/25Fhfqqi27EScpU/00fMBk9zf2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704951276; a=rsa-sha256; cv=none; b=w/7V0MfT1yxVys0Y1m3zgfKbvszmT7WDyea1ztb2bihpbz15pCvMOFPOd+jEZyXNF8Tu7P Cc7En4yl3lAtJKm/tuSUnDEVbLTHDP2uFkdI6OuEE47o+PG4ybG479v1pjJPYIkTdHKpcc Zs8ZqZRHwCVzTjYry10dXzDoy7sVWyismUkHIYr3w+2FmMqik6y/791mxQd+fvnmq1jcHE ZFatYG91ljY3kFgztM0IVGfaSksw/VUTpucsWIsJEgpsN2vEM+CUgEVJJcVZ0TPHc3FlQt y3UtI5jJzPyIsV8akgcvV9kFa/IlhIrtpFtq4LejbDbygh0mnF/rC+T//KH9Aw== 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 4T9YJX1Khkz1602; Thu, 11 Jan 2024 05:34: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 40B5Yawe010190; Thu, 11 Jan 2024 05:34:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B5YaqI010186; Thu, 11 Jan 2024 05:34:36 GMT (envelope-from git) Date: Thu, 11 Jan 2024 05:34:36 GMT Message-Id: <202401110534.40B5YaqI010186@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: 1c336d39156c - stable/13 - cxgbe(4): Update firmwares to 1.27.5.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1c336d39156c53b38fe82632bf1b626e2e82cb96 Auto-Submitted: auto-generated The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=1c336d39156c53b38fe82632bf1b626e2e82cb96 commit 1c336d39156c53b38fe82632bf1b626e2e82cb96 Author: Navdeep Parhar AuthorDate: 2024-01-04 19:37:21 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-11 05:06:59 +0000 cxgbe(4): Update firmwares to 1.27.5.0 Version : 1.27.5.0 Date : 10/10/2023 ===================== Fixes ----- BASE: - Fixed handling the Remote Fault with AN, causing the link failure. ===================== Obtained from: Chelsio Communications Sponsored by: Chelsio Communications (cherry picked from commit b1e82d33193b83d86d46483b4ddfe295becd80c4) --- sys/conf/files | 6 +++--- .../{t4fw-1.27.4.0.bin => t4fw-1.27.5.0.bin} | Bin 570880 -> 570880 bytes sys/dev/cxgbe/firmware/t4fw_interface.h | 6 +++--- .../{t5fw-1.27.4.0.bin => t5fw-1.27.5.0.bin} | Bin 678912 -> 678912 bytes .../{t6fw-1.27.4.0.bin => t6fw-1.27.5.0.bin} | Bin 730624 -> 730624 bytes sys/modules/cxgbe/t4_firmware/Makefile | 2 +- sys/modules/cxgbe/t5_firmware/Makefile | 2 +- sys/modules/cxgbe/t6_firmware/Makefile | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index bfe53409263a..ac6c3ed6376a 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1528,7 +1528,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.27.4.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.27.5.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -1562,7 +1562,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.27.4.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.27.5.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t5fw.fw" @@ -1596,7 +1596,7 @@ t6fw.fwo optional cxgbe \ no-implicit-rule \ clean "t6fw.fwo" t6fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t6fw-1.27.4.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t6fw-1.27.5.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t6fw.fw" diff --git a/sys/dev/cxgbe/firmware/t4fw-1.27.4.0.bin b/sys/dev/cxgbe/firmware/t4fw-1.27.5.0.bin similarity index 99% rename from sys/dev/cxgbe/firmware/t4fw-1.27.4.0.bin rename to sys/dev/cxgbe/firmware/t4fw-1.27.5.0.bin index 9addb9e25422..0c7842564913 100644 Binary files a/sys/dev/cxgbe/firmware/t4fw-1.27.4.0.bin and b/sys/dev/cxgbe/firmware/t4fw-1.27.5.0.bin differ diff --git a/sys/dev/cxgbe/firmware/t4fw_interface.h b/sys/dev/cxgbe/firmware/t4fw_interface.h index 0ebc404bb72e..686bb55d658b 100644 --- a/sys/dev/cxgbe/firmware/t4fw_interface.h +++ b/sys/dev/cxgbe/firmware/t4fw_interface.h @@ -10001,17 +10001,17 @@ enum fw_hdr_chip { enum { T4FW_VERSION_MAJOR = 1, T4FW_VERSION_MINOR = 27, - T4FW_VERSION_MICRO = 4, + T4FW_VERSION_MICRO = 5, T4FW_VERSION_BUILD = 0, T5FW_VERSION_MAJOR = 1, T5FW_VERSION_MINOR = 27, - T5FW_VERSION_MICRO = 4, + T5FW_VERSION_MICRO = 5, T5FW_VERSION_BUILD = 0, T6FW_VERSION_MAJOR = 1, T6FW_VERSION_MINOR = 27, - T6FW_VERSION_MICRO = 4, + T6FW_VERSION_MICRO = 5, T6FW_VERSION_BUILD = 0, }; diff --git a/sys/dev/cxgbe/firmware/t5fw-1.27.4.0.bin b/sys/dev/cxgbe/firmware/t5fw-1.27.5.0.bin similarity index 59% rename from sys/dev/cxgbe/firmware/t5fw-1.27.4.0.bin rename to sys/dev/cxgbe/firmware/t5fw-1.27.5.0.bin index b32f270b1866..875f421c7523 100644 Binary files a/sys/dev/cxgbe/firmware/t5fw-1.27.4.0.bin and b/sys/dev/cxgbe/firmware/t5fw-1.27.5.0.bin differ diff --git a/sys/dev/cxgbe/firmware/t6fw-1.27.4.0.bin b/sys/dev/cxgbe/firmware/t6fw-1.27.5.0.bin similarity index 76% rename from sys/dev/cxgbe/firmware/t6fw-1.27.4.0.bin rename to sys/dev/cxgbe/firmware/t6fw-1.27.5.0.bin index a47f287848f1..f951578d642b 100644 Binary files a/sys/dev/cxgbe/firmware/t6fw-1.27.4.0.bin and b/sys/dev/cxgbe/firmware/t6fw-1.27.5.0.bin differ diff --git a/sys/modules/cxgbe/t4_firmware/Makefile b/sys/modules/cxgbe/t4_firmware/Makefile index fb8eeb0d6c8e..15928bdb0207 100644 --- a/sys/modules/cxgbe/t4_firmware/Makefile +++ b/sys/modules/cxgbe/t4_firmware/Makefile @@ -16,7 +16,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T4FW_VER= 1.27.4.0 +T4FW_VER= 1.27.5.0 FIRMWS+= t4fw-${T4FW_VER}.bin:t4fw:${T4FW_VER} .include diff --git a/sys/modules/cxgbe/t5_firmware/Makefile b/sys/modules/cxgbe/t5_firmware/Makefile index 2876d1a6b041..cf2c3e9006bd 100644 --- a/sys/modules/cxgbe/t5_firmware/Makefile +++ b/sys/modules/cxgbe/t5_firmware/Makefile @@ -16,7 +16,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T5FW_VER= 1.27.4.0 +T5FW_VER= 1.27.5.0 FIRMWS+= t5fw-${T5FW_VER}.bin:t5fw:${T5FW_VER} .include diff --git a/sys/modules/cxgbe/t6_firmware/Makefile b/sys/modules/cxgbe/t6_firmware/Makefile index 7ac481c4bdb9..5bc7c8e8e0b6 100644 --- a/sys/modules/cxgbe/t6_firmware/Makefile +++ b/sys/modules/cxgbe/t6_firmware/Makefile @@ -16,7 +16,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T6FW_VER= 1.27.4.0 +T6FW_VER= 1.27.5.0 FIRMWS+= t6fw-${T6FW_VER}.bin:t6fw:${T6FW_VER} .include From nobody Thu Jan 11 05:34:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9YJY68bYz56VhY; Thu, 11 Jan 2024 05:34: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 4T9YJY3lCHz485x; Thu, 11 Jan 2024 05:34:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LRhHrInUTDLChiS64WsDRBo7g64h3uwiZIOXpDtkons=; b=p0CbvBO1s56PDOHvn6CxCGoiPCMCWBk11Q86mATZAcvb8BfBLstdUe8SM+YJ+aobNyA/TW ju4SYCKe7xgsTknI5VtMdqwmPOn0vdm0nGoTrl8jD3rYqYS4+8tB2f8UjafN/XQO7oTaZo djd3Irzu8LGPTzwpQaPWN4P0F5cvM3JzEK/k4NWPOM7FWZ8nr1hP8KeNPeqHDcxfsS8MKC GPmrXp9cA2XJ4Hm37wDA9u0C1EPt11eRuw/5ADSY8amO4CslNy655YfKgwiX5E9hrK3S2V HlUgOq/IalbnM+Ev/5Eg00ZB0312WOWEnmX5jaXIWiK4hU9SGvtghvEDoVpqUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704951277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LRhHrInUTDLChiS64WsDRBo7g64h3uwiZIOXpDtkons=; b=a53qFko7L406HKo11pNZsU2377RUfQQQfhgH3cW9eC8kxGdSbt/za+zMqzpkm/Ww9cR2fH rArvs/wZfVJ1NU0esclwj1xAUcD41sZ32PPk/i9yrcOh8KYJrsV3bV33lmQTF/Pq5KmFF8 aM9P135QyKPMQFaAdxpqp3VKWmApkWhKgzqjwSUN0t3N1RvXzvz7EcI9XqyQDzZM2Ykxqi xHtr1aKe8s7bict9z4obSAwHe8Mt2pTO6k6/zxhLhl9Id1HDPN/f0PRCRXb9YWnGA2z1Gz gQFJqRrIf98VSztbp7sqcjUmkBw2TDZQJNqc4Al1HSxlBrMZVE2fzKjdq0gC3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704951277; a=rsa-sha256; cv=none; b=py8r0d2txctNL6a94y2v0g60ajT6tiO8ACLak6piL1nxT/L/y1E+a7duYS8X6VJuVTTxLq Oh4iBVdbU0rkFk6t01dB7cg22OUYXAlW/awmzWoHd96kHkYY2LI37Ul/Ui/z3enN9iRY5e Spz09zrE5l2q3LM7mTJaY74I+3Q9aMshpKNaKaH3TFx54TNlJZsj7/7S3yFaLm+1N04tPm fIISjWuzctyHkT3Mc2qHB2BJos0TSfmNHCnglQNRo2tJ/oVBTGYdkB7kPKHjPOFgGY13UO GmjwAPR6B+yeRZWdLJ5jVvOi+lcF1+c7H8QX7WOuoPG0iNSNFWGB6+gH56tNsw== 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 4T9YJY2Mwdz15W4; Thu, 11 Jan 2024 05:34: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 40B5YbCb010253; Thu, 11 Jan 2024 05:34:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B5YblG010250; Thu, 11 Jan 2024 05:34:37 GMT (envelope-from git) Date: Thu, 11 Jan 2024 05:34:37 GMT Message-Id: <202401110534.40B5YblG010250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: 2cca64fbe579 - stable/13 - cxgbe(4): Use the correct size for the CIM LA on the T6. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2cca64fbe579dea06103cc954e28c1148d366744 Auto-Submitted: auto-generated The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=2cca64fbe579dea06103cc954e28c1148d366744 commit 2cca64fbe579dea06103cc954e28c1148d366744 Author: Navdeep Parhar AuthorDate: 2024-01-09 21:22:16 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-11 05:09:16 +0000 cxgbe(4): Use the correct size for the CIM LA on the T6. The logic analyzer in the T6 CIM block has a different capture size than previous chips. Sponsored by: Chelsio Communications (cherry picked from commit 9ea86c8f67a65ca00f79f3cd83aa977b38589f39) --- sys/dev/cxgbe/common/common.h | 1 + sys/dev/cxgbe/common/t4_hw.c | 7 +++++-- sys/dev/cxgbe/common/t4_hw.h | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h index cd1e648f8e59..0861e3df4bee 100644 --- a/sys/dev/cxgbe/common/common.h +++ b/sys/dev/cxgbe/common/common.h @@ -313,6 +313,7 @@ struct chip_params { u32 sge_fl_db; u16 mps_tcam_size; u16 rss_nentries; + u16 cim_la_size; }; /* VF-only parameters. */ diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index 41063d5c7d76..c18243e4b681 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -9303,6 +9303,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .sge_fl_db = F_DBPRIO, .mps_tcam_size = NUM_MPS_CLS_SRAM_L_INSTANCES, .rss_nentries = RSS_NENTRIES, + .cim_la_size = CIMLA_SIZE, }, { /* T5 */ @@ -9317,6 +9318,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .sge_fl_db = F_DBPRIO | F_DBTYPE, .mps_tcam_size = NUM_MPS_T5_CLS_SRAM_L_INSTANCES, .rss_nentries = RSS_NENTRIES, + .cim_la_size = CIMLA_SIZE, }, { /* T6 */ @@ -9331,6 +9333,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .sge_fl_db = 0, .mps_tcam_size = NUM_MPS_T5_CLS_SRAM_L_INSTANCES, .rss_nentries = T6_RSS_NENTRIES, + .cim_la_size = CIMLA_SIZE_T6, }, }; @@ -9386,11 +9389,11 @@ int t4_prep_adapter(struct adapter *adapter, u32 *buf) /* Cards with real ASICs have the chipid in the PCIe device id */ t4_os_pci_read_cfg2(adapter, PCI_DEVICE_ID, &device_id); if (device_id >> 12 == chip_id(adapter)) - adapter->params.cim_la_size = CIMLA_SIZE; + adapter->params.cim_la_size = adapter->chip_params->cim_la_size; else { /* FPGA */ adapter->params.fpga = 1; - adapter->params.cim_la_size = 2 * CIMLA_SIZE; + adapter->params.cim_la_size = 2 * adapter->chip_params->cim_la_size; } ret = get_vpd_params(adapter, &adapter->params.vpd, device_id, buf); diff --git a/sys/dev/cxgbe/common/t4_hw.h b/sys/dev/cxgbe/common/t4_hw.h index e943acb8dec9..79ec690cd5e6 100644 --- a/sys/dev/cxgbe/common/t4_hw.h +++ b/sys/dev/cxgbe/common/t4_hw.h @@ -66,7 +66,8 @@ enum { CIM_NUM_IBQ = 6, /* # of CIM IBQs */ CIM_NUM_OBQ = 6, /* # of CIM OBQs */ CIM_NUM_OBQ_T5 = 8, /* # of CIM OBQs for T5 adapter */ - CIMLA_SIZE = 2048, /* # of 32-bit words in CIM LA */ + CIMLA_SIZE = 256 * 8, /* 256 rows * ceil(235/32) 32-bit words */ + CIMLA_SIZE_T6 = 256 * 10, /* 256 rows * ceil(311/32) 32-bit words */ CIM_PIFLA_SIZE = 64, /* # of 192-bit words in CIM PIF LA */ CIM_MALA_SIZE = 64, /* # of 160-bit words in CIM MA LA */ CIM_IBQ_SIZE = 128, /* # of 128-bit words in a CIM IBQ */ From nobody Thu Jan 11 08:51:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9dg957vjz56v9k; Thu, 11 Jan 2024 08:51: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 4T9dg93hlQz4YHw; Thu, 11 Jan 2024 08:51:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704963061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2C6JUJsrQCSdx8dsQX1u+6Oi+nbfiwJK0NYHjQgezgQ=; b=hr9dQXSVMjgPUNXUtUAg3ZfsLOKn2wFxuu4xiB2lxtVn9HUY8na1iKEkViY8ie37OWKeCc 518zXpjMxMJUNESBeajsTkdAWlPxuQgz+JAyLSNGIbMIgBUSjZOMHGkMBcGYqVI32lqNap shwr1PNvwyfBxyJJcbhK2brJJBctxVHkFWJVdCPPi1pOfYB2+2vlipd/IT1tM+cgS756aC PYyvdouAgSnfcAdItJ9kaCmCsZsV49inm9kSyZu6Yk0qS5kBDU6Nl+vbWfT2q1fVrBnX8x CCn/5bTjlTbvLax/VTxNVmFYoX7w8t2Is+k4tqfy3/Uztwq+tLFWQEa4JuY17Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704963061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2C6JUJsrQCSdx8dsQX1u+6Oi+nbfiwJK0NYHjQgezgQ=; b=F1SOKmPrjFINtoqZYBfjaXuD93gWISB/uvWJvxmxSbkTJQBkNm8XIoOl/N0xUkeo+ndWZv vNHmwmGEy1EKyyv+Gre/g1Y/Yxf3VWd6fPChvYCBvZCz8FpzOXwWk7ipDqUDDLmLG9E68N 1doSnu4EsNrgGUGvkWS/5R8PRL5outkGkHipW5843MKusmfU31kiis1+7skmdYlHUwxxk3 5niDFWGwnQTrhCceVSRa95aBWqKXIUGDk7kBiAMNm541hm3YTirqkgdl3TfcMH+uO5yjlN hfb9eOfIyq5sfOEt1cgw6mWTr1sqmmKV0+c8PLn12EonH7b0eE2OSJB82oMBgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704963061; a=rsa-sha256; cv=none; b=c7qKkWkF4H3JmbdfRw5b7ylClr/t2Zi+GxB7WQTJsStNcxUdjX3TJ9Osj10XdkR5dTp4R1 1w8NSDWDxCYmF81xE4X3eL6ypCczaPpYbMuPp/UKmF2eksCzeVEH2k/kXnXRIKLBPskgZx Wl5o0rpAOVZWL2ikkGrySqHVs+JBVEMJu5SBdTasVg1BOo1rl5oocpwhEQLBON/per7Z9Y g2krVcNw/PBcubJ+sZXzUWbsXx1NqvnNx9xl8WSfNJRh1Ba9Au1GuBUHiqezUaHMjVxETF kFNP9JjHD+GzcjMjDKJAzjd2DiQqB0vJXhrl3z1Ybb2/3i2FzTc7fk5Mmr883Q== 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 4T9dg92nPHz1BZM; Thu, 11 Jan 2024 08:51: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 40B8p1T3040430; Thu, 11 Jan 2024 08:51:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B8p1OE040427; Thu, 11 Jan 2024 08:51:01 GMT (envelope-from git) Date: Thu, 11 Jan 2024 08:51:01 GMT Message-Id: <202401110851.40B8p1OE040427@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 327e9727c627 - stable/13 - man: improve man pages for dtrace_sctp and dtrace_tcp List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 327e9727c6277bdc0c404ae43c1d281b133f95e7 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=327e9727c6277bdc0c404ae43c1d281b133f95e7 commit 327e9727c6277bdc0c404ae43c1d281b133f95e7 Author: Michael Tuexen AuthorDate: 2023-06-29 12:53:56 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 08:50:28 +0000 man: improve man pages for dtrace_sctp and dtrace_tcp Reviewed by: manpages Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D40796 (cherry picked from commit 81b4bf08955a86e51cbc7ff878e95ff5e86e5eee) --- share/man/man4/dtrace_sctp.4 | 14 +++++++------- share/man/man4/dtrace_tcp.4 | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/share/man/man4/dtrace_sctp.4 b/share/man/man4/dtrace_sctp.4 index 628641d8309c..6e2f1ed31969 100644 --- a/share/man/man4/dtrace_sctp.4 +++ b/share/man/man4/dtrace_sctp.4 @@ -21,7 +21,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 22, 2018 +.Dd June 29, 2023 .Dt DTRACE_SCTP 4 .Os .Sh NAME @@ -148,20 +148,20 @@ A script that logs SCTP packets in real time: dtrace:::BEGIN { - printf(" %3s %15s:%-5s %15s:%-5s\n", "CPU", + printf(" %3s %15s:%-5s %15s:%-5s\\n", "CPU", "LADDR", "LPORT", "RADDR", "RPORT"); } sctp:::send { - printf(" %3d %16s:%-5d -> %16s:%-5d\n", cpu, + printf(" %3d %16s:%-5d -> %16s:%-5d\\n", cpu, args[2]->ip_saddr, args[4]->sctp_sport, args[2]->ip_daddr, args[4]->sctp_dport); } sctp:::receive { - printf(" %3d %16s:%-5d <- %16s:%-5d\n", cpu, + printf(" %3d %16s:%-5d <- %16s:%-5d\\n", cpu, args[2]->ip_daddr, args[4]->sctp_dport, args[2]->ip_saddr, args[4]->sctp_sport); } @@ -175,7 +175,7 @@ int last[int]; dtrace:::BEGIN { - printf(" %3s %12s %-25s %-25s\n", + printf(" %3s %12s %-25s %-25s\\n", "CPU", "DELTA(us)", "OLD", "NEW"); } @@ -183,7 +183,7 @@ sctp:::state-change / last[args[1]->cs_cid] / { this->elapsed = (timestamp - last[args[1]->cs_cid]) / 1000; - printf(" %3d %12d %-25s -> %-25s\n", cpu, this->elapsed, + printf(" %3d %12d %-25s -> %-25s\\n", cpu, this->elapsed, sctp_state_string[args[5]->sctps_state], sctp_state_string[args[3]->sctps_state]); last[args[1]->cs_cid] = timestamp; @@ -192,7 +192,7 @@ sctp:::state-change sctp:::state-change / last[args[1]->cs_cid] == 0 / { - printf(" %3d %12s %-25s -> %-25s\n", cpu, "-", + printf(" %3d %12s %-25s -> %-25s\\n", cpu, "-", sctp_state_string[args[5]->sctps_state], sctp_state_string[args[3]->sctps_state]); last[args[1]->cs_cid] = timestamp; diff --git a/share/man/man4/dtrace_tcp.4 b/share/man/man4/dtrace_tcp.4 index fda957e530c7..7d300d0f8068 100644 --- a/share/man/man4/dtrace_tcp.4 +++ b/share/man/man4/dtrace_tcp.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 1, 2018 +.Dd June 29, 2023 .Dt DTRACE_TCP 4 .Os .Sh NAME @@ -315,7 +315,7 @@ tcp:::send printf("%s", args[4]->tcp_flags & TH_ACK ? "ACK|" : ""); printf("%s", args[4]->tcp_flags & TH_URG ? "URG|" : ""); printf("%s", args[4]->tcp_flags == 0 ? "null " : ""); - printf("\b)\\n"); + printf("\\b)\\n"); } tcp:::receive @@ -331,7 +331,7 @@ tcp:::receive printf("%s", args[4]->tcp_flags & TH_ACK ? "ACK|" : ""); printf("%s", args[4]->tcp_flags & TH_URG ? "URG|" : ""); printf("%s", args[4]->tcp_flags == 0 ? "null " : ""); - printf("\b)\\n"); + printf("\\b)\\n"); } .Ed The following script logs TCP connection state changes as they occur: From nobody Thu Jan 11 08:57:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9dqC1T8Pz56wFn; Thu, 11 Jan 2024 08:57: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 4T9dqC05M0z4bHl; Thu, 11 Jan 2024 08:57:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704963479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jppla7vHI58ZPUsPks50LLKb6w6VLGtJpKjY6otvdZo=; b=WUGhE8JpJk8bfkwv6zNaWgKv7k0Ywi4EZUewIQhjS+VeZXHfgEJek6vcCVL77SCE47r7ZY quBYc8v+V0IQd//1DJuyWFAraK4lTKMM11BrgD84v8e/T8yI5+/cYB3TMtCJkuD4BBcHnh /BnLjbep77wc0mNHX2y3RsiToMPi1RjnCPVIUhuMu0DfmqQaYOkKrS1j8zpR8queEP5lzd Duo8kO2K3/g4ZtHYxd2V1NZhuUKI9BcSky5nAxN9GKnrGm+3orZucLFJ1OlpOvJeDKS3yp VrZqxSjMGVSj1farJ3PjB+1EPF0DPvN94pDvxoH/xl7D3QQbDyt16WRAdkGWEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704963479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jppla7vHI58ZPUsPks50LLKb6w6VLGtJpKjY6otvdZo=; b=CPmi7Nic8xw5a2ibzdLH8cESAoiHv8oN4kObGzOtQ6ySja5zXbL0T4VUJlhvc/5v38xaZz lWSalkwh7wA4wuv9zUAph8LbkQ3IlLuCRDTPdyvt2Q2JAWI9Cl1WvUsZpn7uqdNGZcSTW5 LYC6qAuAAba0Z3OftKHJsHnOyPDYtpdC0Bve9+rL4U4Xk3Bj/aq3ef1PRgM9G4DuTrw+2D yJZljsPbjsLY2CtvzrYBwFFLpPBwJrcvAlD4Gs2QyCS0QtEvtLt9lrckHZbJBaI1+KQg5A QA2iFLoaMlFvuklCW/KVqKCCRvYnUfj42DfQ8jLHKQ1DWJN6BuW34kyw+lzjgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704963479; a=rsa-sha256; cv=none; b=rVWSzL5gmIp+jz4RVtbe3jHi9WWHCU94+98zohxLIhqaGK6dE+7dnfcLk+Q91ReE+nbZuU L+1k7yowN9+IkcHEBZopjEZzCnvtUf1cW31QdjUqXCgL2jNaHK+B6jN7nEBaEeixcIwR71 7A5oVXB8J0ER/PiTCk5FyjMRXMjA6nxVIP9rIMsA7JH4oiOJHb1AMp13gqPgJHuqiAq8Xr r5GcQz8J+eVeuxGlt2QnW2h8Th2+YhHI5FHmvOdyJpO/DIUESPoTIQBA3q4KYfSfLcCpa0 uafm2PYbg2GYnhsG1oRlqH/rbF5QNlmfEGw9GrDaMgFSL3YTo2ixy+NEiW7kjg== 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 4T9dqB69C2z1ByY; Thu, 11 Jan 2024 08:57: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 40B8vwil046062; Thu, 11 Jan 2024 08:57:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B8vw94046059; Thu, 11 Jan 2024 08:57:58 GMT (envelope-from git) Date: Thu, 11 Jan 2024 08:57:58 GMT Message-Id: <202401110857.40B8vw94046059@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: d5ffa4b1a459 - stable/13 - siftr: provide dtrace with the correct pointer to data List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d5ffa4b1a45943ca55740bc51df1f0912c953c22 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=d5ffa4b1a45943ca55740bc51df1f0912c953c22 commit d5ffa4b1a45943ca55740bc51df1f0912c953c22 Author: Michael Tuexen AuthorDate: 2023-06-30 20:03:04 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 08:57:38 +0000 siftr: provide dtrace with the correct pointer to data This fixes a bug which was introduced in the commit https://svnweb.freebsd.org/changeset/base/282276 Reviewed by: cc, rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D40806 (cherry picked from commit dc2d26df43cb69c9c4d8802220af2da929bc1dce) --- sys/netinet/siftr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c index 643c484b07ff..7ec19ecc875a 100644 --- a/sys/netinet/siftr.c +++ b/sys/netinet/siftr.c @@ -812,7 +812,7 @@ siftr_siftdata(struct pkt_node *pn, struct inpcb *inp, struct tcpcb *tp, * maximum pps throughput processing when SIFTR is loaded and enabled. */ microtime(&pn->tval); - TCP_PROBE1(siftr, &pn); + TCP_PROBE1(siftr, pn); } From nobody Thu Jan 11 09:00:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9dtZ1J2Pz56wR2; Thu, 11 Jan 2024 09:00: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 4T9dtZ0WCbz4c11; Thu, 11 Jan 2024 09:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704963654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/IaeaYxhK4Stemqj9CtjFJ3lynyKFbvPXJp2ErYs+FM=; b=M2Bybcayehkg30HaLsXvYPquFeXmE68QSgkpy+n7GOg20yWsn1Ce5Th9uWivNpaxa5vGSj w8VK675of74sCXeMXWMssmOaiftSOTbwq+hfCzToDtA89/er8yrqAzAEq+mlmMhsxL5Trs Xctlrp09ls9EUt71wGCKEAzGPdzBfgKE4AlHdfKF8sidV4qMNiYiY8exJOMHbJlfR8FsoN mziUWrKjo11knlvpl8oWu63FkJlBwCPQEGQXRJS69RtQs81I3WuQ26NWO/IKWruw8NLhMg bVNdG0F+dsWMw6xvQAPAE3Mll7/m66JJSwK/bIj3TfB8AKR4oyuCAkIp7Dv5yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704963654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/IaeaYxhK4Stemqj9CtjFJ3lynyKFbvPXJp2ErYs+FM=; b=a32zZ/AEFfS8hZhb+cA8t6LZm4nxuRPRO9VdGGiNo+MVadjf5A8mmQ6NDPKCZmT/CKhaBQ D2PrJzhRI7Ctc5xFb0L2ib+ZcUDHiZlh5QT3FS/3uGSu/pbDPDw2AffC/KyPVy6AJDdTo9 8P0sZny9iFjT3YlK970D1OKJvKuZ2Bqm/fAE+vpzwzzOdh8b8+KGr9jmbr73xwAxdgVaEJ IkOSuMlXNh0FayKjPlvgM+Rwje2iBonueegEAkn7k0q7rrt3gVCAZAp+A/v9v8DaIB/3xv ObwN182jbm3ETDjqLcU4VzhZXI9T5DttU1Q2bWhH7NBxO87JwsbgKLO6bthTJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704963654; a=rsa-sha256; cv=none; b=SAQvTF4FRwJeLuwQPDMEMdlmjGBCHW151OlBmA2ltpXKQgbn6Sr8W68GnothcoZSe6z64J n0G+4F9lWSUJY+GkRDwcv6YKkyYZfKhF61i+As7fwR65aSv8hcF4nA5zLK1xGQDdZECXw9 9c+StiES6BqeWCadoFaZZJasK9/TQ0fr+wjOe42e70fldB2H7mAWMITKFsQwqzJt3/LDil 05+AHLZE5FlRUABwvTrM96gQPCarSIcJ7q+h2JW3A8HPBb+bWhWujYNx46MdLXY47I75xV 6IvznT/GBxPfrN/GwVr0EN3RhrfkhEDz//xhh7X85kbMxtWx9Y2L+G4a++L5Rg== 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 4T9dtY6k7Tz1BNf; Thu, 11 Jan 2024 09:00: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 40B90rGW057398; Thu, 11 Jan 2024 09:00:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B90r3C057395; Thu, 11 Jan 2024 09:00:53 GMT (envelope-from git) Date: Thu, 11 Jan 2024 09:00:53 GMT Message-Id: <202401110900.40B90r3C057395@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: dc2408133b6d - stable/13 - dtrace: fix constants used by the siftr probe List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dc2408133b6dfba0c080805f4a137cadece33fa9 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=dc2408133b6dfba0c080805f4a137cadece33fa9 commit dc2408133b6dfba0c080805f4a137cadece33fa9 Author: Michael Tuexen AuthorDate: 2023-06-30 20:15:47 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 09:00:33 +0000 dtrace: fix constants used by the siftr probe The constants used in the C code were changed in https://svnweb.freebsd.org/changeset/base/343646 but changing them also in the dtrace translator was missed. Reviewed by: cc, rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D40805 (cherry picked from commit f5541b85a592da9e1e1723b190f1e08afd7d5b18) --- cddl/lib/libdtrace/siftr.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cddl/lib/libdtrace/siftr.d b/cddl/lib/libdtrace/siftr.d index 05b95ee15a72..1830c0406e1c 100644 --- a/cddl/lib/libdtrace/siftr.d +++ b/cddl/lib/libdtrace/siftr.d @@ -27,9 +27,9 @@ * Convert a SIFTR direction value to a string */ #pragma D binding "1.12.1" SIFTR_IN -inline int SIFTR_IN = 1; +inline int SIFTR_IN = 0; #pragma D binding "1.12.1" SIFTR_OUT -inline int SIFTR_OUT = 2; +inline int SIFTR_OUT = 1; /* SIFTR direction strings. */ #pragma D binding "1.12.1" siftr_dir_string From nobody Thu Jan 11 09:50:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9fzZ0LKhz572fd; Thu, 11 Jan 2024 09:50: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 4T9fzY6wbzz4kmx; Thu, 11 Jan 2024 09:50:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704966618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dg/hf83nzR/5mSxQ7momCFrEOhEJ8XNFVh7wCuN8eG4=; b=id2jv2YzN2YXRNeOwQYZjRoErkHC02RKmkgCOIjTZcFcjN8jadpKgSdwCyvkVdMN7i4omW wXZKrrvGxRqrYgWkK6W9XPj1MVawkhPaGlX3SP9rp9VAtn2bOeOEawgh7UK5sPC2s0EEW5 la9tPDvWTwsmdulQxBRT9wiKVQiA5R8b/hdhWYzNi1gjpqVbjKFVOeoKGKMJ4qviORME7m GHD8Zbbn2nCeEscK8PgAES6XcB4P3olQVgb/It56rWkyK2efXS/bv8ZfGxU3pCWqQFImjx HfGsAsj69jM2GDD5bIjcmmCf58cGp69cMom5Eai/RuHV7eHZbcCAIJgg38PuZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704966618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dg/hf83nzR/5mSxQ7momCFrEOhEJ8XNFVh7wCuN8eG4=; b=MCesoMkxl8H8711e9+hoolEKqx39GsaYsol0qehVB86yr7MRwbSa7bndqXMdiyt8mqtRxQ MCiLKtgVEg2uoOrMHiFjCwd7RCs4MEBsD9mA276MtstLnPAkOM0Oee/wvieRg4GFkZmh3+ 24EetJNg5JPHJnGo0W4zxQgm9pNxrJlw9HZHqmXKbDd4OOp8iQbnQn6tqfc+ESJB18/g7g vAobLbLJa+UZjaM7i+CK11edKhql6ouZHcbiHfne1GziGZ5swdmmpQVc7GKNbhyzau8O2Q uRpWFs8lwji4+tucmA0Q4Sv4FVdQJfdmYePnl9B21kMOde65cFxBkcH7E+AENw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704966618; a=rsa-sha256; cv=none; b=SmGgbNSWAp9Jo9tQQkCS1TD95AWubodXTQJfup7m+b52slzUqQ6ptx743wZVm+x4B/8IZI lzgcBWTbx30/WRboRPzGbNfAlKz/vuhL8r0E9K2kI8mKOgxtyWqptSqwAtGjKjt9cT1VPk PQI5SrO++3amPo8ltf4uMomdsJszFwUlXq+9m0cQ6HJyTM/Rkh/KtauwtoGYBu5zZSJ7Na wb59X4norieTvFF/dHrn0c7/Ed9/Fcw4D3sAFPk0T22bhXi1JAZSTdiURzc1mCBqtcOWNg vkdJM1v6K06FWMohvZlChvUu3vZ6W0gepaCjEriHFN+n4dHFMfgdlWWE6t3BUA== 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 4T9fzY5ztmz1Cp9; Thu, 11 Jan 2024 09:50:17 +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 40B9oHxW041447; Thu, 11 Jan 2024 09:50:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B9oH0s041441; Thu, 11 Jan 2024 09:50:17 GMT (envelope-from git) Date: Thu, 11 Jan 2024 09:50:17 GMT Message-Id: <202401110950.40B9oH0s041441@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: bdb46c21a3e6 - main - vnode_pager_generic_putpages(): correctly handle clean block at EOF List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: bdb46c21a3e68d4395d6e0b6a205187e655532b0 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=bdb46c21a3e68d4395d6e0b6a205187e655532b0 commit bdb46c21a3e68d4395d6e0b6a205187e655532b0 Author: Konstantin Belousov AuthorDate: 2024-01-08 13:21:06 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 09:49:37 +0000 vnode_pager_generic_putpages(): correctly handle clean block at EOF The loop 'skip clean blocks' checking for the clean blocks in the dirty pages might end up setting the in_hole to true when exactly at EOF at the middle of the block, without advancing the prev_offset value. Then the next block is not dirty, and next_offset is clipped back to poffset + maxsize, equal to prev_offset, failing the assertion. Instead of asserting prev_offset < next_offset, we must skip the write. Reported by: asomers PR: 276191 Reviewed by: alc, markj Tested by: asomers Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43358 --- sys/vm/vnode_pager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index bf5166e059e9..75919625707c 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -1464,12 +1464,13 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *ma, int bytecount, start_write: if (next_offset > poffset + maxsize) next_offset = poffset + maxsize; + if (prev_offset == next_offset) + goto write_done; /* * Getting here requires finding a dirty block in the * 'skip clean blocks' loop. */ - MPASS(prev_offset < next_offset); aiov.iov_base = NULL; auio.uio_iovcnt = 1; From nobody Thu Jan 11 09:50:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9fzb18XHz572Ys; Thu, 11 Jan 2024 09:50: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 4T9fzb0kLmz4kn0; Thu, 11 Jan 2024 09:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704966619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=npyi+OSQFaX4Ke3a81/3aPLrlkNxzFmCIqWrjjXyCw0=; b=b7chmN5c40KRlr/HlCNm+gdQ6Dy/D4slkSC9Oc76zEmzrJqaUytQ2Jm/h+f5llQ7f9FI2U WIAlZjj26KsrYAqIbF7Vv+Q4cjoQ00Dt+pY+hVL+q0CsWHCrOERTlN15UWal0+geIPqucb hK6OGUZMY0onqyhZBExJnxSi8kchfzmJVdf81IgdA2DcSO5fCKNtsGjMfhxC7RwQvwBuml MIcW1KFF84uPr5NGuRmQmsrrcjiV8jjtqWm/XQAeo2p4X1LRew07sv1wQX5fn1pS766NRU eoT+TudcOIlLQ4YRt1fWImHDBcRlZYO3ZcIFkndYvjAc7AHOxzGm8w6a5llKnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704966619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=npyi+OSQFaX4Ke3a81/3aPLrlkNxzFmCIqWrjjXyCw0=; b=XFC13KdoI77kuNARpjVuss7zkZk3duYGM4rN7/6CscjPQTr8PeWT0d5FksZLexps/Wn/RB AVuAhMlL2SaicdqyvWu90EiiWVJZHR2XJkiba1OLCKlqGT3ZTwBUSqw0H1ojfBjakt6aS/ A0zbMf4+XvjaKD75TPkg2nvULrH8yupbanYjQKX7m+ngsxRxXKyANTtuBfG3jm5jWrZKBx X5MomwLsYTzdwx8TdXq9UPatwww7TFHCXgioGMgiiLZIloIhyVwFDN83uZqYRx5SvEj2t3 HjmdFcObNOL8Pgg9U+LQ7nGxfJmScIAfz+WyRjfGFN1NVMCH6bzeJV9AoRYMEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704966619; a=rsa-sha256; cv=none; b=YrPFG64pHE0wuZ+IXHX9rKlRmoX1TjiWAJOe6zMx1nzq693kXsJ/m8TPP+8KpgWX1yPbC2 wZsRtxRPMZaoc17OmhRFRcxCGgVygGXQklAkOzUbNSL5QHWXNoxQRNIiUEC7eiDwF6aOq2 TXjUc0Y83FlBnpn7aUgK5TH9ePGhOYVWGHqNGz43kEWUD+qtl2Hyd9KPT1wlFIf2YBdvtI s0WQUSem87nWvQZD9EL0n9J8mgDmQTQahGGbnjziPvhrQd9WxjaMeFGPBTlPeOVEa+zCKO EIWhwbp3mpmAYjZAnuBd+9fCYKuJUiahcHgsTlzYQqg/U+QLPMqGT7qsn/D70w== 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 4T9fzZ6xCfzDsr; Thu, 11 Jan 2024 09:50: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 40B9oIL7041579; Thu, 11 Jan 2024 09:50:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B9oIL8041576; Thu, 11 Jan 2024 09:50:18 GMT (envelope-from git) Date: Thu, 11 Jan 2024 09:50:18 GMT Message-Id: <202401110950.40B9oIL8041576@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: ed1a88a3116a - main - vnode_pager_generic_putpages(): rename maxblksz local to max_offset List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ed1a88a3116a59b4fd37912099a575b4c8f559dc Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ed1a88a3116a59b4fd37912099a575b4c8f559dc commit ed1a88a3116a59b4fd37912099a575b4c8f559dc Author: Konstantin Belousov AuthorDate: 2024-01-09 11:32:39 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 09:49:37 +0000 vnode_pager_generic_putpages(): rename maxblksz local to max_offset Requested by: markj Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43358 --- sys/vm/vnode_pager.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 75919625707c..f9fb1ba23655 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -1356,7 +1356,7 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *ma, int bytecount, { vm_object_t object; vm_page_t m; - vm_ooffset_t maxblksz, next_offset, poffset, prev_offset; + vm_ooffset_t max_offset, next_offset, poffset, prev_offset; struct uio auio; struct iovec aiov; off_t prev_resid, wrsz; @@ -1431,15 +1431,15 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *ma, int bytecount, auio.uio_segflg = UIO_NOCOPY; auio.uio_rw = UIO_WRITE; auio.uio_td = NULL; - maxblksz = roundup2(poffset + maxsize, DEV_BSIZE); + max_offset = roundup2(poffset + maxsize, DEV_BSIZE); - for (prev_offset = poffset; prev_offset < maxblksz;) { + for (prev_offset = poffset; prev_offset < max_offset;) { /* Skip clean blocks. */ - for (in_hole = true; in_hole && prev_offset < maxblksz;) { + for (in_hole = true; in_hole && prev_offset < max_offset;) { m = ma[OFF_TO_IDX(prev_offset - poffset)]; for (i = vn_off2bidx(prev_offset); i < sizeof(vm_page_bits_t) * NBBY && - prev_offset < maxblksz; i++) { + prev_offset < max_offset; i++) { if (vn_dirty_blk(m, prev_offset)) { in_hole = false; break; @@ -1451,11 +1451,11 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *ma, int bytecount, goto write_done; /* Find longest run of dirty blocks. */ - for (next_offset = prev_offset; next_offset < maxblksz;) { + for (next_offset = prev_offset; next_offset < max_offset;) { m = ma[OFF_TO_IDX(next_offset - poffset)]; for (i = vn_off2bidx(next_offset); i < sizeof(vm_page_bits_t) * NBBY && - next_offset < maxblksz; i++) { + next_offset < max_offset; i++) { if (!vn_dirty_blk(m, next_offset)) goto start_write; next_offset += DEV_BSIZE; From nobody Thu Jan 11 11:32:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9jFN22X6z57DMX; Thu, 11 Jan 2024 11:32: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 4T9jFM6rbKz4tZ1; Thu, 11 Jan 2024 11:32:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704972744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MGYO0WC3FFqkc4YEit2g1IbFKQo+K5lpruDwklxD0b8=; b=ce6rzBlhXbFTbGJ01ICif/gWOBFi6ZruB4HEVYgk8YsNN5ZFKiCYuRNkco0+X8fNF4cOGu Pf3omKCOKucf49o6LVeGbv9+9h0qTmiF9q3hXdIfRJbygyAiv7TQjof+ttrJ+5JOYrFEjs iZFqYxidjHtx7ZbCvGIZNr151mT1owVAdJrEgIxEVpbaOWO+fO0j1xMG+9bzPN19HyyR88 yRGv83aM7WxgOAZo7HFDPfmJ8lRS40NrmU8k5NSBgEJaJX9L0RidUmjru2YtcOLaf3vJjb Dza0pTQY9noKlYBX9hhu1v+KqzVh0a8J1aeqCmXDSh/VjNZGsx9T71rx1yNFCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704972744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MGYO0WC3FFqkc4YEit2g1IbFKQo+K5lpruDwklxD0b8=; b=ZurUvtiAFD48p5Kfsh8L4wj6+wpC+dkAF8DUQ4TTLk9vP6gD+Hd0JIV1B/Ff8yBckBNksv sEhdZzh9Qa6pYD11sdJZbvebsl6Vn4zl8NFVtBGsTTpm8civHeKzJUu07WzDPHt2HNe8gc unFxcawbvf7IvRetQHcYM7xGjVI1bc6r/qsDAuBwMlF9GdSJ0id5pSru3r5T/auKuDl57u i8KUCTZ6LGx3KkfDEY9vNewNePYjCLdX4PY3/K2O7j5BWmj8xzz+bQTmOirh4nGx/EQ7hP RjrFn+k0MvNjeaXGV3IJF2GeAQB20L7aB2bIJ0yeMFUstGVttfMZDw39x5SyUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704972744; a=rsa-sha256; cv=none; b=s1gRw8ZdRgi/I8MwQCkzBUuGEDIV+RugyX7lQsr/dBAqQH/x8v81wjZUV9kKDYZAPHwYEe 0GIEZjY0DNOTDo3JCxtLwCOCljELKQX25F2Jr/XXBr9pCwNJNknAyt/kmZjVXzvKzxIiwA upnaCl6P5Pm9P/z2R7HqXA6Y+Qp3iz0u1NShp1UY0KKd96l1erTpldI6YAtmO9RRsvmCIr SZZDK8KaAxoIDL1jXxtmMW+JNbCvYaniAYi4wySNdqGpKMqqKtOv7P4IB5Z2WbQTxwduUJ STayIvTnEG1gvTvH2n+pbes7YaYJBa9D0F+IQCsdcI4czWLELUXhu7dclCAlDg== 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 4T9jFM5wKBzHJp; Thu, 11 Jan 2024 11:32: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 40BBWNf6013763; Thu, 11 Jan 2024 11:32:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BBWNjK013760; Thu, 11 Jan 2024 11:32:23 GMT (envelope-from git) Date: Thu, 11 Jan 2024 11:32:23 GMT Message-Id: <202401111132.40BBWNjK013760@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: ce581fb02fc1 - stable/13 - siftr: document siftr probe to man page of the tcp provider List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ce581fb02fc158b9edd749eadd80f957599020e3 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=ce581fb02fc158b9edd749eadd80f957599020e3 commit ce581fb02fc158b9edd749eadd80f957599020e3 Author: Michael Tuexen AuthorDate: 2023-06-30 22:13:00 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 11:32:08 +0000 siftr: document siftr probe to man page of the tcp provider This man page documents what is currently implemented in siftr.d. It doesn't work right now in head, but in stable/13. Follow-up commits will fix it for head. Reviewed by: cc, pauamma_gundo.com Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D40809 (cherry picked from commit 0631830a7a3c9625f1678b0b6ab8b525ba5e3873) --- share/man/man4/dtrace_tcp.4 | 138 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 136 insertions(+), 2 deletions(-) diff --git a/share/man/man4/dtrace_tcp.4 b/share/man/man4/dtrace_tcp.4 index 7d300d0f8068..fa21cb981ed5 100644 --- a/share/man/man4/dtrace_tcp.4 +++ b/share/man/man4/dtrace_tcp.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 29, 2023 +.Dd July 1, 2023 .Dt DTRACE_TCP 4 .Os .Sh NAME @@ -47,6 +47,7 @@ protocol "tcpinfo_t *" .Fn tcp:::state-change "void *" "csinfo_t *" "void *" "tcpsinfo_t *" "void *" \ "tcplsinfo_t *" +.Fn tcp:::siftr "siftrinfo_t *" .Sh DESCRIPTION The DTrace .Nm tcp @@ -63,6 +64,8 @@ All .Nm tcp probes except for .Fn tcp:::state-change +and +.Fn tcp:::siftr have the same number and type of arguments. The last three arguments are used to describe a TCP segment: the .Vt ipinfo_t @@ -134,6 +137,15 @@ Its first, third and fifth arguments are currently always Its last argument describes the from-state in the transition, and the to-state can be obtained from .Dv args[3]->tcps_state . +.Pp +The +.Fn tcp:::siftr +probe fires when a TCP segment is sent or received by the host. +For a detailed description see +.Xr siftr 4 . +The +.Vt siftrinfo_t +argument provides the information about the TCP connection. .Sh ARGUMENTS The .Vt pktinfo_t @@ -283,10 +295,111 @@ The valid TCP state values are given by the constants prefixed with in .Pa /usr/lib/dtrace/tcp.d . .El +.Pp +The +.Vt siftrinfo_t +type is used by the +.Fn tcp:::siftr +probe to provide the state of the TCP connection. +Its fields are: +.Bl -tag -width "u_int sent_inflight_bytes" -offset indent +.It Vt uint8_t direction +Direction of packet that triggered the log message. +Either +.Qq 0 +for in, or +.Qq 1 +for out. +.It Vt uint8_t ipver +The version of the IP protocol being used. +Either +.Qq 1 +for IPv4, or +.Qq 2 +for IPv6. +.It Vt uint32_t hash +Hash of the packet that triggered the log message. +.It Vt uint16_t tcp_localport +The TCP port that the local host is communicating via. +.It Vt uint16_t tcp_foreignport +The TCP port that the foreign host is communicating via. +.It Vt uint64_t snd_cwnd +The current congestion window (CWND) for the flow, in bytes. +.It Vt u_long snd_wnd +The current sending window for the flow, in bytes. +The post scaled value is reported, except during the initial handshake (first +few packets), during which time the unscaled value is reported. +.It Vt u_long rcv_wnd +The current receive window for the flow, in bytes. +The post scaled value is always reported. +.It Vt u_long snd_bwnd +The current bandwidth-controlled window for the flow, in bytes. +This field is currently unused and reported as zero. +.It Vt u_long snd_ssthresh +The slow start threshold (SSTHRESH) for the flow, in bytes. +.It Vt int conn_state +A TCP state. +The valid TCP state values are given by the constants prefixed with +.Ql TCPS_ +in +.Pa /usr/lib/dtrace/tcp.d . +.It Vt u_int max_seg_size +The maximum segment size for the flow, in bytes. +.It Vt int smoothed_rtt +The current smoothed RTT estimate for the flow, in units of TCP_RTT_SCALE * HZ, +where TCP_RTT_SCALE is a define found in +.Pa /usr/include/netinet/tcp_var.h , +and HZ is the kernel's tick timer. +Divide by TCP_RTT_SCALE * HZ to get the RTT in secs. +.It Vt u_char sack_enabled +SACK enabled indicator. 1 if SACK enabled, 0 otherwise. +.It Vt u_char snd_scale +The current window scaling factor for the sending window. +.It Vt u_char rcv_scale +The current window scaling factor for the receiving window. +.It Vt u_int flags +The current value of the t_flags for the flow. +.It Vt int rxt_length +The current retransmission timeout length for the flow, in units of HZ, where HZ +is the kernel's tick timer. +Divide by HZ to get the timeout length in seconds. +.It Vt u_int snd_buf_hiwater +The current size of the socket send buffer in bytes. +.It Vt u_int snd_buf_cc +The current number of bytes in the socket send buffer. +.It Vt u_int rcv_buf_hiwater +The current size of the socket receive buffer in bytes. +.It Vt u_int rcv_buf_cc +The current number of bytes in the socket receive buffer. +.It Vt u_int sent_inflight_bytes +The current number of unacknowledged bytes in-flight. +Bytes acknowledged via SACK are not excluded from this count. +.It Vt int t_segqlen +The current number of segments in the reassembly queue. +.It Vt u_int flowid +Flowid for the connection. +A caveat: Zero '0' either represents a valid flowid or a default value when +the flowid is not being set. +.It Vt u_int flowtype +Flow type for the connection. +Flowtype defines which protocol fields are hashed to produce the flowid. +A complete listing is available in +.Pa /usr/include/sys/mbuf.h +under +.Dv M_HASHTYPE_* . +.El .Sh FILES -.Bl -tag -width "/usr/lib/dtrace/tcp.d" -compact +.Bl -tag -width "/usr/lib/dtrace/siftr.d" -compact .It Pa /usr/lib/dtrace/tcp.d +DTrace type and translator definitions for all the probes of the +.Nm tcp +provider except the +.Nm siftr +probe. +.It Pa /usr/lib/dtrace/siftr.d DTrace type and translator definitions for the +.Nm siftr +probe of the .Nm tcp provider. .El @@ -365,6 +478,26 @@ tcp:::state-change last[args[1]->cs_cid] = timestamp; } .Ed +The following script uses the siftr probe to show the current value of CWND +and SSTHRESH when a packet is sent or received: +.Bd -literal -offset indent +#pragma D option quiet +#pragma D option switchrate=10hz + +dtrace:::BEGIN +{ + printf(" %3s %5s %5s %10s %10s\\n", + "DIR", "LPORT", "RPORT", "CWND", "SSTHRESH"); +} + +tcp:::siftr +{ + printf(" %3s %5d %5d %10d %10d\\n", + siftr_dir_string[args[0]->direction], + args[0]->tcp_localport, args[0]->tcp_foreignport, + args[0]->snd_cwnd, args[0]->snd_ssthresh); +} +.Ed .Sh COMPATIBILITY This provider is compatible with the .Nm tcp @@ -375,6 +508,7 @@ provider in Solaris. .Xr dtrace_sctp 4 , .Xr dtrace_udp 4 , .Xr dtrace_udplite 4 , +.Xr siftr 4 , .Xr tcp 4 , .Xr SDT 9 .Sh HISTORY From nobody Thu Jan 11 12:16:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9kDJ46Dpz57JtD; Thu, 11 Jan 2024 12:16: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 4T9kDJ219Kz40db; Thu, 11 Jan 2024 12:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704975392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AEgBdo0QDKCjvf5yZs45nbIF/MBrsaHh5XlQRHtCoe4=; b=d7B8k7SA5hZKv5XJG2mlLSe5r16Luk/Y4gfrih1D0SewznPbV/u0s12kRcsfzoVoYbwUIT PxpFC+DKrQSqEkgrp9TohWaLoWEZDvt68cu1xRPlbQ/y0yfi78m9U/x7lZn4im0uQLDRfz g/Av93t0ZOGM6vWt9XBaUDsqiAuEXJPuezf+StbvDKUZILklJXPYOoX75JfDJW0XpP0aUj W+CD0K5i2cKngP//Wf2l+2vlecibwWaM6sguWk2hFgZDM/TBHVqmHroE3qNYrRSEE0W3sH ku7ZsCVeKuKSDv8p0Pjts0TdFM/6XILaLNRftXzzpruuKqTo6eih2GCEnErMnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704975392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AEgBdo0QDKCjvf5yZs45nbIF/MBrsaHh5XlQRHtCoe4=; b=tC6MxCsKwUix05g3aytyxie6KbanByEYxdk9QIaIUr4kzE1K1LzwM61LYW90IE4M7SXnY0 mhj5eMoocnQNnE6CNrnUQgDSV3d7kE+Uk4baVGu10LrW+WBPQ2lE/pIByOhNZww9Zhhjdr /qWCG4Sg/xjuEEtr6UUmNYs8lEoxA+CT1a9OANymoXsAt/lkNH7v/2rzllKJsM6GJt6G6A mn/JCwHfK/AH4ynO82tIG2YOGsSKsp2wKdq9zPMPD/0YzP8ZVTAh3mcuvfuCsfSIIfLJyR 7CEdFAI9XJa4PBDBt5A8pTlU5bJ9L8KujUuZt/639zKDsuU2bt7lpXnLecOLxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704975392; a=rsa-sha256; cv=none; b=cAJs43oQtGO0rolnP29ARQ2tTbsYbYtJG+BsaN+1S6JYWHhCL90UPBF06IzNTcNKGUlj9g NMcIuOsrJD3Bq8rtthVYGgRMT3WdrFvv5T38UEV/XSNOdugRcDeINOhijMGMzRVDjzhpEi WVNLATv6qE/nheQaLfse13tu7l/DEpUAytqrjaEWabQ6p9QipXfhpAwNSRcvyiImLyQQgb HdZiJeE0zjiBQ8d8xvrFRcUW+0Ckbr7vpbqEC6uDaFC5W0AgcGGr5V/VwcbEoL52p17y1q IKFVgYBAAENbFPr90acnAcAmt5jPDsA6s6dSwTwoepz7uDhqXECXHg5zx6tmmg== 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 4T9kDJ15xlzJ1r; Thu, 11 Jan 2024 12:16: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 40BCGWwg084660; Thu, 11 Jan 2024 12:16:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCGWtD084657; Thu, 11 Jan 2024 12:16:32 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:16:32 GMT Message-Id: <202401111216.40BCGWtD084657@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: b10ff555b2c5 - stable/13 - sctp: include sctp_module.c in kernel builds List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b10ff555b2c5179af64eaaea3da1cef285dbb2c5 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=b10ff555b2c5179af64eaaea3da1cef285dbb2c5 commit b10ff555b2c5179af64eaaea3da1cef285dbb2c5 Author: Michael Tuexen AuthorDate: 2023-07-23 12:31:17 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 11:48:42 +0000 sctp: include sctp_module.c in kernel builds Allow kldload to detect that SCTP has been build into the kernel. (cherry picked from commit 058d1722b09eb62d3a86ea4ce4165c2bd61b854e) --- sys/conf/files | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/conf/files b/sys/conf/files index ac6c3ed6376a..5feae02ddd82 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4434,6 +4434,7 @@ netinet/sctp_crc32.c optional inet | inet6 netinet/sctp_indata.c optional inet sctp | inet6 sctp netinet/sctp_input.c optional inet sctp | inet6 sctp netinet/sctp_kdtrace.c optional inet sctp | inet6 sctp +netinet/sctp_module.c optional inet sctp | inet6 sctp netinet/sctp_output.c optional inet sctp | inet6 sctp netinet/sctp_pcb.c optional inet sctp | inet6 sctp netinet/sctp_peeloff.c optional inet sctp | inet6 sctp From nobody Thu Jan 11 12:19:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9kHb1Kj6z57JnP; Thu, 11 Jan 2024 12:19:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9kHb0Tpbz40sT; Thu, 11 Jan 2024 12:19:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704975563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zFY9bMAvdFJ1uxsaWduMDtL8AHkzbGuTpZHkvtyj5sQ=; b=la+7GKaakyIf4JDlZth/94I2JWNOoVJVH9jYcCOAuXxkmUtYGDyCmDxssvazGaccsQGiJf QA53bppwFQ4bGRRU6MGKC1yRQCLJi91rM1ngRSkCiJiZuD6JolnR3gtzzpHuMA259pnyX7 8ZsdmeQyCyOF7DdRzv37zOG3gs0NLB1u8iPUhDpg2i0QzxYccv+48Q0eX9rMFcl/RDeBXG AsSnmOHo6YWeyLPg3vLVIDabk24envhHXKDpVEy9wA3Vj3RHzsE9a/hqXOI39QBqZjd2n/ l6HqbOaapzyMa2ZPoCN9imG1+2R+BSaQx4ocOf4lUj6Qa9ltefWKmKALtbfC5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704975563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zFY9bMAvdFJ1uxsaWduMDtL8AHkzbGuTpZHkvtyj5sQ=; b=eJ0p4u/dIoGFTuQwEaOUcG56HjyiLO0YoZBvXT9S0XwPgd1c/J3Rp9plLOJhJyJHr/zqLt iXv8ze5IIeKjse2kPIsDejVvJhbhtrnhLAg/6qMsIO9p0bfA/dhkAInj+qKHDM5m/a2TxP mYaRp3BaywUMlH7BsIidUIgzOqGuioKkBrmzHgxR1WDaS2Nooysc+8k7LRfZuQI5y+GRl5 L0G27tKYr71sN6cIvm52eAhCLipPv1BqHWWQCgYCt4arANpO1DxykOqOA5xhCg6PFQBNBI +xXO5/H2Gz9ZRUkVxm/xkPTJpYUTF1xBTrmSmIokXOmAdhRQ0aQ7QBltno1QLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704975563; a=rsa-sha256; cv=none; b=gUxzDp34QmKsEnB+etim7LrC7YLrujQe4aAobMVMRgqF6tXdZMOoLrVqsV6jXUJp7qZiLF pLwFBoI0ZHXFdX2EsuGpU0+OR/eGllQqWmmRA1OAAc6CtWDV+T9r1NJ0kAJn4ASekn07lC YZr6SpRZy+j0aWW0l46GODoi6E7CbYARpjP2TAFz9QpKFQJa/1mrCvrv5jmlH3wewmWpBa GHAatZNQtwK9OL+U9Dz3agv0G1OGWu3Jhqii3hKPwkZQsUmkeyElaSW21uCM/jRaUZbjxK QEQvicediijXYxJnekAwLfVOCeZQEG6Sa8m/9lcgNQp38hY11vFG7b80CvgcZQ== 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 4T9kHZ6XmmzJWq; Thu, 11 Jan 2024 12:19:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40BCJMKo085226; Thu, 11 Jan 2024 12:19:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCJMVQ085223; Thu, 11 Jan 2024 12:19:22 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:19:22 GMT Message-Id: <202401111219.40BCJMVQ085223@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 6c9b92e741f0 - stable/13 - sctp: improve consistency List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6c9b92e741f0f878deff8ad3553239155c517a7a Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=6c9b92e741f0f878deff8ad3553239155c517a7a commit 6c9b92e741f0f878deff8ad3553239155c517a7a Author: Michael Tuexen AuthorDate: 2023-07-28 12:36:11 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:18:37 +0000 sctp: improve consistency This is simplifying a patch to address PR 260116. PR: 260116 (cherry picked from commit b279e84a47ddb59e55b5a3cec31c51cd41bf0dc3) --- sys/netinet/sctputil.c | 8 ++------ sys/netinet/sctputil.h | 6 +----- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index d9cfe12861d7..e34cadd27bc8 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -5040,11 +5040,7 @@ sctp_free_bufspace(struct sctp_tcb *stcb, struct sctp_association *asoc, if ((stcb->sctp_socket != NULL) && (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) || ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE)))) { - if (stcb->sctp_socket->so_snd.sb_cc >= tp1->book_size) { - atomic_subtract_int(&((stcb)->sctp_socket->so_snd.sb_cc), tp1->book_size); - } else { - stcb->sctp_socket->so_snd.sb_cc = 0; - } + SCTP_SAVE_ATOMIC_DECREMENT(&stcb->sctp_socket->so_snd.sb_cc, tp1->book_size); } } @@ -6121,7 +6117,7 @@ get_more_data: if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SB_LOGGING_ENABLE) { sctp_sblog(&so->so_rcv, control->do_not_ref_stcb ? NULL : stcb, SCTP_LOG_SBFREE, (int)cp_len); } - atomic_subtract_int(&so->so_rcv.sb_cc, (int)cp_len); + SCTP_SAVE_ATOMIC_DECREMENT(&so->so_rcv.sb_cc, (int)cp_len); if ((control->do_not_ref_stcb == 0) && stcb) { atomic_subtract_int(&stcb->asoc.sb_cc, (int)cp_len); diff --git a/sys/netinet/sctputil.h b/sys/netinet/sctputil.h index 1f450a264939..9026fd09a0be 100644 --- a/sys/netinet/sctputil.h +++ b/sys/netinet/sctputil.h @@ -251,11 +251,7 @@ do { \ } \ if (stcb->sctp_socket && ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \ (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \ - if (stcb->sctp_socket->so_snd.sb_cc >= sp->length) { \ - atomic_subtract_int(&stcb->sctp_socket->so_snd.sb_cc,sp->length); \ - } else { \ - stcb->sctp_socket->so_snd.sb_cc = 0; \ - } \ + SCTP_SAVE_ATOMIC_DECREMENT(&stcb->sctp_socket->so_snd.sb_cc, sp->length); \ } \ } \ } while (0) From nobody Thu Jan 11 12:21:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9kKT1G25z57KDV; Thu, 11 Jan 2024 12:21: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 4T9kKS571fz41PJ; Thu, 11 Jan 2024 12:21:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704975660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oqvZY+CryIcAHNvrEUhXTH5PtCq1QCvTxlvtzwR7AJ0=; b=tOgibMyldqlhTuaws4FvxZmKdt8r0PP3fyOo27UQV/DVajw/i60f8MYHuq79B/iPcMIFG5 py8LOOIy6vOGy6tTU7ofk6G0TVqo504Cn4bal4eTPG4hAPrTeizW3StZ95OhL0mzbZfB/j DXLpOzStcdJNWH1zt4jo8K2iZaL/WClzZPC2vajvZMklqCxSRXik0/bnFgSEdtn3ZpCu3k zy2obtkpS/T2UF1KB5/XVdA3bPC1FWTGKcghqXZpNtqZ0qu3xW8OoaLqprllAbqO+sobCH r1PO12ntoF1IjmU7ohHWHGbrHXbq5fB1XmJ2PnFYXQjFcfwy5DeZdQTLD5l18A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704975660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oqvZY+CryIcAHNvrEUhXTH5PtCq1QCvTxlvtzwR7AJ0=; b=cN7SZpVdebUENhkBDc2ns0zH2I+r4gg/2YTFM6HUs5IgguSyL8G4BvJYuVkEq6B4YLsmns KBwKJlUVVtZhDabyQCUeAM8ENyjfSzy7HxRLDBXeia/akhYnsIJvtoVOAEq+4xbORnwq1u C9eP1cP8ocOiHt8SzzDhqj0oti0T7f2B+45Awjx9oRn1qDmTg/q1/pIrjtKfoyJwhe/TDi E+OTv5Srcc7N57Uc4KMCOextUfxPC15IrSiWODkITX3+qiy4EYK+cbMvzyLoJdQUU+C3GB xEPYMQSYdcxkLZvaJ6/vqBTAK9a4ZoNz9/pQm2MpMSDpK0z/mW5UvpDBzdDbcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704975660; a=rsa-sha256; cv=none; b=JRKnj5z33sShA2k+0byp3jkmmhP1bl2VAdZ59Wk94DV22LHMsObINAiOfDuwcRDXV5gwno dSUwprtC5Kvnm51dFxeycBIpXuAJW33/X1hDRWIuvUGFCClFvgG1QAvSFjicoN48tOgDWM 9Udkw4GUWeSelnQVaYtnXeDjwAZcZQPMQ0bs7Z4E26DH2Gp5E2S/bQt1Iy2NJLZjy8tYwV b7ARMrLOpsqE9RaYtuiqKQnlsh/t1qH1v+w+JIcgsyGQp5kXmJCnEN+D2Cest+Vh1BlUB2 kNSqhV9KrT2frwXNIXH4EqAfB0ZpCxFLRkH5mFP1oYlgWkNqq9b6JwzbGEgWYQ== 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 4T9kKS4CHJzJ4b; Thu, 11 Jan 2024 12:21: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 40BCL0i6096946; Thu, 11 Jan 2024 12:21:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCL0Pc096943; Thu, 11 Jan 2024 12:21:00 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:21:00 GMT Message-Id: <202401111221.40BCL0Pc096943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: f141ff9935fd - stable/13 - sctp: keep sb_acc and sb_ccc in sync List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f141ff9935fde0ab9790a7687605bf3e455d1300 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f141ff9935fde0ab9790a7687605bf3e455d1300 commit f141ff9935fde0ab9790a7687605bf3e455d1300 Author: Michael Tuexen AuthorDate: 2023-07-28 13:16:23 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:20:06 +0000 sctp: keep sb_acc and sb_ccc in sync PR: 260116 (cherry picked from commit c620788150d274c09a070ab486602c98407d73b0) --- sys/netinet/sctp_os_bsd.h | 18 ++++++++++++------ sys/netinet/sctp_output.c | 2 +- sys/netinet/sctp_pcb.c | 2 +- sys/netinet/sctp_var.h | 4 ++-- sys/netinet/sctputil.c | 4 ++-- sys/netinet/sctputil.h | 4 ++-- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/sys/netinet/sctp_os_bsd.h b/sys/netinet/sctp_os_bsd.h index dfa7c906b6b9..01ab8f2823b8 100644 --- a/sys/netinet/sctp_os_bsd.h +++ b/sys/netinet/sctp_os_bsd.h @@ -370,11 +370,6 @@ typedef struct callout sctp_os_timer_t; #define SCTP_CLEAR_SO_NBIO(so) ((so)->so_state &= ~SS_NBIO) /* get the socket type */ #define SCTP_SO_TYPE(so) ((so)->so_type) -/* Use a macro for renaming sb_cc to sb_acc. - * Initially sb_ccc was used, but this broke select() when used - * with SCTP sockets. - */ -#define sb_cc sb_acc /* reserve sb space for a socket */ #define SCTP_SORESERVE(so, send, recv) soreserve(so, send, recv) /* wakeup a socket */ @@ -382,8 +377,19 @@ typedef struct callout sctp_os_timer_t; /* number of bytes ready to read */ #define SCTP_SBAVAIL(sb) sbavail(sb) /* clear the socket buffer state */ +#define SCTP_SB_INCR(sb, incr) \ +{ \ + atomic_add_int(&(sb)->sb_acc, incr); \ + atomic_add_int(&(sb)->sb_ccc, incr); \ +} +#define SCTP_SB_DECR(sb, decr) \ +{ \ + SCTP_SAVE_ATOMIC_DECREMENT(&(sb)->sb_acc, decr); \ + SCTP_SAVE_ATOMIC_DECREMENT(&(sb)->sb_ccc, decr); \ +} #define SCTP_SB_CLEAR(sb) \ - (sb).sb_cc = 0; \ + (sb).sb_acc = 0; \ + (sb).sb_ccc = 0; \ (sb).sb_mb = NULL; \ (sb).sb_mbcnt = 0; diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 91abe158c5a2..56de9cb860c6 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -7246,7 +7246,7 @@ one_more_time: if ((stcb->sctp_socket != NULL) && ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { - atomic_subtract_int(&stcb->sctp_socket->so_snd.sb_cc, sp->length); + SCTP_SB_DECR(&stcb->sctp_socket->so_snd, sp->length); } if (sp->data) { sctp_m_freem(sp->data); diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index b5c78bb67745..2cb3f6874df9 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -3609,7 +3609,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from) TAILQ_REMOVE(&inp->read_queue, sq, next); sctp_free_remote_addr(sq->whoFrom); if (so) - so->so_rcv.sb_cc -= sq->length; + SCTP_SB_DECR(&so->so_rcv, sq->length); if (sq->data) { sctp_m_freem(sq->data); sq->data = NULL; diff --git a/sys/netinet/sctp_var.h b/sys/netinet/sctp_var.h index d9576709909c..144ab77c5dec 100644 --- a/sys/netinet/sctp_var.h +++ b/sys/netinet/sctp_var.h @@ -196,7 +196,7 @@ extern struct pr_usrreqs sctp_usrreqs; } #define sctp_sbfree(ctl, stcb, sb, m) { \ - SCTP_SAVE_ATOMIC_DECREMENT(&(sb)->sb_cc, SCTP_BUF_LEN((m))); \ + SCTP_SB_DECR(sb, SCTP_BUF_LEN((m))); \ SCTP_SAVE_ATOMIC_DECREMENT(&(sb)->sb_mbcnt, MSIZE); \ if (((ctl)->do_not_ref_stcb == 0) && stcb) {\ SCTP_SAVE_ATOMIC_DECREMENT(&(stcb)->asoc.sb_cc, SCTP_BUF_LEN((m))); \ @@ -208,7 +208,7 @@ extern struct pr_usrreqs sctp_usrreqs; } #define sctp_sballoc(stcb, sb, m) { \ - atomic_add_int(&(sb)->sb_cc,SCTP_BUF_LEN((m))); \ + SCTP_SB_INCR(sb, SCTP_BUF_LEN((m))); \ atomic_add_int(&(sb)->sb_mbcnt, MSIZE); \ if (stcb) { \ atomic_add_int(&(stcb)->asoc.sb_cc, SCTP_BUF_LEN((m))); \ diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index e34cadd27bc8..0f9c0af623b0 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -5040,7 +5040,7 @@ sctp_free_bufspace(struct sctp_tcb *stcb, struct sctp_association *asoc, if ((stcb->sctp_socket != NULL) && (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) || ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE)))) { - SCTP_SAVE_ATOMIC_DECREMENT(&stcb->sctp_socket->so_snd.sb_cc, tp1->book_size); + SCTP_SB_DECR(&stcb->sctp_socket->so_snd, tp1->book_size); } } @@ -6117,7 +6117,7 @@ get_more_data: if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SB_LOGGING_ENABLE) { sctp_sblog(&so->so_rcv, control->do_not_ref_stcb ? NULL : stcb, SCTP_LOG_SBFREE, (int)cp_len); } - SCTP_SAVE_ATOMIC_DECREMENT(&so->so_rcv.sb_cc, (int)cp_len); + SCTP_SB_DECR(&so->so_rcv, (int)cp_len); if ((control->do_not_ref_stcb == 0) && stcb) { atomic_subtract_int(&stcb->asoc.sb_cc, (int)cp_len); diff --git a/sys/netinet/sctputil.h b/sys/netinet/sctputil.h index 9026fd09a0be..f0f6d6bccfc7 100644 --- a/sys/netinet/sctputil.h +++ b/sys/netinet/sctputil.h @@ -251,7 +251,7 @@ do { \ } \ if (stcb->sctp_socket && ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \ (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \ - SCTP_SAVE_ATOMIC_DECREMENT(&stcb->sctp_socket->so_snd.sb_cc, sp->length); \ + SCTP_SB_DECR(&stcb->sctp_socket->so_snd, sp->length); \ } \ } \ } while (0) @@ -262,7 +262,7 @@ do { \ if ((stcb->sctp_socket != NULL) && \ ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \ (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \ - atomic_add_int(&stcb->sctp_socket->so_snd.sb_cc,sz); \ + SCTP_SB_INCR(&stcb->sctp_socket->so_snd, sz); \ } \ } while (0) From nobody Thu Jan 11 12:22:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9kM307yGz57KHb; Thu, 11 Jan 2024 12:22:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9kM26cRhz41Sy; Thu, 11 Jan 2024 12:22:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704975742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j83d29f/B+Gwyrg39/5EX0TdSTg1vUrD1htNfCbe8rw=; b=sc/5GtBy/Mzeyvssynm3dLwDZc7+PIkUyurGaFrKxe9Ay8ejmeQls90kQDKF508n5jcYju qAAHf2zoYSmMdXGUd7Dg6HELmGkQVhNgr/3DhfRy/cC4rxDDJOK9TO57dsKtMuC0SVv63b HQwJf5PHlA9/LINZEy3J2Uo1KyNUflt1Vda4RZeuC5qVow3X0P4TIsT5V4F1Hj3tLHAwZF xfIAXZF1QY+MaHrQFWwvibaa25OITTa0P7iSreJW1Y4KmIQiR6fyJ7dKGq/ynfqjTai94F aDpajewnyAlXgUEaFaqvBbit/GnYiRUsPjUt/Dkbxzoeem4rsMna4sq9lPU8kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704975742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j83d29f/B+Gwyrg39/5EX0TdSTg1vUrD1htNfCbe8rw=; b=hDMwHtL8HyQv+Nbbur+IRYachX+XE69QbTJ9uC+w/ufxcXp3FYpg0TiLgjqAg9aWVicU5w pA7fAuYHN3jWwGKeMA5UodyU4YT+y4AOki6/t+VwicfdYl0wcyxM5/4z28qHKcmQpioTdF DyAJKcT1dTsTBbbfFcm7yp1/MAoxXfwfS6Ig4lDH/0ox6nKagMkUHM/djSFu/PZVU/1B13 27gNy5u4cqYxHFTcutvGlwNw5STylzeSDWJ92X3LW7DqRSZnz56m93luqJnFO+x2yEHfmU nvHcRqye3AY6OEo3gc/1icmPdHNmaF9QE5Q3sZB19fzoBVXkluNPMYokZAbeFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704975742; a=rsa-sha256; cv=none; b=Gn+wjfjTMJZum+kWcf2yyZfzAIwyZA2cVBEWUqoXE7nxgtMdHW+9JVuwaLDRxMOetNBM+m EiV1YIuxbjnNGwOiV/IwWNVxsXVRDwBCTSOxKQ8YdHRgvELuV4G9x1BMHEWGvroy2eg3t1 +/GtL1IulFjVNMa7UoioLEHHGFZButdppzQUl5WUGNFjTPp5pFHKrZeAO0KsVEmFhIy1zY dQI9QIjQE5kuExIA25mUHey2Tw9bRhXlol7qRVYuMJptF1+OyFJwbsTlFkUAG0zzyj9ZKI 2GYTncCpIy8vfkec91ww3atyjoy2b9PKVZi7LJljGjdMqQF36Jy4B9r8xfKgkQ== 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 4T9kM25hJZzJcP; Thu, 11 Jan 2024 12:22:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40BCMMVH099866; Thu, 11 Jan 2024 12:22:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCMMll099863; Thu, 11 Jan 2024 12:22:22 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:22:22 GMT Message-Id: <202401111222.40BCMMll099863@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: e47f243218bf - stable/13 - sctp: improve consistency of acc and ccc handling in snd buffer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e47f243218bf62ae2f3ad915d7b8d73893b4b4d6 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e47f243218bf62ae2f3ad915d7b8d73893b4b4d6 commit e47f243218bf62ae2f3ad915d7b8d73893b4b4d6 Author: Michael Tuexen AuthorDate: 2023-08-04 06:32:25 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:21:45 +0000 sctp: improve consistency of acc and ccc handling in snd buffer Don't clear the counters for the socket snd buffer when shutdown(..., SHUT_WR) or shutdown(..., SHUT_RDWR) is called. This was causing the system to panic() when SCTP pf tests were running. Reported by: dchagin, kp (cherry picked from commit efb04fb404b240a99c618e49174cd6260217edaa) --- sys/netinet/sctp_usrreq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index bcfc496a132a..10af0c669f04 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -848,7 +848,6 @@ sctp_flush(struct socket *so, int how) SOCK_LOCK(so); KASSERT(!SOLISTENING(so), ("sctp_flush: called on listening socket %p", so)); - SCTP_SB_CLEAR(so->so_snd); SOCK_UNLOCK(so); } return (0); From nobody Thu Jan 11 12:23:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9kMt6SdJz57KHm; Thu, 11 Jan 2024 12:23:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9kMt5gJNz420m; Thu, 11 Jan 2024 12:23:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704975786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RjpoRvYrBt1GvsMKhd9Crsni23GQcGZ3o7N1CNxn+W4=; b=hQyFlYzpRLEAOdtcln1Pe77av2ZnYHbozK8sgi/g0cmYa8upBW0CdLDudBvOkeejs8Ko7a Y2/os9bYGtmtFs/0Bkj+2TD2a8DgUvFVe/AN/zEXGg2W1kt27jFxW4CNs1x7PvdqdM2E9c OexR5SfbD6aircN+ueREqGwQQGEm3fMN5HAx5iAezrBSvX2RbHRLPY7DG/yBDmuBKbHRB7 8GNcl4MfSydWzedPjMZnxGhS0TgVfPcuvtj5SItrj7CuG6gF9yb+KwL0ZMM3sMA8K0hhpR 7fUV4abRFkK/5RZbxDFfLv/MvE6VuZab7lobp9KuYJz26041v62x3luMW0K2Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704975786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RjpoRvYrBt1GvsMKhd9Crsni23GQcGZ3o7N1CNxn+W4=; b=UpGDHIjVFk4QHRktpzJCyPW3TGms5vNHul2CwMBYJU5kf6h9+RbM8h4uNkrZ/Omx5NrtEd Q6Xxj7pKsmUaOcLTARHT79EzM7xwp4CHF0rqBLnSOE8JW18/OTJ6IyvSzFtAzDhCf6r1Th e+S5w/jVqOpYBSvMju0pcPQTlT+rXp/VfhlauK+DPYwYVstZaHFpGkPj+L3i2xhI4z+SBd T8URyTLizPK7PRty1efstZKCz6AErljcnIroS5AaZ3gcQRzZHZLQkzyTGHhybKBvZBZD6F KSuRiAq9rFGtW19JpwZEwhjIOH/GxeA4Ooj3tDEiL/VWcwS71Llfnz2I6HrcwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704975786; a=rsa-sha256; cv=none; b=weL9ypxnjNsIxqhkEJ/j19N6trZL27bOAsTUtBS2fDZEspmBef8PY+NhDc1lD4KwyJiBe1 +Aok+MKlvb70K2bGVkUw+7np9QIcPpBclSx6KxSxh6dyc99ZMNCvkCp+DvXR6qtyq99O1q F9av8c9gX0v7MzY0tmaMap+q4VpeQ8tNIHbAleha+lgo4uxMAYv66pCgir6uuW7EFQFOwR jxJZbbxrOmQjbJvKJ+5g5/Vh22v0wKvqT6byxtlX1WmI/IS0o8gbM9fAy4k/IsbK65OckJ pbldyym8paAD1i7yJjhh31SidAK+IU8ZQw4B7YhV4eeUnKXVfszBP8ifDwYVcg== 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 4T9kMt4jhnzHmc; Thu, 11 Jan 2024 12:23:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40BCN6Jp001024; Thu, 11 Jan 2024 12:23:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCN6mI001021; Thu, 11 Jan 2024 12:23:06 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:23:06 GMT Message-Id: <202401111223.40BCN6mI001021@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: b7b4790355b4 - stable/13 - sctp: remove redundant check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b7b4790355b415b99cdd066cf55e1510e4644da1 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=b7b4790355b415b99cdd066cf55e1510e4644da1 commit b7b4790355b415b99cdd066cf55e1510e4644da1 Author: Michael Tuexen AuthorDate: 2023-08-05 09:26:45 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:22:43 +0000 sctp: remove redundant check This is already checked by the caller. (cherry picked from commit e3771cc03419b69c8ee851c1ffa85230d0fde1d5) --- sys/netinet/sctputil.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 0f9c0af623b0..0d08db080c46 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -3651,9 +3651,6 @@ sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error, /* event not enabled */ return; } - if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_CANT_READ) { - return; - } m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_pdapi_event), 0, M_NOWAIT, 1, MT_DATA); if (m_notify == NULL) From nobody Thu Jan 11 12:23:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9kNk1P3Jz57K8M; Thu, 11 Jan 2024 12:23: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 4T9kNk0PmQz42N9; Thu, 11 Jan 2024 12:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704975830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XzZxsmCJkYr0qKQO+ImOzTGycZwvbAeVslkOQknQRJs=; b=fKkz2auIAjkqNx0LERX3KCwLjG9BUiFNPw0vlHzOxTOfB7qUvTI/Kzr8drtVcezazhSlkK jNOJ8tgK7ql+WhcMM5akdJ9ikL1MwmdueRGTc8DsuWKk5FE/vi6qEFG8vmPQnB7kWhw3+i mXNsBLuyu8hSW+++98uGgI3SFJi+tt4js5QEHUZXj3bDCVkUak8ZXHzny+dgnFOhf2niKs zhL5/mWUlYV99Qu/aozzYP6nUwDl5uEgUqqQX6d0ihUkchC6tv9VU9BOIJBs2qNJdL7pEI cqDx2wWK/zLYViNPrDTcXqqS9FxZp+hJoRoRMZysskxfSk+q47vCZJAsaQdX5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704975830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XzZxsmCJkYr0qKQO+ImOzTGycZwvbAeVslkOQknQRJs=; b=aVxFf6wRh1JQ7P5QLAT2/9zA/ReNkQqvTp7AhGN8EavXdhdAl+FU6u2UAzXAA5QneqHkO6 CEMbLE5NrIEHkybxyRohLYM8Sc3EWPtfDRjH8vedns65lJcuYrgorvspQBuHqRbIk0t59t n5fWwN85OSaA/8RRqN6HeqlIscESJ6a/0RrUk9lFbfQkcXUgbHgqlKmQtxN0XRbeqMqKFV +x+FetagEOfqnnJjY5DAQqymbJW/CJ5zM+QNVRDaXSYXy7NLJ8Pin7iT7+4LnDsO5UMbi4 wZGbThghnBAcubcID/aFV4LqARLuxJR0L+YcdW2XA07mquDDPEbLx+pbOVbRyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704975830; a=rsa-sha256; cv=none; b=YgQJ7mjXi1SSSFNyt/lfBd59yG1B1q3QCETK4FPWkDvSB6LcUSQQALh04QqbqfzQhqC+Fk w5lwC3VzjSpj9Ny3XjdWb3HPjMNQIuRJasV7vz0fWSL8wyQ7EUAbLjQQdNXYh2v3LxxzhP HDIKciIGsk5SvL+LNhh2FY3QuxlVQGxlvHiF33goIRGk/IlZCn3eMsGquVycozT2CkZodv XSrKbwkAZzNyfyxeChJb+5+w3yun+LYtf6KtGXK7/woW1elG6c48KQfvRcnbyeERVZwDUA fBTv9wBM36KYcJ7KyBGceuBcAih/XNAho5L7lUWXFnJEXINnxyVNIo+5uPmcjg== 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 4T9kNj6bKyzJpL; Thu, 11 Jan 2024 12:23: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 40BCNnYo001238; Thu, 11 Jan 2024 12:23:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCNn1m001235; Thu, 11 Jan 2024 12:23:49 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:23:49 GMT Message-Id: <202401111223.40BCNn1m001235@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 53b8d66ada00 - stable/13 - sctp: improve consistency List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 53b8d66ada0096f529045726ad77bb04450369b8 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=53b8d66ada0096f529045726ad77bb04450369b8 commit 53b8d66ada0096f529045726ad77bb04450369b8 Author: Michael Tuexen AuthorDate: 2023-08-05 09:29:23 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:23:25 +0000 sctp: improve consistency (cherry picked from commit 10b2b30670d7c389b26533aa43e8d0c3aef55ff3) --- sys/netinet/sctputil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 0d08db080c46..72edf4dd66c9 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -6114,7 +6114,7 @@ get_more_data: if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SB_LOGGING_ENABLE) { sctp_sblog(&so->so_rcv, control->do_not_ref_stcb ? NULL : stcb, SCTP_LOG_SBFREE, (int)cp_len); } - SCTP_SB_DECR(&so->so_rcv, (int)cp_len); + SCTP_SB_DECR(&so->so_rcv, cp_len); if ((control->do_not_ref_stcb == 0) && stcb) { atomic_subtract_int(&stcb->asoc.sb_cc, (int)cp_len); From nobody Thu Jan 11 12:28:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9kTs2vrjz55bVr; Thu, 11 Jan 2024 12:28:17 +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 4T9kTs2NjDz43ZP; Thu, 11 Jan 2024 12:28:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704976097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dWtTpc2s3n6TcJt4HXgp/1rFE7cCnOI3xMuX0Y2Pqi0=; b=raGSpXEBi6rv4tAYsRC6uvBNkbpafOYZdnAP9wLNl5qHWdEwujxbg0AU26w9OAHxOSrC74 RRpc3rK2M1G99ZWUB2KTchlVuRskdX9tvsp4TW7owpX5UkOBh5QmI3+PYQs5R55U7K9Mt/ 4Wzo+imv/N9xk3v/EiS4ZMyvUEw2Lg45EL8Sz8Ajp3kNEpGOKsf0t+lCSYXA0m4kNidYwZ r3eD+DVwbqzZH7gLG/gXCPJquUEJJDJq2PHfGnQ7QuMjxJz5AhdLoRv/hr+RSD+IVED3ez eIFk/zB/8LWZ4U+NV/5OCXD3y9sLWv48spxPUimjjqrlDJjIGs50NOH3Vqm7Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704976097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dWtTpc2s3n6TcJt4HXgp/1rFE7cCnOI3xMuX0Y2Pqi0=; b=K2QkE+AauIoUDLeK6+PYRzVPtlBRNZQKJgRcgWKJSmiOWsY9+w90uAJIiLxDIFDAqMTSih rMrb5VzcLmeBbVja4MGLJdACQr3SDozMdlzjB8pPIB3z5ZqG/+V227/t8FYjlwj5aSjEsv Z1Iyd4MgefjrxfzSdrB7CRx4JzH3YGt8x3YGiOy0hy3RQF+MFUkGQgDcMZ4JT/uweJOWNx OMcXN4l1+RpNUkRYAhSyyo+hK0w9AdVKcUdlgDjdR6ZKEk5zhbaGeV5Cz5Ko2Vb+/kNzhQ xqRFXSkam0drQw1DR2rqw+y8R9A19NYUR/gg0EBV0YkG1VDwnp+33goKfLmH+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704976097; a=rsa-sha256; cv=none; b=NPClEyAV0xQt+fdRogrroLvYzECJZ+XZaQh/mDgLafIZoB+6ZUp9IH2P+UTIg7U28r0MXH hB6PlDa8MYQPE2dSgN2vtfCd2GZc5q6t8XYCO0loIEvi0d4FivbiFq0MX/0+CQ5R5GQXQu Y5EfRhKEdTU99TxIP9srA+rH62+L7WrPrt8jsHZySAtQy5hMJa8qM0nOlZP/cik94o/gBX nfy9ClEoqC5+RqJ3LbI6MKZnQwE5IOgDvvneyOJviRqNUPUwYznluRwMCDdazFrv8Hvw+f +ytZDxLRC3qDs2j/GkyZyoXaW3N9wU0GDlCmT8SEK6WFhIvaFevw8BtuYA0vnQ== 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 4T9kTs1RNJzJXk; Thu, 11 Jan 2024 12:28:17 +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 40BCSHK1002010; Thu, 11 Jan 2024 12:28:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCSHdA002007; Thu, 11 Jan 2024 12:28:17 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:28:17 GMT Message-Id: <202401111228.40BCSHdA002007@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 553e395b7601 - stable/13 - sctp: cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 553e395b760191aa6c2c162b7737a8cdd9c933d9 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=553e395b760191aa6c2c162b7737a8cdd9c933d9 commit 553e395b760191aa6c2c162b7737a8cdd9c933d9 Author: Michael Tuexen AuthorDate: 2023-08-08 10:40:51 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:28:03 +0000 sctp: cleanup No functional change intended. (cherry picked from commit c7587f7a3f8ddcc8dd209c9cff7b9ec3bf353dec) --- sys/netinet6/sctp6_usrreq.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sys/netinet6/sctp6_usrreq.c b/sys/netinet6/sctp6_usrreq.c index 151e1a0b9479..aeebe712b1ce 100644 --- a/sys/netinet6/sctp6_usrreq.c +++ b/sys/netinet6/sctp6_usrreq.c @@ -658,13 +658,6 @@ sctp6_close(struct socket *so) /* This could be made common with sctp_detach() since they are identical */ -static -int -sctp6_disconnect(struct socket *so) -{ - return (sctp_disconnect(so)); -} - int sctp_sendm(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, struct mbuf *control, struct thread *p); @@ -1208,7 +1201,7 @@ struct pr_usrreqs sctp6_usrreqs = { .pru_detach = sctp6_close, .pru_sopoll = sopoll_generic, .pru_flush = sctp_flush, - .pru_disconnect = sctp6_disconnect, + .pru_disconnect = sctp_disconnect, .pru_listen = sctp_listen, .pru_peeraddr = sctp6_getpeeraddr, .pru_send = sctp6_send, From nobody Thu Jan 11 12:30:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9kY018HBz55cJv; Thu, 11 Jan 2024 12:31: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 4T9kXz73g3z442P; Thu, 11 Jan 2024 12:30:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704976260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vo8dq6UK3hfMUMSm9jQSTIYHcDcTQ3ZSj+Lv1kMKd1w=; b=CCh9DDTTPgCyNtlT7nHWf3j99GERw/7dTFp33nCyciqkpvouTDGXBBt4Y0evEoxWzMata+ hWkW7OMmgSLFJdjsGWiJdFywxd27tqqoZ+ImpaxowIMNtZLphdoEsv7T1nk7BKbY1bmblF qloIH+xhUhRHOW2Lv0LD9istc5nNN78Mj3ADo6Fc2/gO+D5IVuntOSXICeVbUR3XZRflog B4byRXN5+4REYOkvft8iDo9okfTZFqBisL4sfU4PDluSl52dolWO7yajeyReKETWo2NuA6 PhkW4yTgysRdw7CLKT6jmS0dtYbx1gBYXU6gbkkEKd4P3/wPo6TJ2zZgYF1vVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704976260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vo8dq6UK3hfMUMSm9jQSTIYHcDcTQ3ZSj+Lv1kMKd1w=; b=e6bzx3tWB/z4hsb/g1RqrXIg1N7bnh+XapQX1rE07obcbvmCHgX0zjXWR/2Fzocdz4Z8rv mw5YvXPxhibc5ZlIJF1+IxaaKrOAY+yKsrMxrfJ4/acJcjhlmaKmFLsbVdxXvtEOI6WR98 tyDCqhF3LsZ7juMnS83hzqzAxf+Ic83LfCiPM07JNtROL3PX8oI/w7BcfPpLkDDEGAu6C+ Dlc0r8lyBM/0a2Tzn0qCcSvdtw72s+h+rdVhLX/grLLN269Foy5wXvoHKgPh9WgfCn3lfe Hyiwb9I+6yT64ib2l7mRkejpqjfl3QFuT+kuBc7XJ+piEjGYDkWzOkUkbLnSFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704976260; a=rsa-sha256; cv=none; b=nwGTUizXRIQc8R/dbgWtmdkGyNUNTHIBOEsE62BlSMCshG/aAdDAOb++S8qVgZ/osjdS4A XVbNh20yQbRGRwh3XJbMI+uD+T1uCcDdDPoCtZlw46xguO6NcF8K9haYjN3qnrzHwjdTlH 5mzd25vWjzshQ8ugXLekCMB+NTm+JgBpyZcglvYvew/UDaot08y00ZsCscnr2mJ4t3tCQj BnZjDnKGqGl5CzvzBEocC0CyoSMRwgdrs4SCKRs6vxbflzB8Y/ZGz2Ee2D/lAoU08fSM7I XMDGWpUqo09g9jJQhWp9iK3fHghsZ5cOh2EYje1zEnGBErj1s8u7YpDYeB8sww== 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 4T9kXz5MG9zJXr; Thu, 11 Jan 2024 12:30: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 40BCUxA9011291; Thu, 11 Jan 2024 12:30:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCUxWd011288; Thu, 11 Jan 2024 12:30:59 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:30:59 GMT Message-Id: <202401111230.40BCUxWd011288@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 31acdb17668e - stable/13 - sctp: remove duplicate code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 31acdb17668ec28798fdace1f1f192d18ec50765 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=31acdb17668ec28798fdace1f1f192d18ec50765 commit 31acdb17668ec28798fdace1f1f192d18ec50765 Author: Michael Tuexen AuthorDate: 2023-08-08 11:05:39 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:30:20 +0000 sctp: remove duplicate code No functional change intended. (cherry picked from commit 9ade2745db8be213e9da2225795cafb8e7575e29) --- sys/netinet/sctp_usrreq.c | 4 ++-- sys/netinet/sctp_var.h | 1 + sys/netinet6/sctp6_usrreq.c | 48 +-------------------------------------------- 3 files changed, 4 insertions(+), 49 deletions(-) diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index 10af0c669f04..4e43c8c72f40 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -424,8 +424,7 @@ SYSCTL_PROC(_net_inet_sctp, OID_AUTO, getcred, 0, 0, sctp_getcred, "S,ucred", "Get the ucred of a SCTP connection"); -#ifdef INET -static void +void sctp_abort(struct socket *so) { struct epoch_tracker et; @@ -463,6 +462,7 @@ sctp_abort(struct socket *so) NET_EPOCH_EXIT(et); } +#ifdef INET static int sctp_attach(struct socket *so, int proto SCTP_UNUSED, struct thread *p SCTP_UNUSED) { diff --git a/sys/netinet/sctp_var.h b/sys/netinet/sctp_var.h index 144ab77c5dec..0177dd5ac227 100644 --- a/sys/netinet/sctp_var.h +++ b/sys/netinet/sctp_var.h @@ -319,6 +319,7 @@ struct sctp_tcb; struct sctphdr; void sctp_close(struct socket *so); +void sctp_abort(struct socket *so); int sctp_disconnect(struct socket *so); void sctp_ctlinput(int, struct sockaddr *, void *); int sctp_ctloutput(struct socket *, struct sockopt *); diff --git a/sys/netinet6/sctp6_usrreq.c b/sys/netinet6/sctp6_usrreq.c index aeebe712b1ce..dca38401c02b 100644 --- a/sys/netinet6/sctp6_usrreq.c +++ b/sys/netinet6/sctp6_usrreq.c @@ -460,52 +460,6 @@ SYSCTL_PROC(_net_inet6_sctp6, OID_AUTO, getcred, 0, 0, sctp6_getcred, "S,ucred", "Get the ucred of a SCTP6 connection"); -/* This is the same as the sctp_abort() could be made common */ -static void -sctp6_abort(struct socket *so) -{ - struct epoch_tracker et; - struct sctp_inpcb *inp; - uint32_t flags; - - inp = (struct sctp_inpcb *)so->so_pcb; - if (inp == NULL) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL); - return; - } - NET_EPOCH_ENTER(et); -sctp_must_try_again: - flags = inp->sctp_flags; -#ifdef SCTP_LOG_CLOSING - sctp_log_closing(inp, NULL, 17); -#endif - if (((flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) && - (atomic_cmpset_int(&inp->sctp_flags, flags, (flags | SCTP_PCB_FLAGS_SOCKET_GONE | SCTP_PCB_FLAGS_CLOSE_IP)))) { -#ifdef SCTP_LOG_CLOSING - sctp_log_closing(inp, NULL, 16); -#endif - sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_ABORT, - SCTP_CALLED_AFTER_CMPSET_OFCLOSE); - SOCK_LOCK(so); - SCTP_SB_CLEAR(so->so_snd); - /* - * same for the rcv ones, they are only here for the - * accounting/select. - */ - SCTP_SB_CLEAR(so->so_rcv); - /* Now null out the reference, we are completely detached. */ - so->so_pcb = NULL; - SOCK_UNLOCK(so); - } else { - flags = inp->sctp_flags; - if ((flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) { - goto sctp_must_try_again; - } - } - NET_EPOCH_EXIT(et); - return; -} - static int sctp6_attach(struct socket *so, int proto SCTP_UNUSED, struct thread *p SCTP_UNUSED) { @@ -1191,7 +1145,7 @@ sctp6_getpeeraddr(struct socket *so, struct sockaddr **nam) } struct pr_usrreqs sctp6_usrreqs = { - .pru_abort = sctp6_abort, + .pru_abort = sctp_abort, .pru_accept = sctp_accept, .pru_attach = sctp6_attach, .pru_bind = sctp6_bind, From nobody Thu Jan 11 12:31:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9kYg3gCFz55cQl; Thu, 11 Jan 2024 12:31: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 4T9kYg38mkz44XV; Thu, 11 Jan 2024 12:31:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704976295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iARR14Z+g+gmiTE3xB2IUFtX6mIhqQJeriHVaI17/cs=; b=ftkiu7M7/x8gCcP0P1PS7oOgCcD10sP707fiqkUDSBQjIgZK8E4BbqZ8AciuokjJgDIqYX qh+QmQCkT4kh5/vxqKOfXEG0Di+WCDp8EMkfvUTZ8y4p2x2x3aeizQighduZRqfKAOEOFJ yFaN1flVPDzdjr47dQovb7u+WLDKB1utIsiGQQHDDcPSFrXtzLLUNm8XtKh49GtUFZadLb /HZBU4IZpB9kA6YGvlvK5uWYM3i5Kta1eTlH1lFcFAJjBRJcXOrRQWS4pUoR7vfZIczhXo uSgvFhbLf7ElpmlxOKWcVR6th3ovuf6vtYDlm6UODffHF0UoOCunk+GrHOebyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704976295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iARR14Z+g+gmiTE3xB2IUFtX6mIhqQJeriHVaI17/cs=; b=iqrHLmkDwlIAbCn34b9rzcrcVjwo6+iB/X0QqpuwNxdg8PMvpumQ1UiyMeOP7YlH2y6113 auzYvCeUmIZI5JH2T/P+nTxhPfQa1NImNuYb8o94ND7gEpKFZdwyDMIqa+qZL9lx5Yi+w0 zvZJ3lTfHXCcFB7bvcWMJqPI4sXY245jGUFtjEovO42iwZjW44RsFzWcOt7QRcZ8aH9tqQ u6fwEprcsbZnDAE5wHYeQrdpdNj2PLDir3izB7c0igJs9V/Jc38kxF/DfObpGeUMeWSCJ9 GmgEPYrpeOrvXnxqntB3qcwwAXPLTmkrwQCeidsXf4GeddfZHXI/QjZxh97X5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704976295; a=rsa-sha256; cv=none; b=Xn1Ee87OfpmaDYsHmY2DKeaVMDsVv2U6gp8IUQbNHbTCYtX7qkVhs7pozXBjBza0L6nXbS cAOuC9D8w9h0aaPPmYmfBL72K9ncoit3OBumtYvssdlLYMOowFDLYgVi/DbUV8mSpWW9oG joMUTnTwUqM6m/F9aJpEvreqJAQyglq/gCwTQAH/4wg/CT8LnU8/8hSaBWNyU5jmIv8gVf 8h9F3CGvQ5HeSiI0shmh6xoMoOBauL/DmSguS+cP+FK7WFkBAG5xEGmWBCXrGBtvU+MrWr hbc8wSWehw8rRJw/O3oIvI5+378ujZtgr0uw6DeDzFPQqT942J/ad12T3zuGFw== 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 4T9kYg2D54zJb2; Thu, 11 Jan 2024 12:31: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 40BCVZkk011490; Thu, 11 Jan 2024 12:31:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCVZlp011487; Thu, 11 Jan 2024 12:31:35 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:31:35 GMT Message-Id: <202401111231.40BCVZlp011487@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: a2f048084999 - stable/13 - sctp: another cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a2f048084999dca10f774412eb69839a0b0aea83 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=a2f048084999dca10f774412eb69839a0b0aea83 commit a2f048084999dca10f774412eb69839a0b0aea83 Author: Michael Tuexen AuthorDate: 2023-08-09 02:17:52 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:31:09 +0000 sctp: another cleanup No functional change intended. (cherry picked from commit 85e5480df95e6bca38910f44f6e9b4d7773904ed) --- sys/netinet/sctp_usrreq.c | 226 ++++++++++++++++++++++------------------------ 1 file changed, 106 insertions(+), 120 deletions(-) diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index 4e43c8c72f40..b28bfc66af8d 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -663,7 +663,10 @@ connected_type: int sctp_disconnect(struct socket *so) { + struct epoch_tracker et; struct sctp_inpcb *inp; + struct sctp_association *asoc; + struct sctp_tcb *stcb; inp = (struct sctp_inpcb *)so->so_pcb; if (inp == NULL) { @@ -671,134 +674,117 @@ sctp_disconnect(struct socket *so) return (ENOTCONN); } SCTP_INP_RLOCK(inp); - if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || - (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) { - if (LIST_EMPTY(&inp->sctp_asoc_list)) { - /* No connection */ - SCTP_INP_RUNLOCK(inp); - return (0); - } else { - struct epoch_tracker et; - struct sctp_association *asoc; - struct sctp_tcb *stcb; - - stcb = LIST_FIRST(&inp->sctp_asoc_list); - if (stcb == NULL) { - SCTP_INP_RUNLOCK(inp); - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); - return (EINVAL); - } - SCTP_TCB_LOCK(stcb); - asoc = &stcb->asoc; - if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { - /* We are about to be freed, out of here */ - SCTP_TCB_UNLOCK(stcb); - SCTP_INP_RUNLOCK(inp); - return (0); - } - NET_EPOCH_ENTER(et); - if (((so->so_options & SO_LINGER) && (so->so_linger == 0)) || - (SCTP_SBAVAIL(&so->so_rcv) > 0)) { - if (SCTP_GET_STATE(stcb) != SCTP_STATE_COOKIE_WAIT) { - /* Left with Data unread */ - struct mbuf *op_err; + KASSERT(inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE || + inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL, + ("Not a one-to-one style socket")); + stcb = LIST_FIRST(&inp->sctp_asoc_list); + if (stcb == NULL) { + SCTP_INP_RUNLOCK(inp); + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, ENOTCONN); + return (ENOTCONN); + } + SCTP_TCB_LOCK(stcb); + asoc = &stcb->asoc; + if (asoc->state & SCTP_STATE_ABOUT_TO_BE_FREED) { + /* We are about to be freed, out of here */ + SCTP_TCB_UNLOCK(stcb); + SCTP_INP_RUNLOCK(inp); + return (0); + } + NET_EPOCH_ENTER(et); + if (((so->so_options & SO_LINGER) && (so->so_linger == 0)) || + (SCTP_SBAVAIL(&so->so_rcv) > 0)) { + if (SCTP_GET_STATE(stcb) != SCTP_STATE_COOKIE_WAIT) { + /* Left with Data unread */ + struct mbuf *op_err; - op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); - sctp_send_abort_tcb(stcb, op_err, SCTP_SO_LOCKED); - SCTP_STAT_INCR_COUNTER32(sctps_aborted); - } - SCTP_INP_RUNLOCK(inp); - if ((SCTP_GET_STATE(stcb) == SCTP_STATE_OPEN) || - (SCTP_GET_STATE(stcb) == SCTP_STATE_SHUTDOWN_RECEIVED)) { - SCTP_STAT_DECR_GAUGE32(sctps_currestab); - } - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, - SCTP_FROM_SCTP_USRREQ + SCTP_LOC_3); - /* No unlock tcb assoc is gone */ - NET_EPOCH_EXIT(et); - return (0); + op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); + sctp_send_abort_tcb(stcb, op_err, SCTP_SO_LOCKED); + SCTP_STAT_INCR_COUNTER32(sctps_aborted); + } + SCTP_INP_RUNLOCK(inp); + if ((SCTP_GET_STATE(stcb) == SCTP_STATE_OPEN) || + (SCTP_GET_STATE(stcb) == SCTP_STATE_SHUTDOWN_RECEIVED)) { + SCTP_STAT_DECR_GAUGE32(sctps_currestab); + } + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_3); + /* No unlock tcb assoc is gone */ + NET_EPOCH_EXIT(et); + return (0); + } + if (TAILQ_EMPTY(&asoc->send_queue) && + TAILQ_EMPTY(&asoc->sent_queue) && + (asoc->stream_queue_cnt == 0)) { + /* there is nothing queued to send, so done */ + if ((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, asoc)) { + goto abort_anyway; + } + if ((SCTP_GET_STATE(stcb) != SCTP_STATE_SHUTDOWN_SENT) && + (SCTP_GET_STATE(stcb) != SCTP_STATE_SHUTDOWN_ACK_SENT)) { + /* only send SHUTDOWN 1st time thru */ + struct sctp_nets *netp; + + if ((SCTP_GET_STATE(stcb) == SCTP_STATE_OPEN) || + (SCTP_GET_STATE(stcb) == SCTP_STATE_SHUTDOWN_RECEIVED)) { + SCTP_STAT_DECR_GAUGE32(sctps_currestab); } - if (TAILQ_EMPTY(&asoc->send_queue) && - TAILQ_EMPTY(&asoc->sent_queue) && - (asoc->stream_queue_cnt == 0)) { - /* there is nothing queued to send, so done */ - if ((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, asoc)) { - goto abort_anyway; - } - if ((SCTP_GET_STATE(stcb) != SCTP_STATE_SHUTDOWN_SENT) && - (SCTP_GET_STATE(stcb) != SCTP_STATE_SHUTDOWN_ACK_SENT)) { - /* only send SHUTDOWN 1st time thru */ - struct sctp_nets *netp; - - if ((SCTP_GET_STATE(stcb) == SCTP_STATE_OPEN) || - (SCTP_GET_STATE(stcb) == SCTP_STATE_SHUTDOWN_RECEIVED)) { - SCTP_STAT_DECR_GAUGE32(sctps_currestab); - } - SCTP_SET_STATE(stcb, SCTP_STATE_SHUTDOWN_SENT); - sctp_stop_timers_for_shutdown(stcb); - if (stcb->asoc.alternate) { - netp = stcb->asoc.alternate; - } else { - netp = stcb->asoc.primary_destination; - } - sctp_send_shutdown(stcb, netp); - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, - stcb->sctp_ep, stcb, netp); - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, NULL); - sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_CLOSING, SCTP_SO_LOCKED); - } + SCTP_SET_STATE(stcb, SCTP_STATE_SHUTDOWN_SENT); + sctp_stop_timers_for_shutdown(stcb); + if (stcb->asoc.alternate) { + netp = stcb->asoc.alternate; } else { - /* - * we still got (or just got) data to send, - * so set SHUTDOWN_PENDING - */ - /* - * XXX sockets draft says that SCTP_EOF - * should be sent with no data. currently, - * we will allow user data to be sent first - * and move to SHUTDOWN-PENDING - */ - SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_SHUTDOWN_PENDING); - if ((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, asoc)) { - SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_PARTIAL_MSG_LEFT); - } - if (TAILQ_EMPTY(&asoc->send_queue) && - TAILQ_EMPTY(&asoc->sent_queue) && - (asoc->state & SCTP_STATE_PARTIAL_MSG_LEFT)) { - struct mbuf *op_err; - - abort_anyway: - op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_USRREQ + SCTP_LOC_4; - sctp_send_abort_tcb(stcb, op_err, SCTP_SO_LOCKED); - SCTP_STAT_INCR_COUNTER32(sctps_aborted); - if ((SCTP_GET_STATE(stcb) == SCTP_STATE_OPEN) || - (SCTP_GET_STATE(stcb) == SCTP_STATE_SHUTDOWN_RECEIVED)) { - SCTP_STAT_DECR_GAUGE32(sctps_currestab); - } - SCTP_INP_RUNLOCK(inp); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, - SCTP_FROM_SCTP_USRREQ + SCTP_LOC_5); - NET_EPOCH_EXIT(et); - return (0); - } else { - sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_CLOSING, SCTP_SO_LOCKED); - } + netp = stcb->asoc.primary_destination; + } + sctp_send_shutdown(stcb, netp); + sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, + stcb->sctp_ep, stcb, netp); + sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, + stcb->sctp_ep, stcb, NULL); + sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_CLOSING, SCTP_SO_LOCKED); + } + } else { + /* + * we still got (or just got) data to send, so set + * SHUTDOWN_PENDING + */ + /* + * XXX sockets draft says that SCTP_EOF should be sent with + * no data. currently, we will allow user data to be sent + * first and move to SHUTDOWN-PENDING + */ + SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_SHUTDOWN_PENDING); + if ((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, asoc)) { + SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_PARTIAL_MSG_LEFT); + } + if (TAILQ_EMPTY(&asoc->send_queue) && + TAILQ_EMPTY(&asoc->sent_queue) && + (asoc->state & SCTP_STATE_PARTIAL_MSG_LEFT)) { + struct mbuf *op_err; + + abort_anyway: + op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_USRREQ + SCTP_LOC_4; + sctp_send_abort_tcb(stcb, op_err, SCTP_SO_LOCKED); + SCTP_STAT_INCR_COUNTER32(sctps_aborted); + if ((SCTP_GET_STATE(stcb) == SCTP_STATE_OPEN) || + (SCTP_GET_STATE(stcb) == SCTP_STATE_SHUTDOWN_RECEIVED)) { + SCTP_STAT_DECR_GAUGE32(sctps_currestab); } - soisdisconnecting(so); - NET_EPOCH_EXIT(et); - SCTP_TCB_UNLOCK(stcb); SCTP_INP_RUNLOCK(inp); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_5); + NET_EPOCH_EXIT(et); return (0); + } else { + sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_CLOSING, SCTP_SO_LOCKED); } - /* not reached */ - } else { - /* UDP model does not support this */ - SCTP_INP_RUNLOCK(inp); - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EOPNOTSUPP); - return (EOPNOTSUPP); } + soisdisconnecting(so); + NET_EPOCH_EXIT(et); + SCTP_TCB_UNLOCK(stcb); + SCTP_INP_RUNLOCK(inp); + return (0); } int From nobody Thu Jan 11 12:40:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9km95DCbz55dCp; Thu, 11 Jan 2024 12:40:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9km93Dn8z46Br; Thu, 11 Jan 2024 12:40:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704976841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DprmClRYTEo1I1Y7rysS5Hb4/iKi3YIalqXkduUIPoc=; b=t8SDjgZMKd29yBvYMGJd1g0UkE3HY1Zi+5gm3NpaW8yndQewlVEP/Mukzc4Drjw5jKwN0I ijSEsyZBs7WcHG8slptWygL6tRmh6tf3V/P0Pt5H7KjNOtiaw9qH9lTUOrstMunJFANpRc oLTlCNuhMMwNKdpRKoEOFtTtwwar+Ld5+N8md/RTXl6kQFCy2qsU4SzuNnHqZMeg8rOvcC 0LC3KBoznaFYlqPBL7OCzVaehEoFWyiqXgnRcKtPqtYw/KueXBkuCi4zq0thyjMI/2LuCA oi/dQYYN8v/q9DDSIyOmZtJqnELlgxlJ7c5ZZn7QdzwiIwEbttD0RTO0eSTX4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704976841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DprmClRYTEo1I1Y7rysS5Hb4/iKi3YIalqXkduUIPoc=; b=lCrua9181h0zzldNmoY04WM76g+G1E1sAmylRNCxSWzSWOZS1avTEgQSIh7TKv+lFQbRmo NNN7NgtCtLmw9C49WfQoAe4fnEpHl+v0TDJOVMJC59lvOZFXt7Vv8ZX42/QISVb757ReDl ohv+YR0c+V0Mr88evMPIRIc99+Rs4dFts9r+/zOW5vYww/txIDqGEnURGXWmX9IVhavWG8 7y3e4WjeQ3nJj5GTZO2O+7HD9KZ2zLeImZwa5qUE7zvpcNvPnLqabcDlfZo/N6eg8o128g xZEz8LLroou+oP0J9PFScGUXldGtIVA2QU9CodWC7IuWUckHCHh5jHbluhBJiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704976841; a=rsa-sha256; cv=none; b=vesswibJQb36EEBkEt54kCgZxGkmooU2G4kSl6vxikGqwXOFpBbKiIBx5pBL+cFH7CCsPJ zqcITHVulCKdYaAdXCoeFNtxcJoX77hhc0Q9g99isEieriP+OgF8qoXC7Q00yL0/iGpVPz 80xg6zyxLxloXGSQB49j/cftj0/LUeY8TkY3Uew2zif6LHiKbUGPOOzyoMKBTrirG6yk9S 1l9osyzgTj4Ra6umiuoUJ9C2cV2n6VdjlLe+STEips2yC3hrWx+KzVJpTthKt74JxI3sSl iivKD99wj5GQ9pS0WRWlp0CSuo5bPyzSB0m+noUG2eSRzd5o1zIxvvlYEqxYow== 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 4T9km92KNCzJs9; Thu, 11 Jan 2024 12:40:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40BCef7w028887; Thu, 11 Jan 2024 12:40:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCefgq028884; Thu, 11 Jan 2024 12:40:41 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:40:41 GMT Message-Id: <202401111240.40BCefgq028884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: c9e9bfc22e6d - stable/13 - sctp: use consistent names for locking macros List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c9e9bfc22e6da6969bbb39920a7090a31ee988b5 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=c9e9bfc22e6da6969bbb39920a7090a31ee988b5 commit c9e9bfc22e6da6969bbb39920a7090a31ee988b5 Author: Michael Tuexen AuthorDate: 2023-08-13 20:32:54 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:40:04 +0000 sctp: use consistent names for locking macros While there, add also a macro for an assert. Will be used shortly. No functional change intended. (cherry picked from commit 6cb8b3b5cde18ac5465f1cf1df3fbac359cb09e9) --- sys/netinet/sctp_lock_bsd.h | 9 +++++++-- sys/netinet/sctp_pcb.c | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/netinet/sctp_lock_bsd.h b/sys/netinet/sctp_lock_bsd.h index 1ff5c87a1163..4e9197917a9e 100644 --- a/sys/netinet/sctp_lock_bsd.h +++ b/sys/netinet/sctp_lock_bsd.h @@ -232,12 +232,12 @@ * or cookie secrets we lock the INP level. */ -#define SCTP_INP_READ_INIT(_inp) do { \ +#define SCTP_INP_READ_LOCK_INIT(_inp) do { \ mtx_init(&(_inp)->inp_rdata_mtx, "sctp-read", "inpr", \ MTX_DEF | MTX_DUPOK); \ } while (0) -#define SCTP_INP_READ_DESTROY(_inp) do { \ +#define SCTP_INP_READ_LOCK_DESTROY(_inp) do { \ mtx_destroy(&(_inp)->inp_rdata_mtx); \ } while (0) @@ -249,6 +249,11 @@ mtx_unlock(&(_inp)->inp_rdata_mtx); \ } while (0) +#define SCTP_INP_READ_LOCK_ASSERT(_inp) do { \ + KASSERT(mtx_owned(&(_inp)->inp_rdata_mtx), \ + ("Don't own INP read queue lock")); \ +} while (0) + #define SCTP_INP_LOCK_INIT(_inp) do { \ mtx_init(&(_inp)->inp_mtx, "sctp-inp", "inp", \ MTX_DEF | MTX_DUPOK); \ diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 2cb3f6874df9..15f406eae32d 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -2498,7 +2498,7 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id) SCTP_INP_INFO_WLOCK(); SCTP_INP_LOCK_INIT(inp); INP_LOCK_INIT(&inp->ip_inp.inp, "inp", "sctpinp"); - SCTP_INP_READ_INIT(inp); + SCTP_INP_READ_LOCK_INIT(inp); SCTP_ASOC_CREATE_LOCK_INIT(inp); /* lock the new ep */ SCTP_INP_WLOCK(inp); @@ -3675,7 +3675,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from) crfree(inp->ip_inp.inp.inp_cred); INP_LOCK_DESTROY(&inp->ip_inp.inp); SCTP_INP_LOCK_DESTROY(inp); - SCTP_INP_READ_DESTROY(inp); + SCTP_INP_READ_LOCK_DESTROY(inp); SCTP_ASOC_CREATE_LOCK_DESTROY(inp); SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp); SCTP_DECR_EP_COUNT(); From nobody Thu Jan 11 12:41:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9kn110Wrz55dWn; Thu, 11 Jan 2024 12:41: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 4T9kn10Rrxz46Rc; Thu, 11 Jan 2024 12:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704976885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vKmv9v4iCPYvdHl1QzSy/sONMP+Un45yIlLtzehRqZ4=; b=d9i0p/+siH6ueUO2SGaEOe/9jCTMcDkl+VjdnI9joepsgjByrCuhv9vZjRGXnkcr1Gv2lB 7ivk7Jp2+cSTLfVZLKOhTsAjIyfWSv44sm4ccWDjREwTJAF61ti2BevKHwzUaw+9TCpjJn 16ICSO09kMk8w0CeLZ98SOdkmKKddRfEnxghh74r5AQ1vUADg6c2w1uaYSXTu+2PMUlyKK 7e26a5wvglvBfrZ7d8ss5fEazNKN+BjaFLjURAmUyVC89fOkwT54RN6DQ+byfA+QaTv/Xt jWvvuv+dVSwpjnXB9ax3SC+/Uis5XM7zZ7r2FrojZlk5ETVCLgQjHKlBo1B62w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704976885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vKmv9v4iCPYvdHl1QzSy/sONMP+Un45yIlLtzehRqZ4=; b=dM1F627AspEJaTPzTq76bNhT3RIpagdT3VcNQaRduZpabM1nUdKZRy/K1gjphpTOr6bfhD 9tE33TZC3yBHUu4yVG1Vj+FUDCQ/sUSmpbCBbKmlK8X14/R4AnWUOxeTk4wobhYCHQJyC/ kpdFWn7kLqqgw7fU8DK+8Q5an25L2FIyhatTEUEmQ5bdmn6W6qlHs6k1AbEyiOd5E4Q8vh +OmjGNqfGdJ5TDXMhZfjM9H0KEvxwVajQkdMt1nIvBd/h+AiHUe+IgWt9qKYLxk8ypNuLC E23LRsTeJPr9wmA/M9/aLvaCWpwZ56wRL0PJAGRjA4AEe7F6LbN6iohoeJhxSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704976885; a=rsa-sha256; cv=none; b=m1bMgKyQYj4AV2i4UbiWNyFahSB3xCib9uocRIKQsr8zyJeTZB+5PuXvVPqSnVhRrDBPsi /5vrvGGwXaUxKKqEG3OdzynyrMH5xnPM9l8/MQyjwkMEMZ56Mc9KcEoFBdxw2pPZaPL2LX ZIHQCRsayMLzSQT1eLdblJ5LKykl8z8OkwpBWeaRYUuxJrf8pXhwrDL6Q89adX6TvYq4/X fCutChejGhHRTHdNHXSQIQDm0RvbY+2YDo4xrlRtJMDMi0JwcGLrsS8WobpuO1Q9anHOv+ tJUu3CMFU4LaylAmS4dfZjkOoijQnZOT4JlqqMG1G9+mAVxZkon7CO1H+Bqs/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 4T9kn06c77zJqd; Thu, 11 Jan 2024 12:41: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 40BCfOBQ030922; Thu, 11 Jan 2024 12:41:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCfO3T030919; Thu, 11 Jan 2024 12:41:24 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:41:24 GMT Message-Id: <202401111241.40BCfO3T030919@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: ecfe48f28a40 - stable/13 - sctp: add an assert List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ecfe48f28a40700f4950c2e5bd21ebc49b942bf4 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=ecfe48f28a40700f4950c2e5bd21ebc49b942bf4 commit ecfe48f28a40700f4950c2e5bd21ebc49b942bf4 Author: Michael Tuexen AuthorDate: 2023-08-13 20:47:43 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:40:56 +0000 sctp: add an assert This enforces a condition mentioned in a comment. (cherry picked from commit e8eb0b713426fe9edbf56719351850fa9469286a) --- sys/netinet/sctputil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 72edf4dd66c9..e21fbe041291 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -3636,7 +3636,6 @@ sctp_notify_adaptation_layer(struct sctp_tcb *stcb) &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); } -/* This always must be called with the read-queue LOCKED in the INP */ static void sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error, uint32_t val, int so_locked) @@ -3652,6 +3651,8 @@ sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error, return; } + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); + m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_pdapi_event), 0, M_NOWAIT, 1, MT_DATA); if (m_notify == NULL) /* no space left */ From nobody Thu Jan 11 12:42:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9kpK65Swz55dqX; Thu, 11 Jan 2024 12:42: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 4T9kpK5ff8z46qQ; Thu, 11 Jan 2024 12:42:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704976953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n35+OuVbOYcDwHl9Ps4JdeM8pgVMte7hXqpuZitoerA=; b=DCswbkTA5ySx/aLgJvi1iM8GanCQ3lLycH4cTyFHShEWfNzudoAQCrJdnmrih8D30eOAKc SIVAQOGRsI1BAvxG9bb4HFIR+/bAYTaZDovEtb5zXn/Eh8cbgpSag1YgVlOwvPz91ErrMo wCJ475O6gb7N9wSiUOsyHoayFO2YjDlA1KKW35krHoypqlWeYG6UrmE3aH+xftxkNWiZ5w rJBusMT1GOEWpCMMI4yVXDoBgRACAkDq+9FoDNoRtKVK0gJPIhAT2BxQdpIlfYJDccV3vP w0ySlUHnU8CgUlNUziOkWQ85bqcmwEd6o7I4ZjReXoi6M5rKkm9J+sJB2U189w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704976953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n35+OuVbOYcDwHl9Ps4JdeM8pgVMte7hXqpuZitoerA=; b=X8gXzIhrKW3azEtuNX8JNTDb5cQxn+HmfDpweDPJzO1VqT4SRkAlGLneeADlo2B0KcMMlS 5o2VmyyaCpfNP+Jw6XzGnXT5CT89YViJsPsPd+bXF28vqFRKQFsKgSHHugEM83rFmla4ZT N68ilhHpEVu5pkIycDscQkW4lHPNXBeHxU83/nsSJygy8saKdwnqV4+qIFfnGoE1FnUPRG EdO15aG9mEMcWTGQdLIWosVN7jpwzpfvHvd4JFgv15dZSt95mxt0T4XHPJ+/SDgy9CUvLS fQQa4LQqQYwRk1xLRq19K2DRbw23C24oh8XsddNAalmytLzQGLBKgOW3AhrW9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704976953; a=rsa-sha256; cv=none; b=VusXdW4Eb4vZsSoNedXcycZiSXv2GO4e1wn6iaq8lBOPysfQp4wTMPuAQ3oEO5KGzrkwVF phvnAzwAXfJxKJbYXVV6aRRAQgqr3iVt4Xa3dyDmh0JU+8sk2VTWBQ8pujZzcOO2vLl47U Hx9Raci3oHivK6HHUj5arrNXc1bgWkJ3rCQVAH9rJLq3qYXXM4jchrDLTDaJaoVmqwkg7X 1D+vuoUqANeQ7YeaFfmqTHxOcSiBkzW6lNOogEJuZgYGDndc08Z9G9SPv/1vd4wWXnEcNN Vj4sfEqrqaR+avdw3hmDxb7QUPJmDsIGjSl8WBLxc4XiMXzibicczdgCgd+7sQ== 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 4T9kpK4kZczKC4; Thu, 11 Jan 2024 12:42: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 40BCgX7R034573; Thu, 11 Jan 2024 12:42:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCgXln034570; Thu, 11 Jan 2024 12:42:33 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:42:33 GMT Message-Id: <202401111242.40BCgXln034570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: db083b5e571a - stable/13 - sctp: cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: db083b5e571a1c20044f543b10f31e32eee9a2bf Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=db083b5e571a1c20044f543b10f31e32eee9a2bf commit db083b5e571a1c20044f543b10f31e32eee9a2bf Author: Michael Tuexen AuthorDate: 2023-08-14 10:27:39 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:41:56 +0000 sctp: cleanup Do not put a variable in the stcb for passing it to a function. Just use a parameter of the function. No functional change intended. (cherry picked from commit 749a7fb588c4a872a4f1ce3ee92be86bab1b1f17) --- sys/netinet/sctp_indata.c | 9 ++------- sys/netinet/sctp_pcb.c | 11 +++-------- sys/netinet/sctputil.c | 27 ++++++++++----------------- 3 files changed, 15 insertions(+), 32 deletions(-) diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c index e389cf7826b7..25819af0bdb2 100644 --- a/sys/netinet/sctp_indata.c +++ b/sys/netinet/sctp_indata.c @@ -5489,9 +5489,8 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb, struct sctp_association *asoc; uint32_t new_cum_tsn, gap; unsigned int i, fwd_sz, m_size; - uint32_t str_seq; struct sctp_stream_in *strm; - struct sctp_queued_to_read *control, *ncontrol, *sv; + struct sctp_queued_to_read *control, *ncontrol; asoc = &stcb->asoc; if ((fwd_sz = ntohs(fwd->ch.chunk_length)) < sizeof(struct sctp_forward_tsn_chunk)) { @@ -5672,9 +5671,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb, TAILQ_FOREACH(control, &stcb->sctp_ep->read_queue, next) { if ((control->sinfo_stream == sid) && (SCTP_MID_EQ(asoc->idata_supported, control->mid, mid))) { - str_seq = (sid << 16) | (0x0000ffff & mid); control->pdapi_aborted = 1; - sv = stcb->asoc.control_pdapi; control->end_added = 1; if (control->on_strm_q == SCTP_ON_ORDERED) { TAILQ_REMOVE(&strm->inqueue, control, next_instrm); @@ -5697,13 +5694,11 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb, #endif } control->on_strm_q = 0; - stcb->asoc.control_pdapi = control; sctp_ulp_notify(SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION, stcb, SCTP_PARTIAL_DELIVERY_ABORTED, - (void *)&str_seq, + (void *)control, SCTP_SO_NOT_LOCKED); - stcb->asoc.control_pdapi = sv; break; } else if ((control->sinfo_stream == sid) && SCTP_MID_GT(asoc->idata_supported, control->mid, mid)) { diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 15f406eae32d..282ffebad541 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -4774,20 +4774,15 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre * added right after this * msg. */ - uint32_t strseq; - - stcb->asoc.control_pdapi = sq; - strseq = (sq->sinfo_stream << 16) | (sq->mid & 0x0000ffff); sctp_ulp_notify(SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION, stcb, SCTP_PARTIAL_DELIVERY_ABORTED, - (void *)&strseq, + (void *)sq, SCTP_SO_LOCKED); - stcb->asoc.control_pdapi = NULL; } + /* Add an end to wake them */ + sq->end_added = 1; } - /* Add an end to wake them */ - sq->end_added = 1; } } SCTP_INP_READ_UNLOCK(inp); diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index e21fbe041291..828455207fe2 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -3638,7 +3638,8 @@ sctp_notify_adaptation_layer(struct sctp_tcb *stcb) static void sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error, - uint32_t val, int so_locked) + struct sctp_queued_to_read *aborted_control, + int so_locked) { struct mbuf *m_notify; struct sctp_pdapi_event *pdapi; @@ -3651,6 +3652,7 @@ sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error, return; } + KASSERT(aborted_control != NULL, ("aborted_control is NULL")); SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_pdapi_event), 0, M_NOWAIT, 1, MT_DATA); @@ -3664,8 +3666,8 @@ sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error, pdapi->pdapi_flags = 0; pdapi->pdapi_length = sizeof(struct sctp_pdapi_event); pdapi->pdapi_indication = error; - pdapi->pdapi_stream = (val >> 16); - pdapi->pdapi_seq = (val & 0x0000ffff); + pdapi->pdapi_stream = aborted_control->sinfo_stream; + pdapi->pdapi_seq = (uint16_t)aborted_control->mid; pdapi->pdapi_assoc_id = sctp_get_associd(stcb); SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_pdapi_event); @@ -3691,12 +3693,7 @@ sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error, sctp_sblog(sb, control->do_not_ref_stcb ? NULL : stcb, SCTP_LOG_SBRESULT, 0); } control->end_added = 1; - if (stcb->asoc.control_pdapi) - TAILQ_INSERT_AFTER(&stcb->sctp_ep->read_queue, stcb->asoc.control_pdapi, control, next); - else { - /* we really should not see this case */ - TAILQ_INSERT_TAIL(&stcb->sctp_ep->read_queue, control, next); - } + TAILQ_INSERT_AFTER(&stcb->sctp_ep->read_queue, aborted_control, control, next); if (stcb->sctp_ep && stcb->sctp_socket) { /* This should always be the case */ sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); @@ -4132,14 +4129,10 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, (struct sctp_tmit_chunk *)data, so_locked); break; case SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION: - { - uint32_t val; - - val = *((uint32_t *)data); - - sctp_notify_partial_delivery_indication(stcb, error, val, so_locked); - break; - } + sctp_notify_partial_delivery_indication(stcb, error, + (struct sctp_queued_to_read *)data, + so_locked); + break; case SCTP_NOTIFY_ASSOC_LOC_ABORTED: if ((SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_WAIT) || (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED)) { From nobody Thu Jan 11 12:45:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9ksl6llWz55dhk; Thu, 11 Jan 2024 12:45: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 4T9ksl6Y6Nz47DD; Thu, 11 Jan 2024 12:45:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xca2YSfNAG5AxBVqcwk4QbhOLrt0icyn4WXgIJG/F5E=; b=caP/iEvYnxUTRhyvTuAhulh0O1zV2Tk8dpAFRVdAcuUJUpzIRmEP1THmQS1TpPdyUpY9Z5 AbmvQJMK8JZ0QaSUtxSIFgLrY6EDhLQuc3AmYmw29q1e5mtOiCrW0j4JuEBwxyrpTmlwe1 h7HrCJFF9qM57lMxJXkoJcjne0VCSIvDJ2Qmc09qNBl8GrldCG6TRNklo7a/yUsZetlal9 NtAam8u7ucSDVuW5pCRDxmCNDRjdFYWQLDlcEBPXKt7Gbyo7z0KvPqGhyrrVA5FfnqkHZz 1fyfGYK36JYzkgA24t5/rhltqdX4TTytSuk2Zatzbo5BPR4WjdiTlR2DjRDrsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xca2YSfNAG5AxBVqcwk4QbhOLrt0icyn4WXgIJG/F5E=; b=nUtBecpD0F0Jd1wFZGwXs0JOTAuj/KQ+OGRr3FMQ3jdG5TaD762cJ5RjIDyknEXhTe59fo Ird9z9aDP1/H6hLqTjPjKb1h9Pzr1MAa+HRlwEYGPKvDgg4Zqr9zELhcPXwYJUlrnQDxnf bszEThZH1m22+Lu6G3e70sVkNoIoW206Gr7Z+XY4Sta5bGgFmaKDWVb/68G/lUyCOLyH/k 3fADlZ7PKHYxPieXvagD7ooGrpSxcLoTeV4SNiRN6K9entX8syOX2erHw6axy725jEeK5c CVx8yZ7/a9vhaXc+3N8EgmRDHnsy7qubsynm5PxfrRkK9BYA6TYvGpVt4ieQhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704977131; a=rsa-sha256; cv=none; b=Wqebj+IQrub3GFEJ0f7lfmi6o675d6hkN/N1OBKLcNngxoeMTABIoZSiw5YRpxHYvK4YdX hClmAP7W+wkiWjnbF/YDdYbDDUCWrbJyLOCK463IrBW1RtI2RSTf8/YE0YO0dkDWWUR6wZ 3goeDz+6ezu+A54P9KBChBLaxS/UTR6BuqxaJV+mHLGv6pZuN9CAu9ste+bMPkvs8tns9w hkuFr6PLwEy4sS3LKP9pV2DaUuflDbCotnP9O6h8nnwZcmp2vT/fSd4kNMzLmjmktEx1Jr i3AI5Qk8x5QhOHsoQZDRihSCj/+madq4DhrcaTpdE3UWGUdhGr8D4Jyz+kpW/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 4T9ksl5bRJzKCy; Thu, 11 Jan 2024 12:45: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 40BCjVGH035298; Thu, 11 Jan 2024 12:45:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCjV68035295; Thu, 11 Jan 2024 12:45:31 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:45:31 GMT Message-Id: <202401111245.40BCjV68035295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: bb374dd2c103 - stable/13 - sctp: cleanup cdefs.h include List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bb374dd2c10317ee18a50ff99d3474acb0be74a0 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=bb374dd2c10317ee18a50ff99d3474acb0be74a0 commit bb374dd2c10317ee18a50ff99d3474acb0be74a0 Author: Michael Tuexen AuthorDate: 2023-08-18 13:25:34 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:44:49 +0000 sctp: cleanup cdefs.h include (cherry picked from commit c3179e6660e1365111b89cb6c05c3a4c47375e73) --- sys/netinet/sctp.h | 2 +- sys/netinet/sctp_asconf.c | 1 - sys/netinet/sctp_asconf.h | 1 - sys/netinet/sctp_auth.c | 1 - sys/netinet/sctp_auth.h | 1 - sys/netinet/sctp_bsd_addr.c | 1 - sys/netinet/sctp_bsd_addr.h | 1 - sys/netinet/sctp_cc_functions.c | 1 - sys/netinet/sctp_constants.h | 1 - sys/netinet/sctp_crc32.h | 1 - sys/netinet/sctp_header.h | 1 - sys/netinet/sctp_indata.c | 1 - sys/netinet/sctp_indata.h | 1 - sys/netinet/sctp_input.c | 1 - sys/netinet/sctp_input.h | 1 - sys/netinet/sctp_kdtrace.h | 1 - sys/netinet/sctp_lock_bsd.h | 1 - sys/netinet/sctp_os.h | 1 - sys/netinet/sctp_os_bsd.h | 6 ++---- sys/netinet/sctp_output.c | 1 - sys/netinet/sctp_output.h | 1 - sys/netinet/sctp_pcb.c | 1 - sys/netinet/sctp_pcb.h | 1 - sys/netinet/sctp_peeloff.c | 1 - sys/netinet/sctp_peeloff.h | 1 - sys/netinet/sctp_ss_functions.c | 2 +- sys/netinet/sctp_structs.h | 1 - sys/netinet/sctp_sysctl.c | 1 - sys/netinet/sctp_sysctl.h | 1 - sys/netinet/sctp_timer.c | 1 - sys/netinet/sctp_timer.h | 1 - sys/netinet/sctp_uio.h | 1 - sys/netinet/sctp_usrreq.c | 1 - sys/netinet/sctp_var.h | 1 - sys/netinet/sctputil.c | 1 - sys/netinet/sctputil.h | 1 - sys/netinet6/sctp6_usrreq.c | 1 - sys/netinet6/sctp6_var.h | 1 - 38 files changed, 4 insertions(+), 41 deletions(-) diff --git a/sys/netinet/sctp.h b/sys/netinet/sctp.h index e7c584707da2..0a52944473c2 100644 --- a/sys/netinet/sctp.h +++ b/sys/netinet/sctp.h @@ -32,10 +32,10 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_H_ #define _NETINET_SCTP_H_ +#include #include #define SCTP_PACKED __attribute__((packed)) diff --git a/sys/netinet/sctp_asconf.c b/sys/netinet/sctp_asconf.c index 436638e594c7..3a30b0ba3740 100644 --- a/sys/netinet/sctp_asconf.c +++ b/sys/netinet/sctp_asconf.c @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include diff --git a/sys/netinet/sctp_asconf.h b/sys/netinet/sctp_asconf.h index 4d04e8466d75..ab24ea1683bf 100644 --- a/sys/netinet/sctp_asconf.h +++ b/sys/netinet/sctp_asconf.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_ASCONF_H_ #define _NETINET_SCTP_ASCONF_H_ diff --git a/sys/netinet/sctp_auth.c b/sys/netinet/sctp_auth.c index a1d25a588daa..67f0d26fa0d5 100644 --- a/sys/netinet/sctp_auth.c +++ b/sys/netinet/sctp_auth.c @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include diff --git a/sys/netinet/sctp_auth.h b/sys/netinet/sctp_auth.h index 45deaabf4059..8bfdbaa6d4f6 100644 --- a/sys/netinet/sctp_auth.h +++ b/sys/netinet/sctp_auth.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_AUTH_H_ #define _NETINET_SCTP_AUTH_H_ diff --git a/sys/netinet/sctp_bsd_addr.c b/sys/netinet/sctp_bsd_addr.c index 74f8ab244bb9..83ff0e1e3cc6 100644 --- a/sys/netinet/sctp_bsd_addr.c +++ b/sys/netinet/sctp_bsd_addr.c @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include diff --git a/sys/netinet/sctp_bsd_addr.h b/sys/netinet/sctp_bsd_addr.h index 8100ba5225ee..5c66db8a7fcb 100644 --- a/sys/netinet/sctp_bsd_addr.h +++ b/sys/netinet/sctp_bsd_addr.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_BSD_ADDR_H_ #define _NETINET_SCTP_BSD_ADDR_H_ diff --git a/sys/netinet/sctp_cc_functions.c b/sys/netinet/sctp_cc_functions.c index 128acff404e3..1f96f88a61dd 100644 --- a/sys/netinet/sctp_cc_functions.c +++ b/sys/netinet/sctp_cc_functions.c @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include diff --git a/sys/netinet/sctp_constants.h b/sys/netinet/sctp_constants.h index a1490a515d14..05e804100aa2 100644 --- a/sys/netinet/sctp_constants.h +++ b/sys/netinet/sctp_constants.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_CONSTANTS_H_ #define _NETINET_SCTP_CONSTANTS_H_ diff --git a/sys/netinet/sctp_crc32.h b/sys/netinet/sctp_crc32.h index 48a7d3269da5..a8c901249fcb 100644 --- a/sys/netinet/sctp_crc32.h +++ b/sys/netinet/sctp_crc32.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_CRC32_H_ #define _NETINET_SCTP_CRC32_H_ diff --git a/sys/netinet/sctp_header.h b/sys/netinet/sctp_header.h index 49a2dcc40ae9..811cb8bab158 100644 --- a/sys/netinet/sctp_header.h +++ b/sys/netinet/sctp_header.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_HEADER_H_ #define _NETINET_SCTP_HEADER_H_ diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c index 25819af0bdb2..f7f0e3fdfe7f 100644 --- a/sys/netinet/sctp_indata.c +++ b/sys/netinet/sctp_indata.c @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include diff --git a/sys/netinet/sctp_indata.h b/sys/netinet/sctp_indata.h index 9b2721c6adce..061b65c90bd4 100644 --- a/sys/netinet/sctp_indata.h +++ b/sys/netinet/sctp_indata.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_INDATA_H_ #define _NETINET_SCTP_INDATA_H_ diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 21fe684efad0..fa0b9f4894ea 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include diff --git a/sys/netinet/sctp_input.h b/sys/netinet/sctp_input.h index b2ea94ef067e..cd736166ac7e 100644 --- a/sys/netinet/sctp_input.h +++ b/sys/netinet/sctp_input.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_INPUT_H_ #define _NETINET_SCTP_INPUT_H_ diff --git a/sys/netinet/sctp_kdtrace.h b/sys/netinet/sctp_kdtrace.h index b86a689802b3..0f9b6a9e3826 100644 --- a/sys/netinet/sctp_kdtrace.h +++ b/sys/netinet/sctp_kdtrace.h @@ -31,7 +31,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_KDTRACE_H_ #define _NETINET_SCTP_KDTRACE_H_ diff --git a/sys/netinet/sctp_lock_bsd.h b/sys/netinet/sctp_lock_bsd.h index 4e9197917a9e..ec66be0cf371 100644 --- a/sys/netinet/sctp_lock_bsd.h +++ b/sys/netinet/sctp_lock_bsd.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_LOCK_BSD_H_ #define _NETINET_SCTP_LOCK_BSD_H_ diff --git a/sys/netinet/sctp_os.h b/sys/netinet/sctp_os.h index 48ce05239402..42f000dc8d55 100644 --- a/sys/netinet/sctp_os.h +++ b/sys/netinet/sctp_os.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_OS_H_ #define _NETINET_SCTP_OS_H_ diff --git a/sys/netinet/sctp_os_bsd.h b/sys/netinet/sctp_os_bsd.h index 01ab8f2823b8..250feb334bdf 100644 --- a/sys/netinet/sctp_os_bsd.h +++ b/sys/netinet/sctp_os_bsd.h @@ -32,12 +32,10 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_OS_BSD_H_ #define _NETINET_SCTP_OS_BSD_H_ -/* - * includes - */ + +#include #include "opt_inet6.h" #include "opt_inet.h" #include "opt_sctp.h" diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 56de9cb860c6..7626e4ec066c 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include diff --git a/sys/netinet/sctp_output.h b/sys/netinet/sctp_output.h index d522812c59db..1a1d17221b02 100644 --- a/sys/netinet/sctp_output.h +++ b/sys/netinet/sctp_output.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_OUTPUT_H_ #define _NETINET_SCTP_OUTPUT_H_ diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 282ffebad541..59686f9ff3f9 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h index 7d3656ed6dfd..ca51f519a24d 100644 --- a/sys/netinet/sctp_pcb.h +++ b/sys/netinet/sctp_pcb.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_PCB_H_ #define _NETINET_SCTP_PCB_H_ diff --git a/sys/netinet/sctp_peeloff.c b/sys/netinet/sctp_peeloff.c index ff92bd4d5d88..b122ab50e74e 100644 --- a/sys/netinet/sctp_peeloff.c +++ b/sys/netinet/sctp_peeloff.c @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include diff --git a/sys/netinet/sctp_peeloff.h b/sys/netinet/sctp_peeloff.h index 8be10d00e5de..675369af0fa8 100644 --- a/sys/netinet/sctp_peeloff.h +++ b/sys/netinet/sctp_peeloff.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_PEELOFF_H_ #define _NETINET_SCTP_PEELOFF_H_ #if defined(_KERNEL) diff --git a/sys/netinet/sctp_ss_functions.c b/sys/netinet/sctp_ss_functions.c index 896a55c6fbc5..1d7b16a6b482 100644 --- a/sys/netinet/sctp_ss_functions.c +++ b/sys/netinet/sctp_ss_functions.c @@ -28,7 +28,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include #include /* diff --git a/sys/netinet/sctp_structs.h b/sys/netinet/sctp_structs.h index 81a0645fa528..fb7deafa9ea3 100644 --- a/sys/netinet/sctp_structs.h +++ b/sys/netinet/sctp_structs.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_STRUCTS_H_ #define _NETINET_SCTP_STRUCTS_H_ diff --git a/sys/netinet/sctp_sysctl.c b/sys/netinet/sctp_sysctl.c index 88d16f71ef3c..fa93deba8b53 100644 --- a/sys/netinet/sctp_sysctl.c +++ b/sys/netinet/sctp_sysctl.c @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include diff --git a/sys/netinet/sctp_sysctl.h b/sys/netinet/sctp_sysctl.h index ba0d18111df6..2eeddd42f7a2 100644 --- a/sys/netinet/sctp_sysctl.h +++ b/sys/netinet/sctp_sysctl.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_SYSCTL_H_ #define _NETINET_SCTP_SYSCTL_H_ diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c index 3cf3baec7ad3..ef5eb8b89a5d 100644 --- a/sys/netinet/sctp_timer.c +++ b/sys/netinet/sctp_timer.c @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #define _IP_VHL #include #include diff --git a/sys/netinet/sctp_timer.h b/sys/netinet/sctp_timer.h index 846e99fc59e2..f6f99d903d9f 100644 --- a/sys/netinet/sctp_timer.h +++ b/sys/netinet/sctp_timer.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_TIMER_H_ #define _NETINET_SCTP_TIMER_H_ diff --git a/sys/netinet/sctp_uio.h b/sys/netinet/sctp_uio.h index 40fda91d84ae..09af1b59fcae 100644 --- a/sys/netinet/sctp_uio.h +++ b/sys/netinet/sctp_uio.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_UIO_H_ #define _NETINET_SCTP_UIO_H_ diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index b28bfc66af8d..a7af1da8624a 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include diff --git a/sys/netinet/sctp_var.h b/sys/netinet/sctp_var.h index 0177dd5ac227..c1c34e542ef2 100644 --- a/sys/netinet/sctp_var.h +++ b/sys/netinet/sctp_var.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_VAR_H_ #define _NETINET_SCTP_VAR_H_ diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 828455207fe2..380aee5f671d 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include #include diff --git a/sys/netinet/sctputil.h b/sys/netinet/sctputil.h index f0f6d6bccfc7..c649611d5004 100644 --- a/sys/netinet/sctputil.h +++ b/sys/netinet/sctputil.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET_SCTP_UTIL_H_ #define _NETINET_SCTP_UTIL_H_ diff --git a/sys/netinet6/sctp6_usrreq.c b/sys/netinet6/sctp6_usrreq.c index dca38401c02b..82829d3ba8c5 100644 --- a/sys/netinet6/sctp6_usrreq.c +++ b/sys/netinet6/sctp6_usrreq.c @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #ifdef INET6 #include diff --git a/sys/netinet6/sctp6_var.h b/sys/netinet6/sctp6_var.h index 08f0e37c1e5d..1ba1dcb54452 100644 --- a/sys/netinet6/sctp6_var.h +++ b/sys/netinet6/sctp6_var.h @@ -32,7 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifndef _NETINET6_SCTP6_VAR_H_ #define _NETINET6_SCTP6_VAR_H_ From nobody Thu Jan 11 12:46:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9ktw47Sxz55fFC; Thu, 11 Jan 2024 12:46: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 4T9ktw3XnPz47YN; Thu, 11 Jan 2024 12:46:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CsBwVvCL0ntbfMbT0XUgUuY7b86xB8O/N9aOjIx/4f0=; b=iFqtVZhdpXql6ZliPLztkSvUxaux6hmETL2Ak+sec4mFSrYZf0kcjtqzck4cKSwlsTvteI rOIRtm9M1CwfvfmtfmjywXOJ5RAdAsz1MaQFaH2O0kiCj2hzvu/NFLV2mAG70nTQAWslSU jxuQ+L3z7wzG8nrR2SoT/m6VItCIkApw+7lD+XeSmaDbaAwn3pbYgIBYEbBL59ipD+Fils psTvGHtFUaoDZQ5t4jIVkefHoyIS/3x/+WLtRIc25MdtehRAwqbEmz1z//kcci2zEWzbjv Boeul4xUWU97CFAOlgMkx8s8ySEIRKcYNaPBF7Q1nB+0EORG7eJnNjP4Fm9z9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CsBwVvCL0ntbfMbT0XUgUuY7b86xB8O/N9aOjIx/4f0=; b=ShJ0GI4eEzMVtyantBfUxSdaMNY+g8LQ13H115AlBv5hrJqN+78r1ya7fWJglSZ4Z0OWOX c5hPkSpxwb5ZoARqukNQwCivq7aGiADjiDxV/zYZ0e9N+DFWOENqCKhQBjs4STu1Syl1Q3 lli0dsfCG6HwVAuo8yJSeYQfVpUygJsXKhhqDsiV2yb+vk5jNZrvXmyBYqQNYAgyon1RX7 Iw+UzaX+XYpEdqb3ppKJFqJ282nRKNpBoIO0otWeZoj4HCnt8zYSFmzkyhYfDSICEfGhyS VmqpAzbgPO52QMC7q4wVCkmP38yLuT+2TGeqwSojaCw/m1tEGZWkn+xNHzNBhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704977192; a=rsa-sha256; cv=none; b=pueUsE5H1gFoM/kY/r0YV4yKyEN2nnQhBmIjD/hme8y78NbvXsEeWAMv9H3asXUnBvATfQ n8eS1gNgJw6SWmbojvgFAsLstJlvEG/31sRio3xdM5WCBlgS6md1xQVe9wwUPAzcxYr5fC wbKnCNmpN6S0OhhFF9jIjfqLP+pCw+BZhICR5FzIe4/wY202HD9y0h68AbLrgCoHs3O6oA y1Up+oNqvx0RbtV0KkBSTw2SkrK3bzgXsQjZaX2DLcdf71drVjnpPr3D3+ELAL89bcKwj0 HirSizVfkF+3wxhCSX5EblQg5ElwZgPwxqU7RRTlFaEC3RXObiS6FVTHMgyVMA== 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 4T9ktw2b5szKGG; Thu, 11 Jan 2024 12:46: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 40BCkWsR035563; Thu, 11 Jan 2024 12:46:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCkWBa035560; Thu, 11 Jan 2024 12:46:32 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:46:32 GMT Message-Id: <202401111246.40BCkWBa035560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 3ec4836e4a1b - stable/13 - sctp: cleanup handling of graceful shutdown of the peer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3ec4836e4a1bfcb1d740dddf20b3c7ec8676913c Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=3ec4836e4a1bfcb1d740dddf20b3c7ec8676913c commit 3ec4836e4a1bfcb1d740dddf20b3c7ec8676913c Author: Michael Tuexen AuthorDate: 2023-08-19 10:35:49 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:46:05 +0000 sctp: cleanup handling of graceful shutdown of the peer Don't handle a graceful shutdown of the peer as an implicit signal that all partial messages are complete. First, this is not implemented correctly and second this should not be done by the peer. It is more appropriate to handle this as a protocol violation. Remove the incorrect code and leave detecting the protocol violation and its handling in a followup commit. (cherry picked from commit 4f14d4b6b7f0ca49b14379e48117121af3ed2669) --- sys/netinet/sctp_input.c | 63 +++++++++++----------------------------------- sys/netinet/sctp_pcb.c | 11 +------- sys/netinet/sctp_structs.h | 9 ------- 3 files changed, 16 insertions(+), 67 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index fa0b9f4894ea..f9e49b7b4f62 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -837,8 +837,7 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, int some_on_streamwheel; int old_state; - SCTPDBG(SCTP_DEBUG_INPUT2, - "sctp_handle_shutdown: handling SHUTDOWN\n"); + SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_shutdown: handling SHUTDOWN\n"); if (stcb == NULL) return; asoc = &stcb->asoc; @@ -855,40 +854,12 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, if (*abort_flag) { return; } - if (asoc->control_pdapi) { - /* - * With a normal shutdown we assume the end of last record. - */ - SCTP_INP_READ_LOCK(stcb->sctp_ep); - if (asoc->control_pdapi->on_strm_q) { - struct sctp_stream_in *strm; - - strm = &asoc->strmin[asoc->control_pdapi->sinfo_stream]; - if (asoc->control_pdapi->on_strm_q == SCTP_ON_UNORDERED) { - /* Unordered */ - TAILQ_REMOVE(&strm->uno_inqueue, asoc->control_pdapi, next_instrm); - asoc->control_pdapi->on_strm_q = 0; - } else if (asoc->control_pdapi->on_strm_q == SCTP_ON_ORDERED) { - /* Ordered */ - TAILQ_REMOVE(&strm->inqueue, asoc->control_pdapi, next_instrm); - asoc->control_pdapi->on_strm_q = 0; -#ifdef INVARIANTS - } else { - panic("Unknown state on ctrl:%p on_strm_q:%d", - asoc->control_pdapi, - asoc->control_pdapi->on_strm_q); -#endif - } - } - asoc->control_pdapi->end_added = 1; - asoc->control_pdapi->pdapi_aborted = 1; - asoc->control_pdapi = NULL; - SCTP_INP_READ_UNLOCK(stcb->sctp_ep); - if (stcb->sctp_socket) { - sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); - } - } - /* goto SHUTDOWN_RECEIVED state to block new requests */ + /* + * FIXME MT: Handle the case where there are still incomplete + * received user messages or known missing user messages from the + * peer. One way to handle this is to abort the associations in this + * case. + */ if (stcb->sctp_socket) { if ((SCTP_GET_STATE(stcb) != SCTP_STATE_SHUTDOWN_RECEIVED) && (SCTP_GET_STATE(stcb) != SCTP_STATE_SHUTDOWN_ACK_SENT) && @@ -949,8 +920,9 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp SCTP_UNUSED, SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_shutdown_ack: handling SHUTDOWN ACK\n"); - if (stcb == NULL) + if (stcb == NULL) { return; + } asoc = &stcb->asoc; /* process according to association state */ @@ -967,17 +939,12 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp SCTP_UNUSED, SCTP_TCB_UNLOCK(stcb); return; } - if (asoc->control_pdapi) { - /* - * With a normal shutdown we assume the end of last record. - */ - SCTP_INP_READ_LOCK(stcb->sctp_ep); - asoc->control_pdapi->end_added = 1; - asoc->control_pdapi->pdapi_aborted = 1; - asoc->control_pdapi = NULL; - SCTP_INP_READ_UNLOCK(stcb->sctp_ep); - sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); - } + /* + * FIXME MT: Handle the case where there are still incomplete + * received user messages or known missing user messages from the + * peer. One way to handle this is to abort the associations in this + * case. + */ #ifdef INVARIANTS if (!TAILQ_EMPTY(&asoc->send_queue) || !TAILQ_EMPTY(&asoc->sent_queue) || diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 59686f9ff3f9..3435377e1064 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -3404,7 +3404,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from) continue; } if ((stcb->asoc.size_on_reasm_queue > 0) || - (stcb->asoc.control_pdapi) || (stcb->asoc.size_on_all_streams > 0) || ((so != NULL) && (SCTP_SBAVAIL(&so->so_rcv) > 0))) { /* Left with Data unread */ @@ -4761,18 +4760,10 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre * now. */ if (sq->end_added == 0) { - /* Held for PD-API clear that. */ + /* Held for PD-API, clear that. */ sq->pdapi_aborted = 1; sq->held_length = 0; if (sctp_stcb_is_feature_on(inp, stcb, SCTP_PCB_FLAGS_PDAPIEVNT) && (so != NULL)) { - /* - * Need to add a PD-API - * aborted indication. - * Setting the control_pdapi - * assures that it will be - * added right after this - * msg. - */ sctp_ulp_notify(SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION, stcb, SCTP_PARTIAL_DELIVERY_ABORTED, diff --git a/sys/netinet/sctp_structs.h b/sys/netinet/sctp_structs.h index fb7deafa9ea3..1d3a3ef72728 100644 --- a/sys/netinet/sctp_structs.h +++ b/sys/netinet/sctp_structs.h @@ -956,15 +956,6 @@ struct sctp_association { uint32_t fast_recovery_tsn; uint32_t sat_t3_recovery_tsn; uint32_t tsn_last_delivered; - /* - * For the pd-api we should re-write this a bit more efficient. We - * could have multiple sctp_queued_to_read's that we are building at - * once. Now we only do this when we get ready to deliver to the - * socket buffer. Note that we depend on the fact that the struct is - * "stuck" on the read queue until we finish all the pd-api. - */ - struct sctp_queued_to_read *control_pdapi; - uint32_t tsn_of_pdapi_last_delivered; uint32_t pdapi_ppid; uint32_t context; From nobody Thu Jan 11 12:47:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9kvh2fhPz55fQh; Thu, 11 Jan 2024 12:47: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 4T9kvh20KYz47gf; Thu, 11 Jan 2024 12:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ggsvgIzYXm/6fv8vev2sDKtqYUCqn8f08frm1A/Xnb4=; b=Z4GkyB1oI5Bk/KJIuKjnF/WJ1AnYS6a2GgGn5e3BrwMryrxVeC+lWt3/n4nOYUA3+fEu0M Los7h/6m4McCRJEg23hupT6pvhlqDF/x2cgDdGVceoP5G4MVQds02UblO3KSk0Bhq6TtYp sbr2Qfa7FiRzezdh08AbJUxTl4fUJCrqfirUm5DzX96hNzWEC/ErTA+pK+CLth9VqAU5Av WU/iqTcv+9Llv3520m1LN0Fc/G6lQEOmHv3VD2Mp3z1gTuJMssMLy0k+1vplI9J4jw8M9B IL6fUllD+e2WUOcVlmG+Xj/GOQL83HA+9pElw7w07l6ZcHrrDRdihOPVIpDC0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ggsvgIzYXm/6fv8vev2sDKtqYUCqn8f08frm1A/Xnb4=; b=SFxqy5YZFSbg9sRyc7yQheGU8UBa+rqCRFDH9QHX5j5+pTnNF35ehqg+J2kMU+3/y7Vkkc AGi0VvaCvYC0EFGKWQjrTuAvj8YmtfmGV6cOPudYfxYEpgoCtmelrjLxK5UJxq1PNjrsWv jJqTiW0tC8u+5ySMN5YVxf/o+LKgPnHNGt2ZhxJnh/obLzjgwV/L5KUkgRzFfEoYowbBBl 4i3Ch2Iqnwfz+hZVxFJicfm+yhFC99NkAZHACmlSlEJHltRadqOl/AkalEgbts2jDFPc1x xb/JImKdGWaOmES21aTZ4FwzIlH7Ua+VQk0ZV00yujRboVeyB4gDsZYEAwyKqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704977232; a=rsa-sha256; cv=none; b=EjFuFpfXhFicCxn5nbivyWhJEqR8Z8RMvOg3IG/YSQ1LrNlVnBBUSy57sktr+limMtITsS 7wih+7wFFbGkQrRCAvLSD6xjw3W3fbIbHZGcQnexefYuO970nGhLbZux9fu+oucG9DU6Xb DEYsF7TrXqXmq0BCShynhECB0nTmr9vh4l9/bPGvvSuc8zly1YfBcLoZLiwfsHv/aZUsIN 1LfKISDR7ahFKofqBaNucSQz5a7QEfOO0M4eP/g4F3V7Rn8IUgTVmyb1KJPG32jEjgHW7e IRa35E8L9f66Ru+kEhiuigXfhbGZd8ochaY3qHwtAViTt6PDXeaD0AzmMhNcxA== 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 4T9kvh0mlNzJqn; Thu, 11 Jan 2024 12:47: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 40BClC9Z035776; Thu, 11 Jan 2024 12:47:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BClCvZ035773; Thu, 11 Jan 2024 12:47:12 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:47:12 GMT Message-Id: <202401111247.40BClCvZ035773@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: eb62bba325f3 - stable/13 - sctp: fix a warning List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: eb62bba325f31384a6ae193c655dc1f5ca43f2c7 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=eb62bba325f31384a6ae193c655dc1f5ca43f2c7 commit eb62bba325f31384a6ae193c655dc1f5ca43f2c7 Author: Michael Tuexen AuthorDate: 2023-08-19 11:24:02 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:46:47 +0000 sctp: fix a warning Fix an unused-but-set-variable warning for builds without INVARIANTS. Reported by: O. Hartmann (cherry picked from commit 1095da75032b439d893c0947eda2f3738ecfe494) --- sys/netinet/sctp_input.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index f9e49b7b4f62..f93b066f051f 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -833,14 +833,12 @@ static void sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, struct sctp_tcb *stcb, struct sctp_nets *net, int *abort_flag) { - struct sctp_association *asoc; int some_on_streamwheel; int old_state; SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_shutdown: handling SHUTDOWN\n"); if (stcb == NULL) return; - asoc = &stcb->asoc; if ((SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_WAIT) || (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED)) { return; @@ -872,7 +870,7 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, sctp_ulp_notify(SCTP_NOTIFY_PEER_SHUTDOWN, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); /* reset time */ - (void)SCTP_GETTIME_TIMEVAL(&asoc->time_entered); + (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered); } } if (SCTP_GET_STATE(stcb) == SCTP_STATE_SHUTDOWN_SENT) { @@ -886,8 +884,8 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, /* Now is there unsent data on a stream somewhere? */ some_on_streamwheel = sctp_is_there_unsent_data(stcb, SCTP_SO_NOT_LOCKED); - if (!TAILQ_EMPTY(&asoc->send_queue) || - !TAILQ_EMPTY(&asoc->sent_queue) || + if (!TAILQ_EMPTY(&stcb->asoc.send_queue) || + !TAILQ_EMPTY(&stcb->asoc.sent_queue) || some_on_streamwheel) { /* By returning we will push more data out */ return; @@ -916,15 +914,12 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp SCTP_UNUSED, struct sctp_tcb *stcb, struct sctp_nets *net) { - struct sctp_association *asoc; - SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_shutdown_ack: handling SHUTDOWN ACK\n"); if (stcb == NULL) { return; } - asoc = &stcb->asoc; /* process according to association state */ if ((SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_WAIT) || (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED)) { @@ -946,8 +941,8 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp SCTP_UNUSED, * case. */ #ifdef INVARIANTS - if (!TAILQ_EMPTY(&asoc->send_queue) || - !TAILQ_EMPTY(&asoc->sent_queue) || + if (!TAILQ_EMPTY(&stcb->asoc.send_queue) || + !TAILQ_EMPTY(&stcb->asoc.sent_queue) || sctp_is_there_unsent_data(stcb, SCTP_SO_NOT_LOCKED)) { panic("Queues are not empty when handling SHUTDOWN-ACK"); } From nobody Thu Jan 11 12:48:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9kwj5SXyz55fWZ; Thu, 11 Jan 2024 12:48: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 4T9kwj4bwnz48Kq; Thu, 11 Jan 2024 12:48:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cU11Y6piQJHR6XxxecsXMqpD4E3Oh0xCG4qUySAZKgU=; b=BIJ3/CMtcrDKQUwl0fDFcYGuHL0gqvg80X9AdMTMb7uDH3ZQP8mjVvFKGS1cdveg5W0/HT 8zk7d8fFAbJo1GbTf5Nfak5J3K5AXgWNE6dNMcjfBA+UDtGq4VeaMCJEtx9+hZeRViL/lb aIvxJHnQb5KJ1r28E31S+j7lL/FQZwKGPvWiugev5TQuspzhfKhPNYJEUCuDGGmj6gZIS5 LIDhz9sUYayFCMtxDK+CfOYDdwkpqnUlc4U76FK6C/6hX5Dkh3bm608ghQ80ToXzdVu1Tk DWqT7uFDgNyKjRQXNItSdngRTCUlsec5rkHMp/wMvIwvgTQAu1Xcktmqvu9FXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cU11Y6piQJHR6XxxecsXMqpD4E3Oh0xCG4qUySAZKgU=; b=XmcjoaPermjUzU00gXZEOHHXelvnH8zL7xSmFIy+TxySaei1koUrRRkxiiiENSrQ3qVy5f l+Q1iSYUtrZTpOOAzvoErEHNv8cFVB/UI9aqNIhJL0FS5VmnqOyKtHXOSZgIoRb6McPJBw ariIhYNcqVnZenbTIhzwg3frQM8AZ56fQJ53qPumQ6n4AocAYBh4XvOgvaDDzue5gTso5T DakUpf8QxISSYjA9+EnqKHaFUvGN7YDhSY4sXfU6oqfGROG6vZfnagk1WGOXoxWBbgwfuL KAEUCbSER4Anpguln/4tN2P6FF9uTsOh3kY/NJGxTvNPKKyqgwiWmO8crUHtsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704977285; a=rsa-sha256; cv=none; b=mzrkZrXyKl622tWZSmSPd4dGDNOD+CF8IFZ9i97IedeY9B8U/RtNIH9Z0qNS84pIvg2CrA GFMriymnT207uTuHj3PcyrFGDkBZUfO3FLr/KOlWEt1jLFS7k8dEillwik6AvShN83GtqJ D/80gcl9al5oC8TALfTwr/KKwRLIlZkJWiRY3sD6XIovX5DG0Zxs8RtUaxa9L/q2ijhDGj bFJpyF/BW5QlEyxamYf4ROSbN7GQRmkIYcybWAOL9azoMM7EJi4SUAUf8fCihbBbblmNMo mibMO+D3ukrR9AAuxxX3mxq9Bkq8/wzHbczPR/cMpGmrCyxr6b2UCmiUPN5uhw== 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 4T9kwj3fZgzJqq; Thu, 11 Jan 2024 12:48: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 40BCm58A036180; Thu, 11 Jan 2024 12:48:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCm5TD036177; Thu, 11 Jan 2024 12:48:05 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:48:05 GMT Message-Id: <202401111248.40BCm5TD036177@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: f91f135e1546 - stable/13 - sctp: improve handling of SHUTDOWN and SHUTDOWN ACK chunks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f91f135e15463f0ac094a60e2ca02f1079e64997 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f91f135e15463f0ac094a60e2ca02f1079e64997 commit f91f135e15463f0ac094a60e2ca02f1079e64997 Author: Michael Tuexen AuthorDate: 2023-08-23 06:36:15 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:47:34 +0000 sctp: improve handling of SHUTDOWN and SHUTDOWN ACK chunks When handling a SHUTDOWN or SHUTDOWN ACK chunk detect if the peer is violating the protocol by not having made sure all user messages are reveived by the peer. If this situation is detected, abort the association. (cherry picked from commit d18c845f99cbd2d3c0e70b3b9b09d80c655b6fb6) --- sys/netinet/sctp_input.c | 54 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index f93b066f051f..5d2a3dd26384 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -829,6 +829,38 @@ sctp_start_net_timers(struct sctp_tcb *stcb) } } +static void +sctp_check_data_from_peer(struct sctp_tcb *stcb, int *abort_flag) +{ + char msg[SCTP_DIAG_INFO_LEN]; + struct sctp_association *asoc; + struct mbuf *op_err; + unsigned int i; + + *abort_flag = 0; + asoc = &stcb->asoc; + if (SCTP_TSN_GT(asoc->highest_tsn_inside_map, asoc->cumulative_tsn) || + SCTP_TSN_GT(asoc->highest_tsn_inside_nr_map, asoc->cumulative_tsn)) { + SCTP_SNPRINTF(msg, sizeof(msg), "Missing TSN"); + *abort_flag = 1; + } + if (!*abort_flag) { + for (i = 0; i < asoc->streamincnt; i++) { + if (!TAILQ_EMPTY(&asoc->strmin[i].inqueue) || + !TAILQ_EMPTY(&asoc->strmin[i].uno_inqueue)) { + SCTP_SNPRINTF(msg, sizeof(msg), "Missing user data"); + *abort_flag = 1; + break; + } + } + } + if (*abort_flag) { + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INPUT + SCTP_LOC_9; + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, false, SCTP_SO_NOT_LOCKED); + } +} + static void sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, struct sctp_tcb *stcb, struct sctp_nets *net, int *abort_flag) @@ -852,12 +884,10 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, if (*abort_flag) { return; } - /* - * FIXME MT: Handle the case where there are still incomplete - * received user messages or known missing user messages from the - * peer. One way to handle this is to abort the associations in this - * case. - */ + sctp_check_data_from_peer(stcb, abort_flag); + if (*abort_flag) { + return; + } if (stcb->sctp_socket) { if ((SCTP_GET_STATE(stcb) != SCTP_STATE_SHUTDOWN_RECEIVED) && (SCTP_GET_STATE(stcb) != SCTP_STATE_SHUTDOWN_ACK_SENT) && @@ -914,6 +944,8 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp SCTP_UNUSED, struct sctp_tcb *stcb, struct sctp_nets *net) { + int abort_flag; + SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_shutdown_ack: handling SHUTDOWN ACK\n"); if (stcb == NULL) { @@ -934,12 +966,10 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp SCTP_UNUSED, SCTP_TCB_UNLOCK(stcb); return; } - /* - * FIXME MT: Handle the case where there are still incomplete - * received user messages or known missing user messages from the - * peer. One way to handle this is to abort the associations in this - * case. - */ + sctp_check_data_from_peer(stcb, &abort_flag); + if (abort_flag) { + return; + } #ifdef INVARIANTS if (!TAILQ_EMPTY(&stcb->asoc.send_queue) || !TAILQ_EMPTY(&stcb->asoc.sent_queue) || From nobody Thu Jan 11 12:49:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9kyC2PnTz55fNP; Thu, 11 Jan 2024 12:49:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9kyC0R6jz49Ms; Thu, 11 Jan 2024 12:49:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1AJXN17PJo2uRh49Bq2bmDxdwafoysfPrZd8fsUvQh4=; b=ZPs9jcnXpJyTr59Ri2eONzUwOly6kqYkzVzb4nF4bs1PNOuY08UJBBtEQ663lcMkTrBwL3 j7jYGVT3X0Y9l6LSNC3O/Wcwd2hvy4xjV9pbnQMvzxDLDSQTEykoWWxPBFp2qQwzerJLhM p6Xb3bSJEQRrWtzaQWY0PSDfvsZSWgcw8MwMZNAJVAOvZ3Fk+BgAcB7Qz6l5CSBfNwwCy1 JMLbKfdPMopfaGCpu//Cq1h/mFKJ/E2y9MV47GTvrDDJeYy9OFYPaoAbzkH6aiEqylGSii 1Lc6nl92oh+S9nBGLfrZCViv3derYRJcHBGiu168MwRykDf1EXIbN2Ru6O5U0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1AJXN17PJo2uRh49Bq2bmDxdwafoysfPrZd8fsUvQh4=; b=XUroXzKZwFspwP2wDadG+wvum+V4SrdryfU7l2m3ieAYATEkNgajw8hiYKmjpHIfwkSBG6 eVzEt/b9qDSYxZFARxyc+/IrNjZhGwo3E1+69fA8sZHgt9nc4FJ17DI15bJfvQrgaeApBE h5F9ztxc7WYlYHWgkLqTe/75p4sUHxPBfnA7uZsawtVLkpx7HSaYvyjlbmAUZx5aKRkwsF lyz2fjj8aZf/VT9MMpQLqCdWA5RNI5ZtBtmGMw/2Xb65DYdP8qKxbwaX1/W49hnihuETjF pSs9xyWJQzvXnp7rELEMhJEYP9JOy5DV7jSJiakgMXe1yutG7R8Pdh7/W/JlMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704977363; a=rsa-sha256; cv=none; b=KDa1LwjLxY6MrfonGNm7TMyFRgHdGpmZzdBw4/rOb17TqHr16LJJ96bFiaGz6GRNYqc2c9 6mk/hNl+yYE+w3l+z+ikBP7qcNaTTCrdoRQ1dVh5AY10HTprbZ7bKQ3h2G7QIe1QGem4EM +fXMImEkMaxStGBNSUm46azMQRvYuWfAjVelPaS5rFPbDRXM8c8W2sgM9vY4rojcyLr0pB jaDmceCWbvMpNx1pYiHLs0iqEvUIc6eN6H6VUU53JJioEwi1YWXQ5Lx7cL3qryIUT17aPJ hD1N1cAj3mu/Z1SH+HOxnPcS6VvKEGVDRieR4ZwcZpBDD8eHSSdV70HNVU18BQ== 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 4T9kyB6clrzJqs; Thu, 11 Jan 2024 12:49:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40BCnMRK036674; Thu, 11 Jan 2024 12:49:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCnMkn036671; Thu, 11 Jan 2024 12:49:22 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:49:22 GMT Message-Id: <202401111249.40BCnMkn036671@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 608c8658c8c9 - stable/13 - sctp: improve handling of socket shutdown for reading List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 608c8658c8c9e78ccce884e137ac341366653e01 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=608c8658c8c9e78ccce884e137ac341366653e01 commit 608c8658c8c9e78ccce884e137ac341366653e01 Author: Michael Tuexen AuthorDate: 2023-08-24 13:52:55 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:48:31 +0000 sctp: improve handling of socket shutdown for reading If a socket is marked as cannot read anymore, drop chunks which should be added to a control element in the receive queue. This is consistent with dropping control elements instead of adding them in the same situation. Reported by: syzbot+291f6581cecb77097b16@syzkaller.appspotmail.com (cherry picked from commit 847fa61fad5ef118dc0591d876bf9449200aa818) --- sys/netinet/sctp_indata.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c index f7f0e3fdfe7f..c195cce96f39 100644 --- a/sys/netinet/sctp_indata.c +++ b/sys/netinet/sctp_indata.c @@ -1290,14 +1290,17 @@ sctp_add_chk_to_control(struct sctp_queued_to_read *control, * control and free up the chunk resources. */ uint32_t added = 0; - int i_locked = 0; + bool i_locked = false; - if (control->on_read_q && (hold_rlock == 0)) { - /* - * Its being pd-api'd so we must do some locks. - */ - SCTP_INP_READ_LOCK(stcb->sctp_ep); - i_locked = 1; + if (control->on_read_q) { + if (hold_rlock == 0) { + /* Its being pd-api'd so we must do some locks. */ + SCTP_INP_READ_LOCK(stcb->sctp_ep); + i_locked = true; + } + if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_CANT_READ) { + goto out; + } } if (control->data == NULL) { control->data = chk->data; @@ -1346,6 +1349,7 @@ sctp_add_chk_to_control(struct sctp_queued_to_read *control, control->end_added = 1; control->last_frag_seen = 1; } +out: if (i_locked) { SCTP_INP_READ_UNLOCK(stcb->sctp_ep); } From nobody Thu Jan 11 12:50:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9kz33TtXz55fFs; Thu, 11 Jan 2024 12:50:07 +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 4T9kz330fVz49YK; Thu, 11 Jan 2024 12:50:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wVXdG6tjNwcw6dplRzFz+u+pSMh9uFNa4ENxWFRxU0k=; b=RYYZa8RxRDceqAEUjScsK0ktchfam9CRFPmhfuFhMr5+9wXSHR1O7RR7mY8BOYi+1KAvuT gy9+hqp/hEcm66e8CHRlonJkBMnlV5+9aiZtH8uAPoEFeSkQ+YWaBjVC70voitrlPQP6ey /kpaOW24mz0JBRcQvnaw+Y1qrYbItcVM8Jb5ODlIN4vi9YV8CP81yH+A5JUlL9BLJAq5XR YRXP2AxLbFI8d221PLrDY5L75qxIvCIRPmixlCCsFKLHvTlMcqTIF5+qFPzIl2KNLxHchA IRy5v2ycg7oktT2uKXfI4ABOif/gE4EJGYqTXoEK/FqbIcgzcv+7l/EO2PnElQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wVXdG6tjNwcw6dplRzFz+u+pSMh9uFNa4ENxWFRxU0k=; b=caiy386+KSlZrJ+yymwXKDBtAIRsbrGCFePbsk7wA+K6CUfduwvX1KebFVMKLXw9Wru/KH NgAJTn58xzPzd7hTpsQC+oEUU9sY3L5+62d7hkX+srfcCTWl4OROkHz75/Ixh651jXd3Bx 8yYXyERbOCTAeEUr9No6SN7dKwAeTp7DpWQrI5S1Vu2lW5sqEPm2w3/U8FaTwKvCAXWPRj X1BxnfOOkAkD5W2JEjBaCCBoprciD4z3yL6iUYxnGn1Xa1nCc/GLQqTarQsIDBMOvvMm1W ls/ImpiPJItZUVebMjQ2Xlw3E1BgfHG6pkjUnBXC5d0Ld2OBGIWKvpAChASMfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704977407; a=rsa-sha256; cv=none; b=Nl3Tbb140hIP+694PVelx3yufYEbUlvpQFNJ28SFaU1tv+l+1sAT8JQ2Ln4d0wRyNtoODz i+8rD7h8YHJ0R18C08e8LECO7wjReJXTna4Q5i/utrdOsqGWg8/UsnTVKr0Du7Stm+afqg yuo4syYP/dcF7SsuPveqPqIiObUHy9Chk023spfokNSdBtTOHn+uZ60riAjo9fen5YeuX5 4ZaOw3XAgVwGEBEh6x39KeCLt5urmYzL+SMDHlX1Sley4s+1+HkcrJ+Z9Nqbj1pY5vBFB6 xLFcp/+LBijrUIEze29RpzAIeNvFXILbAC5aJvrAocaZwyLY8iPeoM5IlbTC3A== 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 4T9kz323h2zJsg; Thu, 11 Jan 2024 12:50: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 40BCo7oX039970; Thu, 11 Jan 2024 12:50:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCo7Ra039965; Thu, 11 Jan 2024 12:50:07 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:50:07 GMT Message-Id: <202401111250.40BCo7Ra039965@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 6ebc41462538 - stable/13 - sctp: cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6ebc414625386c9c90f115e1f132af22dc881b43 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=6ebc414625386c9c90f115e1f132af22dc881b43 commit 6ebc414625386c9c90f115e1f132af22dc881b43 Author: Michael Tuexen AuthorDate: 2023-08-25 15:23:34 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:49:44 +0000 sctp: cleanup No functional change intended. Just asserting the conditions when being called. (cherry picked from commit f0c8e8118dbcc9251b11154ee7e4680f79901af1) --- sys/netinet/sctp_timer.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c index ef5eb8b89a5d..d0f3f936b34d 100644 --- a/sys/netinet/sctp_timer.c +++ b/sys/netinet/sctp_timer.c @@ -87,7 +87,10 @@ static int sctp_threshold_management(struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net, uint16_t threshold) { - if (net) { + KASSERT(stcb != NULL, ("stcb is NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + + if (net != NULL) { net->error_count++; SCTPDBG(SCTP_DEBUG_TIMER4, "Error count for %p now %d thresh:%d\n", (void *)net, net->error_count, @@ -114,11 +117,6 @@ sctp_threshold_management(struct sctp_inpcb *inp, struct sctp_tcb *stcb, sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net); } } - } - if (stcb == NULL) - return (0); - - if (net) { if ((net->dest_state & SCTP_ADDR_UNCONFIRMED) == 0) { if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { sctp_misc_ints(SCTP_THRESHOLD_INCR, From nobody Thu Jan 11 12:51:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9l0R5X8qz55fdk; Thu, 11 Jan 2024 12:51: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 4T9l0R4H20z4Bnh; Thu, 11 Jan 2024 12:51:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OIAloTVHYyq8uhmgmBiE8SXRO7gAdRo7pJ+9S90X3jQ=; b=IbPxf/uPbPBKTosfuhLtkZQijFbdh8MhuJdlJMzRXS1xM0u/NifmQFJRgIKAyNIGRmjFLl qyxhyZyszEsIu9900wIQq7Qinz8+QwaK/dDI8CvEMM6KTi/FH5TzhQGC7aM6JUPP1MXrO2 qOltI+EVKCSVxd1tKlXu9M6XMFzKha7pdrA/WubQcyrvHlsvJiGxpgzovxtoo4yYDXrYnU AG4VQSOTisNoyjs5LtP99oQ3jzsDIfoLfngunEF98P2tW70vMyId9QtSVlMlvfJxPd4OeZ w0rB5dDvImX54714M+sPD+bufaGOqWOgfSJo8FVvFH4X5PvosDjjfw/r4bliZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OIAloTVHYyq8uhmgmBiE8SXRO7gAdRo7pJ+9S90X3jQ=; b=OvgQoYMVdpi1HWeviwwdBFkUZa24QJqIiZkvOfua6rDhSYLZeA2tVgDc1onGgYZvzbB0dy L+Kupj7l6m0/quzfLGTVy9eY0tjc3RyoSNM9khCosZqb+FjJc0xbAdhMbApmlFmE2q+44j hs2jNgODqiL4Qe2ZbQSIVuNAMx+WbGpxIOWPAsrqrPVf0dIn/9zUy6XqYslZw4rwZb/951 W5ee6EVZb+526HuDW4XmuwO8hL5shccXEsi+mmbGvNGFQQGjWSV4OEtXwJIHvuj4XN776y PK0DBUTiOeiZXbW7GkKzAVdiPlHWTG4nBeJ7lC9wEfzU/6V3UvLydNaFk5HFPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704977479; a=rsa-sha256; cv=none; b=x3TsxsECivEjhtlYhTw5ZxFYWlpHpaXlwWcvENmqS5ZNizwhwGoqZl7kWEyWumc22OVseg WTc3B7Y96N36Zs0EIv/adjQYZaNnVicyXVk554uo2CcUZAjgNyXw99YRPihn04k8eG1v2n 9qMXW0vK2hYUZ9Xz/goSZljyEQ+mU6fW/Qyd/Ds8114E502pbc2Q8uIk44tpJBtBPnRp54 bgvIxYudrX4Fbli3agxiBBMvQ7TwLmDKzSpfXyTUvumEmXf5Acdr1pu3orWJrWEo8fy1jB leooVq0AUryLwP1iyN73+xe0niUOwIcu+7H7UrFkI0rQtC1TF4+OgsNTLNuwfA== 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 4T9l0R3NbYzJr0; Thu, 11 Jan 2024 12:51: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 40BCpJLb047712; Thu, 11 Jan 2024 12:51:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCpJV5047709; Thu, 11 Jan 2024 12:51:19 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:51:19 GMT Message-Id: <202401111251.40BCpJV5047709@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 122e6541316a - stable/13 - sctp: cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 122e6541316a09ba32f89ab7e42571d83fd2e174 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=122e6541316a09ba32f89ab7e42571d83fd2e174 commit 122e6541316a09ba32f89ab7e42571d83fd2e174 Author: Michael Tuexen AuthorDate: 2023-08-25 15:31:19 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:50:49 +0000 sctp: cleanup In particular, don't use a socket level flag, use the inp level one. After adding appropriate locking, this will close a race condition. (cherry picked from commit e40d16ad6ee952f315356ef091fa282f28fac0d5) --- sys/netinet/sctputil.c | 60 +++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 33 deletions(-) diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 380aee5f671d..3769faeb1842 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -4052,14 +4052,14 @@ void sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, uint32_t error, void *data, int so_locked) { - if ((stcb == NULL) || - (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || - (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) || - (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET)) { - /* If the socket is gone we are out of here */ - return; - } - if (stcb->sctp_socket->so_rcv.sb_state & SBS_CANTRCVMORE) { + struct sctp_inpcb *inp; + struct sctp_nets *net; + + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + + inp = stcb->sctp_ep; + if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { return; } if ((SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_WAIT) || @@ -4071,6 +4071,12 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, return; } } + if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || + (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) || + (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_CANT_READ)) { + return; + } + switch (notification) { case SCTP_NOTIFY_ASSOC_UP: if (stcb->asoc.assoc_up_sent == 0) { @@ -4089,32 +4095,20 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, NULL, false, false, so_locked); break; case SCTP_NOTIFY_INTERFACE_DOWN: - { - struct sctp_nets *net; - - net = (struct sctp_nets *)data; - sctp_notify_peer_addr_change(stcb, SCTP_ADDR_UNREACHABLE, - (struct sockaddr *)&net->ro._l_addr, error, so_locked); - break; - } + net = (struct sctp_nets *)data; + sctp_notify_peer_addr_change(stcb, SCTP_ADDR_UNREACHABLE, + &net->ro._l_addr.sa, error, so_locked); + break; case SCTP_NOTIFY_INTERFACE_UP: - { - struct sctp_nets *net; - - net = (struct sctp_nets *)data; - sctp_notify_peer_addr_change(stcb, SCTP_ADDR_AVAILABLE, - (struct sockaddr *)&net->ro._l_addr, error, so_locked); - break; - } + net = (struct sctp_nets *)data; + sctp_notify_peer_addr_change(stcb, SCTP_ADDR_AVAILABLE, + &net->ro._l_addr.sa, error, so_locked); + break; case SCTP_NOTIFY_INTERFACE_CONFIRMED: - { - struct sctp_nets *net; - - net = (struct sctp_nets *)data; - sctp_notify_peer_addr_change(stcb, SCTP_ADDR_CONFIRMED, - (struct sockaddr *)&net->ro._l_addr, error, so_locked); - break; - } + net = (struct sctp_nets *)data; + sctp_notify_peer_addr_change(stcb, SCTP_ADDR_CONFIRMED, + &net->ro._l_addr.sa, error, so_locked); + break; case SCTP_NOTIFY_SPECIAL_SP_FAIL: sctp_notify_send_failed2(stcb, error, (struct sctp_stream_queue_pending *)data, so_locked); @@ -4225,7 +4219,7 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, SCTPDBG(SCTP_DEBUG_UTIL1, "%s: unknown notification %xh (%u)\n", __func__, notification, notification); break; - } /* end switch */ + } } void From nobody Thu Jan 11 12:54:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9l4c6K4yz55g7v; Thu, 11 Jan 2024 12:54: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 4T9l4c5qnLz4CXm; Thu, 11 Jan 2024 12:54:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FkRNYZTmB85MtZMzeS3ilm4Sb9hZQuDrlhVjvYd9v1o=; b=oNX3gqZrL2wx27dgTET/tgqVHDFWLYPcvYvfXio2A/d0sgZl3XUVGbs5Jygr1LM3e1BrzC DLQH5JkMOzrK05nGwR30soqjC9Q3wpJNN1SI0z5hHMZuMvd2UiChm+QC8yk/KYoVERn8VP IAbvrsTZnazouT48Z5bXpf/nmW63cEbLQhWL6tGPABySfDmqvTn3UAv2r4hVUtRVjQQ6Pw atO0XlxmbLii9+g4ZeZGJbxEULq0Lncb4+Ub5RyvYontv8FyhGS1kDENW7X6kly/EBf1mU SiJo7ZaQnCGyjKuzW4Lna+BZY6uNR6WGXBESjlic7wudQKywPcji8NhKYMaPlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FkRNYZTmB85MtZMzeS3ilm4Sb9hZQuDrlhVjvYd9v1o=; b=IKrQs7O90kFEz0CZSvZISfwwp2l7DTGE3hpvSMDvACwfzUF2FeQW1bnYOtYFlWamzdsmW1 9OoAeJ0BmaTQAFGLscouzSvVrCogrUqtDod/URtnGID7wRF8gkGhvQqust0/mV8g0XY4W+ 9nRT9pmK48cGTm2zJgLWPZjm5ATT1QzH86/VObDlPiniyyHluu3/2WRd+OvH7hLVf3obyN J6AiZO6K0mNqerjYzhOUXCz8t6rHsHGNl2bMWFCeIzg0e0TzoOnjfJsIf5y9K0iYksMOrg LU4JDz0HbXufyyRVAEggWeaDFq7/7ROwjW24adiX0cX3yM8ItFgHHF/NTYRN3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704977696; a=rsa-sha256; cv=none; b=XQt7laEO1d3lUOZF1rLfC0+NwsSTcwu9USwbiWe4OzKDgPqX7G1lAnu2WjJCcTQdAX0sbl 3qWXtVAV6MtQyKRuT/mIF/d/w0GKRcVrtMd9APyz/l0P/Onjs669LqpSw/+OGQDQaEFx8C G0tuLDAd7mD2WRB+Ngpff/W1UN1ajt4jY0ndCIS8JgeHr9T1I3C95XxcVUyc25FNvQ/5AX 0vPk8i8gT9ByIsM7DuHy0l8RWJWem48q8ghFVWnuNjMiZ7Y0K0QX78QxwgPBw0ImLv8SCF E50JC+hSv7EXThRIitAQ1RnyC5L3K15CMBDK9K3jTqC/LbM24+9D9HzhgmrP9Q== 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 4T9l4c4tNfzKK5; Thu, 11 Jan 2024 12:54:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40BCsua2053894; Thu, 11 Jan 2024 12:54:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCsu9d053891; Thu, 11 Jan 2024 12:54:56 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:54:56 GMT Message-Id: <202401111254.40BCsu9d053891@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: abe3c497ea12 - stable/13 - sctp: cleanup SCTP AUTH related notification List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: abe3c497ea1277d099255bded596e29d93366536 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=abe3c497ea1277d099255bded596e29d93366536 commit abe3c497ea1277d099255bded596e29d93366536 Author: Michael Tuexen AuthorDate: 2023-09-08 11:13:43 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:54:28 +0000 sctp: cleanup SCTP AUTH related notification This makes consistent use of the parameters and ensures that all SCTP AUTH related notifications are using sctp_ulp_notify(). No functional change intended. (cherry picked from commit cd3770c5feb038f3904fdb4aa04e09da122f74e3) --- sys/netinet/sctp_auth.c | 32 ++++++++++++++++---------------- sys/netinet/sctp_auth.h | 2 +- sys/netinet/sctputil.c | 15 ++++++--------- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/sys/netinet/sctp_auth.c b/sys/netinet/sctp_auth.c index 67f0d26fa0d5..3c1962233347 100644 --- a/sys/netinet/sctp_auth.c +++ b/sys/netinet/sctp_auth.c @@ -575,7 +575,7 @@ sctp_auth_key_release(struct sctp_tcb *stcb, uint16_t key_id, int so_locked) if ((skey->refcount <= 2) && (skey->deactivated)) { /* notify ULP that key is no longer used */ sctp_ulp_notify(SCTP_NOTIFY_AUTH_FREE_KEY, stcb, - key_id, 0, so_locked); + 0, &key_id, so_locked); SCTPDBG(SCTP_DEBUG_AUTH2, "%s: stcb %p key %u no longer used, %d\n", __func__, (void *)stcb, key_id, skey->refcount); @@ -1312,7 +1312,7 @@ sctp_deact_sharedkey(struct sctp_tcb *stcb, uint16_t keyid) /* are there other refcount holders on the key? */ if (skey->refcount == 1) { /* no other users, send a notification for this key */ - sctp_ulp_notify(SCTP_NOTIFY_AUTH_FREE_KEY, stcb, keyid, 0, + sctp_ulp_notify(SCTP_NOTIFY_AUTH_FREE_KEY, stcb, 0, &keyid, SCTP_SO_LOCKED); } @@ -1654,15 +1654,10 @@ sctp_handle_auth(struct sctp_tcb *stcb, struct sctp_auth_chunk *auth, return (-1); } /* generate a notification if this is a new key id */ - if (stcb->asoc.authinfo.recv_keyid != shared_key_id) - /* - * sctp_ulp_notify(SCTP_NOTIFY_AUTH_NEW_KEY, stcb, - * shared_key_id, (void - * *)stcb->asoc.authinfo.recv_keyid); - */ - sctp_notify_authentication(stcb, SCTP_AUTH_NEW_KEY, - shared_key_id, stcb->asoc.authinfo.recv_keyid, - SCTP_SO_NOT_LOCKED); + if (stcb->asoc.authinfo.recv_keyid != shared_key_id) { + sctp_ulp_notify(SCTP_NOTIFY_AUTH_NEW_KEY, stcb, 0, + &shared_key_id, SCTP_SO_NOT_LOCKED); + } /* compute a new recv assoc key and cache it */ if (stcb->asoc.authinfo.recv_key != NULL) sctp_free_key(stcb->asoc.authinfo.recv_key); @@ -1705,7 +1700,7 @@ sctp_handle_auth(struct sctp_tcb *stcb, struct sctp_auth_chunk *auth, */ void sctp_notify_authentication(struct sctp_tcb *stcb, uint32_t indication, - uint16_t keyid, uint16_t alt_keyid, int so_locked) + uint16_t keyid, int so_locked) { struct mbuf *m_notify; struct sctp_authkey_event *auth; @@ -1714,8 +1709,7 @@ sctp_notify_authentication(struct sctp_tcb *stcb, uint32_t indication, if ((stcb == NULL) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) || - (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) - ) { + (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET)) { /* If the socket is gone we are out of here */ return; } @@ -1737,7 +1731,12 @@ sctp_notify_authentication(struct sctp_tcb *stcb, uint32_t indication, auth->auth_flags = 0; auth->auth_length = sizeof(*auth); auth->auth_keynumber = keyid; - auth->auth_altkeynumber = alt_keyid; + /* XXXMT: The following is BSD specific. */ + if (indication == SCTP_AUTH_NEW_KEY) { + auth->auth_altkeynumber = stcb->asoc.authinfo.recv_keyid; + } else { + auth->auth_altkeynumber = 0; + } auth->auth_indication = indication; auth->auth_assoc_id = sctp_get_associd(stcb); @@ -1757,7 +1756,8 @@ sctp_notify_authentication(struct sctp_tcb *stcb, uint32_t indication, /* not that we need this */ control->tail_mbuf = m_notify; sctp_add_to_readq(stcb->sctp_ep, stcb, control, - &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, so_locked); + &stcb->sctp_socket->so_rcv, 1, + SCTP_READ_LOCK_NOT_HELD, so_locked); } /*- diff --git a/sys/netinet/sctp_auth.h b/sys/netinet/sctp_auth.h index 8bfdbaa6d4f6..279ecb6831cd 100644 --- a/sys/netinet/sctp_auth.h +++ b/sys/netinet/sctp_auth.h @@ -212,7 +212,7 @@ sctp_handle_auth(struct sctp_tcb *stcb, struct sctp_auth_chunk *ch, struct mbuf *m, uint32_t offset); extern void sctp_notify_authentication(struct sctp_tcb *stcb, - uint32_t indication, uint16_t keyid, uint16_t alt_keyid, int so_locked); + uint32_t indication, uint16_t keyid, int so_locked); extern int sctp_validate_init_auth_params(struct mbuf *m, int offset, int limit); diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 3769faeb1842..f4013a4816c7 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -4195,19 +4195,16 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, sctp_notify_shutdown_event(stcb); break; case SCTP_NOTIFY_AUTH_NEW_KEY: - sctp_notify_authentication(stcb, SCTP_AUTH_NEW_KEY, error, - (uint16_t)(uintptr_t)data, - so_locked); + sctp_notify_authentication(stcb, SCTP_AUTH_NEW_KEY, + *(uint16_t *)data, so_locked); break; case SCTP_NOTIFY_AUTH_FREE_KEY: - sctp_notify_authentication(stcb, SCTP_AUTH_FREE_KEY, error, - (uint16_t)(uintptr_t)data, - so_locked); + sctp_notify_authentication(stcb, SCTP_AUTH_FREE_KEY, + *(uint16_t *)data, so_locked); break; case SCTP_NOTIFY_NO_PEER_AUTH: - sctp_notify_authentication(stcb, SCTP_AUTH_NO_AUTH, error, - (uint16_t)(uintptr_t)data, - so_locked); + sctp_notify_authentication(stcb, SCTP_AUTH_NO_AUTH, + 0, so_locked); break; case SCTP_NOTIFY_SENDER_DRY: sctp_notify_sender_dry_event(stcb, so_locked); From nobody Thu Jan 11 12:56:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9l6H4H75z55gHY; Thu, 11 Jan 2024 12:56:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9l6H2tzyz4CtF; Thu, 11 Jan 2024 12:56:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8ndre7O1YVCSuieaBl7mwKuegmeVTrwzvQt/PrBzOqM=; b=DABlJXkHqxS+J/doyYX65nSCDNXSL+hb5yH9Pm5RIt981aGqf2tbdbxoJvflUBkrAOLoFw ws3o9HldTj7h62LDz31PBWwOkyQMvm3XOUHcAIHaa+MVX7XpQX1HguVgl4AKdq8oXKui7U C7tzWp/7qQxxLt+V8eu3DataSvE4h6yxBFkR1GvwZNiSeKLAf7Sn53mYubu2Zwx9oZXt/T UZNIErvuBFjDwiyalEZ669lXe73WwR9h+uGid6JOC52LtK0EwgVscUwp5/qtdlODRV2zZW 7dFKuEsMaG5hDT3HmBg6beNjnUr8zAD5UGm0BYiWO6swpN2z2/Y17Y+RBbZg6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8ndre7O1YVCSuieaBl7mwKuegmeVTrwzvQt/PrBzOqM=; b=KQ/9lDOMxD98PLLhtVuTgPHY0rivnzPAjEwRQXDoBOSg7uIgcInz9ZALeBNE/5+8vQqKp5 3QcKvFJIGIDfWJ0ZahIz2jYF6hGy2/mK/wOS+4/lTzTS5yg2bUpp+126RSkwzzVrLfOwNR XumyIMk3OHZFaPpX9PTxQ9UgwX+ANl6bDnTIkbI2Zvo9GFa7oPXVxHWI8ykJ+GSsDQvvuM anj0/lTLf/Q87TkfCirH5JMpHfo7uAxZm0/ws53SZ6Rqk9LrAkkygI+URBFRxTxVBkXlib kdkj8fZfapq9f40oc2YdIy4l1Ufwwsl6+ZI2Ppr3l+4/IsRbBUPSuy+vY0Xk5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704977783; a=rsa-sha256; cv=none; b=DFjPhC6z2WupPiv7XBLBEZONLc85bPXk/CzRRfIUHqqcAAatMtu/OgMdJQv2a27OIepQId ebcpR+tpLCPZYBMa+Tp1nJxONI3lHKrzuj23E7ZawU12fv/stz+uDT48tNlGc2U7wnz81K 7GISCwkRUh94TbRo8JRviB5wVwBRyONElHAro25AfDjiQmU3UEaYqrfmqtPy9j/duvNgbg cQeWXXTWxXrpG8smgD7aN1GX8lIBmsS6A/hTSaEmjVc8qo3mc5XpS0ZHCjqSJaEh8jxsp0 kdSo7YLRRnY1bTCxso5vc8NWQv8TYrGTnSHbbdZmehjYyr3xSY7AeClL+iEadQ== 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 4T9l6H1ymJzJpD; Thu, 11 Jan 2024 12:56: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 40BCuNSJ054248; Thu, 11 Jan 2024 12:56:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCuNXF054245; Thu, 11 Jan 2024 12:56:23 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:56:23 GMT Message-Id: <202401111256.40BCuNXF054245@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: c813c96d678a - stable/13 - sctp: make sure all SCTP RESET notifications use sctp_ulp_notify() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c813c96d678a01d19f2124f0db376fdafa8ac6f2 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=c813c96d678a01d19f2124f0db376fdafa8ac6f2 commit c813c96d678a01d19f2124f0db376fdafa8ac6f2 Author: Michael Tuexen AuthorDate: 2023-09-08 12:19:56 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:55:56 +0000 sctp: make sure all SCTP RESET notifications use sctp_ulp_notify() While there, improve consistency of the notification related code. No functional change intended. (cherry picked from commit 3ac7664774ad038b208cbb31eb52d1608efbd451) --- sys/netinet/sctp_constants.h | 14 +++-- sys/netinet/sctp_input.c | 26 ++++----- sys/netinet/sctputil.c | 135 ++++++++++++++++++++++--------------------- sys/netinet/sctputil.h | 6 -- 4 files changed, 86 insertions(+), 95 deletions(-) diff --git a/sys/netinet/sctp_constants.h b/sys/netinet/sctp_constants.h index 05e804100aa2..d11fe11d5e8f 100644 --- a/sys/netinet/sctp_constants.h +++ b/sys/netinet/sctp_constants.h @@ -706,12 +706,14 @@ #define SCTP_NOTIFY_STR_RESET_FAILED_IN 20 #define SCTP_NOTIFY_STR_RESET_DENIED_OUT 21 #define SCTP_NOTIFY_STR_RESET_DENIED_IN 22 -#define SCTP_NOTIFY_AUTH_NEW_KEY 23 -#define SCTP_NOTIFY_AUTH_FREE_KEY 24 -#define SCTP_NOTIFY_NO_PEER_AUTH 25 -#define SCTP_NOTIFY_SENDER_DRY 26 -#define SCTP_NOTIFY_REMOTE_ERROR 27 -#define SCTP_NOTIFY_ASSOC_TIMEDOUT 28 +#define SCTP_NOTIFY_STR_RESET_ADD 23 +#define SCTP_NOTIFY_STR_RESET_TSN 24 +#define SCTP_NOTIFY_AUTH_NEW_KEY 25 +#define SCTP_NOTIFY_AUTH_FREE_KEY 26 +#define SCTP_NOTIFY_NO_PEER_AUTH 27 +#define SCTP_NOTIFY_SENDER_DRY 28 +#define SCTP_NOTIFY_REMOTE_ERROR 29 +#define SCTP_NOTIFY_ASSOC_TIMEDOUT 30 /* This is the value for messages that are NOT completely * copied down where we will start to split the message. diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 5d2a3dd26384..7ad9eec07897 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -3508,23 +3508,19 @@ sctp_handle_stream_reset_response(struct sctp_tcb *stcb, asoc->strmout[i].state = SCTP_STREAM_OPEN; } asoc->streamoutcnt += num_stream; - sctp_notify_stream_reset_add(stcb, stcb->asoc.streamincnt, stcb->asoc.streamoutcnt, 0); + sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_ADD, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); } else if (action == SCTP_STREAM_RESET_RESULT_DENIED) { - sctp_notify_stream_reset_add(stcb, stcb->asoc.streamincnt, stcb->asoc.streamoutcnt, - SCTP_STREAM_CHANGE_DENIED); + sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_ADD, stcb, SCTP_STREAM_CHANGE_DENIED, NULL, SCTP_SO_NOT_LOCKED); } else { - sctp_notify_stream_reset_add(stcb, stcb->asoc.streamincnt, stcb->asoc.streamoutcnt, - SCTP_STREAM_CHANGE_FAILED); + sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_ADD, stcb, SCTP_STREAM_CHANGE_FAILED, NULL, SCTP_SO_NOT_LOCKED); } } else if (type == SCTP_STR_RESET_ADD_IN_STREAMS) { if (asoc->stream_reset_outstanding) asoc->stream_reset_outstanding--; if (action == SCTP_STREAM_RESET_RESULT_DENIED) { - sctp_notify_stream_reset_add(stcb, stcb->asoc.streamincnt, stcb->asoc.streamoutcnt, - SCTP_STREAM_CHANGE_DENIED); + sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_ADD, stcb, SCTP_STREAM_CHANGE_DENIED, NULL, SCTP_SO_NOT_LOCKED); } else if (action != SCTP_STREAM_RESET_RESULT_PERFORMED) { - sctp_notify_stream_reset_add(stcb, stcb->asoc.streamincnt, stcb->asoc.streamoutcnt, - SCTP_STREAM_CHANGE_FAILED); + sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_ADD, stcb, SCTP_STREAM_CHANGE_DENIED, NULL, SCTP_SO_NOT_LOCKED); } } else if (type == SCTP_STR_RESET_TSN_REQUEST) { /** @@ -3570,13 +3566,11 @@ sctp_handle_stream_reset_response(struct sctp_tcb *stcb, sctp_reset_out_streams(stcb, 0, (uint16_t *)NULL); sctp_reset_in_stream(stcb, 0, (uint16_t *)NULL); - sctp_notify_stream_reset_tsn(stcb, stcb->asoc.sending_seq, (stcb->asoc.mapping_array_base_tsn + 1), 0); + sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_TSN, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); } else if (action == SCTP_STREAM_RESET_RESULT_DENIED) { - sctp_notify_stream_reset_tsn(stcb, stcb->asoc.sending_seq, (stcb->asoc.mapping_array_base_tsn + 1), - SCTP_ASSOC_RESET_DENIED); + sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_TSN, stcb, SCTP_ASSOC_RESET_DENIED, NULL, SCTP_SO_NOT_LOCKED); } else { - sctp_notify_stream_reset_tsn(stcb, stcb->asoc.sending_seq, (stcb->asoc.mapping_array_base_tsn + 1), - SCTP_ASSOC_RESET_FAILED); + sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_TSN, stcb, SCTP_ASSOC_RESET_FAILED, NULL, SCTP_SO_NOT_LOCKED); } } /* get rid of the request and get the request flags */ @@ -3705,7 +3699,7 @@ sctp_handle_str_reset_request_tsn(struct sctp_tcb *stcb, sctp_reset_out_streams(stcb, 0, (uint16_t *)NULL); sctp_reset_in_stream(stcb, 0, (uint16_t *)NULL); asoc->last_reset_action[0] = SCTP_STREAM_RESET_RESULT_PERFORMED; - sctp_notify_stream_reset_tsn(stcb, asoc->sending_seq, (asoc->mapping_array_base_tsn + 1), 0); + sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_TSN, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); } sctp_add_stream_reset_result_tsn(chk, seq, asoc->last_reset_action[0], asoc->last_sending_seq[0], asoc->last_base_tsnsent[0]); @@ -3870,7 +3864,7 @@ sctp_handle_str_reset_add_strm(struct sctp_tcb *stcb, struct sctp_tmit_chunk *ch /* update the size */ stcb->asoc.streamincnt = num_stream; stcb->asoc.last_reset_action[0] = SCTP_STREAM_RESET_RESULT_PERFORMED; - sctp_notify_stream_reset_add(stcb, stcb->asoc.streamincnt, stcb->asoc.streamoutcnt, 0); + sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_ADD, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); } sctp_add_stream_reset_result(chk, seq, asoc->last_reset_action[0]); asoc->str_reset_seq_in++; diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index f4013a4816c7..b378a55250e0 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -3138,9 +3138,10 @@ sctp_notify_assoc_change(uint16_t state, struct sctp_tcb *stcb, struct mbuf *m_notify; struct sctp_assoc_change *sac; struct sctp_queued_to_read *control; + struct sctp_inpcb *inp; unsigned int notif_len; - uint16_t abort_len; unsigned int i; + uint16_t abort_len; KASSERT(abort == NULL || from_peer, ("sctp_notify_assoc_change: ABORT chunk provided for local termination")); @@ -3149,7 +3150,8 @@ sctp_notify_assoc_change(uint16_t state, struct sctp_tcb *stcb, if (stcb == NULL) { return; } - if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVASSOCEVNT)) { + inp = stcb->sctp_ep; + if (sctp_stcb_is_feature_on(inp, stcb, SCTP_PCB_FLAGS_RECVASSOCEVNT)) { notif_len = (unsigned int)sizeof(struct sctp_assoc_change); if (abort != NULL) { abort_len = ntohs(abort->ch.chunk_length); @@ -3227,10 +3229,9 @@ sctp_notify_assoc_change(uint16_t state, struct sctp_tcb *stcb, control->spec_flags = M_NOTIFICATION; /* not that we need this */ control->tail_mbuf = m_notify; - sctp_add_to_readq(stcb->sctp_ep, stcb, - control, - &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, - so_locked); + sctp_add_to_readq(inp, stcb, control, + &stcb->sctp_socket->so_rcv, 1, + SCTP_READ_LOCK_NOT_HELD, so_locked); } else { sctp_m_freem(m_notify); } @@ -3240,8 +3241,8 @@ sctp_notify_assoc_change(uint16_t state, struct sctp_tcb *stcb, * comes in. */ set_error: - if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || - (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && + if (((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || + (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC))) { SOCK_LOCK(stcb->sctp_socket); if (from_peer) { @@ -3264,8 +3265,8 @@ set_error: SOCK_UNLOCK(stcb->sctp_socket); } /* Wake ANY sleepers */ - if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || - (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && + if (((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || + (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC))) { socantrcvmore(stcb->sctp_socket); } @@ -3354,11 +3355,9 @@ sctp_notify_peer_addr_change(struct sctp_tcb *stcb, uint32_t state, control->spec_flags = M_NOTIFICATION; /* not that we need this */ control->tail_mbuf = m_notify; - sctp_add_to_readq(stcb->sctp_ep, stcb, - control, + sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, - SCTP_READ_LOCK_NOT_HELD, - so_locked); + SCTP_READ_LOCK_NOT_HELD, so_locked); } static void @@ -3485,11 +3484,9 @@ sctp_notify_send_failed(struct sctp_tcb *stcb, uint8_t sent, uint32_t error, control->spec_flags = M_NOTIFICATION; /* not that we need this */ control->tail_mbuf = m_notify; - sctp_add_to_readq(stcb->sctp_ep, stcb, - control, + sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, - SCTP_READ_LOCK_NOT_HELD, - so_locked); + SCTP_READ_LOCK_NOT_HELD, so_locked); } static void @@ -3583,13 +3580,13 @@ sctp_notify_send_failed2(struct sctp_tcb *stcb, uint32_t error, control->spec_flags = M_NOTIFICATION; /* not that we need this */ control->tail_mbuf = m_notify; - sctp_add_to_readq(stcb->sctp_ep, stcb, - control, - &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, so_locked); + sctp_add_to_readq(stcb->sctp_ep, stcb, control, + &stcb->sctp_socket->so_rcv, 1, + SCTP_READ_LOCK_NOT_HELD, so_locked); } static void -sctp_notify_adaptation_layer(struct sctp_tcb *stcb) +sctp_notify_adaptation_layer(struct sctp_tcb *stcb, int so_locked) { struct mbuf *m_notify; struct sctp_adaptation_event *sai; @@ -3630,9 +3627,9 @@ sctp_notify_adaptation_layer(struct sctp_tcb *stcb) control->spec_flags = M_NOTIFICATION; /* not that we need this */ control->tail_mbuf = m_notify; - sctp_add_to_readq(stcb->sctp_ep, stcb, - control, - &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); + sctp_add_to_readq(stcb->sctp_ep, stcb, control, + &stcb->sctp_socket->so_rcv, 1, + SCTP_READ_LOCK_NOT_HELD, so_locked); } static void @@ -3700,7 +3697,7 @@ sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error, } static void -sctp_notify_shutdown_event(struct sctp_tcb *stcb) +sctp_notify_shutdown_event(struct sctp_tcb *stcb, int so_locked) { struct mbuf *m_notify; struct sctp_shutdown_event *sse; @@ -3747,14 +3744,13 @@ sctp_notify_shutdown_event(struct sctp_tcb *stcb) control->spec_flags = M_NOTIFICATION; /* not that we need this */ control->tail_mbuf = m_notify; - sctp_add_to_readq(stcb->sctp_ep, stcb, - control, - &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); + sctp_add_to_readq(stcb->sctp_ep, stcb, control, + &stcb->sctp_socket->so_rcv, 1, + SCTP_READ_LOCK_NOT_HELD, so_locked); } static void -sctp_notify_sender_dry_event(struct sctp_tcb *stcb, - int so_locked) +sctp_notify_sender_dry_event(struct sctp_tcb *stcb, int so_locked) { struct mbuf *m_notify; struct sctp_sender_dry_event *event; @@ -3796,11 +3792,12 @@ sctp_notify_sender_dry_event(struct sctp_tcb *stcb, /* not that we need this */ control->tail_mbuf = m_notify; sctp_add_to_readq(stcb->sctp_ep, stcb, control, - &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, so_locked); + &stcb->sctp_socket->so_rcv, 1, + SCTP_READ_LOCK_NOT_HELD, so_locked); } -void -sctp_notify_stream_reset_add(struct sctp_tcb *stcb, uint16_t numberin, uint16_t numberout, int flag) +static void +sctp_notify_stream_reset_add(struct sctp_tcb *stcb, int flag, int so_locked) { struct mbuf *m_notify; struct sctp_queued_to_read *control; @@ -3835,8 +3832,8 @@ sctp_notify_stream_reset_add(struct sctp_tcb *stcb, uint16_t numberin, uint16_t stradd->strchange_flags = flag; stradd->strchange_length = sizeof(struct sctp_stream_change_event); stradd->strchange_assoc_id = sctp_get_associd(stcb); - stradd->strchange_instrms = numberin; - stradd->strchange_outstrms = numberout; + stradd->strchange_instrms = stcb->asoc.streamincnt; + stradd->strchange_outstrms = stcb->asoc.streamoutcnt; SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_stream_change_event); SCTP_BUF_NEXT(m_notify) = NULL; if (sctp_sbspace(&stcb->asoc, &stcb->sctp_socket->so_rcv) < SCTP_BUF_LEN(m_notify)) { @@ -3857,13 +3854,13 @@ sctp_notify_stream_reset_add(struct sctp_tcb *stcb, uint16_t numberin, uint16_t control->spec_flags = M_NOTIFICATION; /* not that we need this */ control->tail_mbuf = m_notify; - sctp_add_to_readq(stcb->sctp_ep, stcb, - control, - &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); + sctp_add_to_readq(stcb->sctp_ep, stcb, control, + &stcb->sctp_socket->so_rcv, 1, + SCTP_READ_LOCK_NOT_HELD, so_locked); } -void -sctp_notify_stream_reset_tsn(struct sctp_tcb *stcb, uint32_t sending_tsn, uint32_t recv_tsn, int flag) +static void +sctp_notify_stream_reset_tsn(struct sctp_tcb *stcb, int flag, int so_locked) { struct mbuf *m_notify; struct sctp_queued_to_read *control; @@ -3892,8 +3889,8 @@ sctp_notify_stream_reset_tsn(struct sctp_tcb *stcb, uint32_t sending_tsn, uint32 strasoc->assocreset_flags = flag; strasoc->assocreset_length = sizeof(struct sctp_assoc_reset_event); strasoc->assocreset_assoc_id = sctp_get_associd(stcb); - strasoc->assocreset_local_tsn = sending_tsn; - strasoc->assocreset_remote_tsn = recv_tsn; + strasoc->assocreset_local_tsn = stcb->asoc.sending_seq; + strasoc->assocreset_remote_tsn = stcb->asoc.mapping_array_base_tsn + 1; SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_assoc_reset_event); SCTP_BUF_NEXT(m_notify) = NULL; if (sctp_sbspace(&stcb->asoc, &stcb->sctp_socket->so_rcv) < SCTP_BUF_LEN(m_notify)) { @@ -3914,14 +3911,14 @@ sctp_notify_stream_reset_tsn(struct sctp_tcb *stcb, uint32_t sending_tsn, uint32 control->spec_flags = M_NOTIFICATION; /* not that we need this */ control->tail_mbuf = m_notify; - sctp_add_to_readq(stcb->sctp_ep, stcb, - control, - &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); + sctp_add_to_readq(stcb->sctp_ep, stcb, control, + &stcb->sctp_socket->so_rcv, 1, + SCTP_READ_LOCK_NOT_HELD, so_locked); } static void sctp_notify_stream_reset(struct sctp_tcb *stcb, - int number_entries, uint16_t *list, int flag) + int number_entries, uint16_t *list, int flag, int so_locked) { struct mbuf *m_notify; struct sctp_queued_to_read *control; @@ -3978,13 +3975,14 @@ sctp_notify_stream_reset(struct sctp_tcb *stcb, control->spec_flags = M_NOTIFICATION; /* not that we need this */ control->tail_mbuf = m_notify; - sctp_add_to_readq(stcb->sctp_ep, stcb, - control, - &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); + sctp_add_to_readq(stcb->sctp_ep, stcb, control, + &stcb->sctp_socket->so_rcv, 1, + SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); } static void -sctp_notify_remote_error(struct sctp_tcb *stcb, uint16_t error, struct sctp_error_chunk *chunk) +sctp_notify_remote_error(struct sctp_tcb *stcb, uint16_t error, + struct sctp_error_chunk *chunk, int so_locked) { struct mbuf *m_notify; struct sctp_remote_error *sre; @@ -4039,10 +4037,9 @@ sctp_notify_remote_error(struct sctp_tcb *stcb, uint16_t error, struct sctp_erro control->spec_flags = M_NOTIFICATION; /* not that we need this */ control->tail_mbuf = m_notify; - sctp_add_to_readq(stcb->sctp_ep, stcb, - control, + sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, - SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); + SCTP_READ_LOCK_NOT_HELD, so_locked); } else { sctp_m_freem(m_notify); } @@ -4084,11 +4081,10 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, stcb->asoc.assoc_up_sent = 1; } if (stcb->asoc.adaptation_needed && (stcb->asoc.adaptation_sent == 0)) { - sctp_notify_adaptation_layer(stcb); + sctp_notify_adaptation_layer(stcb, so_locked); } if (stcb->asoc.auth_supported == 0) { - sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0, - NULL, so_locked); + sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0, NULL, so_locked); } break; case SCTP_NOTIFY_ASSOC_DOWN: @@ -4153,31 +4149,36 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, case SCTP_NOTIFY_ASSOC_RESTART: sctp_notify_assoc_change(SCTP_RESTART, stcb, error, NULL, false, false, so_locked); if (stcb->asoc.auth_supported == 0) { - sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0, - NULL, so_locked); + sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0, NULL, so_locked); } break; case SCTP_NOTIFY_STR_RESET_SEND: - sctp_notify_stream_reset(stcb, error, ((uint16_t *)data), SCTP_STREAM_RESET_OUTGOING_SSN); + sctp_notify_stream_reset(stcb, error, ((uint16_t *)data), SCTP_STREAM_RESET_OUTGOING_SSN, so_locked); break; case SCTP_NOTIFY_STR_RESET_RECV: - sctp_notify_stream_reset(stcb, error, ((uint16_t *)data), SCTP_STREAM_RESET_INCOMING); + sctp_notify_stream_reset(stcb, error, ((uint16_t *)data), SCTP_STREAM_RESET_INCOMING, so_locked); break; case SCTP_NOTIFY_STR_RESET_FAILED_OUT: sctp_notify_stream_reset(stcb, error, ((uint16_t *)data), - (SCTP_STREAM_RESET_OUTGOING_SSN | SCTP_STREAM_RESET_FAILED)); + (SCTP_STREAM_RESET_OUTGOING_SSN | SCTP_STREAM_RESET_FAILED), so_locked); break; case SCTP_NOTIFY_STR_RESET_DENIED_OUT: sctp_notify_stream_reset(stcb, error, ((uint16_t *)data), - (SCTP_STREAM_RESET_OUTGOING_SSN | SCTP_STREAM_RESET_DENIED)); + (SCTP_STREAM_RESET_OUTGOING_SSN | SCTP_STREAM_RESET_DENIED), so_locked); break; case SCTP_NOTIFY_STR_RESET_FAILED_IN: sctp_notify_stream_reset(stcb, error, ((uint16_t *)data), - (SCTP_STREAM_RESET_INCOMING | SCTP_STREAM_RESET_FAILED)); + (SCTP_STREAM_RESET_INCOMING | SCTP_STREAM_RESET_FAILED), so_locked); break; case SCTP_NOTIFY_STR_RESET_DENIED_IN: sctp_notify_stream_reset(stcb, error, ((uint16_t *)data), - (SCTP_STREAM_RESET_INCOMING | SCTP_STREAM_RESET_DENIED)); + (SCTP_STREAM_RESET_INCOMING | SCTP_STREAM_RESET_DENIED), so_locked); + break; + case SCTP_NOTIFY_STR_RESET_ADD: + sctp_notify_stream_reset_add(stcb, error, so_locked); + break; + case SCTP_NOTIFY_STR_RESET_TSN: + sctp_notify_stream_reset_tsn(stcb, error, so_locked); break; case SCTP_NOTIFY_ASCONF_ADD_IP: sctp_notify_peer_addr_change(stcb, SCTP_ADDR_ADDED, data, @@ -4192,7 +4193,7 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, error, so_locked); break; case SCTP_NOTIFY_PEER_SHUTDOWN: - sctp_notify_shutdown_event(stcb); + sctp_notify_shutdown_event(stcb, so_locked); break; case SCTP_NOTIFY_AUTH_NEW_KEY: sctp_notify_authentication(stcb, SCTP_AUTH_NEW_KEY, @@ -4210,7 +4211,7 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, sctp_notify_sender_dry_event(stcb, so_locked); break; case SCTP_NOTIFY_REMOTE_ERROR: - sctp_notify_remote_error(stcb, error, data); + sctp_notify_remote_error(stcb, error, data, so_locked); break; default: SCTPDBG(SCTP_DEBUG_UTIL1, "%s: unknown notification %xh (%u)\n", diff --git a/sys/netinet/sctputil.h b/sys/netinet/sctputil.h index c649611d5004..8de98b4608f8 100644 --- a/sys/netinet/sctputil.h +++ b/sys/netinet/sctputil.h @@ -80,12 +80,6 @@ int sctp_init_asoc(struct sctp_inpcb *, struct sctp_tcb *, uint32_t, uint32_t, u void sctp_fill_random_store(struct sctp_pcb *); -void -sctp_notify_stream_reset_add(struct sctp_tcb *stcb, uint16_t numberin, - uint16_t numberout, int flag); -void - sctp_notify_stream_reset_tsn(struct sctp_tcb *stcb, uint32_t sending_tsn, uint32_t recv_tsn, int flag); - /* * NOTE: sctp_timer_start() will increment the reference count of any relevant * structure the timer is referencing, in order to prevent a race condition From nobody Thu Jan 11 12:57:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9l7B0scCz55gT4; Thu, 11 Jan 2024 12:57: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 4T9l7B0jGFz4CyM; Thu, 11 Jan 2024 12:57:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WnUlnPwg/EfhxEdSxnafFVmiu7zw2it8erxRY0ZIDro=; b=plNRf4hHOwe31rdZi4vVW2qzd9tedaQrusz3myfHwBLBQmpNhUG4qSi1E7XmY3BLX5srLp idXOqr1fSdIIw57bahsR3W4vbcgrN1pyu/v8llCQF2b3jxvQsaBoqK4zvdTS9zRNTv+4tn YnmJ9e5odK99VXGpW5P61ZlwSu9UXdX0c4GakbSpRTUcDHX/ci1W2YwvzMLDLXOyf2cr+u HgDgR6ZC4e0HPdlXmN+PeizQ7qS+gzDEfqVD3cJlHVSx3ch5NruyWMmBQKHQC6U1b0O6a+ GvWYHTqWGXfjBqC/A9DmYufNA6UC2oYBOhiVl1BCCxUez+mE+PEZXwGIq6rCRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WnUlnPwg/EfhxEdSxnafFVmiu7zw2it8erxRY0ZIDro=; b=V4yAP0mL9euaO69Sam5Hnc1KP36m0NJuFGERtXsdQAVF27N2coz5wFktnGxccVmVl18a6A nvN3tylF70qAuSf/2SgYYQzXxxDmdSPSruYnr7sneGgegn6DNcgySufdZ4xSSTFmqMR68I 1jGk95ixWQjpH7fSIAFHEKEFZ17TgX/HenusZSC92CQgJFdn5DgF/6J+Kb9g5eqczeof3b oVp7bEUyyjm3VUw4yYuB5czdQ3Ek7xBV0A/d2nV4U4bBDZK0unZ/xGIskAFNV27GL1Z88x dXcsN+OzNVFocef8s+7uzwdhMp15uAoLH4VZ6uV6WBdFaDriK8G7H9f1KIJDtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704977830; a=rsa-sha256; cv=none; b=vuhoDBzO0BEM0rmWpHaKYmDPF3n2MYo1ByjgGIgS6ni+OrJcRaG2XiziyreqyG+70c2Ff7 GYTIa7NjsQ+/wt6XKZwRL/P1yPQVycZ1s4hfQsoV5z4IEuAlgcdH0/26aKGd1gQpyvYzbc Ync5yXJnOuozfbf3PV2/Cug8LKi1CIfjqeYFzRQIe8H5PKZTNfxsTS0FRkLhg5OuCbVfof kXI9nbyrQwePd6rO+NLx2Wo8mrEJDi6HdtmayifVBqDqBxqmUJabIMW6D+6rijRd37kVqO 0KFH+/VbGGo3/+9+6y4zxgZlhUP8MZR3fqvDWDy2fJL08Nf/Q9OOaSgNZvcjCQ== 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 4T9l796sqrzKMT; Thu, 11 Jan 2024 12:57: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 40BCv9Do054479; Thu, 11 Jan 2024 12:57:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCv9Ev054476; Thu, 11 Jan 2024 12:57:09 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:57:09 GMT Message-Id: <202401111257.40BCv9Ev054476@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: a8694dd1b951 - stable/13 - sctp: cleanup locking for notifications List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a8694dd1b95141ce2a058888e762aa950e3fa47d Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=a8694dd1b95141ce2a058888e762aa950e3fa47d commit a8694dd1b95141ce2a058888e762aa950e3fa47d Author: Michael Tuexen AuthorDate: 2023-09-08 14:20:51 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:56:47 +0000 sctp: cleanup locking for notifications All notifications are now queued via sctp_ulp_notify(). Do the locking of the inp read lock there and validate this in all functions being used. This is one step in avoiding race conditions when closing the read end of an SCTP socket. (cherry picked from commit f9425b3a85e9e211b61e11ce8115bf73674bdf49) --- sys/netinet/sctp_auth.c | 12 ++--- sys/netinet/sctputil.c | 132 ++++++++++++++++++++++++++++++------------------ 2 files changed, 87 insertions(+), 57 deletions(-) diff --git a/sys/netinet/sctp_auth.c b/sys/netinet/sctp_auth.c index 3c1962233347..8bcb6d5243db 100644 --- a/sys/netinet/sctp_auth.c +++ b/sys/netinet/sctp_auth.c @@ -1706,13 +1706,9 @@ sctp_notify_authentication(struct sctp_tcb *stcb, uint32_t indication, struct sctp_authkey_event *auth; struct sctp_queued_to_read *control; - if ((stcb == NULL) || - (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || - (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) || - (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET)) { - /* If the socket is gone we are out of here */ - return; - } + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_AUTHEVNT)) /* event not enabled */ @@ -1757,7 +1753,7 @@ sctp_notify_authentication(struct sctp_tcb *stcb, uint32_t indication, control->tail_mbuf = m_notify; sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, - SCTP_READ_LOCK_NOT_HELD, so_locked); + SCTP_READ_LOCK_HELD, so_locked); } /*- diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index b378a55250e0..e6121a1635b7 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -3147,10 +3147,11 @@ sctp_notify_assoc_change(uint16_t state, struct sctp_tcb *stcb, ("sctp_notify_assoc_change: ABORT chunk provided for local termination")); KASSERT(!from_peer || !timedout, ("sctp_notify_assoc_change: timeouts can only be local")); - if (stcb == NULL) { - return; - } + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); inp = stcb->sctp_ep; + SCTP_INP_READ_LOCK_ASSERT(inp); + if (sctp_stcb_is_feature_on(inp, stcb, SCTP_PCB_FLAGS_RECVASSOCEVNT)) { notif_len = (unsigned int)sizeof(struct sctp_assoc_change); if (abort != NULL) { @@ -3231,7 +3232,7 @@ sctp_notify_assoc_change(uint16_t state, struct sctp_tcb *stcb, control->tail_mbuf = m_notify; sctp_add_to_readq(inp, stcb, control, &stcb->sctp_socket->so_rcv, 1, - SCTP_READ_LOCK_NOT_HELD, so_locked); + SCTP_READ_LOCK_HELD, so_locked); } else { sctp_m_freem(m_notify); } @@ -3282,11 +3283,15 @@ sctp_notify_peer_addr_change(struct sctp_tcb *stcb, uint32_t state, struct sctp_paddr_change *spc; struct sctp_queued_to_read *control; - if ((stcb == NULL) || - sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVPADDREVNT)) { + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); + + if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVPADDREVNT)) { /* event not enabled */ return; } + m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_paddr_change), 0, M_NOWAIT, 1, MT_DATA); if (m_notify == NULL) return; @@ -3357,7 +3362,7 @@ sctp_notify_peer_addr_change(struct sctp_tcb *stcb, uint32_t state, control->tail_mbuf = m_notify; sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, - SCTP_READ_LOCK_NOT_HELD, so_locked); + SCTP_READ_LOCK_HELD, so_locked); } static void @@ -3371,9 +3376,12 @@ sctp_notify_send_failed(struct sctp_tcb *stcb, uint8_t sent, uint32_t error, struct sctp_chunkhdr *chkhdr; int notifhdr_len, chk_len, chkhdr_len, padding_len, payload_len; - if ((stcb == NULL) || - (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVSENDFAILEVNT) && - sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT))) { + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); + + if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVSENDFAILEVNT) && + sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { /* event not enabled */ return; } @@ -3486,7 +3494,7 @@ sctp_notify_send_failed(struct sctp_tcb *stcb, uint8_t sent, uint32_t error, control->tail_mbuf = m_notify; sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, - SCTP_READ_LOCK_NOT_HELD, so_locked); + SCTP_READ_LOCK_HELD, so_locked); } static void @@ -3499,12 +3507,16 @@ sctp_notify_send_failed2(struct sctp_tcb *stcb, uint32_t error, struct sctp_queued_to_read *control; int notifhdr_len; - if ((stcb == NULL) || - (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVSENDFAILEVNT) && - sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT))) { + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); + + if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVSENDFAILEVNT) && + sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { /* event not enabled */ return; } + if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { notifhdr_len = sizeof(struct sctp_send_failed_event); } else { @@ -3582,7 +3594,7 @@ sctp_notify_send_failed2(struct sctp_tcb *stcb, uint32_t error, control->tail_mbuf = m_notify; sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, - SCTP_READ_LOCK_NOT_HELD, so_locked); + SCTP_READ_LOCK_HELD, so_locked); } static void @@ -3592,8 +3604,11 @@ sctp_notify_adaptation_layer(struct sctp_tcb *stcb, int so_locked) struct sctp_adaptation_event *sai; struct sctp_queued_to_read *control; - if ((stcb == NULL) || - sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_ADAPTATIONEVNT)) { + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); + + if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_ADAPTATIONEVNT)) { /* event not enabled */ return; } @@ -3629,7 +3644,7 @@ sctp_notify_adaptation_layer(struct sctp_tcb *stcb, int so_locked) control->tail_mbuf = m_notify; sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, - SCTP_READ_LOCK_NOT_HELD, so_locked); + SCTP_READ_LOCK_HELD, so_locked); } static void @@ -3642,15 +3657,16 @@ sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error, struct sctp_queued_to_read *control; struct sockbuf *sb; - if ((stcb == NULL) || - sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_PDAPIEVNT)) { + KASSERT(aborted_control != NULL, ("aborted_control is NULL")); + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); + + if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_PDAPIEVNT)) { /* event not enabled */ return; } - KASSERT(aborted_control != NULL, ("aborted_control is NULL")); - SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); - m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_pdapi_event), 0, M_NOWAIT, 1, MT_DATA); if (m_notify == NULL) /* no space left */ @@ -3703,6 +3719,10 @@ sctp_notify_shutdown_event(struct sctp_tcb *stcb, int so_locked) struct sctp_shutdown_event *sse; struct sctp_queued_to_read *control; + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); + /* * For TCP model AND UDP connected sockets we will send an error up * when an SHUTDOWN completes @@ -3712,6 +3732,7 @@ sctp_notify_shutdown_event(struct sctp_tcb *stcb, int so_locked) /* mark socket closed for read/write and wakeup! */ socantsendmore(stcb->sctp_socket); } + if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVSHUTDOWNEVNT)) { /* event not enabled */ return; @@ -3746,7 +3767,7 @@ sctp_notify_shutdown_event(struct sctp_tcb *stcb, int so_locked) control->tail_mbuf = m_notify; sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, - SCTP_READ_LOCK_NOT_HELD, so_locked); + SCTP_READ_LOCK_HELD, so_locked); } static void @@ -3756,8 +3777,11 @@ sctp_notify_sender_dry_event(struct sctp_tcb *stcb, int so_locked) struct sctp_sender_dry_event *event; struct sctp_queued_to_read *control; - if ((stcb == NULL) || - sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_DRYEVNT)) { + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); + + if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_DRYEVNT)) { /* event not enabled */ return; } @@ -3793,7 +3817,7 @@ sctp_notify_sender_dry_event(struct sctp_tcb *stcb, int so_locked) control->tail_mbuf = m_notify; sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, - SCTP_READ_LOCK_NOT_HELD, so_locked); + SCTP_READ_LOCK_HELD, so_locked); } static void @@ -3803,13 +3827,10 @@ sctp_notify_stream_reset_add(struct sctp_tcb *stcb, int flag, int so_locked) struct sctp_queued_to_read *control; struct sctp_stream_change_event *stradd; - if ((stcb == NULL) || - (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || - (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) || - (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET)) { - /* If the socket is gone we are out of here. */ - return; - } + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); + if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_STREAM_CHANGEEVNT)) { /* event not enabled */ return; @@ -3856,7 +3877,7 @@ sctp_notify_stream_reset_add(struct sctp_tcb *stcb, int flag, int so_locked) control->tail_mbuf = m_notify; sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, - SCTP_READ_LOCK_NOT_HELD, so_locked); + SCTP_READ_LOCK_HELD, so_locked); } static void @@ -3866,13 +3887,10 @@ sctp_notify_stream_reset_tsn(struct sctp_tcb *stcb, int flag, int so_locked) struct sctp_queued_to_read *control; struct sctp_assoc_reset_event *strasoc; - if ((stcb == NULL) || - (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || - (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) || - (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET)) { - /* If the socket is gone we are out of here. */ - return; - } + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); + if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_ASSOC_RESETEVNT)) { /* event not enabled */ return; @@ -3913,7 +3931,7 @@ sctp_notify_stream_reset_tsn(struct sctp_tcb *stcb, int flag, int so_locked) control->tail_mbuf = m_notify; sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, - SCTP_READ_LOCK_NOT_HELD, so_locked); + SCTP_READ_LOCK_HELD, so_locked); } static void @@ -3925,8 +3943,11 @@ sctp_notify_stream_reset(struct sctp_tcb *stcb, struct sctp_stream_reset_event *strreset; int len; - if ((stcb == NULL) || - (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_STREAM_RESETEVNT))) { + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); + + if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_STREAM_RESETEVNT)) { /* event not enabled */ return; } @@ -3977,7 +3998,7 @@ sctp_notify_stream_reset(struct sctp_tcb *stcb, control->tail_mbuf = m_notify; sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, - SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); + SCTP_READ_LOCK_HELD, so_locked); } static void @@ -3990,10 +4011,14 @@ sctp_notify_remote_error(struct sctp_tcb *stcb, uint16_t error, unsigned int notif_len; uint16_t chunk_len; - if ((stcb == NULL) || - sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVPEERERR)) { + KASSERT(stcb != NULL, ("stcb == NULL")); + SCTP_TCB_LOCK_ASSERT(stcb); + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); + + if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVPEERERR)) { return; } + if (chunk != NULL) { chunk_len = ntohs(chunk->ch.chunk_length); /* @@ -4039,7 +4064,7 @@ sctp_notify_remote_error(struct sctp_tcb *stcb, uint16_t error, control->tail_mbuf = m_notify; sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, - SCTP_READ_LOCK_NOT_HELD, so_locked); + SCTP_READ_LOCK_HELD, so_locked); } else { sctp_m_freem(m_notify); } @@ -4068,9 +4093,15 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, return; } } + if (notification != SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION) { + SCTP_INP_READ_LOCK(inp); + } + SCTP_INP_READ_LOCK_ASSERT(inp); + if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) || (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_CANT_READ)) { + SCTP_INP_READ_UNLOCK(inp); return; } @@ -4218,6 +4249,9 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, __func__, notification, notification); break; } + if (notification != SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION) { + SCTP_INP_READ_UNLOCK(inp); + } } void From nobody Thu Jan 11 12:57:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9l833BLjz55gYd; Thu, 11 Jan 2024 12:57:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9l832j0Tz4DTh; Thu, 11 Jan 2024 12:57:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FnHmVdLoczfldwyWF/6ZvEsJrpWHewStsOElg9XQ61U=; b=kysz8GbvT7kdql7GIrJLwlzd2V4Yzcwe1hwb1r89/mcM5pp7exSWu6tABZHDcUOpkppUUs UHuZqdSleN87nOV8R2MZw030jIGT9SDYDaM0zlapSFky0Q1i31mBVzGFaqZFLIYLHyqeIX kLkLRuoQUmojaKxjfQH7v9r+S9O/Rn56W4X8PVTQYcCptTUmdPKfX/67g9E+lIeIDm0D9i M+vOqIZ8M7f82KAaU6Jo4GToGXKdVhQaZiD2DgrjW+7fzJIiyvPqMCZEwElrPTa4OZgOTU YERP6K3dZW+Mdp8YQkVB749xsAb2Y53FqZfycCwgK5qhadqdPNNut0iZo4+JNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FnHmVdLoczfldwyWF/6ZvEsJrpWHewStsOElg9XQ61U=; b=OFmmNoCenEx4WSN7kwzRo802ONU+8oFoGk8X7Z7PUe84JWZ5anC2M+yvLJQ84ZtJXR0Nbf EBGIC4e5LhgnzLUcMZ7/z/jHjbtQeexmvyF9zjiSTlJirGsASR+DriYvgIMmd3J1xoUPLD 3aRELlBBDvfIoQKGkqXch3picJjOt1OJLuxcrn8X4tZXIG6AQlwBLIMR0d/qG0i8covy1k YOF3lJtrC9sy+ZVjbS4e8NLasScB3nludSUYkXuWmickDdi1XwK7AqRNHinYmaatYMY4n3 YH3T7V5tbllOtgGk9zSfC5h8t1CzyewdKHpTcE0V4TpcZwZBSrcn3UEAA+cT7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704977875; a=rsa-sha256; cv=none; b=kcLXD6TMq2GjZ0rejhvDeIRmTAoGhP9qSu6EKdUtea7O+gOaWjf2UVkb+7fETZYHEFDFLE ur+dQdsR+DRgTXytolfyxpoE6m5spLeA7F9SkF6flk2yWT66Pq2/i9WvJCtcrYS0w5OjRa RJmvrhGU5xzpjpwoxfUKD9alyzHCTJ7a7ocMq5Bw9g06dcakZ+rlTzQkLB6ju1HfNRA2D+ xeCVhfM1M1teskEqSXrOaVnhndHOJHT12q8z5L5va3VMvnAy7j5ZF33Jn979kHOLt2dytD NeO4hmokghL/XglJ6b2m8HOMlQxZ5PFuInioBOcdiRCVvxWYHGh2Lhz2n6xiEw== 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 4T9l831lxczKHC; Thu, 11 Jan 2024 12:57: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 40BCvtK8054701; Thu, 11 Jan 2024 12:57:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCvtcN054698; Thu, 11 Jan 2024 12:57:55 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:57:55 GMT Message-Id: <202401111257.40BCvtcN054698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 2d12958d4b5b - stable/13 - sctp: don't call sctp_ulp_notify() recursively List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2d12958d4b5b0cd7799662f3f69284c716264f92 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=2d12958d4b5b0cd7799662f3f69284c716264f92 commit 2d12958d4b5b0cd7799662f3f69284c716264f92 Author: Michael Tuexen AuthorDate: 2023-09-08 19:19:59 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:57:29 +0000 sctp: don't call sctp_ulp_notify() recursively This does not work with the new locking scheme. (cherry picked from commit 1e81a4e7e89bb1870bec84e42284ad10505e957c) --- sys/netinet/sctputil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index e6121a1635b7..8b2e95158ebc 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -4115,7 +4115,7 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, sctp_notify_adaptation_layer(stcb, so_locked); } if (stcb->asoc.auth_supported == 0) { - sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0, NULL, so_locked); + sctp_notify_authentication(stcb, SCTP_AUTH_NO_AUTH, 0, so_locked); } break; case SCTP_NOTIFY_ASSOC_DOWN: @@ -4180,7 +4180,7 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, case SCTP_NOTIFY_ASSOC_RESTART: sctp_notify_assoc_change(SCTP_RESTART, stcb, error, NULL, false, false, so_locked); if (stcb->asoc.auth_supported == 0) { - sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0, NULL, so_locked); + sctp_notify_authentication(stcb, SCTP_AUTH_NO_AUTH, 0, so_locked); } break; case SCTP_NOTIFY_STR_RESET_SEND: From nobody Thu Jan 11 12:58:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9l951VDDz55ghp; Thu, 11 Jan 2024 12:58: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 4T9l950vZ3z4DkK; Thu, 11 Jan 2024 12:58:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qugw9W2odbqeXEvLIEAJbZCqsnVom3DIXqPKyeR+tyY=; b=RF8/oKVLPXRYNYhs6vZPEsbaZO3S8vaJj0ZkDJF7RJ3Cozpv3SMz4bcwLC0rR5pAzskXXR iBhHLC/f371enukEy8xZcagsLCB2nWh/8NVDLvyAmAkM0OW+t8RTOtCNP0N1OgM8TtpcO1 u6sMaXE30jX+0bLYqCi08RTZyU/9rOUW1pfWDCCYbgr+3p4GalUmrubdOMWPZfipDzDNIt sgaY7Ipl07wxLnA2ByiRnpTM8wG3YVRcn6k6HkJJ49qZ4gLmsazVTGheCpqm/wdqLprCdo OiXLV6s9nIkQ010ngl9k0ySWkZQS12cWX/fdsTsp2CGBXP38WDyVHhfR0MjZ8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qugw9W2odbqeXEvLIEAJbZCqsnVom3DIXqPKyeR+tyY=; b=QOqZGodKr2ALjzm1S2wrY4OX6/nx7j6EN/LAdgtxDMhf2NkR62qy1k2LluGpwO+IXINcPR qHR2AfnDz7pkSyxvOIvvfE9XLanTi98OV7dWwyvh77IqtjQxiFSs2c6xMmV4X6x1MQ87NR 9HVFZGYiqAoO7qQVJX6hDBgziUaIgrdvhkv3i8dTR9dzVdne1oeozSw2wRHRkP4DmY4657 kImF3XozD2zOk1yGV/HlBxi3jmEAt6Li+KNb7eDOpZjo8prKpNqIaiTgeP67BP5EiiJHkj VPC0K/hscV/KpCHk5+BbpR+Xz3WkzvvHSqCC1oAz2sCn1wFlrkgMWpkt+SyF9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704977929; a=rsa-sha256; cv=none; b=O20zHyRXSLreIPrdOm/zRzer4k39dKOyR6gkh1y9lb9X7Gfm10exsRJ5tcMqQtXGezyo5x o4AcmpC/KnSxE8Qv8OoDI588Tvk2qRi0NdH0TyjppgJHrgshT+lf8+iZ8gJYbmJXGbUkde 3PmHX7dMlPW5s0TXyqQDZfBmiGqON14n0EKhkPhaJJBTCF8Io8IF9j2fEdXcj+zQ3wGVg3 vmOvb26g06jbh5CwOujNRHTFbs0Sn4yiiTybuE3MfeQxdK1lHFXBgVyZdZubIsP/X5/A/9 /wWEoV+3Y3VkqtbOUfYyQ2MX2xCavZ7l0fZVwt8T1IvFa8ZYJA8TOpInXh/O6A== 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 4T9l947494zJrN; Thu, 11 Jan 2024 12:58: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 40BCwmg1055003; Thu, 11 Jan 2024 12:58:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BCwmZ1055000; Thu, 11 Jan 2024 12:58:48 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:58:48 GMT Message-Id: <202401111258.40BCwmZ1055000@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: e207b7b8b371 - stable/13 - sctp: improve shutting down the read side of a socket List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e207b7b8b3716fdb64ed5ef10688e0f0cbe954cc Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e207b7b8b3716fdb64ed5ef10688e0f0cbe954cc commit e207b7b8b3716fdb64ed5ef10688e0f0cbe954cc Author: Michael Tuexen AuthorDate: 2023-09-12 23:33:54 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:58:11 +0000 sctp: improve shutting down the read side of a socket When shutdown(..., SHUT_RD) or shutdown(..., SHUT_RDWR) is called, really clean up the read queue and issue an ungraceful shutdown if user messages are affected. Reported by: syzbot+d4e1d30d578891245f59@syzkaller.appspotmail.com (cherry picked from commit 81c5f0fac91dfae64205a6c4f9b2a469d1187372) --- sys/netinet/sctp_usrreq.c | 90 ++++++++++++++++++++++++++++++----------------- 1 file changed, 57 insertions(+), 33 deletions(-) diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index a7af1da8624a..9f1a33b5ff2a 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -789,52 +789,76 @@ sctp_disconnect(struct socket *so) int sctp_flush(struct socket *so, int how) { - /* - * We will just clear out the values and let subsequent close clear - * out the data, if any. Note if the user did a shutdown(SHUT_RD) - * they will not be able to read the data, the socket will block - * that from happening. - */ + struct epoch_tracker et; + struct sctp_tcb *stcb; + struct sctp_queued_to_read *control, *ncontrol; struct sctp_inpcb *inp; + struct mbuf *m, *op_err; + bool need_to_abort = false; + /* + * For 1-to-1 style sockets, flush the read queue and trigger an + * ungraceful shutdown of the association, if and only if user + * messages are lost. Loosing notifications does not need to be + * signalled to the peer. + */ + if (how == PRU_FLUSH_WR) { + /* This function is only relevant for the read directions. */ + return (0); + } inp = (struct sctp_inpcb *)so->so_pcb; if (inp == NULL) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); return (EINVAL); } - SCTP_INP_RLOCK(inp); - /* For the 1 to many model this does nothing */ + SCTP_INP_WLOCK(inp); if (inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) { - SCTP_INP_RUNLOCK(inp); + /* For 1-to-many style sockets this function does nothing. */ + SCTP_INP_WUNLOCK(inp); return (0); } - SCTP_INP_RUNLOCK(inp); - if ((how == PRU_FLUSH_RD) || (how == PRU_FLUSH_RDWR)) { - /* - * First make sure the sb will be happy, we don't use these - * except maybe the count - */ - SCTP_INP_WLOCK(inp); - SCTP_INP_READ_LOCK(inp); - inp->sctp_flags |= SCTP_PCB_FLAGS_SOCKET_CANT_READ; - SCTP_INP_READ_UNLOCK(inp); + stcb = LIST_FIRST(&inp->sctp_asoc_list); + if (stcb == NULL) { SCTP_INP_WUNLOCK(inp); - SOCK_LOCK(so); - KASSERT(!SOLISTENING(so), - ("sctp_flush: called on listening socket %p", so)); - SCTP_SB_CLEAR(so->so_rcv); - SOCK_UNLOCK(so); + return (ENOTCONN); } - if ((how == PRU_FLUSH_WR) || (how == PRU_FLUSH_RDWR)) { - /* - * First make sure the sb will be happy, we don't use these - * except maybe the count - */ - SOCK_LOCK(so); - KASSERT(!SOLISTENING(so), - ("sctp_flush: called on listening socket %p", so)); - SOCK_UNLOCK(so); + SCTP_TCB_LOCK(stcb); + SCTP_INP_READ_LOCK(inp); + inp->sctp_flags |= SCTP_PCB_FLAGS_SOCKET_CANT_READ; + SOCK_LOCK(so); + TAILQ_FOREACH_SAFE(control, &inp->read_queue, next, ncontrol) { + if ((control->spec_flags & M_NOTIFICATION) == 0) { + need_to_abort = true; + } + TAILQ_REMOVE(&inp->read_queue, control, next); + control->on_read_q = 0; + for (m = control->data; m; m = SCTP_BUF_NEXT(m)) { + sctp_sbfree(control, control->stcb, &so->so_rcv, m); + } + if (control->on_strm_q == 0) { + sctp_free_remote_addr(control->whoFrom); + if (control->data) { + sctp_m_freem(control->data); + control->data = NULL; + } + sctp_free_a_readq(stcb, control); + } else { + stcb->asoc.size_on_all_streams += control->length; + } + } + SOCK_UNLOCK(so); + SCTP_INP_READ_UNLOCK(inp); + if (need_to_abort) { + inp->last_abort_code = SCTP_FROM_SCTP_USRREQ + SCTP_LOC_6; + SCTP_INP_WUNLOCK(inp); + op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, ""); + NET_EPOCH_ENTER(et); + sctp_abort_an_association(inp, stcb, op_err, false, SCTP_SO_LOCKED); + NET_EPOCH_EXIT(et); + return (ECONNABORTED); } + SCTP_TCB_UNLOCK(stcb); + SCTP_INP_WUNLOCK(inp); return (0); } From nobody Thu Jan 11 13:00:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9lBW0ll3z55gTg; Thu, 11 Jan 2024 13:00: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 4T9lBW0Gbgz4F6k; Thu, 11 Jan 2024 13:00:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704978003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a9f+922MIm1b53DjO7WRtoTmxsQA2Q/8LQYbMIwFazs=; b=KmGQTEoTOzCeai89WZpjd3OG4YwMkiNDwvddhOcE+P6KEg/acO73XefrQpOtrSG0ZkEgll 1f7gHxni+lqcCnx0zeOexsDnuUL4hQ6qN/G1D7vm91R1bR5bgD5RlbbK06zfMxhinOvAjz 4dpKPCb+N+d/EOMoogMvwiYq++mIcx0bkKWwFEU4G9M+O9rJ+Ixs3nPnSbPA8bl/uajMGy +8QBsKaUY0Nb/yA0oIf3HAWwqAFoJf/VedNaILv47OGoFxpo5v30xIYNABzHFWwy0fPoqH sToNwyq5PrwnBWLoZ2xyC1JHC76HUlvmYknlhWkUPD5UvHKPj5owpQmZaC+RDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704978003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a9f+922MIm1b53DjO7WRtoTmxsQA2Q/8LQYbMIwFazs=; b=gTxX0lZ2H7UWcF0WM2iYI/+t++e4Q6qmclqvfpYhJSr7Vxz4C19bPI7hMV/ztA5NUSLDec jFKGs1eIOwtIYicnC5ZjFsd2X9cZZI9vteTHIm8lpXf/pc3qDB6JP8u7QVy6k+s4ra3MLh Ln0hIzRtiuEsBCuyZfYp3os+xGZAYzahDeXF5K0ksALr8cp2sBteGMaCehs1szFGGS6zQH lbp8gj5rF4kWXbOj94uh9KrkYrm08Cc2l0yndA9rQyEgEj8OGp3Mxo5bAQwycwiKTzqyC6 ZE7MRgnk16J7jqu71P4ZQeqzlg5dtC6tcioFEr+eqAp/Mi0hi4doeTNXPTzP8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704978003; a=rsa-sha256; cv=none; b=pUcK3JmaNxM/v3hTXXOL+//glqsU7zp0uOuA/48Op4+kkPUpbR0+51FcHTxjyNE1+vWnwx LaJbTzOCQJabEcWWZecg52rJsoUEpbyPVZ6lQip5mBf1qTaI0yejoSxzF+6Uo6I6oGk69u +U+2r3l0Dtgx+/+NDT9UM2NCVt+O+rnarXWRYwBwBL0pOWMYwJ7ZNJGUoFKG4Na1hHpIfk zyaG+6V9xX1IcijiqFZBzWF1Q7HTKPqh1nclgGTTbtsidGOziDKdbpOi10q4q5IepNppIf 4upBpAiN8uXwWAikDATgzNZ7jbdv7LW8C0eXkh32PaDI2k3XIXwgyHO449m26Q== 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 4T9lBV6RFczJrP; Thu, 11 Jan 2024 13:00: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 40BD02fB058203; Thu, 11 Jan 2024 13:00:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BD02v0058195; Thu, 11 Jan 2024 13:00:02 GMT (envelope-from git) Date: Thu, 11 Jan 2024 13:00:02 GMT Message-Id: <202401111300.40BD02v0058195@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 947d455fe545 - stable/13 - sctp: further improve shutting down the read side of a socket List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 947d455fe545687a4cadb4d87c6a2139ca73b6c9 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=947d455fe545687a4cadb4d87c6a2139ca73b6c9 commit 947d455fe545687a4cadb4d87c6a2139ca73b6c9 Author: Michael Tuexen AuthorDate: 2023-09-13 11:02:51 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:59:04 +0000 sctp: further improve shutting down the read side of a socket Deal with the case that the association is already gone. Reported by: syzbot+e256d42e9b390564530a@syzkaller.appspotmail.com (cherry picked from commit bb56b36d7188e004840294d0bd5dfdf7f3392a05) --- sys/netinet/sctp_usrreq.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index 9f1a33b5ff2a..3289d86ba831 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -818,11 +818,9 @@ sctp_flush(struct socket *so, int how) return (0); } stcb = LIST_FIRST(&inp->sctp_asoc_list); - if (stcb == NULL) { - SCTP_INP_WUNLOCK(inp); - return (ENOTCONN); + if (stcb != NULL) { + SCTP_TCB_LOCK(stcb); } - SCTP_TCB_LOCK(stcb); SCTP_INP_READ_LOCK(inp); inp->sctp_flags |= SCTP_PCB_FLAGS_SOCKET_CANT_READ; SOCK_LOCK(so); @@ -848,7 +846,7 @@ sctp_flush(struct socket *so, int how) } SOCK_UNLOCK(so); SCTP_INP_READ_UNLOCK(inp); - if (need_to_abort) { + if (need_to_abort && (stcb != NULL)) { inp->last_abort_code = SCTP_FROM_SCTP_USRREQ + SCTP_LOC_6; SCTP_INP_WUNLOCK(inp); op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, ""); @@ -857,7 +855,9 @@ sctp_flush(struct socket *so, int how) NET_EPOCH_EXIT(et); return (ECONNABORTED); } - SCTP_TCB_UNLOCK(stcb); + if (stcb != NULL) { + SCTP_TCB_UNLOCK(stcb); + } SCTP_INP_WUNLOCK(inp); return (0); } From nobody Thu Jan 11 13:29:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9lrb6n9Sz55l3V; Thu, 11 Jan 2024 13: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 4T9lrb6JTnz4Hs6; Thu, 11 Jan 2024 13: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=1704979775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U6F8S9zWcuA2YXA/uf9aY3tbhS9d8evhmLjp4IbRQ/c=; b=OWWGvFuFDJ/vLLNG2XErlSMR4DYFeIyDDlsvcNV6N9YCAEFISOEEtujFDXEzBkLs7zApLh jWwLEohVyKOYBTeEowF/NH2ElE8rM4DCTLqISotxVf7jd2oVWihx/bKdRm0Bi1Km/46DR2 /DEcyP9k3/T+/8uMxbSoimKOg8wEKTMqkSQ7n1ACw0WCihKNymrIicE3a7qBsgPedgYi7v uaJFNprHu7FWuoeVyRR5eKTtFR+YHxceWR/usrnRkatrNIYL1usMxvmtYvGiPqBH0xvmrU HLcc69b59poBlKZ5M38n7FnMGUR1NwDV4imQsNYY32BnA2UmGCpQ7aqwZgTKJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704979775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U6F8S9zWcuA2YXA/uf9aY3tbhS9d8evhmLjp4IbRQ/c=; b=LwXlQDu91+lWvXAW1cL3AmekVeaSWeHaS8pXu746BZ2p3MmNQYRLUu/9oWjldI0N0KbqLH KdyqWNttI3JzPD3w8SYu8CB5+2GeHyc/fTBoF7z8Z9S6eNDSLuzZ5evhWIGhLJlYKrR5f4 oAdWyo5LQBnWs3SgY/abreVGFBlJdo9BCwc1F8mS5RtMYSwoeT7RyWSAIG1M1crSiGfk6k hw10JQPP0Ubfl+0ynflNnvZ3eQHbrjpFZnO0hXuZgIQXk7V77MYOJC4jPWNZ5XFwpyZPG/ j3g0XtX371BpZa2aqJuQkwUcrMepci6a5vviWjnILZwiWrflFsnkmZ8WYPUXCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704979775; a=rsa-sha256; cv=none; b=ZSb79lqFmStmgYpAb6i1jt4UvMJVvPFmHOd4eKlCdp3vobj56xKjvcafJIxa8ViwrVknHf rEVpUP1CRPvUSu9AI8ojKGJtTl/vrREZPk5Lb9BJ4IEOeY0x0VUE/pcSFZsP+vaPGc55oy G8QSypysK+6uyH7Z0M2V4k73LUOgpnViTZWh6MrUyD08UR9S2mnq9ikhvSO29ospKb0Oxk t9ORCOR/4W5Ty7HJ3tMLGENvpq1yY4HqVzmASrJ1Cx/f1Wouu8MwmlsV0Hq/Cr6vNmyvFS w7VZaluuMVqOZRwdthKhDs08WY1V++l48RcfyDJpmH78mNdP4/KvkAv5ZF4nNQ== 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 4T9lrb5MzHzLFR; Thu, 11 Jan 2024 13: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 40BDTZAA005306; Thu, 11 Jan 2024 13: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 40BDTZom005303; Thu, 11 Jan 2024 13:29:35 GMT (envelope-from git) Date: Thu, 11 Jan 2024 13:29:35 GMT Message-Id: <202401111329.40BDTZom005303@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c7163823c9a2 - stable/14 - Cirrus CI: Trigger on pull requests or downstream repos List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: c7163823c9a283702604347edc47f015ec4ed4fe Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c7163823c9a283702604347edc47f015ec4ed4fe commit c7163823c9a283702604347edc47f015ec4ed4fe Author: Jose Luis Duran AuthorDate: 2023-10-06 12:13:26 +0000 Commit: Ed Maste CommitDate: 2024-01-11 13:29:12 +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/ (cherry picked from commit 5d371834d29c3c716148f201bb8c1f68f15218fb) --- .cirrus.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.cirrus.yml b/.cirrus.yml index 317c5b28230d..96fbb873136c 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 Thu Jan 11 13:31:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9ltv3Bflz55ktt; Thu, 11 Jan 2024 13:31: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 4T9ltv2QXgz4K6L; Thu, 11 Jan 2024 13:31:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704979895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nr3/GoCGPiZ3zXjuSLmeaXk6ZICMmpGQa6WSNlkUlk0=; b=eXagBMqFEqfUkzG+USwwynU3kmSu9G22sIvX8hE1XQZDQSEiFqrE07u0TSa+4xHzz/jwf+ aphcy5ajz7TVOZZt9YGYda99CRsf1Xaxn5MUuYD4SdwpuAgJzeop+V996FQrk5m1ZbCh6p EH8pcty41juFt6mHIe/3R76QfK73xaeipQtDLwGLvZbJkU86r/FlxtJ13Og+IrIf7iYOMz 2KhHHWLyFk7n96Yzzkl76WAArj/PaSq35oEZ9NVBzWx8AiyAnf3Yt2houY7AIIbdzwIbpV 5P9NVofrsrEh5gh8RwbYoBxsUjGhUOyypIipLSr97eqt8ScaPUHki9rd1JJhig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704979895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nr3/GoCGPiZ3zXjuSLmeaXk6ZICMmpGQa6WSNlkUlk0=; b=kCqlxmfheCVhdZ845bcZ1zOVtd/uXPz9/c1gpEduurPLD9eNHeAGPioVa9meo2BD5N9RjT 1mnxvxQ3WOpqwYiqiBPw836/AkdjKC5IU0yfFvTTdqu7vQKOFq0TQOsGqLRnW4tKWhHK0c hIf37XWCQVxX7Ub/khzay0EV75YH6X0uatTcTQrZpnHGpo87D+MiR2peX0nknYXP5HDlrL YuritL5/2483g1sG1ho32gdQA8hd8lGirCzUhm7J7mVgvzSzBrzoq3ySP9oeXweSntCmVY 9ScoztXTLlPRPxEUOMas8nmfSWEAw8CZzG41H+DaooeyHW8IB3zQtrdnedu5tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704979895; a=rsa-sha256; cv=none; b=StsPXpR3GG7AJGyRNodbyq5jbqBAfbePd1hxUzTj0YiOhSSG9YJRD6FPhai4YD0pwR/hEa xb5fd5E6xzLKKGXCqb+UElannKzsWb0tgSzYI7X5I91WM31A08QglSIe/9AFQ0CaDN9r2c U/gDCId+rKGESYjZKH7wvm8aY48MzB84jDL8Pd+HgL8Ezq9wvxEJxFWDWycMYbQG17kDtb ewLWjnNF9BzmAtnxc/Q6cmvehaT221ybTXYCwcaYZWrxcoaqvFZEKzzaGreaw8CAOfcx8t e+YfNzWoKVp+Uvp3KqhFCE8ICQLNNVjd3KSz6O53eRF5ynbBjun5ao37gfE0dg== 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 4T9ltv1TN4zLJQ; Thu, 11 Jan 2024 13:31: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 40BDVZrK015432; Thu, 11 Jan 2024 13:31:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BDVZfn015429; Thu, 11 Jan 2024 13:31:35 GMT (envelope-from git) Date: Thu, 11 Jan 2024 13:31:35 GMT Message-Id: <202401111331.40BDVZfn015429@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: cb350ba7bf7c - main - kerberos: Fix numerous segfaults when using weak crypto List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb commit cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb Author: Cy Schubert AuthorDate: 2023-12-06 15:30:05 +0000 Commit: Cy Schubert CommitDate: 2024-01-11 13:26:42 +0000 kerberos: Fix numerous segfaults when using weak crypto Weak crypto is provided by the openssl legacy provider which is not load by default. Load the legacy providers as needed. When the legacy provider is loaded into the default context the default provider will no longer be automatically loaded. Without the default provider the various kerberos applicaions and functions will abort(). PR: 272835 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D43009 Tested by: netchild, Joerg Pulz --- Makefile.inc1 | 7 ++-- crypto/heimdal/lib/kadm5/create_s.c | 4 +++ crypto/heimdal/lib/kadm5/kadm5_locl.h | 1 + crypto/heimdal/lib/krb5/context.c | 4 +++ crypto/heimdal/lib/krb5/crypto.c | 3 ++ crypto/heimdal/lib/krb5/salt.c | 5 +++ crypto/heimdal/lib/roken/version-script.map | 1 + kerberos5/include/crypto-headers.h | 4 +++ kerberos5/include/fbsd_ossl_provider.h | 4 +++ kerberos5/lib/libroken/Makefile | 11 +++++-- kerberos5/lib/libroken/fbsd_ossl_provider_load.c | 41 ++++++++++++++++++++++++ kerberos5/libexec/kdc/Makefile | 2 +- share/mk/src.libnames.mk | 2 +- 13 files changed, 81 insertions(+), 8 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 34b49ee319ec..864b5151692f 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2635,9 +2635,10 @@ ${_bt}-usr.bin/grep: ${_bt}-lib/libbz2 _other_bootstrap_tools+=lib/libz ${_bt}-lib/libdwarf: ${_bt}-lib/libz -# libroken depends on libcrypt +# libroken depends on libcrypt and libcrypto _other_bootstrap_tools+=lib/libcrypt -${_bt}-lib/libroken: ${_bt}-lib/libcrypt +_other_bootstrap_tools+=secure/lib/libcrypto +${_bt}-lib/libroken: ${_bt}-lib/libcrypt ${_bt}-lib/libcrypto .else # All tools in _basic_bootstrap_tools have the same name as the subdirectory # so we can use :T to get the name of the symlinks that we need to create. @@ -3283,7 +3284,7 @@ kerberos5/lib/libkrb5__L: kerberos5/lib/libasn1__L lib/libcom_err__L \ lib/libcrypt__L secure/lib/libcrypto__L kerberos5/lib/libhx509__L \ kerberos5/lib/libroken__L kerberos5/lib/libwind__L \ kerberos5/lib/libheimbase__L kerberos5/lib/libheimipcc__L -kerberos5/lib/libroken__L: lib/libcrypt__L +kerberos5/lib/libroken__L: lib/libcrypt__L secure/lib/libcrypto__L kerberos5/lib/libwind__L: kerberos5/lib/libroken__L lib/libcom_err__L kerberos5/lib/libheimbase__L: lib/libthr__L kerberos5/lib/libheimipcc__L: kerberos5/lib/libroken__L kerberos5/lib/libheimbase__L lib/libthr__L diff --git a/crypto/heimdal/lib/kadm5/create_s.c b/crypto/heimdal/lib/kadm5/create_s.c index 1033ca103239..267e9bbda2a0 100644 --- a/crypto/heimdal/lib/kadm5/create_s.c +++ b/crypto/heimdal/lib/kadm5/create_s.c @@ -169,6 +169,10 @@ kadm5_s_create_principal(void *server_handle, ent.entry.keys.len = 0; ent.entry.keys.val = NULL; + ret = fbsd_ossl_provider_load(); + if (ret) + goto out; + ret = _kadm5_set_keys(context, &ent.entry, password); if (ret) goto out; diff --git a/crypto/heimdal/lib/kadm5/kadm5_locl.h b/crypto/heimdal/lib/kadm5/kadm5_locl.h index 68b6a5ebf024..63b367ab7e21 100644 --- a/crypto/heimdal/lib/kadm5/kadm5_locl.h +++ b/crypto/heimdal/lib/kadm5/kadm5_locl.h @@ -79,5 +79,6 @@ #include #include #include "private.h" +#include "fbsd_ossl_provider.h" #endif /* __KADM5_LOCL_H__ */ diff --git a/crypto/heimdal/lib/krb5/context.c b/crypto/heimdal/lib/krb5/context.c index 86bfe539b974..681bc9a0982f 100644 --- a/crypto/heimdal/lib/krb5/context.c +++ b/crypto/heimdal/lib/krb5/context.c @@ -392,6 +392,10 @@ krb5_init_context(krb5_context *context) } HEIMDAL_MUTEX_init(p->mutex); + ret = fbsd_ossl_provider_load(); + if(ret) + goto out; + p->flags |= KRB5_CTX_F_HOMEDIR_ACCESS; ret = krb5_get_default_config_files(&files); diff --git a/crypto/heimdal/lib/krb5/crypto.c b/crypto/heimdal/lib/krb5/crypto.c index 67ecef62e875..6ee22609a4d5 100644 --- a/crypto/heimdal/lib/krb5/crypto.c +++ b/crypto/heimdal/lib/krb5/crypto.c @@ -2054,6 +2054,9 @@ krb5_crypto_init(krb5_context context, *crypto = NULL; return ret; } + ret = fbsd_ossl_provider_load(); + if (ret) + return ret; (*crypto)->key.schedule = NULL; (*crypto)->num_key_usage = 0; (*crypto)->key_usage = NULL; diff --git a/crypto/heimdal/lib/krb5/salt.c b/crypto/heimdal/lib/krb5/salt.c index 5e4c8a1c8572..2b1fbee80ab6 100644 --- a/crypto/heimdal/lib/krb5/salt.c +++ b/crypto/heimdal/lib/krb5/salt.c @@ -43,6 +43,8 @@ krb5_salttype_to_string (krb5_context context, struct _krb5_encryption_type *e; struct salt_type *st; + (void) fbsd_ossl_provider_load(); + e = _krb5_find_enctype (etype); if (e == NULL) { krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, @@ -75,6 +77,8 @@ krb5_string_to_salttype (krb5_context context, struct _krb5_encryption_type *e; struct salt_type *st; + (void) fbsd_ossl_provider_load(); + e = _krb5_find_enctype (etype); if (e == NULL) { krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, @@ -196,6 +200,7 @@ krb5_string_to_key_data_salt_opaque (krb5_context context, enctype); return KRB5_PROG_ETYPE_NOSUPP; } + (void) fbsd_ossl_provider_load(); for(st = et->keytype->string_to_key; st && st->type; st++) if(st->type == salt.salttype) return (*st->string_to_key)(context, enctype, password, diff --git a/crypto/heimdal/lib/roken/version-script.map b/crypto/heimdal/lib/roken/version-script.map index 72d2ea7e4f7c..bb2139ed74cc 100644 --- a/crypto/heimdal/lib/roken/version-script.map +++ b/crypto/heimdal/lib/roken/version-script.map @@ -13,6 +13,7 @@ HEIMDAL_ROKEN_1.0 { ct_memcmp; err; errx; + fbsd_ossl_provider_load; free_getarg_strings; get_default_username; get_window_size; diff --git a/kerberos5/include/crypto-headers.h b/kerberos5/include/crypto-headers.h index 3ae0d9624ffd..2cc870642964 100644 --- a/kerberos5/include/crypto-headers.h +++ b/kerberos5/include/crypto-headers.h @@ -17,5 +17,9 @@ #include #include #include +#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) +#include +#include "fbsd_ossl_provider.h" +#endif #endif /* __crypto_headers_h__ */ diff --git a/kerberos5/include/fbsd_ossl_provider.h b/kerberos5/include/fbsd_ossl_provider.h new file mode 100644 index 000000000000..013983ca9f83 --- /dev/null +++ b/kerberos5/include/fbsd_ossl_provider.h @@ -0,0 +1,4 @@ +#ifndef __fbsd_ossl_provider_h +#define __fbsd_ossl_provider_h +int fbsd_ossl_provider_load(void); +#endif diff --git a/kerberos5/lib/libroken/Makefile b/kerberos5/lib/libroken/Makefile index 0c46ba6c4cb5..24dc3a5b2c45 100644 --- a/kerberos5/lib/libroken/Makefile +++ b/kerberos5/lib/libroken/Makefile @@ -2,7 +2,7 @@ PACKAGE= kerberos-lib LIB= roken -LIBADD= crypt +LIBADD= crypt crypto VERSION_MAP= ${KRB5DIR}/lib/roken/version-script.map INCS= roken.h \ roken-common.h \ @@ -74,15 +74,20 @@ SRCS= base64.c \ vis.c \ warnerr.c \ write_pid.c \ - xfree.c + xfree.c \ + fbsd_ossl_provider_load.c -CFLAGS+=-I${KRB5DIR}/lib/roken -I. +CFLAGS+=-I${KRB5DIR}/lib/roken \ + -I${SRCTOP}/kerberos5/include \ + -I${KRB5DIR}/lib/krb5 \ + -I${SRCTOP}/crypto/openssl/include -I. CLEANFILES= roken.h roken.h: ${MAKE_ROKEN} > ${.TARGET} + .include .PATH: ${KRB5DIR}/lib/roken diff --git a/kerberos5/lib/libroken/fbsd_ossl_provider_load.c b/kerberos5/lib/libroken/fbsd_ossl_provider_load.c new file mode 100644 index 000000000000..f49c8746c9e4 --- /dev/null +++ b/kerberos5/lib/libroken/fbsd_ossl_provider_load.c @@ -0,0 +1,41 @@ +#include +#include + +static void fbsd_ossl_provider_unload(void); + +static OSSL_PROVIDER *legacy; +static OSSL_PROVIDER *deflt; +static int providers_loaded = 0; + +int +fbsd_ossl_provider_load(void) +{ +#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) + if (providers_loaded == 0) { + if ((legacy = OSSL_PROVIDER_load(NULL, "legacy")) == NULL) + return (EINVAL); + if ((deflt = OSSL_PROVIDER_load(NULL, "default")) == NULL) { + OSSL_PROVIDER_unload(legacy); + return (EINVAL); + } + if (atexit(fbsd_ossl_provider_unload)) { + fbsd_ossl_provider_unload(); + return (errno); + } + providers_loaded = 1; + } +#endif + return (0); +} + +static void +fbsd_ossl_provider_unload(void) +{ +#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) + if (providers_loaded == 1) { + OSSL_PROVIDER_unload(legacy); + OSSL_PROVIDER_unload(deflt); + providers_loaded = 0; + } +#endif +} diff --git a/kerberos5/libexec/kdc/Makefile b/kerberos5/libexec/kdc/Makefile index 41fde9115c00..211f4f379054 100644 --- a/kerberos5/libexec/kdc/Makefile +++ b/kerberos5/libexec/kdc/Makefile @@ -11,7 +11,7 @@ SRCS= config.c \ CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/kdc -I${SRCTOP}/contrib/com_err ${LDAPCFLAGS} -LIBADD= kdc hdb krb5 roken crypt vers +LIBADD= kdc hdb krb5 roken crypt vers crypto LDFLAGS=${LDAPLDFLAGS} .include diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 33b8507a9eb9..e4fd3270a3d3 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -367,7 +367,7 @@ _DP_pam+= ssh .if ${MK_NIS} != "no" _DP_pam+= ypclnt .endif -_DP_roken= crypt +_DP_roken= crypt crypto _DP_kadm5clnt= com_err krb5 roken _DP_kadm5srv= com_err hdb krb5 roken _DP_heimntlm= crypto com_err krb5 roken From nobody Thu Jan 11 14:32:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nF70b93z56802; Thu, 11 Jan 2024 14:32: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 4T9nF709dzz4SVF; Thu, 11 Jan 2024 14:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YuEXrJ5TLdU8/hdwWRsmmwlieJbiSVhhPpZGG5OCqZE=; b=GbLIoVWaLB7qXXzrU3qTWo/b/bzNHzJwHmstUC3pCjkQ0H9Ujpifvn8RGJJzGW3nRIjMUJ F6ZznVtd01QAJ8O0Kyd2nr1y8EObMtUoGWbO66xvGX/n4+CKK++0mGc1XboMEJDuhkPiwQ Zasq+LsEEGAdK6sx5q6M5bxTGuNQoRTr9EqQTUS7wV8ZO49kZjA+Mktr+RjreeLCBfWm5w 0dpKECCDApj9BCk6qpjo/yJTuKlwWh4YfnXWmqeqCnXGKZbz91dJf9mcT6HHCgEV4Ovaz8 8q+gtMrvKgWEDnH1B0H4ddSU+rXJmR/UNX86BMwQxdDYLdvxqw0dQLwi24/n0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YuEXrJ5TLdU8/hdwWRsmmwlieJbiSVhhPpZGG5OCqZE=; b=G8ibjk0830eZOpRpNlcLHYZQmOKhwxeaDd1Ev6+TtEjtRYw3cjhV+xRNaY9wJABiaa4ypt I9hWDcbhEZIbJV6VvWOBJu+AMGo+Q4bj70AQ07UNkkdlQwrH1xeGCsvN94Bw0C/bMBQO1Q G4RBxOGBQEb5zyWk3CqpOK4QuS5EwCwTjqy7FQ4GXLGpW4DkTA5wO64xPBALMTA8iFbbBk B4OMpepXX+1RVM9TL8IV3g2CWiO3U1cbWDv1/U/loBFaOMtrJ3xpIJBTWwhlfbJKi7y+E+ VJTSOGdwvrcRTNjTUHxmjTG3XC3fh4fYu/XiEpoc0rcEZWjNrvlTMYE+088bHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983547; a=rsa-sha256; cv=none; b=bUJ4Gk6UwrmJYy8etQZ2s4sA01nBeNAME8SHWrWKn3bdU6tzIToVI7xpIuZKOliSngok14 alYJmi30uv8ZqHFCkkV3IPSAeBezGhK0rJ/QBjSk5KfgoCVRWmGfoi07p9GZsOmWtbud0z Pw+ySjdkKEefJEAfQsSZSGhHlpFKFFf11Lty50uKYpvAH2lKcdZuGzk+5qs2PAfG2Ml6F7 jqfbUxxRvFTwtn7YyB63gKxUQ2BafSTXAjhK3nrOxAwL/v/q62NGIRqfqb93g4ogpALl+1 3uKVmJ1emG4iKXKqo2zPNxY3zuGLsVVCaJJApDe9BviHwYjytayHiN5H9+eumA== 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 4T9nF66LFXzMX7; Thu, 11 Jan 2024 14:32: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 40BEWQfw022179; Thu, 11 Jan 2024 14:32:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEWQuF022166; Thu, 11 Jan 2024 14:32:26 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:32:26 GMT Message-Id: <202401111432.40BEWQuF022166@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8ac8b0b6aa17 - stable/14 - setfib.2: Consistently capitalize "FIB" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 8ac8b0b6aa17caa7166b634d1076d280e363ac95 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8ac8b0b6aa17caa7166b634d1076d280e363ac95 commit 8ac8b0b6aa17caa7166b634d1076d280e363ac95 Author: Mark Johnston AuthorDate: 2024-01-03 20:19:41 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:18:12 +0000 setfib.2: Consistently capitalize "FIB" MFC after: 1 week Sponsored by: Klara, Inc. (cherry picked from commit ee7d5ba1b55441476643983d3f70df5ee9ea97c4) --- lib/libc/sys/setfib.2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/sys/setfib.2 b/lib/libc/sys/setfib.2 index efbb7bf171ae..32e2f64910cb 100644 --- a/lib/libc/sys/setfib.2 +++ b/lib/libc/sys/setfib.2 @@ -37,7 +37,7 @@ .Sh DESCRIPTION The .Fn setfib -system call sets the associated fib for all sockets opened +system call sets the associated FIB (routing table) for all sockets opened subsequent to the call, to be that of the argument .Fa fib . The @@ -69,9 +69,9 @@ packet header, however it is not suggested that one use such a large number as memory is allocated for every FIB regardless of whether it is used, and there are places where all FIBs are iterated over. .Pp -The default fib of the process will be applied to all protocol families -that support multiple fibs, and ignored by those that do not. -The default fib for a process may be overridden for a socket with the use +The default FIB of the process will be applied to all protocol families +that support multiple FIBs, and ignored by those that do not. +The default FIB for a process may be overridden for a socket with the use of the .Dv SO_SETFIB socket option. From nobody Thu Jan 11 14:32:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nF81S2Sz567Wk; Thu, 11 Jan 2024 14:32: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 4T9nF80gkfz4SVH; Thu, 11 Jan 2024 14:32:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLSufdqS0o2lAIzpbrBPliJ3RBMN8Hqf/bZm9n6NrA0=; b=C8rymOKMTSkFXOy8oXVJ4ZQpnavB9rrZpbGwqWEpV3Fnp/D05/1rBjKhsCkGb5Rzta2EWm W2nePgeX5+0izR6TAvLMBRRiUorc9+hPE/5y8GkRPB19VvS19QUv5YtTtyUnHbMUxzNz2B CIzsDmjES6MxII3yCpRDQ5ivDqlDH82RZtLpmNEwq+y2+som0u7Bfm5Hjpmfc5LAbgTwcw LWCxgac577Olv/D70YBFILYblcYOnRjuCouxK7gg8e1HxQ7ogNTR7swuUEXCYguPj4Vjs6 3vYt0KMabmaiqu8iBaUGUMrKUb4+af/3W6ZdpDBp0LAk9Ky4Iaj6DCb1RnsXjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLSufdqS0o2lAIzpbrBPliJ3RBMN8Hqf/bZm9n6NrA0=; b=MvdCa1kdjMvrgL7oHlkIuzXpg6tGzXAVxiMPUWJDooZ6m3mSOtGWNe9qYlpaQYBZZyCJ6f 2/khu6lLMvRmCDvXl2QHfx0At21U7hPifUFlvBHJFZzdI6K/GUNWqNthyqp5HsbyRqV9fF IUZoTEFoczytS4sY0SWwQcnh5kWzOc6QzMGJYiX76AGi5CWyQWTZiS8uAsJymuEsLGQ3Jj 2edBOMVmmRTKQjwslNkBiIPpO+Unb9FiZDY3CtCwaszdmovJAxtkhl/Rj+s9bk2Fq05JbR 7r/3V/n1gFthZ0gbmSqoglY3SHeR45k5ZgPwj5BMaZYv27IGjV7IdVamft1K/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983548; a=rsa-sha256; cv=none; b=fRShDvXnkOFaJxX5ezg9cPHb+gsGKURjc4vJ5cBvv6L+sEeet42nQTVIwp9MLOp9v9qEu1 Po26HRdh97CVcfKHaNjGhd5EQcbIVhkCuSaxqf4MNpJUPAqiHIH5+Xmchfv1B4+WEQMiwb aEmRCsPE47+BtHUb5G0+BMEec42yVXlSezwIJY1UMaptlOwctxvCMzjhHJF2WV2WL5gN/G rl+ooQcm0zrA1YoHTUDsXuR0tecj2uLW6i16EykwXuzOnNumOQvN8xQ85c/UKS1Z3K9O3L UrD++c7sD8yzRJOlWE3DenCy5WKJHYZCYCe7omTmS4rdCBAnCbsGLU4vYrqGEA== 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 4T9nF76sDwzMX8; Thu, 11 Jan 2024 14:32: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 40BEWRNf023452; Thu, 11 Jan 2024 14:32:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEWRgi023441; Thu, 11 Jan 2024 14:32:27 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:32:27 GMT Message-Id: <202401111432.40BEWRgi023441@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: d14bf9de60a8 - stable/14 - netinet: Define IPv6 ECN mask List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: d14bf9de60a879dd9fccfbe977b467e87c0d357d Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d14bf9de60a879dd9fccfbe977b467e87c0d357d commit d14bf9de60a879dd9fccfbe977b467e87c0d357d Author: Jose Luis Duran AuthorDate: 2023-10-28 02:50:18 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:18:12 +0000 netinet: Define IPv6 ECN mask Define a mask for the code point used for ECN in the Traffic Class field (2 bits) of an IPv6 header. BE: 0 0 3 0 0 0 0 0 Bit: 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| Traffic Class | Flow Label | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ... | For BE (Big Endian), or network-byte order, this corresponds to 0x00300000. For Little Endian, it corresponds to 0x00003000. Reviewed by: imp, markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/879 (cherry picked from commit b0e13f785b336670bdf39b83a78435b00d00f43c) --- sys/netinet/ip6.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/ip6.h b/sys/netinet/ip6.h index 8c3459339bbc..7b85fd5b4ddd 100644 --- a/sys/netinet/ip6.h +++ b/sys/netinet/ip6.h @@ -97,10 +97,12 @@ struct ip6_hdr { #if BYTE_ORDER == BIG_ENDIAN #define IPV6_FLOWINFO_MASK 0x0fffffff /* flow info (28 bits) */ #define IPV6_FLOWLABEL_MASK 0x000fffff /* flow label (20 bits) */ +#define IPV6_ECN_MASK 0x00300000 /* ECN code point (2 bits) */ #else #if BYTE_ORDER == LITTLE_ENDIAN #define IPV6_FLOWINFO_MASK 0xffffff0f /* flow info (28 bits) */ #define IPV6_FLOWLABEL_MASK 0xffff0f00 /* flow label (20 bits) */ +#define IPV6_ECN_MASK 0x00003000 /* ECN code point (2 bits) */ #endif /* LITTLE_ENDIAN */ #endif #define IPV6_FLOWLABEL_LEN 20 From nobody Thu Jan 11 14:32:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nF943Hgz567wc; Thu, 11 Jan 2024 14:32: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 4T9nF91QCMz4Svk; Thu, 11 Jan 2024 14:32:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a6KY2BecZJxLhKMgn5X8tTxU+hqXYk14jT/wSXZ2lWM=; b=w+Eoo3Qp3gaCN5Fo8EglDtO8JNG4f8QyyvDik2QhUOTpofI3clM5XzRW6Ypgx/APH9T7p9 CtNUayrtPvvQfdCKXQsYb6IOkelU3EgH2X665SCD0YtsuqzRI8BT9tv+prK8OmewPiI98l 0/rani7aiUOXBEGEkHt65LNLUycm1FUQy88ehPRK11SgvSj+rUel+LT2R+McQBl7c1RSBz 12Ks/izl/dHiS5MAJvZ4orVn2w6PHQL0lxerY/g73/dwHWBk34dlGE+imw1GqUo7srTq9/ gBG6ON8eQt3OGO1yHdlIbjQ0p15bKrG9eQE6YeNAo1VNIEy/WHbIGdFT3xGsFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a6KY2BecZJxLhKMgn5X8tTxU+hqXYk14jT/wSXZ2lWM=; b=QFFoR55YqaiWSIPfhmBKYnWiBFDFgVVu0n0porqXYMw0T7JI5GLSRfJcdto7euEzoM3V6H 2sN9TTtSZ4G/9w9r4SCWudoChIhfPuogGstmBGf4A6abLNxPgJwxEH2wg3rviR+HWyifGg vx6EC/w6APycmtWu8evtHag5VbT/dR+uzlPTL3i16TZB0px3mzdhGN76Bb+d+Xn/MugQZI UqAq9HO/Rqiz8hAPz+3JzylEbY9qwN0a4s04/xZfqVuIkY52UXi6akC4+kyjAMI0hug56p 6FXmvh1yOT9i/21yLdeagkGHtR2GdZVTxoWGl0QNjyeWAk2EoE7y4zvSZikDgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983549; a=rsa-sha256; cv=none; b=JdLGZ2O4qW4PbKBV5JyE6vq9qklqaf4QvtRzE2t9hknse5nCk8pfMuhBJUyvrCc355atAL SBFzu9hnexFkzmIAoDR3IEpJ3MQ9AgKAKNe4OlRjveZn7dfWx+S1oQafduY97F1QTIIpl0 nhXKozey1Om0nj8Ki+4207B3M8/O7wJKJD2gdWBxMeVrR1aPqaOZ+9gveWY13Ny+CFPGlm UjVSNQYT10CNN7hfXPZ3Q7nr42Iar5/g9FmD7a2QHqXlbPoFHknFxccA7f7raLPNS1Dj2z GgKQYONDOxgqOGgCvPdGnaiLUkUqg1kC54NIv5ALYi56bBU4nYjv9kz2PF9MGg== 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 4T9nF90RjYzMpv; Thu, 11 Jan 2024 14:32: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 40BEWTTi023921; Thu, 11 Jan 2024 14:32:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEWTUc023918; Thu, 11 Jan 2024 14:32:29 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:32:29 GMT Message-Id: <202401111432.40BEWTUc023918@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: df50b9998cb4 - stable/14 - traceroute6: style(9) fixes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: df50b9998cb4ad3abffeb056ab92a4614dd38ae8 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=df50b9998cb4ad3abffeb056ab92a4614dd38ae8 commit df50b9998cb4ad3abffeb056ab92a4614dd38ae8 Author: Jose Luis Duran AuthorDate: 2023-10-27 23:53:44 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:18:12 +0000 traceroute6: style(9) fixes No functional change intended. Reviewed by: imp, markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/879 (cherry picked from commit 777e494a7634bbdd8ab0cf403ae22a464669d804) --- usr.sbin/traceroute6/traceroute6.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/usr.sbin/traceroute6/traceroute6.c b/usr.sbin/traceroute6/traceroute6.c index cf1c12c5962c..7907952e9328 100644 --- a/usr.sbin/traceroute6/traceroute6.c +++ b/usr.sbin/traceroute6/traceroute6.c @@ -342,7 +342,7 @@ static u_long nprobes = 3; static u_long first_hop = 1; static u_long max_hops = 30; static u_int16_t srcport; -static u_int16_t port = 32768+666; /* start udp dest port # for probe packets */ +static u_int16_t port = 32768 + 666; /* start udp dest port # for probe packets */ static u_int16_t ident; static int tclass = -1; static int options; /* socket options */ @@ -385,7 +385,7 @@ main(int argc, char *argv[]) } size = sizeof(i); - (void) sysctl(mib, sizeof(mib)/sizeof(mib[0]), &i, &size, NULL, 0); + (void) sysctl(mib, sizeof(mib) / sizeof(mib[0]), &i, &size, NULL, 0); max_hops = i; /* specify to tell receiving interface */ @@ -693,7 +693,7 @@ main(int argc, char *argv[]) exit(1); } if ((useproto == IPPROTO_SCTP) && (datalen & 3)) { - fprintf(stderr, + fprintf(stderr, "traceroute6: packet size must be a multiple of 4.\n"); exit(1); } @@ -1054,7 +1054,7 @@ wait_for_reply(int sock, struct msghdr *mhdr) FD_SET(sock, fdsp); wait.tv_sec = waittime; wait.tv_usec = 0; - if (select(sock+1, fdsp, (fd_set *)0, (fd_set *)0, &wait) > 0) + if (select(sock + 1, fdsp, (fd_set *)0, (fd_set *)0, &wait) > 0) cc = recvmsg(rcvsock, mhdr, 0); free(fdsp); @@ -1071,14 +1071,14 @@ setpolicy(int so, char *policy) buf = ipsec_set_policy(policy, strlen(policy)); if (buf == NULL) { warnx("%s", ipsec_strerror()); - return -1; + return (-1); } (void)setsockopt(so, IPPROTO_IPV6, IPV6_IPSEC_POLICY, buf, ipsec_get_policylen(buf)); free(buf); - return 0; + return (0); } #endif @@ -1115,7 +1115,7 @@ send_probe(int seq, u_long hops) case IPPROTO_UDP: outudp = (struct udphdr *) outpacket; outudp->uh_sport = htons(ident); - outudp->uh_dport = htons(port+seq); + outudp->uh_dport = htons(port + seq); outudp->uh_ulen = htons(datalen); outudp->uh_sum = 0; outudp->uh_sum = udp_cksum(&Src, &Dst, outpacket, datalen); @@ -1205,7 +1205,7 @@ send_probe(int seq, u_long hops) fprintf(stderr, "Unknown probe protocol %d.\n", useproto); exit(1); } - + i = send(sndsock, (char *)outpacket, datalen, 0); if (i < 0 || (u_long)i != datalen) { if (i < 0) @@ -1298,7 +1298,7 @@ pr_type(int t0) cp = "Unknown"; break; } - return cp; + return (cp); } int @@ -1366,8 +1366,7 @@ packet_ok(struct msghdr *mhdr, int cc, int seq, u_char *type, u_char *code) #else rcvhlim = 0; /*XXX*/ #endif - } - else + } else rcvhlim = *hlimp; *type = icp->icmp6_type; @@ -1452,7 +1451,7 @@ packet_ok(struct msghdr *mhdr, int cc, int seq, u_char *type, u_char *code) return (1); } if (verbose) { - char sbuf[NI_MAXHOST+1], dbuf[INET6_ADDRSTRLEN]; + char sbuf[NI_MAXHOST + 1], dbuf[INET6_ADDRSTRLEN]; u_int8_t *p; int i; @@ -1614,19 +1613,19 @@ inetname(struct sockaddr *sa) } } if (cp) - return cp; + return (cp); if (cap_getnameinfo(capdns, sa, sa->sa_len, line, sizeof(line), NULL, 0, NI_NUMERICHOST) != 0) strlcpy(line, "invalid", sizeof(line)); - return line; + return (line); } /* * CRC32C routine for the Stream Control Transmission Protocol */ -#define CRC32C(c, d) (c = (c>>8) ^ crc_c[(c^(d))&0xFF]) +#define CRC32C(c, d) (c = (c >> 8) ^ crc_c[(c ^ (d)) & 0xFF]) static u_int32_t crc_c[256] = { 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, @@ -1707,11 +1706,11 @@ sctp_crc32c(void *pack, u_int32_t len) CRC32C(crc32c, buf[i]); crc32c = ~crc32c; byte0 = crc32c & 0xff; - byte1 = (crc32c>>8) & 0xff; - byte2 = (crc32c>>16) & 0xff; - byte3 = (crc32c>>24) & 0xff; + byte1 = (crc32c >> 8) & 0xff; + byte2 = (crc32c >> 16) & 0xff; + byte3 = (crc32c >> 24) & 0xff; crc32c = ((byte0 << 24) | (byte1 << 16) | (byte2 << 8) | byte3); - return htonl(crc32c); + return (htonl(crc32c)); } u_int16_t From nobody Thu Jan 11 14:32:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nFB5MJ6z567YT; Thu, 11 Jan 2024 14:32: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 4T9nFB2KFcz4SbG; Thu, 11 Jan 2024 14:32:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=neahvrPo+zcRONrAgErO7qzrSDPguq9zAFf+JkB5OmE=; b=KC5JpYjNJOx8h5BxJp9r/3rii114CpCEtsWOBFj3F2669oIUvvbtoVWW4meP8Oc4F1XrhI x27OOg5aB8R3D2U7OeVnfYMzo0WJJxgQOB84Ex3Hum64yXo49jnOFfIW6+n+cwqIe91pyI xsWo6iHR7h7CmyGWrWI0UpcR46KmSuKnn5yNmYIbZ7cC32Tr2Nt9Ykz8j1OQEuio5SrDv2 69q+KR+zAi+X/11U6L8DujELs6tjsCEooCBzRGLhiD+xtUfq/kX8vaUOLR4v6AZnlSVCX4 /cqXu7Xv7UCe8/TH7wrDU22iFSS0IMnqds/gujA42GN4EkLFTOWNY9WKt7oAMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=neahvrPo+zcRONrAgErO7qzrSDPguq9zAFf+JkB5OmE=; b=ij+kUV8bH3wK9Gw/Dmp8u7/lEPopRHsiyXQrJskEf6yqMll9DUBf0hebPEDEShrD3NfUvd wGj5pJIes7kL01NRJU/pKlahrCz8IpRYYWSLNNvX0G4oyb0LYncApE7GPguORgvJW6FNL0 BnHx6P14KUnQ104FH/q2Yo42QfdICjouq346AK1Zt5A8Is2SaL5LXg0RjUbiYG5ddD2RCC McHn0diLYb81Ju3xZZxXZ4J29rTvCGlT/aaOjJPJzqF9Lb4zA5hK7Ly2bq15mLf4GwwF7H 3PmlVX17VmT/p1+PolnFKjbhKVv966doipvIIMAbJBZCy9ci6ubtUW+9+zHxbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983550; a=rsa-sha256; cv=none; b=NBpWqWAP2WFSOmw2Y1sEhn6swOrOqVvBLj2xAS/WD/XhjdSHP4NoJBqOCYbxBPgSHe+knj iknrwE4oXgQpGPJ9jN3hxihuq7tw60zbjshH/H1SzofKwzi3uBs8P7rEBE7E+RKu/qyAu3 TPC15Vghw0djglNfIFvg2kG6Mtdrl46WEouTpewaxM1wxw02Qka6X+VRJrJeGX19ToaPVq zx4gYnT6Ub6aL2uLTqjhN+Iry+CMIrMhsScTqppAYtA8SxbLGGLLHO0yqJQJATupHAUTcA y2/xle+PWTsUKwJviOqRZKA4CHG/CTXVtxYSQSKYz5e59G4+a1/KTXYEwKFVPQ== 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 4T9nFB1NjkzMr9; Thu, 11 Jan 2024 14:32: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 40BEWU6q023958; Thu, 11 Jan 2024 14:32:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEWUnO023955; Thu, 11 Jan 2024 14:32:30 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:32:30 GMT Message-Id: <202401111432.40BEWUnO023955@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 5df995ef0f8b - stable/14 - traceroute: style(9) fixes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 5df995ef0f8bcbf44f0c8a45659d5243fd300036 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5df995ef0f8bcbf44f0c8a45659d5243fd300036 commit 5df995ef0f8bcbf44f0c8a45659d5243fd300036 Author: Jose Luis Duran AuthorDate: 2023-10-28 00:13:19 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:18:12 +0000 traceroute: style(9) fixes No functional change intended. Reviewed by: imp, markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/879 (cherry picked from commit 943a9f4e470c3d45e4e93e3c91449b8c369c27ab) --- contrib/traceroute/traceroute.c | 55 +++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/contrib/traceroute/traceroute.c b/contrib/traceroute/traceroute.c index 48ad8fdc9104..fc87575ea043 100644 --- a/contrib/traceroute/traceroute.c +++ b/contrib/traceroute/traceroute.c @@ -539,7 +539,7 @@ main(int argc, char **argv) exit(1); } /* - * Do the setuid-required stuff first, then lose priveleges ASAP. + * Do the setuid-required stuff first, then lose privileges ASAP. * Do error checking for these two calls where they appeared in * the original code. */ @@ -762,7 +762,7 @@ main(int argc, char **argv) } #ifdef HAVE_SETLINEBUF - setlinebuf (stdout); + setlinebuf(stdout); #else setvbuf(stdout, NULL, _IOLBF, 0); #endif @@ -988,7 +988,7 @@ main(int argc, char **argv) if (bind(sndsock, (struct sockaddr *)from, sizeof(*from)) < 0) { Fprintf(stderr, "%s: bind: %s\n", prog, strerror(errno)); - exit (1); + exit(1); } if (as_path) { @@ -1104,7 +1104,8 @@ main(int argc, char **argv) continue; if (!gotlastaddr || from->sin_addr.s_addr != lastaddr) { - if (gotlastaddr) printf("\n "); + if (gotlastaddr) + printf("\n "); print(packet, cc, from); lastaddr = from->sin_addr.s_addr; ++gotlastaddr; @@ -1292,7 +1293,7 @@ wait_for_reply(register int sock, register struct sockaddr_in *fromp, (struct sockaddr *)fromp, &fromlen); free(fdsp); - return(cc); + return (cc); } void @@ -1354,14 +1355,14 @@ setpolicy(int so, char *policy) buf = ipsec_set_policy(policy, strlen(policy)); if (buf == NULL) { warnx("%s", ipsec_strerror()); - return -1; + return (-1); } (void)setsockopt(so, IPPROTO_IP, IP_IPSEC_POLICY, buf, ipsec_get_policylen(buf)); free(buf); - return 0; + return (0); } #endif @@ -1390,9 +1391,9 @@ pr_type(register u_char t) }; if (t > 16) - return("OUT-OF-RANGE"); + return ("OUT-OF-RANGE"); - return(ttab[t]); + return (ttab[t]); } int @@ -1433,7 +1434,7 @@ packet_ok(register u_char *buf, int cc, register struct sockaddr_in *from, if (type == ICMP_ECHOREPLY && proto->num == IPPROTO_ICMP && (*proto->check)((u_char *)icp, (u_char)seq)) - return -2; + return (-2); if ((type == ICMP_TIMXCEED && code == ICMP_TIMXCEED_INTRANS) || type == ICMP_UNREACH) { u_char *inner; @@ -1459,7 +1460,7 @@ packet_ok(register u_char *buf, int cc, register struct sockaddr_in *from, Printf("%2d: %8.8x\n", i, ntohl(*lp++)); } #endif - return(0); + return (0); } void @@ -1495,7 +1496,7 @@ udp_prep(struct outdata *outdata) outudp->uh_ulen = htons((u_short)protlen); outudp->uh_sum = 0; if (doipcksum) { - u_short sum = p_cksum(outip, (u_short*)outudp, protlen, protlen); + u_short sum = p_cksum(outip, (u_short *)outudp, protlen, protlen); outudp->uh_sum = (sum) ? sum : 0xffff; } @@ -1521,7 +1522,7 @@ udplite_prep(struct outdata *outdata) outudp->uh_ulen = htons(8); outudp->uh_sum = 0; if (doipcksum) { - u_short sum = p_cksum(outip, (u_short*)outudp, protlen, 8); + u_short sum = p_cksum(outip, (u_short *)outudp, protlen, 8); outudp->uh_sum = (sum) ? sum : 0xffff; } @@ -1551,7 +1552,7 @@ tcp_prep(struct outdata *outdata) tcp->th_sum = 0; if (doipcksum) - tcp->th_sum = p_cksum(outip, (u_short*)tcp, protlen, protlen); + tcp->th_sum = p_cksum(outip, (u_short *)tcp, protlen, protlen); } int @@ -1676,7 +1677,7 @@ gre_check(const u_char *data, int seq) { struct grehdr *const gre = (struct grehdr *) data; - return(ntohs(gre->proto) == port + return (ntohs(gre->proto) == port && ntohs(gre->callId) == ident + seq); } @@ -1694,7 +1695,7 @@ gen_check(const u_char *data, int seq) { u_int16_t *const ptr = (u_int16_t *) data; - return(ntohs(ptr[0]) == ident + return (ntohs(ptr[0]) == ident && ntohs(ptr[1]) == port + seq); } @@ -1720,7 +1721,7 @@ print(register u_char *buf, register int cc, register struct sockaddr_in *from) Printf(" %s (%s)", inetname(from->sin_addr), addr); if (verbose) - Printf(" %d bytes to %s", cc, inet_ntoa (ip->ip_dst)); + Printf(" %d bytes to %s", cc, inet_ntoa(ip->ip_dst)); } /* @@ -1737,10 +1738,10 @@ p_cksum(struct ip *ip, u_short *data, int len, int cov) ipo.ih_src = ip->ip_src; ipo.ih_dst = ip->ip_dst; - sum[1] = in_cksum((u_short*)&ipo, sizeof(ipo)); /* pseudo ip hdr cksum */ - sum[0] = in_cksum(data, cov); /* payload data cksum */ + sum[1] = in_cksum((u_short *)&ipo, sizeof(ipo)); /* pseudo ip hdr cksum */ + sum[0] = in_cksum(data, cov); /* payload data cksum */ - return ~in_cksum(sum, sizeof(sum)); + return (~in_cksum(sum, sizeof(sum))); } /* @@ -1782,7 +1783,7 @@ in_cksum(register u_short *addr, register int len) * CRC32C routine for the Stream Control Transmission Protocol */ -#define CRC32C(c, d) (c = (c>>8) ^ crc_c[(c^(d))&0xFF]) +#define CRC32C(c, d) (c = (c >> 8) ^ crc_c[(c ^ (d)) & 0xFF]) static u_int32_t crc_c[256] = { 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, @@ -1863,11 +1864,11 @@ sctp_crc32c(const void *packet, u_int32_t len) CRC32C(crc32c, buf[i]); crc32c = ~crc32c; byte0 = crc32c & 0xff; - byte1 = (crc32c>>8) & 0xff; - byte2 = (crc32c>>16) & 0xff; - byte3 = (crc32c>>24) & 0xff; + byte1 = (crc32c >> 8) & 0xff; + byte2 = (crc32c >> 16) & 0xff; + byte3 = (crc32c >> 24) & 0xff; crc32c = ((byte0 << 24) | (byte1 << 16) | (byte2 << 8) | byte3); - return htonl(crc32c); + return (htonl(crc32c)); } /* @@ -2052,7 +2053,7 @@ str2val(register const char *str, register const char *what, } else val = (int)strtol(str, &ep, 10); if (*ep != '\0') { - Fprintf(stderr, "%s: \"%s\" bad value for %s \n", + Fprintf(stderr, "%s: \"%s\" bad value for %s\n", prog, str, what); exit(1); } @@ -2095,7 +2096,7 @@ setproto(char *pname) pnum = str2val(optarg, "proto number", 1, 255); proto->num = pnum; } - return proto; + return (proto); } void From nobody Thu Jan 11 14:32:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nFD50Nzz567YV; Thu, 11 Jan 2024 14: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 4T9nFD3Vb0z4Sbh; Thu, 11 Jan 2024 14: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=1704983552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u7sh9/Z7EHb8lZGQo58lH2yefVB4K+v3o+cc3vMVYU8=; b=BudzMHVKJivM4vCdn48NhUGENWDe5WLRkQdgK2i11SHDdRtP2sqA59w8iehK9Nq+Az0WKr /ULkRVRY/XTL4ZsCIEykxcPftf1a+hkDuXHcXK4sI6A7Cb00Cqo6fURpc/1uw5gK1R01O8 jfM+LNlUa6O4o96rW7eLJzEqTjOtoCwWVpARQaJ9PiwpYtjkEOdn4LPKADdiTYd8/OfbTB dtu/dWz0GuuS1yge3RhsqBT4hh3YL9+sRpzL8h7Qb9vrAEuG0TY3Yq85ilV1IsVyB1TFsS Z2TUWaD3mqLLXwQDngG2qEi4O/WO2gzo5/YN65rH+m75mdM2uvcmmZjbxuL8hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u7sh9/Z7EHb8lZGQo58lH2yefVB4K+v3o+cc3vMVYU8=; b=UjImIOspkTM7ohG7ZGG891SXRCEeHOZ3eBS6RC7aYJXgVuvplzqgFIzAlb2+EJOoxWjXdf /8tgrIZd411HV65kB59apVDwQYXBolOz0+h3YiqwwNdKcPE1e2/G9wdnoeeH6wiOn/vchy Y7bRGBbVm5znOT4bIYqiMzsQX0ZIfXlTPwNz3jftPDjs+vi1oV+tYgQTU1zB8COloXzW4u I2qvcRZ2KUbt8peo3cn1ncaWB3jf6W6VFN+y5u6BZ41kgFo3xsL1DPW0S+9KBqvTno6A4K appDYZst7OpsimdYn8ysibXfZO9dPKAoUt5Z69kc+DssF5DBNSSMoaYd3/EUgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983552; a=rsa-sha256; cv=none; b=nIRf9ZO2vfP7aOsXhfl9e3WbvWmcB9RX12f6w9eqZH85ixkFDtfsduPgbHZX/pMV+JqTPG RHaPAdXlfWHQ9ArJsflH7iVjbA0qpl8+hsQUTW6hHggNp0B5SRhTOslKVidDE42REfGp4m KgdSs8u+bp65C5rLhxRtreRUbw7z+x/3vQ31B9mhb32xAjx9JaU/Lo9/f9MmTlIGaqpB0g 2yYXsztQXR6VRRiHTxWyFmwYf7dsc4P2MkLk+cYnKn69cBVhv67Kj0FPCyzWUrAPsIkE/8 bGQ1TUW+DpYmm0z2W+OcCqDl5um7yNNraYkojhfU3NyK1vXbv7SSH7SFAQ0/LQ== 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 4T9nFD2cLbzMsw; Thu, 11 Jan 2024 14: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 40BEWWds024058; Thu, 11 Jan 2024 14: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 40BEWWQq024055; Thu, 11 Jan 2024 14:32:32 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:32:32 GMT Message-Id: <202401111432.40BEWWQq024055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b2dfbd772e88 - stable/14 - linprocfs: Avoid using a sysctl to get the CPU model string List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: b2dfbd772e887d722da0aad1ea9c1ce14e65f47d Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b2dfbd772e887d722da0aad1ea9c1ce14e65f47d commit b2dfbd772e887d722da0aad1ea9c1ce14e65f47d Author: Mark Johnston AuthorDate: 2024-01-04 13:25:05 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:19:07 +0000 linprocfs: Avoid using a sysctl to get the CPU model string This will fail if the reading process is in capability mode. Just copy the string directly. PR: 276043 Reviewed by: emaste, imp, kib Reported and tested by: Ricardo Branco MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43281 (cherry picked from commit d74a742704eb81f0c6f4aa83e4cb0de26a81c400) --- sys/compat/linprocfs/linprocfs.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 0e668b0edde6..5c60d4d8e713 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -201,10 +201,7 @@ linprocfs_domeminfo(PFS_FILL_ARGS) static int linprocfs_docpuinfo(PFS_FILL_ARGS) { - int hw_model[2]; - char model[128]; uint64_t freq; - size_t size; u_int cache_size[4]; u_int regs[4] = { 0 }; int fqmhz, fqkhz; @@ -304,12 +301,6 @@ linprocfs_docpuinfo(PFS_FILL_ARGS) "acc_power", }; - hw_model[0] = CTL_HW; - hw_model[1] = HW_MODEL; - model[0] = '\0'; - size = sizeof(model); - if (kernel_sysctl(td, hw_model, 2, &model, &size, 0, 0, 0, 0) != 0) - strcpy(model, "unknown"); #ifdef __i386__ switch (cpu_vendor_id) { case CPU_VENDOR_AMD: @@ -353,7 +344,7 @@ linprocfs_docpuinfo(PFS_FILL_ARGS) "cpuid level\t: %d\n" "wp\t\t: %s\n", i, cpu_vendor, CPUID_TO_FAMILY(cpu_id), - CPUID_TO_MODEL(cpu_id), model, cpu_id & CPUID_STEPPING, + CPUID_TO_MODEL(cpu_id), cpu_model, cpu_id & CPUID_STEPPING, fqmhz, fqkhz, (cache_size[2] >> 16), 0, mp_ncpus, i, mp_ncpus, i, i, /*cpu_id & CPUID_LOCAL_APIC_ID ??*/ From nobody Thu Jan 11 14:32:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nFC3zrvz56806; Thu, 11 Jan 2024 14:32: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 4T9nFC2rZFz4SbS; Thu, 11 Jan 2024 14:32:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZowyPJ6pzHUiuNlrJyZjn9WYokRaJpIz1Qj5ROd1Ig=; b=EurCzrvjXFXkLXbnSPP2pEjnLSGzmyk5i/FS2S87UtPtC+6Dloh9iwN5RMUkFeUd6v1fS8 u9Xiewn4IfBiYZ78E97CuhX75byex0iuv9ZoVHEawWoDDfTJoOfbhMURPinbes8f+Gjl0M aP20TluWJKH5wgvXHyelASTDB1Kz+h2UfABKYcYlsHlnof9m/2ZGm8eODfZbvSATXHy6+I dJdoU04FEbV4pk1l5/CIqJpxxUW82vxUYeZ8ca+4aIZbdSx3tPN/Xlc3XRTY6qqy0dKIVh oBT+abOYvBHTrAyXOKkmSVFgcl0o7pDbnFFGIC4vuLVV++pSZ2x5Xn/fufct0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZowyPJ6pzHUiuNlrJyZjn9WYokRaJpIz1Qj5ROd1Ig=; b=bawGnMi4w81xmWuKXhUG7UqJIXTuPujTQNbNcGpDRJM64SGKpsSUBx9rCLVn/PduK6ICwr RULVKS5xsmCGNGXmccvG332V/TDIkD95bsVeaXU2pDV2Z766KCPKwe+SdmK4pNKuXSPeCd +j4cQuKucglyB2YZch1NJ18AZyjL1dDgLQLzsjYKwlVVkpk1DjUo6kcFfc39sokFyZxsJM PYLZicw3T4tffrfG0xI43+/qlogsaFMml00ods5R6zVde4JtXDbPgrsngWBI4OjFve0GvK X4PI2Jdp9Re/d3/ue/P2K8zhNj17LadX3NQ5vV3+oiszUk5oKHGTi8KrHWodhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983551; a=rsa-sha256; cv=none; b=J8QEdZKoIgaP+yq5qOwixmyUbl314tv4AoiX4mHiC+ibVzmycdMAbAxQILoKCCKOmgnj9Q d1kon+nu48E0A1HWjj6qxcudT+epeQVD8rDMVa8/XPzCYqSUFhLp03BNSjxQtbnqgpwY7x 8J1xx2o6QgnT1DZfyhQ1iDHIHsimbVqUq0klLE9Soy52QhW8nYjqiDDyGfqs1OISx/5OuZ 0BXzoIyiLLWCPmoAZodZvC5Pqgv7SnlrVbzOhzW/FJhvy4s+LlR0nddXraVOOIQO3o1c2L e0kbDAAty6OXhhX0gZoyGEHXc2cvgUmYRDBPZI+dxpmZrqnsdaeL1vmFRwc/Gg== 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 4T9nFC1yGRzMXF; Thu, 11 Jan 2024 14:32: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 40BEWVx0023998; Thu, 11 Jan 2024 14:32:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEWV2T023995; Thu, 11 Jan 2024 14:32:31 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:32:31 GMT Message-Id: <202401111432.40BEWV2T023995@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 675c24cd01f7 - stable/14 - x86: Make cpu_model[] public List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 675c24cd01f7a115806f17bb7b7ac6fd30d3872a Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=675c24cd01f7a115806f17bb7b7ac6fd30d3872a commit 675c24cd01f7a115806f17bb7b7ac6fd30d3872a Author: Mark Johnston AuthorDate: 2024-01-04 13:24:04 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:19:05 +0000 x86: Make cpu_model[] public No functional change intended. Reviewed by: emaste, imp, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43281 (cherry picked from commit d63ea03674007451682334fa3897918c5c3711a4) --- sys/x86/include/x86_var.h | 1 + sys/x86/x86/identcpu.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/x86/include/x86_var.h b/sys/x86/include/x86_var.h index 44314456d8bf..f3677d84570b 100644 --- a/sys/x86/include/x86_var.h +++ b/sys/x86/include/x86_var.h @@ -58,6 +58,7 @@ extern u_int cpu_mxcsr_mask; extern u_int cpu_procinfo; extern u_int cpu_procinfo2; extern char cpu_vendor[]; +extern char cpu_model[]; extern u_int cpu_vendor_id; extern u_int cpu_mon_mwait_flags; extern u_int cpu_mon_min_size; diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index 7b06ecab2ad5..7fa35bd50244 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -157,7 +157,7 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD | CTLFLAG_CAPRD, machine, 0, "Machine class"); #endif -static char cpu_model[128]; +char cpu_model[128]; SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_MPSAFE, cpu_model, 0, "Machine model"); From nobody Thu Jan 11 14:32:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nFF6CZvz567cc; Thu, 11 Jan 2024 14: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 4T9nFF4JMxz4SYZ; Thu, 11 Jan 2024 14: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=1704983553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9HyqWhEJOhP/vsQhSje2AEs5MyO8/MjEwfMvArjcRWw=; b=yHRYThn68qZuPKARYd9lo+BY8P73iFyJczl+PIupZ6wrY9lxLgnmoAdtOWMpTECiJsSgWd fBMVUmFnrd/fY6FYjD7EGDC94XUw9EtmtaE3xdDSEXWtuzUZuLt77/hYYa7sUgEUSqxFLR cebulJMjisTDVlbarGPRI+INW7ns7AlmU5ryzs50P/Ng+8GEv/dfE91p9tdDtdqgFOC20k TVUI3B9lsMMuf38WHKNLLR0452o2XxnAGXdBl+dZ8IPx0WsG9hFXOy04NEBL1oc/CpEYJU dvBQgxmP4Y3WJgKXdXYYKrhn9oLXOpaorHszoNZqcXgBWZ/W7Y8HS3GhOjSdDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9HyqWhEJOhP/vsQhSje2AEs5MyO8/MjEwfMvArjcRWw=; b=qAETwSeWCGBTknECn524eNtF6KmLFwTN0O611yb4qs8aEWJXVoSOKBSTPe6Kw25zJgNq5c qODpzgjaXEmExNKayLoA8TQUn/FwDxVbUf1T3nQ5rl9cxSvMI6Hz7KY1iMtFHrYv0zoeqi e1Fb8babRFZJovmkC7wa9821wAuFQ/nDcusnQxlCZM8qE8hdsyzYqdukUyhebgYSILAIDt aYQfZmLEOAj792mH6S9wUWgk98Q8v23PhUa7yREFc8Yqd4YCH1pbzllPYnzta2+kXoCe/j Vq8Q0A9JjP5tGRRK+uVaARh4Hcvea0uWXc67uSeaPPk1DZJwBnCatLbK5QEJCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983553; a=rsa-sha256; cv=none; b=ui5OeiBwO9qdF63CbeamyBvrUFyuYPlz2skZZ+J+GUJ9yooyy2iNO3S2yrusJco/BBO2ck wnn5Azq5Nq7aw9YvKQ6Oeqq1xHzWcSKvfZ0vt0xmQ4kDbJlmPTk0IHwQQUnsu11yCbpWGe nxPQFgQY3cRHzm5yC/3jRJAr2QejvwPQag7VD5zxW0bOckNrC1VUCDPjQMfnm2MlVrjWzg m7/vUWUzpN78nyW/z7+wEJsvpdiMwQnU+aMKkIcRyYGDp4JuBLai4UUw41kHIhXyqSjkeU 9Gk2O8n8MftaViM84Dm1JcspcAkxfrrh98brHoaxT4ZiacRQs+aQS3KcseQY/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 4T9nFF3PXzzMdr; Thu, 11 Jan 2024 14: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 40BEWX0D024112; Thu, 11 Jan 2024 14: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 40BEWXjb024109; Thu, 11 Jan 2024 14:32:33 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:32:33 GMT Message-Id: <202401111432.40BEWXjb024109@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: e24406084951 - stable/14 - identcpu: Let the hw.model be readable in capability mode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: e24406084951373757e55687377b08c08b21a488 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e24406084951373757e55687377b08c08b21a488 commit e24406084951373757e55687377b08c08b21a488 Author: Mark Johnston AuthorDate: 2024-01-04 13:26:53 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:19:08 +0000 identcpu: Let the hw.model be readable in capability mode On some platforms this static information can be derived directly from the CPU, and there doesn't seem much use in restricting it. Reviewed by: emaste, imp, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43281 (cherry picked from commit 0aba5dd2af57ea3ae90eb49d7745c4c5b6f0ab6b) --- sys/arm/arm/identcpu-v6.c | 2 +- sys/arm64/arm64/identcpu.c | 2 +- sys/powerpc/powerpc/cpu.c | 2 +- sys/x86/x86/identcpu.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm/arm/identcpu-v6.c b/sys/arm/arm/identcpu-v6.c index 1302d24daf02..6293a5ccaceb 100644 --- a/sys/arm/arm/identcpu-v6.c +++ b/sys/arm/arm/identcpu-v6.c @@ -56,7 +56,7 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD | CTLFLAG_CAPRD, machine, 0, "Machine class"); static char cpu_model[64]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD, cpu_model, sizeof(cpu_model), "Machine model"); static char hw_buf[81]; diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index fced2ffab258..698a98e3da1d 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -107,7 +107,7 @@ SYSCTL_PROC(_hw, HW_MACHINE, machine, CTLTYPE_STRING | CTLFLAG_RD | "Machine class"); static char cpu_model[64]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD, cpu_model, sizeof(cpu_model), "Machine model"); #define MAX_CACHES 8 /* Maximum number of caches supported diff --git a/sys/powerpc/powerpc/cpu.c b/sys/powerpc/powerpc/cpu.c index 518623af9de4..19907e3973e7 100644 --- a/sys/powerpc/powerpc/cpu.c +++ b/sys/powerpc/powerpc/cpu.c @@ -239,7 +239,7 @@ static void cpu_6xx_print_cacheinfo(u_int, uint16_t); static int cpu_feature_bit(SYSCTL_HANDLER_ARGS); static char model[64]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, model, 0, ""); +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD, model, 0, ""); static const struct cputab *cput; diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index 7fa35bd50244..3163053a123f 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -158,7 +158,7 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD | CTLFLAG_CAPRD, #endif char cpu_model[128]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_MPSAFE, +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD | CTLFLAG_MPSAFE, cpu_model, 0, "Machine model"); static int hw_clockrate; From nobody Thu Jan 11 14:32:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nFG5rMsz567SZ; Thu, 11 Jan 2024 14:32: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 4T9nFG54jMz4T1c; Thu, 11 Jan 2024 14:32:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FDR24IB4R5+qkMsxxXyOQ6sQBSMu/KS0d1KcU+F+mfo=; b=fV/Z17YXJLpciQCbu+HdW26ju8tNGtzCujR2S+DX20IYMh7G7f53c01/fSf931rMZEgcf1 1+NPAfyqCH5TutsY/1UPzLSQRWnWhc0SnXlKJcbNvoDpsLcmrQebCfpe3EmQPzt0g7IEBr 5o2kvCsumNrpGYs6kJB7f82GRUXUtV6ByYh8prr5tVW2lLOCu46sea7ii2L9hPrsJ+R/qH COrm/lyzgwc6lQVC/eVCAmewHJoWmE6JQHyBgutV2qIr0Ap8CqfEm6xMmJR4rhcrE1zfwm tHeHC4fvnZpIR/bOrpQaTU0dHwKQpgX6s25mz2H6ZwhTYwZ89n1xkNAUU/2Zzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FDR24IB4R5+qkMsxxXyOQ6sQBSMu/KS0d1KcU+F+mfo=; b=EPLB3RwoAaToxU+NNP/vpb3JWWC3bLMM09ZjIDLwYJaH8GFzB8cEQo47VPFlNO5t9Bv77T YXIn0N7GZY5odRBFuTU/D1fnxQNniIgFokP0rqJQvPDgBuVFphWLJRtW3WhevHOw5cKL1E xjOy0KN9fVt86/WgYpakEahTr0w1hLyo+et3qIF2lefbdOQqK+olUqYJQzr9/6+uB8AlAr E6f9hvQz+78BYQmH65y4hYT3nVp0p19SCLra1dIJ7r9Dcoe2P/BAhvoDUWooXNi8T58bev 5n9qabmXFGdlHipzynDGuxDT3lQzRZO566qoQbp9gnPxTOVD6kIdLTKsXO2n2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983554; a=rsa-sha256; cv=none; b=ozD1/pJGHrIsV0Rjxnli5Ypl69hCUFj9dd8HamXxf/WwEDEveV9PFechWnv0tYG4sZbr43 96rR19zUsgfx4dIIBZnfSi7DVViXDgl469qF4Fdblr+vuMpkPBFtWlWey8D6bjJ8ulbh0Q ws+w9kTVIEaUxjPQJkbqD+Q8HRE52HlbGHqCxlnzpHMZU8MAAJfYfv1An+4XOz4b5pBXUa kPIHK9xYY9lfWS4o7/Sqsc22KlepNGEpZzMcpVHNY7dfiuUuXsoPfJU5Dm4QzxxQna9Vcz i/5NfyjsIJ+xSbpvbRmvmJsu3Vc8+nd96UGqnA6gqMem0KMRvlxqcfOhkxXAyQ== 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 4T9nFG49vdzMsy; Thu, 11 Jan 2024 14:32: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 40BEWYkA024164; Thu, 11 Jan 2024 14:32:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEWY9x024161; Thu, 11 Jan 2024 14:32:34 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:32:34 GMT Message-Id: <202401111432.40BEWY9x024161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 095ea495b84e - stable/14 - sysctl: Don't pass CTLFLAG_MPSAFE to SYSCTL_STRING List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 095ea495b84e09cca5f9b16cb12972377ab17149 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=095ea495b84e09cca5f9b16cb12972377ab17149 commit 095ea495b84e09cca5f9b16cb12972377ab17149 Author: Mark Johnston AuthorDate: 2024-01-04 13:33:05 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:19:09 +0000 sysctl: Don't pass CTLFLAG_MPSAFE to SYSCTL_STRING It is redundant. No functional change intended. MFC after: 1 week (cherry picked from commit 969fc091343e593f15f0f3326f65292b435423d5) --- sys/kern/kern_mib.c | 16 ++++++++-------- sys/x86/x86/identcpu.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index 6c19deab1d25..7d2a9e7f8474 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -94,20 +94,20 @@ SYSCTL_ROOT_NODE(OID_AUTO, regression, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Regression test MIB"); #endif -SYSCTL_STRING(_kern, OID_AUTO, ident, CTLFLAG_RD|CTLFLAG_MPSAFE, +SYSCTL_STRING(_kern, OID_AUTO, ident, CTLFLAG_RD, kern_ident, 0, "Kernel identifier"); -SYSCTL_INT(_kern, KERN_OSREV, osrevision, CTLFLAG_RD|CTLFLAG_CAPRD, +SYSCTL_INT(_kern, KERN_OSREV, osrevision, CTLFLAG_RD | CTLFLAG_CAPRD, SYSCTL_NULL_INT_PTR, BSD, "Operating system revision"); -SYSCTL_STRING(_kern, KERN_VERSION, version, CTLFLAG_RD|CTLFLAG_MPSAFE, +SYSCTL_STRING(_kern, KERN_VERSION, version, CTLFLAG_RD, version, 0, "Kernel version"); -SYSCTL_STRING(_kern, OID_AUTO, compiler_version, CTLFLAG_RD|CTLFLAG_MPSAFE, +SYSCTL_STRING(_kern, OID_AUTO, compiler_version, CTLFLAG_RD, compiler_version, 0, "Version of compiler used to compile kernel"); -SYSCTL_STRING(_kern, KERN_OSTYPE, ostype, CTLFLAG_RD|CTLFLAG_MPSAFE| - CTLFLAG_CAPRD, ostype, 0, "Operating system type"); +SYSCTL_STRING(_kern, KERN_OSTYPE, ostype, CTLFLAG_RD | CTLFLAG_CAPRD, + ostype, 0, "Operating system type"); SYSCTL_INT(_kern, KERN_MAXPROC, maxproc, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &maxproc, 0, "Maximum number of processes"); @@ -141,7 +141,7 @@ SYSCTL_INT(_kern, KERN_SAVED_IDS, saved_ids, CTLFLAG_RD|CTLFLAG_CAPRD, char kernelname[MAXPATHLEN] = PATH_KERNEL; /* XXX bloat */ -SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RW | CTLFLAG_MPSAFE, +SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RW, kernelname, sizeof kernelname, "Name of kernel file booted"); #ifdef COMPAT_FREEBSD12 @@ -458,7 +458,7 @@ SYSCTL_PROC(_kern, KERN_SECURELVL, securelevel, /* Actual kernel configuration options. */ extern char kernconfstring[]; -SYSCTL_STRING(_kern, OID_AUTO, conftxt, CTLFLAG_RD | CTLFLAG_MPSAFE, +SYSCTL_STRING(_kern, OID_AUTO, conftxt, CTLFLAG_RD, kernconfstring, 0, "Kernel configuration file"); #endif diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index 3163053a123f..9c82f9f8a882 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -158,7 +158,7 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD | CTLFLAG_CAPRD, #endif char cpu_model[128]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD | CTLFLAG_MPSAFE, +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD, cpu_model, 0, "Machine model"); static int hw_clockrate; @@ -168,7 +168,7 @@ SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, u_int hv_base; u_int hv_high; char hv_vendor[16]; -SYSCTL_STRING(_hw, OID_AUTO, hv_vendor, CTLFLAG_RD | CTLFLAG_MPSAFE, hv_vendor, +SYSCTL_STRING(_hw, OID_AUTO, hv_vendor, CTLFLAG_RD, hv_vendor, 0, "Hypervisor vendor"); static eventhandler_tag tsc_post_tag; From nobody Thu Jan 11 14:32:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nFJ0jfSz567Sh; Thu, 11 Jan 2024 14:32: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 4T9nFH6HBqz4SxF; Thu, 11 Jan 2024 14:32:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=njFua8jI9uL8XQwTazZrzlkxTWhXDduQIqzk+icaWjc=; b=wrR1JWZtTIH76NlVaf47OZc+iHES4t6xkJ/942sabJB4+CgBWu2sIr89neQRSmDfa8Ed/V KZqp4iVWNfsy2tx3wJoTklRsZlbr7LQVoXE1sifckz76e5ahphj7GWpstxLYkU84lalNmP yBrO2BP6xWCl8v8Cmrs0LPFIBhQGv8l0Gbd9X9CcBAXb7LUuNQZE4UhK5BnIgXnezAgUCg rdt38zLNsL46I5oZkyVpEiROka77cBtm99WrG5cY1z9UTLGUKNvRSo9ficYHgq2c6VDzvM qs3gWuED4GvT5bK0KgLKQc9/Ckeo5HA6o1p2cyJZUokLMRc/j3O112OlnUSBnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=njFua8jI9uL8XQwTazZrzlkxTWhXDduQIqzk+icaWjc=; b=AIjEnYoTnlfwEYPELq2TCS9+yHVMqHM4hh3tuAk3vzrpmEXy/AP4VWhjxknNszS6v1WpL7 ZVup11bVi9I/zXDpNcYaz0tQTwAqd43VL2xug4y7R9RaQ4R2FNC+nloQzKgoVArs5IoPGL DTTaK8ZcRd7rT4jHAdn8SMe5SMfoD7vd/zD5Q21cW14VKi/rMxgQHtZUX+7eCuvNIDvYWF epwKdb1rk7m2dwT7j83vO/ZfDlczFX0oBmFnBh5SBG2g1lNNGGj33RzhMseW1ZMyUYNY+a oQmDoc5+pnoH8ncuiwc4axZ4NvKIowmnTd6e62ygvGwxLtuibucWjVmAXcN5Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983555; a=rsa-sha256; cv=none; b=kniCVrqX87qKMrom1WjDTesFQ+FtEqI4p9FrFLixD+eeI8+rmWrYZKvR3Kk4k9G5Rc5PCy h+8Y+5vApgEwvNho3g+CALT5IQSxt0HhGsazSIoqFlDTO65J9lJjQEo7NO+PW8/2iIjZuO XpUBI4tsJB0wSrcsFUo/8Jl9ch1VqLIYEJqO8OvcdZNfwzJHJr2N3DEmdsSycJMflFHbhJ cKcsod063YyancGPkg/Cf2gPgXhrmTkRgloIDAu1UOlODZ6RWCHVCx6371XJHvESbQaV7q rljggiLq6opvs/IKLj+sJvzzn38qJVtFTvUjCZ7xWvJXjLdHpsoDa02SyDjaLw== 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 4T9nFH5NGdzMvj; Thu, 11 Jan 2024 14:32: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 40BEWZkk024220; Thu, 11 Jan 2024 14:32:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEWZ6Y024217; Thu, 11 Jan 2024 14:32:35 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:32:35 GMT Message-Id: <202401111432.40BEWZ6Y024217@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b8233245b8d0 - stable/14 - stats: Check for errors from copyout() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: b8233245b8d04816d13ea0c4441c0ded57323840 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b8233245b8d04816d13ea0c4441c0ded57323840 commit b8233245b8d04816d13ea0c4441c0ded57323840 Author: Mark Johnston AuthorDate: 2024-01-04 13:33:58 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:19:19 +0000 stats: Check for errors from copyout() This is in preparation for annotating copyin() and related functions with __result_use_check. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43179 (cherry picked from commit a0993376ec5f979272a62b140ec9f41bc02107b3) --- sys/kern/subr_stats.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/sys/kern/subr_stats.c b/sys/kern/subr_stats.c index 0e7d2fad5f68..6a9dff2b9126 100644 --- a/sys/kern/subr_stats.c +++ b/sys/kern/subr_stats.c @@ -1108,13 +1108,19 @@ stats_v1_blob_clone(struct statsblobv1 **dst, size_t dstmaxsz, */ #ifdef _KERNEL if (flags & SB_CLONE_USRDSTNOFAULT) - copyout_nofault(src, *dst, + error = copyout_nofault(src, *dst, offsetof(struct statsblob, maxsz)); else if (flags & SB_CLONE_USRDST) - copyout(src, *dst, offsetof(struct statsblob, maxsz)); + error = copyout(src, *dst, + offsetof(struct statsblob, maxsz)); else #endif memcpy(*dst, src, offsetof(struct statsblob, maxsz)); +#ifdef _KERNEL + if (error != 0) + goto out; +#endif + if (dstmaxsz >= src->cursz) { postcurszlen = src->cursz - @@ -1126,14 +1132,18 @@ stats_v1_blob_clone(struct statsblobv1 **dst, size_t dstmaxsz, } #ifdef _KERNEL if (flags & SB_CLONE_USRDSTNOFAULT) - copyout_nofault(&(src->cursz), &((*dst)->cursz), + error = copyout_nofault(&(src->cursz), &((*dst)->cursz), postcurszlen); else if (flags & SB_CLONE_USRDST) - copyout(&(src->cursz), &((*dst)->cursz), postcurszlen); + error = copyout(&(src->cursz), &((*dst)->cursz), + postcurszlen); else #endif memcpy(&((*dst)->cursz), &(src->cursz), postcurszlen); } +#ifdef _KERNEL +out: +#endif return (error); } From nobody Thu Jan 11 14:32:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nFK1YTHz5680D; Thu, 11 Jan 2024 14:32: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 4T9nFJ6shRz4Sfl; Thu, 11 Jan 2024 14:32:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mX8VnOWwmB6fAAKpqpw7/jHNkmEP4aDLRRIWA2NharY=; b=ErA0F/ZS4CHRZ5AiSxMB0Ce/z+hpKxRv5B1bCkc3m6o+Vtbzmha4jyYlweiUvgGeYsvDZH Ulmaofm1xBaiCZQqbjXB5WC3E/uFf9lLRacnoqGfZnDPvWy2kedEFRyK5uY/xxq2KGAetD lumxpju22p2bHNwq+bNGEIQrEhDRvPDZUkz6L+lG9MzDL6PQkv68VJaoKKhaUI4yFdwIIM aNSkZ5Cjh/P3BqukvVlVDiSXYjfxKSV6y4RBEkb0KfULs3CM7uXtp90v4wRV5y83g0oEZ5 yH0yZlLk2nQZU36/Ua21YxFwCYm1BjdHgnFiXSybbEYoYqiJy/VWpCZqz8IrRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mX8VnOWwmB6fAAKpqpw7/jHNkmEP4aDLRRIWA2NharY=; b=Ckteiys/dud9s4EM3sbLLxt0W44nn+ZmyHJZvlKJUhXl5ilzuyKwtkgnyWU3fkZ42vA4c8 KRUp8yD//ek9RqA2sYsmRUpGmMStNGv5VOoJXAb0cvPxCYgbum3r1ELOn+pKpljaxBYvgT N0KRE6/u7ELHe1V7MavPjbCIejPDkaw8O1aX4sNjMY4mZ3bccbOQB2DXFTXFf8BVqw/s4y VJXi0VPdqr5haOpj8dxrRtaSIY5cYebQ/Wd8PzGspYcadhiI4X9N42LtVLQOaYb09hqulg tba4uktnOgDmSb3gtG5/py87Htw2NXiYe5hIzqwcw65w4QkOD1j9BSq7qBVjfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983557; a=rsa-sha256; cv=none; b=taa7n/KRDTm62FovVLKnXmwF6mjwMf6Vj+YtPpFOwvYWU7RPSYidrHmGEAK2pJ+tcl3X2c WAqu5LZQU1q/6e5k/aOiygF46zqX1wU53B80dN2Im/wpP/Y05bCQ3UEO6qFdv6mEOqi5uG PCwHhPtkENmsiJZCx3XTBZiMNi6/xbMbm6MGYK7Qc9eoNV9n7D5fkJQFceLqKyPHNraBnD ahTRKRLyH10IUiwVWA1LW7zByDBsO7QZWGQMboOnNPWXDT77TeqOBV3mw4sobpwFXtz9L4 dzvJCUM/MRCprzhIZBg9osakprGX9cdyYPi4lepIRrBAyiqJv+IHJisGEzwwUA== 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 4T9nFJ5zKnzMvk; Thu, 11 Jan 2024 14:32: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 40BEWaXG024256; Thu, 11 Jan 2024 14:32:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEWa24024253; Thu, 11 Jan 2024 14:32:36 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:32:36 GMT Message-Id: <202401111432.40BEWa24024253@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 208e68be1fae - stable/14 - vfs: Simplify vrefact() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 208e68be1faed42ede97431476b33fc88cfd2429 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=208e68be1faed42ede97431476b33fc88cfd2429 commit 208e68be1faed42ede97431476b33fc88cfd2429 Author: Mark Johnston AuthorDate: 2024-01-04 13:11:44 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:19:45 +0000 vfs: Simplify vrefact() refcount_acquire() returns the old value, just use that. No functional change intended. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43255 (cherry picked from commit 27f4eda3ddce4009a0ec9be68f474fe3be38933f) --- sys/kern/vfs_subr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 0fe2bc46446c..811c5cef45d1 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -3360,14 +3360,11 @@ vref(struct vnode *vp) void vrefact(struct vnode *vp) { + int old __diagused; CTR2(KTR_VFS, "%s: vp %p", __func__, vp); -#ifdef INVARIANTS - int old = atomic_fetchadd_int(&vp->v_usecount, 1); + old = refcount_acquire(&vp->v_usecount); VNASSERT(old > 0, vp, ("%s: wrong use count %d", __func__, old)); -#else - refcount_acquire(&vp->v_usecount); -#endif } void From nobody Thu Jan 11 14:32:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nFL1WJnz567hw; Thu, 11 Jan 2024 14:32: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 4T9nFL0MWTz4T77; Thu, 11 Jan 2024 14:32:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3lY5J1/EZYsPi2aMmVrvuGU0fxUJcFA4X9T+hdvlU2I=; b=pYqrfBzt4dwsHlNVCSZ9pTe6S2pqqDQ2A3Z8sGbWequ0Lgf7Z6CklnK+tNsJFUNwy3nL8w tU7hwpznEENE2EOAMNNsST4voiwX8WQi4fwBHi1X2IgDrwcxFI+AC0wQLo7JW06T8TnCO4 GaUwSdjxH5kTWeB2R+jIRHFj6ZsE2Kgy5zYuD6rMQxLFV2hLJCRp5IVDLvvN/DvdMUKRmX xYYffaowdw88cZjcjSMuxh/oUDXb8Cy7S3GLbRMfjjcEyhyiBGkpWeV0EsWy+H2QMgpdIH 4bGpFM7CI8Bj1KA4xvRVwRz7uEOr25yTWI7rgsCZlzrDVFtOC4CIxjMYf9h/Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3lY5J1/EZYsPi2aMmVrvuGU0fxUJcFA4X9T+hdvlU2I=; b=G0cy4Tacl7dsqiVhvg9bTl7fVz0awQX4PUklLVEYYJYLSDvENopWf+o0cyg/RAKzrxWLg/ WtImqOdRSyPWN1MCeMmDaFU+Djh0hs2TZ1zb2aqhn2xeKaMGRM9uwInGE74C51aZGZkxnq AIcyHidgpKmur7sZ2jzLLDjMQLXXpTssXf7ogxmQUUNKbDkD4BOlQwCFMRO+2YxBkpvDEj R9mMGoLsocxiCGeslpGSWyPYybETCeSGqGFbXQ5eGZvmzJY94/Qnfvqi05KqbXaxgRTbUd KlUpXjkxjfLIeeFE59DsTHUwkG99nCg5f2dY/LBwuxYS5ddChRcmYivhEZ7Y+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983558; a=rsa-sha256; cv=none; b=rJrYyqQyfz0g+QkjrMDANu5KgJ/RiIqDtKUW3kMHsMDgNLqDnwDlgae0MtYzOpoosOCbBQ 0vOK3HfrlA8noS4UIR4It42l9dI+8nWEfPWe6I6rIcTve6SGy6aXkDL8uetd7BQQNGbZgE B1dPgL7EJVJtVPLNJ5sHQvs1ZQQuCn9PGI1FokZeHA6oM4L48vO9rLE/8lj0Mt5aAl7p7k OVGrTK3LyBCy36Ft/QcHcPxGD8OODl1Dn5oKcHsYjav+PHZ9UoJGV7uudKhqYO76+KAto7 SdGgjenxITnK7SC2gG2mtoG42uQcOcIuK/j+qIqwwgIdk3SPzMEWptZ3Xcef+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 4T9nFK6SpwzMrJ; Thu, 11 Jan 2024 14:32: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 40BEWbil024317; Thu, 11 Jan 2024 14:32:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEWbAg024314; Thu, 11 Jan 2024 14:32:37 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:32:37 GMT Message-Id: <202401111432.40BEWbAg024314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c2b07a75af21 - stable/14 - file: Remove the fd parameter to fgetvp_lookup() and fgetvp_lookup_smr() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: c2b07a75af217f11a96de83c31649e4cf567a9d9 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c2b07a75af217f11a96de83c31649e4cf567a9d9 commit c2b07a75af217f11a96de83c31649e4cf567a9d9 Author: Mark Johnston AuthorDate: 2024-01-04 13:11:54 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:19:46 +0000 file: Remove the fd parameter to fgetvp_lookup() and fgetvp_lookup_smr() The fd is always obtained from nameidata, so just fetch it from there instead. No functional change intended. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43257 (cherry picked from commit 55edc40e0c7543c6ea08a28d828bcbf0c8b5dad9) --- sys/kern/kern_descrip.c | 10 +++++++--- sys/kern/vfs_cache.c | 2 +- sys/kern/vfs_lookup.c | 2 +- sys/sys/file.h | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 6ed824e229d6..fe6928e421db 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2964,7 +2964,7 @@ fget_cap(struct thread *td, int fd, cap_rights_t *needrightsp, #ifdef CAPABILITIES int -fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, bool *fsearch) +fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, bool *fsearch) { const struct filedescent *fde; const struct fdescenttbl *fdt; @@ -2974,9 +2974,11 @@ fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, bool *fsear const cap_rights_t *haverights; cap_rights_t rights; seqc_t seq; + int fd; VFS_SMR_ASSERT_ENTERED(); + fd = ndp->ni_dirfd; rights = *ndp->ni_rightsneeded; cap_rights_set_one(&rights, CAP_LOOKUP); @@ -3030,15 +3032,17 @@ fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, bool *fsear } #else int -fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, bool *fsearch) +fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, bool *fsearch) { const struct fdescenttbl *fdt; struct filedesc *fdp; struct file *fp; struct vnode *vp; + int fd; VFS_SMR_ASSERT_ENTERED(); + fd = ndp->ni_dirfd; fdp = curproc->p_fd; fdt = fdp->fd_files; if (__predict_false((u_int)fd >= fdt->fdt_nfiles)) @@ -3066,7 +3070,7 @@ fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, bool *fsear #endif int -fgetvp_lookup(int fd, struct nameidata *ndp, struct vnode **vpp) +fgetvp_lookup(struct nameidata *ndp, struct vnode **vpp) { struct thread *td; struct file *fp; diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 8917666950c1..e3ab80f94482 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4422,7 +4422,7 @@ cache_fplookup_dirfd(struct cache_fpl *fpl, struct vnode **vpp) ndp = fpl->ndp; cnp = fpl->cnp; - error = fgetvp_lookup_smr(ndp->ni_dirfd, ndp, vpp, &fsearch); + error = fgetvp_lookup_smr(ndp, vpp, &fsearch); if (__predict_false(error != 0)) { return (cache_fpl_aborted(fpl)); } diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 922adda33b94..6c83746eaf8b 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -360,7 +360,7 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, struct pwd **pwdp) if (cnp->cn_flags & AUDITVNODE2) AUDIT_ARG_ATFD2(ndp->ni_dirfd); - error = fgetvp_lookup(ndp->ni_dirfd, ndp, dpp); + error = fgetvp_lookup(ndp, dpp); } if (error == 0 && (*dpp)->v_type != VDIR && (cnp->cn_pnbuf[0] != '\0' || diff --git a/sys/sys/file.h b/sys/sys/file.h index 214e8a31c969..dcc739e2e9de 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -291,8 +291,8 @@ int fgetvp_read(struct thread *td, int fd, cap_rights_t *rightsp, struct vnode **vpp); int fgetvp_write(struct thread *td, int fd, cap_rights_t *rightsp, struct vnode **vpp); -int fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, bool *fsearch); -int fgetvp_lookup(int fd, struct nameidata *ndp, struct vnode **vpp); +int fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, bool *fsearch); +int fgetvp_lookup(struct nameidata *ndp, struct vnode **vpp); static __inline __result_use_check bool fhold(struct file *fp) From nobody Thu Jan 11 14:32:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nFM4phTz5680H; Thu, 11 Jan 2024 14:32: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 4T9nFM1XXSz4T7K; Thu, 11 Jan 2024 14:32:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4mass2c0fCDrjxjqVzVLrOxaR97g3YljGYV4Dq1pFtk=; b=oMfiK412bhx81sREvffY7XpZmDKyWaXhtjwY3L87JBrIUDzKutMf4AIr6QeliMl65TxIBv 8c5CV6WOgrvjQY4oa0mi8r9UOfTuKqFraIkL3dkqfiOmvbaVRk416xgDHSk6P+lIlx34TO fcLRLqHeL+noA4An6pK51Hg73zUMDzXAjtzwgzknzJHcYosoQBqiv+jw6sgyS7NUIkTGa6 FworjLGUn3hKhHo1gbQnoRrW6F1Bw1Urp44CEVX1isAUT8sniHtFkcz67uqUKln0GUrmkc wOgpX48hVD8m6vVKg1ybbu9jTW/lN8NIucY7uB037AckWngaaVMRj+mxf5WtXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4mass2c0fCDrjxjqVzVLrOxaR97g3YljGYV4Dq1pFtk=; b=fiDs0UzixLQDWzDsgSAEtohSCJgBA3RAIcMAaofEExh5joBKY8iP2qwNhGF2glwO2Pu6td HjFGn9nTzr5RS3xy6Th1HB5K/QeXci3eCc57KMXdAymcPWQhSx7jujTE/Um7ySQuDxXtQG 051vcoKKUtdXwLhG3u7K4BB0oTWeWE4uE72GGgqXrRi39FkpXmQdKjSuTG+/RuwY5IWYQQ 8TUPSB/PUPWTEcgA3u68+svAQ8XvRKLRoiysUufOYWebboj79MWyxA8nImwrUb2hwfzIW6 kGvSoJH9fLjQ9ZoXv0VJ742QyXxwlXMTXQScFlRTKNj2jZXC1bBm0S8TrbFSlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983559; a=rsa-sha256; cv=none; b=GMJDjAOVcBiYh1q1aBg8s1pwxXRIBRAGLCoQHhcKwVRvRwCrbwm4SJizbPKco6XL8bnLAP FHti6uInbscPiENgrN9UhoD1KgAR13mJC5UNoBi3b6fDCJoSK1BVqTBsOx/eT+YIv3lMRQ xwXoxgJliZIOM9IYeEOw2wyze8LgWJPeSUnj7Hz+voLzLPyiIm5VpKfMxaxf4YtncIfUZY iSNDAbgYRDysdysTE1/p08vAAkV6ZgccB4ba7X8/63oScjgoGsBOhAhchYzettbFFuQtbu eMxIZAGyn0HkZ/i59k5VAIsG/xRFoTYFU7vISCDypJShi6Cv1tXojIEwf1FhZA== 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 4T9nFM0ZHczMvl; Thu, 11 Jan 2024 14:32: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 40BEWcCu024362; Thu, 11 Jan 2024 14:32:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEWcm6024359; Thu, 11 Jan 2024 14:32:38 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:32:38 GMT Message-Id: <202401111432.40BEWcm6024359@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: e4db787bb86b - stable/14 - frag6: Add another use of frag6_rmqueue() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: e4db787bb86b2d7b26ed241df47e6ea03dded2ef Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e4db787bb86b2d7b26ed241df47e6ea03dded2ef commit e4db787bb86b2d7b26ed241df47e6ea03dded2ef Author: Mark Johnston AuthorDate: 2024-01-04 13:11:19 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:22:14 +0000 frag6: Add another use of frag6_rmqueue() No functional change intended. Reviewed by: kp, bz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43256 (cherry picked from commit 8d01ecd8e9da5192a8b2dfb6c7d58b4aae9ea358) --- sys/netinet6/frag6.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index fbdbc3ef2f28..e976298bf984 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -862,10 +862,6 @@ postinsert: ip6->ip6_flow |= htonl(IPTOS_ECN_CE << 20); nxt = q6->ip6q_nxt; - TAILQ_REMOVE(head, q6, ip6q_tq); - V_ip6qb[bucket].count--; - atomic_subtract_int(&frag6_nfrags, q6->ip6q_nfrag); - ip6_deletefraghdr(m, offset, M_NOWAIT); /* Set nxt(-hdr field value) to the original value. */ @@ -874,10 +870,9 @@ postinsert: #ifdef MAC mac_ip6q_reassemble(q6, m); - mac_ip6q_destroy(q6); #endif - free(q6, M_FRAG6); - atomic_subtract_int(&V_frag6_nfragpackets, 1); + atomic_subtract_int(&frag6_nfrags, q6->ip6q_nfrag); + frag6_rmqueue(q6, bucket); if (m->m_flags & M_PKTHDR) { /* Isn't it always true? */ From nobody Thu Jan 11 14:32:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nFN4fD1z567Yr; Thu, 11 Jan 2024 14:32: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 4T9nFN2dmJz4T0G; Thu, 11 Jan 2024 14:32:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zN8LDzqlfImy595NP3sOcehoM9MfqIVFaoup4z5fO5A=; b=RVPEKfD8Bf3Sj/zw3hKwZy26Q3ju8/NIMoIFl/4iqmgFpgt52aXggNc0+1+yVVrjZmua0H ZO91J0rcPtQBVI72gjn4zJ/lHZpDZNTl/PB37+1+q41grZn4dkM7pC5F+apwHjRlRqRtWB bXLOd73OuhSjtHZYtI2lCjGP7pJ3nFEay4YJMIshkCUiRSbeiqxWvsPcqk1gtEB4o8oD82 AddZWugw3W53QGyUC1/q+OHkLSnassjZDF8ryjLQq6u7KZmN3D/ryNGS2u62oFBSVcftSb t/wz+SLn/uHGo8Pw+59pJbwDMdISucFwSRHgdB6pVst16IMxXjM6TgYlAWjFoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zN8LDzqlfImy595NP3sOcehoM9MfqIVFaoup4z5fO5A=; b=HnzSjHE70E802IbYfsl6TXO1T5oUwi081zXpsZIcdhES63N9NkQoJjjCKsFcPToPNisUDZ CyGeAnWZLEsw8iO7jxPr13c05Wm81lCi6iOxZ3N2fPDmFazl99QVolzNEa7OxdY0zzhrKg o+W9xTcF+UaVjSixbTinuPdSpN10sSonRcFBl8HEaPs6mCuBQhj3xF7gID7fzMQm2pU8hC VaVhLWSyWDRxfvpusMFC7whB2oeVEMc4DGOzUSS+bpkijnQg54F5EENNUnlhB3yxe2pXc2 UUmlUkpE4/B36BD4/jkWCcIzzfihblDI7+KwQ9Q6LpBvFQh6ZATMi/I/4r5HmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983560; a=rsa-sha256; cv=none; b=Dv7od9ECpGkydkmt3ao53GHEg+QavgKuoHIGIJMZI6jJKSEe+0NUcrhI+XS+TiiSkW9VgF sD2HZmfdU5B6O4rRSNSdidt9ZY1PJ3jFAJTzYt7NkFX9I20cy2G9pB8UZOPpVLmRmSvN9X tjAUh1uOzRUH6JW59GiWF/yhy6mJueJXp77t0O8vFB1C7CcOJxFcTNegZLcexEnCw2kUWo N0ilK6cpALsnbiAS/l6RuCZVzOXvWu3wXoVuLJ8kd/y6EoDXq9Rnmn0vHEvBG9bLv+6lOi 0asW9K3MukZ5w0Zai1rXMrfhKP5jXkgnxJ5It8TbrXr10sbJVN/FaRosNQ8Xlg== 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 4T9nFN1d9PzMpy; Thu, 11 Jan 2024 14:32: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 40BEWeDk024407; Thu, 11 Jan 2024 14:32:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEWe7x024404; Thu, 11 Jan 2024 14:32:40 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:32:40 GMT Message-Id: <202401111432.40BEWe7x024404@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 758c5b5c02d0 - stable/14 - cam: Let cam_periph_unmapmem() return an error List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 758c5b5c02d0a50f00032a2cda533f5590fb47a7 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=758c5b5c02d0a50f00032a2cda533f5590fb47a7 commit 758c5b5c02d0a50f00032a2cda533f5590fb47a7 Author: Mark Johnston AuthorDate: 2023-12-28 17:08:04 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:22:37 +0000 cam: Let cam_periph_unmapmem() return an error As of commit b059686a71c8, cam_periph_unmapmem() can legitimately fail if the copyout() operation fails. However, this failure was never signaled to upper layers. In practice it is unlikely to occur since cap_periph_mapmem() would most likely fail in such circumstances anyway, but an error is nonetheless possible. However, some code reading revealed a few paths where the return value of cam_periph_mapmem() is not checked, and this is definitely a bug. Add error checking there and let cam_periph_unmapmem() return errors from copyout(). Reviewed by: dab, mav MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43201 (cherry picked from commit d068ea16e3264c2d62472a8acf794262cfe703dd) --- sys/cam/cam_compat.c | 21 +++++++++++++-------- sys/cam/cam_periph.c | 21 +++++++++++++-------- sys/cam/cam_periph.h | 2 +- sys/cam/cam_xpt.c | 4 +--- sys/cam/nvme/nvme_da.c | 5 +++-- sys/cam/scsi/scsi_pass.c | 4 ++-- sys/cam/scsi/scsi_sg.c | 6 ++++-- sys/cam/scsi/scsi_target.c | 29 ++++++++++++++++++++--------- 8 files changed, 57 insertions(+), 35 deletions(-) diff --git a/sys/cam/cam_compat.c b/sys/cam/cam_compat.c index c377763fc7c5..aed3916267d5 100644 --- a/sys/cam/cam_compat.c +++ b/sys/cam/cam_compat.c @@ -380,11 +380,13 @@ cam_compat_translate_dev_match_0x18(union ccb *ccb) struct dev_match_result *dm; struct dev_match_result_0x18 *dm18; struct cam_periph_map_info mapinfo; - int i; + int error, i; /* Remap the CCB into kernel address space */ bzero(&mapinfo, sizeof(mapinfo)); - cam_periph_mapmem(ccb, &mapinfo, maxphys); + error = cam_periph_mapmem(ccb, &mapinfo, maxphys); + if (error != 0) + return (error); dm = ccb->cdm.matches; /* Translate in-place: old fields are smaller */ @@ -432,21 +434,22 @@ cam_compat_translate_dev_match_0x18(union ccb *ccb) } } - cam_periph_unmapmem(ccb, &mapinfo); - - return (0); + return (cam_periph_unmapmem(ccb, &mapinfo)); } static int cam_compat_handle_0x19(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td, d_ioctl_t *cbfnp) { + struct cam_periph_map_info mapinfo; union ccb *ccb = (union ccb *)addr; - struct cam_periph_map_info mapinfo; + int error; if (cmd == CAMIOCOMMAND && ccb->ccb_h.func_code == XPT_DEV_MATCH) { bzero(&mapinfo, sizeof(mapinfo)); - cam_periph_mapmem(ccb, &mapinfo, maxphys); + error = cam_periph_mapmem(ccb, &mapinfo, maxphys); + if (error != 0) + return (error); for (int i = 0; i < ccb->cdm.num_patterns; i++) { struct dev_match_pattern *p = &ccb->cdm.patterns[i]; @@ -460,7 +463,9 @@ cam_compat_handle_0x19(struct cdev *dev, u_long cmd, caddr_t addr, int flag, p->pattern.periph_pattern.flags == 0x01f) p->pattern.periph_pattern.flags = PERIPH_MATCH_ANY; } - cam_periph_unmapmem(ccb, &mapinfo); + error = cam_periph_unmapmem(ccb, &mapinfo); + if (error != 0) + return (error); } return ((cbfnp)(dev, cmd, addr, flag, td)); } diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index ebdda9ef449f..af187d3eab51 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -1014,17 +1014,17 @@ fail: * Unmap memory segments mapped into kernel virtual address space by * cam_periph_mapmem(). */ -void +int cam_periph_unmapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo) { - int numbufs, i; + int error, numbufs, i; uint8_t **data_ptrs[CAM_PERIPH_MAXMAPS]; uint32_t lengths[CAM_PERIPH_MAXMAPS]; uint32_t dirs[CAM_PERIPH_MAXMAPS]; if (mapinfo->num_bufs_used <= 0) { /* nothing to free and the process wasn't held. */ - return; + return (0); } switch (ccb->ccb_h.func_code) { @@ -1089,12 +1089,11 @@ cam_periph_unmapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo) numbufs = 1; break; default: - /* allow ourselves to be swapped once again */ - PRELE(curproc); - return; - break; /* NOTREACHED */ + numbufs = 0; + break; } + error = 0; for (i = 0; i < numbufs; i++) { if (mapinfo->bp[i]) { /* unmap the buffer */ @@ -1104,8 +1103,12 @@ cam_periph_unmapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo) uma_zfree(pbuf_zone, mapinfo->bp[i]); } else { if (dirs[i] != CAM_DIR_OUT) { - copyout(*data_ptrs[i], mapinfo->orig[i], + int error1; + + error1 = copyout(*data_ptrs[i], mapinfo->orig[i], lengths[i]); + if (error == 0) + error = error1; } free(*data_ptrs[i], M_CAMPERIPH); } @@ -1116,6 +1119,8 @@ cam_periph_unmapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo) /* allow ourselves to be swapped once again */ PRELE(curproc); + + return (error); } int diff --git a/sys/cam/cam_periph.h b/sys/cam/cam_periph.h index d0f04388b181..ad18ee6b204c 100644 --- a/sys/cam/cam_periph.h +++ b/sys/cam/cam_periph.h @@ -180,7 +180,7 @@ void cam_periph_invalidate(struct cam_periph *periph); int cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo, u_int maxmap); -void cam_periph_unmapmem(union ccb *ccb, +int cam_periph_unmapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo); union ccb *cam_periph_getccb(struct cam_periph *periph, uint32_t priority); diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 26e656fc5ff2..6eac81c18160 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -566,11 +566,9 @@ xptdoioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread * /* * Map the buffers back into user space. */ - cam_periph_unmapmem(inccb, &mapinfo); + error = cam_periph_unmapmem(inccb, &mapinfo); inccb->ccb_h.path = old_path; - - error = 0; break; } default: diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c index e8e75a121679..9901ecccf21c 100644 --- a/sys/cam/nvme/nvme_da.c +++ b/sys/cam/nvme/nvme_da.c @@ -438,8 +438,9 @@ ndaioctl(struct disk *dp, u_long cmd, void *data, int fflag, * Tear down mapping and return status. */ cam_periph_unlock(periph); - cam_periph_unmapmem(ccb, &mapinfo); - error = cam_ccb_success(ccb) ? 0 : EIO; + error = cam_periph_unmapmem(ccb, &mapinfo); + if (!cam_ccb_success(ccb)) + error = EIO; out: cam_periph_lock(periph); xpt_release_ccb(ccb); diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c index cf27c304d919..ff48bed30e68 100644 --- a/sys/cam/scsi/scsi_pass.c +++ b/sys/cam/scsi/scsi_pass.c @@ -2237,14 +2237,14 @@ passsendccb(struct cam_periph *periph, union ccb *ccb, union ccb *inccb) } cam_periph_unlock(periph); - cam_periph_unmapmem(ccb, &mapinfo); + error = cam_periph_unmapmem(ccb, &mapinfo); cam_periph_lock(periph); ccb->ccb_h.cbfcnp = NULL; ccb->ccb_h.periph_priv = inccb->ccb_h.periph_priv; bcopy(ccb, inccb, sizeof(union ccb)); - return(0); + return (error); } /* diff --git a/sys/cam/scsi/scsi_sg.c b/sys/cam/scsi/scsi_sg.c index b17a156503a2..66ea4b4aa2d7 100644 --- a/sys/cam/scsi/scsi_sg.c +++ b/sys/cam/scsi/scsi_sg.c @@ -883,7 +883,7 @@ sgsendccb(struct cam_periph *periph, union ccb *ccb) { struct sg_softc *softc; struct cam_periph_map_info mapinfo; - int error; + int error, error1; softc = periph->softc; bzero(&mapinfo, sizeof(mapinfo)); @@ -908,7 +908,9 @@ sgsendccb(struct cam_periph *periph, union ccb *ccb) softc->device_stats); cam_periph_unlock(periph); - cam_periph_unmapmem(ccb, &mapinfo); + error1 = cam_periph_unmapmem(ccb, &mapinfo); + if (error == 0) + error = error1; cam_periph_lock(periph); return (error); diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c index 45a5eb8415b9..6b2fd5adb4ee 100644 --- a/sys/cam/scsi/scsi_target.c +++ b/sys/cam/scsi/scsi_target.c @@ -906,18 +906,29 @@ targreturnccb(struct targ_softc *softc, union ccb *ccb) u_ccbh = &descr->user_ccb->ccb_h; /* Copy out the central portion of the ccb_hdr */ - copyout(&ccb->ccb_h.retry_count, &u_ccbh->retry_count, - offsetof(struct ccb_hdr, periph_priv) - - offsetof(struct ccb_hdr, retry_count)); + error = copyout(&ccb->ccb_h.retry_count, &u_ccbh->retry_count, + offsetof(struct ccb_hdr, periph_priv) - + offsetof(struct ccb_hdr, retry_count)); + if (error != 0) { + xpt_print(softc->path, + "targreturnccb - CCB header copyout failed (%d)\n", error); + } /* Copy out the rest of the ccb (after the ccb_hdr) */ ccb_len = targccblen(ccb->ccb_h.func_code) - sizeof(struct ccb_hdr); - if (descr->mapinfo.num_bufs_used != 0) - cam_periph_unmapmem(ccb, &descr->mapinfo); - error = copyout(&ccb->ccb_h + 1, u_ccbh + 1, ccb_len); - if (error != 0) { - xpt_print(softc->path, - "targreturnccb - CCB copyout failed (%d)\n", error); + if (descr->mapinfo.num_bufs_used != 0) { + int error1; + + error1 = cam_periph_unmapmem(ccb, &descr->mapinfo); + if (error == 0) + error = error1; + } + if (error == 0) { + error = copyout(&ccb->ccb_h + 1, u_ccbh + 1, ccb_len); + if (error != 0) { + xpt_print(softc->path, + "targreturnccb - CCB copyout failed (%d)\n", error); + } } /* Free CCB or send back to devq. */ targfreeccb(softc, ccb); From nobody Thu Jan 11 14:32:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nFP5ctmz567mw; Thu, 11 Jan 2024 14:32:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9nFP3YJ4z4T7l; Thu, 11 Jan 2024 14:32:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VFGW/jHclVO0Nt7T3uHiShlf6am8BLQrtDOxn/YaKRw=; b=EHLorSwPWuYGCVK7I5CL7Zpcp5RaPD4q3SS4mcdCHpDX2NiiZHQmiECcU2osA1DuGOJgYb mYmL+cFxJ2B07KudvFUAmx2l27EGNoRfsdu2JB9U9CGt9zKpuw7CFTI9wxyCj5AsKrpcxl WNAnEB3lau9fub+ObZAPMTm7lmVEUcsRxViClss/dE1dnbJF444w5XLfIXtPrBcggcPhKU eqdieIUtCZ+rjxfe0dhoFQJjQytWd01VqdRR/6rtmELPV4ETAqGJzQrop2V+T/XkWJ/Yr3 IQNZvFptkdWrMdvkTAANzPw9r5OfDXCay06JjIlsTjUOLDB9MH8EAxrOxCWAzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VFGW/jHclVO0Nt7T3uHiShlf6am8BLQrtDOxn/YaKRw=; b=CoIZN2RQAWDEXzIq9MsMTwCoglbyGLud8577+36JkgInqAZWUDkx2FBoB7ox/hrCFRYTGm 2D5I9EBrq0JvWTtRbFMu+fyYdXRk8Pq/teVtMwbRQauF3tn6s1gd+5we0+S1aG9tFreBxB YiI4/xh/RuMSZDsguD8kpN/ljupJwXfIpEEOFv0ePer3yPMkByjSTgcm3kulaa+MdfzHEA 0VsEJqw2mLc+/3kDC36ClPVo88sB1xZMEhJuxsVetZzatbuL7JshNv1rW4p/jUI0hqFfvs ip5KtfqoIBwYzZO2SO6P0PuLsDEHH2PNp4XKmW9QWnQsK9jc3DkZqGVCrFc1fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983561; a=rsa-sha256; cv=none; b=nDOyK2oNki3jjZXunyi8PhovpkJfbQB/nvZC6FD5XUxd3sJ4RjepqYq4JL+yaUqM92zrEQ khYi9A+sEnY1Bl8aKQIU4wN6Z3c2msWL/a+2uSCBNtjzujzxVNHcAw/NUf9ZksXZ0Zli9i XiLFvo9xi/QEy+cO8L5Nbu1GoIRH1L0kZJcHPXvId1ChMviNB6HacysMDXq2kPatm7gk73 PgB/VOl9srP1c9ytEmUOJAbOXTfbp1vIAtoa58X2yZDGOufggh+m0Sb+dh/K6B7l4Mkegf 4ssOrQmCpEzQpOB3uO14B5ZGKVFQZNc1+PtYD3qB1g15S0D4hIpi5FYmSjObFA== 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 4T9nFP2dPPzN63; Thu, 11 Jan 2024 14:32:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40BEWf2j024455; Thu, 11 Jan 2024 14:32:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEWf21024452; Thu, 11 Jan 2024 14:32:41 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:32:41 GMT Message-Id: <202401111432.40BEWf21024452@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 185634d86d96 - stable/14 - targ: Handle errors from suword() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 185634d86d96b836336862d80e4e454c91e3ad99 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=185634d86d96b836336862d80e4e454c91e3ad99 commit 185634d86d96b836336862d80e4e454c91e3ad99 Author: Mark Johnston AuthorDate: 2024-01-04 13:34:31 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:26:53 +0000 targ: Handle errors from suword() In targstart() we are already handling an error and have no go way to signal the failure to upper layers, so ignore the return value of suword() there. This is in preparation for annotating copyin() and related functions with __result_use_check. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43202 (cherry picked from commit 904cd456f0f95c10fdb4c99a0118f30d23242dec) --- sys/cam/scsi/scsi_target.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c index 6b2fd5adb4ee..6872e3a2a93b 100644 --- a/sys/cam/scsi/scsi_target.c +++ b/sys/cam/scsi/scsi_target.c @@ -635,8 +635,8 @@ targstart(struct cam_periph *periph, union ccb *start_ccb) xpt_print(periph->path, "targsendccb failed, err %d\n", error); xpt_release_ccb(start_ccb); - suword(&descr->user_ccb->ccb_h.status, - CAM_REQ_CMP_ERR); + (void)suword(&descr->user_ccb->ccb_h.status, + CAM_REQ_CMP_ERR); TAILQ_INSERT_TAIL(&softc->abort_queue, descr, tqe); notify_user(softc); } @@ -868,7 +868,10 @@ targread(struct cdev *dev, struct uio *uio, int ioflag) CAM_DEBUG(softc->path, CAM_DEBUG_PERIPH, ("targread aborted descr %p (%p)\n", user_descr, user_ccb)); - suword(&user_ccb->ccb_h.status, CAM_REQ_ABORTED); + if (suword(&user_ccb->ccb_h.status, CAM_REQ_ABORTED) != 0) { + error = EFAULT; + goto read_fail; + } cam_periph_unlock(softc->periph); error = uiomove((caddr_t)&user_ccb, sizeof(user_ccb), uio); cam_periph_lock(softc->periph); From nobody Thu Jan 11 14:35:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nJQ6nSXz568GB; Thu, 11 Jan 2024 14:35: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 4T9nJQ6Jlxz4XWd; Thu, 11 Jan 2024 14:35:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B8b10SkBubsHMamN2dKcIKKyRA3PvZt10Ff3X0ST/N8=; b=Ar4EmQlh2pGS64vhl9QS8JiJ9EnZ5ZFHXW8jF8yRbZB9/NRLmMnvhnQCfAvcS5qvUm41VS GrRxDbYoYLzcon/U1U5fPQGgtsCBlD2xYyilsPrwfvgXU4A2yEx2fSI2rWvXmtRc63GHSS V3oWkUgDsmAJ6E1GJwB0Lk8P1jesco6rBQ/2dY8bCfaGq9CW4tknUCaQSNFJMjKHtRbsD9 Dc/Rr9ww2o7DNNIq8HEMe0Xp3DsDDqJhs45L7EqrVGkG7LLc4lT2jDAQVvm1RuAyJVf3Zg 8y9H0XZuRsianOKDfe8uvMhqVM0jsa79OmOUk4F++f4I7Gb9E+icxisq5oN1Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B8b10SkBubsHMamN2dKcIKKyRA3PvZt10Ff3X0ST/N8=; b=pwNjFJzz4RZYuzwV6/ZR7PuWffoTgrYNOIHGdwCXQym8afLMurQMm1Vf6YQIvcyNmyO3tc 8cz+sr4BD0X6iQsDrZ4CC/g/ZF/bL6X1HPLPmC2hBhRSqLvy63bqK5sWZrhlxSBw2g7iRk chJ3QfmqpHq/F/24CGQYCklHVz5AUY50iLl1GT6cx/Aq3B4WY7KBqcHDJ+b2Pnwn5ZHPp6 xRyL6NZ8f3TEo1rdEbsmqPUl3BuJqgHoUQ4y4nCMWPBd8JLCOmA4lylloeadNSG3lZejuL 8uzb8IzYqEOtdz1+URd5o5JKZfb8EuLu4Pwmy26fkK5R9NdZWQcIryTL6unFdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983718; a=rsa-sha256; cv=none; b=G4udsxMMFe0Z82pfhSQ7c+IYtmlTLxHEEwsCJtAuKPBuPKCgJiUlyxugd7ZqBX4iasTa6n lXVzcsbxOab0dCfdwQ/zZ0Xl6OeQCyyQypiFsI1JHLPGcGpfp/XmIXii6yqIA8bbupwmrr ntkgSA6bfbuptN/mq5q1hDpqYRGapJiPiL3Ek+VMGFVkJbgDlNAwqhOXagjmf3URyP5fAG 5HKKOTzXWguzFZd6Ij4ZYOKllLraVHLlP8WHGpDK98oY2tAdCzhm783uQF86j3tabxg2Bi HbOHww1K6wbENqf9/5xFzCyMMysWzsCu11E3bgPfckjS+BoPJFk660OP56E8GQ== 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 4T9nJQ5MPSzMrL; Thu, 11 Jan 2024 14:35: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 40BEZIYa025081; Thu, 11 Jan 2024 14:35:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEZIH9025078; Thu, 11 Jan 2024 14:35:18 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:35:18 GMT Message-Id: <202401111435.40BEZIH9025078@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 668e777b0a24 - stable/13 - setfib.2: Consistently capitalize "FIB" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 668e777b0a246b47c64274de118f0dfe59611173 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=668e777b0a246b47c64274de118f0dfe59611173 commit 668e777b0a246b47c64274de118f0dfe59611173 Author: Mark Johnston AuthorDate: 2024-01-03 20:19:41 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:33:05 +0000 setfib.2: Consistently capitalize "FIB" MFC after: 1 week Sponsored by: Klara, Inc. (cherry picked from commit ee7d5ba1b55441476643983d3f70df5ee9ea97c4) --- lib/libc/sys/setfib.2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/sys/setfib.2 b/lib/libc/sys/setfib.2 index efbb7bf171ae..32e2f64910cb 100644 --- a/lib/libc/sys/setfib.2 +++ b/lib/libc/sys/setfib.2 @@ -37,7 +37,7 @@ .Sh DESCRIPTION The .Fn setfib -system call sets the associated fib for all sockets opened +system call sets the associated FIB (routing table) for all sockets opened subsequent to the call, to be that of the argument .Fa fib . The @@ -69,9 +69,9 @@ packet header, however it is not suggested that one use such a large number as memory is allocated for every FIB regardless of whether it is used, and there are places where all FIBs are iterated over. .Pp -The default fib of the process will be applied to all protocol families -that support multiple fibs, and ignored by those that do not. -The default fib for a process may be overridden for a socket with the use +The default FIB of the process will be applied to all protocol families +that support multiple FIBs, and ignored by those that do not. +The default FIB for a process may be overridden for a socket with the use of the .Dv SO_SETFIB socket option. From nobody Thu Jan 11 14:35:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nJS15pkz568JN; Thu, 11 Jan 2024 14:35:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9nJS0SNRz4XWj; Thu, 11 Jan 2024 14:35:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y6cYgqHSXHo8arXk+4HLZFlNzbhRxDU9i9yB8Vv79aE=; b=rVP9PQye6BPKqZ3gW2Cx7t4Bp+qOo1TX0VUhwgOUdBhQj1Dqi1/Mx/3WzlOyb6qkAKtG5G nCvJz9ApWcRAtAHYMTczROTiky0XdLADQxmLiJ6sp4tWzbaHRAG6PQgYS9ptECFXsdyWvk h2v3v/8b1rfu7jx/fr9qvXz0rVu/d/xnJ0AhxjG/CR9BjmNhJCCKnvaHG2/gfxKnuZXEA0 HP0wXKCVyL3WhO9R7+mQC4vlpBsDBxRotGcnMLOo21LMbAVaofL5bPoLM4lJVzZ+tdd3Vm dM0JF8Oi9mL85MLs7cHKJI/GojPKUNIwQR/UgO8SIz7n6Do7OsP/Gnr82V0dVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y6cYgqHSXHo8arXk+4HLZFlNzbhRxDU9i9yB8Vv79aE=; b=b1zy3DoVKwIqZuaCQEqbBFtyf3uctBH5ZBlRhuLlUowP/mPB91zICrAiIUFySyBVmYgGmj tY2fN9pc9TKt9l8IaAYCFWQgjDAie/bWyr2XEFeZfp/h1K0nthuVBov3dO0I4o7TepNjXk xwuwQd6tcYb1u+gVq8gulPUvTus+UqPA10/8oUE84rKz6HWGSiQuWC32FrYcoOUV3TDz/6 AyGRwOnjzBKXQhJXgFRoO/M36qaZomtYx6/V+OeqEo+XjEc4zvHytNN/35AkwK8mCGzqpJ hSOalSQqGs3vo4EN3dpZQq4uUWfkVkziEMRbYNDut/UI9Pp80QRR0FTqDEaivw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983720; a=rsa-sha256; cv=none; b=YRT5ie86bh7Eaf1pVj0JWAyvMk9Cx5iXquUHlnpXzBQkKKicLu1yfkSrkt5qG5Egur8mBq aUEzhiHlWEArA4JwwNnRIAbsn3iTkZrJTvcYkjG9iaXJwTknbRTR8un47LkSZbfzDbMSCY cbsukUzMW1IQqL/GskU0f1715g4aIbm16h6BCjUerJ/cocpOjansdanB1sk5NbUWGaZ0PQ iOihI/zIc82SxPfzYKPW0i4UF7cN1FUQopq+ESs7EQnZWS/cZho+iFECPRiL6cwsHQLY2n bnMF7hBzs29onjDsCyyUpfvi9HOXI3r0CbETQhFZZooXKK7m1SEaPf/UvGXI6g== 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 4T9nJR6bkhzMXJ; Thu, 11 Jan 2024 14: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 40BEZJ22025128; Thu, 11 Jan 2024 14: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 40BEZJZ4025125; Thu, 11 Jan 2024 14:35:19 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:35:19 GMT Message-Id: <202401111435.40BEZJZ4025125@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c0563fd5fc32 - stable/13 - netinet: Define IPv6 ECN mask List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: c0563fd5fc322bc9948c5402cb28641fec53931c Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c0563fd5fc322bc9948c5402cb28641fec53931c commit c0563fd5fc322bc9948c5402cb28641fec53931c Author: Jose Luis Duran AuthorDate: 2023-10-28 02:50:18 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:33:05 +0000 netinet: Define IPv6 ECN mask Define a mask for the code point used for ECN in the Traffic Class field (2 bits) of an IPv6 header. BE: 0 0 3 0 0 0 0 0 Bit: 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| Traffic Class | Flow Label | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ... | For BE (Big Endian), or network-byte order, this corresponds to 0x00300000. For Little Endian, it corresponds to 0x00003000. Reviewed by: imp, markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/879 (cherry picked from commit b0e13f785b336670bdf39b83a78435b00d00f43c) --- sys/netinet/ip6.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/ip6.h b/sys/netinet/ip6.h index faa6fc290ca1..37d2c1777c32 100644 --- a/sys/netinet/ip6.h +++ b/sys/netinet/ip6.h @@ -97,10 +97,12 @@ struct ip6_hdr { #if BYTE_ORDER == BIG_ENDIAN #define IPV6_FLOWINFO_MASK 0x0fffffff /* flow info (28 bits) */ #define IPV6_FLOWLABEL_MASK 0x000fffff /* flow label (20 bits) */ +#define IPV6_ECN_MASK 0x00300000 /* ECN code point (2 bits) */ #else #if BYTE_ORDER == LITTLE_ENDIAN #define IPV6_FLOWINFO_MASK 0xffffff0f /* flow info (28 bits) */ #define IPV6_FLOWLABEL_MASK 0xffff0f00 /* flow label (20 bits) */ +#define IPV6_ECN_MASK 0x00003000 /* ECN code point (2 bits) */ #endif /* LITTLE_ENDIAN */ #endif #define IPV6_FLOWLABEL_LEN 20 From nobody Thu Jan 11 14:35:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nJT3ZfXz568GG; Thu, 11 Jan 2024 14:35: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 4T9nJT1Wpyz4XJT; Thu, 11 Jan 2024 14:35:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cT38KGsbiH1qS2l+4fwHrjbgGowEI2VMGE7NRwRwDnc=; b=jqOi9zlC72UpnKzCxAOP42Avyp4BMg866d/4lTF7XyWaVhc1EMKVpCGR0+NEsXWrjZB2bF +kP+O5xnSWXV+5HcpI0vRWu98+xmoSv31KLPIU+7uRLh2PfHyJ2iaZyHRHYlzrGFLmGNq3 G8odCijykod4X96sw2qZmIcH20ZRX++/fkJCvKd4FAf0FhcSpJ5Iim4Hgpb4oHaQd/j851 o8UofWVILem9ya0qMnbSJaIok5JlwKIGiktDLivSm5yR/KXxs2spgA1JaP3NjUmqsbzebz m1A+GOLDA4CFaHjibD5UPDQAbLYn0kaZC92v+NWW/ezwlpNlT22DK4C9Wn4xAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cT38KGsbiH1qS2l+4fwHrjbgGowEI2VMGE7NRwRwDnc=; b=G070cjc64uglW6114V/yUnvg0BObdwQMgqyGqOiQnztBznhWhZAMf/TUbHlEn5SVNt83EL HcfF3a9FZNvgBjpmBa8acZ3R7xO7xoEJKXmEIY78FnEetIucxbioJrTsfhqv7/cXFzroQ7 yzcexg0c3V5evry0bCmBeg3iEgZqOPwWjJ1AWXWcRr74mkcMo/TmHsGTWiU9TzcwYmo/y+ MQpxtAvPsEpf/iKWkUDHgu0e0t7lRgxvaaetyPmuNbmOVs8Fbr3r3d2uiG5/I65ICGZGnZ 8S5sXReQRRUSmRHZIQ/D+HBf4/KlDQs7j9n7W5vlTQCslltjwjRYuPuTlOD72w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983721; a=rsa-sha256; cv=none; b=LMjMxCMGuaLhjzbwH0FAcOkHZgD7RNjZQflso1FlEjQwQGhNy6zZkrGY9HCU9Y7WNLE9X2 l/uO11BkiCP1DNEeCFr9ekHVVgoVDTB1zs0Xpmbpv5qMc2T8ZbKZvXcpQoaYxDvnc60eTe Nt2/MHdvtrJNyqFgd1IUPU1I4r9GHtha56St1fgG4UzUjAQc5kATwlIwfP23JVKVHfBKlq k2ITgdtyYZ8ZqU/u76zRo3cS02h1na3fvRMzgyMgfjV5zWHjgZfKUeNPp6PeYBGbjmqSUb 9Vbp778irs8e+spSGoI3/ICwA+JNUuZyreqg3DmltOzV6qWoRjC6eC4uq6zXSg== 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 4T9nJT0SP1zMdt; Thu, 11 Jan 2024 14:35: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 40BEZKnK025169; Thu, 11 Jan 2024 14:35:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEZKUh025166; Thu, 11 Jan 2024 14:35:20 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:35:20 GMT Message-Id: <202401111435.40BEZKUh025166@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: d5063a91ce0d - stable/13 - x86: Make cpu_model[] public List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: d5063a91ce0d830a2a86228b0a73c39afb53d899 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d5063a91ce0d830a2a86228b0a73c39afb53d899 commit d5063a91ce0d830a2a86228b0a73c39afb53d899 Author: Mark Johnston AuthorDate: 2024-01-04 13:24:04 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:33:12 +0000 x86: Make cpu_model[] public No functional change intended. Reviewed by: emaste, imp, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43281 (cherry picked from commit d63ea03674007451682334fa3897918c5c3711a4) --- sys/x86/include/x86_var.h | 1 + sys/x86/x86/identcpu.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/x86/include/x86_var.h b/sys/x86/include/x86_var.h index c938d96372d8..ed585c33e8a8 100644 --- a/sys/x86/include/x86_var.h +++ b/sys/x86/include/x86_var.h @@ -58,6 +58,7 @@ extern u_int cpu_mxcsr_mask; extern u_int cpu_procinfo; extern u_int cpu_procinfo2; extern char cpu_vendor[]; +extern char cpu_model[]; extern u_int cpu_vendor_id; extern u_int cpu_mon_mwait_flags; extern u_int cpu_mon_min_size; diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index ca057a5c1b77..6a51c48ab604 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -157,7 +157,7 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "Machine class"); #endif -static char cpu_model[128]; +char cpu_model[128]; SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_MPSAFE, cpu_model, 0, "Machine model"); From nobody Thu Jan 11 14:35:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nJV4Rkcz568GL; Thu, 11 Jan 2024 14:35:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9nJV3BKMz4XTj; Thu, 11 Jan 2024 14:35:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wVyuePKJ5c863FgjweH7zHl2Yj7jFKIXS3ypNTvyou4=; b=REfcqTsAOBtjy4ivpE6mU6Fmd8a3ZZg9nQsHymtWiA+UBRUPwUFvW977hWKvbwcW5An56J J37iGDliFvfWDerEJpPOId72CMx5u1DWm1ql5A5hccsfmtfnANS0WysRnb/4seWzw7N29T PVWHIrQyWjth4qchT24MdPB84ae2ruK3rvH3V+Qf7k6KQ0spOl2qP+vB6/yt9pwSvtHvSb Q0NrU+J58Ln6WzR5QnoSqsHIvPb6S7V9rNOtyMPMyfv/ypDj1wUf+uIa1j657gE8gJOHOR 5m7tQSiwdTy4JdSCWQWPxX/vfc764+28sUs7Nh+OINr8rjIGqaTOYGdDhLGx0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wVyuePKJ5c863FgjweH7zHl2Yj7jFKIXS3ypNTvyou4=; b=leROcoHZWpLO64NZyEOApWVsupU36YooWVT4xFd+dNCgT1KlyhH11TAF6QkavsAbFvcSZC 64Fvkc6T5MK2XWlq5FhWgaaLMmnsZ1fNysilSYe9DLZCp+u+zaeIeRdZXLZ5mWVudFkGjs IT6ozUWYD1vWm7jzXnGpqyLTpyZq9P482fpRj8WHa4bWuY4r0bnqH8I9CewSV+VosxwDL5 t3pXNgm1PtgH05Nq0QRvU6X6tOhRYb3qsMNMSHkyDC84tF34iq1h/UbwnG8JfOPy3eRtgZ qCKdbqELiwK1VSCYJKnQRMFpOz6g9iSKkfCrW+1B8oIzes5Ezhqr4OC7Gyi6tQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983722; a=rsa-sha256; cv=none; b=QyYEu1nJGw39QvH3PNcLz2YHGZ+wFkJGuE02os2/DkYJvVRhqaHp5j0eaxSYBrO2Y7NXgq 2hiJAIUQ7E5OK73EDEDZcWZ1G71qe8rvUYkkFVek7RB5/AODLB89cGS8gwgUxkUoP2KLvG HYvkQ/Qp8pkqHYK5S9F2Vs41zYV7j0OTUxf+QB/Zl8RzRxCDDnPyRuhfMId2v8B1qnjViC FQYXJ4kUIsuVd6fxLfc9Y+cFdc0lrqrw/gl0GDCB11Dgyx+fBOjBrRqakmtloVSL7CLbj+ NKkhc0MzGws6IQvDRP9Ac31OM4N3MeibiOTbgYReWnBenhO0Hq2ekyHHlICSGA== 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 4T9nJV1XN3zMXK; Thu, 11 Jan 2024 14:35:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40BEZMnS025234; Thu, 11 Jan 2024 14:35:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEZMBM025231; Thu, 11 Jan 2024 14:35:22 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:35:22 GMT Message-Id: <202401111435.40BEZMBM025231@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: e3212b779ae2 - stable/13 - linprocfs: Avoid using a sysctl to get the CPU model string List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: e3212b779ae2938428e087ac05c52e484cf2a6c2 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e3212b779ae2938428e087ac05c52e484cf2a6c2 commit e3212b779ae2938428e087ac05c52e484cf2a6c2 Author: Mark Johnston AuthorDate: 2024-01-04 13:25:05 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:33:15 +0000 linprocfs: Avoid using a sysctl to get the CPU model string This will fail if the reading process is in capability mode. Just copy the string directly. PR: 276043 Reviewed by: emaste, imp, kib Reported and tested by: Ricardo Branco MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43281 (cherry picked from commit d74a742704eb81f0c6f4aa83e4cb0de26a81c400) --- sys/compat/linprocfs/linprocfs.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 3608a800dc9c..f8bbb0d8fbfc 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -202,10 +202,7 @@ linprocfs_domeminfo(PFS_FILL_ARGS) static int linprocfs_docpuinfo(PFS_FILL_ARGS) { - int hw_model[2]; - char model[128]; uint64_t freq; - size_t size; u_int cache_size[4]; u_int regs[4] = { 0 }; int fqmhz, fqkhz; @@ -305,12 +302,6 @@ linprocfs_docpuinfo(PFS_FILL_ARGS) "acc_power", }; - hw_model[0] = CTL_HW; - hw_model[1] = HW_MODEL; - model[0] = '\0'; - size = sizeof(model); - if (kernel_sysctl(td, hw_model, 2, &model, &size, 0, 0, 0, 0) != 0) - strcpy(model, "unknown"); #ifdef __i386__ switch (cpu_vendor_id) { case CPU_VENDOR_AMD: @@ -354,7 +345,7 @@ linprocfs_docpuinfo(PFS_FILL_ARGS) "cpuid level\t: %d\n" "wp\t\t: %s\n", i, cpu_vendor, CPUID_TO_FAMILY(cpu_id), - CPUID_TO_MODEL(cpu_id), model, cpu_id & CPUID_STEPPING, + CPUID_TO_MODEL(cpu_id), cpu_model, cpu_id & CPUID_STEPPING, fqmhz, fqkhz, (cache_size[2] >> 16), 0, mp_ncpus, i, mp_ncpus, i, i, /*cpu_id & CPUID_LOCAL_APIC_ID ??*/ From nobody Thu Jan 11 14:35:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nJW556Hz568R2; Thu, 11 Jan 2024 14:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9nJW3X0lz4XPG; Thu, 11 Jan 2024 14:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JnzHPzycgU63aZvCh7KHtOSeJMDM3Q+v36KjBdvCT9I=; b=tiqso8GVpfqfxyY6m66OvlTe3RFiGqL6Tsoebb5pQc4a2m68SXoZSqBxeNCkRbPKfnn0hO lN7EAYD6GCCoUE1eYxQoqhCutNA74k8S8VATijSguVd2cvNx6A9zcy9WN9mWlHfkvbQFDk m/zAf9tGOxm3qF6nsukEJp5GqYnJ0bKUIouz7jbNwAoMV1ubRVylkVzx+kQH0JTNx4xicK A3q8ZrKNZ0KcIOM3dTiOKLYKBwCXZAD5KzHzQKCbbnWBbF0F5ACPrPQdAaMi6E5t7BnscQ gJzKcjKXzECX+rb7f8nzKCAepsnZtM0yIsx0g8L7dsrtPMfgL4BH83hk3FY78A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JnzHPzycgU63aZvCh7KHtOSeJMDM3Q+v36KjBdvCT9I=; b=QEMkhgnN8x9NyynSPTo2V7mNlmcAllXXCxN4B/mCna+TytbbQ1+tYDp7yeLPrbqre1JEX2 XzhJy+oSCLgko1ePAj4UCi3pufndXvRvX6PEY/vWL/SROzcEdZvOJF+ZaVPj5Bq8ooEgXS eB2xKoM5lzDGTVnoQjranKcKqNmbmLLZ3o/ifIT9K5TjwKbqzvLKDjy+WacAaJU+4Vd3Is 9SwaExU8xPtyFxnaY1zfgbjJAdx3GqNd9d/xjw0G6AUwCzYp75uG0kMmXjO1Q5fRpNj6a8 879SXu4L4D51x9nSwoQLwHsWwIt+ti46CpaVv2wT/nWAPEGXiTiFXGSSAx2r6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983723; a=rsa-sha256; cv=none; b=DN3lInT5SlOOymL0vEupoLlOHV9hzW++/lkHyJa9/+3sGUW++xTuS82J6/SCXWSOqRUh56 G0rVjeIiwgUCodXmSU+8OTPY4ontsdIdyn+9SMXN5Sle81A2/OEsCFzSHTOlvWYJ/Qd1xJ 9cPIfEDjk2bnXnOF1RD0f6/uk6YGcjdMssSzfzQnEneArrrnLYjsHQUNp/+IQ98wgz07E9 n+40HYJWsO5LTFz/7tI5z1Ye0kuMNsc6gZQUQTYM5gcAfENgNrZGuXipKzf1kK7DHc40H0 kX/Y61l8fxqiWNXW7Snd0Hp4ik76C1QblDmaK/giw35tntI8zeKR0wCzs6SyuA== 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 4T9nJW2ZPwzMq1; Thu, 11 Jan 2024 14:35: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 40BEZN0m025288; Thu, 11 Jan 2024 14:35:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEZNTS025285; Thu, 11 Jan 2024 14:35:23 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:35:23 GMT Message-Id: <202401111435.40BEZNTS025285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 337b2a037299 - stable/13 - identcpu: Let the hw.model be readable in capability mode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 337b2a037299915af419723fc57d7d6d46bd5e1e Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=337b2a037299915af419723fc57d7d6d46bd5e1e commit 337b2a037299915af419723fc57d7d6d46bd5e1e Author: Mark Johnston AuthorDate: 2024-01-04 13:26:53 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:33:16 +0000 identcpu: Let the hw.model be readable in capability mode On some platforms this static information can be derived directly from the CPU, and there doesn't seem much use in restricting it. Reviewed by: emaste, imp, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43281 (cherry picked from commit 0aba5dd2af57ea3ae90eb49d7745c4c5b6f0ab6b) --- sys/arm/arm/identcpu-v6.c | 2 +- sys/arm64/arm64/identcpu.c | 2 +- sys/powerpc/powerpc/cpu.c | 2 +- sys/x86/x86/identcpu.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm/arm/identcpu-v6.c b/sys/arm/arm/identcpu-v6.c index 5e52645d39af..baae9ac360ad 100644 --- a/sys/arm/arm/identcpu-v6.c +++ b/sys/arm/arm/identcpu-v6.c @@ -56,7 +56,7 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "Machine class"); static char cpu_model[64]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD, cpu_model, sizeof(cpu_model), "Machine model"); static char hw_buf[81]; diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index c46747be1bd5..200841782f03 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -99,7 +99,7 @@ SYSCTL_PROC(_hw, HW_MACHINE, machine, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, sysctl_hw_machine, "A", "Machine class"); static char cpu_model[64]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD, cpu_model, sizeof(cpu_model), "Machine model"); #define MAX_CACHES 8 /* Maximum number of caches supported diff --git a/sys/powerpc/powerpc/cpu.c b/sys/powerpc/powerpc/cpu.c index bf676b8e08e1..d450044780a9 100644 --- a/sys/powerpc/powerpc/cpu.c +++ b/sys/powerpc/powerpc/cpu.c @@ -239,7 +239,7 @@ static void cpu_6xx_print_cacheinfo(u_int, uint16_t); static int cpu_feature_bit(SYSCTL_HANDLER_ARGS); static char model[64]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, model, 0, ""); +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD, model, 0, ""); static const struct cputab *cput; diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index 6a51c48ab604..92a88ede5f79 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -158,7 +158,7 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, #endif char cpu_model[128]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_MPSAFE, +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD | CTLFLAG_MPSAFE, cpu_model, 0, "Machine model"); static int hw_clockrate; From nobody Thu Jan 11 14:35:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nJY1KDfz568JT; Thu, 11 Jan 2024 14:35: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 4T9nJX4TWpz4XcV; Thu, 11 Jan 2024 14:35:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qYYXMoKX1oFXt/K+8jgrwU2v/T5+n1SjrC5ddAiEJ74=; b=Nbw9WQoW2D1JKw6XC2eXIpQP1q1guguCxhvkwB2cCvkXKX0kKsCZt4wrWJvYMxEF2BWvGw rDyPAqWYsnS+kTEacHC8NrD9D7LFYLXzzzAYk93teO1wdCXtuBHDVReljB0FcVa4eVkU+l +ix9F2kAhKtdElp6RlTRaeUW8ku2mTjT5mvwhzwX19WU1g6uJGaS2RrHX/OrebPeuScLH+ wqdcKU4W8vtg8dk9IW/FEgUT921bYAn+ov6xAtXjG5Vx1v94mAEXIM0KWGC5y1m0EISYgp wvxLA+hFwCx3PN3KobxKRBZZysh9hrUZwQ4UqIzmP6Sd9IrTJP8XDgolLbUjag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704983724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qYYXMoKX1oFXt/K+8jgrwU2v/T5+n1SjrC5ddAiEJ74=; b=Pcvrs5uh++kVHvxAoNZVrAcVlBeQ0Hhi8I/Wgv0Vo88tUJkd+XhvQ1pCCG7/scqi6bD/Hc bz3cQfep7d4p4lPi+elzbY5JyLGVTBNl7rE2YfFol/iC7FYBwJqxJjG5RdGNLcqWIRa60y B/qjpi3GZc/jrEkBkHacRnw5d6Waznwz/37A49KLEqANopBvVBBcBKT+9gP8Npnr+DQJF0 OtrZCOdtuksAeL6/+DQVyGjLgtiuZyEdpDDSacLz5aGqFy5DlWsskXOmz5W9CpBEQo/QYp qBPtzP2iKwWpqTfr2RvEYkyy2yTPJ0UD3gDwnJR4Dhyt0ShZGhud9pigYxiTeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704983724; a=rsa-sha256; cv=none; b=Qkk+9+QJMkMirmXifK6k0IHwWmiUf/qQ7+tCb9nbTwfCzOfzBfDRO977GfFC8DZfyY9RtJ fFRsWjlnP7r8XsBWf8NhIQ+Z2brCuSGMEmaALuGc/rAVbYVQ0g/TFraDSGTRIqM2j3RdaA +81PWUcBZq6XzrUsycY/fmVQwylEDaGipxc6858/qRaYQJwA68UyGCY6RXbhaH/9VQU1mn rXET9siDMmMNL6pEpzXqDUvWXVVovv8LWjEBzfcs6cHdDWngDngYzzoB+V+4b1IYrQNxoh GNJbNbWVWvr0kFVMlzpDtIAyLQYu5/uFf9mI2bqOCNHSNAARm0wlIQXSdUPs2w== 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 4T9nJX3b5tzMrM; Thu, 11 Jan 2024 14:35: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 40BEZOgN025334; Thu, 11 Jan 2024 14:35:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BEZOle025331; Thu, 11 Jan 2024 14:35:24 GMT (envelope-from git) Date: Thu, 11 Jan 2024 14:35:24 GMT Message-Id: <202401111435.40BEZOle025331@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: a20522d9ae20 - stable/13 - sysctl: Don't pass CTLFLAG_MPSAFE to SYSCTL_STRING List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: a20522d9ae20610bd266c99dab75f58d7b3ee22b Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a20522d9ae20610bd266c99dab75f58d7b3ee22b commit a20522d9ae20610bd266c99dab75f58d7b3ee22b Author: Mark Johnston AuthorDate: 2024-01-04 13:33:05 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 14:33:17 +0000 sysctl: Don't pass CTLFLAG_MPSAFE to SYSCTL_STRING It is redundant. No functional change intended. MFC after: 1 week (cherry picked from commit 969fc091343e593f15f0f3326f65292b435423d5) --- sys/kern/kern_mib.c | 16 ++++++++-------- sys/x86/x86/identcpu.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index 37b7b46c87a2..c9056503925f 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -94,20 +94,20 @@ SYSCTL_ROOT_NODE(OID_AUTO, regression, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Regression test MIB"); #endif -SYSCTL_STRING(_kern, OID_AUTO, ident, CTLFLAG_RD|CTLFLAG_MPSAFE, +SYSCTL_STRING(_kern, OID_AUTO, ident, CTLFLAG_RD, kern_ident, 0, "Kernel identifier"); -SYSCTL_INT(_kern, KERN_OSREV, osrevision, CTLFLAG_RD|CTLFLAG_CAPRD, +SYSCTL_INT(_kern, KERN_OSREV, osrevision, CTLFLAG_RD | CTLFLAG_CAPRD, SYSCTL_NULL_INT_PTR, BSD, "Operating system revision"); -SYSCTL_STRING(_kern, KERN_VERSION, version, CTLFLAG_RD|CTLFLAG_MPSAFE, +SYSCTL_STRING(_kern, KERN_VERSION, version, CTLFLAG_RD, version, 0, "Kernel version"); -SYSCTL_STRING(_kern, OID_AUTO, compiler_version, CTLFLAG_RD|CTLFLAG_MPSAFE, +SYSCTL_STRING(_kern, OID_AUTO, compiler_version, CTLFLAG_RD, compiler_version, 0, "Version of compiler used to compile kernel"); -SYSCTL_STRING(_kern, KERN_OSTYPE, ostype, CTLFLAG_RD|CTLFLAG_MPSAFE| - CTLFLAG_CAPRD, ostype, 0, "Operating system type"); +SYSCTL_STRING(_kern, KERN_OSTYPE, ostype, CTLFLAG_RD | CTLFLAG_CAPRD, + ostype, 0, "Operating system type"); SYSCTL_INT(_kern, KERN_MAXPROC, maxproc, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &maxproc, 0, "Maximum number of processes"); @@ -141,7 +141,7 @@ SYSCTL_INT(_kern, KERN_SAVED_IDS, saved_ids, CTLFLAG_RD|CTLFLAG_CAPRD, char kernelname[MAXPATHLEN] = PATH_KERNEL; /* XXX bloat */ -SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RW | CTLFLAG_MPSAFE, +SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RW, kernelname, sizeof kernelname, "Name of kernel file booted"); #ifdef COMPAT_FREEBSD12 @@ -449,7 +449,7 @@ SYSCTL_PROC(_kern, KERN_SECURELVL, securelevel, /* Actual kernel configuration options. */ extern char kernconfstring[]; -SYSCTL_STRING(_kern, OID_AUTO, conftxt, CTLFLAG_RD | CTLFLAG_MPSAFE, +SYSCTL_STRING(_kern, OID_AUTO, conftxt, CTLFLAG_RD, kernconfstring, 0, "Kernel configuration file"); #endif diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index 92a88ede5f79..1eb6bd6cac6f 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -158,7 +158,7 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, #endif char cpu_model[128]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD | CTLFLAG_MPSAFE, +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD, cpu_model, 0, "Machine model"); static int hw_clockrate; @@ -168,7 +168,7 @@ SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, u_int hv_base; u_int hv_high; char hv_vendor[16]; -SYSCTL_STRING(_hw, OID_AUTO, hv_vendor, CTLFLAG_RD | CTLFLAG_MPSAFE, hv_vendor, +SYSCTL_STRING(_hw, OID_AUTO, hv_vendor, CTLFLAG_RD, hv_vendor, 0, "Hypervisor vendor"); static eventhandler_tag tsc_post_tag; From nobody Thu Jan 11 15:01:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9nv71n7bz56CLn; Thu, 11 Jan 2024 15:01:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9nv71CyBz4fwV; Thu, 11 Jan 2024 15:01:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704985315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TUV8S1lB4x9JOuLcni7psdb2pGMJamlRXs7yMGMhdZE=; b=yjp5LKcDcrkpbRRMwW7R8mKzpGkdIzLYnP2KAbVGGVo1CU3gb5EjkdRHINhLLjP9/FYb95 jHAjPfSgTctpobQzjZdfT4XtQuKvmTw78EVwHLxuABGJX/9iNa95cg9nDO7LaffufAvGLA zLXwX7ee8mC+l6FMny5ncygV0DSPgO4CMDof/u5+wdCLHrYEjJfmCsvn9nMI6rp/TnukzL Ea622GcFAwLnH0xkzP3j3kpkPIwJ+5e2R1qwHJa57dFMacrseZENtAdbAk3LHB4R1u8yiU 01PyAU916Kr3M4JeHv/tt3ns00RrPtcWMrIBemeJ26tqJ+ffgjFoFFogJ8JrDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704985315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TUV8S1lB4x9JOuLcni7psdb2pGMJamlRXs7yMGMhdZE=; b=xc+oVmnEKDR96MUYZvPzG9bA7TDhITwJnH4z70g2msMlqbTWP8J+pdT3xf1N3tNkS2EsKK DmrlOL6UTUnlrljY6FHqle8mA0hutZk3sZkNP1domRG0eab2L4/7o/ObLd+w/bTJKEdKy/ sZXvbZ4CIO7pkGnfRU3wh0WZrRFv0tb8pMdPoV7ZCGSZMM886kEXaZWF1t6yHOdnG2gh7s nuuTa1uqBM2egiGI5phUso4KW1CZblBsvJM0QuKN8MrxvJJdvWP5bCtTGz/c0exqr+LK23 mK3N2joRvP9E4B7tasDguTyDS9O13UhlY1hVN+ycsZEvJP63+MAQwPOkddUE5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704985315; a=rsa-sha256; cv=none; b=d3ah3M3wy2lDdAZPvl16yGZLGUo5yrXhgx5pMR79tZZ/7gtq9KQlNsYUds5us4GJ7f+K6s SQ1haRxZ7wW3aZy5cAm8G+JPrTfMmhsd0oWQGzv7zGVLlgAOV9wAxVNIDXZgIiGSCSFvPH E0J9UpwxiVu56yI/cV6Mw2cqP1XScJN5YI0u2qikqKceCu7kejkV+pRBfePT442s22KWfP q5AzGz0Qg+lg345D0uS/odXCfqkLCLYGU15q0qdaB8YrV6DnrfNb2MIs+qtI2cEmh5TYlw xNAINQU+aq2iw6Yzc6JlYjyF+0vqkRUIIhlDuejA8hiFKbuhZSnjUWIRfTESTg== 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 4T9nv70G65zNrJ; Thu, 11 Jan 2024 15:01: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 40BF1sHI074361; Thu, 11 Jan 2024 15:01:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BF1sFk074358; Thu, 11 Jan 2024 15:01:54 GMT (envelope-from git) Date: Thu, 11 Jan 2024 15:01:54 GMT Message-Id: <202401111501.40BF1sFk074358@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: 1f62718d8ba2 - main - top: Avoid printing a blank line when the ZFS ARC is empty List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 1f62718d8ba26d813d8c2e826ac5f4caee4c6730 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1f62718d8ba26d813d8c2e826ac5f4caee4c6730 commit 1f62718d8ba26d813d8c2e826ac5f4caee4c6730 Author: Mark Johnston AuthorDate: 2024-01-11 14:58:31 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 15:01:37 +0000 top: Avoid printing a blank line when the ZFS ARC is empty PR: 275994 MFC after: 2 weeks --- usr.bin/top/machine.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index b4cd29dab878..a76d77a80ce4 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -293,17 +293,27 @@ machine_init(struct statics *statics) size = sizeof(carc_en); if (arc_enabled && sysctlbyname("vfs.zfs.compressed_arc_enabled", &carc_en, &size, - NULL, 0) == 0 && carc_en == 1) - carc_enabled = 1; + NULL, 0) == 0 && carc_en == 1) { + uint64_t uncomp_sz; + + /* + * Don't report compression stats if no data is in the ARC. + * Otherwise, we end up printing a blank line. + */ + size = sizeof(uncomp_sz); + if (sysctlbyname("kstat.zfs.misc.arcstats.uncompressed_size", + &uncomp_sz, &size, NULL, 0) == 0 && uncomp_sz != 0) + carc_enabled = 1; + } kd = kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY, "kvm_open"); if (kd == NULL) return (-1); size = sizeof(nswapdev); - if (sysctlbyname("vm.nswapdev", &nswapdev, &size, NULL, - 0) == 0 && nswapdev != 0) - has_swap = 1; + if (sysctlbyname("vm.nswapdev", &nswapdev, &size, NULL, 0) == 0 && + nswapdev != 0) + has_swap = 1; GETSYSCTL("kern.ccpu", ccpu); From nobody Thu Jan 11 16:45:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9rBR2PvTz56RHS; Thu, 11 Jan 2024 16: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 4T9rBQ5mYYz4vH4; Thu, 11 Jan 2024 16:45:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704991518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PWjBbN0e6d3l6plwPZ/f+3jfRHzjePqcct9N7Q6ZRLo=; b=qL4v+K6Ty7sQ1exodwT6ml965uL/phtnrRXkd95FO4gEbx6hLlGTFTmTR5GF5mDXViAbGR PPlG3LyrAb7GH/15VNukOA4kYgucUn4PQTxIVd0m0JvoQ/Rtwh2TxryqSt43fRDcVN+ZPg rysP0OI9d/InOAEjPmkHg28vF2piB6pZky6Zy1jjVWnn6C79IKU/FMG8cHoyOmxK+WQlTf jUhVBtZwHVz1dHGSPmUZiSDbRRLc41OiNUuDFNH8J1IYFXm9ux8BwGC4h6FXy7MQoaRzhG ZLswhAlpzWHUMiOksbxt68TGo86fg3cpXeRmahsYB+z4vfF025nB7YJfI8ZGng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704991518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PWjBbN0e6d3l6plwPZ/f+3jfRHzjePqcct9N7Q6ZRLo=; b=iiZUo+hVfPz2JsVyGE3fBNj5cA+vni4+4NU7vx3NroGy7lZ+iD0wYxQT+h3WIJGaGLfC43 vTjHLJT3BcuoV3FFTt/QWkolcabX/TKuQQOTdlJAG1bcdsvgxIkwxtZtLKSwq+w7cAlb+V 1u5f5PtJzrtp0mo98Ix0XaTLoqNw9qp7QG4j9XtZwNm45PEIqCNCs3YZJY4yCsUp9PKqup fsYZ+u4eQkNYHSMTqt9NWln/CUEuJWYeGKLv+EQLPxvRODyTVhzp+Y6xzdOOCkU+0CqXZJ rapRP2wwD9jKei/avqMAfxMpd+ra7pppaVOPGsReEEjRWQuSWOu10PazCKW1XA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704991518; a=rsa-sha256; cv=none; b=A0wJEoxLmBMcGyou+jbFiglGWhkxZxDVZyStnck5KmVVtLBjGO43yRDPInBqJZmL1+okWR JX8nRMv3a0GhscEvA7+/t7doaA6TvlS6TO78mkIMWPz+1FD9upQUuPbU4YzrqnS0b8hpky kvbwOddIMvhvEn6rEDpj3PqsX3itFBEuBpdz0KTYXW40kbGML/deolbFLrCiwQ1ARHPgjT 8vsqSB7EPhy8/avHW5VPilDMjN4lkkbqugn43eFWDyYps3ix8Nr1c5wctlBfSV2PX/6l6u qpjsSTXNMbT5VtRIxTDd09Mkb1eORRWTyZCxgM8f3ZwFYELuFRlqpMbNdbZ6ng== 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 4T9rBQ4r4HzR0G; Thu, 11 Jan 2024 16:45: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 40BGjI5A045485; Thu, 11 Jan 2024 16:45:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BGjIHb045482; Thu, 11 Jan 2024 16:45:18 GMT (envelope-from git) Date: Thu, 11 Jan 2024 16:45:18 GMT Message-Id: <202401111645.40BGjIHb045482@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: b068bb09a1a8 - main - Add vnode_pager_clean_{a,}sync(9) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: b068bb09a1a82d9fef0e939ad6135443a959e290 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b068bb09a1a82d9fef0e939ad6135443a959e290 commit b068bb09a1a82d9fef0e939ad6135443a959e290 Author: Konstantin Belousov AuthorDate: 2024-01-08 05:18:40 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:44:53 +0000 Add vnode_pager_clean_{a,}sync(9) Bump __FreeBSD_version for ZFS use. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43356 --- .../openzfs/include/os/freebsd/spl/sys/vnode.h | 9 +++--- sys/fs/fuse/fuse_io.c | 7 ++-- sys/fs/nfsclient/nfs_clbio.c | 8 ++--- sys/fs/nfsclient/nfs_clnode.c | 17 +++------- sys/fs/nfsclient/nfs_clvnops.c | 27 ++++------------ sys/fs/nfsserver/nfs_nfsdport.c | 8 ++--- sys/fs/smbfs/smbfs_io.c | 7 +--- sys/kern/vfs_aio.c | 9 ++---- sys/kern/vfs_subr.c | 37 ++++++++-------------- sys/kern/vfs_syscalls.c | 7 ++-- sys/kern/vfs_vnops.c | 9 ++---- sys/sys/param.h | 2 +- sys/ufs/ffs/ffs_rawread.c | 14 +++----- sys/ufs/ufs/ufs_bmap.c | 9 ++---- sys/vm/vnode_pager.c | 27 ++++++++++++++++ sys/vm/vnode_pager.h | 3 ++ 16 files changed, 82 insertions(+), 118 deletions(-) diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h index 75c32f221ffd..7a3b38736a58 100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode.h @@ -66,6 +66,7 @@ enum symfollow { NO_FOLLOW = NOFOLLOW }; #include #include #include +#include typedef struct vop_vector vnodeops_t; #define VOP_FID VOP_VPTOFH @@ -100,11 +101,11 @@ vn_flush_cached_data(vnode_t *vp, boolean_t sync) #else if (vp->v_object->flags & OBJ_MIGHTBEDIRTY) { #endif - int flags = sync ? OBJPC_SYNC : 0; vn_lock(vp, LK_SHARED | LK_RETRY); - zfs_vmobject_wlock(vp->v_object); - vm_object_page_clean(vp->v_object, 0, 0, flags); - zfs_vmobject_wunlock(vp->v_object); + if (sync) + vnode_pager_clean_sync(vp); + else + vnode_pager_clean_async(vp); VOP_UNLOCK1(vp); } } diff --git a/sys/fs/fuse/fuse_io.c b/sys/fs/fuse/fuse_io.c index 63e28f5f46b7..00b348814642 100644 --- a/sys/fs/fuse/fuse_io.c +++ b/sys/fs/fuse/fuse_io.c @@ -95,6 +95,7 @@ #include #include #include +#include #include "fuse.h" #include "fuse_file.h" @@ -945,11 +946,7 @@ fuse_io_invalbuf(struct vnode *vp, struct thread *td) } fvdat->flag |= FN_FLUSHINPROG; - if (vp->v_bufobj.bo_object != NULL) { - VM_OBJECT_WLOCK(vp->v_bufobj.bo_object); - vm_object_page_clean(vp->v_bufobj.bo_object, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(vp->v_bufobj.bo_object); - } + vnode_pager_clean_sync(vp); error = vinvalbuf(vp, V_SAVE, PCATCH, 0); while (error) { if (error == ERESTART || error == EINTR) { diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index f6506e34ee59..c027d7d7c3fd 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -1428,11 +1428,9 @@ ncl_vinvalbuf(struct vnode *vp, int flags, struct thread *td, int intrflg) /* * Now, flush as required. */ - if ((flags & (V_SAVE | V_VMIO)) == V_SAVE && - vp->v_bufobj.bo_object != NULL) { - VM_OBJECT_WLOCK(vp->v_bufobj.bo_object); - vm_object_page_clean(vp->v_bufobj.bo_object, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(vp->v_bufobj.bo_object); + if ((flags & (V_SAVE | V_VMIO)) == V_SAVE) { + vnode_pager_clean_sync(vp); + /* * If the page clean was interrupted, fail the invalidation. * Not doing so, we run the risk of losing dirty pages in the diff --git a/sys/fs/nfsclient/nfs_clnode.c b/sys/fs/nfsclient/nfs_clnode.c index fdb94aee9139..be2024730cf0 100644 --- a/sys/fs/nfsclient/nfs_clnode.c +++ b/sys/fs/nfsclient/nfs_clnode.c @@ -47,6 +47,8 @@ #include #include +#include +#include #include #include @@ -236,7 +238,6 @@ ncl_inactive(struct vop_inactive_args *ap) struct vnode *vp = ap->a_vp; struct nfsnode *np; struct thread *td; - boolean_t retv; td = curthread; np = VTONFS(vp); @@ -250,17 +251,9 @@ ncl_inactive(struct vop_inactive_args *ap) * buffers/pages must be flushed before the close, so that the * stateid is available for the writes. */ - if (vp->v_object != NULL) { - VM_OBJECT_WLOCK(vp->v_object); - retv = vm_object_page_clean(vp->v_object, 0, 0, - OBJPC_SYNC); - VM_OBJECT_WUNLOCK(vp->v_object); - } else - retv = TRUE; - if (retv == TRUE) { - (void)ncl_flush(vp, MNT_WAIT, td, 1, 0); - (void)nfsrpc_close(vp, 1, td); - } + vnode_pager_clean_sync(vp); + (void)ncl_flush(vp, MNT_WAIT, td, 1, 0); + (void)nfsrpc_close(vp, 1, td); } NFSLOCKNODE(np); diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 3f1ab9741673..0014f8a26d20 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -67,6 +67,7 @@ #include #include #include +#include #include #include @@ -766,9 +767,7 @@ nfs_open(struct vop_open_args *ap) if (VN_IS_DOOMED(vp)) return (EBADF); } - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(obj); + vnode_pager_clean_sync(vp); } /* Now, flush the buffer cache. */ @@ -854,9 +853,7 @@ nfs_close(struct vop_close_args *ap) if (VN_IS_DOOMED(vp) && ap->a_fflag != FNONBLOCK) return (EBADF); } - VM_OBJECT_WLOCK(vp->v_object); - vm_object_page_clean(vp->v_object, 0, 0, 0); - VM_OBJECT_WUNLOCK(vp->v_object); + vnode_pager_clean_async(vp); } NFSLOCKNODE(np); if (np->n_flag & NMODIFIED) { @@ -3637,7 +3634,6 @@ nfs_allocate(struct vop_allocate_args *ap) { struct vnode *vp = ap->a_vp; struct thread *td = curthread; - vm_object_t obj; struct nfsvattr nfsva; struct nfsmount *nmp; struct nfsnode *np; @@ -3667,12 +3663,7 @@ nfs_allocate(struct vop_allocate_args *ap) * file's allocation on the server. */ if (error == 0) { - obj = vp->v_object; - if (obj != NULL) { - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(obj); - } + vnode_pager_clean_sync(vp); error = ncl_flush(vp, MNT_WAIT, td, 1, 0); } if (error == 0) @@ -3908,9 +3899,7 @@ relock: vn_finished_write(mp); goto relock; } - VM_OBJECT_WLOCK(invp_obj); - vm_object_page_clean(invp_obj, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(invp_obj); + vnode_pager_clean_sync(invp); } error = ncl_flush(invp, MNT_WAIT, curthread, 1, 0); } @@ -4069,7 +4058,6 @@ static int nfs_ioctl(struct vop_ioctl_args *ap) { struct vnode *vp = ap->a_vp; - vm_object_t obj; struct nfsvattr nfsva; struct nfsmount *nmp; int attrflag, content, error, ret; @@ -4114,10 +4102,7 @@ nfs_ioctl(struct vop_ioctl_args *ap) * size is up to date on the Metadata Server. */ - obj = vp->v_object; - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(obj); + vnode_pager_clean_sync(vp); error = ncl_flush(vp, MNT_WAIT, ap->a_td, 1, 0); if (error == 0) error = nfsrpc_seek(vp, (off_t *)ap->a_data, &eof, diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 374019a2a643..5eb16564cf00 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -51,6 +51,8 @@ #include #include #include +#include +#include FEATURE(nfsd, "NFSv4 server"); @@ -1715,11 +1717,7 @@ nfsvno_fsync(struct vnode *vp, u_int64_t off, int cnt, struct ucred *cred, /* * Give up and do the whole thing */ - if (vp->v_object && vm_object_mightbedirty(vp->v_object)) { - VM_OBJECT_WLOCK(vp->v_object); - vm_object_page_clean(vp->v_object, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(vp->v_object); - } + vnode_pager_clean_sync(vp); error = VOP_FSYNC(vp, MNT_WAIT, td); } else { /* diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c index f09254289769..324f38abd10e 100644 --- a/sys/fs/smbfs/smbfs_io.c +++ b/sys/fs/smbfs/smbfs_io.c @@ -636,12 +636,7 @@ smbfs_vinvalbuf(struct vnode *vp, struct thread *td) } np->n_flag |= NFLUSHINPROG; - if (vp->v_bufobj.bo_object != NULL) { - VM_OBJECT_WLOCK(vp->v_bufobj.bo_object); - vm_object_page_clean(vp->v_bufobj.bo_object, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(vp->v_bufobj.bo_object); - } - + vnode_pager_clean_sync(vp); error = vinvalbuf(vp, V_SAVE, PCATCH, 0); while (error) { if (error == ERESTART || error == EINTR) { diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 0a0c1cd2f2a0..13f99a71ef04 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -67,6 +67,7 @@ #include #include #include +#include #include #include @@ -717,7 +718,6 @@ static int aio_fsync_vnode(struct thread *td, struct vnode *vp, int op) { struct mount *mp; - vm_object_t obj; int error; for (;;) { @@ -725,12 +725,7 @@ aio_fsync_vnode(struct thread *td, struct vnode *vp, int op) if (error != 0) break; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - obj = vp->v_object; - if (obj != NULL) { - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, 0); - VM_OBJECT_WUNLOCK(obj); - } + vnode_pager_clean_async(vp); if (op == LIO_DSYNC) error = VOP_FDATASYNC(vp, td); else diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index e18c34656af4..20e220135b15 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -94,6 +94,7 @@ #include #include #include +#include #include #if defined(DEBUG_VFS_LOCKS) && (!defined(INVARIANTS) || !defined(WITNESS)) @@ -3989,7 +3990,6 @@ vdrop_recycle(struct vnode *vp) static int vinactivef(struct vnode *vp) { - struct vm_object *obj; int error; ASSERT_VOP_ELOCKED(vp, "vinactive"); @@ -3999,6 +3999,7 @@ vinactivef(struct vnode *vp) vp->v_iflag |= VI_DOINGINACT; vp->v_iflag &= ~VI_OWEINACT; VI_UNLOCK(vp); + /* * Before moving off the active list, we must be sure that any * modified pages are converted into the vnode's dirty @@ -4009,12 +4010,9 @@ vinactivef(struct vnode *vp) * point that VOP_INACTIVE() is called, there could still be * pending I/O and dirty pages in the object. */ - if ((obj = vp->v_object) != NULL && (vp->v_vflag & VV_NOSYNC) == 0 && - vm_object_mightbedirty(obj)) { - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, 0); - VM_OBJECT_WUNLOCK(obj); - } + if ((vp->v_vflag & VV_NOSYNC) == 0) + vnode_pager_clean_async(vp); + error = VOP_INACTIVE(vp); VI_LOCK(vp); VNPASS(vp->v_iflag & VI_DOINGINACT, vp); @@ -4112,11 +4110,7 @@ loop: * vnodes open for writing. */ if (flags & WRITECLOSE) { - if (vp->v_object != NULL) { - VM_OBJECT_WLOCK(vp->v_object); - vm_object_page_clean(vp->v_object, 0, 0, 0); - VM_OBJECT_WUNLOCK(vp->v_object); - } + vnode_pager_clean_async(vp); do { error = VOP_FSYNC(vp, MNT_WAIT, td); } while (error == ERELOOKUP); @@ -5094,17 +5088,12 @@ static void __noinline vfs_periodic_msync_inactive(struct mount *mp, int flags) { struct vnode *vp, *mvp; - struct vm_object *obj; - int lkflags, objflags; + int lkflags; bool seen_defer; lkflags = LK_EXCLUSIVE | LK_INTERLOCK; - if (flags != MNT_WAIT) { + if (flags != MNT_WAIT) lkflags |= LK_NOWAIT; - objflags = OBJPC_NOSYNC; - } else { - objflags = OBJPC_SYNC; - } MNT_VNODE_FOREACH_LAZY(vp, mp, mvp, vfs_periodic_msync_inactive_filter, NULL) { seen_defer = false; @@ -5120,11 +5109,11 @@ vfs_periodic_msync_inactive(struct mount *mp, int flags) continue; } if (vget(vp, lkflags) == 0) { - obj = vp->v_object; - if (obj != NULL && (vp->v_vflag & VV_NOSYNC) == 0) { - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, objflags); - VM_OBJECT_WUNLOCK(obj); + if ((vp->v_vflag & VV_NOSYNC) == 0) { + if (flags == MNT_WAIT) + vnode_pager_clean_sync(vp); + else + vnode_pager_clean_async(vp); } vput(vp); if (seen_defer) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 1401cc6da667..c739b5d5beaa 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -83,6 +83,7 @@ #include #include #include +#include #include #include @@ -3546,11 +3547,7 @@ retry: goto drop; vn_lock(vp, vn_lktype_write(mp, vp) | LK_RETRY); AUDIT_ARG_VNODE1(vp); - if (vp->v_object != NULL) { - VM_OBJECT_WLOCK(vp->v_object); - vm_object_page_clean(vp->v_object, 0, 0, 0); - VM_OBJECT_WUNLOCK(vp->v_object); - } + vnode_pager_clean_async(vp); error = fullsync ? VOP_FSYNC(vp, MNT_WAIT, td) : VOP_FDATASYNC(vp, td); VOP_UNLOCK(vp); vn_finished_write(mp); diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 1852f2b1ef00..40596263d551 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -88,6 +88,7 @@ #include #include #include +#include #ifdef HWPMC_HOOKS #include @@ -2575,7 +2576,6 @@ int vn_bmap_seekhole_locked(struct vnode *vp, u_long cmd, off_t *off, struct ucred *cred) { - vm_object_t obj; off_t size; daddr_t bn, bnp; uint64_t bsize; @@ -2600,12 +2600,7 @@ vn_bmap_seekhole_locked(struct vnode *vp, u_long cmd, off_t *off, } /* See the comment in ufs_bmap_seekdata(). */ - obj = vp->v_object; - if (obj != NULL) { - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(obj); - } + vnode_pager_clean_sync(vp); bsize = vp->v_mount->mnt_stat.f_iosize; for (bn = noff / bsize; noff < size; bn++, noff += bsize - diff --git a/sys/sys/param.h b/sys/sys/param.h index de6b56dd748a..33b07a431813 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500008 +#define __FreeBSD_version 1500009 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, diff --git a/sys/ufs/ffs/ffs_rawread.c b/sys/ufs/ffs/ffs_rawread.c index ef93c1ab6783..3a415d766303 100644 --- a/sys/ufs/ffs/ffs_rawread.c +++ b/sys/ufs/ffs/ffs_rawread.c @@ -52,6 +52,7 @@ #include #include #include +#include static int ffs_rawread_readahead(struct vnode *vp, caddr_t udata, @@ -132,15 +133,10 @@ ffs_rawread_sync(struct vnode *vp) vn_finished_write(mp); return (EIO); } - /* Attempt to msync mmap() regions to clean dirty mmap */ - if ((obj = vp->v_object) != NULL && - vm_object_mightbedirty(obj)) { - VI_UNLOCK(vp); - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(obj); - } else - VI_UNLOCK(vp); + VI_UNLOCK(vp); + + /* Attempt to msync mmap() regions to clean dirty mmap */ + vnode_pager_clean_sync(vp); /* Wait for pending writes to complete */ BO_LOCK(bo); diff --git a/sys/ufs/ufs/ufs_bmap.c b/sys/ufs/ufs/ufs_bmap.c index 14775cace408..9d21eaa0cb56 100644 --- a/sys/ufs/ufs/ufs_bmap.c +++ b/sys/ufs/ufs/ufs_bmap.c @@ -48,6 +48,7 @@ #include #include +#include #include #include @@ -347,7 +348,6 @@ ufs_bmap_seekdata(struct vnode *vp, off_t *offp) struct inode *ip; struct mount *mp; struct ufsmount *ump; - vm_object_t obj; ufs2_daddr_t bn, daddr, nextbn; uint64_t bsize; off_t numblks; @@ -370,12 +370,7 @@ ufs_bmap_seekdata(struct vnode *vp, off_t *offp) * pages into buffer writes to ensure that we see all * allocated data. */ - obj = vp->v_object; - if (obj != NULL) { - VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(obj); - } + vnode_pager_clean_sync(vp); bsize = mp->mnt_stat.f_iosize; for (bn = *offp / bsize, numblks = howmany(ip->i_size, bsize); diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index f9fb1ba23655..d32fec845043 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -1690,3 +1690,30 @@ vnode_pager_getvp(vm_object_t object, struct vnode **vpp, bool *vp_heldp) { *vpp = object->handle; } + +static void +vnode_pager_clean1(struct vnode *vp, int sync_flags) +{ + struct vm_object *obj; + + ASSERT_VOP_LOCKED(vp, "needs lock for writes"); + obj = vp->v_object; + if (obj == NULL) + return; + + VM_OBJECT_WLOCK(obj); + vm_object_page_clean(obj, 0, 0, sync_flags); + VM_OBJECT_WUNLOCK(obj); +} + +void +vnode_pager_clean_sync(struct vnode *vp) +{ + vnode_pager_clean1(vp, OBJPC_SYNC); +} + +void +vnode_pager_clean_async(struct vnode *vp) +{ + vnode_pager_clean1(vp, 0); +} diff --git a/sys/vm/vnode_pager.h b/sys/vm/vnode_pager.h index 77252a4fc9c2..7b8d79022a31 100644 --- a/sys/vm/vnode_pager.h +++ b/sys/vm/vnode_pager.h @@ -39,6 +39,9 @@ #ifdef _KERNEL +struct vnode; +void vnode_pager_clean_sync(struct vnode *vp); +void vnode_pager_clean_async(struct vnode *vp); int vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int count, int *rbehind, int *rahead, vop_getpages_iodone_t iodone, void *arg); From nobody Thu Jan 11 18:25:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9tPq09ttz56fCW for ; Thu, 11 Jan 2024 18:25: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 4T9tPp6h1Cz3wxd; Thu, 11 Jan 2024 18:25:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704997518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ImaED2nA1D/CDIbiNQukagvHlRcUH6Cw1+noKNDz1vc=; b=cUPNWu1Jp9KV88fKnKJMpmvkmxuqR6Sokx8sf8Jo4c/foFLfR+1lS31rTSO4RXB1LrDTVt cvTRKU6abrFnpTdpssBydIczrRxjt+1I6/9jIvU/6R6Soslq6mnbW2AbMIq9RUWpQUNNrT MrKjOkIggwMTJR8mTvUlR756T0YNA2rTl+sVmAPHiEQiE5ndbRAKr5XD1pH96gIOXOcCxW yLDmixcOvu5JA+EZ/bXX286+eI2hodjPr64F+ABtQknhsMJpcVw/4ttkxo5sTqSpO1NWy4 na9LgsQB/a9KA0ZylBdLRziI2IqzTZD4Xeb5n1U4dzybh9MzKKF/X7a7JaNJ8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704997518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ImaED2nA1D/CDIbiNQukagvHlRcUH6Cw1+noKNDz1vc=; b=JbYyihjBnvW2SPmLLV4dfOjqtSuHlfocBOKEM5WzTXrbrDhZfcgZ2iIac5Pt2tvKaeBglw G/uY8g9Lf/WoK3Sgy+EwP0PCx80p7RB0euqQuj7uN8nEI2RQEpFeT+RmnoUpXmrg0VHmN8 RrTp5wdh3C8DX4aA9YUFs6iKplqCbwX63V2IthhjN/T/hmT5Fh/ziiOENPBYWIm7EiXs1I AHIDZ5ijR4DH5YZdDPTfdIUAR8QyEiuJsrj6PUxPiUyoSi/2zi7talouMkptEHm0nB+HKm a4XHlAAmf29aEz+BelWCzofV8MK7VAwQspRJVAwKg0dIlWsqzO1iaIHJIA691w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704997518; a=rsa-sha256; cv=none; b=MCRq0HZ/Z8u4jiY5RXXu9neSK6K0I00d83LtPCHqv7KK4VuaSV/1fmmMPkVMugJEMP13z1 fxKTGJ6BOEGRSQPqrCOySVmTLAoUt3yM5eMovvOj1C9XdKL4xkpqNPogoivgqt2K0b7XuE PepAWAuveOTq32C2RbZtMY1zA4Zcy68WlO5siI1AkU3Gr07H8JCYumN2Gd1m5Nw7VaO3vx +8NKspekhtm6Tsb2MsfxS/2o4OCHu99nrhIRzc8wE5yEBLafExepxmDeP1kkiBDu0r6f25 2XuJOilIZnajOEYy6blXBtyDZ+DzSBWn7GRV8SB7+Ngy7/PlIHLgcBHKvUMaWg== 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 4T9tPp5LVpzVGT; Thu, 11 Jan 2024 18:25: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 40BIPIPP017215; Thu, 11 Jan 2024 18:25:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BIPIRo017214; Thu, 11 Jan 2024 18:25:18 GMT (envelope-from git) Date: Thu, 11 Jan 2024 18:25:18 GMT Message-Id: <202401111825.40BIPIRo017214@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: aca2e42c6729..950076cd18f3 - vendor/llvm-project/main - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/vendor/llvm-project/main X-Git-Reftype: branch X-Git-Commit: 950076cd18f3fa9d789b4add9d405898efff09a5 X-Git-Oldrev: aca2e42c67292825f835f094eb0c4df5ce6013db X-Git-Newrev: 950076cd18f3fa9d789b4add9d405898efff09a5 Auto-Submitted: auto-generated The branch vendor/llvm-project/main has been updated by dim: URL: https://cgit.FreeBSD.org/src/log/?id=aca2e42c6729..950076cd18f3 950076cd18f3 Vendor import of llvm-project main llvmorg-18-init-16864-g3b3ee1f53424. From nobody Thu Jan 11 18:25:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9tPq0FNwz56f9B for ; Thu, 11 Jan 2024 18:25: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 4T9tPp6nvcz3wkt; Thu, 11 Jan 2024 18:25:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704997519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BorAtS+JCkF1WjUvjj9Uz4T9W6rtZfuOQldFKHVGw3Y=; b=yReeLTOqODE1vLxcEstG/uYzFbwRRQmnsK+uX0ZZ9mwM8reep0xJul+SuCKV8h87z9oHj+ Ik+Gi502D8HkgsAhKKUKQp+wW4CJLdtBUpjtZhkOUfSkH2xOIjR4arfZzvxyb8D+hlZ2Nu OUrFFtV+B0PvqU2XNs6XLCkJYWVkkK63qe5yW6dPJR4Sh4vY/CHN2LaROjerWyE+0UzPA/ 3vfC15jVRN1KcjCutF6Bu3UFoCDWl+qrgN4EK5dVgykdujxZucV+I3eqObhpjikhq6vmEA LHQDx3I9bPInTG8vpcHqvRpVnKcfrjgFQsIiA4YGsP8JOThQN8XbRuxODsw44w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704997518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BorAtS+JCkF1WjUvjj9Uz4T9W6rtZfuOQldFKHVGw3Y=; b=nIvkxyf7TW68Ty8w7yxqqezZmRvANigTJ4IeKIpWo2MeuGa2eKQW4pUiTFwrEsuAWiXnkU 8d5nG33bulBlFWAwd0zj3q0Rs5B8rOpcVsl1KqPbSslv0GwvALyEGMM2rLgec7Li+bBGXh zrCHiw1NPT8dCGGj0LjdWAdE7Orlqjdv4M5yd/U9UJwnSxIOjoYD+aSzoyp9gsgdDZMgdC VfVlV7mN2gYp82SiHmt02XVZwj8T+qkL7MVOozp7tJPeSyMcutZ39swvR5cJq3YPQh64Ig 1diuzKsd07mdisdCEJ7WtRHI+Ypw7x25fkjxXDfMt2jYxWGn8w0KCBfwJSAiNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704997518; a=rsa-sha256; cv=none; b=Lb5knjIx6nAGeI/KyNqHfmk8q6moSftDfrrJO4kHJ3L4w8X55vLUMPvF2emrENPfagI28Q QuQFLW3IrQwOGqHc2GrzKhhnglGTPXozaGYg/Z9TU0LWaGFR4OQITcf8ebGcM8vYP8XFIQ pxwNwwQhG5jQAVwLinG8h+rStxoHpE50InHj/75SIPqfPT2JG1Iz5RYioXaLdOOlnZfwrA sjR4xHS1ikhiS4d4t8UTlzvPrPimdcYVazgvsHuBY/AwT6T/UrRm/F2KyjRdBGOeV91n7F abNE6ZHTI+HRHmbiSZJYiL3kWwOvUVUr4+TzB3ZFrVIvSZEDOedCSQCFcDz1Mw== 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 4T9tPp5lSmzVGV; Thu, 11 Jan 2024 18:25: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 40BIPITB017234; Thu, 11 Jan 2024 18:25:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BIPIXt017233; Thu, 11 Jan 2024 18:25:18 GMT (envelope-from git) Date: Thu, 11 Jan 2024 18:25:18 GMT Message-Id: <202401111825.40BIPIXt017233@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 3ae284c27caf - Create tag vendor/llvm-project/llvmorg-18-init-16864-g3b3ee1f53424 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/tags/vendor/llvm-project/llvmorg-18-init-16864-g3b3ee1f53424 X-Git-Reftype: annotated tag X-Git-Commit: 3ae284c27caf19231248b3056f1f7b3c3054182f Auto-Submitted: auto-generated The annotated tag vendor/llvm-project/llvmorg-18-init-16864-g3b3ee1f53424 has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/llvm-project/llvmorg-18-init-16864-g3b3ee1f53424 tag vendor/llvm-project/llvmorg-18-init-16864-g3b3ee1f53424 Tagger: Dimitry Andric TaggerDate: 2024-01-11 18:24:40 +0000 Tag llvm-project main llvmorg-18-init-16864-g3b3ee1f53424. commit 950076cd18f3fa9d789b4add9d405898efff09a5 Author: Dimitry Andric AuthorDate: 2024-01-11 18:24:21 +0000 Commit: Dimitry Andric CommitDate: 2024-01-11 18:24:21 +0000 Vendor import of llvm-project main llvmorg-18-init-16864-g3b3ee1f53424. From nobody Thu Jan 11 18:27:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9tSR3kptz56fY1; Thu, 11 Jan 2024 18:27: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 4T9tSR2zNPz3xDv; Thu, 11 Jan 2024 18:27:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704997655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cjr5QoxkufljzKeJMFiGvPrkqojvSXz6zRHgPYoXtIU=; b=ynHN3BRG4ntuNBsIgXX75R13JRfoNSz5c7dNkA4PxsRjHWajQxtsGk859JyHfrFkzw2Dia EQRze3z7qq9HB+sji7TUlORzBNpwx/bTHw76ErRKLN/hJt8IoKaJS8E5UvUeiVVGmuas1U nZT+QDa0Dw8o1KYIdcJJheWPVtrsK2IV6MzkRm6HVmKiTL2BXIwdrfjqJv9AqDUhbb0jLh LdOTpJjdT8CrtSX8DhMnGwVhGRsAaQxeGbo5rYE6mCUY+WdImTdT3+faygYDThGTIfiL4h AfxWstqvyAiHxzBGh6mS1vAVOAIPLxgVla21CFa9N67GPZDAfSvxzWBtoH/7qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704997655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cjr5QoxkufljzKeJMFiGvPrkqojvSXz6zRHgPYoXtIU=; b=OA/HAAWZRQWraEukH1Sjb5z0Nyl6A7/CHm+e7q+/WoJ5fI78vjcmpGAeGJ9TyRFxqbrZd3 KTnHEK7C7P1bNsim9LGeiVHmn3tbCJv3rHAATksQVmoOtsaS399vzXa5GUYgnCS2ZasOmp khmKrCdI7wanoRbT5ZQv7YgaOO7oACL/VC/Kl5H2GFItMGxvdc5EaC7dCeocyclopTtJc0 ywlg1p1AJA208n8Lmvq7haT1ukRU2kLRDAaB/feSi1pf5mEdfUl3btwMUeoZg/y6LTRTUg fGSH6G4CAr8t8WGxEZ1YRVi5+MEEcqlhPRvlNSkPhHhOyOHUNEJAuLbDaKOGBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704997655; a=rsa-sha256; cv=none; b=YyLc9YfWnonUzy1R48IJPn2+Psr7jX6fcTjl6ckW13i7JUbiAwuTQmYD1rALQSOpMBOswp cNl04nVZPw/2uNSJixZv8gaysc7TpFrHzW4XvrB+vRhY7VaGtd6bXNkNU+NL9v9/yYQYra M1g0pzxUo1zb8RDoQkMwM5vZn3jb+jTYPDPXB0uB8vbBj/Z8s75QVTcx+6MeKPr5urs9G5 P5xM85vMkMkSAXMD202iRj0bpOog6Zr+vj/dZdNxMU+43YypC3lFOM+Vg4zjmEl8M6G/mY m7FoXMt/l9l3FrSAEaIXZ7ofT2+Q2rjaug5u1M+AQSKaulblLD9P1hQ69JRWZA== 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 4T9tSR1wKBzVD5; Thu, 11 Jan 2024 18:27: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 40BIRZNE017653; Thu, 11 Jan 2024 18:27:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BIRZcK017650; Thu, 11 Jan 2024 18:27:35 GMT (envelope-from git) Date: Thu, 11 Jan 2024 18:27:35 GMT Message-Id: <202401111827.40BIRZcK017650@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 6597ea4481bb - main - powerpc/SYS.h: implement _SYSCALL_BODY() macro List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6597ea4481bb29b6ac72b9c55038b1e98634bf92 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6597ea4481bb29b6ac72b9c55038b1e98634bf92 commit 6597ea4481bb29b6ac72b9c55038b1e98634bf92 Author: Brooks Davis AuthorDate: 2024-01-11 18:27:20 +0000 Commit: Brooks Davis CommitDate: 2024-01-11 18:27:20 +0000 powerpc/SYS.h: implement _SYSCALL_BODY() macro Add _SYSCALL_BODY() macro which invokes the syscall via _SYCALL() and calls cerror as required. Use to implement PSEUDO() and RSYSCALL(). Reviewed by: jhibbits Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D43323 --- lib/libc/powerpc/SYS.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/libc/powerpc/SYS.h b/lib/libc/powerpc/SYS.h index 8c47a65735f5..b990793c7e3e 100644 --- a/lib/libc/powerpc/SYS.h +++ b/lib/libc/powerpc/SYS.h @@ -40,14 +40,17 @@ li 0,(SYS_##name); \ sc +#define _SYSCALL_BODY(name) \ + _SYSCALL(name); \ + bnslr; \ + b CNAME(HIDENAME(cerror)) + #define PSEUDO(name) \ .text; \ .align 2; \ ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - bnslr; \ - b CNAME(HIDENAME(cerror)); \ + _SYSCALL_BODY(name); \ END(__sys_##name) #define RSYSCALL(name) \ @@ -56,7 +59,5 @@ END(__sys_##name) ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, name); \ WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - bnslr; \ - b CNAME(HIDENAME(cerror)); \ + _SYSCALL_BODY(name); \ END(__sys_##name) From nobody Thu Jan 11 18:27:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9tSS4yV2z56fP4; Thu, 11 Jan 2024 18:27: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 4T9tSS3Yrvz3xHQ; Thu, 11 Jan 2024 18:27:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704997656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NNmz/lpKsrBhnc6XYx9gRAEOUFayvzCTX8HpGeS03rQ=; b=DupPPM9H7/qOOjM4rq39taHPMZMYUtaEV71qKpCi/5PT+pNsx2k3avDe1DZS11ltKbOFus EgH7XSnQgpPlD+Bh9Q0o+8sOU5SPqXCk4ZjIcfK919yYefon5D8CqvrVwTkzKnz6nNua7Z 9GRCTk8KKJEjd+DP1HVa5HuF53/+KU4lNhA4uB/e3RB8mDGIglchbNWvPOsR6RH6VBNCf/ AytlMC+F2vzYKttLvMK+A3VycYRX6ApYR6EcICMEvP6WMsM83uiy2SXX3CKYbJ5JvNKIBg 0v3PnOtSSTtIKUHkifnifUc4kWtIL0zihVMpqQEBs0+oQhtgPN8tyUmt+OiXYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704997656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NNmz/lpKsrBhnc6XYx9gRAEOUFayvzCTX8HpGeS03rQ=; b=l5/ceeuJWkJuNgXv91KIHGPc/NhyEENO+H9OGduNxCe1MGW0oZPeRra8xgItKzK9tpAdEL S/K5UhiQIV4iWTHMG0FtrisKwRCDqfwQoW8xycKOIwJ0WCdgVorY9WN5NHYP6PHdlbQ0yy SduroFTvXXUMpgZ8RuiF5zY7SBP+iWOyTdGaokSzw8n4BUwBAO9MbQd6oLmCk7yKOnV0ZQ defhZmpEIfH9mBQGOCt0j+B01d04nq/maPvYDFLZ0HfDaYz6sP6wX4ZuQkteJby4R6hcEj vTsiqGNyrhBjoNGOpKx/iD1JvARkA+++slObg8teD+utwdxdqLgG/aA6zGsKSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704997656; a=rsa-sha256; cv=none; b=QSuv3i8D5XDgYfDKuSfdIWbX2ZfU6WZkQNa5LNxVciAfqN4V2VH+Ywkg63pawRa3zU9RUp Nfvzq/doagQ2naV7nrmekr2/8BLmBQQuOpt5boW6mbXk+RMupDaSWAlWtOcI/uMvLYJmsl xQNY66eJSbYLLBTS74BZPWGaN67wadMZ1q2xZjuyfEvMooB41FdTPVjgWo/cdhFHV1S2Gc XN6iMawfu6u+P4X6+l0gGlctjWfk13eqO8io8Tx+J2/40VCIZEA2MBgXK+wgp+yY0g2GVi Zqn2Bf1HH6Cao2OJ9JMm1OQ9tVh8xkTkeR7zo72WCbLx2TANi///LK/akHxyBQ== 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 4T9tSS2gF0zTrZ; Thu, 11 Jan 2024 18:27: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 40BIRaUP017701; Thu, 11 Jan 2024 18:27:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BIRaTp017698; Thu, 11 Jan 2024 18:27:36 GMT (envelope-from git) Date: Thu, 11 Jan 2024 18:27:36 GMT Message-Id: <202401111827.40BIRaTp017698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: e2417a21a025 - main - libc: separate syscall and non-syscall symbols List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e2417a21a02562655d760005e9827f1190bb652f Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e2417a21a02562655d760005e9827f1190bb652f commit e2417a21a02562655d760005e9827f1190bb652f Author: Brooks Davis AuthorDate: 2024-01-11 18:27:20 +0000 Commit: Brooks Davis CommitDate: 2024-01-11 18:27:20 +0000 libc: separate syscall and non-syscall symbols Put declerations of _ and __sys_ prefixed stubs at the top and everything else at the bottom. Sort the bottom list with sort(1). This paves the way to generate the syscall symbol list. Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D43386 --- lib/libc/sys/Symbol.map | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index f17aae279b8d..a2b8c2d40fc1 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -425,6 +425,7 @@ FBSD_1.7 { }; FBSDprivate_1.0 { + /* System call stubs */ ___acl_aclcheck_fd; __sys___acl_aclcheck_fd; ___acl_aclcheck_file; @@ -536,8 +537,12 @@ FBSDprivate_1.0 { __sys_connect; _cpuset; __sys_cpuset; + _cpuset_getdomain; + __sys_cpuset_getdomain; _cpuset_getid; __sys_cpuset_getid; + _cpuset_setdomain; + __sys_cpuset_setdomain; _cpuset_setid; __sys_cpuset_setid; _cpuset_getaffinity; @@ -966,7 +971,6 @@ FBSDprivate_1.0 { _sigtimedwait; __sys_sigtimedwait; _sigwait; - __sigwait; __sys_sigwait; _sigwaitinfo; __sys_sigwaitinfo; @@ -1040,14 +1044,13 @@ FBSDprivate_1.0 { __sys_write; _writev; __sys_writev; - __set_error_selector; - nlm_syscall; - gssd_syscall; + + /* Things that aren't system calls (in sort(1) order) */ __libc_interposing_slot; __libc_sigwait; - _cpuset_getdomain; - __sys_cpuset_getdomain; - _cpuset_setdomain; - __sys_cpuset_setdomain; + __set_error_selector; + __sigwait; + gssd_syscall; + nlm_syscall; rpctls_syscall; }; From nobody Thu Jan 11 19:20:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9vdq29Sgz56lnM; Thu, 11 Jan 2024 19:20: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 4T9vdq1jmsz43N6; Thu, 11 Jan 2024 19:20:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705000847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D6MAztWd3v1pI4V3L35TDFK/dwfhfJgmiiFeDJhVvyQ=; b=szu5G7KKFbp96NFJs2cWJOZVkl4vE0Yq2oeOZnsfqskEtg8x9fQPFGV+0mN81tnDQMgPGH ca17Xlq18PM8oty4PdCY44m3gPjTTXdzFvLcm3LjhhrAyqOyTecFnXxGexaGc6eNthB/9o u1ljL7lIJBQ5No7ZCkZf+GZXmRTELJECs9AazZp01sY3SHqM3iWsir4h3HZqxwFM7a5S7d 8hlLszh6f2cS0bCizJuh6SDBgyItaDXroKzuvc8yVgg316rWl8Db3nqV6uL8AGjknDoAJc ZHud9I/yz65ZiF1g+1zfgVq2XgnltwfN2RkqQGtoAwZ43gOjaBlxld72dUYmCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705000847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D6MAztWd3v1pI4V3L35TDFK/dwfhfJgmiiFeDJhVvyQ=; b=WYnCif0Zin9cO2+GcbFLpyrqJIahWbmbQvLfrJBURbWIjCc0PTmNuudepUBPTQf6f0q5Ep 5/cYs6S2rgWbkXSXt75TksVhB1+1MuRN2jAzH9MMk82LYWAIS5xRYW3I6w9mRaRIsraCYL op0ultXCJWsXljfggKOrjXT1ovwwprEJHAYwf0GhNopFpTTBdT0StvS4WAyoRAnR0xyqgL oWsmhm0kf6XxTVWoozJ/djU/C+hXiyewIwmsgVzFyrVvIgC4xwJwMLY/Oc/O7v9sAb6ru/ 5NPTyJ812TJ58dWjBH8u9fUJ0NGNuU5Jy2tvMoNvxHzd20IOkDBtmhFzPRvtVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705000847; a=rsa-sha256; cv=none; b=djgHFwMMAx3CWd/B2z77LBDaiGXH3I7eN9p32icTmWlgK6etIloGtCthgbDXJ2OlwzT+uE L+VPAmdP6xd5qdOD7gTS76guhFEaW6/YZsdnEhgPk55IPvGx6ij9bkBNiU5CZQF46CCKpP jFG7tarL2UFUIp6zg6OMxibgSoyTxgbuMA742BqXHm8+n2TDZhxvm47iNauCstQrZGedEj iM/UVOxlKN7VqaiXj3y+B2A0exajFQI37WLn6bdqxcq3TQx1CQNQUrVGiL3eB69nyTWVZu ca9UdRy9kaVuVXCXGLE7Mmsd9mdlozqeTFwXiKg3bghWtgzvF5mov2p9LCtsNA== 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 4T9vdq0qDLzWxB; Thu, 11 Jan 2024 19:20: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 40BJKlVP011972; Thu, 11 Jan 2024 19:20:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BJKl8X011969; Thu, 11 Jan 2024 19:20:47 GMT (envelope-from git) Date: Thu, 11 Jan 2024 19:20:47 GMT Message-Id: <202401111920.40BJKl8X011969@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: d682a91726d7 - main - conf: Do not set -fno-sanitize-memory-param-retval for old compilers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: d682a91726d72eaf7ba8dddeb4d9ce161ab8b93a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d682a91726d72eaf7ba8dddeb4d9ce161ab8b93a commit d682a91726d72eaf7ba8dddeb4d9ce161ab8b93a Author: Mark Johnston AuthorDate: 2024-01-11 16:42:47 +0000 Commit: Mark Johnston CommitDate: 2024-01-11 19:20:22 +0000 conf: Do not set -fno-sanitize-memory-param-retval for old compilers The option was introduced in LLVM 16. Fixes: b6c653c97463 ("kmsan: Set -fno-sanitize-memory-param-retval for now") MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. --- sys/conf/kern.pre.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 158175eb6899..6bf647f5c3ea 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -125,8 +125,10 @@ KMSAN_ENABLED!= grep KMSAN opt_global.h || true ; echo # Disable -fno-sanitize-memory-param-retval until interceptors have been # updated to work properly with it. SAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kmsan \ - -fsanitize=kernel-memory \ - -fno-sanitize-memory-param-retval + -fsanitize=kernel-memory +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 160000 +SAN_CFLAGS+= -fno-sanitize-memory-param-retval +.endif .endif KUBSAN_ENABLED!= grep KUBSAN opt_global.h || true ; echo From nobody Thu Jan 11 20:34:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9xGQ3dPwz56vNg; Thu, 11 Jan 2024 20:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9xGQ36fRz4Cwl; Thu, 11 Jan 2024 20:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705005246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+I45HK0CvPhSjXds7/YWzmcfaCM3m5nM+2mfv/y1QM0=; b=so8d29Ni9V4Aua54FkSKloxP9yY/tduPu5gVif12fycgtYkpFvGJ0dU7x+tFSAkyqgOJ6k GvamUVy7y4LrH4L9hXD03SWhv3tGpxpd8eR2sMe9v6UUqhobhEH/rTHvTDxWlMalbX2JrU y/rcEDE5yN1XsXZroQOTxFkLvJ6mTvGYC6J8bC8xzsAF8mV/VKAxcWm/qMCeqEeglJ5YKl /vpuZsn7lZTr2bbJYvZfi4Salh3h2hachUZyb7x+KH1ftOt2La07NoYvFYZi2NhNdUJl4q QBdDczqg0n8+gqPJTgNBGl/EL4YLSh/wxj/i5yqijcWouTyLhUSIu50GAzfKEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705005246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+I45HK0CvPhSjXds7/YWzmcfaCM3m5nM+2mfv/y1QM0=; b=pYxMHv54XZSgmsOibLOHJjAVo2rw5HEm1vDaz7NafV4jrjXIGIoZkci0C8DbRpK4oTOI6f 3RNkcSAXkm+d77TKL0aLd+NfRSlrsEONpYxcdyW0XeJlxZt7Fted40CsrqhlmLS8HC05Hn IS5u/57l4IeMOoG4Prh5lOVVi3UvzrO6bMCc7AdWJbPzMeZfYRjVvdKTUtmpk4J59glU8J 2R3MTbc3Os2nR9L5r7JdYLnLEud/GicnrO6wlveL6cct037f9gGKex7YNXwZJ1AavlrRYi US+AD99vfcnBx8HN0wA39xGV/gM1JeQPQXiQ2o2DtyT13n0kY8wdY8gwmNbqlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705005246; a=rsa-sha256; cv=none; b=llVgf/AJ8ZaIUxyWY4QK7GpkbBza7bYjRvVMyo3jp9/KdL/c9DgoRR1NTsNRuBijpgwCpN SG08CeSIIEwNS+R/s0gnQWL4jQr3u97ilPTuXmXYARKkoJ3zMp6xjHpLoZ9Q7olNJNPSMX oqlKw8/6R4RCVsOELoxgdApPgWX6NJ7sxiFE+Lnn6nbsRjr6SjfYlZ/DUVM8RiZS5S+KG7 NlqWALgK8gbsSl8AMIQUz9LQiRau/fFw3yZaY/W7ujwHgnzKd89xZh1nrtNbI06PH1YF63 LcELNEtM+4xVgkkPEmPi12NDTT2Khx6XTgRM1OLvUPaZ8MabCxh8Kf6rwSw0Iw== 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 4T9xGQ29S4zZ1V; Thu, 11 Jan 2024 20:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40BKY6tv035112; Thu, 11 Jan 2024 20:34:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BKY6bC035109; Thu, 11 Jan 2024 20:34:06 GMT (envelope-from git) Date: Thu, 11 Jan 2024 20:34:06 GMT Message-Id: <202401112034.40BKY6bC035109@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: 0e1d8481f93c - main - ktls: fix vnet-related panic in ktls_reset_receive_tag() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 0e1d8481f93c58008c5a2ef68c3a46a0da83644a Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=0e1d8481f93c58008c5a2ef68c3a46a0da83644a commit 0e1d8481f93c58008c5a2ef68c3a46a0da83644a Author: Martin Matuska AuthorDate: 2024-01-11 20:31:15 +0000 Commit: Martin Matuska CommitDate: 2024-01-11 20:32:29 +0000 ktls: fix vnet-related panic in ktls_reset_receive_tag() Reviewed by: gallatin, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43400 --- sys/kern/uipc_ktls.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index b69d16446b47..deba6940bbee 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -1644,7 +1644,9 @@ out: if (ifp != NULL) if_rele(ifp); + CURVNET_SET(so->so_vnet); sorele(so); + CURVNET_RESTORE(); ktls_free(tls); } From nobody Thu Jan 11 23:37:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TB1LN46fMz56ns3; Thu, 11 Jan 2024 23:37: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 4TB1LN2lXNz4VMZ; Thu, 11 Jan 2024 23:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705016268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cz6ZU2LBkkk7R3yi+wJEJ7rOLLAkOnvAj7LP47Ig9A4=; b=kAwgzi61dZtrT0kg8mW7xTxGzaks36Ea3qnkk/BexeGHN1BF4gjzukbm+vsqnfFcFUrI43 UVljhZjwEgg0KvuBYQlsZSQvw9/OMv7yWizYA6Lfud3ZjZr4L87SRT5MQlI9r4GOX+gOrK /KMDTkWKxw4DbH8Bfhq3qT4CRSBZGXaLZwDqN+mmhVkKkJBNW5TciphF8RdqAiMvIn9TFm 3xXYD52ZkQuy0z9I+T/QMq+ArCH/NAslZ/tukN+cVGviWDSYJPl8hpZcduCVOv5SSX6wnU KPD4xOcyuHVqAY4o665uSsr85d439KwnVZQ/y//r0j3NNRJ8In05t/0NH9PIYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705016268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cz6ZU2LBkkk7R3yi+wJEJ7rOLLAkOnvAj7LP47Ig9A4=; b=JagnuD0MLopCh4Nl6O8/9rty87P7JW4yKVG4EUI8hQ0ISrVjos/KDfJwYBUODG+yejKXsO Or3eOy285HLhLCUO06lRU4vhmZCT8gkKbdAtYCWrlWXt1fucnCPo+uR7d20RaVV8rn6BuH bEGRUOsM4elo0fmWup6cwf6cumYn26InuKbS2rDIZRfSMfhy9N4IJE4scYWq5mNQw9qf9a 2i7zm//X6I49p4Ipmh+7dDVfzxKLbzR7C4CC6pmyorm8ySum+KSVfc/9cY7V0o17lpJMB/ M5t7CnHeznd4c1KfQMPn1UQNDZmaofiGew3SRIjHUePC23fjp8Sqh2IFeUKuHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705016268; a=rsa-sha256; cv=none; b=pcPORQDotb9Sbl5nhyCU+ZtkXGhcX57lwbS8xriGeR/Vamrw2Yq7GKWnX22SvrfgE1jAsD cw4IWltyvpam+IvgyVyzhvLaol51Rb1pjLPjPXqajxAtGfJSRyii9uVXwOwTADovl3BGdO qkhr2bJiQ7F71UkUpsd/GylEm7tk5he+MdL2/kPr2zyw9k0guz0aBK/7q4K27VmgLfKwGJ +uW7/u+Jqa3Cv3sMtOn9BeOcn+oxbqqNxWE+/j5SmQe5KRf6wc2t37MaWCFYAXasPJzTPg +zd/wsxOJQbP33YPrJPJh5XmWppz+vmPL8HDNPHs3tsMrWPFuIHEaB8MShjpSg== 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 4TB1LN1Y80zfP2; Thu, 11 Jan 2024 23:37: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 40BNbmnH037686; Thu, 11 Jan 2024 23:37:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BNbmG1037683; Thu, 11 Jan 2024 23:37:48 GMT (envelope-from git) Date: Thu, 11 Jan 2024 23:37:48 GMT Message-Id: <202401112337.40BNbmG1037683@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: d06a00963b7f - main - find: add SIGINFO handler List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d06a00963b7f724b6fdd7d7cdcbed57c534196a9 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=d06a00963b7f724b6fdd7d7cdcbed57c534196a9 commit d06a00963b7f724b6fdd7d7cdcbed57c534196a9 Author: Goran Mekić AuthorDate: 2024-01-11 22:35:25 +0000 Commit: Alan Somers CommitDate: 2024-01-11 23:37:14 +0000 find: add SIGINFO handler Print number of files processed and path currently being processed on SIGINFO. Reviewed by: des, asomers Sponsored by: Axcient MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43380 --- usr.bin/find/extern.h | 1 + usr.bin/find/find.c | 9 +++++++++ usr.bin/find/main.c | 10 ++++++++++ 3 files changed, 20 insertions(+) diff --git a/usr.bin/find/extern.h b/usr.bin/find/extern.h index c84ca8953e50..a1bd5e6d16a5 100644 --- a/usr.bin/find/extern.h +++ b/usr.bin/find/extern.h @@ -121,3 +121,4 @@ extern int exitstatus; extern time_t now; extern int dotfd; extern FTS *tree; +extern volatile sig_atomic_t showinfo; diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c index 54b4fdd679e4..aec04536071a 100644 --- a/usr.bin/find/find.c +++ b/usr.bin/find/find.c @@ -167,6 +167,7 @@ find_execute(PLAN *plan, char *paths[]) { FTSENT *entry; PLAN *p; + size_t counter = 0; int e; tree = fts_open(paths, ftsoptions, (issort ? find_compare : NULL)); @@ -208,6 +209,14 @@ find_execute(PLAN *plan, char *paths[]) continue; #endif /* FTS_W */ } + + if (showinfo) { + fprintf(stderr, "Scanning: %s/%s\n", entry->fts_path, entry->fts_name); + fprintf(stderr, "Scanned: %lu\n\n", counter); + showinfo = 0; + } + ++counter; + #define BADCH " \t\n\\'\"" if (isxargs && strpbrk(entry->fts_path, BADCH)) { (void)fflush(stdout); diff --git a/usr.bin/find/main.c b/usr.bin/find/main.c index 746bd91d80b7..0738da4071c8 100644 --- a/usr.bin/find/main.c +++ b/usr.bin/find/main.c @@ -59,8 +59,10 @@ int isxargs; /* don't permit xargs delimiting chars */ int mindepth = -1, maxdepth = -1; /* minimum and maximum depth */ int regexp_flags = REG_BASIC; /* use the "basic" regexp by default*/ int exitstatus; +volatile sig_atomic_t showinfo = 0; static void usage(void) __dead2; +static void siginfo_handler(int sig __unused); int main(int argc, char *argv[]) @@ -72,6 +74,8 @@ main(int argc, char *argv[]) (void)time(&now); /* initialize the time-of-day */ + (void)signal(SIGINFO, siginfo_handler); + p = start = argv; Hflag = Lflag = 0; ftsoptions = FTS_NOSTAT | FTS_PHYSICAL; @@ -152,3 +156,9 @@ usage(void) " find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]"); exit(1); } + +static void +siginfo_handler(int sig __unused) +{ + showinfo = 1; +} From nobody Fri Jan 12 00:40:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TB2kP1Yvlz56wnm; Fri, 12 Jan 2024 00:40: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 4TB2kP14Pyz4cqY; Fri, 12 Jan 2024 00:40:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705020013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gvH5h6c1amwf+Wt8ci0TY88dQWFy6jtdaxEVzSm+mQg=; b=ImmLJ3VcYKVPUEFmdrgZR53wxeSX3iQjS+jRNmGe6iuigRRLXgu80/VY5l9mXVwBbikLkc Z9qiisjyby0xErwBKfnBrMWX4DbwKW6Djo16Rl6j8fYsBFeT0PhvEfGgVYM1FBtZwbPVl2 uQaraHZ3PAVAaTTvBko8UJzwAEKC0eoUVgY6ARDxFKwJul2RUMozEfcQdnzqVKagJsMRz6 t9+6B5XCNpBJwXaUMYmGSxDyDNVYqSQAnKnUlM4QTn//r6pMGAumTYUm4Bs1OnasDnjuZI iKnrZ5Jzh9tbmASAD26T2eIAVx/IFDxxSX+tmHFTAfN6IQ3ekFOPPVi2SD1yvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705020013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gvH5h6c1amwf+Wt8ci0TY88dQWFy6jtdaxEVzSm+mQg=; b=YPh7tXJ45nnxQ3CKtEDAvQbLSnn6JxvvGvQkq8mYmXbNov9IowAxu+auvELCi/aNQXngfK gu5+bG5CScMt4crL7IaT+d2154CgD0oOLxgdHfttKFblCFMEAqGfxHdXxqCliffT+pMvMc D6cT/uzhi9PDvCxJAFVuWTuXagpldf9BvmYT3JStpAhTFC+9kbj5rtM1785w27b4VC4Seg tZwyR2865T5WjhH1dzxGnnpnNp2Vp4zKd928q78jnV9yIvOB/a+LWGxEQErFPi3psqLh+t jelYqoEV8Zwem+Tkb1xuFEGn+cuGoNRah3uJpDqxZl2SB3zc5tMehxbFKI8oLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705020013; a=rsa-sha256; cv=none; b=CMFL4IsN7EOscZYEwLsw5S5AstTQIiDyFR8RSIOVAqJZlebIIBb7qGvgFu7VPf5Sh2jTPl EWP/XabsEF8ljpfauAcNfX5KjkyO/+Y9WJYHSSK7hSnQ2/Qg/aKwQZi8ljexkV7nDW+zaf Ob8C/tNBorRguNjGF8azCn/S8xlaX+OvAHMsyXNwA2UeTkGujVSrNGpBXyAU0eulWu2dUI HUT9GyMnRJ9wF+wecP2xXIJcprZZyrg7mvLxp4G5B5uSeTlotlOi0ytrNkz9mnIblATjTx d2huZO3l9hoj7pH6AxFHMQYoAnfoRfrRRv/YYmfBXUBWe3hhz5t/itwBH3SLPA== 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 4TB2kP06lXzgCP; Fri, 12 Jan 2024 00:40: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 40C0eC4l043972; Fri, 12 Jan 2024 00:40:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40C0eCj6043960; Fri, 12 Jan 2024 00:40:12 GMT (envelope-from git) Date: Fri, 12 Jan 2024 00:40:12 GMT Message-Id: <202401120040.40C0eCj6043960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: cc760de2183f - main - nfscl: Only update atime for Copy when noatime is not specified List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc760de2183f9c9a4099783d3ff4c770521a4cb6 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=cc760de2183f9c9a4099783d3ff4c770521a4cb6 commit cc760de2183f9c9a4099783d3ff4c770521a4cb6 Author: Rick Macklem AuthorDate: 2024-01-12 00:38:33 +0000 Commit: Rick Macklem CommitDate: 2024-01-12 00:38:33 +0000 nfscl: Only update atime for Copy when noatime is not specified Commit 57ce37f9dcd0 modified the NFSv4.2 Copy operation so that it will update atime on the infd file whenever possible. This is done by adding a Setattr of TimeAccess for the input file. This patch disables this change for the case of an NFSv4.2 mount with the "noatime" mount option, which avoids the additional Setattr of TimeAccess operation. MFC after: 1 week --- sys/fs/nfs/nfs_commonsubs.c | 2 +- sys/fs/nfsclient/nfs_clrpcops.c | 28 +++++++++++++++++----------- sys/fs/nfsclient/nfs_clvnops.c | 28 ++++++++++++++++------------ 3 files changed, 34 insertions(+), 24 deletions(-) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index e79f73739487..3c9af40253ad 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -296,7 +296,7 @@ static struct { { NFSV4OP_OPEN, 8, "CreateLayGet", 12, }, { NFSV4OP_IOADVISE, 1, "Advise", 6, }, { NFSV4OP_ALLOCATE, 2, "Allocate", 8, }, - { NFSV4OP_SAVEFH, 6, "Copy", 4, }, + { NFSV4OP_SAVEFH, 5, "Copy", 4, }, { NFSV4OP_SEEK, 2, "Seek", 4, }, { NFSV4OP_SEEK, 1, "SeekDS", 6, }, { NFSV4OP_GETXATTR, 2, "Getxattr", 8, }, diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index e9acedfb6473..09660730d485 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -8728,7 +8728,7 @@ nfsrpc_copyrpc(vnode_t invp, off_t inoff, vnode_t outvp, off_t outoff, int *outattrflagp, bool consecutive, int *commitp, struct ucred *cred, NFSPROC_T *p) { - uint32_t *tl; + uint32_t *tl, *opcntp; int error; struct nfsrv_descript nfsd; struct nfsrv_descript *nd = &nfsd; @@ -8737,14 +8737,15 @@ nfsrpc_copyrpc(vnode_t invp, off_t inoff, vnode_t outvp, off_t outoff, struct vattr va; uint64_t len; - nmp = VFSTONFS(outvp->v_mount); + nmp = VFSTONFS(invp->v_mount); *inattrflagp = *outattrflagp = 0; *commitp = NFSWRITE_UNSTABLE; len = *lenp; *lenp = 0; if (len > nfs_maxcopyrange) len = nfs_maxcopyrange; - NFSCL_REQSTART(nd, NFSPROC_COPY, invp, cred); + nfscl_reqstart(nd, NFSPROC_COPY, nmp, VTONFS(invp)->n_fhp->nfh_fh, + VTONFS(invp)->n_fhp->nfh_len, &opcntp, NULL, 0, 0, cred); /* * First do a Setattr of atime to the server's clock * time. The FreeBSD "collective" was of the opinion @@ -8753,13 +8754,17 @@ nfsrpc_copyrpc(vnode_t invp, off_t inoff, vnode_t outvp, off_t outoff, * handled well if the server replies NFSERR_DELAY to * the Setattr operation. */ - NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); - *tl = txdr_unsigned(NFSV4OP_SETATTR); - nfsm_stateidtom(nd, instateidp, NFSSTATEID_PUTSTATEID); - VATTR_NULL(&va); - va.va_atime.tv_sec = va.va_atime.tv_nsec = 0; - va.va_vaflags = VA_UTIMES_NULL; - nfscl_fillsattr(nd, &va, invp, 0, 0); + if ((nmp->nm_mountp->mnt_flag & MNT_NOATIME) == 0) { + NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_SETATTR); + nfsm_stateidtom(nd, instateidp, NFSSTATEID_PUTSTATEID); + VATTR_NULL(&va); + va.va_atime.tv_sec = va.va_atime.tv_nsec = 0; + va.va_vaflags = VA_UTIMES_NULL; + nfscl_fillsattr(nd, &va, invp, 0, 0); + /* Bump opcnt from 7 to 8. */ + *opcntp = txdr_unsigned(8); + } /* Now Getattr the invp attributes. */ NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); @@ -8798,7 +8803,8 @@ nfsrpc_copyrpc(vnode_t invp, off_t inoff, vnode_t outvp, off_t outoff, if (error != 0) return (error); /* Skip over the Setattr reply. */ - if ((nd->nd_flag & ND_NOMOREDATA) == 0) { + if ((nd->nd_flag & ND_NOMOREDATA) == 0 && + (nmp->nm_mountp->mnt_flag & MNT_NOATIME) == 0) { NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED); if (*(tl + 1) == 0) { error = nfsrv_getattrbits(nd, &attrbits, NULL, NULL); diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 0014f8a26d20..0b8c587a542c 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -3934,18 +3934,22 @@ relock: */ if (inoff >= vap->va_size) { *ap->a_lenp = len = 0; - VATTR_NULL(&va); - va.va_atime.tv_sec = va.va_atime.tv_nsec = 0; - va.va_vaflags = VA_UTIMES_NULL; - inattrflag = 0; - error = nfsrpc_setattr(invp, &va, NULL, - ap->a_incred, curthread, &innfsva, - &inattrflag); - if (inattrflag != 0) - ret = nfscl_loadattrcache(&invp, - &innfsva, NULL, 0, 1); - if (error == 0 && ret != 0) - error = ret; + if ((nmp->nm_mountp->mnt_flag & MNT_NOATIME) == + 0) { + VATTR_NULL(&va); + va.va_atime.tv_sec = 0; + va.va_atime.tv_nsec = 0; + va.va_vaflags = VA_UTIMES_NULL; + inattrflag = 0; + error = nfsrpc_setattr(invp, &va, NULL, + ap->a_incred, curthread, &innfsva, + &inattrflag); + if (inattrflag != 0) + ret = nfscl_loadattrcache(&invp, + &innfsva, NULL, 0, 1); + if (error == 0 && ret != 0) + error = ret; + } } else if (inoff + len > vap->va_size) *ap->a_lenp = len = vap->va_size - inoff; } else From nobody Fri Jan 12 00:49:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TB2wz5dv5z56y9B; Fri, 12 Jan 2024 00:49:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TB2wz4rCjz4dtj; Fri, 12 Jan 2024 00:49:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705020563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=seFegDUCa6dMLT2ER9S3YZ2Zm2Zkd8nKamcSS4fHtKo=; b=wOQd/+H62vObuJSKZ4fetm7eg5SYOe2IWrdUpw939HUSncnHWlzvNAadK5Vcls2gCLHGuQ fE9hFT46uHcmMPEQtlCfjC35FuiskL9JbwZTIsfJsqYlX3isJMjbKff5Z+nFwX/6yTVucR vIbKvKyqzfnyWmZC57GEuxgMwymflIjBKpGzm67N3zZZP1/JiRzw0iEqRdo7PgYVzPjTne A1JPAGArSJ6ShVAPC46271mi4sWrB2oLvsEu7A7lM+Je059MhS5ksSmy0NUDsiTprLb67J g/uZbUb+5To0ZLDl/Nyc3Hm/LE1Fg7BG3JVtc5nKj47lTc9wE1bL2r/+lSH+6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705020563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=seFegDUCa6dMLT2ER9S3YZ2Zm2Zkd8nKamcSS4fHtKo=; b=B1lGlYgFJ0j1FnyKiFLS40GlHV2PluMRtgOpAmedVhLhd4MFZNY4E6U9ah9ltFMZDe3lTw FrAEfCtXU060DBY45r8y3e8xLqEvwwY0O9hIfDeL8tBX/K41FouojP2nLC28sB+MGq2nou LL/TTF1qClg8YduciIqABNsnU4SCH2H256yrkH8atMB7ux1lhaceo9A80lCh6MZeHxsdx2 64vvJzdZZxS7ril/jM+sm25RJwpEBoSpNxyQfBF/jWKuixTfShLnCbRp7ugwa3iS4uC0zN XvuRZN5rVaUmu7kA27Me/TbdVV7zzUV+h2h0BP187ca3COjJS2+OWvm8ZLuAeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705020563; a=rsa-sha256; cv=none; b=CptUvykHszrL6wvOBiNYV6xmaEV2r3ChCZM4GCiqvoa8yuXXzZryPWl7j08kVTCnmsqnOp GNJoIguzfLyp/JcXYh6pRbOO7I4+9YpAn/tLqiI4SyTlhxOi4Nd4GH99hwIeAdlKA2GkYt reUQ00+Za7CwiEWn8zYFNjUU/4zuim2Mtk41/huxRIDQ3vtpXtHuXpUocEUCkXEv054WB7 UYr/zGiIrq+V4PCtUc83Rc8CgEnbzblVlNhzj2gqsl2VBeyWGzflNTXtqb0UVX2rmCwizQ HDQlXJqWqN6ANLI5r6Jm874/3v6+TO2exhcTjACT6KI9iM8Qtv5Gvxp/vD4ERw== 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 4TB2wz3vs9zgnd; Fri, 12 Jan 2024 00:49: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 40C0nNf9055236; Fri, 12 Jan 2024 00:49:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40C0nNfZ055233; Fri, 12 Jan 2024 00:49:23 GMT (envelope-from git) Date: Fri, 12 Jan 2024 00:49:23 GMT Message-Id: <202401120049.40C0nNfZ055233@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: a2da1bdb61bc - main - param.h: Bump __FreeBSD_version to 1500010 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2da1bdb61bc2d9db0b4268f53281e7c0bbce0bc Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=a2da1bdb61bc2d9db0b4268f53281e7c0bbce0bc commit a2da1bdb61bc2d9db0b4268f53281e7c0bbce0bc Author: Rick Macklem AuthorDate: 2024-01-12 00:48:23 +0000 Commit: Rick Macklem CommitDate: 2024-01-12 00:48:23 +0000 param.h: Bump __FreeBSD_version to 1500010 Commit cc760de2183f changed the internal interface between the nfscommon and nfscl modules. As such, both need to be rebuilt from sources. Therefore, bump __FreeBSD_version. --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 33b07a431813..f912d193bc4a 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500009 +#define __FreeBSD_version 1500010 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Fri Jan 12 00:55:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TB33j6Yv7z56yTl; Fri, 12 Jan 2024 00:55: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 4TB33j5f3yz4fsJ; Fri, 12 Jan 2024 00:55:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705020913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OjJh9Y2x7BA3lM2Gki6cej59i216zHKdCA/E8TTmG2g=; b=VVi4eeYMsi6pEccoQFxp3pH3rC7IdLsj6qk/wAyKjuunqItv6xMyw2FpgqS0PXk69L8O6N KxUYjSh7Xhk6cukeRDEIeFp3LVDjp+WjrNH9E1DfBAVz3ukxT2kwJZ5HfGV1Ptm2N1iNfa ptsIthPGhU9HQCuO4pWxmobSIPuFfIFLyDyJT03OLAbKuOzmciM1YUoIQHtyUya2kMfru+ ++cw37BfRdWB4U0hAxi7tkaqELqbxag1sla/vPs6NoJDqX/ZoxTxuLnZvFT9Kcz9bwXDsb MNMuYxwDI3ma3pbBYde3ie5csNQtkvd/DYTCkHNiTYqYJZ4R67hkkrOC/RuMfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705020913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OjJh9Y2x7BA3lM2Gki6cej59i216zHKdCA/E8TTmG2g=; b=sR+ZkzndvFH2MU2FJos7urcolLzobejk3Er7JXGkwwci4t5GI7XqgeuvmTFS3h3OorGQUs a2B6DllPMecDNvv0ydqnpToV4FNwMFoqWQKt5Rd1jhYGgKy1+RRtcUB8V1eE1QutNc1y9U Iuyagl4qVaGI9f2RMZgTmbjdtIo3ukqeFUqFbp48lcj08Z5LIMP+CxO80GybipvBPPdGBy i5a6hh/NiX9VXzY5bzn9VteaV3Ej8WX0jc7AnUnJ3MXV8iG/6+wLtp4PeQmaOpoZeWEGLA dHJxHP/NLI8RykbbaQ7PxakjiErasV/2C3rmjr0Ryu9aEDf4SlXHSCt9rxl9cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705020913; a=rsa-sha256; cv=none; b=B1bLP+BuQq3DwHUalmijx9NVhSlCoyIgIHgeVf0M+Rn9BZnzQOxFuOvR/mdmZ8yQU8WjqN xL2ritjFjWDQMwzgV0o5HRs+kQccbW43zbxTm8xaMq04XwhZReI+Vm8vNhY2QcLAW0i2Pz c+Ddis7xrSTcW8XMh8S7gojCZy7hAOoaZgCeWkYgKa6GwCgHqF/+JS9aKuKeJRDyDFJVj/ wF44DD5pZVuUl32vFwklV8mmBNfXaA99dkjxrpl9X7WAT6HNLUNzaqU8tJ990wjkp1LUnl eucp/iWL/7L1aZkYdtK5mzEQ36LzKsGl8Y+D4byQTyXgutjrVMLZbW1tACV+Xw== 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 4TB33j4jWpzhJk; Fri, 12 Jan 2024 00:55: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 40C0tDRn071551; Fri, 12 Jan 2024 00:55:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40C0tDC7071548; Fri, 12 Jan 2024 00:55:13 GMT (envelope-from git) Date: Fri, 12 Jan 2024 00:55:13 GMT Message-Id: <202401120055.40C0tDC7071548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: d004554af7d1 - main - UPDATING: Add an entry for the __FreeBSD_version bump to 1500010 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d004554af7d1563465656bde6f1a87fb1728f418 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=d004554af7d1563465656bde6f1a87fb1728f418 commit d004554af7d1563465656bde6f1a87fb1728f418 Author: Rick Macklem AuthorDate: 2024-01-12 00:53:46 +0000 Commit: Rick Macklem CommitDate: 2024-01-12 00:53:46 +0000 UPDATING: Add an entry for the __FreeBSD_version bump to 1500010 --- UPDATING | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UPDATING b/UPDATING index cea03f7dc7c3..2ffd1baaf472 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,12 @@ 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".) +20240111: + Commit cc760de2183f changed the internal interface between + the nfscommon and nfscl modules. As such, both need to be + rebuilt from sources. Therefore, __FreeBSD_version was + bumped to 1500010. + 20231120: If you have an arm64 system that uses ACPI, you will need to update your loader.efi in the ESP when you update past this point. Detection of ACPI From nobody Fri Jan 12 05:38:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TB9LL3b50z57WRq; Fri, 12 Jan 2024 05:38: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 4TB9LL357rz49WL; Fri, 12 Jan 2024 05:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705037898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gzBIoVdY14dK4K2W0C3YUBC9IvS2WJfbCGswlXx0H4w=; b=peg4ckBDgQ7CsXppfkYdGMwOlrNJX1n9zlagWVagqfPuURI3p2kCPnzz8D9m1jIyHVsn/K Rbn1LUPY3HghCFsqbUc37xbqr/0dIrD/QfsCbbIrjzIhhkHsAuacX1Thf7nuqGrc9YLDsD g4PbBnvvxhmO2urSD+1am498/dePNiAhl3kh1p5yc/FbBGDbpOov3I0znDSdKU4Sq5/Wlt fK2/fCX8q6In7gL5rBFuaOJQ90IWvRPgHVfFSCYJEyn0BxFHLLVBHjILjuG32jK9czVMm1 Msi9o/CLY8MZG5VBRBpjvQssboJ8cX7DcNOFwUlbFtYeRPyEe4j5tFSDRV1APQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705037898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gzBIoVdY14dK4K2W0C3YUBC9IvS2WJfbCGswlXx0H4w=; b=HleP/Y9Vp2ANuZqpVRAljhHuiOeawLtearLh+LL7e+CshfeYEt8VYg/pwyKQtFi14FFwmK vTcnHF9e7mb3IZd9YAtsDbnmFVUJavXKsq8LRCOgdZtvWIMTj75tmUwWu+bRu4cDoL76Hz 7DBkZxhr/DKE4s8SgkBr7M+kj0u41YkmpEAKp30J9YUmAt1LHaxdcRy42aRgaEHBT2Md/5 Mm7z5kzdQXyQ9UjMImKlQqbCXX13xUBQld33flNyeh9a6SL63rL417nzH3RvVFVES6dMCX DRyB88XlOR565rqQMhuISkEZ7+k9UdS19rXqfOSpPmvY0Oqa91P6qvqyUHPndQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705037898; a=rsa-sha256; cv=none; b=uW71aytCVhuFLvtyfey0tlROvNI2DUr5kHkDnWeomS98q2w301Mr4EGsn2FjD0vvVv7wrU wWJ4tRyt4pUDfrtoaaOHQ++AYR7PfyZoaP9GfQ904rxCY6QkHG1LE9rgcxOTG3FCgwtjL6 Da4vvbvB2Z4sjcWldyyAzYtFZ7rYRwJg+wx3uitCoj06ZBYz/FWqkm0kfoQBS3CXuu+5EW w+Eo39JmnIYsMYlJrvNLflJ3BAR/67zW/OSYc9R2eZslhVGcRucEaMZm/DRd7iJGWLGNkJ tTW31OT9+EeVJbgPkeXXiq59S8/KfNxp4M+G3wj8TejiXzjndf90OBc8pOaLDg== 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 4TB9LL27B4zpqT; Fri, 12 Jan 2024 05:38: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 40C5cIp8047961; Fri, 12 Jan 2024 05:38:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40C5cIog047958; Fri, 12 Jan 2024 05:38:18 GMT (envelope-from git) Date: Fri, 12 Jan 2024 05:38:18 GMT Message-Id: <202401120538.40C5cIog047958@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: e872a4013fc3 - main - releng-gce: Advertise the availability of gVNIC support in GCE images. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: e872a4013fc325460924772f935b599151bd3d25 Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=e872a4013fc325460924772f935b599151bd3d25 commit e872a4013fc325460924772f935b599151bd3d25 Author: Xin LI AuthorDate: 2024-01-12 05:38:04 +0000 Commit: Xin LI CommitDate: 2024-01-12 05:38:04 +0000 releng-gce: Advertise the availability of gVNIC support in GCE images. This marks FreeBSD GCE images as gVNIC capable by adding the --guest-os-features=GVNIC flag at creation time as suggested in GCE documentation[1]. This allows Generation 3 and newer GCE instances to leverage advanced networking capabilities and performance enhancements provided by gVNIC. Users will benefit from these improvements without needing to create custom images. [1] https://cloud.google.com/compute/docs/networking/using-gvnic#create_a_vm_with_gvnic_support Reviewed by: cperciva MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D43411 --- release/Makefile.gce | 1 + 1 file changed, 1 insertion(+) diff --git a/release/Makefile.gce b/release/Makefile.gce index e84b2df809a9..f244e6c89640 100644 --- a/release/Makefile.gce +++ b/release/Makefile.gce @@ -73,6 +73,7 @@ gce-do-upload-${_FS}: gs://${GCE_BUCKET}/ /usr/local/bin/gcloud compute images create ${GCE_TARGET_${_FS}} \ --family=${GCE_FAMILY}${GCE_FAMILY_SUFX} ${GCE_LICENSE} \ + --guest-os-features=GVNIC \ --source-uri gs://${GCE_BUCKET}/${GCE_TARGET_${_FS}}.tar.gz touch ${.OBJDIR}/${.TARGET} .endfor From nobody Fri Jan 12 06:19:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBBGb5CrKz5676C for ; Fri, 12 Jan 2024 06:20:07 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 4TBBGb34TBz4FdJ for ; Fri, 12 Jan 2024 06:20:07 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-40e5508ecb9so37880845e9.3 for ; Thu, 11 Jan 2024 22:20:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705040406; x=1705645206; 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=XFnR3zNvNmQPJiyLqmsrt7mZ6T0f6tb0MvtwqIWRusc=; b=R9NvhDzB+3MPXUc+VIYZbtz1pUq8xn0Sx3oAw6GkJcBTLkXFMZVerTtYININt0fwuz eZ6SgDhQzb2ySEgn1i8Xn/lJPuIv1uk2IJDEnx2z5fNqBwlrdjUKDvlD3LckD/IKFqUk c2TiAhbSc/GAv7lJipzpkOT/+HUWDKdLcVgqcv1aABLQbP/KDBs5hU10twISnr2BWdwQ ertlgCySk0JEo5zZEwBG0cA070+5tWlr4ZVsOR+WRRpeToNi0fgZuWQPv6y2q16dge5G UxSKZxEVXOW9Q/np09zZCPbXkkGWOLpJyk/m+yMM8gAG0ZF75iCcyxPazKSONNyKIi1I vG/A== X-Gm-Message-State: AOJu0Ywy9gvBrNPSEpdmMZDIGxWdAtKmSG51rpSl98/4YLX7QQYG0XuB Yyq5mANbWkKILiLICc8AT0k2B0fAP5DerQ== X-Google-Smtp-Source: AGHT+IEnopjSseAY9BVzY8A7ZS060Go6tm7cbiMcIuPMfuzvMzjnNd1jmYsolAjsumWHpIoIjJiobw== X-Received: by 2002:a05:600c:4fd5:b0:40d:6f89:a839 with SMTP id o21-20020a05600c4fd500b0040d6f89a839mr551398wmq.30.1705040405950; Thu, 11 Jan 2024 22:20:05 -0800 (PST) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id f15-20020a05600c154f00b0040e3b12052bsm8453909wmg.5.2024.01.11.22.20.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jan 2024 22:20:05 -0800 (PST) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: Re: git: cb350ba7bf7c - main - kerberos: Fix numerous segfaults when using weak crypto From: Jessica Clarke In-Reply-To: <202401111331.40BDVZfn015429@gitrepo.freebsd.org> Date: Fri, 12 Jan 2024 06:19:55 +0000 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: <202401111331.40BDVZfn015429@gitrepo.freebsd.org> To: Cy Schubert X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Rspamd-Queue-Id: 4TBBGb34TBz4FdJ 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] On 11 Jan 2024, at 13:31, Cy Schubert wrote: >=20 > The branch main has been updated by cy: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dcb350ba7bf7ca7c4cb97ed2c20ab45af= 60382cfb >=20 > commit cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb > Author: Cy Schubert > AuthorDate: 2023-12-06 15:30:05 +0000 > Commit: Cy Schubert > CommitDate: 2024-01-11 13:26:42 +0000 >=20 > kerberos: Fix numerous segfaults when using weak crypto >=20 > Weak crypto is provided by the openssl legacy provider which is > not load by default. Load the legacy providers as needed. >=20 > When the legacy provider is loaded into the default context the = default > provider will no longer be automatically loaded. Without the = default > provider the various kerberos applicaions and functions will = abort(). Hi, This has completely broken macOS and Linux cross-building. Please either fix this quickly or, if unable to, revert until such time as you can. Note that patches can be tested by creating a PR against the GitHub mirror. Jess From nobody Fri Jan 12 06:34:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBBbD4yDpz568Sm; Fri, 12 Jan 2024 06:34: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 4TBBbD4RX5z4HgV; Fri, 12 Jan 2024 06:34:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705041272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yhkg4eM4Kxfn91BqRbeQgCtMxNwiOHwF8sl71TH5z1k=; b=ei5MTavxeqlMG/ezuKx1YbxATytOsThGoAuzLIDQA7GCRdFnd+Ka0ToXio7qT5rb/+x34h ErmZv2TB6C79IxWqxPUHUpi1sZmp2XeQq+pKWLZvglW/qC19SZm581EyfKpza67Bin5CxG OafS/+o3C3SJFBLZsGX8NKOaz1vobfbJnLbnpoaYZF7i/PTXlR83rI2mHUCO3O0/Y8ktsC YhYMnN3z9MEDAqHr9ecZG3ckS4GX2JhFgxs1Hyai96C9tP5UKXDDkn9/aGpDzDRIF1AtpQ TvxoFmVEvu3muWJLLD4LHSpSh580ujKLvkG+/H3CT8XRKQgtBilwrC5CcOnXQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705041272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yhkg4eM4Kxfn91BqRbeQgCtMxNwiOHwF8sl71TH5z1k=; b=Np2LZqGenpqleR8Hq8yWOTx3X6vOWnXiaoujaTqIPrMNN/tOTL44Ao/c8Boa5dIzfrWmAa O4uWGGQ3DnZlWdJo7r7pWsIKh+AjaOdvipgXF6pett7FfZ/FjpKppvwWjKYzreeLKfa18J XLHKwHKbyyop1h17wS6E6xvVmJ91GCQo/qBBctSfKAV9N/pSmw+PP6ZSET5triHzIA8sZa lZ+kVArTyMTDJ+upJnSzxDwCz+SI3YNg4jPQZppJYRX9tdM0p8SlSSVMtD9ihbOIAyspLG QOzuPcLF7RxKtTjwSZXhSR3YVZLzWGF6DuvFUb7jGoPBy+txVnZiwUF7S54Mug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705041272; a=rsa-sha256; cv=none; b=hRbk6y45IUwbEjEOek1bZSmDx8iU8zEAQ4NHXmwW9peTiZ5D4To1yXDigBIHDz2vqwsEe/ 1w1eA6+V8LzqDTjydfCY4W+X7Xt9HEGMgSBdJCcKFB8RGacnbie6s4pF9zg9NFB6n/AY5m u1Wx/4O1e7NW/1VRKVj2WAsucJ9uvf+BYun0Q0OjwzO5nuEvnE6hYHMwHmufVQqZQiicrb 8lzs47VqlIxl7Qou3EMcRmnsDeL67IxhHz3XJ3AVM7KYZd9mEqya8bR7mKbsN3I9lLe96r Tkak8vW8zkCxTExMUNriBVqGtcINqEChAyo9AcGFgILSz0d+UAWL/PtNTc+mxA== 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 4TBBbD3Tzvzrmr; Fri, 12 Jan 2024 06:34: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 40C6YW56049416; Fri, 12 Jan 2024 06:34:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40C6YW4M049413; Fri, 12 Jan 2024 06:34:32 GMT (envelope-from git) Date: Fri, 12 Jan 2024 06:34:32 GMT Message-Id: <202401120634.40C6YW4M049413@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: 91dc2374661d - main - find: fix build on 32bits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 91dc2374661d717a30d646e5c4200508dfd24a4c Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=91dc2374661d717a30d646e5c4200508dfd24a4c commit 91dc2374661d717a30d646e5c4200508dfd24a4c Author: Baptiste Daroussin AuthorDate: 2024-01-12 06:34:28 +0000 Commit: Baptiste Daroussin CommitDate: 2024-01-12 06:34:28 +0000 find: fix build on 32bits --- usr.bin/find/find.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c index aec04536071a..8b24ecd6a306 100644 --- a/usr.bin/find/find.c +++ b/usr.bin/find/find.c @@ -212,7 +212,7 @@ find_execute(PLAN *plan, char *paths[]) if (showinfo) { fprintf(stderr, "Scanning: %s/%s\n", entry->fts_path, entry->fts_name); - fprintf(stderr, "Scanned: %lu\n\n", counter); + fprintf(stderr, "Scanned: %zu\n\n", counter); showinfo = 0; } ++counter; From nobody Fri Jan 12 07:11:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBCPV4QWPz56ChV; Fri, 12 Jan 2024 07:11:10 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBCPV1x8Jz4LPs; Fri, 12 Jan 2024 07:11:10 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTPS id NxkCrlfHEGAIJOBh7rOsBv; Fri, 12 Jan 2024 07:11:09 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id OBh5rQNJFZR3lOBh6ropJ6; Fri, 12 Jan 2024 07:11:08 +0000 X-Authority-Analysis: v=2.4 cv=Lo2Bd1Rc c=1 sm=1 tr=0 ts=65a0e60c a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=dEuoMetlWLkA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=Lx2q1XV-e5SZfMx8rxUA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id EEEF54D9; Thu, 11 Jan 2024 23:11:06 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id C72D8235; Thu, 11 Jan 2024 23:11:06 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Jessica Clarke cc: Cy Schubert , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: cb350ba7bf7c - main - kerberos: Fix numerous segfaults when using weak crypto In-reply-to: References: <202401111331.40BDVZfn015429@gitrepo.freebsd.org> Comments: In-reply-to Jessica Clarke message dated "Fri, 12 Jan 2024 06:19:55 +0000." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 11 Jan 2024 23:11:06 -0800 Message-Id: <20240112071106.C72D8235@slippy.cwsent.com> X-CMAE-Envelope: MS4xfLwwx/7nvAf4q+cH1Xmcm14J2ojeKkNgiqgv2rKLZSnB0QFNnfkQ7vRmcRt31kldPEVKwqZjJZ8dW37pCdtSa9Mxn+a3BuxILvKiDMhSsFHQEhXFnEw+ aFbRSB3y+kukoZlb+FAbpFjIH5yJsaUxKozsCX2yPhCEGlLLVlru2gWzMwdfE4fx6yCymnsYu1T89XTDD1qwsShiJsItZ2RC24uAoe5mrIWQgmjSMQ/r5dAL JWbLZSw9QIyh40wKyO/lbfyJWs2fakCcySuq4TtQOQj7Pd8VQwelIQqYv4/Npvw09cbOC5+VCd+11/1ATIEU8YA/ksUKhz/vikvyrXO//F/F8e604EJncjRd jlz2xQB+ X-Rspamd-Queue-Id: 4TBCPV1x8Jz4LPs X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] In message , Jessica Clarke w rites: > On 11 Jan 2024, at 13:31, Cy Schubert wrote: > >=20 > > The branch main has been updated by cy: > >=20 > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3Dcb350ba7bf7ca7c4cb97ed2c20ab45af= > 60382cfb > >=20 > > commit cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb > > Author: Cy Schubert > > AuthorDate: 2023-12-06 15:30:05 +0000 > > Commit: Cy Schubert > > CommitDate: 2024-01-11 13:26:42 +0000 > >=20 > > kerberos: Fix numerous segfaults when using weak crypto > >=20 > > Weak crypto is provided by the openssl legacy provider which is > > not load by default. Load the legacy providers as needed. > >=20 > > When the legacy provider is loaded into the default context the = > default > > provider will no longer be automatically loaded. Without the = > default > > provider the various kerberos applicaions and functions will = > abort(). > > Hi, > This has completely broken macOS and Linux cross-building. Please > either fix this quickly or, if unable to, revert until such time as you > can. Note that patches can be tested by creating a PR against the > GitHub mirror. Thanks for the heads up. I see the problem and am working on a fix. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Fri Jan 12 07:43:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBD6v0mJfz56GWh; Fri, 12 Jan 2024 07:43: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 4TBD6v0C3nz4PTk; Fri, 12 Jan 2024 07:43:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705045415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U0dDCNMnmcbv+dYU84GWNGmUZ2CJ+s+Ls0tkmySuM04=; b=aQZopP5M0xjpW2fjJIURBp3faUuX7ujStOV2ircCqTNoUAe2ERN48AABmJ6tGGOT1ff/u9 U2SIasp/7vxBNPDvdbyc6cm+GzXIpoOKznyqIGPqnBZb8KKKrtCTVUwv8ZIcuiTPNIwbpm uyTepEUHoINrZjzUCQ+taUndgdzyiqxUfDO+l4y/4ZVtEce4PPYcqQi79g5oG5m1ZwrTAY gpjgJZBq0QKYyMf8Al5PUwxPFgNGi2xfAHRYT2wuOZLTAw/IJsT+FA9BYMlBobjaS5wPKe Pb5arz7JewkPxIcI89XFKV4W89ghywe5ybh/G7TbGr7KMZNhX1+9gI4Fz/MOYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705045415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U0dDCNMnmcbv+dYU84GWNGmUZ2CJ+s+Ls0tkmySuM04=; b=ax/xTjf78d7ZLuW6L9iGsYt3jU/X/gKMY0FQ8rclC93EIMotL25ctouFzzhZw9sPRmSpaT b53CGCjgEF1NvNss00jTOKZkxjDAYAFjJLMFQjlAW/swxcSv6G6OoRF7hhMMPegmozh4AI vGhParaOWefXIgQo4nkqKPhEe+3JKUteBbFvuF7UVQyOEpN6oSN/95fHrjCm9vJhrRKJYV c26DIXb0XKEswO5cMm4/TzedPb6mCCVPX52ow56sY7p24NPHb4OdZ6W3LtoT3lNjG9DK95 zq6CibOBBZ83V15FvmWyeo9xug/zZLAXyYybV6XY254Y6Kr/s9Zevaco/58m8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705045415; a=rsa-sha256; cv=none; b=WAEnYK7iTgvGsmtIeDsVfYT0u99lBKd+kVQdiKqUOmyQXt+vndpiWwW0Hb8rz+TLnbXfqp a2twxui3Olcc4hcul7iBcUsI2Buwvv8nC0hiXM5BQuK1RLdLyYBaTrut5dYOGHYgVhlDKP 3i8L50WifW7T4FZQopvpbcJQcktmsonv/4N4dJXN3u0ki1NDXy9RLmLOiLSqr5tP2db7KR haei4BA87Hfza8PAyBs5wf8YXzHiS6AnhF0DbTNNAPmSXFTujviIVogwsUzr0BS51RfNZ5 wpgBcObqT0b+MZYtKDCIbCiSIIU0LTAvH96xkShCjodl6HXAXJPHboYzhjut9A== 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 4TBD6t6MRHztVc; Fri, 12 Jan 2024 07:43: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 40C7hYg9066704; Fri, 12 Jan 2024 07:43:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40C7hYZo066701; Fri, 12 Jan 2024 07:43:34 GMT (envelope-from git) Date: Fri, 12 Jan 2024 07:43:34 GMT Message-Id: <202401120743.40C7hYZo066701@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: 3091cdb11fb0 - main - Revert "kerberos: Fix numerous segfaults when using weak crypto" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 3091cdb11fb05e554a54710116be87ee1f55c287 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=3091cdb11fb05e554a54710116be87ee1f55c287 commit 3091cdb11fb05e554a54710116be87ee1f55c287 Author: Cy Schubert AuthorDate: 2024-01-12 07:39:02 +0000 Commit: Cy Schubert CommitDate: 2024-01-12 07:42:33 +0000 Revert "kerberos: Fix numerous segfaults when using weak crypto" This revision breaks Linux and MacOS cross builds because TARGET_ENDIANNESS is not define during bootstrapping on these platforms. I think the correct approach would be to separate the new fbsd_ossl_provider_load() and unload functions into their own library (instead of libroken). This avoids the less desirable option of including bsd.cpu.mk in secure/lib/Makefile.common, which does build but could complicate future work. Reported by: jrtc27 This reverts commit cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb. --- Makefile.inc1 | 7 ++-- crypto/heimdal/lib/kadm5/create_s.c | 4 --- crypto/heimdal/lib/kadm5/kadm5_locl.h | 1 - crypto/heimdal/lib/krb5/context.c | 4 --- crypto/heimdal/lib/krb5/crypto.c | 3 -- crypto/heimdal/lib/krb5/salt.c | 5 --- crypto/heimdal/lib/roken/version-script.map | 1 - kerberos5/include/crypto-headers.h | 4 --- kerberos5/include/fbsd_ossl_provider.h | 4 --- kerberos5/lib/libroken/Makefile | 11 ++----- kerberos5/lib/libroken/fbsd_ossl_provider_load.c | 41 ------------------------ kerberos5/libexec/kdc/Makefile | 2 +- share/mk/src.libnames.mk | 2 +- 13 files changed, 8 insertions(+), 81 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 864b5151692f..34b49ee319ec 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2635,10 +2635,9 @@ ${_bt}-usr.bin/grep: ${_bt}-lib/libbz2 _other_bootstrap_tools+=lib/libz ${_bt}-lib/libdwarf: ${_bt}-lib/libz -# libroken depends on libcrypt and libcrypto +# libroken depends on libcrypt _other_bootstrap_tools+=lib/libcrypt -_other_bootstrap_tools+=secure/lib/libcrypto -${_bt}-lib/libroken: ${_bt}-lib/libcrypt ${_bt}-lib/libcrypto +${_bt}-lib/libroken: ${_bt}-lib/libcrypt .else # All tools in _basic_bootstrap_tools have the same name as the subdirectory # so we can use :T to get the name of the symlinks that we need to create. @@ -3284,7 +3283,7 @@ kerberos5/lib/libkrb5__L: kerberos5/lib/libasn1__L lib/libcom_err__L \ lib/libcrypt__L secure/lib/libcrypto__L kerberos5/lib/libhx509__L \ kerberos5/lib/libroken__L kerberos5/lib/libwind__L \ kerberos5/lib/libheimbase__L kerberos5/lib/libheimipcc__L -kerberos5/lib/libroken__L: lib/libcrypt__L secure/lib/libcrypto__L +kerberos5/lib/libroken__L: lib/libcrypt__L kerberos5/lib/libwind__L: kerberos5/lib/libroken__L lib/libcom_err__L kerberos5/lib/libheimbase__L: lib/libthr__L kerberos5/lib/libheimipcc__L: kerberos5/lib/libroken__L kerberos5/lib/libheimbase__L lib/libthr__L diff --git a/crypto/heimdal/lib/kadm5/create_s.c b/crypto/heimdal/lib/kadm5/create_s.c index 267e9bbda2a0..1033ca103239 100644 --- a/crypto/heimdal/lib/kadm5/create_s.c +++ b/crypto/heimdal/lib/kadm5/create_s.c @@ -169,10 +169,6 @@ kadm5_s_create_principal(void *server_handle, ent.entry.keys.len = 0; ent.entry.keys.val = NULL; - ret = fbsd_ossl_provider_load(); - if (ret) - goto out; - ret = _kadm5_set_keys(context, &ent.entry, password); if (ret) goto out; diff --git a/crypto/heimdal/lib/kadm5/kadm5_locl.h b/crypto/heimdal/lib/kadm5/kadm5_locl.h index 63b367ab7e21..68b6a5ebf024 100644 --- a/crypto/heimdal/lib/kadm5/kadm5_locl.h +++ b/crypto/heimdal/lib/kadm5/kadm5_locl.h @@ -79,6 +79,5 @@ #include #include #include "private.h" -#include "fbsd_ossl_provider.h" #endif /* __KADM5_LOCL_H__ */ diff --git a/crypto/heimdal/lib/krb5/context.c b/crypto/heimdal/lib/krb5/context.c index 681bc9a0982f..86bfe539b974 100644 --- a/crypto/heimdal/lib/krb5/context.c +++ b/crypto/heimdal/lib/krb5/context.c @@ -392,10 +392,6 @@ krb5_init_context(krb5_context *context) } HEIMDAL_MUTEX_init(p->mutex); - ret = fbsd_ossl_provider_load(); - if(ret) - goto out; - p->flags |= KRB5_CTX_F_HOMEDIR_ACCESS; ret = krb5_get_default_config_files(&files); diff --git a/crypto/heimdal/lib/krb5/crypto.c b/crypto/heimdal/lib/krb5/crypto.c index 6ee22609a4d5..67ecef62e875 100644 --- a/crypto/heimdal/lib/krb5/crypto.c +++ b/crypto/heimdal/lib/krb5/crypto.c @@ -2054,9 +2054,6 @@ krb5_crypto_init(krb5_context context, *crypto = NULL; return ret; } - ret = fbsd_ossl_provider_load(); - if (ret) - return ret; (*crypto)->key.schedule = NULL; (*crypto)->num_key_usage = 0; (*crypto)->key_usage = NULL; diff --git a/crypto/heimdal/lib/krb5/salt.c b/crypto/heimdal/lib/krb5/salt.c index 2b1fbee80ab6..5e4c8a1c8572 100644 --- a/crypto/heimdal/lib/krb5/salt.c +++ b/crypto/heimdal/lib/krb5/salt.c @@ -43,8 +43,6 @@ krb5_salttype_to_string (krb5_context context, struct _krb5_encryption_type *e; struct salt_type *st; - (void) fbsd_ossl_provider_load(); - e = _krb5_find_enctype (etype); if (e == NULL) { krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, @@ -77,8 +75,6 @@ krb5_string_to_salttype (krb5_context context, struct _krb5_encryption_type *e; struct salt_type *st; - (void) fbsd_ossl_provider_load(); - e = _krb5_find_enctype (etype); if (e == NULL) { krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, @@ -200,7 +196,6 @@ krb5_string_to_key_data_salt_opaque (krb5_context context, enctype); return KRB5_PROG_ETYPE_NOSUPP; } - (void) fbsd_ossl_provider_load(); for(st = et->keytype->string_to_key; st && st->type; st++) if(st->type == salt.salttype) return (*st->string_to_key)(context, enctype, password, diff --git a/crypto/heimdal/lib/roken/version-script.map b/crypto/heimdal/lib/roken/version-script.map index bb2139ed74cc..72d2ea7e4f7c 100644 --- a/crypto/heimdal/lib/roken/version-script.map +++ b/crypto/heimdal/lib/roken/version-script.map @@ -13,7 +13,6 @@ HEIMDAL_ROKEN_1.0 { ct_memcmp; err; errx; - fbsd_ossl_provider_load; free_getarg_strings; get_default_username; get_window_size; diff --git a/kerberos5/include/crypto-headers.h b/kerberos5/include/crypto-headers.h index 2cc870642964..3ae0d9624ffd 100644 --- a/kerberos5/include/crypto-headers.h +++ b/kerberos5/include/crypto-headers.h @@ -17,9 +17,5 @@ #include #include #include -#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) -#include -#include "fbsd_ossl_provider.h" -#endif #endif /* __crypto_headers_h__ */ diff --git a/kerberos5/include/fbsd_ossl_provider.h b/kerberos5/include/fbsd_ossl_provider.h deleted file mode 100644 index 013983ca9f83..000000000000 --- a/kerberos5/include/fbsd_ossl_provider.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef __fbsd_ossl_provider_h -#define __fbsd_ossl_provider_h -int fbsd_ossl_provider_load(void); -#endif diff --git a/kerberos5/lib/libroken/Makefile b/kerberos5/lib/libroken/Makefile index 24dc3a5b2c45..0c46ba6c4cb5 100644 --- a/kerberos5/lib/libroken/Makefile +++ b/kerberos5/lib/libroken/Makefile @@ -2,7 +2,7 @@ PACKAGE= kerberos-lib LIB= roken -LIBADD= crypt crypto +LIBADD= crypt VERSION_MAP= ${KRB5DIR}/lib/roken/version-script.map INCS= roken.h \ roken-common.h \ @@ -74,20 +74,15 @@ SRCS= base64.c \ vis.c \ warnerr.c \ write_pid.c \ - xfree.c \ - fbsd_ossl_provider_load.c + xfree.c -CFLAGS+=-I${KRB5DIR}/lib/roken \ - -I${SRCTOP}/kerberos5/include \ - -I${KRB5DIR}/lib/krb5 \ - -I${SRCTOP}/crypto/openssl/include -I. +CFLAGS+=-I${KRB5DIR}/lib/roken -I. CLEANFILES= roken.h roken.h: ${MAKE_ROKEN} > ${.TARGET} - .include .PATH: ${KRB5DIR}/lib/roken diff --git a/kerberos5/lib/libroken/fbsd_ossl_provider_load.c b/kerberos5/lib/libroken/fbsd_ossl_provider_load.c deleted file mode 100644 index f49c8746c9e4..000000000000 --- a/kerberos5/lib/libroken/fbsd_ossl_provider_load.c +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include - -static void fbsd_ossl_provider_unload(void); - -static OSSL_PROVIDER *legacy; -static OSSL_PROVIDER *deflt; -static int providers_loaded = 0; - -int -fbsd_ossl_provider_load(void) -{ -#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) - if (providers_loaded == 0) { - if ((legacy = OSSL_PROVIDER_load(NULL, "legacy")) == NULL) - return (EINVAL); - if ((deflt = OSSL_PROVIDER_load(NULL, "default")) == NULL) { - OSSL_PROVIDER_unload(legacy); - return (EINVAL); - } - if (atexit(fbsd_ossl_provider_unload)) { - fbsd_ossl_provider_unload(); - return (errno); - } - providers_loaded = 1; - } -#endif - return (0); -} - -static void -fbsd_ossl_provider_unload(void) -{ -#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) - if (providers_loaded == 1) { - OSSL_PROVIDER_unload(legacy); - OSSL_PROVIDER_unload(deflt); - providers_loaded = 0; - } -#endif -} diff --git a/kerberos5/libexec/kdc/Makefile b/kerberos5/libexec/kdc/Makefile index 211f4f379054..41fde9115c00 100644 --- a/kerberos5/libexec/kdc/Makefile +++ b/kerberos5/libexec/kdc/Makefile @@ -11,7 +11,7 @@ SRCS= config.c \ CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/kdc -I${SRCTOP}/contrib/com_err ${LDAPCFLAGS} -LIBADD= kdc hdb krb5 roken crypt vers crypto +LIBADD= kdc hdb krb5 roken crypt vers LDFLAGS=${LDAPLDFLAGS} .include diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index e4fd3270a3d3..33b8507a9eb9 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -367,7 +367,7 @@ _DP_pam+= ssh .if ${MK_NIS} != "no" _DP_pam+= ypclnt .endif -_DP_roken= crypt crypto +_DP_roken= crypt _DP_kadm5clnt= com_err krb5 roken _DP_kadm5srv= com_err hdb krb5 roken _DP_heimntlm= crypto com_err krb5 roken From nobody Fri Jan 12 07:43:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBD730zWVz56GZ6; Fri, 12 Jan 2024 07:43:43 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBD722nQxz4Pyl; Fri, 12 Jan 2024 07:43:42 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 3.97.99.33) smtp.mailfrom=cy.schubert@cschubert.com Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTPS id O2CUrlzIYGAIJOCCbrOtAW; Fri, 12 Jan 2024 07:43:41 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id OCCZrRpoW0nMNOCCarTAiS; Fri, 12 Jan 2024 07:43:41 +0000 X-Authority-Analysis: v=2.4 cv=Qcx1A+Xv c=1 sm=1 tr=0 ts=65a0edad a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=dEuoMetlWLkA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=4fHKOfqy3htGCimGVlwA:9 a=CjuIK1q_8ugA:10 a=UuLlkBnjUTgA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id AF067530; Thu, 11 Jan 2024 23:43:39 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id A581B23D; Thu, 11 Jan 2024 23:43:39 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Jessica Clarke , Cy Schubert , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: cb350ba7bf7c - main - kerberos: Fix numerous segfaults when using weak crypto In-reply-to: <20240112071106.C72D8235@slippy.cwsent.com> References: <202401111331.40BDVZfn015429@gitrepo.freebsd.org> <20240112071106.C72D8235@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Thu, 11 Jan 2024 23:11:06 -0800." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 11 Jan 2024 23:43:39 -0800 Message-Id: <20240112074339.A581B23D@slippy.cwsent.com> X-CMAE-Envelope: MS4xfNiOBojsjqfcMmAjlBLIcciZFQk0bQxNOWliP2P17o/kHjumjugbbqEgdGzbuhBobJHxjG/fApEknV2lEt0X4ZZDfvJRwQ4CNLjUTIcJBku0Yzlh+Yyh qO5KVzrxNlw32sigStHbsFFccMIE4fjfImd2pusH3dFqZ1GFBG8qJ4kGasWH7e8eEtj4oPiuvEmTvxn3bgjKnRFRnFYWDX+GzOKCVaoKorOxT7hYT2ci67U1 Lexm9eEWnUnXGfS9aFVm7OSd3vWhfgbImQ6RfnMjJSUG8sdNB2R2cxUf2eNFEambmVmJAQwR2IZsK8yYTQyltRLIXpt2fNU0igKNMQdwxQkjGpyUD1f5sjAT RI2z/Tuw X-Spamd-Bar: - X-Spamd-Result: default: False [-1.70 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[3.97.99.33:from]; TO_DN_EQ_ADDR_SOME(0.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[cschubert.com]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4TBD722nQxz4Pyl In message <20240112071106.C72D8235@slippy.cwsent.com>, Cy Schubert writes: > In message , Jessica > Clarke w > rites: > > On 11 Jan 2024, at 13:31, Cy Schubert wrote: > > >=20 > > > The branch main has been updated by cy: > > >=20 > > > URL: = > > https://cgit.FreeBSD.org/src/commit/?id=3Dcb350ba7bf7ca7c4cb97ed2c20ab45af= > > 60382cfb > > >=20 > > > commit cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb > > > Author: Cy Schubert > > > AuthorDate: 2023-12-06 15:30:05 +0000 > > > Commit: Cy Schubert > > > CommitDate: 2024-01-11 13:26:42 +0000 > > >=20 > > > kerberos: Fix numerous segfaults when using weak crypto > > >=20 > > > Weak crypto is provided by the openssl legacy provider which is > > > not load by default. Load the legacy providers as needed. > > >=20 > > > When the legacy provider is loaded into the default context the = > > default > > > provider will no longer be automatically loaded. Without the = > > default > > > provider the various kerberos applicaions and functions will = > > abort(). > > > > Hi, > > This has completely broken macOS and Linux cross-building. Please > > either fix this quickly or, if unable to, revert until such time as you > > can. Note that patches can be tested by creating a PR against the > > GitHub mirror. > > Thanks for the heads up. I see the problem and am working on a fix. I think the correct approach would be to separate the new fbsd_ossl_provider_load() and unload functions into their own library (instead of libroken). This avoids the less desirable option of including bsd.cpu.mk in secure/lib/Makefile.common, which does build but could affect future work. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Fri Jan 12 09:19:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBGFV165xz56RCj; Fri, 12 Jan 2024 09:19: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 4TBGFV0f6Sz4ZR2; Fri, 12 Jan 2024 09:19:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705051166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=THRHnvpUozlYk2NQh/qi0Qf2r6UrpPGijv3BTy/8c9w=; b=hmyIdEHS4HD6H8UE2+/GMPOW9ZNGxLntyrzchC9kzNcb9KPpUjyRa1K08MvlHWUxr5CMJc UAokLrgNGzoAPdtWEAb80RlevgBpz8G/VhY6kifaccS4qed6OxscADayZz8mSD1WOznfob jvV3yrcRKWjuQ0JZt+j5XLVkN4o+tDi/RwNGJ+9pZhNh5gXaYm+/jO8YIU3wWPv7Al9Izf WjNvHKBoF0iJGRQPpzA3KHnUUvx52uYVPI0TGj1mSq4MITucBHabcuQ5MWXx90H4ynmnc1 O7SS0/w7MftCsZzS/eW/ynrhNiIXwKl4K3cqeyAhq70UMXPq86yM377hLaYUKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705051166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=THRHnvpUozlYk2NQh/qi0Qf2r6UrpPGijv3BTy/8c9w=; b=G0nKy3aoJQ3YxelF7XfcsCxPmz73jYNwdFaoLiLpCiYY9aLBk72nKHNFdy1uiKZeuxmoRg WBGUMh8eFrabPfNpxDpcBlODCSkrm1xxJigUgJGzH7jdxM+zmkbXVmpBb5B/4YMFLmhm+/ +GtsQKQOFjIHMPKMIQGc4D7xy6jEa+PI3pJ4u69YIg2oGhN5ZRv8CJb2j5oyykEZ62r31r +3c8DemFF8D4gUbQ7/9FWLhtUQgLHMJdWMFY4ECbUh+I82lFKV2SK284yjOzB+i3mblN3f Taoa3SucL//L/3QDSZ7uynv8jshc+6IeasUFmrEHfN4wiMmX05lvL4raJLEVBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705051166; a=rsa-sha256; cv=none; b=W0yz7qyCrJDPVKSnnMZo1RUE+lLLuSAAZo9KIgiY9UCtdSd4kpkjS0C0t6nMyjlQjQ7KPe fhp22Ojt+Chdvyn7dHn/3zvIa4Vk0Ma5Bq+uRN4wC1bmjTNwmnHPKXT0rIGLKt/iQKlhmo qMX2GvZ9Kcbmob+of9WgpFZ6/4q0ECOpXC+SXnR4nnf/UllMIKugv4WSVjUcT9yC6IEslK KbiBLN/eSKKjKKAvaofwHkaxrV49rh4aDM1dSvcL3/H8Q8mmEjUty7a9tjxHsQ5bNCaK81 X4JIRV3438qXFMU8UuC11//E/VCyKT75RUpwDvESlbcqyQriaYWdK20yjNBLTA== 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 4TBGFT6m21zwWp; Fri, 12 Jan 2024 09:19: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 40C9JObq020172; Fri, 12 Jan 2024 09:19:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40C9JO0n020169; Fri, 12 Jan 2024 09:19:24 GMT (envelope-from git) Date: Fri, 12 Jan 2024 09:19:24 GMT Message-Id: <202401120919.40C9JO0n020169@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: 82126ef92fdb - main - xen: improve man (4) page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 82126ef92fdb3c13a67ad44d33c0fe6ea479c01a Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=82126ef92fdb3c13a67ad44d33c0fe6ea479c01a commit 82126ef92fdb3c13a67ad44d33c0fe6ea479c01a Author: Roger Pau Monné AuthorDate: 2024-01-09 09:26:06 +0000 Commit: Roger Pau Monné CommitDate: 2024-01-12 09:18:49 +0000 xen: improve man (4) page Update the xen(4) man page to reflect the current support status. Reported by: kevans Reviewed by: bcr kevans imp Differential revision: https://reviews.freebsd.org/D43373 --- share/man/man4/xen.4 | 74 +++++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 41 deletions(-) diff --git a/share/man/man4/xen.4 b/share/man/man4/xen.4 index 6660ab3c268b..15312866dae6 100644 --- a/share/man/man4/xen.4 +++ b/share/man/man4/xen.4 @@ -26,19 +26,19 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 30, 2015 +.Dd January 8, 2024 .Dt XEN 4 .Os .Sh NAME .Nm xen -.Nd Xen Hypervisor Guest (DomU) Support +.Nd Xen Hypervisor Support .Sh SYNOPSIS -To compile hardware-assisted virtualization (HVM) Xen guest support with -para-virtualized drivers into an amd64 or i386 kernel, -place the following lines in your kernel configuration file: -.Bd -ragged -offset indent -.Cd "options XENHVM" -.Cd "device xenpci" +FreeBSD supports running both as a Xen guest and host on amd64 hardware. +Guest support is limited to HVM and PVH modes, while host support is limited to +PVH mode only. +.Pp +Xen support is built by default in the i386 and amd64 GENERIC kernels; note +however that host mode is only available on amd64. .Ed .Sh DESCRIPTION The Xen Hypervisor allows multiple virtual machines to be run on a single @@ -52,20 +52,18 @@ to access resources such as virtual network interfaces and disk devices. .Pp With later instruction set extensions from AMD and Intel to support fully virtualizable instructions, unmodified virtual memory systems can also be -supported; this is referred to as hardware-assisted virtualization (HVM). +supported; this is referred to as hardware-assisted virtualization (HVM and PVH). HVM configurations may either rely on transparently emulated hardware peripherals, or para-virtualized drivers, which are aware of virtualization, and hence able to optimize certain behaviors to improve performance or semantics. +PVH configurations rely on para-virtualized drivers exclusively for IO. .Pp .Fx -supports hardware-assisted virtualization (HVM) on both i386 and amd64 -kernels. -.Pp Para-virtualized device drivers are required in order to support certain functionality, such as processing management requests, returning idle physical memory pages to the hypervisor, etc. -.Ss Xen DomU device drivers +.Ss Xen device drivers These para-virtualized drivers are supported: .Bl -hang -offset indent -width blkfront .It Nm balloon @@ -87,6 +85,10 @@ suspend, crash, and halt requests. Expose Xen events via the .Pa /dev/xen/evtchn special device. +.It Nm gntdev +Allow access to the grant table interface via the +.Pa /dev/xen/gntdev +special device. .It Nm netback Export local network interfaces to other Xen domains where they can be imported via @@ -94,35 +96,30 @@ imported via .It Nm netfront Import network interfaces from other Xen domains as local network interfaces, which may be used for IPv4, IPv6, etc. -.It Nm pcifront -Allow physical PCI devices to be passed through into a PV domain. +.It Nm privcmd +Allow issuing hypercalls via the +.Pa /dev/xen/privcmd +special device. +.It Nm timer +Implementation of a one-shot high resolution per-CPU timer using the hypercall +interface. +.It Nm acpi cpu +When running as a host forwards power management related information from ACPI +to the hypervisor for better performance management. .It Nm xenpci Represents the Xen PCI device, an emulated PCI device that is exposed to HVM domains. This device allows detection of the Xen hypervisor, and provides interrupt and shared memory services required to interact with the hypervisor. +.It Nm xenstore +Information storage space shared between domains. .El -.Ss Performance considerations -In general, PV drivers will perform better than emulated hardware, and are -the recommended configuration for HVM installations. -.Pp -Using a hypervisor introduces a second layer of scheduling that may limit the -effectiveness of certain -.Fx -scheduling optimisations. -Among these is adaptive locking, which is no longer able to determine whether -a thread holding a lock is in execution. -It is recommended that adaptive locking be disabled when using Xen: -.Bd -unfilled -offset indent -.Cd "options NO_ADAPTIVE_MUTEXES" -.Cd "options NO_ADAPTIVE_RWLOCKS" -.Cd "options NO_ADAPTIVE_SX" -.Ed .Sh HISTORY Support for .Nm first appeared in .Fx 8.1 . +Support for host mode was added in 11.0 . .Sh AUTHORS .An -nosplit .Fx @@ -133,15 +130,10 @@ and Further refinements were made by .An Justin Gibbs Aq Mt gibbs@FreeBSD.org , .An Adrian Chadd Aq Mt adrian@FreeBSD.org , +.An Colin Percival Aq Mt cperciva@FreeBSD.org , and -.An Colin Percival Aq Mt cperciva@FreeBSD.org . +.An Roger Pau Monné Aq Mt royger@FreeBSD.org . This manual page was written by -.An Robert Watson Aq Mt rwatson@FreeBSD.org . -.Sh BUGS -.Fx -is only able to run as a Xen guest (DomU) and not as a Xen host (Dom0). -.Pp -As of this release, Xen PV DomU support is not heavily tested; instability -has been reported during VM migration of PV kernels. -.Pp -Certain PV driver features, such as the balloon driver, are under-exercised. +.An Robert Watson Aq Mt rwatson@FreeBSD.org , +and +.An Roger Pau Monné Aq Mt royger@FreeBSD.org . From nobody Fri Jan 12 10:04:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBHFQ0934z56W27; Fri, 12 Jan 2024 10:04: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 4TBHFP6l2Cz4fNs; Fri, 12 Jan 2024 10:04:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705053865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ha061nnnmJbcM0/EWkbB/3PJO10Ts4m4z9i/XNsqVxM=; b=cO2ifphYwKB6FiDincD+fFTlxxVHtGHKV3/kuHOyYpaU6UxMGgpygasMlhuBzNWrOdONj3 fJadBtuM5kuoVNHAuBfy0IzDeCYkaAP8rBLLnIrZZl1vrCdauKGxMk6vGFnZ8JGxPFqw7j /OgkuyXOqyZMKNEklmhTBCjIb6qot7Edd9TvxntNMEIRNwTddMQD4nPzQPAWg2RhvnuQHC dcr3EPCwEQJAtmwK6Pa59wz2pRDVFQA69qi/No4yqAoU8fS7OaCYRCjXUKXT2yFnS3En2Y nwvoZzqQFtLnTEVMV9RBmNxPLxuis7RHOwhsTBpcoFIpOC+7/6BnYnaNLYToUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705053865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ha061nnnmJbcM0/EWkbB/3PJO10Ts4m4z9i/XNsqVxM=; b=SXgteHKSCwpTCtMGOuVCyDOfOn6MJWDjpEpRR9sM0ZgPMnyUv1UWlXf4Az2ug3+C2FrbqO DFhwyx295z3Xb7PXiXuATlckMDte4iDjvOsEpDRim1Dc6qkQEsbzD2Wn8t9SdCfNoJznf3 PRN30ngbkM2341kGYZIv0ZOMU+BnTlyfRxImBecfmQbd9EYyuRV0yNyWnQ8mbyMvFHcVIQ Hg12hPEy6H9hhJ4rgN3tneomRQDraiciZEY/Zv7bhNp43DcUZrd6iBZPyn6ZHc5rcdcoG7 wj6CjwSTd8RwYq67iLe0eDEJ58qgGu6ZT9jUJ1ptCH7ymFys9oKdOtsjuJQwNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705053865; a=rsa-sha256; cv=none; b=BLUm2TrKRyI+ahSYQJ1Mwk2/GgtnzeTX4zmS99k9D7tXRgXP7ByJSBGlGbUgkzA0moZCBv 4/C6hqlkTfYaMhhWfVaeHEX4c990h5iQQtaW2ilarSyN7YG02cpvyUKrBLrSp6HczgdhND R6QNMdrjERuhmgyC/5/0t/VBAWQZC7gNXAuzrCqIs8wejlsJqmcT+KOsA8PGMzFugxVfMB ewH2t7YkaO8XqyhPr7PnmSb4LaFBIlvytWI4XLt3mGOnj1aTWaynF951V2Ec8ktxMpqKUf vFZKdMGlF2h+rntAN0PxAE2GHUexQadapoEW92oUlfDJdfKWChhsSoqYGW0g0w== 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 4TBHFP5nPczyBb; Fri, 12 Jan 2024 10:04: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 40CA4PV6003522; Fri, 12 Jan 2024 10:04:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CA4Ps3003519; Fri, 12 Jan 2024 10:04:25 GMT (envelope-from git) Date: Fri, 12 Jan 2024 10:04:25 GMT Message-Id: <202401121004.40CA4Ps3003519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 0598824cc84a - main - protosw: remove unneeded include List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0598824cc84a347848dfe822add22aad30ff89d4 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=0598824cc84a347848dfe822add22aad30ff89d4 commit 0598824cc84a347848dfe822add22aad30ff89d4 Author: Gleb Smirnoff AuthorDate: 2024-01-12 10:04:04 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-12 10:04:04 +0000 protosw: remove unneeded include --- sys/sys/protosw.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h index eea231f82807..b512c60971ee 100644 --- a/sys/sys/protosw.h +++ b/sys/sys/protosw.h @@ -32,8 +32,6 @@ #ifndef _SYS_PROTOSW_H_ #define _SYS_PROTOSW_H_ -#include - /* Forward declare these structures referenced from prototypes below. */ struct kaiocb; struct mbuf; From nobody Fri Jan 12 10:04:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBHFR1HtGz56W2M; Fri, 12 Jan 2024 10:04: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 4TBHFR0ZKJz4fc7; Fri, 12 Jan 2024 10:04:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705053867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SK74WOcOYuClw/Mg1UuTUpJbJBSPq9dHrLWWVa1fQms=; b=Wy3ueYcBsn5kr+RRAE1xhPJEBTt7YlNna43adjygqhB9LJeb0fVr52CQI3Ff3Sas2zXJW8 hbx9c9ztnMoju9Yo/dB+gsQj6yPvmExv4CkToFgdUE/14HkU4ELzyiGxwMVZF/4VVHpB3k 0hf9toAYuonp4FqdWzUFTGDBf3Bj2lZPC/ahOctfbkB8peRNR54cgvcUl6PU4IrTVp6yGm mMCnIyPLU8Rfrsa7X7/37tyvRNcH7Q9iWrNAln/MQRPWaH8pr56Z0R9JF4uMVXuLQV0vi5 xI9wsmvVPs2HBq7AemVglXrAODNLqEcBU/CMHata90CvXDsdr/pJPQwepwXt/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705053867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SK74WOcOYuClw/Mg1UuTUpJbJBSPq9dHrLWWVa1fQms=; b=EoXkzvahar8FxP5OOziKqQ0CyJyA5V55aiXqnP/zza/YpKVeP6n8tesC60mMhgjeMFGbWX AnlRzDpN3oj5FP+Z9ih2HI2n5E7IoICi7A0/DWRqx/x74p7piOn3A/fgnWEzUqHEIUGC9+ VZ4VNPXMM2BTRPycG/EDU1Ipv/r+CiBuky1t4QRZ/of0X6dJw2UlimMEIkPlcWEWYwbFSu CqTvPiaIWNF6pxOSN0jjUsdH6VBj4OVY2k9vQty3aCR4ae1Uq4OdmWKZEGTdXtpZoMAoFP Zt7Wte8RqO6MARGLOF0Y/u7u9i88wwaMsTbZsfGdrtS1mOKwyE5kKUFcsqjfFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705053867; a=rsa-sha256; cv=none; b=kyyhzDV110hqPjX3RaOvIFIDIJEgck+gUVspE3Uj+DPczNgjefr8JEBFFRUIkzLnbiJzA1 vEkhJY6dZUt5lmCvMl3VXQuw/wZIzzjgs7eJQJPlPixIDLh5oL336aH0OYR+DZ6FZdcwvT kF3dl/wjV57E+NwWRvhBfy6BL/EkPajfDHiVqdp/5htVyz6dkTXAt/rFDrlJMeDvNZ6VkD GF52mFU7n36xveu92o5CHWGMqDPQ9b8TseyoARHEbME2LrPhFjF/VqVBPC2eLCBobTdRho 1NBQ1JK41aeFGB5yQQcZtGGrt4Ns6lJ+EoWVmzB6NEvgqmJ5ZiZsKiBneEcimg== 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 4TBHFQ6mnvzyHB; Fri, 12 Jan 2024 10:04: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 40CA4Qgu003567; Fri, 12 Jan 2024 10:04:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CA4Qgd003564; Fri, 12 Jan 2024 10:04:26 GMT (envelope-from git) Date: Fri, 12 Jan 2024 10:04:26 GMT Message-Id: <202401121004.40CA4Qgd003564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: d4033ebd0545 - main - divert: just return EOPNOTSUPP on shutdown(2) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d4033ebd05455dbe7482bd0c1a329bfe52d7cdb8 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d4033ebd05455dbe7482bd0c1a329bfe52d7cdb8 commit d4033ebd05455dbe7482bd0c1a329bfe52d7cdb8 Author: Gleb Smirnoff AuthorDate: 2024-01-12 10:04:04 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-12 10:04:04 +0000 divert: just return EOPNOTSUPP on shutdown(2) Before this change we would always return ENOTCONN. There is no legitimate use of shutdown(2) on divert(4). --- sys/netinet/ip_divert.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 78ca36fc2a0f..6bc76e0be111 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -635,14 +635,6 @@ div_bind(struct socket *so, struct sockaddr *nam, struct thread *td) return (0); } -static int -div_shutdown(struct socket *so) -{ - - socantsendmore(so); - return 0; -} - static int div_pcblist(SYSCTL_HANDLER_ARGS) { @@ -720,7 +712,6 @@ static struct protosw div_protosw = { .pr_bind = div_bind, .pr_detach = div_detach, .pr_send = div_send, - .pr_shutdown = div_shutdown, }; static struct domain divertdomain = { From nobody Fri Jan 12 10:04:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBHFS3YRjz56W4j; Fri, 12 Jan 2024 10:04: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 4TBHFS18fsz4fcX; Fri, 12 Jan 2024 10:04:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705053868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hzMfXXb+lLCwGq+5dQjzuvgjp8Uqd1EhlSpTCShc1vI=; b=I+I8iDUdLgShFQWpi2kZVZJaTUC+SVrfss+QeW9JIORdw09gkmdSzd/xyLx6U+drvO6QH/ 0UYsScZNNVmFYBDrgYMwCl0xI5pKI8Ysq0TzSAjnne9OQkPyQAeHuHmD9EzCFyVkQUTonl HMXRzlTl3gKlr68rSu8Gcg2X3rqRhrxFEesk1vhUNCqUtZ6r9rowrSaZT8T8ZV9QhCWdJp Pbfq6UTFRgQ0eGuPzvl0DV7IA55ppvGam2A3ez6s8Pbpen+VNvsyqpLc6ZP/WJS0KisR6o Hzp8FWKIFr6qokzorE7wngyZ7qMx7wuZ8RkKHk2JzafZ0FxWRS+HvN6rl1ILCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705053868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hzMfXXb+lLCwGq+5dQjzuvgjp8Uqd1EhlSpTCShc1vI=; b=NlmFp7ga8UU5Qvy2uxJfAh6DGJNBR+8EBjGZyOVd0rBSHZQ2zknu4cSh6PL85v/k1GTy4L 2MBk0ZY9pVxZVgu35cPMQmnWcQyrqMO8NKlGA1eud4Q0bq7LAsPgPGV9GUbRO8GzMdWwUC 3X0ZUB6i2mXfar4974KnyRVpq7pnZFKf9ta1a4bjom4MdgWLe1DK3Wq/MKmGR9rQDYXlVg oihuC7h60orHtZoUwn7pzbdTofjp82SKRdokbPPWDMMxw26O9P5N5IdAx8Wv0l/XsgRlrW bw7F5jlR6UbfTm2SD4Fj46SjnPlXn6+01Tq3hk484i5iggUMX4SU20d4NfXRjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705053868; a=rsa-sha256; cv=none; b=dV2u7QSj0aRW/EFHQc/KbLqTU+TlRsF9v86//ek3Gh/diJUc6/TGwmBbRaUdvK/Gdf/7pT hKfXGo58yh6uIJg6Xl90B3kOtYtWNy6Ram8A1DwoZ/1MQOx5hsJZwZ/4380SSR1XfI3hB+ w09XKKDyirFpecc6Aglh6cST4wXcGExk4GZgq2ee4Zt5FN2n+PlfNqLauO8p0xRSr0xm2o TMeX4CjPQYfe84An8pEDuGJwuAJA4Ji4J9X5kdhVUWJYj85UQPqg8vrWiQRPUWCumN7xU0 ZCg2ZE5e5pC7FjVL4uy3hjTESRzEV9sRNSGfa3kVcrNFveXVUDvLjmJL3l0ZoA== 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 4TBHFS0GHlzxk7; Fri, 12 Jan 2024 10:04: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 40CA4RaW003627; Fri, 12 Jan 2024 10:04:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CA4Rw0003624; Fri, 12 Jan 2024 10:04:27 GMT (envelope-from git) Date: Fri, 12 Jan 2024 10:04:27 GMT Message-Id: <202401121004.40CA4Rw0003624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: e007b89e9d31 - main - tests: add a test for shutdown(2) on a datagram socket List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e007b89e9d311daec88a3c7ae38646bcd015c396 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=e007b89e9d311daec88a3c7ae38646bcd015c396 commit e007b89e9d311daec88a3c7ae38646bcd015c396 Author: Gleb Smirnoff AuthorDate: 2024-01-12 10:04:04 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-12 10:04:04 +0000 tests: add a test for shutdown(2) on a datagram socket --- tests/sys/kern/Makefile | 2 + tests/sys/kern/shutdown_dgram.c | 111 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index 308cfd22a0ec..143c13297585 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -26,6 +26,7 @@ ATF_TESTS_C+= ptrace_test TEST_METADATA.ptrace_test+= timeout="15" ATF_TESTS_C+= reaper ATF_TESTS_C+= sched_affinity +ATF_TESTS_C+= shutdown_dgram ATF_TESTS_C+= sigaltstack ATF_TESTS_C+= sigwait ATF_TESTS_C+= socket_accept @@ -75,6 +76,7 @@ LIBADD.unix_seqpacket_test+= pthread LIBADD.kcov+= pthread CFLAGS.ktls_test+= -DOPENSSL_API_COMPAT=0x10100000L LIBADD.ktls_test+= crypto util +LIBADD.shutdown_dgram+= pthread LIBADD.socket_msg_waitall+= pthread LIBADD.sendfile_helper+= pthread LIBADD.fdgrowtable_test+= util pthread kvm procstat diff --git a/tests/sys/kern/shutdown_dgram.c b/tests/sys/kern/shutdown_dgram.c new file mode 100644 index 000000000000..04382d14f48f --- /dev/null +++ b/tests/sys/kern/shutdown_dgram.c @@ -0,0 +1,111 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Gleb Smirnoff + * + * 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 +#include +#include +#include +#include +#include +#include + +#include + +/* + * shutdown(2) on SOCK_DGRAM shall return ENOTCONN per POSIX. However, there + * is historical behavior of the shutdown(2) also unblocking any ongoing + * recv(2) syscall on the socket. It is known that some programs rely on this + * behavior, but exact list of problems isn't known. Neither we know if the + * "feature" is required on PF_UNIX sockets or on PF_INET/INET6 sockets or + * on both kinds. Feel free to improve this comment if you know any details. + * + * List of relevant commits, bug reports and reviews: + * 63649db04205 + * https://reviews.freebsd.org/D10351 + * b114aa79596c (regresses) + * https://reviews.freebsd.org/D3039 (regresses) + * kern/84761 c5cff17017f9 aada5cccd878 + */ + + +static void * +blocking_thread(void *arg) +{ + int *s = arg; + char buf[1]; + int error, rv; + + rv = recv(*s, buf, sizeof(buf), 0); + error = (rv == -1) ? errno : 0; + + return ((void *)(uintptr_t)error); +} + +static void +shutdown_thread(int s) +{ + pthread_t t; + int rv; + + ATF_REQUIRE(pthread_create(&t, NULL, blocking_thread, &s) == 0); + usleep(1000); + ATF_REQUIRE(shutdown(s, SHUT_RD) == -1); + ATF_REQUIRE(errno == ENOTCONN); + ATF_REQUIRE(pthread_join(t, (void *)&rv) == 0); + ATF_REQUIRE(rv == 0); + close(s); +} + +ATF_TC_WITHOUT_HEAD(unblock); +ATF_TC_BODY(unblock, tc) +{ + static const struct sockaddr_un sun = { + .sun_family = AF_LOCAL, + .sun_len = sizeof(sun), + .sun_path = "shutdown-dgram-test-sock", + }; + int s; + + ATF_REQUIRE((s = socket(PF_UNIX, SOCK_DGRAM, 0)) >= 0); + ATF_REQUIRE(bind(s, (struct sockaddr *)&sun, sizeof(sun)) == 0); + shutdown_thread(s); + + static const struct sockaddr_in sin = { + .sin_family = AF_INET, + .sin_len = sizeof(sin), + }; + ATF_REQUIRE((s = socket(PF_INET, SOCK_DGRAM, 0)) >= 0); + ATF_REQUIRE(bind(s, (struct sockaddr *)&sin, sizeof(sin)) == 0); + shutdown_thread(s); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, unblock); + + return (atf_no_error()); +} From nobody Fri Jan 12 12:01:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBKrL09FMz56h0Z; Fri, 12 Jan 2024 12:01:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBKrK6r0Cz4ps7; Fri, 12 Jan 2024 12: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=1705060882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BELx2rBVsWj4CauK7HfsUXKj7N8pcX1qpJIMTyhllE4=; b=mpRmF9nO+Re513dg6oglrKcpChZV/QrAukckRNTvpZfoAPFNSicdoAGVkEf3vo96DndnXS fA9j5iJg9H+7pRdpWWfXJ/R1e3y3+6BicEwD0BHULmR7p5ShjknpCg3JrOFg2p9GKQb02Z gZcOvmirYyeBd8jnIFdf+kKlcpb3VhVb5fa0PXp9Iv5+YR6Okh6h/3WbLox+JvEu+At86P cHuTVaR27P8ljdbXDCxF/Vh/xXxApaMzX0gMVybb3IxZ6Wh2+G98NaaiMfVyb93ChnNMUz HZOj4MpaDo67yBtzVsUH+56zRjlVkRWCLI+OgUoHgMyBWPys3FNTSzhPZuhgtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BELx2rBVsWj4CauK7HfsUXKj7N8pcX1qpJIMTyhllE4=; b=DXxVYLiloTBVs3sXvr/l0UlR8ydJNJsH90Wt2IenMRQo1WzTEf+6V9MVvSImC20TlE/Fx5 4XCVb/xALiUbcfxPEaJRbFN8qn4CIx1S7/hRuKQIfDC7SDIncUU7dl3G1aRmjS+n38cQmq xeDzTwXDH6etp80jgHwRVOOLV0zm5TtX27PrX1kRAnkBo6tIpANDq7QbcrSpz3W3vfBOxp fUcMWweIpTcBvf8P6B0IG/ZHS4bEUZKE+mutFt3JyjMd9SOWcst85Ts95ZneKlIyl66nbR Fyket8n3xe6UwkkW9cnH1I4it0hhtIC9ABdXlAPujrqylXpiBfS8AUuxYksvXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705060882; a=rsa-sha256; cv=none; b=GydUlj129/dr/c2mHd0FhksG8m/FtVTLND2U9dpRH98dP6Mf3xmf31MdBkwDzvSR4JYl5d H7RzqMsbHtYrNozyuRS46NW7amkSr6o2HyZ/bHgpPB8kk60ROlZIOL99qDf9dwmhIWCa1y KevKlMr8WnVw72O7FcNAys5xYIKQ6PkABZK5kdku1FNfrp+Pg/R0ONw2UzQDJOXXzjCGuQ YGRtY9kmm5OGR2P+2GSKujEJe1eo+0VuuMZbBDjrPAibm2oN6xnrK3u2mp17dZNlhbfdLU L58umhLgxZayzlIpE86yQzXk2wHZeumrEOS5eYJOyQ/qR86hbvtd8LC4Q+A7nQ== 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 4TBKrK5thhz11Nt; Fri, 12 Jan 2024 12: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 40CC1L3q000457; Fri, 12 Jan 2024 12:01:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CC1LC3000454; Fri, 12 Jan 2024 12:01:21 GMT (envelope-from git) Date: Fri, 12 Jan 2024 12:01:21 GMT Message-Id: <202401121201.40CC1LC3000454@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: a76475313d65 - stable/14 - mlx5(4): only detach IOV children if iov was successfully initialized List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: a76475313d6580cb36eb940d5730407d832246de Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a76475313d6580cb36eb940d5730407d832246de commit a76475313d6580cb36eb940d5730407d832246de Author: Konstantin Belousov AuthorDate: 2023-12-29 03:14:56 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:46:52 +0000 mlx5(4): only detach IOV children if iov was successfully initialized (cherry picked from commit 987446fa39e8f6887ea16ad49f00f699b2efd210) --- sys/dev/mlx5/driver.h | 2 ++ sys/dev/mlx5/mlx5_core/mlx5_main.c | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sys/dev/mlx5/driver.h b/sys/dev/mlx5/driver.h index 9daa1235bd9c..6ebe4171a503 100644 --- a/sys/dev/mlx5/driver.h +++ b/sys/dev/mlx5/driver.h @@ -736,6 +736,8 @@ struct mlx5_core_dev { bool dump_copyout; struct mtx dump_lock; + bool iov_pf; + struct sysctl_ctx_list sysctl_ctx; int msix_eqvec; int pwr_status; diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c index f6dc1158f085..6b9b63a24714 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_main.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c @@ -1719,7 +1719,9 @@ static int init_one(struct pci_dev *pdev, pci_iov_schema_add_uint64(vf_schema, iov_port_guid_name, 0, 0); err = pci_iov_attach(bsddev, pf_schema, vf_schema); - if (err != 0) { + if (err == 0) { + dev->iov_pf = true; + } else { device_printf(bsddev, "Failed to initialize SR-IOV support, error %d\n", err); @@ -1753,8 +1755,11 @@ static void remove_one(struct pci_dev *pdev) struct mlx5_priv *priv = &dev->priv; #ifdef PCI_IOV - pci_iov_detach(pdev->dev.bsddev); - mlx5_eswitch_disable_sriov(priv->eswitch); + if (dev->iov_pf) { + pci_iov_detach(pdev->dev.bsddev); + mlx5_eswitch_disable_sriov(priv->eswitch); + dev->iov_pf = false; + } #endif if (mlx5_unload_one(dev, priv, true)) { From nobody Fri Jan 12 12:01:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBKrM1504z56h5g; Fri, 12 Jan 2024 12:01:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBKrM0Mljz4q40; Fri, 12 Jan 2024 12:01:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8h86lgD0uzx5VnzQ8GI3JlAIkgalMmuQQx0bqlyOKPI=; b=XSfw8gJXAZuGdGEZoPQ3Nfyv5v0d83abs6oQ4GHwKMzV/RKdpOfyGP0Osuykn2/Sqwhu/l 1Fwac9peESey3j33VFPJRn2g+Hnc9dqK1J4lRTQWN9etqrpUt3YiLrwK1Yzaxcb47BNrYm 2ViS1AGfEkOGdqKyRstFnoLXreRTKVwm1r6k1I2l61IJZ2t4hv1a4nbvtFRFW1VuXahum0 /NiXtSww8iAdREKI6Q/wv1b3o4zWGwpsmnNW7w1jO5vs5cfbH9b1DgHaGnuGgCAGsdDnUs LrE9hcdxnoNCtnxrU4/aLopKa+a5HMAL6NI6tAZxRu+TcBbDFJxmsPla3OnDmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8h86lgD0uzx5VnzQ8GI3JlAIkgalMmuQQx0bqlyOKPI=; b=HwQtiLcSavGm8gWEhCWHps+WUxmoPITVB9V543NwFYqQCEE6T6xvhQABUD/b5qavxrAIeL CFlWj/PN44HacxTzNQxj1oUTisCYgTqGF54Ob/c+YtxJ7l0Jh0/0CaYkuujmXSllAab6Nt 7lqKwg9CtbqgZCR006wBtDilxOS0mgOgCiqjfqQa1nGmRlmoPHJv4N9W80qM5iaoH63ZSU Yx5HQ8p4GeDeiBTicEEMRPXeJM9SvRMpKXx84Iw+xrYiBx2c8IBS37oS3ESdeKjnNF4bCM IzrkAugtwHnxJSnN47S7IzkwsTCNFufEXECtThX/vpzT2D/sOLrI9xXrI6ZYxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705060883; a=rsa-sha256; cv=none; b=DgZHWzk0KO/Neg1oqJFZiIMEBW3QxdsACRCIxV64jdxWgO1v1vwqP6NvEnr5PGlInJb1hS pL+FbC+asjeH97Z9zhqdd1P85y/mViv8fbz+Em/ZdnV5C5pCtqW/+zs7lW2tpg4MZ1vxMm Up8/7Seemy1DZIrbX06UDVPv+jAm0dK952A1pVmbYfmtIk99QKT9eX6JB+IalS/ssLbscN ZKK5n9kFFB5Da/x7BuP87n7Go8wLvYUvCKnimx+kW8/+Q9lCkaUOMZ6AZotEFxFFiAdA7Y JyWovllgj+tH3ox+3mYru5OppOq/RwL1JyVbim/OkrS27KLWRREXb02pWnd0iA== 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 4TBKrL6bG1z11yc; Fri, 12 Jan 2024 12:01:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40CC1MUK000502; Fri, 12 Jan 2024 12:01:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CC1MkT000499; Fri, 12 Jan 2024 12:01:22 GMT (envelope-from git) Date: Fri, 12 Jan 2024 12:01:22 GMT Message-Id: <202401121201.40CC1MkT000499@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 384c72acb50d - stable/14 - nfsclient copy_file_range(): flush dst vnode data List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 384c72acb50d3fd5a3bd07f41d3755867865c0b6 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=384c72acb50d3fd5a3bd07f41d3755867865c0b6 commit 384c72acb50d3fd5a3bd07f41d3755867865c0b6 Author: Konstantin Belousov AuthorDate: 2023-12-29 23:22:40 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:46:52 +0000 nfsclient copy_file_range(): flush dst vnode data PR: 276002 (cherry picked from commit 7dae1467d72ae1f5c8f7be0f7444da23a457d98b) --- sys/fs/nfsclient/nfs_clvnops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index a690e988b4b3..f86ecd53ad4e 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -3956,7 +3956,7 @@ generic_copy: if (error == 0) error = ncl_flush(invp, MNT_WAIT, curthread, 1, 0); if (error == 0) - error = ncl_flush(outvp, MNT_WAIT, curthread, 1, 0); + error = ncl_vinvalbuf(outvp, V_SAVE, curthread, 0); /* Do the actual NFSv4.2 RPC. */ ret = ret2 = 0; From nobody Fri Jan 12 12:01:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBKrN2Qv6z56hJC; Fri, 12 Jan 2024 12:01: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 4TBKrN1JbXz4q4F; Fri, 12 Jan 2024 12:01:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KxXWXJpcYEP4Je9L1R6b8kkLVeoaRQPhPwzIlrR2R7c=; b=tOF6yOSn0cLL8Yx+lg+Gl6cumkiuzi9ouIY1aumzDbmfggiP0uA2ZyFGBNPkORpqm6Du/K cIm84WhHnzdPE2fRt7eCkFJGtYvG2aY/XW23YQFbDAa0EBx8A0NHZjSMk6PH8NPC/u75xf IP6tYjhEHTc5REz28hXs8pKdOMZtXgEDzGwBc4RrSxXuN6pNHKPbpkmNXf1vwl9uCt5mOW Jdh7g81iHfAdtGH5qDrCs3mr71g5EzX7hcjMiWBYLMONRufDTjZjV0FLjG6VzdIOQDji6V yg/SkUzj1ACEKbSvlVd2iuzGtxDlG1kDVlWt9DYM13NGJ4yi8LtXzgidQAHJXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KxXWXJpcYEP4Je9L1R6b8kkLVeoaRQPhPwzIlrR2R7c=; b=j4GsTZdj9dIm2GzdPNOXnlFEgkyBhWU0gtpXnSN3PCokE4FeAb1A4ounVcduuYi+AemPmk H5Y5ktGIC9LS7eSRhE5quGbDNrSCiST4+pQi7fzdl1HgpyG6EHFT+X9YdHp9P/eK37h/bs TZMS3+cljxysIhwoOmCa0U473WRaHSUQRQ4wUuEOu3nZcO71zmRNQQb/Ho6DOef9nKQj+H +D43B1MyLUkSGHNMurEvRwvPhJvj67fxmLqGhKdH3fxG1vSb8dgDuM0v/lpxLEaPTczAI2 Xf7FBeuxeLDnUXh1QAniN1tsx1gSIXazSSFT+fiz5HM/pqfaB9zAC8gpJoboAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705060884; a=rsa-sha256; cv=none; b=dJiQAMzjNBE5AXF6O5962z5/hanUr4BbaCTTM7eP6DLTGBeA77494cC5e8CltJa/O7ComW QOtdlGaW23nNcoR0DTjNDAdkAV7cdaVmD+tlBpW6w+za37/ll1YSpFUJAzLNJA8QMLirnY lPp9A4dRNNuBKHjywgF3UYL9iQyVSxE+qBtdpwxhGnYFIxkw7NfDPjNMyhKp+sofkkHjLQ ahg33tpkv7iH1iejV3zYTk8d/B81bm6ZXS8lI8wCY31ltIvg59s8mcJ2nYrUYUcgZWdD1w u6YeFVTMmQfZqAtEsp/jZFVp0RS3lrJspT+YAG1xuEFz7X6MtcyeRjXKL6+bIA== 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 4TBKrN0MbWz11lY; Fri, 12 Jan 2024 12:01: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 40CC1Nm5000550; Fri, 12 Jan 2024 12:01:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CC1NwJ000547; Fri, 12 Jan 2024 12:01:23 GMT (envelope-from git) Date: Fri, 12 Jan 2024 12:01:23 GMT Message-Id: <202401121201.40CC1NwJ000547@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 09c69decd208 - stable/14 - nfsclient: flush dirty pages of the vnode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 09c69decd208d3ccd4dd54ea67c14b48c012c58c Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=09c69decd208d3ccd4dd54ea67c14b48c012c58c commit 09c69decd208d3ccd4dd54ea67c14b48c012c58c Author: Konstantin Belousov AuthorDate: 2023-12-30 00:15:50 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:46:52 +0000 nfsclient: flush dirty pages of the vnode PR: 276002 (cherry picked from commit 47ec00d9d6071bbb0ee5ed0bdca3c4a468334d9d) --- sys/fs/nfsclient/nfs_clvnops.c | 45 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index f86ecd53ad4e..36ab5485d807 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -3705,6 +3705,7 @@ nfs_allocate(struct vop_allocate_args *ap) { struct vnode *vp = ap->a_vp; struct thread *td = curthread; + vm_object_t obj; struct nfsvattr nfsva; struct nfsmount *nmp; struct nfsnode *np; @@ -3733,8 +3734,15 @@ nfs_allocate(struct vop_allocate_args *ap) * Flush first to ensure that the allocate adds to the * file's allocation on the server. */ - if (error == 0) + if (error == 0) { + obj = vp->v_object; + if (obj != NULL) { + VM_OBJECT_WLOCK(obj); + vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); + VM_OBJECT_WUNLOCK(obj); + } error = ncl_flush(vp, MNT_WAIT, td, 1, 0); + } if (error == 0) error = nfsrpc_allocate(vp, *ap->a_offset, alen, &nfsva, &attrflag, ap->a_cred, td); @@ -3872,13 +3880,14 @@ nfs_copy_file_range(struct vop_copy_file_range_args *ap) struct vnode *invp = ap->a_invp; struct vnode *outvp = ap->a_outvp; struct mount *mp; + vm_object_t invp_obj; struct nfsvattr innfsva, outnfsva; struct vattr va, *vap; struct uio io; struct nfsmount *nmp; size_t len, len2; ssize_t r; - int error, inattrflag, outattrflag, ret, ret2; + int error, inattrflag, outattrflag, ret, ret2, invp_lock; off_t inoff, outoff; bool consecutive, must_commit, tryoutcred; @@ -3891,6 +3900,9 @@ generic_copy: return (ENOSYS); } + invp_lock = LK_SHARED; +relock: + /* Lock both vnodes, avoiding risk of deadlock. */ do { mp = NULL; @@ -3898,14 +3910,14 @@ generic_copy: if (error == 0) { error = vn_lock(outvp, LK_EXCLUSIVE); if (error == 0) { - error = vn_lock(invp, LK_SHARED | LK_NOWAIT); + error = vn_lock(invp, invp_lock | LK_NOWAIT); if (error == 0) break; VOP_UNLOCK(outvp); if (mp != NULL) vn_finished_write(mp); mp = NULL; - error = vn_lock(invp, LK_SHARED); + error = vn_lock(invp, invp_lock); if (error == 0) VOP_UNLOCK(invp); } @@ -3953,8 +3965,23 @@ generic_copy: * stable storage before the Copy RPC. This is done in case the * server reboots during the Copy and needs to be redone. */ - if (error == 0) + if (error == 0) { + invp_obj = invp->v_object; + if (invp_obj != NULL && vm_object_mightbedirty(invp_obj)) { + if (invp_lock != LK_EXCLUSIVE) { + invp_lock = LK_EXCLUSIVE; + VOP_UNLOCK(invp); + VOP_UNLOCK(outvp); + if (mp != NULL) + vn_finished_write(mp); + goto relock; + } + VM_OBJECT_WLOCK(invp_obj); + vm_object_page_clean(invp_obj, 0, 0, OBJPC_SYNC); + VM_OBJECT_WUNLOCK(invp_obj); + } error = ncl_flush(invp, MNT_WAIT, curthread, 1, 0); + } if (error == 0) error = ncl_vinvalbuf(outvp, V_SAVE, curthread, 0); @@ -4110,6 +4137,7 @@ static int nfs_ioctl(struct vop_ioctl_args *ap) { struct vnode *vp = ap->a_vp; + vm_object_t obj; struct nfsvattr nfsva; struct nfsmount *nmp; int attrflag, content, error, ret; @@ -4127,7 +4155,7 @@ nfs_ioctl(struct vop_ioctl_args *ap) return (ENOTTY); } - error = vn_lock(vp, LK_SHARED); + error = vn_lock(vp, LK_EXCLUSIVE); if (error != 0) return (EBADF); @@ -4153,6 +4181,11 @@ nfs_ioctl(struct vop_ioctl_args *ap) * server, the LayoutCommit will be done to ensure the file * size is up to date on the Metadata Server. */ + + obj = vp->v_object; + VM_OBJECT_WLOCK(obj); + vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); + VM_OBJECT_WUNLOCK(obj); error = ncl_flush(vp, MNT_WAIT, ap->a_td, 1, 0); if (error == 0) error = nfsrpc_seek(vp, (off_t *)ap->a_data, &eof, From nobody Fri Jan 12 12:01:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBKrP4kvYz56h0c; Fri, 12 Jan 2024 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 4TBKrP2HDjz4q4d; Fri, 12 Jan 2024 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=1705060885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cgdCyCHDnXrE4Glm6oLbMMknqxKX3yx2jRgC2mbzWBQ=; b=qLfdEXxLWLkbj5Hmn4WvQdlsuzb2tq23PN17kx7JUEZl3P5qGxMIJRWy1kYbvtY3o4ewo+ VZBLZDgltwJmYoITRWlSVzK2RSO11HCxOVusIbpCXh1D80zjzKaaYTkfz1bFBzH0mq+Lmd /J7P7kwnCJMmcjswCMfCKSWXKHd/mZXd897fPcm1VI6jqFyFKi30Ct4wdrwx15vljA4sx6 rEpfTBTqF9xjJU9bVKKH168CVU5nTO3QjuaXrCSd8gFAmzr7tCwhpD85dojxEb/b6Jk1YH /mEljJc1J/So8J5DZKCGSLFdQ+N90GtEBaH0cBb5M01VopReJ8xquUap5gSlTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cgdCyCHDnXrE4Glm6oLbMMknqxKX3yx2jRgC2mbzWBQ=; b=vUjcZxOB0c2pxFkH6VpGum7Yg//k6y1h2J9R/n3BC/i4SXnlJalH6/X44F6nZ6TL6dmi/6 VjHrKBMNY4pfG08T0RZQxX6jkk49mjn95F4BYqglQT8RT8ntOB8Fgq6fPOCtggbXhoX4qw 8/HwUsaDkejZ6MMccH64ayLhIos81kUUWLtqLSo7n4XFEcs1QfsITdV72psgCWlX+cLvGD IuOIlHyEnZnAiTuAUA0hEwAmu5gIvM/4sEkQeMuO4bW/x1AX+Om+iyN071tPd/p2LK/Avm d6agJHBh+B7bXcu4IpCTaY+J8kWl0fnoaTqbyCVSkX3WTBjfqzcLpw6G26bH9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705060885; a=rsa-sha256; cv=none; b=t5H8mj1TMicvNH/zkD6OVTdg7ka2sEkcgSeKeklCH9ac2eSgKaN3h0ofvV3voTbaFp+cR2 HH6MEOd7lhqD1uH1tNakqy1gvS4ASXhmEBJyikqVMQjN3hcU8fBk+SN7+HnjJ6s9pn60bI RoXH0dTX3fS1y0pv5MhyEGO/Y4+Mub3nMDkzDLTmvTJBb+UVTWuePysEbqI+6TNX/3VyBN LCt9RDW0Ai+16EyVRP3cWMdwI/5GxB7KDhEXuUCWqjziQFiiz6oylMA4+iz2Er8l+VlB1X XLeciPyopzmcW3X1J0xKojLV1ny/Y0qcxCUjvARgd3raY01R0wzxbGHw8lMsTw== 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 4TBKrP1Nclz11lZ; Fri, 12 Jan 2024 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 40CC1Pql000586; Fri, 12 Jan 2024 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 40CC1P5I000583; Fri, 12 Jan 2024 12:01:25 GMT (envelope-from git) Date: Fri, 12 Jan 2024 12:01:25 GMT Message-Id: <202401121201.40CC1P5I000583@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 62b0cb23784b - stable/14 - nfsclient: eliminate ncl_writebp() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 62b0cb23784b282dc771057589a1481bb1ab50cf Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=62b0cb23784b282dc771057589a1481bb1ab50cf commit 62b0cb23784b282dc771057589a1481bb1ab50cf Author: Konstantin Belousov AuthorDate: 2023-12-30 18:46:31 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:46:52 +0000 nfsclient: eliminate ncl_writebp() (cherry picked from commit 656d2e83d9eef204c132f879d55782affede2ca9) --- sys/fs/nfsclient/nfs.h | 1 - sys/fs/nfsclient/nfs_clbio.c | 2 +- sys/fs/nfsclient/nfs_clnode.c | 2 -- sys/fs/nfsclient/nfs_clport.c | 2 -- sys/fs/nfsclient/nfs_clvnops.c | 70 +----------------------------------------- 5 files changed, 2 insertions(+), 75 deletions(-) diff --git a/sys/fs/nfsclient/nfs.h b/sys/fs/nfsclient/nfs.h index b43194a3abeb..aa755a6b5f4d 100644 --- a/sys/fs/nfsclient/nfs.h +++ b/sys/fs/nfsclient/nfs.h @@ -111,7 +111,6 @@ int ncl_readdirrpc(struct vnode *, struct uio *, struct ucred *, struct thread *); int ncl_readdirplusrpc(struct vnode *, struct uio *, struct ucred *, struct thread *); -int ncl_writebp(struct buf *, int, struct thread *); int ncl_commit(struct vnode *, u_quad_t, int, struct ucred *, struct thread *); void ncl_clearcommit(struct mount *); int ncl_fsinfo(struct nfsmount *, struct vnode *, struct ucred *, diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index ae529d549d76..63e97f405198 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -1315,7 +1315,7 @@ again: } } else if ((n + on) == biosize || (ioflag & IO_ASYNC) != 0) { bp->b_flags |= B_ASYNC; - (void) ncl_writebp(bp, 0, NULL); + (void) bwrite(bp); } else { bdwrite(bp); } diff --git a/sys/fs/nfsclient/nfs_clnode.c b/sys/fs/nfsclient/nfs_clnode.c index c6b6eb4fec88..00e25472f856 100644 --- a/sys/fs/nfsclient/nfs_clnode.c +++ b/sys/fs/nfsclient/nfs_clnode.c @@ -59,7 +59,6 @@ #include extern struct vop_vector newnfs_vnodeops; -extern struct buf_ops buf_ops_newnfs; MALLOC_DECLARE(M_NEWNFSREQ); uma_zone_t newnfsnode_zone; @@ -131,7 +130,6 @@ ncl_nget(struct mount *mntp, u_int8_t *fhp, int fhsize, struct nfsnode **npp, } vp = nvp; KASSERT(vp->v_bufobj.bo_bsize != 0, ("ncl_nget: bo_bsize == 0")); - vp->v_bufobj.bo_ops = &buf_ops_newnfs; vp->v_data = np; np->n_vnode = vp; /* diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c index c0318b692d86..4e3a699fb170 100644 --- a/sys/fs/nfsclient/nfs_clport.c +++ b/sys/fs/nfsclient/nfs_clport.c @@ -77,7 +77,6 @@ extern u_int32_t newnfs_true, newnfs_false, newnfs_xdrneg1; extern struct vop_vector newnfs_vnodeops; extern struct vop_vector newnfs_fifoops; extern uma_zone_t newnfsnode_zone; -extern struct buf_ops buf_ops_newnfs; extern uma_zone_t ncl_pbuf_zone; extern short nfsv4_cbport; extern int nfscl_enablecallb; @@ -235,7 +234,6 @@ nfscl_nget(struct mount *mntp, struct vnode *dvp, struct nfsfh *nfhp, } vp = nvp; KASSERT(vp->v_bufobj.bo_bsize != 0, ("nfscl_nget: bo_bsize == 0")); - vp->v_bufobj.bo_ops = &buf_ops_newnfs; vp->v_data = np; np->n_vnode = vp; /* diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 36ab5485d807..3f1ab9741673 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -2925,7 +2925,7 @@ ncl_flush(struct vnode *vp, int waitfor, struct thread *td, * A b_flags == (B_DELWRI | B_NEEDCOMMIT) block has been written to the * server, but has not been committed to stable storage on the server * yet. On the first pass, the byte range is worked out and the commit - * rpc is done. On the second pass, ncl_writebp() is called to do the + * rpc is done. On the second pass, bwrite() is called to do the * job. */ again: @@ -3438,54 +3438,6 @@ nfs_print(struct vop_print_args *ap) return (0); } -/* - * This is the "real" nfs::bwrite(struct buf*). - * We set B_CACHE if this is a VMIO buffer. - */ -int -ncl_writebp(struct buf *bp, int force __unused, struct thread *td) -{ - int oldflags, rtval; - - if (bp->b_flags & B_INVAL) { - brelse(bp); - return (0); - } - - oldflags = bp->b_flags; - bp->b_flags |= B_CACHE; - - /* - * Undirty the bp. We will redirty it later if the I/O fails. - */ - bundirty(bp); - bp->b_flags &= ~B_DONE; - bp->b_ioflags &= ~BIO_ERROR; - bp->b_iocmd = BIO_WRITE; - - bufobj_wref(bp->b_bufobj); - curthread->td_ru.ru_oublock++; - - /* - * Note: to avoid loopback deadlocks, we do not - * assign b_runningbufspace. - */ - vfs_busy_pages(bp, 1); - - BUF_KERNPROC(bp); - bp->b_iooffset = dbtob(bp->b_blkno); - bstrategy(bp); - - if ((oldflags & B_ASYNC) != 0) - return (0); - - rtval = bufwait(bp); - if (oldflags & B_DELWRI) - reassignbuf(bp); - brelse(bp); - return (rtval); -} - /* * nfs special file access vnode op. * Essentially just get vattr and then imitate iaccess() since the device is @@ -3602,26 +3554,6 @@ out: return (fifo_specops.vop_close(ap)); } -/* - * Just call ncl_writebp() with the force argument set to 1. - * - * NOTE: B_DONE may or may not be set in a_bp on call. - */ -static int -nfs_bwrite(struct buf *bp) -{ - - return (ncl_writebp(bp, 1, curthread)); -} - -struct buf_ops buf_ops_newnfs = { - .bop_name = "buf_ops_nfs", - .bop_write = nfs_bwrite, - .bop_strategy = bufstrategy, - .bop_sync = bufsync, - .bop_bdflush = bufbdflush, -}; - static int nfs_getacl(struct vop_getacl_args *ap) { From nobody Fri Jan 12 12:01:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBKrQ5gYnz56gv3; Fri, 12 Jan 2024 12:01: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 4TBKrQ3P7jz4qKZ; Fri, 12 Jan 2024 12:01:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jVCwJFVBNRLIY/5vvPC5SdUO807nE2t0MHxLFhNyzPg=; b=dQS3WuWiiW/UpZMkUpVCiyDiSN2rfxglBnycktKSbGovNn4VHihm+PKsCU7NQcr5cenHdZ GOPg/In3Xh8NoIB4myEgwDdThJ5I/cOu6RLC/ZDuttRhjhlBWoz5up/z9PUVrRuk6trSAC ZLeFf5T4m89gjhAbpHTBN1jIDIKLeE1N7h65JQHpTU4BQPECXfMNv2Y4na7oLQKtey4+gO OodkHpwJCL10L3h2DBtk0HZcIRjqWV2XUW+zAeul6UDBSDzTDiX+0M/9bgqdXwj9lO3LmD JYWURbE4hMX/VIom25wlehTln+zJ7V1xLnnEQ5guQkxItuFTopF0nYzjlsY2NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jVCwJFVBNRLIY/5vvPC5SdUO807nE2t0MHxLFhNyzPg=; b=REBNwekBHrhPun4xlVOyFwjhAv1XqMN2RtlInWDlO8KseaTdKhRnKUfMBKBMvSu4KZy5ub wiLrKHmtZIyKJPTI5zKjSRpFVW30MXhHY23n8UwQCtdkyij/Ycoxy8Z3BRtiBKWnLlj6kK xKPyQRqWTRtH7NHwiaIkAng/LIt/PfdjaPBRCqjhEp3UIxKcflrglrl5oc3HWbsbqCn977 xTmcV8XUjDuwVIZ5+UUH6IMuwUEs2XIZkHE6l4PjBZogKgNoVUt1lYT0XOznxQhyx82uut mJXHoJMD8cCcizTXv0KNNRkvP4xfrJwqajMz8aFUHi3iSdPH1qSpWHCAA2s9Jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705060886; a=rsa-sha256; cv=none; b=GcaO6we5CO0PjJzsfAMFDmuXI6Rep5j5MXrET+oc4YokoaPxyWQlI5jcTxjRPQVwn/X1gV 6hbKbrN6ULeNjPqYio8LqWalnhf1+qVCqCp/Quq984+K1yHZoZg3UJqDCcQJ94UHNCdgmR 09xmwnY6SQWX9GKO6qdfwhWScqCHJt8sO8PnE2iJHW7lrdhF1E4bhwdl1xn2R0CFBe0K3m 6ZN5oPtyFo1z/Yg1XUnsZeqRVVt3RwIbYnu4xaZdEYptEXBbawx/1SrwMaEyhvQ0dHPgki xHqMy9IMYvTWVYd+llSZIRv21I3Df535sWRkOlV4a6y4gBzkFwsNTmVcHlnXSw== 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 4TBKrQ2RNQz11Kg; Fri, 12 Jan 2024 12:01: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 40CC1QpR000644; Fri, 12 Jan 2024 12:01:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CC1QxK000641; Fri, 12 Jan 2024 12:01:26 GMT (envelope-from git) Date: Fri, 12 Jan 2024 12:01:26 GMT Message-Id: <202401121201.40CC1QxK000641@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: dc024acd5174 - stable/14 - vtruncbuf: add a comment explaining the purpose of the loop List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: dc024acd51740f794d09fc478be6a4f046766ba4 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=dc024acd51740f794d09fc478be6a4f046766ba4 commit dc024acd51740f794d09fc478be6a4f046766ba4 Author: Konstantin Belousov AuthorDate: 2023-12-31 20:46:04 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:46:52 +0000 vtruncbuf: add a comment explaining the purpose of the loop (cherry picked from commit 4c41d10f1538c232174d5200d245e5fcd9936958) --- sys/kern/vfs_subr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 811c5cef45d1..8cc4a57cdafb 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2558,6 +2558,9 @@ restart_unlocked: ; if (length > 0) { + /* + * Write out vnode metadata, e.g. indirect blocks. + */ restartsync: TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) { if (bp->b_lblkno > 0) From nobody Fri Jan 12 12:01:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBKrR68Mwz56hKH; Fri, 12 Jan 2024 12:01: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 4TBKrR4LXHz4q8Z; Fri, 12 Jan 2024 12:01:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4fOKEqdtDUwJh0Ze7sqqF0ABdt6pzzL2spZegm0eDcE=; b=Y7e0jhW6fyVXWgSO8Jb2m0pov3muoe2U7yG8kyM/lppwD71fstafygAAELM9+ZWV+udV4u p5uwJR9X2SRnrfrleKoZEcVeJSczOvGdFkgZRzkizVXQg/JsXLvp01ibL9PUdPzsfKVVWg uqeZFOTyZXf/9IGfFShB15EcANd1QRgGu2uAvL6EU6134cm+cQPCFCmsCDJPLpL4EfUS+S u5mRimUdCXI/EXEoNkiir7BQCsWMZ+u91h9PziNqXI6Fwk4dvb3ZjVytAwHzBNDqijd0A2 wnlHX8SpFm4Yyw9G0RKpWQsMXqaMS56PUKQddk3NJH/T2PUItVWu6v4mUH8b4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4fOKEqdtDUwJh0Ze7sqqF0ABdt6pzzL2spZegm0eDcE=; b=mdVTex49PdgpP/wUmMOWooXc7A2e6W5dpyTARo/YB6FzrOD9TPFDAY2I/upE97JMkTrRfw NloBw7y3lbOXm/E88z3jW6foNN6XEbFeG23KCxxA1m6KucMEFHM2jlg3Uf9T3MOz1EM8pK OsWb2JgD25qr6VwKq6a0GF95SDo05/O21snPmpduDmLUDeqQja3YXsM34stR9VI6Delfuo SDlAxG8TCI5eLW9lslpZXa65qu4V2jw++3J31q4fFcCAopvjEPtupbDQOFbghkOTqbOgvO KIheb6TwxAMXhppuK93FDNGNVpWyN/GJ30T6JR4PH9uCBsvFrQNdm4Aly9V9YQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705060887; a=rsa-sha256; cv=none; b=JV2w7b0fz6KOfIJU887Pad7fRNpkG7vSh1gWSiv5p7VEgs2ODbjZJr14vPcw/FEnbkW0IL d9BgCvchEzVD43YQvMUn3JetsG2n7/+1ks0/mPu2SQnN2OFjw/hO91/nhlWLZJkK2xSAJA 7owOPnFG0izsioRjbwLeCT1LBa0WBr6qoKylAyrtDcek3/phO5LN0Vq6qWs545xbEHMPO+ tG+Ci9DkXhoO16Uml/fMLIkC3bT70xiKwaO/OmrV+Sz7IO5DWBS0nz6vPf+vXWJFhy4ENx MRxtnAWPWyZkgnT3riCITFhv9Dv/v+vz0HYAXbh58cgQteP1A2Qb4WV6Zka+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 4TBKrR3SBJz11nj; Fri, 12 Jan 2024 12:01: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 40CC1Rid000697; Fri, 12 Jan 2024 12:01:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CC1RT6000694; Fri, 12 Jan 2024 12:01:27 GMT (envelope-from git) Date: Fri, 12 Jan 2024 12:01:27 GMT Message-Id: <202401121201.40CC1RT6000694@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 9e951d6b4b70 - stable/14 - vtruncbuf: improve the check for meta buffer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 9e951d6b4b708fad9993aca0a1cede1c74d735e0 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9e951d6b4b708fad9993aca0a1cede1c74d735e0 commit 9e951d6b4b708fad9993aca0a1cede1c74d735e0 Author: Konstantin Belousov AuthorDate: 2023-12-31 20:46:53 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:46:53 +0000 vtruncbuf: improve the check for meta buffer (cherry picked from commit 2d33ad48bd37f27925e4c46c798f8f2d23a2b501) --- sys/kern/vfs_subr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 8cc4a57cdafb..3928cde7a719 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2563,7 +2563,7 @@ restart_unlocked: */ restartsync: TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) { - if (bp->b_lblkno > 0) + if (bp->b_lblkno >= 0) continue; /* * Since we hold the vnode lock this should only From nobody Fri Jan 12 12:01:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBKrT0FbVz56h3P; Fri, 12 Jan 2024 12:01: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 4TBKrS534Vz4qCv; Fri, 12 Jan 2024 12:01:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JujJ1NzMP6ZWkhgE1sQUvDmaWIBq1ZP76FW/dFgcBIQ=; b=Tx3yv2kNBngmMoFTngWm6nzmP/2Va9eD446CYTcP7NjWQ1fT7pOy+mmDRh3ywZa6WBxxbS B3Qv4oiSmS6evzgkhYJZTsEuHWoony8+v0T5vQKrlPN5ZG//a/vQUZ43V3itl3JVaoUP+d DKaVaKMCI9cc81qxSkY8JdFo3gEtOkuNXp6nJCL/uvUzTdCHvaeobtMbAvlMuo8XzaMJah zaRaQEUlLJkafv/0NBiTDRbfbkzRmwsSTlJ8zWOSHrFPkEVnAJ2UL/hJ425ypSnDliKvak QeBFtkcvmEuCx1MOVK7q+nEXDsjCn3OMvwRULKtbjCOol8dbJxEJNMCyUPXUTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JujJ1NzMP6ZWkhgE1sQUvDmaWIBq1ZP76FW/dFgcBIQ=; b=dfNeGMFtOdXCw0UrcVMHLF+qihUkgGE4sxL0YFRlTPr2eJhJodyFFXPlDPhBUpwVrY3+bs KCkp7cwkDZv39ziVVB0o0q1l12JgUdM8g18uwbzWLzukOGIJEybsG40V9XlqvfQr6NbLOy FRyKKGAJtRlqoKEcioFXxtjIG5GjZK1vj+7WjGRp/tm6aSPBkq4GMsi296ObyVJejwGPdx 16qNFXKw/DNG4fD2EcL3HnXtGPeZYFgrkJuzMuAnOIMf7B3/Fyx9SfEuDwtJRc4fXr4mqg grxwyJg7mFFaygLoyX1RBfv97aD9mnpeFBuxJ47PvaLGW0i5u2nlHxw93qLQ0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705060888; a=rsa-sha256; cv=none; b=ojw2QlgZtSiGHYC9rsAx3wYsEwEjQ7FfpKdgieg771EVJopfQ5P3VnO+u/MXKNQM6mTC+5 xia/KsRjkTTlMe0i3WCE0zoNzCrO0gZVapMXz10NVHUtFfkKherNAKAhP7hshO5T+x953Q 3dKyJJLJ5bkslGP52YjMGwu2PcAv0kpaJAb4mrgROwyJ37L5P9PMaLndj3Y+wwBHoXBTvs 2/WP5Z5m6so2u14ozFuI0DV4vobYsspCLWEYXAHf+DVzd5SL2OLBoQijuLLkHlHCBVB5wl B79zz6SycfdCZhHMt6JDFm59KitUxMLEt5nowGxhNPMdg6iKZLirz41nPLs1Nw== 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 4TBKrS46Y2z11nk; Fri, 12 Jan 2024 12:01: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 40CC1SNs000754; Fri, 12 Jan 2024 12:01:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CC1StQ000751; Fri, 12 Jan 2024 12:01:28 GMT (envelope-from git) Date: Fri, 12 Jan 2024 12:01:28 GMT Message-Id: <202401121201.40CC1StQ000751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: cbf323cf503b - stable/14 - nfsclient: limit situations when we do unlocked read-ahead by nfsiod List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: cbf323cf503b69516ef19542c4630c0d42d74b05 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cbf323cf503b69516ef19542c4630c0d42d74b05 commit cbf323cf503b69516ef19542c4630c0d42d74b05 Author: Konstantin Belousov AuthorDate: 2024-01-01 22:22:44 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:46:53 +0000 nfsclient: limit situations when we do unlocked read-ahead by nfsiod (cherry picked from commit 70dc6b2ce314a0f32755005ad02802fca7ed186e) --- sys/fs/nfsclient/nfs_clbio.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 63e97f405198..7b9b68782d53 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -484,9 +484,14 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) on = uio->uio_offset - (lbn * biosize); /* - * Start the read ahead(s), as required. + * Start the read ahead(s), as required. Do not do + * read-ahead if there are writeable mappings, since + * unlocked read by nfsiod could obliterate changes + * done by userspace. */ - if (nmp->nm_readahead > 0) { + if (nmp->nm_readahead > 0 && + !vm_object_mightbedirty(vp->v_object) && + vp->v_object->un_pager.vnp.writemappings == 0) { for (nra = 0; nra < nmp->nm_readahead && nra < seqcount && (off_t)(lbn + 1 + nra) * biosize < nsize; nra++) { rabn = lbn + 1 + nra; @@ -674,6 +679,8 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) */ NFSLOCKNODE(np); if (nmp->nm_readahead > 0 && + !vm_object_mightbedirty(vp->v_object) && + vp->v_object->un_pager.vnp.writemappings == 0 && (bp->b_flags & B_INVAL) == 0 && (np->n_direofoffset == 0 || (lbn + 1) * NFS_DIRBLKSIZ < np->n_direofoffset) && From nobody Fri Jan 12 12:01:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBKrV2NSgz56h5v; Fri, 12 Jan 2024 12:01: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 4TBKrT60JWz4q67; Fri, 12 Jan 2024 12:01:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dSV1/LRinSk1Jlz251Q/tewE8X6YxCI7ODa/90MRbn4=; b=D3GUJ1kSB0rpiNN61Z4KbdqfSR4zSvt/MmSwh+Q88M+dpliseagkJnWT1DRYoa/bg5SoL5 1oH2fqFh1tH3dNX3OPhamcx5RGyxJvyMF4Pktp62GgPTGzcfDQjIsYY8lEGnWXp98URmfs wISrX7OHewuQHcny6CTYh54tyVjzSAostvorleQRT9jypOJvgxuF4yOjaM7aOITaggzduP 7r1+DxcFSWJEZyh18mpssZEr2I5k36eyJdD+rYo5wu5gDZeku7PRxZip5EFMChvHzD8mav ouOAw/+STuqepruyWE4pwVzJ5VR0Weog2BzZv4PGOPVhVCdxYiVgzEJs4KHpmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dSV1/LRinSk1Jlz251Q/tewE8X6YxCI7ODa/90MRbn4=; b=s79QPRuxAkGXhEJLgKlATkHRVaLl1IKNYBuzYPlOqgG3sVacpQWFk+q5J7hsX8EUGMDqrS PKJE8jwyXlHVNvipfTHJvx7sPoRrrsKPi1/inhdghI/fno/1zFvfmGLh+0V7gRJi0FtkbY p2Cd1O+vtgWS/NdGPKnnE+cWa3KL/pfb7Dh1K8dUI7CurcU+Mm/KG9cruxta+1fccri5Jg XZ66s5r5hyexcBfK/cVkmlCYvelKf4EVesYvC1xZvSodjKbpE6ed6UEDhALuvTGzvRvubW D2jjfEa5yCSHukMU398ww1KnErTvDGb8XWM4VvDSQJKJshXHEkbBEy7X2H+LgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705060889; a=rsa-sha256; cv=none; b=ubN5bjgRC98SxJ6p7S/aEJbdr1qGMygRxX+7EaV/0eLT5qv4eS/5l3A6roR2CJfXAXV4WD H2E+CxcBhNQk53aJ2/a89kiRQHUUzUMhF0Xxp41nWDtFqUNfldNp4JIrpzYhcPdmO+8KHO IiIDTRzQ70tBMXAU22hJF48/45N5luv/t/NYX2/E1I9wvhXecHZFcNQR7r3+jGi1GEtkbq tHEJA5Q3MXNI91i6M9YGkkelVS+pyS0qBjegAcDvVkgpWJcpOmIlByytKtA7Xs5LlbNp6j 5kiFcebkUM6xbIq83CwjuA+FvfksN3H/CN0HlH3TAelr4EssK3VL1ZjqUx1ARQ== 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 4TBKrT54bnz122Z; Fri, 12 Jan 2024 12:01: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 40CC1TYN000793; Fri, 12 Jan 2024 12:01:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CC1TuM000790; Fri, 12 Jan 2024 12:01:29 GMT (envelope-from git) Date: Fri, 12 Jan 2024 12:01:29 GMT Message-Id: <202401121201.40CC1TuM000790@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 2ff28c64288e - stable/14 - ffs/ffs_rawread.c: clean up includes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2ff28c64288eefab4962f0e826d776dc30287aef Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2ff28c64288eefab4962f0e826d776dc30287aef commit 2ff28c64288eefab4962f0e826d776dc30287aef Author: Konstantin Belousov AuthorDate: 2024-01-08 05:36:33 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:46:53 +0000 ffs/ffs_rawread.c: clean up includes (cherry picked from commit 8a4577423e82c54942a9390658d059f1169187b1) --- sys/ufs/ffs/ffs_rawread.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/sys/ufs/ffs/ffs_rawread.c b/sys/ufs/ffs/ffs_rawread.c index a8df78ee8eff..ef93c1ab6783 100644 --- a/sys/ufs/ffs/ffs_rawread.c +++ b/sys/ufs/ffs/ffs_rawread.c @@ -26,23 +26,21 @@ * SUCH DAMAGE. */ -#include -#include #include +#include +#include +#include #include -#include -#include -#include +#include #include #include #include -#include -#include -#include -#include -#include -#include +#include #include +#include +#include +#include + #include #include #include @@ -54,8 +52,6 @@ #include #include #include -#include -#include static int ffs_rawread_readahead(struct vnode *vp, caddr_t udata, From nobody Fri Jan 12 12:02:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBKsy1fYxz56hSc; Fri, 12 Jan 2024 12:02:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBKsy0sqKz4tFC; Fri, 12 Jan 2024 12:02:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9qbsxvO7uqrpN6azesXn79md172GYcxyr5d1wwGEgMc=; b=Y2HUemhNmOW/6aI6W5kYhONcrv9FZ5UPzWmrK/7r52u1vy/wTlYOUXg6e0MJ/+fXQrH5zF 8PPaILGhLsc7xCaYi7RKXKvqD0QqjyXCRB5UVC5GdAZdMK43jCIG/5G5T41UqPsTo5AFx9 GC6dyoLigHMC3W0eoT4NIE/m0dAeSFkmzvlTvgc6PrhWs17BljLWfZXYHZR+G8PbwR8ev/ nvpL8sbnjvh0CSMjXggTUlkUtJcdSPMPr2v4UgY7uWvg6PkAaG2JWy1iZL6B7+ozZrnGn7 0w4u5ocPjWvigQ00dCO+V+PV06MLpXFLtMfu71Kl68jy5I+KbiVo8kOnHztIdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9qbsxvO7uqrpN6azesXn79md172GYcxyr5d1wwGEgMc=; b=DDyr8a3lRxhH9BfNWaWGJi+tBKvqy6tDXupsh98pXKIcxYHqQLXvnrb1P7IBQ/uIScxDug ZumJLT3zy4X2/2YjZee/g25IHd7A8WKkPmQjbWlzCRowAT1lqiAX+79/BmyC3VkIFRJeLV EeKT7MUkPIoOxW0MWjm5YXoO7DCtXToIVZ0yeOWgdWob05MlIhSQvRMEPgQ7rKZk2lDUo/ Gy9OYo5CDlo9NgAAII+jgXr70kxelZ97FHZwL9/VIbQ3VozX+Z2k3f8rjjIWnHRgcsgCNY NWEigraObzgMpGSkRyGNtoemLuNlQ+C9/MnFgQw9yrcL/UkIag9wQdxTk988sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705060966; a=rsa-sha256; cv=none; b=NQZzpv42WtElXUo07+tzPmCkTjeUt3MxGo9mxsnCcMwGcJznTiRRbnZQKxa3Wi5LqzVwR8 AWxLGRlIEZvrLYqsHkTehf6bOOEXjSkDmgvvsv3UCJtxOzXlKs6ZgV3+S8egk/ywRa6ZdY EG4Er300YfoKSrp23EAYb3LqXKdqq5BIWDLKHQ5NcYV+32A0YibjKuhw0kMOuBrQqBfoC6 Cgvbt2z4/Mp+9ofGZFAP3RCT1Q4G8PV3bJ2ZTs92o6tKWX9Yz/V3zqotn1a6JXLqeLtzRn OsMB5v88xHq3yWyaqoawgjEQpn8i0houHa/uLdU8XWoxeSF9YGiVT6tZrKY9oQ== 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 4TBKsx722bz1236; Fri, 12 Jan 2024 12:02: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 40CC2jjI005485; Fri, 12 Jan 2024 12:02:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CC2j3l005482; Fri, 12 Jan 2024 12:02:45 GMT (envelope-from git) Date: Fri, 12 Jan 2024 12:02:45 GMT Message-Id: <202401121202.40CC2j3l005482@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: a85df799787b - stable/13 - mlx5(4): only detach IOV children if iov was successfully initialized List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: a85df799787b8c441bf7d7238f02ca057b7378e5 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a85df799787b8c441bf7d7238f02ca057b7378e5 commit a85df799787b8c441bf7d7238f02ca057b7378e5 Author: Konstantin Belousov AuthorDate: 2023-12-29 03:14:56 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:47:51 +0000 mlx5(4): only detach IOV children if iov was successfully initialized (cherry picked from commit 987446fa39e8f6887ea16ad49f00f699b2efd210) --- sys/dev/mlx5/driver.h | 2 ++ sys/dev/mlx5/mlx5_core/mlx5_main.c | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sys/dev/mlx5/driver.h b/sys/dev/mlx5/driver.h index 958b4a7df747..d866e40372ab 100644 --- a/sys/dev/mlx5/driver.h +++ b/sys/dev/mlx5/driver.h @@ -708,6 +708,8 @@ struct mlx5_core_dev { bool dump_copyout; struct mtx dump_lock; + bool iov_pf; + struct sysctl_ctx_list sysctl_ctx; int msix_eqvec; int pwr_status; diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c index 2e0aa2a00cd5..0a05d559072f 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_main.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c @@ -1702,7 +1702,9 @@ static int init_one(struct pci_dev *pdev, pci_iov_schema_add_uint64(vf_schema, iov_port_guid_name, 0, 0); err = pci_iov_attach(bsddev, pf_schema, vf_schema); - if (err != 0) { + if (err == 0) { + dev->iov_pf = true; + } else { device_printf(bsddev, "Failed to initialize SR-IOV support, error %d\n", err); @@ -1736,8 +1738,11 @@ static void remove_one(struct pci_dev *pdev) struct mlx5_priv *priv = &dev->priv; #ifdef PCI_IOV - pci_iov_detach(pdev->dev.bsddev); - mlx5_eswitch_disable_sriov(priv->eswitch); + if (dev->iov_pf) { + pci_iov_detach(pdev->dev.bsddev); + mlx5_eswitch_disable_sriov(priv->eswitch); + dev->iov_pf = false; + } #endif if (mlx5_unload_one(dev, priv, true)) { From nobody Fri Jan 12 12:02:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBKsz2f2Hz56hSd; Fri, 12 Jan 2024 12:02: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 4TBKsz1rc6z4t4G; Fri, 12 Jan 2024 12:02:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q4SbcxnLSoFLGLfyf2myNR1QOlY5QGeupgEPJO+BdNE=; b=brTlf3E4sNL9k8ng1B/rES9bceVYgdFCUlmDo6g5KWCohsGcC8/w/xKOXrzwbm8kKMIwgs 85Liw81q9T2GLYhAqIyH9kej9Wu+Hys6l/gLs07dICQB1ssxsGfQ14VXs78JHaA8BIgyJk NPtitmZflsRoUaEqphEHGLokO7kOLliSip5dKRyEaAJCKrX2c5anwSpBFSRe+2gYVXLwfQ AogQah/f/A8stn0bhtoD0yNKiaoVrsPdSK7KBaq7kcgxeq/W67M9K50oThsWmquXif/C0/ XRWMNRNcS+WNt/g13zpNKRAleQGUvNTO3V3WhzglT1aDZUHiUZygnBOqJ/RMCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q4SbcxnLSoFLGLfyf2myNR1QOlY5QGeupgEPJO+BdNE=; b=qbkaDh8FieSrO57mG1uxK9vslW758AjGal+ikFk5fi1uceXg/09gsXU22Eqh4ee7itwTLV WP1XHEk2TZ5c6o3C5nSthPopF6OpZkWhRF0THh87/t95l/2GoLlbqrEef9FXuphmrPZPkK K+G5kqE9sJrbbKPi6CZvCBIwJJPH+qFmwplPR2cma5Ehm20/758lVq4gDn6d7Y/uX1QpVf ZYB91Prdc8NP5i+VPZFTI9nxB9iStKXQi2eNdS5b7KCg61Z8+5dJb0W/+ULRya1rIdtttx +PxcW7OsB3icNwrKFXiz1cfM+vRamE+44bSop2KVuqtkB0Nn3z/ytmLu64ctQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705060967; a=rsa-sha256; cv=none; b=nrimSbXR7CQMrA0F7KwiTXobMF8mb0wqoEN11SNg1BVRqylBAMgFBApOUlbZonU4fuqenF C4jjS+bXZgH6OhycmQmxxs4qohU6iNCPFYB1a2BuCdErX1jZECOYXjcUBpSCEd1/QB0Z0k Xs7I6qoKTeWocE7SwYFkgQN5jPilsQjGDuiaiIjBY/GQEOSjyFuCSYYLGxORxSjrh63NJ6 lslaJuvhXyFQ3Z0uvfDJ/cZY7vqk8tPTZ/hFLui4IjHEXmNRLur11Dql+oVup9Kw2DMXbi g4QM2MNLaiPUUU/D4nVt0Rs/zjZaHGUKo6MfWCXA894FO4Nr0YU+YC6waNUuWg== 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 4TBKsz0vPWz11XL; Fri, 12 Jan 2024 12:02: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 40CC2l1d005538; Fri, 12 Jan 2024 12:02:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CC2lSL005535; Fri, 12 Jan 2024 12:02:47 GMT (envelope-from git) Date: Fri, 12 Jan 2024 12:02:47 GMT Message-Id: <202401121202.40CC2lSL005535@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d139cab8d13b - stable/13 - nfsclient copy_file_range(): flush dst vnode data List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: d139cab8d13b83b90872f6ca5dc53890c85826a9 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d139cab8d13b83b90872f6ca5dc53890c85826a9 commit d139cab8d13b83b90872f6ca5dc53890c85826a9 Author: Konstantin Belousov AuthorDate: 2023-12-29 23:22:40 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:47:51 +0000 nfsclient copy_file_range(): flush dst vnode data PR: 276002 (cherry picked from commit 7dae1467d72ae1f5c8f7be0f7444da23a457d98b) --- sys/fs/nfsclient/nfs_clvnops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 642963694a0a..443d8bc6d56b 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -3881,7 +3881,7 @@ generic_copy: if (error == 0) error = ncl_flush(invp, MNT_WAIT, curthread, 1, 0); if (error == 0) - error = ncl_flush(outvp, MNT_WAIT, curthread, 1, 0); + error = ncl_vinvalbuf(outvp, V_SAVE, curthread, 0); /* Do the actual NFSv4.2 RPC. */ ret = ret2 = 0; From nobody Fri Jan 12 12:02:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBKt05m5Cz56gyb; Fri, 12 Jan 2024 12: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 4TBKt02vqwz4tKT; Fri, 12 Jan 2024 12: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=1705060968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9+N8u0S9pNc0NHeAXQTBhZvP5ROMevOhF3GOCSR8W6g=; b=KP+DcQQFggHq0HOzylspfE8fzz9g4+OgzYRmnkoR8MSu4K+zyIux4VdgOY2PJbzNU1mt/6 Nyumi0hxR2UQK/Iqc8TwdgFa3EsLICy4zpmJtxo0SsAbF6eZ6vHR/uW8bDrM3zJyzlFmCV kxjpA2tYOwE5zPlwFCb2QWCni6MjN3p1VgrDQqAYBZXdGkagDOrfFTT8AXzvJLEMe4iVzD lTli2Xx/TGXN4Yf4rxPb22YW2t6vq/VhwDoTJpOgCiHoC/pskl/W0yWFLv9JHvsqiaQDZt njPziEE+wzSKH+M3I5+UAZMMHPpaczhx5TOUwRVVIlIwvLGFHTVOZMkA0Pchcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9+N8u0S9pNc0NHeAXQTBhZvP5ROMevOhF3GOCSR8W6g=; b=lR/PLIHXSk56AIm9M20SmJRvZZip46HMKcnNpLqwVoarNQmIbFjSvmFg4HwYbesuH70TlX iONY9AHa6Ku1zrbDZ+0IQ67uNflRZ6R8OUhcIkflJkemmR3pvHiszqc5laByQf9QNVCDJ4 ixZfvaLCfFOFofhoMj40WnbMod0ByuQBlapKGiMgo6D1IAvRlxymu0xySm4+kRaNBwU3m6 OYfDlQ7geKfpaWtpNEsqrzhubDgtENsoBjso54yfDddKZdNG82zS3iyENCc4Z8xgMhClek A6+GPHBx2NNxHVUywLpcAcXQbiLLMwMgAJDUKhvxOoyXs0PKdyz5LXsfhZij+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705060968; a=rsa-sha256; cv=none; b=RBkQS7Xs2OoIi99/BK/1y915KWdZVJseNBjFf2MjDwJjuNu8MJn0pT7l61ANvo5UngCYH1 +iZGbNqfPSMLlI2z9JrRsMErRQnxw7CkTPRb1yTN9E6Dyb1k75c524Lv0Arq8jts8MGcNe nVqAW3qFFHbovOXtU+9q3QvYzAYfkx+MgyO1sxTgjKlB9fctAnRSwRPKn1V6P0QJiavs8B i+xvat1bporK7aYh5R90V/MSHIhe20O4jLeUhjKC3bDt1YJEzbm8OUhrUlznrfgAaml871 IMOtMWT5FupcAkFXUNe3t4IhAME9I1BzO7htYWT35b7Atr23HJYhEUuUM86oCw== 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 4TBKt01xVBz12Dc; Fri, 12 Jan 2024 12: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 40CC2mmF005587; Fri, 12 Jan 2024 12: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 40CC2mMR005584; Fri, 12 Jan 2024 12:02:48 GMT (envelope-from git) Date: Fri, 12 Jan 2024 12:02:48 GMT Message-Id: <202401121202.40CC2mMR005584@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: cee4d7c22585 - stable/13 - nfsclient: flush dirty pages of the vnode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: cee4d7c22585a736a5d231365ceb62e96d80488a Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cee4d7c22585a736a5d231365ceb62e96d80488a commit cee4d7c22585a736a5d231365ceb62e96d80488a Author: Konstantin Belousov AuthorDate: 2023-12-30 00:15:50 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:47:52 +0000 nfsclient: flush dirty pages of the vnode PR: 276002 (cherry picked from commit 47ec00d9d6071bbb0ee5ed0bdca3c4a468334d9d) --- sys/fs/nfsclient/nfs_clvnops.c | 45 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 443d8bc6d56b..4ee167cfb5cd 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -3731,6 +3731,7 @@ nfs_allocate(struct vop_allocate_args *ap) { struct vnode *vp = ap->a_vp; struct thread *td = curthread; + vm_object_t obj; struct nfsvattr nfsva; struct nfsmount *nmp; struct nfsnode *np; @@ -3759,8 +3760,15 @@ nfs_allocate(struct vop_allocate_args *ap) * Flush first to ensure that the allocate adds to the * file's allocation on the server. */ - if (error == 0) + if (error == 0) { + obj = vp->v_object; + if (obj != NULL) { + VM_OBJECT_WLOCK(obj); + vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); + VM_OBJECT_WUNLOCK(obj); + } error = ncl_flush(vp, MNT_WAIT, td, 1, 0); + } if (error == 0) error = nfsrpc_allocate(vp, *ap->a_offset, alen, &nfsva, &attrflag, ap->a_cred, td, NULL); @@ -3800,13 +3808,14 @@ nfs_copy_file_range(struct vop_copy_file_range_args *ap) struct vnode *invp = ap->a_invp; struct vnode *outvp = ap->a_outvp; struct mount *mp; + vm_object_t invp_obj; struct nfsvattr innfsva, outnfsva; struct vattr *vap; struct uio io; struct nfsmount *nmp; size_t len, len2; ssize_t r; - int error, inattrflag, outattrflag, ret, ret2; + int error, inattrflag, outattrflag, ret, ret2, invp_lock; off_t inoff, outoff; bool consecutive, must_commit, tryoutcred; @@ -3816,6 +3825,9 @@ generic_copy: return (ENOSYS); } + invp_lock = LK_SHARED; +relock: + /* Lock both vnodes, avoiding risk of deadlock. */ do { mp = NULL; @@ -3823,14 +3835,14 @@ generic_copy: if (error == 0) { error = vn_lock(outvp, LK_EXCLUSIVE); if (error == 0) { - error = vn_lock(invp, LK_SHARED | LK_NOWAIT); + error = vn_lock(invp, invp_lock | LK_NOWAIT); if (error == 0) break; VOP_UNLOCK(outvp); if (mp != NULL) vn_finished_write(mp); mp = NULL; - error = vn_lock(invp, LK_SHARED); + error = vn_lock(invp, invp_lock); if (error == 0) VOP_UNLOCK(invp); } @@ -3878,8 +3890,23 @@ generic_copy: * stable storage before the Copy RPC. This is done in case the * server reboots during the Copy and needs to be redone. */ - if (error == 0) + if (error == 0) { + invp_obj = invp->v_object; + if (invp_obj != NULL && vm_object_mightbedirty(invp_obj)) { + if (invp_lock != LK_EXCLUSIVE) { + invp_lock = LK_EXCLUSIVE; + VOP_UNLOCK(invp); + VOP_UNLOCK(outvp); + if (mp != NULL) + vn_finished_write(mp); + goto relock; + } + VM_OBJECT_WLOCK(invp_obj); + vm_object_page_clean(invp_obj, 0, 0, OBJPC_SYNC); + VM_OBJECT_WUNLOCK(invp_obj); + } error = ncl_flush(invp, MNT_WAIT, curthread, 1, 0); + } if (error == 0) error = ncl_vinvalbuf(outvp, V_SAVE, curthread, 0); @@ -4021,6 +4048,7 @@ static int nfs_ioctl(struct vop_ioctl_args *ap) { struct vnode *vp = ap->a_vp; + vm_object_t obj; struct nfsvattr nfsva; struct nfsmount *nmp; int attrflag, content, error, ret; @@ -4038,7 +4066,7 @@ nfs_ioctl(struct vop_ioctl_args *ap) return (ENOTTY); } - error = vn_lock(vp, LK_SHARED); + error = vn_lock(vp, LK_EXCLUSIVE); if (error != 0) return (EBADF); @@ -4064,6 +4092,11 @@ nfs_ioctl(struct vop_ioctl_args *ap) * server, the LayoutCommit will be done to ensure the file * size is up to date on the Metadata Server. */ + + obj = vp->v_object; + VM_OBJECT_WLOCK(obj); + vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); + VM_OBJECT_WUNLOCK(obj); error = ncl_flush(vp, MNT_WAIT, ap->a_td, 1, 0); if (error == 0) error = nfsrpc_seek(vp, (off_t *)ap->a_data, &eof, From nobody Fri Jan 12 12:02:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBKt14jMgz56h6H; Fri, 12 Jan 2024 12:02: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 4TBKt13Thjz4t71; Fri, 12 Jan 2024 12:02:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I+gdKHDhy2GoyxzWPtbIUZgdTcVfdprB+geJjM4NUpo=; b=qZf6qOMBGg/k/ylIZVSkxT7a22LwVwozH5SIPqkE059DCiLLHmPANXnGkSVZ98HYXGpPcp 4QUGOtsjZWvg5UuizwS+d8mJWxB+79LDVprQmYaYE/N1EzzE6dZPNP6I5X7xybY+bnE9ge CXZ6yhel3D5mfEbT/iU2Bkyfqg1SbgaNupyhTlCEVqtsXX/l5GkvHT1krVVGqFi/J+j+7K PcdVhii8qfvgu071MnOFKKAuFPTWo6jtMbpEQtaErdG/7WUwQFGf5qOcjDZaa88kKEzYOd WFU6v6nfYrvqWfLfE5o/ot7PFoXPVDWvN2P5hx01DojkW1LGIPgr7tmoXqq7nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I+gdKHDhy2GoyxzWPtbIUZgdTcVfdprB+geJjM4NUpo=; b=T9nRt9QhiyDNQoeWGUA7S5ifv9IH7eDMWhgazGPkHzGLPXwkCfxcmaxZoI4TSu17WG1E6c tYc/qnTPO+OABJIhs1Q7EPf420P/ERH5bjMapl+6jgyfkWYuWF4son9giHTEd4xO5UN+KZ 4GwV95F582FZGLpB2yitLxBjtn+BIZewDo++ghxu/B0ZyhTxYqmcAv+vC1HewHnc2TrWhs 2i49pIuxdtA0PGuAbcyPjEdseZDoVssJZvIaNhN5Io++hlHKfAseAPY4vqv0L22/BS8E8z k8F8r8oNXfBaRe1V+D+KfVN6Rf9zqhkVjd8h3C+PaDYje4hisLVCdsNnAOjMKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705060969; a=rsa-sha256; cv=none; b=oJcfccYZZF0SK5BCv8T7NmEGUmmdxfV91iKM7q8Rr1wsQzoHPSRXW3qknG//KgaXz2BUY0 u29SRC0UvthH/ujFA2h6rRJoCV2c5wAHDI9ugGJwPmIiGjEFu8IuX7BZFNZjpNfBo2stzV 2trN41JYpgmIyOHU8lmISWvBCqWd1ma6q9QhEr/hcVglgJy9YHfoUqRqi4uWhF5+7s488s c1rv3oMAs3ssbbqWI75ZRUhd7ji8WC9v5mGwt6H3BvHQNVReR+bD0BlqbOpSsl6N6yn03W Zqbye0rGot/P/puYLC1Y0CMJtulXosaRcxI6X0AhO5jeZG4y1UXpvvWeSl8LiA== 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 4TBKt12XYdz11mH; Fri, 12 Jan 2024 12:02: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 40CC2nvj005624; Fri, 12 Jan 2024 12:02:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CC2nXZ005621; Fri, 12 Jan 2024 12:02:49 GMT (envelope-from git) Date: Fri, 12 Jan 2024 12:02:49 GMT Message-Id: <202401121202.40CC2nXZ005621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 93be89569021 - stable/13 - nfsclient: eliminate ncl_writebp() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 93be89569021e8507b2d326902157ccf7cac2141 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=93be89569021e8507b2d326902157ccf7cac2141 commit 93be89569021e8507b2d326902157ccf7cac2141 Author: Konstantin Belousov AuthorDate: 2023-12-30 18:46:31 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:47:52 +0000 nfsclient: eliminate ncl_writebp() (cherry picked from commit 656d2e83d9eef204c132f879d55782affede2ca9) --- sys/fs/nfsclient/nfs.h | 1 - sys/fs/nfsclient/nfs_clbio.c | 2 +- sys/fs/nfsclient/nfs_clnode.c | 2 -- sys/fs/nfsclient/nfs_clport.c | 2 -- sys/fs/nfsclient/nfs_clvnops.c | 70 +----------------------------------------- 5 files changed, 2 insertions(+), 75 deletions(-) diff --git a/sys/fs/nfsclient/nfs.h b/sys/fs/nfsclient/nfs.h index b43194a3abeb..aa755a6b5f4d 100644 --- a/sys/fs/nfsclient/nfs.h +++ b/sys/fs/nfsclient/nfs.h @@ -111,7 +111,6 @@ int ncl_readdirrpc(struct vnode *, struct uio *, struct ucred *, struct thread *); int ncl_readdirplusrpc(struct vnode *, struct uio *, struct ucred *, struct thread *); -int ncl_writebp(struct buf *, int, struct thread *); int ncl_commit(struct vnode *, u_quad_t, int, struct ucred *, struct thread *); void ncl_clearcommit(struct mount *); int ncl_fsinfo(struct nfsmount *, struct vnode *, struct ucred *, diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index ae529d549d76..63e97f405198 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -1315,7 +1315,7 @@ again: } } else if ((n + on) == biosize || (ioflag & IO_ASYNC) != 0) { bp->b_flags |= B_ASYNC; - (void) ncl_writebp(bp, 0, NULL); + (void) bwrite(bp); } else { bdwrite(bp); } diff --git a/sys/fs/nfsclient/nfs_clnode.c b/sys/fs/nfsclient/nfs_clnode.c index 98fcdf7e0048..a7ace3cdadc9 100644 --- a/sys/fs/nfsclient/nfs_clnode.c +++ b/sys/fs/nfsclient/nfs_clnode.c @@ -59,7 +59,6 @@ #include extern struct vop_vector newnfs_vnodeops; -extern struct buf_ops buf_ops_newnfs; MALLOC_DECLARE(M_NEWNFSREQ); uma_zone_t newnfsnode_zone; @@ -131,7 +130,6 @@ ncl_nget(struct mount *mntp, u_int8_t *fhp, int fhsize, struct nfsnode **npp, } vp = nvp; KASSERT(vp->v_bufobj.bo_bsize != 0, ("ncl_nget: bo_bsize == 0")); - vp->v_bufobj.bo_ops = &buf_ops_newnfs; vp->v_data = np; np->n_vnode = vp; /* diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c index 893ab76aec0c..ec97fb360035 100644 --- a/sys/fs/nfsclient/nfs_clport.c +++ b/sys/fs/nfsclient/nfs_clport.c @@ -77,7 +77,6 @@ extern u_int32_t newnfs_true, newnfs_false, newnfs_xdrneg1; extern struct vop_vector newnfs_vnodeops; extern struct vop_vector newnfs_fifoops; extern uma_zone_t newnfsnode_zone; -extern struct buf_ops buf_ops_newnfs; extern uma_zone_t ncl_pbuf_zone; extern short nfsv4_cbport; extern int nfscl_enablecallb; @@ -235,7 +234,6 @@ nfscl_nget(struct mount *mntp, struct vnode *dvp, struct nfsfh *nfhp, } vp = nvp; KASSERT(vp->v_bufobj.bo_bsize != 0, ("nfscl_nget: bo_bsize == 0")); - vp->v_bufobj.bo_ops = &buf_ops_newnfs; vp->v_data = np; np->n_vnode = vp; /* diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 4ee167cfb5cd..05948b4d6ef6 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -2949,7 +2949,7 @@ ncl_flush(struct vnode *vp, int waitfor, struct thread *td, * A b_flags == (B_DELWRI | B_NEEDCOMMIT) block has been written to the * server, but has not been committed to stable storage on the server * yet. On the first pass, the byte range is worked out and the commit - * rpc is done. On the second pass, ncl_writebp() is called to do the + * rpc is done. On the second pass, bwrite() is called to do the * job. */ again: @@ -3462,54 +3462,6 @@ nfs_print(struct vop_print_args *ap) return (0); } -/* - * This is the "real" nfs::bwrite(struct buf*). - * We set B_CACHE if this is a VMIO buffer. - */ -int -ncl_writebp(struct buf *bp, int force __unused, struct thread *td) -{ - int oldflags, rtval; - - if (bp->b_flags & B_INVAL) { - brelse(bp); - return (0); - } - - oldflags = bp->b_flags; - bp->b_flags |= B_CACHE; - - /* - * Undirty the bp. We will redirty it later if the I/O fails. - */ - bundirty(bp); - bp->b_flags &= ~B_DONE; - bp->b_ioflags &= ~BIO_ERROR; - bp->b_iocmd = BIO_WRITE; - - bufobj_wref(bp->b_bufobj); - curthread->td_ru.ru_oublock++; - - /* - * Note: to avoid loopback deadlocks, we do not - * assign b_runningbufspace. - */ - vfs_busy_pages(bp, 1); - - BUF_KERNPROC(bp); - bp->b_iooffset = dbtob(bp->b_blkno); - bstrategy(bp); - - if ((oldflags & B_ASYNC) != 0) - return (0); - - rtval = bufwait(bp); - if (oldflags & B_DELWRI) - reassignbuf(bp); - brelse(bp); - return (rtval); -} - /* * nfs special file access vnode op. * Essentially just get vattr and then imitate iaccess() since the device is @@ -3626,26 +3578,6 @@ out: return (fifo_specops.vop_close(ap)); } -/* - * Just call ncl_writebp() with the force argument set to 1. - * - * NOTE: B_DONE may or may not be set in a_bp on call. - */ -static int -nfs_bwrite(struct buf *bp) -{ - - return (ncl_writebp(bp, 1, curthread)); -} - -struct buf_ops buf_ops_newnfs = { - .bop_name = "buf_ops_nfs", - .bop_write = nfs_bwrite, - .bop_strategy = bufstrategy, - .bop_sync = bufsync, - .bop_bdflush = bufbdflush, -}; - static int nfs_getacl(struct vop_getacl_args *ap) { From nobody Fri Jan 12 12:02:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBKt26wWKz56h12; Fri, 12 Jan 2024 12:02:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBKt24s6hz4tNM; Fri, 12 Jan 2024 12:02:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Th2uM3G6etTJ/t07pn7XEa58FB8pYmOVflhXx/wKUz8=; b=dyjYYZHrD5h+MEkznKTNchV4O/C4Y2eG1B434J0htA4IBXWn125tR/699iFddnPVmD/3TM btfTzBaCZvL0HNjfJ/n4P5p5SeOYxIRuLZVGJKgpood/RJVwThJ6K9yYbPSCfJAV9BEWNg hEfG+zRIDEsLq//ir/5YlnWMPo0WbZu9jWFdtZq2Cn72PhLsBiYgJt0YvBOkMs6aXDsRvG 1QIIpmfajCsBZhOIBo6+3DC/cBr+XCkxj7SKIMwqG+O3aCM30OuiIpJY2mZ63wQWNix3eS 5fbgLYdmbafKKe/Hoam7OclksJLf5BsTwaDTDeuENOe7jt13uYMQbfALnELODQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Th2uM3G6etTJ/t07pn7XEa58FB8pYmOVflhXx/wKUz8=; b=ACa2k7f9eCI9ZCEEYC1Qhpr8GAjH45jh8OpO3P5Tk4FdzgpQ0u0EtL+C6Xehj7ZpUhqVDZ ctPVN8Ga//DvBA5KyoMyggvjX+R7cVUKqFVu72EtXkh4sNpB/cHJ0XD7hKiuKisZ3TdYHq RiBL9e2p2vL2nTXUD4C55z9/EaFTH5SxWukZQjnDMw5g/UcZS4B93FXZXXxqAXsgVc/epT ZoaTlBYKFIG8RiarMMcmq7yCeAw0MiiZXQRGe1kHDEMx5gU+nNkhzqMNOUCpC0HpLmGCJ1 Kr4B9uLpN9ICag0CRxupI+6tR2YjKp3rjZMb9/HZp5dDJO7EX/NMD8gNmd6+ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705060970; a=rsa-sha256; cv=none; b=v+0Q2vwFXL1LACvoqwiFMPqdspTjVYQMWRs0PKNfH0feK31iyWJc6tJayTHCxD7dQdUjSH 6L0FizidKxSB3dfp794whLLfe20Juqm8sZoGou01HDNKa/aJinVlep7iGxk/6tUIrVTdhc 6sE5Jf3Dra+0iSpu2Rdr89rp2P94NnN1wUKQt8mvZmJ7l9YtVJPLSKtsUq00bKV4KeXfTm tdnRlj1wtQs+hy1kP75T8bUQpSY39y0FRdcS8/iFKko8U84+xt97CP0jM0vk9gNpeY/Gdz rcwADF2In+1sFu/sf2SLWilxyJDEhZ+hyat2s/Xmueja0en2bLPHgDHbyP7bfw== 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 4TBKt23ckwz11mJ; Fri, 12 Jan 2024 12:02:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40CC2oEZ005682; Fri, 12 Jan 2024 12:02:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CC2oSm005679; Fri, 12 Jan 2024 12:02:50 GMT (envelope-from git) Date: Fri, 12 Jan 2024 12:02:50 GMT Message-Id: <202401121202.40CC2oSm005679@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 3828d60715e6 - stable/13 - vtruncbuf: add a comment explaining the purpose of the loop List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 3828d60715e64cfbae93449858cc6ae8ce615a63 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3828d60715e64cfbae93449858cc6ae8ce615a63 commit 3828d60715e64cfbae93449858cc6ae8ce615a63 Author: Konstantin Belousov AuthorDate: 2023-12-31 20:46:04 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:47:52 +0000 vtruncbuf: add a comment explaining the purpose of the loop (cherry picked from commit 4c41d10f1538c232174d5200d245e5fcd9936958) --- sys/kern/vfs_subr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 3305110ed065..c9c76c903977 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2564,6 +2564,9 @@ restart_unlocked: ; if (length > 0) { + /* + * Write out vnode metadata, e.g. indirect blocks. + */ restartsync: TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) { if (bp->b_lblkno > 0) From nobody Fri Jan 12 12:02:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBKt40Zwnz56hQc; Fri, 12 Jan 2024 12:02:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBKt35cgsz4tGB; Fri, 12 Jan 2024 12:02:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PAcT7Rih+TDJy5pJgSRjo3utMaATDCj/bjQOw/yP4Fg=; b=YH/8h6xhB2y0lL414Ei/sR6xwfGqMgOm7irJbt4gQ0XVRXRm0R8tJpqZbA6o0U4cW87020 z4TzbBPWzt6o7jgSIZGaan1m1UxL3L/iP7UMVv+W/UpUIZOGYJfAl7LiuiDzvaCtVdKWiq 1PL3R1o8n80twrlRDk40y5syPmhetnLcISEDRZVlv6NrhoXyHUHgCGZLQASPHuvkA2WF7H 0Dhk5kT+jnWaq7KkBGdWnVWo2jO26Z6sQb4X4HePsUW9Q3AnQ0vu8VS1teNdbESGXDKxw2 AQMUys85ue3WYxMJF6GAehJELN7MKuYkW7dvKwjNZJXYsss5KUtczZdI+uRayQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PAcT7Rih+TDJy5pJgSRjo3utMaATDCj/bjQOw/yP4Fg=; b=RSdlUTHWLWC9ZDeH50RTF2jmhZ+G8iuGheRF8tbZLv7i/+Hd9Am5GWvT3Oj2xyySQQJeA6 JYCfV5zQg67ygC5ars7Tc7OG7qqhm93OWlz21yj304ohQxdZRBVtHNSWbMf2hxZVYL+Wrl 7j9oh1eJfN+d3H32SxaiUJdQXtve8dvaZnHib/VayXudt3rJLB9Z5doeFJJHfVV04Vq9G2 O50tXbTa+zUuOs0TBdig2M829YX/PQP/zsyqNTiW0N5kAGKf34pFHL+NovL41IQM19gG9R MOQUs6RdpU180IP5DDUcvsDaXlSJrdaxpdiV+ShQ3O1ztrUSNo9HQO3OkTPNeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705060971; a=rsa-sha256; cv=none; b=yGhw8Z6QbdSVX4dj/gYzf1wNnL6nGLr5bWLAzUUCLhz7osFzTYBoO8+PpRPiDtUT3FidoJ wTJXsbcoLhusp4Sv2q6VULA0KrNiWbpcy9/j4GZm/FWJpMojf2PcvZqLLSbykGrqgnKMSO NaxqenW7ahsZA3ZCF6OlRw9vcGRYtkekKnnrZGS3SC+j9p9wu/rLHV56JB1dfass8i0CTl 6630UAO0yn8decE+5Np6VdeBtvTsTnl/fomFJmSgcQ+ZSLboBeQKBQpuoNgXK2Ak8ez4jc 7oxJQarxnvlMde72L5EANtuaQLvVVifAUrYqPau+fDTvdha6axXh0eplRRna8g== 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 4TBKt34g6tz1237; Fri, 12 Jan 2024 12:02:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40CC2pYo005730; Fri, 12 Jan 2024 12:02:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CC2pZ3005727; Fri, 12 Jan 2024 12:02:51 GMT (envelope-from git) Date: Fri, 12 Jan 2024 12:02:51 GMT Message-Id: <202401121202.40CC2pZ3005727@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 0166a12e580f - stable/13 - vtruncbuf: improve the check for meta buffer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 0166a12e580fbacdba9f669065c43e98d3a93aca Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0166a12e580fbacdba9f669065c43e98d3a93aca commit 0166a12e580fbacdba9f669065c43e98d3a93aca Author: Konstantin Belousov AuthorDate: 2023-12-31 20:46:53 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:47:52 +0000 vtruncbuf: improve the check for meta buffer (cherry picked from commit 2d33ad48bd37f27925e4c46c798f8f2d23a2b501) --- sys/kern/vfs_subr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index c9c76c903977..1166fd6c5389 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2569,7 +2569,7 @@ restart_unlocked: */ restartsync: TAILQ_FOREACH_SAFE(bp, &bo->bo_dirty.bv_hd, b_bobufs, nbp) { - if (bp->b_lblkno > 0) + if (bp->b_lblkno >= 0) continue; /* * Since we hold the vnode lock this should only From nobody Fri Jan 12 12:02:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBKt536TBz56gyf; Fri, 12 Jan 2024 12:02: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 4TBKt46c1vz4tJJ; Fri, 12 Jan 2024 12:02:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jYm1VERnF9vPweVocYK6sD3II+coE4bE4Td0F4im+oM=; b=U+FGgpgDNTecX5ZYb3Aqx17R1MF9e3O7TlAKMwk/bIuspqeS1c6gnm5DL02SFS++Z1j4FA owvXc3FZjWFu2IaG5f0id63Qo7FbXTsGzCRu6ZBfapoCfLuj0HxhRVsmVh0/qQNjZyIX62 i+u4sjaoZ3XvAFYjC5xk0AdmCMjgMya8KDqxKJWmwhLDfrEznft9mzvK7NllvnY2wg3UEm /sOcHtN8HK/auWqIyQORTYzDuuSdYg/+Mwblr+W7yBT3+4jlsT+jUi0UnNYO6ibUuqD84o Bcy4IvOAl1+V+S+8uYJMFfaoSJYvGV/9H20D/Ap3FV9CkZlWPNxBb86fBILRRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jYm1VERnF9vPweVocYK6sD3II+coE4bE4Td0F4im+oM=; b=BxMZ0/gITffdeGg7lviyg9PTdd4PgwCHfJGiwu13cTUN/b2ZoXuyYmqlPqU43OE5pcXcPH rpyPgIDvxvCpxOL/fQxUcibsyUEbN3N2otDL6MmlRZzAdt3qHrsijuh+j1INJe1NZABckm 38CSvZK/VHN7x0ZGPdjWcjnI+PPuVW++nchPYoPbtLaei4zYHajcT0MdSImOjQEVgZL2mH xyyALIw83AqClRulseJZg745pdXu0CeazafgFO1PdDmvr7L/lW3DPnzFyjLltE+M2FHYwH o9xbzocPtCWgpjisrkdbBFL6aNcuduUEwERZiC5PJpYt6TQEgRRt6drOqdJ3Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705060972; a=rsa-sha256; cv=none; b=x+qZlbIewE1bpto6hZpQk0IjnDLbyvreAqM3VIB/9kGTfGYl2mys7ZC54iiSlT3mwwUgnD hLd1qTzCpbTrwUVdIkYKHWb6jZvNeWwyfrAMo1ywWSM5xrabYnhh0XBOjiAWCgDfCZZndO TPNr8YU1CHe7/1BI7vS68DCHBwuVIrSlZ+jiPsC2VBhCu3hwywcC2/g+/asIr1BlvhTBrb JgTo2EgV+92znI9ezCkeJ/CmCaceeIsBv2GQEOgnS9Cf9ye+y2glIBRgS299k3HIuM7BGh Bi/XMyFBGHzkJ5/TN/ryTFbMc4BJfa4VQiVxJgHur0FjWIcmOiTG0C/1B8UsAw== 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 4TBKt45hSKz121B; Fri, 12 Jan 2024 12:02:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40CC2qpH005787; Fri, 12 Jan 2024 12:02:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CC2qFY005784; Fri, 12 Jan 2024 12:02:52 GMT (envelope-from git) Date: Fri, 12 Jan 2024 12:02:52 GMT Message-Id: <202401121202.40CC2qFY005784@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: cc5cda1dbaa9 - stable/13 - nfsclient: limit situations when we do unlocked read-ahead by nfsiod List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: cc5cda1dbaa907ce52074f47264cc45b5a7d6c8b Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cc5cda1dbaa907ce52074f47264cc45b5a7d6c8b commit cc5cda1dbaa907ce52074f47264cc45b5a7d6c8b Author: Konstantin Belousov AuthorDate: 2024-01-01 22:22:44 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:47:52 +0000 nfsclient: limit situations when we do unlocked read-ahead by nfsiod (cherry picked from commit 70dc6b2ce314a0f32755005ad02802fca7ed186e) --- sys/fs/nfsclient/nfs_clbio.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 63e97f405198..7b9b68782d53 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -484,9 +484,14 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) on = uio->uio_offset - (lbn * biosize); /* - * Start the read ahead(s), as required. + * Start the read ahead(s), as required. Do not do + * read-ahead if there are writeable mappings, since + * unlocked read by nfsiod could obliterate changes + * done by userspace. */ - if (nmp->nm_readahead > 0) { + if (nmp->nm_readahead > 0 && + !vm_object_mightbedirty(vp->v_object) && + vp->v_object->un_pager.vnp.writemappings == 0) { for (nra = 0; nra < nmp->nm_readahead && nra < seqcount && (off_t)(lbn + 1 + nra) * biosize < nsize; nra++) { rabn = lbn + 1 + nra; @@ -674,6 +679,8 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) */ NFSLOCKNODE(np); if (nmp->nm_readahead > 0 && + !vm_object_mightbedirty(vp->v_object) && + vp->v_object->un_pager.vnp.writemappings == 0 && (bp->b_flags & B_INVAL) == 0 && (np->n_direofoffset == 0 || (lbn + 1) * NFS_DIRBLKSIZ < np->n_direofoffset) && From nobody Fri Jan 12 12:02:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBKt61Zzyz56hNQ; Fri, 12 Jan 2024 12:02: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 4TBKt60Wmxz4tJd; Fri, 12 Jan 2024 12:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gV3rAwzHXr5s7gwNkDri/zOc5ej7iZnmPG7eodqpBng=; b=E3L8+5p7TcibgfWPucSdnkwNA0ORlivG7goDhTfUJzd5M1tcEO6RV8TpUazeGOADBVjKob YPcz2NgHSjyprV1KAQQZCHv60KfJk8NJk+JdBUnKxN7HX6KjZt/uKhUd4Pzha7a4uF/SDb ry4+/MWGj5A/Ov+TqKBjO++I5YSEr12kIzBU6mHzuy4ybMJaTQjLSSvT44orj11Ridbo6Z eV0cFs4nlmx3oR+RlWcbYk7fbnr74ACCU7gXZE4C0gFv7THLkKm+wy9oXfDnWjjqeunI/Q qzdyIA+1iQUwnuAK9vRYGaVaG3XePeuN8n/j125SnfIwPPp1X6uhAdXPAFhKUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705060974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gV3rAwzHXr5s7gwNkDri/zOc5ej7iZnmPG7eodqpBng=; b=XnSC59YiwgP6LqNCWcnEiGO/JpTnpdObNkieoR+s0Af1+gecKWV0BCDHnqfpq4H8CeAwx9 W3FjwD4Qmz1b4TLWJg0rsdx2cgXeSlU+UndbBTxvrVc2FrCs4IyoI4RSltBvUL4G+0+FsX UchhVcCW4JL7hTWm5QHHyyPVcmGHOzesDPGK9MK5YI1y01KqW0pzuUtAM5wnb02l6WQ98g ggwaJy2cCYR+zOoSnuHaVz9nfJFdaHls2Clk/+n28urZQ23Gz+8f2C83Hjya9Si2e5Zc1/ Mh0WnOrhR6BXRNqsRbr07cw0NXIvTJesVnrc3IrR6UbSetNzvxenbn0mqteq3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705060974; a=rsa-sha256; cv=none; b=UoiLBzLEmGH2pdcKyswIzRkGhrAnp63+VmcJlpgQLtp6N52LfIIo0lTW+aFcrNSd9v2zZa atDp03mw9UdSU+DWYTZRiFqvW/tS1cCI4Lo+JyJ18APInmjtbyuGKh9vYdDXT3Y3maRHeL glwCVzNqe+J0x/04RGRrBZWlmZQ8NBB3fWFqixNNV6Ygjvyn8ZPp5uQAEi4ZTqeE+5SIUh INwCtE//ThHcZEQcTv/3U/GLNLkxVr0d2v3mdWcyAwz9qHHZ0SbMSEjslZ4GWaAWJp3Hv3 7nmfiL3tME8yPxF0W8nf5/HfipS6VCPJOdQ7ibQJp4JfiwvHLpKBaAhiRe94Ww== 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 4TBKt56gLvz11jW; Fri, 12 Jan 2024 12:02: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 40CC2rr5005827; Fri, 12 Jan 2024 12:02:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CC2rdJ005824; Fri, 12 Jan 2024 12:02:53 GMT (envelope-from git) Date: Fri, 12 Jan 2024 12:02:53 GMT Message-Id: <202401121202.40CC2rdJ005824@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: c85e01d0bfdd - stable/13 - ffs/ffs_rawread.c: clean up includes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: c85e01d0bfddcd23123a8b69d7a92cda55f2e526 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c85e01d0bfddcd23123a8b69d7a92cda55f2e526 commit c85e01d0bfddcd23123a8b69d7a92cda55f2e526 Author: Konstantin Belousov AuthorDate: 2024-01-08 05:36:33 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-11 16:47:52 +0000 ffs/ffs_rawread.c: clean up includes (cherry picked from commit 8a4577423e82c54942a9390658d059f1169187b1) --- sys/ufs/ffs/ffs_rawread.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/sys/ufs/ffs/ffs_rawread.c b/sys/ufs/ffs/ffs_rawread.c index a8df78ee8eff..ef93c1ab6783 100644 --- a/sys/ufs/ffs/ffs_rawread.c +++ b/sys/ufs/ffs/ffs_rawread.c @@ -26,23 +26,21 @@ * SUCH DAMAGE. */ -#include -#include #include +#include +#include +#include #include -#include -#include -#include +#include #include #include #include -#include -#include -#include -#include -#include -#include +#include #include +#include +#include +#include + #include #include #include @@ -54,8 +52,6 @@ #include #include #include -#include -#include static int ffs_rawread_readahead(struct vnode *vp, caddr_t udata, From nobody Fri Jan 12 15:41:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBQjx0VMbz573D9; Fri, 12 Jan 2024 15:41: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 4TBQjw6GX7z4LDC; Fri, 12 Jan 2024 15:41:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pS/r4xi6pVXEukIxb+xgcHFPMrD6+az4rilbqXxGrNw=; b=WvuLqHgcV4ZzWa5Rvuv0nrzMUV2/gVq5TGQqbfgR8sIrkJJUnAO8pq0svQYGU21Mtmo7Oa 0PIFaTi+vPqQJeE5Lf/96N3gIJqe1tlUNpgLIZRWeYHezvlM4gQRU0uUgLtG2U8gmDufCC dQ+NaWGS9yFHBaCWNCgd3GolQXY0UAZe3HilkMPPKsm5yDM3WZigMdFvjCeL8chtZpKkKE t3i2bS2AZQnVUcUqodYeVjv4QT9emKdGXl1gjPX5MaRfiQOldALOu2GZQN7p/x14KpHOGZ Lmdnpimj0SCIqMbCsNVU62m4g5hcp5UZyLspwlTvqpf4lFBUVHPDeaD+OF/Jdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pS/r4xi6pVXEukIxb+xgcHFPMrD6+az4rilbqXxGrNw=; b=kFTP6AR83GJftnyXlsfR0sWgGOxV+MaBvbIutoY9iiyg9X2dGCsKBpAXFXfoXBHrOMfPsa kdDT/SEsueep6Y3cvLkHed/MWH8/YDa8FE5BQB1hZhhxZgHAAM1LRj+IGXCMllGPI9KZdj hoPtl/S25QTZPY3Yzs8Yu27D4y3LdnFJBxNrB4jLVYtniJTyzIWAKTxQgNcAKIc24X2sc5 OX8qqX+mcZfMBOlNeorDQi0rAG4MjBdZlJAQD8DJiqoEk9v1+p9RXNPVaaEQveFtabaFeX Mn0unHcO8ybJtMk3SabiRDd4vBQyfihshdUfOQga54TcRhKKBqkWrOVls6qTpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705074068; a=rsa-sha256; cv=none; b=aY9yBXIxMMpJG+R0UAlE1HZVsl55CPgbVgU4uYJAnsnpKR5LHZku6I/lGYLDjg4F6nyeah wTTBfLgtDvgTy/2uTsE8tnI3B4LfsknawR+MZiRwfB/IqbPaiWZUWw6h/tTp9sJ2jCr1rC utwleXaXxH7JaC9vgTF+Lw4jfkN6Spw1vPVCTxk85iJxl22Teve8iX/LbRtl/aQCcSMqld aqeWj9Hl2g8DI5NDY5+BnPH0xFAph1mUrTuScw7aVH44KJGwZ4g+6bShPxA/f4zxSHMGts tlDgl6WPrK+9IBIm7gjOmSATfbJ5pHF3NnU88CzxYjlq+DjupzOlxt/9SDuqrA== 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 4TBQjw5KdZz17L4; Fri, 12 Jan 2024 15:41: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 40CFf8OR071324; Fri, 12 Jan 2024 15:41:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CFf8Z6071321; Fri, 12 Jan 2024 15:41:08 GMT (envelope-from git) Date: Fri, 12 Jan 2024 15:41:08 GMT Message-Id: <202401121541.40CFf8Z6071321@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 13fbe20942cd - stable/14 - tcp: tcp: allow SOL_SOCKET-level socket options via sysctl interface List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 13fbe20942cd99c77daedd28560adaef4653fefb Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=13fbe20942cd99c77daedd28560adaef4653fefb commit 13fbe20942cd99c77daedd28560adaef4653fefb Author: Michael Tuexen AuthorDate: 2023-12-09 11:57:19 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 15:28:41 +0000 tcp: tcp: allow SOL_SOCKET-level socket options via sysctl interface When using the sysctl interface for setting a SOL_SOCKET-level socket option, the TCP handler refers to the IP handler, which only handles SO_SETFIB and SO_MAX_PACING_RATE. So call sosetopt(), which handles all SOL_SOCKET-level options. Then you can use tcpsso with SOL_SOCKET-level socket options as expected. Reported by: rscheff Reviewed by: glebius, rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D42985 (cherry picked from commit bed7633b108930e9e9d2478c75556035938d4e88) --- sys/netinet/in_pcb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index a54b93812c55..b00d61eaecf7 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -3020,7 +3020,11 @@ sysctl_setsockopt(SYSCTL_HANDLER_ARGS, struct inpcbinfo *pcbinfo, so = inp->inp_socket; KASSERT(so != NULL, ("inp_socket == NULL")); soref(so); - error = (*ctloutput_set)(inp, &sopt); + if (params->sop_level == SOL_SOCKET) { + INP_WUNLOCK(inp); + error = sosetopt(so, &sopt); + } else + error = (*ctloutput_set)(inp, &sopt); sorele(so); break; } From nobody Fri Jan 12 15:44:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBQnS1x7pz572xp; Fri, 12 Jan 2024 15:44: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 4TBQnS1RwYz4Lxw; Fri, 12 Jan 2024 15:44:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/iKL5eIfq04L7z2tccDclV+bDjIIpTIEqvpLpQm9s40=; b=jFYVNC4YK8lWFd5fOT3y8kYunc/UKLsY0gXxk9ljjNBaH11bC05OsI3LA+dVHRyQIamhS7 RkgwMG+pZZiHo7cNE5sydiPz2ukHBz3W9QbTBRl326du14a9tysyJyDxTTZB4oCNhtIj5o /rUS8xl/w7p+mlfK7hPdGexrcFpXnnvr+/LLognOuTxPi+xM7+ssn+8+LcH1G9tTI5pEHA EJXuDtLfxA+Dm2O5132neN2Zyf1axlfTRqA61kS3Bqe1yawm1iIR8TKZaTM7epnzK615Ar VyeqaYS2XmmrR7cXtqvcLRKsfJZzCUv8Zh9tEwvSPc6j4UJuvIJvXteFmzmpAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/iKL5eIfq04L7z2tccDclV+bDjIIpTIEqvpLpQm9s40=; b=uEGyTZXhIfBmfjplMUyJiizETl3SKcu3uXHA/xTBroqnGO+KCjPHbzeATAwr6Z4NtqooOh YZlATBqLaWIVagqlAi8bUM8dPdkCOGTtDW7KG3RbotenC6ueMBBUfbsj1NqfH12rCt3FZw BilsMsprmfQ8DDfFhyx9br6EL1igjlBlwaAOS1bPe9ZLsjyVwshGClEzoYnA0rQ9VhKawV 2S+0Ii8baXXvNSxeOz+O3n4g3YzPknyLCRWWFDILiL0p1NvStaBDWMVNyKN3LpPBhvD1ce 4IW4CRWwuNndvDarNvqHjL086h6l+EfJc/EvOTmVBCsujFVPGeb5QCmVZ+rEMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705074252; a=rsa-sha256; cv=none; b=mEwRUsQ/GAQfk6z1MamnvKM4wpl6EmEOVrmkp2Frvq/BLIT7Zj5gXRpB/2RExno0fNbjzv GyYORqUgKmfiW2wMr4iIJmcvQjzgCKfLp5bayaIXNhrYZHFtYUAAskvoqm4+J6YEks1Fys DnJUsvWKBmFuERQkdvw6BJFCBffTKpFaRhC/lMzg838jHw/fH7QbczM3pu9c42tNEfSuzG ice2DGb8mYHArCPg87bwPyrJ9qIH6twznpRXrDBtKqx7PnbObQlzlF9LgTrEO70WTI/kbG 9oWlJbg7MXrY2a8C3Lh+k6zaJva6OCO1EWKnZBtl4iu/rOanj7OMVZ0wBt3iwA== 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 4TBQnS0Vdnz17b9; Fri, 12 Jan 2024 15:44: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 40CFiBlj076343; Fri, 12 Jan 2024 15:44:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CFiBAQ076340; Fri, 12 Jan 2024 15:44:11 GMT (envelope-from git) Date: Fri, 12 Jan 2024 15:44:11 GMT Message-Id: <202401121544.40CFiBAQ076340@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 77292494fb3c - stable/14 - tcpsso: fix typos in man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 77292494fb3c831d5b70923f2258869c252b0311 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=77292494fb3c831d5b70923f2258869c252b0311 commit 77292494fb3c831d5b70923f2258869c252b0311 Author: Michael Tuexen AuthorDate: 2024-01-06 18:17:04 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 15:31:38 +0000 tcpsso: fix typos in man page Reviewed by: manpages (bcr) Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D43342 (cherry picked from commit f402e087379cf6b2c6045348f87caf69b4ebebef) --- usr.sbin/tcpsso/tcpsso.8 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/tcpsso/tcpsso.8 b/usr.sbin/tcpsso/tcpsso.8 index cb51390abac2..36707d6657d4 100644 --- a/usr.sbin/tcpsso/tcpsso.8 +++ b/usr.sbin/tcpsso/tcpsso.8 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 30, 2022 +.Dd January 6, 2024 .Dt TCPSSO 8 .Os .Sh NAME @@ -83,7 +83,7 @@ state can only be handled if their prior state was .Dv SYN_SENT . .Pp .Op Ar level -can be specified as a non negative number or a symbolic name like +can be specified as a non-negative number or a symbolic name like .Dv SOL_SOCKET , .Dv IPPROTO_IP , .Dv IPPROTO_IPV6 , @@ -99,7 +99,7 @@ If that is not the case, is used. .Pp .Ar optname -can be specified as a non negative number or a symbolic name like +can be specified as a non-negative number or a symbolic name like .Dv SO_DEBUG , .Dv IP_TOS , .Dv IPV6_TCLASS , @@ -109,7 +109,7 @@ or .Dv TCP_FUNCTION_BLK . .Pp .Ar optval -can be in integer value, which will be converted to a binary value and +can be an integer value, which will be converted to a binary value and passed as an int value. If it cannot be parsed as an integer value, it will be processed as a string. If the From nobody Fri Jan 12 15:44:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBQnk5VGFz573DZ; Fri, 12 Jan 2024 15: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 4TBQnk53brz4M2k; Fri, 12 Jan 2024 15: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=1705074266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JtXy593YLQ5zQ3RQiC5vm/OYjlBiDcoEMEfB7I1Da8c=; b=CcyMfHXsNFyQlHZdOrsOCB43qOzkm9CGyT4RTBqQU/0nuHExV+vJl1d1c7x3aa64QbXQHu l6Q6L3wbcteXt9E9ngiZXjY6D6gNByogwvuAK8CkW82qStMdD1vyycOjnlMen39SPlP/pO mWkwoa7YR1zESv18+QJzfgMSXCQHCfz1sdA3I1JbmVOzkdPw75mBet4MFUX1hfKRBS3k8G hkTawkF45zBz1A2rJQdEzQxND0jt1EdEx85EqlHey9LX48DlRP50boAPiHjewJer+YuasI upLUFTc0mEEa3b/+7npDgG6VmgIKYJo9b3ehJfUGwxswK9rTlJBWSRsxIFGOfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JtXy593YLQ5zQ3RQiC5vm/OYjlBiDcoEMEfB7I1Da8c=; b=cwnb6XtWXprjxjbWCcI6qiL62JfrwH9zUNs3qU0gmvG8snaVvZoYVK5LVj2Nnmt7wqp8+e K6qB+uSrTEs7hb4Q4jvnKt1iZFDpAhGIb2ggP838fv55BXtp8n6RXOuFvQmKMHnOdhXZlY w9ubEG+m7epoTYk8KQHg6ksLzcRW9Ok7kxkyRCKQX/69PRBDJICMUvlaVZVCQIexN5L77I Lj1f/RVEwJDEJ5IwNOfbpf2VaX3Nm8pFX4tR0WdbShGSDS8TMTt0sy3t7evqi/rDPTzQ56 JLEmkYnYjb0kBj8qvPM+s96sYjpzfOkgbvzoRzSUG3B1p9SIk2jKDSRCvtpw+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705074266; a=rsa-sha256; cv=none; b=uMxLgWzLT6uqoRusAqIzaFHVfG1TpShvgmgH6g8jIj+oxDJT1RE4mGMwKwKKG6pgHg60nP XjcppgvrGYyFrgqLWPwIYXc3CU3wMKnqNE3fShBPU2tT96P/HV8erLG4VK8Hmjw6Nb06F8 JP9CSO+fY5zOdPHMQxxr8dfU3fUr/ybjdfcSRtRUeybbcZvWzeJCHmVPfq5cRGScxeh3WK FWRtNFMIc627a9QE9ZJG+iUTa01H9tbt8g12j3451deh8W7cFSLpNhRQj0Tv68Lg94VD/x T09FKfi8Vu60xbw6q7NJOv6SbuJ6qG6wgXxvI6xqiBoUgUOltyzaRCXTli8j7w== 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 4TBQnk46XXz17MW; Fri, 12 Jan 2024 15: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 40CFiQ8l076533; Fri, 12 Jan 2024 15: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 40CFiQvH076530; Fri, 12 Jan 2024 15:44:26 GMT (envelope-from git) Date: Fri, 12 Jan 2024 15:44:26 GMT Message-Id: <202401121544.40CFiQvH076530@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: a3d80dd8aa6a - main - login: Use getpwnam_r() instead of getpwnam(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: a3d80dd8aa6ac15877e00102ab174b417ac81d79 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a3d80dd8aa6ac15877e00102ab174b417ac81d79 commit a3d80dd8aa6ac15877e00102ab174b417ac81d79 Author: Dag-Erling Smørgrav AuthorDate: 2024-01-12 15:40:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-01-12 15:43:42 +0000 login: Use getpwnam_r() instead of getpwnam(). Since we expect the entry to still be valid after calling into PAM, which may call getpwnam() itself, we need to use getpwnam_r(). MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans, imp, allanjude, markj Differential Revision: https://reviews.freebsd.org/D43376 --- usr.bin/login/login.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index 409e6cc373ad..5b4fa55dc541 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -110,6 +110,8 @@ static u_int timeout = 300; /* Buffer for signal handling of timeout */ static jmp_buf timeout_buf; +char pwbuf[1024]; +struct passwd pwres; struct passwd *pwd; static int failures; @@ -315,7 +317,7 @@ main(int argc, char *argv[]) bail(NO_SLEEP_EXIT, 1); } - pwd = getpwnam(username); + (void)getpwnam_r(username, &pwres, pwbuf, sizeof(pwbuf), &pwd); if (pwd != NULL && pwd->pw_uid == 0) rootlogin = 1; @@ -338,7 +340,7 @@ main(int argc, char *argv[]) (void)setpriority(PRIO_PROCESS, 0, 0); } - if (pwd && rval == 0) + if (pwd != NULL && rval == 0) break; pam_cleanup(); From nobody Fri Jan 12 15:44:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBQnl6lTFz5734R; Fri, 12 Jan 2024 15: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 4TBQnl69XGz4LxT; Fri, 12 Jan 2024 15: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=1705074267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rSE/OcjV4p+Xw48nzsp7zsjhn2q5ngSxYqfeq8lLNIs=; b=jzso9jVKAKgS86qPnZxYYIfXAMe5nDEh81lcRU7RnX6Kt2+A875qck0l75RFCc+POGdRCB dPqX1AJ9Kzu06Zd+yDNmZx5xjtUCac90NpdlSNaz1w79xlooG4LrVJnd6eZstIznu1UpJn 5M6mWJ8CFnGFuFbpAMZnBclmrvcdDDE2CcuFBQPq1oEWeQ+ODAUndpczYQb8HWbXQ5bO8h Z5WgQbb1wniNKZC5FFtlgdGidBL9f27PCUGuZY1lXyJy2331KnfvuvBwGpi/E9L1HHHzSK sM3xOm8uliiLiZwXd+pXVixBxUQTDr1Ua3Yubj6T7KcOYFt0fA6wEROgJUNDFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rSE/OcjV4p+Xw48nzsp7zsjhn2q5ngSxYqfeq8lLNIs=; b=pIrMuQZLo5f7+Ey+Wk/KtH5lxnLETZ7PvjaB0TRYelyBKt9misKw14tdNhwNeJbrxo7qz/ 3ULOLlZWZF/a2m4UYac7UQhMBPvqjBo2/Qp16Zfi3vBR90U6Lo5FZ76RLka0Nhhz+I/u1s qP+GxS5Y6LComRCjJ4HkLONPGXNoetQTAwaanxXO+Zhhyksjd7HZzP1uKpBEeBtuuEwd71 4n3Km+7oNIlRIB9nyTTL/FcI6eUOEl7WiOieT4siSL71P26xNm/5U7Vxsp4FpZHoIeItPZ mj9GfvGdGp81/o6d/D1HXnnf+HVqoNBS3MgayBAbb6tXbP7az5lz0aEZL30tCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705074267; a=rsa-sha256; cv=none; b=HhDiTLQWniXBGT2xWE9cds00O2qPedLOXOQWF8Ya5poXpQTxp94TLfEVmpOGqVTEBf6vY8 lKi4ElEXhiGQ7+51cI1/mU6jRMB2lMJUzulU1EBWYJTzwsgGyeaz3e1sj2ixxg0s4W6xyc sWmch6AtWcN8xXEd743yqsNlqQ4apiVmR9erfYC8XqOwZrPr7bxTca5hhcp4xosA0xVwzd 8hlFdcJnfMxdyC0osYL3G2QYD1dFR1PIcWQvSmKNAVp074Su2IOuriZvS27ZQqSF++P1MN PBInEMx6B/i4tlJV5Df5I55nBtkh3zj366GqJor0xZXZdn67VIjROTwzS5SdJg== 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 4TBQnl5H4lz17B8; Fri, 12 Jan 2024 15: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 40CFiRnX076587; Fri, 12 Jan 2024 15: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 40CFiRSx076584; Fri, 12 Jan 2024 15:44:27 GMT (envelope-from git) Date: Fri, 12 Jan 2024 15:44:27 GMT Message-Id: <202401121544.40CFiRSx076584@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: e762fd81e253 - main - uniq: Replace NetBSD's unit tests with our own. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: e762fd81e253d4ae9b9f7d2e65cf448633bbe527 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e762fd81e253d4ae9b9f7d2e65cf448633bbe527 commit e762fd81e253d4ae9b9f7d2e65cf448633bbe527 Author: Dag-Erling Smørgrav AuthorDate: 2024-01-12 15:40:26 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-01-12 15:43:49 +0000 uniq: Replace NetBSD's unit tests with our own. These new tests cover more functionality and are easier to extend. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D43381 --- ObsoleteFiles.inc | 8 +++ usr.bin/uniq/tests/Makefile | 13 +--- usr.bin/uniq/tests/uniq_test.sh | 149 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 158 insertions(+), 12 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index da7e3d432bfb..ac936aebb574 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,14 @@ # xargs -n1 | sort | uniq -d; # done +# 20240112: replaced NetBSD tests for uniq with our own +OLD_FILES+=usr/tests/usr.bin/uniq/d_basic.in +OLD_FILES+=usr/tests/usr.bin/uniq/d_basic.out +OLD_FILES+=usr/tests/usr.bin/uniq/d_counts.out +OLD_FILES+=usr/tests/usr.bin/uniq/d_input.in +OLD_FILES+=usr/tests/usr.bin/uniq/d_show_duplicates.out +OLD_FILES+=usr/tests/usr.bin/uniq/d_show_uniques.out + # 20231208: new clang import which bumps version from 16 to 17 OLD_FILES+=usr/lib/clang/16/include/__clang_cuda_builtin_vars.h OLD_FILES+=usr/lib/clang/16/include/__clang_cuda_cmath.h diff --git a/usr.bin/uniq/tests/Makefile b/usr.bin/uniq/tests/Makefile index d9c839aa35b6..55bb98e98c34 100644 --- a/usr.bin/uniq/tests/Makefile +++ b/usr.bin/uniq/tests/Makefile @@ -1,15 +1,4 @@ - PACKAGE= tests - -NETBSD_ATF_TESTS_SH= uniq_test - -${PACKAGE}FILES+= d_basic.in -${PACKAGE}FILES+= d_basic.out -${PACKAGE}FILES+= d_counts.out -${PACKAGE}FILES+= d_input.in -${PACKAGE}FILES+= d_show_duplicates.out -${PACKAGE}FILES+= d_show_uniques.out - -.include +ATF_TESTS_SH= uniq_test .include diff --git a/usr.bin/uniq/tests/uniq_test.sh b/usr.bin/uniq/tests/uniq_test.sh new file mode 100755 index 000000000000..ddd9ec9881dd --- /dev/null +++ b/usr.bin/uniq/tests/uniq_test.sh @@ -0,0 +1,149 @@ +# +# Copyright (c) 2024 Klara, Inc. +# +# SPDX-License-Identifier: BSD-2-Clause +# + +atf_check_uniq() { + atf_check uniq "$@" input actual + atf_check diff -u actual expected + atf_check uniq "$@" - actual input + printf "a\nb\na\n" >expected + atf_check_uniq +} + +atf_test_case count +count_head() { + atf_set descr "basic test showing counts" +} +count_body() { + printf "a\na\nb\nb\nb\na\na\na\na\n" >input + printf " 2 a\n 3 b\n 4 a\n" >expected + atf_check_uniq -c + atf_check_uniq --count +} + +atf_test_case repeated +repeated_head() { + atf_set descr "print repeated lines only" +} +repeated_body() { + printf "a\na\nb\na\na\n" >input + printf "a\na\n" >expected + atf_check_uniq -d + atf_check_uniq --repeated +} + +atf_test_case count_repeated +count_repeated_head() { + atf_set descr "count and print repeated lines only" +} +count_repeated_body() { + printf "a\na\nb\nb\na\n" >input + printf " 2 a\n 2 b\n" >expected + atf_check_uniq --count --repeated +} + +atf_test_case all_repeated +all_repeated_head() { + atf_set descr "print every instance of repeated lines" +} +all_repeated_body() { + printf "a\na\nb\na\na\n" >input + printf "a\na\na\na\n" >expected + atf_check_uniq -D + atf_check_uniq --all-repeated +} + +atf_test_case skip_fields +skip_fields_head() { + atf_set descr "skip fields" +} +skip_fields_body() { + printf "1 a\n2 a\n3 b\n4 b\n5 a\n6 a\n" >input + printf "1 a\n3 b\n5 a\n" >expected + atf_check_uniq -f 1 + atf_check_uniq --skip-fields 1 +} + +atf_test_case skip_fields_tab +skip_fields_tab_head() { + atf_set descr "skip fields (with tabs)" +} +skip_fields_tab_body() { + printf "1\ta\n2\ta\n3\tb\n4\tb\n5\ta\n6\ta\n" >input + printf "1\ta\n3\tb\n5\ta\n" >expected + atf_check_uniq -f 1 + atf_check_uniq --skip-fields 1 +} + +atf_test_case ignore_case +ignore_case_head() { + atf_set descr "ignore case" +} +ignore_case_body() { + printf "a\nA\nb\nB\na\nA\n" >input + printf "a\nb\na\n" >expected + atf_check_uniq -i + atf_check_uniq --ignore-case +} + +atf_test_case skip_chars +skip_chars_head() { + atf_set descr "skip chars" +} +skip_chars_body() { + printf "1 a\n2 a\n3 b\n4 b\n5 a\n6 a\n" >input + printf "1 a\n3 b\n5 a\n" >expected + atf_check_uniq -s 2 + atf_check_uniq --skip-chars 2 +} + +atf_test_case unique +unique_head() { + atf_set descr "print non-repeated lines only" +} +unique_body() { + printf "a\na\nb\na\na\n" >input + printf "b\n" >expected + atf_check_uniq -u + atf_check_uniq --unique +} + +atf_test_case count_unique +count_unique_head() { + atf_set descr "print non-repeated lines with count" +} +count_unique_body() { + printf "a\na\nb\n" >input + printf " 1 b\n" >expected + atf_check_uniq --unique --count + atf_check_uniq --count --unique +} + +atf_init_test_cases() +{ + atf_add_test_case basic + atf_add_test_case count + atf_add_test_case repeated + atf_add_test_case count_repeated + atf_add_test_case all_repeated + atf_add_test_case skip_fields + atf_add_test_case skip_fields_tab + atf_add_test_case ignore_case + atf_add_test_case skip_chars + atf_add_test_case unique + atf_add_test_case count_unique +} From nobody Fri Jan 12 15:44:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBQnn1nYRz573cj; Fri, 12 Jan 2024 15:44: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 4TBQnm6dXyz4M7s; Fri, 12 Jan 2024 15:44:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yUyiqK9yK3XHn+NsSvDnziCfC4n/Dwh3jm0+1O1kSTM=; b=LrspZmOSLoFjuwCcAEOz7uTsYRYq779kUfS55BDqvO04jcPl0tZpxaljhKhmzxkVOiY+k+ 0rsFEmTZuVRKVaXkfRt1g+C96TD9evRyFUh1aGB/fKoL68jpAiwRN5xGtsDRY/TqGCESjw WHw0Zhc0Pa2p6X+AVbvSKx/H4JBNDYQESiTlc+73eR/YOcK/RVAK5t2f3ecldCPaDTFdXT zTS10Dn865uOg1Z0w8l17otQH39Coldsy75sO1dokWh+ckXElPhP1OXpayUY7zCLjUdD0B 575Z6goEPLE5GvBWCMyVN6Dk4cwEdAB3SNX8VtVZkpaKJQp4DcSPoMAanNObWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yUyiqK9yK3XHn+NsSvDnziCfC4n/Dwh3jm0+1O1kSTM=; b=fQf0SRkIF9lu9YHc9lLgZvn2UUXGnNBi8S2Pcu5z3+KRw80a9pjt2L/QP9o0yAkcukPlQV jSGWVTJ6WqtcjoA2ueNsJnsWnJy+QG1NsWCaetQNc4LRlR2wgzCmhn4MyRO40PqDi5p0Zw rnid++7JVje+nWBiRwla9dH2xyjZebniGp/URYzY9JCXlRR4CmL5uQuvlCndr5sJBF2ryw +PJnitMS3SpganJU2L0bWi+wpvJjCCKdyxzVLFctGcYE/g6egfqL/54ekcHRoSJdLmt4Jh KSeiC+h7Dj1fCuzqMelXQ5JkhYe07/bGvrQFw2HutF8PumfbBADxNXQt1VJncQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705074269; a=rsa-sha256; cv=none; b=mh9Ex9ULHFK93Rjy2Xi3xI6HESHz2gpwc/QVz3LpGdtQS0wo/h6YmE4RYQ7KwwJL0XNsqE XGDuZ8Iq1DIXhugUO42ui0OEMzAOhLPTyue3Psbi8JJoF3RdjJWXFhZmxbTxUtLZ7W/ElR xWJDqdBEu4u7ijUHEggOZ5xJFuJQhz7rpTCC1M31VNirV2hb91BieztGTaY4F0P5Fg3x1F clQaANLf0YoS4G+jHc42JPwTzt7u+yo9xgpNBbwQbhAm9X37MHR544DhDDcjY3uuALDui1 uklHPAdOdPg629AZZBvo+aehSvk97R1aVayr+nxNX+5Jdxfx1GTWxRwqngutlw== 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 4TBQnm5kpCz170n; Fri, 12 Jan 2024 15:44: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 40CFiSxK076636; Fri, 12 Jan 2024 15:44:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CFiSAe076633; Fri, 12 Jan 2024 15:44:28 GMT (envelope-from git) Date: Fri, 12 Jan 2024 15:44:28 GMT Message-Id: <202401121544.40CFiSAe076633@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: 11715600e626 - main - uniq: Fix interactive use. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 11715600e626cf6cc4b4f564af97f6ae1e5fb0be Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=11715600e626cf6cc4b4f564af97f6ae1e5fb0be commit 11715600e626cf6cc4b4f564af97f6ae1e5fb0be Author: Dag-Erling Smørgrav AuthorDate: 2024-01-12 15:40:33 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-01-12 15:43:55 +0000 uniq: Fix interactive use. Output a line as soon as it is possible to determine that it will have to be output. For the basic case, this means output each line as it is read unless it is identical to the previous one. For the -d case, it means output the first instance as soon as the second is read, unless the -c option was also given. The -D and -u cases were already fine. Add test cases for interactive use with no options and with -d. Explicitly ignore -d when -D is also specified. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: rew, kevans Differential Revision: https://reviews.freebsd.org/D43382 --- usr.bin/uniq/tests/uniq_test.sh | 26 ++++++++++++++++++++++ usr.bin/uniq/uniq.1 | 5 ++++- usr.bin/uniq/uniq.c | 49 ++++++++++++++++++++++++----------------- 3 files changed, 59 insertions(+), 21 deletions(-) diff --git a/usr.bin/uniq/tests/uniq_test.sh b/usr.bin/uniq/tests/uniq_test.sh index ddd9ec9881dd..8dc2015734f6 100755 --- a/usr.bin/uniq/tests/uniq_test.sh +++ b/usr.bin/uniq/tests/uniq_test.sh @@ -133,6 +133,30 @@ count_unique_body() { atf_check_uniq --count --unique } +atf_test_case interactive +interactive_head() { + atf_set descr "test interactive use" +} +interactive_body() { + sh -c 'yes | stdbuf -oL uniq >actual' & + pid=$! + sleep 1 + kill $! + atf_check -o inline:"y\n" cat actual +} + +atf_test_case interactive_repeated +interactive_repeated_head() { + atf_set descr "test interactive use with -d" +} +interactive_repeated_body() { + sh -c 'yes | stdbuf -oL uniq -d >actual' & + pid=$! + sleep 1 + kill $! + atf_check -o inline:"y\n" cat actual +} + atf_init_test_cases() { atf_add_test_case basic @@ -146,4 +170,6 @@ atf_init_test_cases() atf_add_test_case skip_chars atf_add_test_case unique atf_add_test_case count_unique + atf_add_test_case interactive + atf_add_test_case interactive_repeated } diff --git a/usr.bin/uniq/uniq.1 b/usr.bin/uniq/uniq.1 index e01c84328575..30dee856d772 100644 --- a/usr.bin/uniq/uniq.1 +++ b/usr.bin/uniq/uniq.1 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 7, 2020 +.Dd January 12, 2024 .Dt UNIQ 1 .Os .Sh NAME @@ -72,6 +72,9 @@ Precede each output line with the count of the number of times the line occurred in the input, followed by a single space. .It Fl d , Fl -repeated Output a single copy of each line that is repeated in the input. +Ignored if +.Fl D +is also specified. .It Fl D , Fl -all-repeated Op Ar septype Output all lines that are repeated (like .Fl d , diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c index 55766f7e987e..0bc9b2b86af3 100644 --- a/usr.bin/uniq/uniq.c +++ b/usr.bin/uniq/uniq.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -51,14 +52,9 @@ #include #include -static int Dflag, cflag, dflag, uflag, iflag; -static int numchars, numfields, repeats; - -/* Dflag values */ -#define DF_NONE 0 -#define DF_NOSEP 1 -#define DF_PRESEP 2 -#define DF_POSTSEP 3 +static enum { DF_NONE, DF_NOSEP, DF_PRESEP, DF_POSTSEP } Dflag; +static bool cflag, dflag, uflag, iflag; +static long long numchars, numfields, repeats; static const struct option long_opts[] = { @@ -88,7 +84,7 @@ main (int argc, char *argv[]) int ch, comp; size_t prevbuflen, thisbuflen, b1; char *prevline, *thisline, *p; - const char *ifn, *errstr;; + const char *errstr, *ifn; cap_rights_t rights; (void) setlocale(LC_ALL, ""); @@ -108,13 +104,13 @@ main (int argc, char *argv[]) usage(); break; case 'c': - cflag = 1; + cflag = true; break; case 'd': - dflag = 1; + dflag = true; break; case 'i': - iflag = 1; + iflag = true; break; case 'f': numfields = strtonum(optarg, 0, INT_MAX, &errstr); @@ -127,7 +123,7 @@ main (int argc, char *argv[]) errx(1, "character skip value is %s: %s", errstr, optarg); break; case 'u': - uflag = 1; + uflag = true; break; case '?': default: @@ -140,6 +136,9 @@ main (int argc, char *argv[]) if (argc > 2) usage(); + if (Dflag && dflag) + dflag = false; + ifp = stdin; ifn = "stdin"; ofp = stdout; @@ -180,6 +179,8 @@ main (int argc, char *argv[]) err(1, "%s", ifn); exit(0); } + if (!cflag && !Dflag && !dflag && !uflag) + show(ofp, prevline); tprev = convert(prevline); tthis = NULL; @@ -199,7 +200,11 @@ main (int argc, char *argv[]) /* If different, print; set previous to new value. */ if (Dflag == DF_POSTSEP && repeats > 0) fputc('\n', ofp); - if (!Dflag) + if (!cflag && !Dflag && !dflag && !uflag) + show(ofp, thisline); + else if (!Dflag && + (!dflag || (cflag && repeats > 0)) && + (!uflag || repeats == 0)) show(ofp, prevline); p = prevline; b1 = prevbuflen; @@ -220,13 +225,20 @@ main (int argc, char *argv[]) show(ofp, prevline); } show(ofp, thisline); + } else if (dflag && !cflag) { + if (repeats == 0) + show(ofp, prevline); } ++repeats; } } if (ferror(ifp)) err(1, "%s", ifn); - if (!Dflag) + if (!cflag && !Dflag && !dflag && !uflag) + /* already printed */ ; + else if (!Dflag && + (!dflag || (cflag && repeats > 0)) && + (!uflag || repeats == 0)) show(ofp, prevline); exit(0); } @@ -291,11 +303,8 @@ inlcmp(const char *s1, const char *s2) static void show(FILE *ofp, const char *str) { - - if ((!Dflag && dflag && repeats == 0) || (uflag && repeats > 0)) - return; if (cflag) - (void)fprintf(ofp, "%4d %s", repeats + 1, str); + (void)fprintf(ofp, "%4lld %s", repeats + 1, str); else (void)fprintf(ofp, "%s", str); } @@ -303,7 +312,7 @@ show(FILE *ofp, const char *str) static wchar_t * skip(wchar_t *str) { - int nchars, nfields; + long long nchars, nfields; for (nfields = 0; *str != L'\0' && nfields++ != numfields; ) { while (iswblank(*str)) From nobody Fri Jan 12 15:44:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBQnp1f78z573B2; Fri, 12 Jan 2024 15:44: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 4TBQnp0nSBz4M1J; Fri, 12 Jan 2024 15:44:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KRYU4VA88Fw6q/oqaBi1yRickTUDkUpaH+EKiqld2/E=; b=PLVzpZxCndzOftKYg6CBD0pkvGTI7k9HNSHuGP6DxufebN9HhFgShhfdE/1sDomIGBg8qd mD4EE3RUcFST2yydNXq9RZW+X946Oow5T6r1J7SVmivtroEO/KrxWeFZwoS58pvgrWYeY9 0iERD7165M67YEs/HYzr9g8wGUDG0ZdKVSUaCSmnR5cqi2FcKANZR5V/M9dOPHKDymiIUg nKOq6Bicf0afLhpL1QdwN0zXwiFojxWHIrcnNZcbEcTme9poeTQsV4yInTF0JMiQKq2AZB kfo5k3jtzgyy+egNtERW7ckQIkIzViUamk8Loqnpc+5w3A7SGQvn3XB/ZCLlHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KRYU4VA88Fw6q/oqaBi1yRickTUDkUpaH+EKiqld2/E=; b=k7YaY7lFg+qOLnDwaOpVolPlgbMlwxakUhb732rDjWWcrsp7OGEoa9HRt8hEWCJkhkzkD8 bOjVBNN3GjiPxxYFSNUvEe/jx8yU+SHlgV9bKQ6Mc19qNV38S2ALAlnhg0PCgIJtLKnJ5i KTY+EP8GlBCwzc9EIdVZM75fnyhjG5M4iiKnAHQybqrcHMUUR1GuVnhcjE54QUCsc0UEhJ lSRiD9mIJrcWoz1/CIwQFJWc2ilg3iP+3+uNnU702vGYtmhDKXQ1GKoH9NKMwJ6Vtx6kaN xlw5wsErczkZct4OZw3+oRhMCTgX8QLeyx+7q3PqIui4G/NPTwfBHJ8iWBDq3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705074270; a=rsa-sha256; cv=none; b=fjVDFbEc563YFidMud1HBM5Av7c/dFpxtSZ/ltHC2MUOMiRiirk1yY67ST91r0lXHtSZLZ y/7PmsYF6trtGW7Q1j7dxFKECZMdylO38ADCzm6OheHOGc0JPP/+iZaB8zTjN9Xbuomhad GHqlgHs/JPcH6+QuArGBfBusmtS4UF57+ehJnfFvDduUEjz5Y2JUq5blGdeoOqeHmFV2Uz MRwqxGUToPO/L0eJeyB9lgVPTwi0pipWPLe5h9/cirEkAfk70HL3YWdcCGH/vToXB6QCzG CqaehHMBfRxUrYew5Blv8FBT7ARYB6dqvImMv1kKOrjXHpnyAvDSy6NHix+aUw== 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 4TBQnn70fQz16wM; Fri, 12 Jan 2024 15:44: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 40CFiTNb076687; Fri, 12 Jan 2024 15:44:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CFiT5q076684; Fri, 12 Jan 2024 15:44:29 GMT (envelope-from git) Date: Fri, 12 Jan 2024 15:44:29 GMT Message-Id: <202401121544.40CFiT5q076684@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: e2ec8ee02a33 - main - uniq: Clean up and test obsolete options. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: e2ec8ee02a33e39b8ff86a56e8a1ef5e84ac7e62 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e2ec8ee02a33e39b8ff86a56e8a1ef5e84ac7e62 commit e2ec8ee02a33e39b8ff86a56e8a1ef5e84ac7e62 Author: Dag-Erling Smørgrav AuthorDate: 2024-01-12 15:40:40 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-01-12 15:44:00 +0000 uniq: Clean up and test obsolete options. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D43402 --- usr.bin/uniq/tests/uniq_test.sh | 3 +++ usr.bin/uniq/uniq.c | 14 +++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/usr.bin/uniq/tests/uniq_test.sh b/usr.bin/uniq/tests/uniq_test.sh index 8dc2015734f6..537962eb6513 100755 --- a/usr.bin/uniq/tests/uniq_test.sh +++ b/usr.bin/uniq/tests/uniq_test.sh @@ -74,6 +74,7 @@ skip_fields_head() { skip_fields_body() { printf "1 a\n2 a\n3 b\n4 b\n5 a\n6 a\n" >input printf "1 a\n3 b\n5 a\n" >expected + atf_check_uniq -1 atf_check_uniq -f 1 atf_check_uniq --skip-fields 1 } @@ -85,6 +86,7 @@ skip_fields_tab_head() { skip_fields_tab_body() { printf "1\ta\n2\ta\n3\tb\n4\tb\n5\ta\n6\ta\n" >input printf "1\ta\n3\tb\n5\ta\n" >expected + atf_check_uniq -1 atf_check_uniq -f 1 atf_check_uniq --skip-fields 1 } @@ -107,6 +109,7 @@ skip_chars_head() { skip_chars_body() { printf "1 a\n2 a\n3 b\n4 b\n5 a\n6 a\n" >input printf "1 a\n3 b\n5 a\n" >expected + atf_check_uniq +2 atf_check_uniq -s 2 atf_check_uniq --skip-chars 2 } diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c index 0bc9b2b86af3..ef59d7339d0c 100644 --- a/usr.bin/uniq/uniq.c +++ b/usr.bin/uniq/uniq.c @@ -338,29 +338,25 @@ file(const char *name, const char *mode) static void obsolete(char *argv[]) { - int len; - char *ap, *p, *start; + char *ap, *p; while ((ap = *++argv)) { /* Return if "--" or not an option of any form. */ if (ap[0] != '-') { if (ap[0] != '+') return; - } else if (ap[1] == '-') + } else if (ap[1] == '-') { return; + } if (!isdigit((unsigned char)ap[1])) continue; /* * Digit signifies an old-style option. Malloc space for dash, * new option and argument. */ - len = strlen(ap); - if ((start = p = malloc(len + 3)) == NULL) + if (asprintf(&p, "-%c%s", ap[0] == '+' ? 's' : 'f', ap + 1) < 0) err(1, "malloc"); - *p++ = '-'; - *p++ = ap[0] == '+' ? 's' : 'f'; - (void)strcpy(p, ap + 1); - *argv = start; + *argv = p; } } From nobody Fri Jan 12 15:44:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBQnq2z9Nz573Gs; Fri, 12 Jan 2024 15:44: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 4TBQnq1pQmz4MM8; Fri, 12 Jan 2024 15:44:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=az9VyCNaBOVoRjfU7rX7y3UT9QIHsKXaVjXc5LoUG00=; b=IEQVfi1EOK6+60K/AUEYL9B9ANzDY40mF/PQ1N93PkfkbLCthU0S5YABiaI7XbW1kEqXMq 2dK9D17dckDMpZb/uYJJm+Mt/d9EK9z2qydpE7hIVvL+3g2KEcvCdgHFCzk858U1gZFb80 f/WvJNMn8VbDYdZHFVF31wtJc/qkDce7FOIXpzFbhvDkm3jSe1TbJo98BhPty7Sy1riScs nIENpbR2/mD2HfkaUZmwBvFGL/ycLbFAl8sewY591fTQuXfbGqkx7SsT6SNpsDGWIfWAuu oKdx8R9QQEMiZHkhZBs0QMF2vDezDKXLDbl8z3uEk9wzMKCt3Eb45PFNfQxFxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=az9VyCNaBOVoRjfU7rX7y3UT9QIHsKXaVjXc5LoUG00=; b=WHzvNiuTjay7iuR0NBYVp6NfRitcCjvJrksm1vl2yZOJnokgczMSvnREy1jRzmpYhCtaIk O/LKUE1J6ksUdGmS2l1LEiXjBBG9JSNnKr+QE+wlq2LfccSf1TD9smuuzvZWNruaKQWhHu hLmVqG7D1MnsyJBx4keZJogi3U1aEYAKHEOOBD7kX4QHTSABTByMvvNgi+XV3G3XQBPFjf AKzwLH/hLBBllbULwLkcGsSiaAREgwWF6EXqvR8KAg0YeOFvA3uUs1vDABYxPKXjbD5dhX YiSozjzMztb9J8GR2AEQwE5OQUPG/3Y2kHY2ZEe1uhe1q2mYFNU7olfukW5RuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705074271; a=rsa-sha256; cv=none; b=dMQuLDVEAE1irHtCKllPa1yEPjT+WSlTvUlv0a+2XtlQVo3vIU5QEGf/a9LDE2ATVV90kd CPeSQ4YnkPvNxmkj5taWTmm5h4gzHbbuYTNCtKakngOsDS+Z19z2CiLKJHQFsFc56AWN8i sbrzXx3ZioEXGWB0x+Jam6TOhOvUmHYrQ+Fd+9nT0BgqyRxqcHoND5ys3jQIw4RPvjhWr7 hlzlW2/MPmKi+W7f2hJLjT83uNQrfGQtXHLNNCH0uL19VaAN7ZyggZ5BdVBfq0KNW9IHRj TsMYYiEIdZbmqeLpQWF8NG6R6+TvKBL8d7MjtpYfype+MlpCoQTPJ4Bcs8IHIw== 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 4TBQnq0vqqz170p; Fri, 12 Jan 2024 15:44: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 40CFiVCL076747; Fri, 12 Jan 2024 15:44:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CFiVAQ076744; Fri, 12 Jan 2024 15:44:31 GMT (envelope-from git) Date: Fri, 12 Jan 2024 15:44:31 GMT Message-Id: <202401121544.40CFiVAQ076744@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: 899837e8f574 - main - uniq: Error out if writing to the output failed. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 899837e8f5741f9a847b63d9e7c8b76ccc033ab5 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=899837e8f5741f9a847b63d9e7c8b76ccc033ab5 commit 899837e8f5741f9a847b63d9e7c8b76ccc033ab5 Author: Dag-Erling Smørgrav AuthorDate: 2024-01-12 15:40:48 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-01-12 15:44:06 +0000 uniq: Error out if writing to the output failed. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D43407 --- usr.bin/uniq/tests/uniq_test.sh | 15 +++++++++++++++ usr.bin/uniq/uniq.c | 7 +++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/usr.bin/uniq/tests/uniq_test.sh b/usr.bin/uniq/tests/uniq_test.sh index 537962eb6513..804e82ce7766 100755 --- a/usr.bin/uniq/tests/uniq_test.sh +++ b/usr.bin/uniq/tests/uniq_test.sh @@ -160,6 +160,20 @@ interactive_repeated_body() { atf_check -o inline:"y\n" cat actual } +atf_test_case stdout +stdout_head() { + atf_set descr "error writing to stdout" +} +stdout_body() { + ( + trap "" PIPE + echo a | uniq 2>stderr + echo $? >result + ) | true + atf_check -o inline:"1\n" cat result + atf_check -o match:"stdout" cat stderr +} + atf_init_test_cases() { atf_add_test_case basic @@ -175,4 +189,5 @@ atf_init_test_cases() atf_add_test_case count_unique atf_add_test_case interactive atf_add_test_case interactive_repeated + atf_add_test_case stdout } diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c index ef59d7339d0c..9978c4996dc7 100644 --- a/usr.bin/uniq/uniq.c +++ b/usr.bin/uniq/uniq.c @@ -84,7 +84,7 @@ main (int argc, char *argv[]) int ch, comp; size_t prevbuflen, thisbuflen, b1; char *prevline, *thisline, *p; - const char *errstr, *ifn; + const char *errstr, *ifn, *ofn; cap_rights_t rights; (void) setlocale(LC_ALL, ""); @@ -142,6 +142,7 @@ main (int argc, char *argv[]) ifp = stdin; ifn = "stdin"; ofp = stdout; + ofn = "stdout"; if (argc > 0 && strcmp(argv[0], "-") != 0) ifp = file(ifn = argv[0], "r"); cap_rights_init(&rights, CAP_FSTAT, CAP_READ); @@ -149,7 +150,7 @@ main (int argc, char *argv[]) err(1, "unable to limit rights for %s", ifn); cap_rights_init(&rights, CAP_FSTAT, CAP_WRITE); if (argc > 1) - ofp = file(argv[1], "w"); + ofp = file(ofn = argv[1], "w"); else cap_rights_set(&rights, CAP_IOCTL); if (caph_rights_limit(fileno(ofp), &rights) < 0) { @@ -240,6 +241,8 @@ main (int argc, char *argv[]) (!dflag || (cflag && repeats > 0)) && (!uflag || repeats == 0)) show(ofp, prevline); + if (fflush(ofp) != 0) + err(1, "%s", ofn); exit(0); } From nobody Fri Jan 12 15:50:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBQxH14Vhz573hr; Fri, 12 Jan 2024 15:50: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 4TBQxH0X18z4Nwh; Fri, 12 Jan 2024 15:50:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PqkvuVtsclB5AF0hUzS9d6Y8bDHMzn3dVv59vE0rEoE=; b=Pxlz2KOlR13XiCjzEF0Hgb9mSlI8pScyxqv1xBKDFYmiKBu+fNxaMBvaH14172khjRZPVT ceWqld2T0oHvU65ZcOkNEHzHKi1nO/YkX2fDYhxxyj5qlXKA3WAjFXYnwsTcxlmgVv3cUT FuoJshU2seD07OlG2FfjYfTDhby7v9DewgBLTC0Is+/kMH7nkd23tRe86PXHVbWczOMpk2 yzxY7Vw+VvrJCRmpwqOFW+NSfs7Qt+9RXCI458RS4JTOKcFgOPAlaEQSQJ7ES1jdIk7sd9 1WM6EjnIJh6K5QEtEoUwN+c4hhOamQVllryu+hk9mEkh/Xn0MG9NnT44ziBxYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PqkvuVtsclB5AF0hUzS9d6Y8bDHMzn3dVv59vE0rEoE=; b=H9ZrIFwCMC0ybTl5SN5U1ON+ka4tlWN8OXRWo7Xvt2q7jW4PxQYtvFcD8iOZx32E6/NeWO TB3TzqEY1ZY8w+W+9/qY5tQKHFg0FMFXsip6unKVnek+gG5HmgWSkeQU2igWsGWuIAZqef beT9UVqDihK9xTr38nTb+w/gqx262yvTDSfGlgdsUyAQU4+82MywWHI6x8nryHqQvAPlRS sgYa+vNTDlOKjqtpPcIr8sBxPl8Bc4J3IduUZMyXA5rDOqLMuPO+ZpugjKZ+4Sc3QjP7nO 4f4YqRBr0EaFEeLbYMFW3CjGiSYGjWFPm9AbgT7P2jMBVIrbbD9apKFep4AIkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705074659; a=rsa-sha256; cv=none; b=QNcH7EVCL7LJRO12qnVRkE6JPeFvscMqRdVGXqdKmnkqzhLpmBlrZeo07I1ZYGscrkyl1D 06YacE0urFfydhhCAtMiZZqa6GiMDKd6Gl7FRswfa0vxpiGUDUbDtcZZ+J799Pln8NrY1N jQtAIUfzdd95hSGxU3rjHnp/1KIsrIFqPnzmyeAF5K6b6GVRdnsh4wqFA7fOF8L+ENynRA GWibCErI37lj1dsnUXhb/xJjrc3Yi6wEHCVs4YebQe5se9psPD+SURA1lvDZAO3lY2/Yf3 BUwDRMIWYAJWlNUPPgXhmy7HG0VkaUMxkG1vE6g8b583XNJX9j0kt/NXW/e2xA== 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 4TBQxG6hPzz16wp; Fri, 12 Jan 2024 15:50: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 40CFowjI086312; Fri, 12 Jan 2024 15:50:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CFow5t086309; Fri, 12 Jan 2024 15:50:58 GMT (envelope-from git) Date: Fri, 12 Jan 2024 15:50:58 GMT Message-Id: <202401121550.40CFow5t086309@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 3f57a09489e5 - stable/14 - tcpsso: support TIME_WAIT state List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3f57a09489e523fdaea4c927cf725b65112af56c Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=3f57a09489e523fdaea4c927cf725b65112af56c commit 3f57a09489e523fdaea4c927cf725b65112af56c Author: Michael Tuexen AuthorDate: 2024-01-06 20:31:46 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 15:38:23 +0000 tcpsso: support TIME_WAIT state TCP endpoints in TIME_WAIT are not handled in a special way anymore. Therefore, they can be handled now by tcpsso. Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D43351 (cherry picked from commit e179d9739b1438ae9acb958f80a983eff7e3dce9) --- usr.sbin/tcpsso/tcpsso.8 | 12 ++++++------ usr.sbin/tcpsso/tcpsso.c | 5 ----- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/usr.sbin/tcpsso/tcpsso.8 b/usr.sbin/tcpsso/tcpsso.8 index 36707d6657d4..c06cd8adb25f 100644 --- a/usr.sbin/tcpsso/tcpsso.8 +++ b/usr.sbin/tcpsso/tcpsso.8 @@ -74,12 +74,10 @@ and value on a TCP endpoint from the command line. .Pp TCP endpoints in the -.Dv TIME_WAIT -state can not be handled by -.Nm . -TCP endpoints in the .Dv SYN_RCVD -state can only be handled if their prior state was +state can only be handled by +.Nm +if their prior state was .Dv SYN_SENT . .Pp .Op Ar level @@ -176,7 +174,9 @@ is one of .Dv FIN_WAIT_1 , .Dv CLOSING , .Dv LAST_ACK , -.Dv FIN_WAIT_2 . +.Dv FIN_WAIT_2, +or +.Dv TIME_WAIT . Using .Dv SYN_RCVD only applies to TCP endpoints in the state diff --git a/usr.sbin/tcpsso/tcpsso.c b/usr.sbin/tcpsso/tcpsso.c index b79ae9767fe2..7e7e25246d80 100644 --- a/usr.sbin/tcpsso/tcpsso.c +++ b/usr.sbin/tcpsso/tcpsso.c @@ -115,10 +115,6 @@ tcpssoall(const char *ca_name, const char *stack, int state, continue; - /* Skip endpoints in TIME WAIT. */ - if (xtp->t_state == TCPS_TIME_WAIT) - continue; - /* If requested, skip sockets not having the requested state. */ if ((state != -1) && (xtp->t_state != state)) continue; @@ -453,7 +449,6 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; if ((state == TCP_NSTATES) || - (state == TCPS_TIME_WAIT) || (argc < 2) || (argc > 3) || (apply_all && apply_subset) || (apply_all && apply_specific) || From nobody Fri Jan 12 15:55:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBR2V3c5lz574Mg; Fri, 12 Jan 2024 15:55: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 4TBR2V2g2hz4Pd1; Fri, 12 Jan 2024 15:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bk9Rfyt4wZZ5u3wku8BR5p2gyFvP4iBtdl6Ihdln4MA=; b=WcP2Mlt25dz1e/piihwCj9MTFiqgWd19wXGcNpJWJk6ARQhGAWw/8OaUkls/hXNJcWkBoQ FirnG03loxnKHfqAsITJfxuWq1mKipi3HcCu9NwD3eRgnjHRPiY93rq30wcWPBueoTDM8I ddwsFcEIvaJrhPv0WAKKq/dcaUMP+4+YEQdZRFIuuGKcrhJpux9EJtD2adzwOrZICbBOX2 5K6Hb0D2r01AGpls/+Fm6FLlYkNVsEAyF59mPf/barlEQnLs9125H4iUfxv3WwrdnNPQ78 5FeP54f4Jg7w4P4d2HZRRxJVqWY5wPiYwrwpihV4rPT7uJZwUsZQD3oRbrzhYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705074930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bk9Rfyt4wZZ5u3wku8BR5p2gyFvP4iBtdl6Ihdln4MA=; b=cFkIVxqm4UuoUec3osFQrQgT88mXR9UJweNqHOfULUAFe1Wp4F0vJ1zFt51I+fAsSwMeiz FrATBxkWePRdgxrxVuaOaqfn/1psnbBD3xeQqGU6FVapXgi+HS+UY8hM2nta9pRtCP6/XN D56YR+5MlXdhwqw1FyLSnGwmwXiQb1L43FjqRyPx5eDI+fGRVy+LkFHizjp2T4S43dx+Ky NT3pZ60e4DTGDuRDWjzldn6PdNWcGSGia9YH40Ba5qR0fYsexU/hmZbsL42o/YxBwRubw0 cxKaB8mA5moq4QuFyVDGu0mlVr6Ih5cMlH9qSoBdN5CdkjGD3xwyg9E5jQPkbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705074930; a=rsa-sha256; cv=none; b=jiu4XiKUl+DI0IA+9xYvrp1KmpSi3a/WoiwvXSWBAsT0M7iYlK0X1BMyeUe+RuCjBeLh9K OXJ23NFeZbMEOM1TxOe/3mcGzmyM+fouzUGtLAoDIEYTi4aq19kgI5vKMKJe7sqS8rmC0D Fl5tj44tHSV8vq15Tm1Sm/sKDApawq98ascNPOpuTVTwdLVnEptgD9UjnOiIsY5AnflQAr lSPiIH0ihd6ZwbE6iqZwuraLaeFZdRmInOLPw+OZvs8vTr+Iua+Nv8jDVjdLkdGIbhPNM6 fXOefmAepc4zAjVsv83Q8Z0Ltul4AqOiVnIR4nYR3E4NLNfePXnrXuh089ejjg== 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 4TBR2V1jN3z17Zd; Fri, 12 Jan 2024 15:55: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 40CFtUqi093454; Fri, 12 Jan 2024 15:55:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CFtU03093450; Fri, 12 Jan 2024 15:55:30 GMT (envelope-from git) Date: Fri, 12 Jan 2024 15:55:30 GMT Message-Id: <202401121555.40CFtU03093450@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 6b019c30ace1 - stable/14 - tcpsso: fix when used without -i option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6b019c30ace18b49822ca0869227e677c4ca8081 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=6b019c30ace18b49822ca0869227e677c4ca8081 commit 6b019c30ace18b49822ca0869227e677c4ca8081 Author: Michael Tuexen AuthorDate: 2024-01-10 07:33:09 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 15:41:49 +0000 tcpsso: fix when used without -i option Since fdb987bebddf it is not possible anymore to use inp_next iterator for bound, but unconnected sockets. This applies to TCP listening sockets. Therefore the metioned commit broke tcpsso on listening sockets if the -i option was not used. Fix this by iterating through all endpoints instead of only through the bound, but unconnected ones. Reviewed by: markj Fixes: fdb987bebddf ("inpcb: Split PCB hash tables") Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D43353 (cherry picked from commit 13720136fbf951a7b472ce086c9cf2de702799ab) --- sys/netinet/in_pcb.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index b00d61eaecf7..95e162e60f53 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2991,25 +2991,22 @@ sysctl_setsockopt(SYSCTL_HANDLER_ARGS, struct inpcbinfo *pcbinfo, htons(params->sop_inc.inc6_zoneid & 0xffff); } #endif - if (params->sop_inc.inc_lport != htons(0)) { - if (params->sop_inc.inc_fport == htons(0)) - inpi.hash = INP_PCBHASH_WILD(params->sop_inc.inc_lport, + if (params->sop_inc.inc_lport != htons(0) && + params->sop_inc.inc_fport != htons(0)) { +#ifdef INET6 + if (params->sop_inc.inc_flags & INC_ISIPV6) + inpi.hash = INP6_PCBHASH( + ¶ms->sop_inc.inc6_faddr, + params->sop_inc.inc_lport, + params->sop_inc.inc_fport, pcbinfo->ipi_hashmask); else -#ifdef INET6 - if (params->sop_inc.inc_flags & INC_ISIPV6) - inpi.hash = INP6_PCBHASH( - ¶ms->sop_inc.inc6_faddr, - params->sop_inc.inc_lport, - params->sop_inc.inc_fport, - pcbinfo->ipi_hashmask); - else #endif - inpi.hash = INP_PCBHASH( - ¶ms->sop_inc.inc_faddr, - params->sop_inc.inc_lport, - params->sop_inc.inc_fport, - pcbinfo->ipi_hashmask); + inpi.hash = INP_PCBHASH( + ¶ms->sop_inc.inc_faddr, + params->sop_inc.inc_lport, + params->sop_inc.inc_fport, + pcbinfo->ipi_hashmask); } while ((inp = inp_next(&inpi)) != NULL) if (inp->inp_gencnt == params->sop_id) { From nobody Fri Jan 12 16:34:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBRv96W39z577JH; Fri, 12 Jan 2024 16:34: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 4TBRv95yqQz4V6n; Fri, 12 Jan 2024 16:34:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705077253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SFuEqcR42gvymwsh888EIRRYNIZFYdPzQTxpOfyUuRo=; b=GqchR3HdP+aX6B17bUxYpUI+/ffZxd7kgffyYcT5DkmKGNttt41y0SGjvrvoOxMSN6NSdV vqcwtSSEYxmdRwX28STX9zRM6g6NinB6YoISpAL+yI248Op8FiueeC9OvLe5N1xebSjQ6k pycHi0AGwbH5SHkIxKoC2jTnARD2nzqewRcO7tZOTnCJHd4FtPOmrwIZS2VGMua1DsUJb6 Jd/Di9zRPsp30MfOY59yWgnpGcMyG1fAIqFP2aq+lu4NhgsfTmnesvDZj2C6ZxQhAiqBTE kln3jpqHRyzyuFTOXaJKAv7KlW1/pHlS0Lrz0/nT7okq1//hsliUYOEddljUiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705077253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SFuEqcR42gvymwsh888EIRRYNIZFYdPzQTxpOfyUuRo=; b=WixoKzqbcI7CJ35TdjA+Mf0eaK95Mle5FQ32Xv/1p6yJhfkjLH6PYWuEMzH87TcmDf6/bT F5Cb3Wp1+pxLju+xUpLtHcjirELndGX2ARGMaVTdjuJOkX+yD4nHvXWKCGsQIe+iXGXZeN RFgXF/jdS9kCATHOf1adOCF7396ZC3aeQjAzRgjoBAISC2VepjJrRgKL9N43WOVa7H5Z75 PADOZqtxxensZS6PFbaBIIG+bMipm4kSONqiQd2oZpOtTG0Dk9aX6JnRCtK8JbDNB3wo8I yAUrd05dGOFBxL8PCyWlo/7GB4r1mJPYrsovdNDP+732Ip2epE8O+ZZmAOrlmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705077253; a=rsa-sha256; cv=none; b=GwveRVLIKUTgo2LYB6ZbhD4Qv+UWbMG5tP9il9It1Qr3oO7wi1zwiTpVICnOF2AMUFGFZZ ahLa/az30U6NE8vVjsUsPA/nq/9rIkc7B6QRTDEWZXhXSlX9C4rscqO791QiW267Hntb52 1/OvBb/E8PiPhn+0o74VYR8M1Wj/qEndpk2TzosLGp5AeudT074Qh5FeOfKo1I9pJj0xID g1nTWLNA3xJM1k4Kk5vURWMJ5maiFBj9Otw6y3EJHj4j5eAnBP/D3jvf2J1y+6acpKblg9 vLMJHlpqbW1ahuBEo3TsoYWU3jgKPeUU45cjtHbfLuMNmyQBWUiwG/PlH9Z/mw== 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 4TBRv9510zz189h; Fri, 12 Jan 2024 16:34: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 40CGYDSi061129; Fri, 12 Jan 2024 16:34:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CGYDKc061126; Fri, 12 Jan 2024 16:34:13 GMT (envelope-from git) Date: Fri, 12 Jan 2024 16:34:13 GMT Message-Id: <202401121634.40CGYDKc061126@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 54190b5e8d42 - stable/14 - sctp: minor clean List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 54190b5e8d42a95ba8266d0ab5ea095ad51741c4 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=54190b5e8d42a95ba8266d0ab5ea095ad51741c4 commit 54190b5e8d42a95ba8266d0ab5ea095ad51741c4 Author: Michael Tuexen AuthorDate: 2023-11-06 10:04:15 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 16:31:47 +0000 sctp: minor clean No functional change intended. (cherry picked from commit 3bbbfc8dcd3622b49907e359c8e9682def0bae25) --- sys/netinet/sctp_sysctl.c | 147 +++++++++++++++++++++++----------------------- 1 file changed, 74 insertions(+), 73 deletions(-) diff --git a/sys/netinet/sctp_sysctl.c b/sys/netinet/sctp_sysctl.c index 2c2cc58ee086..a4be3471e2fd 100644 --- a/sys/netinet/sctp_sysctl.c +++ b/sys/netinet/sctp_sysctl.c @@ -868,11 +868,11 @@ sctp_sysctl_handle_trace_log_clear(SYSCTL_HANDLER_ARGS) #define SCTP_UINT_SYSCTL(mib_name, var_name, prefix) \ SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, \ - CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW); + 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); + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RWTUN|CTLFLAG_NOFETCH) #define SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, flags) \ static int \ @@ -893,75 +893,76 @@ sctp_sysctl_handle_trace_log_clear(SYSCTL_HANDLER_ARGS) } \ return (error); \ } \ - SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mib_name, flags, \ - 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); + &VNET_NAME(system_base_info.sctpsysctl.var_name), 0, \ + prefix##_DESC) /* * sysctl definitions */ -SCTP_UINT_SYSCTL(sendspace, sctp_sendspace, SCTPCTL_MAXDGRAM) -SCTP_UINT_SYSCTL(recvspace, sctp_recvspace, SCTPCTL_RECVSPACE) -SCTP_UINT_SYSCTL(auto_asconf, sctp_auto_asconf, SCTPCTL_AUTOASCONF) -SCTP_UINT_SYSCTL(ecn_enable, sctp_ecn_enable, SCTPCTL_ECN_ENABLE) -SCTP_UINT_SYSCTL(pr_enable, sctp_pr_enable, SCTPCTL_PR_ENABLE) +SCTP_UINT_SYSCTL(sendspace, sctp_sendspace, SCTPCTL_MAXDGRAM); +SCTP_UINT_SYSCTL(recvspace, sctp_recvspace, SCTPCTL_RECVSPACE); +SCTP_UINT_SYSCTL(auto_asconf, sctp_auto_asconf, SCTPCTL_AUTOASCONF); +SCTP_UINT_SYSCTL(ecn_enable, sctp_ecn_enable, SCTPCTL_ECN_ENABLE); +SCTP_UINT_SYSCTL(pr_enable, sctp_pr_enable, SCTPCTL_PR_ENABLE); SYSCTL_PROC(_net_inet_sctp, OID_AUTO, auth_enable, CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW, NULL, 0, sctp_sysctl_handle_auth, "IU", SCTPCTL_AUTH_ENABLE_DESC); SYSCTL_PROC(_net_inet_sctp, OID_AUTO, asconf_enable, CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW, NULL, 0, sctp_sysctl_handle_asconf, "IU", SCTPCTL_ASCONF_ENABLE_DESC); -SCTP_UINT_SYSCTL(reconfig_enable, sctp_reconfig_enable, SCTPCTL_RECONFIG_ENABLE) -SCTP_UINT_SYSCTL(nrsack_enable, sctp_nrsack_enable, SCTPCTL_NRSACK_ENABLE) -SCTP_UINT_SYSCTL(pktdrop_enable, sctp_pktdrop_enable, SCTPCTL_PKTDROP_ENABLE) -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_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_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) -SCTP_UINT_SYSCTL(asoc_resource, sctp_asoc_free_resc_limit, SCTPCTL_ASOC_RESOURCE) -SCTP_UINT_SYSCTL(heartbeat_interval, sctp_heartbeat_interval_default, SCTPCTL_HEARTBEAT_INTERVAL) -SCTP_UINT_SYSCTL(pmtu_raise_time, sctp_pmtu_raise_time_default, SCTPCTL_PMTU_RAISE_TIME) -SCTP_UINT_SYSCTL(shutdown_guard_time, sctp_shutdown_guard_time_default, SCTPCTL_SHUTDOWN_GUARD_TIME) -SCTP_UINT_SYSCTL(secret_lifetime, sctp_secret_lifetime_default, SCTPCTL_SECRET_LIFETIME) -SCTP_UINT_SYSCTL(rto_max, sctp_rto_max_default, SCTPCTL_RTO_MAX) -SCTP_UINT_SYSCTL(rto_min, sctp_rto_min_default, SCTPCTL_RTO_MIN) -SCTP_UINT_SYSCTL(rto_initial, sctp_rto_initial_default, SCTPCTL_RTO_INITIAL) -SCTP_UINT_SYSCTL(init_rto_max, sctp_init_rto_max_default, SCTPCTL_INIT_RTO_MAX) -SCTP_UINT_SYSCTL(valid_cookie_life, sctp_valid_cookie_life_default, SCTPCTL_VALID_COOKIE_LIFE) -SCTP_UINT_SYSCTL(init_rtx_max, sctp_init_rtx_max_default, SCTPCTL_INIT_RTX_MAX) -SCTP_UINT_SYSCTL(assoc_rtx_max, sctp_assoc_rtx_max_default, SCTPCTL_ASSOC_RTX_MAX) -SCTP_UINT_SYSCTL(path_rtx_max, sctp_path_rtx_max_default, SCTPCTL_PATH_RTX_MAX) -SCTP_UINT_SYSCTL(path_pf_threshold, sctp_path_pf_threshold, SCTPCTL_PATH_PF_THRESHOLD) -SCTP_UINT_SYSCTL(add_more_on_output, sctp_add_more_threshold, SCTPCTL_ADD_MORE_ON_OUTPUT) -SCTP_UINT_SYSCTL(incoming_streams, sctp_nr_incoming_streams_default, SCTPCTL_INCOMING_STREAMS) -SCTP_UINT_SYSCTL(outgoing_streams, sctp_nr_outgoing_streams_default, SCTPCTL_OUTGOING_STREAMS) -SCTP_UINT_SYSCTL(cmt_on_off, sctp_cmt_on_off, SCTPCTL_CMT_ON_OFF) -SCTP_UINT_SYSCTL(cmt_use_dac, sctp_cmt_use_dac, SCTPCTL_CMT_USE_DAC) -SCTP_UINT_SYSCTL(cwnd_maxburst, sctp_use_cwnd_based_maxburst, SCTPCTL_CWND_MAXBURST) -SCTP_UINT_SYSCTL(nat_friendly, sctp_nat_friendly, SCTPCTL_NAT_FRIENDLY) -SCTP_UINT_SYSCTL(abc_l_var, sctp_L2_abc_variable, SCTPCTL_ABC_L_VAR) -SCTP_UINT_SYSCTL(max_chained_mbufs, sctp_mbuf_threshold_count, SCTPCTL_MAX_CHAINED_MBUFS) -SCTP_UINT_SYSCTL(do_sctp_drain, sctp_do_drain, SCTPCTL_DO_SCTP_DRAIN) -SCTP_UINT_SYSCTL(hb_max_burst, sctp_hb_maxburst, SCTPCTL_HB_MAX_BURST) -SCTP_UINT_SYSCTL(abort_at_limit, sctp_abort_if_one_2_one_hits_limit, SCTPCTL_ABORT_AT_LIMIT) -SCTP_UINT_SYSCTL(min_residual, sctp_min_residual, SCTPCTL_MIN_RESIDUAL) -SCTP_UINT_SYSCTL(max_retran_chunk, sctp_max_retran_chunk, SCTPCTL_MAX_RETRAN_CHUNK) -SCTP_UINT_SYSCTL(log_level, sctp_logging_level, SCTPCTL_LOGGING_LEVEL) -SCTP_UINT_SYSCTL(default_cc_module, sctp_default_cc_module, SCTPCTL_DEFAULT_CC_MODULE) -SCTP_UINT_SYSCTL(default_ss_module, sctp_default_ss_module, SCTPCTL_DEFAULT_SS_MODULE) -SCTP_UINT_SYSCTL(default_frag_interleave, sctp_default_frag_interleave, SCTPCTL_DEFAULT_FRAG_INTERLEAVE) -SCTP_UINT_SYSCTL(mobility_base, sctp_mobility_base, SCTPCTL_MOBILITY_BASE) -SCTP_UINT_SYSCTL(mobility_fasthandoff, sctp_mobility_fasthandoff, SCTPCTL_MOBILITY_FASTHANDOFF) +SCTP_UINT_SYSCTL(reconfig_enable, sctp_reconfig_enable, SCTPCTL_RECONFIG_ENABLE); +SCTP_UINT_SYSCTL(nrsack_enable, sctp_nrsack_enable, SCTPCTL_NRSACK_ENABLE); +SCTP_UINT_SYSCTL(pktdrop_enable, sctp_pktdrop_enable, SCTPCTL_PKTDROP_ENABLE); +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_RDTUN(tcbhashsize, sctp_hashtblsize, SCTPCTL_TCBHASHSIZE); +SCTP_UINT_SYSCTL_TUN(pcbhashsize, sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE); +SCTP_UINT_SYSCTL_RDTUN(chunkscale, sctp_chunkscale, SCTPCTL_CHUNKSCALE); +SCTP_UINT_SYSCTL(min_split_point, sctp_min_split_point, SCTPCTL_MIN_SPLIT_POINT); +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); +SCTP_UINT_SYSCTL(asoc_resource, sctp_asoc_free_resc_limit, SCTPCTL_ASOC_RESOURCE); +SCTP_UINT_SYSCTL(heartbeat_interval, sctp_heartbeat_interval_default, SCTPCTL_HEARTBEAT_INTERVAL); +SCTP_UINT_SYSCTL(pmtu_raise_time, sctp_pmtu_raise_time_default, SCTPCTL_PMTU_RAISE_TIME); +SCTP_UINT_SYSCTL(shutdown_guard_time, sctp_shutdown_guard_time_default, SCTPCTL_SHUTDOWN_GUARD_TIME); +SCTP_UINT_SYSCTL(secret_lifetime, sctp_secret_lifetime_default, SCTPCTL_SECRET_LIFETIME); +SCTP_UINT_SYSCTL(rto_max, sctp_rto_max_default, SCTPCTL_RTO_MAX); +SCTP_UINT_SYSCTL(rto_min, sctp_rto_min_default, SCTPCTL_RTO_MIN); +SCTP_UINT_SYSCTL(rto_initial, sctp_rto_initial_default, SCTPCTL_RTO_INITIAL); +SCTP_UINT_SYSCTL(init_rto_max, sctp_init_rto_max_default, SCTPCTL_INIT_RTO_MAX); +SCTP_UINT_SYSCTL(valid_cookie_life, sctp_valid_cookie_life_default, SCTPCTL_VALID_COOKIE_LIFE); +SCTP_UINT_SYSCTL(init_rtx_max, sctp_init_rtx_max_default, SCTPCTL_INIT_RTX_MAX); +SCTP_UINT_SYSCTL(assoc_rtx_max, sctp_assoc_rtx_max_default, SCTPCTL_ASSOC_RTX_MAX); +SCTP_UINT_SYSCTL(path_rtx_max, sctp_path_rtx_max_default, SCTPCTL_PATH_RTX_MAX); +SCTP_UINT_SYSCTL(path_pf_threshold, sctp_path_pf_threshold, SCTPCTL_PATH_PF_THRESHOLD); +SCTP_UINT_SYSCTL(add_more_on_output, sctp_add_more_threshold, SCTPCTL_ADD_MORE_ON_OUTPUT); +SCTP_UINT_SYSCTL(incoming_streams, sctp_nr_incoming_streams_default, SCTPCTL_INCOMING_STREAMS); +SCTP_UINT_SYSCTL(outgoing_streams, sctp_nr_outgoing_streams_default, SCTPCTL_OUTGOING_STREAMS); +SCTP_UINT_SYSCTL(cmt_on_off, sctp_cmt_on_off, SCTPCTL_CMT_ON_OFF); +SCTP_UINT_SYSCTL(cmt_use_dac, sctp_cmt_use_dac, SCTPCTL_CMT_USE_DAC); +SCTP_UINT_SYSCTL(cwnd_maxburst, sctp_use_cwnd_based_maxburst, SCTPCTL_CWND_MAXBURST); +SCTP_UINT_SYSCTL(nat_friendly, sctp_nat_friendly, SCTPCTL_NAT_FRIENDLY); +SCTP_UINT_SYSCTL(abc_l_var, sctp_L2_abc_variable, SCTPCTL_ABC_L_VAR); +SCTP_UINT_SYSCTL(max_chained_mbufs, sctp_mbuf_threshold_count, SCTPCTL_MAX_CHAINED_MBUFS); +SCTP_UINT_SYSCTL(do_sctp_drain, sctp_do_drain, SCTPCTL_DO_SCTP_DRAIN); +SCTP_UINT_SYSCTL(hb_max_burst, sctp_hb_maxburst, SCTPCTL_HB_MAX_BURST); +SCTP_UINT_SYSCTL(abort_at_limit, sctp_abort_if_one_2_one_hits_limit, SCTPCTL_ABORT_AT_LIMIT); +SCTP_UINT_SYSCTL(min_residual, sctp_min_residual, SCTPCTL_MIN_RESIDUAL); +SCTP_UINT_SYSCTL(max_retran_chunk, sctp_max_retran_chunk, SCTPCTL_MAX_RETRAN_CHUNK); +SCTP_UINT_SYSCTL(log_level, sctp_logging_level, SCTPCTL_LOGGING_LEVEL); +SCTP_UINT_SYSCTL(default_cc_module, sctp_default_cc_module, SCTPCTL_DEFAULT_CC_MODULE); +SCTP_UINT_SYSCTL(default_ss_module, sctp_default_ss_module, SCTPCTL_DEFAULT_SS_MODULE); +SCTP_UINT_SYSCTL(default_frag_interleave, sctp_default_frag_interleave, SCTPCTL_DEFAULT_FRAG_INTERLEAVE); +SCTP_UINT_SYSCTL(mobility_base, sctp_mobility_base, SCTPCTL_MOBILITY_BASE); +SCTP_UINT_SYSCTL(mobility_fasthandoff, sctp_mobility_fasthandoff, SCTPCTL_MOBILITY_FASTHANDOFF); #if defined(SCTP_LOCAL_TRACE_BUF) SYSCTL_PROC(_net_inet_sctp, OID_AUTO, log, CTLFLAG_VNET | CTLTYPE_STRUCT | CTLFLAG_RD, NULL, 0, sctp_sysctl_handle_trace_log, "S,sctplog", "SCTP logging (struct sctp_log)"); @@ -970,22 +971,22 @@ SYSCTL_PROC(_net_inet_sctp, OID_AUTO, clear_trace, CTLFLAG_VNET | CTLTYPE_UINT | #endif SYSCTL_PROC(_net_inet_sctp, OID_AUTO, udp_tunneling_port, CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW, NULL, 0, sctp_sysctl_handle_udp_tunneling, "IU", SCTPCTL_UDP_TUNNELING_PORT_DESC); -SCTP_UINT_SYSCTL(enable_sack_immediately, sctp_enable_sack_immediately, SCTPCTL_SACK_IMMEDIATELY_ENABLE) -SCTP_UINT_SYSCTL(nat_friendly_init, sctp_inits_include_nat_friendly, SCTPCTL_NAT_FRIENDLY_INITS) -SCTP_UINT_SYSCTL(vtag_time_wait, sctp_vtag_time_wait, SCTPCTL_TIME_WAIT) -SCTP_UINT_SYSCTL(buffer_splitting, sctp_buffer_splitting, SCTPCTL_BUFFER_SPLITTING) -SCTP_UINT_SYSCTL(initial_cwnd, sctp_initial_cwnd, SCTPCTL_INITIAL_CWND) -SCTP_UINT_SYSCTL(rttvar_bw, sctp_rttvar_bw, SCTPCTL_RTTVAR_BW) -SCTP_UINT_SYSCTL(rttvar_rtt, sctp_rttvar_rtt, SCTPCTL_RTTVAR_RTT) -SCTP_UINT_SYSCTL(rttvar_eqret, sctp_rttvar_eqret, SCTPCTL_RTTVAR_EQRET) -SCTP_UINT_SYSCTL(rttvar_steady_step, sctp_steady_step, SCTPCTL_RTTVAR_STEADYS) -SCTP_UINT_SYSCTL(use_dcccecn, sctp_use_dccc_ecn, SCTPCTL_RTTVAR_DCCCECN) -SCTP_UINT_SYSCTL(blackhole, sctp_blackhole, SCTPCTL_BLACKHOLE) -SCTP_UINT_SYSCTL(sendall_limit, sctp_sendall_limit, SCTPCTL_SENDALL_LIMIT) -SCTP_UINT_SYSCTL(diag_info_code, sctp_diag_info_code, SCTPCTL_DIAG_INFO_CODE) -SCTP_UINT_SYSCTL(ootb_with_zero_cksum, sctp_ootb_with_zero_cksum, SCTPCTL_OOTB_WITH_ZERO_CKSUM) +SCTP_UINT_SYSCTL(enable_sack_immediately, sctp_enable_sack_immediately, SCTPCTL_SACK_IMMEDIATELY_ENABLE); +SCTP_UINT_SYSCTL(nat_friendly_init, sctp_inits_include_nat_friendly, SCTPCTL_NAT_FRIENDLY_INITS); +SCTP_UINT_SYSCTL(vtag_time_wait, sctp_vtag_time_wait, SCTPCTL_TIME_WAIT); +SCTP_UINT_SYSCTL(buffer_splitting, sctp_buffer_splitting, SCTPCTL_BUFFER_SPLITTING); +SCTP_UINT_SYSCTL(initial_cwnd, sctp_initial_cwnd, SCTPCTL_INITIAL_CWND); +SCTP_UINT_SYSCTL(rttvar_bw, sctp_rttvar_bw, SCTPCTL_RTTVAR_BW); +SCTP_UINT_SYSCTL(rttvar_rtt, sctp_rttvar_rtt, SCTPCTL_RTTVAR_RTT); +SCTP_UINT_SYSCTL(rttvar_eqret, sctp_rttvar_eqret, SCTPCTL_RTTVAR_EQRET); +SCTP_UINT_SYSCTL(rttvar_steady_step, sctp_steady_step, SCTPCTL_RTTVAR_STEADYS); +SCTP_UINT_SYSCTL(use_dcccecn, sctp_use_dccc_ecn, SCTPCTL_RTTVAR_DCCCECN); +SCTP_UINT_SYSCTL(blackhole, sctp_blackhole, SCTPCTL_BLACKHOLE); +SCTP_UINT_SYSCTL(sendall_limit, sctp_sendall_limit, SCTPCTL_SENDALL_LIMIT); +SCTP_UINT_SYSCTL(diag_info_code, sctp_diag_info_code, SCTPCTL_DIAG_INFO_CODE); +SCTP_UINT_SYSCTL(ootb_with_zero_cksum, sctp_ootb_with_zero_cksum, SCTPCTL_OOTB_WITH_ZERO_CKSUM); #ifdef SCTP_DEBUG -SCTP_UINT_SYSCTL(debug, sctp_debug_on, SCTPCTL_DEBUG) +SCTP_UINT_SYSCTL(debug, sctp_debug_on, SCTPCTL_DEBUG); #endif SYSCTL_PROC(_net_inet_sctp, OID_AUTO, stats, CTLFLAG_VNET | CTLTYPE_STRUCT | CTLFLAG_RW, NULL, 0, sctp_sysctl_handle_stats, "S,sctpstat", "SCTP statistics (struct sctp_stat)"); From nobody Fri Jan 12 16:39:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBS17146Cz577n7; Fri, 12 Jan 2024 16:39:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBS170bjvz4VSN; Fri, 12 Jan 2024 16:39:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705077563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1CBTjKpABJUcbEh04a65l/b0bVWtFQPSL0h3vXfFl5U=; b=k5S58Y8CzGWlzc46I3GNI8IWRVAnJUAZvz/9+sc9/ui+yui5gWdwiMHr3c8GLFx00L/DQp OB4xnz2TBrNrBtqm/SGsFnpa8ugFJjAA9dQWK5kvwFKNteKcrU3/E2ef14ZrJz4VWX/6B9 GTemC9BIr140QwCl2IGLxUAMVcrX50ycKHFa+jFi4n0+NydBAs8xTXI7Oukj469ybDQ5ps lQDrwM14W5yEi47hMmoIO6Qr2WdScLoUiRAaBj/L9dbaF58Lk+GInv4qk0854vMtpfe55K xqIeJGLbCbQvcA/ayJmWXkV320JvvrP1VVaBLw5oVkfB9uWgBKhCIn8ybS5LnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705077563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1CBTjKpABJUcbEh04a65l/b0bVWtFQPSL0h3vXfFl5U=; b=ysxXM/DMVYU6V6fgOQOS/hcqTchchnNyxTSVIMMpOoeRMyvDCr+mpltSua2+J0kfgJGAUI RBYivl2bexJzYLfNf90UJGv6ibg1yoBwQJa5E0n8pheuD0e2e1rqMAC9GX+C07w7nGwKr8 g0Z1jhvnGhnYbGMckXPz5fwv7WMhbAvBw95O/MXr5T96USiYGOAVlD1qt9TILpJrKmNcFW JiVCxBTFDVJ8fHF92vU0UHB057YJJpGFg79pHZ6Cw2/QDLu0A66ZjvToKH9tBZ1adV5diR xdwbiYSdRiBIxA9Apzk6SpchUyzRBrbRp7a9aAcJAcmpyyedqAWOjtMeSrw0ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705077563; a=rsa-sha256; cv=none; b=GwxEp6zohm4N0TLPzV7l1lQgGeTAHRFLrGbwBORMUR7ripAURynr8n6TwJGyzba8ZCEqPw u82ZubH08BGlIGQDhn62oMQYXrIbjmbb+BLcD9J2Kf/a7EaoTqOwnDbSgSrg8yylw5ca87 3ZdxlY0gnHSMwaZFSfe3zn1kOF6qdWHsBe1m97XI5xvxw90EEtJXVwalkTE6BSG3ehLPXu +vJI0aZlyeBtUw2Gu1JAGJuGMv7l+uzbUirZEiRDMFtL58C7fCod8bsN3jYHHXCfS1VFOL UMfs6yJWrOf6L6hc/JZmMvYTZNcoYEktl9LH5RMc/IuQgDa6wwdERy0OYJFtSw== 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 4TBS166Sndz18h7; Fri, 12 Jan 2024 16:39:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40CGdMgn062088; Fri, 12 Jan 2024 16:39:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CGdMWk062085; Fri, 12 Jan 2024 16:39:22 GMT (envelope-from git) Date: Fri, 12 Jan 2024 16:39:22 GMT Message-Id: <202401121639.40CGdMWk062085@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 9a75f1475fb6 - stable/14 - tcp rack: remove references to rb trees List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9a75f1475fb6ddd8d34d50a7b071ffa0c6a60a2c Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=9a75f1475fb6ddd8d34d50a7b071ffa0c6a60a2c commit 9a75f1475fb6ddd8d34d50a7b071ffa0c6a60a2c Author: Michael Tuexen AuthorDate: 2023-11-05 14:21:06 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 16:37:31 +0000 tcp rack: remove references to rb trees The references should have been removed in https://cgit.freebsd.org/src/commit/?id=030434acaf4631c4e205f8bccedcc7f845cbfcbf Reviewed by: rscheff, zlei Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D42386 (cherry picked from commit b10ae5a9b21aa11e96a1951ccc4525dd1fdb60b3) --- sys/netinet/tcp_stacks/rack.c | 24 ++++++++++++------------ sys/netinet/tcp_stacks/tcp_rack.h | 1 - 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 0dd724399ebd..760bd4ee9689 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -7472,7 +7472,7 @@ need_retran: (void)tqhash_insert(rack->r_ctl.tqh, nrsm); #else if ((insret = tqhash_insert(rack->r_ctl.tqh, nrsm)) != 0) { - panic("Insert in rb tree of %p fails ret:%d rack:%p rsm:%p", + panic("Insert in tailq_hash of %p fails ret:%d rack:%p rsm:%p", nrsm, insret, rack, rsm); } #endif @@ -7692,8 +7692,8 @@ rack_remxt_tmr(struct tcpcb *tp) * order. This way we send in the proper order and any * sacks that come floating in will "re-ack" the data. * To do this we zap the tmap with an INIT and then - * walk through and place every rsm in the RB tree - * back in its seq ordered place. + * walk through and place every rsm in the tail queue + * hash table back in its seq ordered place. */ TAILQ_INIT(&rack->r_ctl.rc_tmap); @@ -8355,7 +8355,7 @@ rack_update_entry(struct tcpcb *tp, struct tcp_rack *rack, (void)tqhash_insert(rack->r_ctl.tqh, nrsm); #else if ((insret = tqhash_insert(rack->r_ctl.tqh, nrsm)) != 0) { - panic("Insert in rb tree of %p fails ret:%d rack:%p rsm:%p", + panic("Insert in tailq_hash of %p fails ret:%d rack:%p rsm:%p", nrsm, insret, rack, rsm); } #endif @@ -8545,7 +8545,7 @@ again: (void)tqhash_insert(rack->r_ctl.tqh, rsm); #else if ((insret = tqhash_insert(rack->r_ctl.tqh, rsm)) != 0) { - panic("Insert in rb tree of %p fails ret:%d rack:%p rsm:%p", + panic("Insert in tailq_hash of %p fails ret:%d rack:%p rsm:%p", nrsm, insret, rack, rsm); } #endif @@ -8619,7 +8619,7 @@ refind: (void)tqhash_insert(rack->r_ctl.tqh, nrsm); #else if ((insret = tqhash_insert(rack->r_ctl.tqh, nrsm)) != 0) { - panic("Insert in rb tree of %p fails ret:%d rack:%p rsm:%p", + panic("Insert in tailq_hash of %p fails ret:%d rack:%p rsm:%p", nrsm, insret, rack, rsm); } #endif @@ -9776,7 +9776,7 @@ do_rest_ofb: (void)tqhash_insert(rack->r_ctl.tqh, nrsm); #else if ((insret = tqhash_insert(rack->r_ctl.tqh, nrsm)) != 0) { - panic("Insert in rb tree of %p fails ret:%d rack:%p rsm:%p", + panic("Insert in tailq_hash of %p fails ret:%d rack:%p rsm:%p", nrsm, insret, rack, rsm); } #endif @@ -9897,7 +9897,7 @@ do_rest_ofb: } /* * There is more not coverend by this rsm move on - * to the next block in the RB tree. + * to the next block in the tail queue hash table. */ nrsm = tqhash_next(rack->r_ctl.tqh, rsm); start = rsm->r_end; @@ -10138,7 +10138,7 @@ do_rest_ofb: (void)tqhash_insert(rack->r_ctl.tqh, nrsm); #else if ((insret = tqhash_insert(rack->r_ctl.tqh, nrsm)) != 0) { - panic("Insert in rb tree of %p fails ret:% rack:%p rsm:%p", + panic("Insert in tailq_hash of %p fails ret:% rack:%p rsm:%p", nrsm, insret, rack, rsm); } #endif @@ -12478,7 +12478,7 @@ rack_un_collapse_window(struct tcp_rack *rack, int line) (void)tqhash_insert(rack->r_ctl.tqh, nrsm); #else if ((insret = tqhash_insert(rack->r_ctl.tqh, nrsm)) != 0) { - panic("Insert in rb tree of %p fails ret:%d rack:%p rsm:%p", + panic("Insert in tailq_hash of %p fails ret:%d rack:%p rsm:%p", nrsm, insret, rack, rsm); } #endif @@ -14808,7 +14808,7 @@ rack_init_outstanding(struct tcpcb *tp, struct tcp_rack *rack, uint32_t us_cts, } #ifdef INVARIANTS if ((insret = tqhash_insert(rack->r_ctl.tqh, rsm)) != 0) { - panic("Insert in rb tree fails ret:%d rack:%p rsm:%p", + panic("Insert in tailq_hash fails ret:%d rack:%p rsm:%p", insret, rack, rsm); } #else @@ -14868,7 +14868,7 @@ rack_init_outstanding(struct tcpcb *tp, struct tcp_rack *rack, uint32_t us_cts, } #ifdef INVARIANTS if ((insret = tqhash_insert(rack->r_ctl.tqh, rsm)) != 0) { - panic("Insert in rb tree fails ret:%d rack:%p rsm:%p", + panic("Insert in tailq_hash fails ret:%d rack:%p rsm:%p", insret, rack, rsm); } #else diff --git a/sys/netinet/tcp_stacks/tcp_rack.h b/sys/netinet/tcp_stacks/tcp_rack.h index 38239ef97b4d..4152a1a5d7ba 100644 --- a/sys/netinet/tcp_stacks/tcp_rack.h +++ b/sys/netinet/tcp_stacks/tcp_rack.h @@ -120,7 +120,6 @@ rack_ts_to_msec(uint64_t ts) } -RB_HEAD(rack_rb_tree_head, rack_sendmap); TAILQ_HEAD(rack_head, rack_sendmap); TAILQ_HEAD(def_opt_head, deferred_opt_list); From nobody Fri Jan 12 16:41:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBS373bpbz577ht; Fri, 12 Jan 2024 16:41:07 +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 4TBS371khxz4VrZ; Fri, 12 Jan 2024 16:41:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705077667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rzvKU1Wog2lPQWgYMJJz9AecRXDm/HRsBjCjW3THDo8=; b=Ciy6JTescqkMJ/45L8p8p1IzyFEzfZLhC5duzsf9Z7D6WCMzk/t+r59eToFsoICzputhNz LCRJ4wN8N8M/aWOyUhXa06Dv1uTQXbmyBcvr6sx7LYaE4wYjVN2nv7gJ1il1L8C6xziPT+ Xp4R1YNfMeROhguq5MIc5iOrfKwcrXteslIiLA5iijWBMbgl+o1iIpMM45Kh7HnJzmQW94 mtze6ElU57fEvRMrpiaLik1borrbxa0w78YpOnLWYc26YrY7Kn50JqATMZz8eQ6ry20DxJ wYqsmbS/EDDrfAuMbu+L8EplhxLywpaNUWFDpouZh3uqjzBTJKLvjZ27vZetcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705077667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rzvKU1Wog2lPQWgYMJJz9AecRXDm/HRsBjCjW3THDo8=; b=FB0jyklSzbGbgSDwlSE6GMRtbYr4Cf8zvmW3JHr1g/NQzIDZTOJkG4++HXqkrbaClBRquP aXG0XkEdL6NGnjmV59VmU6JAfDpYgS6MEhzq9y03prp1rebGvv6SuFuhsO2hyDJYXDAuq8 HEzNb3OsWFFB+3YOuQEnRcAB5p5Ij+IZTNFxjjvIuSg3zV7O1iyPiilWKIcu1gdyJudOB9 Od/JmOrJrtAZB3KidOKxNNLptXtzyGjOgqtbRAJg/Kq9Ga5OIumzxJmGTHLWbsK3VchYhP RCKAr49uA5CeRkKfFhGD+adpKDFysj3yww9MV2DOI/3l50xNE9RT35gd7Ioc6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705077667; a=rsa-sha256; cv=none; b=idzXLY3Rr6eTo0N406R5GAhJi/5Nto9xA4YFqOgYxHbqcVPBsViyFo6PxSgO1wcWb2EZ2T ys/XN2UsAYhV8axCC80MxK6jMegYu1ZvFQUSUOFr0p+9o9MDVhKsu9eZYkHXzIBzdnT6tW yu0K4VFI5CG515hZNCgMyCUXOK87d4riDWgP16R88L3piBfa0G0QFycgO9Ulzy+qgt8sYa oe+sI+7utDFXuT9S/Uoz7b4vlYFBjAOYrcgwRX+eSLghOhX+cdkxTSKdLtCXRnZV/bYzkl SvuZo338ukJxEIE92opj9hE4RPrFw7lLmPc4Ej+akU6wU0bQeKSFPTH+Lch1tg== 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 4TBS370qyKz18QP; Fri, 12 Jan 2024 16:41: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 40CGf7mV074858; Fri, 12 Jan 2024 16:41:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CGf7Q2074855; Fri, 12 Jan 2024 16:41:07 GMT (envelope-from git) Date: Fri, 12 Jan 2024 16:41:07 GMT Message-Id: <202401121641.40CGf7Q2074855@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: 1e25eb287f3f - main - login: Missed an instance of getpwnam(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 1e25eb287f3fdd763df98065dbf2e1eb201e4000 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1e25eb287f3fdd763df98065dbf2e1eb201e4000 commit 1e25eb287f3fdd763df98065dbf2e1eb201e4000 Author: Dag-Erling Smørgrav AuthorDate: 2024-01-12 16:40:55 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-01-12 16:40:55 +0000 login: Missed an instance of getpwnam(). Fixes: a3d80dd8aa6ac15877e00102ab174b417ac81d79 MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D43423 --- usr.bin/login/login.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index 5b4fa55dc541..6a0c6a5b6bbc 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -704,8 +704,10 @@ auth_pam(void) pam_err = pam_get_item(pamh, PAM_USER, &item); if (pam_err == PAM_SUCCESS) { tmpl_user = (const char *)item; - if (strcmp(username, tmpl_user) != 0) - pwd = getpwnam(tmpl_user); + if (strcmp(username, tmpl_user) != 0) { + (void)getpwnam_r(tmpl_user, &pwres, pwbuf, + sizeof(pwbuf), &pwd); + } } else { pam_syslog("pam_get_item(PAM_USER)"); } From nobody Fri Jan 12 16:50:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBSGW40q2z578WM; Fri, 12 Jan 2024 16:50: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 4TBSGW3W9bz4X5Z; Fri, 12 Jan 2024 16:50:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705078259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q9mevGSkwFZIv3l8WwRTQlxEs2Wvf2wiXiZen898kFs=; b=sTaATeinOv8Mp3+asRkitMx2xEPgEXeirDv053FZKS6X2vy669nEAyyhqfCPB61E3eeFhn IofnpGLLwKXVyOYyFfO0d6UTS7IE5y96bMAUmdxafiaIdIWDdr3LqRu96slz28D/T1Lp9W 0u4eAEKstYIqWNkch++JpUPLsTpDyYSDCj+k+ODhAnnNRjV5POJn6wUtilBYbY+F0qk9js WDAZVAQlmaVlHOX/kZUAkjlk09woW6f57L5TUR14g0e+mwSdl+cYD3qh+jksSnbMVvoSRY UhRixQM505BMhamTneSif8O/PQf8wyU0RPNlre98EMBwdjsnnInKB958m9pTKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705078259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q9mevGSkwFZIv3l8WwRTQlxEs2Wvf2wiXiZen898kFs=; b=qKwgdmNOmyBKxs1KvV8kg6roRKGYaA/b//EOHvXJXoVy5S0MnAimg55j6/XkCkBQmgRRyx QEoOST4gc6QPfMAwl/WnOTgx2+eOTL1noeX1dhl6y9uvDGyWt/KGixv+jvldCaIdg4FGO6 bbhu5u3jn5+PnvQbCrUD2Y49vzH7Ui7G7bvZdAgxegG/73JAn1FphSEAqcdCu13+JrYIDE +zcYhYKYEr+Fwadx/cULjHCFg0UzXvznq6hScBYHbLzis/N8LqahAwwSEGQnBNwR7fCtGT 1DPgEowgiSgQN1NIq0328yXmTY+D8J+5xGDZg+0UQemWJUOoCtR/kw1uDhCNZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705078259; a=rsa-sha256; cv=none; b=X5MPW63uT2LHk0oqiObSM8orJyK0R34HpTlfPmbvv8Bc24griATrUUsX6SRr6uNVx7HLRB Bp/sDOZlcMYS8tojuW9vPbjjSrz2tOmlpb5cf3QDni0EP4pLlmxBwNPRH2MCYzKhMAdWG+ FB/BFaOHHUwXnIXbMqLBJYPOTCYwJhuzkpz5YenCzxsI+kx6F1JmeRvbhUPYwSqLhSnsmu TXYDDpt+15mmHqCLjY4CWgdoV474nsroC3OaWHtIelvswvWJmT7kpKHlG8bzMfkWi3hogG KcimQxMXFs8eEkC+J2LKGM9+1CTwtug36lDlOLGtov9V/KBCTSkcgNQOdpQlEQ== 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 4TBSGW2YvQz18rF; Fri, 12 Jan 2024 16:50: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 40CGox4l089387; Fri, 12 Jan 2024 16:50:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CGoxCP089385; Fri, 12 Jan 2024 16:50:59 GMT (envelope-from git) Date: Fri, 12 Jan 2024 16:50:59 GMT Message-Id: <202401121650.40CGoxCP089385@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: e71e4d9ef1ba - stable/14 - if_tuntap: improve code consistency List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e71e4d9ef1ba26f054894465fd53684c1fe2154d Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e71e4d9ef1ba26f054894465fd53684c1fe2154d commit e71e4d9ef1ba26f054894465fd53684c1fe2154d Author: Michael Tuexen AuthorDate: 2023-11-04 09:22:42 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 16:40:30 +0000 if_tuntap: improve code consistency No functional change intended. Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D42462 (cherry picked from commit 4ffe410e40e90c265c20cb4675ed74a40dc1fcc4) --- sys/net/if_tuntap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index a1d9929a2e28..298f37bebc56 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -1413,8 +1413,7 @@ tunoutput(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst, else af = RO_GET_FAMILY(ro, dst); - if (bpf_peers_present(ifp->if_bpf)) - bpf_mtap2(ifp->if_bpf, &af, sizeof(af), m0); + BPF_MTAP2(ifp, &af, sizeof(af), m0); /* prepend sockaddr? this may abort if the mbuf allocation fails */ if (cached_tun_flags & TUN_LMODE) { From nobody Fri Jan 12 16:53:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBSKZ0bZFz5795w; Fri, 12 Jan 2024 16:53: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 4TBSKY6ksLz4XrS; Fri, 12 Jan 2024 16:53:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705078417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eHTygr40q/eob9Iro/FoRmbuY7cv9d/iX+78D1jW3/0=; b=ENVUF994Ok6ILN9kOi67G+AcHV1YrXDQPqm0hZeFvyZuG6kvYxvnjgc6DrfBH0PCyRCuXh KVuD5eFcjpZzEMd/gdGKu3XfU1MkJkAnUn9iPmpIBqzqVY59Zmjaf6bF51LIr7Qn4WlTvA qxV6YCuFEGW6mQr4seC3H3Xm3Oyzuu/kfCPQt+jFyxVrm8UG2QfnZbtqTB4ewCydpfQQh9 dB55aY2ugssUoeSBaQed3zDR1SHA9qteCAY6P3fxwivz1nBwhdsXuf+7LCWLwwBOITRE7m pXOEasaFeaY5YgemCd5XdSqf0/TRvUIB2zZ7smgQlPPkDmGHL/Y7Gou8uarsnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705078417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eHTygr40q/eob9Iro/FoRmbuY7cv9d/iX+78D1jW3/0=; b=VjfIZeIQdjQ92cf9B3IfIojDoqx/g1rwMq4DPV/3RqYo4RlihM/EDvFnq8xga4SQuUIStq 1D5hQRasLCJnczVzsfrgoA37hfIMEhLBMpMDtzJXQNXTAo3RUtn8zm0usKX3odb9GJdg49 SNptCqKco9EMIYPArnwveM2ZmtU8+WZpFncQItmEZl2CJd65jMq9GBYyqcztFLBCBOjjon Fj54ruGnPBru4ppXJcSda38+Nm2x+Xm/ycCG6YU4s1r3diUfSpZo2AHBKBCTebvYcrKB6t 0XKH+6uY9G8L02MMVZ21C/srf6PX85fLhEo1+ZsAsVkyYfTY/Lf9JkA2rYjzsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705078417; a=rsa-sha256; cv=none; b=h2EDis6IX/IUgBGuQv0QcYo41pk1eLPXvm5ja64NXxlvEE5AAw3DOfuCUgbtUex9fgHh6a rN/2MX6pUUaHq6mqNBYIEUY4744f98wdke/eNhhFOBQsuXkhRU1v0D5s7tnjsUjeWaJcQ5 ivMuzoqW13kkW9Hpm58dumrxhkGGg+/irL8+pK8xeM4Lj69JG+43FtuWaLVYcIXa7Xqbo6 JGKwsYsRRWRpKS/ekEH9CEp/VYnbpAp7xXrJ8VpQOLmWs4jvaZAkmlJxnn1/NS0PD0AU+/ CwjsRCyOc+WUAUoe4QPX+Hj9zzTj1pSMBGw5Bl+6rV3UcZuWRl8lC3MK7e5BQA== 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 4TBSKY5nymz192x; Fri, 12 Jan 2024 16:53: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 40CGrbo6096048; Fri, 12 Jan 2024 16:53:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CGrbvs096045; Fri, 12 Jan 2024 16:53:37 GMT (envelope-from git) Date: Fri, 12 Jan 2024 16:53:37 GMT Message-Id: <202401121653.40CGrbvs096045@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: e0f22f9e1867 - stable/14 - if_tuntap: trigger the bpf hook on transmitting for the tap interface List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e0f22f9e1867e9a4a2fc90327a13265eb233c7f3 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e0f22f9e1867e9a4a2fc90327a13265eb233c7f3 commit e0f22f9e1867e9a4a2fc90327a13265eb233c7f3 Author: Michael Tuexen AuthorDate: 2023-11-05 19:32:46 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 16:51:40 +0000 if_tuntap: trigger the bpf hook on transmitting for the tap interface The tun interface triggers the bpf hook when a packet is transmitted, the tap interface triggers it when the packet is read from the character device. This is inconsistent. So fix the tap device such that it behaves like the tun device. This is needed for adding support for the tap device to packetdrill. Reviewed by: kevans, rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D42467 (cherry picked from commit 35af22ac986c4f3e8160c943a478492e748b6f23) --- sys/net/if_tuntap.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index 298f37bebc56..f273e4993dfd 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -933,6 +933,16 @@ tunstart_l2(struct ifnet *ifp) TUN_UNLOCK(tp); } /* tunstart_l2 */ +static int +tap_transmit(struct ifnet *ifp, struct mbuf *m) +{ + int error; + + BPF_MTAP(ifp, m); + IFQ_HANDOFF(ifp, m, error); + return (error); +} + /* XXX: should return an error code so it can fail. */ static void tuncreate(struct cdev *dev) @@ -972,6 +982,8 @@ tuncreate(struct cdev *dev) if ((tp->tun_flags & TUN_L2) != 0) { ifp->if_init = tunifinit; ifp->if_start = tunstart_l2; + ifp->if_transmit = tap_transmit; + ifp->if_qflush = if_qflush; ether_gen_addr(ifp, &eaddr); ether_ifattach(ifp, eaddr.octet); @@ -1713,9 +1725,6 @@ tunread(struct cdev *dev, struct uio *uio, int flag) } TUN_UNLOCK(tp); - if ((tp->tun_flags & TUN_L2) != 0) - BPF_MTAP(ifp, m); - len = min(tp->tun_vhdrlen, uio->uio_resid); if (len > 0) { struct virtio_net_hdr_mrg_rxbuf vhdr; From nobody Fri Jan 12 16:58:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBSRS56WFz579BC; Fri, 12 Jan 2024 16:58: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 4TBSRS4Z6cz4Xtd; Fri, 12 Jan 2024 16:58:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705078724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=so4dI3Fl7ypfsbV5WDnU5CWeX85icpMVi2zTOzOQxyw=; b=QAC/mlFkQZZnJuCeTwikWta+/mJi7iMtGiF3j0wac3oi2Ga87tzr3rO8+XYhGVK09HHRhm lNuE5S01w7TptLUEyn1P/gIlUi0mPGzkdRNsh9uQr4e94tbngdXuRfHCaOppDUDfNCU5uY GVu9Gekda23Eh/BgRIXJ85T3IXA8Bi0Slx51Eaz9rHH1/BUeG0Mlsg7RJvoTaFSzkfFTfs Ocr3B7/T/NvGjF/A0H7ZfilU4GXxXftnGfP+jbd254WoQXoG60LSqxXVXOHpkWrQ5xRUOh d4j3KVxlRWPmjHwzbGd6kYetkXhXGIH94BkV8ACQMwpXn1JC1W5cKso22GuBGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705078724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=so4dI3Fl7ypfsbV5WDnU5CWeX85icpMVi2zTOzOQxyw=; b=uix76mwRMSDSq2IsWd6j9jhyBJ10Bre35m0GVfWk91utXS70NgfX7VFhscLeCNFyutGe4x 1LuiDB7uVpYyeTEAWMWFimO4wKZFpotA1S0uCs74cba9dddHCt6r+afCrg+waxYvLeClOu 4CHY+FyLWeGK3KWAZItHN38EoK7LRO9K9xbcoCQPc+dqurzOXBF6aZAYlO5eLtcx6ALm+p KECeMghptzw07haqKmLytGo1tXB96EKIZqLCn7h+3A86ZdB+Hd2PwwkGx4ohSx60n/5w+P v1ISu/tGQlJfzMH2VLY2WSv/DYYq4t/+S8iA5BWbeQctnhILPG2nNW0ltcNr/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705078724; a=rsa-sha256; cv=none; b=CcxT2FHbGmhu7DcRf/D6O/2mo4hIBud46Xk80YEzZbkDzwyi6qRylraN2oTY19ENZDF9G+ JvlRCtfWw44xiuHDW2Kby6ZU4PO0SQbKIRpcdSf3ykLX/+nhRB79LIMkSCzPCIuID8B66l 3JBZgWDMTGcZJxZKHLcRozLHq3GHeP3R6gyBXMsM27ZPiZ7L5zPhQsFix8ET//AnpK2drb 1dhItNC3BvWUwNjmE9kAYdA0TUxk7nlgpVp8NEx80i8W5+PmsDDw9GSKXenRtTi5ZB1KnY YqNo34GAbsfb/IZWYuEHg8lD4Jb9HjHHfOye+luxENH0KafhrxhnWDAJik2txQ== 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 4TBSRS3bqmz19NJ; Fri, 12 Jan 2024 16:58: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 40CGwign096857; Fri, 12 Jan 2024 16:58:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CGwi3k096854; Fri, 12 Jan 2024 16:58:44 GMT (envelope-from git) Date: Fri, 12 Jan 2024 16:58:44 GMT Message-Id: <202401121658.40CGwi3k096854@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 002829ea6139 - stable/14 - if_tuntap: support receive checksum offloading for tap interfaces List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 002829ea6139fcbfc295790c97aed811535736fa Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=002829ea6139fcbfc295790c97aed811535736fa commit 002829ea6139fcbfc295790c97aed811535736fa Author: Michael Tuexen AuthorDate: 2023-11-09 10:37:27 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 16:55:40 +0000 if_tuntap: support receive checksum offloading for tap interfaces When enabled, pretend that the IPv4 and transport layer checksum is correct for packets injected via the character device. This is a prerequisite for adding support for LRO, which will be added next. Then packetdrill can be used to test the LRO code in local mode. Reviewed by: rscheff, zlei Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D42477 (cherry picked from commit ff69d13a50d1d07601de0885fd94f6a09a7ba383) --- sys/net/if_tuntap.c | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index f273e4993dfd..738e6b997ace 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -977,6 +977,8 @@ tuncreate(struct cdev *dev) ifp->if_flags = iflags; IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifp->if_capabilities |= IFCAP_LINKSTATE; + if ((tp->tun_flags & TUN_L2) != 0) + ifp->if_capabilities |= IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6; ifp->if_capenable |= IFCAP_LINKSTATE; if ((tp->tun_flags & TUN_L2) != 0) { @@ -1784,9 +1786,35 @@ tunwrite_l2(struct tuntap_softc *tp, struct mbuf *m, return (0); } - if (vhdr != NULL && virtio_net_rx_csum(m, &vhdr->hdr)) { - m_freem(m); - return (0); + if (vhdr != NULL) { + if (virtio_net_rx_csum(m, &vhdr->hdr)) { + m_freem(m); + return (0); + } + } else { + switch (ntohs(eh->ether_type)) { +#ifdef INET + case ETHERTYPE_IP: + if (ifp->if_capenable & IFCAP_RXCSUM) { + m->m_pkthdr.csum_flags |= + CSUM_IP_CHECKED | CSUM_IP_VALID | + CSUM_DATA_VALID | CSUM_SCTP_VALID | + CSUM_PSEUDO_HDR; + m->m_pkthdr.csum_data = 0xffff; + } + break; +#endif +#ifdef INET6 + case ETHERTYPE_IPV6: + if (ifp->if_capenable & IFCAP_RXCSUM_IPV6) { + m->m_pkthdr.csum_flags |= + CSUM_DATA_VALID_IPV6 | CSUM_SCTP_VALID | + CSUM_PSEUDO_HDR; + m->m_pkthdr.csum_data = 0xffff; + } + break; +#endif + } } /* Pass packet up to parent. */ From nobody Fri Jan 12 17:01:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBSW01wvLz579KV; Fri, 12 Jan 2024 17:01: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 4TBSW00WYcz4YTY; Fri, 12 Jan 2024 17:01:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705078908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FQCCMdLYrCrcZ1ocZwtvWXozz5dvK2C6nc0QqMoXscI=; b=XAMLB7tfmr9xde9qP9DsE/xV2sFH02KPRFLoUZljfdVcWj+1ii18TjKQfA47n0WX/C2grp JSWxupKwpaL6nhFKBI7V0v7n7m3didLf6fnjmjqWWi+Enopsgui1ygXdO5GOtpQ+SyzmNd x3nUtSw54h+pfwkW3LnMjY8CPXr2sQugJ8yYjxDRHJJ/Ffmi1WJhWoES2V0PeRIJ0bvU/D 8TuJtcQtG9s8Esc1libHogCXeh2V4rXrSMkhMnZn7q1pZisXrMvpiHR1q+Xetd4amVnm2n w+xXAVZLhJOgfOtzw2gB/Hc82XdIS9VMmgRZVvhoH8UVYI3y/5fpUyJxVGU8NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705078908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FQCCMdLYrCrcZ1ocZwtvWXozz5dvK2C6nc0QqMoXscI=; b=a1toEqwjwH/99nSzYVogKPqHycs1lLFUTOMcF3MFHmlsGDOOxl6/gasP5xhoWM113RvWaU /mHfSq8H80vnwSirMDAsyFElMEyLoFTuW3FVmrfjq/PXUsUbuf0D2Wkh4s0bvM9N/8QhFr FroAVVR1loEBqH5ZuNZh4Tjg65fZSy/2lMuCgkPSvunYUCadksR75qkyXbdkixQx8k/9SL yVe6iP5AvpaLn3dBytCetHGVvHmE/1EN0asRaMGaTPYpfKGocywaf3tPGIyZpNRVd4qFsE 28p/U3lfdvrg3g8gYhBLabBMLvOk0g0QiBY0SVvS1tlJZB4v1rnUNozv3wkLVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705078908; a=rsa-sha256; cv=none; b=pT4JelkKvJnFnltZa76VsAV0lMls1VglzTgoFYbp//y7Cl1SWNXjSq2R1IxG0J3bMJmCyo Y0jZPxW5ukkHjZqDLn0f32w+pKClUtqQb+LzqkcKnd5Am0R6lqaZEcXjASSKmYs5+/ye7E Fn7PH3lqk5x0bkfTN5lwEEUWEvN5rZj1sZvD3Zz2+qUoPJzIMSyhQg5Vwuo36/E/rhXRNL eS1wLtHDRfa3t6wnZ9P268hOJKBv0t8dw3QaRKInWdOV2t3ogn9UVBWeCN1cSPT/yghGTI XEDDPF2j9Ejdur8ZwRCuWt765KqChPu16hiBwk44Bb/nm8UmIV9XkahqzSDAJA== 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 4TBSVz6kBGz19Ns; Fri, 12 Jan 2024 17:01: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 40CH1l30010041; Fri, 12 Jan 2024 17:01:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CH1lYC010039; Fri, 12 Jan 2024 17:01:47 GMT (envelope-from git) Date: Fri, 12 Jan 2024 17:01:47 GMT Message-Id: <202401121701.40CH1lYC010039@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 83e524e8f656 - stable/14 - if_tuntap: remove redundant check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 83e524e8f6567f7f336304eb3f2f9ceeea68cd66 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=83e524e8f6567f7f336304eb3f2f9ceeea68cd66 commit 83e524e8f6567f7f336304eb3f2f9ceeea68cd66 Author: Michael Tuexen AuthorDate: 2023-11-09 10:43:54 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 16:59:27 +0000 if_tuntap: remove redundant check eh can't be NULL, so there is no need to check for it. Reported by: zlei Sponsored by: Netflix, Inc. (cherry picked from commit 44669b76504991ef3ac10ef10bc0fa931ae79c45) --- sys/net/if_tuntap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index 738e6b997ace..0de5b0d2d521 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -1779,7 +1779,7 @@ tunwrite_l2(struct tuntap_softc *tp, struct mbuf *m, eh = mtod(m, struct ether_header *); - if (eh && (ifp->if_flags & IFF_PROMISC) == 0 && + if ((ifp->if_flags & IFF_PROMISC) == 0 && !ETHER_IS_MULTICAST(eh->ether_dhost) && bcmp(eh->ether_dhost, IF_LLADDR(ifp), ETHER_ADDR_LEN) != 0) { m_freem(m); From nobody Fri Jan 12 17:04:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBSZh1FcBz579lr; Fri, 12 Jan 2024 17:05: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 4TBSZg5wWXz4ZKl; Fri, 12 Jan 2024 17:04:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705079099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LltCxDpAyRgki284OwsYWCGyzI2EYNLYtLdjkCEsYzA=; b=wXJYExTYMtYqVRW+qS0rKHVsfQmZHzTPq61e6npHzlevZBnpGWngVm817Em6A2N7ZrQwUE /Y4YTZsuJSPotS6nRwi8IvCKRLs8J44a2rKGfxBiSW6vdER77+LdopZg0z2X6xTgqHvmwl z79f0fMZ+NEz6w5XXQgMFXrmNEBFVK2b+46hL8qo+mcaHxcHy30QEaq3/sRrUyKTQhEVz/ JdyK4O7Z5yO18S/D9IUMlbZObbL+s7vEPUXVBWsZoSJqYWxNsB3Ffm8ej/cGa+uoYH7sXC vZuqz1QMH+FfpLlKiwOSW1fl59BEFCfa3bo6qozqLolCqXj/8mqfk0KpYDm7zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705079099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LltCxDpAyRgki284OwsYWCGyzI2EYNLYtLdjkCEsYzA=; b=jcaUkQ1Rp4N11uU4bK8Zt349F9U72PxjQ70kOveXajw+AOqdi64VZ3+e8UgjTq9zS0IQ67 xnTTG9AtCsaBTcqdyWzq4OGwCvoj5TdxXgOEBTvxuCcYKPIxnzcFpDgAtKPD2p5hPdq+r9 8iUzO7hjpe1zcfoISPwOUaI5joQ4cr0syoJ4nDC/1tYeSXrvCUllaPudNaMiL9d5XiehJ+ kUPm+Zu+lF5GNX2BO00dfKTjXUw2XLcwp0Ju5z8uESHATSfm0PW8CnwoVGT+ra7BELbEe6 GKWhg6sjrz/BQ7O9wETx+csVEtALh4iX44k4HqJwsaYE5VVgG1fsG+trSFut+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705079099; a=rsa-sha256; cv=none; b=QbmQOPTZEYtFiUR1ElKzYj2ULRancQ0+4OHi1+hJ68k8NKoanhPsjXM7hN5UbJ3cVq+5p7 7S1ErZ+4Er8Qkh8yxHhsAc5VXCeMcZlVgeEAiEPJ1bmeOzCOMCGnAyTbV7mrbnuYqiHtZw JxEU8Sz77kgeNYnF8+zZo7HkpWf25VznjZmN7twhFQNd1HL0YHJxdtX44f/Anmtc7xhOfk szc+mu3EBA82QGVHOyLBNxL+Havm0rTMqCw1c7MBBIKRfO5p4C11xL98pXFXy7SaQ+8Oxm lLHcBmTYG6/WK4yqP4xVCH7/MF7XBN+8yxLdjYMmdX79ig6eTlm40dJ3c25lJQ== 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 4TBSZg4sZZz19P6; Fri, 12 Jan 2024 17:04: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 40CH4xoo014191; Fri, 12 Jan 2024 17:04:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CH4xW4014188; Fri, 12 Jan 2024 17:04:59 GMT (envelope-from git) Date: Fri, 12 Jan 2024 17:04:59 GMT Message-Id: <202401121704.40CH4xW4014188@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: fded38cde763 - stable/14 - if_tuntap: add LRO support to tap devices List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fded38cde763e77ec13c8df041788ac3a473ca00 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=fded38cde763e77ec13c8df041788ac3a473ca00 commit fded38cde763e77ec13c8df041788ac3a473ca00 Author: Michael Tuexen AuthorDate: 2023-11-19 14:57:53 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 17:02:35 +0000 if_tuntap: add LRO support to tap devices This allows testing the LRO code with packetdrill in local mode. Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D42548 (cherry picked from commit 99c79cab422705f92f05a2924a29bdf823372ebf) --- sys/net/if_tuntap.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index 0de5b0d2d521..98c5044d6867 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -97,6 +97,7 @@ #endif #include #include +#include #include #include #include @@ -144,6 +145,8 @@ struct tuntap_softc { struct ether_addr tun_ether; /* remote address */ int tun_busy; /* busy count */ int tun_vhdrlen; /* virtio-net header length */ + struct lro_ctrl tun_lro; /* for TCP LRO */ + bool tun_lro_ready; /* TCP LRO initialized */ }; #define TUN2IFP(sc) ((sc)->tun_ifp) @@ -978,7 +981,8 @@ tuncreate(struct cdev *dev) IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifp->if_capabilities |= IFCAP_LINKSTATE; if ((tp->tun_flags & TUN_L2) != 0) - ifp->if_capabilities |= IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6; + ifp->if_capabilities |= + IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6 | IFCAP_LRO; ifp->if_capenable |= IFCAP_LINKSTATE; if ((tp->tun_flags & TUN_L2) != 0) { @@ -1175,6 +1179,12 @@ tundtor(void *data) (l2tun && (ifp->if_flags & IFF_LINK0) != 0)) goto out; + if (l2tun && tp->tun_lro_ready) { + TUNDEBUG (ifp, "LRO disabled\n"); + tcp_lro_free(&tp->tun_lro); + tp->tun_lro_ready = false; + } + if (ifp->if_flags & IFF_UP) { TUN_UNLOCK(tp); if_down(ifp); @@ -1219,6 +1229,14 @@ tuninit(struct ifnet *ifp) getmicrotime(&ifp->if_lastchange); TUN_UNLOCK(tp); } else { + if (tcp_lro_init(&tp->tun_lro) == 0) { + TUNDEBUG(ifp, "LRO enabled\n"); + tp->tun_lro.ifp = ifp; + tp->tun_lro_ready = true; + } else { + TUNDEBUG(ifp, "Could not enable LRO\n"); + tp->tun_lro_ready = false; + } ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; TUN_UNLOCK(tp); /* attempt to start output */ @@ -1765,6 +1783,7 @@ tunwrite_l2(struct tuntap_softc *tp, struct mbuf *m, struct epoch_tracker et; struct ether_header *eh; struct ifnet *ifp; + int result; ifp = TUN2IFP(tp); @@ -1820,7 +1839,15 @@ tunwrite_l2(struct tuntap_softc *tp, struct mbuf *m, /* Pass packet up to parent. */ CURVNET_SET(ifp->if_vnet); NET_EPOCH_ENTER(et); - (*ifp->if_input)(ifp, m); + if (tp->tun_lro_ready && ifp->if_capenable & IFCAP_LRO) { + result = tcp_lro_rx(&tp->tun_lro, m, 0); + TUNDEBUG(ifp, "tcp_lro_rx() returned %d\n", result); + } else + result = TCP_LRO_CANNOT; + if (result == 0) + tcp_lro_flush_all(&tp->tun_lro); + else + (*ifp->if_input)(ifp, m); NET_EPOCH_EXIT(et); CURVNET_RESTORE(); /* ibytes are counted in parent */ From nobody Fri Jan 12 17:08:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBSfj2MxFz57BCn; Fri, 12 Jan 2024 17:08: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 4TBSfj1qNqz4bCh; Fri, 12 Jan 2024 17:08:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705079309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eEuicgCP+QqzsejWvj4aRVw2hgCpvTZ/iepLXuHsvMU=; b=fHUuZUzVNQEhetTPXiOyVRfzwrJLkT0+E8NEuTyr+Sduh3VwK3HG1OYaFYkb4rLk07yEMn UbiS2tuK5Pn9OHAdjT3VJp3GMonPl9ChdT6zO81iA27ycofZB8uroeTITKw4o6VKsmg9rB 6ruvvHcq63rMUXrjW6t19HF4M5vVu+S00AlS/UAABrqKI3s5f15T+OAV5XynurFv1prXVe 8MVD0AyiHgdetzKyHK4PHdZXm/igttppoxIBNrB2fq+9OQGTYeMt1GbaIknHN14p4FTLEC zCVygTjjMwXxjS4Z/ZbKZwu0Zcc2hzB14DkwnisrQuj5tQnYSDdIGUD2+CXYfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705079309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eEuicgCP+QqzsejWvj4aRVw2hgCpvTZ/iepLXuHsvMU=; b=f38yh2mH058DlmyLnFYnr+j83Tpi2Y+OOAg5PcjJzSLjWVPz5GfIImZgl+Ki3qKaeZZ3xi odbtYGHtnDZ/l3UcBy8DFQiDWe/QukyiO8Gev8zSUfg+Dlza2SoSXf4hffRoH52JeMWZwM XEPYG7dQl23Nd4wmaQq6nHPa96DDAm/0Bnx4aLd8NVg9DUdCTg5M2eFGuZhBIEwMmMMFEX +epvCNGRugLzaDc3cl8WdpF+UBhe/kSLxyL9sFSLxn/r2purNc1w9jl5zQ3Lv/gUOFFuCV s9g+hdtPGupcVMjbrCdybvtwcdHG1kIu5b4IjnJ1oQijHoh9bsL4SXPS7DlDxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705079309; a=rsa-sha256; cv=none; b=rJaBu75Fnu4Nx6qKNgP/fR9rmRMfoNvAhuRaEtpG0zJavbrc8Fsv/JvEMR2Yj+DaTV0TQM JZsOlzoddp4i+d6NmWzV4FEy1ZJR2sTTfWBTsvGb6WBhr36N+DaFOTFa5C8gn6AmxgL+0O eHoh2wTJajum6K5scuAgeXOUfX3BEDGL3swdvC+gPkdvYZ/+2kygWeebimXRwnIT9sy0VY rJj4z+Rs43dKdaU5fdxPSAzyH+03qMQA4xIIZ+XGN/5yLxJczZ3OTQYxd+4fzEjNwyJy0B A8dKKXKFtnCRWfcnrJX5GiZ86ZZET8AgFrAgAskv3N8U+bhK2YhiQVWZ3Pq9WQ== 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 4TBSfj0bmMz19G1; Fri, 12 Jan 2024 17:08: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 40CH8S06015364; Fri, 12 Jan 2024 17:08:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CH8Stk015361; Fri, 12 Jan 2024 17:08:28 GMT (envelope-from git) Date: Fri, 12 Jan 2024 17:08:28 GMT Message-Id: <202401121708.40CH8Stk015361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 0459cf327549 - stable/14 - if_tuntap: fix NOIP build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0459cf327549f067ea1583a8d428e556232b6082 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=0459cf327549f067ea1583a8d428e556232b6082 commit 0459cf327549f067ea1583a8d428e556232b6082 Author: Gleb Smirnoff AuthorDate: 2023-12-04 18:18:56 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 17:05:12 +0000 if_tuntap: fix NOIP build Note: this removes one TUNDEBUG() for the sake of not having one more ifdefed variable declaration and for the overall code brevity. The call from tuntap into LRO can be so easily traced with dtrace(1) that an 80-ish printf(9)-based debugging can be omitted. Fixes: 99c79cab422705f92f05a2924a29bdf823372ebf (cherry picked from commit 5b0010b4678d778967a5a82fb38507e46a071e38) --- sys/net/if_tuntap.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index 98c5044d6867..4cb219dc92b6 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -1178,13 +1178,13 @@ tundtor(void *data) if ((tp->tun_flags & TUN_VMNET) != 0 || (l2tun && (ifp->if_flags & IFF_LINK0) != 0)) goto out; - +#if defined(INET) || defined(INET6) if (l2tun && tp->tun_lro_ready) { TUNDEBUG (ifp, "LRO disabled\n"); tcp_lro_free(&tp->tun_lro); tp->tun_lro_ready = false; } - +#endif if (ifp->if_flags & IFF_UP) { TUN_UNLOCK(tp); if_down(ifp); @@ -1229,6 +1229,7 @@ tuninit(struct ifnet *ifp) getmicrotime(&ifp->if_lastchange); TUN_UNLOCK(tp); } else { +#if defined(INET) || defined(INET6) if (tcp_lro_init(&tp->tun_lro) == 0) { TUNDEBUG(ifp, "LRO enabled\n"); tp->tun_lro.ifp = ifp; @@ -1237,6 +1238,7 @@ tuninit(struct ifnet *ifp) TUNDEBUG(ifp, "Could not enable LRO\n"); tp->tun_lro_ready = false; } +#endif ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; TUN_UNLOCK(tp); /* attempt to start output */ @@ -1783,7 +1785,6 @@ tunwrite_l2(struct tuntap_softc *tp, struct mbuf *m, struct epoch_tracker et; struct ether_header *eh; struct ifnet *ifp; - int result; ifp = TUN2IFP(tp); @@ -1839,14 +1840,12 @@ tunwrite_l2(struct tuntap_softc *tp, struct mbuf *m, /* Pass packet up to parent. */ CURVNET_SET(ifp->if_vnet); NET_EPOCH_ENTER(et); - if (tp->tun_lro_ready && ifp->if_capenable & IFCAP_LRO) { - result = tcp_lro_rx(&tp->tun_lro, m, 0); - TUNDEBUG(ifp, "tcp_lro_rx() returned %d\n", result); - } else - result = TCP_LRO_CANNOT; - if (result == 0) +#if defined(INET) || defined(INET6) + if (tp->tun_lro_ready && ifp->if_capenable & IFCAP_LRO && + tcp_lro_rx(&tp->tun_lro, m, 0) == 0) tcp_lro_flush_all(&tp->tun_lro); else +#endif (*ifp->if_input)(ifp, m); NET_EPOCH_EXIT(et); CURVNET_RESTORE(); From nobody Fri Jan 12 17:22:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBSz90lJWz57ChT; Fri, 12 Jan 2024 17:22: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 4TBSz90GYqz4dcb; Fri, 12 Jan 2024 17:22:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705080165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSSF+EeR+PO9W9bNCxSGKV64HVk/f0R2UrirBcTAFJI=; b=nXK9CdSQ8TnY2dt1MS4Q71iAdtDu4zoC+KYR1aBIdYzfO8qCXeCDa6OuJlA/FLBxV6TAKd nVdMPHiQYguOdaFfA1KO5ZlQCK59DcYrJtGNwwndK20FX1q/DuoUotedm7Ou+R1VsEFHcV Pj1XzGWVHNJwPMrXsluwxGiQkIlv3Ss0vkY1DM4Y0oo7Po4fWO6yI63E1VATblEojlCZhh SvQTnl2o/k5T0pvNqsh9kgPMLYj7w86MoHLek9Y5D7pB4VijiKh6YS3a/Uju2IpvnGr6qg 6yyzRDVUCD09BGiHNdtBrmKzvk9dtBcTi2X3Ey7RC4U/XqjBkXud48+/mMOGxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705080165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSSF+EeR+PO9W9bNCxSGKV64HVk/f0R2UrirBcTAFJI=; b=Gv9vc561Wb9Ys0c3e4spgGxvBWyx6vHDM4WrG4LZFKS1qq1ROLtQ7b6cfO0Dm+GbHQn2Ji R8ub+t80rgwBhMHKpVI41861PuqA7YmLWZSYZS2yrC/bsR5ThqZntnTQ1ey+ifM8QAIwqT L8kZotuNa3GLMfFU9AQFS2QbBcbtQoJWJA+LrY1U7tpClWn6tCUMZFkBxg8FbSOa2AKrkP cB0WU7z22ZyDg7BEZkJOjZ9pmuizkNFRO8eM77JeDCJaYoVochoGI7jOqdZ8BoG35KfGsc txYIkF3pYX3w05a4fsjpYByP0LhoISdcD78IrOSRZFIkRYx0NA5OCM/ui9xYdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705080165; a=rsa-sha256; cv=none; b=ETBC7g4RQsygcgqYMXlL0M8mphFuOnZIe8dC1Bix1EC2O26dlJ4vShaPo22H4nXlrR5xQQ bR5sx6CErnQ1AYw9LTwypwCmzAdLuNIzRiX3nwN5TLJ0NW9InSpTpSgGMrfLd0MjRGfvRR xJqUdXn5PiZHTJWzJLJ5TEYuoeliF1bZzUtxTX76SqXdxQCchvXA47vmaFBL4YOwUy6SEU rpzKUb5kbx1KUP/paVgxc8PGpnGpqCRSgkVpfxTu/3z4bUH1an//IIICUoWuoLmHIPxzbA jRymlgX17CX1M3s6J3XofPKxnTlMp5MbTJ6ny+BDPonYEhq8wb1gEFS+WeVz3g== 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 4TBSz86R7Xz19dm; Fri, 12 Jan 2024 17:22: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 40CHMiNG048930; Fri, 12 Jan 2024 17:22:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CHMiNo048927; Fri, 12 Jan 2024 17:22:44 GMT (envelope-from git) Date: Fri, 12 Jan 2024 17:22:44 GMT Message-Id: <202401121722.40CHMiNo048927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 15eda0e9027d - stable/13 - udplite: fix checksum computation on the sender side List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 15eda0e9027d39d4e38e23a31752b1e02e2d2d6c Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=15eda0e9027d39d4e38e23a31752b1e02e2d2d6c commit 15eda0e9027d39d4e38e23a31752b1e02e2d2d6c Author: Michael Tuexen AuthorDate: 2023-11-01 09:24:56 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 17:22:20 +0000 udplite: fix checksum computation on the sender side Don't fill the fields of the UDP/IP header not used for the checksum computation before performing the checksum computation. Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D42275 (cherry picked from commit aa64a8f5c35c13b1c325f1a4597c987a37bec5da) --- sys/netinet/udp_usrreq.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index a476b0d8251a..ea9ff161e429 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1408,8 +1408,12 @@ udp_output(struct inpcb *inp, struct mbuf *m, struct sockaddr *addr, * into network format. */ ui = mtod(m, struct udpiphdr *); - bzero(ui->ui_x1, sizeof(ui->ui_x1)); /* XXX still needed? */ - ui->ui_v = IPVERSION << 4; + /* + * Filling only those fields of udpiphdr that participate in the + * checksum calculation. The rest must be zeroed and will be filled + * later. + */ + bzero(ui->ui_x1, sizeof(ui->ui_x1)); ui->ui_pr = pr; ui->ui_src = laddr; ui->ui_dst = faddr; @@ -1434,16 +1438,6 @@ udp_output(struct inpcb *inp, struct mbuf *m, struct sockaddr *addr, cscov_partial = (cscov == 0) ? 0 : 1; } - /* - * Set the Don't Fragment bit in the IP header. - */ - if (inp->inp_flags & INP_DONTFRAG) { - struct ip *ip; - - ip = (struct ip *)&ui->ui_i; - ip->ip_off |= htons(IP_DF); - } - if (inp->inp_socket->so_options & SO_DONTROUTE) ipflags |= IP_ROUTETOIF; if (inp->inp_socket->so_options & SO_BROADCAST) @@ -1477,9 +1471,16 @@ udp_output(struct inpcb *inp, struct mbuf *m, struct sockaddr *addr, m->m_pkthdr.csum_flags = CSUM_UDP; m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum); } + /* + * After finishing the checksum computation, fill the remaining fields + * of udpiphdr. + */ + ((struct ip *)ui)->ip_v = IPVERSION; + ((struct ip *)ui)->ip_tos = tos; ((struct ip *)ui)->ip_len = htons(sizeof(struct udpiphdr) + len); - ((struct ip *)ui)->ip_ttl = inp->inp_ip_ttl; /* XXX */ - ((struct ip *)ui)->ip_tos = tos; /* XXX */ + if (inp->inp_flags & INP_DONTFRAG) + ((struct ip *)ui)->ip_off |= htons(IP_DF); + ((struct ip *)ui)->ip_ttl = inp->inp_ip_ttl; UDPSTAT_INC(udps_opackets); /* From nobody Fri Jan 12 17:50:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBTbY451jz57FRm; Fri, 12 Jan 2024 17:50: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 4TBTbY3dQmz4hwl; Fri, 12 Jan 2024 17:50:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705081849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XuKFWaw19+8oCjGX/HHWSPum8USxK6SV+nSXh/VVOEM=; b=A8eNPagXZumWQTksXTGSdtXTm2mdLSDK3yMJCN33XQQkCJGM/KIIYpQ8bl6DxDHtViDlkL 6BqgDf4kyEy0YNt1QpnySGlRGy9zZ8RODSSOalLHVLUPKxEXfuWDCUXDArZ4dN9oI/WFwF UYbEkqNMi5A65XbgAmamNvc6IMIv+AZ2OEtyjP/krBDo2JuGMcZASLJPZl0tW73Y1oiVhu bFbrRR41UFDymjTk4ccW2QOJgWpolpVIns8QgoVBPBlsTCVFBGPfCShCP5WtJkz7hZmEii FaSvT3gvZqT7ZH54nJ0I2WYbwATYC9Tus73zPCa9i/xnV09MVuw4IAQ1etLk1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705081849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XuKFWaw19+8oCjGX/HHWSPum8USxK6SV+nSXh/VVOEM=; b=dOBGXluqFC9TrdUS+BlPQkp7RjMyqUbzTRBxh3q2/PtPa65yDkmb7JUzr8rFvyLz0+N9fo 6m4Pvqc/m5ghP7W/XkDj8jS+8wifpXsMy8sOis4fvOZ4Nr0MilvO/hXxglEkDwh/bzYtdh /tXYLsQDo86bEuXP82NvnI7RQh4xG+2mamIP1/kA5PuRZsla5c2apZQW03GYslO6/UsA57 6RB74BmHwn/u04mGTMgkP++tufDR7W0f0FKHyx2DnSWV6UEQF4SvYfXsKhIlz1KcnMkJ66 yC7cfykpSwfu+zCk363w3xonZ3jmVWyubhiWEbvc1POvrASIohT8939z8aiCLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705081849; a=rsa-sha256; cv=none; b=iiBcbpuCFoxRCdB5w5atb8w8J/ODGKBqIydMuC6MqNANhKUMwysUP1C2kJUbW1umhE6V++ f3UlE0Sue+tTLZj6ahD713J3N8z4+/5eT5EdFFwCv3xTaO55FqMsZ/HJjcSRdH6s+lZGw/ u7MOd5toz/DzMQXAsRPVtejVyFZwl5jAYiFhRHLJqp6kK2HVBYMS4LkOntyk5eFyEpfviO Z0mj3aO+VjzWKj4SE/FvhJAsAmsoExSR9SHzHBUEnOnb4bLqjNdGKsHFfpdsGmXf9jz6J0 bfhxCbc8DAGOTGTY/O3AoyCABH+2Rz73zdF/KuV6SNPPg4OU2i2eDox0cU8vQg== 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 4TBTbY2gr8z1B3d; Fri, 12 Jan 2024 17:50: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 40CHonRr093053; Fri, 12 Jan 2024 17:50:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CHoniC093050; Fri, 12 Jan 2024 17:50:49 GMT (envelope-from git) Date: Fri, 12 Jan 2024 17:50:49 GMT Message-Id: <202401121750.40CHoniC093050@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 3b766249d9f0 - stable/13 - udplite: make socketoption available on IPv6 sockets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3b766249d9f04a4cb8d9d44c98853611e02bfd6d Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=3b766249d9f04a4cb8d9d44c98853611e02bfd6d commit 3b766249d9f04a4cb8d9d44c98853611e02bfd6d Author: Michael Tuexen AuthorDate: 2023-11-05 14:28:54 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 17:35:25 +0000 udplite: make socketoption available on IPv6 sockets This patch allows the IPPROTO_UDPLITE-level socket options UDPLITE_SEND_CSCOV and UDPLITE_RECV_CSCOV to be used on AF_INET6 sockets in addition to AF_INET sockets. Reviewed by: ae, rscheff MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42430 (cherry picked from commit 03c3a70abe5e9fa259b954de78ae69229fa9c99f) --- sys/netinet/udp_usrreq.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index ea9ff161e429..c868bf777103 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1009,6 +1009,10 @@ udp_ctloutput(struct socket *so, struct sockopt *sopt) #if defined(IPSEC) || defined(IPSEC_SUPPORT) #ifdef INET case UDP_ENCAP: + if (!INP_CHECK_SOCKAF(so, AF_INET)) { + INP_WUNLOCK(inp); + return (EINVAL); + } if (!IPSEC_ENABLED(ipv4)) { INP_WUNLOCK(inp); return (ENOPROTOOPT); @@ -1056,6 +1060,10 @@ udp_ctloutput(struct socket *so, struct sockopt *sopt) #if defined(IPSEC) || defined(IPSEC_SUPPORT) #ifdef INET case UDP_ENCAP: + if (!INP_CHECK_SOCKAF(so, AF_INET)) { + INP_WUNLOCK(inp); + return (EINVAL); + } if (!IPSEC_ENABLED(ipv4)) { INP_WUNLOCK(inp); return (ENOPROTOOPT); From nobody Fri Jan 12 17:50:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBTbZ5bv4z57FP4; Fri, 12 Jan 2024 17:50: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 4TBTbZ44M6z4hm9; Fri, 12 Jan 2024 17:50:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705081850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u6Z3XkQntTYrv4UzRFrcNMl1VJD/A6tTzIwsH6/pcoA=; b=IuGGE2hJqZ/qPD54JAMTnMYwipJrmNTWbn8Ghq9rBcAw8caWgTMleGni6O8SKYz+3ZzTi6 13KYmRhsipykCV6j2sFFhDvSU4+Qsil8tuJxk3rYpPu2U0yTXfl34h0kSujKJAENg7IZUC I1FMG+O3o/Wxwv74RdLC2e0DfLilapqcrinH6D+qSlbBCyXme0HnQjCr4wUISuG02nVn7W GXvhE6dRgbW2ZGBUssBawg0y7XztHUYawBAsaBbRqnJmaw90WwoVHupTBFarHTVRWSmt4u +gtA7AhrGgriBAWAgsYta6J7Q+IcNMRj8dHAmwxiSK9yoz8s/uJLP29EmY0abA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705081850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u6Z3XkQntTYrv4UzRFrcNMl1VJD/A6tTzIwsH6/pcoA=; b=OBo9C4i3mF9FTi3etvRj5h8Rlc9jJGQe68fIavd6TXOKyrk/HbtXoRUCwsXVHqowDPKDGy Kn4A/74QnPIgE3kpdKA/H7huvfqJnaP9pLCxsI0kS9ZM0qZivjNMzdQuZ9Q59r1/2Ad63N yG6aJaHfcZA++EO9F6XCGFbjIVXL9S3k0EbBdF3DKkx78RlffUhKDSKflOaTr8I+CtPOdE ZAHP6jA/7zAKVooBfkCtUZGzBNssy0D6WFba8ZHfuEBJuGYr0T7dcHxW3XEqFgEdGXQAZ7 c89DP2PIYO4fkJJZiX8IHcpthEHJ0JIYfngpMtjEwZuaio1uFek/Yc2s0BV6uA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705081850; a=rsa-sha256; cv=none; b=CUj30MhwFje7OuJ1DEwy9YrixegnKghIA/s78VUGxElb0PqA61miumE8z6gqx8dgF8jL0n bVSj6WubwnedxUfdQM3DJvz6+KNRZQ6bfMAmyaaFoivC7Xoh/vWbZNzQPNaa8hvI12hMKc vvVRc/SBsmV10kw8G3xyS3YBHkPEPHqxAIYs+09wo8044uteXgcD6UrJE5oRc977TDeWhN 76kD4YK8jyaM4Uuee/mrv4FjM5bG/XCnC4HMJhlFZtIHNARH+2Ss7M+1aVVHuzIZbHpFIW lN5naXKBMPccLP6zf4YT5sDSvyylYkZwmrSAXdfezycvdwHi9ez9ZIQHoI7hZg== 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 4TBTbZ39Msz1BVd; Fri, 12 Jan 2024 17:50: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 40CHoobO093996; Fri, 12 Jan 2024 17:50:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CHoo0g093982; Fri, 12 Jan 2024 17:50:50 GMT (envelope-from git) Date: Fri, 12 Jan 2024 17:50:50 GMT Message-Id: <202401121750.40CHoo0g093982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: fab809a67d23 - stable/13 - sctp: minor clean List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fab809a67d2328dd369fb9013fe63d01bbd5d982 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=fab809a67d2328dd369fb9013fe63d01bbd5d982 commit fab809a67d2328dd369fb9013fe63d01bbd5d982 Author: Michael Tuexen AuthorDate: 2023-11-06 10:04:15 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 17:50:11 +0000 sctp: minor clean No functional change intended. (cherry picked from commit 3bbbfc8dcd3622b49907e359c8e9682def0bae25) --- sys/netinet/sctp_sysctl.c | 145 +++++++++++++++++++++++----------------------- 1 file changed, 73 insertions(+), 72 deletions(-) diff --git a/sys/netinet/sctp_sysctl.c b/sys/netinet/sctp_sysctl.c index fa93deba8b53..60c4a506ddae 100644 --- a/sys/netinet/sctp_sysctl.c +++ b/sys/netinet/sctp_sysctl.c @@ -864,11 +864,11 @@ sctp_sysctl_handle_trace_log_clear(SYSCTL_HANDLER_ARGS) #define SCTP_UINT_SYSCTL(mib_name, var_name, prefix) \ SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, \ - CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW); + 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); + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RWTUN|CTLFLAG_NOFETCH) #define SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, flags) \ static int \ @@ -889,75 +889,76 @@ sctp_sysctl_handle_trace_log_clear(SYSCTL_HANDLER_ARGS) } \ return (error); \ } \ - SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mib_name, flags, \ - 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); + &VNET_NAME(system_base_info.sctpsysctl.var_name), 0, \ + prefix##_DESC) /* * sysctl definitions */ -SCTP_UINT_SYSCTL(sendspace, sctp_sendspace, SCTPCTL_MAXDGRAM) -SCTP_UINT_SYSCTL(recvspace, sctp_recvspace, SCTPCTL_RECVSPACE) -SCTP_UINT_SYSCTL(auto_asconf, sctp_auto_asconf, SCTPCTL_AUTOASCONF) -SCTP_UINT_SYSCTL(ecn_enable, sctp_ecn_enable, SCTPCTL_ECN_ENABLE) -SCTP_UINT_SYSCTL(pr_enable, sctp_pr_enable, SCTPCTL_PR_ENABLE) +SCTP_UINT_SYSCTL(sendspace, sctp_sendspace, SCTPCTL_MAXDGRAM); +SCTP_UINT_SYSCTL(recvspace, sctp_recvspace, SCTPCTL_RECVSPACE); +SCTP_UINT_SYSCTL(auto_asconf, sctp_auto_asconf, SCTPCTL_AUTOASCONF); +SCTP_UINT_SYSCTL(ecn_enable, sctp_ecn_enable, SCTPCTL_ECN_ENABLE); +SCTP_UINT_SYSCTL(pr_enable, sctp_pr_enable, SCTPCTL_PR_ENABLE); SYSCTL_PROC(_net_inet_sctp, OID_AUTO, auth_enable, CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW, NULL, 0, sctp_sysctl_handle_auth, "IU", SCTPCTL_AUTH_ENABLE_DESC); SYSCTL_PROC(_net_inet_sctp, OID_AUTO, asconf_enable, CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW, NULL, 0, sctp_sysctl_handle_asconf, "IU", SCTPCTL_ASCONF_ENABLE_DESC); -SCTP_UINT_SYSCTL(reconfig_enable, sctp_reconfig_enable, SCTPCTL_RECONFIG_ENABLE) -SCTP_UINT_SYSCTL(nrsack_enable, sctp_nrsack_enable, SCTPCTL_NRSACK_ENABLE) -SCTP_UINT_SYSCTL(pktdrop_enable, sctp_pktdrop_enable, SCTPCTL_PKTDROP_ENABLE) -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_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_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) -SCTP_UINT_SYSCTL(asoc_resource, sctp_asoc_free_resc_limit, SCTPCTL_ASOC_RESOURCE) -SCTP_UINT_SYSCTL(heartbeat_interval, sctp_heartbeat_interval_default, SCTPCTL_HEARTBEAT_INTERVAL) -SCTP_UINT_SYSCTL(pmtu_raise_time, sctp_pmtu_raise_time_default, SCTPCTL_PMTU_RAISE_TIME) -SCTP_UINT_SYSCTL(shutdown_guard_time, sctp_shutdown_guard_time_default, SCTPCTL_SHUTDOWN_GUARD_TIME) -SCTP_UINT_SYSCTL(secret_lifetime, sctp_secret_lifetime_default, SCTPCTL_SECRET_LIFETIME) -SCTP_UINT_SYSCTL(rto_max, sctp_rto_max_default, SCTPCTL_RTO_MAX) -SCTP_UINT_SYSCTL(rto_min, sctp_rto_min_default, SCTPCTL_RTO_MIN) -SCTP_UINT_SYSCTL(rto_initial, sctp_rto_initial_default, SCTPCTL_RTO_INITIAL) -SCTP_UINT_SYSCTL(init_rto_max, sctp_init_rto_max_default, SCTPCTL_INIT_RTO_MAX) -SCTP_UINT_SYSCTL(valid_cookie_life, sctp_valid_cookie_life_default, SCTPCTL_VALID_COOKIE_LIFE) -SCTP_UINT_SYSCTL(init_rtx_max, sctp_init_rtx_max_default, SCTPCTL_INIT_RTX_MAX) -SCTP_UINT_SYSCTL(assoc_rtx_max, sctp_assoc_rtx_max_default, SCTPCTL_ASSOC_RTX_MAX) -SCTP_UINT_SYSCTL(path_rtx_max, sctp_path_rtx_max_default, SCTPCTL_PATH_RTX_MAX) -SCTP_UINT_SYSCTL(path_pf_threshold, sctp_path_pf_threshold, SCTPCTL_PATH_PF_THRESHOLD) -SCTP_UINT_SYSCTL(add_more_on_output, sctp_add_more_threshold, SCTPCTL_ADD_MORE_ON_OUTPUT) -SCTP_UINT_SYSCTL(incoming_streams, sctp_nr_incoming_streams_default, SCTPCTL_INCOMING_STREAMS) -SCTP_UINT_SYSCTL(outgoing_streams, sctp_nr_outgoing_streams_default, SCTPCTL_OUTGOING_STREAMS) -SCTP_UINT_SYSCTL(cmt_on_off, sctp_cmt_on_off, SCTPCTL_CMT_ON_OFF) -SCTP_UINT_SYSCTL(cmt_use_dac, sctp_cmt_use_dac, SCTPCTL_CMT_USE_DAC) -SCTP_UINT_SYSCTL(cwnd_maxburst, sctp_use_cwnd_based_maxburst, SCTPCTL_CWND_MAXBURST) -SCTP_UINT_SYSCTL(nat_friendly, sctp_nat_friendly, SCTPCTL_NAT_FRIENDLY) -SCTP_UINT_SYSCTL(abc_l_var, sctp_L2_abc_variable, SCTPCTL_ABC_L_VAR) -SCTP_UINT_SYSCTL(max_chained_mbufs, sctp_mbuf_threshold_count, SCTPCTL_MAX_CHAINED_MBUFS) -SCTP_UINT_SYSCTL(do_sctp_drain, sctp_do_drain, SCTPCTL_DO_SCTP_DRAIN) -SCTP_UINT_SYSCTL(hb_max_burst, sctp_hb_maxburst, SCTPCTL_HB_MAX_BURST) -SCTP_UINT_SYSCTL(abort_at_limit, sctp_abort_if_one_2_one_hits_limit, SCTPCTL_ABORT_AT_LIMIT) -SCTP_UINT_SYSCTL(min_residual, sctp_min_residual, SCTPCTL_MIN_RESIDUAL) -SCTP_UINT_SYSCTL(max_retran_chunk, sctp_max_retran_chunk, SCTPCTL_MAX_RETRAN_CHUNK) -SCTP_UINT_SYSCTL(log_level, sctp_logging_level, SCTPCTL_LOGGING_LEVEL) -SCTP_UINT_SYSCTL(default_cc_module, sctp_default_cc_module, SCTPCTL_DEFAULT_CC_MODULE) -SCTP_UINT_SYSCTL(default_ss_module, sctp_default_ss_module, SCTPCTL_DEFAULT_SS_MODULE) -SCTP_UINT_SYSCTL(default_frag_interleave, sctp_default_frag_interleave, SCTPCTL_DEFAULT_FRAG_INTERLEAVE) -SCTP_UINT_SYSCTL(mobility_base, sctp_mobility_base, SCTPCTL_MOBILITY_BASE) -SCTP_UINT_SYSCTL(mobility_fasthandoff, sctp_mobility_fasthandoff, SCTPCTL_MOBILITY_FASTHANDOFF) +SCTP_UINT_SYSCTL(reconfig_enable, sctp_reconfig_enable, SCTPCTL_RECONFIG_ENABLE); +SCTP_UINT_SYSCTL(nrsack_enable, sctp_nrsack_enable, SCTPCTL_NRSACK_ENABLE); +SCTP_UINT_SYSCTL(pktdrop_enable, sctp_pktdrop_enable, SCTPCTL_PKTDROP_ENABLE); +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_RDTUN(tcbhashsize, sctp_hashtblsize, SCTPCTL_TCBHASHSIZE); +SCTP_UINT_SYSCTL_TUN(pcbhashsize, sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE); +SCTP_UINT_SYSCTL_RDTUN(chunkscale, sctp_chunkscale, SCTPCTL_CHUNKSCALE); +SCTP_UINT_SYSCTL(min_split_point, sctp_min_split_point, SCTPCTL_MIN_SPLIT_POINT); +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); +SCTP_UINT_SYSCTL(asoc_resource, sctp_asoc_free_resc_limit, SCTPCTL_ASOC_RESOURCE); +SCTP_UINT_SYSCTL(heartbeat_interval, sctp_heartbeat_interval_default, SCTPCTL_HEARTBEAT_INTERVAL); +SCTP_UINT_SYSCTL(pmtu_raise_time, sctp_pmtu_raise_time_default, SCTPCTL_PMTU_RAISE_TIME); +SCTP_UINT_SYSCTL(shutdown_guard_time, sctp_shutdown_guard_time_default, SCTPCTL_SHUTDOWN_GUARD_TIME); +SCTP_UINT_SYSCTL(secret_lifetime, sctp_secret_lifetime_default, SCTPCTL_SECRET_LIFETIME); +SCTP_UINT_SYSCTL(rto_max, sctp_rto_max_default, SCTPCTL_RTO_MAX); +SCTP_UINT_SYSCTL(rto_min, sctp_rto_min_default, SCTPCTL_RTO_MIN); +SCTP_UINT_SYSCTL(rto_initial, sctp_rto_initial_default, SCTPCTL_RTO_INITIAL); +SCTP_UINT_SYSCTL(init_rto_max, sctp_init_rto_max_default, SCTPCTL_INIT_RTO_MAX); +SCTP_UINT_SYSCTL(valid_cookie_life, sctp_valid_cookie_life_default, SCTPCTL_VALID_COOKIE_LIFE); +SCTP_UINT_SYSCTL(init_rtx_max, sctp_init_rtx_max_default, SCTPCTL_INIT_RTX_MAX); +SCTP_UINT_SYSCTL(assoc_rtx_max, sctp_assoc_rtx_max_default, SCTPCTL_ASSOC_RTX_MAX); +SCTP_UINT_SYSCTL(path_rtx_max, sctp_path_rtx_max_default, SCTPCTL_PATH_RTX_MAX); +SCTP_UINT_SYSCTL(path_pf_threshold, sctp_path_pf_threshold, SCTPCTL_PATH_PF_THRESHOLD); +SCTP_UINT_SYSCTL(add_more_on_output, sctp_add_more_threshold, SCTPCTL_ADD_MORE_ON_OUTPUT); +SCTP_UINT_SYSCTL(incoming_streams, sctp_nr_incoming_streams_default, SCTPCTL_INCOMING_STREAMS); +SCTP_UINT_SYSCTL(outgoing_streams, sctp_nr_outgoing_streams_default, SCTPCTL_OUTGOING_STREAMS); +SCTP_UINT_SYSCTL(cmt_on_off, sctp_cmt_on_off, SCTPCTL_CMT_ON_OFF); +SCTP_UINT_SYSCTL(cmt_use_dac, sctp_cmt_use_dac, SCTPCTL_CMT_USE_DAC); +SCTP_UINT_SYSCTL(cwnd_maxburst, sctp_use_cwnd_based_maxburst, SCTPCTL_CWND_MAXBURST); +SCTP_UINT_SYSCTL(nat_friendly, sctp_nat_friendly, SCTPCTL_NAT_FRIENDLY); +SCTP_UINT_SYSCTL(abc_l_var, sctp_L2_abc_variable, SCTPCTL_ABC_L_VAR); +SCTP_UINT_SYSCTL(max_chained_mbufs, sctp_mbuf_threshold_count, SCTPCTL_MAX_CHAINED_MBUFS); +SCTP_UINT_SYSCTL(do_sctp_drain, sctp_do_drain, SCTPCTL_DO_SCTP_DRAIN); +SCTP_UINT_SYSCTL(hb_max_burst, sctp_hb_maxburst, SCTPCTL_HB_MAX_BURST); +SCTP_UINT_SYSCTL(abort_at_limit, sctp_abort_if_one_2_one_hits_limit, SCTPCTL_ABORT_AT_LIMIT); +SCTP_UINT_SYSCTL(min_residual, sctp_min_residual, SCTPCTL_MIN_RESIDUAL); +SCTP_UINT_SYSCTL(max_retran_chunk, sctp_max_retran_chunk, SCTPCTL_MAX_RETRAN_CHUNK); +SCTP_UINT_SYSCTL(log_level, sctp_logging_level, SCTPCTL_LOGGING_LEVEL); +SCTP_UINT_SYSCTL(default_cc_module, sctp_default_cc_module, SCTPCTL_DEFAULT_CC_MODULE); +SCTP_UINT_SYSCTL(default_ss_module, sctp_default_ss_module, SCTPCTL_DEFAULT_SS_MODULE); +SCTP_UINT_SYSCTL(default_frag_interleave, sctp_default_frag_interleave, SCTPCTL_DEFAULT_FRAG_INTERLEAVE); +SCTP_UINT_SYSCTL(mobility_base, sctp_mobility_base, SCTPCTL_MOBILITY_BASE); +SCTP_UINT_SYSCTL(mobility_fasthandoff, sctp_mobility_fasthandoff, SCTPCTL_MOBILITY_FASTHANDOFF); #if defined(SCTP_LOCAL_TRACE_BUF) SYSCTL_PROC(_net_inet_sctp, OID_AUTO, log, CTLFLAG_VNET | CTLTYPE_STRUCT | CTLFLAG_RD, NULL, 0, sctp_sysctl_handle_trace_log, "S,sctplog", "SCTP logging (struct sctp_log)"); @@ -966,21 +967,21 @@ SYSCTL_PROC(_net_inet_sctp, OID_AUTO, clear_trace, CTLFLAG_VNET | CTLTYPE_UINT | #endif SYSCTL_PROC(_net_inet_sctp, OID_AUTO, udp_tunneling_port, CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW, NULL, 0, sctp_sysctl_handle_udp_tunneling, "IU", SCTPCTL_UDP_TUNNELING_PORT_DESC); -SCTP_UINT_SYSCTL(enable_sack_immediately, sctp_enable_sack_immediately, SCTPCTL_SACK_IMMEDIATELY_ENABLE) -SCTP_UINT_SYSCTL(nat_friendly_init, sctp_inits_include_nat_friendly, SCTPCTL_NAT_FRIENDLY_INITS) -SCTP_UINT_SYSCTL(vtag_time_wait, sctp_vtag_time_wait, SCTPCTL_TIME_WAIT) -SCTP_UINT_SYSCTL(buffer_splitting, sctp_buffer_splitting, SCTPCTL_BUFFER_SPLITTING) -SCTP_UINT_SYSCTL(initial_cwnd, sctp_initial_cwnd, SCTPCTL_INITIAL_CWND) -SCTP_UINT_SYSCTL(rttvar_bw, sctp_rttvar_bw, SCTPCTL_RTTVAR_BW) -SCTP_UINT_SYSCTL(rttvar_rtt, sctp_rttvar_rtt, SCTPCTL_RTTVAR_RTT) -SCTP_UINT_SYSCTL(rttvar_eqret, sctp_rttvar_eqret, SCTPCTL_RTTVAR_EQRET) -SCTP_UINT_SYSCTL(rttvar_steady_step, sctp_steady_step, SCTPCTL_RTTVAR_STEADYS) -SCTP_UINT_SYSCTL(use_dcccecn, sctp_use_dccc_ecn, SCTPCTL_RTTVAR_DCCCECN) -SCTP_UINT_SYSCTL(blackhole, sctp_blackhole, SCTPCTL_BLACKHOLE) -SCTP_UINT_SYSCTL(sendall_limit, sctp_sendall_limit, SCTPCTL_SENDALL_LIMIT) -SCTP_UINT_SYSCTL(diag_info_code, sctp_diag_info_code, SCTPCTL_DIAG_INFO_CODE) +SCTP_UINT_SYSCTL(enable_sack_immediately, sctp_enable_sack_immediately, SCTPCTL_SACK_IMMEDIATELY_ENABLE); +SCTP_UINT_SYSCTL(nat_friendly_init, sctp_inits_include_nat_friendly, SCTPCTL_NAT_FRIENDLY_INITS); +SCTP_UINT_SYSCTL(vtag_time_wait, sctp_vtag_time_wait, SCTPCTL_TIME_WAIT); +SCTP_UINT_SYSCTL(buffer_splitting, sctp_buffer_splitting, SCTPCTL_BUFFER_SPLITTING); +SCTP_UINT_SYSCTL(initial_cwnd, sctp_initial_cwnd, SCTPCTL_INITIAL_CWND); +SCTP_UINT_SYSCTL(rttvar_bw, sctp_rttvar_bw, SCTPCTL_RTTVAR_BW); +SCTP_UINT_SYSCTL(rttvar_rtt, sctp_rttvar_rtt, SCTPCTL_RTTVAR_RTT); +SCTP_UINT_SYSCTL(rttvar_eqret, sctp_rttvar_eqret, SCTPCTL_RTTVAR_EQRET); +SCTP_UINT_SYSCTL(rttvar_steady_step, sctp_steady_step, SCTPCTL_RTTVAR_STEADYS); +SCTP_UINT_SYSCTL(use_dcccecn, sctp_use_dccc_ecn, SCTPCTL_RTTVAR_DCCCECN); +SCTP_UINT_SYSCTL(blackhole, sctp_blackhole, SCTPCTL_BLACKHOLE); +SCTP_UINT_SYSCTL(sendall_limit, sctp_sendall_limit, SCTPCTL_SENDALL_LIMIT); +SCTP_UINT_SYSCTL(diag_info_code, sctp_diag_info_code, SCTPCTL_DIAG_INFO_CODE); #ifdef SCTP_DEBUG -SCTP_UINT_SYSCTL(debug, sctp_debug_on, SCTPCTL_DEBUG) +SCTP_UINT_SYSCTL(debug, sctp_debug_on, SCTPCTL_DEBUG); #endif SYSCTL_PROC(_net_inet_sctp, OID_AUTO, stats, CTLFLAG_VNET | CTLTYPE_STRUCT | CTLFLAG_RW, NULL, 0, sctp_sysctl_handle_stats, "S,sctpstat", "SCTP statistics (struct sctp_stat)"); From nobody Fri Jan 12 17:52:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBTdG6ZYKz57FV1; Fri, 12 Jan 2024 17:52: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 4TBTdG5ZK2z4kSH; Fri, 12 Jan 2024 17:52:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705081938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D7j97GSusO0CWV7UR5yVQF47NUsY3f58+iBx4T4WNRw=; b=kVLykXSnEtItAlVtlwt2ZJXCSd3Yeko/YWi6tD6BfdawGAGNdHWN8gXuJqj+6oxetXWExD 8gfsP1YeBVDNwxAOOAsTk7oXoSa29VgSy5t/a5iDyTFw4VwFBn69gaSUBa+R41RSIVylTQ Yzy9B235tNv3HBJOd3zDmSbo8qycgJ9LCt0Kx5E1ST/55064wD07GaiRicGNPD226rlh3a b0x2XbYIyut9llZ9lbExnT25vRd2uc5WTRMYOvkJh4MLqA5Q+D590iqsPfRJNtTpcGWFiZ 30pdxEkwTpw4iQYnoK3S/fWWdP7Li6kE2VQmbHZyVBkKuROp1tR2k5O+17LF6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705081938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D7j97GSusO0CWV7UR5yVQF47NUsY3f58+iBx4T4WNRw=; b=csdh44nC5AaCkAwx67pOCQbtkwIdF9SnsPzCO3cxdnOOBQGM3JxUz3Dh1H4IudNn1fx4hK fWftzvKtU4IiBmoEa5sooIRo9CplLAd+a/s7ndbJOI5YXHdKXwPiTGuvm7a/KfAiNIMM6d 2MbmKgGIXaTS+SkP0iJFQ9wAfg4DEp2nE3sJPyJ4Kf/rbgG0VeOQJl+eTfpEa6kJJQooc4 oLz+fD9N3nNFZmkYHvHgs9ZJa6/ckdNCCOXbzLc7me7YJ2YPux5XdzW9DqvtAFTmGPALnc kxh+tQ8p5Zm0AFz4OQkkZhSbvlb3iwP8G79OzhWvK+oE/KO0X+cL3zpNZ9U5yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705081938; a=rsa-sha256; cv=none; b=iev7AgEf7PuIvO38JuTxeOim7ZmsE5+bFMMGR3lZu4PBpGOJmZhpFywBoIGx/k8eThgZpP /VCa30vG2EOJAtKf+Aoe4hcpvGc0Fyw/vF8OrsSH5Y9XQYETbul6LIqY47HQCeJ4M84NPW qfwRQ+xrs9yPVXvDlx97BMDx9QLgIx5p6r62KkX68s0m5Bg5cgGzmeMs+z9rVbfs2MUD1k FQnokWBHCbfIjdVOMFtf4sl2qBAe8GMX6ndlqtI1MD9NXUQ7pGDNQxrSX45fOm3jNvTJWq CE+/4NjPNsT8iXTx0PajADM83Z9oTjxN8jAjET7brT92DDEXhXkBFZEKs40yvg== 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 4TBTdG4dDFz1Bwh; Fri, 12 Jan 2024 17:52: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 40CHqIpA098622; Fri, 12 Jan 2024 17:52:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CHqIdq098619; Fri, 12 Jan 2024 17:52:18 GMT (envelope-from git) Date: Fri, 12 Jan 2024 17:52:18 GMT Message-Id: <202401121752.40CHqIdq098619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 4aaf087b879b - stable/13 - if_tuntap: improve code consistency List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4aaf087b879b914a917923fd77a6b15429fd4c77 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=4aaf087b879b914a917923fd77a6b15429fd4c77 commit 4aaf087b879b914a917923fd77a6b15429fd4c77 Author: Michael Tuexen AuthorDate: 2023-11-04 09:22:42 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 17:51:57 +0000 if_tuntap: improve code consistency No functional change intended. Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D42462 (cherry picked from commit 4ffe410e40e90c265c20cb4675ed74a40dc1fcc4) --- sys/net/if_tuntap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index da55034638d1..d9243ae8bb6c 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -1406,8 +1406,7 @@ tunoutput(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst, else af = RO_GET_FAMILY(ro, dst); - if (bpf_peers_present(ifp->if_bpf)) - bpf_mtap2(ifp->if_bpf, &af, sizeof(af), m0); + BPF_MTAP2(ifp, &af, sizeof(af), m0); /* prepend sockaddr? this may abort if the mbuf allocation fails */ if (cached_tun_flags & TUN_LMODE) { From nobody Fri Jan 12 17:53:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBTf64KPZz57FfC; Fri, 12 Jan 2024 17:53:02 +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 4TBTf63T0Vz4kXh; Fri, 12 Jan 2024 17:53:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705081982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=demYKFCs0RzN1twlGoRge3ZPGHKttyYwrDtZyXXx8l4=; b=ISOKX8o6mfw8WXi1FLkkaa4cxbSRqZ+6OHsZpu+fQ4768hSv6jnN2fy4GVzUVVYlRirJTA 1iuEW95PU2ZTDiO9L0a39tGJtdsZQx0W1nTBoG45B13DhbbvA/aIlgzq9Yq4qavu3ehO6W gftwrzhVsnwWnWoGinpn3d1xdgpZ0dC1gT7mYEQ1hRJxkmAg62chdenFUWPFZBGrWkfPEx dg+Wk7/wpXXjFDUBXnYAqbn6gCni+AOEZG7TMCSsoSeGnOmd190FDO1WCOkgQPEuFsWmEf rSa0MRFQUXtLqN6cQaCCfWknwOPpn0KXl8cTNSnMbUcapxabfi5DO8JtD+pKUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705081982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=demYKFCs0RzN1twlGoRge3ZPGHKttyYwrDtZyXXx8l4=; b=n/Os8PTMZ52Oy7xmEjdssh+2zr80QNBTpQOnN8NO1kjyEW8nP0ZAdmi2wJxm2k3dZsPGsM 4r/AvpQSLOhiJMNzv7X4KWCzDRK1I/IWX4u5VqR78lnDpZVn5jrwuuX27h1LfZMqdYSsGE YSw5cEwOfIRD/ATbH+s/O72Zk+50O8U9o+HGvXy4fjWcc+vPgdjwp2plsAofD5ZNdjYRkQ 9ADGV77r8JJ5QV+O1COVGv/9eO5vDBTfojClam7V0807yTvs+drbkHkVdYQcoA7tt3FCSZ 0XYrIwEMrqh70k8+cNpJ1nmvF1fCOH6j4//3p0vRqBU4ErzK8M49RkTaYBf/9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705081982; a=rsa-sha256; cv=none; b=s987mwQk34q2AnFb753y8qAE1icIMvH/3b+vWa6OW8+QKq/EOoDZwNeNwHrRJTmfPkSZ5k 1kpyGJaAsOJ0d4ViYnz57C5pGppUFH7YgakZ23xirYw54OwHgeT8N5kKomNl/uxsjD1p2z s/+5FgZV8RUct2X5T2bdcDe0RdlO7NIp0cc88zcd3gVov6G8N5w67jchXY2c6s+k0ZWfzo M2gwS7rI3FiDsNGeSoXjNi4e0XRitgfKSE9C9d8iyO+S+LIYnrzQanZHE2Ci3/kX5OfCqJ 0Nv1vye83x/gdUku3LNI1rVNnPg93X/BvWUm925aEnMTwceQvyFpTPWOZeLJQQ== 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 4TBTf62YJQz1BcL; Fri, 12 Jan 2024 17:53: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 40CHr2qs099425; Fri, 12 Jan 2024 17:53:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CHr2DF099422; Fri, 12 Jan 2024 17:53:02 GMT (envelope-from git) Date: Fri, 12 Jan 2024 17:53:02 GMT Message-Id: <202401121753.40CHr2DF099422@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: f6aae554b076 - stable/13 - if_tuntap: trigger the bpf hook on transmitting for the tap interface List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f6aae554b0764dcf9fcb9fe886bdf722f3856e0d Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f6aae554b0764dcf9fcb9fe886bdf722f3856e0d commit f6aae554b0764dcf9fcb9fe886bdf722f3856e0d Author: Michael Tuexen AuthorDate: 2023-11-05 19:32:46 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 17:52:36 +0000 if_tuntap: trigger the bpf hook on transmitting for the tap interface The tun interface triggers the bpf hook when a packet is transmitted, the tap interface triggers it when the packet is read from the character device. This is inconsistent. So fix the tap device such that it behaves like the tun device. This is needed for adding support for the tap device to packetdrill. Reviewed by: kevans, rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D42467 (cherry picked from commit 35af22ac986c4f3e8160c943a478492e748b6f23) --- sys/net/if_tuntap.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index d9243ae8bb6c..29e9c05e52bc 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -926,6 +926,16 @@ tunstart_l2(struct ifnet *ifp) TUN_UNLOCK(tp); } /* tunstart_l2 */ +static int +tap_transmit(struct ifnet *ifp, struct mbuf *m) +{ + int error; + + BPF_MTAP(ifp, m); + IFQ_HANDOFF(ifp, m, error); + return (error); +} + /* XXX: should return an error code so it can fail. */ static void tuncreate(struct cdev *dev) @@ -965,6 +975,8 @@ tuncreate(struct cdev *dev) if ((tp->tun_flags & TUN_L2) != 0) { ifp->if_init = tunifinit; ifp->if_start = tunstart_l2; + ifp->if_transmit = tap_transmit; + ifp->if_qflush = if_qflush; ether_gen_addr(ifp, &eaddr); ether_ifattach(ifp, eaddr.octet); @@ -1706,9 +1718,6 @@ tunread(struct cdev *dev, struct uio *uio, int flag) } TUN_UNLOCK(tp); - if ((tp->tun_flags & TUN_L2) != 0) - BPF_MTAP(ifp, m); - len = min(tp->tun_vhdrlen, uio->uio_resid); if (len > 0) { struct virtio_net_hdr_mrg_rxbuf vhdr; From nobody Fri Jan 12 17:53:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBTfv5v13z57FY8; Fri, 12 Jan 2024 17: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 4TBTfv4Ncbz4l0k; Fri, 12 Jan 2024 17: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=1705082023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dX3nAgSXhrgb/S/zA9DLpRhYqZPIRJNojMiql8ZfOSY=; b=oR5MSnEX+smZXBZrhsWPZ4mP3jqYYI5bDayMko4svHllv9lioE8hrDnPk/LWZ3nrMjhSAT paRv7rSQ6IMDXztVTg56UgNKiE0aXTcKoXlfyEr9nZ8RTEAaV79sWMezCzxPy57OC7VuxI uAbkcVVdGVgnVusqsafRmVYhAzLVfuv0asa0FzUlSyTMCKLN5xR19FuLbAMDQUirG13hcG SH5um6eNRXKPDV9XX5gSmPK3slLk4BvsYEUOVLp7SlQKxrlilPvgOTfsjBe48hJFaOAa78 H/oiAF6d2ITNEcvOiO8RFoABH/EuXijSV0HF/YTt8wViIXIrAWQWkFJHoCAqpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705082023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dX3nAgSXhrgb/S/zA9DLpRhYqZPIRJNojMiql8ZfOSY=; b=MkF0ERAy5zF7CO3BXtvzvEvg5jds3Ho/BbrVjlVn3r+0UumP5Qu99K8+VsDCQXfybagTOb VsYC4+oulQsadYPLAwWSxDa9eQI/dTpGAu83lPzWKkWe7V2mgzLEt1hPf6IAoh0yUz7SiX LW14GeDmKkyAppK8a3f4lU4W3jcfuWdCvxIb5wz65YeovFPSl6/T23iveNZ1uKr8iVevX4 C+YIQ3lBUmCJFMbmVcXDxPhehmY31uulu5F+0GJ48rv28aXBXgftQ4ktcKelcO/Rh/Ep3z a8F7AbB7EuhUxaT0xThhYNtYJsNLopCgcZHh9Idf5GPfGxdRzcl5UFRDxO1JNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705082023; a=rsa-sha256; cv=none; b=veZz/DiuDNJT/iVSniYhsVXGAyUi9MxJPsaFtVcAFuZ/N/aSYmrZ7r2J7THo1K2cnG5Ie2 To/24E0M3+KMdGDvMpSgC8mgqiFLJ9HyTCfp2Hu7JrgNknRoBarlU+0P+ef4Hn9vnODYM3 lKaXUkh5EHVgiDnhvU3OQLzlPNyGCIKDJBbZwzlfgtNh1mGiByYII5lWMQ6p/1ihHVeP0l kFvcwOHdNlt8jifmOw9PCx90Ushf85yAWks2CirLp+W5KhB14VZdLiBdzVE1JmXhb4/61/ w5UPmW6+9ZSGEqc9uYq4U4q1ViQrni1cYxy+xtAe3UsduEgyTxmN6Mqf8Pj/ZA== 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 4TBTfv3SRPz1BlD; Fri, 12 Jan 2024 17: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 40CHrhHx099693; Fri, 12 Jan 2024 17: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 40CHrhhv099690; Fri, 12 Jan 2024 17:53:43 GMT (envelope-from git) Date: Fri, 12 Jan 2024 17:53:43 GMT Message-Id: <202401121753.40CHrhhv099690@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 41988a137d55 - stable/13 - if_tuntap: support receive checksum offloading for tap interfaces List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 41988a137d556b0e4bd6259bc7af0c63f6975596 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=41988a137d556b0e4bd6259bc7af0c63f6975596 commit 41988a137d556b0e4bd6259bc7af0c63f6975596 Author: Michael Tuexen AuthorDate: 2023-11-09 10:37:27 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 17:53:19 +0000 if_tuntap: support receive checksum offloading for tap interfaces When enabled, pretend that the IPv4 and transport layer checksum is correct for packets injected via the character device. This is a prerequisite for adding support for LRO, which will be added next. Then packetdrill can be used to test the LRO code in local mode. Reviewed by: rscheff, zlei Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D42477 (cherry picked from commit ff69d13a50d1d07601de0885fd94f6a09a7ba383) --- sys/net/if_tuntap.c | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index 29e9c05e52bc..9cadd971eb37 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -970,6 +970,8 @@ tuncreate(struct cdev *dev) ifp->if_flags = iflags; IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifp->if_capabilities |= IFCAP_LINKSTATE; + if ((tp->tun_flags & TUN_L2) != 0) + ifp->if_capabilities |= IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6; ifp->if_capenable |= IFCAP_LINKSTATE; if ((tp->tun_flags & TUN_L2) != 0) { @@ -1777,9 +1779,35 @@ tunwrite_l2(struct tuntap_softc *tp, struct mbuf *m, return (0); } - if (vhdr != NULL && virtio_net_rx_csum(m, &vhdr->hdr)) { - m_freem(m); - return (0); + if (vhdr != NULL) { + if (virtio_net_rx_csum(m, &vhdr->hdr)) { + m_freem(m); + return (0); + } + } else { + switch (ntohs(eh->ether_type)) { +#ifdef INET + case ETHERTYPE_IP: + if (ifp->if_capenable & IFCAP_RXCSUM) { + m->m_pkthdr.csum_flags |= + CSUM_IP_CHECKED | CSUM_IP_VALID | + CSUM_DATA_VALID | CSUM_SCTP_VALID | + CSUM_PSEUDO_HDR; + m->m_pkthdr.csum_data = 0xffff; + } + break; +#endif +#ifdef INET6 + case ETHERTYPE_IPV6: + if (ifp->if_capenable & IFCAP_RXCSUM_IPV6) { + m->m_pkthdr.csum_flags |= + CSUM_DATA_VALID_IPV6 | CSUM_SCTP_VALID | + CSUM_PSEUDO_HDR; + m->m_pkthdr.csum_data = 0xffff; + } + break; +#endif + } } /* Pass packet up to parent. */ From nobody Fri Jan 12 17:54:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBTgW6JJ4z57FfW; Fri, 12 Jan 2024 17:54: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 4TBTgW5LvGz4l4Y; Fri, 12 Jan 2024 17:54:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705082055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=smCW7op62EynZ8hAYsnWtKL6Smy+S2ECXbtnPazCosY=; b=Tz0WWT0mwTv+MpsfTcq+Putp8ZZsW7wc3wQ6oH4NGOMiJenEKAFwROPCW3hdh9lTw81T08 MRooztL2AUDkrt4XUMmW40csaPl4gZYFVCxsy90EXCQnWe10HwqvdJ7zdAZ+6Pk8G1JSJv qWDgvu4wFtOTLcd7Qijy9rsBXwRONONCHyJcKVmHjeUuR/eO4MoAadPhQpael3lkw7OO7H yyJFKIakv0LhdaDKLWtoaFq9sjsFY+vje6dNvazYOfcCQKcylSkMYTd9GrgehBHeQQp+bv rHxZhJmnwMI6mSh/uYL584uHf1V6w0b3JBg52X1BdXhMU2ISzY4QXy5j6cTOuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705082055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=smCW7op62EynZ8hAYsnWtKL6Smy+S2ECXbtnPazCosY=; b=IpxCFgICABIgRZ3EwSCD7f7a/dyY6reH/VFl+oV4EOUPGitiAiO0wufI1Urh0R7Jc8z0JR gfiVTPW6Hjsg/mOjMyw7CHh2GV3y9RUIlwYPvAFXe7fNnra7D/tHRYD1Nzp2f+ZWd7Bp3X cdbm1LYKUE5/K5O8eQyE3OQt7Ld5D633+Re7R/je5/oE39GQwdllP6BxWqtya9GxIX0zVp JWEmbrmejzWz1Cu2EaPFyV4yPqtYNvloLY26v7yFqH359B2G8V1UCz4Ug30pzWcOkv95FE OAbLpAPBb/iiVXb6Hb8T5ToHbYdQnkL/Es8WnoJYpHmPJrkYeCK7TRUPUj/MAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705082055; a=rsa-sha256; cv=none; b=g37UcLi99WNJHeSphJt5SUJBDWZtgC9ZAzo98R7r0U8NDw08+SkOUJR3qzPHOGKEGc9MSV weF6RwNLAEG6y9fbzB0BxXsKteo30LrfBc2bsyjlILUzTKGpD0WSziCvgULZy3uCJRDQQN ca+fWfbpzR7oLgJ9614kpJeiOdkK6C6BFfzxbfazuVbBXXncVJ0dGHjYHYgqmxp9PnTget c9uQGxhYCDtkPhriSPQbeYyQ3wet07pwLeOBZBSLEY65qfq6ts86aMaIVR+yGJTW1VpVke qAQiExcJGcZAV741cwqsD8lBPGYMl8hZOSSEReV+UR44w4X+Ii5Ujz35MB5bUg== 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 4TBTgW4Q0sz1BBW; Fri, 12 Jan 2024 17:54: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 40CHsF9B099914; Fri, 12 Jan 2024 17:54:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CHsFtV099912; Fri, 12 Jan 2024 17:54:15 GMT (envelope-from git) Date: Fri, 12 Jan 2024 17:54:15 GMT Message-Id: <202401121754.40CHsFtV099912@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 299e9fe9709a - stable/14 - netlink: Add sysctl descriptions for net.netlink tree List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 299e9fe9709ac520ce1ea5069d0e25540acff573 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=299e9fe9709ac520ce1ea5069d0e25540acff573 commit 299e9fe9709ac520ce1ea5069d0e25540acff573 Author: Ed Maste AuthorDate: 2023-10-12 01:38:00 +0000 Commit: Ed Maste CommitDate: 2024-01-12 17:53:45 +0000 netlink: Add sysctl descriptions for net.netlink tree Reviewed by: markj, melifaro Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43368 (cherry picked from commit 20010b86fe0e181bdad947449fced07bf3fb9cb6) --- sys/netlink/netlink_glue.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netlink/netlink_glue.c b/sys/netlink/netlink_glue.c index e7649c6b13dc..879adefab7bd 100644 --- a/sys/netlink/netlink_glue.c +++ b/sys/netlink/netlink_glue.c @@ -50,8 +50,10 @@ #include /* Standard bits: built-in the kernel */ -SYSCTL_NODE(_net, OID_AUTO, netlink, CTLFLAG_RD, 0, ""); -SYSCTL_NODE(_net_netlink, OID_AUTO, debug, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, ""); +SYSCTL_NODE(_net, OID_AUTO, netlink, CTLFLAG_RD, 0, + "RFC3549 Netlink network state socket family"); +SYSCTL_NODE(_net_netlink, OID_AUTO, debug, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "Netlink per-subsystem debug levels"); MALLOC_DEFINE(M_NETLINK, "netlink", "Memory used for netlink packets"); From nobody Fri Jan 12 17:54:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBTgj5wH2z57Fhf; Fri, 12 Jan 2024 17:54: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 4TBTgj5N3wz4lRt; Fri, 12 Jan 2024 17:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705082065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ypLR3s1Ga7ufcE98LpytK3fMOsy/tiWG51DBgmmaw6E=; b=xTDZRVrIuqkVpA+cb8D9t+KmNS0Z7WuC2/s+/NhH3h6iRO8zbnVk3QTpdEfsgiv6vO929I 04o+xLN5d/1yyWJCvmYj706VTy7WKZMfBctfxSaRlpM5LmZOgL9BmHSPo3XymBGGlVPV3T UQs8z5N7kj5Ot1KmHIpjAKwGgsqOP40KfImo/Vw3N1spcjK8q4yuFHcxFjJO3tdisOhClx zuNODUcvBgilqUSh/Dfb5IpvMyy05SiYo8hvrOM30asJL/Gg4I8r2PfWzc+aRUfjT24e+X HM2YE2l3dR7nPhwLI7cJR8oH96koYteUeklF6j8xFE3h4BIDj8osTfpzvWlO6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705082065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ypLR3s1Ga7ufcE98LpytK3fMOsy/tiWG51DBgmmaw6E=; b=bFbPRXvEB9Eu0A5tEPl4Hg/YonXbgleoby5ERRIFhAZB/4FYxuj1yNclixt948qB426gwA bsevExyP7yKVwUzai79S5hh9tzr6iaiKdBDAFkFklYD1eW4r+WzQctGDNveajejqm1vmYU JmtDC96UtpvikdY0Vr8DxhGS4seUMyC+Mc0DKhGOByeaEtiB0rVxRXXQla/MWVviGJomTk 21A9J+LZynYDp6firD8qfAlByMUjPGgD+E6sMPNeAYETNtJsOt7ET7GsxxOuEedR0i3D9c 8cY5qmqOIRqxjvVxlRKW1Z5JWuvgXNr7lLG53gdp+EtpFlL/aJozdKZEw/MOeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705082065; a=rsa-sha256; cv=none; b=dMEY2JX+3J2OKGp+Zuzh4oO8P0pKoDZDAA2ADe4Gu2QNKj06HsRcNPh37OhIoaNyEoQNby Qje+WRS3z94JLNRqnFAH0r81ViS3VAJXhkTOAiBhm8tRRN+fieYhWnmfL8xJnBf5RZKbxl TP9MxH3vuF4kJtzniDyPUT0hSvlUxASqoPpKzXCWZXBFQi93YECZ9JR/aFSCTAHnP9wcWI olQhan8eBiApC5cK+d5onBr7O0Kv0HBDWCq7mjpOXNFEaVG0aLSsGX0m08839ij3PRwJRl nCfUW1lTxKYobqzfRVtXTUNlwG1/CbqewiQf+xbLtrPad/morkQQ+mzxul66sQ== 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 4TBTgj4R6Xz1BnP; Fri, 12 Jan 2024 17:54: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 40CHsPOd000086; Fri, 12 Jan 2024 17:54:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CHsPQ8000083; Fri, 12 Jan 2024 17:54:25 GMT (envelope-from git) Date: Fri, 12 Jan 2024 17:54:25 GMT Message-Id: <202401121754.40CHsPQ8000083@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 7fe50d188806 - stable/13 - if_tuntap: remove redundant check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7fe50d188806a49da30fedd1f3f6d8fad1100b95 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=7fe50d188806a49da30fedd1f3f6d8fad1100b95 commit 7fe50d188806a49da30fedd1f3f6d8fad1100b95 Author: Michael Tuexen AuthorDate: 2023-11-09 10:43:54 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 17:54:01 +0000 if_tuntap: remove redundant check eh can't be NULL, so there is no need to check for it. Reported by: zlei Sponsored by: Netflix, Inc. (cherry picked from commit 44669b76504991ef3ac10ef10bc0fa931ae79c45) --- sys/net/if_tuntap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index 9cadd971eb37..28b8454c2894 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -1772,7 +1772,7 @@ tunwrite_l2(struct tuntap_softc *tp, struct mbuf *m, eh = mtod(m, struct ether_header *); - if (eh && (ifp->if_flags & IFF_PROMISC) == 0 && + if ((ifp->if_flags & IFF_PROMISC) == 0 && !ETHER_IS_MULTICAST(eh->ether_dhost) && bcmp(eh->ether_dhost, IF_LLADDR(ifp), ETHER_ADDR_LEN) != 0) { m_freem(m); From nobody Fri Jan 12 17:55:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBThs2qF4z57FwZ; Fri, 12 Jan 2024 17:55: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 4TBThs1wX6z4lQy; Fri, 12 Jan 2024 17:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705082125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z2H1F9JxYrxtUrWHhfDEXQmbndL6Zs+zD/0B+lXHjlQ=; b=M57J4Zo3WMkH1jljvjlrL4T26oPhRzXHqEAXs/VT0OnVRvujo84lkFyEjnV/+VKr6WjBGw 8mWooXpz9wS50oAxVoH2cDLX9Q1RwHfjtYzH2DlFEqwiZIviQhnLrhuH2T5I+zVk2A9O44 QHXTbVsVZ0PG+1za+nVQhxXN6T2g6oa288L4RPLphCBV5jEjI9WXuH73o64UIMnGdst84a iSLiynUN1ODEaYlNVJGJebjkJrV+SLl20DJR0V303SRmtybfS8lxFMfLTzErsvixcyOfrj 4NO9C7dLicW4kbqiH42h41wHgA5e2j2A7wEEnFuvcOcnMKRkWlWAjBnfs1rCVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705082125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z2H1F9JxYrxtUrWHhfDEXQmbndL6Zs+zD/0B+lXHjlQ=; b=LYhMYx0z/O1hIl3sxWLWSLUhrqsxlh311Cnj4bgfhO5eRE7q8UjEDrwvyVSXjiDwMpsjqK AHXxfR85tQlcUQE1Ky/iunrUz8FiPP7ZVTHZMbVNWA0quBB8fet5/WAyH+2JueNIKP4T6I 3e9J3a5EJyrEhGqqT8Fg8WVX00xI9a8c2XE6RL8rZuUXH7gsAT5hYXaCtgrorRo1CG0D88 NY+6jEJAdrC3ld6LFGGpyBsBUUEXRk+zvUd+0tpY2epYvs2fQ0862mtkzsCS+jqENAKq4A MdFD+lM3IvuX17sPqc6My4tuO9NBFNipsBt+8RAStDrDJy0TZPMudZ6S13+Jfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705082125; a=rsa-sha256; cv=none; b=I51cHv/ViEgXAlgudpIgDBPd1asG8gwDdYRlEqpEz0aBXR97uHjBF0rGr9yi3LTOero5/Z TLqO/s0PGSCG9qMd8uAtdSWsr81E1dzI1yfn08YJrbWOBaInVsSFA8/TCgeFsQLZrXZcxY Q+wuM/Yrh6QQP63MeLmkqc2W3QeYYxOMkrVmJjem2D9Rbitehy9G7PcYEhOdFk7L5/SkXd POg6cIdwectN5osrA+S2tS4pp4s1B9dqOxN0GthsOqbQ0m5swXhD83CcEmdosSioU7rnLN teAzMQVlma/2YyySmp28Eo525sLML/k6Mx6LR7038kEeE80rqwMYj14Bp5aG9g== 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 4TBThs0zcfz1BBX; Fri, 12 Jan 2024 17:55: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 40CHtP8n000380; Fri, 12 Jan 2024 17:55:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CHtPiW000377; Fri, 12 Jan 2024 17:55:25 GMT (envelope-from git) Date: Fri, 12 Jan 2024 17:55:25 GMT Message-Id: <202401121755.40CHtPiW000377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 73e955d3ea57 - stable/13 - if_tuntap: add LRO support to tap devices List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 73e955d3ea57f05fb3ae353bc01eec1e6f2e2397 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=73e955d3ea57f05fb3ae353bc01eec1e6f2e2397 commit 73e955d3ea57f05fb3ae353bc01eec1e6f2e2397 Author: Michael Tuexen AuthorDate: 2023-11-19 14:57:53 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 17:54:43 +0000 if_tuntap: add LRO support to tap devices This allows testing the LRO code with packetdrill in local mode. Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D42548 (cherry picked from commit 99c79cab422705f92f05a2924a29bdf823372ebf) --- sys/net/if_tuntap.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index 28b8454c2894..a2eecd31723d 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -96,6 +96,7 @@ #endif #include #include +#include #include #include #include @@ -143,6 +144,8 @@ struct tuntap_softc { struct ether_addr tun_ether; /* remote address */ int tun_busy; /* busy count */ int tun_vhdrlen; /* virtio-net header length */ + struct lro_ctrl tun_lro; /* for TCP LRO */ + bool tun_lro_ready; /* TCP LRO initialized */ }; #define TUN2IFP(sc) ((sc)->tun_ifp) @@ -971,7 +974,8 @@ tuncreate(struct cdev *dev) IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifp->if_capabilities |= IFCAP_LINKSTATE; if ((tp->tun_flags & TUN_L2) != 0) - ifp->if_capabilities |= IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6; + ifp->if_capabilities |= + IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6 | IFCAP_LRO; ifp->if_capenable |= IFCAP_LINKSTATE; if ((tp->tun_flags & TUN_L2) != 0) { @@ -1168,6 +1172,12 @@ tundtor(void *data) (l2tun && (ifp->if_flags & IFF_LINK0) != 0)) goto out; + if (l2tun && tp->tun_lro_ready) { + TUNDEBUG (ifp, "LRO disabled\n"); + tcp_lro_free(&tp->tun_lro); + tp->tun_lro_ready = false; + } + if (ifp->if_flags & IFF_UP) { TUN_UNLOCK(tp); if_down(ifp); @@ -1212,6 +1222,14 @@ tuninit(struct ifnet *ifp) getmicrotime(&ifp->if_lastchange); TUN_UNLOCK(tp); } else { + if (tcp_lro_init(&tp->tun_lro) == 0) { + TUNDEBUG(ifp, "LRO enabled\n"); + tp->tun_lro.ifp = ifp; + tp->tun_lro_ready = true; + } else { + TUNDEBUG(ifp, "Could not enable LRO\n"); + tp->tun_lro_ready = false; + } ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; TUN_UNLOCK(tp); /* attempt to start output */ @@ -1758,6 +1776,7 @@ tunwrite_l2(struct tuntap_softc *tp, struct mbuf *m, struct epoch_tracker et; struct ether_header *eh; struct ifnet *ifp; + int result; ifp = TUN2IFP(tp); @@ -1813,7 +1832,15 @@ tunwrite_l2(struct tuntap_softc *tp, struct mbuf *m, /* Pass packet up to parent. */ CURVNET_SET(ifp->if_vnet); NET_EPOCH_ENTER(et); - (*ifp->if_input)(ifp, m); + if (tp->tun_lro_ready && ifp->if_capenable & IFCAP_LRO) { + result = tcp_lro_rx(&tp->tun_lro, m, 0); + TUNDEBUG(ifp, "tcp_lro_rx() returned %d\n", result); + } else + result = TCP_LRO_CANNOT; + if (result == 0) + tcp_lro_flush_all(&tp->tun_lro); + else + (*ifp->if_input)(ifp, m); NET_EPOCH_EXIT(et); CURVNET_RESTORE(); /* ibytes are counted in parent */ From nobody Fri Jan 12 18:32:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBVWN018Mz57Jwt; Fri, 12 Jan 2024 18:32: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 4TBVWM6N1kz3xn4; Fri, 12 Jan 2024 18:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705084335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z8M+5mAzNM+0A7QPnWmpzcVoYGkZxlXr7sHZw9GELqQ=; b=Ql6oKTen1tJcgbxrlnIqaR72L6L+ShJrMGOrPS6xNZqSLvWuDvHerggaktRgtPZcyolvz0 w6egTPjQVtwdas35H5C1xlMO2NsfUvF5vNhdyYgCZA6WDSFHBeKen9uNWKtDOIe1CFnk7f v8j3jbchZAX60DHbny10XZ9E7USOq/T6nCSwk/Q/V3YPWB/tAmS6PjrnzU5qSsT9YTMzsk rQJ70gKmxIo4voQIs5z5QQGbS/x7ICf2Zl7vKXQgrLnEP4WoO/QTdhuh49MO/hbHs8Vttb vMxfX+CBfgsF3OmZiXNmC2x8vYCkMnc7q42MOH+tPj0Tp/EcR21lMEqTqFV1XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705084335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z8M+5mAzNM+0A7QPnWmpzcVoYGkZxlXr7sHZw9GELqQ=; b=yL//gIan6TrsR8/ZFNIbXTZ71mlORsuYa3RktJkcnym+lH5liDVYOwMnFDrUrVLRgcye2n Ev2X281G9tRNuiAyP+yzMA3RlgnH4J9wHM80deutv619uZ/L5IlOVEEyBaLhF1aBTdTrQw BOqTi1YA28EE1Qz/IkymEx4ncHVS5ZEzzsx4LiYHbZarvGlPFalV4+jR0Cl8qqpRIWneTP PuHXlZjUGzhgPjLzL6B3uUM4WQwR9kk1dV9yiH7PVv76rbfQFT04HZ3p2qqkc9+MrYX0oQ 7cJefBvnTVCEdH+YFqzX0+VNtJL1eTY+ELPm3k55DtcU/4XGSy00vOfAkmz41Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705084335; a=rsa-sha256; cv=none; b=ln1r2Cp0Y07aJVZHLsrELdYQMkI2bubJcnpQyoDrUwREsdlZoX2im0ofv6VG5+MpP/EJul UappxhvNnKEqTHRY768bY9YkcFMb0BgEGoaLlBkqCOIhdN8F58/N7lzRnbWYw0+fXofRw7 PpO9/FFYb4Z4IDx1Ct7F1M3FZUiPU4WCB2PxM9xfvxlf1gRDVVZwZdfx2ydd3oFgz8qXa0 Qnuhiy59MN+RmLEB1fRgAwJqlBzHMwL+F3qCWVMW/x7UfQEGiwn6iMDbcxKXGHsWKaCiMh /IvazosG6Mr2Rgr0T43XILSOqTtGQn/lxCodAs12Y5AMgN/UIluTgOURBaPVQg== 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 4TBVWM5S0tz1CqP; Fri, 12 Jan 2024 18:32: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 40CIWFPG064948; Fri, 12 Jan 2024 18:32:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CIWFNF064945; Fri, 12 Jan 2024 18:32:15 GMT (envelope-from git) Date: Fri, 12 Jan 2024 18:32:15 GMT Message-Id: <202401121832.40CIWFNF064945@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 7385a7f67c1f - main - system(3): fix typo santized -> sanitized List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7385a7f67c1f26f4a6948be9155efeee76cf321e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7385a7f67c1f26f4a6948be9155efeee76cf321e commit 7385a7f67c1f26f4a6948be9155efeee76cf321e Author: Steve Kargl AuthorDate: 2024-01-12 18:26:40 +0000 Commit: Warner Losh CommitDate: 2024-01-12 18:29:22 +0000 system(3): fix typo santized -> sanitized PR: 276262 Reviewed by: imp --- lib/libc/stdlib/system.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdlib/system.3 b/lib/libc/stdlib/system.3 index 31682819dc6e..119432342f70 100644 --- a/lib/libc/stdlib/system.3 +++ b/lib/libc/stdlib/system.3 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 25, 2015 +.Dd January 11, 2024 .Dt SYSTEM 3 .Os .Sh NAME @@ -103,6 +103,6 @@ user to run arbitrary command, because all meta-characters supported by .Xr sh 1 would be honored. -User supplied parameters should always be carefully santized +User supplied parameters should always be carefully sanitized before they appear in .Fa string . From nobody Fri Jan 12 19:15:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBWT26zsrz569J5; Fri, 12 Jan 2024 19:15: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 4TBWT26W3Cz48l9; Fri, 12 Jan 2024 19:15:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705086918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LGowZXKav1StezXvF73g+K5Ze0q7KYTqO62KrMLwxic=; b=eOJxRay/CJfxuzM/TkCIBT+tHNl68m7gkOSUbGDtQtWDpQnqYj6TeWeqp4mEHDFHbYPlk3 zK0A6bCu04w14jTOp0n4L6II8v60d5ge3oRgt+7M8mb0RcTldzjOY3j+5FO2xpsm/beB+3 S/otHXQrKTLR3qN2wCmUfeYBphE7FJONsPC4LQ1omtsRXPP3qBx9rUtfL0nb0jfi/vzbQs AsX6NnHawMjxMgVgTUEsxzfaSlfPxvZwIU6wiZ4NSl3NUMxuYrJlzdqjx5ghrVbnLHjhES grYChyLZXdeAOkNz/O1+hd49sKi+HmLb059+mnVqyXJi5/mjXx6qxCRWt025OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705086918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LGowZXKav1StezXvF73g+K5Ze0q7KYTqO62KrMLwxic=; b=oQeiPzLBcfgsi92XXX8eFKKlRsfdEo4ErJA87pCKgY7JkQdrtvBqCyCJzG3OtRMdUL6WOe oh8Z4KM8RNCXrvpFYyFtai9xris06ZdUFbwC9OkkPm1E2vBQbg1aT5XEQz6Go+/WxmblMu LaBpsK1vGQbFNjVH165z5QmNI7IKNUQtWpZigx0Zf76AbA1sHn+GKl+l2KiABSf769a6JN +G1OPhnrMZBpIz8Gfve90s/CZ51bMQibFa9JoKOJyHY4sjAFtXBFz7Zjk6or9yKCQzBp2f tfC7k2sIFD8vgAUAApuJawYldGBXL3JsDa4glWcFKODa8U6Ktwt4DiSFXXNkOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705086918; a=rsa-sha256; cv=none; b=hClvqJNp0topbv44tcVEkGO2RV++5OVHiXJWP/50ql3gKxrTVADgkW1C+cRPMdZZgieHv1 1gBwTpBtlMXxlm43ipLB2HflR2kV5AA2VbhXbm7ATjF606ahyQdCoIrRTDANvS81Jg7WXD rVx5B6TxNIVL0vx7uzlXJwgRYt/io9W5r0WnMgwWBTSD46lDpJYWTyblthiJDyIg7NYqtF 9C0W0tHcnP1UgmjTDRw63XqxAmIJIC6DUidAQRZ6p1Iu2Ju/C/6mher0sQshgrZwM2K2pe ngQAiUud74Nl8g2UyAtWBtFSrnNuQ7pjM6xZJvFm3+X3ElSDXjnropZ4enP3vw== 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 4TBWT25ZKZz1Dg8; Fri, 12 Jan 2024 19:15: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 40CJFITh035699; Fri, 12 Jan 2024 19:15:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CJFIWP035696; Fri, 12 Jan 2024 19:15:18 GMT (envelope-from git) Date: Fri, 12 Jan 2024 19:15:18 GMT Message-Id: <202401121915.40CJFIWP035696@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 178679daa9c4 - main - MAINTAINERS, etc: Remove hselasky entries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 178679daa9c43cfffa7131dfcde8f4d3402805ae Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=178679daa9c43cfffa7131dfcde8f4d3402805ae commit 178679daa9c43cfffa7131dfcde8f4d3402805ae Author: Warner Losh AuthorDate: 2024-01-12 19:02:28 +0000 Commit: Warner Losh CommitDate: 2024-01-12 19:02:28 +0000 MAINTAINERS, etc: Remove hselasky entries Sadly, Hans-Peter has passed away. Remove his entries out of respect for his many years of service to the project. --- .github/CODEOWNERS | 3 --- MAINTAINERS | 10 +++------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bd735363716e..6ac937a33a0a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -69,14 +69,11 @@ /sys/arm64/include @zxombie /sys/arm64/rockchip @evadot /sys/compat/linprocfs/ @dag-erling -/sys/compat/linuxkpi @hselasky /sys/netpfil/ipfilter @cschuber /sys/crypto/openssl/ @juikim /sys/dev/drm2 @bsdimp /sys/dev/iscsi/ @trasz /sys/dev/pci @bsdimp @bsdjhb -/sys/dev/sound/usb @hselasky -/sys/dev/usb @hselasky /sys/fs/autofs/ @trasz /sys/fs/fuse/ @asomers /sys/fs/procfs/ @dag-erling diff --git a/MAINTAINERS b/MAINTAINERS index 8d7100136d38..12a65757f54a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -97,19 +97,15 @@ share/mk/*.test.mk imp,bapt,bdrewery, Pre-commit review requested. stand/forth dteske Pre-commit review requested. stand/lua kevans Pre-commit review requested stand imp Pre-commit review strongly requested. -sys/compat/linuxkpi hselasky If in doubt, ask. - zeising, johalun pre-commit review requested via - #x11 phabricator group. - (to avoid drm graphics drivers - impact) +sys/compat/linuxkpi pre-commit review requested via + #x11 phabricator group. + (to avoid drm graphics drivers impact) sys/contrib/dev/ice erj Pre-commit phabricator review requested. sys/netpfil/ipfilter cy Pre-commit review requested. sys/dev/e1000 erj Pre-commit phabricator review requested. sys/dev/ixgbe erj Pre-commit phabricator review requested. sys/dev/ixl erj Pre-commit phabricator review requested. sys/dev/ice erj Pre-commit phabricator review requested. -sys/dev/sound/usb hselasky If in doubt, ask. -sys/dev/usb hselasky If in doubt, ask. sys/dev/xen royger Pre-commit review recommended. sys/netinet/ip_carp.c glebius Pre-commit review recommended. sys/netpfil/pf kp,glebius Pre-commit review recommended. From nobody Fri Jan 12 19:15:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBWT40SY2z569Ks; Fri, 12 Jan 2024 19:15:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBWT401lvz48tv; Fri, 12 Jan 2024 19:15:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705086920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C+avNjoZlA2OrJSpewynVTiBEg4WqI0Uuqmw/akHnKw=; b=F+ylXB/tgTvvV6dd+blxwEInVPtjcR2Dj2wtkDoEmUQfvaY12sMYH8DwIld5epwc0JqMZs /6ceesDct6DAVbNZaRrdesHXCEsXM8AZ+mwa6BV9rxt7+GYvRWtRVdNc++PpSg15Fn0NQd xoL2N34vnApn8VSEg+Gxhl9Y7Hgp6EyMsqeCDayi3w87cQoCtsFPtQgrInXWBNx53mYSA2 /lyKvQxmzgerWwd3jfhvoGO2B0ONmY0kMrdPbEGW/5sCpzaYfUbJDWRCy2z6DV9al5NdDb fkl9g3Eqm+q2aFAHv2Dus86bw+mX3UZwjAusLcCcX5RmuFgcsw6wQ57pdOUJnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705086920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C+avNjoZlA2OrJSpewynVTiBEg4WqI0Uuqmw/akHnKw=; b=ZsieEA3MyU1RoEORnDjzZofk24+XBr7j0MJG96UF/t3W+7SdwCtjsxacEDh8i9FzXsS03U xNHi2dg9TJAEfaftvIYHaO8h3Zd9ncy1Mk5PMC09PBVCRiOlQFgiEUdcYjxyyIyLY8vQK3 20+dUENwGESSJrZgbSdUP1QWKVVD/F2ESzDyDORpswj5/Y6nusSxDe3N6h4qf8z2LVOz2y E/Ot+6PQYZmHnCycuV4O2uft6oW0LyIi6m7XlmIsOI4eKPhYwWHXwH2vkgGtg7MbJfvvtE 5Ab5xIgI3kto+hJ6LXIWfpTPs1JjT+6aMC0C29aPHMMCz7h6vGbNZ5d89fjpUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705086920; a=rsa-sha256; cv=none; b=jDIgSTQYPUWfr3KtTr8gXKTV29x6ikMRF/xCURWm5kZoDUP0IwgxDwhVwDJOGCTcLgmss5 bdiOhG7pdViaZ2NTdoS4C4LB1x72t4BP8TQVSFlHkM+HOLwxCd7dCT5X2/eBJnug+eM9kp W5iPAESzDmQnoohzYaFfAas1azhorUR5paRERM0yR+7uAix8EVzdjE+RWri7zVTjx+cSgk dKho4x0OBLunNzisi++tyXqEFCt3r5uw05s9a/uN4VzejTOo3oMLeVGixUt36yVA0ZReyn KjO8RN0hE6jCi77a6CQf0+SsCEa4Adzl7IXRafoyLyXy4vw7Qbx7kt3nOaPaGw== 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 4TBWT36BS2z1DPR; Fri, 12 Jan 2024 19:15: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 40CJFJId035754; Fri, 12 Jan 2024 19:15:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CJFJbZ035751; Fri, 12 Jan 2024 19:15:19 GMT (envelope-from git) Date: Fri, 12 Jan 2024 19:15:19 GMT Message-Id: <202401121915.40CJFJbZ035751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 46ebf11f5a32 - main - MAINTAINERS: Add myself for nvme entries, remove jimharris List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 46ebf11f5a328bc7c57ecc7c0d7eea64113d3441 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=46ebf11f5a328bc7c57ecc7c0d7eea64113d3441 commit 46ebf11f5a328bc7c57ecc7c0d7eea64113d3441 Author: Warner Losh AuthorDate: 2024-01-12 19:07:28 +0000 Commit: Warner Losh CommitDate: 2024-01-12 19:12:15 +0000 MAINTAINERS: Add myself for nvme entries, remove jimharris Jim Harris no longer has a commit bit and has moved on from being the FreeBSD nvme driver maintainer at Intel. I've been reviewing things so I'll take that up. Sponsored by: Netflix --- .github/CODEOWNERS | 3 +++ MAINTAINERS | 9 +++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 6ac937a33a0a..3abef8d6b88e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -57,6 +57,7 @@ /lib/libpam/ @dag-erling /lib/libvmmapi @bsdjhb @grehan-freebsd /libexec/rc/rc.d/rctl/ @trasz +/sbin/nvmecontrol @bsdimp /sbin/mount_fusefs @asomers /secure/usr.bin/openssl/ @juikim /share/mk @bsdimp @bapt @bdrewery @emaste @@ -73,6 +74,8 @@ /sys/crypto/openssl/ @juikim /sys/dev/drm2 @bsdimp /sys/dev/iscsi/ @trasz +/sys/dev/nvd @bsdimp +/sys/dev/nvme @bsdimp /sys/dev/pci @bsdimp @bsdjhb /sys/fs/autofs/ @trasz /sys/fs/fuse/ @asomers diff --git a/MAINTAINERS b/MAINTAINERS index 12a65757f54a..54486867eed6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -56,7 +56,6 @@ etc/sendmail gshapiro Pre-commit review requested. Keep in sync with -STABLE. fetch des Pre-commit review requested, email only. fusefs(5) asomers Pre-commit review requested. geli pjd Pre-commit review requested (both sys/geom/eli/ and sbin/geom/class/eli/). -isci(4) jimharris Pre-commit review requested. iwm(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org iwn(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org kqueue jmg Pre-commit review requested. Documentation Required. @@ -71,9 +70,9 @@ lpr gad Pre-commit review requested, particularly for nanobsd imp Pre-commit phabricator review requested. net80211 adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org nfs freebsd-fs@FreeBSD.org, rmacklem is best for reviews. -nvd(4) jimharris Pre-commit review requested. -nvme(4) jimharris Pre-commit review requested. -nvmecontrol(8) jimharris Pre-commit review requested. +nvd(4) imp Pre-commit review requested. +nvme(4) imp Pre-commit review requested. +nvmecontrol(8) imp Pre-commit review requested. opencrypto jmg Pre-commit review requested. Documentation Required. openssh des Pre-commit review requested, email only. openssl benl Pre-commit review requested. @@ -128,8 +127,6 @@ autofs(5) trasz Pre-commit review recommended. iscsi(4) trasz Pre-commit review recommended. rctl(8) trasz Pre-commit review recommended. sys/dev/ofw nwhitehorn Pre-commit review recommended. -sys/dev/drm* imp Pre-commit review requested in phabricator. Changes need to - be mirrored in github repo. sys/dev/usb/wlan adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org sys/arm/allwinner manu Pre-commit review requested sys/arm64/rockchip manu Pre-commit review requested From nobody Fri Jan 12 19:58:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBXR75wnYz56Dgp; Fri, 12 Jan 2024 19:58: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 4TBXR75TLrz4FNt; Fri, 12 Jan 2024 19:58:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705089523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pVjN8xNGiCKAnh2UgZe6OoTi9fPS7bpBbQhL+LuF9Yc=; b=H4g0rNJUSdkl15MqtIz7IeSC466Y37FNX2iKbvsDt3Md/0BNjsVOwX5QBDcyTfrD717ZBc 7HCHif6wRfVVDB/wvWvYT7y/oGNLuRV4JByw/fTyFSsi2JODhIML8UyZpmO4A/u+yKu8mV f2muxfid5i4rz9dFk4z8HAMjDTT9yo57Lm3XcdkJCCSpF3VcF5lhn9n/aE12ozYE/Jp1qo XFFiruhbgEJR7XW+S1ZH6VvFsqChQJAhWELIdxxzYqK32PHOKvHoFWYlvsw7/6DsqGQhE2 VqABPUquCG/Al9c5UxK4+xE7Wi+KHG+YH+bkCcvbVxTggOzWvH8+9BVEm4R+Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705089523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pVjN8xNGiCKAnh2UgZe6OoTi9fPS7bpBbQhL+LuF9Yc=; b=c0CspQ1q85+h+CFgCGHsOOY+R6qZKgKtCGuDKSaS2zVbQ3+Z/FLLHmlVbcyi6JcrXE5A0U +/fbK1lfLMQ0GyQoHjUWzWXqR7dF2g5l7ygUmKw0ufM3fHJz+Dg3udgIMSuX6xjfgPtdlt IvthXIEiWtx5Dg/3dA/mkEmBO24xOgKPpLuat6sYYz2O5LNpbZ6r1Du/Nd7G3QXn1JEOi2 elnjp543k0WhPsQ6fFwq+63EVwEdbIQS9EJI22XuVCJQKzy1sj/mVUnKxSDvG77MXlRQK+ WM7xkRYJO3ahTsAZvcrGv4C4Omdy4HRHu/4TnVgw+5p0wgMJJd4iDsUppSQ3og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705089523; a=rsa-sha256; cv=none; b=qcYrnObrC+Q2frqrx23aZ68+wR0tVLLYpqa86aOEIAWUdaEwmo9TOip854/Rjam1sOG6t5 IuXrThcP3xhAs+L3aDahkLBQGWbte34r6bq+Cs5eBxpSPu4JMRKzvlYxclxbW0tJ1JYnbk 1LHJ6o2ZHcxO3PBrjmvByct2ayPEEbLkLfYHD7GSu8rM7r2isZDRlsnP7ySS4X4Skx88G9 2cC7bMJHZOU0ZPpOCILB3CqWmhfoFXXTDqKVY5qJRqhbNk3XToy9FGYhSbzHD9QRsPFlEF nZA5WdJ93CZGIKd2ggsRYXofE+GCCwIhapGooMPPtO6QzQV+hvrPlaSCC7LwrA== 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 4TBXR74Y58z1FRH; Fri, 12 Jan 2024 19:58: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 40CJwh6u002245; Fri, 12 Jan 2024 19:58:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CJwhlV002242; Fri, 12 Jan 2024 19:58:43 GMT (envelope-from git) Date: Fri, 12 Jan 2024 19:58:43 GMT Message-Id: <202401121958.40CJwhlV002242@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: 5df041c4bbf7 - main - bhyveload(8): document some SECURITY CONSIDERATIONS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 5df041c4bbf70d549b055f332630925295ad5aaf Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=5df041c4bbf70d549b055f332630925295ad5aaf commit 5df041c4bbf70d549b055f332630925295ad5aaf Author: Kyle Evans AuthorDate: 2024-01-12 19:57:53 +0000 Commit: Kyle Evans CommitDate: 2024-01-12 19:58:16 +0000 bhyveload(8): document some SECURITY CONSIDERATIONS The situation is improved now that we're running in a sandbox, but there is still some host machine access that could be concerning depending on the context. These concerns may be somewhat mitigated by the fact that the host machine usually provides the loader binary, even when the guest image is providing the loader scripts -- they only bring the lua scripts, and they have to be able to execute arbitrary syscalls rather than the interfaces provided by libsa(3). Reviewed by: jhb, markj Differential Revision: https://reviews.freebsd.org/D43299 --- usr.sbin/bhyveload/bhyveload.8 | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyveload/bhyveload.8 b/usr.sbin/bhyveload/bhyveload.8 index edeb8ee938f4..54e326e49c8c 100644 --- a/usr.sbin/bhyveload/bhyveload.8 +++ b/usr.sbin/bhyveload/bhyveload.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 24, 2016 +.Dd January 12, 2024 .Dt BHYVELOAD 8 .Os .Sh NAME @@ -171,3 +171,43 @@ at NetApp Inc with a lot of help from can only load .Fx as a guest. +.Sh SECURITY CONSIDERATIONS +Note that in some configurations, +.Nm +will execute guest loader scripts in the context of the host machine. +Note, however, that +.Nm +will enter a +.Xr capsicum 4 +sandbox before it loads the +.Ar os-loader +or executes any loader scripts. +On the host filesystem, the sandbox will only have access to the path specified +by the +.Fl h +flag, the contents of the +.Pa /boot +directory if +.Fl l +was not specified, and the chosen console device. +.Pp +Note that the guest loader scripts are already subject to some limitations that +are not relaxed simply because we are running in userland. +For instance, any I/O on the loader's +.Dq host +device that can be done in loader scripts is limited to the interface that +.Nm +provides, which itself will restrict paths that can be touched to those within +a specified +.Fl h +directory, if any. +Access to files within +.Pa /boot +inside the sandbox would require arbitrary code execution in userboot, and +userboot is usually provided by the host machine rather than anything that is +a part of the guest image. +All access to the +.Fl h +directory as well as +.Pa /boot +is strictly read-only in the sandbox. From nobody Fri Jan 12 20:27:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBY4t4j9Sz56HZ4 for ; Fri, 12 Jan 2024 20:27: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 4TBY4t49kQz4Ltr; Fri, 12 Jan 2024 20:27:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705091278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vx5jpo1XvU8YDqIVfpwcu19sPBC0y9yUlpMlcOrAIaA=; b=FGjnTV/qG1YAcO3qv3bT+8VVfsrXvKC6JNF5f3ielKovmANsigHRVo7AjL7vDCGum7Cdni EZI3KP4C2Od23EGPIbSpp7Q8JT3Wt00J88tJGaNkHnUa2a1kghgpyiJ/EglOSTuV3QvQhY bHREhQclRTsqgWhL1jP+c+oK/FOP9rA3Tlf4yiWk2zAVUzyayVM+j58Oie2YytFMB35ii1 I6rTf0HM0HcGlNYoZF6/kf74+uleniRKe+icyCTGEP2JTDt4nqmQWBI3EZFlHq1wBJnopP JvIM948+ovWe6sel/e6Jcx2Y2jevKs72awKEy+zU9eOBWnG4v9sZ9wN6hkqzjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705091278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vx5jpo1XvU8YDqIVfpwcu19sPBC0y9yUlpMlcOrAIaA=; b=pycp4lU+GNsIU3AbhZ5eaN0TmUbEvKgeWp4YogSFw7nx/EKjrMycPLFkp7xhqA7Ee1/SpI 68zdBO9kf6w83ffsXZOu2DUKfdQfOBoukD9eKn/DeqtaycEXrqChbrXEyNOiJDUw+Fuy3s Wm1g226tcmBgD785twKH91IgCknbmmjKlKPJzIJB/7UhX99uGJQ02mBd/na6ViJldncxjp mvytrVMEiigQDqfOGyvZ+1fb9/44QuHbApfA7wohZFZxOSIcPwdhFSM7rA95vhP2Ts6ygA Aty01ovSZoBATVGBQYBdxI5J0uNx1zHBDUou8vsYC0gtlpTo3JM6DrD2hVsoWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705091278; a=rsa-sha256; cv=none; b=NVZzzGI0sKFiOEl2ZJSpjeUSsy/a6Qotcik74BaSFix2CYbNhxDpOko56/nzIMFa2mCD2u sOhBJ+wLS11jP9hdZ4TUp2Kq3W6YRxJng1SxMs0D0SZI8aqNYJog9COeQescxtBuSlnOZT YAlKNtJrc6p6aefpgN+kKCmiab72o43Iq/+hdVyp5nRIoqRp33KR0SWQDsL2fx9SOsmX1j 7StCilUuWqPin8fwOxrI6aqbDjgogDZeseS8hfxlyqmG0AkyRm0rZiz9WTySk6YXhhVMCa JjQ4oWhzKUey2BjeWTCYUTC8gxZd1hpfZOnPX0Yds5VApoaHKFJ3qyqyyine9A== 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 4TBY4t2wyFz1GRT; Fri, 12 Jan 2024 20:27: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 40CKRwuR054841; Fri, 12 Jan 2024 20:27:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CKRwTn054840; Fri, 12 Jan 2024 20:27:58 GMT (envelope-from git) Date: Fri, 12 Jan 2024 20:27:58 GMT Message-Id: <202401122027.40CKRwTn054840@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: d0738729dab0..5f174897f677 - vendor/kyua - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bofh X-Git-Repository: src X-Git-Refname: refs/heads/vendor/kyua X-Git-Reftype: branch X-Git-Commit: 5f174897f67783925f4ec69122673f9bad6ee6fe X-Git-Oldrev: d0738729dab0c60d6c695966157b3e9551be0861 X-Git-Newrev: 5f174897f67783925f4ec69122673f9bad6ee6fe Auto-Submitted: auto-generated The branch vendor/kyua has been updated by bofh: URL: https://cgit.FreeBSD.org/src/log/?id=d0738729dab0..5f174897f677 5f174897f677 vendor/kyua: Update to snapshot 84c8ec8 From nobody Fri Jan 12 21:10:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBZ1p39zPz56N08; Fri, 12 Jan 2024 21:10:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBZ1p2Flyz4Vm2; Fri, 12 Jan 2024 21:10:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705093822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VejDXPJFKYgRq23Es+p/vBfZFYBKov5RQHRqe3kgIO4=; b=KJZ1fL6OKCvPF9R+qVgfdGxZ3L7FbGxlNvepHotnDeoaTgWy6cnr/x91mBWgdw0SxcXm1c TWGWrFr+ia1+r76k61nLQ19VEWiGn0ScXik/PnKyjnK8dvOX1I6rpbXIKzUsBIgTvt+TTp ujKlq33+i/WlLZN/fWpXG0J7MPFXSIx5rvszSLWizawpoiGKcGIDZ2ZtpfiU01xxBzWYP+ dagrst68gSI7PtrrmvHTAL6ffvW5bNOQfZkCjNa0VS7/UuZTe7ExMNBA4fxY32wafm6msq Sn6gpmh/DkVKug7lUCVz8XmCS6EsDD2NM0ccg4lHOZ4XiMmZT5F9O8JFa5CWcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705093822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VejDXPJFKYgRq23Es+p/vBfZFYBKov5RQHRqe3kgIO4=; b=FkVTzYJ3Ldn1rsLZXzNTa25mj/oXfxd6V0nlk6bnyVEDmgHriLjCireurfeoWTCzA9bEvl mc1xW9E/j1qe4jI2m/Rc8zy8wgymuCOiqQ9DsyWUCbmRNG55FmggRH5DHpeuBfVqUApeqm xChXhwEo0mcxItHOVvdq5iQupkGSG0eKUDtmlmEZGRduvYUz0NenJKzh84GlvGL63PwM3X jWuGeOiYngQXcvAjUicVkUy8VSeU3WSbfdgsH1eDrK6cRfMNURlgArvenRstrDl1xqpRbY YnFz5yczHgjSw0UfwMR0h/mjvZ9U18qNxbaN0fUSh+u/1FN5zO4Fn9Ychkvbkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705093822; a=rsa-sha256; cv=none; b=jBnaZkz+ISPs2gzKVuD800qJw9JnuBilhC0UhGH9uRC/yeYpdnHFmTrwKLe1a5AISCf2EA 7o3LqYY9ckcQeqeDHrVxKxEh+A3K3VOBYzMuyDigv7VngyTFanEPgC2uXeUoOF06nvpxx+ 6URWg8/98uu2tXS+m0bFMnhobBD6Yqn2Gn+eMcukCEDXb8381ZnWpvk81M95U43tEMxb9n 77/FJWxWRBzqw4MZ1MOyD2nNXRF0cZY3JGQWZQoY2Fkuybe0LIXzc4BW6tXNOmWdaMELWn 6I85T1uIJzlKPX//nf9RRuSGh+Fh0rn9N0+PErhFVyfpOQ8ei+OJliqLdAl6Tg== 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 4TBZ1p1JBpz1HcX; Fri, 12 Jan 2024 21:10:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40CLAME2032317; Fri, 12 Jan 2024 21:10:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CLAM2t032314; Fri, 12 Jan 2024 21:10:22 GMT (envelope-from git) Date: Fri, 12 Jan 2024 21:10:22 GMT Message-Id: <202401122110.40CLAM2t032314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 4c4633fdffbe - stable/13 - if_tuntap: fix NOIP build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4c4633fdffbe8e4b6d328c2bc9bb3edacc9ab50a Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=4c4633fdffbe8e4b6d328c2bc9bb3edacc9ab50a commit 4c4633fdffbe8e4b6d328c2bc9bb3edacc9ab50a Author: Gleb Smirnoff AuthorDate: 2023-12-04 18:18:56 +0000 Commit: Michael Tuexen CommitDate: 2024-01-12 21:09:27 +0000 if_tuntap: fix NOIP build Note: this removes one TUNDEBUG() for the sake of not having one more ifdefed variable declaration and for the overall code brevity. The call from tuntap into LRO can be so easily traced with dtrace(1) that an 80-ish printf(9)-based debugging can be omitted. Fixes: 99c79cab422705f92f05a2924a29bdf823372ebf (cherry picked from commit 5b0010b4678d778967a5a82fb38507e46a071e38) --- sys/net/if_tuntap.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index a2eecd31723d..a6695adc93c5 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -1171,13 +1171,13 @@ tundtor(void *data) if ((tp->tun_flags & TUN_VMNET) != 0 || (l2tun && (ifp->if_flags & IFF_LINK0) != 0)) goto out; - +#if defined(INET) || defined(INET6) if (l2tun && tp->tun_lro_ready) { TUNDEBUG (ifp, "LRO disabled\n"); tcp_lro_free(&tp->tun_lro); tp->tun_lro_ready = false; } - +#endif if (ifp->if_flags & IFF_UP) { TUN_UNLOCK(tp); if_down(ifp); @@ -1222,6 +1222,7 @@ tuninit(struct ifnet *ifp) getmicrotime(&ifp->if_lastchange); TUN_UNLOCK(tp); } else { +#if defined(INET) || defined(INET6) if (tcp_lro_init(&tp->tun_lro) == 0) { TUNDEBUG(ifp, "LRO enabled\n"); tp->tun_lro.ifp = ifp; @@ -1230,6 +1231,7 @@ tuninit(struct ifnet *ifp) TUNDEBUG(ifp, "Could not enable LRO\n"); tp->tun_lro_ready = false; } +#endif ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; TUN_UNLOCK(tp); /* attempt to start output */ @@ -1776,7 +1778,6 @@ tunwrite_l2(struct tuntap_softc *tp, struct mbuf *m, struct epoch_tracker et; struct ether_header *eh; struct ifnet *ifp; - int result; ifp = TUN2IFP(tp); @@ -1832,14 +1833,12 @@ tunwrite_l2(struct tuntap_softc *tp, struct mbuf *m, /* Pass packet up to parent. */ CURVNET_SET(ifp->if_vnet); NET_EPOCH_ENTER(et); - if (tp->tun_lro_ready && ifp->if_capenable & IFCAP_LRO) { - result = tcp_lro_rx(&tp->tun_lro, m, 0); - TUNDEBUG(ifp, "tcp_lro_rx() returned %d\n", result); - } else - result = TCP_LRO_CANNOT; - if (result == 0) +#if defined(INET) || defined(INET6) + if (tp->tun_lro_ready && ifp->if_capenable & IFCAP_LRO && + tcp_lro_rx(&tp->tun_lro, m, 0) == 0) tcp_lro_flush_all(&tp->tun_lro); else +#endif (*ifp->if_input)(ifp, m); NET_EPOCH_EXIT(et); CURVNET_RESTORE(); From nobody Fri Jan 12 21:12:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBZ3p1dxmz56Mtl; Fri, 12 Jan 2024 21:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBZ3p17j9z4WQg; Fri, 12 Jan 2024 21:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705093926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HHUwqI13Hp2qaLTUFu4y4CQA5NOo8gaXFtaHXuGJiDg=; b=hmVnLfM8eG4P+0zcVhyDAff9R6aEd/Jk/5Ebjn7N2wRgE4ZI6Gu4Sn2Tv9ySuaaA0Uzore 95pnGnlB10DlaPKVo0hXLFVqnEjLGb/kLorRcnFJ/4jzfut+k/MQVhbdG3IWW4UHxupI85 4xI8hSE03aEEBVLl9UfpoP0H2j8xvMLrr4C0pF1sYLF8C3DeaaP3F7VRxJDWJ2KcFXGcE7 KJmNmQf9M0jHh3J/fWx71Ye3THQzZGS+WGHFw41IOAcxQn0WXzLsYG6bPddA3XBQY7APDg 81wKyF7j7awAFWNv9sMHjG0MussWwAyorSnY9Q4KHQfYa+Tqk6npLNrRNQGhAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705093926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HHUwqI13Hp2qaLTUFu4y4CQA5NOo8gaXFtaHXuGJiDg=; b=inrOuC37Nn3gK0CEOLERoqgPgJf1aCELjg16Ui1uR5ZJZLwl4L8X+8A6tz+dYgwrRJO+2e v5Q2WqKcJdrmq+76Vgirmc4OieOBnwwPvoZQcv/uL5rpMWl0lR8rWtCwKpdYvcwlu+WD+w mAR4fAuit/y2BfHEsFIz9M/40W1/NGM/JzBN4MJQs1RG/Lg52Ax5V0KOfjaIyQU8S0q7SL 68d6S1NdzxErWtlSX6CSTHzWl9MVa8cVSikt5c/RadX+8cvYh30COgXLaRD37eBR8aLby4 78Hb5k++kR40Lnjb/aVJBrCe8pF93JYGnbNGmx+UbkcRTYR0fniCnY8d3hcW6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705093926; a=rsa-sha256; cv=none; b=ySeD4Y+axxu5oe3O/+lh9DU/UaGm7kX1uFkw5cBvN2x0YHzbXNSd6skoql+p5jLIaKmjgk Z8FG543Ri7gIT0uasN4u5tj2y77+eRIOzMQd3f2/5L7dWJEkqwuImU3eL7TUWXCzRGOYEx WM1WOXNUK036i15E88R8Mk03WLrrdyymFa2FK2AZQDUUp3CD2hBvK/fLaLhNFHBpJgMXNb BqJ3bSHXu0nLrSlEGJ8kKQ7lU5TIcs/hZcYvMlOeZoJnXnuPBRFYx31EBhN0bDpp1fuMjS BDqu2tzQ05PnartHyBJi5+7eUdbYq7gnULwZxPQu7qqyCteyQrx+o3bGnIxqdw== 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 4TBZ3p07V2z1HHd; Fri, 12 Jan 2024 21:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40CLC5Z2039219; Fri, 12 Jan 2024 21:12:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CLC5HB039216; Fri, 12 Jan 2024 21:12:05 GMT (envelope-from git) Date: Fri, 12 Jan 2024 21:12:05 GMT Message-Id: <202401122112.40CLC5HB039216@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: 848a8bf3f40d - main - fb: Check for errors from copyin() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 848a8bf3f40d91bda0ae3ab67f22ed693f25f9c4 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=848a8bf3f40d91bda0ae3ab67f22ed693f25f9c4 commit 848a8bf3f40d91bda0ae3ab67f22ed693f25f9c4 Author: Mark Johnston AuthorDate: 2024-01-12 15:09:22 +0000 Commit: Mark Johnston CommitDate: 2024-01-12 20:56:00 +0000 fb: Check for errors from copyin() When compiling with gcc, a function annotated with __result_use_check cannot have its return value ignored with a void cast. So, try to handle it. MFC after: 1 week --- sys/dev/fb/vesa.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/dev/fb/vesa.c b/sys/dev/fb/vesa.c index e1cca3a70725..dcd3d34076bf 100644 --- a/sys/dev/fb/vesa.c +++ b/sys/dev/fb/vesa.c @@ -1732,11 +1732,15 @@ set_palette(video_adapter_t *adp, int base, int count, r = malloc(count * 3, M_DEVBUF, M_WAITOK | M_ZERO); g = r + count; b = g + count; - (void)copyin(red, r, count); - (void)copyin(green, g, count); - (void)copyin(blue, b, count); + if (copyin(red, r, count) != 0 || + copyin(green, g, count) != 0 || + copyin(blue, b, count) != 0) { + error = 1; + goto out; + } error = vesa_bios_load_palette2(base, count, r, g, b, bits); +out: free(r, M_DEVBUF); return (error); From nobody Fri Jan 12 21:12:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBZ3q4JZbz56Mtm; Fri, 12 Jan 2024 21:12:07 +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 4TBZ3q21FGz4WQj; Fri, 12 Jan 2024 21:12:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705093927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fg46qU8p+4kGDY5h8eOjROVHNfSaGZH8f2o/KSreSb0=; b=ybpwXf3+cnWyJRdj5syfW7mq/l6nHVsaDAmqSr6FdkyswTFfDM7np4K3lUWOo5nciWSTQt oyXrcHaFOg2+DlOS2EXjkLAZqUjKyF7bi6tlic3HtRxosWvH0DW1xFjbPd/jydKyRLRjKk fV9c7H14t+KsFT4ooY4QIRFn3jGW5qrB2VnGySc7xkC4ahWMFKJmwy7grCgqOcHn4ByOzw tsw2ssKtIC1Y8w6yzkrm2FR2U5tSLvfaPqcbO8tuUqPVQQQTZxQ6ZMbha4y8X7/1VfoF+E JfdwRy0yUGoJ+5FHPYzoHfaITrYQaRlzKShoEmFG8ZJe0Yvd5C741StGYDfV9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705093927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fg46qU8p+4kGDY5h8eOjROVHNfSaGZH8f2o/KSreSb0=; b=myrWmQE3DTmVWcmz1arVnCESXdVdXgMvxlGmh3RL1T7ztCi0KPIkLHs5k4n3GaOpTJsNhn g8EgV/HffB6smWp6J8395SLgXU82FMmFZdvNQA1ALm5AcsMqAiQDYfxxMdjGy3ovV4fHMM 0JySBh09baXG9KEiXjl4oMZQfXCniWCz5kd/hfCvkTpNkZWnXNtdsaosLMRUwdOshfyhkH mAbo8BQChMc7tGXpa81Yfh5czgO4Of6WZkE549el5Jyq2I0My1DovyYCljEJjz7x9+WDig EUb8Y1GKalpj8rZbe5St2xQs9MokSU7Re0Z0b+QGDCpDlzXOspBXIaYtLFaoYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705093927; a=rsa-sha256; cv=none; b=dj+GZtIKss3TEny3Ok+TFLgBlQ9jgMSfGvu1QCsNKR70DVGz1vkUj51Gtg0LAcO4oyrP5y qBOxAG+atI9y1Ux6ENNvZtCHutOcvq+IYm2ZeD5Hf7lyeJgrEy+MJ/eFkgtoqbpwNdE6cI GIrPLBk8p0Wf2igOX9dqwbQxtL7FfGQJfxVmn6hVWGx9IoxAhGCDjq25y83ne03pjUbNMC qsrmgHfYVSioz26oc3RWGFKTqb6/YauPtC4L7hDQLdUemzI/zd98YQ4CgUT80uPMPSiZTW 9kv+4wDF8Ean/C78FDl5Uc1pWKCI4UC5wRscNeHPhMtAjZOzjZn9pZksyjrWng== 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 4TBZ3q14zNz1HHg; Fri, 12 Jan 2024 21:12: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 40CLC76r039273; Fri, 12 Jan 2024 21:12:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CLC7nM039270; Fri, 12 Jan 2024 21:12:07 GMT (envelope-from git) Date: Fri, 12 Jan 2024 21:12:07 GMT Message-Id: <202401122112.40CLC7nM039270@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: d07acc58d898 - main - systm: Relax __result_use_check annotations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: d07acc58d8987e8e1205f4a82b77e847ea2d60d3 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d07acc58d8987e8e1205f4a82b77e847ea2d60d3 commit d07acc58d8987e8e1205f4a82b77e847ea2d60d3 Author: Mark Johnston AuthorDate: 2024-01-12 15:07:28 +0000 Commit: Mark Johnston CommitDate: 2024-01-12 20:56:00 +0000 systm: Relax __result_use_check annotations When compiling with gcc, functions annotated this way can not have their return values cast away, e.g., with `(void)copyout(...)`. clang permits it but gcc does not. Since we have a number of such casts for calls which copy data out of the kernel, and since failing to check for errors when copying *in* is a much more severe bug, remove some of the annotations in order to make the gcc build happy. Reviewed by: kib Reported by: Jenkins Fixes: 8e36732e6eb5 ("systm: Annotate copyin() and related functions with __result_use_check") Differential Revision: https://reviews.freebsd.org/D43418 --- sys/sys/systm.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 2da177af91f0..508690cd639e 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -289,9 +289,9 @@ int __result_use_check copyin(const void * __restrict udaddr, void * _Nonnull __restrict kaddr, size_t len); int __result_use_check copyin_nofault(const void * __restrict udaddr, void * _Nonnull __restrict kaddr, size_t len); -int __result_use_check copyout(const void * _Nonnull __restrict kaddr, +int copyout(const void * _Nonnull __restrict kaddr, void * __restrict udaddr, size_t len); -int __result_use_check copyout_nofault(const void * _Nonnull __restrict kaddr, +int copyout_nofault(const void * _Nonnull __restrict kaddr, void * __restrict udaddr, size_t len); #ifdef SAN_NEEDS_INTERCEPTORS @@ -313,11 +313,11 @@ int64_t fuword64(volatile const void *base); int __result_use_check fueword(volatile const void *base, long *val); int __result_use_check fueword32(volatile const void *base, int32_t *val); int __result_use_check fueword64(volatile const void *base, int64_t *val); -int __result_use_check subyte(volatile void *base, int byte); -int __result_use_check suword(volatile void *base, long word); -int __result_use_check suword16(volatile void *base, int word); -int __result_use_check suword32(volatile void *base, int32_t word); -int __result_use_check suword64(volatile void *base, int64_t word); +int subyte(volatile void *base, int byte); +int suword(volatile void *base, long word); +int suword16(volatile void *base, int word); +int suword32(volatile void *base, int32_t word); +int suword64(volatile void *base, int64_t word); uint32_t casuword32(volatile uint32_t *base, uint32_t oldval, uint32_t newval); u_long casuword(volatile u_long *p, u_long oldval, u_long newval); int casueword32(volatile uint32_t *base, uint32_t oldval, uint32_t *oldvalp, From nobody Fri Jan 12 21:12:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBZ3r4X3vz56Mtn; Fri, 12 Jan 2024 21:12: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 4TBZ3r309hz4WW0; Fri, 12 Jan 2024 21:12:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705093928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qvmOfquxuus3Yf8MSZZ4XeSzIUdhwN/njRk+JHO4Qp0=; b=Qumt/FWpbfFmZWAM/X+oro1vLz6/4hJudCHsjQo0K3V+eQ5k2+dm3OPHZbaNAENtPw1j+j TdMjw03gtwk2qWo4lWRTlebNToNctYeO9PrWUentFJFKuvWhP1cmQCe0YU4NSrQPGf5FXh gV51h1k5kUfaMIXbREnBONPyiAPwUMYg365bM5h24GQbzJ7OPAi8IC5YB6WwoVdKQer6fV z35htDsLaJA6MTWnz43A9rGxNz02ViAULDodgGCxcnIlAv2dtnYKT+8vgRkVlig21zDAux gfde2rqNNDoDOUlshfIKlwzm2R40Qmi8LnLjk9BB+c1jAyPuzDW4CzyQrQj/Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705093928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qvmOfquxuus3Yf8MSZZ4XeSzIUdhwN/njRk+JHO4Qp0=; b=bpSBDAsLGma9gFRsG4HZxQyoMCPM7P+XFnZZR073Xwi/zHbkkm3puXQC2oIKHv1EL/SZWM g8hb0YIWR1OXfdJal6OCoJH6tSnUuigwEzozegMMEYYrI6Im1ZDrmkjBUZC3ma0RKuy2qs NjHYetD2Uzk0g/dEkOVyEKTmhujvCJixkLF/tfN/rTMYmCNrIHwWBPO0SWSUNBx7IyxK8P J0K0aTzttDQ8K+N2tuutCmEHgmdbuvvng7+2J3ZlGXm7sHASuPe9Rk+D8XSKsH97jkT3B1 9DJX53KyK69zye3pxh3CmVK18uaEsPC4K7H6Y9AJICsWDn68uU49oD81XMKGLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705093928; a=rsa-sha256; cv=none; b=JiLgcjU6lMN6KJnSst3B5tyzZdpQy4Rw7xRL+ux6TUAxkXjg0J4XYZ2IVbj9/q0fEvMs0s e6lA64j176oqndUUsaIEwwkYkutnxpu38CSFF+DHV51NXUzYuFDe2fZalgYkvb1W7xyArP pzomSyedXB4rwqTTRJZ+yP0kgjzgHEQ5RDiUTXjACE4pRXwrjdcOe2GSBa21V6ccR7rO8y CHtWVUid2NvzBWoSxNeTCY6VF9QrG+i1BHOfnx6SqD6wtWnLIhh01BZ2wwyq+jY47+Rfd4 SnTFBfFqhPPtAhc642maLJ4wtJcN8EYmz0GKDEH9/PL/VolOVhENZwDNPJ7+/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 4TBZ3r25tqz1Hbb; Fri, 12 Jan 2024 21:12: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 40CLC8p0039324; Fri, 12 Jan 2024 21:12:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CLC8Tt039321; Fri, 12 Jan 2024 21:12:08 GMT (envelope-from git) Date: Fri, 12 Jan 2024 21:12:08 GMT Message-Id: <202401122112.40CLC8Tt039321@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: 8e1a7e29b6cc - main - sanitizers: Avoid building genassym.c and genoffset.c with sanitizers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 8e1a7e29b6cc276a2763e61b5f61afebd4570bba Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8e1a7e29b6cc276a2763e61b5f61afebd4570bba commit 8e1a7e29b6cc276a2763e61b5f61afebd4570bba Author: Mark Johnston AuthorDate: 2023-10-10 18:14:46 +0000 Commit: Mark Johnston CommitDate: 2024-01-12 21:09:14 +0000 sanitizers: Avoid building genassym.c and genoffset.c with sanitizers Some, particularly KASAN, may insert redzones around global symbols, resulting in incorrect offset definitions because genassym.sh (ab)uses symbol sizes to assign semantic meaning. (Ideally I would be able to define this pattern in one place, but I haven't found a way to define a GENSYM_CFLAGS that actually works for all of the consumers (kern.post.mk, kmod.mk, sys/conf/files*).) MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. --- sys/conf/files.amd64 | 2 +- sys/conf/kern.post.mk | 10 ++++++---- sys/conf/kmod.mk | 4 ++-- sys/modules/linux/Makefile | 3 ++- sys/modules/linux64/Makefile | 3 ++- sys/modules/vmm/Makefile | 6 ++++-- 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index de509e362b6d..5eae8a0de3c2 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -25,7 +25,7 @@ elf-vdso32.so.o optional compat_freebsd32 \ # ia32_genassym.o standard \ dependency "$S/compat/ia32/ia32_genassym.c offset.inc" \ - compile-with "${CC} ${CFLAGS:N-flto*:N-fno-common} -fcommon -c ${.IMPSRC}" \ + compile-with "${CC} ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} -fcommon -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "ia32_genassym.o" # diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index 34877a01b7dd..5760ebd987f1 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -245,20 +245,22 @@ offset.inc: $S/kern/genoffset.sh genoffset.o NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genoffset.sh genoffset.o > ${.TARGET} genoffset.o: $S/kern/genoffset.c - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon $S/kern/genoffset.c + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} \ + -fcommon $S/kern/genoffset.c # genoffset_test.o is not actually used for anything - the point of compiling it # is to exercise the CTASSERT that checks that the offsets in the offset.inc # _lite struct(s) match those in the original(s). genoffset_test.o: $S/kern/genoffset.c offset.inc - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon -DOFFSET_TEST \ - $S/kern/genoffset.c -o ${.TARGET} + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} \ + -fcommon -DOFFSET_TEST $S/kern/genoffset.c -o ${.TARGET} assym.inc: $S/kern/genassym.sh genassym.o genoffset_test.o NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${.TARGET} genassym.o: $S/$M/$M/genassym.c offset.inc - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon $S/$M/$M/genassym.c + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} \ + -fcommon $S/$M/$M/genassym.c OBJS_DEPEND_GUESS+= opt_global.h genoffset.o genassym.o vers.o: opt_global.h diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 3dc83ce4c423..5cc0ff70c3e2 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -524,13 +524,13 @@ assym.inc: ${SYSDIR}/kern/genassym.sh sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET} genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc genassym.o: ${SRCS:Mopt_*.h} - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon \ + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} -fcommon \ ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc: ${SYSDIR}/kern/genoffset.sh genoffset.o sh ${SYSDIR}/kern/genoffset.sh genoffset.o > ${.TARGET} genoffset.o: ${SYSDIR}/kern/genoffset.c genoffset.o: ${SRCS:Mopt_*.h} - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon \ + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} -fcommon \ ${SYSDIR}/kern/genoffset.c CLEANDEPENDFILES+= ${_ILINKS} diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index 88b3b8f5e123..8c720f8f9e65 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -135,7 +135,8 @@ linux${SFX}_support.o: linux${SFX}_support.S linux${SFX}_assym.h assym.inc .endif linux${SFX}_genassym.o: offset.inc - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} \ + -fcommon ${.IMPSRC} .if !defined(KERNBUILDDIR) .warning Building Linuxulator outside of a kernel does not make sense diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile index 9ac1944ad1a9..62e3b464d39f 100644 --- a/sys/modules/linux64/Makefile +++ b/sys/modules/linux64/Makefile @@ -101,7 +101,8 @@ linux_support.o: linux_support.S assym.inc linux_assym.h ${.ALLSRC:M*.S:u} -o ${.TARGET} linux_genassym.o: offset.inc - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} \ + -fcommon ${.IMPSRC} .if !defined(KERNBUILDDIR) .warning Building Linuxulator outside of a kernel does not make sense diff --git a/sys/modules/vmm/Makefile b/sys/modules/vmm/Makefile index 46909dad6c71..a950c5a82d13 100644 --- a/sys/modules/vmm/Makefile +++ b/sys/modules/vmm/Makefile @@ -82,9 +82,11 @@ svm_support.o: ${.IMPSRC} -o ${.TARGET} vmx_genassym.o: offset.inc - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} \ + -fcommon ${.IMPSRC} svm_genassym.o: offset.inc - ${CC} -c ${CFLAGS:N-flto*:N-fno-common} -fcommon ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto*:N-fno-common:N-fsanitize*:N-fno-sanitize*} \ + -fcommon ${.IMPSRC} .include From nobody Fri Jan 12 21:19:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBZD175MDz56Ncp; Fri, 12 Jan 2024 21:19:13 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oo1-xc35.google.com (mail-oo1-xc35.google.com [IPv6:2607:f8b0:4864:20::c35]) (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 4TBZD10zPsz4XPP; Fri, 12 Jan 2024 21:19:13 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-5989e464910so1712286eaf.0; Fri, 12 Jan 2024 13:19:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705094351; x=1705699151; darn=freebsd.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VV6ZZW7lmIrkjMUcIRDSnrkffEAZJ6sU622Wr2Qxpk0=; b=Tlxm9B2qgPyYd/V2qpjJOQhQTxRT9aYS8b+BZi0VXVnKhhtgfsjF25FGqvNfbY+TMW hgItPjEmnWRRdio0pI41bOX9NroQh5v9zK88EvZdW8VJpEr4wWI0CamnacYH23ORL4uX Nrwe32am7O5Xa9ivM/Qhd3MfMELR7E/l4o95XP0fsr/kGr6kp50K/wegoJ8ixOlt3Ds0 FdS5JyL2YI6Hx04zMQVi4F/G27T7H0SXu5XUfPqDKzfwi3MIBgqHEfwCoKT/NVes5cdx u/jCiqzyZkIxzl8l6/xRJSVp5b6C5oWy4EnTQ0BW80KbUDRg6SMZm8TEuUCNlitbWGhL CV/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705094351; x=1705699151; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VV6ZZW7lmIrkjMUcIRDSnrkffEAZJ6sU622Wr2Qxpk0=; b=szAoNnmv3Sf3NOS8ZwZ3iYWHHTZ8S4ord8tBbt6XEBbNP1Mokt+AnQuO0wcIucJ0Zf 2OVfU29cdalikbp24RGWcSqtKmuILU8ll/3TJKBYaua+KcMjCmCYkX1jPwl5WIBO7OBe IC0GpNWesjGdzc6mUZQYcFmPDXBj2sLcb7/EMmcoW6LvqAoqM24C0TTVdJdi9bZk+jOC vOr7RIBjlzME15P5N1KZD4F3ENcsNTGrS2Op5Kf2l2Wgop6ZkKb0spYflQB6GtyELmPO +ebWrrRDgF99PxL88Q3wyhzX6pt4yRCEMNJXRmpd8hkb+mAFa2bcJ2pMk6k6yd+ktBRi 5H/Q== X-Gm-Message-State: AOJu0Yw96Xcib8MjAYWAuNM+yG0AX4oLJjakuNmVxuCld6jigqPBEN0G XEyLGzExUDWKclJrmz4uV1R5ufhR2gA7jlucqGEMZnrx X-Google-Smtp-Source: AGHT+IHIMJY8+6vgOdRqqUtEjefySae6IXRjN9PjY5wBrZpZTMU65TKcHhIPTK6nn8aqd1svgDXAQrXcWkd2zNj2Mac= X-Received: by 2002:a4a:241e:0:b0:598:b695:688a with SMTP id m30-20020a4a241e000000b00598b695688amr1161768oof.8.1705094351589; Fri, 12 Jan 2024 13:19:11 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Received: by 2002:a8a:dd3:0:b0:512:723e:b179 with HTTP; Fri, 12 Jan 2024 13:19:11 -0800 (PST) In-Reply-To: <202401122112.40CLC7nM039270@gitrepo.freebsd.org> References: <202401122112.40CLC7nM039270@gitrepo.freebsd.org> From: Mateusz Guzik Date: Fri, 12 Jan 2024 22:19:11 +0100 Message-ID: Subject: Re: git: d07acc58d898 - main - systm: Relax __result_use_check annotations To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4TBZD10zPsz4XPP X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] just make it conditional on being compiled with clang On 1/12/24, Mark Johnston wrote: > The branch main has been updated by markj: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=d07acc58d8987e8e1205f4a82b77e847ea2d60d3 > > commit d07acc58d8987e8e1205f4a82b77e847ea2d60d3 > Author: Mark Johnston > AuthorDate: 2024-01-12 15:07:28 +0000 > Commit: Mark Johnston > CommitDate: 2024-01-12 20:56:00 +0000 > > systm: Relax __result_use_check annotations > > When compiling with gcc, functions annotated this way can not have > their > return values cast away, e.g., with `(void)copyout(...)`. clang > permits > it but gcc does not. Since we have a number of such casts for calls > which copy data out of the kernel, and since failing to check for > errors > when copying *in* is a much more severe bug, remove some of the > annotations in order to make the gcc build happy. > > Reviewed by: kib > Reported by: Jenkins > Fixes: 8e36732e6eb5 ("systm: Annotate copyin() and related functions > with __result_use_check") > Differential Revision: https://reviews.freebsd.org/D43418 > --- > sys/sys/systm.h | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/sys/sys/systm.h b/sys/sys/systm.h > index 2da177af91f0..508690cd639e 100644 > --- a/sys/sys/systm.h > +++ b/sys/sys/systm.h > @@ -289,9 +289,9 @@ int __result_use_check copyin(const void * __restrict > udaddr, > void * _Nonnull __restrict kaddr, size_t len); > int __result_use_check copyin_nofault(const void * __restrict udaddr, > void * _Nonnull __restrict kaddr, size_t len); > -int __result_use_check copyout(const void * _Nonnull __restrict kaddr, > +int copyout(const void * _Nonnull __restrict kaddr, > void * __restrict udaddr, size_t len); > -int __result_use_check copyout_nofault(const void * _Nonnull __restrict > kaddr, > +int copyout_nofault(const void * _Nonnull __restrict kaddr, > void * __restrict udaddr, size_t len); > > #ifdef SAN_NEEDS_INTERCEPTORS > @@ -313,11 +313,11 @@ int64_t fuword64(volatile const void *base); > int __result_use_check fueword(volatile const void *base, long *val); > int __result_use_check fueword32(volatile const void *base, int32_t *val); > int __result_use_check fueword64(volatile const void *base, int64_t *val); > -int __result_use_check subyte(volatile void *base, int byte); > -int __result_use_check suword(volatile void *base, long word); > -int __result_use_check suword16(volatile void *base, int word); > -int __result_use_check suword32(volatile void *base, int32_t word); > -int __result_use_check suword64(volatile void *base, int64_t word); > +int subyte(volatile void *base, int byte); > +int suword(volatile void *base, long word); > +int suword16(volatile void *base, int word); > +int suword32(volatile void *base, int32_t word); > +int suword64(volatile void *base, int64_t word); > uint32_t casuword32(volatile uint32_t *base, uint32_t oldval, uint32_t > newval); > u_long casuword(volatile u_long *p, u_long oldval, u_long newval); > int casueword32(volatile uint32_t *base, uint32_t oldval, uint32_t > *oldvalp, > -- Mateusz Guzik From nobody Fri Jan 12 21:25:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBZMc0lvBz56PQ0; Fri, 12 Jan 2024 21:25:48 +0000 (UTC) (envelope-from rpokala@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 4TBZMc0CcFz4YVB; Fri, 12 Jan 2024 21:25:48 +0000 (UTC) (envelope-from rpokala@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705094748; h=from:from:reply-to:subject: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=GrP/uJFh3CQ4pKjXHTPXHtxk7HQH+/fb8tex1mBalrQ=; b=kAfwl35+hlf4HRKhOXhpnHxTgxVmeKUNijIN/7lg0dSRL+8QHlHps/G4hA9BuaT7jMbTdX xECp9r+6p1rkpx1wblSM96jKalts07o/QQlRmufZauOo+Le5ukTjeaaYadY4dzg2djYySd xG94FcIC8sPhyt7axskyQ3qBuBZ24RuB3hEXzbXX3Azb3NhywQEYV2DBZlexSR78iG2cU7 6IsAQf2CFoU15uCRMH6KoOnA4zzXh7iG33+dvgD0qQIYniEkGsG5Jg6infWRtfFkF/NHdU +uqfl376luSdmS4340OFEpwbuBUKeJnxGRQsJ6tohP47MmLsPVkL7qgidnknAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705094748; h=from:from:reply-to:subject: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=GrP/uJFh3CQ4pKjXHTPXHtxk7HQH+/fb8tex1mBalrQ=; b=XgwymHRUIWy4ssgBQb0/sWsfbL1CoJI/Z1P955wSyLAf3gEQu7Iv3fdi1lgcQ0vDGFU+BS QMn6Q9YJWsi6ju0DywaC/xkYkOn9WCAjfoeOJAqEEM1/SoXA8ghlswbfdwva9gg+P9dRi2 vSuexyWRZ5OXfAej7XoNfPL+wohW8vx188vJNcebdi0FYbbcbQhUwzJtkktdlHB8VTcb+H KzuRvTYP/ILlW6VblIDtKxNPb39s37a2WkSgh8ORWs1itaS4g/HSB+FCaZ63Xrpx0a+XS7 t1Vkf1MT14+q/Tmf6so9gKSB87kSSRm0jsmzkR8QLGIniimWo+adJtDxO8d9yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705094748; a=rsa-sha256; cv=none; b=njXBYu5QKjqkYoLEfQw/fzAqrloK6jXUyS2BCQif+Sy7dH+LiGc3DPi/3Rm1YM1EKcrIG/ jJvaUuKtRtdcZjl33rI/loYbtMI6y8b1Fa2iSACcuHzTyFwgcevcugJfhuuE6+lkfIHotQ t90hyDBF/CSqhQtmAoINSI+gfzFUNJM1Yd0jVGAyBc4QGg7YgNPbFG2Kna3nV2q6cHjy2F ID3gTlROL5fdfsJBaUjGOmpVQGSbF1r/0ZJwgVD2b6faYTHa/L8iECHfS62Dif7cBO8U3z hvovSlvIWaxlVDQB6Np+zzrRPF6hXcS5oFX0KPjpdUIBrRUa2u8ytubOgiBJIA== Received: from [192.168.1.10] (c-73-231-46-254.hsd1.ca.comcast.net [73.231.46.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TBZMb1GF2z1DT3; Fri, 12 Jan 2024 21:25:47 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.80.23121017 Date: Fri, 12 Jan 2024 13:25:43 -0800 Subject: Re: d07acc58d898 - main - systm: Relax __result_use_check annotations From: Ravi Pokala To: Mark Johnston , , , Message-ID: Thread-Topic: d07acc58d898 - main - systm: Relax __result_use_check annotations References: <202401122112.40CLC7nM039270@gitrepo.freebsd.org> In-Reply-To: <202401122112.40CLC7nM039270@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable Hi Mark, > failing to check for errors when copying *in* is a much more severe bug In that you might get panics. But failing to check for errors when copying = *out* can be a security leak; depending on the context, a panic might be pre= ferable. I agree with what Mateusz just said: make __result_use_check contingent on = `clang'. Thanks, Ravi (rpokala@) =EF=BB=BF-----Original Message----- From: > on behalf of Mark Johnston > Date: Friday, January 12, 2024 at 13:12 To: >, >, > Subject: git: d07acc58d898 - main - systm: Relax __result_use_check annotat= ions The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3Dd07acc58d8987e8e1205f4a82b77e8= 47ea2d60d3 commit d07acc58d8987e8e1205f4a82b77e847ea2d60d3 Author: Mark Johnston > AuthorDate: 2024-01-12 15:07:28 +0000 Commit: Mark Johnston > CommitDate: 2024-01-12 20:56:00 +0000 systm: Relax __result_use_check annotations When compiling with gcc, functions annotated this way can not have their return values cast away, e.g., with `(void)copyout(...)`. clang permits it but gcc does not. Since we have a number of such casts for calls which copy data out of the kernel, and since failing to check for errors when copying *in* is a much more severe bug, remove some of the annotations in order to make the gcc build happy. Reviewed by: kib Reported by: Jenkins Fixes: 8e36732e6eb5 ("systm: Annotate copyin() and related functions with _= _result_use_check") Differential Revision: https://reviews.freebsd.org/D43418 --- sys/sys/systm.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 2da177af91f0..508690cd639e 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -289,9 +289,9 @@ int __result_use_check copyin(const void * __restrict u= daddr, void * _Nonnull __restrict kaddr, size_t len); int __result_use_check copyin_nofault(const void * __restrict udaddr, void * _Nonnull __restrict kaddr, size_t len); -int __result_use_check copyout(const void * _Nonnull __restrict kaddr, +int copyout(const void * _Nonnull __restrict kaddr, void * __restrict udaddr, size_t len); -int __result_use_check copyout_nofault(const void * _Nonnull __restrict ka= ddr, +int copyout_nofault(const void * _Nonnull __restrict kaddr, void * __restrict udaddr, size_t len); #ifdef SAN_NEEDS_INTERCEPTORS @@ -313,11 +313,11 @@ int64_t fuword64(volatile const void *base); int __result_use_check fueword(volatile const void *base, long *val); int __result_use_check fueword32(volatile const void *base, int32_t *val); int __result_use_check fueword64(volatile const void *base, int64_t *val); -int __result_use_check subyte(volatile void *base, int byte); -int __result_use_check suword(volatile void *base, long word); -int __result_use_check suword16(volatile void *base, int word); -int __result_use_check suword32(volatile void *base, int32_t word); -int __result_use_check suword64(volatile void *base, int64_t word); +int subyte(volatile void *base, int byte); +int suword(volatile void *base, long word); +int suword16(volatile void *base, int word); +int suword32(volatile void *base, int32_t word); +int suword64(volatile void *base, int64_t word); uint32_t casuword32(volatile uint32_t *base, uint32_t oldval, uint32_t newv= al); u_long casuword(volatile u_long *p, u_long oldval, u_long newval); int casueword32(volatile uint32_t *base, uint32_t oldval, uint32_t *oldvalp= , From nobody Fri Jan 12 22:29:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBbmY0nHhz56XSV; Fri, 12 Jan 2024 22:29: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 4TBbmY0Gspz4mNF; Fri, 12 Jan 2024 22:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705098541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oau9J+EaYqbj5RdszqD/mOdKp9ipq5PjpoRBR/ibswc=; b=FKLCJ1adSm2V0ju5O+3big5zEjWeGLA0tGBdvshZj8lop1VMOlvzMmwUEx712wqGWhEIye V7TfoWnAb3B3CcryAbuPXCHCwWID7KJT9oJN7gehmDSdewiNJ2s6GHciptesCQQHcamWhF //YbQQII9PGUlr23OMAU5efMyKJFfA8la8+uO9Z/mupjLIp9FFfAQHTqACyWNVvZisf4II rMP1lrXAvsgStLGVw1YnBDGdPJqYAwKmqijMUtQ5CayVjp+Itkjfl3hu6NMHwnKgAK3Val l2unE2ux4CeM9MgxgD4tL8TQXaQb9gJIGhuyxdw8m+3FJkKyEYTZRQzgxYx3HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705098541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oau9J+EaYqbj5RdszqD/mOdKp9ipq5PjpoRBR/ibswc=; b=nsWMzaq992/o/TgT/4JnmgTxgwK1pZe8CkzA80a/F1OiY9hTM4G0ohYzqT3WWGwQTQ1Q/8 DMywubjybMfvDQ8tox/HXGEXE5d1pgXd+AV7bL0Y5jzR9DS96Vpqq/6rXe8vwBAt9/4ZDl wizFxe8Qt3Ezq6vRFuefIquJB7g8rirRxO7+m5FEsEyhyFvUeAhp17uKatNj+m/KCdp1y5 FrucXKpi0eMT2DJ75Eqkn3/v+HDzPxsLSZIlSwP+EKyepwTkEzQPU5YrtAlneQkqoZNGw5 +OrfYIwwJXaD4IDsGzYqdEvnZq7OUJdbKWYS7gx3EouROTbJ/kWU483F6ii7UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705098541; a=rsa-sha256; cv=none; b=SMWb8G0+1DKmP0dRJEicGEe+50V19ob6i52nKQxar92pLeMMplfB6Q7J7r3YAJ03lF82p0 mdg4hFNkivVIC/bHvjKJOFIvpq050IUhGRteLOU6Gmfyk947zbkPcmFLPj72ZwGyDcgmKV E/IXW6ylA7x1yrZADLHib0nzC/UxWAyNzJXEsGxeYdDe6VVQ8zrmTfJePcRz/iU9D7LjSg gUUtnI8PyC0IUu0nRlQIqtp4xEhRRTP6fpTlur1kJnNzTYtQFAn/pxGefquGQROB90w/w9 Zl8W/C+WBh3pthBs83RmgM1yOAuOhoFH9zJRMQL1a0wndnzXfKuU/mWPF+IrnQ== 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 4TBbmX6QxGz1K2V; Fri, 12 Jan 2024 22:29: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 40CMT0Sd058201; Fri, 12 Jan 2024 22:29:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CMT0qB058198; Fri, 12 Jan 2024 22:29:00 GMT (envelope-from git) Date: Fri, 12 Jan 2024 22:29:00 GMT Message-Id: <202401122229.40CMT0qB058198@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: 55e2a7d3ea21 - main - pmap_pinit(9): sweep references to pmap_pinit2() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 55e2a7d3ea21728f0a5ea712350f521507f3cfb0 Auto-Submitted: auto-generated The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=55e2a7d3ea21728f0a5ea712350f521507f3cfb0 commit 55e2a7d3ea21728f0a5ea712350f521507f3cfb0 Author: Robert Wing AuthorDate: 2024-01-09 04:07:59 +0000 Commit: Robert Wing CommitDate: 2024-01-12 13:29:17 +0000 pmap_pinit(9): sweep references to pmap_pinit2() gone since 2004 --- ObsoleteFiles.inc | 3 +++ share/man/man9/Makefile | 3 +-- share/man/man9/pmap.9 | 3 +-- share/man/man9/pmap_pinit.9 | 7 +------ 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index ac936aebb574..9242d37a62fd 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20240112: remove pmap_pinit2() +OLD_FILES+=usr/share/man/man9/pmap_pinit2.9.gz + # 20240112: replaced NetBSD tests for uniq with our own OLD_FILES+=usr/tests/usr.bin/uniq/d_basic.in OLD_FILES+=usr/tests/usr.bin/uniq/d_basic.out diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 6bc814334f5d..8ec1f06a50ed 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1813,8 +1813,7 @@ 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 \ - pmap_pinit.9 pmap_pinit2.9 +MLINKS+=pmap_pinit.9 pmap_pinit0.9 MLINKS+=pmap_qenter.9 pmap_qremove.9 MLINKS+=pmap_quick_enter_page.9 pmap_quick_remove_page.9 MLINKS+=pmap_remove.9 pmap_remove_all.9 \ diff --git a/share/man/man9/pmap.9 b/share/man/man9/pmap.9 index db27fe880afc..5672dbe6b71d 100644 --- a/share/man/man9/pmap.9 +++ b/share/man/man9/pmap.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 30, 2016 +.Dd January 12, 2024 .Dt PMAP 9 .Os .Sh NAME @@ -105,7 +105,6 @@ operation. .Xr pmap_page_init 9 , .Xr pmap_pinit 9 , .Xr pmap_pinit0 9 , -.Xr pmap_pinit2 9 , .Xr pmap_protect 9 , .Xr pmap_qenter 9 , .Xr pmap_qremove 9 , diff --git a/share/man/man9/pmap_pinit.9 b/share/man/man9/pmap_pinit.9 index b90f30cbc72b..8ef16a69e5fe 100644 --- a/share/man/man9/pmap_pinit.9 +++ b/share/man/man9/pmap_pinit.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 21, 2003 +.Dd January 12, 2024 .Dt PMAP_PINIT 9 .Os .Sh NAME @@ -52,11 +52,6 @@ The function initializes the physical map .Fa pm , associated with process 0, the first process created in the system. -.Sh IMPLEMENTATION NOTES -The -.Fn pmap_pinit2 -function has been deprecated, and should be implemented as a stub -until further notice. .Sh SEE ALSO .Xr pmap 9 , .Xr pmap_growkernel 9 From nobody Fri Jan 12 22:29:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBbmZ1pyVz56XCt; Fri, 12 Jan 2024 22:29:02 +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 4TBbmZ1Kjlz4lyH; Fri, 12 Jan 2024 22:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705098542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Nu1AzDDWiCbxfst3QbTx2zmoeZ0sjhQ/kueuPmUqeo=; b=ZpYYkMwSAiqy4GJaWuVIUkvjODX6lHMOUUNiPVEK7SmiG15NJnPgJbWxQPom60a9GOTAWj kPLuleq2nN6gpYSzvQaJ2hfQrtG53rtJWLEGjiYqWEJM3u4T2vozLXb3PwyGWByCiLoZoP u5cVzucthbxu0gmfFSOksnefhHFZ4cZn2haETsB88gUZ875gee7eiRP9X2iOkktb83eEF1 s4AwNaX9xODbZ+rklDZXL5IIPzpoki9lTr4VI0NBigs3JMsBdjCMX6JQpXlpNzA+jDc4co ib07KkIUDkDuAozW5USg8XgKsuhzTuY8pv+/e4l/G/xBPlnKy1s3Lo6OcUGsfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705098542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Nu1AzDDWiCbxfst3QbTx2zmoeZ0sjhQ/kueuPmUqeo=; b=oWpSVQZ92QZZb4rUhR8YaQP6qTG0N6RBnk9zAO3DqyVNAE1QyS77jhUooAJctrbjwGiCBF 5KzJDCMbNT7f4JkpyjlzwF2po9kYBI42LjMGdI+wXDAwGlFvEKZ5qZwmVxrqAMIfiG34pr Sf6FqwHcxLjDp8Yw6IjldyGAGMkzvtWAdK4PQrwOGBXWwsU/Y4fMng6Fcb8blo3bvQA8Vp YR64hbI17ofNysWpkfVbclwWdrmtddJMW0dTOzoJWbzWV/GOkkvKQyka663WyyKJEO0sog ifBS+wUQBR1W3W06AOPkdeddzzUMB0e33kL/2Ki2yQk8uP6EUhnU4hg1ladJMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705098542; a=rsa-sha256; cv=none; b=wb0Nud0At3cUCSHw0Jotngg5f7A0wgToLsnGIGY2GHxuUteaolXN/OD8F05MNPPKwD/LOM I3nAMeXKE7zfhMI7K2KiXon0hMNejRkXCu+6rM2ijb/Y02xHu7g7vMUfFLUuuGMQp+amT+ tba9y7muupFREpfH5uzfWN2OAP7VNHJ0ZjOzhf1qQSa+KnHRybKI60IAVxV8TJxdKyt5Rl E/qtz1mN96QP85njdB/gMjGLyvIBsbaIxgBV2UPlh6FF0xZJXNwCPOIYERdfpK2GU97FY9 EdvdWymvvmjiy0va+c4Q3+KbT9QraE+gh01RQM/a84qTKyv6XWrtmbiqbTk1cA== 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 4TBbmZ077gz1K9F; Fri, 12 Jan 2024 22:29: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 40CMT1Or058244; Fri, 12 Jan 2024 22:29:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CMT1M5058241; Fri, 12 Jan 2024 22:29:01 GMT (envelope-from git) Date: Fri, 12 Jan 2024 22:29:01 GMT Message-Id: <202401122229.40CMT1M5058241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: bc1eea0c0b0a - main - pmap_init(9): sweep references to pmap_init2() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bc1eea0c0b0ad0a39b5b22b89341b4af1f0cd21f Auto-Submitted: auto-generated The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=bc1eea0c0b0ad0a39b5b22b89341b4af1f0cd21f commit bc1eea0c0b0ad0a39b5b22b89341b4af1f0cd21f Author: Robert Wing AuthorDate: 2024-01-09 04:50:47 +0000 Commit: Robert Wing CommitDate: 2024-01-12 13:29:50 +0000 pmap_init(9): sweep references to pmap_init2() gone since 2005 --- ObsoleteFiles.inc | 3 +++ share/man/man9/Makefile | 2 +- share/man/man9/pmap.9 | 1 - share/man/man9/pmap_init.9 | 16 +++------------- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 9242d37a62fd..7265d0a19741 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20240112: remove pmap_init2() +OLD_FILES+=usr/share/man/man9/pmap_init2.9.gz + # 20240112: remove pmap_pinit2() OLD_FILES+=usr/share/man/man9/pmap_pinit2.9.gz diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 8ec1f06a50ed..276662568088 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1811,7 +1811,7 @@ MLINKS+=PHOLD.9 PRELE.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_init.9 MLINKS+=pmap_is_modified.9 pmap_ts_referenced.9 MLINKS+=pmap_pinit.9 pmap_pinit0.9 MLINKS+=pmap_qenter.9 pmap_qremove.9 diff --git a/share/man/man9/pmap.9 b/share/man/man9/pmap.9 index 5672dbe6b71d..8c86f44d9ff2 100644 --- a/share/man/man9/pmap.9 +++ b/share/man/man9/pmap.9 @@ -94,7 +94,6 @@ operation. .Xr pmap_extract_and_hold 9 , .Xr pmap_growkernel 9 , .Xr pmap_init 9 , -.Xr pmap_init2 9 , .Xr pmap_is_modified 9 , .Xr pmap_is_prefaultable 9 , .Xr pmap_kextract 9 , diff --git a/share/man/man9/pmap_init.9 b/share/man/man9/pmap_init.9 index b530737126fc..3ca609d0d3fd 100644 --- a/share/man/man9/pmap_init.9 +++ b/share/man/man9/pmap_init.9 @@ -23,12 +23,11 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 10, 2005 +.Dd January 12, 2024 .Dt PMAP_INIT 9 .Os .Sh NAME -.Nm pmap_init , -.Nm pmap_init2 +.Nm pmap_init .Nd initialize the pmap subsystem .Sh SYNOPSIS .In sys/param.h @@ -36,8 +35,6 @@ .In vm/pmap.h .Ft void .Fn pmap_init "void" -.Ft void -.Fn pmap_init2 "void" .Sh DESCRIPTION The .Fn pmap_init @@ -45,17 +42,10 @@ function initializes the .Xr pmap 9 sub-system. It is called during system initialization by -.Fn vm_init , +.Fn vm_mem_init , to initialize any structures that the .Nm system needs in order to map between physical and virtual memory. -.Pp -The -.Fn pmap_init2 -function initializes a zone for the PV entries. -These are used to implement page sharing at the physical level. -A high water mark is set so that the system can recover from -excessive numbers of PV entries. .Sh SEE ALSO .Xr pmap 9 .Sh AUTHORS From nobody Fri Jan 12 22:29:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBbnR07fQz56XSc; Fri, 12 Jan 2024 22:29:47 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (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 4TBbnQ5FGGz4myq; Fri, 12 Jan 2024 22:29:46 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-783182d4a09so753177685a.2; Fri, 12 Jan 2024 14:29:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705098585; x=1705703385; darn=freebsd.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=YSqEq0n7Qwe4wVznSViFAQenN05cVskagVGNEIlv8RY=; b=ATnoauQSc7mOEeTfCTzdAgALcNrjzwBaeKv5g0v1Kd27GsGbeoJtekt9cdREa31MjZ 84xO63xc0qrrr6oz0p20OUPCfCKt+jZa3WqP7qoKeT8FfCwS78jI0BU7N0MVTecYGj1x 2Lyp2Y97Ztq1d1iZdQRA0Z6iJKKsRg+edCr0pyewzp9caBG3VY3lAFDfgfiKnrMXGeeo GW7t0cStEa+IId0aLZCQoiHVbrcnEEypJ0DAgEnVF4CKukIhv+RBqhJjzXd8yBT+3vDO 1JlVk/M7NuhUJzVfAY7EgM1FKRTFQhPGFZaFjOUbEBD53WegsFzAm6Vyx1SMedxlzExW NEKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705098585; x=1705703385; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YSqEq0n7Qwe4wVznSViFAQenN05cVskagVGNEIlv8RY=; b=stH8v5rAj0NN6jsbX6yU1EqqZ5vLOUv80hbuSjjcNTaiLvqYLwThyBMmK+skdOk77y YPi85tPgdkkJML1cZ3CadgXuyN8yM0f6qGH4ru8/5PlFu7reMt06D16YhMV62NXQkx31 qAk/ueG4ooc/CxSPeEDYqzsMTebAlNP8LgrxWEPMqryhhtSWPYQip/clT4ALGwxR8KLn TspGG2Miqyb2UNAZSQpyGviI5p3X8nLMJxve8Cp7sx1SA5dX182pwywLXhjpS+OYHtP+ LuWbaJ5/iaJcce/0UpDyD4m8oqGGaQSm1090fkU3sNfPguv6dIUjyeMz0hwfD35FsBK3 L3rg== X-Gm-Message-State: AOJu0YyIpk/0NGRd03e79h2/x9cFs9iJf5Y023hpeVirw9bk69melukC gQ4oJ1wKcYv0kveH3zhWo4zLb6S0T0WM7A== X-Google-Smtp-Source: AGHT+IE4OFmHPj5xo21VP6c4KXc4NSXpypHBC72ZFWtTJEUzRiqAAGvYLSj6vX2fjXAJIS1riCGwtw== X-Received: by 2002:a37:ad0c:0:b0:783:28e9:bcb4 with SMTP id f12-20020a37ad0c000000b0078328e9bcb4mr2235171qkm.72.1705098585030; Fri, 12 Jan 2024 14:29:45 -0800 (PST) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id bq43-20020a05620a46ab00b00783244c7a95sm1361798qkb.24.2024.01.12.14.29.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 14:29:44 -0800 (PST) Date: Fri, 12 Jan 2024 17:29:41 -0500 From: Mark Johnston To: Ravi Pokala Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: d07acc58d898 - main - systm: Relax __result_use_check annotations Message-ID: References: <202401122112.40CLC7nM039270@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Queue-Id: 4TBbnQ5FGGz4myq X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] On Fri, Jan 12, 2024 at 01:25:43PM -0800, Ravi Pokala wrote: > Hi Mark, > > > failing to check for errors when copying *in* is a much more severe bug > > In that you might get panics. How do you mean? > But failing to check for errors when copying *out* can be a security leak; depending on the context, a panic might be preferable. If something in the kernel fails to check for copyout() errors, userspace will potentially be confused since it expected the kernel to overwrite some memory when it in fact did not. Failing to check for copyin() errors can cause the kernel to potentially end up treating uninitialized (kernel) memory as initialized. That can have security ramifications depending on what the kernel does after. > I agree with what Mateusz just said: make __result_use_check contingent on `clang'. I don't want to do exactly that. Here is my attempt: https://reviews.freebsd.org/D43426 > Thanks, > > Ravi (rpokala@) > > -----Original Message----- > From: > on behalf of Mark Johnston > > Date: Friday, January 12, 2024 at 13:12 > To: >, >, > > Subject: git: d07acc58d898 - main - systm: Relax __result_use_check annotations > > > The branch main has been updated by markj: > > > URL: https://cgit.FreeBSD.org/src/commit/?id=d07acc58d8987e8e1205f4a82b77e847ea2d60d3 > > > commit d07acc58d8987e8e1205f4a82b77e847ea2d60d3 > Author: Mark Johnston > > AuthorDate: 2024-01-12 15:07:28 +0000 > Commit: Mark Johnston > > CommitDate: 2024-01-12 20:56:00 +0000 > > > systm: Relax __result_use_check annotations > > > When compiling with gcc, functions annotated this way can not have their > return values cast away, e.g., with `(void)copyout(...)`. clang permits > it but gcc does not. Since we have a number of such casts for calls > which copy data out of the kernel, and since failing to check for errors > when copying *in* is a much more severe bug, remove some of the > annotations in order to make the gcc build happy. > > > Reviewed by: kib > Reported by: Jenkins > Fixes: 8e36732e6eb5 ("systm: Annotate copyin() and related functions with __result_use_check") > Differential Revision: https://reviews.freebsd.org/D43418 > --- > sys/sys/systm.h | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > > diff --git a/sys/sys/systm.h b/sys/sys/systm.h > index 2da177af91f0..508690cd639e 100644 > --- a/sys/sys/systm.h > +++ b/sys/sys/systm.h > @@ -289,9 +289,9 @@ int __result_use_check copyin(const void * __restrict udaddr, > void * _Nonnull __restrict kaddr, size_t len); > int __result_use_check copyin_nofault(const void * __restrict udaddr, > void * _Nonnull __restrict kaddr, size_t len); > -int __result_use_check copyout(const void * _Nonnull __restrict kaddr, > +int copyout(const void * _Nonnull __restrict kaddr, > void * __restrict udaddr, size_t len); > -int __result_use_check copyout_nofault(const void * _Nonnull __restrict kaddr, > +int copyout_nofault(const void * _Nonnull __restrict kaddr, > void * __restrict udaddr, size_t len); > > > #ifdef SAN_NEEDS_INTERCEPTORS > @@ -313,11 +313,11 @@ int64_t fuword64(volatile const void *base); > int __result_use_check fueword(volatile const void *base, long *val); > int __result_use_check fueword32(volatile const void *base, int32_t *val); > int __result_use_check fueword64(volatile const void *base, int64_t *val); > -int __result_use_check subyte(volatile void *base, int byte); > -int __result_use_check suword(volatile void *base, long word); > -int __result_use_check suword16(volatile void *base, int word); > -int __result_use_check suword32(volatile void *base, int32_t word); > -int __result_use_check suword64(volatile void *base, int64_t word); > +int subyte(volatile void *base, int byte); > +int suword(volatile void *base, long word); > +int suword16(volatile void *base, int word); > +int suword32(volatile void *base, int32_t word); > +int suword64(volatile void *base, int64_t word); > uint32_t casuword32(volatile uint32_t *base, uint32_t oldval, uint32_t newval); > u_long casuword(volatile u_long *p, u_long oldval, u_long newval); > int casueword32(volatile uint32_t *base, uint32_t oldval, uint32_t *oldvalp, > > > > From nobody Fri Jan 12 22:51:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBcH24fgDz56Z6g; Fri, 12 Jan 2024 22:51: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 4TBcH248Mrz4sCW; Fri, 12 Jan 2024 22:51:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705099918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Xgu2yWthsh6BEyv9pEoLZnQkf64rGqEbF1xLClN9bU=; b=oRfQ+qqcFkiN47NVNPgPwbx4je/+2cTolnZs5EY0mcWCQBpat0V0++HG+ld2dER0EoqOab yNQVO++Tb5o9uJvovXQpdziLZiadHyWNhhOFkYBT9XnqL9W7DbLyAO4XMY2HoQnnZiST6K xWfQFfXcktJ2F1zKc/AySbJt8mm+39BkB1B3t6DlZmFttgXwh51h1LN7/jlivtJ2xCTvQt k1n8CDQI/EMKdmhSLBGmaUiCPDSjCvzbXn1KYGxJ7Mj6a09ASft2IA0s4MHL/jDeIF32uB cHxxYRgGz2MbgPicua/9JNHxX4A1NkDDXDLLhE/BvqGLCp7NO6rzlueixOFn3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705099918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Xgu2yWthsh6BEyv9pEoLZnQkf64rGqEbF1xLClN9bU=; b=dOkj7Bv7cm4gM2TjI/jDOXVsLlmet0dk1D/hQpLJXvsQZ7rOAvo0BKv5UmJrHewpuCSBDm EHQcKXGijfKaA8JrmhIaxyvYPZ2Va7F1+dj4UbkTpSQ48u0szrauXbZSU0GlShKG9eyiDy oiJ7al7BAftsT5H8uWUk5Rso62dkzvRREiEjSfTYKy+zcI/tK2u3HMFPAwfq5KWjMGP0b4 IjSTSDtN6JM+ZZ8+Fq9Xo+AdB7Oqu3w4AXKMbOsZFTjieTHatWdTDJXn+dEcNcYKLYwcb4 /+EiD1XFG1F+ZUZ/yBkYM5jQIiSJYks57u38utTu6CDpWQw7fIBUAPHI6zlmrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705099918; a=rsa-sha256; cv=none; b=I4XPqDeBN1NclASdrzgMDB5A8RxAQYPPN46fu1YPLN2pC+/px5CfnhVVU2d26MfCKg3gr3 /mxUsyZFsVBXIYzzLGLhUhyL1mbLXTiR6uWfELIqkGsBaINdcLECVlCk4CyM833qyCkW2n VRraNzEQhPGatw/HFrSJmGC/XVghTW7GMd8iUW3hkjcxNkSUHYvExz/Mw+C6Zf7p8SENH9 l6doDqv21cXc/jII0g5+VPsdcxAcqONGqlU7g4ii0EtOJXIRrS6QbWQmMovv/3tWeFO30W 8EJ7ba9kMijES6wiZ6o7SydekiWHViTpwjjveCU2igx+PtrSj3ICdQ5a0rhNZg== 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 4TBcH239Hzz1Kfb; Fri, 12 Jan 2024 22:51: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 40CMpwGq003494; Fri, 12 Jan 2024 22:51:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CMpwcC003491; Fri, 12 Jan 2024 22:51:58 GMT (envelope-from git) Date: Fri, 12 Jan 2024 22:51:58 GMT Message-Id: <202401122251.40CMpwcC003491@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: 82f2275b73e5 - main - cd9660: Add support for mask,dirmask,uid,gid options List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 82f2275b73e556580b155ea9bbf7f7e364458fa1 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=82f2275b73e556580b155ea9bbf7f7e364458fa1 commit 82f2275b73e556580b155ea9bbf7f7e364458fa1 Author: Ricardo Branco AuthorDate: 2024-01-08 20:24:53 +0000 Commit: John Baldwin CommitDate: 2024-01-12 22:51:31 +0000 cd9660: Add support for mask,dirmask,uid,gid options Reviewed by: jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/982 --- sbin/mount_cd9660/mount_cd9660.8 | 37 ++++++++++++++++++- sbin/mount_cd9660/mount_cd9660.c | 79 ++++++++++++++++++++++++++++++++++++++-- sys/fs/cd9660/cd9660_mount.h | 7 ++++ sys/fs/cd9660/cd9660_vfsops.c | 23 ++++++++++++ sys/fs/cd9660/cd9660_vnops.c | 24 ++++++++++-- sys/fs/cd9660/iso.h | 5 +++ 6 files changed, 167 insertions(+), 8 deletions(-) diff --git a/sbin/mount_cd9660/mount_cd9660.8 b/sbin/mount_cd9660/mount_cd9660.8 index cd6f7a19f6eb..d2cdd2f3ef20 100644 --- a/sbin/mount_cd9660/mount_cd9660.8 +++ b/sbin/mount_cd9660/mount_cd9660.8 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 11, 2018 +.Dd January 2, 2024 .Dt MOUNT_CD9660 8 .Os .Sh NAME @@ -39,8 +39,12 @@ .Nm .Op Fl begjrv .Op Fl C Ar charset +.Op Fl G Ar gid +.Op Fl m Ar mask +.Op Fl M Ar mask .Op Fl o Ar options .Op Fl s Ar startsector +.Op Fl U Ar uid .Ar special node .Sh DESCRIPTION The @@ -66,6 +70,37 @@ Do not strip version numbers on files. only the last one will be listed.) In either case, files may be opened without explicitly stating a version number. +.It Fl G Ar group +Set the group of the files in the file system to +.Ar group . +The default gid on non-Rockridge volumes is zero. +.It Fl U Ar user +Set the owner of the files in the file system to +.Ar user . +The default uid on non-Rockridge volumes is zero. +.It Fl m Ar mask +Specify the maximum file permissions for files +in the file system. +(For example, a +.Ar mask +of +.Li 755 +specifies that, by default, the owner should have +read, write, and execute permissions for files, but +others should only have read and execute permissions). +See +.Xr chmod 1 +for more information about octal file modes. +Only the nine low-order bits of +.Ar mask +are used. +The default +.Ar mask +on non-Rockridge volumes is 755. +.It Fl M Ar mask +Specify the maximum file permissions for directories +in the file system. +See the previous option's description for details. .It Fl j Do not use any Joliet extensions included in the file system. .It Fl o diff --git a/sbin/mount_cd9660/mount_cd9660.c b/sbin/mount_cd9660/mount_cd9660.c index ab6da7271c17..d8d64eb5a656 100644 --- a/sbin/mount_cd9660/mount_cd9660.c +++ b/sbin/mount_cd9660/mount_cd9660.c @@ -44,8 +44,11 @@ #include +#include #include #include +#include +#include #include #include #include @@ -60,6 +63,9 @@ static struct mntopt mopts[] = { MOPT_END }; +static gid_t a_gid(const char *); +static uid_t a_uid(const char *); +static mode_t a_mask(const char *); static int get_ssector(const char *dev); static int set_charset(struct iovec **, int *iovlen, const char *); void usage(void); @@ -80,7 +86,7 @@ main(int argc, char **argv) mntflags = verbose = 0; ssector = -1; - while ((ch = getopt(argc, argv, "begjo:rs:vC:")) != -1) + while ((ch = getopt(argc, argv, "begG:jm:M:o:rs:U:vC:")) != -1) switch (ch) { case 'b': build_iovec(&iov, &iovlen, "brokenjoliet", NULL, (size_t)-1); @@ -91,6 +97,15 @@ main(int argc, char **argv) case 'g': build_iovec(&iov, &iovlen, "gens", NULL, (size_t)-1); break; + case 'G': + build_iovec_argf(&iov, &iovlen, "gid", "%d", a_gid(optarg)); + break; + case 'm': + build_iovec_argf(&iov, &iovlen, "mask", "%u", a_mask(optarg)); + break; + case 'M': + build_iovec_argf(&iov, &iovlen, "dirmask", "%u", a_mask(optarg)); + break; case 'j': build_iovec(&iov, &iovlen, "nojoliet", NULL, (size_t)-1); break; @@ -110,6 +125,9 @@ main(int argc, char **argv) case 's': ssector = atoi(optarg); break; + case 'U': + build_iovec_argf(&iov, &iovlen, "uid", "%d", a_uid(optarg)); + break; case 'v': verbose++; break; @@ -173,8 +191,8 @@ void usage(void) { (void)fprintf(stderr, -"usage: mount_cd9660 [-begjrv] [-C charset] [-o options] [-s startsector]\n" -" special node\n"); +"usage: mount_cd9660 [-begjrv] [-C charset] [-G gid] [-m mask] [-M mask]\n" +" [-o options] [-U uid] [-s startsector] special node\n"); exit(EX_USAGE); } @@ -254,3 +272,58 @@ set_charset(struct iovec **iov, int *iovlen, const char *localcs) return (0); } + +static gid_t +a_gid(const char *s) +{ + struct group *gr; + const char *gname; + gid_t gid; + + if ((gr = getgrnam(s)) != NULL) + gid = gr->gr_gid; + else { + for (gname = s; *s && isdigit(*s); ++s); + if (!*s) + gid = atoi(gname); + else + errx(EX_NOUSER, "unknown group id: %s", gname); + } + return (gid); +} + +static uid_t +a_uid(const char *s) +{ + struct passwd *pw; + const char *uname; + uid_t uid; + + if ((pw = getpwnam(s)) != NULL) + uid = pw->pw_uid; + else { + for (uname = s; *s && isdigit(*s); ++s); + if (!*s) + uid = atoi(uname); + else + errx(EX_NOUSER, "unknown user id: %s", uname); + } + return (uid); +} + +static mode_t +a_mask(const char *s) +{ + int done, rv; + char *ep; + + done = 0; + rv = -1; + if (*s >= '0' && *s <= '7') { + done = 1; + rv = strtol(optarg, &ep, 8); + } + if (!done || rv < 0 || *ep) + errx(EX_USAGE, "invalid file mode: %s", s); + return (rv); +} diff --git a/sys/fs/cd9660/cd9660_mount.h b/sys/fs/cd9660/cd9660_mount.h index 88075dc2788b..4f2d9538a10a 100644 --- a/sys/fs/cd9660/cd9660_mount.h +++ b/sys/fs/cd9660/cd9660_mount.h @@ -40,6 +40,10 @@ struct iso_args { char *fspec; /* block special device to mount */ struct oexport_args export; /* network export info */ + uid_t uid; /* uid that owns ISO-9660 files */ + gid_t gid; /* gid that owns ISO-9660 files */ + mode_t fmask; /* file mask to be applied for files */ + mode_t dmask; /* file mask to be applied for directories */ int flags; /* mounting flags, see below */ int ssector; /* starting sector, 0 for 1st session */ char *cs_disk; /* disk charset for Joliet cs conversion */ @@ -51,3 +55,6 @@ struct iso_args { #define ISOFSMNT_NOJOLIET 0x00000008 /* disable Joliet Ext.*/ #define ISOFSMNT_BROKENJOLIET 0x00000010/* allow broken Joliet disks */ #define ISOFSMNT_KICONV 0x00000020 /* Use libiconv to convert chars */ + +#define ISOFSMNT_UID 0x00000100 /* override uid */ +#define ISOFSMNT_GID 0x00000200 /* override gid */ diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index ee0b68714c2a..f067453d3458 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -104,6 +104,12 @@ cd9660_cmount(struct mntarg *ma, void *data, uint64_t flags) ma = mount_argsu(ma, "from", args.fspec, MAXPATHLEN); ma = mount_arg(ma, "export", &args.export, sizeof(args.export)); + if (args.flags & ISOFSMNT_UID) + ma = mount_argf(ma, "uid", "%d", args.uid); + if (args.flags & ISOFSMNT_GID) + ma = mount_argf(ma, "gid", "%d", args.gid); + ma = mount_argf(ma, "mask", "%d", args.fmask); + ma = mount_argf(ma, "dirmask", "%d", args.dmask); ma = mount_argsu(ma, "cs_disk", args.cs_disk, 64); ma = mount_argsu(ma, "cs_local", args.cs_local, 64); ma = mount_argf(ma, "ssector", "%u", args.ssector); @@ -218,6 +224,7 @@ iso_mountfs(struct vnode *devvp, struct mount *mp) struct g_consumer *cp; struct bufobj *bo; char *cs_local, *cs_disk; + int v; dev = devvp->v_rdev; dev_ref(dev); @@ -387,6 +394,7 @@ iso_mountfs(struct vnode *devvp, struct mount *mp) isomp->im_mountp = mp; isomp->im_dev = dev; isomp->im_devvp = devvp; + isomp->im_fmask = isomp->im_dmask = ACCESSPERMS; vfs_flagopt(mp->mnt_optnew, "norrip", &isomp->im_flags, ISOFSMNT_NORRIP); vfs_flagopt(mp->mnt_optnew, "gens", &isomp->im_flags, ISOFSMNT_GENS); @@ -394,6 +402,21 @@ iso_mountfs(struct vnode *devvp, struct mount *mp) vfs_flagopt(mp->mnt_optnew, "nojoliet", &isomp->im_flags, ISOFSMNT_NOJOLIET); vfs_flagopt(mp->mnt_optnew, "kiconv", &isomp->im_flags, ISOFSMNT_KICONV); + if (vfs_scanopt(mp->mnt_optnew, "uid", "%d", &v) == 1) { + isomp->im_flags |= ISOFSMNT_UID; + isomp->im_uid = v; + } + if (vfs_scanopt(mp->mnt_optnew, "gid", "%d", &v) == 1) { + isomp->im_flags |= ISOFSMNT_GID; + isomp->im_gid = v; + } + if (vfs_scanopt(mp->mnt_optnew, "mask", "%d", &v) == 1) { + isomp->im_fmask &= v; + } + if (vfs_scanopt(mp->mnt_optnew, "dirmask", "%d", &v) == 1) { + isomp->im_dmask &= v; + } + /* Check the Rock Ridge Extension support */ if (!(isomp->im_flags & ISOFSMNT_NORRIP)) { if ((error = bread(isomp->im_devvp, (isomp->root_extent + diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index 1b11da80431b..33ca58472490 100644 --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -56,6 +56,7 @@ #include #include +#include #include static vop_setattr_t cd9660_setattr; @@ -119,6 +120,9 @@ cd9660_access(struct vop_access_args *ap) struct vnode *vp = ap->a_vp; struct iso_node *ip = VTOI(vp); accmode_t accmode = ap->a_accmode; + accmode_t file_mode; + uid_t uid; + gid_t gid; if (vp->v_type == VCHR || vp->v_type == VBLK) return (EOPNOTSUPP); @@ -140,8 +144,16 @@ cd9660_access(struct vop_access_args *ap) } } - return (vaccess(vp->v_type, ip->inode.iso_mode, ip->inode.iso_uid, - ip->inode.iso_gid, ap->a_accmode, ap->a_cred)); + file_mode = ip->inode.iso_mode; + file_mode &= (vp->v_type == VDIR) ? ip->i_mnt->im_dmask : ip->i_mnt->im_fmask; + + uid = (ip->i_mnt->im_flags & ISOFSMNT_UID) ? + ip->i_mnt->im_uid : ip->inode.iso_uid; + gid = (ip->i_mnt->im_flags & ISOFSMNT_GID) ? + ip->i_mnt->im_gid : ip->inode.iso_gid; + + return (vaccess(vp->v_type, file_mode, uid, + gid, ap->a_accmode, ap->a_cred)); } static int @@ -169,9 +181,13 @@ cd9660_getattr(struct vop_getattr_args *ap) vap->va_fileid = ip->i_number; vap->va_mode = ip->inode.iso_mode; + vap->va_mode &= (vp->v_type == VDIR) ? ip->i_mnt->im_dmask : ip->i_mnt->im_fmask; + vap->va_nlink = ip->inode.iso_links; - vap->va_uid = ip->inode.iso_uid; - vap->va_gid = ip->inode.iso_gid; + vap->va_uid = (ip->i_mnt->im_flags & ISOFSMNT_UID) ? + ip->i_mnt->im_uid : ip->inode.iso_uid; + vap->va_gid = (ip->i_mnt->im_flags & ISOFSMNT_GID) ? + ip->i_mnt->im_gid : ip->inode.iso_gid; vap->va_atime = ip->inode.iso_atime; vap->va_mtime = ip->inode.iso_mtime; vap->va_ctime = ip->inode.iso_ctime; diff --git a/sys/fs/cd9660/iso.h b/sys/fs/cd9660/iso.h index 2d9e2e8b682a..a9733f62c077 100644 --- a/sys/fs/cd9660/iso.h +++ b/sys/fs/cd9660/iso.h @@ -237,6 +237,11 @@ struct iso_mnt { struct g_consumer *im_cp; struct bufobj *im_bo; + uid_t im_uid; + gid_t im_gid; + mode_t im_fmask; + mode_t im_dmask; + int logical_block_size; int im_bshift; int im_bmask; From nobody Fri Jan 12 22:56:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBcNP74FYz56ZYM; Fri, 12 Jan 2024 22:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TBcNP2bsGz4ssx; Fri, 12 Jan 2024 22:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705100197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gtg5U3hN70PG405UNOJRk7TSwh1U7sMI0lH/DTQ4LGI=; b=LAIVBnKssa7UNfGWoIlo3UEIprS2Ut/UJcQnF6+RXjqs0kf6tjLKAWvgs4+i9wDDc6y02v WLTvC1zWUiRj2xPtc6giaQXGbn2dWireQLRU25PDQw50HVVRYIENwKEoYxbj8iT7OBSH6q OxpWL14ATNk6B2NkrCXLgf7xzN9s1f4k9hLiTl1ofT5ABSdH+/ayKsq3ky8hzQ0k8Mkmkk 2DyBSa8c/Hs+xOr61YMkYb7Eh8FGQUfDgiOp0FcLnf4oOLVmhUYUG/64SjSifI9iCzI6vs zQb1mjgoQK6LGvJduXatk0mor8dDK0+BSqUmWxE2vcZkTLEpLwb12Iiw8N8zVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705100197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gtg5U3hN70PG405UNOJRk7TSwh1U7sMI0lH/DTQ4LGI=; b=gu/3i7nez9P7NOzJRdaJmDrDJBJHylfdQ2qM+yMAIV0mAXSJJiSVjmXmseklOkgEbCvLDm 2VFKj11vuc3/few1e8emHJLjL6B/gElH4T7Q+c0GwspPj4x41QSzh4LWcw1pHuNcal1Lgk smk+puqK+XWBXeFqNR/JdfXl3h2GOak0r+h5eJtKdvzKe992PCROZXqz91dIBtAymEX4o6 QOnDYvw9+MF97MBjzY+SSVYKjx+Kee8K0bKXquLoOa986VD+qOCd6v/ULrdMnKUt4/CADg XclEIiXRM1DVtEHfS964/TdurFa94UVYz/jSYqKkk3xK4xIrDNWjyVswchJ9Nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705100197; a=rsa-sha256; cv=none; b=cU/36GlToW01/pbmcDlny6+zNZDNQRpcxf75O+5IXfDhLSCFo8Kyy1/eBBZ0QfMSsuAk+a mHjmfe/giEMaClojIU7BRmm52MoTZDklN4jmNSEkz0qMR8Pj1CxKIn/ZepzjjNF47W1EQE KqU6jKsrRkrXRY/8AGmNPKDG5MXCNKgHgLp4T3mQpptgQXBb5YOJzDDBhizxSsxZva2lv1 NOzfb16t3cv4tMkrJ2b9u+VFclwVwODW7z9uNsy7KMUn0PfX9y4BkhXzsfCNNJ5ay0ybks dtCrZvoXUBrrrgAJUwPbpxZ1jbiydy+gj2tP502ZjHgG6hEDB+y4wBaHrbhFwQ== 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 4TBcNP1clKz1Kfn; Fri, 12 Jan 2024 22:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40CMubX9009237; Fri, 12 Jan 2024 22:56:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CMubXX009234; Fri, 12 Jan 2024 22:56:37 GMT (envelope-from git) Date: Fri, 12 Jan 2024 22:56:37 GMT Message-Id: <202401122256.40CMubXX009234@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: 246e0457d930 - main - mixer.8: Add terse example for increasing volume List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 246e0457d93071ffd901c78e3ee7badc5f51bd4c Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=246e0457d93071ffd901c78e3ee7badc5f51bd4c commit 246e0457d93071ffd901c78e3ee7badc5f51bd4c Author: Alexander Ziaee AuthorDate: 2024-01-12 17:12:19 +0000 Commit: John Baldwin CommitDate: 2024-01-12 22:55:36 +0000 mixer.8: Add terse example for increasing volume Reviewed by: jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1044 --- usr.sbin/mixer/mixer.8 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usr.sbin/mixer/mixer.8 b/usr.sbin/mixer/mixer.8 index 6d553a5934f4..10a461d91693 100644 --- a/usr.sbin/mixer/mixer.8 +++ b/usr.sbin/mixer/mixer.8 @@ -19,7 +19,7 @@ .\" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN .\" THE SOFTWARE. .\" -.Dd April 29, 2022 +.Dd January 12, 2024 .Dt MIXER 8 .Os .Sh NAME @@ -218,6 +218,13 @@ opens when the option has not been specified. .El .Sh EXAMPLES +Increase the volume for the +.Cm vol +device of the first mixer found by 5%: +.Bd -literal -offset indent +$ mixer vol=+0.05 +.Ed +.Pp Change the volume for the .Cm vol device of the From nobody Fri Jan 12 23:40:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBdMJ1Kv6z56f7V; Fri, 12 Jan 2024 23:40: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 4TBdMJ0qsnz4xXZ; Fri, 12 Jan 2024 23:40:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705102844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OOfa6aNKgqKIFfRYQgJSytBPVWZsw4SHwblBymS0yLw=; b=BWmbOLq52otPG1QqFjVEc28TXDher86XQaBCXAtsa9o5FZ7odAnKwJLATZMRRSv1iEiePJ Y+RbhrunmS/mZAwttY57NBDa0oCsPoXGXj+FAaciHgKo3Ydl+6eVwEs1L8E2TGBQlSu9wo UYBNxsDWDhwAtYSdlnVkJEzLN+bEDHINkwP0fISxoDh9mKHXcedYjrHzLwNUxWZnrsecPs y/awDicXkf+3HuRk6dEhYSwQjgJx3WM5lvn5uoJz/l2tf/esRgRGIxjLNIRi+e7MhRPtMm r8DIzdOMlEMzAxp7ykBCp+gjTxnP4/CmHsj6FInTvOWoR3mI1ah7Z8XJOKv8Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705102844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OOfa6aNKgqKIFfRYQgJSytBPVWZsw4SHwblBymS0yLw=; b=kd/gawZ+csAkrkgZFlyp8QC/zaKDXx0f0gZ5Z5ZyZcyy/yqHFkoUGoIRjEUX15aNnSIsY9 nlH5zW56mjoJi11JYLaDHNbLkaOBWWtAbSWrL3HFAyN5Z9V54p+3EZ+X+K6av2xr7PJy33 Ay22ooc79dGIbze9c+hWD4ovDybxtKw4JM4nPNBJNiLPbZWnZSutgdykhv4bC7dfRD6Yb1 NSfAH5QZO6vDLtIG0Ny89tkfwBFwaYJ65JYuI9yqOtQdN8UkoTHzYYQW/39D/OznvfBb06 5bFpO8tu6bZBIzWXfBKnRVYPlLoLYCpyAQiXL3lq3sG7cSsxql1291pfThfbWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705102844; a=rsa-sha256; cv=none; b=LQnQBP7+856jFWCfodD7zyowFedcAzJEUVaR59/Rf6+SGUfqnVuEJbJq1gwMQBQwdROnhr TZHNzjHQ6oiYvxy9af9jQlaPQlIIK8KsjWHfpiUBGOWfTGzJNgnGfYKyXrjo8U/pe5JtKR P+uI6pjgDDkoOpE3T8bAM6dAiTpqgN58NV4b3hbn05EOrHN6j7GZdnS1z56JlSJx1sexDY fA2vcm5W7uGPeOBUKiImUZd/zNXhrINx8uRlTi5ouk1+iIRPuYWoirwW8HIVE/9ltM4zvQ s33vCdufrcAm7jfjnvC+FIsUt4m2jXb8y8EJOlBj8P2cSLkReyUjM5xy9iJvJA== 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 4TBdMH70R9z1Lv7; Fri, 12 Jan 2024 23:40: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 40CNehle087102; Fri, 12 Jan 2024 23:40:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40CNehD5087099; Fri, 12 Jan 2024 23:40:43 GMT (envelope-from git) Date: Fri, 12 Jan 2024 23:40:43 GMT Message-Id: <202401122340.40CNehD5087099@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: 03d04bf49492 - main - Stop using expressions in _Alignof() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 03d04bf49492fc70366e6d78194336a4122282a2 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=03d04bf49492fc70366e6d78194336a4122282a2 commit 03d04bf49492fc70366e6d78194336a4122282a2 Author: Minsoo Choo AuthorDate: 2024-01-12 23:37:53 +0000 Commit: John Baldwin CommitDate: 2024-01-12 23:37:53 +0000 Stop using expressions in _Alignof() _Alignof(expression) is a non-standard extension. This is not allowed in gnu11 and gnu17 which follow the C11 standard _Alignof(type). Reviewed by: arichardson, imp, jhb Fixes: 4a9cd9fc22d7 amd64 db_trace: Reject unaligned frame pointers Fixes: 7ccaf76a27f1 riscv db_trace: Ensure trapframe pointer is suitably aligned. Fixes: 638c68897fbd arm64 db_trace: Ensure trapframe pointer is suitably aligned. Differential Revision: https://reviews.freebsd.org/D43409 --- sys/amd64/amd64/db_trace.c | 3 ++- sys/arm64/arm64/db_trace.c | 2 +- sys/riscv/riscv/db_trace.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c index 9d9a2cd4a7bb..a57b38dd0818 100644 --- a/sys/amd64/amd64/db_trace.c +++ b/sys/amd64/amd64/db_trace.c @@ -205,7 +205,8 @@ db_nextframe(db_addr_t *fp, db_addr_t *ip, struct thread *td) */ tf_addr = *fp + 16; - if (!__is_aligned(tf_addr, _Alignof(*tf)) || !INKERNEL(tf_addr)) { + if (!__is_aligned(tf_addr, _Alignof(struct trapframe)) || + !INKERNEL(tf_addr)) { db_printf("--- invalid trapframe %p\n", (void *)tf_addr); *ip = 0; *fp = 0; diff --git a/sys/arm64/arm64/db_trace.c b/sys/arm64/arm64/db_trace.c index 1c9290f19ed5..4bc6af26a023 100644 --- a/sys/arm64/arm64/db_trace.c +++ b/sys/arm64/arm64/db_trace.c @@ -92,7 +92,7 @@ db_stack_trace_cmd(struct thread *td, struct unwind_state *frame) struct trapframe *tf; tf = (struct trapframe *)(uintptr_t)frame->fp - 1; - if (!__is_aligned(tf, _Alignof(*tf)) || + if (!__is_aligned(tf, _Alignof(struct trapframe)) || !kstack_contains(td, (vm_offset_t)tf, sizeof(*tf))) { db_printf("--- invalid trapframe %p\n", tf); diff --git a/sys/riscv/riscv/db_trace.c b/sys/riscv/riscv/db_trace.c index d3a52ecf59bf..0d374b1493d7 100644 --- a/sys/riscv/riscv/db_trace.c +++ b/sys/riscv/riscv/db_trace.c @@ -83,7 +83,7 @@ db_stack_trace_cmd(struct thread *td, struct unwind_state *frame) struct trapframe *tf; tf = (struct trapframe *)(uintptr_t)frame->sp; - if (!__is_aligned(tf, _Alignof(*tf)) || + if (!__is_aligned(tf, _Alignof(struct trapframe)) || !kstack_contains(td, (vm_offset_t)tf, sizeof(*tf))) { db_printf("--- invalid trapframe %p\n", tf); From nobody Sat Jan 13 00:01:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBdqC0Jdnz56gjL; Sat, 13 Jan 2024 00:01: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 4TBdqB6wqLz51FR; Sat, 13 Jan 2024 00:01:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705104087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mXDYitu8B8VU+anMXRNGYmMlMf+7HRylwSXzLn0K6CU=; b=E2Ud0ViIq8hmCja46Hi+EicfA++Bj+C4jcWv5eCFn68IMEtJM0dSWn5c/m/LbKRIq9X6BI AfHW1cjwGrnkdaAQ+8XTqJXr/r3zkAqun5Nvz7gJpKlgilfdjmvyRorP3Z6dLCD+dhzWrW vDzXw0V55++MMTCr9o9rZFsNqAczplk0eoY1j/FjVYNgDqYGDQRPrI7T0INylzpJHBiDOO tS7//lPMX18IOEc8xONjZquvV+7NLmFoXV/gyk50Ugg8tiGUt3BqGhNSYMNdMKDouRo+4g zmUEzRK7wpdr2VqgM/18lt7CTYlYkAfQIK3MdVUV0lIZCc2BENkGAx5MJNno5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705104087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mXDYitu8B8VU+anMXRNGYmMlMf+7HRylwSXzLn0K6CU=; b=gttgGAYPYEVQW/0Qni4jQgWGpMJb+mSO7Eu7p0KjpYAbriy6L3K3ZHB9t5lyZbdicyqg1A xssGN/RbWDOCXKytH0n0OZqoGHrz4ltNIlwMAj9D6ayF7JjzdRcUTw5zYAmtGP2/c6lZfo jYYVYPOHlaqVURSzCHV5K5ZiM6SVVMp25j3OztqKNArmONndeFXAzuk7VYYp259BUX50z3 Y4yh/lNqHmu6O7nU4qgPOUtsBVVcYRyoP8SmqUI2j1XXLhO0/JwRCi+oaVc0PSIEJgqrAh p3Ts1mayKyINbVb+q0JA7u/6tF3ezuHzg3YWf1h7qwup1l1EUsL8JRSwBHv4jQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705104087; a=rsa-sha256; cv=none; b=KQAeu+CEpe8+nMi9S8TpXFyjs83Ixd8MiRK6ePcGuxGWAUfcjsBrg9s314/y7vPchPbsSH KJYqodJniMq4eF9KELlc379wYwLqmkWq0DeTOak3+9ijOhiLkq0k/hlBx2LEyKO8796AEr GLObvgAmPrCx62FiB1Adf5h7ReIMxljjxb5Wstv5fF9jnDNjbWjBTKZmCBl6qRvO3id0CQ +0mS5ekX8e5nUbhKA8WDk/nNUwpDW5tk6Grmq3ucxfLdIG3Epho0KQN/V6ddJYM1dDZdNW YiiXZusaQyeBwl78pADEqZibjud3BnNS9GFCQmuk912FWHiBxB3XAYnpVU1u8A== 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 4TBdqB60Fbz1MFM; Sat, 13 Jan 2024 00:01: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 40D01Qa7023008; Sat, 13 Jan 2024 00:01:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40D01Q3K023005; Sat, 13 Jan 2024 00:01:26 GMT (envelope-from git) Date: Sat, 13 Jan 2024 00:01:26 GMT Message-Id: <202401130001.40D01Q3K023005@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 60b2e2d3ee82 - main - libc: stop exposing __fcntl_compat List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 60b2e2d3ee82b1aa58bdca2697ea3dd25b903102 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=60b2e2d3ee82b1aa58bdca2697ea3dd25b903102 commit 60b2e2d3ee82b1aa58bdca2697ea3dd25b903102 Author: Brooks Davis AuthorDate: 2024-01-13 00:00:24 +0000 Commit: Brooks Davis CommitDate: 2024-01-13 00:01:13 +0000 libc: stop exposing __fcntl_compat It was exposed (under FBSDprivate_1.0) for forward compatability in threading libraries in 2008 by commit cd7d66a21f1a. The last consumer was removed in 2015 by commit 8495e8b1e9e1. I missed this among the _ and __sys_ symbols in commit e2417a21a025. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D43408 --- lib/libc/sys/Symbol.map | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index a2b8c2d40fc1..e9e3c7151c2f 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -594,7 +594,6 @@ FBSDprivate_1.0 { __sys_fchown; _fcntl; __sys_fcntl; - __fcntl_compat; _fhopen; __sys_fhopen; _fhstat; From nobody Sat Jan 13 02:30:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TBj7W3xqJz56xCD; Sat, 13 Jan 2024 02:30: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 4TBj7W3W3Pz43s9; Sat, 13 Jan 2024 02:30:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705113047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cy0CXTuaZY0EWo2gFVrLhT04mrIHkeo9GfXeB7/rV9U=; b=G5lH72UFRBSvgtajlXNqN1nGWgEq3gBznJEta5Bye44FMGjRxQxEjivlyyY/D+5Nmu7lkq A44g8TjAlGNIwgsUKxoNnLCR30cKKSSWKdW48mU4KBLn0VdlSg231V3COT/mEwrlFlbNKN cmf19TdqGyHtp9xGcJof3+Y1ARNCF5KyI7bc7vfzB8XK2R+90k6N7TGBCLnGev45vt2+VM QjtJ3lTMWAWemkKQk/VMrBha0CPzCjDbB36ixAvN2rh+/Z5gGU1MWTUuUqLeHhKkgEk7SD fEQlSmQk3bV/WA+4Yyt5FllPEMf17arLzrJxAGZKFfLEbqm/cjAFciEV2s78Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705113047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cy0CXTuaZY0EWo2gFVrLhT04mrIHkeo9GfXeB7/rV9U=; b=iG+rYNVYVsEmb+1DsPFupcLwsRgodB2u+QrxzPqcPj4M+qEdie+wZmFNRp3t35YdQqzx00 9ksJsZfOKEjbRruv6hsWWGbuJ8QD2QuTQRmB4IBQqlXE81iFItIqzRXQc9+L3AAZWGjVgW JcOwZCk4Dv2t1jtZw98cXxH6mu+8pnmNesWPTR7aJX9upJlwLP2T+7Xk0Y7k6pOovf5If5 /W9+hmK8PEs3EJP32SGKLEZXHaD3HrI9gYaKBYnFYekwvZjISN/lbC5/2Xs51TIR0qep0v Jlo+7aUROdjd//SarMNN2RYRIlG3g5NaibyKhLR68h/GLySE/npMmxOClIWA7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705113047; a=rsa-sha256; cv=none; b=BJCWTGPpfuQ0lSW2lkDn0OslzSkm+ePimL/Q9R2kou0jFjPUq7GdRpuptCBzDxOIJIIG33 2tTzIyb0+oE+0uKMErH06bZeXRhlknUkErOv8H5yBGmVinrTnpwUBxPGXUkwIGh4iQb5Db nFIIP3i4IwE8qM+3sc6LnYbnvUxZsDe943wzlVIMBONhMONYNpINlDs1BhCBkJkwR7AV8n oqyxyL16OFOxs42rMrttyLX9lPBQi5i1FxDipu+ERG52IFX3KDqyB/v5Qw02zVCIGm51MY jNZm83N3RcdhbmXh3cCVMifIycTCD6Nq+w1o1ut/0b3dadstMatY9GWEyRkUcA== 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 4TBj7W2ZVHz1RH1; Sat, 13 Jan 2024 02:30: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 40D2UlW9071919; Sat, 13 Jan 2024 02:30:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40D2UlxW071916; Sat, 13 Jan 2024 02:30:47 GMT (envelope-from git) Date: Sat, 13 Jan 2024 02:30:47 GMT Message-Id: <202401130230.40D2UlxW071916@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: c8328f1a7b6e - main - pmap_init(9): drop MLINKS reference List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c8328f1a7b6ea59951e2ea2c1a9a4aa10020c8c5 Auto-Submitted: auto-generated The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=c8328f1a7b6ea59951e2ea2c1a9a4aa10020c8c5 commit c8328f1a7b6ea59951e2ea2c1a9a4aa10020c8c5 Author: Robert Wing AuthorDate: 2024-01-12 17:29:15 +0000 Commit: Robert Wing CommitDate: 2024-01-12 17:29:15 +0000 pmap_init(9): drop MLINKS reference fix the build --- share/man/man9/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 276662568088..863963d24474 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1811,7 +1811,6 @@ MLINKS+=PHOLD.9 PRELE.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 MLINKS+=pmap_is_modified.9 pmap_ts_referenced.9 MLINKS+=pmap_pinit.9 pmap_pinit0.9 MLINKS+=pmap_qenter.9 pmap_qremove.9 From nobody Sat Jan 13 14:11:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TC0gz0bSpz57dTB; Sat, 13 Jan 2024 14:11:27 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TC0gy1VCwz4Jpc; Sat, 13 Jan 2024 14:11:26 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 3.97.99.32) smtp.mailfrom=cy.schubert@cschubert.com Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id OdUYrETVZxDxGOejNrVIUI; Sat, 13 Jan 2024 14:11:25 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id OejLr9WPRWIKPOejMr7hb5; Sat, 13 Jan 2024 14:11:25 +0000 X-Authority-Analysis: v=2.4 cv=D+pUl9dj c=1 sm=1 tr=0 ts=65a29a0d a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=dEuoMetlWLkA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=jnMofEQN8Fceji3S_UUA:9 a=CjuIK1q_8ugA:10 a=ztI4eMwfBtkA:10 a=UuLlkBnjUTgA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 375795D3; Sat, 13 Jan 2024 06:11:23 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 01FCD22B; Sat, 13 Jan 2024 06:11:22 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Jessica Clarke , Cy Schubert , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , so@greebsd.org Subject: Re: git: cb350ba7bf7c - main - kerberos: Fix numerous segfaults when using weak crypto In-reply-to: <20240112074339.A581B23D@slippy.cwsent.com> References: <202401111331.40BDVZfn015429@gitrepo.freebsd.org> <20240112071106.C72D8235@slippy.cwsent.com> <20240112074339.A581B23D@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Thu, 11 Jan 2024 23:43:39 -0800." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 13 Jan 2024 06:11:22 -0800 Message-Id: <20240113141123.01FCD22B@slippy.cwsent.com> X-CMAE-Envelope: MS4xfOjtIbgOZPFwgjGYRQ5y1PLnFEUhRUejnm5THc98ah5ZxZtEJcUBv3nU4aTniJnY8uo9BsZGKI/YQoQlGN2B76nni3g4+CNTCSIKCFWPkcSuX1P8z3/v YYBYYz3K8ygD5lRRTiyKEDEcqiWmWxIH+/xn4jgOV1TBZYsDMqFU0qIBors5zo6huiANSZFpLYVes7aHHbP+YeqimkPBQE7D5em59Llts++EPRcMS0Pvu2Xq EqcrRhOwwlbsAmBcjd1jz1HqXCY8A/JiKHBaqwDBkVYY5w9l9AFZQEwTSG3G70oqX/nYxJyr7ye/9zB0d3tB0eX+4Zlb7HxzSPhgoKPnK5mXypyZy+CkLrua QXQj2JPj X-Spamd-Bar: - X-Spamd-Result: default: False [-1.69 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.995]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[3.97.99.32:from]; TO_DN_EQ_ADDR_SOME(0.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[cschubert.com]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCPT_COUNT_FIVE(0.00)[6] X-Rspamd-Queue-Id: 4TC0gy1VCwz4Jpc In message <20240112074339.A581B23D@slippy.cwsent.com>, Cy Schubert writes: > In message <20240112071106.C72D8235@slippy.cwsent.com>, Cy Schubert writes: > > In message , Jessica > > Clarke w > > rites: > > > On 11 Jan 2024, at 13:31, Cy Schubert wrote: > > > >=20 > > > > The branch main has been updated by cy: > > > >=20 > > > > URL: = > > > https://cgit.FreeBSD.org/src/commit/?id=3Dcb350ba7bf7ca7c4cb97ed2c20ab45a > f= > > > 60382cfb > > > >=20 > > > > commit cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb > > > > Author: Cy Schubert > > > > AuthorDate: 2023-12-06 15:30:05 +0000 > > > > Commit: Cy Schubert > > > > CommitDate: 2024-01-11 13:26:42 +0000 > > > >=20 > > > > kerberos: Fix numerous segfaults when using weak crypto > > > >=20 > > > > Weak crypto is provided by the openssl legacy provider which is > > > > not load by default. Load the legacy providers as needed. > > > >=20 > > > > When the legacy provider is loaded into the default context the = > > > default > > > > provider will no longer be automatically loaded. Without the = > > > default > > > > provider the various kerberos applicaions and functions will = > > > abort(). > > > > > > Hi, > > > This has completely broken macOS and Linux cross-building. Please > > > either fix this quickly or, if unable to, revert until such time as you > > > can. Note that patches can be tested by creating a PR against the > > > GitHub mirror. > > > > Thanks for the heads up. I see the problem and am working on a fix. > > I think the correct approach would be to separate the new > fbsd_ossl_provider_load() and unload functions into their own library > (instead of libroken). This avoids the less desirable option of including > bsd.cpu.mk in secure/lib/Makefile.common, which does build but could affect > future work. The alternative approach also requires secure/lib/libcrypto (because of libkrb5) being built during prebuild phase. Either way bsd.cpu.mk will need to be included in the secure/lib/libcrypto/Makefile.common. Both of these similar approaches, attempting to limit the change to local to Heimdal only result in the same Linux MacOS failure. This leaves us with enabling legacy (weak) crypto globally, like this: diff --git a/crypto/openssl/apps/openssl.cnf b/crypto/openssl/apps/openssl.c nf index 7996120cc67e..659c0b21abbd 100644 --- a/crypto/openssl/apps/openssl.cnf +++ b/crypto/openssl/apps/openssl.cnf @@ -57,6 +57,7 @@ providers = provider_sect # List of providers to load [provider_sect] default = default_sect +legacy = legacy_set # The fips section name should match the section name inside the # included fipsmodule.cnf. # fips = fips_sect @@ -70,8 +71,10 @@ default = default_sect # OpenSSL may not work correctly which could lead to significant system # problems including inability to remotely access the system. [default_sect] -# activate = 1 +activate = 1 +[legacy_sect] +activate = 1 #################################################################### [ ca ] Would this be acceptable or would we prefer to add bsd.cpu.mk to secure/libcrypto/Makefile.inc? -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Sat Jan 13 14:19:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TC0sn0X9fz57f9X; Sat, 13 Jan 2024 14:19:57 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TC0sm31d0z4Kfy; Sat, 13 Jan 2024 14:19:56 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 3.97.99.32) smtp.mailfrom=cy.schubert@cschubert.com Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id Oe6nrEUtZxDxGOerbrVJXu; Sat, 13 Jan 2024 14:19:55 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id Oerar9YaWWIKPOerbr7iGL; Sat, 13 Jan 2024 14:19:55 +0000 X-Authority-Analysis: v=2.4 cv=D+pUl9dj c=1 sm=1 tr=0 ts=65a29c0b a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=dEuoMetlWLkA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=F2mt8MKA_61uHnqjoOgA:9 a=CjuIK1q_8ugA:10 a=pK3_ou3pLUoA:10 a=ztI4eMwfBtkA:10 a=UuLlkBnjUTgA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 267ED5E0; Sat, 13 Jan 2024 06:19:54 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id E79B716E; Sat, 13 Jan 2024 06:19:53 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Jessica Clarke , Cy Schubert , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , so@freebsd.org Subject: Re: git: cb350ba7bf7c - main - kerberos: Fix numerous segfaults when using weak crypto In-reply-to: <20240113141123.01FCD22B@slippy.cwsent.com> References: <202401111331.40BDVZfn015429@gitrepo.freebsd.org> <20240112071106.C72D8235@slippy.cwsent.com> <20240112074339.A581B23D@slippy.cwsent.com> <20240113141123.01FCD22B@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Sat, 13 Jan 2024 06:11:22 -0800." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 13 Jan 2024 06:19:53 -0800 Message-Id: <20240113141953.E79B716E@slippy.cwsent.com> X-CMAE-Envelope: MS4xfKLU4JPDAM/BW+QJXD7aEE0v57bNR9IbXxEw0IkTWjOMqgb7s2DPe1C6rkNYW+oc5Xn0qe3JDgozyGZT64GjFZoN+bHVPaUubqpY932W2L5ZDNS2VzAz 9METqoM1jWGPzGr0PkT4p7/La5MrHYsOeberqoJJe19w8FxRjM+pUjucItTUjkNJsqFel5Y07W/3T8SSy5cmJ98uzSLFUQ8iMdgIclORtTkm2ZiI26HqbbeD vwZunSya/BXpY12DKCErHvQUULfuDKDRYpczF1qFMUNCf5brACstBhus8qejR/ZrA2+MP1O1q15xgfZkpB8Pb55kAep+iFn8lgIxXgBI7iSSAr1Gl8EyS7bf bvqRrERIwNN/07XmndUFSmR88PdThg== X-Spamd-Bar: - X-Spamd-Result: default: False [-1.69 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.995]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[3.97.99.32:from]; TO_DN_EQ_ADDR_SOME(0.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[cschubert.com]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCPT_COUNT_FIVE(0.00)[6] X-Rspamd-Queue-Id: 4TC0sm31d0z4Kfy In message <20240113141123.01FCD22B@slippy.cwsent.com>, Cy Schubert writes: > In message <20240112074339.A581B23D@slippy.cwsent.com>, Cy Schubert writes: > > In message <20240112071106.C72D8235@slippy.cwsent.com>, Cy Schubert writes: > > > In message , Jessica > > > Clarke w > > > rites: > > > > On 11 Jan 2024, at 13:31, Cy Schubert wrote: > > > > >=20 > > > > > The branch main has been updated by cy: > > > > >=20 > > > > > URL: = > > > > https://cgit.FreeBSD.org/src/commit/?id=3Dcb350ba7bf7ca7c4cb97ed2c20ab4 > 5a > > f= > > > > 60382cfb > > > > >=20 > > > > > commit cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb > > > > > Author: Cy Schubert > > > > > AuthorDate: 2023-12-06 15:30:05 +0000 > > > > > Commit: Cy Schubert > > > > > CommitDate: 2024-01-11 13:26:42 +0000 > > > > >=20 > > > > > kerberos: Fix numerous segfaults when using weak crypto > > > > >=20 > > > > > Weak crypto is provided by the openssl legacy provider which is > > > > > not load by default. Load the legacy providers as needed. > > > > >=20 > > > > > When the legacy provider is loaded into the default context the = > > > > default > > > > > provider will no longer be automatically loaded. Without the = > > > > default > > > > > provider the various kerberos applicaions and functions will = > > > > abort(). > > > > > > > > Hi, > > > > This has completely broken macOS and Linux cross-building. Please > > > > either fix this quickly or, if unable to, revert until such time as you > > > > can. Note that patches can be tested by creating a PR against the > > > > GitHub mirror. > > > > > > Thanks for the heads up. I see the problem and am working on a fix. > > > > I think the correct approach would be to separate the new > > fbsd_ossl_provider_load() and unload functions into their own library > > (instead of libroken). This avoids the less desirable option of including > > bsd.cpu.mk in secure/lib/Makefile.common, which does build but could affect > > > future work. > > The alternative approach also requires secure/lib/libcrypto (because of > libkrb5) being built during prebuild phase. Either way bsd.cpu.mk will need > to be included in the secure/lib/libcrypto/Makefile.common. Both of these > similar approaches, attempting to limit the change to local to Heimdal only > result in the same Linux MacOS failure. This leaves us with enabling legacy > (weak) crypto globally, like this: > > diff --git a/crypto/openssl/apps/openssl.cnf b/crypto/openssl/apps/openssl.c > nf > index 7996120cc67e..659c0b21abbd 100644 > --- a/crypto/openssl/apps/openssl.cnf > +++ b/crypto/openssl/apps/openssl.cnf > @@ -57,6 +57,7 @@ providers = provider_sect > # List of providers to load > [provider_sect] > default = default_sect > +legacy = legacy_set > # The fips section name should match the section name inside the > # included fipsmodule.cnf. > # fips = fips_sect > @@ -70,8 +71,10 @@ default = default_sect > # OpenSSL may not work correctly which could lead to significant system > # problems including inability to remotely access the system. > [default_sect] > -# activate = 1 > +activate = 1 > > +[legacy_sect] > +activate = 1 > > #################################################################### > [ ca ] > > Would this be acceptable or would we prefer to add bsd.cpu.mk to > secure/libcrypto/Makefile.inc? Adding so@freebsd.org. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Sat Jan 13 16:17:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TC3Tp1w6rz566Wl; Sat, 13 Jan 2024 16:17: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 4TC3Tp14jrz4ZWm; Sat, 13 Jan 2024 16:17:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705162670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tHfzFMiPtgMDAMMwoUKA1LNAwCqKvukEEEQmKo3tyo4=; b=IT50xh0Zu1xH+dy4r/p2v1m0zTBDyDyX5EE3HMj0C+6tUF6Z8PgY5nhvJvxUw9qk97sKfR IvIUiGygGuccNS9En+hxc1EDBL9wK70WmT4XPRHWmd4iDZV+u34bYV2/c9d+sUIwZZHVLS H+/tTbmZFVidBADoJsorZ6BqnIUyOCwD5eR9qlbydYQoSIwQriRyF5xjqIdh/Y1InBYbxM VvaozdJ7nVw0x3xcitfOW+JX2VVzBHLiL/nZkTt8cT9tb1faDRzV6ykKTys5sGNNlhRDS2 va6W5OQ9ncYf9TXnQWQsJJFpOK5sdcA+SJjRmVUnO/O6phIdC8SiS8uZbkahdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705162670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tHfzFMiPtgMDAMMwoUKA1LNAwCqKvukEEEQmKo3tyo4=; b=WsQtBaR9HvYDArWyzjBGA0/yqLeVuo+R6Agfdts8pYbRuCk3pO4Bv5c/xnzi7V028DXbGm h/cr//2/yW/FW/jWFI1HJwnwe+axkDthoTXLiuBXrb/MtJbali+rp15zm8FWMgEz8TipOS cHfbP0ICmxvZLzXGy5FVFMXD4rcVNMTMrT/LhVH6uiLaiJbxiYOiPLYNxB4YRak+YCM4Nm hNdl1fItAanat2b4MIlwPWxBWSFzWMlNm97CZ1tjjJjeloVqrRZowr3v3r2Y8mQui9RIkn iZfwxYokPHNigy9rNr1wp9yM2WZNOLTgcyYh7mpqtsLpwheuNXutju843yxnbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705162670; a=rsa-sha256; cv=none; b=eTjgA5HXcqpcxkSqi745+INEwytM8CkHrh5e9yRwwxf86ZEfYbkK8fBqKkPn8611OWB8il yL7t5zGmOFN5AWwVT/YUHjDf161k7fFG+pmJq4C3WcQVDfosuzSKR00gpvmmzh+WRajXhS E3sUM3EKRxCZtAQrjEnP7i8AObORzBIiE22R1UmjU052cYZQTZRH6gGpA1tB7QmZaTpmEG /V5b3xwNxjmuTdqGXPfOIZRJkCcVjOZ7xqYIthMAJt7qaM1S9FVK3l7NOjKQU1spTNaAW2 UmPs4CmMaZ/5CQjWQ4fIejYDvm+MLrcWoWVLLWVdwpXBinpRx129yUoXTEtWLw== 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 4TC3Tp067vzcx5; Sat, 13 Jan 2024 16:17: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 40DGHnX0056721; Sat, 13 Jan 2024 16:17:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40DGHnbT056718; Sat, 13 Jan 2024 16:17:49 GMT (envelope-from git) Date: Sat, 13 Jan 2024 16:17:49 GMT Message-Id: <202401131617.40DGHnbT056718@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider Subject: git: e3c7b76fa810 - main - man(1): support spaces in filenames List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3c7b76fa8105929ae9a785e5ffc44274b1b0a81 Auto-Submitted: auto-generated The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=e3c7b76fa8105929ae9a785e5ffc44274b1b0a81 commit e3c7b76fa8105929ae9a785e5ffc44274b1b0a81 Author: Wolfram Schneider AuthorDate: 2024-01-13 16:16:55 +0000 Commit: Wolfram Schneider CommitDate: 2024-01-13 16:16:55 +0000 man(1): support spaces in filenames The globbing function in exists() needs to handle white spaces. PR: 275978 Reviewed by: kevans, bapt, emaste MFC after: 1 week --- usr.bin/man/man.sh | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index 7e2151295ba7..777726f880db 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -191,7 +191,9 @@ decho() { } # Usage: exists glob -# Returns true if glob resolves to a real file. +# +# Returns true if glob resolves to a real file and store the first +# found filename in the variable $found exists() { local IFS @@ -201,14 +203,16 @@ exists() { # Use some globbing tricks in the shell to determine if a file # exists or not. set +f - set -- "$1" $1 + for file in "$1"* + do + if [ -r "$file" ]; then + found="$file" + set -f + return 0 + fi + done set -f - if [ "$1" != "$2" -a -r "$2" ]; then - found="$2" - return 0 - fi - return 1 } @@ -230,10 +234,10 @@ find_file() { fi decho " Searching directory $manroot" 2 - mann="$manroot/$4.$2*" - man0="$manroot/$4.0*" - catn="$catroot/$4.$2*" - cat0="$catroot/$4.0*" + mann="$manroot/$4.$2" + man0="$manroot/$4.0" + catn="$catroot/$4.$2" + cat0="$catroot/$4.0" # This is the behavior as seen by the original man utility. # Let's not change that which doesn't seem broken. @@ -313,7 +317,7 @@ man_check_for_so() { .so*) trim "${line#.so}" decho "$manpage includes $tstr" # Glob and check for the file. - if ! check_man "$path/$tstr*" ""; then + if ! check_man "$path/$tstr" ""; then decho " Unable to find $tstr" return 1 fi From nobody Sat Jan 13 16:46:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TC46m1k1jz569Pt; Sat, 13 Jan 2024 16:46: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 4TC46m1CRwz4dSj; Sat, 13 Jan 2024 16:46:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705164384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iwQ294SHjbBQZdsCaRIVo8l71a2YAG+2/o5QM+bNw/w=; b=VK3CbJNRIzOJpa3Y2I8cywMT2SEF+4YNGuvFHgAx/18qswmgbfNcZh2GTCnaMAzL6ZWmi2 YOvX+810JoJQ38ACryutmKBvLSDSIL2ctaStnu+JEI6uVYNA++GXd4Waz1+IyAlzyvI2vd QMV2KCd2f7Gv3krh5jlxEaUMnCteKayhFWinBT/1H2e5xInwf0oPt+8e1hIHp3ASHMHTjB T04b+C+eco/E1w9PDcCMJ1kAvZl6WK1PKmFJmVDIE3LXiMJW/LOb1Xq25G1jhFjPRD/LLx VQLp18YC+XQ26uAeliZviBRU1oai3087WkASFxiuevPkpkB586jD6AQlOvSI8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705164384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iwQ294SHjbBQZdsCaRIVo8l71a2YAG+2/o5QM+bNw/w=; b=Kzpmo4qWuH0MDfgFrdJd2aUCtU3UPBvRP+k84HGthJykEUzK/lSBjk9MYtrGUZdGQFm0eo 0Imzc1sJDQ2MsUpof1oxi1ViZHM3cq5OMz5cpBg+q3k1+a5gFd6zbWcM1UtaEb97anWX9w I6srxwfXbci/IrGAjfoCiKn+VaxuZtuXzp/zucgFeoKnJhziLqbJN3QfWW1oN5JgAKlAr4 K/VD5SlHwxzKisyNW+ZXUA+bgn2+asVgSsOCGTQm1OYT4AX8jvdRIVOeeNZiBautMndWXP xbrtHM91DhWepUlpo6TKtPpB24iTTExQ8gJghsBB9FpI7V9/tXr14eoMVSyBHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705164384; a=rsa-sha256; cv=none; b=H4lNP8EnG7faBHGKZnmMGz8JQX8m8LUHYZPOzZ39oLuX7yj5ZHwaraA55GwTzV986g7Xy4 oDWMxVwoyS3UIHhRyrtbRSBx7VT1RSW/FE0YMdwzvTgsjb5hv182I5/1t0Tyn0dVaYtYEg EhNjQQojYOM5KD18Pm0hwTA7ETMBPbZYtnAmrSIfsJWzde2iKkNYos2AiOilQJCUzsughB fpYffoFaNYvACFQOJ3OW0gIQRZA1clzAVa+JsXDt3DMcPoxRJkNBe0a0cUKcLhTQUagHIb ZSzNAlhYKFncKIGEWEe32fZh7JPmgbf6XsKpv7J0eizHXhd8ZV65yDN7emhVLg== 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 4TC46m08G6zf0h; Sat, 13 Jan 2024 16:46: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 40DGkNe8006441; Sat, 13 Jan 2024 16:46:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40DGkNbp006438; Sat, 13 Jan 2024 16:46:23 GMT (envelope-from git) Date: Sat, 13 Jan 2024 16:46:23 GMT Message-Id: <202401131646.40DGkNbp006438@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: 69748e62e82a - main - vm/vm_object.c: minor cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 69748e62e82a1f5ef77fd3e1b0c9d7e6a89d22b2 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=69748e62e82a1f5ef77fd3e1b0c9d7e6a89d22b2 commit 69748e62e82a1f5ef77fd3e1b0c9d7e6a89d22b2 Author: Konstantin Belousov AuthorDate: 2024-01-13 01:44:39 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-13 16:45:53 +0000 vm/vm_object.c: minor cleanup Remove sys/cdefs.h and sys/socket.h includes. Order sys/ includes alphabetically. Do not check for NULL before free(). Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week DIfferential revision: https://reviews.freebsd.org/D43444 --- sys/vm/vm_object.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index c141b410edf2..1dd6878cf4ab 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -62,10 +62,8 @@ * Virtual memory object module. */ -#include #include "opt_vm.h" -#include #include #include #include @@ -74,19 +72,18 @@ #include #include #include -#include -#include #include -#include /* for curproc, pageproc */ +#include +#include #include -#include +#include +#include #include #include #include #include #include #include -#include #include #include @@ -2612,8 +2609,7 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) } strlcpy(kvo->kvo_path, fullpath, sizeof(kvo->kvo_path)); - if (freepath != NULL) - free(freepath, M_TEMP); + free(freepath, M_TEMP); /* Pack record size down */ kvo->kvo_structsize = offsetof(struct kinfo_vmobject, kvo_path) From nobody Sat Jan 13 22:47:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCD7j1C8Jz56rwS; Sat, 13 Jan 2024 22:47: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 4TCD7j0SSdz4ZNB; Sat, 13 Jan 2024 22:47:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705186065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FrgVKFMUoBc0i0GMyeeq+4nPvtAGrCOG9LYMlisBkWU=; b=XGQ+/9nFyEfjecGwDF/Jy3w7nSgXMyqmtsluhGfcdRQ6EwPbF3zRQVChwrFLywUOqBCLzi sDzO3SKHPZ8YVp+MTvzpFzggkDpfc1o2dUcKCUUAANFxYq21PDpVWO2RwB04uKRsaWaSwD K3WcBdmc0IaaTx+3Yq8aKPtb/x8TBWHib0V3ZGoeG38W5zl7nSFhbgYRo0ufnCQCG5WtrE QRPKhSFBbvcXtukrxjwWeTagtxpPnL5h+CRCSKccKRUKAvU8R8y64PcR4hWxHOJ1cVuBM2 Fd7e4+DAiyWB6Ce3XpW26+XQh8UaTkVYCU98hO7+js+MXn9Cttp2oPBWb/uQJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705186065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FrgVKFMUoBc0i0GMyeeq+4nPvtAGrCOG9LYMlisBkWU=; b=Z9wkZhrw9ng4nY6zwepqHmZp/vq3lxaXGRT7WDqTaA4kJQzEiatd9zDHByG4YMINSdHxdA 9bO4W9j6rLJ7JXQlvroIpIEIkbRzU9X/y5V+s0PF144781XYQ0HJzDMAI9dFu6o+ptw04G RptjlIELHWbwkaEvwSAHSC5Uc4ou6i1yPDGzA8PGCRE9av557PAuGNE1qn7QqOSYOnjIyU 3WxruZ3bPC0mtR7F8Hrbs5gPwZjWb2G7tx+5EL3BQvJg40O/bDiYOdw5vGA9crqEyH1YO7 X8otUQqLGQWSiVduKEWJPn5Robf7xgHpeDLtMC/chgvg8j1UvzGLUDlfM0TSeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705186065; a=rsa-sha256; cv=none; b=Z/O/KoyOi9k9or501OGYBM+nh4PzyhAwzPvAHUJ070mgXl6+8XfifKyJ8zrdsvJPaX8Wqc Uu5x2uXtEdffaq2pL/ek+Ug7J00BJlQaRXNQAFsAafpgfy39l51lZY3pujFt2HxEQ/EQoz a4/+lHHfeIZWpi1lirrK8ltiyhxf/bw0hHIT+uxruiuOVSfSzvOX0XcwcTM9MqIK2sxs2P 4qEBI6jjsnp5B9JI0w+C8pFHmGsggR+LLCyfNbpZP3Ptfr9At/DpnzinV7HStUMMVNwqeA 5G8kBTZquXaoGpBf7xbO7Kcl9TNaE6r7CaFHN4tGgKi3R8Wx+r0c0MJTdnTPwA== 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 4TCD7h6XJtznxV; Sat, 13 Jan 2024 22:47: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 40DMliNn009199; Sat, 13 Jan 2024 22:47:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40DMliUN009196; Sat, 13 Jan 2024 22:47:44 GMT (envelope-from git) Date: Sat, 13 Jan 2024 22:47:44 GMT Message-Id: <202401132247.40DMliUN009196@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 6b1c534927ad - main - Add a regression test for PR 276191. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b1c534927ad47e9b0dd8be1a39f56c3ea813d44 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=6b1c534927ad47e9b0dd8be1a39f56c3ea813d44 commit 6b1c534927ad47e9b0dd8be1a39f56c3ea813d44 Author: Alan Somers AuthorDate: 2024-01-08 01:03:40 +0000 Commit: Alan Somers CommitDate: 2024-01-13 22:47:16 +0000 Add a regression test for PR 276191. The bug isn't fusefs-specific, but this is the easiest way to reproduce it. PR: 276191 MFC after: 1 week MFC with: bdb46c21a3e68d4395d6e0b6a205187e655532b0 Differential Revision: https://reviews.freebsd.org/D43446 Reviewed by: kib --- tests/sys/fs/fusefs/io.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/sys/fs/fusefs/io.cc b/tests/sys/fs/fusefs/io.cc index b17d3857d327..fda13a72cc4c 100644 --- a/tests/sys/fs/fusefs/io.cc +++ b/tests/sys/fs/fusefs/io.cc @@ -507,6 +507,16 @@ TEST_P(Io, resize_a_valid_buffer_while_extending) close(m_test_fd); } +/* + * mmap of a suitable region could trigger a panic. I'm not sure what + * combination of size and offset counts as "suitable". Regression test for + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276191 + */ +TEST_P(IoCacheable, vnode_pager_generic_putpage_clean_block_at_eof) +{ + do_mapwrite(0x1bbc3, 0x3b4e0); +} + INSTANTIATE_TEST_SUITE_P(Io, Io, Combine(Bool(), /* async read */ Values(0x1000, 0x10000, 0x20000), /* m_maxwrite */ From nobody Sun Jan 14 01:17:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCHS71lWhz56drY for ; Sun, 14 Jan 2024 01:17: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 4TCHS712Ycz4rGP; Sun, 14 Jan 2024 01:17:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705195031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sM+0oQ+O8CbffQ2MraBaNBcyvILEnRNwM8gDieifDus=; b=nfVCtC8NFya7uyqgvZJ3QHMMHXQ20Bqbn43EJVC+e9mthL14dXGLXFUZXYZa7dttaKCcYL oVw2S+/Oc1FXAo6gRiW2NgaiYwlXAphQlfWVytDsivuanfBveGi9FtF0gyVxr50Pu1rn9m beXPNUUn8micw0U7ZZf1zfU1oeE2f4Ip9uojQq7rX5bYPWVDyB8K7swT9KTmp5d6hWD6za r9h+1hBf72n8BL/eoN/wJ+ByfFpceyQAlwrlby5gHpogdJ234dluN+L4hF2gj/N0tpDNbs 7XhLdw9pspfBqvQPAIQhkjI/zV62fKIsE7eeGo2yBvA64QzRkQXPuxAPF2oJnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705195031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sM+0oQ+O8CbffQ2MraBaNBcyvILEnRNwM8gDieifDus=; b=NPiAL50IH6enHiqT8Is+b7QFmqb7KNHVUxkQx1LA0v7/5GYJwQ9CEKDWTM8DrtjccV0TkS UEEKOpPRYa/W08ZDprNmGmIu110HMdjKzV74XeC4CfXReQgRJhgjy5eSHWepyfaqF2e4s7 9sWQG8B3eHxyB07DovALi4hASJvse1VWLy/ddlA7se40B9gTAuHfPIJsLkq9fLuiAii8wr odWoYGc8xm6m8On/uQSyZzwknBERAn4V3/RFFF1uF+LMS0AfempVkb3JQVhU/vfDTyMrYW 3O0rEx4DBlaMazZP99TBM2pqEFD1MX8JRc7KJfRrDXrN/0+EWP9+CVu9wAEUAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705195031; a=rsa-sha256; cv=none; b=I0iYWT6DtKX+m8KxKFE6iKLeBOftBh4VUYGGNZNtp9mRZKmnr3z5sDTLWaUUV9kBu4xFaL G6gzUsIwUHzMslthA8wJKMOPYNQBHr0s9KapkNPbTOig1yXeJy8CXPBJxDwbKKoE5thdj1 VHE+X5nDbTAaM7HZ83GVa1Ju59XFBIVyhK7P2YbM0BBAu7lRQiuYouTXdDQLmKx742Emnv arbZ7n3kzo+Bf+lsyXsCujNFG81Lv81XiaNsbiHdf2KcD15IWGllQcM2QophTzcu0rs8iA cIu/Ux2uS47i+KVFB/+OeqoKgIjbworEglNJoZ7UTkxoLRS3yAma1/1z+1ewrw== 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 4TCHS7085rztS6; Sun, 14 Jan 2024 01:17: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 40E1HAlU060401; Sun, 14 Jan 2024 01:17:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40E1HAcn060400; Sun, 14 Jan 2024 01:17:10 GMT (envelope-from git) Date: Sun, 14 Jan 2024 01:17:10 GMT Message-Id: <202401140117.40E1HAcn060400@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 1708b76766fb - Create tag vendor/NetBSD/bmake/20240108 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/tags/vendor/NetBSD/bmake/20240108 X-Git-Reftype: annotated tag X-Git-Commit: 1708b76766fbc25c76e145f7d2a67aee42632428 Auto-Submitted: auto-generated The annotated tag vendor/NetBSD/bmake/20240108 has been created by sjg: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/NetBSD/bmake/20240108 tag vendor/NetBSD/bmake/20240108 Tagger: Simon J. Gerraty TaggerDate: 2024-01-14 01:16:43 +0000 Tag bmake/20240108 commit 7a05a7153af649605e1ebde33aac94a14ed2a4cd Author: Simon J. Gerraty AuthorDate: 2024-01-14 01:16:25 +0000 Commit: Simon J. Gerraty CommitDate: 2024-01-14 01:16:25 +0000 Import bmake-20240108 Interesting/relevant changes since bmake-20230909 * VERSION (_MAKE_VERSION): 20240106 Merge with NetBSD make, pick up o fix duplicate progname when reporting an unknown target o unit tests for Cmd_Exec using temp file * VERSION (_MAKE_VERSION): 20240105 Merge with NetBSD make, pick up o main.c: Cmd_Exec write cmd to a file if too big avoid blowing commandline/env limits * VERSION (_MAKE_VERSION): 20240101 o util.c: flesh out more of strftime * configure.in: add --with-bmake-strftime it is not a full implementation but enough to pass all the unit-tests. * parse.c: LoadFile do not append \n to empty buffer. * VERSION (_MAKE_VERSION): 20231230 Merge with NetBSD make, pick up o simplify memory allocation for string buffers o fix declared types of list nodes o suff.c: clean up freeing of suffixes o var.c: simplify debug message for the ':@var@...@' modifier clean up variable handling * VERSION (_MAKE_VERSION): 20231226 Merge with NetBSD make, pick up o compat.c: ensure make's output is correctly ordered with that of the target when not going to a tty o main.c: check for shellPath whether to call Shell_Init() * VERSION (_MAKE_VERSION): 20231224 Merge with NetBSD make, pick up o compat.c: check for shellPath whether to call Shell_Init() tweak the unit test to detect the bug thus fixed. o make.1: do not claim .SHELL is only used by jobs mode. * VERSION (_MAKE_VERSION): 20231220 Merge with NetBSD make, pick up o str.c: speed up pattern matching in the ':M' modifier o var.c: fix confusing debug logging when deleting a variable use consistent debug messages style when ignoring variables * VERSION (_MAKE_VERSION): 20231210 Merge with NetBSD make, pick up o var.c: avoid segfault on empty :C match expression explain in debug log why variable assignment is ignored. * VERSION (_MAKE_VERSION): 20231208 Merge with NetBSD make, pick up o var.c: ensure fromCmd is set correctly for variables set on command line. * VERSION (_MAKE_VERSION): 20231124 Merge with NetBSD make, pick up o main.c: cleanup processing of -j fix lint warning about strchr o var.c: more accurate error message for invalid ':mtime' argument cleanup :[...] modifier avoid reading beyond substring when comparing o unit-tests cover all cases of :mtime, test and explain exporting of variables o cleanup comments * bsd.after-import.mk (ECHO_TAG): FreeBSD no longer uses $FreeBSD$ tag, so avoid adding it. mk/ChangeLog since bmake-20230909 * dirdeps.mk: for MAKE_VERSION 20240105 we do not have the same limits on command line length, so skip export of lists to env. * jobs.mk: avoid C suffix in JOB_MAX_C if factor is floating point. This keeps JOB_MAX numeric incase another makefile does comparisons. * gendirdeps.mk: if META_XTRAS is passed to us, add to META_FILES From nobody Sun Jan 14 01:17:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCHS71lVrz56dl6 for ; Sun, 14 Jan 2024 01:17: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 4TCHS70vwWz4rPX; Sun, 14 Jan 2024 01:17:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705195031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7qNcbYZEifqC7yEHtSzSIM9qv3tMGcqKUwlX7jhEjqA=; b=vLKXwcYGzqp2gkGonEQTNvRmKlH07IdqwskBmLUi0FMdCtxu9BxoDnVGzJadENGU6nTzi8 JIcJMTtsrgAyAYIxPyUh/mqYRH8t9WWtrW8GCkW5kjFRhlYs7ScEY2o/iKHTskvICPRhBx dSDO0v2e6z/YYfnNmyOUQO+AyFueH7lunLLZu25SLYyoaRXZNa+AWQ7eAe7iAvXL48gCgA IGD7C3hD6bDmWMi8KyfJIWyzFgUMxp41N0PWlzoJCbt0TEhfstfsQFWS5X+fXs+jRZTmjq oiWXQEQBlQp22nV57s1ODO0Zj7QYydwVpTYv3z69wGAE9w9lT5acccNAdMhAMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705195031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7qNcbYZEifqC7yEHtSzSIM9qv3tMGcqKUwlX7jhEjqA=; b=eLYpG2iKDOVJnhrMpRa0mNzIWbtj+hrwnyd9yugDHQA8KlkJWLsFMjWPobiMLZ/AGkcbBm cpv6WI/dW6ax7ejow/y2jEbomCf0pz7MCe3ep8rPOUG00fbXBUnCfTDnzBKWWZzv6sLI9s P5u6NmhfcFrJy7YFYyhmnfHWf3f3jBDutiqpfBcgQPNWz8ouzdLx/3+XGeC5NpT1vIq+Qc sd9TQmGpxGKPV0dtGxfT0j7KmeVCrzlzg+AahJLVGcki0TzWX0rsXPaiE7166XBm+3HbKV tQSgZBgJx7auPtj6zn34rfWkkwvA9FkZHVs0ZvucuEJNqDCYLESCzRydfWVSFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705195031; a=rsa-sha256; cv=none; b=MSRO+PALEmiw2/3DNHY2xx86jE719yXTT8y4M9FXEyQyVeCENhNhhQ97RbucKf7ubBa/7s DvOkhCmsCvk00HUhqXD84gm96agylo8ZHGup20NKZ9pttV32qKTCjifa1F28bfHrEfvFJ3 L6IubI98wxXbVqVYIyY4MRj0Kw0iASVzA9+z3hu3ZewvrNmd7pfSXjubJOp7MgsRxpC/OV jUeBo4+fBiG1MSY/MdhKhcBgog1XHKsX1MtUSBQXsJ+azJq39FB1lnfa9Xw/d3yHVPHic/ 0tqPcHFR0QSluIJ4EXRzlM4mY/m73LQZyp7lpecMEe94u2Sal8I0ucjxV2xdtA== 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 4TCHS66pr7ztPr; Sun, 14 Jan 2024 01:17: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 40E1HABU060382; Sun, 14 Jan 2024 01:17:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40E1HANx060381; Sun, 14 Jan 2024 01:17:10 GMT (envelope-from git) Date: Sun, 14 Jan 2024 01:17:10 GMT Message-Id: <202401140117.40E1HANx060381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 1012cf15f75d..7a05a7153af6 - vendor/NetBSD/bmake - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/vendor/NetBSD/bmake X-Git-Reftype: branch X-Git-Commit: 7a05a7153af649605e1ebde33aac94a14ed2a4cd X-Git-Oldrev: 1012cf15f75d1e9048779abd07270a37cdba590a X-Git-Newrev: 7a05a7153af649605e1ebde33aac94a14ed2a4cd Auto-Submitted: auto-generated The branch vendor/NetBSD/bmake has been updated by sjg: URL: https://cgit.FreeBSD.org/src/log/?id=1012cf15f75d..7a05a7153af6 7a05a7153af6 Import bmake-20240108 From nobody Sun Jan 14 01:31:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCHmm6R8Rz56gHs; Sun, 14 Jan 2024 01: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 4TCHmm698zz4sbQ; Sun, 14 Jan 2024 01: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=1705195896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TUBA2c9Xd5e4QZnTRmTbwAGI7jM6tzzgMZbsJbqz304=; b=WCwCRGlb6YP9AJzFB7yr0cm+O49DJQlc4y61P25keLEIpbbrbEkmWkdJQTljm6JoA/FbKy nHSMDK/lk+c9xoquD2mtV/GlJe4VWxOGEPMS4QEwDoutWPRMXkn9FMvNL6z5DEDlz+dmvk mu4aK2Bzy25wPxOiFZfSrpdP2Lu3DLSfk3SPgms1mh+HCrnhYGPO6VpFou+NgJXEbjGmiY U/1Y0fIMjkE1mhGWq1Jla0Ays/ZmwLeZo7Ij+F/SK0lUPyt9hBmhkCDx7pXDQIv4xNPbiq 2qzyMz1/F+JR0PCuHNqIuy1FwfDBDDM30IMT/zfhTU6cPqAwwsL3lfyBCARw2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705195896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TUBA2c9Xd5e4QZnTRmTbwAGI7jM6tzzgMZbsJbqz304=; b=FXXruFt6Rxyup6u9Xt4AyurUkFMHkle2ErFrcH4ty4zHPkNs1WCKXRKk7Tn+Iy1bK4rJ7W 2CHDD8u92Gb3OTgSOtJ/cTsOrsshA3Zv4asnZxWlpLtjfCYIr/g9t5qL/loP2aXUcnshnD CDr2hxZ92b3oworICsT2juq29nwWgdNncQMm2A+lLJnXTfbq9D3e75KaGtDjBGt9KO/3dN Zn/GwkcDAxosVtqFHe03VzkO/2LUMqHO+cDDvF7QyaDkijJaGtJrSlOEVw3Ev+uEMwL48n awgi8MGpxpDYSM/HPSBIb63JznJOaLbGOi0G2qzUH1dE1KSd5sUXVi01JKkHEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705195896; a=rsa-sha256; cv=none; b=AVLmSZs/NaFMvvHUCB0bJV57rrxJAm8d8t18GPTzw95W86/mmYbcPESrgtUmC2nFjmWrP+ 1VDrqCxQqXQKqr9ocvpmkhv9ec1uAavwwMO//LK2XfHp5u2LIaq+FERgDLOVvF2Hr+1nPd EIt6TxeVCICxcYJIrQ8dOXGDMxFPdzRYm01sh597lkPO3gEBaB3K7IrB6Fy4csMbd1qtaj lTvsycxd/jeKs+ynC/wRaWPLOqRFcV8DOcrJC4m2Pjr8KF4zdWaZ+FAWa6XqbzS8pmW6OI e38ihruZuiAMCc3fQ3zodL5+p8bylsbOFilJOySfNk4GcyFGa3BcxJzp+Oc15Q== 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 4TCHmm5F6PztVv; Sun, 14 Jan 2024 01: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 40E1VaW0091187; Sun, 14 Jan 2024 01: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 40E1VXaC091176; Sun, 14 Jan 2024 01:31:33 GMT (envelope-from git) Date: Sun, 14 Jan 2024 01:31:33 GMT Message-Id: <202401140131.40E1VXaC091176@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: d5e0a182cf15 - main - Update to bmake-20240108 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5e0a182cf153f8993a633b93d9220c99a89e760 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=d5e0a182cf153f8993a633b93d9220c99a89e760 commit d5e0a182cf153f8993a633b93d9220c99a89e760 Merge: 6b1c534927ad 7a05a7153af6 Author: Simon J. Gerraty AuthorDate: 2024-01-14 01:31:01 +0000 Commit: Simon J. Gerraty CommitDate: 2024-01-14 01:31:01 +0000 Update to bmake-20240108 contrib/bmake/ChangeLog | 102 +++ contrib/bmake/README | 17 +- contrib/bmake/VERSION | 2 +- contrib/bmake/arch.c | 10 +- contrib/bmake/bmake.1 | 6 +- contrib/bmake/bmake.cat1 | 6 +- contrib/bmake/boot-strap | 16 +- contrib/bmake/bsd.after-import.mk | 17 +- contrib/bmake/buf.c | 6 +- contrib/bmake/buf.h | 4 +- contrib/bmake/compat.c | 65 +- contrib/bmake/cond.c | 111 ++-- contrib/bmake/configure | 34 +- contrib/bmake/configure.in | 16 +- contrib/bmake/dir.c | 330 +++------- contrib/bmake/for.c | 14 +- contrib/bmake/hash.c | 28 +- contrib/bmake/hash.h | 21 +- contrib/bmake/job.c | 139 ++-- contrib/bmake/job.h | 6 +- contrib/bmake/lst.c | 22 +- contrib/bmake/lst.h | 8 +- contrib/bmake/main.c | 156 ++--- contrib/bmake/make.1 | 6 +- contrib/bmake/make.c | 28 +- contrib/bmake/make.h | 5 +- contrib/bmake/meta.c | 6 +- contrib/bmake/mk/ChangeLog | 42 ++ contrib/bmake/mk/compiler.mk | 4 +- contrib/bmake/mk/dirdeps.mk | 17 +- contrib/bmake/mk/dpadd.mk | 14 +- contrib/bmake/mk/gendirdeps.mk | 6 +- contrib/bmake/mk/host-target.mk | 7 +- contrib/bmake/mk/init.mk | 8 +- contrib/bmake/mk/install-mk | 4 +- contrib/bmake/mk/jobs.mk | 5 +- contrib/bmake/mk/lib.mk | 25 +- contrib/bmake/mk/man.mk | 93 ++- contrib/bmake/mk/meta.autodep.mk | 4 +- contrib/bmake/mk/own.mk | 3 +- contrib/bmake/mk/prog.mk | 5 +- contrib/bmake/mk/rst2htm.mk | 3 +- contrib/bmake/os.sh | 0 contrib/bmake/parse.c | 279 +++------ contrib/bmake/str.c | 77 ++- contrib/bmake/str.h | 29 +- contrib/bmake/suff.c | 168 ++--- contrib/bmake/unit-tests/Makefile | 9 +- contrib/bmake/unit-tests/cmd-errors-jobs.exp | 2 +- contrib/bmake/unit-tests/cmd-errors-lint.exp | 2 +- contrib/bmake/unit-tests/cmd-errors.exp | 2 +- contrib/bmake/unit-tests/cmdline-undefined.mk | 4 +- contrib/bmake/unit-tests/comment.mk | 4 +- contrib/bmake/unit-tests/cond-cmp-string.mk | 14 +- contrib/bmake/unit-tests/cond-cmp-unary.mk | 8 +- contrib/bmake/unit-tests/cond-eof.mk | 4 +- contrib/bmake/unit-tests/cond-func-defined.exp | 2 +- contrib/bmake/unit-tests/cond-func-defined.mk | 8 +- contrib/bmake/unit-tests/cond-func-empty.mk | 16 +- contrib/bmake/unit-tests/cond-func-exists.mk | 6 +- contrib/bmake/unit-tests/cond-func.mk | 4 +- contrib/bmake/unit-tests/cond-late.exp | 2 +- contrib/bmake/unit-tests/cond-late.mk | 6 +- contrib/bmake/unit-tests/cond-op-and.mk | 8 +- contrib/bmake/unit-tests/cond-op-or.mk | 8 +- contrib/bmake/unit-tests/cond-short.exp | 2 +- contrib/bmake/unit-tests/cond-short.mk | 23 +- contrib/bmake/unit-tests/cond-token-number.mk | 6 +- contrib/bmake/unit-tests/cond-token-plain.exp | 4 +- contrib/bmake/unit-tests/cond-token-plain.mk | 16 +- contrib/bmake/unit-tests/cond-token-string.exp | 2 +- contrib/bmake/unit-tests/cond-token-string.mk | 10 +- contrib/bmake/unit-tests/cond-token-var.mk | 16 +- contrib/bmake/unit-tests/dep-var.exp | 2 +- contrib/bmake/unit-tests/dep-var.mk | 10 +- contrib/bmake/unit-tests/depsrc-ignore.exp | 2 +- .../bmake/unit-tests/deptgt-delete_on_error.exp | 2 +- contrib/bmake/unit-tests/deptgt-makeflags.exp | 2 +- contrib/bmake/unit-tests/deptgt-makeflags.mk | 6 +- contrib/bmake/unit-tests/deptgt.mk | 6 +- contrib/bmake/unit-tests/dir.mk | 4 +- contrib/bmake/unit-tests/directive-else.mk | 4 +- .../bmake/unit-tests/directive-export-gmake.exp | 1 + contrib/bmake/unit-tests/directive-export-gmake.mk | 25 +- contrib/bmake/unit-tests/directive-export.exp | 6 +- contrib/bmake/unit-tests/directive-export.mk | 10 +- contrib/bmake/unit-tests/directive-for-empty.mk | 12 +- contrib/bmake/unit-tests/directive-for-errors.mk | 14 +- contrib/bmake/unit-tests/directive-for-escape.exp | 4 +- contrib/bmake/unit-tests/directive-for-escape.mk | 12 +- contrib/bmake/unit-tests/directive-for-if.mk | 4 +- contrib/bmake/unit-tests/directive-for.exp | 19 +- contrib/bmake/unit-tests/directive-for.mk | 27 +- contrib/bmake/unit-tests/directive-ifmake.mk | 4 +- contrib/bmake/unit-tests/directive-ifndef.mk | 36 +- .../bmake/unit-tests/directive-include-guard.exp | 16 + .../bmake/unit-tests/directive-include-guard.mk | 188 ++++-- contrib/bmake/unit-tests/directive-warning.mk | 4 +- contrib/bmake/unit-tests/directive.mk | 4 +- contrib/bmake/unit-tests/escape.exp | 36 +- contrib/bmake/unit-tests/escape.mk | 7 +- contrib/bmake/unit-tests/hanoi-include.mk | 7 +- contrib/bmake/unit-tests/jobs-error-indirect.exp | 2 +- .../bmake/unit-tests/jobs-error-nested-make.exp | 2 +- contrib/bmake/unit-tests/jobs-error-nested.exp | 4 +- contrib/bmake/unit-tests/lint.mk | 4 +- contrib/bmake/unit-tests/moderrs.exp | 20 +- contrib/bmake/unit-tests/moderrs.mk | 6 +- contrib/bmake/unit-tests/opt-debug-file.mk | 4 +- contrib/bmake/unit-tests/opt-debug-jobs.mk | 4 +- contrib/bmake/unit-tests/opt-debug-lint.mk | 6 +- contrib/bmake/unit-tests/opt-debug-loud.mk | 6 +- contrib/bmake/unit-tests/opt-debug-var.mk | 4 +- contrib/bmake/unit-tests/parse-var.mk | 6 +- contrib/bmake/unit-tests/recursive.exp | 4 +- contrib/bmake/unit-tests/recursive.mk | 15 +- contrib/bmake/unit-tests/sh-dots.mk | 6 +- contrib/bmake/unit-tests/sh-leading-hyphen.exp | 2 +- contrib/bmake/unit-tests/shell-sh.mk | 4 +- contrib/bmake/unit-tests/unexport.mk | 4 +- contrib/bmake/unit-tests/var-eval-short.mk | 4 +- contrib/bmake/unit-tests/var-op-append.mk | 33 +- contrib/bmake/unit-tests/var-op-assign.mk | 4 +- contrib/bmake/unit-tests/var-op-default.mk | 8 +- contrib/bmake/unit-tests/var-op-expand.mk | 6 +- contrib/bmake/unit-tests/var-op-shell.mk | 20 +- contrib/bmake/unit-tests/var-readonly.exp | 3 + contrib/bmake/unit-tests/var-readonly.mk | 4 +- contrib/bmake/unit-tests/var-recursive.exp | 8 +- contrib/bmake/unit-tests/var-recursive.mk | 4 +- contrib/bmake/unit-tests/var-scope-cmdline.mk | 4 +- .../bmake/unit-tests/var-scope-local-legacy.exp | 2 +- contrib/bmake/unit-tests/var-scope-local-legacy.mk | 22 +- contrib/bmake/unit-tests/var-scope-local.exp | 4 +- contrib/bmake/unit-tests/var-scope-local.mk | 12 +- contrib/bmake/unit-tests/vardebug.exp | 20 +- contrib/bmake/unit-tests/vardebug.mk | 29 +- contrib/bmake/unit-tests/varmisc.exp | 5 +- contrib/bmake/unit-tests/varmisc.mk | 28 +- contrib/bmake/unit-tests/varmod-assign.exp | 32 + contrib/bmake/unit-tests/varmod-assign.mk | 71 ++- contrib/bmake/unit-tests/varmod-defined.exp | 2 +- contrib/bmake/unit-tests/varmod-defined.mk | 10 +- contrib/bmake/unit-tests/varmod-edge.exp | 2 +- contrib/bmake/unit-tests/varmod-edge.mk | 8 +- contrib/bmake/unit-tests/varmod-gmtime.mk | 15 +- contrib/bmake/unit-tests/varmod-ifelse.exp | 20 +- contrib/bmake/unit-tests/varmod-ifelse.mk | 36 +- contrib/bmake/unit-tests/varmod-indirect.mk | 24 +- contrib/bmake/unit-tests/varmod-l-name-to-value.mk | 4 +- contrib/bmake/unit-tests/varmod-localtime.mk | 4 +- contrib/bmake/unit-tests/varmod-loop-varname.mk | 4 +- contrib/bmake/unit-tests/varmod-loop.mk | 6 +- contrib/bmake/unit-tests/varmod-match-escape.mk | 20 +- contrib/bmake/unit-tests/varmod-match.exp | 33 +- contrib/bmake/unit-tests/varmod-match.mk | 317 ++++++---- contrib/bmake/unit-tests/varmod-mtime.exp | 16 +- contrib/bmake/unit-tests/varmod-mtime.mk | 45 +- contrib/bmake/unit-tests/varmod-order.exp | 6 +- contrib/bmake/unit-tests/varmod-range.exp | 21 +- contrib/bmake/unit-tests/varmod-range.mk | 26 +- contrib/bmake/unit-tests/varmod-subst-regex.mk | 57 +- contrib/bmake/unit-tests/varmod-subst.mk | 46 +- contrib/bmake/unit-tests/varmod-sysv.mk | 10 +- contrib/bmake/unit-tests/varmod-to-separator.mk | 4 +- contrib/bmake/unit-tests/varmod-undefined.mk | 6 +- contrib/bmake/unit-tests/varmod.mk | 6 +- contrib/bmake/unit-tests/varname-dot-shell.exp | 10 +- contrib/bmake/unit-tests/varname-dot-suffixes.exp | 20 +- contrib/bmake/unit-tests/varname-dot-suffixes.mk | 19 +- contrib/bmake/unit-tests/varname-empty.exp | 24 +- contrib/bmake/unit-tests/varname-empty.mk | 4 +- .../varname-make_print_var_on_error-jobs.mk | 4 +- contrib/bmake/unit-tests/varname.mk | 4 +- contrib/bmake/unit-tests/varparse-dynamic.mk | 4 +- contrib/bmake/unit-tests/varparse-errors.exp | 28 +- contrib/bmake/unit-tests/varparse-errors.mk | 8 +- contrib/bmake/unit-tests/varparse-mod.mk | 6 +- contrib/bmake/unit-tests/varparse-undef-partial.mk | 13 +- contrib/bmake/util.c | 96 ++- contrib/bmake/var.c | 696 +++++++++------------ usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/config.h | 4 +- usr.bin/bmake/unit-tests/Makefile | 9 +- 184 files changed, 2585 insertions(+), 2176 deletions(-) diff --cc contrib/bmake/job.c index 22e21192281b,21b119ed6865..21582bb918eb --- a/contrib/bmake/job.c +++ b/contrib/bmake/job.c @@@ -258,25 -257,7 +257,23 @@@ typedef struct ShellWriter } ShellWriter; +/* + * FreeBSD: traditionally .MAKE is not required to + * pass jobs queue to sub-makes. + * Use .MAKE.ALWAYS_PASS_JOB_QUEUE=no to disable. + */ +#define MAKE_ALWAYS_PASS_JOB_QUEUE "${.MAKE.ALWAYS_PASS_JOB_QUEUE:U}" +static bool Always_pass_job_queue = true; +/* + * FreeBSD: aborting entire parallel make isn't always + * desired. When doing tinderbox for example, failure of + * one architecture should not stop all. + * We still want to bail on interrupt though. + */ +#define MAKE_JOB_ERROR_TOKEN "${MAKE_JOB_ERROR_TOKEN:U}" +static bool Job_error_token = true; + - /* - * error handling variables - */ + /* error handling variables */ static int job_errors = 0; /* number of errors reported */ static enum { /* Why is the make aborting? */ ABORT_NONE, @@@ -1498,11 -1470,8 +1486,9 @@@ JobExec(Job *job, char **argv if (lseek(0, 0, SEEK_SET) == -1) execDie("lseek to 0", "stdin"); - if (job->node->type & (OP_MAKE | OP_SUBMAKE)) { + if (Always_pass_job_queue || + (job->node->type & (OP_MAKE | OP_SUBMAKE))) { - /* - * Pass job token pipe to submakes. - */ + /* Pass job token pipe to submakes. */ if (fcntl(tokenWaitJob.inPipe, F_SETFD, 0) == -1) execDie("clear close-on-exec", "tokenWaitJob.inPipe"); diff --cc contrib/bmake/mk/install-mk index b042f99671a8,357afd171e8c..357afd171e8c mode 100644,100755..100755 --- a/contrib/bmake/mk/install-mk +++ b/contrib/bmake/mk/install-mk diff --cc contrib/bmake/os.sh index 78b2de95a679,78b2de95a679..78b2de95a679 mode 100644,100755..100755 --- a/contrib/bmake/os.sh +++ b/contrib/bmake/os.sh diff --cc usr.bin/bmake/Makefile.config index c31d0790ed9e,000000000000..4062f175f763 mode 100644,000000..100644 --- a/usr.bin/bmake/Makefile.config +++ b/usr.bin/bmake/Makefile.config @@@ -1,27 -1,0 +1,27 @@@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# + +SRCTOP?= ${.CURDIR:H:H} + +# things set by configure + - _MAKE_VERSION?=20230909 ++_MAKE_VERSION?=20240108 + +prefix?= /usr +srcdir= ${SRCTOP}/contrib/bmake +CC?= cc +DEFAULT_SYS_PATH?= .../share/mk:/usr/share/mk + +EGREP = egrep +CPPFLAGS+= +CFLAGS+= ${CPPFLAGS} -DHAVE_CONFIG_H +LDFLAGS+= +LIBOBJS+= ${LIBOBJDIR}stresep$U.o +LDADD+= +USE_META?= yes +USE_FILEMON?= dev +FILEMON_H?= /usr/include/dev/filemon/filemon.h +BMAKE_PATH_MAX?= 1024 +# used if MAXPATHLEN not defined +CPPFLAGS+= -DBMAKE_PATH_MAX=${BMAKE_PATH_MAX} diff --cc usr.bin/bmake/config.h index af8b4c8e02ba,000000000000..b9e169fad867 mode 100644,000000..100644 --- a/usr.bin/bmake/config.h +++ b/usr.bin/bmake/config.h @@@ -1,445 -1,0 +1,445 @@@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.in by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Path of default shell */ +/* #undef DEFSHELL_CUSTOM */ + +/* Shell spec to use by default */ +/* #undef DEFSHELL_INDEX */ + +/* Path of default shell */ +/* #undef DEFSHELL_PATH */ + +/* Define to 1 if you have the header file. */ +#define HAVE_AR_H 1 + +/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you + don't. */ +#define HAVE_DECL_SYS_SIGLIST 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the `dirname' function. */ +#define HAVE_DIRNAME 1 + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +/* #undef HAVE_DOPRNT */ + +/* Define to 1 if you have the `err' function. */ +#define HAVE_ERR 1 + +/* Define to 1 if you have the `errx' function. */ +#define HAVE_ERRX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ERR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fork' function. */ +#define HAVE_FORK 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `getenv' function. */ +#define HAVE_GETENV 1 + +/* Define to 1 if you have the `getopt' function. */ +#define HAVE_GETOPT 1 + +/* Define to 1 if you have the `getwd' function. */ +#define HAVE_GETWD 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `killpg' function. */ +#define HAVE_KILLPG 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIBGEN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if the system has the type `long long int'. */ +#define HAVE_LONG_LONG_INT 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if you have the `mmap' function. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_PATHS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_RANLIB_H 1 + +/* Define to 1 if you have the `realpath' function. */ +#define HAVE_REALPATH 1 + +/* Define to 1 if you have the `select' function. */ +#define HAVE_SELECT 1 + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if you have the `setpgid' function. */ +#define HAVE_SETPGID 1 + +/* Define to 1 if you have the `setrlimit' function. */ +#define HAVE_SETRLIMIT 1 + +/* Define to 1 if you have the `setsid' function. */ +#define HAVE_SETSID 1 + +/* Define to 1 if you have the `sigaction' function. */ +#define HAVE_SIGACTION 1 + +/* Define to 1 if you have the `sigaddset' function. */ +#define HAVE_SIGADDSET 1 + +/* Define to 1 if you have the `sigpending' function. */ +#define HAVE_SIGPENDING 1 + +/* Define to 1 if you have the `sigprocmask' function. */ +#define HAVE_SIGPROCMASK 1 + +/* Define to 1 if you have the `sigsetmask' function. */ +#define HAVE_SIGSETMASK 1 + +/* Define to 1 if you have the `sigsuspend' function. */ +#define HAVE_SIGSUSPEND 1 + +/* Define to 1 if you have the `sigvec' function. */ +#define HAVE_SIGVEC 1 + +/* Define to 1 if the system has the type `sig_atomic_t'. */ +#define HAVE_SIG_ATOMIC_T 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the `stresep' function. */ +/* #undef HAVE_STRESEP */ + +/* Define to 1 if you have the `strftime' function. */ +#define HAVE_STRFTIME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* Define to 1 if you have the `strsep' function. */ +#define HAVE_STRSEP 1 + +/* Define to 1 if you have the `strtod' function. */ +#define HAVE_STRTOD 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + +/* Define to 1 if you have the `strtoul' function. */ +#define HAVE_STRTOUL 1 + +/* Define to 1 if you have the `sysctl' function. */ +#define HAVE_SYSCTL 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SYSCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `unsetenv' function. */ +#define HAVE_UNSETENV 1 + +/* Define to 1 if the system has the type `unsigned long long int'. */ +#define HAVE_UNSIGNED_LONG_LONG_INT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UTIME_H 1 + +/* Define to 1 if you have the `vfork' function. */ +#define HAVE_VFORK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VFORK_H */ + +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 + +/* Define to 1 if you have the `vsnprintf' function. */ +#define HAVE_VSNPRINTF 1 + +/* Define to 1 if you have the `wait3' function. */ +#define HAVE_WAIT3 1 + +/* Define to 1 if you have the `wait4' function. */ +#define HAVE_WAIT4 1 + +/* Define to 1 if you have the `waitpid' function. */ +#define HAVE_WAITPID 1 + +/* Define to 1 if you have the `warn' function. */ +#define HAVE_WARN 1 + +/* Define to 1 if you have the `warnx' function. */ +#define HAVE_WARNX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if `fork' works. */ +#define HAVE_WORKING_FORK 1 + +/* Define to 1 if `vfork' works. */ +#define HAVE_WORKING_VFORK 1 + +/* define if your compiler has __attribute__ */ +#define HAVE___ATTRIBUTE__ 1 + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "sjg@NetBSD.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "bmake" + +/* Define to the full name and version of this package. */ - #define PACKAGE_STRING "bmake 20230723" ++#define PACKAGE_STRING "bmake 20240101" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "bmake" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ - #define PACKAGE_VERSION "20230723" ++#define PACKAGE_VERSION "20240101" + +/* Define to 1 if the `S_IS*' macros in do not work properly. */ +/* #undef STAT_MACROS_BROKEN */ + +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define STDC_HEADERS 1 + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif + + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define for Solaris 2.5.1 so the uint32_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT32_T */ + +/* C99 function name */ +/* #undef __func__ */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to the type of a signed integer type of width exactly 64 bits if + such a type exists and the standard includes do not define it. */ +/* #undef int64_t */ + +/* Define to `int' if does not define. */ +/* #undef mode_t */ + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define as a signed integer type capable of holding a process identifier. */ +/* #undef pid_t */ + +/* type that signal handlers can safely frob */ +/* #undef sig_atomic_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define to the type of an unsigned integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint32_t */ + +/* Define as `fork' if `vfork' does not work. */ +/* #undef vfork */ diff --cc usr.bin/bmake/unit-tests/Makefile index c5cc7646efed,000000000000..cf6c85809b9c mode 100644,000000..100644 --- a/usr.bin/bmake/unit-tests/Makefile +++ b/usr.bin/bmake/unit-tests/Makefile @@@ -1,885 -1,0 +1,886 @@@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# - # $Id: Makefile,v 1.207 2023/09/09 16:44:03 sjg Exp $ ++# $Id: Makefile,v 1.210 2024/01/08 18:28:08 sjg Exp $ +# - # $NetBSD: Makefile,v 1.341 2023/09/09 16:41:04 sjg Exp $ ++# $NetBSD: Makefile,v 1.342 2024/01/07 02:07:44 sjg Exp $ +# +# Unit tests for make(1) +# +# The main targets are: +# +# all: +# run all the tests +# test: +# run 'all', and compare to expected results +# accept: +# move generated output to expected results +# +# Settable variables +# +# TEST_MAKE +# The make program to be tested. +# +# +# Adding a test case +# +# Each feature should get its own set of tests in its own suitably +# named makefile (*.mk), with its own set of expected results (*.exp), +# and it should be added to the TESTS list. +# + +.MAIN: all + +# we use these below but we might be an older make +.MAKE.OS?= ${uname -s:L:sh} +.MAKE.UID?= ${id -u:L:sh} + +# for many tests we need a TMPDIR that will not collide +# with other users. +.if ${.OBJDIR} != ${.CURDIR} +# easy +TMPDIR:= ${.OBJDIR}/tmp +.elif defined(TMPDIR) +TMPDIR:= ${TMPDIR}/uid${.MAKE.UID} +.else +TMPDIR:= /tmp/uid${.MAKE.UID} +.endif +# make sure it exists +.if !exist(${TMPDIR}) +_!= mkdir -p ${TMPDIR} +.endif + +# Each test is in a sub-makefile. +# Keep the list sorted. +# Any test that is commented out must be ignored in +# src/tests/usr.bin/make/t_make.sh as well. +#TESTS+= archive +#TESTS+= archive-suffix +TESTS+= cmd-errors +TESTS+= cmd-errors-jobs +TESTS+= cmd-errors-lint +TESTS+= cmd-interrupt +TESTS+= cmdline +TESTS+= cmdline-redirect-stdin +TESTS+= cmdline-undefined +TESTS+= comment +TESTS+= compat-error +TESTS+= cond-cmp-numeric +TESTS+= cond-cmp-numeric-eq +TESTS+= cond-cmp-numeric-ge +TESTS+= cond-cmp-numeric-gt +TESTS+= cond-cmp-numeric-le +TESTS+= cond-cmp-numeric-lt +TESTS+= cond-cmp-numeric-ne +TESTS+= cond-cmp-string +TESTS+= cond-cmp-unary +TESTS+= cond-eof +TESTS+= cond-func +TESTS+= cond-func-commands +TESTS+= cond-func-defined +TESTS+= cond-func-empty +TESTS+= cond-func-exists +TESTS+= cond-func-make +TESTS+= cond-func-make-main +TESTS+= cond-func-target +TESTS+= cond-late +TESTS+= cond-op +TESTS+= cond-op-and +TESTS+= cond-op-and-lint +TESTS+= cond-op-not +TESTS+= cond-op-or +TESTS+= cond-op-or-lint +TESTS+= cond-op-parentheses +TESTS+= cond-short +TESTS+= cond-token-number +TESTS+= cond-token-plain +TESTS+= cond-token-string +TESTS+= cond-token-var +TESTS+= cond-undef-lint +TESTS+= counter +TESTS+= counter-append +TESTS+= dep +TESTS+= dep-colon +TESTS+= dep-colon-bug-cross-file +TESTS+= dep-double-colon +TESTS+= dep-double-colon-indep +TESTS+= dep-duplicate +TESTS+= dep-exclam +TESTS+= dep-none +TESTS+= dep-op-missing +TESTS+= dep-percent +TESTS+= dep-var +TESTS+= dep-wildcards +TESTS+= depsrc +TESTS+= depsrc-end +TESTS+= depsrc-exec +TESTS+= depsrc-ignore +TESTS+= depsrc-made +TESTS+= depsrc-make +TESTS+= depsrc-meta +TESTS+= depsrc-nometa +TESTS+= depsrc-nometa_cmp +TESTS+= depsrc-nopath +TESTS+= depsrc-notmain +TESTS+= depsrc-optional +TESTS+= depsrc-phony +TESTS+= depsrc-precious +TESTS+= depsrc-recursive +TESTS+= depsrc-silent +TESTS+= depsrc-use +TESTS+= depsrc-usebefore +TESTS+= depsrc-usebefore-double-colon +TESTS+= depsrc-wait +TESTS+= deptgt +TESTS+= deptgt-begin +TESTS+= deptgt-begin-fail +TESTS+= deptgt-begin-fail-indirect +TESTS+= deptgt-default +TESTS+= deptgt-delete_on_error +TESTS+= deptgt-end +TESTS+= deptgt-end-fail +TESTS+= deptgt-end-fail-all +TESTS+= deptgt-end-fail-indirect +TESTS+= deptgt-end-jobs +TESTS+= deptgt-error +TESTS+= deptgt-ignore +TESTS+= deptgt-interrupt +TESTS+= deptgt-main +TESTS+= deptgt-makeflags +TESTS+= deptgt-no_parallel +TESTS+= deptgt-nopath +TESTS+= deptgt-notparallel +TESTS+= deptgt-objdir +TESTS+= deptgt-order +TESTS+= deptgt-path +TESTS+= deptgt-path-suffix +TESTS+= deptgt-phony +TESTS+= deptgt-posix +TESTS+= deptgt-precious +TESTS+= deptgt-shell +TESTS+= deptgt-silent +TESTS+= deptgt-silent-jobs +TESTS+= deptgt-stale +TESTS+= deptgt-suffixes +TESTS+= dir +TESTS+= dir-expand-path +TESTS+= directive +TESTS+= directive-dinclude +TESTS+= directive-elif +TESTS+= directive-elifdef +TESTS+= directive-elifmake +TESTS+= directive-elifndef +TESTS+= directive-elifnmake +TESTS+= directive-else +TESTS+= directive-endfor +TESTS+= directive-endif +TESTS+= directive-error +TESTS+= directive-export +TESTS+= directive-export-env +TESTS+= directive-export-impl +TESTS+= directive-export-gmake +TESTS+= directive-export-literal +TESTS+= directive-for +TESTS+= directive-for-break +TESTS+= directive-for-empty +TESTS+= directive-for-errors +TESTS+= directive-for-escape +TESTS+= directive-for-generating-endif +TESTS+= directive-for-if +TESTS+= directive-for-lines +TESTS+= directive-for-null +TESTS+= directive-hyphen-include +TESTS+= directive-if +TESTS+= directive-if-nested +TESTS+= directive-ifdef +TESTS+= directive-ifmake +TESTS+= directive-ifndef +TESTS+= directive-ifnmake +TESTS+= directive-include +TESTS+= directive-include-fatal +TESTS+= directive-include-guard +TESTS+= directive-info +TESTS+= directive-misspellings +TESTS+= directive-sinclude +TESTS+= directive-undef +TESTS+= directive-unexport +TESTS+= directive-unexport-env +TESTS+= directive-warning +TESTS+= dollar +TESTS+= doterror +TESTS+= dotwait +TESTS+= error +TESTS+= # escape # broken by reverting POSIX changes +TESTS+= export +TESTS+= export-all +TESTS+= export-env +TESTS+= export-variants +TESTS+= gnode-submake +TESTS+= hanoi-include +TESTS+= impsrc +TESTS+= include-main +TESTS+= job-flags - #TESTS+= job-output-long-lines ++TESTS+= job-output-long-lines +TESTS+= job-output-null +TESTS+= jobs-empty-commands +TESTS+= jobs-empty-commands-error +TESTS+= jobs-error-indirect +TESTS+= jobs-error-nested +TESTS+= jobs-error-nested-make +TESTS+= lint +TESTS+= make-exported +TESTS+= meta-cmd-cmp +TESTS+= moderrs +TESTS+= modmisc +.if ${.MAKE.UID} > 0 +TESTS+= objdir-writable +.endif *** 650 LINES SKIPPED *** From nobody Sun Jan 14 07:04:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCR8w3dBZz57HNb; Sun, 14 Jan 2024 07:04: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 4TCR8w2l6Kz4QhZ; Sun, 14 Jan 2024 07:04:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705215872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8aI5D5njvFgqhiwX2XOHEREQxsFHiANEvwFG/yZykYk=; b=bDLKX01ffI2txaAtoqz3riTbdptGYNzCQ36Ms/OVreWLV38sp8esaW4UbPX04pnjapppaN zJSzpuQ6k5QrqwHPos/oU5CFxAO68L8Efv6yW+bOuEfzBdMSCc8NkCc2ZSQfEX8P8FvWuX MCTujxK1RHYBopVFF+I9tgsqi+6cehVzXLOwG+I2wLOVnjzwM/TzHvXtiZJEYMuuzE2txa qQEZO+hrt8UTHaTyZjjLHDzrblFRPXHP+e2nEYZ6lt6YUdmNXRGubEvMnLqDTjwJGox9vn nEmryqei/2moC773lZlVP79rYVRuGdAZzZHxgUqjxSqtgmHyUV9DZMM0v/m0vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705215872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8aI5D5njvFgqhiwX2XOHEREQxsFHiANEvwFG/yZykYk=; b=mv9BOKjb2RCjVOU4PbqyD2DEOdHwSga54KQBWZ1CeKiG3I23h+2fPq5H2H8+bJ1ij8RXie aJsKNP3IrvUBd87R0o3RB4Cj7AqQZC4DX9eL3CtEEWCpVu6C488PNv8Kt9G/KROwb4DwN2 FgAgi8a0iw+BKli27TM4ATQFkFrt04BvKek2hMOkWPpWjsBm5g8G26J98YQ2NHaqcsNskX 7GZmy3oyxCILxLBsusF+0IHgPYtr0dBfZI4JAkheHlQdYoL02kf+g7MtE5Blq7YUhRgbjR hvQhzHdXGh1MiLYzZxQmSU/ngT7wKUGsvqJsq9mhHG3cr1EZl74y9t08DDPklw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705215872; a=rsa-sha256; cv=none; b=C8y9dM/nyambuiSh0Y3CjSbPdTcp9vmxz20hn1V7IRsGZJhawUo+ChC6qvCchJwvFsi3br 7Pwxr9TOyUnzG0QScLc7cAWDeqSLiqELoInDm6o5wownmNDS42VN7qdsozvQG+8TmLdBBw UpQNFedk3PKybkjMyXjX29OBSBNzEdn4lxqxfwJ9lTROexoVSRfgBn5bPZMmviE7V+N1SV L3NrasGD17Cg/w5jNTxWpuATRhmuIvtP6f0shwCorcogRYY+e/h+mqEpjRml+fgC+pH+gC ciUfm+QlFO9tA8gDOi4JIPWLZasYp1CD79JvtkH9MqLXrDPgQtrkW5UtJu0E5A== 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 4TCR8w1nPpz13vs; Sun, 14 Jan 2024 07:04: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 40E74W37048782; Sun, 14 Jan 2024 07:04:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40E74Wht048779; Sun, 14 Jan 2024 07:04:32 GMT (envelope-from git) Date: Sun, 14 Jan 2024 07:04:32 GMT Message-Id: <202401140704.40E74Wht048779@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: 353e4c5a068d - main - uart(4): Honor hardware state of NS8250-class for tsw_busy List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 353e4c5a068d06b0d6dcfa9eb736ecb16e9eae45 Auto-Submitted: auto-generated The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=353e4c5a068d06b0d6dcfa9eb736ecb16e9eae45 commit 353e4c5a068d06b0d6dcfa9eb736ecb16e9eae45 Author: Marius Strobl AuthorDate: 2024-01-12 22:27:07 +0000 Commit: Marius Strobl CommitDate: 2024-01-14 07:03:59 +0000 uart(4): Honor hardware state of NS8250-class for tsw_busy In 9750d9e5, I brought the equivalent of the TS_BUSY flag back in a mostly hardware-agnostic way in order to fix tty_drain() and, thus, TIOCDRAIN for UARTs with TX FIFOs. This proved to be sufficient for fixing the regression reported. So in light of the release cycle of FreeBSD 10.3, I decided that this change was be good enough for the time being and opted to go with the smallest possible yet generic (for all UARTs driven by uart(4)) solution addressing the problem at hand. However, at least for the NS8250-class the above isn't a complete fix as these UARTs only trigger an interrupt when the TX FIFO became empty. At this point, there still can be an outstanding character left in the transmit shift register as indicated via the LSR. Thus, this change adds the 3rd (besides the tty(4) and generic uart(4) bits) part I had in my tree ever since, adding a uart_txbusy method to be queried in addition for tsw_busy and hooking it up as appropriate for the NS8250-class. As it turns out, the exact equivalent of this 3rd part later on was implemented for uftdi(4) in 9ad221a5. While at it, explain the rational behind the deliberately missing locking in uart_tty_busy() (also applying to the generic sc_txbusy testing already present). --- sys/arm/nvidia/tegra_uart.c | 3 ++- sys/dev/uart/uart_dev_ns8250.c | 14 +++++++++++++- sys/dev/uart/uart_dev_ns8250.h | 1 + sys/dev/uart/uart_dev_snps.c | 1 + sys/dev/uart/uart_dev_ti8250.c | 1 + sys/dev/uart/uart_if.m | 21 +++++++++++++++++++++ sys/dev/uart/uart_tty.c | 14 ++++++++++++-- 7 files changed, 51 insertions(+), 4 deletions(-) diff --git a/sys/arm/nvidia/tegra_uart.c b/sys/arm/nvidia/tegra_uart.c index e18b77ecc321..9c518997e85c 100644 --- a/sys/arm/nvidia/tegra_uart.c +++ b/sys/arm/nvidia/tegra_uart.c @@ -136,6 +136,7 @@ static kobj_method_t tegra_methods[] = { KOBJMETHOD(uart_receive, ns8250_bus_receive), KOBJMETHOD(uart_setsig, ns8250_bus_setsig), KOBJMETHOD(uart_transmit, ns8250_bus_transmit), + KOBJMETHOD(uart_txbusy, ns8250_bus_txbusy), KOBJMETHOD(uart_grab, tegra_uart_grab), KOBJMETHOD(uart_ungrab, tegra_uart_ungrab), KOBJMETHOD_END @@ -237,7 +238,7 @@ static device_method_t tegra_uart_bus_methods[] = { DEVMETHOD(device_probe, tegra_uart_probe), DEVMETHOD(device_attach, uart_bus_attach), DEVMETHOD(device_detach, tegra_uart_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t tegra_uart_driver = { diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index 4f2f8f7753b9..f211084cb013 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -433,9 +433,10 @@ static kobj_method_t ns8250_methods[] = { KOBJMETHOD(uart_receive, ns8250_bus_receive), KOBJMETHOD(uart_setsig, ns8250_bus_setsig), KOBJMETHOD(uart_transmit, ns8250_bus_transmit), + KOBJMETHOD(uart_txbusy, ns8250_bus_txbusy), KOBJMETHOD(uart_grab, ns8250_bus_grab), KOBJMETHOD(uart_ungrab, ns8250_bus_ungrab), - { 0, 0 } + KOBJMETHOD_END }; struct uart_class uart_ns8250_class = { @@ -1070,6 +1071,17 @@ ns8250_bus_transmit(struct uart_softc *sc) return (0); } +bool +ns8250_bus_txbusy(struct uart_softc *sc) +{ + struct uart_bas *bas = &sc->sc_bas; + + if ((uart_getreg(bas, REG_LSR) & (LSR_TEMT | LSR_THRE)) != + (LSR_TEMT | LSR_THRE)) + return (true); + return (false); +} + void ns8250_bus_grab(struct uart_softc *sc) { diff --git a/sys/dev/uart/uart_dev_ns8250.h b/sys/dev/uart/uart_dev_ns8250.h index 357f4e7f80df..324ff72f6e5d 100644 --- a/sys/dev/uart/uart_dev_ns8250.h +++ b/sys/dev/uart/uart_dev_ns8250.h @@ -57,6 +57,7 @@ int ns8250_bus_receive(struct uart_softc *); int ns8250_bus_setsig(struct uart_softc *, int); int ns8250_bus_transmit(struct uart_softc *); void ns8250_bus_grab(struct uart_softc *); +bool ns8250_bus_txbusy(struct uart_softc *); void ns8250_bus_ungrab(struct uart_softc *); #endif /* _DEV_UART_DEV_NS8250_H_ */ diff --git a/sys/dev/uart/uart_dev_snps.c b/sys/dev/uart/uart_dev_snps.c index c3ada581c7cd..b8b1f1f78142 100644 --- a/sys/dev/uart/uart_dev_snps.c +++ b/sys/dev/uart/uart_dev_snps.c @@ -101,6 +101,7 @@ static kobj_method_t snps_methods[] = { KOBJMETHOD(uart_receive, ns8250_bus_receive), KOBJMETHOD(uart_setsig, ns8250_bus_setsig), KOBJMETHOD(uart_transmit, ns8250_bus_transmit), + KOBJMETHOD(uart_txbusy, ns8250_bus_txbusy), KOBJMETHOD(uart_grab, ns8250_bus_grab), KOBJMETHOD(uart_ungrab, ns8250_bus_ungrab), KOBJMETHOD_END diff --git a/sys/dev/uart/uart_dev_ti8250.c b/sys/dev/uart/uart_dev_ti8250.c index 636f94872ce6..1c575defa5f4 100644 --- a/sys/dev/uart/uart_dev_ti8250.c +++ b/sys/dev/uart/uart_dev_ti8250.c @@ -105,6 +105,7 @@ static kobj_method_t ti8250_methods[] = { KOBJMETHOD(uart_receive, ns8250_bus_receive), KOBJMETHOD(uart_setsig, ns8250_bus_setsig), KOBJMETHOD(uart_transmit, ns8250_bus_transmit), + KOBJMETHOD(uart_txbusy, ns8250_bus_txbusy), KOBJMETHOD_END }; diff --git a/sys/dev/uart/uart_if.m b/sys/dev/uart/uart_if.m index 516e8b0811df..7efe63a10248 100644 --- a/sys/dev/uart/uart_if.m +++ b/sys/dev/uart/uart_if.m @@ -38,6 +38,17 @@ INTERFACE uart; +CODE { + static uart_txbusy_t uart_default_txbusy; + + static bool + uart_default_txbusy(struct uart_softc *this __unused) + { + + return (false); + } +}; + # attach() - attach hardware. # This method is called when the device is being attached. All resources # have been allocated. The transmit and receive buffers exist, but no @@ -141,6 +152,16 @@ METHOD int transmit { struct uart_softc *this; }; +# txbusy() - report if Tx is still busy. +# This method is called by the tty glue for reporting upward that output is +# still being drained despite sc_txbusy unset. Non-DEFAULT implementations +# allow for extra checks, i. e. beyond what can be determined in ipend(), +# that the Tx path actually is idle. For example, whether the last character +# has left the transmit shift register in addition to the FIFO being empty. +METHOD bool txbusy { + struct uart_softc *this; +} DEFAULT uart_default_txbusy; + # grab() - Up call from the console to the upper layers of the driver when # the kernel asks to grab the console. This is valid only for console # drivers. This method is responsible for transitioning the hardware diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c index 672203cc5935..faae077916f3 100644 --- a/sys/dev/uart/uart_tty.c +++ b/sys/dev/uart/uart_tty.c @@ -388,9 +388,19 @@ uart_tty_busy(struct tty *tp) sc = tty_softc(tp); if (sc == NULL || sc->sc_leaving) - return (FALSE); + return (false); - return (sc->sc_txbusy); + /* + * The tty locking is sufficient here; we may lose the race against + * uart_bus_ihand()/uart_intr() clearing sc_txbusy underneath us, in + * which case we will incorrectly but non-fatally report a busy Tx + * path upward. However, tty locking ensures that no additional output + * is enqueued before UART_TXBUSY() returns, which means that there + * are no Tx interrupts to be lost. + */ + if (sc->sc_txbusy) + return (true); + return (UART_TXBUSY(sc)); } static struct ttydevsw uart_tty_class = { From nobody Sun Jan 14 11:21:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCXsG5MGQz57h9X; Sun, 14 Jan 2024 11:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TCXsG27y0z4svK; Sun, 14 Jan 2024 11:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705231282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/YjuzXZUGJo+XFc+/f8gmiGxYQoNBLfOjOLz/DTjk8Y=; b=ueMQlSAojZW9LHQbHflZRxya2CXG2cJrK5cFE3+7a/YJy6LSKnVQssi5ZTTNNWA8mmUjll 8wTzKhmkAiysABmH9cTqn50bYd8AyUoT4+OcA5PQVAVDRGXrO97jHjZeysxM8pgDnObqsI G1bcZEzhJVF5POZoSBu9xqyr5gL2uM8HJxCR7GUMruaZUVr+0fc32zhrYMrhZNOOQH/z9m 15UuGFtcXyrRy9U5urBmTzKA55E7tdyvm0/B/W01XyTggJ6GCRdhdtm3BM3BsEW2oZJaEm AFdJIOznmgDLkz+0CTsZ3INRYjkeE+ZSFUt91OExvAC5wCDMgMJIAgEm8mqNQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705231282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/YjuzXZUGJo+XFc+/f8gmiGxYQoNBLfOjOLz/DTjk8Y=; b=RTLkl+c6ZujGLG2dpwTbd6kE5FwxeyvLcr56+hdjEZnZyT2aTx3hxNCJbftktsRVFmyVaj 9d5cvSMa4BsU6aFrqTEssFKyYB10JSde6FjHo/4lRaiHTscvV8fsQW+10cEZqft7TFJ3Dj GLhnAjvC+9wrhXsTp+RMqNvgtozl5IKncpODdemn9iFAJ2R6SpJS5yiYmwr8cYb6NEzhzs b8bTu1yIWy7wb7EfqA760GnEcRATre6f1hiWHSD/RFFK1oSH+2HuucNvujHzdPiQjJjRZD GEVYWWo59lVkY7/3SL4/8n5mlVL45zYriLgbKjym9aHuJS3n11fun6EVremUig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705231282; a=rsa-sha256; cv=none; b=mrm9/UzIY8AeEEezPc3mek3MI9bvW8AdhQoU9lJ9q6Qro7Bm1vcgFFAe7ecO9+qkIcXsaL LLCGHlsbfu1vboTVH7/LlJmtuQoAA+2aQYUmon8kfl9voXvrB4ns7jsXyRWylve1xwyspG qqf5l/ryRslOiDPCfazlvlWagRmnfmtHxx4Q3O+Z8XoDOJUtKf9NuQPqkiZJRcxfx4aiUc Kvvdo+ePMey1bByktUsQwKpzSyHEb+JZQizKvzEGJRzvEVxbIqgdjiOS7YGkUAdBUEMrM+ oOcl+OW1TByxZClgxn/9y1d1IQJieNMl6RfxGljLPn2cDdxDpz5FMRsAMGINIg== 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 4TCXsG1Cw0z1BXl; Sun, 14 Jan 2024 11:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40EBLMbA083384; Sun, 14 Jan 2024 11:21:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40EBLMpO083381; Sun, 14 Jan 2024 11:21:22 GMT (envelope-from git) Date: Sun, 14 Jan 2024 11:21:22 GMT Message-Id: <202401141121.40EBLMpO083381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Grehan Subject: git: 0c243cd4a367 - main - Fix issue with Linux guest XHCI tablet probing. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grehan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c243cd4a3671bf728f33378ac593c08d8367bc2 Auto-Submitted: auto-generated The branch main has been updated by grehan: URL: https://cgit.FreeBSD.org/src/commit/?id=0c243cd4a3671bf728f33378ac593c08d8367bc2 commit 0c243cd4a3671bf728f33378ac593c08d8367bc2 Author: Peter Grehan AuthorDate: 2024-01-14 11:27:12 +0000 Commit: Peter Grehan CommitDate: 2024-01-14 11:38:55 +0000 Fix issue with Linux guest XHCI tablet probing. The USB3 spec mandates that the device-descriptor max packet size be 512 bytes, which requires a field size of 9 since it is a power-of-2. Linux kernels recently started validating this field, resulting in the table not being probed and the cursor not working in bhyve VNC. Reviewed by: corvink PR: 275760 MFC after: 1 week --- usr.sbin/bhyve/usb_mouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/usb_mouse.c b/usr.sbin/bhyve/usb_mouse.c index 80f79980a98e..a37941c0cd9d 100644 --- a/usr.sbin/bhyve/usb_mouse.c +++ b/usr.sbin/bhyve/usb_mouse.c @@ -154,7 +154,7 @@ static struct usb_device_descriptor umouse_dev_desc = { .bLength = sizeof(umouse_dev_desc), .bDescriptorType = UDESC_DEVICE, MSETW(.bcdUSB, UD_USB_3_0), - .bMaxPacketSize = 8, /* max packet size */ + .bMaxPacketSize = 9, /* max pkt size, 2^9 = 512 */ MSETW(.idVendor, 0xFB5D), /* vendor */ MSETW(.idProduct, 0x0001), /* product */ MSETW(.bcdDevice, 0), /* device version */ From nobody Sun Jan 14 13:50:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCc9G0V95z56D0T; Sun, 14 Jan 2024 13:50: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 4TCc9G00Rcz58Hd; Sun, 14 Jan 2024 13:50:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705240226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i3XPYWwoic4U/UrVWgNXuKwUv9wKs3HrOxBzyF+CU5c=; b=SFAIfA2VdhQkcDigy63G3GZHMzYVclv3YrU7ThO62AET4JpKAhrNmLSENhEYD3/Le98duG P9v+8pb/92xl7MI1kSnRRoxiFHGwRvKfosH3l6ijoeCCLeiXxLJEx8zxh3wawasheyWyS3 lTY8MJcijyqrRXb9uOPQ0faIBVq87E5xgpQRvQNcNtKOTdjiUrMuxBCq4macUhLJkPATLa NRmuf8ppUDOrFgjIcMwME1sphKZsJ70kpH5XIdP6unQbPdajTaCxqHdtqWbq08L993s1SI nvx6yE6JOxStIWRjr1O7F9rtgIUVEUM8akXCPibLiSvLyNppKyUpbuAv5Hx2Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705240226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i3XPYWwoic4U/UrVWgNXuKwUv9wKs3HrOxBzyF+CU5c=; b=QUYrBLAnrPb+Us/9Xl8/UAF/C8WSCb+33SKbr8D70bVOcAunB9DEzsgU1ShNqcXDiX4J1Z /fXX2xqWcvTFODwh3V/onnoAIXvRHwxvlrc/XccY/j2JkFyqJE2YkrQmObqu5CunqDE9r+ hesanmQweBnJcH9Zt1zTiLQVtG4jN+XKbBv7aZqPkEOhF7s6T0evBCVHCpwEOwOA/OzJ30 TLWFROJuIp9WyTHjiOH3AkZ95iS/VFczkuvIkz3UzgPNmU34TlKzpVa6FUEjzQXaDuwkZw liz5MNrfkZ34YdJUZCYs0A3p8QoNbCSGuVPhfwud7r3KGjqxOjMrF1c9GKYn9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705240226; a=rsa-sha256; cv=none; b=iMO5Gh8qUaTpC/95Arv6kr+cr8P0aYwvjqClF+NzeAs25L9yVNZHmMX5xyxKsK0znnu8vG 5yc9132mOPhIAKny8sO/hnUK+vVl5BpB6htlhphqja3+0wbZGlXvO/HYW/cEG8IW+wlxJq xiyTBg/94cUg49kYyGMq7YaOzB5NbKLaQsEzc1nIu1dc1pi2HflGR7DsWqMajvjoa9CFPw VsDZ9l75rL7WsTVQM1hsyU2kw6gLUWt30pFn+W5oaPkKIdpasaPnK1jMEn5jc3YVuCNcDr JfgShqNOlBDIXAbgZQoCLIJSNm6/EJObPsdeJ1o81gf8d8c88QnTYjC5ceu4yg== 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 4TCc9F6B9czGMM; Sun, 14 Jan 2024 13:50: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 40EDoP9n027542; Sun, 14 Jan 2024 13:50:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40EDoPZG027539; Sun, 14 Jan 2024 13:50:25 GMT (envelope-from git) Date: Sun, 14 Jan 2024 13:50:25 GMT Message-Id: <202401141350.40EDoPZG027539@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 256fe4a15484 - main - tcpsso: fix TIME_WAIT description in man-page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 256fe4a15484d72452ada288f5a3d9c9672b2d57 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=256fe4a15484d72452ada288f5a3d9c9672b2d57 commit 256fe4a15484d72452ada288f5a3d9c9672b2d57 Author: Michael Tuexen AuthorDate: 2024-01-14 13:45:43 +0000 Commit: Michael Tuexen CommitDate: 2024-01-14 13:45:43 +0000 tcpsso: fix TIME_WAIT description in man-page Reviewed by: manpages(pauamma_gundo.com) Fixes: e179d9739b14 ("tcpsso: support TIME_WAIT state") MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D43424 --- usr.sbin/tcpsso/tcpsso.8 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/usr.sbin/tcpsso/tcpsso.8 b/usr.sbin/tcpsso/tcpsso.8 index c06cd8adb25f..37968c8afa54 100644 --- a/usr.sbin/tcpsso/tcpsso.8 +++ b/usr.sbin/tcpsso/tcpsso.8 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 6, 2024 +.Dd January 14, 2024 .Dt TCPSSO 8 .Os .Sh NAME @@ -191,10 +191,8 @@ and .Fl s Ar state are specified, .Nm -will apply the socket option to all TCP endpoints not being in the -state -.Dv TIME_WAIT -and using the congestion control algorithm +will apply the socket option to all TCP endpoints using the congestion +control algorithm .Ar cc-algo , being in the state .Ar state , From nobody Sun Jan 14 16:32:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCgmT0D2Jz56ZyW; Sun, 14 Jan 2024 16:32:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TCgmS5Vn7z4HH7; Sun, 14 Jan 2024 16:32:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705249960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=68tAvJxlj2jblFMU4cqxmD86idHUQ+4A7t0BpxZ+Xnk=; b=NWSFDIhy8W4vmA4is/ozqZ3ECdciVr5qno/e2HTS/g1D8lvh2Nqt0Mb8/UZhRfMpBY+zhK DZpmfhYX+bE1Qx4oAMyTRluWSpvOZ42hExied3jDHyFXXzMMS8t8lfhcfFXfQaJXa2DxhO 8dv4wmCYNq4+VcVxmtCApV9AIS7OUwm3OSa85n63pyEo1zCVFfkmYe3a2KAmu+St34mKml YVkOq4A/3DCTlbpWJu0K83fZujyHT6I1rKhoJJ0LYbdwK8Y1bLiJIqlWkOT9+OAOHH2F8W c/Aj36t1JWdnUH7FwbzA7W3eQVMGziylRQPOZQZN0IrRe6EmxFgosFwoS0ReWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705249960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=68tAvJxlj2jblFMU4cqxmD86idHUQ+4A7t0BpxZ+Xnk=; b=j9sR20rQtgGX/80fBnm9FK1HPQ1nuyWeFPo5lfs4iaUg7l3NpeefD/05VnEmDdEZMndhMP fF5BBKiCBZPZeOlVv2AvyyW12jWKl+QzB3g5gYwx4ARrSmYHX+IPOnd53DOrEFKg5ZA/Hh WOpBYnAKrhONHC4RIehTXCOe9p8ISwm06ImsPpfXDR4ew8SKZpuW2hQlpAGm2fUKmV9lNY 2Pkh5FvA55u2yXNRuSqFZOnvT16vzchL12UJ6IPIqxT3WvsX2YoDk+S/c5GxmAp1hiaQlN kyWW1c6x95UpaJgCwO/nDKLl0RtTC1UcU1okw67/pH5dZn/4XPLmHtQU/35tYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705249960; a=rsa-sha256; cv=none; b=TW69H3GC1nD28T8cd2yHKo596DqpYp7FDe7tSGOl6dWQAI8zr/Q+Hw+Qma9JGCjwjOItUy zvT16Y7W6dp3NRC7KVkam3316Y7q85s2Yi9WaD8YrYWqdk5zoSKRJZVVMhm2z6mc4CNQFj oPAVKLVeyRAKNf5Nmpe+TD0h3+O1gbs7OQjqSnDeoU1KeYwUunWpXraH2K9R/CMeKWGW8P +2LiavZNRIDDzAWANXVqBD7tKU0+lHQcMGXZToU5td6NMMH8BESZl0yrjLSY6hdgUQ+tfm WSEACbOyuWxZIWuGJk5u9AQeMSJ3Uog9LtIfUlGSwSkctECj/lT8oboptwJP+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 4TCgmS4Z0QzKyh; Sun, 14 Jan 2024 16:32: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 40EGWexU002942; Sun, 14 Jan 2024 16:32:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40EGWe96002939; Sun, 14 Jan 2024 16:32:40 GMT (envelope-from git) Date: Sun, 14 Jan 2024 16:32:40 GMT Message-Id: <202401141632.40EGWe96002939@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 751c323b829c - main - sc: Use current console rather than first console for mouse input List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 751c323b829c36ca63a123a02a51f971ca3bd409 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=751c323b829c36ca63a123a02a51f971ca3bd409 commit 751c323b829c36ca63a123a02a51f971ca3bd409 Author: Vadim Ushakov AuthorDate: 2024-01-14 16:22:17 +0000 Commit: Warner Losh CommitDate: 2024-01-14 16:24:41 +0000 sc: Use current console rather than first console for mouse input When mouse reporting feature is turned on (control sequence ^[[?1000h), syscons sends valid mouse coordinates only for ttyv0. Applications running on other ttys always (erroneously) get mouse coordinates from the first tty, not from tty they actually run. Steps to reproduce: 1. On ttyv0, run any application that uses mouse reporting feature. Make some clicks. The feature works properly. 2. Switch to another ttyv, run the application. The application receives mouse click events, but mouse position reported by syscons to the application does not match with the actual mouse position on the screen. Expected result: Reported mouse position should match with visible mouse position. PR: 193339 Reviewed by: imp --- sys/dev/syscons/scmouse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c index f23f412cc00d..b0c7fcc9d147 100644 --- a/sys/dev/syscons/scmouse.c +++ b/sys/dev/syscons/scmouse.c @@ -798,7 +798,7 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td) cur_scp->status &= ~MOUSE_HIDDEN; if (cur_scp->mouse_level > 0) { - sc_mouse_input(scp, mouse); + sc_mouse_input(cur_scp, mouse); break; } @@ -859,7 +859,7 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td) cur_scp->status &= ~MOUSE_HIDDEN; if (cur_scp->mouse_level > 0) { - sc_mouse_input(scp, mouse); + sc_mouse_input(cur_scp, mouse); break; } From nobody Sun Jan 14 21:22:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCpC41ZHLz579Kx; Sun, 14 Jan 2024 21:22: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 4TCpC33cn4z47jh; Sun, 14 Jan 2024 21:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705267359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V+1C28rOfFAuLD5uj2tZwjW47QtCo2E6WiQ53s9MxvA=; b=aramRFYyjBaadUj4U+H3e78NU5VGEoHY29E2russit9Hcyfpk12CmqNtiA3RlOc2s5Lb9V c6yBQ2Jwjl1s0lz1L5IINKkK0o+GN/Z5Nm93k/I13j4wh5SAQc4Sytl7LAmZR7FBSsHL14 mDKp3+e8fo2jZF0bZTu66ZLHmszuKxSSJVLbP6VnZgA568FIlubZqSXAKCZL8euAwwLHRD saFM6tF0/2SKP6z8QzO/mhW22qmJDR1rJ+EEX5wTjMoVOr3yEtQiZqi/7JeTusuojNMSNm 2AxJyhLCe4Tr1ZSO30l7iq58ZcEKvWl9hF8zlwtJ7LGUS8g+4kotNB5pJYRFUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705267359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V+1C28rOfFAuLD5uj2tZwjW47QtCo2E6WiQ53s9MxvA=; b=tqxBdAbkA6mOxwEAnvVDMl2+MBhzo6IQ7PET6qFVXtw/BUg1/1M/ROGWKvaR12PoIAVk2r ntNSgZEa6WTre+cHcSj+0itwGUzeuLTNILGmtCGm2oWEWUeKVzZLQrCSyOVlHE79ksYivP tYi9jD0ghcc2OXQsMADLFa24HLJ/EASkjUU3DIt9or3pM4E8CJpg3QggE531oYVYZauhcV zosBxC0zr4OfLrQE+4etAK2F4Aby0ye+NzBRWKUm54THRRPOI/eXSv3Pm5sPghLNH0ppMW fzYU8Cp2pvdjPKHnPRRNHdMXUCOgT2Dt10khvXNt9BF/orDgDJAXbk7urPGrlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705267359; a=rsa-sha256; cv=none; b=NGhznGXMoPhgmy2ABSqT+Zd0lOwOUWdOAvhFYPIr7PtNigKvbRYo8h3o0HMYx7UJFxTE1j 5D8Ilaj3UHMEYniDU6/j9LE2z7oeviP414XlGJJdEmpKYsGiouxOTGBRJiyYYPGp10jcEv bh2mK0wUaa2tAkhYb8tfxZv4f5IWSOm07HwT4WUYytE8U/tff47jvSJHT9C3X7V83JYM2+ q3prGYTRrsxjuvNt0w+sZ5Kj/xf2OsuQeu6PSwZNCXM3EtRIaS0zTFSAK6ieKOs3L/+xTo iIXSmR2sD5BwC8A9R9VYcWTTWL1EsvQ/gaNvmM5x/uip/cPtgDv//I3puGJZog== 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 4TCpC320Z0zVGd; Sun, 14 Jan 2024 21:22: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 40ELMcWr091089; Sun, 14 Jan 2024 21: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 40ELMcUK091086; Sun, 14 Jan 2024 21:22:38 GMT (envelope-from git) Date: Sun, 14 Jan 2024 21:22:38 GMT Message-Id: <202401142122.40ELMcUK091086@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: 03e8d25b1f92 - main - geom_map(4): Garbage collect disconnected driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03e8d25b1f9218dcd52d13819dda14dbbaf622b7 Auto-Submitted: auto-generated The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=03e8d25b1f9218dcd52d13819dda14dbbaf622b7 commit 03e8d25b1f9218dcd52d13819dda14dbbaf622b7 Author: Marius Strobl AuthorDate: 2024-01-14 08:31:26 +0000 Commit: Marius Strobl CommitDate: 2024-01-14 21:22:21 +0000 geom_map(4): Garbage collect disconnected driver The last MIPS user has been removed in c09981f1 2 years ago, the last ARM one in 58d5c511 even 5.5 years ago. --- ObsoleteFiles.inc | 3 + share/man/man4/Makefile | 1 - share/man/man4/geom_map.4 | 209 -------------------- sys/conf/files | 1 - sys/geom/geom_map.c | 392 ------------------------------------- sys/modules/geom/geom_map/Makefile | 7 - 6 files changed, 3 insertions(+), 610 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 7265d0a19741..a6c15187e847 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20240114: Removal of geom_map(4) +OLD_FILES+=usr/share/man/man4/geom_map.4 + # 20240112: remove pmap_init2() OLD_FILES+=usr/share/man/man9/pmap_init2.9.gz diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index e1191eedebe5..978ec6887f85 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -170,7 +170,6 @@ MAN= aac.4 \ genetlink.4 \ geom.4 \ geom_linux_lvm.4 \ - geom_map.4 \ geom_uzip.4 \ gif.4 \ ${_gve.4} \ diff --git a/share/man/man4/geom_map.4 b/share/man/man4/geom_map.4 deleted file mode 100644 index 5ae49500d6a9..000000000000 --- a/share/man/man4/geom_map.4 +++ /dev/null @@ -1,209 +0,0 @@ -.\" -.\" Copyright (c) 2011 Aleksandr Rybalko -.\" 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. -.\" -.Dd June 8, 2015 -.Dt GEOM_MAP 4 -.Os -.Sh NAME -.Nm geom_map -.Nd "GEOM module that maps defined items as separate partitions" -.Sh SYNOPSIS -To compile this driver into the kernel, -place the following line in your -kernel configuration file: -.Bd -ragged -offset indent -.Cd "options geom_map" -.Ed -.Sh DESCRIPTION -The -.Nm -framework provides support for mapping defined parts of the media. -Basically it is helpful for embedded devices where in the one continuous -flash are loader, kernel and rootfs parts. -.Nm -allows making them available as separate parts and protects the loader from -being overwritten. -.Pp -At boot time -.Nm -partitions are listed (only with bootverbose) as: -.Bd -literal -offset indent -MAP: 0x30000, data=0x30000 "/dev/map/bootloader" -MAP: 30000x10000, data=0x10000 "/dev/map/factory" -MAP: 40000x7a0000, data=0x7a0000 "/dev/map/upgrade" -MAP: search key ".!/bin/sh" from 0x100000, step 0x10000 -MAP: 40000x110000, data=0x110000 "/dev/map/kernel" -MAP: search key ".!/bin/sh" from 0x100000, step 0x10000 -MAP: 150000x690000, data=0x690000 "/dev/map/rootfs" -MAP: 7e0000x20000, data=0x20000 "/dev/map/config" -.Ed -.Pp -The current -.Nm -configuration can be accessed with the following -.Xr sysctl 8 -nodes: -.Va kern.geom.conftxt , kern.geom.confxml , -and -.Va kern.geom.confdot -or by using -.Dq Li "geom map list" . -.Bd -literal -offset indent -# sysctl -n kern.geom.conftxt -0 MD md0 10485760 512 u 0 s 512 f 0 fs 0 l 10485760 t malloc -0 DISK cfid0 8388608 4 hd 0 sc 0 -1 MAP map/config 131072 4 i 5 o 8257536 entry 0 dsize 131072 -1 MAP map/rootfs 6881280 4 i 4 o 1376256 entry 0 dsize 6881280 -2 UZIP map/rootfs.uzip 18677760 512 -1 MAP map/kernel 1114112 4 i 3 o 262144 entry 0 dsize 1114112 -1 MAP map/upgrade 7995392 4 i 2 o 262144 entry 0 dsize 7995392 -1 MAP map/factory 65536 4 i 1 o 196608 entry 0 dsize 65536 -1 MAP map/bootloader 196608 4 i 0 o 0 entry 0 dsize 196608 -.Ed -.Pp -Driver configuration can be done in -.Xr device.hints 5 . -List of used parameters: -.Bl -tag -width indent -.It Va at -select media to attach -.It Va name -name of partition (will create device -.Pa /dev/map/ Ns Ar that_name ) -.It Va start -offset from the beginning of the parent media to start of the mapped partition. -This field can also have a special value -.Qq Li search: Ns Ar searchstart Ns Li : Ns Ar searchstep Ns Li : Ns Ar searchkey , -where: -.Bl -tag -width indent -.It Ar searchstart -offset from the beginning of the parent media where search will be started -.It Ar searchstep -value of the increment used while searching for the partition boundary markers -.It Ar searchkey -key which will be used to find partition boundary markers. -The wildcard -.Ql .\& -can be used to match any character on that position -.El -.It Va end -offset from the beginning of the parent media to the end of the mapped partition. -This field can also have the special value -.Qq Li search: Ns Ar searchstart Ns Li : Ns Ar searchstep Ns Li : Ns Ar searchkey , -as described above. -.It Va offset -offset where the data of the mapped partition begins -.El -.Pp -Each record contains the start address (in bytes) from the media begin, size -(in bytes), offset where the data of mapped partition begins, and the name of -new device. -.Bd -literal -offset indent -MAP: 150000x690000, data=0x690000 "/dev/map/rootfs" -.Ed -.Bd -literal -00150000 - start address -00690000 - size -00000000 - data begin from zero offset -00690000 - data size -"map/rootfs" - new media will be accessible via /dev/map/rootfs dev. -.Ed -.Sh EXAMPLES -If we need to implement layout shown above, we need to define the following -hints: -.Bd -literal -offset indent -hint.map.0.at="cfid0" -hint.map.0.start=0x00000000 -hint.map.0.end=0x00030000 -hint.map.0.name="bootloader" -hint.map.0.readonly=1 -.Ed -.Pp -This defines -.Pa /dev/map/bootloader -at disk -.Pa cfid0 -starting at -.Li 0x00000000 -and ending at -.Li 0x00030000 , -it is also marked as readonly. -.Bd -literal -offset indent -hint.map.1.at="cfid0" -hint.map.1.start=0x00030000 -hint.map.1.end=0x00040000 -hint.map.1.name="factory" - -hint.map.2.at="cfid0" -hint.map.2.start=0x00040000 -hint.map.2.end=0x007e0000 -hint.map.2.name="upgrade" - -hint.map.3.at="cfid0" -hint.map.3.name="kernel" -hint.map.3.start=0x00040000 -hint.map.3.end="search:0x00100000:0x10000:.!/bin/sh" -.Ed -.Pp -This defines -.Pa /dev/map/kernel -at disk -.Pa cfid0 -starting at -.Li 0x00040000 , -but the end position must be searched by finding the key -.Dq Li ".!/bin/sh" , -from offset -.Li 0x00100000 -to the end of media with step -.Li 0x10000 . -The real marker in this case is -.Dq Li "#!/bin/sh" , -but -.Ql # -terminates the line when the hints file is parsed, so we need to use wildcard -.Ql .\& -instead of -.Ql # . -.Bd -literal -offset indent -hint.map.4.at="cfid0" -hint.map.4.name="rootfs" -hint.map.4.start="search:0x00100000:0x10000:.!/bin/sh" -hint.map.4.end=0x007e0000 - -hint.map.5.at="cfid0" -hint.map.5.start=0x007e0000 -hint.map.5.end=0x00800000 -hint.map.5.name="config" -.Ed -.Sh SEE ALSO -.Xr geom 4 , -.Xr geom 8 , -.Xr sysctl 8 -.Sh AUTHORS -The -.Nm -driver was written by -.An Aleksandr Rybalko Aq Mt ray@ddteam.net . diff --git a/sys/conf/files b/sys/conf/files index 6a089de5bb98..1069079b162a 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3618,7 +3618,6 @@ geom/geom_event.c standard geom/geom_flashmap.c optional fdt cfi | fdt mx25l | mmcsd | fdt n25q | fdt at45d geom/geom_io.c standard geom/geom_kern.c standard -geom/geom_map.c optional geom_map geom/geom_redboot.c optional geom_redboot geom/geom_slice.c standard geom/geom_subr.c standard diff --git a/sys/geom/geom_map.c b/sys/geom/geom_map.c deleted file mode 100644 index 65c313fcfa0c..000000000000 --- a/sys/geom/geom_map.c +++ /dev/null @@ -1,392 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2010-2011 Aleksandr Rybalko - * based on geom_redboot.c - * Copyright (c) 2009 Sam Leffler, Errno Consulting - * 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, - * without modification. - * 2. Redistributions in binary form must reproduce at minimum a disclaimer - * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any - * redistribution must be conditioned upon including a substantially - * similar Disclaimer requirement for further binary redistribution. - * - * NO WARRANTY - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#define MAP_CLASS_NAME "MAP" -#define MAP_MAXSLICE 64 -#define MAP_MAX_MARKER_LEN 64 - -struct g_map_softc { - off_t offset[MAP_MAXSLICE]; /* offset in flash */ - off_t size[MAP_MAXSLICE]; /* image size in bytes */ - off_t entry[MAP_MAXSLICE]; - off_t dsize[MAP_MAXSLICE]; - uint8_t readonly[MAP_MAXSLICE]; - g_access_t *parent_access; -}; - -static int -g_map_access(struct g_provider *pp, int dread, int dwrite, int dexcl) -{ - struct g_geom *gp; - struct g_slicer *gsp; - struct g_map_softc *sc; - - gp = pp->geom; - gsp = gp->softc; - sc = gsp->softc; - - if (dwrite > 0 && sc->readonly[pp->index]) - return (EPERM); - - return (sc->parent_access(pp, dread, dwrite, dexcl)); -} - -static int -g_map_start(struct bio *bp) -{ - struct g_provider *pp; - struct g_geom *gp; - struct g_map_softc *sc; - struct g_slicer *gsp; - int idx; - - pp = bp->bio_to; - idx = pp->index; - gp = pp->geom; - gsp = gp->softc; - sc = gsp->softc; - - if (bp->bio_cmd == BIO_GETATTR) { - if (g_handleattr_int(bp, MAP_CLASS_NAME "::entry", - sc->entry[idx])) { - return (1); - } - if (g_handleattr_int(bp, MAP_CLASS_NAME "::dsize", - sc->dsize[idx])) { - return (1); - } - } - - return (0); -} - -static void -g_map_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, - struct g_consumer *cp __unused, struct g_provider *pp) -{ - struct g_map_softc *sc; - struct g_slicer *gsp; - - gsp = gp->softc; - sc = gsp->softc; - g_slice_dumpconf(sb, indent, gp, cp, pp); - if (pp != NULL) { - if (indent == NULL) { - sbuf_printf(sb, " entry %jd", (intmax_t)sc->entry[pp->index]); - sbuf_printf(sb, " dsize %jd", (intmax_t)sc->dsize[pp->index]); - } else { - sbuf_printf(sb, "%s%jd\n", indent, - (intmax_t)sc->entry[pp->index]); - sbuf_printf(sb, "%s%jd\n", indent, - (intmax_t)sc->dsize[pp->index]); - } - } -} - -static int -find_marker(struct g_consumer *cp, const char *line, off_t *offset) -{ - off_t search_start, search_offset, search_step; - size_t sectorsize; - uint8_t *buf; - char *op, key[MAP_MAX_MARKER_LEN], search_key[MAP_MAX_MARKER_LEN]; - int ret, c; - - /* Try convert to numeric first */ - *offset = strtouq(line, &op, 0); - if (*op == '\0') - return (0); - - bzero(search_key, MAP_MAX_MARKER_LEN); - sectorsize = cp->provider->sectorsize; - -#ifdef __LP64__ - ret = sscanf(line, "search:%li:%li:%63c", - &search_start, &search_step, search_key); -#else - ret = sscanf(line, "search:%qi:%qi:%63c", - &search_start, &search_step, search_key); -#endif - if (ret < 3) - return (1); - - if (bootverbose) { - printf("MAP: search %s for key \"%s\" from 0x%jx, step 0x%jx\n", - cp->geom->name, search_key, (intmax_t)search_start, (intmax_t)search_step); - } - - /* error if search_key is empty */ - if (strlen(search_key) < 1) - return (1); - - /* sscanf successful, and we start marker search */ - for (search_offset = search_start; - search_offset < cp->provider->mediasize; - search_offset += search_step) { - g_topology_unlock(); - buf = g_read_data(cp, rounddown(search_offset, sectorsize), - roundup(strlen(search_key), sectorsize), NULL); - g_topology_lock(); - - /* - * Don't bother doing the rest if buf==NULL; eg derefencing - * to assemble 'key'. - */ - if (buf == NULL) - continue; - - /* Wildcard, replace '.' with byte from data */ - /* TODO: add support wildcard escape '\.' */ - - strncpy(key, search_key, MAP_MAX_MARKER_LEN); - - for (c = 0; c < MAP_MAX_MARKER_LEN && key[c]; c++) { - if (key[c] == '.') { - key[c] = ((char *)(buf + - (search_offset % sectorsize)))[c]; - } - } - - /* Assume buf != NULL here */ - if (memcmp(buf + search_offset % sectorsize, - key, strlen(search_key)) == 0) { - g_free(buf); - /* Marker found, so return their offset */ - *offset = search_offset; - return (0); - } - g_free(buf); - } - - /* Marker not found */ - return (1); -} - -static int -g_map_parse_part(struct g_class *mp, struct g_provider *pp, - struct g_consumer *cp, struct g_geom *gp, struct g_map_softc *sc, int i) -{ - const char *value, *name; - char *op; - off_t start, end, offset, size, dsize; - int readonly, ret; - - /* hint.map.0.at="cfid0" - bind to cfid0 media */ - if (resource_string_value("map", i, "at", &value) != 0) - return (1); - - /* Check if this correct provider */ - if (strcmp(pp->name, value) != 0) - return (1); - - /* - * hint.map.0.name="uboot" - name of partition, will be available - * as "/dev/map/uboot" - */ - if (resource_string_value("map", i, "name", &name) != 0) { - if (bootverbose) - printf("MAP: hint.map.%d has no name\n", i); - return (1); - } - - /* - * hint.map.0.start="0x00010000" - partition start at 0x00010000 - * or hint.map.0.start="search:0x00010000:0x200:marker text" - - * search for text "marker text", begin at 0x10000, step 0x200 - * until we found marker or end of media reached - */ - if (resource_string_value("map", i, "start", &value) != 0) { - if (bootverbose) - printf("MAP: \"%s\" has no start value\n", name); - return (1); - } - if (find_marker(cp, value, &start) != 0) { - if (bootverbose) { - printf("MAP: \"%s\" can't parse/use start value\n", - name); - } - return (1); - } - - /* like "start" */ - if (resource_string_value("map", i, "end", &value) != 0) { - if (bootverbose) - printf("MAP: \"%s\" has no end value\n", name); - return (1); - } - if (find_marker(cp, value, &end) != 0) { - if (bootverbose) { - printf("MAP: \"%s\" can't parse/use end value\n", - name); - } - return (1); - } - - /* variable readonly optional, disable write access */ - if (resource_int_value("map", i, "readonly", &readonly) != 0) - readonly = 0; - - /* offset of partition data, from partition begin */ - if (resource_string_value("map", i, "offset", &value) == 0) { - offset = strtouq(value, &op, 0); - if (*op != '\0') { - if (bootverbose) { - printf("MAP: \"%s\" can't parse offset\n", - name); - } - return (1); - } - } else { - offset = 0; - } - - /* partition data size */ - if (resource_string_value("map", i, "dsize", &value) == 0) { - dsize = strtouq(value, &op, 0); - if (*op != '\0') { - if (bootverbose) { - printf("MAP: \"%s\" can't parse dsize\n", - name); - } - return (1); - } - } else { - dsize = 0; - } - - size = end - start; - if (dsize == 0) - dsize = size - offset; - - /* end is 0 or size is 0, No MAP - so next */ - if (end < start) { - if (bootverbose) { - printf("MAP: \"%s\", \"end\" less than " - "\"start\"\n", name); - } - return (1); - } - - if (offset + dsize > size) { - if (bootverbose) { - printf("MAP: \"%s\", \"dsize\" bigger than " - "partition - offset\n", name); - } - return (1); - } - - ret = g_slice_config(gp, i, G_SLICE_CONFIG_SET, start + offset, - dsize, cp->provider->sectorsize, "map/%s", name); - if (ret != 0) { - if (bootverbose) { - printf("MAP: g_slice_config returns %d for \"%s\"\n", - ret, name); - } - return (1); - } - - if (bootverbose) { - printf("MAP: %s: %jxx%jx, data=%jxx%jx " - "\"/dev/map/%s\"\n", - cp->geom->name, (intmax_t)start, (intmax_t)size, (intmax_t)offset, - (intmax_t)dsize, name); - } - - sc->offset[i] = start; - sc->size[i] = size; - sc->entry[i] = offset; - sc->dsize[i] = dsize; - sc->readonly[i] = readonly ? 1 : 0; - - return (0); -} - -static struct g_geom * -g_map_taste(struct g_class *mp, struct g_provider *pp, int insist __unused) -{ - struct g_map_softc *sc; - struct g_consumer *cp; - struct g_geom *gp; - int i; - - g_trace(G_T_TOPOLOGY, "map_taste(%s,%s)", mp->name, pp->name); - g_topology_assert(); - if (strcmp(pp->geom->class->name, MAP_CLASS_NAME) == 0) - return (NULL); - - gp = g_slice_new(mp, MAP_MAXSLICE, pp, &cp, &sc, sizeof(*sc), - g_map_start); - if (gp == NULL) - return (NULL); - - /* interpose our access method */ - sc->parent_access = gp->access; - gp->access = g_map_access; - - for (i = 0; i < MAP_MAXSLICE; i++) - g_map_parse_part(mp, pp, cp, gp, sc, i); - - g_access(cp, -1, 0, 0); - if (LIST_EMPTY(&gp->provider)) { - if (bootverbose) - printf("MAP: No valid partition found at %s\n", pp->name); - g_slice_spoiled(cp); - return (NULL); - } - return (gp); -} - -static struct g_class g_map_class = { - .name = MAP_CLASS_NAME, - .version = G_VERSION, - .taste = g_map_taste, - .dumpconf = g_map_dumpconf, -}; -DECLARE_GEOM_CLASS(g_map_class, g_map); -MODULE_VERSION(geom_map, 0); diff --git a/sys/modules/geom/geom_map/Makefile b/sys/modules/geom/geom_map/Makefile deleted file mode 100644 index 85beccbf493e..000000000000 --- a/sys/modules/geom/geom_map/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -.PATH: ${SRCTOP}/sys/geom - -KMOD= geom_map -SRCS= geom_map.c bus_if.h device_if.h - -.include From nobody Sun Jan 14 21:22:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCpC50TPjz57957; Sun, 14 Jan 2024 21:22:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TCpC42sxfz47gB; Sun, 14 Jan 2024 21:22:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705267360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DLJ77iT6I5lCw+arIi02tyk53NSJLtV0RioUu3NMdlU=; b=BrHP+SZQDFCir4rSlfpPP3sVmZMeKZD1yUzVlM1h6YaVI+4cGh8w7MuHEkyRABZAXOSKvm R5A9YamVUtheSGKfDelojh7InH4uhC1KxEOO/HTxtloEA1qNzN1TbN46rrIF+50kI+7zAI IOL3nonhq3FmyY4R/VaBfvSRO3wlo6HKuL7B+tFeyc5jdwWw6q6WFF+NsqW92kSIBxT7EB vFZMfuuXc1n20A66GnS3KdG3ggbeEabrBcScNdVLXZihmQWnCD8nS8ysBnIwWXjDfr0xKH LpXLFDlT7OC0TONC+5AP3wiVo4tFmJcje5iWmwIooTmPFI3hwcfU5esUU987bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705267360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DLJ77iT6I5lCw+arIi02tyk53NSJLtV0RioUu3NMdlU=; b=lf45VUM2q8LP5tf6iAJgPSF35GsdC3HD6JsvDCAORHbyzXrH4094cc3Zp6OVH4LirTFX7O JCxjnpbDar4AypNE2C8i8lfO/67zRpvsO0V50v9rQgCZf/4q5Hda20YXN84dzUxXdsaRn6 NyVgR4T9ffbOLATGRa0tStDyZ4tToxNkklcUIyXhEtHtTCZOjPLZkOiFV8Glszf7orDOL4 MNoBLfMSf6jH/rkg88xO9aZPF3TQXVj/kjMFa2a4Sa6kVPHEoOH8mOjmob0rVdbiDVb9b2 4VaRug2kflfSxYhyiO5TU4FQTQW09EtAVeJxEYBFQO0a1/CZR5lt/6taVeVF+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705267360; a=rsa-sha256; cv=none; b=H5vpJryaFf/boFb8qBb9seDR4xZmn3Kycb6N/d3UKPUrKAnlPeTQjAYzKP91yyI5swsfkV f3qUPHtlUI2BC2irWXBGRu5yuKUhTnwcUQn1S42cjqaaVQdCG9A1TvBi9wAK8pFT32wNoH T4njVXDEwNVscSFi2g3GsdCsGdt/19GAzGxh6Sd3u37ufi437vEJQin9abq+m8bc6SAm44 eqwHyVuop9VxCzOpaQLdzRgBNmj1L/TF7H5Cj4MGWJ/ZtBdcUGy7YZiTTQBFGWpautDxb3 l0IzephoOFHJJdIcJ09EkxUSozJ0LEA4ep3JXHgtwsVvEHtPQekhndVChdzpAA== 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 4TCpC41wJ4zVTQ; Sun, 14 Jan 2024 21:22: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 40ELMedb091133; Sun, 14 Jan 2024 21:22:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ELMemB091130; Sun, 14 Jan 2024 21:22:40 GMT (envelope-from git) Date: Sun, 14 Jan 2024 21:22:40 GMT Message-Id: <202401142122.40ELMemB091130@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: 53df7e58cca7 - main - geom_redboot(4): Garbage collect disconnected driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 53df7e58cca7e6726b44f447f10ddc3451cfa851 Auto-Submitted: auto-generated The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=53df7e58cca7e6726b44f447f10ddc3451cfa851 commit 53df7e58cca7e6726b44f447f10ddc3451cfa851 Author: Marius Strobl AuthorDate: 2024-01-14 08:39:56 +0000 Commit: Marius Strobl CommitDate: 2024-01-14 21:22:21 +0000 geom_redboot(4): Garbage collect disconnected driver The last MIPS user has been removed in c09981f1 2 years ago, the last ARM one in ff945277 even 5.5 years ago. --- sys/conf/files | 1 - sys/geom/geom_redboot.c | 342 ------------------------------------------------ 2 files changed, 343 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 1069079b162a..484ec90beb00 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3618,7 +3618,6 @@ geom/geom_event.c standard geom/geom_flashmap.c optional fdt cfi | fdt mx25l | mmcsd | fdt n25q | fdt at45d geom/geom_io.c standard geom/geom_kern.c standard -geom/geom_redboot.c optional geom_redboot geom/geom_slice.c standard geom/geom_subr.c standard geom/geom_vfs.c standard diff --git a/sys/geom/geom_redboot.c b/sys/geom/geom_redboot.c deleted file mode 100644 index aeb8f1e4e525..000000000000 --- a/sys/geom/geom_redboot.c +++ /dev/null @@ -1,342 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2009 Sam Leffler, Errno Consulting - * 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, - * without modification. - * 2. Redistributions in binary form must reproduce at minimum a disclaimer - * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any - * redistribution must be conditioned upon including a substantially - * similar Disclaimer requirement for further binary redistribution. - * - * NO WARRANTY - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define REDBOOT_CLASS_NAME "REDBOOT" - -struct fis_image_desc { - uint8_t name[16]; /* null-terminated name */ - uint32_t offset; /* offset in flash */ - uint32_t addr; /* address in memory */ - uint32_t size; /* image size in bytes */ - uint32_t entry; /* offset in image for entry point */ - uint32_t dsize; /* data size in bytes */ - uint8_t pad[256-(16+7*sizeof(uint32_t)+sizeof(void*))]; - struct fis_image_desc *next; /* linked list (in memory) */ - uint32_t dsum; /* descriptor checksum */ - uint32_t fsum; /* checksum over image data */ -}; - -#define FISDIR_NAME "FIS directory" -#define REDBCFG_NAME "RedBoot config" -#define REDBOOT_NAME "RedBoot" - -#define REDBOOT_MAXSLICE 64 -#define REDBOOT_MAXOFF \ - (REDBOOT_MAXSLICE*sizeof(struct fis_image_desc)) - -struct g_redboot_softc { - uint32_t entry[REDBOOT_MAXSLICE]; - uint32_t dsize[REDBOOT_MAXSLICE]; - uint8_t readonly[REDBOOT_MAXSLICE]; - g_access_t *parent_access; -}; - -static void -g_redboot_print(int i, struct fis_image_desc *fd) -{ - - printf("[%2d] \"%-15.15s\" %08x:%08x", i, fd->name, - fd->offset, fd->size); - printf(" addr %08x entry %08x\n", fd->addr, fd->entry); - printf(" dsize 0x%x dsum 0x%x fsum 0x%x\n", fd->dsize, - fd->dsum, fd->fsum); -} - -static int -g_redboot_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag, struct thread *td) -{ - return (ENOIOCTL); -} - -static int -g_redboot_access(struct g_provider *pp, int dread, int dwrite, int dexcl) -{ - struct g_geom *gp = pp->geom; - struct g_slicer *gsp = gp->softc; - struct g_redboot_softc *sc = gsp->softc; - - if (dwrite > 0 && sc->readonly[pp->index]) - return (EPERM); - return (sc->parent_access(pp, dread, dwrite, dexcl)); -} - -static int -g_redboot_start(struct bio *bp) -{ - struct g_provider *pp; - struct g_geom *gp; - struct g_redboot_softc *sc; - struct g_slicer *gsp; - int idx; - - pp = bp->bio_to; - idx = pp->index; - gp = pp->geom; - gsp = gp->softc; - sc = gsp->softc; - if (bp->bio_cmd == BIO_GETATTR) { - if (g_handleattr_int(bp, REDBOOT_CLASS_NAME "::entry", - sc->entry[idx])) - return (1); - if (g_handleattr_int(bp, REDBOOT_CLASS_NAME "::dsize", - sc->dsize[idx])) - return (1); - } - - return (0); -} - -static void -g_redboot_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, - struct g_consumer *cp __unused, struct g_provider *pp) -{ - struct g_redboot_softc *sc; - struct g_slicer *gsp; - - gsp = gp->softc; - sc = gsp->softc; - g_slice_dumpconf(sb, indent, gp, cp, pp); - if (pp != NULL) { - if (indent == NULL) { - sbuf_printf(sb, " entry %d", sc->entry[pp->index]); - sbuf_printf(sb, " dsize %d", sc->dsize[pp->index]); - } else { - sbuf_printf(sb, "%s%d\n", indent, - sc->entry[pp->index]); - sbuf_printf(sb, "%s%d\n", indent, - sc->dsize[pp->index]); - } - } -} - -#include - -static int -nameok(const char name[16]) -{ - int i; - - /* descriptor names are null-terminated printable ascii */ - for (i = 0; i < 15; i++) - if (!isprint(name[i])) - break; - return (name[i] == '\0'); -} - -static struct fis_image_desc * -parse_fis_directory(u_char *buf, size_t bufsize, off_t offset, uint32_t offmask) -{ -#define match(a,b) (bcmp(a, b, sizeof(b)-1) == 0) - struct fis_image_desc *fd, *efd; - struct fis_image_desc *fisdir, *redbcfg; - struct fis_image_desc *head, **tail; - int i; - - fd = (struct fis_image_desc *)buf; - efd = fd + (bufsize / sizeof(struct fis_image_desc)); -#if 0 - /* - * Find the start of the FIS table. - */ - while (fd < efd && fd->name[0] != 0xff) - fd++; - if (fd == efd) - return (NULL); - if (bootverbose) - printf("RedBoot FIS table starts at 0x%jx\n", - offset + fd - (struct fis_image_desc *) buf); -#endif - /* - * Scan forward collecting entries in a list. - */ - fisdir = redbcfg = NULL; - *(tail = &head) = NULL; - for (i = 0; fd < efd; i++, fd++) { - if (fd->name[0] == 0xff) - continue; - if (match(fd->name, FISDIR_NAME)) - fisdir = fd; - else if (match(fd->name, REDBCFG_NAME)) - redbcfg = fd; - if (nameok(fd->name)) { - /* - * NB: flash address includes platform mapping; - * strip it so we have only a flash offset. - */ - fd->offset &= offmask; - if (bootverbose) - g_redboot_print(i, fd); - *tail = fd; - *(tail = &fd->next) = NULL; - } - } - if (fisdir == NULL) { - if (bootverbose) - printf("No RedBoot FIS table located at %lu\n", - (long) offset); - return (NULL); - } - if (redbcfg != NULL && - fisdir->offset + fisdir->size == redbcfg->offset) { - /* - * Merged FIS/RedBoot config directory. - */ - if (bootverbose) - printf("FIS/RedBoot merged at 0x%jx (not yet)\n", - offset + fisdir->offset); - /* XXX */ - } - return head; -#undef match -} - -static struct g_geom * -g_redboot_taste(struct g_class *mp, struct g_provider *pp, int insist) -{ - struct g_geom *gp; - struct g_consumer *cp; - struct g_redboot_softc *sc; - int error, sectorsize, i; - struct fis_image_desc *fd, *head; - uint32_t offmask; - off_t blksize; /* NB: flash block size stored as stripesize */ - u_char *buf; - off_t offset; - const char *value; - char *op; - - offset = 0; - if (resource_string_value("redboot", 0, "fisoffset", &value) == 0) { - offset = strtouq(value, &op, 0); - if (*op != '\0') { - offset = 0; - } - } - - g_trace(G_T_TOPOLOGY, "redboot_taste(%s,%s)", mp->name, pp->name); - g_topology_assert(); - if (!strcmp(pp->geom->class->name, REDBOOT_CLASS_NAME)) - return (NULL); - /* XXX only taste flash providers */ - if (strncmp(pp->name, "cfi", 3) && - strncmp(pp->name, "flash/spi", 9)) - return (NULL); - gp = g_slice_new(mp, REDBOOT_MAXSLICE, pp, &cp, &sc, sizeof(*sc), - g_redboot_start); - if (gp == NULL) - return (NULL); - /* interpose our access method */ - sc->parent_access = gp->access; - gp->access = g_redboot_access; - - sectorsize = cp->provider->sectorsize; - blksize = cp->provider->stripesize; - if (powerof2(cp->provider->mediasize)) - offmask = cp->provider->mediasize-1; - else - offmask = 0xffffffff; /* XXX */ - if (bootverbose) - printf("%s: mediasize %ld secsize %d blksize %ju offmask 0x%x\n", - __func__, (long) cp->provider->mediasize, sectorsize, - (uintmax_t)blksize, offmask); - if (sectorsize < sizeof(struct fis_image_desc) || - (sectorsize % sizeof(struct fis_image_desc))) - return (NULL); - g_topology_unlock(); - head = NULL; - if(offset == 0) - offset = cp->provider->mediasize - blksize; -again: - buf = g_read_data(cp, offset, blksize, NULL); - if (buf != NULL) - head = parse_fis_directory(buf, blksize, offset, offmask); - if (head == NULL && offset != 0) { - g_free(buf); - offset = 0; /* check the front */ - goto again; - } - g_topology_lock(); - if (head == NULL) { - g_free(buf); - return NULL; - } - /* - * Craft a slice for each entry. - */ - for (fd = head, i = 0; fd != NULL; fd = fd->next) { - if (fd->name[0] == '\0') - continue; - error = g_slice_config(gp, i, G_SLICE_CONFIG_SET, - fd->offset, fd->size, sectorsize, "redboot/%s", fd->name); - if (error) - printf("%s: g_slice_config returns %d for \"%s\"\n", - __func__, error, fd->name); - sc->entry[i] = fd->entry; - sc->dsize[i] = fd->dsize; - /* disallow writing hard-to-recover entries */ - sc->readonly[i] = (strcmp(fd->name, FISDIR_NAME) == 0) || - (strcmp(fd->name, REDBOOT_NAME) == 0); - i++; - } - g_free(buf); - g_access(cp, -1, 0, 0); - if (LIST_EMPTY(&gp->provider)) { - g_slice_spoiled(cp); - return (NULL); - } - return (gp); -} - -static struct g_class g_redboot_class = { - .name = REDBOOT_CLASS_NAME, - .version = G_VERSION, - .taste = g_redboot_taste, - .dumpconf = g_redboot_dumpconf, - .ioctl = g_redboot_ioctl, -}; -DECLARE_GEOM_CLASS(g_redboot_class, g_redboot); -MODULE_VERSION(geom_redboot, 0); From nobody Sun Jan 14 21:53:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCpv251dlz57DfP; Sun, 14 Jan 2024 21:53: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 4TCpv236mvz4Dx3; Sun, 14 Jan 2024 21:53:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bda/fu7Mzm2Y77o6ul7BOi8P/JD9ymBZHuf+mXFNb84=; b=QtyFKfAR3drzVEsWyfu4gfR8FybULrNrKQDF2OdhSSXqKj7CPOv3foANe6K1V/42Wfm8Tm BfT/qmULiZMpzCxC6Sld1uvKaQi8RTmQn6FN/P89C9IaLn+FSkwM6TNHC9jt6n58Bu0jOe Hg1JkewHGUsrcXAwy4M2ZLOTJpJLhpMRq8pQYWkdqzWJDHteXCeI0RNt1Vwv1KG1V7Pqye NBl4PQKwA/Afb6pYnV5ZDvFd1eYdHDHvbMn1GZxVxbzA3tJ3Szbyxa6+kx1l5pGxnG4VeB CsnCEa5OZNpae1eL6SiRLjzGNEvWQMa0PCfF1pq6VdSO8ud9loBv7XQmuWr23w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bda/fu7Mzm2Y77o6ul7BOi8P/JD9ymBZHuf+mXFNb84=; b=Fi+uzD1Upc1FrTsSQ8394/VVJAi1ujhmGXHITV3Zou5OmNOwVPf/nRHO88mcOK+bnJoIK3 oQU90aaNCqU02DFsIRfE+qjtFRCfNYrXd7jCazZXB4pn2tH2o0YwxUw9jlhgoKXj9humNb I0mnM/ZhCcQYGLyxF+CV5JOje3qrEKtkqqO2+7dGwli874dzA5nxCgTCRsLeTupP9skhHp SzcypCo2AN1jekJHr6UZN6LpW+qfcNQtI1tdxoi79l/ruJhwIS0na09I9tI66/0TvTPbcP idNzanUg5CFfJStpw9scOwOD7rJhinxtgm+xsFH7Sqly0dXnZmH4t5GKpd8W9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705269230; a=rsa-sha256; cv=none; b=dxgAqIoH+lFrMb2wzo12eq6AqAnFMP8ZRpBWNdVj+GtD9tSi9/s2+gw2iMdF/lpaU5yw1Z Qkjm2wuVV+PR9yvzJ1JASAdckojE0qOECqa+QWlUDS9Oyj1XiFVAOvEIhdzLbx94aedkIn JNLr0yHmOkLzOxygmoWfNG/ERsuZ9lluEBLUnJAlv5FbRLxnAOBwnL6FpDhD/NJreuJwNO InlsM88WR03Qt73VLpqaWxIF5/+ULPnhsaKcWOJ3e5J/X6TL9G0XFDTaQfJpq5NMM3yrS+ 7mbn64AwvcbbiJSryGx5cRpn9TI4dIeToLovBKpDiG7Ra/6NT6ZaGll0P8vAFA== 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 4TCpv22BgtzWMH; Sun, 14 Jan 2024 21:53: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 40ELroXW041369; Sun, 14 Jan 2024 21:53:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ELroF8041366; Sun, 14 Jan 2024 21:53:50 GMT (envelope-from git) Date: Sun, 14 Jan 2024 21:53:50 GMT Message-Id: <202401142153.40ELroF8041366@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: 6b358493a69c - stable/14 - ena: Upgrade ena-com to freebsd v2.7.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6b358493a69c7a483b767dfe2c95c4b3c194cd2a Auto-Submitted: auto-generated The branch stable/14 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=6b358493a69c7a483b767dfe2c95c4b3c194cd2a commit 6b358493a69c7a483b767dfe2c95c4b3c194cd2a Author: Arthur Kiyanovski AuthorDate: 2023-12-28 13:52:31 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 21:18:10 +0000 ena: Upgrade ena-com to freebsd v2.7.0 Merge commit '04cf7cee5ae0c6bb29eb21ce85bab7ca7386a95f' Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit adfed2d835a7f9382941896d15a487dac6fe659c) --- sys/contrib/ena-com/ena_admin_defs.h | 1412 ------------------------ sys/contrib/ena-com/ena_com.c | 431 +++++++- sys/contrib/ena-com/ena_com.h | 187 +++- sys/contrib/ena-com/ena_common_defs.h | 50 - sys/contrib/ena-com/ena_defs/ena_admin_defs.h | 146 ++- sys/contrib/ena-com/ena_defs/ena_common_defs.h | 3 +- sys/contrib/ena-com/ena_defs/ena_eth_io_defs.h | 18 +- sys/contrib/ena-com/ena_defs/ena_regs_defs.h | 13 +- sys/contrib/ena-com/ena_eth_com.c | 45 +- sys/contrib/ena-com/ena_eth_com.h | 29 +- sys/contrib/ena-com/ena_eth_io_defs.h | 960 ---------------- sys/contrib/ena-com/ena_fbsd_log.h | 74 -- sys/contrib/ena-com/ena_plat.h | 52 +- sys/contrib/ena-com/ena_regs_defs.h | 137 --- 14 files changed, 807 insertions(+), 2750 deletions(-) diff --git a/sys/contrib/ena-com/ena_admin_defs.h b/sys/contrib/ena-com/ena_admin_defs.h deleted file mode 100644 index 1d845c08256e..000000000000 --- a/sys/contrib/ena-com/ena_admin_defs.h +++ /dev/null @@ -1,1412 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright (c) 2015-2017 Amazon.com, Inc. or its affiliates. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * 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. - * * Neither the name of copyright holder nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT - * OWNER 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 _ENA_ADMIN_H_ -#define _ENA_ADMIN_H_ - -enum ena_admin_aq_opcode { - ENA_ADMIN_CREATE_SQ = 1, - - ENA_ADMIN_DESTROY_SQ = 2, - - ENA_ADMIN_CREATE_CQ = 3, - - ENA_ADMIN_DESTROY_CQ = 4, - - ENA_ADMIN_GET_FEATURE = 8, - - ENA_ADMIN_SET_FEATURE = 9, - - ENA_ADMIN_GET_STATS = 11, -}; - -enum ena_admin_aq_completion_status { - ENA_ADMIN_SUCCESS = 0, - - ENA_ADMIN_RESOURCE_ALLOCATION_FAILURE = 1, - - ENA_ADMIN_BAD_OPCODE = 2, - - ENA_ADMIN_UNSUPPORTED_OPCODE = 3, - - ENA_ADMIN_MALFORMED_REQUEST = 4, - - /* Additional status is provided in ACQ entry extended_status */ - ENA_ADMIN_ILLEGAL_PARAMETER = 5, - - ENA_ADMIN_UNKNOWN_ERROR = 6, -}; - -enum ena_admin_aq_feature_id { - ENA_ADMIN_DEVICE_ATTRIBUTES = 1, - - ENA_ADMIN_MAX_QUEUES_NUM = 2, - - ENA_ADMIN_HW_HINTS = 3, - - ENA_ADMIN_RSS_HASH_FUNCTION = 10, - - ENA_ADMIN_STATELESS_OFFLOAD_CONFIG = 11, - - ENA_ADMIN_RSS_REDIRECTION_TABLE_CONFIG = 12, - - ENA_ADMIN_MTU = 14, - - ENA_ADMIN_RSS_HASH_INPUT = 18, - - ENA_ADMIN_INTERRUPT_MODERATION = 20, - - ENA_ADMIN_AENQ_CONFIG = 26, - - ENA_ADMIN_LINK_CONFIG = 27, - - ENA_ADMIN_HOST_ATTR_CONFIG = 28, - - ENA_ADMIN_FEATURES_OPCODE_NUM = 32, -}; - -enum ena_admin_placement_policy_type { - /* descriptors and headers are in host memory */ - ENA_ADMIN_PLACEMENT_POLICY_HOST = 1, - - /* descriptors and headers are in device memory (a.k.a Low Latency - * Queue) - */ - ENA_ADMIN_PLACEMENT_POLICY_DEV = 3, -}; - -enum ena_admin_link_types { - ENA_ADMIN_LINK_SPEED_1G = 0x1, - - ENA_ADMIN_LINK_SPEED_2_HALF_G = 0x2, - - ENA_ADMIN_LINK_SPEED_5G = 0x4, - - ENA_ADMIN_LINK_SPEED_10G = 0x8, - - ENA_ADMIN_LINK_SPEED_25G = 0x10, - - ENA_ADMIN_LINK_SPEED_40G = 0x20, - - ENA_ADMIN_LINK_SPEED_50G = 0x40, - - ENA_ADMIN_LINK_SPEED_100G = 0x80, - - ENA_ADMIN_LINK_SPEED_200G = 0x100, - - ENA_ADMIN_LINK_SPEED_400G = 0x200, -}; - -enum ena_admin_completion_policy_type { - /* completion queue entry for each sq descriptor */ - ENA_ADMIN_COMPLETION_POLICY_DESC = 0, - - /* completion queue entry upon request in sq descriptor */ - ENA_ADMIN_COMPLETION_POLICY_DESC_ON_DEMAND = 1, - - /* current queue head pointer is updated in OS memory upon sq - * descriptor request - */ - ENA_ADMIN_COMPLETION_POLICY_HEAD_ON_DEMAND = 2, - - /* current queue head pointer is updated in OS memory for each sq - * descriptor - */ - ENA_ADMIN_COMPLETION_POLICY_HEAD = 3, -}; - -/* basic stats return ena_admin_basic_stats while extanded stats return a - * buffer (string format) with additional statistics per queue and per - * device id - */ -enum ena_admin_get_stats_type { - ENA_ADMIN_GET_STATS_TYPE_BASIC = 0, - - ENA_ADMIN_GET_STATS_TYPE_EXTENDED = 1, -}; - -enum ena_admin_get_stats_scope { - ENA_ADMIN_SPECIFIC_QUEUE = 0, - - ENA_ADMIN_ETH_TRAFFIC = 1, -}; - -struct ena_admin_aq_common_desc { - /* 11:0 : command_id - * 15:12 : reserved12 - */ - uint16_t command_id; - - /* as appears in ena_admin_aq_opcode */ - uint8_t opcode; - - /* 0 : phase - * 1 : ctrl_data - control buffer address valid - * 2 : ctrl_data_indirect - control buffer address - * points to list of pages with addresses of control - * buffers - * 7:3 : reserved3 - */ - uint8_t flags; -}; - -/* used in ena_admin_aq_entry. Can point directly to control data, or to a - * page list chunk. Used also at the end of indirect mode page list chunks, - * for chaining. - */ -struct ena_admin_ctrl_buff_info { - uint32_t length; - - struct ena_common_mem_addr address; -}; - -struct ena_admin_sq { - uint16_t sq_idx; - - /* 4:0 : reserved - * 7:5 : sq_direction - 0x1 - Tx; 0x2 - Rx - */ - uint8_t sq_identity; - - uint8_t reserved1; -}; - -struct ena_admin_aq_entry { - struct ena_admin_aq_common_desc aq_common_descriptor; - - union { - uint32_t inline_data_w1[3]; - - struct ena_admin_ctrl_buff_info control_buffer; - } u; - - uint32_t inline_data_w4[12]; -}; - -struct ena_admin_acq_common_desc { - /* command identifier to associate it with the aq descriptor - * 11:0 : command_id - * 15:12 : reserved12 - */ - uint16_t command; - - uint8_t status; - - /* 0 : phase - * 7:1 : reserved1 - */ - uint8_t flags; - - uint16_t extended_status; - - /* serves as a hint what AQ entries can be revoked */ - uint16_t sq_head_indx; -}; - -struct ena_admin_acq_entry { - struct ena_admin_acq_common_desc acq_common_descriptor; - - uint32_t response_specific_data[14]; -}; - -struct ena_admin_aq_create_sq_cmd { - struct ena_admin_aq_common_desc aq_common_descriptor; - - /* 4:0 : reserved0_w1 - * 7:5 : sq_direction - 0x1 - Tx, 0x2 - Rx - */ - uint8_t sq_identity; - - uint8_t reserved8_w1; - - /* 3:0 : placement_policy - Describing where the SQ - * descriptor ring and the SQ packet headers reside: - * 0x1 - descriptors and headers are in OS memory, - * 0x3 - descriptors and headers in device memory - * (a.k.a Low Latency Queue) - * 6:4 : completion_policy - Describing what policy - * to use for generation completion entry (cqe) in - * the CQ associated with this SQ: 0x0 - cqe for each - * sq descriptor, 0x1 - cqe upon request in sq - * descriptor, 0x2 - current queue head pointer is - * updated in OS memory upon sq descriptor request - * 0x3 - current queue head pointer is updated in OS - * memory for each sq descriptor - * 7 : reserved15_w1 - */ - uint8_t sq_caps_2; - - /* 0 : is_physically_contiguous - Described if the - * queue ring memory is allocated in physical - * contiguous pages or split. - * 7:1 : reserved17_w1 - */ - uint8_t sq_caps_3; - - /* associated completion queue id. This CQ must be created prior to - * SQ creation - */ - uint16_t cq_idx; - - /* submission queue depth in entries */ - uint16_t sq_depth; - - /* SQ physical base address in OS memory. This field should not be - * used for Low Latency queues. Has to be page aligned. - */ - struct ena_common_mem_addr sq_ba; - - /* specifies queue head writeback location in OS memory. Valid if - * completion_policy is set to completion_policy_head_on_demand or - * completion_policy_head. Has to be cache aligned - */ - struct ena_common_mem_addr sq_head_writeback; - - uint32_t reserved0_w7; - - uint32_t reserved0_w8; -}; - -enum ena_admin_sq_direction { - ENA_ADMIN_SQ_DIRECTION_TX = 1, - - ENA_ADMIN_SQ_DIRECTION_RX = 2, -}; - -struct ena_admin_acq_create_sq_resp_desc { - struct ena_admin_acq_common_desc acq_common_desc; - - uint16_t sq_idx; - - uint16_t reserved; - - /* queue doorbell address as an offset to PCIe MMIO REG BAR */ - uint32_t sq_doorbell_offset; - - /* low latency queue ring base address as an offset to PCIe MMIO - * LLQ_MEM BAR - */ - uint32_t llq_descriptors_offset; - - /* low latency queue headers' memory as an offset to PCIe MMIO - * LLQ_MEM BAR - */ - uint32_t llq_headers_offset; -}; - -struct ena_admin_aq_destroy_sq_cmd { - struct ena_admin_aq_common_desc aq_common_descriptor; - - struct ena_admin_sq sq; -}; - -struct ena_admin_acq_destroy_sq_resp_desc { - struct ena_admin_acq_common_desc acq_common_desc; -}; - -struct ena_admin_aq_create_cq_cmd { - struct ena_admin_aq_common_desc aq_common_descriptor; - - /* 4:0 : reserved5 - * 5 : interrupt_mode_enabled - if set, cq operates - * in interrupt mode, otherwise - polling - * 7:6 : reserved6 - */ - uint8_t cq_caps_1; - - /* 4:0 : cq_entry_size_words - size of CQ entry in - * 32-bit words, valid values: 4, 8. - * 7:5 : reserved7 - */ - uint8_t cq_caps_2; - - /* completion queue depth in # of entries. must be power of 2 */ - uint16_t cq_depth; - - /* msix vector assigned to this cq */ - uint32_t msix_vector; - - /* cq physical base address in OS memory. CQ must be physically - * contiguous - */ - struct ena_common_mem_addr cq_ba; -}; - -struct ena_admin_acq_create_cq_resp_desc { - struct ena_admin_acq_common_desc acq_common_desc; - - uint16_t cq_idx; - - /* actual cq depth in number of entries */ - uint16_t cq_actual_depth; - - uint32_t numa_node_register_offset; - - uint32_t cq_head_db_register_offset; - - uint32_t cq_interrupt_unmask_register_offset; -}; - -struct ena_admin_aq_destroy_cq_cmd { - struct ena_admin_aq_common_desc aq_common_descriptor; - - uint16_t cq_idx; - - uint16_t reserved1; -}; - -struct ena_admin_acq_destroy_cq_resp_desc { - struct ena_admin_acq_common_desc acq_common_desc; -}; - -/* ENA AQ Get Statistics command. Extended statistics are placed in control - * buffer pointed by AQ entry - */ -struct ena_admin_aq_get_stats_cmd { - struct ena_admin_aq_common_desc aq_common_descriptor; - - union { - /* command specific inline data */ - uint32_t inline_data_w1[3]; - - struct ena_admin_ctrl_buff_info control_buffer; - } u; - - /* stats type as defined in enum ena_admin_get_stats_type */ - uint8_t type; - - /* stats scope defined in enum ena_admin_get_stats_scope */ - uint8_t scope; - - uint16_t reserved3; - - /* queue id. used when scope is specific_queue */ - uint16_t queue_idx; - - /* device id, value 0xFFFF means mine. only privileged device can get - * stats of other device - */ - uint16_t device_id; -}; - -/* Basic Statistics Command. */ -struct ena_admin_basic_stats { - uint32_t tx_bytes_low; - - uint32_t tx_bytes_high; - - uint32_t tx_pkts_low; - - uint32_t tx_pkts_high; - - uint32_t rx_bytes_low; - - uint32_t rx_bytes_high; - - uint32_t rx_pkts_low; - - uint32_t rx_pkts_high; - - uint32_t rx_drops_low; - - uint32_t rx_drops_high; -}; - -struct ena_admin_acq_get_stats_resp { - struct ena_admin_acq_common_desc acq_common_desc; - - struct ena_admin_basic_stats basic_stats; -}; - -struct ena_admin_get_set_feature_common_desc { - /* 1:0 : select - 0x1 - current value; 0x3 - default - * value - * 7:3 : reserved3 - */ - uint8_t flags; - - /* as appears in ena_admin_aq_feature_id */ - uint8_t feature_id; - - uint16_t reserved16; -}; - -struct ena_admin_device_attr_feature_desc { - uint32_t impl_id; - - uint32_t device_version; - - /* bitmap of ena_admin_aq_feature_id */ - uint32_t supported_features; - - uint32_t reserved3; - - /* Indicates how many bits are used physical address access. */ - uint32_t phys_addr_width; - - /* Indicates how many bits are used virtual address access. */ - uint32_t virt_addr_width; - - /* unicast MAC address (in Network byte order) */ - uint8_t mac_addr[6]; - - uint8_t reserved7[2]; - - uint32_t max_mtu; -}; - -struct ena_admin_queue_feature_desc { - /* including LLQs */ - uint32_t max_sq_num; - - uint32_t max_sq_depth; - - uint32_t max_cq_num; - - uint32_t max_cq_depth; - - uint32_t max_llq_num; - - uint32_t max_llq_depth; - - uint32_t max_header_size; - - /* Maximum Descriptors number, including meta descriptor, allowed for - * a single Tx packet - */ - uint16_t max_packet_tx_descs; - - /* Maximum Descriptors number allowed for a single Rx packet */ - uint16_t max_packet_rx_descs; -}; - -struct ena_admin_set_feature_mtu_desc { - /* exclude L2 */ - uint32_t mtu; -}; - -struct ena_admin_set_feature_host_attr_desc { - /* host OS info base address in OS memory. host info is 4KB of - * physically contiguous - */ - struct ena_common_mem_addr os_info_ba; - - /* host debug area base address in OS memory. debug area must be - * physically contiguous - */ - struct ena_common_mem_addr debug_ba; - - /* debug area size */ - uint32_t debug_area_size; -}; - -struct ena_admin_feature_intr_moder_desc { - /* interrupt delay granularity in usec */ - uint16_t intr_delay_resolution; - - uint16_t reserved; -}; - -struct ena_admin_get_feature_link_desc { - /* Link speed in Mb */ - uint32_t speed; - - /* bit field of enum ena_admin_link types */ - uint32_t supported; - - /* 0 : autoneg - * 1 : duplex - Full Duplex - * 31:2 : reserved2 - */ - uint32_t flags; -}; - -struct ena_admin_feature_aenq_desc { - /* bitmask for AENQ groups the device can report */ - uint32_t supported_groups; - - /* bitmask for AENQ groups to report */ - uint32_t enabled_groups; -}; - -struct ena_admin_feature_offload_desc { - /* 0 : TX_L3_csum_ipv4 - * 1 : TX_L4_ipv4_csum_part - The checksum field - * should be initialized with pseudo header checksum - * 2 : TX_L4_ipv4_csum_full - * 3 : TX_L4_ipv6_csum_part - The checksum field - * should be initialized with pseudo header checksum - * 4 : TX_L4_ipv6_csum_full - * 5 : tso_ipv4 - * 6 : tso_ipv6 - * 7 : tso_ecn - */ - uint32_t tx; - - /* Receive side supported stateless offload - * 0 : RX_L3_csum_ipv4 - IPv4 checksum - * 1 : RX_L4_ipv4_csum - TCP/UDP/IPv4 checksum - * 2 : RX_L4_ipv6_csum - TCP/UDP/IPv6 checksum - * 3 : RX_hash - Hash calculation - */ - uint32_t rx_supported; - - uint32_t rx_enabled; -}; - -enum ena_admin_hash_functions { - ENA_ADMIN_TOEPLITZ = 1, - - ENA_ADMIN_CRC32 = 2, -}; - -struct ena_admin_feature_rss_flow_hash_control { - uint32_t keys_num; - - uint32_t reserved; - - uint32_t key[10]; -}; - -struct ena_admin_feature_rss_flow_hash_function { - /* 7:0 : funcs - bitmask of ena_admin_hash_functions */ - uint32_t supported_func; - - /* 7:0 : selected_func - bitmask of - * ena_admin_hash_functions - */ - uint32_t selected_func; - - /* initial value */ - uint32_t init_val; -}; - -/* RSS flow hash protocols */ -enum ena_admin_flow_hash_proto { - ENA_ADMIN_RSS_TCP4 = 0, - - ENA_ADMIN_RSS_UDP4 = 1, - - ENA_ADMIN_RSS_TCP6 = 2, - - ENA_ADMIN_RSS_UDP6 = 3, - - ENA_ADMIN_RSS_IP4 = 4, - - ENA_ADMIN_RSS_IP6 = 5, - - ENA_ADMIN_RSS_IP4_FRAG = 6, - - ENA_ADMIN_RSS_NOT_IP = 7, - - /* TCPv6 with extension header */ - ENA_ADMIN_RSS_TCP6_EX = 8, - - /* IPv6 with extension header */ - ENA_ADMIN_RSS_IP6_EX = 9, - - ENA_ADMIN_RSS_PROTO_NUM = 16, -}; - -/* RSS flow hash fields */ -enum ena_admin_flow_hash_fields { - /* Ethernet Dest Addr */ - ENA_ADMIN_RSS_L2_DA = BIT(0), - - /* Ethernet Src Addr */ - ENA_ADMIN_RSS_L2_SA = BIT(1), - - /* ipv4/6 Dest Addr */ - ENA_ADMIN_RSS_L3_DA = BIT(2), - - /* ipv4/6 Src Addr */ - ENA_ADMIN_RSS_L3_SA = BIT(3), - - /* tcp/udp Dest Port */ - ENA_ADMIN_RSS_L4_DP = BIT(4), - - /* tcp/udp Src Port */ - ENA_ADMIN_RSS_L4_SP = BIT(5), -}; - -struct ena_admin_proto_input { - /* flow hash fields (bitwise according to ena_admin_flow_hash_fields) */ - uint16_t fields; - - uint16_t reserved2; -}; - -struct ena_admin_feature_rss_hash_control { - struct ena_admin_proto_input supported_fields[ENA_ADMIN_RSS_PROTO_NUM]; - - struct ena_admin_proto_input selected_fields[ENA_ADMIN_RSS_PROTO_NUM]; - - struct ena_admin_proto_input reserved2[ENA_ADMIN_RSS_PROTO_NUM]; - - struct ena_admin_proto_input reserved3[ENA_ADMIN_RSS_PROTO_NUM]; -}; - -struct ena_admin_feature_rss_flow_hash_input { - /* supported hash input sorting - * 1 : L3_sort - support swap L3 addresses if DA is - * smaller than SA - * 2 : L4_sort - support swap L4 ports if DP smaller - * SP - */ - uint16_t supported_input_sort; - - /* enabled hash input sorting - * 1 : enable_L3_sort - enable swap L3 addresses if - * DA smaller than SA - * 2 : enable_L4_sort - enable swap L4 ports if DP - * smaller than SP - */ - uint16_t enabled_input_sort; -}; - -enum ena_admin_os_type { - ENA_ADMIN_OS_LINUX = 1, - - ENA_ADMIN_OS_WIN = 2, - - ENA_ADMIN_OS_DPDK = 3, - - ENA_ADMIN_OS_FREEBSD = 4, - - ENA_ADMIN_OS_IPXE = 5, -}; - -struct ena_admin_host_info { - /* defined in enum ena_admin_os_type */ - uint32_t os_type; - - /* os distribution string format */ - uint8_t os_dist_str[128]; - - /* OS distribution numeric format */ - uint32_t os_dist; - - /* kernel version string format */ - uint8_t kernel_ver_str[32]; - - /* Kernel version numeric format */ - uint32_t kernel_ver; - - /* 7:0 : major - * 15:8 : minor - * 23:16 : sub_minor - */ - uint32_t driver_version; - - /* features bitmap */ - uint32_t supported_network_features[4]; -}; - -struct ena_admin_rss_ind_table_entry { - uint16_t cq_idx; - - uint16_t reserved; -}; - -struct ena_admin_feature_rss_ind_table { - /* min supported table size (2^min_size) */ - uint16_t min_size; - - /* max supported table size (2^max_size) */ - uint16_t max_size; - - /* table size (2^size) */ - uint16_t size; - - uint16_t reserved; - - /* index of the inline entry. 0xFFFFFFFF means invalid */ - uint32_t inline_index; - - /* used for updating single entry, ignored when setting the entire - * table through the control buffer. - */ - struct ena_admin_rss_ind_table_entry inline_entry; -}; - -/* When hint value is 0, driver should use it's own predefined value */ -struct ena_admin_ena_hw_hints { - /* value in ms */ - uint16_t mmio_read_timeout; - - /* value in ms */ - uint16_t driver_watchdog_timeout; - - /* Per packet tx completion timeout. value in ms */ - uint16_t missing_tx_completion_timeout; - - uint16_t missed_tx_completion_count_threshold_to_reset; - - /* value in ms */ - uint16_t admin_completion_tx_timeout; - - uint16_t netdev_wd_timeout; - - uint16_t max_tx_sgl_size; - - uint16_t max_rx_sgl_size; - - uint16_t reserved[8]; -}; - -struct ena_admin_get_feat_cmd { - struct ena_admin_aq_common_desc aq_common_descriptor; - - struct ena_admin_ctrl_buff_info control_buffer; - - struct ena_admin_get_set_feature_common_desc feat_common; - - uint32_t raw[11]; -}; - -struct ena_admin_get_feat_resp { - struct ena_admin_acq_common_desc acq_common_desc; - - union { - uint32_t raw[14]; - - struct ena_admin_device_attr_feature_desc dev_attr; - - struct ena_admin_queue_feature_desc max_queue; - - struct ena_admin_feature_aenq_desc aenq; - - struct ena_admin_get_feature_link_desc link; - - struct ena_admin_feature_offload_desc offload; - - struct ena_admin_feature_rss_flow_hash_function flow_hash_func; - - struct ena_admin_feature_rss_flow_hash_input flow_hash_input; - - struct ena_admin_feature_rss_ind_table ind_table; - - struct ena_admin_feature_intr_moder_desc intr_moderation; - - struct ena_admin_ena_hw_hints hw_hints; - } u; -}; - -struct ena_admin_set_feat_cmd { - struct ena_admin_aq_common_desc aq_common_descriptor; - - struct ena_admin_ctrl_buff_info control_buffer; - - struct ena_admin_get_set_feature_common_desc feat_common; - - union { - uint32_t raw[11]; - - /* mtu size */ - struct ena_admin_set_feature_mtu_desc mtu; - - /* host attributes */ - struct ena_admin_set_feature_host_attr_desc host_attr; - - /* AENQ configuration */ - struct ena_admin_feature_aenq_desc aenq; - - /* rss flow hash function */ - struct ena_admin_feature_rss_flow_hash_function flow_hash_func; - - /* rss flow hash input */ - struct ena_admin_feature_rss_flow_hash_input flow_hash_input; - - /* rss indirection table */ - struct ena_admin_feature_rss_ind_table ind_table; - } u; -}; - -struct ena_admin_set_feat_resp { - struct ena_admin_acq_common_desc acq_common_desc; - - union { - uint32_t raw[14]; - } u; -}; - -struct ena_admin_aenq_common_desc { - uint16_t group; - - uint16_t syndrom; - - /* 0 : phase */ - uint8_t flags; - - uint8_t reserved1[3]; - - uint32_t timestamp_low; - - uint32_t timestamp_high; -}; - -/* asynchronous event notification groups */ -enum ena_admin_aenq_group { - ENA_ADMIN_LINK_CHANGE = 0, - - ENA_ADMIN_FATAL_ERROR = 1, - - ENA_ADMIN_WARNING = 2, - - ENA_ADMIN_NOTIFICATION = 3, - - ENA_ADMIN_KEEP_ALIVE = 4, - - ENA_ADMIN_AENQ_GROUPS_NUM = 5, -}; - -enum ena_admin_aenq_notification_syndrom { - ENA_ADMIN_SUSPEND = 0, - - ENA_ADMIN_RESUME = 1, - - ENA_ADMIN_UPDATE_HINTS = 2, -}; - -struct ena_admin_aenq_entry { - struct ena_admin_aenq_common_desc aenq_common_desc; - - /* command specific inline data */ - uint32_t inline_data_w4[12]; -}; - -struct ena_admin_aenq_link_change_desc { - struct ena_admin_aenq_common_desc aenq_common_desc; - - /* 0 : link_status */ - uint32_t flags; -}; - -struct ena_admin_aenq_keep_alive_desc { - struct ena_admin_aenq_common_desc aenq_common_desc; - - uint32_t rx_drops_low; - - uint32_t rx_drops_high; -}; - -struct ena_admin_ena_mmio_req_read_less_resp { - uint16_t req_id; - - uint16_t reg_off; - - /* value is valid when poll is cleared */ - uint32_t reg_val; -}; - -/* aq_common_desc */ -#define ENA_ADMIN_AQ_COMMON_DESC_COMMAND_ID_MASK GENMASK(11, 0) -#define ENA_ADMIN_AQ_COMMON_DESC_PHASE_MASK BIT(0) -#define ENA_ADMIN_AQ_COMMON_DESC_CTRL_DATA_SHIFT 1 -#define ENA_ADMIN_AQ_COMMON_DESC_CTRL_DATA_MASK BIT(1) -#define ENA_ADMIN_AQ_COMMON_DESC_CTRL_DATA_INDIRECT_SHIFT 2 -#define ENA_ADMIN_AQ_COMMON_DESC_CTRL_DATA_INDIRECT_MASK BIT(2) - -/* sq */ -#define ENA_ADMIN_SQ_SQ_DIRECTION_SHIFT 5 -#define ENA_ADMIN_SQ_SQ_DIRECTION_MASK GENMASK(7, 5) - -/* acq_common_desc */ *** 3278 LINES SKIPPED *** From nobody Sun Jan 14 21:53:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCpv367tfz57Dsw; Sun, 14 Jan 2024 21:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TCpv34FBJz4Dlc; Sun, 14 Jan 2024 21:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uE6I/1GlAeHy3L7kGbHnv/Y217mObnwbx0PiRKYGHLI=; b=pf9oVQofo98EYfyR6OnzfGNiJMon/l7Phgh955tpiLC5iqWgkfxhTgzLQoVtpigi4zjBdX qF44lW8B/7zFuarUv43ZrM5Z3ZLNyO7FZKJrJPjzUqMiMsImBmJffJpkFbQ1j3yu6kw0bj UX+0gHSTfua/t3/ZG8Tla+UBtPTGTeZ2FDh+VPkKnn06Z7fLSyFU9AP0weo9XHZ41sF3Js FuZGLHLSorpauy3CNkOMhd6l5E6RA10uEVTo4fta04IfnMLbOW60kT/O0WzCFtMhzzCvHS WB5Qmxh9Hbt/nlblm9Jm+26lCgt+AeiPrplVVmPt+fZo9EdpvrCq+X0JaEPe1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uE6I/1GlAeHy3L7kGbHnv/Y217mObnwbx0PiRKYGHLI=; b=ITmth6asiBGcTT6HRirgqwOqx2TxR2aXLJ+4y3R0RJu4J9hPtMB0HAjB0LYyZ4BHmEAP5Y kUzm+k/jY8pvZ7Z5iMjEXHki2thqf+PUPVIO1+CgVOnUlBATCKWdGlD2Ghc4TdCole2bFz WwRtXkXh+Bxoo1YYdFzaWqAKVT8s2tiMC8LYQUULbStOmbx2PWZR4hRKWfzBdgSSBPEfEN qJKoiqmuASsDJBt9aO7WPzj1j4p66RYOFM1BvPIVVsq++klU0AX1pTM5xAy8EGaAn3VkzY bTtqIqngO6hDVpei99WN8WO8ioXu1jW3oMyjhLNg+fhX8YRV3oRfqJKR1ysUsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705269231; a=rsa-sha256; cv=none; b=qmhQS3DqRju2dwQ4dpVANLXoMt1HK+l3EAJU10AuY6wqiebLoLF8urwVmbCE3u/AjqmUO6 wVyCenXvXx4WHuB+22FZBSTWI9jyGMCXCanRf08G1870JSo/ziIl/G6NRwq/T7K8qxrvHA Lq/O7lk+i232BC71IpQFbB6L0FOpLFuFYdSdcMVSYqiVxrxq6YgVgs0fg0CcIKhACBNWBC cNkzIXIDpnaoGRga2gBewF5k+wIDgyVgh+/JlEfOOXrsjdCklczgnGpr0Rrm90oFNpRuZ5 a92uwl0K6+38kPMNLykyPDpd8+ajj7qTNx8ZZ54WyLkHhZrzQJnCY/DXY/3heA== 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 4TCpv33JG3zWDL; Sun, 14 Jan 2024 21:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40ELrpVu041417; Sun, 14 Jan 2024 21:53:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ELrp4J041414; Sun, 14 Jan 2024 21:53:51 GMT (envelope-from git) Date: Sun, 14 Jan 2024 21:53:51 GMT Message-Id: <202401142153.40ELrp4J041414@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: 71cd348d2454 - stable/14 - ena: Add sysctl support for spreading IRQs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 71cd348d245404b17c08c69b2aa8be3190e68732 Auto-Submitted: auto-generated The branch stable/14 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=71cd348d245404b17c08c69b2aa8be3190e68732 commit 71cd348d245404b17c08c69b2aa8be3190e68732 Author: Osama Abboud AuthorDate: 2023-10-30 11:27:03 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 21:18:10 +0000 ena: Add sysctl support for spreading IRQs This commit allows spreading IO IRQs over different CPUs through sysctl. Two sysctl nodes are introduced: 1- base_cpu: servers as the first CPU to which the first IO IRQ will be bound. 2- cpu_stride: sets the distance between every two CPUs to which every two consecutive IO IRQs are bound. For example for doing the following IO IRQs / CPU binding: IRQ idx | CPU ---------------- 1 | 0 2 | 2 3 | 4 4 | 6 Run the following commands: sysctl dev.ena..irq_affinity.base_cpu=0 sysctl dev.ena..irq_affinity.cpu_stride=2 Also introduced rss_enabled field, which is intended to replace '#ifdef RSS' in multiple places, in order to prevent code duplication. We want to bind interrupts to CPUs in case of rss set OR in case the newly defined sysctl paremeter is set. This requires to remove a couple of '#ifdef RSS' as well in the structs, since we'll be using the relevant parameters in the CPU binding code. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit f9e1d9471077109c19fd7d6dc9c1d35432efdede) --- sys/dev/ena/ena.c | 126 ++++++++++++++++++++++++++++++++++------ sys/dev/ena/ena.h | 14 +++-- sys/dev/ena/ena_sysctl.c | 145 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 263 insertions(+), 22 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 455386a4f152..067c8a6f3a08 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -1237,6 +1237,84 @@ ena_update_io_rings(struct ena_adapter *adapter, uint32_t num) ena_init_io_rings(adapter); } +int +ena_update_base_cpu(struct ena_adapter *adapter, int new_num) +{ + int old_num; + int rc = 0; + bool dev_was_up; + + dev_was_up = ENA_FLAG_ISSET(ENA_FLAG_DEV_UP, adapter); + old_num = adapter->irq_cpu_base; + + ena_down(adapter); + + adapter->irq_cpu_base = new_num; + + if (dev_was_up) { + rc = ena_up(adapter); + if (unlikely(rc != 0)) { + ena_log(adapter->pdev, ERR, + "Failed to configure device %d IRQ base CPU. " + "Reverting to previous value: %d\n", + new_num, old_num); + + adapter->irq_cpu_base = old_num; + + rc = ena_up(adapter); + if (unlikely(rc != 0)) { + ena_log(adapter->pdev, ERR, + "Failed to revert to previous setup." + "Triggering device reset.\n"); + ENA_FLAG_SET_ATOMIC( + ENA_FLAG_DEV_UP_BEFORE_RESET, adapter); + ena_trigger_reset(adapter, + ENA_REGS_RESET_OS_TRIGGER); + } + } + } + return (rc); +} + +int +ena_update_cpu_stride(struct ena_adapter *adapter, uint32_t new_num) +{ + uint32_t old_num; + int rc = 0; + bool dev_was_up; + + dev_was_up = ENA_FLAG_ISSET(ENA_FLAG_DEV_UP, adapter); + old_num = adapter->irq_cpu_stride; + + ena_down(adapter); + + adapter->irq_cpu_stride = new_num; + + if (dev_was_up) { + rc = ena_up(adapter); + if (unlikely(rc != 0)) { + ena_log(adapter->pdev, ERR, + "Failed to configure device %d IRQ CPU stride. " + "Reverting to previous value: %d\n", + new_num, old_num); + + adapter->irq_cpu_stride = old_num; + + rc = ena_up(adapter); + if (unlikely(rc != 0)) { + ena_log(adapter->pdev, ERR, + "Failed to revert to previous setup." + "Triggering device reset.\n"); + ENA_FLAG_SET_ATOMIC( + ENA_FLAG_DEV_UP_BEFORE_RESET, adapter); + ena_trigger_reset(adapter, + ENA_REGS_RESET_OS_TRIGGER); + } + } + } + return (rc); +} + /* Caller should sanitize new_num */ int ena_update_io_queue_nb(struct ena_adapter *adapter, uint32_t new_num) @@ -1683,6 +1761,13 @@ ena_setup_io_intr(struct ena_adapter *adapter) ena_log(adapter->pdev, DBG, "ena_setup_io_intr vector: %d\n", adapter->msix_entries[irq_idx].vector); + if (adapter->irq_cpu_base > ENA_BASE_CPU_UNSPECIFIED) { + adapter->que[i].cpu = adapter->irq_tbl[irq_idx].cpu = + (unsigned)(adapter->irq_cpu_base + + i * adapter->irq_cpu_stride) % (unsigned)mp_ncpus; + CPU_SETOF(adapter->que[i].cpu, &adapter->que[i].cpu_mask); + } + #ifdef RSS adapter->que[i].cpu = adapter->irq_tbl[irq_idx].cpu = rss_getcpu(cur_bind); @@ -1790,20 +1875,19 @@ ena_request_io_irq(struct ena_adapter *adapter) } irq->requested = true; -#ifdef RSS - rc = bus_bind_intr(adapter->pdev, irq->res, irq->cpu); - if (unlikely(rc != 0)) { - ena_log(pdev, ERR, - "failed to bind interrupt handler for irq %ju to cpu %d: %d\n", - rman_get_start(irq->res), irq->cpu, rc); - goto err; - } + if (adapter->rss_enabled || adapter->irq_cpu_base > ENA_BASE_CPU_UNSPECIFIED) { + rc = bus_bind_intr(adapter->pdev, irq->res, irq->cpu); + if (unlikely(rc != 0)) { + ena_log(pdev, ERR, + "failed to bind interrupt handler for irq %ju to cpu %d: %d\n", + rman_get_start(irq->res), irq->cpu, rc); + goto err; + } - ena_log(pdev, INFO, "queue %d - cpu %d\n", - i - ENA_IO_IRQ_FIRST_IDX, irq->cpu); -#endif + ena_log(pdev, INFO, "queue %d - cpu %d\n", + i - ENA_IO_IRQ_FIRST_IDX, irq->cpu); + } } - return (rc); err: @@ -1814,13 +1898,14 @@ err: /* Once we entered err: section and irq->requested is true we free both intr and resources */ - if (irq->requested) + if (irq->requested) { rcc = bus_teardown_intr(adapter->pdev, irq->res, irq->cookie); - if (unlikely(rcc != 0)) - ena_log(pdev, ERR, - "could not release irq: %d, error: %d\n", - irq->vector, rcc); + if (unlikely(rcc != 0)) + ena_log(pdev, ERR, + "could not release irq: %d, error: %d\n", + irq->vector, rcc); + } /* If we entered err: section without irq->requested set we know it was bus_alloc_resource_any() that needs cleanup, provided @@ -3523,6 +3608,13 @@ ena_attach(device_t pdev) adapter->missing_tx_max_queues = ENA_DEFAULT_TX_MONITORED_QUEUES; adapter->missing_tx_threshold = ENA_DEFAULT_TX_CMP_THRESHOLD; + adapter->irq_cpu_base = ENA_BASE_CPU_UNSPECIFIED; + adapter->irq_cpu_stride = 0; + +#ifdef RSS + adapter->rss_enabled = 1; +#endif + if (version_printed++ == 0) ena_log(pdev, INFO, "%s\n", ena_version); diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index b6e791d6ff6a..3687e9b2522e 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -69,6 +69,7 @@ #define ENA_DEFAULT_RING_SIZE 1024 #define ENA_MIN_RING_SIZE 256 +#define ENA_BASE_CPU_UNSPECIFIED -1 /* * Refill Rx queue when number of required descriptors is above * QUEUE_SIZE / ENA_RX_REFILL_THRESH_DIVIDER or ENA_RX_REFILL_THRESH_PACKET @@ -201,9 +202,7 @@ struct ena_irq { void *cookie; unsigned int vector; bool requested; -#ifdef RSS int cpu; -#endif char name[ENA_IRQNAME_SIZE]; }; @@ -216,10 +215,8 @@ struct ena_que { struct taskqueue *cleanup_tq; uint32_t id; -#ifdef RSS int cpu; cpuset_t cpu_mask; -#endif int domain; struct sysctl_oid *oid; }; @@ -448,6 +445,12 @@ struct ena_adapter { ena_state_t flags; + /* IRQ CPU affinity */ + int irq_cpu_base; + uint32_t irq_cpu_stride; + + uint8_t rss_enabled; + /* Queue will represent one TX and one RX ring */ struct ena_que que[ENA_MAX_NUM_IO_QUEUES] __aligned(CACHE_LINE_SIZE); @@ -524,7 +527,8 @@ int ena_update_buf_ring_size(struct ena_adapter *adapter, int ena_update_queue_size(struct ena_adapter *adapter, uint32_t new_tx_size, uint32_t new_rx_size); int ena_update_io_queue_nb(struct ena_adapter *adapter, uint32_t new_num); - +int ena_update_base_cpu(struct ena_adapter *adapter, int new_num); +int ena_update_cpu_stride(struct ena_adapter *adapter, uint32_t new_num); static inline int ena_mbuf_count(struct mbuf *mbuf) { diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index d450fcf48d15..6668f9924787 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -38,6 +38,7 @@ static void ena_sysctl_add_wd(struct ena_adapter *); static void ena_sysctl_add_stats(struct ena_adapter *); static void ena_sysctl_add_eni_metrics(struct ena_adapter *); static void ena_sysctl_add_tuneables(struct ena_adapter *); +static void ena_sysctl_add_irq_affinity(struct ena_adapter *); /* Kernel option RSS prevents manipulation of key hash and indirection table. */ #ifndef RSS static void ena_sysctl_add_rss(struct ena_adapter *); @@ -45,6 +46,8 @@ static void ena_sysctl_add_rss(struct ena_adapter *); static int ena_sysctl_buf_ring_size(SYSCTL_HANDLER_ARGS); static int ena_sysctl_rx_queue_size(SYSCTL_HANDLER_ARGS); static int ena_sysctl_io_queues_nb(SYSCTL_HANDLER_ARGS); +static int ena_sysctl_irq_base_cpu(SYSCTL_HANDLER_ARGS); +static int ena_sysctl_irq_cpu_stride(SYSCTL_HANDLER_ARGS); static int ena_sysctl_eni_metrics_interval(SYSCTL_HANDLER_ARGS); #ifndef RSS static int ena_sysctl_rss_key(SYSCTL_HANDLER_ARGS); @@ -102,6 +105,7 @@ ena_sysctl_add_nodes(struct ena_adapter *adapter) ena_sysctl_add_stats(adapter); ena_sysctl_add_eni_metrics(adapter); ena_sysctl_add_tuneables(adapter); + ena_sysctl_add_irq_affinity(adapter); #ifndef RSS ena_sysctl_add_rss(adapter); #endif @@ -448,6 +452,36 @@ ena_sysctl_add_rss(struct ena_adapter *adapter) } #endif /* RSS */ +static void +ena_sysctl_add_irq_affinity(struct ena_adapter *adapter) +{ + device_t dev; + + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; + struct sysctl_oid_list *child; + + dev = adapter->pdev; + + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); + child = SYSCTL_CHILDREN(tree); + + tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "irq_affinity", + CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, "Decide base CPU and stride for irqs affinity."); + child = SYSCTL_CHILDREN(tree); + + /* Add base cpu leaf */ + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "base_cpu", + CTLTYPE_S32 | CTLFLAG_RW | CTLFLAG_MPSAFE, adapter, 0, + ena_sysctl_irq_base_cpu, "I", "Base cpu index for setting irq affinity."); + + /* Add cpu stride leaf */ + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "cpu_stride", + CTLTYPE_S32 | CTLFLAG_RW | CTLFLAG_MPSAFE, adapter, 0, + ena_sysctl_irq_cpu_stride, "I", "Distance between irqs when setting affinity."); +} + /* * ena_sysctl_update_queue_node_nb - Register/unregister sysctl queue nodes. @@ -707,6 +741,117 @@ unlock: return (0); } +static int +ena_sysctl_irq_base_cpu(SYSCTL_HANDLER_ARGS) +{ + struct ena_adapter *adapter = arg1; + int irq_base_cpu = 0; + int error; + + ENA_LOCK_LOCK(); + if (unlikely(!ENA_FLAG_ISSET(ENA_FLAG_DEVICE_RUNNING, adapter))) { + error = ENODEV; + goto unlock; + } + + error = sysctl_wire_old_buffer(req, sizeof(irq_base_cpu)); + if (error == 0) { + irq_base_cpu = adapter->irq_cpu_base; + error = sysctl_handle_int(oidp, &irq_base_cpu, 0, req); + } + if (error != 0 || req->newptr == NULL) + goto unlock; + + if (irq_base_cpu <= ENA_BASE_CPU_UNSPECIFIED) { + ena_log(adapter->pdev, ERR, + "Requested base CPU is less than zero.\n"); + error = EINVAL; + goto unlock; + } + + if (irq_base_cpu > mp_ncpus) { + ena_log(adapter->pdev, INFO, + "Requested base CPU is larger than the number of available CPUs. \n"); + error = EINVAL; + goto unlock; + + } + + if (irq_base_cpu == adapter->irq_cpu_base) { + ena_log(adapter->pdev, INFO, + "Requested IRQ base CPU is equal to current value " + "(%d)\n", + adapter->irq_cpu_base); + goto unlock; + } + + ena_log(adapter->pdev, INFO, + "Requested new IRQ base CPU: %d, current value: %d\n", + irq_base_cpu, adapter->irq_cpu_base); + + error = ena_update_base_cpu(adapter, irq_base_cpu); + +unlock: + ENA_LOCK_UNLOCK(); + + return (error); +} + +static int +ena_sysctl_irq_cpu_stride(SYSCTL_HANDLER_ARGS) +{ + struct ena_adapter *adapter = arg1; + int32_t irq_cpu_stride = 0; + int error; + + ENA_LOCK_LOCK(); + if (unlikely(!ENA_FLAG_ISSET(ENA_FLAG_DEVICE_RUNNING, adapter))) { + error = ENODEV; + goto unlock; + } + + error = sysctl_wire_old_buffer(req, sizeof(irq_cpu_stride)); + if (error == 0) { + irq_cpu_stride = adapter->irq_cpu_stride; + error = sysctl_handle_int(oidp, &irq_cpu_stride, 0, req); + } + if (error != 0 || req->newptr == NULL) + goto unlock; + + if (irq_cpu_stride < 0) { + ena_log(adapter->pdev, ERR, + "Requested IRQ stride is less than zero.\n"); + error = EINVAL; + goto unlock; + } + + if (irq_cpu_stride > mp_ncpus) { + ena_log(adapter->pdev, INFO, + "Warning: Requested IRQ stride is larger than the number of available CPUs.\n"); + } + + if (irq_cpu_stride == adapter->irq_cpu_stride) { + ena_log(adapter->pdev, INFO, + "Requested IRQ CPU stride is equal to current value " + "(%u)\n", + adapter->irq_cpu_stride); + goto unlock; + } + + ena_log(adapter->pdev, INFO, + "Requested new IRQ CPU stride: %u, current value: %u\n", + irq_cpu_stride, adapter->irq_cpu_stride); + + error = ena_update_cpu_stride(adapter, irq_cpu_stride); + if (error != 0) + goto unlock; + +unlock: + ENA_LOCK_UNLOCK(); + + return (error); +} + #ifndef RSS /* * Change the Receive Side Scaling hash key. From nobody Sun Jan 14 21:53:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCpv50jH7z57DjB; Sun, 14 Jan 2024 21:53: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 4TCpv45J1Bz4F06; Sun, 14 Jan 2024 21:53:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zyo6QBQt6gI7qZWxrqXqHHT8OgIDEQYvRWS1LANbZA8=; b=QB/HZUZZnfpgt/th0/yvDF3ycemBq+6TpzPqUs3TU3HEFLUX2xpUCsAW5UjEwXGtTbhkVr qZuGSwNNa+lgMOnHLfkkmtE107XeNigGL9pWV7GlLShlnbqMIUCs6PFpxbURQGv8oRr+WQ ElEb4Y6cMLsrqTH3BJU9QDYdoWInQAALGrPTs1AavNdeWt+jr8RK/H6Q08c2LWEkQF0S0y souozTMFD+gNI0HMp90bwbKT1npmAhBcvKwYkyJBmKRjPDXIE7+qpBTuCWBLmU7+kljyrT h3ZEn1CyeGy1n3Fue0s5Iy/0PlLvLORGgLD8zFVZlfHIvcFaoBdWIwqxGIimug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zyo6QBQt6gI7qZWxrqXqHHT8OgIDEQYvRWS1LANbZA8=; b=ORpQCOTJBAD7mT4gbjFcMVBkuK4UZmhLIqsGzQmKAxHv11TOmk4i0MW/bVZ9pGX3SAZfqn 9TRGcVLaiKxwFGkT9qidkphlGOEmubm1eQt3LWpOsF7bu8K/B0sifRCHilpLm+fjSdxURK qE0E0LXBViG12dzBOe9/oh+mNd4lhNFsThgsvLP20Q766jX8/dxc0lGPWyvry88nR4Byzh f/VXwUpKZqSDdZzUdrkiH5ZJKZC7jXV84c2ddxIJ7BoSjEQdoFZFz6v6RZvrf5kliaI8Vx KUSWuX3iAP4I76/xdLTVcwMhU9fC+kig+L+bTL1uOq9oFGRTTCt4P7g1SaE9Xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705269232; a=rsa-sha256; cv=none; b=HfcVJEpL4YM+OIqjdlIMd8HthRI5ZobNczOgxw5oLLURYIKTQhCBPsD8J/ITjBk2GDSypd FvZ5Dve0m1WP6tQKnP9XaqdIeXRiSHtJclxu5eAz3LNwkVV3DEcYzsHjveOm/ibN2EFldz iCH0lPic0h8utj9EOXVv5N5Ec/dHoOuARZyvCR0NtJSITDvWZhGdLTirPgK1omPNgHGaQt P39rkTQXJZ4BmqHQLacl2Vn4jV+NSNBs03G6wHTCcV5jzJnRc+uKOU/o/PFLlCzedLCRCe vefd+IhsSUGwe6FGl2Vx08XPBvfRJSCeJf3C9+aCPmX1DqeQjdPDTMCPWdBCkA== 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 4TCpv44L22zWvh; Sun, 14 Jan 2024 21:53:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40ELrqBU041487; Sun, 14 Jan 2024 21:53:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ELrqsU041484; Sun, 14 Jan 2024 21:53:52 GMT (envelope-from git) Date: Sun, 14 Jan 2024 21:53:52 GMT Message-Id: <202401142153.40ELrqsU041484@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: 4526ef3d05dd - stable/14 - ena: Change measurement unit of time since last tx cleanup to ms List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4526ef3d05dd469f5f61d22783a861d9db5c56fd Auto-Submitted: auto-generated The branch stable/14 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=4526ef3d05dd469f5f61d22783a861d9db5c56fd commit 4526ef3d05dd469f5f61d22783a861d9db5c56fd Author: Arthur Kiyanovski AuthorDate: 2023-06-14 10:12:16 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 21:18:10 +0000 ena: Change measurement unit of time since last tx cleanup to ms This commit: 1. Sets the time since last cleanup to milliseconds. 2. Fixes incorrect indentations. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 9272e45c04c0d4fcb5d767e962783f3ab192f64e) --- sys/dev/ena/ena.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 067c8a6f3a08..ba1712093a7a 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -3102,13 +3102,13 @@ check_missing_comp_in_tx_queue(struct ena_adapter *adapter, if (unlikely(time_offset > adapter->missing_tx_timeout)) { if (tx_buf->print_once) { - time_since_last_cleanup = TICKS_2_USEC(ticks - + time_since_last_cleanup = TICKS_2_MSEC(ticks - tx_ring->tx_last_cleanup_ticks); missing_tx_comp_to = sbttoms( adapter->missing_tx_timeout); ena_log(pdev, WARN, "Found a Tx that wasn't completed on time, qid %d, index %d. " - "%d usecs have passed since last cleanup. Missing Tx timeout value %d msecs.\n", + "%d msecs have passed since last cleanup. Missing Tx timeout value %d msecs.\n", tx_ring->qid, i, time_since_last_cleanup, missing_tx_comp_to); } From nobody Sun Jan 14 21:53:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCpv60DFLz57Dt4; Sun, 14 Jan 2024 21:53: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 4TCpv563TPz4F4v; Sun, 14 Jan 2024 21:53:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YaeOgKoi1JIDCpbcHruqLZWPIbbC/EecgOk4zu2tDpQ=; b=dXc/7u1qAw2bSv+PtNDdW0/eZ307qMkAKjAzM57SHyDykymVGSCVPt2mAsaN+4g7qcxTN+ a60vOAAaXeTa75PGrCI+MUmWq+Kr0TFm3YInSxlIIYX94uMDi352m7JyA6SrOD6ZYsx+rM J9sN8sxk09gX5e0J6lyBCjujPTQ2sCrmizWeWD7SPa7clCrvxWxJfKAH4mHUhRpBgER9KP iKdJ8/20zbLW1FCAbjw5TrMn2ok+Qp/bFvcevGnGGvQnLEiEJOTFic3vjX7jHvzHTM9sp2 /PYjHX8Si4HUu/rRHdXMNkdtMOK1XWnolxQ7O4spiQeSL6aqu6OCIz3s3mfy7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YaeOgKoi1JIDCpbcHruqLZWPIbbC/EecgOk4zu2tDpQ=; b=U2qZ7v6OoPMUjsSwWGLcuv0MPbyVkFqxeEN5NPpXVI8aTut9xwAdMyi0eHgh8i56zeXwEV 6FZcch/FRJ+EhhMB69FikU/kRmyEGp2b6ixoot0xjUS1om+PO8ZvqfMjrIP6/yE6yJk33x UH3lyMT/nyVpA0JD52Uu2xExfAdggB70Z3ucvJPjMSFb35IoLQCzE0VKv3nAf2Odf8o+Na xW691bWsqyak8knHIiuKBFmRpEtgOHjY4osEif96AT6Is7LAIKsOE38rCrY1IcbAHNN/Fq B5B2CaHmtdXs2+O7IV7apzI7YybFEjk2cikyzZYenNrQDOc2w8L60LXwGv4O2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705269233; a=rsa-sha256; cv=none; b=YIL31hddhp5m3kWQGutDbPyW+Ynb8MEeUbs/HigS6Ql7TfOO9VFDV6f5VTJ677oYroMuP3 oxHusmZALB8oZUrtrQ+d3IzlNZBMRD/v2ZIoA01m4rVFueN3lVBF9dx8cWPkIXHXrz4Sz7 EHtblZNhTSAgmrdpx5ryCjMd2SB5/RZlvDO/XT8izowW0tMm6HhyaEHGeN8lrcZov0fL+y XGY0rqV2KBMJXY9Db9obNczzR7MA5xGatMnxFTD0fOgEb2/JcWdbpSU52BHjDyIj0OhD3S SKK2zb1HrNcBiREn0btXufG1KIQ0trOO3yKrqN4k8MJn8nPgI8Cd3ubf1i0p7A== 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 4TCpv558w4zWDM; Sun, 14 Jan 2024 21:53: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 40ELrrJ0041532; Sun, 14 Jan 2024 21:53:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ELrrAo041529; Sun, 14 Jan 2024 21:53:53 GMT (envelope-from git) Date: Sun, 14 Jan 2024 21:53:53 GMT Message-Id: <202401142153.40ELrrAo041529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: 00916b6d298e - stable/14 - ena: Update ena_com_update_intr_reg API usage List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 00916b6d298e61140c6730b9f21e0d0fb0886f04 Auto-Submitted: auto-generated The branch stable/14 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=00916b6d298e61140c6730b9f21e0d0fb0886f04 commit 00916b6d298e61140c6730b9f21e0d0fb0886f04 Author: Osama Abboud AuthorDate: 2023-09-11 08:38:39 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 21:18:10 +0000 ena: Update ena_com_update_intr_reg API usage This commit fixes the usage of this function to be compatible with the new API introduced by ena-com update to v2.7.0 Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 72e34ebdd08854dc896f267b0461e241c4040241) --- sys/dev/ena/ena.c | 2 +- sys/dev/ena/ena_datapath.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index ba1712093a7a..aca2e0b43041 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -2026,7 +2026,7 @@ ena_unmask_all_io_irqs(struct ena_adapter *adapter) for (i = 0; i < adapter->num_io_queues; i++) { ena_qid = ENA_IO_TXQ_IDX(i); io_cq = &adapter->ena_dev->io_cq_queues[ena_qid]; - ena_com_update_intr_reg(&intr_reg, 0, 0, true); + ena_com_update_intr_reg(&intr_reg, 0, 0, true, false); tx_ring = &adapter->tx_ring[i]; counter_u64_add(tx_ring->tx_stats.unmask_interrupt_num, 1); ena_com_unmask_intr(io_cq, &intr_reg); diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index 3e0a8aa2bd74..e5c424139d3c 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -104,7 +104,7 @@ ena_cleanup(void *arg, int pending) /* Signal that work is done and unmask interrupt */ ena_com_update_intr_reg(&intr_reg, ENA_RX_IRQ_INTERVAL, - ENA_TX_IRQ_INTERVAL, true); + ENA_TX_IRQ_INTERVAL, true, false); counter_u64_add(tx_ring->tx_stats.unmask_interrupt_num, 1); ena_com_unmask_intr(io_cq, &intr_reg); } From nobody Sun Jan 14 21:53:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCpv716j1z57Dnc; Sun, 14 Jan 2024 21:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TCpv66nhkz4F0Z; Sun, 14 Jan 2024 21:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L1T+eZ7twPGmFhdN6EZTbgGofGv8XK5ZKlvUXtH64F0=; b=JMWYswqzoydTkrvql9UMD2G9CFXIYv5xVliMYivOQO90TEiQyxyBVD3/9X2Uy9tu3Arh0E etv1omL11aA6vpjl/155OHgBI7QfJxysZlE8LG7pqALc6q65VDU7JBEnpqSixFdTSLsaHp fVyjzEvmP6obCm8FZPZwpGfFen8R9B39stduPn0HV/oROVx8Gmsan7kEObkKgJvZegEOl8 UsEAqq2P5IN3S6pu/V37GICX2C9McCCZN4DMqdgy0oMwpuX6j+FROTHx24IqrX2p72DfP9 rRmNwULtObYKrASXN/Ir+3ktzUkHZ1qFzi9I2kC8xOcU2GGq8IwcIJdo6wwiwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L1T+eZ7twPGmFhdN6EZTbgGofGv8XK5ZKlvUXtH64F0=; b=Va7Dy6DkxYJhh4mxC+dCLcF30R0+nSdxnPsI3Um3Df6ksBmYPtYYjzONDdkKlN5nfFaW97 0tWqgcYUz47nvDTzuiwn5cO3oVRCJzQr/dboJbrKoyXvmv5u1oYJXGb3+9Rch3X8Pnj+r/ X9GRwEH+VguCQnetQnKXsrwTWyvFWnG4rqWORNoBEy4JPSFuMDp6eanEcZU18/mLij/DK6 mF5BOiC5ao+p2I9RqS2Tk/piXtDmSQxGMws3Mz+so4FZIBC1sX6yQ/vuBAowEa6ic+tEzN fC4ArW6HVhGLvh7RSxiNsprkiYI8x/AEbK41nkS4R/jdqzV8LLQBmwen1agWbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705269235; a=rsa-sha256; cv=none; b=UCFbUYnPJHznTDtz9hKo2GO1Ov51QFa1HFvFszDevX5PCfZkne2O5HZ8Y9ng/xK/3xsdUb ZeXlHI0ZX5rFl/D2ugda0/Srn9+/+6yyKii6XSIG8MHqdEN1ZO7eDrpYurwZR7+C7MoP8l rbOqqNbAlUAsKU2Yj2q7Qp/OYl4qxnX0U/cV8se/54tlBYtWmrYVAGRtRhG4oSjdVXS62v 9IXjIirJdycGxlJf/t/h34593oGzoKBA6AmP0XSwrn4rkJaIIOnfQEt1+kGClAmaBulbOF Se3FfSZan4rJzlOApN/5rT4QddXhZZdBLE4bzNpS7SQojOgozAR/FexIulhY1Q== 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 4TCpv65kG1zVyq; Sun, 14 Jan 2024 21:53: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 40ELrs5d041580; Sun, 14 Jan 2024 21:53:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ELrsLN041577; Sun, 14 Jan 2024 21:53:54 GMT (envelope-from git) Date: Sun, 14 Jan 2024 21:53:54 GMT Message-Id: <202401142153.40ELrsLN041577@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: 9d773b0d5f56 - stable/14 - ena: Remove CQ tail pointer update API List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9d773b0d5f56268ce7fc2fc60d8d551963de8f36 Auto-Submitted: auto-generated The branch stable/14 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=9d773b0d5f56268ce7fc2fc60d8d551963de8f36 commit 9d773b0d5f56268ce7fc2fc60d8d551963de8f36 Author: Osama Abboud AuthorDate: 2023-09-11 08:43:08 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 21:18:10 +0000 ena: Remove CQ tail pointer update API This commit removes the usage of this API from the freebsd driver since the relevant functionality is not supported by the device. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 2835752e075f2fa3edcb596df8306c570ec4cae6) --- sys/dev/ena/ena_datapath.c | 3 --- sys/dev/ena/ena_netmap.c | 1 - 2 files changed, 4 deletions(-) diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index e5c424139d3c..177f33ea8ef3 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -298,7 +298,6 @@ ena_tx_cleanup(struct ena_ring *tx_ring) ena_com_comp_ack( &adapter->ena_dev->io_sq_queues[ena_qid], total_done); - ena_com_update_dev_comp_head(io_cq); total_done = 0; } } while (likely(--budget)); @@ -313,7 +312,6 @@ ena_tx_cleanup(struct ena_ring *tx_ring) tx_ring->next_to_clean = next_to_clean; ena_com_comp_ack(&adapter->ena_dev->io_sq_queues[ena_qid], total_done); - ena_com_update_dev_comp_head(io_cq); } /* @@ -690,7 +688,6 @@ ena_rx_cleanup(struct ena_ring *rx_ring) ENA_RX_REFILL_THRESH_PACKET); if (refill_required > refill_threshold) { - ena_com_update_dev_comp_head(rx_ring->ena_com_io_cq); ena_refill_rx_bufs(rx_ring, refill_required); } diff --git a/sys/dev/ena/ena_netmap.c b/sys/dev/ena/ena_netmap.c index 9ef0619829f4..a8d7cad05ab5 100644 --- a/sys/dev/ena/ena_netmap.c +++ b/sys/dev/ena/ena_netmap.c @@ -814,7 +814,6 @@ ena_netmap_tx_cleanup(struct ena_netmap_ctx *ctx) /* acknowledge completion of sent packets */ ctx->ring->next_to_clean = ctx->nt; ena_com_comp_ack(ctx->ring->ena_com_io_sq, total_tx_descs); - ena_com_update_dev_comp_head(ctx->ring->ena_com_io_cq); } } From nobody Sun Jan 14 21:53:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCpv82flVz57DfX; Sun, 14 Jan 2024 21:53: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 4TCpv80hf3z4FDQ; Sun, 14 Jan 2024 21:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4brFaU/krOQvGQkKbFoQWOP7NjwOOzTrJUfm3igKNh8=; b=VDHm0srux9wY7eU5d50/YHWzeXiMQyNxASeG7chd0svynyMaUTVNP32MdMKPyKduCIcwOq I9ygiajmen2QFNdDdz4h72wAO/dsNKIOqzHauONLFJKmT5td4RL7yl4PcCCLAAcpB5kMcP GARKVg35k47Bn4ViH0od24fJkNEBpGnjNCWU0W+gKMWqOR4kXdshT/MpyoHYUqxDOBAPrv dIp/GE3cvkcO0OAxmauuB8BpRMkRE4pltGkdaEsDWv4RtUVMGTw2F9QK7I5rDNIfs7jQtD zw0mMysmivWeAU8v9TL208/SpdCS4Pz85dzqB9yFjauUpH2FVJCXMe++ImXqAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4brFaU/krOQvGQkKbFoQWOP7NjwOOzTrJUfm3igKNh8=; b=uiswNvy9hI/nj7eztr6sUdz5ZJ4TQLm5D1ITEsPclwbOytISOA5Xt65Cm7vxQTOW06EdZ2 wlQpOk0EXZyj2/3iZEq6/mX0zfWVKaaDWdvfVGdFokJKajQiU2rsRTmBELhiS1oNe507wp Y0fCB9+jj2LiQNLXkmw3zld0q8jOY7Q8fj4HzR2hgwZr26w6OFe/PFxBkI1P1eop8SiKEb ivSoDgnZbuq5mlsc2pex2uv18Cb2YMZdebiPgH/qd9F89Kfui9zpovdsqpVIJ6AhZ+kmiv soxalwZ+tNG8Ihrukr/5rRb/FemblaAnhpKJH9BCprYnkJDMmEpoWAPhDKD+tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705269236; a=rsa-sha256; cv=none; b=U4uOFbaszRHsuWodN3inKft65VipX456hHPJkJCa8QbzpPaiAMXlTU2SQWgC4pcgHDLyu7 KG0nBFxiGNiGlNDv+nC7z5yc/gvhZy5mm1irmNMK3Sc02QzzcZFi6OEneFz7BIqBthF9Ri qZxYXq3zRQ+nk5R5DWPQI5nTsttj2GID8UKoBM269fkascQ0DVrj/6RlZ/F/KYRoo18b5v a3rh9J0FaHn2TWwliXCBQMu1LDzxobTVy5St5K4VIVMD2O8iJWY90m7zl47hiiO5NnuAgG YtNfawW3bUI8SdBaYa6b2WGKaB5eQnDgeC5/77ghQSUVfec2zhI5QoXgHErWSw== 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 4TCpv76vRRzWvl; Sun, 14 Jan 2024 21:53: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 40ELrtm0041634; Sun, 14 Jan 2024 21:53:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ELrtAh041631; Sun, 14 Jan 2024 21:53:55 GMT (envelope-from git) Date: Sun, 14 Jan 2024 21:53:55 GMT Message-Id: <202401142153.40ELrtAh041631@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: 79c446badb02 - stable/14 - ena: Introduce shared sample interval for all stats List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 79c446badb02c3458f061925d6ccbe073af3dcd9 Auto-Submitted: auto-generated The branch stable/14 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=79c446badb02c3458f061925d6ccbe073af3dcd9 commit 79c446badb02c3458f061925d6ccbe073af3dcd9 Author: Osama Abboud AuthorDate: 2023-09-12 10:13:48 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 21:18:11 +0000 ena: Introduce shared sample interval for all stats Rename sample_interval node to stats_sample_interval and move it up in the sysctl tree to make it clear that it's relevant for all the stats and not only ENI metrics (Currently, sample interval node is found under eni_metrics node). Path to node: dev.ena..stats_sample_interval Once this parameter is set it will set the sample interval for all the stats node including SRD/customer metrics. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 5b925280d9a54eaefd85827bf6e84049aea8fa98) --- sys/dev/ena/ena.c | 12 ++++++------ sys/dev/ena/ena.h | 4 ++-- sys/dev/ena/ena_sysctl.c | 42 +++++++++++++++++++++--------------------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index aca2e0b43041..f6357a43ea34 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -3321,19 +3321,19 @@ ena_timer_service(void *data) check_for_empty_rx_ring(adapter); /* - * User controller update of the ENI metrics. + * User controller update of the ENA metrics. * If the delay was set to 0, then the stats shouldn't be updated at * all. - * Otherwise, wait 'eni_metrics_sample_interval' seconds, before + * Otherwise, wait 'metrics_sample_interval' seconds, before * updating stats. * As timer service is executed every second, it's enough to increment * appropriate counter each time the timer service is executed. */ - if ((adapter->eni_metrics_sample_interval != 0) && - (++adapter->eni_metrics_sample_interval_cnt >= - adapter->eni_metrics_sample_interval)) { + if ((adapter->metrics_sample_interval != 0) && + (++adapter->metrics_sample_interval_cnt >= + adapter->metrics_sample_interval)) { taskqueue_enqueue(adapter->metrics_tq, &adapter->metrics_task); - adapter->eni_metrics_sample_interval_cnt = 0; + adapter->metrics_sample_interval_cnt = 0; } diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 3687e9b2522e..fd0c6e3692c7 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -480,8 +480,8 @@ struct ena_adapter { uint32_t missing_tx_threshold; bool disable_meta_caching; - uint16_t eni_metrics_sample_interval; - uint16_t eni_metrics_sample_interval_cnt; + uint16_t metrics_sample_interval; + uint16_t metrics_sample_interval_cnt; /* Statistics */ struct ena_stats_dev dev_stats; diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index 6668f9924787..bcf684e9e0ca 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -48,14 +48,14 @@ static int ena_sysctl_rx_queue_size(SYSCTL_HANDLER_ARGS); static int ena_sysctl_io_queues_nb(SYSCTL_HANDLER_ARGS); static int ena_sysctl_irq_base_cpu(SYSCTL_HANDLER_ARGS); static int ena_sysctl_irq_cpu_stride(SYSCTL_HANDLER_ARGS); -static int ena_sysctl_eni_metrics_interval(SYSCTL_HANDLER_ARGS); +static int ena_sysctl_metrics_interval(SYSCTL_HANDLER_ARGS); #ifndef RSS static int ena_sysctl_rss_key(SYSCTL_HANDLER_ARGS); static int ena_sysctl_rss_indir_table(SYSCTL_HANDLER_ARGS); #endif -/* Limit max ENI sample rate to be an hour. */ -#define ENI_METRICS_MAX_SAMPLE_INTERVAL 3600 +/* Limit max ENA sample rate to be an hour. */ +#define ENA_METRICS_MAX_SAMPLE_INTERVAL 3600 #define ENA_HASH_KEY_MSG_SIZE (ENA_HASH_KEY_SIZE * 2 + 1) static SYSCTL_NODE(_hw, OID_AUTO, ena, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, @@ -368,16 +368,6 @@ ena_sysctl_add_eni_metrics(struct ena_adapter *adapter) SYSCTL_ADD_U64(ctx, eni_list, OID_AUTO, "linklocal_allowance_exceeded", CTLFLAG_RD, &eni_metrics->linklocal_allowance_exceeded, 0, "Linklocal packet rate allowance exceeded"); - - /* - * Tuneable, which determines how often ENI metrics will be read. - * 0 means it's turned off. Maximum allowed value is limited by: - * ENI_METRICS_MAX_SAMPLE_INTERVAL. - */ - SYSCTL_ADD_PROC(ctx, eni_list, OID_AUTO, "sample_interval", - CTLTYPE_U16 | CTLFLAG_RW | CTLFLAG_MPSAFE, adapter, 0, - ena_sysctl_eni_metrics_interval, "SU", - "Interval in seconds for updating ENI emetrics. 0 turns off the update."); } static void @@ -411,6 +401,16 @@ ena_sysctl_add_tuneables(struct ena_adapter *adapter) SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "io_queues_nb", CTLTYPE_U32 | CTLFLAG_RW | CTLFLAG_MPSAFE, adapter, 0, ena_sysctl_io_queues_nb, "I", "Number of IO queues."); + + /* + * Tuneable, which determines how often ENA metrics will be read. + * 0 means it's turned off. Maximum allowed value is limited by: + * ENA_METRICS_MAX_SAMPLE_INTERVAL. + */ + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "stats_sample_interval", + CTLTYPE_U16 | CTLFLAG_RW | CTLFLAG_MPSAFE, adapter, 0, + ena_sysctl_metrics_interval, "SU", + "Interval in seconds for updating Netword interface metrics. 0 turns off the update."); } /* Kernel option RSS prevents manipulation of key hash and indirection table. */ @@ -694,7 +694,7 @@ unlock: } static int -ena_sysctl_eni_metrics_interval(SYSCTL_HANDLER_ARGS) +ena_sysctl_metrics_interval(SYSCTL_HANDLER_ARGS) { struct ena_adapter *adapter = arg1; uint16_t interval; @@ -708,32 +708,32 @@ ena_sysctl_eni_metrics_interval(SYSCTL_HANDLER_ARGS) error = sysctl_wire_old_buffer(req, sizeof(interval)); if (error == 0) { - interval = adapter->eni_metrics_sample_interval; + interval = adapter->metrics_sample_interval; error = sysctl_handle_16(oidp, &interval, 0, req); } if (error != 0 || req->newptr == NULL) goto unlock; - if (interval > ENI_METRICS_MAX_SAMPLE_INTERVAL) { + if (interval > ENA_METRICS_MAX_SAMPLE_INTERVAL) { ena_log(adapter->pdev, ERR, - "ENI metrics update interval is out of range - maximum allowed value: %d seconds\n", - ENI_METRICS_MAX_SAMPLE_INTERVAL); + "ENA metrics update interval is out of range - maximum allowed value: %d seconds\n", + ENA_METRICS_MAX_SAMPLE_INTERVAL); error = EINVAL; goto unlock; } if (interval == 0) { ena_log(adapter->pdev, INFO, - "ENI metrics update is now turned off\n"); + "ENA metrics update is now turned off\n"); bzero(&adapter->eni_metrics, sizeof(adapter->eni_metrics)); } else { ena_log(adapter->pdev, INFO, - "ENI metrics update interval is set to: %" PRIu16 + "ENA metrics update interval is set to: %" PRIu16 " seconds\n", interval); } - adapter->eni_metrics_sample_interval = interval; + adapter->metrics_sample_interval = interval; unlock: ENA_LOCK_UNLOCK(); From nobody Sun Jan 14 21:53:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCpv93kKYz57DwG; Sun, 14 Jan 2024 21:53: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 4TCpv91l5Vz4FDk; Sun, 14 Jan 2024 21:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r57zkA2bAZxF4IrVS4oAXseCq+hEKPO2h/fhdduEp9M=; b=BfWqSxseVSbnYP1fi/YgxU5kNTYhqEuH0F1Jup3FiuxR4hgzwNicJGP04hlFYpGDDkhvC5 hsKDPstqYmYOah2TlGP4P2jMU3Dz9E5DS40tWEGfLmSY58Yf3Uj4HXozXUMv/BWxKN3RbT MccS42Ja5qkBzto45aWgRfdkde0f0WpNVy4Pmn075qsVFcLsox0tOrUb2TNik3MJAFEqF2 AvXej1hnZixl6zvaqqgg4tRuKspRYWkgJS3ycYlBK5SPzc3QQ5vFi1nSNbVyA+fKYDEi1X ZzN5z98VDTzunzmhHMPnKHSvNP1nb2j4h44vyQMHkOu3TJ8v7SoEYVOaiYuESg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r57zkA2bAZxF4IrVS4oAXseCq+hEKPO2h/fhdduEp9M=; b=XXjL76Qci7s8Iu+DDGCIy0Ms3MVmgeFYa+3UzNUCHhp/B4MwlmgOiyfyISn52HwTQjVPgB 2S31J3+bMLL5J7MCf7MI8g27+V1bqDWtZFoGGnRf7FdPZK7aNVFvV31kAw5XBnuK3RRaOu TX6ybLscnAf9fj5O0/MLPNcBXr+mqd/+uFQBCkiW12OAdmuKACyKyiRwc4rUjBTsGvH8mV 572PGk32eP5NFRj8MkCnMYopvRe6pu3TxUrUdwQHC/TFYzly3NepOvt1t4mX3qV3QMfqjK 8NFcApmq8CGowTI9ZN1POfh0Rn+dAVNEyOHps2sTPfy4A1Z/wMeGIXGKszz0mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705269237; a=rsa-sha256; cv=none; b=MOc6ZxjGiudFUILLPztX/QKBv/guDaNWQZR0CCfzkltR4ca+Olk6WocgclTiK3g9PGo6Fl O3HukX2krmvXTaU+EgAYl2Ryj1dtlvftiMJAACXjfERVhojmmMARHGZiSJHoE7sueQnIiT d2Y0vn4shWSJUUGEYGrMMAioEcU77URYM/OwMhrHfDXwogFVZoakxGBp06ZfZByG8i4Jwt ZhVmJpOGIXePwzsnqg3oH6Bs80Xn0OM1AgVTyrCoRmtGLzCxywnVsgG7HY6RkJZNvkms9e dpq0IEmzaeZUhtu7dXjv209DlzncenKFx8h3DaaA7KVAEZJ1YgCj2pF5txqvzw== 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 4TCpv90rXGzWPS; Sun, 14 Jan 2024 21:53: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 40ELrvbo041679; Sun, 14 Jan 2024 21:53:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ELrvvL041676; Sun, 14 Jan 2024 21:53:57 GMT (envelope-from git) Date: Sun, 14 Jan 2024 21:53:57 GMT Message-Id: <202401142153.40ELrvvL041676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: 538f9ea8fa58 - stable/14 - ena: Support customer metric with sysctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 538f9ea8fa58654c6d56000e6893cd8255506c9f Auto-Submitted: auto-generated The branch stable/14 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=538f9ea8fa58654c6d56000e6893cd8255506c9f commit 538f9ea8fa58654c6d56000e6893cd8255506c9f Author: Osama Abboud AuthorDate: 2023-09-12 10:17:03 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 21:18:11 +0000 ena: Support customer metric with sysctl This commit adds sysctl support for customer metrics. Different customer metrics can be found in the following sysctl node: sysctl dev.ena..customer_metrics Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit f97993ad7b9c9e4787bd198d11f348c271af513e) --- sys/dev/ena/ena.c | 49 +++++++++++++++++++++++++-- sys/dev/ena/ena.h | 1 + sys/dev/ena/ena_sysctl.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++- sys/dev/ena/ena_sysctl.h | 1 + 4 files changed, 135 insertions(+), 3 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index f6357a43ea34..64c3d79f00db 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -166,6 +166,7 @@ static int ena_enable_msix_and_set_admin_interrupts(struct ena_adapter *); static void ena_update_on_link_change(void *, struct ena_admin_aenq_entry *); static void unimplemented_aenq_handler(void *, struct ena_admin_aenq_entry *); static int ena_copy_eni_metrics(struct ena_adapter *); +static int ena_copy_customer_metrics(struct ena_adapter *); static void ena_timer_service(void *); static char ena_version[] = ENA_DEVICE_NAME ENA_DRV_MODULE_NAME @@ -3305,6 +3306,25 @@ ena_copy_eni_metrics(struct ena_adapter *adapter) return (rc); } +static int +ena_copy_customer_metrics(struct ena_adapter *adapter) +{ + struct ena_com_dev *dev; + u32 supported_metrics_count; + int rc, len; + + dev = adapter->ena_dev; + + supported_metrics_count = ena_com_get_customer_metric_count(dev); + len = supported_metrics_count * sizeof(u64); + + /* Fill the data buffer */ + rc = ena_com_get_customer_metrics(adapter->ena_dev, + (char *)(adapter->customer_metrics_array), len); + + return (rc); +} + static void ena_timer_service(void *data) { @@ -3542,7 +3562,12 @@ ena_metrics_task(void *arg, int pending) struct ena_adapter *adapter = (struct ena_adapter *)arg; ENA_LOCK_LOCK(); - (void)ena_copy_eni_metrics(adapter); + + if (ena_com_get_cap(adapter->ena_dev, ENA_ADMIN_CUSTOMER_METRICS)) + (void)ena_copy_customer_metrics(adapter); + else if (ena_com_get_cap(adapter->ena_dev, ENA_ADMIN_ENI_STATS)) + (void)ena_copy_eni_metrics(adapter); + ENA_LOCK_UNLOCK(); } @@ -3756,6 +3781,18 @@ ena_attach(device_t pdev) /* initialize rings basic information */ ena_init_io_rings(adapter); + rc = ena_com_allocate_customer_metrics_buffer(ena_dev); + if (rc) { + ena_log(pdev, ERR, "Failed to allocate customer metrics buffer.\n"); + goto err_msix_free; + } + + rc = ena_sysctl_allocate_customer_metrics_buffer(adapter); + if (unlikely(rc)){ + ena_log(pdev, ERR, "Failed to allocate sysctl customer metrics buffer.\n"); + goto err_metrics_buffer_destroy; + } + /* Initialize statistics */ ena_alloc_counters((counter_u64_t *)&adapter->dev_stats, sizeof(struct ena_stats_dev)); @@ -3767,7 +3804,7 @@ ena_attach(device_t pdev) rc = ena_setup_ifnet(pdev, adapter, &get_feat_ctx); if (unlikely(rc != 0)) { ena_log(pdev, ERR, "Error with network interface setup\n"); - goto err_msix_free; + goto err_customer_metrics_alloc; } /* Initialize reset task queue */ @@ -3805,6 +3842,10 @@ ena_attach(device_t pdev) err_detach: ether_ifdetach(adapter->ifp); #endif /* DEV_NETMAP */ +err_customer_metrics_alloc: + free(adapter->customer_metrics_array, M_DEVBUF); +err_metrics_buffer_destroy: + ena_com_delete_customer_metrics_buffer(ena_dev); err_msix_free: ena_free_stats(adapter); ena_com_dev_reset(adapter->ena_dev, ENA_REGS_RESET_INIT_ERR); @@ -3903,6 +3944,10 @@ ena_detach(device_t pdev) ena_com_delete_host_info(ena_dev); + free(adapter->customer_metrics_array, M_DEVBUF); + + ena_com_delete_customer_metrics_buffer(ena_dev); + if_free(adapter->ifp); free(ena_dev->bus, M_DEVBUF); diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index fd0c6e3692c7..18988d719a18 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -487,6 +487,7 @@ struct ena_adapter { struct ena_stats_dev dev_stats; struct ena_hw_stats hw_stats; struct ena_admin_eni_stats eni_metrics; + uint64_t *customer_metrics_array; enum ena_regs_reset_reason_types reset_reason; }; diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index bcf684e9e0ca..edae5c3c23fa 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -37,6 +37,7 @@ static void ena_sysctl_add_wd(struct ena_adapter *); static void ena_sysctl_add_stats(struct ena_adapter *); static void ena_sysctl_add_eni_metrics(struct ena_adapter *); +static void ena_sysctl_add_customer_metrics(struct ena_adapter *); static void ena_sysctl_add_tuneables(struct ena_adapter *); static void ena_sysctl_add_irq_affinity(struct ena_adapter *); /* Kernel option RSS prevents manipulation of key hash and indirection table. */ @@ -58,6 +59,39 @@ static int ena_sysctl_rss_indir_table(SYSCTL_HANDLER_ARGS); #define ENA_METRICS_MAX_SAMPLE_INTERVAL 3600 #define ENA_HASH_KEY_MSG_SIZE (ENA_HASH_KEY_SIZE * 2 + 1) +#define SYSCTL_GSTRING_LEN 64 + +#define ENA_METRIC_ENI_ENTRY(stat, desc) { \ + .name = #stat, \ + .description = #desc, \ +} + +struct ena_hw_metrics { + char name[SYSCTL_GSTRING_LEN]; + char description[SYSCTL_GSTRING_LEN]; +}; + +static const struct ena_hw_metrics ena_hw_stats_strings[] = { + ENA_METRIC_ENI_ENTRY( + bw_in_allowance_exceeded, Inbound BW allowance exceeded), + ENA_METRIC_ENI_ENTRY( + bw_out_allowance_exceeded, Outbound BW allowance exceeded), + ENA_METRIC_ENI_ENTRY( + pps_allowance_exceeded, PPS allowance exceeded), + ENA_METRIC_ENI_ENTRY( + conntrack_allowance_exceeded, Connection tracking allowance exceeded), + ENA_METRIC_ENI_ENTRY( + linklocal_allowance_exceeded, Linklocal packet rate allowance), + ENA_METRIC_ENI_ENTRY( + conntrack_allowance_available, Number of available conntracks), +}; + +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) +#endif + +#define ENA_CUSTOMER_METRICS_ARRAY_SIZE ARRAY_SIZE(ena_hw_stats_strings) + static SYSCTL_NODE(_hw, OID_AUTO, ena, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "ENA driver parameters"); @@ -98,12 +132,29 @@ SYSCTL_BOOL(_hw_ena, OID_AUTO, force_large_llq_header, CTLFLAG_RDTUN, int ena_rss_table_size = ENA_RX_RSS_TABLE_SIZE; +int ena_sysctl_allocate_customer_metrics_buffer(struct ena_adapter *adapter) +{ + int rc = 0; + + adapter->customer_metrics_array = malloc((sizeof(u64) * ENA_CUSTOMER_METRICS_ARRAY_SIZE), + M_DEVBUF, M_NOWAIT | M_ZERO); + if (unlikely(adapter->customer_metrics_array == NULL)) + rc = ENOMEM; + + return rc; +} void ena_sysctl_add_nodes(struct ena_adapter *adapter) { + struct ena_com_dev *dev = adapter->ena_dev; + + if (ena_com_get_cap(dev, ENA_ADMIN_CUSTOMER_METRICS)) + ena_sysctl_add_customer_metrics(adapter); + else if (ena_com_get_cap(dev, ENA_ADMIN_ENI_STATS)) + ena_sysctl_add_eni_metrics(adapter); + ena_sysctl_add_wd(adapter); ena_sysctl_add_stats(adapter); - ena_sysctl_add_eni_metrics(adapter); ena_sysctl_add_tuneables(adapter); ena_sysctl_add_irq_affinity(adapter); #ifndef RSS @@ -328,6 +379,40 @@ ena_sysctl_add_stats(struct ena_adapter *adapter) &admin_stats->no_completion, 0, "Commands not completed"); } +static void +ena_sysctl_add_customer_metrics(struct ena_adapter *adapter) +{ + device_t dev; + struct ena_com_dev *ena_dev; + + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; + struct sysctl_oid_list *child; + + struct sysctl_oid *customer_metric; + struct sysctl_oid_list *customer_list; + + int i; + + dev = adapter->pdev; + ena_dev = adapter->ena_dev; + + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); + child = SYSCTL_CHILDREN(tree); + customer_metric = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "customer_metrics", + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "ENA's customer metrics"); + customer_list = SYSCTL_CHILDREN(customer_metric); + + for (i = 0; i < ENA_CUSTOMER_METRICS_ARRAY_SIZE; i++) { + if (ena_com_get_customer_metric_support(ena_dev, i)) { + SYSCTL_ADD_U64(ctx, customer_list, OID_AUTO, ena_hw_stats_strings[i].name, + CTLFLAG_RD, &adapter->customer_metrics_array[i], 0, + ena_hw_stats_strings[i].description); + } + } +} + static void ena_sysctl_add_eni_metrics(struct ena_adapter *adapter) { diff --git a/sys/dev/ena/ena_sysctl.h b/sys/dev/ena/ena_sysctl.h index 188c3a61a3d2..e9b4bfaae1cb 100644 --- a/sys/dev/ena/ena_sysctl.h +++ b/sys/dev/ena/ena_sysctl.h @@ -40,6 +40,7 @@ void ena_sysctl_add_nodes(struct ena_adapter *adapter); void ena_sysctl_update_queue_node_nb(struct ena_adapter *adapter, int old, int new); +int ena_sysctl_allocate_customer_metrics_buffer(struct ena_adapter *adapter); extern int ena_enable_9k_mbufs; #define ena_mbuf_sz (ena_enable_9k_mbufs ? MJUM9BYTES : MJUMPAGESIZE) From nobody Sun Jan 14 21:53:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCpvB5YNYz57DcY; Sun, 14 Jan 2024 21:53: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 4TCpvB3L7Rz4FBd; Sun, 14 Jan 2024 21:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LyXlbv82k7XDAwL/v1WhLUVZuh0ueNTrDIj5rhi1qBQ=; b=lRPCXSoEtcVfM3aRcZTSuTKCQFtSx+plVHKfbJANspv2NJuIVlsDgZXTquRcw/7OecvZIz +t7O119pE5/YXYkTZnV6rtLMHZjIH+37wmYviKGkccm+xcUIYqUFwPEpCWROKSHMaqZC5W q/dg8j2oqBQq+0xtDXFvHYWMWT6iy6ZJaa5F/BJz9NgFNMIyIXVEe893rd+mHJ2pPJGzYB rW7WH9IPHAH9vuUn3f/zOc4TQvNM7gyilxFEkU0q3Zh9RhEodLWj2O7ce3CYqgtD7ejSc4 jQxmNX1cI8MKk/nRuG6nd0RpS+Nk7DVPSd2Qklnz9LMoVcwCwMtg3p6yPEaadQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LyXlbv82k7XDAwL/v1WhLUVZuh0ueNTrDIj5rhi1qBQ=; b=SzqeiO347gQo/OEXdY7vSFuno+vlX150Qh/LaDYY96WEQZEdjuDukrOaxddZrJixHMJwFU /+nUE00PWOnq2M5d+TL5PkkBvb5o+48gmRrZxy0PeIQi2hkYh2T9XosOvv2cCB8Y9duha8 cdltWPVnNkpw54kXaVQvoHAOdK4OoH8TfzkZc2UteG4UsGq0Hx8C2ixLF0PF+JZ2XXBmcX GBfZRa1PeAT6Kde+XzUE1/UAK2jgMhaeF5AoAh73Arc2vgrq9LeSlRfy28Xi6hrpRzcUdc FCd67s9LSHK5vt5fJa9dkRD+qaIsFgZtmAoFmmchPwk5muODgX28Du1vrmMrWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705269238; a=rsa-sha256; cv=none; b=UZuxCpAQVP9Bi2gWlisYExpjstvTLtP2rfhN66yJwEFbICoPc0qazfgG0CIaUh88HyLLoU PZ87ZpfchRw0cvbHA94ZlqqfIUI13O22V1g7APxyDT6Cb5Zbdhy2BFRywI/LiiTAICS1ds yqKivIvopiX6bKTmCPe37Uq00jWeqVfTPMv32fj5xuBXpCXC6N/AG1WHMD2c0ySuj9ynQc csj1RkOXdUZrDoRz8FQen19+MyMt+J/1ozuDebTxTfXX+DrCHioJWYptqklfo2jwuaWTL/ DtiNwFqribQkiayh+rmSVcxbw1OjQK9zy5qA2Tf06O3Ql71n8NTAv2jCVMFlQQ== 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 4TCpvB1s8LzWMJ; Sun, 14 Jan 2024 21:53: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 40ELrweZ041730; Sun, 14 Jan 2024 21:53:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ELrwij041727; Sun, 14 Jan 2024 21:53:58 GMT (envelope-from git) Date: Sun, 14 Jan 2024 21:53:58 GMT Message-Id: <202401142153.40ELrwij041727@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: 9757b07f1800 - stable/14 - ena: Support srd metrics with sysctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9757b07f18000ef57b0c95ef5b4af1f4cc492af5 Auto-Submitted: auto-generated The branch stable/14 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=9757b07f18000ef57b0c95ef5b4af1f4cc492af5 commit 9757b07f18000ef57b0c95ef5b4af1f4cc492af5 Author: Osama Abboud AuthorDate: 2023-09-12 11:17:45 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 21:18:11 +0000 ena: Support srd metrics with sysctl This commit introduces SRD metrics through sysctl. The metrics can be queried using the following sysctl node: sysctl dev.ena..ena_srd_info Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 36d42c862f4a5643f6e2395e8d7b7e5c4580499a) --- sys/dev/ena/ena.c | 10 +++++++ sys/dev/ena/ena.h | 1 + sys/dev/ena/ena_sysctl.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 86 insertions(+), 1 deletion(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 64c3d79f00db..45bca630b4c2 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -166,6 +166,7 @@ static int ena_enable_msix_and_set_admin_interrupts(struct ena_adapter *); static void ena_update_on_link_change(void *, struct ena_admin_aenq_entry *); static void unimplemented_aenq_handler(void *, struct ena_admin_aenq_entry *); static int ena_copy_eni_metrics(struct ena_adapter *); +static int ena_copy_srd_metrics(struct ena_adapter *); static int ena_copy_customer_metrics(struct ena_adapter *); static void ena_timer_service(void *); @@ -3306,6 +3307,12 @@ ena_copy_eni_metrics(struct ena_adapter *adapter) return (rc); } +static int +ena_copy_srd_metrics(struct ena_adapter *adapter) +{ + return ena_com_get_ena_srd_info(adapter->ena_dev, &adapter->ena_srd_info); +} + static int ena_copy_customer_metrics(struct ena_adapter *adapter) { @@ -3568,6 +3575,9 @@ ena_metrics_task(void *arg, int pending) else if (ena_com_get_cap(adapter->ena_dev, ENA_ADMIN_ENI_STATS)) (void)ena_copy_eni_metrics(adapter); + if (ena_com_get_cap(adapter->ena_dev, ENA_ADMIN_ENA_SRD_INFO)) + (void)ena_copy_srd_metrics(adapter); + ENA_LOCK_UNLOCK(); } diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 18988d719a18..5647fe973502 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -487,6 +487,7 @@ struct ena_adapter { struct ena_stats_dev dev_stats; struct ena_hw_stats hw_stats; struct ena_admin_eni_stats eni_metrics; + struct ena_admin_ena_srd_info ena_srd_info; uint64_t *customer_metrics_array; enum ena_regs_reset_reason_types reset_reason; diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index edae5c3c23fa..fd5545dbe5fb 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -38,6 +38,7 @@ static void ena_sysctl_add_wd(struct ena_adapter *); static void ena_sysctl_add_stats(struct ena_adapter *); static void ena_sysctl_add_eni_metrics(struct ena_adapter *); static void ena_sysctl_add_customer_metrics(struct ena_adapter *); +static void ena_sysctl_add_srd_info(struct ena_adapter *); static void ena_sysctl_add_tuneables(struct ena_adapter *); static void ena_sysctl_add_irq_affinity(struct ena_adapter *); /* Kernel option RSS prevents manipulation of key hash and indirection table. */ @@ -59,18 +60,46 @@ static int ena_sysctl_rss_indir_table(SYSCTL_HANDLER_ARGS); #define ENA_METRICS_MAX_SAMPLE_INTERVAL 3600 #define ENA_HASH_KEY_MSG_SIZE (ENA_HASH_KEY_SIZE * 2 + 1) -#define SYSCTL_GSTRING_LEN 64 +#define SYSCTL_GSTRING_LEN 128 #define ENA_METRIC_ENI_ENTRY(stat, desc) { \ .name = #stat, \ .description = #desc, \ } +#define ENA_STAT_ENTRY(stat, desc, stat_type) { \ + .name = #stat, \ + .description = #desc, \ + .stat_offset = offsetof(struct ena_admin_##stat_type, stat) / sizeof(u64), \ +} + +#define ENA_STAT_ENA_SRD_ENTRY(stat, desc) \ + ENA_STAT_ENTRY(stat, desc, ena_srd_stats) + struct ena_hw_metrics { char name[SYSCTL_GSTRING_LEN]; char description[SYSCTL_GSTRING_LEN]; }; +struct ena_srd_metrics { + char name[SYSCTL_GSTRING_LEN]; + char description[SYSCTL_GSTRING_LEN]; + int stat_offset; +}; + +static const struct ena_srd_metrics ena_srd_stats_strings[] = { + ENA_STAT_ENA_SRD_ENTRY( + ena_srd_tx_pkts, Number of packets transmitted over ENA SRD), + ENA_STAT_ENA_SRD_ENTRY( + ena_srd_eligible_tx_pkts, Number of packets transmitted or could + have been transmitted over ENA SRD), + ENA_STAT_ENA_SRD_ENTRY( + ena_srd_rx_pkts, Number of packets received over ENA SRD), + ENA_STAT_ENA_SRD_ENTRY( + ena_srd_resource_utilization, Percentage of the ENA SRD resources + that are in use), +}; + static const struct ena_hw_metrics ena_hw_stats_strings[] = { ENA_METRIC_ENI_ENTRY( bw_in_allowance_exceeded, Inbound BW allowance exceeded), @@ -91,6 +120,7 @@ static const struct ena_hw_metrics ena_hw_stats_strings[] = { #endif #define ENA_CUSTOMER_METRICS_ARRAY_SIZE ARRAY_SIZE(ena_hw_stats_strings) +#define ENA_SRD_METRICS_ARRAY_SIZE ARRAY_SIZE(ena_srd_stats_strings) static SYSCTL_NODE(_hw, OID_AUTO, ena, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "ENA driver parameters"); @@ -153,6 +183,9 @@ ena_sysctl_add_nodes(struct ena_adapter *adapter) else if (ena_com_get_cap(dev, ENA_ADMIN_ENI_STATS)) ena_sysctl_add_eni_metrics(adapter); + if (ena_com_get_cap(adapter->ena_dev, ENA_ADMIN_ENA_SRD_INFO)) + ena_sysctl_add_srd_info(adapter); + ena_sysctl_add_wd(adapter); ena_sysctl_add_stats(adapter); ena_sysctl_add_tuneables(adapter); @@ -379,6 +412,47 @@ ena_sysctl_add_stats(struct ena_adapter *adapter) &admin_stats->no_completion, 0, "Commands not completed"); } +static void +ena_sysctl_add_srd_info(struct ena_adapter *adapter) +{ + device_t dev; + + struct sysctl_oid *ena_srd_info; + struct sysctl_oid_list *srd_list; + + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; + struct sysctl_oid_list *child; + + struct ena_admin_ena_srd_stats *srd_stats_ptr; + struct ena_srd_metrics cur_stat_strings; + + int i; + + dev = adapter->pdev; + + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); + child = SYSCTL_CHILDREN(tree); + + ena_srd_info = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "ena_srd_info", + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "ENA's SRD information"); + srd_list = SYSCTL_CHILDREN(ena_srd_info); + + SYSCTL_ADD_U64(ctx, srd_list, OID_AUTO, "ena_srd_mode", + CTLFLAG_RD, &adapter->ena_srd_info.flags, 0, + "Describes which ENA-express features are enabled"); + + srd_stats_ptr = &adapter->ena_srd_info.ena_srd_stats; + + for (i = 0 ; i < ENA_SRD_METRICS_ARRAY_SIZE; i++) { + cur_stat_strings = ena_srd_stats_strings[i]; + SYSCTL_ADD_U64(ctx, srd_list, OID_AUTO, cur_stat_strings.name, + CTLFLAG_RD, (u64 *)srd_stats_ptr + cur_stat_strings.stat_offset, + 0, cur_stat_strings.description); + } +} + static void ena_sysctl_add_customer_metrics(struct ena_adapter *adapter) { From nobody Sun Jan 14 21:53:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCpvD0ZSYz57DcZ; Sun, 14 Jan 2024 21:54: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 4TCpvC463xz4FH0; Sun, 14 Jan 2024 21:53:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jbd1Z1LNyWbIU9mkkPqXyfCCPgKTqsvdG1e9+kXBs3k=; b=i89Db+iCemBl5CwCPBQqN5qZ1za/mRDyi5qimxHEyAS3D2AWRZYmeUzWimBdE0NODTYszC wjutviFgnMFJml2pX9LEeEAsQJh+UPraEGkGtXDSvkPeg3aIgU4UbWE6AEv/Bf1k75aXYU +Ar5I2HobC2mh+6NkhLzsAVHPgVUKCDYHfme/kF2xykb0W7gMqUKu6F5iAv5H+XvlcZjig b1QoAUJuhYNaD5pvVKdPyaDZYmji9L7rzzT7LbZSnzuk14/NoMp+5M1+PzIBdUy+tfevSx RgcXRU3DJ3xVowWOsDLo3cwbF2gkVU9VKSSdxVbD20rnimyxiCoo5sba4+OPAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jbd1Z1LNyWbIU9mkkPqXyfCCPgKTqsvdG1e9+kXBs3k=; b=cawhidGtVHi8/xn9j2o8JuUX085ZFPoT8Vkb3KdntcvtQ4f1ZZ/WjEJbK6n6GVmpQM33oU 88W6WTN3IjlZjCcRQYIq9Br8sPFgXXq0NVPTTY5dzkHXyw0ztUfkCNDqRClrfruI9DzSoA TCZypf2Wd/jaMak0M+Dve9Z0AQ5QT84qpDPaYeqOo/r8z+5DBUC+qbPvXU48/VnKOqfC3k sysXBcqFp4CRDkZLybSpfpyWASiSQqa3FmRFMRMrI7T1yHgtrqBwwKZPi8zYBJziz4tGlX XFOJyrGG/jU1SVAzMPOia/J1bMm0G7TKt8ymDKYzayJtVH5lTBjg7a7MfBAMXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705269239; a=rsa-sha256; cv=none; b=aKTDhzUS1+8Xsu9V+BlJHcYeTJT/pxW04Vh7KZwyf8PvnANj8QpWf2vd1rCL+EtOVIPFao rZCNgLnlo0u8YpsBpuI8jgO/4HgbRJLNU4LEzshDJCF4Zpz4D1iAvMUR7zunVdoJ7kelMT cVv06BNUutkgvG3D+5uiUFa7I0OL+DRsfz5nZ8p4d6dUfplGVV+ZEwRNIdS+GTQXqh8qll 0qXNAqtnZkVFHKrzeXw/Il8hCoKDagTMUKtzhSFZqKcJPoY26qvSheOFsfh5In55yrrLYo u1hWLwplStH9+zJdos8C4faYwwEfCTaAYGU9mkkWaz+Ln5PKWd01H2bkU3dvPw== 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 4TCpvC2y9CzWPT; Sun, 14 Jan 2024 21:53: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 40ELrxDS041779; Sun, 14 Jan 2024 21:53:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ELrxDN041776; Sun, 14 Jan 2024 21:53:59 GMT (envelope-from git) Date: Sun, 14 Jan 2024 21:53:59 GMT Message-Id: <202401142153.40ELrxDN041776@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: eb29118a2fe5 - stable/14 - ena: Update the license dating to 2023 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: eb29118a2fe523d5f7abd804274a47e37f4c3b1e Auto-Submitted: auto-generated The branch stable/14 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=eb29118a2fe523d5f7abd804274a47e37f4c3b1e commit eb29118a2fe523d5f7abd804274a47e37f4c3b1e Author: Osama Abboud AuthorDate: 2023-10-23 17:16:38 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 21:18:11 +0000 ena: Update the license dating to 2023 Some of the files are using outdated linceses. Update the license to be 2023. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 246aa273244e91a30d70997a3be790a29f9eb29c) --- share/man/man4/ena.4 | 2 +- sys/dev/ena/ena.c | 2 +- sys/dev/ena/ena.h | 2 +- sys/dev/ena/ena_datapath.c | 2 +- sys/dev/ena/ena_datapath.h | 2 +- sys/dev/ena/ena_netmap.c | 2 +- sys/dev/ena/ena_netmap.h | 2 +- sys/dev/ena/ena_rss.c | 2 +- sys/dev/ena/ena_rss.h | 2 +- sys/dev/ena/ena_sysctl.c | 2 +- sys/dev/ena/ena_sysctl.h | 2 +- sys/modules/ena/Makefile | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/share/man/man4/ena.4 b/share/man/man4/ena.4 index befc2bb2ae0b..50a180871627 100644 --- a/share/man/man4/ena.4 +++ b/share/man/man4/ena.4 @@ -1,6 +1,6 @@ .\" SPDX-License-Identifier: BSD-2-Clause .\" -.\" Copyright (c) 2015-2022 Amazon.com, Inc. or its affiliates. +.\" Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 45bca630b4c2..3ff32cc9966c 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2021 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 5647fe973502..2c758d37622f 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2020 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index 177f33ea8ef3..66a93bbe7a6c 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2020 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_datapath.h b/sys/dev/ena/ena_datapath.h index c6166a806c6a..43292b5abbe9 100644 --- a/sys/dev/ena/ena_datapath.h +++ b/sys/dev/ena/ena_datapath.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2020 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_netmap.c b/sys/dev/ena/ena_netmap.c index a8d7cad05ab5..d95f48f7380c 100644 --- a/sys/dev/ena/ena_netmap.c +++ b/sys/dev/ena/ena_netmap.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2020 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_netmap.h b/sys/dev/ena/ena_netmap.h index aa4d0d3d815a..598fcf1f08b2 100644 --- a/sys/dev/ena/ena_netmap.h +++ b/sys/dev/ena/ena_netmap.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2020 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_rss.c b/sys/dev/ena/ena_rss.c index ce21a0a8950e..d90a7fbb253a 100644 --- a/sys/dev/ena/ena_rss.c +++ b/sys/dev/ena/ena_rss.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2021 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_rss.h b/sys/dev/ena/ena_rss.h index 20dc41cc64a4..1c1c89261b35 100644 --- a/sys/dev/ena/ena_rss.h +++ b/sys/dev/ena/ena_rss.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2021 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index fd5545dbe5fb..ea651837ebb6 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2021 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_sysctl.h b/sys/dev/ena/ena_sysctl.h index e9b4bfaae1cb..4f5834214005 100644 --- a/sys/dev/ena/ena_sysctl.h +++ b/sys/dev/ena/ena_sysctl.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2021 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/modules/ena/Makefile b/sys/modules/ena/Makefile index 95326888cc6c..f8b71588afa1 100644 --- a/sys/modules/ena/Makefile +++ b/sys/modules/ena/Makefile @@ -1,7 +1,7 @@ # # SPDX-License-Identifier: BSD-2-Clause # -# Copyright (c) 2015-2020 Amazon.com, Inc. or its affiliates. +# Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. # All rights reserved. # # Redistribution and use in source and binary forms, with or without From nobody Sun Jan 14 21:54:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCpvF0VK4z57DwN; Sun, 14 Jan 2024 21:54: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 4TCpvD4sJtz4FMd; Sun, 14 Jan 2024 21:54:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=24sLK7QIHm7DT7hq1+yVm/lUyMLwXDvupw/C9F77Qlc=; b=hYzcyi6B4KjDpxJKOCszhKMETByFgUrJzGwCT4rdHQSom6fnEBI8uOwPyoCDqOnCoG64ba SnYJQxsbTRxvd09ib/ApI3dkLE6t0ns+UyBM+yuKKYwHHlNlU+6Wl9OVvVKPkRZ0FOTLj/ 1/u1Lfk1HNVfqjY4FVrD8uMs0PlT1JwLhvVWPP3FgGdHFEVPCF2jPwJsQtLRueVAFnbk5G d80Ptsmm3JoC5/5F9DKoMhdxWu2FJBZVz7eikBcHP6LejcX/7be41NkHvEstZR0ARH9mgl zp+9gOCSIAdyNsSpiM44ZUPRzkflfpzjuZ8Cy7LARBtskYeiwl1PpQtylXXhoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705269240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=24sLK7QIHm7DT7hq1+yVm/lUyMLwXDvupw/C9F77Qlc=; b=g3/TJ7+tpseDQ3FYiiWdpaYoK56sU8ECmui5ZtexXRP6kPpjUq6FMJXmBr0G8HqHiXrLr7 IU5M+sOd68epxlYytb78z0acs3R/Cd1CUSmYQgjwkolWypanXKYgdrQ0BFmDVEPVrUwEi8 qlP5bGB8ztMUeA7dc9LdOMZPbpB/5BbsT0X3NMpDamDimv9JT11cKGoQAE6H3XeaQNeK0z hY2AMfI0T0z/wNFBZYDLtNgU/fK4BCI8AGeEGfSnWwew4Y/zpG8IT9FNGBLIMPireUBEen lenwGS8Np54z8mVAHgFNwAi2CoQb7jsY/1NXCXKCbaNyr5ZGt4ZXaKXuWJT2tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705269240; a=rsa-sha256; cv=none; b=c75gkmDfrGHfeEvvqlDcj4ukVFwadvSlyh19QTcDc85vqXcLm98YdARrosq3KhleOQf5a9 qJYVVX5gYKAxnfkM1hC8anG+EA8N/6fu0b/J0pH0xd0367WYao+eox+q/FxuU53ARc/N49 DO6Fr/pZhZpx66hh73SqfodaxgynqM/6oFmbRSpHOdkPTPoHpmAuyGc/h9YrpNPpHfuFkm /jM29AXPODiVJFH59jIRm+eXkAbUzbHLGRUerdjxWsb37IBaEG1179BKAF71mcUITVkoWq yy/r5ck7fyrKOZIJ5o+W8cRYDjjHRIK+Hy6Y3nm9xWg/iEoaTMzqJar5xJFOUQ== 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 4TCpvD3yTpzWDN; Sun, 14 Jan 2024 21:54: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 40ELs0IR041832; Sun, 14 Jan 2024 21:54:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ELs0aA041829; Sun, 14 Jan 2024 21:54:00 GMT (envelope-from git) Date: Sun, 14 Jan 2024 21:54:00 GMT Message-Id: <202401142154.40ELs0aA041829@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: 9015208bff0a - stable/14 - ena: Update driver version to v2.7.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9015208bff0a940a837f654d1f2e21ff34efc382 Auto-Submitted: auto-generated The branch stable/14 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=9015208bff0a940a837f654d1f2e21ff34efc382 commit 9015208bff0a940a837f654d1f2e21ff34efc382 Author: Osama Abboud AuthorDate: 2023-10-30 11:12:24 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 21:18:11 +0000 ena: Update driver version to v2.7.0 Features: * Introduce customer and SRD metrics through sysctl * Introduce spreading IRQs to CPUs capability using sysctl * Upgrade ena-com to v2.7.0 Bug Fixes: * Remove outdated APIs Minor Changes: * Introduce a shared stats sample interval for all stats Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 4e2688cc762d94b190029f0c5efab9c4bb5521be) --- sys/dev/ena/ena.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 2c758d37622f..3e42568ba8a9 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -38,8 +38,8 @@ #include "ena-com/ena_eth_com.h" #define ENA_DRV_MODULE_VER_MAJOR 2 -#define ENA_DRV_MODULE_VER_MINOR 6 -#define ENA_DRV_MODULE_VER_SUBMINOR 3 +#define ENA_DRV_MODULE_VER_MINOR 7 +#define ENA_DRV_MODULE_VER_SUBMINOR 0 #define ENA_DRV_MODULE_NAME "ena" From nobody Sun Jan 14 22:07:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCqCF3NPMz57G5R; Sun, 14 Jan 2024 22:07: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 4TCqCF2FtKz4KFg; Sun, 14 Jan 2024 22:07:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Gg0AyI/9GG16w92Qk0i4kyrXEfYqGzD/Q3tl4uOFyk=; b=reAf5ttRiVZsltRBmKD98aUTFuZKMIXJF2PmyOEOUMF0DIgnC1/CwEx3MRJaN3u+UgOXR6 p9va5jPKTWfmLFqyChykYTNdmUB/OxA3IdUzaQ7xetzCTtIrPVcRGay7RhKzAiL7T4BqNC 2UTtF/I6W5HwOtaHoUrpw8MOdzqdzERPMS6vROcx8yML1nHCV3EvyP/Bg0c2s31RaxtOPD L+sHUb34ZMwPy3MSR3PJ2Q8V9Phog2C2MBc1uA1P4WpAkGC/FObFQxmuAy1BiJMbgQwS4n q7ul2ftHZZAf8O5TLB5qDt2u63qJcKTP3e91CMg8mygL5Efx2SGZt6DOTm/Tsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Gg0AyI/9GG16w92Qk0i4kyrXEfYqGzD/Q3tl4uOFyk=; b=aeLO8nTbZgblR73Jiuz+/QdqlS1GyDgE5dciJRWzGLpNwEHYdHdQgLD9gxJ72UcTVlQKi0 /4ClAin3OpgjVuRvCVWnC/KcVRxVUXkmBVsl3DBgyjpr5lIO4hHxDHR8b4XrENIH5ZrJ6l Hg36U1jxPBCzlJlhyXY3F4NB0bAAnoUELtKXWDjo1smAiPF7Gs86hnbSiUsWBNiYNqiI5M /7w+y2HoX071tFdMZMedYsvqXzhMG+7pssooY5A4RaVIxybrj9l3kLhfYDU6WgRTFX+Lh3 WQE5E33eHvqGN9cilB7pTmyrG3bQciuRfnPXD0cAWXUhwFQSz7bYQsdy05TlwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705270073; a=rsa-sha256; cv=none; b=y2nMKghcOa5z6qQ3bWmKVRJzjR3EzleUnSRvTkWGpW6yQ5uARJCK4sjMYFND5QXMA6HWzz PXjzzP8r98KRU1OU++5LkXRVJ3OcNVjiHmnN6UpbhoN8mBLrvPps3x9JpDOTTV3Y9FEKUH piGIu9W0lQxFAa+nbxwI2BHkPhaKZjQS1qi3p6FryFqEx8O0pfVuDrPIdtM1AHuHhGrk+J L6Q/MhIZHBjiypGKV7sbUhRY7sxc1QfAyoGU4k9wG+pRo7Pfr+qFcBcWRdYb2yvdreJelO GnuUx2xxA4m/7wXZFk2CTGIXU1qv0ZjCJP56D270hfv6IoLldASzjWrPokmEJw== 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 4TCqCF1FjpzXHJ; Sun, 14 Jan 2024 22:07: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 40EM7rru059981; Sun, 14 Jan 2024 22:07:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40EM7rKS059977; Sun, 14 Jan 2024 22:07:53 GMT (envelope-from git) Date: Sun, 14 Jan 2024 22:07:53 GMT Message-Id: <202401142207.40EM7rKS059977@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: c07c5801f82b - stable/13 - ena: Upgrade ena-com to freebsd v2.7.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c07c5801f82b3e087dc40d4fbeeffed1c0acf436 Auto-Submitted: auto-generated The branch stable/13 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=c07c5801f82b3e087dc40d4fbeeffed1c0acf436 commit c07c5801f82b3e087dc40d4fbeeffed1c0acf436 Author: Arthur Kiyanovski AuthorDate: 2023-12-28 13:52:31 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 07:43:22 +0000 ena: Upgrade ena-com to freebsd v2.7.0 Merge commit '04cf7cee5ae0c6bb29eb21ce85bab7ca7386a95f' Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit adfed2d835a7f9382941896d15a487dac6fe659c) --- sys/contrib/ena-com/ena_admin_defs.h | 1412 ------------------------ sys/contrib/ena-com/ena_com.c | 431 +++++++- sys/contrib/ena-com/ena_com.h | 187 +++- sys/contrib/ena-com/ena_common_defs.h | 50 - sys/contrib/ena-com/ena_defs/ena_admin_defs.h | 146 ++- sys/contrib/ena-com/ena_defs/ena_common_defs.h | 3 +- sys/contrib/ena-com/ena_defs/ena_eth_io_defs.h | 18 +- sys/contrib/ena-com/ena_defs/ena_regs_defs.h | 13 +- sys/contrib/ena-com/ena_eth_com.c | 45 +- sys/contrib/ena-com/ena_eth_com.h | 29 +- sys/contrib/ena-com/ena_eth_io_defs.h | 960 ---------------- sys/contrib/ena-com/ena_fbsd_log.h | 74 -- sys/contrib/ena-com/ena_plat.h | 52 +- sys/contrib/ena-com/ena_regs_defs.h | 137 --- 14 files changed, 807 insertions(+), 2750 deletions(-) diff --git a/sys/contrib/ena-com/ena_admin_defs.h b/sys/contrib/ena-com/ena_admin_defs.h deleted file mode 100644 index 1d845c08256e..000000000000 --- a/sys/contrib/ena-com/ena_admin_defs.h +++ /dev/null @@ -1,1412 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright (c) 2015-2017 Amazon.com, Inc. or its affiliates. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * 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. - * * Neither the name of copyright holder nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT - * OWNER 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 _ENA_ADMIN_H_ -#define _ENA_ADMIN_H_ - -enum ena_admin_aq_opcode { - ENA_ADMIN_CREATE_SQ = 1, - - ENA_ADMIN_DESTROY_SQ = 2, - - ENA_ADMIN_CREATE_CQ = 3, - - ENA_ADMIN_DESTROY_CQ = 4, - - ENA_ADMIN_GET_FEATURE = 8, - - ENA_ADMIN_SET_FEATURE = 9, - - ENA_ADMIN_GET_STATS = 11, -}; - -enum ena_admin_aq_completion_status { - ENA_ADMIN_SUCCESS = 0, - - ENA_ADMIN_RESOURCE_ALLOCATION_FAILURE = 1, - - ENA_ADMIN_BAD_OPCODE = 2, - - ENA_ADMIN_UNSUPPORTED_OPCODE = 3, - - ENA_ADMIN_MALFORMED_REQUEST = 4, - - /* Additional status is provided in ACQ entry extended_status */ - ENA_ADMIN_ILLEGAL_PARAMETER = 5, - - ENA_ADMIN_UNKNOWN_ERROR = 6, -}; - -enum ena_admin_aq_feature_id { - ENA_ADMIN_DEVICE_ATTRIBUTES = 1, - - ENA_ADMIN_MAX_QUEUES_NUM = 2, - - ENA_ADMIN_HW_HINTS = 3, - - ENA_ADMIN_RSS_HASH_FUNCTION = 10, - - ENA_ADMIN_STATELESS_OFFLOAD_CONFIG = 11, - - ENA_ADMIN_RSS_REDIRECTION_TABLE_CONFIG = 12, - - ENA_ADMIN_MTU = 14, - - ENA_ADMIN_RSS_HASH_INPUT = 18, - - ENA_ADMIN_INTERRUPT_MODERATION = 20, - - ENA_ADMIN_AENQ_CONFIG = 26, - - ENA_ADMIN_LINK_CONFIG = 27, - - ENA_ADMIN_HOST_ATTR_CONFIG = 28, - - ENA_ADMIN_FEATURES_OPCODE_NUM = 32, -}; - -enum ena_admin_placement_policy_type { - /* descriptors and headers are in host memory */ - ENA_ADMIN_PLACEMENT_POLICY_HOST = 1, - - /* descriptors and headers are in device memory (a.k.a Low Latency - * Queue) - */ - ENA_ADMIN_PLACEMENT_POLICY_DEV = 3, -}; - -enum ena_admin_link_types { - ENA_ADMIN_LINK_SPEED_1G = 0x1, - - ENA_ADMIN_LINK_SPEED_2_HALF_G = 0x2, - - ENA_ADMIN_LINK_SPEED_5G = 0x4, - - ENA_ADMIN_LINK_SPEED_10G = 0x8, - - ENA_ADMIN_LINK_SPEED_25G = 0x10, - - ENA_ADMIN_LINK_SPEED_40G = 0x20, - - ENA_ADMIN_LINK_SPEED_50G = 0x40, - - ENA_ADMIN_LINK_SPEED_100G = 0x80, - - ENA_ADMIN_LINK_SPEED_200G = 0x100, - - ENA_ADMIN_LINK_SPEED_400G = 0x200, -}; - -enum ena_admin_completion_policy_type { - /* completion queue entry for each sq descriptor */ - ENA_ADMIN_COMPLETION_POLICY_DESC = 0, - - /* completion queue entry upon request in sq descriptor */ - ENA_ADMIN_COMPLETION_POLICY_DESC_ON_DEMAND = 1, - - /* current queue head pointer is updated in OS memory upon sq - * descriptor request - */ - ENA_ADMIN_COMPLETION_POLICY_HEAD_ON_DEMAND = 2, - - /* current queue head pointer is updated in OS memory for each sq - * descriptor - */ - ENA_ADMIN_COMPLETION_POLICY_HEAD = 3, -}; - -/* basic stats return ena_admin_basic_stats while extanded stats return a - * buffer (string format) with additional statistics per queue and per - * device id - */ -enum ena_admin_get_stats_type { - ENA_ADMIN_GET_STATS_TYPE_BASIC = 0, - - ENA_ADMIN_GET_STATS_TYPE_EXTENDED = 1, -}; - -enum ena_admin_get_stats_scope { - ENA_ADMIN_SPECIFIC_QUEUE = 0, - - ENA_ADMIN_ETH_TRAFFIC = 1, -}; - -struct ena_admin_aq_common_desc { - /* 11:0 : command_id - * 15:12 : reserved12 - */ - uint16_t command_id; - - /* as appears in ena_admin_aq_opcode */ - uint8_t opcode; - - /* 0 : phase - * 1 : ctrl_data - control buffer address valid - * 2 : ctrl_data_indirect - control buffer address - * points to list of pages with addresses of control - * buffers - * 7:3 : reserved3 - */ - uint8_t flags; -}; - -/* used in ena_admin_aq_entry. Can point directly to control data, or to a - * page list chunk. Used also at the end of indirect mode page list chunks, - * for chaining. - */ -struct ena_admin_ctrl_buff_info { - uint32_t length; - - struct ena_common_mem_addr address; -}; - -struct ena_admin_sq { - uint16_t sq_idx; - - /* 4:0 : reserved - * 7:5 : sq_direction - 0x1 - Tx; 0x2 - Rx - */ - uint8_t sq_identity; - - uint8_t reserved1; -}; - -struct ena_admin_aq_entry { - struct ena_admin_aq_common_desc aq_common_descriptor; - - union { - uint32_t inline_data_w1[3]; - - struct ena_admin_ctrl_buff_info control_buffer; - } u; - - uint32_t inline_data_w4[12]; -}; - -struct ena_admin_acq_common_desc { - /* command identifier to associate it with the aq descriptor - * 11:0 : command_id - * 15:12 : reserved12 - */ - uint16_t command; - - uint8_t status; - - /* 0 : phase - * 7:1 : reserved1 - */ - uint8_t flags; - - uint16_t extended_status; - - /* serves as a hint what AQ entries can be revoked */ - uint16_t sq_head_indx; -}; - -struct ena_admin_acq_entry { - struct ena_admin_acq_common_desc acq_common_descriptor; - - uint32_t response_specific_data[14]; -}; - -struct ena_admin_aq_create_sq_cmd { - struct ena_admin_aq_common_desc aq_common_descriptor; - - /* 4:0 : reserved0_w1 - * 7:5 : sq_direction - 0x1 - Tx, 0x2 - Rx - */ - uint8_t sq_identity; - - uint8_t reserved8_w1; - - /* 3:0 : placement_policy - Describing where the SQ - * descriptor ring and the SQ packet headers reside: - * 0x1 - descriptors and headers are in OS memory, - * 0x3 - descriptors and headers in device memory - * (a.k.a Low Latency Queue) - * 6:4 : completion_policy - Describing what policy - * to use for generation completion entry (cqe) in - * the CQ associated with this SQ: 0x0 - cqe for each - * sq descriptor, 0x1 - cqe upon request in sq - * descriptor, 0x2 - current queue head pointer is - * updated in OS memory upon sq descriptor request - * 0x3 - current queue head pointer is updated in OS - * memory for each sq descriptor - * 7 : reserved15_w1 - */ - uint8_t sq_caps_2; - - /* 0 : is_physically_contiguous - Described if the - * queue ring memory is allocated in physical - * contiguous pages or split. - * 7:1 : reserved17_w1 - */ - uint8_t sq_caps_3; - - /* associated completion queue id. This CQ must be created prior to - * SQ creation - */ - uint16_t cq_idx; - - /* submission queue depth in entries */ - uint16_t sq_depth; - - /* SQ physical base address in OS memory. This field should not be - * used for Low Latency queues. Has to be page aligned. - */ - struct ena_common_mem_addr sq_ba; - - /* specifies queue head writeback location in OS memory. Valid if - * completion_policy is set to completion_policy_head_on_demand or - * completion_policy_head. Has to be cache aligned - */ - struct ena_common_mem_addr sq_head_writeback; - - uint32_t reserved0_w7; - - uint32_t reserved0_w8; -}; - -enum ena_admin_sq_direction { - ENA_ADMIN_SQ_DIRECTION_TX = 1, - - ENA_ADMIN_SQ_DIRECTION_RX = 2, -}; - -struct ena_admin_acq_create_sq_resp_desc { - struct ena_admin_acq_common_desc acq_common_desc; - - uint16_t sq_idx; - - uint16_t reserved; - - /* queue doorbell address as an offset to PCIe MMIO REG BAR */ - uint32_t sq_doorbell_offset; - - /* low latency queue ring base address as an offset to PCIe MMIO - * LLQ_MEM BAR - */ - uint32_t llq_descriptors_offset; - - /* low latency queue headers' memory as an offset to PCIe MMIO - * LLQ_MEM BAR - */ - uint32_t llq_headers_offset; -}; - -struct ena_admin_aq_destroy_sq_cmd { - struct ena_admin_aq_common_desc aq_common_descriptor; - - struct ena_admin_sq sq; -}; - -struct ena_admin_acq_destroy_sq_resp_desc { - struct ena_admin_acq_common_desc acq_common_desc; -}; - -struct ena_admin_aq_create_cq_cmd { - struct ena_admin_aq_common_desc aq_common_descriptor; - - /* 4:0 : reserved5 - * 5 : interrupt_mode_enabled - if set, cq operates - * in interrupt mode, otherwise - polling - * 7:6 : reserved6 - */ - uint8_t cq_caps_1; - - /* 4:0 : cq_entry_size_words - size of CQ entry in - * 32-bit words, valid values: 4, 8. - * 7:5 : reserved7 - */ - uint8_t cq_caps_2; - - /* completion queue depth in # of entries. must be power of 2 */ - uint16_t cq_depth; - - /* msix vector assigned to this cq */ - uint32_t msix_vector; - - /* cq physical base address in OS memory. CQ must be physically - * contiguous - */ - struct ena_common_mem_addr cq_ba; -}; - -struct ena_admin_acq_create_cq_resp_desc { - struct ena_admin_acq_common_desc acq_common_desc; - - uint16_t cq_idx; - - /* actual cq depth in number of entries */ - uint16_t cq_actual_depth; - - uint32_t numa_node_register_offset; - - uint32_t cq_head_db_register_offset; - - uint32_t cq_interrupt_unmask_register_offset; -}; - -struct ena_admin_aq_destroy_cq_cmd { - struct ena_admin_aq_common_desc aq_common_descriptor; - - uint16_t cq_idx; - - uint16_t reserved1; -}; - -struct ena_admin_acq_destroy_cq_resp_desc { - struct ena_admin_acq_common_desc acq_common_desc; -}; - -/* ENA AQ Get Statistics command. Extended statistics are placed in control - * buffer pointed by AQ entry - */ -struct ena_admin_aq_get_stats_cmd { - struct ena_admin_aq_common_desc aq_common_descriptor; - - union { - /* command specific inline data */ - uint32_t inline_data_w1[3]; - - struct ena_admin_ctrl_buff_info control_buffer; - } u; - - /* stats type as defined in enum ena_admin_get_stats_type */ - uint8_t type; - - /* stats scope defined in enum ena_admin_get_stats_scope */ - uint8_t scope; - - uint16_t reserved3; - - /* queue id. used when scope is specific_queue */ - uint16_t queue_idx; - - /* device id, value 0xFFFF means mine. only privileged device can get - * stats of other device - */ - uint16_t device_id; -}; - -/* Basic Statistics Command. */ -struct ena_admin_basic_stats { - uint32_t tx_bytes_low; - - uint32_t tx_bytes_high; - - uint32_t tx_pkts_low; - - uint32_t tx_pkts_high; - - uint32_t rx_bytes_low; - - uint32_t rx_bytes_high; - - uint32_t rx_pkts_low; - - uint32_t rx_pkts_high; - - uint32_t rx_drops_low; - - uint32_t rx_drops_high; -}; - -struct ena_admin_acq_get_stats_resp { - struct ena_admin_acq_common_desc acq_common_desc; - - struct ena_admin_basic_stats basic_stats; -}; - -struct ena_admin_get_set_feature_common_desc { - /* 1:0 : select - 0x1 - current value; 0x3 - default - * value - * 7:3 : reserved3 - */ - uint8_t flags; - - /* as appears in ena_admin_aq_feature_id */ - uint8_t feature_id; - - uint16_t reserved16; -}; - -struct ena_admin_device_attr_feature_desc { - uint32_t impl_id; - - uint32_t device_version; - - /* bitmap of ena_admin_aq_feature_id */ - uint32_t supported_features; - - uint32_t reserved3; - - /* Indicates how many bits are used physical address access. */ - uint32_t phys_addr_width; - - /* Indicates how many bits are used virtual address access. */ - uint32_t virt_addr_width; - - /* unicast MAC address (in Network byte order) */ - uint8_t mac_addr[6]; - - uint8_t reserved7[2]; - - uint32_t max_mtu; -}; - -struct ena_admin_queue_feature_desc { - /* including LLQs */ - uint32_t max_sq_num; - - uint32_t max_sq_depth; - - uint32_t max_cq_num; - - uint32_t max_cq_depth; - - uint32_t max_llq_num; - - uint32_t max_llq_depth; - - uint32_t max_header_size; - - /* Maximum Descriptors number, including meta descriptor, allowed for - * a single Tx packet - */ - uint16_t max_packet_tx_descs; - - /* Maximum Descriptors number allowed for a single Rx packet */ - uint16_t max_packet_rx_descs; -}; - -struct ena_admin_set_feature_mtu_desc { - /* exclude L2 */ - uint32_t mtu; -}; - -struct ena_admin_set_feature_host_attr_desc { - /* host OS info base address in OS memory. host info is 4KB of - * physically contiguous - */ - struct ena_common_mem_addr os_info_ba; - - /* host debug area base address in OS memory. debug area must be - * physically contiguous - */ - struct ena_common_mem_addr debug_ba; - - /* debug area size */ - uint32_t debug_area_size; -}; - -struct ena_admin_feature_intr_moder_desc { - /* interrupt delay granularity in usec */ - uint16_t intr_delay_resolution; - - uint16_t reserved; -}; - -struct ena_admin_get_feature_link_desc { - /* Link speed in Mb */ - uint32_t speed; - - /* bit field of enum ena_admin_link types */ - uint32_t supported; - - /* 0 : autoneg - * 1 : duplex - Full Duplex - * 31:2 : reserved2 - */ - uint32_t flags; -}; - -struct ena_admin_feature_aenq_desc { - /* bitmask for AENQ groups the device can report */ - uint32_t supported_groups; - - /* bitmask for AENQ groups to report */ - uint32_t enabled_groups; -}; - -struct ena_admin_feature_offload_desc { - /* 0 : TX_L3_csum_ipv4 - * 1 : TX_L4_ipv4_csum_part - The checksum field - * should be initialized with pseudo header checksum - * 2 : TX_L4_ipv4_csum_full - * 3 : TX_L4_ipv6_csum_part - The checksum field - * should be initialized with pseudo header checksum - * 4 : TX_L4_ipv6_csum_full - * 5 : tso_ipv4 - * 6 : tso_ipv6 - * 7 : tso_ecn - */ - uint32_t tx; - - /* Receive side supported stateless offload - * 0 : RX_L3_csum_ipv4 - IPv4 checksum - * 1 : RX_L4_ipv4_csum - TCP/UDP/IPv4 checksum - * 2 : RX_L4_ipv6_csum - TCP/UDP/IPv6 checksum - * 3 : RX_hash - Hash calculation - */ - uint32_t rx_supported; - - uint32_t rx_enabled; -}; - -enum ena_admin_hash_functions { - ENA_ADMIN_TOEPLITZ = 1, - - ENA_ADMIN_CRC32 = 2, -}; - -struct ena_admin_feature_rss_flow_hash_control { - uint32_t keys_num; - - uint32_t reserved; - - uint32_t key[10]; -}; - -struct ena_admin_feature_rss_flow_hash_function { - /* 7:0 : funcs - bitmask of ena_admin_hash_functions */ - uint32_t supported_func; - - /* 7:0 : selected_func - bitmask of - * ena_admin_hash_functions - */ - uint32_t selected_func; - - /* initial value */ - uint32_t init_val; -}; - -/* RSS flow hash protocols */ -enum ena_admin_flow_hash_proto { - ENA_ADMIN_RSS_TCP4 = 0, - - ENA_ADMIN_RSS_UDP4 = 1, - - ENA_ADMIN_RSS_TCP6 = 2, - - ENA_ADMIN_RSS_UDP6 = 3, - - ENA_ADMIN_RSS_IP4 = 4, - - ENA_ADMIN_RSS_IP6 = 5, - - ENA_ADMIN_RSS_IP4_FRAG = 6, - - ENA_ADMIN_RSS_NOT_IP = 7, - - /* TCPv6 with extension header */ - ENA_ADMIN_RSS_TCP6_EX = 8, - - /* IPv6 with extension header */ - ENA_ADMIN_RSS_IP6_EX = 9, - - ENA_ADMIN_RSS_PROTO_NUM = 16, -}; - -/* RSS flow hash fields */ -enum ena_admin_flow_hash_fields { - /* Ethernet Dest Addr */ - ENA_ADMIN_RSS_L2_DA = BIT(0), - - /* Ethernet Src Addr */ - ENA_ADMIN_RSS_L2_SA = BIT(1), - - /* ipv4/6 Dest Addr */ - ENA_ADMIN_RSS_L3_DA = BIT(2), - - /* ipv4/6 Src Addr */ - ENA_ADMIN_RSS_L3_SA = BIT(3), - - /* tcp/udp Dest Port */ - ENA_ADMIN_RSS_L4_DP = BIT(4), - - /* tcp/udp Src Port */ - ENA_ADMIN_RSS_L4_SP = BIT(5), -}; - -struct ena_admin_proto_input { - /* flow hash fields (bitwise according to ena_admin_flow_hash_fields) */ - uint16_t fields; - - uint16_t reserved2; -}; - -struct ena_admin_feature_rss_hash_control { - struct ena_admin_proto_input supported_fields[ENA_ADMIN_RSS_PROTO_NUM]; - - struct ena_admin_proto_input selected_fields[ENA_ADMIN_RSS_PROTO_NUM]; - - struct ena_admin_proto_input reserved2[ENA_ADMIN_RSS_PROTO_NUM]; - - struct ena_admin_proto_input reserved3[ENA_ADMIN_RSS_PROTO_NUM]; -}; - -struct ena_admin_feature_rss_flow_hash_input { - /* supported hash input sorting - * 1 : L3_sort - support swap L3 addresses if DA is - * smaller than SA - * 2 : L4_sort - support swap L4 ports if DP smaller - * SP - */ - uint16_t supported_input_sort; - - /* enabled hash input sorting - * 1 : enable_L3_sort - enable swap L3 addresses if - * DA smaller than SA - * 2 : enable_L4_sort - enable swap L4 ports if DP - * smaller than SP - */ - uint16_t enabled_input_sort; -}; - -enum ena_admin_os_type { - ENA_ADMIN_OS_LINUX = 1, - - ENA_ADMIN_OS_WIN = 2, - - ENA_ADMIN_OS_DPDK = 3, - - ENA_ADMIN_OS_FREEBSD = 4, - - ENA_ADMIN_OS_IPXE = 5, -}; - -struct ena_admin_host_info { - /* defined in enum ena_admin_os_type */ - uint32_t os_type; - - /* os distribution string format */ - uint8_t os_dist_str[128]; - - /* OS distribution numeric format */ - uint32_t os_dist; - - /* kernel version string format */ - uint8_t kernel_ver_str[32]; - - /* Kernel version numeric format */ - uint32_t kernel_ver; - - /* 7:0 : major - * 15:8 : minor - * 23:16 : sub_minor - */ - uint32_t driver_version; - - /* features bitmap */ - uint32_t supported_network_features[4]; -}; - -struct ena_admin_rss_ind_table_entry { - uint16_t cq_idx; - - uint16_t reserved; -}; - -struct ena_admin_feature_rss_ind_table { - /* min supported table size (2^min_size) */ - uint16_t min_size; - - /* max supported table size (2^max_size) */ - uint16_t max_size; - - /* table size (2^size) */ - uint16_t size; - - uint16_t reserved; - - /* index of the inline entry. 0xFFFFFFFF means invalid */ - uint32_t inline_index; - - /* used for updating single entry, ignored when setting the entire - * table through the control buffer. - */ - struct ena_admin_rss_ind_table_entry inline_entry; -}; - -/* When hint value is 0, driver should use it's own predefined value */ -struct ena_admin_ena_hw_hints { - /* value in ms */ - uint16_t mmio_read_timeout; - - /* value in ms */ - uint16_t driver_watchdog_timeout; - - /* Per packet tx completion timeout. value in ms */ - uint16_t missing_tx_completion_timeout; - - uint16_t missed_tx_completion_count_threshold_to_reset; - - /* value in ms */ - uint16_t admin_completion_tx_timeout; - - uint16_t netdev_wd_timeout; - - uint16_t max_tx_sgl_size; - - uint16_t max_rx_sgl_size; - - uint16_t reserved[8]; -}; - -struct ena_admin_get_feat_cmd { - struct ena_admin_aq_common_desc aq_common_descriptor; - - struct ena_admin_ctrl_buff_info control_buffer; - - struct ena_admin_get_set_feature_common_desc feat_common; - - uint32_t raw[11]; -}; - -struct ena_admin_get_feat_resp { - struct ena_admin_acq_common_desc acq_common_desc; - - union { - uint32_t raw[14]; - - struct ena_admin_device_attr_feature_desc dev_attr; - - struct ena_admin_queue_feature_desc max_queue; - - struct ena_admin_feature_aenq_desc aenq; - - struct ena_admin_get_feature_link_desc link; - - struct ena_admin_feature_offload_desc offload; - - struct ena_admin_feature_rss_flow_hash_function flow_hash_func; - - struct ena_admin_feature_rss_flow_hash_input flow_hash_input; - - struct ena_admin_feature_rss_ind_table ind_table; - - struct ena_admin_feature_intr_moder_desc intr_moderation; - - struct ena_admin_ena_hw_hints hw_hints; - } u; -}; - -struct ena_admin_set_feat_cmd { - struct ena_admin_aq_common_desc aq_common_descriptor; - - struct ena_admin_ctrl_buff_info control_buffer; - - struct ena_admin_get_set_feature_common_desc feat_common; - - union { - uint32_t raw[11]; - - /* mtu size */ - struct ena_admin_set_feature_mtu_desc mtu; - - /* host attributes */ - struct ena_admin_set_feature_host_attr_desc host_attr; - - /* AENQ configuration */ - struct ena_admin_feature_aenq_desc aenq; - - /* rss flow hash function */ - struct ena_admin_feature_rss_flow_hash_function flow_hash_func; - - /* rss flow hash input */ - struct ena_admin_feature_rss_flow_hash_input flow_hash_input; - - /* rss indirection table */ - struct ena_admin_feature_rss_ind_table ind_table; - } u; -}; - -struct ena_admin_set_feat_resp { - struct ena_admin_acq_common_desc acq_common_desc; - - union { - uint32_t raw[14]; - } u; -}; - -struct ena_admin_aenq_common_desc { - uint16_t group; - - uint16_t syndrom; - - /* 0 : phase */ - uint8_t flags; - - uint8_t reserved1[3]; - - uint32_t timestamp_low; - - uint32_t timestamp_high; -}; - -/* asynchronous event notification groups */ -enum ena_admin_aenq_group { - ENA_ADMIN_LINK_CHANGE = 0, - - ENA_ADMIN_FATAL_ERROR = 1, - - ENA_ADMIN_WARNING = 2, - - ENA_ADMIN_NOTIFICATION = 3, - - ENA_ADMIN_KEEP_ALIVE = 4, - - ENA_ADMIN_AENQ_GROUPS_NUM = 5, -}; - -enum ena_admin_aenq_notification_syndrom { - ENA_ADMIN_SUSPEND = 0, - - ENA_ADMIN_RESUME = 1, - - ENA_ADMIN_UPDATE_HINTS = 2, -}; - -struct ena_admin_aenq_entry { - struct ena_admin_aenq_common_desc aenq_common_desc; - - /* command specific inline data */ - uint32_t inline_data_w4[12]; -}; - -struct ena_admin_aenq_link_change_desc { - struct ena_admin_aenq_common_desc aenq_common_desc; - - /* 0 : link_status */ - uint32_t flags; -}; - -struct ena_admin_aenq_keep_alive_desc { - struct ena_admin_aenq_common_desc aenq_common_desc; - - uint32_t rx_drops_low; - - uint32_t rx_drops_high; -}; - -struct ena_admin_ena_mmio_req_read_less_resp { - uint16_t req_id; - - uint16_t reg_off; - - /* value is valid when poll is cleared */ - uint32_t reg_val; -}; - -/* aq_common_desc */ -#define ENA_ADMIN_AQ_COMMON_DESC_COMMAND_ID_MASK GENMASK(11, 0) -#define ENA_ADMIN_AQ_COMMON_DESC_PHASE_MASK BIT(0) -#define ENA_ADMIN_AQ_COMMON_DESC_CTRL_DATA_SHIFT 1 -#define ENA_ADMIN_AQ_COMMON_DESC_CTRL_DATA_MASK BIT(1) -#define ENA_ADMIN_AQ_COMMON_DESC_CTRL_DATA_INDIRECT_SHIFT 2 -#define ENA_ADMIN_AQ_COMMON_DESC_CTRL_DATA_INDIRECT_MASK BIT(2) - -/* sq */ -#define ENA_ADMIN_SQ_SQ_DIRECTION_SHIFT 5 -#define ENA_ADMIN_SQ_SQ_DIRECTION_MASK GENMASK(7, 5) - -/* acq_common_desc */ *** 3278 LINES SKIPPED *** From nobody Sun Jan 14 22:07:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCqCG4Q0yz57G2s; Sun, 14 Jan 2024 22:07: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 4TCqCG3Pc0z4KNc; Sun, 14 Jan 2024 22:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0facqwzNXsk9FgbUjGydmhvJgNbjf6sf9y2tdDn0dtI=; b=k+wYEL/NCa22P04RDftivmW4OqzFPWWSnqh8lho13D3u1jkUJX+CFOUxQZxcxnmr0l5cvn uQMTo8U+RQqqAZ7ik6NjA71M80ZIEpexPxH8sR4uPi0e7kM2TudGoVQx4y+lwujcOtXoXA jIEMDhic0Jz8ndhlY98kEohRi0l+Uc+FwdTIjIEstqzAFWGoHasjYE0Ygt05TD+qr88YRC U3N+dQjfM2kAqQdpvqxOreyvlBq0eLabzIUg27fitB3DBcJlD7NBMEe9ThHNAtep2jahfg 0Qd/dveXlLjCKe9eb2+/0Q0vVmN9483yQij7o4A4flG91IEKG9amIVh7BddkkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0facqwzNXsk9FgbUjGydmhvJgNbjf6sf9y2tdDn0dtI=; b=KiEiHPV9wxGlQm23wBYUVdb0vcO6jzgGZWLd8RxCR2aQMayuONzL+yx/4OGv+kNBeSnxmK /7HjMtG8gq60R4hwkKtPKaZcgxhqBLLRivvJmv0RrUIl2QwOjG3ALCJ9hUGBkqyi/Jzgcq NxeUaiyA1cH6f6W5yR8K1W9JaeFapmo67j8IOOpPsqAxPMscLEGRTAUHYnXr3wayRHpf8i NDG9hOKp1EuUnVB8U29p8ir0lvkUQ9zlagH8m/7tt/nJJJImZI87PL9uoY/7KKvbw7btia GftjYHlVN4uAEQxagXLYI5SAQmfgmbYvGp6q9n30AnI+wSKs5bLmXxIBinsmIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705270074; a=rsa-sha256; cv=none; b=jjD7kJBIflTD1euZrxKrOOZJXBtQbkgUXiII/bv+GC5CUNuZwjhF5eXG1n57XZEnsRK/ya NHbPUAJkhbXBa8QiIUKUYQmoDhm41e9FY3JUPZgadeS02cYa2JHcFPjqxA0v36oByqAHUT zPsbYX5LMWZiuEkYUBiOZvP4dfnBPB/TWm3v0bKZyRUvlkrdUUtcdqeQGBExSolH4I10uC ieu1px766lhHP/54pKyq/dEjaWuurgP0BethC2SZrFTbKfDMfELy4E4x3YxVzD8nJMTfXr jFdFwb0ULwYETqSHhyHO6h4VmWMVOmzyXggOywm+9HZWHLiynb9HrtW1L5PQGg== 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 4TCqCG2VwLzXHK; Sun, 14 Jan 2024 22:07: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 40EM7s1S060034; Sun, 14 Jan 2024 22:07:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40EM7sRj060031; Sun, 14 Jan 2024 22:07:54 GMT (envelope-from git) Date: Sun, 14 Jan 2024 22:07:54 GMT Message-Id: <202401142207.40EM7sRj060031@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: 99c3944243a0 - stable/13 - ena: Add sysctl support for spreading IRQs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 99c3944243a055f52611b2a65dcb87d08295da3b Auto-Submitted: auto-generated The branch stable/13 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=99c3944243a055f52611b2a65dcb87d08295da3b commit 99c3944243a055f52611b2a65dcb87d08295da3b Author: Osama Abboud AuthorDate: 2023-10-30 11:27:03 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 07:43:22 +0000 ena: Add sysctl support for spreading IRQs This commit allows spreading IO IRQs over different CPUs through sysctl. Two sysctl nodes are introduced: 1- base_cpu: servers as the first CPU to which the first IO IRQ will be bound. 2- cpu_stride: sets the distance between every two CPUs to which every two consecutive IO IRQs are bound. For example for doing the following IO IRQs / CPU binding: IRQ idx | CPU ---------------- 1 | 0 2 | 2 3 | 4 4 | 6 Run the following commands: sysctl dev.ena..irq_affinity.base_cpu=0 sysctl dev.ena..irq_affinity.cpu_stride=2 Also introduced rss_enabled field, which is intended to replace '#ifdef RSS' in multiple places, in order to prevent code duplication. We want to bind interrupts to CPUs in case of rss set OR in case the newly defined sysctl paremeter is set. This requires to remove a couple of '#ifdef RSS' as well in the structs, since we'll be using the relevant parameters in the CPU binding code. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit f9e1d9471077109c19fd7d6dc9c1d35432efdede) --- sys/dev/ena/ena.c | 126 ++++++++++++++++++++++++++++++++++------ sys/dev/ena/ena.h | 14 +++-- sys/dev/ena/ena_sysctl.c | 145 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 263 insertions(+), 22 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index ac6a59b632e0..7de87e6f3f4d 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -1237,6 +1237,84 @@ ena_update_io_rings(struct ena_adapter *adapter, uint32_t num) ena_init_io_rings(adapter); } +int +ena_update_base_cpu(struct ena_adapter *adapter, int new_num) +{ + int old_num; + int rc = 0; + bool dev_was_up; + + dev_was_up = ENA_FLAG_ISSET(ENA_FLAG_DEV_UP, adapter); + old_num = adapter->irq_cpu_base; + + ena_down(adapter); + + adapter->irq_cpu_base = new_num; + + if (dev_was_up) { + rc = ena_up(adapter); + if (unlikely(rc != 0)) { + ena_log(adapter->pdev, ERR, + "Failed to configure device %d IRQ base CPU. " + "Reverting to previous value: %d\n", + new_num, old_num); + + adapter->irq_cpu_base = old_num; + + rc = ena_up(adapter); + if (unlikely(rc != 0)) { + ena_log(adapter->pdev, ERR, + "Failed to revert to previous setup." + "Triggering device reset.\n"); + ENA_FLAG_SET_ATOMIC( + ENA_FLAG_DEV_UP_BEFORE_RESET, adapter); + ena_trigger_reset(adapter, + ENA_REGS_RESET_OS_TRIGGER); + } + } + } + return (rc); +} + +int +ena_update_cpu_stride(struct ena_adapter *adapter, uint32_t new_num) +{ + uint32_t old_num; + int rc = 0; + bool dev_was_up; + + dev_was_up = ENA_FLAG_ISSET(ENA_FLAG_DEV_UP, adapter); + old_num = adapter->irq_cpu_stride; + + ena_down(adapter); + + adapter->irq_cpu_stride = new_num; + + if (dev_was_up) { + rc = ena_up(adapter); + if (unlikely(rc != 0)) { + ena_log(adapter->pdev, ERR, + "Failed to configure device %d IRQ CPU stride. " + "Reverting to previous value: %d\n", + new_num, old_num); + + adapter->irq_cpu_stride = old_num; + + rc = ena_up(adapter); + if (unlikely(rc != 0)) { + ena_log(adapter->pdev, ERR, + "Failed to revert to previous setup." + "Triggering device reset.\n"); + ENA_FLAG_SET_ATOMIC( + ENA_FLAG_DEV_UP_BEFORE_RESET, adapter); + ena_trigger_reset(adapter, + ENA_REGS_RESET_OS_TRIGGER); + } + } + } + return (rc); +} + /* Caller should sanitize new_num */ int ena_update_io_queue_nb(struct ena_adapter *adapter, uint32_t new_num) @@ -1683,6 +1761,13 @@ ena_setup_io_intr(struct ena_adapter *adapter) ena_log(adapter->pdev, DBG, "ena_setup_io_intr vector: %d\n", adapter->msix_entries[irq_idx].vector); + if (adapter->irq_cpu_base > ENA_BASE_CPU_UNSPECIFIED) { + adapter->que[i].cpu = adapter->irq_tbl[irq_idx].cpu = + (unsigned)(adapter->irq_cpu_base + + i * adapter->irq_cpu_stride) % (unsigned)mp_ncpus; + CPU_SETOF(adapter->que[i].cpu, &adapter->que[i].cpu_mask); + } + #ifdef RSS adapter->que[i].cpu = adapter->irq_tbl[irq_idx].cpu = rss_getcpu(cur_bind); @@ -1790,20 +1875,19 @@ ena_request_io_irq(struct ena_adapter *adapter) } irq->requested = true; -#ifdef RSS - rc = bus_bind_intr(adapter->pdev, irq->res, irq->cpu); - if (unlikely(rc != 0)) { - ena_log(pdev, ERR, - "failed to bind interrupt handler for irq %ju to cpu %d: %d\n", - rman_get_start(irq->res), irq->cpu, rc); - goto err; - } + if (adapter->rss_enabled || adapter->irq_cpu_base > ENA_BASE_CPU_UNSPECIFIED) { + rc = bus_bind_intr(adapter->pdev, irq->res, irq->cpu); + if (unlikely(rc != 0)) { + ena_log(pdev, ERR, + "failed to bind interrupt handler for irq %ju to cpu %d: %d\n", + rman_get_start(irq->res), irq->cpu, rc); + goto err; + } - ena_log(pdev, INFO, "queue %d - cpu %d\n", - i - ENA_IO_IRQ_FIRST_IDX, irq->cpu); -#endif + ena_log(pdev, INFO, "queue %d - cpu %d\n", + i - ENA_IO_IRQ_FIRST_IDX, irq->cpu); + } } - return (rc); err: @@ -1814,13 +1898,14 @@ err: /* Once we entered err: section and irq->requested is true we free both intr and resources */ - if (irq->requested) + if (irq->requested) { rcc = bus_teardown_intr(adapter->pdev, irq->res, irq->cookie); - if (unlikely(rcc != 0)) - ena_log(pdev, ERR, - "could not release irq: %d, error: %d\n", - irq->vector, rcc); + if (unlikely(rcc != 0)) + ena_log(pdev, ERR, + "could not release irq: %d, error: %d\n", + irq->vector, rcc); + } /* If we entered err: section without irq->requested set we know it was bus_alloc_resource_any() that needs cleanup, provided @@ -3524,6 +3609,13 @@ ena_attach(device_t pdev) adapter->missing_tx_max_queues = ENA_DEFAULT_TX_MONITORED_QUEUES; adapter->missing_tx_threshold = ENA_DEFAULT_TX_CMP_THRESHOLD; + adapter->irq_cpu_base = ENA_BASE_CPU_UNSPECIFIED; + adapter->irq_cpu_stride = 0; + +#ifdef RSS + adapter->rss_enabled = 1; +#endif + if (version_printed++ == 0) ena_log(pdev, INFO, "%s\n", ena_version); diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index b6e791d6ff6a..3687e9b2522e 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -69,6 +69,7 @@ #define ENA_DEFAULT_RING_SIZE 1024 #define ENA_MIN_RING_SIZE 256 +#define ENA_BASE_CPU_UNSPECIFIED -1 /* * Refill Rx queue when number of required descriptors is above * QUEUE_SIZE / ENA_RX_REFILL_THRESH_DIVIDER or ENA_RX_REFILL_THRESH_PACKET @@ -201,9 +202,7 @@ struct ena_irq { void *cookie; unsigned int vector; bool requested; -#ifdef RSS int cpu; -#endif char name[ENA_IRQNAME_SIZE]; }; @@ -216,10 +215,8 @@ struct ena_que { struct taskqueue *cleanup_tq; uint32_t id; -#ifdef RSS int cpu; cpuset_t cpu_mask; -#endif int domain; struct sysctl_oid *oid; }; @@ -448,6 +445,12 @@ struct ena_adapter { ena_state_t flags; + /* IRQ CPU affinity */ + int irq_cpu_base; + uint32_t irq_cpu_stride; + + uint8_t rss_enabled; + /* Queue will represent one TX and one RX ring */ struct ena_que que[ENA_MAX_NUM_IO_QUEUES] __aligned(CACHE_LINE_SIZE); @@ -524,7 +527,8 @@ int ena_update_buf_ring_size(struct ena_adapter *adapter, int ena_update_queue_size(struct ena_adapter *adapter, uint32_t new_tx_size, uint32_t new_rx_size); int ena_update_io_queue_nb(struct ena_adapter *adapter, uint32_t new_num); - +int ena_update_base_cpu(struct ena_adapter *adapter, int new_num); +int ena_update_cpu_stride(struct ena_adapter *adapter, uint32_t new_num); static inline int ena_mbuf_count(struct mbuf *mbuf) { diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index d450fcf48d15..6668f9924787 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -38,6 +38,7 @@ static void ena_sysctl_add_wd(struct ena_adapter *); static void ena_sysctl_add_stats(struct ena_adapter *); static void ena_sysctl_add_eni_metrics(struct ena_adapter *); static void ena_sysctl_add_tuneables(struct ena_adapter *); +static void ena_sysctl_add_irq_affinity(struct ena_adapter *); /* Kernel option RSS prevents manipulation of key hash and indirection table. */ #ifndef RSS static void ena_sysctl_add_rss(struct ena_adapter *); @@ -45,6 +46,8 @@ static void ena_sysctl_add_rss(struct ena_adapter *); static int ena_sysctl_buf_ring_size(SYSCTL_HANDLER_ARGS); static int ena_sysctl_rx_queue_size(SYSCTL_HANDLER_ARGS); static int ena_sysctl_io_queues_nb(SYSCTL_HANDLER_ARGS); +static int ena_sysctl_irq_base_cpu(SYSCTL_HANDLER_ARGS); +static int ena_sysctl_irq_cpu_stride(SYSCTL_HANDLER_ARGS); static int ena_sysctl_eni_metrics_interval(SYSCTL_HANDLER_ARGS); #ifndef RSS static int ena_sysctl_rss_key(SYSCTL_HANDLER_ARGS); @@ -102,6 +105,7 @@ ena_sysctl_add_nodes(struct ena_adapter *adapter) ena_sysctl_add_stats(adapter); ena_sysctl_add_eni_metrics(adapter); ena_sysctl_add_tuneables(adapter); + ena_sysctl_add_irq_affinity(adapter); #ifndef RSS ena_sysctl_add_rss(adapter); #endif @@ -448,6 +452,36 @@ ena_sysctl_add_rss(struct ena_adapter *adapter) } #endif /* RSS */ +static void +ena_sysctl_add_irq_affinity(struct ena_adapter *adapter) +{ + device_t dev; + + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; + struct sysctl_oid_list *child; + + dev = adapter->pdev; + + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); + child = SYSCTL_CHILDREN(tree); + + tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "irq_affinity", + CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, "Decide base CPU and stride for irqs affinity."); + child = SYSCTL_CHILDREN(tree); + + /* Add base cpu leaf */ + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "base_cpu", + CTLTYPE_S32 | CTLFLAG_RW | CTLFLAG_MPSAFE, adapter, 0, + ena_sysctl_irq_base_cpu, "I", "Base cpu index for setting irq affinity."); + + /* Add cpu stride leaf */ + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "cpu_stride", + CTLTYPE_S32 | CTLFLAG_RW | CTLFLAG_MPSAFE, adapter, 0, + ena_sysctl_irq_cpu_stride, "I", "Distance between irqs when setting affinity."); +} + /* * ena_sysctl_update_queue_node_nb - Register/unregister sysctl queue nodes. @@ -707,6 +741,117 @@ unlock: return (0); } +static int +ena_sysctl_irq_base_cpu(SYSCTL_HANDLER_ARGS) +{ + struct ena_adapter *adapter = arg1; + int irq_base_cpu = 0; + int error; + + ENA_LOCK_LOCK(); + if (unlikely(!ENA_FLAG_ISSET(ENA_FLAG_DEVICE_RUNNING, adapter))) { + error = ENODEV; + goto unlock; + } + + error = sysctl_wire_old_buffer(req, sizeof(irq_base_cpu)); + if (error == 0) { + irq_base_cpu = adapter->irq_cpu_base; + error = sysctl_handle_int(oidp, &irq_base_cpu, 0, req); + } + if (error != 0 || req->newptr == NULL) + goto unlock; + + if (irq_base_cpu <= ENA_BASE_CPU_UNSPECIFIED) { + ena_log(adapter->pdev, ERR, + "Requested base CPU is less than zero.\n"); + error = EINVAL; + goto unlock; + } + + if (irq_base_cpu > mp_ncpus) { + ena_log(adapter->pdev, INFO, + "Requested base CPU is larger than the number of available CPUs. \n"); + error = EINVAL; + goto unlock; + + } + + if (irq_base_cpu == adapter->irq_cpu_base) { + ena_log(adapter->pdev, INFO, + "Requested IRQ base CPU is equal to current value " + "(%d)\n", + adapter->irq_cpu_base); + goto unlock; + } + + ena_log(adapter->pdev, INFO, + "Requested new IRQ base CPU: %d, current value: %d\n", + irq_base_cpu, adapter->irq_cpu_base); + + error = ena_update_base_cpu(adapter, irq_base_cpu); + +unlock: + ENA_LOCK_UNLOCK(); + + return (error); +} + +static int +ena_sysctl_irq_cpu_stride(SYSCTL_HANDLER_ARGS) +{ + struct ena_adapter *adapter = arg1; + int32_t irq_cpu_stride = 0; + int error; + + ENA_LOCK_LOCK(); + if (unlikely(!ENA_FLAG_ISSET(ENA_FLAG_DEVICE_RUNNING, adapter))) { + error = ENODEV; + goto unlock; + } + + error = sysctl_wire_old_buffer(req, sizeof(irq_cpu_stride)); + if (error == 0) { + irq_cpu_stride = adapter->irq_cpu_stride; + error = sysctl_handle_int(oidp, &irq_cpu_stride, 0, req); + } + if (error != 0 || req->newptr == NULL) + goto unlock; + + if (irq_cpu_stride < 0) { + ena_log(adapter->pdev, ERR, + "Requested IRQ stride is less than zero.\n"); + error = EINVAL; + goto unlock; + } + + if (irq_cpu_stride > mp_ncpus) { + ena_log(adapter->pdev, INFO, + "Warning: Requested IRQ stride is larger than the number of available CPUs.\n"); + } + + if (irq_cpu_stride == adapter->irq_cpu_stride) { + ena_log(adapter->pdev, INFO, + "Requested IRQ CPU stride is equal to current value " + "(%u)\n", + adapter->irq_cpu_stride); + goto unlock; + } + + ena_log(adapter->pdev, INFO, + "Requested new IRQ CPU stride: %u, current value: %u\n", + irq_cpu_stride, adapter->irq_cpu_stride); + + error = ena_update_cpu_stride(adapter, irq_cpu_stride); + if (error != 0) + goto unlock; + +unlock: + ENA_LOCK_UNLOCK(); + + return (error); +} + #ifndef RSS /* * Change the Receive Side Scaling hash key. From nobody Sun Jan 14 22:07:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCqCH6DjGz57FtW; Sun, 14 Jan 2024 22:07:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TCqCH4TM2z4KCr; Sun, 14 Jan 2024 22:07:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IUIRcZn/IiZEvnGnKY654vYdztUTa/Bb7CqNwMK0kFM=; b=UmZpmKbwq5n0ZsUJlOxPwxtKEUn8EOKdwWxIiFbyGpQkZBZX4ah6U1oG1H1eoUnmeG38Er ygJaTwzjhdOq9f5kzuWFBAKVbwnTAtzJe6uRbF1dsv16y7soVE7mud5LlEHws8cncSAZAN jEQhmrnyMcFzQ0cj+GSATbbUtCESjk4ZToEAoQPaszWmcxLO+LknorcQEl8hBm9NHaQul8 NdDM0wmiLvSBWWfcArHjXEqyfik65F0o7IQTg51dpoxWIbIMMSh6Agcvq3Q46D1pXX9D0j z9n0AQ/Yz9zn6tHh+ddFyLExvO7mNeYJl3Yso4hGaqJkvhLodHMCB3e3bykaKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IUIRcZn/IiZEvnGnKY654vYdztUTa/Bb7CqNwMK0kFM=; b=ErPjpbPlfaCd8S4wkcezaVyok/ekmKLuPL479AMpsqRjl7CbNs9EPlS7VOGCHk6cMP9JUf n11by3xZIL7FL4OvGB5PysCIFZ4cSfunHAWs7iEwG9rW4NFcPj+MwBYtM9KGMBvEWiLY+M TfPv7l/k8StrGYgzFgjHDWsSLVdmYWVhFq1kDK8cyOhq33k0CqHvqSrfNkJv6ULlalmCJd TmiD6HydrnofSRaNRDnO1dgSSMKLpFEynklk07qyF2tGeVcpTlBuR6veAEnVM0SFdouJhe MKXNIusEutc11UhwkOlc3UnQE02xv0eBGpK6qM7exxND3MP0fNXb3CT2k8s7WQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705270075; a=rsa-sha256; cv=none; b=GZDn86ZLqaP2goc7u4cANtOL+k0LkiCqo7OIfhUQGTK0U6GjAKs8UshCCRu8xVke/X9cow oXIWD5ighPZuU4IAde1nqxTLO8laqeJKMMpG3pdjK8gpaC7v7NN4ZcRU9ZI0N+7ySKaIPr wudxBZbH5kcRjrhpRWgdCfKtznAMMk6NTrKIEHOE72lUBotHfMna5Ts1nGrfO/VyOzQmFy ppWdzyRauoaWqWXzI1gRQdX5EQkOqLp9/uQYUESHNMowBrG0TVaHi69mehRWp5iJIDD+bH y2ULU7BNEVJtq1FxuKyn94M6FRcDMbQGOX/JaCuFcLkLcAejTvo7nW7/EZnw3g== 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 4TCqCH3Zc7zX5M; Sun, 14 Jan 2024 22:07: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 40EM7tSO060098; Sun, 14 Jan 2024 22:07:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40EM7tPf060095; Sun, 14 Jan 2024 22:07:55 GMT (envelope-from git) Date: Sun, 14 Jan 2024 22:07:55 GMT Message-Id: <202401142207.40EM7tPf060095@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: 6e9bfa8040b5 - stable/13 - ena: Change measurement unit of time since last tx cleanup to ms List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6e9bfa8040b59409f6f4d3c963e2221d23487746 Auto-Submitted: auto-generated The branch stable/13 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=6e9bfa8040b59409f6f4d3c963e2221d23487746 commit 6e9bfa8040b59409f6f4d3c963e2221d23487746 Author: Arthur Kiyanovski AuthorDate: 2023-06-14 10:12:16 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 07:43:22 +0000 ena: Change measurement unit of time since last tx cleanup to ms This commit: 1. Sets the time since last cleanup to milliseconds. 2. Fixes incorrect indentations. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 9272e45c04c0d4fcb5d767e962783f3ab192f64e) --- sys/dev/ena/ena.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 7de87e6f3f4d..8b213b250ec7 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -3103,13 +3103,13 @@ check_missing_comp_in_tx_queue(struct ena_adapter *adapter, if (unlikely(time_offset > adapter->missing_tx_timeout)) { if (tx_buf->print_once) { - time_since_last_cleanup = TICKS_2_USEC(ticks - + time_since_last_cleanup = TICKS_2_MSEC(ticks - tx_ring->tx_last_cleanup_ticks); missing_tx_comp_to = sbttoms( adapter->missing_tx_timeout); ena_log(pdev, WARN, "Found a Tx that wasn't completed on time, qid %d, index %d. " - "%d usecs have passed since last cleanup. Missing Tx timeout value %d msecs.\n", + "%d msecs have passed since last cleanup. Missing Tx timeout value %d msecs.\n", tx_ring->qid, i, time_since_last_cleanup, missing_tx_comp_to); } From nobody Sun Jan 14 22:07:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCqCK09xvz57FtY; Sun, 14 Jan 2024 22:07: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 4TCqCJ52SFz4KG0; Sun, 14 Jan 2024 22:07:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SIIyODbzoIg8GynyfjrAbV5xqF+FtQ1G/ADGoQFnMAA=; b=MT3nAoojx4w8BXBHzol7s8oGtBprKgrFD5Ub2I9s1BAqHJ92kEgwpuHSqAWAgO/auIi00f dEhVaA/X7LH9Sj5zF37tQgSHqkX5m1w7dCbFLcRPjbFFZtWwj9fmku2OIO9v9c2PwiIij3 +03Tebu6VQeIcsqg+7TIj6G6MCYRskVHkSU9q/3hqhy0/Ig3Vgv3S7wC6VqgmVgbvgt/K8 KFcr6RzKCsNiTDvCeCfcwrQRvDXABecWvoWtWtkKcoPI0aIVRjI953aWVGRPWGeIYOTorQ mtKJpIOJXgmwvG+pgBT2U35Xmguc9M4wadQk1pfVwETVNkCcoiv8hTBjFoQkNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SIIyODbzoIg8GynyfjrAbV5xqF+FtQ1G/ADGoQFnMAA=; b=CeGOUshcu6hNhH1y38Uf2MiMgkqduy59tpbIZKtPzxisb1paTwGUYovsza/OwmYZuoucmb U3TrUgfkRQYZSQ4taEX3NetfB1+34hXCYnpcsvUMPS3wiooLzu3MBalYzxbkXn2ZqvukHy 9fwoxDHwXj0erWpdzPyBmdWp5ifF+wInW7wHA7xp+BZ5htbsicq7GXBR4oQ08nDJ+WZ9E4 I4yJuSLS8oihr3mtoFmzZ0JJ2FwSq1URjAEuZDnasOHyGx+WO8oSsoAR30BnY0zp30eB+Q piR3hRMz6CqVWthkch1jvrcybAzYWrEdYaZxBrNgAqhK//SD+xHyZVUBJm/sIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705270076; a=rsa-sha256; cv=none; b=T+V+quJG0LCz8MMBurwlLElLDNQ0ZlB5SdNCE/edq8F+uHRqKCGP4xoyX3N8hWO6WPUKbT thoLuDdlN6Pm8ueL/aLMQxkcu69gflI3lmQMMwGH5HhDdKIfomV+xvc5H0B5IL5vOsYpWC LlW3j2vffUnMpaRizux1vCah14NJbUkwzJLoAXKMq558MEYI3ocjx/CSf08N5qHLPxx7LG QPxSXtL/aesiXD93cFE0uSZQzXlKlK1Fbo2RmZvWVBpWNOJZHs5nbBR1T9ueXNtqk3JReh hkWRd6FiugOLyZWI6P1431cTa3gYZ3o0vMDDYHRgFv/yJczs9SREPCU7edlGmA== 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 4TCqCJ47lKzXHL; Sun, 14 Jan 2024 22:07: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 40EM7ucW060140; Sun, 14 Jan 2024 22:07:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40EM7uXw060137; Sun, 14 Jan 2024 22:07:56 GMT (envelope-from git) Date: Sun, 14 Jan 2024 22:07:56 GMT Message-Id: <202401142207.40EM7uXw060137@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: 2f7f8526c38d - stable/13 - ena: Update ena_com_update_intr_reg API usage List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2f7f8526c38db6febb68f66bf9edbf819bc9c8e4 Auto-Submitted: auto-generated The branch stable/13 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=2f7f8526c38db6febb68f66bf9edbf819bc9c8e4 commit 2f7f8526c38db6febb68f66bf9edbf819bc9c8e4 Author: Osama Abboud AuthorDate: 2023-09-11 08:38:39 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 07:43:22 +0000 ena: Update ena_com_update_intr_reg API usage This commit fixes the usage of this function to be compatible with the new API introduced by ena-com update to v2.7.0 Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 72e34ebdd08854dc896f267b0461e241c4040241) --- sys/dev/ena/ena.c | 2 +- sys/dev/ena/ena_datapath.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 8b213b250ec7..f078dbf78060 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -2026,7 +2026,7 @@ ena_unmask_all_io_irqs(struct ena_adapter *adapter) for (i = 0; i < adapter->num_io_queues; i++) { ena_qid = ENA_IO_TXQ_IDX(i); io_cq = &adapter->ena_dev->io_cq_queues[ena_qid]; - ena_com_update_intr_reg(&intr_reg, 0, 0, true); + ena_com_update_intr_reg(&intr_reg, 0, 0, true, false); tx_ring = &adapter->tx_ring[i]; counter_u64_add(tx_ring->tx_stats.unmask_interrupt_num, 1); ena_com_unmask_intr(io_cq, &intr_reg); diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index f10571f7165b..725a6e82094f 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -104,7 +104,7 @@ ena_cleanup(void *arg, int pending) /* Signal that work is done and unmask interrupt */ ena_com_update_intr_reg(&intr_reg, ENA_RX_IRQ_INTERVAL, - ENA_TX_IRQ_INTERVAL, true); + ENA_TX_IRQ_INTERVAL, true, false); counter_u64_add(tx_ring->tx_stats.unmask_interrupt_num, 1); ena_com_unmask_intr(io_cq, &intr_reg); } From nobody Sun Jan 14 22:07:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCqCL2C6lz57G7N; Sun, 14 Jan 2024 22:07: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 4TCqCK66MHz4KP2; Sun, 14 Jan 2024 22:07:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OzbLhYNSj7Kmtc/AIwPX8kyjeLgQ1teyqHntysN3nP0=; b=HD784maJS0rgELfi2I/s1S4biEI8M4rPW6V5eTZ77scpjjUuI5vgWbxixN6XuGpQix+s3P CXw3Z99h5yQl268lHZo4KmppI7f7ZEa3wO75LnYArqXqUAlDljGrW2Mig+kekIAPfZ4+nz YuqbBCWWGYx2yIXuhVdXSTSrSY51Vb7xwo6WufY7dI4w11OdsVRfApQ6VFAe3pcF9bARIx M89CIfMcBMg58ywQhRMMMTl8ONTQu9LVcz9P2M3k+NXvq6Mp2LutxTI3CZ8GPVbPt34ePU hbU6Ac9WM/Y98BPdjqroAuU9+7Z2zzZ2GL9CptEapIL5zLVGJ22vEBJlTEFOIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OzbLhYNSj7Kmtc/AIwPX8kyjeLgQ1teyqHntysN3nP0=; b=n/Pt4esMLsge26fkJOylE3BcWILIg7WqKUT69aDIKV6wWYI01n/8EM98wx3FA0CSZS6gsU YbwTSNK9JxKikiL9/GI4Ap5TEkL30qwO53ix2AILI1+BXVn+0HcLeOSo8Wl5AdDyFoImHB ODNtYXKqZ+a14rNVKr0fAuTj3ehj34NB2pGirZBlaDETH31VTQhBGiwzljhQaDefZVKJNx Y/5MUIsAebdUnqfo8NgouOdl1EIuBNtbZfi7YnFYQ7AYPkfloOri4U2chazNKi8UK6oyro U3XYud/1l0NZPKEa5MSPUlnQw0IR2blUDzRz33564OjHE1TOMMyhbJj0tgjc6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705270077; a=rsa-sha256; cv=none; b=RgjrRipLBNP0Plb7+vqj3k5hncKbkYde57+x73ZibyG6qgDWO3jaw3Mr+HU1wGQr1EYOKK ZawZkT3gmEdkeePKkFwNSNWWivyo7lWTxNT/gOxyXxNvO36pX1XBvbVtOkQ9a8krBkEr8F 3PBI6M0XJTmleTalnfxazosofqIjGGsDZWhIg42QgzcPAPQdgNLkIgzs0+S/i8FaaDev7E PVwMYo33btddr7eIUhG5nrzT8xTo/8B2MSC9KaGkp8/098p29bwUR7/YBeIY8NbpokXVjg LbEtHnBpaazQZ45qVZm36WKjoH2V2ON4+3eHlmn+rkXRhghsGzSGYOH/Qsa2ww== 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 4TCqCK59WCzXHM; Sun, 14 Jan 2024 22:07: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 40EM7v4L060192; Sun, 14 Jan 2024 22:07:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40EM7vcN060189; Sun, 14 Jan 2024 22:07:57 GMT (envelope-from git) Date: Sun, 14 Jan 2024 22:07:57 GMT Message-Id: <202401142207.40EM7vcN060189@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: 026a78a2adb4 - stable/13 - ena: Remove CQ tail pointer update API List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 026a78a2adb461e0f340a5d6f8d7284a0df9da29 Auto-Submitted: auto-generated The branch stable/13 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=026a78a2adb461e0f340a5d6f8d7284a0df9da29 commit 026a78a2adb461e0f340a5d6f8d7284a0df9da29 Author: Osama Abboud AuthorDate: 2023-09-11 08:43:08 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 07:43:23 +0000 ena: Remove CQ tail pointer update API This commit removes the usage of this API from the freebsd driver since the relevant functionality is not supported by the device. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 2835752e075f2fa3edcb596df8306c570ec4cae6) --- sys/dev/ena/ena_datapath.c | 3 --- sys/dev/ena/ena_netmap.c | 1 - 2 files changed, 4 deletions(-) diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index 725a6e82094f..7c30177588b4 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -298,7 +298,6 @@ ena_tx_cleanup(struct ena_ring *tx_ring) ena_com_comp_ack( &adapter->ena_dev->io_sq_queues[ena_qid], total_done); - ena_com_update_dev_comp_head(io_cq); total_done = 0; } } while (likely(--budget)); @@ -313,7 +312,6 @@ ena_tx_cleanup(struct ena_ring *tx_ring) tx_ring->next_to_clean = next_to_clean; ena_com_comp_ack(&adapter->ena_dev->io_sq_queues[ena_qid], total_done); - ena_com_update_dev_comp_head(io_cq); } /* @@ -690,7 +688,6 @@ ena_rx_cleanup(struct ena_ring *rx_ring) ENA_RX_REFILL_THRESH_PACKET); if (refill_required > refill_threshold) { - ena_com_update_dev_comp_head(rx_ring->ena_com_io_cq); ena_refill_rx_bufs(rx_ring, refill_required); } diff --git a/sys/dev/ena/ena_netmap.c b/sys/dev/ena/ena_netmap.c index 3990d1bccd75..f7d7e3d367cb 100644 --- a/sys/dev/ena/ena_netmap.c +++ b/sys/dev/ena/ena_netmap.c @@ -814,7 +814,6 @@ ena_netmap_tx_cleanup(struct ena_netmap_ctx *ctx) /* acknowledge completion of sent packets */ ctx->ring->next_to_clean = ctx->nt; ena_com_comp_ack(ctx->ring->ena_com_io_sq, total_tx_descs); - ena_com_update_dev_comp_head(ctx->ring->ena_com_io_cq); } } From nobody Sun Jan 14 22:07:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCqCM0xCmz57G5Z; Sun, 14 Jan 2024 22:07: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 4TCqCM0LT3z4K7J; Sun, 14 Jan 2024 22:07:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cwd7+gSmkKNYkp9lesI96GDK/WbMvxQ7n/O5oWFWlIY=; b=N5mBZQ0lXYvg6Cw5gVNjt93cIRZ3Uat1fNkLGskeEW9tF/yYUURSH/wy5KY6a+LsC+XUXR obHIz6A2XdtEhWRLtD5QoMn4ezdtVdrQZ3tDcD2MDG75Sta7BRqSMsCIR5DJ60MW3Eo8n2 E5QzQt4BKyVjMRDJaqRu0UI2PhBpq5bqT/RkNpiqVo0xKNFCVoAfFu7ke0Gq38vJkg+Ua5 PmMgclC5iN+4TPZJV4Rolj9LMz2uKVJXRiSoIuEebyrwy65AL9W3c66iM7fF2Uqk4breAd GTzHR1n4L8QTrnbMKRllQBtMIrIfBn6d9CJO85Hhcv1j8pfA4OpL79Kj+uqtmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cwd7+gSmkKNYkp9lesI96GDK/WbMvxQ7n/O5oWFWlIY=; b=e6oA4Fgmxxvh1vwM0E+xdma3Slv3OgxPyKtqra1G8KXJzgB04puCGCPavoYOT1H24Dlldr 7apEVpvXoKS9148T3izTgXgEhDrXul+cPTmkFrDwJaHkGSDhraDoLCE87BWuTj4ZmyYH4Q +wwbhsPIw3bOuBDfPPII8qorkQLM/+UBgBKSq/WMROd74JljKRLQB84cgnYwxX5O9n4hdN 9tsaBdNZJryudXONjMNOf83/Qxmf5alXEdPabuydjrAEnFtoM/AzRbOxq5C2Wbej8Zpy3r OcOcZemGPKNpZqe6OWXB4Mx5IZxOSpeXO07JhCjyU8mkAsKmyr8J7Uy5OVOPaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705270079; a=rsa-sha256; cv=none; b=tqZhtbRbrGrQ1e8+IWZ0fAOYs5/f4PKNKyKkoPZm/2xs+HSCVPU+ir8VATxiK2pn8mKCEf qiIIBE9xzapMDPZypqX65BM2Qxn0f0QiM6++AViN+ZLmbbWwT9pHwgAIH8pkmJGoRLt26T Tl/qfDo4Z8brPjtyp9pQ7bkHmiW1KHqUgtIQhXpbjsyqN4gzxDCQOPJAIROaHbv2oEvEvc 9a3zdfiuB7A+JLuAsP/+4XM5hget4SWu847p/fQG2xVNV9z0w+FZNA06A/EiP0oHKO6Wgj Ic92K5EgZGDh3sb+q1MwK///ol3FVlh4NGfRbMC9bGcMMGtTHpqWQp6jZVCpUA== 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 4TCqCL6V6jzXHN; Sun, 14 Jan 2024 22:07: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 40EM7wM1060243; Sun, 14 Jan 2024 22:07:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40EM7wAF060240; Sun, 14 Jan 2024 22:07:58 GMT (envelope-from git) Date: Sun, 14 Jan 2024 22:07:58 GMT Message-Id: <202401142207.40EM7wAF060240@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: cdf3fb73ae13 - stable/13 - ena: Introduce shared sample interval for all stats List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cdf3fb73ae13214b6575f4761478c5be534cbed9 Auto-Submitted: auto-generated The branch stable/13 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=cdf3fb73ae13214b6575f4761478c5be534cbed9 commit cdf3fb73ae13214b6575f4761478c5be534cbed9 Author: Osama Abboud AuthorDate: 2023-09-12 10:13:48 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 07:43:23 +0000 ena: Introduce shared sample interval for all stats Rename sample_interval node to stats_sample_interval and move it up in the sysctl tree to make it clear that it's relevant for all the stats and not only ENI metrics (Currently, sample interval node is found under eni_metrics node). Path to node: dev.ena..stats_sample_interval Once this parameter is set it will set the sample interval for all the stats node including SRD/customer metrics. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 5b925280d9a54eaefd85827bf6e84049aea8fa98) --- sys/dev/ena/ena.c | 12 ++++++------ sys/dev/ena/ena.h | 4 ++-- sys/dev/ena/ena_sysctl.c | 42 +++++++++++++++++++++--------------------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index f078dbf78060..4ff1cb624a6a 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -3322,19 +3322,19 @@ ena_timer_service(void *data) check_for_empty_rx_ring(adapter); /* - * User controller update of the ENI metrics. + * User controller update of the ENA metrics. * If the delay was set to 0, then the stats shouldn't be updated at * all. - * Otherwise, wait 'eni_metrics_sample_interval' seconds, before + * Otherwise, wait 'metrics_sample_interval' seconds, before * updating stats. * As timer service is executed every second, it's enough to increment * appropriate counter each time the timer service is executed. */ - if ((adapter->eni_metrics_sample_interval != 0) && - (++adapter->eni_metrics_sample_interval_cnt >= - adapter->eni_metrics_sample_interval)) { + if ((adapter->metrics_sample_interval != 0) && + (++adapter->metrics_sample_interval_cnt >= + adapter->metrics_sample_interval)) { taskqueue_enqueue(adapter->metrics_tq, &adapter->metrics_task); - adapter->eni_metrics_sample_interval_cnt = 0; + adapter->metrics_sample_interval_cnt = 0; } diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 3687e9b2522e..fd0c6e3692c7 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -480,8 +480,8 @@ struct ena_adapter { uint32_t missing_tx_threshold; bool disable_meta_caching; - uint16_t eni_metrics_sample_interval; - uint16_t eni_metrics_sample_interval_cnt; + uint16_t metrics_sample_interval; + uint16_t metrics_sample_interval_cnt; /* Statistics */ struct ena_stats_dev dev_stats; diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index 6668f9924787..bcf684e9e0ca 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -48,14 +48,14 @@ static int ena_sysctl_rx_queue_size(SYSCTL_HANDLER_ARGS); static int ena_sysctl_io_queues_nb(SYSCTL_HANDLER_ARGS); static int ena_sysctl_irq_base_cpu(SYSCTL_HANDLER_ARGS); static int ena_sysctl_irq_cpu_stride(SYSCTL_HANDLER_ARGS); -static int ena_sysctl_eni_metrics_interval(SYSCTL_HANDLER_ARGS); +static int ena_sysctl_metrics_interval(SYSCTL_HANDLER_ARGS); #ifndef RSS static int ena_sysctl_rss_key(SYSCTL_HANDLER_ARGS); static int ena_sysctl_rss_indir_table(SYSCTL_HANDLER_ARGS); #endif -/* Limit max ENI sample rate to be an hour. */ -#define ENI_METRICS_MAX_SAMPLE_INTERVAL 3600 +/* Limit max ENA sample rate to be an hour. */ +#define ENA_METRICS_MAX_SAMPLE_INTERVAL 3600 #define ENA_HASH_KEY_MSG_SIZE (ENA_HASH_KEY_SIZE * 2 + 1) static SYSCTL_NODE(_hw, OID_AUTO, ena, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, @@ -368,16 +368,6 @@ ena_sysctl_add_eni_metrics(struct ena_adapter *adapter) SYSCTL_ADD_U64(ctx, eni_list, OID_AUTO, "linklocal_allowance_exceeded", CTLFLAG_RD, &eni_metrics->linklocal_allowance_exceeded, 0, "Linklocal packet rate allowance exceeded"); - - /* - * Tuneable, which determines how often ENI metrics will be read. - * 0 means it's turned off. Maximum allowed value is limited by: - * ENI_METRICS_MAX_SAMPLE_INTERVAL. - */ - SYSCTL_ADD_PROC(ctx, eni_list, OID_AUTO, "sample_interval", - CTLTYPE_U16 | CTLFLAG_RW | CTLFLAG_MPSAFE, adapter, 0, - ena_sysctl_eni_metrics_interval, "SU", - "Interval in seconds for updating ENI emetrics. 0 turns off the update."); } static void @@ -411,6 +401,16 @@ ena_sysctl_add_tuneables(struct ena_adapter *adapter) SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "io_queues_nb", CTLTYPE_U32 | CTLFLAG_RW | CTLFLAG_MPSAFE, adapter, 0, ena_sysctl_io_queues_nb, "I", "Number of IO queues."); + + /* + * Tuneable, which determines how often ENA metrics will be read. + * 0 means it's turned off. Maximum allowed value is limited by: + * ENA_METRICS_MAX_SAMPLE_INTERVAL. + */ + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "stats_sample_interval", + CTLTYPE_U16 | CTLFLAG_RW | CTLFLAG_MPSAFE, adapter, 0, + ena_sysctl_metrics_interval, "SU", + "Interval in seconds for updating Netword interface metrics. 0 turns off the update."); } /* Kernel option RSS prevents manipulation of key hash and indirection table. */ @@ -694,7 +694,7 @@ unlock: } static int -ena_sysctl_eni_metrics_interval(SYSCTL_HANDLER_ARGS) +ena_sysctl_metrics_interval(SYSCTL_HANDLER_ARGS) { struct ena_adapter *adapter = arg1; uint16_t interval; @@ -708,32 +708,32 @@ ena_sysctl_eni_metrics_interval(SYSCTL_HANDLER_ARGS) error = sysctl_wire_old_buffer(req, sizeof(interval)); if (error == 0) { - interval = adapter->eni_metrics_sample_interval; + interval = adapter->metrics_sample_interval; error = sysctl_handle_16(oidp, &interval, 0, req); } if (error != 0 || req->newptr == NULL) goto unlock; - if (interval > ENI_METRICS_MAX_SAMPLE_INTERVAL) { + if (interval > ENA_METRICS_MAX_SAMPLE_INTERVAL) { ena_log(adapter->pdev, ERR, - "ENI metrics update interval is out of range - maximum allowed value: %d seconds\n", - ENI_METRICS_MAX_SAMPLE_INTERVAL); + "ENA metrics update interval is out of range - maximum allowed value: %d seconds\n", + ENA_METRICS_MAX_SAMPLE_INTERVAL); error = EINVAL; goto unlock; } if (interval == 0) { ena_log(adapter->pdev, INFO, - "ENI metrics update is now turned off\n"); + "ENA metrics update is now turned off\n"); bzero(&adapter->eni_metrics, sizeof(adapter->eni_metrics)); } else { ena_log(adapter->pdev, INFO, - "ENI metrics update interval is set to: %" PRIu16 + "ENA metrics update interval is set to: %" PRIu16 " seconds\n", interval); } - adapter->eni_metrics_sample_interval = interval; + adapter->metrics_sample_interval = interval; unlock: ENA_LOCK_UNLOCK(); From nobody Sun Jan 14 22:07:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCqCN3CQrz57G7P; Sun, 14 Jan 2024 22:08: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 4TCqCN1K5bz4KDd; Sun, 14 Jan 2024 22:08:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xNBwT7pkz09KND13g0JuiIj83ZuGgTaWgv/KIpHk+Jc=; b=IFQYrInnKL1eMIOXFLsejqU1rjRFtwyxRnYSU7AjDovAIkqQXNOY/jnC9MjI/JsDVyzkK8 c8of4hJUBHuDLYZgbZPcBKBJ/Pet5jEnAAWoUw1daJnoAzRF5l1j5Ube1hJe7vxaZ6BStp BinbcuJfl0Itejg4gapOtNdPQZ9u3pbFpE7y8ik6lTkxnlI6VlYhR7YTJ5GFP4qaVxDru/ KB+shWNahdT1L1uhisCT1Matjrgk4o6j9HhLL1LDm5F+UWIlVPfhGPtbdRWN7nxRZqFyoZ pLZ+fyQ0vyIMJTZE2D6PZmrRgCYJmpW7cXYWTZ4pID/TAbpNwRbC1QzY4WUujw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xNBwT7pkz09KND13g0JuiIj83ZuGgTaWgv/KIpHk+Jc=; b=WTfVvd39j3NdVUBoH8GPovr5QOhJbTs4gGBeT5HI7sumXH8OTIr6OMwaaIjIi4vaBbgabk GenStqcYyBTxgw1eLMQXtbx3IgsYwtlYxiTHRn0HsRKlDfrulg5PQ0WV+Cz2BZn+e/CWjU oTXvaUVRV6JUAlliZI5r77Rv7ICF8cJDN6z4apvvGXQNNgcFEDq0mPWsrDrPBjP+lDDoL8 b7Jw800YVdKXRVb8bI9IW28nV21rk56k0PbcCjlhveI85ypFVUUmkdoe2Pvz4dCZlIenT0 qFl4XDpsnjUs1yUHdqPzx7ovaz8LjlT0qeboPMH1RPCYPR/uxFPIoGZhHfkW8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705270080; a=rsa-sha256; cv=none; b=PbNJwDpWU7xQyoVLPdZYgemMlb42N1df8TaWrQ+0gvUmAdLlIebDkeub9mrKLumql3DsZj cJgbkSWVDFMpMP2xJ+dUB1joGkYe8hVrs2kP05M0l+umBtCmnms4znc/14Sw8zV52DmxYY 3T5ixt+AJYKIQTw4tYkOGANf3d7FXjs6clRh+LijGXM2h0dvVd63Rebmc0PKZjZlX2edGF dVCBbZXcst5PKWPOePVN0vyNquVmhsnsiBKgW+V/79wfm8MOj2gt9XodasHXgQrkCW/sGk A3F8avNAeGePALUleSO7z32XWzyq1b5c9C6PRBb6sa3eiaiGQ+g4WwX9aDuqVw== 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 4TCqCN0QFvzX3P; Sun, 14 Jan 2024 22:08: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 40EM7xtO060295; Sun, 14 Jan 2024 22:07:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40EM7xrQ060292; Sun, 14 Jan 2024 22:07:59 GMT (envelope-from git) Date: Sun, 14 Jan 2024 22:07:59 GMT Message-Id: <202401142207.40EM7xrQ060292@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: 86f779a18c0d - stable/13 - ena: Support customer metric with sysctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 86f779a18c0d6efb722b4763c1fa158626382ba3 Auto-Submitted: auto-generated The branch stable/13 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=86f779a18c0d6efb722b4763c1fa158626382ba3 commit 86f779a18c0d6efb722b4763c1fa158626382ba3 Author: Osama Abboud AuthorDate: 2023-09-12 10:17:03 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 07:43:23 +0000 ena: Support customer metric with sysctl This commit adds sysctl support for customer metrics. Different customer metrics can be found in the following sysctl node: sysctl dev.ena..customer_metrics Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit f97993ad7b9c9e4787bd198d11f348c271af513e) --- sys/dev/ena/ena.c | 49 +++++++++++++++++++++++++-- sys/dev/ena/ena.h | 1 + sys/dev/ena/ena_sysctl.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++- sys/dev/ena/ena_sysctl.h | 1 + 4 files changed, 135 insertions(+), 3 deletions(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 4ff1cb624a6a..72db1a9d99cb 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -166,6 +166,7 @@ static int ena_enable_msix_and_set_admin_interrupts(struct ena_adapter *); static void ena_update_on_link_change(void *, struct ena_admin_aenq_entry *); static void unimplemented_aenq_handler(void *, struct ena_admin_aenq_entry *); static int ena_copy_eni_metrics(struct ena_adapter *); +static int ena_copy_customer_metrics(struct ena_adapter *); static void ena_timer_service(void *); static char ena_version[] = ENA_DEVICE_NAME ENA_DRV_MODULE_NAME @@ -3306,6 +3307,25 @@ ena_copy_eni_metrics(struct ena_adapter *adapter) return (rc); } +static int +ena_copy_customer_metrics(struct ena_adapter *adapter) +{ + struct ena_com_dev *dev; + u32 supported_metrics_count; + int rc, len; + + dev = adapter->ena_dev; + + supported_metrics_count = ena_com_get_customer_metric_count(dev); + len = supported_metrics_count * sizeof(u64); + + /* Fill the data buffer */ + rc = ena_com_get_customer_metrics(adapter->ena_dev, + (char *)(adapter->customer_metrics_array), len); + + return (rc); +} + static void ena_timer_service(void *data) { @@ -3543,7 +3563,12 @@ ena_metrics_task(void *arg, int pending) struct ena_adapter *adapter = (struct ena_adapter *)arg; ENA_LOCK_LOCK(); - (void)ena_copy_eni_metrics(adapter); + + if (ena_com_get_cap(adapter->ena_dev, ENA_ADMIN_CUSTOMER_METRICS)) + (void)ena_copy_customer_metrics(adapter); + else if (ena_com_get_cap(adapter->ena_dev, ENA_ADMIN_ENI_STATS)) + (void)ena_copy_eni_metrics(adapter); + ENA_LOCK_UNLOCK(); } @@ -3757,6 +3782,18 @@ ena_attach(device_t pdev) /* initialize rings basic information */ ena_init_io_rings(adapter); + rc = ena_com_allocate_customer_metrics_buffer(ena_dev); + if (rc) { + ena_log(pdev, ERR, "Failed to allocate customer metrics buffer.\n"); + goto err_msix_free; + } + + rc = ena_sysctl_allocate_customer_metrics_buffer(adapter); + if (unlikely(rc)){ + ena_log(pdev, ERR, "Failed to allocate sysctl customer metrics buffer.\n"); + goto err_metrics_buffer_destroy; + } + /* Initialize statistics */ ena_alloc_counters((counter_u64_t *)&adapter->dev_stats, sizeof(struct ena_stats_dev)); @@ -3768,7 +3805,7 @@ ena_attach(device_t pdev) rc = ena_setup_ifnet(pdev, adapter, &get_feat_ctx); if (unlikely(rc != 0)) { ena_log(pdev, ERR, "Error with network interface setup\n"); - goto err_msix_free; + goto err_customer_metrics_alloc; } /* Initialize reset task queue */ @@ -3806,6 +3843,10 @@ ena_attach(device_t pdev) err_detach: ether_ifdetach(adapter->ifp); #endif /* DEV_NETMAP */ +err_customer_metrics_alloc: + free(adapter->customer_metrics_array, M_DEVBUF); +err_metrics_buffer_destroy: + ena_com_delete_customer_metrics_buffer(ena_dev); err_msix_free: ena_free_stats(adapter); ena_com_dev_reset(adapter->ena_dev, ENA_REGS_RESET_INIT_ERR); @@ -3904,6 +3945,10 @@ ena_detach(device_t pdev) ena_com_delete_host_info(ena_dev); + free(adapter->customer_metrics_array, M_DEVBUF); + + ena_com_delete_customer_metrics_buffer(ena_dev); + if_free(adapter->ifp); free(ena_dev->bus, M_DEVBUF); diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index fd0c6e3692c7..18988d719a18 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -487,6 +487,7 @@ struct ena_adapter { struct ena_stats_dev dev_stats; struct ena_hw_stats hw_stats; struct ena_admin_eni_stats eni_metrics; + uint64_t *customer_metrics_array; enum ena_regs_reset_reason_types reset_reason; }; diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index bcf684e9e0ca..edae5c3c23fa 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -37,6 +37,7 @@ static void ena_sysctl_add_wd(struct ena_adapter *); static void ena_sysctl_add_stats(struct ena_adapter *); static void ena_sysctl_add_eni_metrics(struct ena_adapter *); +static void ena_sysctl_add_customer_metrics(struct ena_adapter *); static void ena_sysctl_add_tuneables(struct ena_adapter *); static void ena_sysctl_add_irq_affinity(struct ena_adapter *); /* Kernel option RSS prevents manipulation of key hash and indirection table. */ @@ -58,6 +59,39 @@ static int ena_sysctl_rss_indir_table(SYSCTL_HANDLER_ARGS); #define ENA_METRICS_MAX_SAMPLE_INTERVAL 3600 #define ENA_HASH_KEY_MSG_SIZE (ENA_HASH_KEY_SIZE * 2 + 1) +#define SYSCTL_GSTRING_LEN 64 + +#define ENA_METRIC_ENI_ENTRY(stat, desc) { \ + .name = #stat, \ + .description = #desc, \ +} + +struct ena_hw_metrics { + char name[SYSCTL_GSTRING_LEN]; + char description[SYSCTL_GSTRING_LEN]; +}; + +static const struct ena_hw_metrics ena_hw_stats_strings[] = { + ENA_METRIC_ENI_ENTRY( + bw_in_allowance_exceeded, Inbound BW allowance exceeded), + ENA_METRIC_ENI_ENTRY( + bw_out_allowance_exceeded, Outbound BW allowance exceeded), + ENA_METRIC_ENI_ENTRY( + pps_allowance_exceeded, PPS allowance exceeded), + ENA_METRIC_ENI_ENTRY( + conntrack_allowance_exceeded, Connection tracking allowance exceeded), + ENA_METRIC_ENI_ENTRY( + linklocal_allowance_exceeded, Linklocal packet rate allowance), + ENA_METRIC_ENI_ENTRY( + conntrack_allowance_available, Number of available conntracks), +}; + +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) +#endif + +#define ENA_CUSTOMER_METRICS_ARRAY_SIZE ARRAY_SIZE(ena_hw_stats_strings) + static SYSCTL_NODE(_hw, OID_AUTO, ena, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "ENA driver parameters"); @@ -98,12 +132,29 @@ SYSCTL_BOOL(_hw_ena, OID_AUTO, force_large_llq_header, CTLFLAG_RDTUN, int ena_rss_table_size = ENA_RX_RSS_TABLE_SIZE; +int ena_sysctl_allocate_customer_metrics_buffer(struct ena_adapter *adapter) +{ + int rc = 0; + + adapter->customer_metrics_array = malloc((sizeof(u64) * ENA_CUSTOMER_METRICS_ARRAY_SIZE), + M_DEVBUF, M_NOWAIT | M_ZERO); + if (unlikely(adapter->customer_metrics_array == NULL)) + rc = ENOMEM; + + return rc; +} void ena_sysctl_add_nodes(struct ena_adapter *adapter) { + struct ena_com_dev *dev = adapter->ena_dev; + + if (ena_com_get_cap(dev, ENA_ADMIN_CUSTOMER_METRICS)) + ena_sysctl_add_customer_metrics(adapter); + else if (ena_com_get_cap(dev, ENA_ADMIN_ENI_STATS)) + ena_sysctl_add_eni_metrics(adapter); + ena_sysctl_add_wd(adapter); ena_sysctl_add_stats(adapter); - ena_sysctl_add_eni_metrics(adapter); ena_sysctl_add_tuneables(adapter); ena_sysctl_add_irq_affinity(adapter); #ifndef RSS @@ -328,6 +379,40 @@ ena_sysctl_add_stats(struct ena_adapter *adapter) &admin_stats->no_completion, 0, "Commands not completed"); } +static void +ena_sysctl_add_customer_metrics(struct ena_adapter *adapter) +{ + device_t dev; + struct ena_com_dev *ena_dev; + + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; + struct sysctl_oid_list *child; + + struct sysctl_oid *customer_metric; + struct sysctl_oid_list *customer_list; + + int i; + + dev = adapter->pdev; + ena_dev = adapter->ena_dev; + + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); + child = SYSCTL_CHILDREN(tree); + customer_metric = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "customer_metrics", + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "ENA's customer metrics"); + customer_list = SYSCTL_CHILDREN(customer_metric); + + for (i = 0; i < ENA_CUSTOMER_METRICS_ARRAY_SIZE; i++) { + if (ena_com_get_customer_metric_support(ena_dev, i)) { + SYSCTL_ADD_U64(ctx, customer_list, OID_AUTO, ena_hw_stats_strings[i].name, + CTLFLAG_RD, &adapter->customer_metrics_array[i], 0, + ena_hw_stats_strings[i].description); + } + } +} + static void ena_sysctl_add_eni_metrics(struct ena_adapter *adapter) { diff --git a/sys/dev/ena/ena_sysctl.h b/sys/dev/ena/ena_sysctl.h index 188c3a61a3d2..e9b4bfaae1cb 100644 --- a/sys/dev/ena/ena_sysctl.h +++ b/sys/dev/ena/ena_sysctl.h @@ -40,6 +40,7 @@ void ena_sysctl_add_nodes(struct ena_adapter *adapter); void ena_sysctl_update_queue_node_nb(struct ena_adapter *adapter, int old, int new); +int ena_sysctl_allocate_customer_metrics_buffer(struct ena_adapter *adapter); extern int ena_enable_9k_mbufs; #define ena_mbuf_sz (ena_enable_9k_mbufs ? MJUM9BYTES : MJUMPAGESIZE) From nobody Sun Jan 14 22:08:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCqCP4Mgzz57G5d; Sun, 14 Jan 2024 22:08: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 4TCqCP2nGJz4K7p; Sun, 14 Jan 2024 22:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yF/D6jH9qepvFX0gdtie+rbtHm68+ozgPsUvDG3eZxA=; b=skrMELLhZtMas0Hd+rW01ky12Hze2Or6Q3iOMJSrBAEIS+2if9BtE1aMNdhYREsN2RlPB1 dXWxVUQcDbjNMTrPtQcQUirDVWe/ijJy708nzLfoE6Gtx4uPBI1BrUKsbxcIPmhzDLKTtF aQGih88tXQ5ryLspHAAe+aH94EyTdTSqYmlZdGuMBD4rdrxJo522fhbB2PHuq/TcTHYazf J7U60qA3W7H4UmC5VTWBAMGvJLMZx3OWZj3WvbrLqqRZTgfhZGVVYfPNKLKl3KvQhTf78g W3hMU0r8aX2j4FqUh2Y+EZfji6PXFUXt1p0xBAxMGWPeuePpfYnBVw8PdI2cdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yF/D6jH9qepvFX0gdtie+rbtHm68+ozgPsUvDG3eZxA=; b=FO6915uyGR3mqKNRfL8V/LDOZsvziBZ5fHx9mJxzTkhSg+tyTWuH7PUM8EW9a6K6L2Gv9B CKJCrwqSF/HZk2Ag+Kq8idydg+RuPnf3mwAGavjwOibjffocUBoIUnIfgzdSIVSwiSe7OM A4eMLqzUT7vVsH8B3r0izHx3Ka1YrnoHC2Vxrn9R1BhQImSRYOH8+3VfCZI/fGC58qkkRH yH8mCJCNuz1MJRk7LNm2j5yQDWCxiB/n6VFup+3TUv9idvJi7NwyEKvCjlYU7av+OHqM/a jT5IvWBFA4e1W4QsWDnhFllGo3wIsa3j2lFxNb+NXCz3CnOxGk88Bg/vay3mrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705270081; a=rsa-sha256; cv=none; b=GQ7SHSN5o42UtcYBEpdRaYaou0u9HyLqwSLL7hhGYlLSlLpKKnXNfI0YZExkzTQDjzHDu9 DmMfKKMdXOlTkNq/Sfa77zmLPjYQFvcoBhyXHR1JtlyJjb2/l5wA5R4P1haXQNbK4fFBqU +LFFe0PpMg7WphNfJRGZqogZKjUoz97MEQtvJbrX0Qj7/9HjrhkAXfZt9KTuvaCt1yWVj1 q//vPIGGe5MIBTTfLP5IuYqDP8XZmvbBewHNEDWpRg8lrtFv+7R/nfwyyy5tBkQyuek+8q WrGh5BIksPh8htNWWhl2clGeiGyzj/BcIcwPYlTw/vX2M3tXIgBWw8t33yJkVQ== 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 4TCqCP1RHLzXB9; Sun, 14 Jan 2024 22:08: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 40EM81WI060348; Sun, 14 Jan 2024 22:08:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40EM81E2060345; Sun, 14 Jan 2024 22:08:01 GMT (envelope-from git) Date: Sun, 14 Jan 2024 22:08:01 GMT Message-Id: <202401142208.40EM81E2060345@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: be6292777476 - stable/13 - ena: Support srd metrics with sysctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: be62927774761ff99dda241e6b3e3e0d8b91fb05 Auto-Submitted: auto-generated The branch stable/13 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=be62927774761ff99dda241e6b3e3e0d8b91fb05 commit be62927774761ff99dda241e6b3e3e0d8b91fb05 Author: Osama Abboud AuthorDate: 2023-09-12 11:17:45 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 07:43:23 +0000 ena: Support srd metrics with sysctl This commit introduces SRD metrics through sysctl. The metrics can be queried using the following sysctl node: sysctl dev.ena..ena_srd_info Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 36d42c862f4a5643f6e2395e8d7b7e5c4580499a) --- sys/dev/ena/ena.c | 10 +++++++ sys/dev/ena/ena.h | 1 + sys/dev/ena/ena_sysctl.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 86 insertions(+), 1 deletion(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 72db1a9d99cb..a61635aa8c80 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -166,6 +166,7 @@ static int ena_enable_msix_and_set_admin_interrupts(struct ena_adapter *); static void ena_update_on_link_change(void *, struct ena_admin_aenq_entry *); static void unimplemented_aenq_handler(void *, struct ena_admin_aenq_entry *); static int ena_copy_eni_metrics(struct ena_adapter *); +static int ena_copy_srd_metrics(struct ena_adapter *); static int ena_copy_customer_metrics(struct ena_adapter *); static void ena_timer_service(void *); @@ -3307,6 +3308,12 @@ ena_copy_eni_metrics(struct ena_adapter *adapter) return (rc); } +static int +ena_copy_srd_metrics(struct ena_adapter *adapter) +{ + return ena_com_get_ena_srd_info(adapter->ena_dev, &adapter->ena_srd_info); +} + static int ena_copy_customer_metrics(struct ena_adapter *adapter) { @@ -3569,6 +3576,9 @@ ena_metrics_task(void *arg, int pending) else if (ena_com_get_cap(adapter->ena_dev, ENA_ADMIN_ENI_STATS)) (void)ena_copy_eni_metrics(adapter); + if (ena_com_get_cap(adapter->ena_dev, ENA_ADMIN_ENA_SRD_INFO)) + (void)ena_copy_srd_metrics(adapter); + ENA_LOCK_UNLOCK(); } diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 18988d719a18..5647fe973502 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -487,6 +487,7 @@ struct ena_adapter { struct ena_stats_dev dev_stats; struct ena_hw_stats hw_stats; struct ena_admin_eni_stats eni_metrics; + struct ena_admin_ena_srd_info ena_srd_info; uint64_t *customer_metrics_array; enum ena_regs_reset_reason_types reset_reason; diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index edae5c3c23fa..fd5545dbe5fb 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -38,6 +38,7 @@ static void ena_sysctl_add_wd(struct ena_adapter *); static void ena_sysctl_add_stats(struct ena_adapter *); static void ena_sysctl_add_eni_metrics(struct ena_adapter *); static void ena_sysctl_add_customer_metrics(struct ena_adapter *); +static void ena_sysctl_add_srd_info(struct ena_adapter *); static void ena_sysctl_add_tuneables(struct ena_adapter *); static void ena_sysctl_add_irq_affinity(struct ena_adapter *); /* Kernel option RSS prevents manipulation of key hash and indirection table. */ @@ -59,18 +60,46 @@ static int ena_sysctl_rss_indir_table(SYSCTL_HANDLER_ARGS); #define ENA_METRICS_MAX_SAMPLE_INTERVAL 3600 #define ENA_HASH_KEY_MSG_SIZE (ENA_HASH_KEY_SIZE * 2 + 1) -#define SYSCTL_GSTRING_LEN 64 +#define SYSCTL_GSTRING_LEN 128 #define ENA_METRIC_ENI_ENTRY(stat, desc) { \ .name = #stat, \ .description = #desc, \ } +#define ENA_STAT_ENTRY(stat, desc, stat_type) { \ + .name = #stat, \ + .description = #desc, \ + .stat_offset = offsetof(struct ena_admin_##stat_type, stat) / sizeof(u64), \ +} + +#define ENA_STAT_ENA_SRD_ENTRY(stat, desc) \ + ENA_STAT_ENTRY(stat, desc, ena_srd_stats) + struct ena_hw_metrics { char name[SYSCTL_GSTRING_LEN]; char description[SYSCTL_GSTRING_LEN]; }; +struct ena_srd_metrics { + char name[SYSCTL_GSTRING_LEN]; + char description[SYSCTL_GSTRING_LEN]; + int stat_offset; +}; + +static const struct ena_srd_metrics ena_srd_stats_strings[] = { + ENA_STAT_ENA_SRD_ENTRY( + ena_srd_tx_pkts, Number of packets transmitted over ENA SRD), + ENA_STAT_ENA_SRD_ENTRY( + ena_srd_eligible_tx_pkts, Number of packets transmitted or could + have been transmitted over ENA SRD), + ENA_STAT_ENA_SRD_ENTRY( + ena_srd_rx_pkts, Number of packets received over ENA SRD), + ENA_STAT_ENA_SRD_ENTRY( + ena_srd_resource_utilization, Percentage of the ENA SRD resources + that are in use), +}; + static const struct ena_hw_metrics ena_hw_stats_strings[] = { ENA_METRIC_ENI_ENTRY( bw_in_allowance_exceeded, Inbound BW allowance exceeded), @@ -91,6 +120,7 @@ static const struct ena_hw_metrics ena_hw_stats_strings[] = { #endif #define ENA_CUSTOMER_METRICS_ARRAY_SIZE ARRAY_SIZE(ena_hw_stats_strings) +#define ENA_SRD_METRICS_ARRAY_SIZE ARRAY_SIZE(ena_srd_stats_strings) static SYSCTL_NODE(_hw, OID_AUTO, ena, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "ENA driver parameters"); @@ -153,6 +183,9 @@ ena_sysctl_add_nodes(struct ena_adapter *adapter) else if (ena_com_get_cap(dev, ENA_ADMIN_ENI_STATS)) ena_sysctl_add_eni_metrics(adapter); + if (ena_com_get_cap(adapter->ena_dev, ENA_ADMIN_ENA_SRD_INFO)) + ena_sysctl_add_srd_info(adapter); + ena_sysctl_add_wd(adapter); ena_sysctl_add_stats(adapter); ena_sysctl_add_tuneables(adapter); @@ -379,6 +412,47 @@ ena_sysctl_add_stats(struct ena_adapter *adapter) &admin_stats->no_completion, 0, "Commands not completed"); } +static void +ena_sysctl_add_srd_info(struct ena_adapter *adapter) +{ + device_t dev; + + struct sysctl_oid *ena_srd_info; + struct sysctl_oid_list *srd_list; + + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; + struct sysctl_oid_list *child; + + struct ena_admin_ena_srd_stats *srd_stats_ptr; + struct ena_srd_metrics cur_stat_strings; + + int i; + + dev = adapter->pdev; + + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); + child = SYSCTL_CHILDREN(tree); + + ena_srd_info = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "ena_srd_info", + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "ENA's SRD information"); + srd_list = SYSCTL_CHILDREN(ena_srd_info); + + SYSCTL_ADD_U64(ctx, srd_list, OID_AUTO, "ena_srd_mode", + CTLFLAG_RD, &adapter->ena_srd_info.flags, 0, + "Describes which ENA-express features are enabled"); + + srd_stats_ptr = &adapter->ena_srd_info.ena_srd_stats; + + for (i = 0 ; i < ENA_SRD_METRICS_ARRAY_SIZE; i++) { + cur_stat_strings = ena_srd_stats_strings[i]; + SYSCTL_ADD_U64(ctx, srd_list, OID_AUTO, cur_stat_strings.name, + CTLFLAG_RD, (u64 *)srd_stats_ptr + cur_stat_strings.stat_offset, + 0, cur_stat_strings.description); + } +} + static void ena_sysctl_add_customer_metrics(struct ena_adapter *adapter) { From nobody Sun Jan 14 22:08:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCqCQ4XMXz57G7T; Sun, 14 Jan 2024 22:08:02 +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 4TCqCQ3Qclz4KPp; Sun, 14 Jan 2024 22:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zF9SAZ6I++SE4WaWlrtlHEFiX240JpzwDt/3rppIiGI=; b=ZdzedZTH15ZvBq3kSHE8JOvFxgKj2b9Cf7+ohaNSWAyjI1jnEBJL74V9E9cPuj9Oh7AZ6V KlZ/uov1UdyMZxJtNibEN9lA6moGfPINyH/RJ+OkeZbTgtHQkER1XOfz3iXvOkHYXnhi3t lngCTGbcnY8pdFQC9AiG72KUY8rxgbAsBe1CA4+Nlj8fu4tl6zNzehlAzZFU9BXJXvJz5p q1Z4B27B3uUYGjN3CNbjxy3OInkh+c+JYhzYig6cLD+G66cpxBUd5LT15hzz391olu58vh uE8tcdVNTA3ZQtkcQGTJvbkiaeTQpk0+9USbVo+K+c7aEwhpZjm4NzmLFzDLjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zF9SAZ6I++SE4WaWlrtlHEFiX240JpzwDt/3rppIiGI=; b=iCxIz8AkgPRDShSjRcUaeHQjNoqoPvTiNA/d8OsbyJ0NORjp11LfBm0UrYRWMF4/82SH1T E+vCHCgp0ecSqmhwVXep2ZaTzVAipwo9Mj1l2F4vlkMOzwqlDm5wdL8cFaX3V0nfbnZFCl fCTfCD2qMoMMnNGseAJL6/IPfmhBcVIhwOR5nLNUHRfqsmriI5kjoZR+ADL5wePAOmLaR2 Ak2/41VQZxZfaazwbJqGx7dKWsOIzaTlHAI1ek0DWeiibqoHd/3xTYN1x3+/VTkQxzwDr7 ERnhN16N2fZdTNuzI6VG3OyS027Hy4Sty7zclnlWIHIpjUJGEBfyUu4SoxgutQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705270082; a=rsa-sha256; cv=none; b=JdLmpdgX7LVrR+KyNR+OvEkySMqZXWbNPs9T24mjIR0WMqyzmsvHKrC3Bek2zOUZWub+54 5pc3Dl1QQr1hm0VLh0w7SQvivbvqB5vl6F3B7euGgZSJKfO+9CDtEE06F6bThp9xy5wi+9 9QD65F7VW7LpLawqZadOIHErtMLX9V89Q6hckf96cUQtTZi2L6+i4A+Tx06d4HcZo8b+7p kqjWYpm/vpw85CzFPzP5Fq7nzpnEE0zS/BqDbI/dQcICcbgU0ECCcZPRihXiAT9fp4gsMI 0xwUTtZky7TZe36+UWNipJOMzmbvcihpdqgZY57gZwmAubhcQzw2k9bm9in6zA== 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 4TCqCQ2XVjzWKf; Sun, 14 Jan 2024 22:08: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 40EM825E060396; Sun, 14 Jan 2024 22:08:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40EM82HW060393; Sun, 14 Jan 2024 22:08:02 GMT (envelope-from git) Date: Sun, 14 Jan 2024 22:08:02 GMT Message-Id: <202401142208.40EM82HW060393@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: ba2007c083ef - stable/13 - ena: Update the license dating to 2023 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ba2007c083ef3e3fdede46072af30b164abbe4b6 Auto-Submitted: auto-generated The branch stable/13 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=ba2007c083ef3e3fdede46072af30b164abbe4b6 commit ba2007c083ef3e3fdede46072af30b164abbe4b6 Author: Osama Abboud AuthorDate: 2023-10-23 17:16:38 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 07:43:23 +0000 ena: Update the license dating to 2023 Some of the files are using outdated linceses. Update the license to be 2023. Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 246aa273244e91a30d70997a3be790a29f9eb29c) --- share/man/man4/ena.4 | 2 +- sys/dev/ena/ena.c | 2 +- sys/dev/ena/ena.h | 2 +- sys/dev/ena/ena_datapath.c | 2 +- sys/dev/ena/ena_datapath.h | 2 +- sys/dev/ena/ena_netmap.c | 2 +- sys/dev/ena/ena_netmap.h | 2 +- sys/dev/ena/ena_rss.c | 2 +- sys/dev/ena/ena_rss.h | 2 +- sys/dev/ena/ena_sysctl.c | 2 +- sys/dev/ena/ena_sysctl.h | 2 +- sys/modules/ena/Makefile | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/share/man/man4/ena.4 b/share/man/man4/ena.4 index d876aa61a1f4..4f3d03745467 100644 --- a/share/man/man4/ena.4 +++ b/share/man/man4/ena.4 @@ -1,6 +1,6 @@ .\" SPDX-License-Identifier: BSD-2-Clause .\" -.\" Copyright (c) 2015-2022 Amazon.com, Inc. or its affiliates. +.\" Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index a61635aa8c80..fd4bca93ad93 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2021 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 5647fe973502..2c758d37622f 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2020 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index 7c30177588b4..f93b5fc6bd48 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2020 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_datapath.h b/sys/dev/ena/ena_datapath.h index c6166a806c6a..43292b5abbe9 100644 --- a/sys/dev/ena/ena_datapath.h +++ b/sys/dev/ena/ena_datapath.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2020 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_netmap.c b/sys/dev/ena/ena_netmap.c index f7d7e3d367cb..27e306c5a2ac 100644 --- a/sys/dev/ena/ena_netmap.c +++ b/sys/dev/ena/ena_netmap.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2020 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_netmap.h b/sys/dev/ena/ena_netmap.h index aa4d0d3d815a..598fcf1f08b2 100644 --- a/sys/dev/ena/ena_netmap.h +++ b/sys/dev/ena/ena_netmap.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2020 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_rss.c b/sys/dev/ena/ena_rss.c index ce21a0a8950e..d90a7fbb253a 100644 --- a/sys/dev/ena/ena_rss.c +++ b/sys/dev/ena/ena_rss.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2021 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_rss.h b/sys/dev/ena/ena_rss.h index 20dc41cc64a4..1c1c89261b35 100644 --- a/sys/dev/ena/ena_rss.h +++ b/sys/dev/ena/ena_rss.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2021 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c index fd5545dbe5fb..ea651837ebb6 100644 --- a/sys/dev/ena/ena_sysctl.c +++ b/sys/dev/ena/ena_sysctl.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2021 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ena/ena_sysctl.h b/sys/dev/ena/ena_sysctl.h index e9b4bfaae1cb..4f5834214005 100644 --- a/sys/dev/ena/ena_sysctl.h +++ b/sys/dev/ena/ena_sysctl.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2015-2021 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/modules/ena/Makefile b/sys/modules/ena/Makefile index 95326888cc6c..f8b71588afa1 100644 --- a/sys/modules/ena/Makefile +++ b/sys/modules/ena/Makefile @@ -1,7 +1,7 @@ # # SPDX-License-Identifier: BSD-2-Clause # -# Copyright (c) 2015-2020 Amazon.com, Inc. or its affiliates. +# Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates. # All rights reserved. # # Redistribution and use in source and binary forms, with or without From nobody Sun Jan 14 22:08:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TCqCR75RDz57G37; Sun, 14 Jan 2024 22:08: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 4TCqCR5YB1z4KNP; Sun, 14 Jan 2024 22:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y2ciTP6FjNncXI90YmSETiBksHG8zv9OxlTnLSTbgtY=; b=pJtwq9tVt7vg0NiIJbJc7CSTtjD5aStyc6xbFFdoJIRZgVGcHE9/3um9cI3CXW9hYsp7i6 l8ByxPGwGSG7FpCxw0QXzXrpxBPvWQ2iIzAIddik7PbovgrcSouPQrQShAotSQmhBUEb3q x+skDzy67hXvefm1qliRkzwTTG+0tiAsmWzdTfaUWBD8kKhXCD6IXPRzI51z51mnuTtqLD UbTELzL2sXhh6JaYX92ccRtRNWlWIFExHaeLSXmsrNstoo1B/GlhJJZs92dQtaAPigRxwQ nbe/bjkIq+6GQ1ilRMx5G9hPIdhIQ3uWy+4P445QYF12pPfcAFCmf2tSz/wy0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705270083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y2ciTP6FjNncXI90YmSETiBksHG8zv9OxlTnLSTbgtY=; b=G7POA20m+q6w2QRA9hjicSLVZ7F9eOY9obIGGoeRlgT0jY+L5FkN6Gjv0XB2+KWG1knPna uZpmw7MnzTIFYLZsCl0Wgd2SIAiaSGoPbYr01wMModEtsst4XaFgal/CACeGkrWugvcx/h 0JfGkvVOeDT+evDVQVWU2bVTt30iK2vfHfW0K0J5YivfUI2lddxoW+lJKA5cI7DnRCFhTS +rv/FILY6p6QXGExPInEMjLM8XvfLJPF1I06/IUEZtCaMLh2/B+HG1J39WLCfwPRRvpBPG 1xY4vFbO6gksjH1opq5VljvZKBAup3+y0iucjMH8nunsiiUovvAx87/hgGFaWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705270083; a=rsa-sha256; cv=none; b=POV5cRLpFgJL2IX9NblB2BA+0CO4bQYwaExEL8MBUkIeTAQyJsJ3d9OpF+81bkK0pWoDya /sez5Rfzdgyr0DwjWE43/K8rmfR0toTuqjgq+XzP9dv+9yxlUXU5p+DmVqIFgR29QVp5ZJ qAHjTItOVk4AnxysMzEw6d411iKlXrdSclhDUK6KcB6W7QSVJ/rP4yhjzdwRM9tYd3qxyy AOwFQMgCymcOGQgTDsVTr/hzWEdl83/HVJDVGRXJR8P13WbzpH1LyZftJVjf6/+mh2tOAE hKkejXaZqHQQ/bIFoXBsiUNgbd/r9j/k4TSCbuuRForqdTa+tqQz5k7P28L3Sw== 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 4TCqCR3cLJzWKg; Sun, 14 Jan 2024 22:08: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 40EM83ho060441; Sun, 14 Jan 2024 22:08:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40EM83JL060438; Sun, 14 Jan 2024 22:08:03 GMT (envelope-from git) Date: Sun, 14 Jan 2024 22:08:03 GMT Message-Id: <202401142208.40EM83JL060438@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Arthur Kiyanovski Subject: git: c8a0dbcaff3f - stable/13 - ena: Update driver version to v2.7.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: akiyano X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c8a0dbcaff3f17a94589a957aafdfa3ab5c9d235 Auto-Submitted: auto-generated The branch stable/13 has been updated by akiyano: URL: https://cgit.FreeBSD.org/src/commit/?id=c8a0dbcaff3f17a94589a957aafdfa3ab5c9d235 commit c8a0dbcaff3f17a94589a957aafdfa3ab5c9d235 Author: Osama Abboud AuthorDate: 2023-10-30 11:12:24 +0000 Commit: Arthur Kiyanovski CommitDate: 2024-01-14 07:43:23 +0000 ena: Update driver version to v2.7.0 Features: * Introduce customer and SRD metrics through sysctl * Introduce spreading IRQs to CPUs capability using sysctl * Upgrade ena-com to v2.7.0 Bug Fixes: * Remove outdated APIs Minor Changes: * Introduce a shared stats sample interval for all stats Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 4e2688cc762d94b190029f0c5efab9c4bb5521be) --- sys/dev/ena/ena.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 2c758d37622f..3e42568ba8a9 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -38,8 +38,8 @@ #include "ena-com/ena_eth_com.h" #define ENA_DRV_MODULE_VER_MAJOR 2 -#define ENA_DRV_MODULE_VER_MINOR 6 -#define ENA_DRV_MODULE_VER_SUBMINOR 3 +#define ENA_DRV_MODULE_VER_MINOR 7 +#define ENA_DRV_MODULE_VER_SUBMINOR 0 #define ENA_DRV_MODULE_NAME "ena"