From nobody Sun Nov 12 00:31:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SSYQb0dhDz50qLX; Sun, 12 Nov 2023 00: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 4SSYQb08TZz4TpY; Sun, 12 Nov 2023 00: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=1699749095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7EyAUkp6UbJNW+yMCPrwuobaNEfr7NkBr4qmvjSkbhA=; b=vgQjdc3qXCas3HBsjB5kAWKTI6NfTILBus08SILXGZw7PQcTmcuWD11mFTVoqkcxu4NxXc fGRhaO4CmrVOAn2LABPQn64TdGRhcV0Oc9F/xckFfV02feNoK46CvnptdX9ZsLtkp2lH3D 8vr09xfRMsM/HU2Vkl5uU07QLGuqihkFApxtXb3trV/tKAWzh0if3/zrlCFfF26CFP6oBz tlaYAaCtq9tyfLyvk5iE5+C9aQwW6R5/wHTHFAUZzprUD427ZNp37yXDKAs4mmnxaKewcs 3g5nRy7WIbouHtk+wNbfa++T5UbSsNuMNmw64F24fYYs91kG3aRfHShbL1gpyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699749095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7EyAUkp6UbJNW+yMCPrwuobaNEfr7NkBr4qmvjSkbhA=; b=Sszw8+lLQmet+9UMUjL3eEjF6N/47sCleQ58yqTKZCJukTUwvjdtjr1KBx8/+lacVlVtba 1HLCnMvsR+trHIRw8p44r5SaoPg1p/lRFeOZR3YyUaNTsunezccAJJiJW8U7RnajgDcX76 7suOLTTrotlbi6P53KZJj2cGzSccyqzSg2Qhvs+wHDxEunGkawAkCF2uDZvtijz5CjkxTK xfCNhSN/D9RvcjhH85WXXWONbRl82BVPZc+Fbmyz8Tn8kqPtt80AqEq8yAumTzPFmmb7cY G6fEsAVRafirDy7q+PvBm1ykvVs+nj6RF2xOoumOlx2ThN+j1ls61shfvOG99Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699749095; a=rsa-sha256; cv=none; b=dvdpphqCGYIVKqTbjfVR8hsIut/GMph9hS9SiHV5szjBeYpkTqDhfwz3kQ209EVNnAi0eD jmFejfzEjvxuLPv4GRhowZfFHl5CMXR/scn9cERchmMC7cbZZgYYAG0665j8b1orwiaHOM 8LP6aYbOXUOjFo/YLZJiJovSnnfy4AUku9K+tF8FVe8d91lzxBWypHeRRV60dDy3+QRaoB mucAnHl/shUdg70QJisYnqcGJlVk1cd4yF+WourBR+xR4DS5AsCmUB1boO/cu9FSHGWpnk F/H8miD9CXp+tFf0ybrTFzIBWT2raCGY4V3mPwgPvLjs/6I6mLDubuB92J2H7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SSYQZ6K15z11vB; Sun, 12 Nov 2023 00:31: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 3AC0VYw8069096; Sun, 12 Nov 2023 00:31:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AC0VYuk069093; Sun, 12 Nov 2023 00:31:34 GMT (envelope-from git) Date: Sun, 12 Nov 2023 00:31:34 GMT Message-Id: <202311120031.3AC0VYuk069093@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: d0b4efe6d294 - stable/14 - vfs_domount_update(): ensure that 'goto end' works List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d0b4efe6d294940d668171071eb71aab870139ab Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d0b4efe6d294940d668171071eb71aab870139ab commit d0b4efe6d294940d668171071eb71aab870139ab Author: Konstantin Belousov AuthorDate: 2023-11-09 20:18:47 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-12 00:31:13 +0000 vfs_domount_update(): ensure that 'goto end' works PR: 274992 (cherry picked from commit ede4c412b3ea9289ef42c664b01b6b5ff7eac434) --- sys/kern/vfs_mount.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index aa4642c0ba8c..1a559bfd998e 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1380,6 +1380,8 @@ vfs_domount_update( VOP_UNLOCK(vp); rootvp = NULL; + vfs_op_enter(mp); + vn_seqc_write_begin(vp); if (vfs_getopt(*optlist, "fsid", (void **)&fsid_up, &fsid_up_len) == 0) { @@ -1394,9 +1396,6 @@ vfs_domount_update( vfs_deleteopt(*optlist, "fsid"); } - vfs_op_enter(mp); - vn_seqc_write_begin(vp); - MNT_ILOCK(mp); if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0) { MNT_IUNLOCK(mp); From nobody Sun Nov 12 00:32:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SSYR82gXjz50qTm; Sun, 12 Nov 2023 00:32: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 4SSYR82FvMz4VH5; Sun, 12 Nov 2023 00:32:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699749124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WqyVmCf5z8T49fjwa7tMcJDwu0YIPsISZQF+1S//lEY=; b=ubs3w3PJlJ3lOKGT1k+SHNyzbrntwo4NEt4JcthOK9kisu8NrvRXFUCVqfXp9jWSLFLTzC 5ER/oewFh+2yJHDrM/MGPbgZeNTB4jbLwQJ8NQ1QdgFlY0T/fz41YFpErscMKlVOKqvorj J76kOA1vo5zLGPTze7K5AIFxV7IYTOCeVJQOXcAPh0urfUSyTUPZ/VZdoGRM6QD25d6JRm EqN39kL4lnnxRJCJSc9lRomSfzg/QeAQ4uBVp7ybjSVMbogv2w7kcc++to42q3BMfWRM4Q axYb0vHIVw+kTDvTMQXIRz+cuUbPd2QQmNEDXu+3KJ9rf7J1iDG+uxmjTPl9XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699749124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WqyVmCf5z8T49fjwa7tMcJDwu0YIPsISZQF+1S//lEY=; b=uPNrUJzcp0oM5NfTYwUJAf2sAB3GNTVYcbTPJlIAX1b6dm+pIXRdALw1MIfPxMBda6iDtm P65Ly/Vb15yh0EUmMIrqNRIud2cIam1pVjQFVJDFikgL1T4qefw8w4p/1apRxwRq9gwS8E 05wSvbV0SaPLsG8a0wLFzA7JGlEvyq/3ebIAphg3O7dlPo38PTWPbgCEdMMlFcy0bcjSIE 9KsrEeiTPMWOwRj0fCS8iN5Ss+bWGYbG1IMb99jYtTlNP4GlD/qNRTDE1W8VOMgiTkxNDM u8FLmhfn7DS6S2WKmxF604ANJEeVE/p7jIJp/+wr90AqF//dT7Lfe1xVX91Zhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699749124; a=rsa-sha256; cv=none; b=tTBUG78/qZVrmTHbRJ1U+BlNOyPC7c212MBv+1Rj2H4sQGH/FGykFqp7rPHcFXbBhfB6/r kI5O23nkSI59EdYDq/d3MS67xZEo1lluweM6wzA0YMDORHeE0JDDsx99TIT65IubUU28qX 22GaASQlMvj5gTL/7h9Ay5QnwzB2SQUIYdRchnl7b1v+epUXap2qKeMXY7hE/DTxtSQ9iZ pxzQa19X1S0RGUXA2GPKnESyxCIi0ed/ry1SvCRalvSEgF42FLNpdlJgsYbhioocciapL8 RY5vi/62fu1Qw08zGwHNGnjVC6jH6aKbQB/4i/VCRDOUjLNQ9Vv4kzeY+WC2Rg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SSYR81K3Nz126X; Sun, 12 Nov 2023 00:32: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 3AC0W45R072667; Sun, 12 Nov 2023 00:32:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AC0W46C072664; Sun, 12 Nov 2023 00:32:04 GMT (envelope-from git) Date: Sun, 12 Nov 2023 00:32:04 GMT Message-Id: <202311120032.3AC0W46C072664@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: 608ccfc29fb4 - stable/13 - vfs_domount_update(): ensure that 'goto end' works List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 608ccfc29fb48d8edc59a97382936790c02d27f3 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=608ccfc29fb48d8edc59a97382936790c02d27f3 commit 608ccfc29fb48d8edc59a97382936790c02d27f3 Author: Konstantin Belousov AuthorDate: 2023-11-09 20:18:47 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-12 00:31:47 +0000 vfs_domount_update(): ensure that 'goto end' works PR: 274992 (cherry picked from commit ede4c412b3ea9289ef42c664b01b6b5ff7eac434) --- sys/kern/vfs_mount.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index a4a981603ab6..4597ae09a831 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1221,6 +1221,8 @@ vfs_domount_update( VOP_UNLOCK(vp); rootvp = NULL; + vfs_op_enter(mp); + vn_seqc_write_begin(vp); if (vfs_getopt(*optlist, "fsid", (void **)&fsid_up, &fsid_up_len) == 0) { @@ -1235,9 +1237,6 @@ vfs_domount_update( vfs_deleteopt(*optlist, "fsid"); } - vfs_op_enter(mp); - vn_seqc_write_begin(vp); - MNT_ILOCK(mp); if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0) { MNT_IUNLOCK(mp); From nobody Sun Nov 12 02:56:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SScf32rcmz50fWh; Sun, 12 Nov 2023 02:56:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SScf32QDjz3K6C; Sun, 12 Nov 2023 02:56:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699757803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SKBetqd3552fAcxTNnrTy09SBf6tEVu0LcQWl2dseMg=; b=kPOAhuxBeEm5svj3qL2FUIeiP4ENw+uzCTds9HjVhMkjNLB7don1a48SF0zV7mLg8W6bRx OwXnFkJouDfpUjOWBQKndrT4whF6zV3gLR+4DaELA/YfXXv8fwTlx2OeRUCm4ecCJTWvTe fSNw3SmHZqoUlT8QyqAJCsoWlLfgZJSNp539XSj9IfHnOPyap0WMN68h4y5sUJ8XwUSry+ yUWkHtPN+9z6g3zuo7rR+wZAlTUqTey+f36KXkJKBud72OWFqZeRvhcIWadHblKpjt1FTB lC+jHWYlD22mCC12BTT2hddU+ZiDf+bEzfKpbu5DTmumc51pxA/DZmdKn5u34w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699757803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SKBetqd3552fAcxTNnrTy09SBf6tEVu0LcQWl2dseMg=; b=Dzqu8+HpQc2B7RPccnQzqTl0MyDoODITgDLQYqg5OPqAbIId30WdBrqeaqoZwjGeruTG0C JQkhA+UBpU1W8+egkX5zO1zsMiHhfnlHTx3Nl0riKQjJyOd6lut7Qp+84R7GIRj+jNE6f6 FKKpBTBj4Qwv1DQvyIz7YAPCVpH6/iwGbontWqTv3/O9NKEOjkPkfseEH3cdDaAV3duJYZ ea9eS0mvIrXZDeqIxdOR2yEOKdFJs9woxHPzyVMNXeYCFTEEkrnzKyrwBGN5XVrckW8xDM 2+rzaKze7cD0qPLx4nnQlz6NIBudsnA9oH5cnkOXo1BSWFk8zAoGtA2wTNqqpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699757803; a=rsa-sha256; cv=none; b=NtWt06DfT94l16wdlWRlgqF2Q9zA/m+xWMJMS05daAFhfctuMDAx5H4HdanM1FJpHQ1My/ LntK0tOmz9Pr4xnGuDBDQVC50OVLf1Fpuiwki5TbvBLKmZpk6eCNlJanpwy26WGyug3gp1 cb0cRp3Dc/ZBQ8PfQq4KAPgwBkhd5OddYMQyn5p404gQ/cRzUW5/CuDWWeM+qMpI/q+8s6 GfmX6Wltpwsqvj2JgE3E2Kisn+lUs/3HxiHVDTJIrLs+GnosoVOpkoInnj1yuK3gwvdmYF jL02qitAk7LflB9UeuV3ZXL99PMYgGb6nSLDCyTUoP+C9C0gcKw2jX/MoQhQUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SScf31TmQz15d7; Sun, 12 Nov 2023 02:56:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AC2uh6c005774; Sun, 12 Nov 2023 02:56:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AC2uhCX005771; Sun, 12 Nov 2023 02:56:43 GMT (envelope-from git) Date: Sun, 12 Nov 2023 02:56:43 GMT Message-Id: <202311120256.3AC2uhCX005771@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Jason A. Harmening" Subject: git: 66b8f5484cfe - stable/14 - vfs_lookup_cross_mount(): restore previous do...while 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: jah X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 66b8f5484cfe0e37078b8b56355f2fa18b585f88 Auto-Submitted: auto-generated The branch stable/14 has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=66b8f5484cfe0e37078b8b56355f2fa18b585f88 commit 66b8f5484cfe0e37078b8b56355f2fa18b585f88 Author: Jason A. Harmening AuthorDate: 2023-11-04 16:56:45 +0000 Commit: Jason A. Harmening CommitDate: 2023-11-12 02:38:26 +0000 vfs_lookup_cross_mount(): restore previous do...while loop When the cross-mount walking logic in vfs_lookup() was factored into a separate function, the main cross-mount traversal loop was changed from a do...while loop conditional on the current vnode having VIRF_MOUNTPOINT set to an unconditional for(;;) loop. For the unionfs 'crosslock' case in which the vnode may be re-locked, this meant that continuing the loop upon finding inconsistent v_mountedhere state would no longer branch to a check that the vnode is in fact still a mountpoint. This would in turn lead to over- iteration and, for INVARIANTS builds, a failed assert on the next iteration. Fix this by restoring the previous loop behavior. Reported by: pho Tested by: pho Fixes: 80bd5ef0702562c546fa1717e8fe221058974eac (cherry picked from commit 586fed0b03561558644eccc37f824c7110500182) --- sys/kern/vfs_lookup.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index d75351c34314..922adda33b94 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -882,7 +882,7 @@ vfs_lookup_cross_mount(struct nameidata *ndp) * The vnode has been mounted on, find the root of the mounted * filesystem. */ - for (;;) { + do { mp = dp->v_mountedhere; ASSERT_VOP_LOCKED(dp, __func__); VNPASS((vn_irflag_read(dp) & VIRF_MOUNTPOINT) != 0 && mp != NULL, dp); @@ -915,6 +915,12 @@ vfs_lookup_cross_mount(struct nameidata *ndp) break; } if (dp->v_mountedhere != mp) { + /* + * Note that we rely on the + * VIRF_MOUNTPOINT loop condition to + * ensure we stop iterating if dp is + * no longer a mountpoint at all. + */ continue; } } else @@ -939,9 +945,7 @@ vfs_lookup_cross_mount(struct nameidata *ndp) if (error != 0) break; ndp->ni_vp = dp = tdp; - if ((vn_irflag_read(dp) & VIRF_MOUNTPOINT) == 0) - break; - } + } while ((vn_irflag_read(dp) & VIRF_MOUNTPOINT) != 0); return (error); } From nobody Sun Nov 12 06:48:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SSjns19xNz4yy8Q; Sun, 12 Nov 2023 06:48: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 4SSjns0LzWz4M3N; Sun, 12 Nov 2023 06:48:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699771729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cAfEh0op8wVXrNJCoXqjA8i1Edqb8ORwisACGnYeUz0=; b=mi9crLT6RbIG48ziuuEjoKrATpjqtxW7Z35Abf7UMX3ZrZ41eVlsiNNeACZ5ROlEhbKQEm d44ijeDdusIbXzklWotlw7sKg/qMUG8P5LKczTVvKJpIeTx9dJlbes8CxP1kucdajxj7ar nKcRyv5SuVn4KYoR8deU28VzoXpDS1HoYd6giArAZKGkUwByaZJtR+eD2ar5ZVN3U+0zK7 RYxC7cdSpzhmpGac9x1CYviak2J1sXOZopJ5ClJggVIo9rFDcbeDhTPK72EA1CF3vEc4Dn KO2vRtjHCQ0xQwy581Kg9ZWuzpS23MqQCBXCQQj+ltQS9htonbzRNwkOZ2tPkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699771729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cAfEh0op8wVXrNJCoXqjA8i1Edqb8ORwisACGnYeUz0=; b=Ia4BRpZdyBjnwmqKXSKE1VfbUIx1luMrp6XNBi0ewtsDh6l0IDpTjsEwjku7b6wXk9xNhs /sTyR5C8jhEj+1es2i+1s5c4efrarVAZIjyJYTVwwr82wdVU75xdFnOgvqOBAIDIyyOl9Z 2UQAbij5Ep6oS6ICfKvOG041IxHM1mWM5m9TXdDdrv/CPIVKeFzi5LGJG9OtgqeWOc2nh4 d8WVQKb7clbkmfxyfW9bwJTvxh+awdLHvwzJhOL3JuVAtKc6Wsh8g6m1nfxmh7Es453u/3 m+lyUfc+EeBKy2eGOi/RDiTCCGE8icFPc9YvvrKyPI5zvPePZq/+ni2BMMmxwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699771729; a=rsa-sha256; cv=none; b=tExbnY0aBTFqU2VowsqFg5iR2CPCGQCyCgMqF5p9weYCrZ3PMOPG2cvMav8QFtqcYZDUne hCJZUanUPHW0FX5nE0475zJStAGurWlds2EjYe3IE5dWJ98BLBN1KgT+GETAU3GUNC5Rc4 lc9JMA6rqZr7POa8WL9TddBzWcJUQ5QdORJ7/al7CIcKS/sfANH82lQHA6gJc8TJxvzU/6 uDHe+dqCM/FAe2IFY2HNvC51pNNhqhUbvudifi/fZdhlMtYLCNF7DXjDbwK07C2miN16R8 bpj8msS05M19tDUmYz6CtFU9wzRIeECPnTbuVzwp8JXxKXh/5AVl9SnHsntE2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SSjnr6WVmz1CFx; Sun, 12 Nov 2023 06:48: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 3AC6mm9o092264; Sun, 12 Nov 2023 06:48:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AC6mmle092261; Sun, 12 Nov 2023 06:48:48 GMT (envelope-from git) Date: Sun, 12 Nov 2023 06:48:48 GMT Message-Id: <202311120648.3AC6mmle092261@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: 27133e6e86c1 - stable/14 - Delete snapshot after opening it when running fsck_ffs(9) in background. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 27133e6e86c16f86642a16d15ea2c910e9642616 Auto-Submitted: auto-generated The branch stable/14 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=27133e6e86c16f86642a16d15ea2c910e9642616 commit 27133e6e86c16f86642a16d15ea2c910e9642616 Author: Kirk McKusick AuthorDate: 2023-10-25 22:36:45 +0000 Commit: Kirk McKusick CommitDate: 2023-11-12 06:48:25 +0000 Delete snapshot after opening it when running fsck_ffs(9) in background. PR: 106107 (cherry picked from commit d3a36e4b7459b2d62c4cd50de7a8e3195d7241c7) --- sbin/fsck_ffs/fsck.h | 1 - sbin/fsck_ffs/fsutil.c | 1 - sbin/fsck_ffs/globs.c | 2 -- sbin/fsck_ffs/main.c | 8 +++++--- sbin/fsck_ffs/setup.c | 8 ++++---- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/sbin/fsck_ffs/fsck.h b/sbin/fsck_ffs/fsck.h index 1864ea19f4ca..3b795783f39c 100644 --- a/sbin/fsck_ffs/fsck.h +++ b/sbin/fsck_ffs/fsck.h @@ -376,7 +376,6 @@ extern long secsize; /* actual disk sector size */ extern char skipclean; /* skip clean file systems if preening */ extern int snapcnt; /* number of active snapshots */ extern struct inode snaplist[FSMAXSNAP + 1]; /* list of active snapshots */ -extern char snapname[BUFSIZ]; /* when doing snapshots, the name of the file */ extern int sujrecovery; /* 1 => doing check using the journal */ extern int surrender; /* Give up if reads fail */ extern char usedsoftdep; /* just fix soft dependency inconsistencies */ diff --git a/sbin/fsck_ffs/fsutil.c b/sbin/fsck_ffs/fsutil.c index 5cf17e22fe80..2583e324e94c 100644 --- a/sbin/fsck_ffs/fsutil.c +++ b/sbin/fsck_ffs/fsutil.c @@ -616,7 +616,6 @@ ckfini(int markclean) int ofsmodified, cnt, cg; if (bkgrdflag) { - unlink(snapname); if ((!(sblock.fs_flags & FS_UNCLEAN)) != markclean) { cmd.value = FS_UNCLEAN; cmd.size = markclean ? -1 : 1; diff --git a/sbin/fsck_ffs/globs.c b/sbin/fsck_ffs/globs.c index 038fc3475742..b004dd7d48b7 100644 --- a/sbin/fsck_ffs/globs.c +++ b/sbin/fsck_ffs/globs.c @@ -71,7 +71,6 @@ int freefiles[MIBSIZE]; /* MIB cmd to free a set of files */ int freedirs[MIBSIZE]; /* MIB cmd to free a set of directories */ int freeblks[MIBSIZE]; /* MIB cmd to free a set of data blocks */ struct fsck_cmd cmd; /* sysctl file system update commands */ -char snapname[BUFSIZ]; /* when doing snapshots, the name of the file */ char *cdevname; /* name of device being checked */ long dev_bsize; /* computed value of DEV_BSIZE */ long secsize; /* actual disk sector size */ @@ -144,7 +143,6 @@ fsckinit(void) bzero(freedirs, sizeof(int) * MIBSIZE); bzero(freeblks, sizeof(int) * MIBSIZE); bzero(&cmd, sizeof(struct fsck_cmd)); - bzero(snapname, sizeof(char) * BUFSIZ); cdevname = NULL; dev_bsize = 0; secsize = 0; diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index 58e184f3581f..ee39760f4dd2 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -68,7 +68,8 @@ static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95"; #include "fsck.h" -static int restarts; +static int restarts; +static char snapname[BUFSIZ]; /* when doing snapshots, the name of the file */ static void usage(void) __dead2; static intmax_t argtoimax(int flag, const char *req, const char *str, int base); @@ -664,8 +665,7 @@ setup_bkgrdchk(struct statfs *mntp, int sbreadfailed, char **filesys) "SUPPORT\n"); } /* Find or create the snapshot directory */ - snprintf(snapname, sizeof snapname, "%s/.snap", - mntp->f_mntonname); + snprintf(snapname, sizeof snapname, "%s/.snap", mntp->f_mntonname); if (stat(snapname, &snapdir) < 0) { if (errno != ENOENT) { pwarn("CANNOT FIND SNAPSHOT DIRECTORY %s: %s, CANNOT " @@ -713,6 +713,8 @@ setup_bkgrdchk(struct statfs *mntp, int sbreadfailed, char **filesys) "BACKGROUND\n", snapname, strerror(errno)); return (0); } + /* Immediately unlink snapshot so that it will be deleted when closed */ + unlink(snapname); free(sblock.fs_csp); free(sblock.fs_si); if (readsb() == 0) { diff --git a/sbin/fsck_ffs/setup.c b/sbin/fsck_ffs/setup.c index d1d09d07b43a..c9aa19c7eded 100644 --- a/sbin/fsck_ffs/setup.c +++ b/sbin/fsck_ffs/setup.c @@ -380,14 +380,14 @@ openfilesys(char *dev) if ((statb.st_mode & S_IFMT) != S_IFCHR && (statb.st_mode & S_IFMT) != S_IFBLK) { if (bkgrdflag != 0 && (statb.st_flags & SF_SNAPSHOT) == 0) { - pfatal("BACKGROUND FSCK LACKS A SNAPSHOT\n"); - exit(EEXIT); + pwarn("BACKGROUND FSCK LACKS A SNAPSHOT\n"); + return (0); } if (bkgrdflag != 0) { cursnapshot = statb.st_ino; } else { - pfatal("%s IS NOT A DISK DEVICE\n", dev); - if (reply("CONTINUE") == 0) + pwarn("%s IS NOT A DISK DEVICE\n", dev); + if (preen || reply("CONTINUE") == 0) return (0); } } From nobody Sun Nov 12 06:51:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SSjs04kWyz4yys1; Sun, 12 Nov 2023 06:51: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 4SSjs04JWJz4N4X; Sun, 12 Nov 2023 06:51:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699771892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GBzgkDL5/kvq8sPi083WaKaZQ73t+CPjdgK6HxLuDLg=; b=eclPt8vuJmc+E/CLhnPsnhHdyKYDB8/EV+/OfFJnnqB2s9nMokvX/NwYqVhuaqxDLoGKhx 1hnFowI3hWOQzpBX8tSLjjTJCAryjd7JUkcMQ7BvD/O8HYnTEPF8X3XoW6ZPH1ESuvDUBr ibc5XUMPwN1GJePuE+C+8w4l+tM2k69Z9xKjsbrGipX2FR1YtvH9PGF33EAqd4lGtWpfuI tKxtUAxdQZkAHRxm2hs3QyiWcexMOASicpzKo1C5KMxfcER6Z/FY81OltbnXK6pBvTO/KV x/85PR6VuQDljUDQE2ImSUJndcJQE+SJGgqR2EF8HoijPhVh1ycoQZ/0J+f5QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699771892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GBzgkDL5/kvq8sPi083WaKaZQ73t+CPjdgK6HxLuDLg=; b=O23QQD7hBH74OkBFT+aEIVada0tY2zy7EzmibLAjv+du6uAkkgrsXV6dhnW3gvvxQ/IA+s k041G9W33BkVFfml20Nv4ed4X8LpSdel4TD+ECmKiw+6iTqxeACcV5z7U8RDzMzxct2J2t j9NHHU7y7+5CF5s8voIAauKq6CZQALg3hprjEA7haOxr4N6FA5tp0a12plN6oziombwS2V kPb2zhwdi6jyI+y4LDEgCLxX3SCFTOI58UR1AXRWdRoUbDXQfZyBGpVGYuY0Lt6nH1xppf /fJXoH65jmaUBR0fTd3jV8E4J7daVRGZQCUTI1r/NFl2htvgPDtMCpigD6aJbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699771892; a=rsa-sha256; cv=none; b=kJSNqgrNY5XRY68hBWGGK5T2BR0xq/Vcz3L+Pqct42b0SKPpg5h7FBb6KVrBXfFKI2NqrK 79K3JGRWRaFAcL4RWPr/bIeGekgfEZ+S3CRGpeqKgKxY4U3yJ8fMX4gDf8eKKWXaYgassp wrAGo+iWJpdMp9p2BwZlHyfeCDLP0j5+OWdfcM1ur3HaGufN2s2iU0O9JiK05HKQBRziDt w+Mdz/rxHxGjgR6cLNXg+lT7M4gJjdeuJQVbajRg5lEj2F+ghDrGzcxpZxs6PH8GbxUSkh dm62o6snr5qEC5xyyuIqKZFhiJRMtql84dl6Y6jamoh/36XADqpwh2usnwGfTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SSjs03M5Kz1BmS; Sun, 12 Nov 2023 06:51: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 3AC6pWj0004783; Sun, 12 Nov 2023 06:51:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AC6pW4r004780; Sun, 12 Nov 2023 06:51:32 GMT (envelope-from git) Date: Sun, 12 Nov 2023 06:51:32 GMT Message-Id: <202311120651.3AC6pW4r004780@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: d3d779f64754 - stable/13 - Delete snapshot after opening it when running fsck_ffs(9) in background. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d3d779f6475474bd7fc80d1f9cce91c7b42fc958 Auto-Submitted: auto-generated The branch stable/13 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=d3d779f6475474bd7fc80d1f9cce91c7b42fc958 commit d3d779f6475474bd7fc80d1f9cce91c7b42fc958 Author: Kirk McKusick AuthorDate: 2023-10-25 22:36:45 +0000 Commit: Kirk McKusick CommitDate: 2023-11-12 06:51:14 +0000 Delete snapshot after opening it when running fsck_ffs(9) in background. PR: 106107 (cherry picked from commit d3a36e4b7459b2d62c4cd50de7a8e3195d7241c7) --- sbin/fsck_ffs/fsck.h | 1 - sbin/fsck_ffs/fsutil.c | 1 - sbin/fsck_ffs/globs.c | 2 -- sbin/fsck_ffs/main.c | 8 +++++--- sbin/fsck_ffs/setup.c | 8 ++++---- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/sbin/fsck_ffs/fsck.h b/sbin/fsck_ffs/fsck.h index 13a4a048fbe8..1a4cc24e63db 100644 --- a/sbin/fsck_ffs/fsck.h +++ b/sbin/fsck_ffs/fsck.h @@ -377,7 +377,6 @@ extern long secsize; /* actual disk sector size */ extern char skipclean; /* skip clean file systems if preening */ extern int snapcnt; /* number of active snapshots */ extern struct inode snaplist[FSMAXSNAP + 1]; /* list of active snapshots */ -extern char snapname[BUFSIZ]; /* when doing snapshots, the name of the file */ extern int sujrecovery; /* 1 => doing check using the journal */ extern int surrender; /* Give up if reads fail */ extern char usedsoftdep; /* just fix soft dependency inconsistencies */ diff --git a/sbin/fsck_ffs/fsutil.c b/sbin/fsck_ffs/fsutil.c index 528986a7bfd7..14196fa8356a 100644 --- a/sbin/fsck_ffs/fsutil.c +++ b/sbin/fsck_ffs/fsutil.c @@ -615,7 +615,6 @@ ckfini(int markclean) int ofsmodified, cnt, cg; if (bkgrdflag) { - unlink(snapname); if ((!(sblock.fs_flags & FS_UNCLEAN)) != markclean) { cmd.value = FS_UNCLEAN; cmd.size = markclean ? -1 : 1; diff --git a/sbin/fsck_ffs/globs.c b/sbin/fsck_ffs/globs.c index da09781a06ba..5170f078166a 100644 --- a/sbin/fsck_ffs/globs.c +++ b/sbin/fsck_ffs/globs.c @@ -71,7 +71,6 @@ int freefiles[MIBSIZE]; /* MIB cmd to free a set of files */ int freedirs[MIBSIZE]; /* MIB cmd to free a set of directories */ int freeblks[MIBSIZE]; /* MIB cmd to free a set of data blocks */ struct fsck_cmd cmd; /* sysctl file system update commands */ -char snapname[BUFSIZ]; /* when doing snapshots, the name of the file */ char *cdevname; /* name of device being checked */ long dev_bsize; /* computed value of DEV_BSIZE */ long secsize; /* actual disk sector size */ @@ -145,7 +144,6 @@ fsckinit(void) bzero(freedirs, sizeof(int) * MIBSIZE); bzero(freeblks, sizeof(int) * MIBSIZE); bzero(&cmd, sizeof(struct fsck_cmd)); - bzero(snapname, sizeof(char) * BUFSIZ); cdevname = NULL; dev_bsize = 0; secsize = 0; diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index c0f7d39897ea..3e42bde1ea5d 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -68,7 +68,8 @@ static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95"; #include "fsck.h" -static int restarts; +static int restarts; +static char snapname[BUFSIZ]; /* when doing snapshots, the name of the file */ static void usage(void) __dead2; static intmax_t argtoimax(int flag, const char *req, const char *str, int base); @@ -664,8 +665,7 @@ setup_bkgrdchk(struct statfs *mntp, int sbreadfailed, char **filesys) "SUPPORT\n"); } /* Find or create the snapshot directory */ - snprintf(snapname, sizeof snapname, "%s/.snap", - mntp->f_mntonname); + snprintf(snapname, sizeof snapname, "%s/.snap", mntp->f_mntonname); if (stat(snapname, &snapdir) < 0) { if (errno != ENOENT) { pwarn("CANNOT FIND SNAPSHOT DIRECTORY %s: %s, CANNOT " @@ -713,6 +713,8 @@ setup_bkgrdchk(struct statfs *mntp, int sbreadfailed, char **filesys) "BACKGROUND\n", snapname, strerror(errno)); return (0); } + /* Immediately unlink snapshot so that it will be deleted when closed */ + unlink(snapname); free(sblock.fs_csp); free(sblock.fs_si); havesb = 0; diff --git a/sbin/fsck_ffs/setup.c b/sbin/fsck_ffs/setup.c index 4584456d8a64..f34ce282b7ee 100644 --- a/sbin/fsck_ffs/setup.c +++ b/sbin/fsck_ffs/setup.c @@ -399,14 +399,14 @@ openfilesys(char *dev) if ((statb.st_mode & S_IFMT) != S_IFCHR && (statb.st_mode & S_IFMT) != S_IFBLK) { if (bkgrdflag != 0 && (statb.st_flags & SF_SNAPSHOT) == 0) { - pfatal("BACKGROUND FSCK LACKS A SNAPSHOT\n"); - exit(EEXIT); + pwarn("BACKGROUND FSCK LACKS A SNAPSHOT\n"); + return (0); } if (bkgrdflag != 0) { cursnapshot = statb.st_ino; } else { - pfatal("%s IS NOT A DISK DEVICE\n", dev); - if (reply("CONTINUE") == 0) + pwarn("%s IS NOT A DISK DEVICE\n", dev); + if (preen || reply("CONTINUE") == 0) return (0); } } From nobody Sun Nov 12 11:31:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SSr3m0RGBz50LBD; Sun, 12 Nov 2023 11:31: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 4SSr3m00kmz3TvC; Sun, 12 Nov 2023 11:31:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699788676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wGWO2PYiBksE1XjmH5s6IPz2LMUhlEiPkd8zzfSB/Oc=; b=e9QO8M1NnnZd9o7+sw6s03uIOwYArw6RtboYUh63IayBwmGS9yL/kFWApnwdUW344x2htO e09q9gqKOwk015R8noBAcIfJK2BtanrxeEmWKxEk63Me5Fya1wbjJtdV8pVzm+ArrsDmR2 zoDuCU6UU8YvtgOKAiSZjfop9hXmj4Vc3VeX6HmHWiznQ7dJYH6cfw1N/gUQiuhe1ANxqx vtxyqveItQdN/YjylNMUfLqwGJ0VrjXUsq/EAUoxKka3YlsI7USZDWUhHT7CxC9rhWvj15 nvqr0YSliAbTV9A6d8kjpZrFGPeoTYSexGU6VbYNzG3/2NnVObqmkOrYPSOKSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699788676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wGWO2PYiBksE1XjmH5s6IPz2LMUhlEiPkd8zzfSB/Oc=; b=bnYAWvKAMds+ue5Jq8cUGsL/+U9P6DJsAu/Qv8sU4g9FExBOe3imm0e7UqU9GASuveH3eC 6A+DfcScSwqL+8nIkkrjmsoetFmUzQZY33iii0jDUxx1nRWbgmsbJSi48MmqlwUZyTHTln Jc/7Kg/Z1lfSarfM2Dq5PlaiK4KwM5sjEejSXkoQo8NtScN2vjyvmNQXYoKoA+W27Z5vKe yJHUeIdKIMJJz0iSgHIn3lXx8Tr3wyy6B6IrgCM6kr0vC/mPRiqzDey8l/wX694IiyRGM6 kGU/eOqml4hIVdAd+vyF5k435IUGsUE+wbSf48tNufxt0zHZoecRFsVzfdbVCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699788676; a=rsa-sha256; cv=none; b=X+0oIjrnwTegIBQsybSgZD4mGQ6l+YNyVG6W5pM1kLw3OcNoGJlR4Kd55yLUfBcr6xYpU3 VcfD7cPlFn4FiP5MHZ6OuwAc3RJMTTMGKclFsxaLGbJFPOkGB3TOiKVjqikhi4KH2gKLi3 JU8gjQY13r4OOIs/e1lwS4pxY4B2QtPT76JmXjMKxPdi5ZyE83TMCYWUC2PMRUXXUyXJG6 lfrTzwN7xfFnh2NK4f2kgcuEA4UbuY5wru9XtQxHWVOArwxrnEx4wy0NzBOG7Opzo01hau sVqjaQRLAbrk6ugX+Rb0KAKEG3ZueQVqdKRpS1GGbLMl6vNv9IEDxpp5iIduDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SSr3l69ztz6D4; Sun, 12 Nov 2023 11:31: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 3ACBVF7X070731; Sun, 12 Nov 2023 11:31:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ACBVFKP070728; Sun, 12 Nov 2023 11:31:15 GMT (envelope-from git) Date: Sun, 12 Nov 2023 11:31:15 GMT Message-Id: <202311121131.3ACBVFKP070728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Doug Rabson Subject: git: 61ba094af4b4 - stable/14 - netfront: fix the support for disabling LRO at boot time List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dfr X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 61ba094af4b4798bf2887c30af5c14d66ead706f Auto-Submitted: auto-generated The branch stable/14 has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=61ba094af4b4798bf2887c30af5c14d66ead706f commit 61ba094af4b4798bf2887c30af5c14d66ead706f Author: Doug Rabson AuthorDate: 2023-08-12 13:19:47 +0000 Commit: Doug Rabson CommitDate: 2023-11-12 10:37:16 +0000 netfront: fix the support for disabling LRO at boot time The driver has a tunable hw.xn.enable_lro which is intended to control whether LRO is enabled. This is currently non-functional - even if its set to zero, the driver still requests LRO support from the backend. This change fixes the feature so that if enable_lro is set to zero, LRO no longer appears in the interface capabilities and LRO is not requested from the backend. PR: 273046 MFC after: 1 week Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D41439 (cherry picked from commit da4b0d6eb06d730487d48e15d2d5e10c56266fd9) --- sys/dev/xen/netfront/netfront.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c index b4e7722552e6..dafb838cf328 100644 --- a/sys/dev/xen/netfront/netfront.c +++ b/sys/dev/xen/netfront/netfront.c @@ -2272,7 +2272,7 @@ int create_netdev(device_t dev) { struct netfront_info *np; - int err; + int err, cap_enabled; if_t ifp; np = device_get_softc(dev); @@ -2304,7 +2304,11 @@ create_netdev(device_t dev) if_sethwassist(ifp, XN_CSUM_FEATURES); /* Enable all supported features at device creation. */ if_setcapabilities(ifp, IFCAP_HWCSUM|IFCAP_TSO4|IFCAP_LRO); - if_setcapenable(ifp, if_getcapabilities(ifp)); + cap_enabled = if_getcapabilities(ifp); + if (!xn_enable_lro) { + cap_enabled &= ~IFCAP_LRO; + } + if_setcapenable(ifp, cap_enabled); if_sethwtsomax(ifp, 65536 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN)); if_sethwtsomaxsegcount(ifp, MAX_TX_REQ_FRAGS); From nobody Sun Nov 12 11:31:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SSr3n1cJgz50KxK; Sun, 12 Nov 2023 11:31: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 4SSr3n10DDz3VMG; Sun, 12 Nov 2023 11:31:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699788677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M8CI2lKN5MgU4y02dzG4MsTNU3UTtbYCIhZuB0rOBuU=; b=ZGZA94Shd1QrZoXhw3J2QTZcDLSQMoXAPEKMnpVBPGS39Gb8G3d5T5+UMG6Q+r/EztgjOz QXiT0Bu7YA1qPs9JtcGlUwk3IOhLzYkyuNlAsnqMDV+MFaRW4CxujEmWO/6Wy8jogMac6N 8fpkE2+Nh5AECYLwNk1pJTDtmCe35zIkoFEdgkiW38ulo2shswKsIppfBPlaJHcW4nX7cP ic8Zxp3Swq5sJPaR/xXNzW9MwVFWYsVBfx27OCH3qAGrLht4f3mO+b+q66vhmZ1Xmgl/Kk dh4NO8T/XYRPHmYpBRWhibFQS1fi+UNDNRBlC+3CuYkuUZcb67gUV4TeQ0200w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699788677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M8CI2lKN5MgU4y02dzG4MsTNU3UTtbYCIhZuB0rOBuU=; b=mqpKkTxGxIk0VFDn3tomlhqEWdirdvXQc0Vo/lfpQowjOfMB758eQbZGOEDERnhsDCYJwe LFeeteeWpSJ5PfydM4Jln/BBBPZBy3cIESYmaK4J81JgW68yZ3pP1BkQi3FVQteK3IqZBU T76Xk8v78vkq8F0Edr8QKY8Iq56jMk59S1KMNnwWwcRvk5Lj5csg0iIoFY/0LIcCFVnjoE neHwCG9D0SAfBj/sqagiiCrnYisVMGdzpo9enChurb/+z6Vcd4m26rlXiI7Cp46gO0cIwj GCoZ2RWqETVmKZniwxaehBZltx2ZLfPlqtf3JuAyeCkDMDqF6ZMrSmEz/wPrWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699788677; a=rsa-sha256; cv=none; b=Rz4gUVQedcmjK7BSfBCXtrBvLN63fA9rYN8n0qQdjUeJMQc+fs9X8XkWbN6olDoZ2chAHp WFPqZpppH3GIV5od7h9jA9x5kiuKSnMEWF4F4P6lETarSTCVPG8mIxP2OvraEzhG4BagdO 6j9NzFYTW0mNJYbaH1Y+rBHnhkrLvKkNFM+OWEoUggjWl9Pm05rgGlHXathWFU684M11AX HBXCWwUIxpLn6yPQ7m6AEyg3Gm3B/3t4RJouy66OAn8snwReLq8XszNCH5EHd4t8vK2s47 XIKS4HQ8Il5jEDbd+7aJlXcWm91/LGqLdwWe3jYU8CqyeRbF61P77hexu1PTQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SSr3m6z28z6D5; Sun, 12 Nov 2023 11:31: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 3ACBVGgd070789; Sun, 12 Nov 2023 11:31:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ACBVGZf070786; Sun, 12 Nov 2023 11:31:16 GMT (envelope-from git) Date: Sun, 12 Nov 2023 11:31:16 GMT Message-Id: <202311121131.3ACBVGZf070786@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Doug Rabson Subject: git: e968616046a3 - stable/14 - pkgbase: Move headers and libs out of runtime and utilities List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dfr X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e968616046a32e4ac7b98b2aa7935c3a64f66ada Auto-Submitted: auto-generated The branch stable/14 has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=e968616046a32e4ac7b98b2aa7935c3a64f66ada commit e968616046a32e4ac7b98b2aa7935c3a64f66ada Author: Doug Rabson AuthorDate: 2023-09-11 08:38:46 +0000 Commit: Doug Rabson CommitDate: 2023-11-12 10:37:16 +0000 pkgbase: Move headers and libs out of runtime and utilities Headers from src/include were in the runtime-dev package but subdirectories of src/include ended up in utilities-dev by default. Neither package is a good choice - the headers in src/include are not useful without the libraries contained in clibs-dev. This moves the standard C headers to clibs-dev (C++ headers are already in this package). While working on this, I found that various clang libraries and headers were also bundled into utilities-dev by default so these are also moved to clang-dev. I also added a FreeBSD-build-essential meta package to make it simple to install all the toolchain parts. PR: 254173 Reviewed byb: manu MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41815 (cherry picked from commit 78847e1e592789dc85bddf4d2f1d9a8ce4614ff1) --- include/Makefile | 2 +- include/Makefile.inc | 2 ++ lib/clang/Makefile.inc | 1 + lib/csu/Makefile.inc | 1 + lib/libclang_rt/Makefile.inc | 1 + release/packages/generate-ucl.sh | 3 +++ 6 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/Makefile b/include/Makefile index d8cdbfed3663..f5985ebf091a 100644 --- a/include/Makefile +++ b/include/Makefile @@ -4,7 +4,7 @@ .include -PACKAGE=runtime +PACKAGE=clibs CLEANFILES= osreldate.h version SUBDIR= arpa protocols rpcsvc rpc xlocale .if ${MACHINE_CPUARCH} == "amd64" diff --git a/include/Makefile.inc b/include/Makefile.inc new file mode 100644 index 000000000000..14d7bf96e6bc --- /dev/null +++ b/include/Makefile.inc @@ -0,0 +1,2 @@ +# Make sure all our subdirectory headers end up in clibs-dev +PACKAGE=clibs diff --git a/lib/clang/Makefile.inc b/lib/clang/Makefile.inc index 0a2ae8f6b802..2dfc966726b0 100644 --- a/lib/clang/Makefile.inc +++ b/lib/clang/Makefile.inc @@ -1,6 +1,7 @@ .include +PACKAGE= clang MK_PIE:= no # Explicit libXXX.a references .if ${COMPILER_TYPE} == "clang" diff --git a/lib/csu/Makefile.inc b/lib/csu/Makefile.inc index faf01b293b92..55aaf589f48f 100644 --- a/lib/csu/Makefile.inc +++ b/lib/csu/Makefile.inc @@ -1,3 +1,4 @@ +PACKAGE= clibs-dev NO_WMISSING_VARIABLE_DECLARATIONS= # Can't instrument these files since that breaks non-sanitized programs. diff --git a/lib/libclang_rt/Makefile.inc b/lib/libclang_rt/Makefile.inc index 4832815643ae..263d1e340f3d 100644 --- a/lib/libclang_rt/Makefile.inc +++ b/lib/libclang_rt/Makefile.inc @@ -1,6 +1,7 @@ .include +PACKAGE= clang CRTSRC= ${SRCTOP}/contrib/llvm-project/compiler-rt .include "compiler-rt-vars.mk" diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh index aef08e50c037..9e9680559428 100755 --- a/release/packages/generate-ucl.sh +++ b/release/packages/generate-ucl.sh @@ -44,6 +44,9 @@ main() { certctl) pkgdeps="caroot openssl" ;; + clang) + pkgdeps="lld clang-dev libcompiler_rt-dev" + ;; # -dev packages that have no corresponding non-dev package # as a dependency. From nobody Sun Nov 12 11:38:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SSrDR3bbMz50MwS; Sun, 12 Nov 2023 11:38: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 4SSrDR38cdz3Wb2; Sun, 12 Nov 2023 11:38:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699789127; h=from:from:reply-to:subject:subject: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/RbPDUzhxu1h5nkZIEgBru6YU55Zu9rCDUCZWwRp/c=; b=r7ZZ/C6tVYAFXVDVjt+zxrTQyNhcIhN4gLI2c38LoIuYuSVmXnMNSkR285+YJbWTBKMKdr MRxh1SmSxfd/v+ANKiR86JJ3q1vYSj9z8sSfy0ojsVzVxB2yZcziofSHV0QbXT9QIqcUMv ngwNqYVxC9bARegNDf/VjcAkoVTVZWowhc9RVtBmQrz3GHSYBZLkINHn/O3QanAW6ZI04e H3We9ul7bq2aEIcQZDWz+GopaWna9EVZsxr44RxwiQi21zOn9RqJqFEG3D3bd6ShdZkgjm /1mbeE965TqtrUrGxMqQsIMF6jYn8B4qt+hmKsJTt79f8m00nZ6dTax2xMoGQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699789127; h=from:from:reply-to:subject:subject: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/RbPDUzhxu1h5nkZIEgBru6YU55Zu9rCDUCZWwRp/c=; b=j43MyavotS6TOeEunkONnjbVrRBOurb5ZmZ+MDtviXtEe+PUeOk5BOZJIFBjYkVWQoHope E4e1jLXszq2Fto7eFlbjMrVOWWr8UeBYty+TbwqFhXyfcCPtTAd2FJvwW6ybPmhZQy9U+S BLK6cbmUYS+TA/++7b/uf7hqU0NHiGxDT4YY6F8qfg4PNX63/g687wWFoa5uJBo6IT7Ndf wIdnEQpcWhya20mGX16S9E+6ROpCaHJrCbq6islJf6AVe/NrqGx8n60KRcKZaUOUekaBlw EqBVE3K4V+l/nbcdkTYVx1huvLK+9JrZJgX7gu+GF5gkZRYmCv9u9gCxtyRMKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699789127; a=rsa-sha256; cv=none; b=EtxordF7rLs3w/JVFgDtV+ujoIOIOceUQlcdZ0rzWz1INWLzBkhDCAFIblL21ux4yYXNk8 VflRpDv6bCg9KHCWN/E+5tjCRc7OmO0LBpuZkCgFYcOIBZSITuh6dxdtQ8D1NioFVZuIz9 K4LEzeFhzwdz+sILu+ib79R7wIT722c8rFB5Fi8bGsKzYb8L5jTm0L66jBnmwzbvaVHfit L8LZ9E2hpZ3bbSFlrR3dAja37Usd03yAHrnxfY4ShsmtbF4rXIWFjUvd0kQeuLUtgjjzHH MBFXJwzoNog4fl9KJyPD1zZ20ZCKWx3/hBn3LEtwn63usZL7AbNU4ng42Y9HmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SSrDR2DRxz6MP; Sun, 12 Nov 2023 11:38: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 3ACBclYV074891; Sun, 12 Nov 2023 11:38:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ACBcl0D074887; Sun, 12 Nov 2023 11:38:47 GMT (envelope-from git) Date: Sun, 12 Nov 2023 11:38:47 GMT Message-Id: <202311121138.3ACBcl0D074887@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: 19477ee0d9bb - main - man/man5/core.5: note that coredump directories need to exist List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19477ee0d9bbd865a98a3a20f38f979b1825696c Auto-Submitted: auto-generated The branch main has been updated by ceri: URL: https://cgit.FreeBSD.org/src/commit/?id=19477ee0d9bbd865a98a3a20f38f979b1825696c commit 19477ee0d9bbd865a98a3a20f38f979b1825696c Author: Ceri Davies AuthorDate: 2023-11-12 11:35:12 +0000 Commit: Ceri Davies CommitDate: 2023-11-12 11:35:12 +0000 man/man5/core.5: note that coredump directories need to exist --- share/man/man5/core.5 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/share/man/man5/core.5 b/share/man/man5/core.5 index 760e73467d9a..1af53cd0750c 100644 --- a/share/man/man5/core.5 +++ b/share/man/man5/core.5 @@ -27,7 +27,7 @@ .\" .\" @(#)core.5 8.3 (Berkeley) 12/11/93 .\" -.Dd October 5, 2021 +.Dd November 12, 2023 .Dt CORE 5 .Os .Sh NAME @@ -169,7 +169,8 @@ Packing is disabled with .Dl sysctl kern.coredump_pack_vmmapinfo=0 . .Sh EXAMPLES In order to store all core images in per-user private areas under -.Pa /var/coredumps , +.Pa /var/coredumps +(assuming the appropriate subdirectories exist and are writable by users), the following .Xr sysctl 8 command can be used: From nobody Sun Nov 12 18:25:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ST1FS69Wlz50ff0; Sun, 12 Nov 2023 18:25: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 4ST1FS5jwgz3HJf; Sun, 12 Nov 2023 18:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699813516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZlBya4WQuJFtYHIL6FADSeSVL4UxchXWt3VYbNTH8Xs=; b=SoToQOA3vGq8cM6V4awq6HdC6NBdT2HnCoWWihkwauEL5Nuj1kv4aHYDvAyYDxELeSCcrb F8bNVVQxtYt5pte+fzNz6ZOY3P0RHEx/Zw8DeDAWZY70j9FzdA2xwGzzvPg5Br5SNaI8XP /PNQcsEFUKuXb5A+TTFaqI4NriVJMXboyxKotl8VwTbWFXT1YEturLc/kXr/9OIraOqF/e PJdMQmWr1AMUTW+qwJhqrgzZjbvjnPjRcIxwLGld3yGM4V2pNEoNvTRd79y7e//JZ6mfNO BAsQFWDVAQcsjc73cQTygTlzYlbvWw3stlHS0koE2LdlRciHSVp1KYrNtxfKLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699813516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZlBya4WQuJFtYHIL6FADSeSVL4UxchXWt3VYbNTH8Xs=; b=uNwY1sI961Z8Ra6j9BMzqRZlta5pfA4rutDuLdQ1aBT4ruvARdDD3qwhBHQUZtL2y6n8SI iwPf1J6czqfWanaxntlidXxPpllpOurJ1kySDlrFbffaZZ7laQdoIHLmRX/tdELwe7K/DU ptpkLUXYJkPdjHJu15hFDNfpTRslBYAuehf7zTyXJz0yrjIZfnleM982sUNqiV8yFjcQNq ifsT5V61XlO7d2q7a2GkqGxxANpDK2qTtxwq8LXlv/AYaaTPjl+7DSA8VF4H+pbPCJxYT8 0O9raPF4E6lClYKYsFvX5XyJUNUXdIxa91F9Ft/Iia7dYGZXykKJvO5C7h3KCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699813516; a=rsa-sha256; cv=none; b=wpZkLS2BZtx5eGoac9m/gia/ZLfdRXbjrYklKWcwXUtdCPUGlG/LNMOTuxB0mOtt6p3QrB cbStCxhREHzmkLFupHwh2aKWVnX7e4Z4jDQCoGm7cB0GgoB+18tbwvxIKvmyvyNKqUxYqH n4av8wOIuLuSXiKKf7NkcdbAPQOpP6F7xM+dX6+0x2S/UhvlRYnwBcqi2N6ZeTQ+1LXaYW OHqXoucwIxV617Zezq5LTvT7R7YPisxT0xSbBwK3kRJ5eS9VKHDjK4chlN/WBqpmWIcV77 ZoI3z3laCr7xIPs7ZSL6daCyDNq7E4J58kIVrPtQVdqF9Kk7MNrnLr1NmiByIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ST1FS4mx2zYwV; Sun, 12 Nov 2023 18:25: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 3ACIPGV0058125; Sun, 12 Nov 2023 18:25:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ACIPGQT058122; Sun, 12 Nov 2023 18:25:16 GMT (envelope-from git) Date: Sun, 12 Nov 2023 18:25:16 GMT Message-Id: <202311121825.3ACIPGQT058122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 4b5634f4e56d - main - netstat: fix missing tab in icmp6 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b5634f4e56ddc0554c5ebba610d45eb48b9210d Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4b5634f4e56ddc0554c5ebba610d45eb48b9210d commit 4b5634f4e56ddc0554c5ebba610d45eb48b9210d Author: Kristof Provost AuthorDate: 2023-11-12 17:23:04 +0000 Commit: Kristof Provost CommitDate: 2023-11-12 17:24:39 +0000 netstat: fix missing tab in icmp6 output PR: 275044 Submitted by: sigsys@gmail.com Reviewed by: kp MFC after: 1 week --- usr.bin/netstat/inet6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c index b88e84ecc564..9141cca191ee 100644 --- a/usr.bin/netstat/inet6.c +++ b/usr.bin/netstat/inet6.c @@ -992,7 +992,7 @@ icmp6_stats(u_long off, const char *name, int af1 __unused, int proto __unused) "{N:/bad checksum%s}\n"); p(icp6s_badlen, "\t{:dropped-bad-length/%ju} " "{N:/message%s with bad length}\n"); - p(icp6s_dropped, "{:dropped-no-entry/%ju} " + p(icp6s_dropped, "\t{:dropped-no-entry/%ju} " "{N:/total packet%s dropped due to failed NDP resolution}\n"); #define NELEM (int)(sizeof(icmp6stat.icp6s_inhist)/sizeof(icmp6stat.icp6s_inhist[0])) for (first = 1, i = 0; i < NELEM; i++) From nobody Mon Nov 13 01:48:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STC4l6Ny5z51Fq5; Mon, 13 Nov 2023 01:48: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 4STC4l5tjKz3RZY; Mon, 13 Nov 2023 01:48:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699840103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iYw8TTF/RaoUMStmOJ0HwCqk+g3n6cFT2Di7WA+WXxw=; b=lxqgva4b8sBWmXFQLjBlfiPwLyJ6RosdWbnj+LrBEMn5NFMSJVq/Ly/NzGH3h73oSmEI+7 vgTMPym46Plauyeg/Ao6OOfJx2EfNNwqnQbRnQZN1NnK1MVmdTq+HS2XjDf6/ZqA4TRZuA UHTciUbYRLUqODHpKOVkM14atIp5JOMd4QxlngXwQIWgi7P3DWJv1z7/9o7g3YUkX6uCzb +jhJAuRaFo5s7kKDim/tl67vQNKYsK9U+0LgktjYhEU9UH9YZDuQO+6k7x60j7uCCLISIX C8lu5LCgrGr7B7BQRNXO8XG4GinPI5vsW/WtrmZgRnJM4d4ziMDWx6azZ9gMKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699840103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iYw8TTF/RaoUMStmOJ0HwCqk+g3n6cFT2Di7WA+WXxw=; b=DubWzLZSALgsr7vRNnXuY3TzrxEQCPuqBMJ23dg3vEdb7cPofWfJ0G3OEPbvLwV7ZlR1dw CJOZ4w5T3eh1/iI4V5YnJGe94F0Kkjh9vMsH3f2+5harUqnuCFyUY7qJluqRJoSevNU0JC vbYrF/Xmps/hAsmSPj90BiRdzNBIfKjUod5c7vJidTq75IQjb63PL7f8a/VH5+bY5HwkqQ lR/86YN/MO2aBCyiZ6RLiFG+hhCbDa/4UNbIBBO84Qq1Id/ffeO08I2uGJNS34aHOpq7lK XpygIhtKYe8YrPW+3gn6+MRCTA8Egmb5GUyQ2UFgdVVhU6TwIsWdPR4mkDLUTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699840103; a=rsa-sha256; cv=none; b=m+r63pXbZoCLaL6A2te6jcye46TToHcdaL2r14lJ1CoJPThIQQIgXzBMdm9gBT4Q49a9Tv tD/yfYSfIMD/1CyYrT0xNn5ZtL0aBWDlejwz9jz6brElPda9wYeD0VYvk1xWAa7XqsKB17 nLraLPtaiQCkR4IW+fB+ZMuYQMXAskhPzq/gBQAnWinRC1pJtdjdreT4f9BTxAhrNz1OMR kIjEhklBhlSgR9QrfFUdvY9H/ZsKV9Xjtj5PFnqSkMX4kNdpbGWTYJ3GtmTx6jOYpIRufv 8A0Pm+AYg8xhxQLd2lNqUo42tOuwZ1ps5CklLDVvDWyJ+69aRIqJ8lDt9igZ1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STC4l507qzms8; Mon, 13 Nov 2023 01:48: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 3AD1mNb2091292; Mon, 13 Nov 2023 01:48:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AD1mNnQ091289; Mon, 13 Nov 2023 01:48:23 GMT (envelope-from git) Date: Mon, 13 Nov 2023 01:48:23 GMT Message-Id: <202311130148.3AD1mNnQ091289@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: 194cc45a81f7 - main - reboot(8): adapt for vmmeter v_swappgsin expansion to 64bit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 194cc45a81f70aa280546b7a5e658028df0303e7 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=194cc45a81f70aa280546b7a5e658028df0303e7 commit 194cc45a81f70aa280546b7a5e658028df0303e7 Author: Konstantin Belousov AuthorDate: 2023-11-13 01:30:53 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-13 01:46:36 +0000 reboot(8): adapt for vmmeter v_swappgsin expansion to 64bit Otherwise reboot(8) requires COMPAT_FREEBSD11 kernel config option. PR: 275048 Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42561 --- sbin/reboot/reboot.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c index 6f656fd5f88c..bcb6c6bde05a 100644 --- a/sbin/reboot/reboot.c +++ b/sbin/reboot/reboot.c @@ -60,7 +60,7 @@ static char sccsid[] = "@(#)reboot.c 8.1 (Berkeley) 6/5/93"; #include static void usage(void) __dead2; -static u_int get_pageins(void); +static uint64_t get_pageins(void); static int dohalt; @@ -70,7 +70,7 @@ main(int argc, char *argv[]) struct utmpx utx; const struct passwd *pw; int ch, howto, i, fd, lflag, nflag, qflag, sverrno, Nflag; - u_int pageins; + uint64_t pageins; const char *user, *kernel = NULL; if (strstr(getprogname(), "halt") != NULL) { @@ -272,10 +272,10 @@ usage(void) exit(1); } -static u_int +static uint64_t get_pageins(void) { - u_int pageins; + uint64_t pageins; size_t len; len = sizeof(pageins); @@ -284,5 +284,5 @@ get_pageins(void) warnx("v_swappgsin"); return (0); } - return pageins; + return (pageins); } From nobody Mon Nov 13 01:48:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STC4n06jGz51Fq8; Mon, 13 Nov 2023 01:48: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 4STC4m6nKhz3RjY; Mon, 13 Nov 2023 01:48:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699840104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O64UnjzMZpL4IMnE9FDPBqL2i235R9d9zEwlUrqrWpQ=; b=gBvVWNp2ntPYvaToS/la30hvQUf74DFDfYtiABBwYO/Wyybn5CHIkDW6WRK+PB+Uf+3kNJ 9pgKayht4/UvpsHt2eySBNrTzuz6Pu5zKP8PFxDsj9NMyMqTJG2kc4048x1zkuCf4vq0b7 8F9uTRjH2JlgGPdRnwx6eoHL7LD2XeOhZJPv/fxet6FuVr3l1k3IVDI5XXSmZRb+8d3cny 0MHy7iR9/jy2PaXTN3idZa2VqifXRzFBsTL6FFJ33BwcwxD9Pp3VJYaq40iWtqQhSy9e6F JeeJb5rFlLYg4JVLtsqlQr5JGZRCFa/YJcRGqA7r4ddnkifjOo8UzoRmSB/+IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699840105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O64UnjzMZpL4IMnE9FDPBqL2i235R9d9zEwlUrqrWpQ=; b=jEjv8/Ksem55VkD0ZAHCdlr66L86+YF3FLseru+71yqPiBgAtll3z5aiY+pmvdlzOu9xaQ wjy4dhgP0xo9g4jRn6cSx6QrcVu064SSLNA+fJmAdXetp7biyIyNu4loKIVZCHLMcDPCwY 3sSwW8LWhXQylVP1o0ZGnsvYl+c4YWolE46QXmnr3EnSQ3C+P5iHpYpe3UZlIJ8TDt1WP2 N2MTjUr1SJS7cmRjOh4lWpgRMDygli+vTOrrfUTV6WTPCM0iODjTeEZZ6e1s6dsNCaxNHU DTWm62GQxwG//w+5cDPVq9Pn8BXAgIBvnmv3PBiViNXI3klCVbalqTC8zjpdOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699840105; a=rsa-sha256; cv=none; b=lfC6mMAQPe6JpVLOPceOx/faML4LdtR4H0MrRvH/R0pFozabeIRFmAAc6VxuY/qCGwc5Tb jjIobhwwum3/EjB4vguLXkn64MUMYP9zKZzhUNi8FGlhi5jjNzjsTty+mldkCJwkPSk5tl +N0q/WFTwfQC3gAwN7oMfAubGvnKQKHetgy7UuCMFTBw8tXHfq6hQ9KTXH7Ph6mU+K8dI2 SCy0+7yQBq1BoEL+PZx9xn4nT6oLrML5wq6TUoCQxR4NViNuyA8PtPjGOe7yoAVsIxxSfq IF/0U+LZtTYnBAdx3bVcX6ZH3qlCnQxg+sO0rBQxrLnLCoQqLEi6xiauPzv/7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STC4m5vBfzms9; Mon, 13 Nov 2023 01:48: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 3AD1mOQf091340; Mon, 13 Nov 2023 01:48:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AD1mO33091337; Mon, 13 Nov 2023 01:48:24 GMT (envelope-from git) Date: Mon, 13 Nov 2023 01:48:24 GMT Message-Id: <202311130148.3AD1mO33091337@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: a294b02fbc07 - main - reboot(8): print syscall error on sysctl failure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a294b02fbc07fa8466c8fc12311e7d4e92332467 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a294b02fbc07fa8466c8fc12311e7d4e92332467 commit a294b02fbc07fa8466c8fc12311e7d4e92332467 Author: Konstantin Belousov AuthorDate: 2023-11-13 01:46:51 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-13 01:46:51 +0000 reboot(8): print syscall error on sysctl failure Noted by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42561 --- sbin/reboot/reboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c index bcb6c6bde05a..dce747d79b15 100644 --- a/sbin/reboot/reboot.c +++ b/sbin/reboot/reboot.c @@ -281,7 +281,7 @@ get_pageins(void) len = sizeof(pageins); if (sysctlbyname("vm.stats.vm.v_swappgsin", &pageins, &len, NULL, 0) != 0) { - warnx("v_swappgsin"); + warn("v_swappgsin"); return (0); } return (pageins); From nobody Mon Nov 13 03:57:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STFxr1P37z50kgk; Mon, 13 Nov 2023 03:57: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 4STFxq62lxz4GPR; Mon, 13 Nov 2023 03:57:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699847855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dqfLkjceUh2lbpyaRsW9dxwZu5RZti+MGVosbIIujFU=; b=wxHBtcm/Z7+9bG09f4Ycf6gQraQBUl+/gqSPeHeaoOP+rld4vky3UXgY1cHt/U3iiaPzs7 Gyy+DYszbrHPGhEaYB1JIEVSCAF4OICPw4TEquXKZl75uiDm/gVpPEfggIvU09AdSUB5sz NcVlft/LLfYJkC8d+mfz09WbWl/tREDloRw5JzJeeGdBI0bYJ4UpfITDSpYgbd99M/5Kvz FRLg4m8Cxk9Q6iwhsZv3gzjOgdUlnqEpYkYY6Xv/aqls2jQ9WwWK25BY++0P9n08Hvpbn7 dogdLX4XWOC8kqytPJXCqyMMH4JOoROITchICP9Yb+vXzmztZz79piLPn6bDSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699847855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dqfLkjceUh2lbpyaRsW9dxwZu5RZti+MGVosbIIujFU=; b=XldtwEeNqTAJwHFwG/X+jPGnhMQOSReXYo8bUDNQ9xlPdw1y7+kwOHCAsWAC4NiCr/t6+D Go1dfGgLJqWReVGffIImq7DxYLJU8Av0EhL8lGlmSISOivpJ6u+9JBDba7ij2naLuSLP+k nfsAwxT/yGW4EVyc8rJc3WYxZwwWyphWC7eUaNHvhLctUTiQa94gPAm0a6jfWpxjp5WfEs UJw0CvzxkezcOm7jjQoFoJphlCtdzTPyq1u8x2LVV9cieSkFM3vwG8z7cHMsl2R6LYusAo QzvRr9/CVkIFwxf/nhPRNn7bOGNgV+kDIyYzmQaOFGuCorf97W+x9chMFCGTLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699847855; a=rsa-sha256; cv=none; b=VcilhbE0aRKe2WElrlXRzrmCzy7iJO882Z6zhZCq2PO7MUhzLxAfcFTyNqk11E5NF3q0KS VttmxD8ihqlTufmb2ndUGrYypIazozHSCS2H6lZDxn2iV43sxjC/7kHBBjiPitgqKOC6Dy qIGnJuzX/UH1jkeUU+Yp9ajFoyHwCUt6p7JQmpFlDj+7GIaR1nN4k9WbVuxw2BFT0WhE5D TX2onZOexoXFYdgrf0Quj4zuUFc1Qc4TmxWiH0wN4p4pDe/fo3OacafNcvgkV9b8Pecl/9 1gjQkIC/x9AaGy62s75KZVhYvRW30J7hYFWKhk1sFAa4sgBgOfy22GjCtQPbYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STFxq58BjzqDl; Mon, 13 Nov 2023 03:57: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 3AD3vZNa009022; Mon, 13 Nov 2023 03:57:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AD3vZRB009020; Mon, 13 Nov 2023 03:57:35 GMT (envelope-from git) Date: Mon, 13 Nov 2023 03:57:35 GMT Message-Id: <202311130357.3AD3vZRB009020@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 5d031613affa - stable/14 - bpf: Make dead_bpf_if const List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5d031613affa14b3de64f8cf9fed15604fb826d3 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=5d031613affa14b3de64f8cf9fed15604fb826d3 commit 5d031613affa14b3de64f8cf9fed15604fb826d3 Author: Zhenlei Huang AuthorDate: 2023-10-21 04:52:27 +0000 Commit: Zhenlei Huang CommitDate: 2023-11-13 03:56:57 +0000 bpf: Make dead_bpf_if const The dead_bpf_if is not subjected to be written. Make it const so that on destructive writing to it the kernel will panic instead of silent memory corruption. No functional change intended. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42189 (cherry picked from commit 7a974a649848e1222a49d0d49726d06bd5c1dbd9) --- sys/net/bpf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 8ca6e941e646..61eb674a7c0a 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -100,7 +100,7 @@ MALLOC_DEFINE(M_BPF, "BPF", "BPF data"); -static struct bpf_if_ext dead_bpf_if = { +static const struct bpf_if_ext dead_bpf_if = { .bif_dlist = CK_LIST_HEAD_INITIALIZER() }; @@ -2859,7 +2859,7 @@ bpfdetach(struct ifnet *ifp) continue; CK_LIST_REMOVE(bp, bif_next); - *bp->bif_bpf = (struct bpf_if *)&dead_bpf_if; + *bp->bif_bpf = __DECONST(struct bpf_if *, &dead_bpf_if); CTR4(KTR_NET, "%s: sheduling free for encap %d (%p) for if %p", @@ -3154,7 +3154,7 @@ void bpfattach2(struct ifnet *ifp, u_int dlt, u_int hdrlen, struct bpf_if **driverp) { - *driverp = (struct bpf_if *)&dead_bpf_if; + *driverp = __DECONST(struct bpf_if *, &dead_bpf_if); } void From nobody Mon Nov 13 03:57:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STFxs0Mrtz50kf8; Mon, 13 Nov 2023 03:57: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 4STFxr6ykRz4GVY; Mon, 13 Nov 2023 03:57:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699847857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1nSGBq3dZNmbMK0ZRmGl6qaMe4QrqPCi4WaA1HHA/JU=; b=siPSgm19fC5oPyU15Afgya+KHzwTCjjbxEJXplfg5WS1xhXLXwpqhaCWQr4U388vV6m35F N4GOi2McqyzclgIfJ9dZfGqp3CDviPsA8K5jP6GQgxi6f1k6EbQFXIqZJnZ0gtyL7VdGav V7JD8SyJK++f8zw7FwwxaeoEJFeGVXZEMP+kN4sel/YzK4mhtbMvSNYuAoOwuqV+Mmmazm 3fobabgqHRBB9iZh9UxmB5QmFRKDKPB0URev2UYo8x/wlke7bWN0qV0r6Sc4ZhE6qpA5zP gtinVkdLjgyI9JqeKCGnm/4QVF+m5dCkBVvQSaUg75rAzmZD5Z3JxAaPnUClXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699847857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1nSGBq3dZNmbMK0ZRmGl6qaMe4QrqPCi4WaA1HHA/JU=; b=t7glv5wJSEEFV8rdKxxPvGabLYOSiuzJ8Y3lGaHk9nYftuPryx52aiaq72btzW2yn4U6V2 MiAjdgJxaZ0CQq/fX1oX6oeNbNRqcs69vETPM3YbdP9U9MRJjUayb4hoddwalh4FDXz/XQ alSnHBIgrJImfiNvABS3KqiApo6Bj6KpokiwyTG3WSGShh0Mg7NILC3FfcGg82SXHnzNR5 r1xUmGvEaGmRs9qZ4zKbWUupc8SFnBDMHU7DnhltFyI2qnC5chc24MjKG0JII05H2eVW0+ bHOasR/462KjY8lTZx8EInwhTPcazjIK1dVYzUymNe2OaN99ny3zaQKCQ0ryMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699847857; a=rsa-sha256; cv=none; b=rixvzrs/hlwkweBhet1QzpBypeRoMUiLW1dEiS15p+fmlY97OgpBC2Bi78bG/szbJ+ShsF 6iqntrepcIEgLdfIXgbQ3vqFlml4Yuc6q07MGL5qFGpObXpehCTwDjIgu8U4Y8eNYR1YPZ 22Uwr6szENbQcGyD2wqFqhyzxnA8EQHiXZDTbLMNuPPyv7BCdRK4Es+dswOdUH1X1s4W6q wyRO2V2SQSPsJU1+kwMZpDYdkKGbMw1mjp2Zuk6CLRFtUYsFFJrnZYJ0IazlpXUGjcCUOF HtiQIeiWl8ruZeIgnr4zUutzJHpPEWvW5baZh0f7F2KWrO7UGJ7i3nJ2e3sXBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STFxr63x1zqTH; Mon, 13 Nov 2023 03:57: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 3AD3vaP3009070; Mon, 13 Nov 2023 03:57:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AD3vaw1009067; Mon, 13 Nov 2023 03:57:36 GMT (envelope-from git) Date: Mon, 13 Nov 2023 03:57:36 GMT Message-Id: <202311130357.3AD3vaw1009067@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: b388201875bf - stable/14 - veriexec: Simplify the initialization of loader tunable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b388201875bf28939cd32cec6bd786bf0667956d Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=b388201875bf28939cd32cec6bd786bf0667956d commit b388201875bf28939cd32cec6bd786bf0667956d Author: Zhenlei Huang AuthorDate: 2023-11-03 04:08:27 +0000 Commit: Zhenlei Huang CommitDate: 2023-11-13 03:56:57 +0000 veriexec: Simplify the initialization of loader tunable The loader tunable 'security.mac.veriexec.block_unlink' has been already flagged with CTLFLAG_RDTUN, no need to re-fetch it with TUNABLE_INT_FETCH. While here move the definition of sysctl knob out of function body, which is more common in FreeBSD. No functional change intended. Reviewed by: stevek MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42132 (cherry picked from commit bb8d4411e0c668415538f66fb25e6b38bb910cdd) --- sys/security/mac_veriexec/mac_veriexec.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/security/mac_veriexec/mac_veriexec.c b/sys/security/mac_veriexec/mac_veriexec.c index 57f3b6c307fa..7ac09e2acf0f 100644 --- a/sys/security/mac_veriexec/mac_veriexec.c +++ b/sys/security/mac_veriexec/mac_veriexec.c @@ -105,6 +105,8 @@ SYSCTL_PROC(_security_mac_veriexec, OID_AUTO, db, static int mac_veriexec_slot; static int mac_veriexec_block_unlink; +SYSCTL_INT(_security_mac_veriexec, OID_AUTO, block_unlink, CTLFLAG_RDTUN, + &mac_veriexec_block_unlink, 0, "Veriexec unlink protection"); MALLOC_DEFINE(M_VERIEXEC, "veriexec", "Verified execution data"); @@ -797,12 +799,6 @@ mac_veriexec_init(struct mac_policy_conf *mpc __unused) EVENTHANDLER_REGISTER(vfs_unmounted, mac_veriexec_vfs_unmounted, NULL, EVENTHANDLER_PRI_LAST); - /* Fetch tunable value in kernel env and define a corresponding read-only sysctl */ - mac_veriexec_block_unlink = 0; - TUNABLE_INT_FETCH("security.mac.veriexec.block_unlink", &mac_veriexec_block_unlink); - SYSCTL_INT(_security_mac_veriexec, OID_AUTO, block_unlink, - CTLFLAG_RDTUN, &mac_veriexec_block_unlink, 0, "Veriexec unlink protection"); - /* Check if unlink control is activated via tunable value */ if (!mac_veriexec_block_unlink) mac_veriexec_ops.mpo_vnode_check_unlink = NULL; From nobody Mon Nov 13 03:59:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STFzd4cNkz50kyh; Mon, 13 Nov 2023 03:59: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 4STFzd492cz4H7G; Mon, 13 Nov 2023 03:59:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699847949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QowJb3/sgjRJ9tHFeg37gfANfJ46SWRuJbk70ug5DVw=; b=MUHq1J/R68uqXoYCx6YfMacBByjvQQQdtN4NSyq/WlL52Iyq+kjSg7eeUzdrckKGg/giu2 24FyRRVKny0Xq1lUS7U8JDQT6TahDLyI+Fj49OJdK+cxXcwjOXHMXTbpAzZLJK9hriO9IA nxB7U3ul7znW3C9dbtSN54SIi8lnbMlpcVmARExMrEQN6sY1Lw7dbKd2HJkyJRgiNvM1uU H+Fg5j4RI8Wq0pt4T4scLZFkewp9TvyuCj6E47XaEjlEwQjz6jEDnuSEF8lgBZUEynBA10 /OxnI04tkOVpJAD8vqfnqxsDB2JMPqB7yWWODRySb5Janahc0h42yNVD491Vcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699847949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QowJb3/sgjRJ9tHFeg37gfANfJ46SWRuJbk70ug5DVw=; b=cMfczj7G5+nKCuFblC73nCtkPJxvJNwsTf3i2JZ995aOKmFMhxByftFlAitutsaGxZ5s5z nRNpSiuBfcisFTsKv01ARvnchWV1KFfZNAnTnpl/DUDP65IE+UQPVJ8Zozma9WwQinR8Dm MRv9NNALPfBuqlBqQkkfFai7UFcgXRsQhK1PFzg7OX7RmnnZLPhwjbzT6gwjWOGnPnKTAn IXkZh1pS4NInvB6CMzfn19AjOQKZX6Wz+2TxZTs/XJVLis7o/3qWjjIUsgguCjq5VY0KxN JGuGa/7kTUW8N6NJmtoassFGeYNzCl+0ArHyOIWtJQEwFnlzT+HjB8OYXNXx7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699847949; a=rsa-sha256; cv=none; b=iJWOlWEPbT5pDEr8+PlWKO3buwHYfCVSRdhkvWsAadXctcuwmc+jzNVn1+akdjkznU5RAQ zY9FfUFwGTlRq/uatuDAqQc+ryn1+iPVaPRPmT6j76tACIkmoA2YqJeAm9xQgM0kKsQEbJ HWeKjj5XhU4h9Odo+4EbWDGS3bVn6vnBXZ0wOaa8+XQhXaU5NH3FM3aCwfl90aq+2GoH6w RaAi7vjz3JfJF9Rl6nwue9GDgbKpoogWgwAKiIk6/lcN7sKYnWn6iUWPRHesjqyTODOsdC x6AWS0yLjcc2FoH8l1xwFKhUboSlEkdBMPIxzXefhpOsTL+ebKRJd7x0mn18aw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STFzd3GCszr55; Mon, 13 Nov 2023 03:59: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 3AD3x9Fh009418; Mon, 13 Nov 2023 03:59:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AD3x9nA009415; Mon, 13 Nov 2023 03:59:09 GMT (envelope-from git) Date: Mon, 13 Nov 2023 03:59:09 GMT Message-Id: <202311130359.3AD3x9nA009415@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 1e147980497b - stable/13 - bpf: Make dead_bpf_if const List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1e147980497b38d65cd72162c000c88507a7fa76 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=1e147980497b38d65cd72162c000c88507a7fa76 commit 1e147980497b38d65cd72162c000c88507a7fa76 Author: Zhenlei Huang AuthorDate: 2023-10-21 04:52:27 +0000 Commit: Zhenlei Huang CommitDate: 2023-11-13 03:58:34 +0000 bpf: Make dead_bpf_if const The dead_bpf_if is not subjected to be written. Make it const so that on destructive writing to it the kernel will panic instead of silent memory corruption. No functional change intended. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42189 (cherry picked from commit 7a974a649848e1222a49d0d49726d06bd5c1dbd9) (cherry picked from commit 5d031613affa14b3de64f8cf9fed15604fb826d3) --- sys/net/bpf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 20c26892ce7a..7aa1dfd302f4 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -99,7 +99,7 @@ MALLOC_DEFINE(M_BPF, "BPF", "BPF data"); -static struct bpf_if_ext dead_bpf_if = { +static const struct bpf_if_ext dead_bpf_if = { .bif_dlist = CK_LIST_HEAD_INITIALIZER() }; @@ -2796,7 +2796,7 @@ bpfdetach(struct ifnet *ifp) continue; CK_LIST_REMOVE(bp, bif_next); - *bp->bif_bpf = (struct bpf_if *)&dead_bpf_if; + *bp->bif_bpf = __DECONST(struct bpf_if *, &dead_bpf_if); CTR4(KTR_NET, "%s: sheduling free for encap %d (%p) for if %p", @@ -3076,7 +3076,7 @@ void bpfattach2(struct ifnet *ifp, u_int dlt, u_int hdrlen, struct bpf_if **driverp) { - *driverp = (struct bpf_if *)&dead_bpf_if; + *driverp = __DECONST(struct bpf_if *, &dead_bpf_if); } void From nobody Mon Nov 13 08:50:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STNRV6VJxz50f7W; Mon, 13 Nov 2023 08:50: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 4STNRV4yhzz3VQZ; Mon, 13 Nov 2023 08:50:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699865414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kG+HEwIsoJXrhgsjv9uv9KnIOv/X3J28veCZH+k3F+k=; b=b+B1TQruN8/MDM7a0jKVw5qELOqlRgRfcznbJMuz40/0y2/TSWCvT0HvXp/BNkX0BXpBH5 QfZtHKwKqBonztLhTP60i8hwce79/lAyiNAz3kSAoTku8cia5NboWAp8AMMsHwVYNRYKVn lIRkuB5djMVAuJEwTqO/1FfJwzbcj+bRAKwEGTCRBoBQ80atTPTh2H6AS8KtWdRtjJqn+f uiGgfhR1L+ltqTbdYkAoqo+Gfcsaj/nhlaUCvmDdCRJIoqTClEztubN8aeTBnrEc0UMjEI SFvrZSblhRpl98EFoUU6jbvF9G1INiUJjuY+P8Z0lA0L2bwO6THqNWqvHDDNOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699865414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kG+HEwIsoJXrhgsjv9uv9KnIOv/X3J28veCZH+k3F+k=; b=NQqH81rlbn/gR+7EIJytU8QYgGcYEAEcXLR8puy5BnqCaPT05SA/3fr0trc24Gnada2Zg7 MAOSpRQqqRFBfIO2UuDIOfEkwd430/Qk8w0ENFdINV0ApAFan9PdDXRQWK8edMxKYjiTXZ CxUfwYt3oiCwc2/U4Uc4ZoTIfyIYMRULn1QTpwhpV7vppFYxSLO5fs/jAzDRhw9i1c/I96 QZnhfm2LPserkftqSWN2CiX65uHQXkul08fcl2y0jmIqswYFGz1gs9439EhZellMvI/eDe fguR4gxCZt6J2Du0r+ccDlyOt0j6cjN/YLuA8e7iSfzs3FDuFYy+gZ3y8htjuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699865414; a=rsa-sha256; cv=none; b=tmeC+dUbPEVC+uwi1bCTv1ya3QvbEaEO2LboQxashKyLq97QVTFKsBtcA/VRKiCUszCs2+ JFqgbf/llux8n6qserPhViVCFtgp/kb8DsTHSsmyBXJsjc+qq+sFBCbaTTXTlAznbBAv2n 9pEWOOjqqzSMQ7ccGjdBeBCreCUqrW90XFr4//SLmIbJDLkyoiHxtrErr37xaCCitUtIEp kRPbQhJi8aCSR19+91XhkaI9HpnGqjOeW1rU9p2zGhzBYfvTZOnmf1nbc8o2AkNEnxGdHl ndq4Pb1Kdii27/Z1sJwXVqTyMells91fdLIrlv+ntXpT5GXehwS5vEE9kwkncg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STNRV44dNzydt; Mon, 13 Nov 2023 08:50: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 3AD8oE7W099974; Mon, 13 Nov 2023 08:50:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AD8oEX0099962; Mon, 13 Nov 2023 08:50:14 GMT (envelope-from git) Date: Mon, 13 Nov 2023 08:50:14 GMT Message-Id: <202311130850.3AD8oEX0099962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Leidinger Subject: git: cb57f50e6404 - main - defaults: oomprotect sshd and local_unbound List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: netchild X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb57f50e6404389e4314025caea487d63ddf0ee4 Auto-Submitted: auto-generated The branch main has been updated by netchild: URL: https://cgit.FreeBSD.org/src/commit/?id=cb57f50e6404389e4314025caea487d63ddf0ee4 commit cb57f50e6404389e4314025caea487d63ddf0ee4 Author: Alexander Leidinger AuthorDate: 2023-11-13 08:48:51 +0000 Commit: Alexander Leidinger CommitDate: 2023-11-13 08:48:51 +0000 defaults: oomprotect sshd and local_unbound Add sshd and local_unbound to the oom protected services. syslogd is protected by default already, document it. This was discussed on arch@, see https://lists.freebsd.org/archives/freebsd-arch/2023-November/000543.html sshd is protected to be able to investigate and fix oom issues on systems which don't have out-of-band console access. local_unbound is protected as it may be enabled for local use and without DNS a lot grinds to a halt (including sshd). Relnotes: yes MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D42544 --- libexec/rc/rc.conf | 2 ++ share/man/man5/rc.conf.5 | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 26e189953044..3269288728b6 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -318,6 +318,7 @@ ggated_config="/etc/gg.exports" # ggated(8) exports file. ggated_flags="" # Extra parameters like which port to bind to. ctld_enable="NO" # CAM Target Layer / iSCSI target daemon. local_unbound_enable="NO" # Local caching DNS resolver +local_unbound_oomprotect="YES" # Don't kill local_unbound when swap space is exhausted. local_unbound_tls="NO" # Use DNS over TLS blacklistd_enable="NO" # Run blacklistd daemon (YES/NO). blacklistd_flags="" # Optional flags for blacklistd(8). @@ -364,6 +365,7 @@ pppoed_provider="*" # Provider and ppp(8) config file entry. pppoed_flags="-P /var/run/pppoed.pid" # Flags to pppoed (if enabled). pppoed_interface="em0" # The interface that pppoed runs on. sshd_enable="NO" # Enable sshd +sshd_oomprotect="YES" # Don't kill sshd when swap space is exhausted. sshd_program="/usr/sbin/sshd" # path to sshd, if you want a different one. sshd_flags="" # Additional flags for sshd. ftpd_enable="NO" # Enable stand-alone ftpd. diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index a76cb1a04e0a..ad84bcbd576c 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 18, 2023 +.Dd November 13, 2023 .Dt RC.CONF 5 .Os .Sh NAME @@ -2318,6 +2318,12 @@ If set to run the .Xr syslogd 8 daemon. +Note, the +.Va syslogd_oomprotect +variable is set to +.Dq Li YES +by default in +.Pa /etc/defaults/rc.conf . .It Va syslogd_program .Pq Vt str Path to @@ -2381,6 +2387,12 @@ If set to run the .Xr unbound 8 daemon as a local caching DNS resolver. +Note, the +.Va local_unbound_oomprotect +variable is set to +.Dq Li YES +by default in +.Pa /etc/defaults/rc.conf . .It Va nscd_enable .Pq Vt bool Set to @@ -3840,6 +3852,12 @@ Set to to start .Xr sshd 8 at system boot time. +Note, the +.Va sshd_oomprotect +variable is set to +.Dq Li YES +by default in +.Pa /etc/defaults/rc.conf . .It Va sshd_flags .Pq Vt str If From nobody Mon Nov 13 09:35:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STPRk4Bqbz50plf; Mon, 13 Nov 2023 09:35: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 4STPRk3dfgz3cH6; Mon, 13 Nov 2023 09:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699868130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4PZtEVNyMMrlRrbZlQVQeiO/3QWL13Mkz3vXEstSud8=; b=KyIVJn0DYaIzGj3F+90wj4KZHJmzmfioTshbkiBWmQ7XWl5xgS6bsVHqDvvicLR3B4gsNq WNMaWLcNtofJ7lOM+uN+wB2GAdsbQGW9YKrKgsTWzgsEvGDRn14HREqjqb0qagCmzhiVkV 3n6oTJrh8smtf72860kgLwfI+2jQF2lOOCvVgB+nQ8U4dJA2mMfMD4qrEM9I6QBsKBBHs4 lG1T1wm93zrgBmNuneRVVUCQEEmvQiWU9FFZxkMNLmqozAorES1Hg05GVFdmgNNy+cBSbl p1H0nvYPSiiaRGHsRPnFqh+UaEF3P/EmWwpb/ZSvXftN2cHs7AQg6VTxmW+qvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699868130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4PZtEVNyMMrlRrbZlQVQeiO/3QWL13Mkz3vXEstSud8=; b=rtLchKdYySvMw2VhatrzA3+TnreH7EGsJ06L5KEODw/T0h9St+aAmw82Q6PzaYAxIT0pzz QWg1qrjnr4OBt52ex44e+5Y84IxiTnUeUklm0C09dPRy49qx1ippsyEvHhZMmIalN81cpS yiJECaHm5LeRgc+17fg00jUjgeELgyTXhlSPRGtd9DxMQPKTFLGer+X0jvJbv5Jae9DDMd TmmTk4JmT6OXz9kaHMx2pVaWvSURVBoDMtWy0l6eaqMqfF/suPJplE4ms39lgvjub+PzFr hBe59FGAhqyfhTNaD4qQAZAKrdsIT5cWXrWAkBpMsOtBdt/v6nQVlEorzxe6EA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699868130; a=rsa-sha256; cv=none; b=uqUcSJk0A1cCe4qCTlhvEfSI3KHz2+etXi5nyGrCKIfq2IBgd0iTSoqai+1ZffAd0LcV9h QEadD+meEItStFibs2CHYnunPaopwVA4dhbwB9tOZnS+1ezCVTZOJkL9EHS8whoMu0FbrI rUr4UAHC35jh1DGOZ8bzwIXrjuwBIepWPNSGLO161dB+2ZATmPy0eZA/ATicq/fhci2q2C S7caKi4S9p5vr1ul58J6v4Olq8lMEnlc5kfv3nZR8VGChJMAMHfHxg1cwE7K1UDMZbEjYi 50qB+C68/7bA0bbt1Z69vhXV97hXndTG80bYoWWxHpriCA35x+eA1Xtwst2Waw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STPRk2hzXz118V; Mon, 13 Nov 2023 09:35: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 3AD9ZUo4075835; Mon, 13 Nov 2023 09:35:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AD9ZUpC075832; Mon, 13 Nov 2023 09:35:30 GMT (envelope-from git) Date: Mon, 13 Nov 2023 09:35:30 GMT Message-Id: <202311130935.3AD9ZUpC075832@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 94b8a547c53b - stable/14 - pf: expose more syncookie state information to userspace List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 94b8a547c53b675a775fa824b433e23e5a28aee6 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=94b8a547c53b675a775fa824b433e23e5a28aee6 commit 94b8a547c53b675a775fa824b433e23e5a28aee6 Author: Kristof Provost AuthorDate: 2023-11-06 21:20:32 +0000 Commit: Kristof Provost CommitDate: 2023-11-13 07:10:27 +0000 pf: expose more syncookie state information to userspace Allow userspace to retrieve low and high water marks, as well as the current number of half open states. MFC after: 1 week Sponsored by: Modirum MDPay (cherry picked from commit a6173e94635b03aa7aab90a67785c8c3e7c6247b) --- lib/libpfctl/libpfctl.c | 1 + lib/libpfctl/libpfctl.h | 1 + sbin/pfctl/pfctl_parser.c | 5 +++++ sys/netpfil/pf/pf_ioctl.c | 1 + sys/netpfil/pf/pf_syncookies.c | 2 ++ 5 files changed, 10 insertions(+) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 03907698e7d2..72da534ac1df 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -1476,6 +1476,7 @@ pfctl_get_syncookies(int dev, struct pfctl_syncookies *s) s->highwater = nvlist_get_number(nvl, "highwater") * 100 / state_limit; s->lowwater = nvlist_get_number(nvl, "lowwater") * 100 / state_limit; + s->halfopen_states = nvlist_get_number(nvl, "halfopen_states"); nvlist_destroy(nvl); diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index f436e722496f..edaffdd12118 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -381,6 +381,7 @@ struct pfctl_syncookies { enum pfctl_syncookies_mode mode; uint8_t highwater; /* Percent */ uint8_t lowwater; /* Percent */ + uint32_t halfopen_states; }; struct pfctl_status* pfctl_get_status(int dev); diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 0268d1b07c79..cb307cd6ede5 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -628,6 +628,11 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts) PFCTL_SYNCOOKIES_MODE_NAMES[cookies->mode]); printf(" %-25s %s\n", "active", s->syncookies_active ? "active" : "inactive"); + if (opts & PF_OPT_VERBOSE2) { + printf(" %-25s %d %%\n", "highwater", cookies->highwater); + printf(" %-25s %d %%\n", "lowwater", cookies->lowwater); + printf(" %-25s %d\n", "halfopen states", cookies->halfopen_states); + } printf("Reassemble %24s %s\n", s->reass & PF_REASS_ENABLED ? "yes" : "no", s->reass & PF_REASS_NODF ? "no-df" : "" diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 6b8fbf77fd29..de43570176cb 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -5918,6 +5918,7 @@ pf_getstatus(struct pfioc_nv *nv) nvlist_add_number(nvl, "reass", V_pf_status.reass); nvlist_add_bool(nvl, "syncookies_active", V_pf_status.syncookies_active); + nvlist_add_number(nvl, "halfopen_states", V_pf_status.states_halfopen); /* counters */ error = pf_add_status_counters(nvl, "counters", V_pf_status.counters, diff --git a/sys/netpfil/pf/pf_syncookies.c b/sys/netpfil/pf/pf_syncookies.c index b5e59178e7e8..c5ee64c6aed0 100644 --- a/sys/netpfil/pf/pf_syncookies.c +++ b/sys/netpfil/pf/pf_syncookies.c @@ -162,6 +162,8 @@ pf_get_syncookies(struct pfioc_nv *nv) V_pf_status.syncookies_mode == PF_SYNCOOKIES_ADAPTIVE); nvlist_add_number(nvl, "highwater", V_pf_syncookie_status.hiwat); nvlist_add_number(nvl, "lowwater", V_pf_syncookie_status.lowat); + nvlist_add_number(nvl, "halfopen_states", + atomic_load_32(&V_pf_status.states_halfopen)); nvlpacked = nvlist_pack(nvl, &nv->len); if (nvlpacked == NULL) From nobody Mon Nov 13 09:35:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STPRl2CHjz50pqt; Mon, 13 Nov 2023 09:35: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 4STPRl0ZsZz3cBm; Mon, 13 Nov 2023 09:35:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699868131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vDsvs3GagEFNBi9pvsgAm92w0fAgysi6VrUtrU86+eU=; b=R+wut97oODxn0ld2YlE9s91/qc8J5mIl6F/GGpFHd8Ip29rjCmMa7NIL7YSaMmXUHX6p3R 0dc8lqqyJMd6Wj4+i8M6hu3lqFaYS8emsFUE9IqxhGkaVu3rs5cW1s2/cPDe8pjdrWC4kl j7LWP5xtSPi7Vsmp91e6gbklpFLe+jgXfVbp5sKf3vZKMWkxrgXJyg7KeC1M7BhjXmahKM AujpJCKmjnqEmxOOW80uM63qhju9El6MZMkH/b2G6KFwlXmuWhM+0QSw03y/dVHKy+AyQx DWvPLUrYNaiww1Z9klm81cCilBKF6v3Pagksv4brL70acOPK8PzIWYikXnC3Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699868131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vDsvs3GagEFNBi9pvsgAm92w0fAgysi6VrUtrU86+eU=; b=DLqI8WAL+y+30mzwLaYnJKq1TvWxs4VwM45WYwTInC+AziaN1NVsovfmqlqlfLiLIVDTTg ELMou9cu1lV5/G/2lmTB8hP3q4lYf8Q9PxrY+VrKjOmTU5OcT6k6qLHZBoYqWEClGE6ykS veVI4Vs3zry+mMGZ13ISP07t0k0aeS8yvce05DgHLa+vYPd9UQX1lBgRUzIe67oENAs/nA BEe50T9F8UjCaSuUWJgJHjck+xy9LwaGQGcsuUc8B3zDfRATqsM1MKWVGCfuoeNbbvUA0D eMJcdeO78L8yP8ly99Vk/4Lk5An6SJpbUqmtw3KrY2afBE/ZgnH/ToYiaOtb2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699868131; a=rsa-sha256; cv=none; b=LnQFE3c2kWlz7vz1GEWwc+2EUXcvLatfTDv9CWiVte4ug+TfanZaaZeE+DvZC1B7uXpm+F PITSbxFXRUcvi2WnPYiqIFsi49agE8KwYYdiZZ2ctCmM9HWQOZWy1kdhhHVZXOhWCHwYD/ JBdzuJ7nOrwOV5D+TwJjDcBtk2ylmGkufqtMiu09xO4p3Y9FlAJKFe1Wv//3qfgbGByEAc 4HaJMH5Q3RV3p9E1nBzNrAV0lWCGfHfjeYxUIF6VafUguD9DVVKDeBRWTGhJx3H6/+/MCL m4urmZLvQERamM3rWfknVJCVCKtiqc5BONqT1Uqgx+4WKBnRiQk0VfpqBKsAdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STPRk6mVlz10XB; Mon, 13 Nov 2023 09:35: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 3AD9ZUd6075942; Mon, 13 Nov 2023 09:35:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AD9ZUEd075939; Mon, 13 Nov 2023 09:35:30 GMT (envelope-from git) Date: Mon, 13 Nov 2023 09:35:30 GMT Message-Id: <202311130935.3AD9ZUEd075939@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 221a60a426d7 - stable/13 - pf: expose more syncookie state information to userspace List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 221a60a426d7f73dc4ef021821bf81dd269ba943 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=221a60a426d7f73dc4ef021821bf81dd269ba943 commit 221a60a426d7f73dc4ef021821bf81dd269ba943 Author: Kristof Provost AuthorDate: 2023-11-06 21:20:32 +0000 Commit: Kristof Provost CommitDate: 2023-11-13 07:10:47 +0000 pf: expose more syncookie state information to userspace Allow userspace to retrieve low and high water marks, as well as the current number of half open states. MFC after: 1 week Sponsored by: Modirum MDPay (cherry picked from commit a6173e94635b03aa7aab90a67785c8c3e7c6247b) --- lib/libpfctl/libpfctl.c | 1 + lib/libpfctl/libpfctl.h | 1 + sbin/pfctl/pfctl_parser.c | 5 +++++ sys/netpfil/pf/pf_ioctl.c | 1 + sys/netpfil/pf/pf_syncookies.c | 2 ++ 5 files changed, 10 insertions(+) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 4dec539e250b..7fc22734994b 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -1145,6 +1145,7 @@ pfctl_get_syncookies(int dev, struct pfctl_syncookies *s) s->highwater = nvlist_get_number(nvl, "highwater") * 100 / state_limit; s->lowwater = nvlist_get_number(nvl, "lowwater") * 100 / state_limit; + s->halfopen_states = nvlist_get_number(nvl, "halfopen_states"); nvlist_destroy(nvl); diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index 32cd408c5919..78d981c2d769 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -286,6 +286,7 @@ struct pfctl_syncookies { enum pfctl_syncookies_mode mode; uint8_t highwater; /* Percent */ uint8_t lowwater; /* Percent */ + uint32_t halfopen_states; }; struct pfctl_status* pfctl_get_status(int dev); diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index ed152eca0010..74cb365d2370 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -627,6 +627,11 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts) PFCTL_SYNCOOKIES_MODE_NAMES[cookies->mode]); printf(" %-25s %s\n", "active", s->syncookies_active ? "active" : "inactive"); + if (opts & PF_OPT_VERBOSE2) { + printf(" %-25s %d %%\n", "highwater", cookies->highwater); + printf(" %-25s %d %%\n", "lowwater", cookies->lowwater); + printf(" %-25s %d\n", "halfopen states", cookies->halfopen_states); + } } } diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 44b0bccc7489..639c2462fe75 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -4979,6 +4979,7 @@ pf_getstatus(struct pfioc_nv *nv) nvlist_add_number(nvl, "src_nodes", V_pf_status.src_nodes); nvlist_add_bool(nvl, "syncookies_active", V_pf_status.syncookies_active); + nvlist_add_number(nvl, "halfopen_states", V_pf_status.states_halfopen); /* counters */ error = pf_add_status_counters(nvl, "counters", V_pf_status.counters, diff --git a/sys/netpfil/pf/pf_syncookies.c b/sys/netpfil/pf/pf_syncookies.c index fb81f59097fb..17f5803e18f5 100644 --- a/sys/netpfil/pf/pf_syncookies.c +++ b/sys/netpfil/pf/pf_syncookies.c @@ -155,6 +155,8 @@ pf_get_syncookies(struct pfioc_nv *nv) V_pf_status.syncookies_mode == PF_SYNCOOKIES_ADAPTIVE); nvlist_add_number(nvl, "highwater", V_pf_syncookie_status.hiwat); nvlist_add_number(nvl, "lowwater", V_pf_syncookie_status.lowat); + nvlist_add_number(nvl, "halfopen_states", + atomic_load_32(&V_pf_status.states_halfopen)); nvlpacked = nvlist_pack(nvl, &nv->len); if (nvlpacked == NULL) From nobody Mon Nov 13 10:24:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STQXT5zj0z5115q; Mon, 13 Nov 2023 10:24: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 4STQXT5VlVz4FhH; Mon, 13 Nov 2023 10:24:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699871081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bbn533hVMSEW5E1Wad2w+VeM6CIzE8SASgzD4YbQVzY=; b=qpEAW8z1RF04w3Lf3q3+iez8i0ivGd9nJa8e1eng/HysbVyoJ1atJv/XOQi/eCmeEqKJ/Y 5QtZVvDbNTR/d4WrhEnDWwHeMy54PnYYu6WGR8K4gYXvwuwf5Pmp4CEPKodLESh8fdtToP 7Lc4Nfg/8ytEffpG3HvvybAYlm4o6pk0uzFmr5zntvcax12Z21ot71O2WaDLjf5uaRA65d FXqyplzNACgau38G/mJ4m7TBTbVXVUh8P46+K6DCW1W2UlNMtSB3CIlgM8X11k6amZeMYy 3PPDdObdMAZ+46Frk/ov44rh7pR/0lw5Nk6G7Kb5ORkoBInWKxk59cOrAUqEfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699871081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bbn533hVMSEW5E1Wad2w+VeM6CIzE8SASgzD4YbQVzY=; b=fHCrxuA3SW8s4C9unbrzlIpuGaYkdNfX2B+m2lb2ZtVhScUSg2nBWb2Uv8Zugnk5JPi7g8 LKmZvWLdCQ+vs89v2nRXlse923UG7Wd/DtLSo3yXLRVIk7+E0G32rNfm5Ndn+KXxxPKJVg gdNnXNozd1PwbDoyKTQzQhEN/RQFIIYrPPTFdWVhtl0FrhL4CTmgnHD0hLI4stHn6X7fwN HqIv4TVtlfOK3vNO8CsyR5OL+XsvD2K4H02wkuhv5QEUn+zGANNxY0ey485AdoqZsgJpdd u2dFTPWHrzkMHRikvJFaXA8PpTnw75U6yfbDsQfVFExzg5W8JsYyHqyk82ii7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699871081; a=rsa-sha256; cv=none; b=mClMblPMINQLjlCNT9GM+O/ykDYFMJMwpkI/p70caaNpCLBBYV9x70mQDDwtMbvLuD8Iig cDMLtOvIHCXrl35LwrLCrRQip5eEiG2uQYTFDQjOs6fu1y3/l9fliPpjW08+zs2YIiNXFY bovqlnu5P9FjQ7XON17uw6/jX+Bm1JHcNgE0sG3sc8TSYygHstP+u8efCUgJWRDZZjyWFA UD+DWwVtnUe+CDSGdtoOvMhRD3qRGZkdKnx81dxqAU3pCMMdM5KBAcdiwpLPRFIN0L7Zhb OpF4APbCRghWt+s1RGF0vl0keX7QFQFH+mNdFHqJnLVZC7Evjr5/qm6UCkA+hQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STQXT4Z5yz11w5; Mon, 13 Nov 2023 10:24: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 3ADAOfct060328; Mon, 13 Nov 2023 10:24:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADAOfQw060325; Mon, 13 Nov 2023 10:24:41 GMT (envelope-from git) Date: Mon, 13 Nov 2023 10:24:41 GMT Message-Id: <202311131024.3ADAOfQw060325@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 281f61d211b3 - stable/12 - bpf: Make dead_bpf_if const List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 281f61d211b38d95986d2cec97407e770313a087 Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=281f61d211b38d95986d2cec97407e770313a087 commit 281f61d211b38d95986d2cec97407e770313a087 Author: Zhenlei Huang AuthorDate: 2023-10-21 04:52:27 +0000 Commit: Zhenlei Huang CommitDate: 2023-11-13 10:22:41 +0000 bpf: Make dead_bpf_if const The dead_bpf_if is not subjected to be written. Make it const so that on destructive writing to it the kernel will panic instead of silent memory corruption. No functional change intended. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42189 (cherry picked from commit 7a974a649848e1222a49d0d49726d06bd5c1dbd9) (cherry picked from commit 5d031613affa14b3de64f8cf9fed15604fb826d3) (cherry picked from commit 1e147980497b38d65cd72162c000c88507a7fa76) --- sys/net/bpf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 5ca92a97f74f..47e41f3886cb 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -99,7 +99,7 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_BPF, "BPF", "BPF data"); -static struct bpf_if_ext dead_bpf_if = { +static const struct bpf_if_ext dead_bpf_if = { .bif_dlist = LIST_HEAD_INITIALIZER() }; @@ -2693,7 +2693,7 @@ bpfdetach(struct ifnet *ifp) */ BPFIF_WLOCK(bp); bp->bif_flags |= BPFIF_FLAG_DYING; - *bp->bif_bpf = (struct bpf_if *)&dead_bpf_if; + *bp->bif_bpf = __DECONST(struct bpf_if *, &dead_bpf_if); BPFIF_WUNLOCK(bp); CTR4(KTR_NET, "%s: sheduling free for encap %d (%p) for if %p", @@ -3046,7 +3046,7 @@ void bpfattach2(struct ifnet *ifp, u_int dlt, u_int hdrlen, struct bpf_if **driverp) { - *driverp = (struct bpf_if *)&dead_bpf_if; + *driverp = __DECONST(struct bpf_if *, &dead_bpf_if); } void From nobody Mon Nov 13 14:24:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STWrv0YMRz50tXc; Mon, 13 Nov 2023 14:24: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 4STWrv06QJz3Kj6; Mon, 13 Nov 2023 14:24:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699885455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Q+LxIdUmcw0BIdXXKt3BnGmvRwbAfKUd3z1CEXgfTM=; b=Wm8irjLlItHAGOxjBQYfArWPqZqtUHGKTel9ycJD138ImtK/EisZ075H4KKMxdyCvKQ4t8 Omkg3xkTaUi+qKjcjG1gcD2ssKhi6w1dIeJ32owpAtqz8IvicAu6elsf6OpxHOXKQk7pSj N3juLmkvWDeI9ScxCYzDlUWNRXwUSuUVQ1csD8LpcG7PBae111pQ+jkxixA0RFhZmAsuMq G/KEoIYGFBRzhU4i507dwoLqxlq9PDQr8MUU3F4D8yUWgfCnM3q80r8uAz6iceCGI7BsYi 8QvSJZQRrSC4SGgo0evUjujPAEzzDCy8vQOy5AO1cQSQZoz6//t6VPDq/F0eTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699885455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Q+LxIdUmcw0BIdXXKt3BnGmvRwbAfKUd3z1CEXgfTM=; b=SHvH6jt57gbne2b4brT7n8uUrfyLo19Yk6Y2t11Rnb08yQEKuOkr0VyX/RUpbn3Z2H4Skq 62AoxoTzm2TNofRmVR8wGx1oOaOPdKlnqZamSakwKIS4ghTGVctprm1SNxE7NqUy0rsR4r RvkTzxBIfAgEkOxVAzvc17/HsOc+2Wp0ND13zjKjMAqQZ/fDvWDctEZBG/r+lHk1RxdYlR 6C7hRmmtuejU2USMNLer7MO9Zr5me6xEczRyj/6dHzlwinu3OsjGFAU99z6I/X7r6QeWEN lioQiTRu4kRl8yxUjFoQkf/gy4sBYUMIrMrDxxX8wqw6yioC845zvnXWZ1z64w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699885455; a=rsa-sha256; cv=none; b=Y2/xro54zyBj6LgizkN61lDKIJVcVVynLX7e9ED4E+DVvC2EkJxqWixPzdd8t3n9P6p/52 1X+U3KyP7gotE35+b86ro/3bKXtto9VvzJPYv47LKI3mTaS5/OCHMis7K6WtuUBRnAu71r ZF68JMtT75G1vn2H1xCY2KeKMFpGQgTtF//hFIRqJ6cg5rqYK87XgpXmphox8mtFTUXynT Na6UBAwE/UsEFTBXxCHMzOVDZo+Mle7iKBWi9OhKk5XMBmJavDzAAqnjI34a0QG+rpIeoD aWOAN3Qk2eLu1o3gekglu+WQFxsvuWmDzFwYiqic9MS3WgMcy37BxGuFwaWxJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STWrt6Gbwz17jk; Mon, 13 Nov 2023 14:24: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 3ADEOEXI059640; Mon, 13 Nov 2023 14:24:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADEOEcp059637; Mon, 13 Nov 2023 14:24:14 GMT (envelope-from git) Date: Mon, 13 Nov 2023 14:24:14 GMT Message-Id: <202311131424.3ADEOEcp059637@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: 20f8814cd3fa - main - busdma: On systmes that use subr_busdma_bounce, measure deferred time List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 20f8814cd3fa6b7cda704e07dec4da6cb9647e37 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=20f8814cd3fa6b7cda704e07dec4da6cb9647e37 commit 20f8814cd3fa6b7cda704e07dec4da6cb9647e37 Author: Warner Losh AuthorDate: 2023-11-13 14:23:53 +0000 Commit: Warner Losh CommitDate: 2023-11-13 14:23:53 +0000 busdma: On systmes that use subr_busdma_bounce, measure deferred time Measure the total deferred time (from the time we decide to defer until we try again) for busdma_load requests. On systems that don't ever defer, there is no performnce change. Add new sysctl hw.busdma.zoneX.total_deferred_time to report this (in microseconds). Normally, deferrals don't happen in modern hardware... Except there's a lot of buggy hardware that can't cope with memory > 4GB or that can't cross a 4GB boundary (or even more restrictive values), necessitating bouncing. This will measure the effect on the I/Os of this deferral. Sponsored by: Netflix Reviewed by: gallatin, mav Differential Revision: https://reviews.freebsd.org/D42550 --- sys/arm64/arm64/busdma_bounce.c | 1 + sys/kern/subr_busdma_bounce.c | 10 +++++++++- sys/riscv/riscv/busdma_bounce.c | 1 + sys/x86/x86/busdma_bounce.c | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/busdma_bounce.c b/sys/arm64/arm64/busdma_bounce.c index c1028f35ba7f..ee84d03a44d4 100644 --- a/sys/arm64/arm64/busdma_bounce.c +++ b/sys/arm64/arm64/busdma_bounce.c @@ -98,6 +98,7 @@ struct bus_dmamap { struct memdesc mem; bus_dmamap_callback_t *callback; void *callback_arg; + __sbintime_t queued_time; STAILQ_ENTRY(bus_dmamap) links; u_int flags; #define DMAMAP_COHERENT (1 << 0) diff --git a/sys/kern/subr_busdma_bounce.c b/sys/kern/subr_busdma_bounce.c index f5f27dae9b05..76f50b2abf38 100644 --- a/sys/kern/subr_busdma_bounce.c +++ b/sys/kern/subr_busdma_bounce.c @@ -76,6 +76,7 @@ struct bounce_zone { #ifdef dmat_domain int domain; #endif + sbintime_t total_deferred_time; bus_size_t alignment; bus_addr_t lowaddr; char zoneid[8]; @@ -119,6 +120,7 @@ _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int flags) bz = dmat->bounce_zone; STAILQ_INSERT_TAIL(&bz->bounce_map_waitinglist, map, links); + map->queued_time = sbinuptime(); mtx_unlock(&bounce_lock); return (EINPROGRESS); } @@ -239,7 +241,10 @@ alloc_bounce_zone(bus_dma_tag_t dmat) "domain", CTLFLAG_RD, &bz->domain, 0, "memory domain"); #endif - + SYSCTL_ADD_SBINTIME_USEC(busdma_sysctl_tree(bz), + SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, + "total_deferred_time", CTLFLAG_RD, &bz->total_deferred_time, + "Cumulative time busdma requests are deferred (us)"); if (start_thread) { if (kproc_create(busdma_thread, NULL, NULL, 0, 0, "busdma") != 0) @@ -436,6 +441,7 @@ busdma_thread(void *dummy __unused) STAILQ_HEAD(, bus_dmamap) callbacklist; bus_dma_tag_t dmat; struct bus_dmamap *map, *nmap; + struct bounce_zone *bz; thread_lock(curthread); sched_class(curthread, PRI_ITHD); @@ -452,8 +458,10 @@ busdma_thread(void *dummy __unused) STAILQ_FOREACH_SAFE(map, &callbacklist, links, nmap) { dmat = map->dmat; + bz = dmat->bounce_zone; dmat_lockfunc(dmat)(dmat_lockfuncarg(dmat), BUS_DMA_LOCK); + bz->total_deferred_time += (sbinuptime() - map->queued_time); bus_dmamap_load_mem(map->dmat, map, &map->mem, map->callback, map->callback_arg, BUS_DMA_WAITOK); dmat_lockfunc(dmat)(dmat_lockfuncarg(dmat), diff --git a/sys/riscv/riscv/busdma_bounce.c b/sys/riscv/riscv/busdma_bounce.c index 6b50dc527b66..2aa6c0d0b371 100644 --- a/sys/riscv/riscv/busdma_bounce.c +++ b/sys/riscv/riscv/busdma_bounce.c @@ -95,6 +95,7 @@ struct bus_dmamap { struct memdesc mem; bus_dmamap_callback_t *callback; void *callback_arg; + __sbintime_t queued_time; STAILQ_ENTRY(bus_dmamap) links; u_int flags; #define DMAMAP_COULD_BOUNCE (1 << 0) diff --git a/sys/x86/x86/busdma_bounce.c b/sys/x86/x86/busdma_bounce.c index b9943ad3792e..6ae02752a805 100644 --- a/sys/x86/x86/busdma_bounce.c +++ b/sys/x86/x86/busdma_bounce.c @@ -90,6 +90,7 @@ struct bus_dmamap { struct memdesc mem; bus_dmamap_callback_t *callback; void *callback_arg; + __sbintime_t queued_time; STAILQ_ENTRY(bus_dmamap) links; #ifdef KMSAN struct memdesc kmsan_mem; From nobody Mon Nov 13 14:47:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STXMf3N82z51002; Mon, 13 Nov 2023 14:47: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 4STXMf2vfXz3NZp; Mon, 13 Nov 2023 14:47:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699886846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7hXwDryhqdDrb+cRKGFSlr/OHsVWxb+MwWzaxrBY/g=; b=MOtR5qnA/Qxk+T2wqrcpBCg8wv2JVmpDyJCG/z3kjzYhvKhWjemZzu+Hcvyn0FGM5isVqa Mz8smuHfoS/BddA+DNDizdUCGFMgVdreY4A8pxAdREcRmjSBmEMsPLkeHb+r/Fk4ywaqC3 tYxrQQXqtp1SyJfREKFfiHRn2d3LUxlhSsL5J87juN7ElKyI4NyV0YuvrDlCkk0ulEGUzd o8/F9G636Cp+o9wa3jQFm2VOTLpshY0hw93M88AQA6Z61j3VeaQ8NyuaBmvEqsYrouTW9u Nkcb7fDMiDoU+wBaVbqCOU3/QMH8gaQUZlu4VzPaac2NWYApvCUM57OdzC9jWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699886846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7hXwDryhqdDrb+cRKGFSlr/OHsVWxb+MwWzaxrBY/g=; b=CxUzT3jg1qBYFSQ65nax1aIsWnACawCwb/Ws2h4oNd0nelS88pdStH5W+9wXZCOoJUxbOn E51jhwCC8yCHBi9BTrPQIwtO4KOvtRt+1JnpDQSNINyjnbENg15UTT0xRPerpBk+EGRlev 2tH/nJ9WsCKNoS/l5Gx0xWkssneTjfcMKIuAT0Lb9pCPGritMo9LbVnIsik7hrjIUoFDCE vBOM3tblREfv8LLFbGWLht//zHI3ZWqyZ6bsGVqpt9boKdc7Mm0B4+91BlBsnL8j/489fa B5Tvv73u3lroT0iKkQHz4K+tv1gbgtzWLIg5GFr/FA0qwgA+a1t6uPXhITSxdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699886846; a=rsa-sha256; cv=none; b=lGkGmu5YBUrknCjR+PZFAsna94DaJWFJR4EltEN1zpNIg6fsUEM4MGRFZXYnsfs6pvelRe aw/7S0ZvcqIlapdkXu++wP5ftOgG5YbuaskSkls0nsnzwfvUOVbt5RJglzWHm2oBvHxTPX qHXHZS6IjFih7QVBQiHD7++9Muq81LEr/J9H/u5i6sApAyQ8kgOgl5gNDMS+GRzO5pOixO ehtbN/mcl5mSl61NYzFdqaoBSY/53bY8i1dfg3Jrm70sFTK+ZUCqMdmRi6SFqemJqd84dC g3eAR4/Lf8LrR4IdFgpntNMtduOaG6cewC65kBbW3iVATlbljKvWufMe4dtUEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STXMf1sMnz18LK; Mon, 13 Nov 2023 14:47: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 3ADElQwC093054; Mon, 13 Nov 2023 14:47:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADElQMr093051; Mon, 13 Nov 2023 14:47:26 GMT (envelope-from git) Date: Mon, 13 Nov 2023 14:47:26 GMT Message-Id: <202311131447.3ADElQMr093051@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Rabson Subject: git: 21e9018ae196 - main - pkgbase: use . format for alpha, beta and release package versions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dfr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 21e9018ae19662db643a21064150da866bc7beb4 Auto-Submitted: auto-generated The branch main has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=21e9018ae19662db643a21064150da866bc7beb4 commit 21e9018ae19662db643a21064150da866bc7beb4 Author: Doug Rabson AuthorDate: 2023-11-13 13:04:26 +0000 Commit: Doug Rabson CommitDate: 2023-11-13 14:46:36 +0000 pkgbase: use . format for alpha, beta and release package versions This is consistent with version numbers used in releng/13.2. PR: 275051 Reviewed by: bapt MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42562 --- Makefile.inc1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index c1c0b56efd1b..c1dfb84538af 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -547,9 +547,11 @@ VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDA MAJOR_REVISION= ${_REVISION:R} .if !defined(PKG_VERSION) +_PKG_REVISION= ${_REVISION} _STRTIMENOW= %Y%m%d%H%M%S _TIMENOW= ${_STRTIMENOW:gmtime} .if ${_BRANCH:MCURRENT*} || ${_BRANCH:MSTABLE*} || ${_BRANCH:MPRERELEASE*} +_PKG_REVISION= ${MAJOR_REVISION} EXTRA_REVISION= .snap${_TIMENOW} .elif ${_BRANCH:MALPHA*} EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/}.${_TIMENOW} @@ -560,7 +562,7 @@ EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/}.${_TIMENOW} .elif ${_BRANCH:M*-p*} EXTRA_REVISION= p${_BRANCH:C/.*-p([0-9]+$)/\1/} .endif -PKG_VERSION:= ${MAJOR_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} +PKG_VERSION:= ${_PKG_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} .endif .endif # !defined(PKG_VERSION) From nobody Mon Nov 13 15:18:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STY3Y4flvz515bb for ; Mon, 13 Nov 2023 15:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4STY3Y4CL5z3SYG; Mon, 13 Nov 2023 15:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699888713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=03NFS2yh/PJWDNVuRlSjOw4M7/uYlU22NfHI0nie4cs=; b=nLdFdiAkz20bSYZ5Sv9eSVwtQqsQSoyrHpNuLTkqwOQ22zS2VPC6QqXegCujvJj6EAj5Do G89+CISbRKXxJXaZWb+WrGhjWdxNR9hL8utwF1pkkDbGEc9oMdjJCbb2elUPujvENu7Wjz XlSFHID7qzEnRhjyNDf6Z/H9V6iY2ghMiUYhKcVEDMioNaWoen7tUBrEbaTMMUc5gBVA2B mbfkIqm0aaaFXmQ+AAt7sxBVj2x/2lzAaJBl7w/qtMcbZnigC2mbrdh/04N6JlJPjFd36n 4c34VfM5DNII+ZjQfCOk9evEegn8hEckZpOojUPJtXe343SCLDGuwCW1L5rLRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699888713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=03NFS2yh/PJWDNVuRlSjOw4M7/uYlU22NfHI0nie4cs=; b=xw3MOAWm/L0fOvXKQOpsEmcOBIq1pfdmOjyKCd8NxIe8nQ8i2R9bGRsmpUC79wZNQlhYBe llbTBaey0HnfhvdYjBn7+wbpL+ETaKR5uwfgxcO2s9a4A97bTCEBNxnCZXwBczaRzrLtke w5t50+Pkoc4CM7yMduG1bygtTQhZlp1io9B+shwZdSIP8dONRcQMgp0XmN7b22NcL0S0xo SthwdP8gXfOPBo67Pa5yDNHXnCgVB/64MwygODZf6NDOCP4+m36nJzmuwjstfmS/RatXnQ jR2VFs01qVfD/scPqEgBvBT1r5hxkzlm11+trZ/x0sSQB8IhCYaPlRTf9BJ38w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699888713; a=rsa-sha256; cv=none; b=NfigY52m/usylKfntxcO+9UNl+W/a4IfBwl+x43H+UVx8MqbTKLuMkCbjvcQ95teBST92v ekWNrbUP9ZalATkx6Bhd/JecfPx+DR9rKzX9T4+crex1f7V8dNkj+1G3w03dGaW4ZjRjUm B8+OFDS5qy4j/miLrn83ur9vwhMqTzF02rR2QWJY7e1ltxhV11+7/r5hlr6DttVYJ/zqNM KjnLKqwS27KnsROF9JEYz6G0U1CK9PhSBxETJCwK3ZcbeZ1mip6DNjdDJL5eTdmWrwFpQl 79nrt7K10lkwR/LCZarEEA5SsSstqq5YBYRTB6Ph2qOD/OYzPLXxqOcCYDzrOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STY3Y3H7Dz19Jp; Mon, 13 Nov 2023 15:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3ADFIXt6043541; Mon, 13 Nov 2023 15:18:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADFIXYj043540; Mon, 13 Nov 2023 15:18:33 GMT (envelope-from git) Date: Mon, 13 Nov 2023 15:18:33 GMT Message-Id: <202311131518.3ADFIXYj043540@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: 58cb87364d72 - Create tag vendor/sqlite3/sqlite-3440000 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/tags/vendor/sqlite3/sqlite-3440000 X-Git-Reftype: annotated tag X-Git-Commit: 58cb87364d729260959ec90537b45d334161c2fe Auto-Submitted: auto-generated The annotated tag vendor/sqlite3/sqlite-3440000 has been created by cy: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/sqlite3/sqlite-3440000 tag vendor/sqlite3/sqlite-3440000 Tagger: Cy Schubert TaggerDate: 2023-11-13 15:15:55 +0000 sqlite3: Tag 3.44.0 commit 3a88fe13354325b9f56f07927e654de4f5398707 Author: Cy Schubert AuthorDate: 2023-11-13 15:14:55 +0000 Commit: Cy Schubert CommitDate: 2023-11-13 15:14:55 +0000 sqlite3: Vendor import of sqlite3 3.44.0 Release notes at https://www.sqlite.org/releaselog/3_44_0.html. Obtained from: https://www.sqlite.org/2023/sqlite-autoconf-3440000.tar.gz From nobody Mon Nov 13 15:18:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STY3Y4gRgz515YV for ; Mon, 13 Nov 2023 15:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4STY3Y45pVz3SWL; Mon, 13 Nov 2023 15:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699888713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lU8hus9VFNM46PqA5o2cwDx3GvPZ3Jp4PaHZi6hVwes=; b=KiojAvSckJsHQ46RpLkzEpGKkvvD9W/qWn2uOmQJSPjLf/Gn8VL1mZAk/agBo2N/GK4wMD pWXRiCAnHpr6llCcE4thhMGVZakiMai91zFiwlpQq1PXO08e1AG+qEpGJFx2+snOzvcVef lWNmo7SBUxrwpEps9cewM0HeZ7QotvpSJ1MUZ9XQyIpJ2KPBDUT2MSxHhfyCOuFgnueSF2 qVNi9Qyh/KHT0yvIh4hQRIdZ57xfI5XWhicG/PW15LSGmRM52SwrSwkNaj/jJKhRTJAiMG a/P0LM4H3djslLeKDVmBXgr9b2+U4RJeQLrHC2pj+J7KyCzeI5XLhGx74+YOUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699888713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lU8hus9VFNM46PqA5o2cwDx3GvPZ3Jp4PaHZi6hVwes=; b=mPT3ceS8rZGh0DcAy23UcTR4rmc8CbvTfPk4ZnfgKSTACfXal43S1+10l1kH3x4HHE/7Rm ZR2gEdMh+VxO7bO7ZIHI51XmO952sgAU4kuIYid/TT1UM8GYHnR+2nL9JBrOfZoMfBLjWl vgCt+My+h4iREXR5+qwV90LBKg/wjmBRt29RwiiRdzTyI/9KRXjDsco5gXUba/X8tvysSz FqwRhe0JdWHHkxIDoLvrYzTMLwy4+ULEgOdj7vK33HMfoJ/F7X4GIH4DkJZjD9xg8l9e47 FE6CctN+7yBVTMG6Xr97xMQKtgyRApQT+tQDW/yRtjIFOcD/2WYWfcbmpq9zkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699888713; a=rsa-sha256; cv=none; b=mKT/51UTdelxx92Jmtd6+MoGl5xSUSkGyKq62SDpg00XOuSc8noRy6bqo/klzzHeheTd/l KcQG8qDc6r3wo5tXKpq2VVw2WZztQKHKVX4338JKV+l30IRckA6KBfsxP3g2pGr6QvgJCI u1iqGGDUy6fg/FuAbQ/Js5Hz40kOopAxeBFwSqo4nGzC4hyA2DNSZwvQ84mZI6hx69f2tZ 0A0jaKry40ATkhSqVpRCm5w6pvjG6eA57MJkl0bndIY7f8CqA8udC4/TTprt0NMK6FJuL7 K8PaXYisZLauXp7/Pqf9Gg+W6e9tkd7WZZ6oxIaCZyn/Uwjhz4ZNlEGhA1X8cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STY3Y2s9Tz197k; Mon, 13 Nov 2023 15:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3ADFIXTM043522; Mon, 13 Nov 2023 15:18:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADFIXG6043520; Mon, 13 Nov 2023 15:18:33 GMT (envelope-from git) Date: Mon, 13 Nov 2023 15:18:33 GMT Message-Id: <202311131518.3ADFIXG6043520@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: fa2bb1440e13..3a88fe133543 - vendor/sqlite3 - 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/vendor/sqlite3 X-Git-Reftype: branch X-Git-Commit: 3a88fe13354325b9f56f07927e654de4f5398707 X-Git-Oldrev: fa2bb1440e13602676feec708ac7a9a3bb5ce5c8 X-Git-Newrev: 3a88fe13354325b9f56f07927e654de4f5398707 Auto-Submitted: auto-generated The branch vendor/sqlite3 has been updated by cy: URL: https://cgit.FreeBSD.org/src/log/?id=fa2bb1440e13..3a88fe133543 3a88fe133543 sqlite3: Vendor import of sqlite3 3.44.0 From nobody Mon Nov 13 15:20:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STY5c5TTKz515m0; Mon, 13 Nov 2023 15:20: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 4STY5c3q4nz3T1X; Mon, 13 Nov 2023 15:20:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699888820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bW07iWwN1/skoCyP4fCccXznKMPOsDlKIOpfxUQ7BP0=; b=NbwY6qdKlmiPVKpcTQK9u9rVRpVZXHeqzfPD/Z9oeBg6KQzGOKqYupseWcqsLujE8Qes0a a7qjWleEsnViqsMBhvgk/Tp2BdWi2Ym97ZvIP9hBFCA4Z3RMao6vM++2MJw1RGEVjsZw3E MMkvD+mEYJhNhNUpTmwGr3EN9+/cx9jLphOJGkzjwtsPihyWoUpHNrJj/CTeXQ8KmXH2Li Z8MCcca0DJhWerohWSZd24j8A2imaeiOH8xKJ5ziVdFXQmqxznJreiKozs8hFxkujx9Fwx KGsV36Q/I8yxv3bDvBbMbM0m6PdSQz9v8VwM92elsA/oQM1HTqtE0bvvX2gP9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699888820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bW07iWwN1/skoCyP4fCccXznKMPOsDlKIOpfxUQ7BP0=; b=lDYSmMSIHhsFo28Y6ech/Hiq73hev20ed+jTctNS2mGzpEEZeLbTkzJp4cq2OZKe+iV9pP i86d8FhLthSk/G9YzCfutsxdZmfZmQ1DDK27ttJJSZf6FOZ/QdUEcRPlsuaDEPzgOEGLbe lUKLUTbVGKqGmFa+YR4kJkh2GuIJDf8Nh4aYTfcwIh0NwF2j9YOp1V50wKoclqSYEOr0bM me2W26OT2sPGYvplQ/KLDw6k5Ngl7lw9o9JA9BxScHJr5Xzi2wwx3dqznH+55Utk47/ZT3 3hViPniIdRfpb8z17yUkdHdyNV4Yz3rxBUNClF2BoIcE6gPg8q86QP5jCnNFbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699888820; a=rsa-sha256; cv=none; b=aHukXdcNUxUO4JD9Ieo8cyL0MupkjhDdnwQaGhp3pCXQK1hgxK/XkJbBcZvz4ZjENE07SR Xo6dNHWPb1o/jS4Vj4mkiRcNnVbQPKncWrxSZ/xFC16a+XBSup6dd/pEsA+pTQ/NF1O8qU vJFzcPxEYdzY2a4T7Qkxwm4IB4R1CYEhQccDPlGxEzB/ao/7ham9THaziBTNX1pWSUO/Cv HAVL0tuSpDYpO93RQFYK+0My+T5hxATrUP1tyF6gXSNholPrkhdCEpyQotWeU6AR0Msh1+ XzMUnTIM/BF+fzSstOQDTq2sW5EclSZFXvv/NvPjWQT0xcPQIrlt7+BHmf5uNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STY5c2vqYz19KL; Mon, 13 Nov 2023 15:20: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 3ADFKKCw052405; Mon, 13 Nov 2023 15:20:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADFKKLp052402; Mon, 13 Nov 2023 15:20:20 GMT (envelope-from git) Date: Mon, 13 Nov 2023 15:20:20 GMT Message-Id: <202311131520.3ADFKKLp052402@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: 95ddbac6d339 - stable/14 - crashinfo: Get local variable values in the gdb backtrace List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 95ddbac6d3390c2c722a7baf900f2dae10e91543 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=95ddbac6d3390c2c722a7baf900f2dae10e91543 commit 95ddbac6d3390c2c722a7baf900f2dae10e91543 Author: Mark Johnston AuthorDate: 2023-11-06 19:59:10 +0000 Commit: Mark Johnston CommitDate: 2023-11-13 14:41:44 +0000 crashinfo: Get local variable values in the gdb backtrace This should make crash reports a bit more useful without having to ask for additional information. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42465 (cherry picked from commit 3e356fb885f6a742c496cefd71d8d33564de542a) --- usr.sbin/crashinfo/crashinfo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/crashinfo/crashinfo.sh b/usr.sbin/crashinfo/crashinfo.sh index 8a6981ba883c..92c843a86144 100755 --- a/usr.sbin/crashinfo/crashinfo.sh +++ b/usr.sbin/crashinfo/crashinfo.sh @@ -236,7 +236,7 @@ echo # kgdb via stdin and have to use a temporary file instead. file=`mktemp /tmp/crashinfo.XXXXXX` if [ $? -eq 0 ]; then - echo "bt" >> $file + echo "bt -full" >> $file echo "quit" >> $file ${GDB%gdb}kgdb $KERNEL $VMCORE < $file rm -f $file From nobody Mon Nov 13 15:20:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STY5d65QKz515pM; Mon, 13 Nov 2023 15:20: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 4STY5d4nq3z3TFK; Mon, 13 Nov 2023 15:20:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699888821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IDOLAWhdnmQ2QkC56MXASswV70cPeYCdNuOQwrlGtx8=; b=mwWmgJd6DsJbEUZIh7P/jYwQXsjKVpnE4fDMG6E5IRnAj/EL/dvQJzvKQPUiA+AJDb4NXZ 33zzXFYlMgHnr114w1i7CeguvlZu7iNk/i/QSCYt11XO6VfvXWC0aFYeQwoVPgsU95GfSL Br9yPwNg/Y+e2gYZ4SRAFIl0MbBV3UzAHTadfZc8E3i3M/0D7BAiNvglVyUZQll9coubhq PfNAUvJU86oMdsU/8ZqoNHfa1ZPPRY+JyJH3FOxPO1Y5mVYrkYhsZVpDrC0im8eWV3Z71U gEWmeV4sg/O6MyUmj3C94tEPR4UgI56Hrl2VEpOgjkDtojgmk0OkoZ0EYxMN2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699888821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IDOLAWhdnmQ2QkC56MXASswV70cPeYCdNuOQwrlGtx8=; b=VWTsdCe2pt8r/xxhH+lyYnXgIiNG/+xGVMVU+i750zLSnJnhWy37t1x0qOvg3D0OdMR5QE cbphwi9w9IVj8NrYomed6BDuA9Hc9Nu0JhWS6QOlKFEBQZoVg42eZFR8T/5igLAH3fFqby T1fSELQCQiWeb4/BT/q8OiZYBpPAByjQqllCWjn9ad6RsySE80fK3Xlm2rDZITH2R66HxT V7yexNO1HZ/tjJ22qUA2qpPuzn218/zI9mJXyQZnp3oGWvnr1m0DSJzmI4if1rmUzCvq+3 e6QcKpuruCQ87l8cz/NYNbi0WP8g8IFoZrLoUvCgNJyWrVbLkwRveJzrV3WbdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699888821; a=rsa-sha256; cv=none; b=emPLoflBACQrDOi6igca8ARThP4IQMr5NWEhBnI1azESLV9ePm5tZsKhJClAgAkFFr3CJe ate3hhcufalcq2ZvvsBbtGs71wwXyDOI9rAcf0pATNsghWtdtvFFoNl9d/mCtmNutrTi8w dKS7NyXXdh0xkrKlulP+G+/K33YT/QtTtCoSZ08jiwzNBPjPr6JsnlVbqvJ/pwxVJEvhKp UaNiTeObYLQ9V4ftpYmvE5AkEylHwaKtEwdTyHuO9HlvIkuR2kR4Jq+HN7mH3cbzY0I13J cZUbiucnyddnXyWDYP0+AMrRwGnzZUZRdOPj5yqmSfB2vsmPvtCCUTR2Ago8hw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STY5d3sdgz19KM; Mon, 13 Nov 2023 15:20: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 3ADFKLvl052457; Mon, 13 Nov 2023 15:20:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADFKL4n052454; Mon, 13 Nov 2023 15:20:21 GMT (envelope-from git) Date: Mon, 13 Nov 2023 15:20:21 GMT Message-Id: <202311131520.3ADFKL4n052454@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: 766cceba19fe - stable/14 - e6000sw: Fix locking in miibus_{read,write}reg implementations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 766cceba19fe05095d81994e930a489ad545d42b Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=766cceba19fe05095d81994e930a489ad545d42b commit 766cceba19fe05095d81994e930a489ad545d42b Author: Mark Johnston AuthorDate: 2023-11-06 19:57:56 +0000 Commit: Mark Johnston CommitDate: 2023-11-13 14:41:50 +0000 e6000sw: Fix locking in miibus_{read,write}reg implementations Commit 469290648005e13b819a19353032ca53dda4378f made e6000sw's implementation of miibus_(read|write)reg assume that the softc lock is held. I presume that is to avoid lock recursion in e6000sw_attach() -> e6000sw_attach_miibus() -> mii_attach() -> MIIBUS_READREG(). However, the lock assertion in e6000sw_readphy_locked() can fail if a different driver uses the interface to probe registers. Work around the problem by providing implementations which lock the softc if it is not already locked. PR: 274795 Fixes: 469290648005 ("e6000sw: add readphy and writephy wrappers") Reviewed by: kp, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42466 (cherry picked from commit 725962a9f4c050b21488edd58d317e87c76d6f66) --- sys/dev/etherswitch/e6000sw/e6000sw.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/sys/dev/etherswitch/e6000sw/e6000sw.c b/sys/dev/etherswitch/e6000sw/e6000sw.c index 768d1b927e3e..95f1a2e96db6 100644 --- a/sys/dev/etherswitch/e6000sw/e6000sw.c +++ b/sys/dev/etherswitch/e6000sw/e6000sw.c @@ -66,6 +66,7 @@ MALLOC_DEFINE(M_E6000SW, "e6000sw", "e6000sw switch"); #define E6000SW_UNLOCK(_sc) sx_unlock(&(_sc)->sx) #define E6000SW_LOCK_ASSERT(_sc, _what) sx_assert(&(_sc)->sx, (_what)) #define E6000SW_TRYLOCK(_sc) sx_tryxlock(&(_sc)->sx) +#define E6000SW_LOCKED(_sc) sx_xlocked(&(_sc)->sx) #define E6000SW_WAITREADY(_sc, _reg, _bit) \ e6000sw_waitready((_sc), REG_GLOBAL, (_reg), (_bit)) #define E6000SW_WAITREADY2(_sc, _reg, _bit) \ @@ -169,8 +170,8 @@ static device_method_t e6000sw_methods[] = { DEVMETHOD(bus_add_child, device_add_child_ordered), /* mii interface */ - DEVMETHOD(miibus_readreg, e6000sw_readphy_locked), - DEVMETHOD(miibus_writereg, e6000sw_writephy_locked), + DEVMETHOD(miibus_readreg, e6000sw_readphy), + DEVMETHOD(miibus_writereg, e6000sw_writephy), /* etherswitch interface */ DEVMETHOD(etherswitch_getinfo, e6000sw_getinfo), @@ -744,17 +745,20 @@ e6000sw_write_xmdio(device_t dev, int phy, int devaddr, int devreg, int val) return (0); } -static int e6000sw_readphy(device_t dev, int phy, int reg) +static int +e6000sw_readphy(device_t dev, int phy, int reg) { e6000sw_softc_t *sc; - int ret; + int locked, ret; sc = device_get_softc(dev); - E6000SW_LOCK_ASSERT(sc, SA_UNLOCKED); - E6000SW_LOCK(sc); + locked = E6000SW_LOCKED(sc); + if (!locked) + E6000SW_LOCK(sc); ret = e6000sw_readphy_locked(dev, phy, reg); - E6000SW_UNLOCK(sc); + if (!locked) + E6000SW_UNLOCK(sc); return (ret); } @@ -795,17 +799,20 @@ e6000sw_readphy_locked(device_t dev, int phy, int reg) return (val & PHY_DATA_MASK); } -static int e6000sw_writephy(device_t dev, int phy, int reg, int data) +static int +e6000sw_writephy(device_t dev, int phy, int reg, int data) { e6000sw_softc_t *sc; - int ret; + int locked, ret; sc = device_get_softc(dev); - E6000SW_LOCK_ASSERT(sc, SA_UNLOCKED); - E6000SW_LOCK(sc); + locked = E6000SW_LOCKED(sc); + if (!locked) + E6000SW_LOCK(sc); ret = e6000sw_writephy_locked(dev, phy, reg, data); - E6000SW_UNLOCK(sc); + if (!locked) + E6000SW_UNLOCK(sc); return (ret); } From nobody Mon Nov 13 15:21:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STY6f4dTRz515kD; Mon, 13 Nov 2023 15:21: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 4STY6f4Bv6z3Tk2; Mon, 13 Nov 2023 15:21:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699888874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KUzTQlz/Ne3M3NDg2XHT6S5/3zuDNNAotQwFlD/Orqo=; b=Jzo2tLi/PoPlpi4FMIYZxkMJsjkr/4gA7pte42+mb6pL0jkuZLwXUb6tjJA3LNu2i16B1/ cSTIFj5APPvVy0P7xL4h38sLyOcCHcCeM5VDfmnSgfitM1eauRc1Y9HKwS2Dju3c+Etz7p 7RLop1BOVaKeQa71dXszqc62R4tV+czx/wGF93YbtnMrtcN7Ly1QCAQuLw8OcW5W7mfmEg T8Epgf46psKG+Ny7fD9XfK36jfAC1I8rga64ivUOx2KusflE1GbwA8MgL8UHu2ZfzEzDKu MnPxZOYQINVbiXft001jIivRZcvNh9c2Otj5aD827RtAlBJyIrAm1Rf9jMkQgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699888874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KUzTQlz/Ne3M3NDg2XHT6S5/3zuDNNAotQwFlD/Orqo=; b=O0V1pM0GHjMNrJc2E5n48vRvk1a2pJqjz6CIxrSYrpkzfR3lIXrINlCrBVe+AlQuzj4+7I ycnzwcCHFYl4Y7INFPq9adDwZ6YPhjPsD+ZFvCu9b410vvJwO2zzBXMaIlvSeL9Gt2GmiG bmn3v5CxfHiy0EGOBc7QMhPUUGozlhFheVCsAfPeNMjKBiIhKsGPrNX5aPd/zdPTxTs0Uz PpwYeOq721lwzuEQdmtUuxa6sTihhAHDdT4Hbc9jO6P/CfcPWeu9ziZugTVg8w9ofE+7qz V/n7P0KOVgr868zKX3fyQBbUAfh7fOlLa3EqMR7TO21dNgi/6zguJp2P3tH9mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699888874; a=rsa-sha256; cv=none; b=I+HDU0RV0/x1urQ/jpQHczzclXMO54UEOXbq2k37aGL1aBWe581fF/8ffc6P8GXf9hGgG4 Qiu6ndxNsQoSbMwexb6/N4fD2PEgErmEs050r7XYAx/xaXtfxQA/sYt8OabmVmel87y+m1 IkdkrcPjRdZdgAyLdqwMXK7hlxVf8/38KxR8pxZuJm7LYcZrTlSZjLOpEs+biD7pSudYVW 8dU1mid/G5mSJHfzwCKOpRj2abWzwamFBQ83CuceEalVQymizpCLojt6PP9e3darGGxRw+ GN7GlBXdnkQYBo73YqNib5KIoKc4p21ah1qTJQj507qL0idfAsvSZkWLLQkd+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 4STY6f3Fmcz19VX; Mon, 13 Nov 2023 15:21: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 3ADFLEWK053887; Mon, 13 Nov 2023 15:21:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADFLEWi053884; Mon, 13 Nov 2023 15:21:14 GMT (envelope-from git) Date: Mon, 13 Nov 2023 15:21:14 GMT Message-Id: <202311131521.3ADFLEWi053884@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: 29667c6fcc36 - stable/13 - ping: Avoid reporting NaNs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 29667c6fcc36de5cf28942bd72e5b5f5926d19f5 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=29667c6fcc36de5cf28942bd72e5b5f5926d19f5 commit 29667c6fcc36de5cf28942bd72e5b5f5926d19f5 Author: Jose Luis Duran AuthorDate: 2023-10-06 17:55:06 +0000 Commit: Mark Johnston CommitDate: 2023-11-13 15:20:50 +0000 ping: Avoid reporting NaNs Avoid calculating the square root of negative zero, which can easily happen on certain architectures when calculating the population standard deviation with a sample size of one, e.g., 0.01 - (0.1 * 0.1) = -0.000000. Avoid returning a NaN by capping the minimum possible variance value to zero (positive). In the future, maybe skip reporting statistics at all for a single sample. Reported by: Jenkins Reviewed by: asomers MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/863 Differential Revision: https://reviews.freebsd.org/D42114 (cherry picked from commit 4d348e83b738347f6aaf2b110459a01c5402d04e) --- sbin/ping/ping.c | 4 ++-- sbin/ping/ping6.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index f248a0eb738c..e121ebdb19e2 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1521,10 +1521,10 @@ finish(void) if (nreceived && timing) { double n = nreceived + nrepeats; double avg = tsum / n; - double vari = tsumsq / n - avg * avg; + double stddev = sqrt(fmax(0, tsumsq / n - avg * avg)); (void)printf( "round-trip min/avg/max/stddev = %.3f/%.3f/%.3f/%.3f ms\n", - tmin, avg, tmax, sqrt(vari)); + tmin, avg, tmax, stddev); } if (nreceived) diff --git a/sbin/ping/ping6.c b/sbin/ping/ping6.c index 432a59bf1303..0edeb01b2dc0 100644 --- a/sbin/ping/ping6.c +++ b/sbin/ping/ping6.c @@ -2349,10 +2349,10 @@ summary(void) /* Only display average to microseconds */ double num = nreceived + nrepeats; double avg = tsum / num; - double dev = sqrt(tsumsq / num - avg * avg); + double stddev = sqrt(fmax(0, tsumsq / num - avg * avg)); (void)printf( "round-trip min/avg/max/std-dev = %.3f/%.3f/%.3f/%.3f ms\n", - tmin, avg, tmax, dev); + tmin, avg, tmax, stddev); (void)fflush(stdout); } (void)fflush(stdout); From nobody Mon Nov 13 15:21:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STY6g5nFbz5160N; Mon, 13 Nov 2023 15:21: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 4STY6g54Djz3TyY; Mon, 13 Nov 2023 15:21:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699888875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eGzpKtxa4nRFzz1ETMne6Ggf07bwnWmvaGZL02hT+z4=; b=WhsNiqG34s6zlI6G6VzTHY1ZataFK7Tv7kt81/Q4PUEJWq303qb/TUZ8aVqp4KXb1Ad5qz q75V22znx9w209KxekTsqRpFOTJv0TsU3J5UrB0wrLRoSCOsF+dzHwkMD9k94DKLOyGyfm UNnMzsb0tQBNv+Vc49nNDxJrwzXRLTs5qcX6Yx8Hff+CiY9CFZzz0MLsI3cmBNohwtkleh Kvao3JWiZdGKJURRCMaJ/gbYuxToYZixvPvNyiMOe6pyJz3f28nK9vXzA0D3va6V+k8RNG XORBBdvBDTLuJGc0RU66Uwedtzcgxcmtj6dEZnU0I3L2gfeiae8fkaz/+PdleQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699888875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eGzpKtxa4nRFzz1ETMne6Ggf07bwnWmvaGZL02hT+z4=; b=RpYuw0afzbHHpWF8ZoE2X1kc5pSp+Tmy5KKwZODYtoFLnh4CLbhKsUVckPoILO2rrTMIeg GzsEH5TDyJjG8QRypPcRG8p8Zoieb+qZPwxXEK9nf5BGWo6RVUSlSL7JmloyBVwiL30VxO fqyeLIYETKX8rOY7gwuKW666Yv+mLG08vQMOQzeK+Px0OpzPmX8LVzmLqH2KmZX/aRuI/7 Ml3NaLda2f83F4IQ6oGsOebEB4figuM6CwuDn8OLG5c+7KvZDkeeXtqLmLt2tM1rRY5uLG zX/cilhaW6SMr2dgaL5QqLVXU1O+3iM0y7Ct5TlKOcsEXP/462E27EegqR6Lpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699888875; a=rsa-sha256; cv=none; b=br6OMA+DkZP6eBfFvH1XYCxzPunQOJ0+ZzULZVX1u+Ldp7AYa0mzuglaeIUcyE+RngoPWH mwvTaaDqXyouQFM0oIcAsdkWMKgWpEjmzWrfkNq4L1tSyoYW52/hBpPOSx6P0f5nMNoWYZ pQpbb7ZCU30sUpQhxaW+SweYJeLc9lfmy40RFIu3trF4BJw1zyIgx/FmN8oAnbihvRlg2p cMit+45IdikQjXUrSNmhMLfsOiLM5aUs5vdOaw0o4/xjZI1XjZ2HvC7A2QYvb4fqzAvtud SMawjam+P4tmGvELJhWkybql6+l71hcNQOWP4f4F+qLPKIY7NcEpsEhXfCzmUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STY6g48cfz18N7; Mon, 13 Nov 2023 15:21: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 3ADFLFfe053941; Mon, 13 Nov 2023 15:21:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADFLFfk053938; Mon, 13 Nov 2023 15:21:15 GMT (envelope-from git) Date: Mon, 13 Nov 2023 15:21:15 GMT Message-Id: <202311131521.3ADFLFfk053938@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: e26e6a98d4b9 - stable/13 - crashinfo: Get local variable values in the gdb backtrace List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e26e6a98d4b974c5b950fdaa7df0d208e7dd4b39 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e26e6a98d4b974c5b950fdaa7df0d208e7dd4b39 commit e26e6a98d4b974c5b950fdaa7df0d208e7dd4b39 Author: Mark Johnston AuthorDate: 2023-11-06 19:59:10 +0000 Commit: Mark Johnston CommitDate: 2023-11-13 15:20:50 +0000 crashinfo: Get local variable values in the gdb backtrace This should make crash reports a bit more useful without having to ask for additional information. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42465 (cherry picked from commit 3e356fb885f6a742c496cefd71d8d33564de542a) --- usr.sbin/crashinfo/crashinfo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/crashinfo/crashinfo.sh b/usr.sbin/crashinfo/crashinfo.sh index 8a6981ba883c..92c843a86144 100755 --- a/usr.sbin/crashinfo/crashinfo.sh +++ b/usr.sbin/crashinfo/crashinfo.sh @@ -236,7 +236,7 @@ echo # kgdb via stdin and have to use a temporary file instead. file=`mktemp /tmp/crashinfo.XXXXXX` if [ $? -eq 0 ]; then - echo "bt" >> $file + echo "bt -full" >> $file echo "quit" >> $file ${GDB%gdb}kgdb $KERNEL $VMCORE < $file rm -f $file From nobody Mon Nov 13 15:51:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STYnL0Ngdz51Bt3; Mon, 13 Nov 2023 15:51: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 4STYnK6sQwz3Z1p; Mon, 13 Nov 2023 15:51:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699890678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=42nRfY6oR/n7Df4me5t8nMRL9LvlXQ7MLmYljUQK0HE=; b=iratwd/KiR9mCpAzwbZYk2mdtfk3qegkWdnAEOggfLuKgyPL0sMvAhxxYUBqpXliCeaBS3 SFRY0yurq5z01pIrRYTGXMBGuOJ3u1zipb0mm2KUx/FF39/qdvnYLfeayv7LaH72G5V0FU yJnmFqJir5zNcjdeVAjGWHw+LsAGrBr2Xve6Jm5Q5bCZdBbPimVIxaFgJfDtlvGIYVYIrM 2XtziBbef2vFdWi1FK5Sh+oYDiSkkHc4PuXTnNfvT0JCZADowzHVd7EyqZDPO8Zt2mxyYh uRh3RHLGMCUCcZgEL1jByIFhQp5lRHkNpQzRcImDK8rI6oHEnUSsRzjss6e/UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699890678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=42nRfY6oR/n7Df4me5t8nMRL9LvlXQ7MLmYljUQK0HE=; b=VXTASwIGtTobXjlIX1A6Sa41acZDuLafXsuYdf/Pn/n1BFPv6bG1WMVt3p7dV5v5wjGNpS wbMsvZgAcyqqply8LTUC+V0ip6AdV2KXo7g0guHPMS44z+nunQWMoYqYwRIOTFopKxcN6U iKQMRmyb5iuydGZ8tFp+IKdsxJtcgrs7b6tO3PcZIVXwgcc7aJ7jpYFiUfrJ2jufr+bwvF Yp+P0n5pfx3tYaiSxGVSgW3UuF/VR9PPK6fhHCfzWwSbrlu5BCoWrWS+S3RMzOjFYpDH5W 2M9hRSaJ2Q8sVjjHkiMdZEJHQ0yJbFdhh0z7swxJJ32JJqDO/SGD+lauhwo8Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699890678; a=rsa-sha256; cv=none; b=xaC8LyQwxK2aEcvYm1xgSjDpiIa3NCCwFval4uzv2PmrPsK1AGzEgqyesoUM0B+a563/d/ XnkkjU3KgKHA8zcIoKwFikQIIK6tomPQwwaWqFt8/RsL8vkhOAWT/VMweVETy8IqJGzWdw WghZIPdPexa59yvD+5N8V+KbRB7nx3pojaFMfO7R+/3y8pOVA0iQR1Xf8Ax+B/quFM1382 Q9GjihaWhcZyHANeF3psVlWSJs2L8xmHU71vvLGy276chH17mQESRnVKmsm95FcJ0OduOR B55gWKT9yiXIDnttaXP29Oc3BSP4cHjrOtFBITmbRG4p7nUeS6i2fXdKwhgoiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STYnK5y5Bz19mH; Mon, 13 Nov 2023 15:51: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 3ADFpHKZ004263; Mon, 13 Nov 2023 15:51:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADFpHhg004260; Mon, 13 Nov 2023 15:51:17 GMT (envelope-from git) Date: Mon, 13 Nov 2023 15:51:17 GMT Message-Id: <202311131551.3ADFpHhg004260@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: b9c0003f0fa3 - main - arm64: Initialize x18 for APs earlier during boot List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b9c0003f0fa39ead4bb3953b9118ae6f08e560f8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b9c0003f0fa39ead4bb3953b9118ae6f08e560f8 commit b9c0003f0fa39ead4bb3953b9118ae6f08e560f8 Author: Mark Johnston AuthorDate: 2023-11-13 15:44:45 +0000 Commit: Mark Johnston CommitDate: 2023-11-13 15:44:45 +0000 arm64: Initialize x18 for APs earlier during boot When KMSAN is configured, the instrumentation inserts calls to __msan_get_context_state() into all function prologues. The implementation dereferences curthread and thus assumes that x18 points to the PCPU area. This applies in particular to init_secondary(), which currently is responsible for initializing x18 for APs. Move initialization into locore to avoid this problem. No functional change intended. Reviewed by: kib, andrew MFC after: 2 weeks Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D42533 --- sys/arm64/arm64/locore.S | 8 ++++++++ sys/arm64/arm64/mp_machdep.c | 14 +++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index d55a21e9c55e..d77963d42461 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -247,6 +247,14 @@ mp_virtdone: dsb sy isb + /* + * Initialize the per-CPU pointer before calling into C code, for the + * benefit of kernel sanitizers. + */ + adrp x18, bootpcpu + ldr x18, [x18, :lo12:bootpcpu] + msr tpidr_el1, x18 + b init_secondary END(mpentry) #endif diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c index 1c9bea2349de..5d598b4189a9 100644 --- a/sys/arm64/arm64/mp_machdep.c +++ b/sys/arm64/arm64/mp_machdep.c @@ -134,6 +134,9 @@ void init_secondary(uint64_t); /* Synchronize AP startup. */ static struct mtx ap_boot_mtx; +/* Used to initialize the PCPU ahead of calling init_secondary(). */ +void *bootpcpu; + /* Stacks for AP initialization, discarded once idle threads are started. */ void *bootstack; static void *bootstacks[MAXCPU]; @@ -225,15 +228,6 @@ init_secondary(uint64_t cpu) panic("MPIDR for this CPU is not in pcpu table"); } - pcpup = cpuid_to_pcpu[cpu]; - /* - * Set the pcpu pointer with a backup in tpidr_el1 to be - * loaded when entering the kernel from userland. - */ - __asm __volatile( - "mov x18, %0 \n" - "msr tpidr_el1, %0" :: "r"(pcpup)); - /* * Identify current CPU. This is necessary to setup * affinity registers and to provide support for @@ -242,6 +236,7 @@ init_secondary(uint64_t cpu) * We need this before signalling the CPU is ready to * let the boot CPU use the results. */ + pcpup = cpuid_to_pcpu[cpu]; pcpup->pc_midr = get_midr(); identify_cpu(cpu); @@ -555,6 +550,7 @@ start_cpu(u_int cpuid, uint64_t target_cpu, int domain, vm_paddr_t release_addr) pmap_disable_promotion((vm_offset_t)pcpup, size); pcpu_init(pcpup, cpuid, sizeof(struct pcpu)); pcpup->pc_mpidr = target_cpu & CPU_AFF_MASK; + bootpcpu = pcpup; dpcpu[cpuid - 1] = (void *)(pcpup + 1); dpcpu_init(dpcpu[cpuid - 1], cpuid); From nobody Mon Nov 13 16:51:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STb6N21xtz4cP5Q; Mon, 13 Nov 2023 16:51: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 4STb6N1Xy1z4Htg; Mon, 13 Nov 2023 16:51:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699894268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ukhlyhgsWXQRML7QXmpDqAzXY2L1lt3qEeJzSlO3Iys=; b=LhPeUhqtpFJSvQZvkkGdxX5wEK9BQZVJ+BtNPCzuH73trQOmzVYDc3wvOyvjtthIcIRL+G uO84r2CxLQONxDb2dFAARueLKQ29Q6deZs4hAWAIyhheIObEUTs/gjjGmMGI1dLKvHlreR zfiqkDNCLPc2M2kInb06p6vaul/gpyVRTwE+P0RZXeV4c+PtCWJJZ4ImkKxtH4kzSE5EHn ESH5NaBmnfv7p6Z6DGxgUSxlxH/ggauGA3RX+SKNNEPce4Q4S/t9oOVgo/UQbWaj9K+c+e ThRNuRYrAha+DqaCXO4A3aqysnYe2rZ8NeNjhbYfgujQtLTxW/s3jvWwajp2OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699894268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ukhlyhgsWXQRML7QXmpDqAzXY2L1lt3qEeJzSlO3Iys=; b=G+5F7KZe4EYgbtK1EevXcy7hUAkN3VCi1LMGKJz/kmyH2rrji6ZL0USw6iAmGuWkeSSr75 7f6sOI0+4crF3hlrCltDxEtD+/CTsgW4Ki7yk59Ci6DWSHwvUHgZuWtRUZNiv59cABfQQx zQNsH+hEe+GezxWbruRVC29BDj8GFtpO7fHXqcwwqtfHWc+7lS2pv/FsgR10wUHjpZaVbW 4cqQrvm1Wy6/DhyThDHmoeCTpxC24vhcVMXSB9b+KxnSWrqKCJHDWOeNAiIHSK3LB8A21D qPHbgJmEtAk1qj/aLhF28pNfkjZwhFR8GztNIWA/1V06sUcQ1lZbuJrRRy0AOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699894268; a=rsa-sha256; cv=none; b=pQ6UHNt+cArIg/hGwTn52i/SxsNEMdsk0zlAI3R9QmevgSrTyxzBfirpj/8e5KV9ELnQft Q2jbb3bfCIFUshpTqZXrFiyzgUkrbeNSOaw1wNEy0rKjHV9/U/PUFBNorhNAKbbwJwWuqB OWyfxVRglPXRLhxr3op1rMf3C7OXY8zRwgMhK/xbqHzCioQvDJLVP5dcKZe4afT/1uJe/I vX40v2auErUi9agFO2olYPxZ6c5UXMXk28EMPdR+HBPlTWUj8TALGx3v1+sw289omPgDuW FEOJYH6RaUZZKdUzhDjNRz8p0h1KGxKfjcV/CkK7uZpXc6Ju/VGbyZiTI2KSbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STb6N0bp8z1Bkk; Mon, 13 Nov 2023 16:51: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 3ADGp8Ja006329; Mon, 13 Nov 2023 16:51:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADGp7gc006326; Mon, 13 Nov 2023 16:51:07 GMT (envelope-from git) Date: Mon, 13 Nov 2023 16:51:07 GMT Message-Id: <202311131651.3ADGp7gc006326@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: 7963e4115453 - main - sqlite3: Vendor import of sqlite3 3.44.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: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7963e4115453c0aa003023386cbbc635de242150 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=7963e4115453c0aa003023386cbbc635de242150 commit 7963e4115453c0aa003023386cbbc635de242150 Merge: b9c0003f0fa3 3a88fe133543 Author: Cy Schubert AuthorDate: 2023-11-13 16:50:36 +0000 Commit: Cy Schubert CommitDate: 2023-11-13 16:50:36 +0000 sqlite3: Vendor import of sqlite3 3.44.0 Release notes at https://www.sqlite.org/releaselog/3_44_0.html. Obtained from: https://www.sqlite.org/2023/sqlite-autoconf-3440000.tar.gz MFC after: 2 weeks Merge commit '3a88fe13354325b9f56f07927e654de4f5398707' contrib/sqlite3/Makefile.msc | 14 +- contrib/sqlite3/configure | 20 +- contrib/sqlite3/configure.ac | 2 +- contrib/sqlite3/shell.c | 404 ++- contrib/sqlite3/sqlite3.c | 6485 ++++++++++++++++++++++++-------------- contrib/sqlite3/sqlite3.h | 199 +- contrib/sqlite3/sqlite3ext.h | 6 + contrib/sqlite3/sqlite3rc.h | 2 +- contrib/sqlite3/tea/configure | 20 +- contrib/sqlite3/tea/configure.ac | 2 +- 10 files changed, 4661 insertions(+), 2493 deletions(-) From nobody Mon Nov 13 18:04:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STclK5qRBz4wWNH; Mon, 13 Nov 2023 18:04: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 4STclK5JMGz4VCR; Mon, 13 Nov 2023 18:04:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699898685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=80oliCS3sivn+RudEYtH+nEI551ja4wTFg7Erl4s64A=; b=Uebelp3j22zXlf9KcroSyFTdBpPyxrUNo23zyhdgPjhgPkd6JPc4i9CmnvtNZLJyzu4VEm Z1oKJcFQnDF4ExEy/Yv8oiRwdzdsPrjQTWqR7tpmquUusprYtlyH2UQptItcz7AlloY9Sy ox7bgnh0acZuVJMNO28B3mILSLIHSb4lH7u/+PCsIXzVxQ9DagkuTuHxB1J7tA0ICN3NhM lKROIGI7157RBrVXvfDygMXhgySf101Q39hWRWmwgW0eP//LcODPkas5jhp0XyqcT+Gruz EN+GPO1ZfdgYGr5nAAoouLF/6n5ekhgcZ1ouanDvnCPSCFZxhofbzCsTaG65lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699898685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=80oliCS3sivn+RudEYtH+nEI551ja4wTFg7Erl4s64A=; b=YOkADG0jKteccDzelten3mnSZOMInGw68qhgWcQl4EOqRp5hgHIvGuHXPvkFokAlR7L0/U jUr2nGyMKAc0IQKcng7z9Hy6ZO8QI07Iun7FPPlLIlHtsfd/uKfeGHImzy+QMswyqUOslb p+VzLfQNVTwzC+AwkOzyxdGGOUTsWzbtVbb10cxa2/zu4fAdDEvfd6VoCop21OwJvMEQLl FnfatqPMsinFbU8cqlpBvXDmZL/Uq/NteELfKxHSRdWfOU5j+0IiBtht3XlxpOFuyXOt/q bzk3PvjBO5R6NG9dtMZOPDvsBFzvmLdtPqyrieVQRSLNe4bjla3mVjmGE+8Vqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699898685; a=rsa-sha256; cv=none; b=XY+ZGaalOAOfxm4CjdJ1oajtLJb26us0+zNnfdw6hCiJ7U1f9yz37SjtxPUpH2qvgz7Q7R UWu4a0RYNNPBUQZXDs3U6kHfzAWgs6P48PwOLb5N//v8zog+wA2+pQe7vFOX/9WeRN1iOO UblwlNR9eOZ2lTWBo6rLE7H2FPIFY3M6REhSiVt9I1jtMo0PNPHVMdrju1wGGS0lOcz4HQ H28dI+z0TwrO9AT5KolrJ9DHJNfNQ7GmKSsm3CmzVUn8/gNCvvWMCts65oUEhThdS52gad KDH80D0JVrWXAuRk5++satkMiK7mj1z1F692ogvmmQCrjS/hw5LbQUN2j5jHsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STclK4FPyz11F; Mon, 13 Nov 2023 18:04: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 3ADI4j11028387; Mon, 13 Nov 2023 18:04:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADI4j4b028384; Mon, 13 Nov 2023 18:04:45 GMT (envelope-from git) Date: Mon, 13 Nov 2023 18:04:45 GMT Message-Id: <202311131804.3ADI4j4b028384@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: c6d7be214811 - main - tty: properly check character position when handling IUTF8 backspaces List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/main X-Git-Reftype: branch X-Git-Commit: c6d7be214811c315d234d64c6cbaa92d4f55d2c1 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=c6d7be214811c315d234d64c6cbaa92d4f55d2c1 commit c6d7be214811c315d234d64c6cbaa92d4f55d2c1 Author: Bojan Novković AuthorDate: 2023-11-13 18:02:30 +0000 Commit: Christos Margiolis CommitDate: 2023-11-13 18:04:11 +0000 tty: properly check character position when handling IUTF8 backspaces The tty_rubchar() code handling backspaces for UTF-8 characters didn't properly check whether the beginning of the current line was reached. This resulted in a kernel panic in ttyinq_unputchar() when prodded with certain malformed UTF-8 sequences. Fixes: PR 275009 Reviewed by: christos MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42564 --- sys/kern/tty_ttydisc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/kern/tty_ttydisc.c b/sys/kern/tty_ttydisc.c index c46579cefbb1..cb5bf672d040 100644 --- a/sys/kern/tty_ttydisc.c +++ b/sys/kern/tty_ttydisc.c @@ -822,7 +822,13 @@ ttydisc_rubchar(struct tty *tp) /* Loop back through inq until we hit the * leading byte. */ while (CTL_UTF8_CONT(c) && nb < UTF8_STACKBUF) { - ttyinq_peekchar(&tp->t_inq, &c, "e); + /* + * Check if we've reached the beginning + * of the line. + */ + if (ttyinq_peekchar(&tp->t_inq, &c, + "e) != 0) + break; ttyinq_unputchar(&tp->t_inq); bytes[curidx] = c; curidx--; From nobody Mon Nov 13 19:26:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STfYv0gQhz50RNc; Mon, 13 Nov 2023 19:26: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 4STfYv0KtWz4cy6; Mon, 13 Nov 2023 19:26:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699903603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=stvSHFuXzsQpYW6aueuXNcmakXn1gcHc6NE17fRlifg=; b=LOlwXKMMG6ZEM+dL9kDQbLzX23YfZu1/6+5jYLbNqUGXNfv15TIeW0KAbpp63Yak45F4XC jKI5NYmGj0WHt+1phVSfhdHqK5z2t701zNJeGdSegksWuuzY29NLk6Nv6butx3IiD81Geu HeTjqiENplQHN3tpICl5WJLWGDNbLrxpvcvhrTLaPAVQZ51b07xajHaLT0y9JWaIXDgC6F BYUkxoItM1p74/PnUpyoTHSglEC+kV3JpiwN17YPn0GtLTthmgMZ7fBGWbXHebT7x8Jkje hlybaHFP7PFZX3EA3wCCn9VoDDJI0cnI4liCKlRqo4SrF7iA4oNCEWGBFSke3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699903603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=stvSHFuXzsQpYW6aueuXNcmakXn1gcHc6NE17fRlifg=; b=MGEiGO8tZxYhq2eUvtETTqNdTfwtWqVr0hMEnqtyMmOVvEzlIkWbhYyN5Ce+jJ/vjYdkfC 1OhIDb0FD4G9i1ZTZ+9TXGK4TiegiI2tuopp0O1u3i3ar+MHWnJWT1CXU5ZkVsq53a3gnV yvAQ+FbkSydc6D+b0CxZ0NoQuFJUbxcqvedAIeAt3YCODhJak8DFptyhhx+Zdq5E7IRe4O Fn6bnEm1KMKQTRGSa7pddvcI46MeCGtYwxqiQ2ViWrDgjJn7l8ePqux6eyghB+3yzlcVYh G2JRPnXVb4KbSIHyVRTrOZjEloO2RwH14GQY9DGNyUNQD2WMyTIgN5wtXmoiYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699903603; a=rsa-sha256; cv=none; b=Cbo58YkK9oyrNP3qOLa2YeZ15vaqS60QH/9w7a6upMTLsSbmX3wDS+MMAaqm1ps2zyKKUe ztG7Hz0VsqvCF4fr7aqPejg4tBWlOoyrVa9qHu0LiXc/Lv8lYkplosOxBH65GEjETA+jcD 1M5fyBjA48LiKVFsIV81eEG8a4Ocqksa2wMlPxEclsWQXmPN4cQAgL6SyhQnU6MngfW4TF KhKkEBVN/FnFIJTpLnRa/WqztOLEQqBPU8ovcNaVJEEb/GZdLIO5VHFcUi+cBJQcQ5hyAm o0tgElJ5/XyavPU/WsX3WRt+aZPtNfRp1Ae2i+eYpNGfMGxD1Ry365+iluS8/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 4STfYt6TrFz3ZW; Mon, 13 Nov 2023 19:26: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 3ADJQgPu061557; Mon, 13 Nov 2023 19:26:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADJQgsH061554; Mon, 13 Nov 2023 19:26:42 GMT (envelope-from git) Date: Mon, 13 Nov 2023 19:26:42 GMT Message-Id: <202311131926.3ADJQgsH061554@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: 49025a1109ac - main - _bus.h: Use standard licnese text List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 49025a1109ac5f8088d21788413f843dd730e217 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=49025a1109ac5f8088d21788413f843dd730e217 commit 49025a1109ac5f8088d21788413f843dd730e217 Author: Warner Losh AuthorDate: 2023-11-09 17:56:12 +0000 Commit: Warner Losh CommitDate: 2023-11-13 19:25:30 +0000 _bus.h: Use standard licnese text All of these used the 'immediately at beginning' variation of the BSD-2-Clause license. This wasn't intentional, just what I copied from from a random file in the tree back in 2005. It was not an intentional decision. The different arch bus.h files are a mix of BSD-2-Clause and BSD-4-Clause that have various copyright holders (Charles M. Hannum, Christopher G. Demetriou, The NetBSD Foundation and KATO Takenori), and some of the content of these files were likely copied from there. However, apart from the uncopyrightable interface lines, there are very few comments. It's unclear if these comments are 'original material' here to copyright, but to the extent that there is, license it under the standard BSD-2-Clause copyright that's the norm for the project today. In any event, the standard BSD-2-Clause is also closer to those originals. In addition, FreeBSD uses different type definitions than the original NetBSD code in part. The comments that were copied have been copied a lot, but appear in NetBSD's bus.h files in NetBSD 1.3. While I'm here, assign the copyright, to the extent any exists from me, to the FreeBSD Foundation. I just cut and pasted these into _bus.h from the different machine files and those files have a rich history of modification from the original imports from NetBSD over more than 25 years so it's tricky to say who, exactly, wrote each bit. Given the size of the files, this seems like the best compromise. Also add an acknowledgement to the NetBSD 1.3 bus.h files and their authors (there were no additional FreeBSD authors listed in the various sys/*/include/bus.h files). Finally, use the SPDX identifier instead of multiple copies of the text. Differential Revision: https://reviews.freebsd.org/D42532 Sponsored by: Netflix --- sys/amd64/include/_bus.h | 31 +++++++------------------------ sys/arm/include/_bus.h | 31 +++++++------------------------ sys/arm64/include/_bus.h | 29 +++++++---------------------- sys/i386/include/_bus.h | 31 +++++++------------------------ sys/powerpc/include/_bus.h | 31 +++++++------------------------ sys/riscv/include/_bus.h | 29 +++++++---------------------- 6 files changed, 42 insertions(+), 140 deletions(-) diff --git a/sys/amd64/include/_bus.h b/sys/amd64/include/_bus.h index 8af25c02c23c..ce73118c9793 100644 --- a/sys/amd64/include/_bus.h +++ b/sys/amd64/include/_bus.h @@ -1,30 +1,13 @@ /*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2005 M. Warner Losh + * Copyright (c) 2005 The FreeBSD Foundation. * - * 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, immediately at the beginning of the file. - * 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. + * SPDX-License-Identifier: BSD-2-Clause * - * 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. + * Derived in part from NetBSD's bus.h files by (alphabetically): + * Christopher G. Demetriou + * Charles M. Hannum + * Jason Thorpe + * The NetBSD Foundation. */ #ifndef AMD64_INCLUDE__BUS_H diff --git a/sys/arm/include/_bus.h b/sys/arm/include/_bus.h index fb3bf9da944d..fe7942c3369f 100644 --- a/sys/arm/include/_bus.h +++ b/sys/arm/include/_bus.h @@ -1,30 +1,13 @@ /*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2005 M. Warner Losh + * Copyright (c) 2005 The FreeBSD Foundation. * - * 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, immediately at the beginning of the file. - * 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. + * SPDX-License-Identifier: BSD-2-Clause * - * 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. + * Derived in part from NetBSD's bus.h files by (alphabetically): + * Christopher G. Demetriou + * Charles M. Hannum + * Jason Thorpe + * The NetBSD Foundation. */ #ifndef ARM_INCLUDE__BUS_H diff --git a/sys/arm64/include/_bus.h b/sys/arm64/include/_bus.h index b07f29b0a536..8bee1634c4f2 100644 --- a/sys/arm64/include/_bus.h +++ b/sys/arm64/include/_bus.h @@ -1,28 +1,13 @@ /*- - * Copyright (c) 2005 M. Warner Losh + * Copyright (c) 2005 The FreeBSD Foundation. * - * 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, immediately at the beginning of the file. - * 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. + * SPDX-License-Identifier: BSD-2-Clause * - * 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. + * Derived in part from NetBSD's bus.h files by (alphabetically): + * Christopher G. Demetriou + * Charles M. Hannum + * Jason Thorpe + * The NetBSD Foundation. */ #ifndef _MACHINE__BUS_H_ diff --git a/sys/i386/include/_bus.h b/sys/i386/include/_bus.h index 3955a4043f7f..9b6834957755 100644 --- a/sys/i386/include/_bus.h +++ b/sys/i386/include/_bus.h @@ -1,30 +1,13 @@ /*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2005 M. Warner Losh + * Copyright (c) 2005 The FreeBSD Foundation. * - * 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, immediately at the beginning of the file. - * 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. + * SPDX-License-Identifier: BSD-2-Clause * - * 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. + * Derived in part from NetBSD's bus.h files by (alphabetically): + * Christopher G. Demetriou + * Charles M. Hannum + * Jason Thorpe + * The NetBSD Foundation. */ #ifndef I386_INCLUDE__BUS_H diff --git a/sys/powerpc/include/_bus.h b/sys/powerpc/include/_bus.h index f59b0a1e30ff..bf6372ac6aea 100644 --- a/sys/powerpc/include/_bus.h +++ b/sys/powerpc/include/_bus.h @@ -1,30 +1,13 @@ /*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2005 M. Warner Losh + * Copyright (c) 2005 The FreeBSD Foundation. * - * 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, immediately at the beginning of the file. - * 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. + * SPDX-License-Identifier: BSD-2-Clause * - * 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. + * Derived in part from NetBSD's bus.h files by (alphabetically): + * Christopher G. Demetriou + * Charles M. Hannum + * Jason Thorpe + * The NetBSD Foundation. */ #ifndef POWERPC_INCLUDE__BUS_H diff --git a/sys/riscv/include/_bus.h b/sys/riscv/include/_bus.h index b07f29b0a536..8bee1634c4f2 100644 --- a/sys/riscv/include/_bus.h +++ b/sys/riscv/include/_bus.h @@ -1,28 +1,13 @@ /*- - * Copyright (c) 2005 M. Warner Losh + * Copyright (c) 2005 The FreeBSD Foundation. * - * 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, immediately at the beginning of the file. - * 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. + * SPDX-License-Identifier: BSD-2-Clause * - * 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. + * Derived in part from NetBSD's bus.h files by (alphabetically): + * Christopher G. Demetriou + * Charles M. Hannum + * Jason Thorpe + * The NetBSD Foundation. */ #ifndef _MACHINE__BUS_H_ From nobody Mon Nov 13 19:26:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STfYw46ptz50RZ2; Mon, 13 Nov 2023 19:26: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 4STfYw1VB4z4cvg; Mon, 13 Nov 2023 19:26:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699903604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+95P3H2htbFzNJwD7yBW+xon2aOkc8n68zVUhsoElIA=; b=oCe4NZqZBhqtKX4P9V2Rb8E1+J3xJls/9wdNLCAJCK2LaZj+TvA0w/l7Doctv7pUcdN3Cb r2rLJcaJ8Q5vbQ6bUVtXlm5Q9BvcOWl7tHOpMX8zW20sGSJAsezwGNMah/TihWJGv/5lNU Q5qLkhV1ci7aNdJkaVJlC+/hgzlcVR8eOkg/UxYILsgp8ODABVk6mtdfQBbKkVihEReZgs wyoQdCYhuKm3ry1m+2c77Yone5fMGdDRufIkIGGSvB9dso3AVEGytX3t240tqa4KSOLl7b YcUgfhwMuemCudY6nZCYMZHSVpqKnXLZBCZiLYuDJQq/yiiCNRSj2PnwCmDzuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699903604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+95P3H2htbFzNJwD7yBW+xon2aOkc8n68zVUhsoElIA=; b=HSOLgVd4Dl8nOZdQwdbxmRvv8GTDJYSqapEws0SVnnT5gsFAd8/miZi5SLKwXOVBNcsbRR abyk761sKPZNDdwRSqOzUSx1SLH6dsNQpZZxYvacwDNbUR5s+bmvufhrB1jolcQU/3E5iK FqjDwH9YJDai8FuxoaSOotXPgqaCq2fqnyJ+UqWa0cZk/Ec5q7xgAR3H/hsvhQffC/zYGA SxbUJIZO8NFdeIZNQuNUrGRAOl42N6fSDk/78di8tzaFv0BcJ963CRrLdQUuKL/eJVRJcx Ue42ZLMjhpsMk/gBiQC2iNQplPEIdK+tWCYVJK2tdS7mt/O9QfXP9514+LvKUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699903604; a=rsa-sha256; cv=none; b=gEFwmqEHCSHF285X7ZYI454XNt3SzeWc/cthnlwNTfX89Osv3LlPSTr3GtoMIEpoGROc2V qb8bYySbf5rECHw9CjW+0OOf+AwyLQ6mvqXTFzs6BEYgrtx62lkFP8FX0hBMQrPvSUXyok H+NTBKcJzllzt5OqsPDkNWqiFspSpY5d+ts8kzU8lgqhDf3o5Kp1SGXBjmK1R2qafbO2KH j3lo+LAdZS1go5Zrqac5IjvYhkH3/W37BUdXg6JasbcVs4lznXT0j09RL60I1rtN0O9UG/ 4tSj3Spo4R6iui93C4A4utQgU3Mt5oUD2m/DAlvxA7zd9GgL4bdWClpekPNr5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STfYw05THz2qP; Mon, 13 Nov 2023 19:26: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 3ADJQhKY061612; Mon, 13 Nov 2023 19:26:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADJQhsv061609; Mon, 13 Nov 2023 19:26:43 GMT (envelope-from git) Date: Mon, 13 Nov 2023 19:26:43 GMT Message-Id: <202311131926.3ADJQhsv061609@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: 0e8044064716 - main - busdma: Add deferred time measurement to arm and powerpc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0e8044064716fa7cf4fd9a98016f6e8c8f108333 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0e8044064716fa7cf4fd9a98016f6e8c8f108333 commit 0e8044064716fa7cf4fd9a98016f6e8c8f108333 Author: Warner Losh AuthorDate: 2023-11-13 19:23:31 +0000 Commit: Warner Losh CommitDate: 2023-11-13 19:25:56 +0000 busdma: Add deferred time measurement to arm and powerpc Add the forgotten field to these implementations as well. Pointy hat to: me (make universe vs make tinderbox) Fixes: 20f8814cd3fa Sponsored by: Netflix --- sys/arm/arm/busdma_machdep.c | 1 + sys/powerpc/powerpc/busdma_machdep.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/arm/arm/busdma_machdep.c b/sys/arm/arm/busdma_machdep.c index 07a3da114441..41b92d65ae84 100644 --- a/sys/arm/arm/busdma_machdep.c +++ b/sys/arm/arm/busdma_machdep.c @@ -149,6 +149,7 @@ struct bus_dmamap { struct memdesc mem; bus_dmamap_callback_t *callback; void *callback_arg; + __sbintime_t queued_time; int flags; #define DMAMAP_COHERENT (1 << 0) #define DMAMAP_DMAMEM_ALLOC (1 << 1) diff --git a/sys/powerpc/powerpc/busdma_machdep.c b/sys/powerpc/powerpc/busdma_machdep.c index bffbfa94acac..59e54d2478fa 100644 --- a/sys/powerpc/powerpc/busdma_machdep.c +++ b/sys/powerpc/powerpc/busdma_machdep.c @@ -97,6 +97,7 @@ struct bus_dmamap { int nsegs; bus_dmamap_callback_t *callback; void *callback_arg; + __sbintime_t queued_time; STAILQ_ENTRY(bus_dmamap) links; int contigalloc; }; From nobody Mon Nov 13 19:46:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STg0V3RqTz50SZH for ; Mon, 13 Nov 2023 19:46: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 4STg0V2yknz4gBj; Mon, 13 Nov 2023 19:46:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699904778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JXb3z4VAEhvQepaPs1UqNN5ASCvhPFk1R6fGWuKtVLk=; b=c46d2j0E6hoCBTo6GW9047HEDCc/t0eR3PBdxyAlWPQBqa0bwlE0cgJn92JG9eyopB2ebp xGzPajrIEO9LH8cicyw2MiFQG8QS4u+tml66ohy/EOx8Gz9vEANae8jIf79Vzh3B9jPBj6 v5ATxzg6v3uyNTibnekb/xoaQf/Mkqc9mXPITVsVL9BaFAWhBStelnKaFhg3VnY/xFGXdH HW5KoWYJqNQ5VdUgWsqrx0BglrGAPXZzq4NHH+UudcgNnjGf2Ue4p2cgZiEdU7NtcI9hhP Q8q845EI0BlD1F8qio7tDVNPKxKf4t4H0db+fnIs4EwrM/IJwkq10oaYMY/3pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699904778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JXb3z4VAEhvQepaPs1UqNN5ASCvhPFk1R6fGWuKtVLk=; b=gttE9V9Y7bfw/fYV0txsLhc8BbTJ8efLdv2YZGEcIyk6LYexjD0v6EK0zdjTMM5q+G5cjb sRjPttvkicUkVImbhZNZjymN8YyUO407AXP6GbBvOHKUlC5QXYN3OcAmzRHBr8rBkvZfFM 6ninCIxHlb2/M6hPrAo8p6bF3sAuXyxg9Mts7JOTWoFXIC7xl7lOm2Ixtmf6Qoen2fzuQM i4A/NLVNQ+hVL6SDZzoB+uZe7Tk0lSc5EcRKjQJfsJ4CLMQux0m4pakKzKVYgbcwzVJpvz EbuTSk+PmYT7dgZ6FW4WJYBmU4ZffKRqheIia6D6gDBJ+073dYDqqoCitA2hzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699904778; a=rsa-sha256; cv=none; b=XZzupp754vpEEcwmYa/eBWPyaz3pCTfMRI/t0Llsjt31ocU5Zv6s8HCcqk3bQdu5DIfaeJ 2p8rGsK0slBwRaSMmvaPTydzjQLEGkyP6Ke79w8Cp9SImi5QLo+Ek6LRCwi6856AhrbkjJ ceef+UsWSexHdByTR0q2ZreDq3ucrNKqa9S49GhUu8ugBca5kcpjxbkUcfRtgVZ36WFavw TCWXtuepYt61HAebEKKQ7vBN+LUYef4+aN1oeohgx+eSDndpdzdOYCuWmDnt5D+LJ07VaS hmsfIod8K7UeG5G+CRFDCgnsv7WMo+Q7E7p5JxYRdq2uIlC8VVTPXqo9cwCJ9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STg0V1kzZz49m; Mon, 13 Nov 2023 19:46: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 3ADJkImM095348; Mon, 13 Nov 2023 19:46:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADJkIFX095347; Mon, 13 Nov 2023 19:46:18 GMT (envelope-from git) Date: Mon, 13 Nov 2023 19:46:18 GMT Message-Id: <202311131946.3ADJkIFX095347@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: 292d51198aa3..16fd0b249104 - vendor/unbound - 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/vendor/unbound X-Git-Reftype: branch X-Git-Commit: 16fd0b24910488e59ca1941387b9ac7fb646a837 X-Git-Oldrev: 292d51198aa319c58f534549851e9c28486abdf4 X-Git-Newrev: 16fd0b24910488e59ca1941387b9ac7fb646a837 Auto-Submitted: auto-generated The branch vendor/unbound has been updated by cy: URL: https://cgit.FreeBSD.org/src/log/?id=292d51198aa3..16fd0b249104 16fd0b249104 unbound: Vendor import 1.19.0 From nobody Mon Nov 13 19:46:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STg0V3rvcz50Shw for ; Mon, 13 Nov 2023 19:46: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 4STg0V3Plvz4gBk; Mon, 13 Nov 2023 19:46:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699904778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Sp3U9arpS5pK/o23NC0X6I7gFsnN57PcTa2xbAUvKo=; b=Yld+TezPXzWeETvHqfF8EyoMOR4BU/TCP5c/L76wmZf/v9ZDTgFUFxlB+0aNVDxlSPNyxI JNEqQTKAwFJP08yh5SX1U4FyUYUlE9nz2qPyPCGR3BHGh9bztb5HL8I4mF3NZv+/xO7qQP XP1acr5sPjjvOXugPSPP4PwoxRFZuK0BFfZTNMkU9sFn9wSOXT2r6hcrXVtwndL2JmUHVF u9Buozj3joqeQH3+rbAksb3Th+Ydu6pc0fyxNDpTO3KMBUbxFTLtoPje9UJEhF74mX/tdo 6/StRWG1wfF5D1+r3yPxnfPB7GKHek6slzH6n1uqxO9cjpTlyoC+5duyiB/lEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699904778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Sp3U9arpS5pK/o23NC0X6I7gFsnN57PcTa2xbAUvKo=; b=gs4cKMnUsCZFMNVUQrnU9Z84zuyDVahWSHnnISlaM3gONDzAgAe4n7k/dxGK0ov30U/jY1 sf8n24vy7Pat5YGX9Kwa93/HslWohFVm7cw4BDFteq7u6qAdSJk/R/+T7jGM5A6pXyltHW RczGKgZrD7sVpx0jDojNrsWNujVpo0ROVXtanxa54trH8F0PeH+ZIyi8R+yni49fExnudR LsmJgdnZz184GaTo745RrIi5goQHQ58HXfcQKrQO901qgIz0zxdRtrARV1uUMxlqbBcTzU BBLfeAna3OLYwL3eddyr1eGJOk6NmxGAwS/Fhbom4QyF11n7CuP+PHEtA0XT8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699904778; a=rsa-sha256; cv=none; b=rW4DhP4L7KYsVZmkAdAbECXKzme69evURaQorak+ifczsSBm0p8Zyy0FMo5uoTlp1gkezQ P7BkxUgtdCZamSYbVCvvxsxpBAcOHUgCAEGZoJ/qIz3Nsez4DqG2q5wV8tVqscINwbcmDo nWTBcyizbwEOli70eUKFT2gLt58bMdwap7fdYQOgAyr+t9gJd664TyFAFst6k6dUYsG1XV mqd+3tJINnZ5JCxkX4p2CgyLXtR0EEngs7thcLh3imePvsuhbp0mhFyTUwQ1kpER4YwYdU UfDDPA166qEwNCNOlEVi9mg9gXMi+Skcyfe2semKTu5CcQvy1z5EkYDy1XbW2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STg0V2MjYz49n; Mon, 13 Nov 2023 19:46: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 3ADJkIOv095367; Mon, 13 Nov 2023 19:46:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADJkImT095366; Mon, 13 Nov 2023 19:46:18 GMT (envelope-from git) Date: Mon, 13 Nov 2023 19:46:18 GMT Message-Id: <202311131946.3ADJkImT095366@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: bb956bbd85f5 - Create tag vendor/unbound/1.19.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: cy X-Git-Repository: src X-Git-Refname: refs/tags/vendor/unbound/1.19.0 X-Git-Reftype: annotated tag X-Git-Commit: bb956bbd85f5c67cb3fc73baacdbf39ff249881c Auto-Submitted: auto-generated The annotated tag vendor/unbound/1.19.0 has been created by cy: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/unbound/1.19.0 tag vendor/unbound/1.19.0 Tagger: Cy Schubert TaggerDate: 2023-11-13 19:45:12 +0000 unbound: Tag 1.19.0 commit 16fd0b24910488e59ca1941387b9ac7fb646a837 Author: Cy Schubert AuthorDate: 2023-11-13 19:44:16 +0000 Commit: Cy Schubert CommitDate: 2023-11-13 19:44:16 +0000 unbound: Vendor import 1.19.0 Release notes at https://www.nlnetlabs.nl/news/2023/Aug/30/unbound-1.19.0-released/ From nobody Mon Nov 13 21:33:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STjMr16rvz50lvK; Mon, 13 Nov 2023 21:33: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 4STjMr0Z6lz3R2g; Mon, 13 Nov 2023 21:33:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699911192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7ELOQ71Cvun+k0icgXTbBYKYlH1zqcWrayLs6jCUV9E=; b=kaQh9GwSchDvWiJxcUbfob7ZgY2Z1NhGv+YZtrfovIhsEFm6cmCJqLi9L3a8OLEKMzz8ps QxbGG5G+iTAOzfwqMYm1MDIMGFPULLynv9tBo/33U2WbqnVnbAsfkPU2dSUOH3LwVrJJPJ xwELVZu7xTf4WJ+/Z5T7X/Ux86VszDiacdnjiXBhrzpk1cgtY6hi723iEUFfCPpkHhKH35 uTa0n615hJ7HFLbbTZQk466hukB1Y7aW3asouw9Av7VUcOEGgb5fHxEDVqQwKH70S/SwI6 hbLlIMp5GeKPQD7/r5p7RmeMUovMFUqMWbXGoJurfoObGAh5G6+hvnIDULpWdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699911192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7ELOQ71Cvun+k0icgXTbBYKYlH1zqcWrayLs6jCUV9E=; b=p7aDlJGo4A7j5hRob5WxaQbjUCrOtMYPbeclgqu3O38qgO/pRmWeSBayqnufQ4keBbutkx 7U9l6lDq39bPuYSxQDINHhMLlDXhxEDCg20LzwtGYjXYFslePG11BbnsmG6v3OMpR+/J7J izSVvaubc0StUQhFaMNJrfEZFTRh9rQQ/pV8G7Q0tRHy8RJhl/aXz+eo9tnBtnYLL5Aj2D ArVgPwdrTKT5YWALyeYb3qdqcZzd3g8yW1CT0piOVG1AmVFZzOf8OIdOP9mtoIzLFOgvAY Z1cm230W1QteQ5Lb7PmPot/n15wRG0TxiSOpl5GyA7hNSmzzldLJGAur+faqnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699911192; a=rsa-sha256; cv=none; b=AyWCzhXEo0kGd8e/see9BdGcExhTaBLWuusvsTpHgqL1YRlEBCwIupEm+uLQT2oi+g3JEc t3Q3l0Xd4M6wYl0LE6pmsBQiVJG8dRYc1z1gjY39R2277BQIL3r7CNZzAHGIAaC0Hnlb5p T/bGEv+3Lq/Ag6KMJh1tL43+EC+EJklyWERJsMcDLIUVfXXr7V+JPooFTIhvlBTflBZfih HlXRYD6UOEEfpiOdQYxOu4UTuwQP1fzgMiN+THZviC6hTSuX560Wf7VFNvHKdk3l35o6uu gzBkxDVSr/f0qLem57NrBavOPzc+De8fxEJfH/mfikiLqOTZArG83QYYrkTg8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STjMq6l2Dz6ff; Mon, 13 Nov 2023 21:33: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 3ADLXB6u077881; Mon, 13 Nov 2023 21:33:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADLXBhX077878; Mon, 13 Nov 2023 21:33:11 GMT (envelope-from git) Date: Mon, 13 Nov 2023 21:33:11 GMT Message-Id: <202311132133.3ADLXBhX077878@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: f64a688dfda9 - main - Remove gratuitous copyouts of unchanged struct mac. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f64a688dfda9d664c03ba67dab27dd6c7e10784d Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=f64a688dfda9d664c03ba67dab27dd6c7e10784d commit f64a688dfda9d664c03ba67dab27dd6c7e10784d Author: Brooks Davis AuthorDate: 2023-11-13 21:32:15 +0000 Commit: Brooks Davis CommitDate: 2023-11-13 21:32:15 +0000 Remove gratuitous copyouts of unchanged struct mac. The get operations change the data pointed to by the structure, but do not update the contents of the struct. Mark the struct mac arguments of mac_[gs]etsockopt_*label() and mac_check_structmac_consistent() const to prevent this from changing in the future. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D14488 --- sys/kern/uipc_socket.c | 4 ++-- sys/security/mac/mac_framework.c | 3 +-- sys/security/mac/mac_framework.h | 6 +++--- sys/security/mac/mac_internal.h | 2 +- sys/security/mac/mac_socket.c | 8 +++++--- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 880dec89245b..0ddcf0409cb0 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -3442,7 +3442,7 @@ integer: so, &extmac); if (error) goto bad; - error = sooptcopyout(sopt, &extmac, sizeof extmac); + /* Don't copy out extmac, it is unchanged. */ #else error = EOPNOTSUPP; #endif @@ -3458,7 +3458,7 @@ integer: sopt->sopt_td->td_ucred, so, &extmac); if (error) goto bad; - error = sooptcopyout(sopt, &extmac, sizeof extmac); + /* Don't copy out extmac, it is unchanged. */ #else error = EOPNOTSUPP; #endif diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c index 8f1aa37d45b3..682f05c6979f 100644 --- a/sys/security/mac/mac_framework.c +++ b/sys/security/mac/mac_framework.c @@ -725,9 +725,8 @@ mac_error_select(int error1, int error2) } int -mac_check_structmac_consistent(struct mac *mac) +mac_check_structmac_consistent(const struct mac *mac) { - /* Require that labels have a non-zero length. */ if (mac->m_buflen > MAC_MAX_LABEL_BUF_LEN || mac->m_buflen <= sizeof("")) diff --git a/sys/security/mac/mac_framework.h b/sys/security/mac/mac_framework.h index 644028bde478..c69b9cd64454 100644 --- a/sys/security/mac/mac_framework.h +++ b/sys/security/mac/mac_framework.h @@ -408,11 +408,11 @@ void mac_socket_destroy(struct socket *); int mac_socket_init(struct socket *, int); void mac_socket_newconn(struct socket *oldso, struct socket *newso); int mac_getsockopt_label(struct ucred *cred, struct socket *so, - struct mac *extmac); + const struct mac *extmac); int mac_getsockopt_peerlabel(struct ucred *cred, struct socket *so, - struct mac *extmac); + const struct mac *extmac); int mac_setsockopt_label(struct ucred *cred, struct socket *so, - struct mac *extmac); + const struct mac *extmac); void mac_socketpeer_set_from_mbuf(struct mbuf *m, struct socket *so); void mac_socketpeer_set_from_socket(struct socket *oldso, diff --git a/sys/security/mac/mac_internal.h b/sys/security/mac/mac_internal.h index d1ee1af09c0b..aa407598600a 100644 --- a/sys/security/mac/mac_internal.h +++ b/sys/security/mac/mac_internal.h @@ -210,7 +210,7 @@ void mac_labelzone_init(void); void mac_init_label(struct label *label); void mac_destroy_label(struct label *label); -int mac_check_structmac_consistent(struct mac *mac); +int mac_check_structmac_consistent(const struct mac *mac); int mac_allocate_slot(void); /* diff --git a/sys/security/mac/mac_socket.c b/sys/security/mac/mac_socket.c index be1363024657..e9f94404734a 100644 --- a/sys/security/mac/mac_socket.c +++ b/sys/security/mac/mac_socket.c @@ -521,7 +521,8 @@ mac_socket_label_set(struct ucred *cred, struct socket *so, } int -mac_setsockopt_label(struct ucred *cred, struct socket *so, struct mac *mac) +mac_setsockopt_label(struct ucred *cred, struct socket *so, + const struct mac *mac) { struct label *intlabel; char *buffer; @@ -554,7 +555,8 @@ out: } int -mac_getsockopt_label(struct ucred *cred, struct socket *so, struct mac *mac) +mac_getsockopt_label(struct ucred *cred, struct socket *so, + const struct mac *mac) { char *buffer, *elements; struct label *intlabel; @@ -593,7 +595,7 @@ mac_getsockopt_label(struct ucred *cred, struct socket *so, struct mac *mac) int mac_getsockopt_peerlabel(struct ucred *cred, struct socket *so, - struct mac *mac) + const struct mac *mac) { char *elements, *buffer; struct label *intlabel; From nobody Mon Nov 13 21:34:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STjPl2T7hz50m7g; Mon, 13 Nov 2023 21:34: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 4STjPl22pzz3RNq; Mon, 13 Nov 2023 21:34:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699911291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iUBY5PJF0Frpqq1uqrHegvn5EMyo+dySAit2diD0i7U=; b=GVsd7/FoyvYqEZv8WkRyPPGna/MXciHB722ccvlbOHnPGb6XzTS4rvLU6XmOsM9zq1+Sxz h5rlV/Npoyz1fwIMYXV1rtKFnn0U3QoTEIWokIkwmuVhfU3i+mnYRuAH5A7hqvJfy6NJwm XA6oR8J1ate1syDHryrteusV3vogaCvt2m5qLV9RnjH6c58OuoKXPV17k6Fzs5pU+VW3WV qryzKTEeXJKimnOUCInmKoc2Q43rlpHxda2lrtrWLNdV3/nAEOD/cxHCL/JAnWG6ilxTmZ x4Pq1AWRCSms+PNsK/4CiIAS4BUI7OZZeFrSNLhWFy1NA5K5lDx+z0B158mlKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699911291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iUBY5PJF0Frpqq1uqrHegvn5EMyo+dySAit2diD0i7U=; b=N9aISyV3S8WnaoYvlP3rK0XSTMK5l6jXByo1OzrUUkiMZbbU/dVAI9J65x8/93KXVpdUfw ysJ0Q7lq4TOGzqH9njhspwwYhpOap5dP/GlJ8E3j9DRqL5cVyERa6AjAn1U6KQm0exA0Ft B6cHBr4T4RUGrS20EUOprMUAqPKYuuaAVSXj+opfzemGJ+Y8roeMCnGTGrJ1ELAwRqxJtk 8BTvKN38klFbX1xF9axIbdM79uGVNmbrFDXgG73kRBycy6uy4Ea4tPeiB40rmCky2LoFUU syS0v/K6nPsQUO4hdDrJRHGw3jLWONNLBF+XOvk+RCmuvv4CiJLsmWL3nQRKUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699911291; a=rsa-sha256; cv=none; b=WLycBJTIdRX2ws5g1ZT4hE2T4XhdtOOzOobJ7cJwsCusACRgsMS87uCYWZvdlxfMM3eW86 tXqTEEd/FssccQRDo3s1QQrDCfJ4eExhmVfUYRATqBQirtN4rvRXbmgI03Y9hbtA02f7u/ E/7eh7u0S8yPf+DLRebJRLDevg+ZVMmrm8DT7usq7W474UW3cDzDgbcrbRaEjpG6w2aNQ4 WPwezOOw44bVr+lYKw52Hj9I8IcPIWfUucw7Ezd1K6lrvJQF422rTNtbPe/0V37I2kQS1o bkNFlMIECSKLJZB8w/7O0NUAl5ODJDnHVNijU8+uMAAAC2DoN5bMFObsZXw/LA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STjPl17WDz6Mf; Mon, 13 Nov 2023 21:34: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 3ADLYpMh078257; Mon, 13 Nov 2023 21:34:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADLYpAE078254; Mon, 13 Nov 2023 21:34:51 GMT (envelope-from git) Date: Mon, 13 Nov 2023 21:34:51 GMT Message-Id: <202311132134.3ADLYpAE078254@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: ec4c2adb5067 - main - Retire LLD_IS_LD 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec4c2adb5067f7458e71c4098e716ee93508e96c Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=ec4c2adb5067f7458e71c4098e716ee93508e96c commit ec4c2adb5067f7458e71c4098e716ee93508e96c Author: Brooks Davis AuthorDate: 2023-11-13 21:34:14 +0000 Commit: Brooks Davis CommitDate: 2023-11-13 21:34:14 +0000 Retire LLD_IS_LD option The option was added to parallel the CLANG_IS_CC which was removed in commit 20a66ab4bf8511e51e11321b775d36c92e77fa69. Reviewed by: imp, dim, emaste Differential Revision: https://reviews.freebsd.org/D42575 --- UPDATING | 4 ++++ share/man/man5/src.conf.5 | 9 +-------- share/mk/src.opts.mk | 1 - tools/build/mk/OptionalObsoleteFiles.inc | 5 ----- tools/build/options/WITHOUT_LLD_IS_LD | 6 ------ tools/build/options/WITH_LLD_IS_LD | 1 - usr.bin/clang/lld/Makefile | 2 +- 7 files changed, 6 insertions(+), 22 deletions(-) diff --git a/UPDATING b/UPDATING index 1ee0731742b3..763f8f29a4f0 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20231113: + The WITHOUT_LLD_IS_LD option has been removed. When LLD is enabled + it is always installed as /usr/bin/ld. + 20231027: Forward compatibility (running the new code on old kernels) for the "ino64" project have been removed. The need for it has passed long ago. diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 67a906e964b2..e6affc81ab9c 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd October 29, 2023 +.Dd November 13, 2023 .Dt SRC.CONF 5 .Os .Sh NAME @@ -902,13 +902,6 @@ amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc, powerpc/powerpc64 and po Do not build the LLD linker during the bootstrap phase of the build. To be able to build the system an alternate linker must be provided via XLD. -.It Va WITHOUT_LLD_IS_LD -Do not install a -.Pa /usr/bin/ld symlink -to -.Pa ld.lld . -The system will not have a usable tool chain unless a linker is provided -some other way. .It Va WITHOUT_LLVM_ASSERTIONS Disable debugging assertions in LLVM. .It Va WITH_LLVM_BINUTILS diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index ecb944262955..cf7f3f7dffa7 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -124,7 +124,6 @@ __DEFAULT_YES_OPTIONS = \ LEGACY_CONSOLE \ LLD \ LLD_BOOTSTRAP \ - LLD_IS_LD \ LLVM_ASSERTIONS \ LLVM_COV \ LLVM_CXXFILT \ diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index f4eb36f50df1..5335e5ea4ffc 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -162,11 +162,6 @@ OLD_FILES+=usr/share/man/man8/bhyveload.8.gz OLD_DIRS+=usr/share/examples/bhyve .endif -.if ${MK_LLD_IS_LD} == no -OLD_FILES+=usr/bin/ld -OLD_FILES+=usr/share/man/man1/ld.1.gz -.endif - .if ${MK_BLACKLIST} == no OLD_FILES+=etc/blacklistd.conf OLD_FILES+=etc/rc.d/blacklistd diff --git a/tools/build/options/WITHOUT_LLD_IS_LD b/tools/build/options/WITHOUT_LLD_IS_LD deleted file mode 100644 index 8fca09cf94b8..000000000000 --- a/tools/build/options/WITHOUT_LLD_IS_LD +++ /dev/null @@ -1,6 +0,0 @@ -Do not install a -.Pa /usr/bin/ld symlink -to -.Pa ld.lld . -The system will not have a usable tool chain unless a linker is provided -some other way. diff --git a/tools/build/options/WITH_LLD_IS_LD b/tools/build/options/WITH_LLD_IS_LD deleted file mode 100644 index fd6bfc684d1a..000000000000 --- a/tools/build/options/WITH_LLD_IS_LD +++ /dev/null @@ -1 +0,0 @@ -Use LLVM's LLD as the system linker. diff --git a/usr.bin/clang/lld/Makefile b/usr.bin/clang/lld/Makefile index ec0c10e17441..86f6b6f76ee8 100644 --- a/usr.bin/clang/lld/Makefile +++ b/usr.bin/clang/lld/Makefile @@ -9,7 +9,7 @@ PACKAGE= lld PROG_CXX= ld.lld # Man page directory .PATH: ${LLD_SRCS}/docs -.if (!defined(TOOLS_PREFIX) && ${MK_LLD_IS_LD} != "no") || \ +.if !defined(TOOLS_PREFIX) || \ (defined(TOOLS_PREFIX) && ${MK_LLD_BOOTSTRAP} != "no") SYMLINKS= ${PROG_CXX} ${BINDIR}/ld MLINKS= ld.lld.1 ld.1 From nobody Mon Nov 13 21:40:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STjXJ6Yrrz50n6Y; Mon, 13 Nov 2023 21:40: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 4STjXJ6H6Rz3Rtj; Mon, 13 Nov 2023 21:40:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699911632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PyD6f6vGjsvFVmqMiQufdDf4XA21mE1QjSWAF08HSsg=; b=wBA2kcwjL6GRFFZjs09raYD8gSavfMzHNotpan8rmPK+DCmfkrjBNZIF2oGfiIrFZrgQ44 WlkI/kczHHfOSHRPVPFvqgvX++hqCuo0bBS0sJ46caWqkDllsuAU8LbQWjtErWu17VuiVn 5FcwwgHBSXYuigj/JcW8iVr6gqHJHu4dzSOHxNqbWk3sSWsdo08raCw9VJ8WX//sPZs7ml wbqIKK843NkkbL5lbwKxmB110bwFHW0hXFYVr4PDCCsKSENF/7eSW2Z/RHH2hADBo3Iz74 geQu9EKucUIlAbbVT6pRqxfhiohyzrnI0XFayy7aoGTfbWxgNDsL7oz4z92akA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699911632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PyD6f6vGjsvFVmqMiQufdDf4XA21mE1QjSWAF08HSsg=; b=aoJW1cHV4xPjfLktHbOhmgpbFVUlbuWxTwiy2X+qTKi27cHugspjFUHmFEhqquS89Hx3sH 5C/eX6QcgIKlhvVWBS3/M6ILlGqiYgd7qmIIvby7e7iGnVCW1Zx6tqkR7a3pKjeaPNkgqY 9q+4HREJdUgy0n7m1bOwvCfZdreQSNgNQ6NFpTvTxWq2goXdaeYGsTygbvhwY1ABpVGyrf /9j76QZGMzb69FOc2ZIE4MOoYt/0E2ODdj51fOQXauU8ycWYIi8vtMgFLBoJ+ZYyck+L8U OPGfgMKN+3/e7bIxT16roth5CaWaYLjePs460356Dkg40tSpNJ1nCtRnzFM08A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699911632; a=rsa-sha256; cv=none; b=T0kzayla+kC06D1t+GAYG8wtKWaaW+zjgX3sXzEVMm6gAB7Wf/E7a8O40ZJ4cF0zC2ihED CBVAC+uNjoapt4hEoG58jJI5vsuol4L8nhQvhXAWn0fKYL209/iJucN+IRFzNbwiUCq6bk WGkHCHNDqdk6ZUQmzX6Mcf6YReqf4ae18a4ncyrJ3TISvOwOanlKoA+01pYfnrNA8N5mt0 YW5V92wzCmot4xokQT7rIkNkJzBFHtZ6Llf5HB57F2rNLud9EMGiiioE5RF9zTob3Zrt3j tBcHrhX6YuZWxoA9O/JzJK8ZrvYD55Ja9x41d2zhg5bpNaR4FD8sDQwBEYUZBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STjXJ5Kgvz6fk; Mon, 13 Nov 2023 21:40: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 3ADLeW0L087586; Mon, 13 Nov 2023 21:40:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADLeWuk087579; Mon, 13 Nov 2023 21:40:32 GMT (envelope-from git) Date: Mon, 13 Nov 2023 21:40:32 GMT Message-Id: <202311132140.3ADLeWuk087579@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: 103ba509e72e - main - unbound: Vendor import 1.19.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: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 103ba509e72e3949d22485666949e9705d4af8cd Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=103ba509e72e3949d22485666949e9705d4af8cd commit 103ba509e72e3949d22485666949e9705d4af8cd Merge: ec4c2adb5067 16fd0b249104 Author: Cy Schubert AuthorDate: 2023-11-13 21:38:45 +0000 Commit: Cy Schubert CommitDate: 2023-11-13 21:38:45 +0000 unbound: Vendor import 1.19.0 Release notes at https://www.nlnetlabs.nl/news/2023/Aug/30/unbound-1.19.0-released/ MFC after: 2 weeks Merge commit '16fd0b24910488e59ca1941387b9ac7fb646a837' into unbound contrib/unbound/.gitignore | 1 - contrib/unbound/Makefile.in | 4 +- contrib/unbound/README.md | 6 +- contrib/unbound/cachedb/cachedb.c | 11 +- contrib/unbound/cachedb/redis.c | 68 +- contrib/unbound/config.guess | 8 +- contrib/unbound/config.h.in~ | 1456 ++++++++++++++++++++ contrib/unbound/config.sub | 155 ++- contrib/unbound/configure | 632 +++------ contrib/unbound/configure.ac | 17 +- contrib/unbound/daemon/remote.c | 35 +- contrib/unbound/daemon/worker.c | 8 + contrib/unbound/dns64/dns64.c | 99 +- contrib/unbound/dnstap/dnstap.m4 | 2 +- contrib/unbound/dnstap/dtstream.c | 8 +- contrib/unbound/dnstap/unbound-dnstap-socket.c | 12 +- contrib/unbound/doc/Changelog | 154 ++- contrib/unbound/doc/README | 2 +- contrib/unbound/doc/example.conf.in | 11 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 2 +- contrib/unbound/doc/unbound-checkconf.8.in | 2 +- contrib/unbound/doc/unbound-control.8.in | 2 +- contrib/unbound/doc/unbound-host.1.in | 2 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5.in | 32 +- contrib/unbound/dynlibmod/dynlibmod.c | 3 +- contrib/unbound/edns-subnet/subnetmod.c | 30 +- contrib/unbound/edns-subnet/subnetmod.h | 7 + contrib/unbound/ipset/ipset.c | 4 +- contrib/unbound/iterator/iter_priv.c | 26 +- contrib/unbound/iterator/iter_resptype.c | 25 +- contrib/unbound/iterator/iter_resptype.h | 4 +- contrib/unbound/iterator/iter_scrub.c | 67 +- contrib/unbound/iterator/iter_scrub.h | 5 +- contrib/unbound/iterator/iterator.c | 74 +- contrib/unbound/iterator/iterator.h | 7 + contrib/unbound/libunbound/libworker.c | 4 + contrib/unbound/services/authzone.c | 11 +- contrib/unbound/services/listen_dnsport.c | 8 +- contrib/unbound/services/mesh.c | 9 +- contrib/unbound/services/outside_network.c | 2 +- contrib/unbound/services/rpz.c | 10 +- contrib/unbound/sldns/str2wire.c | 21 +- contrib/unbound/sldns/wire2str.c | 82 ++ contrib/unbound/sldns/wire2str.h | 13 + contrib/unbound/smallapp/unbound-checkconf.c | 17 + .../cachedb_no_store.tdir/cachedb_no_store.conf | 29 + .../cachedb_no_store.tdir/cachedb_no_store.dsc | 16 + .../cachedb_no_store.tdir/cachedb_no_store.post | 20 + .../cachedb_no_store.tdir/cachedb_no_store.pre | 36 + .../cachedb_no_store.servfail.testns | 8 + .../cachedb_no_store.tdir/cachedb_no_store.test | 132 ++ .../cachedb_no_store.tdir/cachedb_no_store.testns | 9 + contrib/unbound/testdata/disable_edns_do.rpl | 164 +++ contrib/unbound/testdata/iter_ignore_empty.rpl | 50 + contrib/unbound/testdata/iter_scrub_rr_length.rpl | 298 ++++ .../testdata/root_zonemd.tdir/root_zonemd.conf | 34 + .../testdata/root_zonemd.tdir/root_zonemd.dsc | 16 + .../testdata/root_zonemd.tdir/root_zonemd.post | 14 + .../testdata/root_zonemd.tdir/root_zonemd.pre | 50 + .../testdata/root_zonemd.tdir/root_zonemd.test | 51 + .../testdata/root_zonemd.tdir/root_zonemd.testns | 9 + contrib/unbound/testdata/rpz_cached_cname.rpl | 122 ++ contrib/unbound/testdata/subnet_prezero.crpl | 155 +++ contrib/unbound/testdata/val_scrub_rr_length.rpl | 164 +++ contrib/unbound/util/config_file.c | 10 + contrib/unbound/util/config_file.h | 6 + contrib/unbound/util/configlexer.lex | 3 + contrib/unbound/util/configparser.y | 45 +- contrib/unbound/util/data/msgencode.c | 4 +- contrib/unbound/util/data/msgparse.c | 25 + contrib/unbound/util/data/msgparse.h | 18 + contrib/unbound/util/fptr_wlist.c | 2 + contrib/unbound/util/log.c | 2 +- contrib/unbound/util/module.c | 18 + contrib/unbound/util/module.h | 10 + contrib/unbound/util/net_help.c | 108 +- contrib/unbound/util/net_help.h | 18 + contrib/unbound/util/netevent.c | 102 +- contrib/unbound/util/proxy_protocol.c | 162 ++- contrib/unbound/util/proxy_protocol.h | 66 +- contrib/unbound/util/rfc_1982.c | 1 + contrib/unbound/util/siphash.c | 5 + contrib/unbound/validator/val_anchor.c | 21 + contrib/unbound/validator/val_anchor.h | 8 + contrib/unbound/validator/validator.c | 11 + 87 files changed, 4408 insertions(+), 780 deletions(-) diff --cc contrib/unbound/README.md index c220da030458,000000000000..3bbd38b3b78b mode 100644,000000..100644 --- a/contrib/unbound/README.md +++ b/contrib/unbound/README.md @@@ -1,40 -1,0 +1,42 @@@ +# Unbound + +[![Github Build Status](https://github.com/NLnetLabs/unbound/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/NLnetLabs/unbound/actions) +[![Packaging status](https://repology.org/badge/tiny-repos/unbound.svg)](https://repology.org/project/unbound/versions) +[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/unbound.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:unbound) +[![Documentation Status](https://readthedocs.org/projects/unbound/badge/?version=latest)](https://unbound.readthedocs.io/en/latest/?badge=latest) +[![Mastodon Follow](https://img.shields.io/mastodon/follow/109262826617293067?domain=https%3A%2F%2Ffosstodon.org&style=social)](https://fosstodon.org/@nlnetlabs) + +Unbound is a validating, recursive, caching DNS resolver. It is designed to be +fast and lean and incorporates modern features based on open standards. If you +have any feedback, we would love to hear from you. Don’t hesitate to +[create an issue on Github](https://github.com/NLnetLabs/unbound/issues/new) +or post a message on the [Unbound mailing list](https://lists.nlnetlabs.nl/mailman/listinfo/unbound-users). +You can learn more about Unbound by reading our +[documentation](https://unbound.docs.nlnetlabs.nl/). + +## Compiling + +Make sure you have the C toolchain, OpenSSL and its include files, and libexpat - installed. Unbound can be compiled and installed using: ++installed. ++If building from the repository source you also need flex and bison installed. ++Unbound can be compiled and installed using: + +``` +./configure && make && make install +``` + +You can use libevent if you want. libevent is useful when using many (10000) +outgoing ports. By default max 256 ports are opened at the same time and the +builtin alternative is equally capable and a little faster. + - Use the `--with-libevent=dir` configure option to compile Unbound with libevent ++Use the `--with-libevent` configure option to compile Unbound with libevent +support. + +## Unbound configuration + +All of Unbound's configuration options are described in the man pages, which +will be installed and are available on the Unbound +[documentation page](https://unbound.docs.nlnetlabs.nl/). + +An example configuration file is located in +[doc/example.conf](https://github.com/NLnetLabs/unbound/blob/master/doc/example.conf.in). diff --cc contrib/unbound/config.h.in~ index 000000000000,f31354d01408..f31354d01408 mode 000000,100644..100644 --- a/contrib/unbound/config.h.in~ +++ b/contrib/unbound/config.h.in~ diff --cc contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.conf index 000000000000,ff76cc37970c..ff76cc37970c mode 000000,100644..100644 --- a/contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.conf +++ b/contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.conf diff --cc contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.dsc index 000000000000,9d267436edf6..9d267436edf6 mode 000000,100644..100644 --- a/contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.dsc +++ b/contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.dsc diff --cc contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.post index 000000000000,901f01a8753d..901f01a8753d mode 000000,100644..100644 --- a/contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.post +++ b/contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.post diff --cc contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.pre index 000000000000,e59d3b8da759..e59d3b8da759 mode 000000,100644..100644 --- a/contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.pre +++ b/contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.pre diff --cc contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.servfail.testns index 000000000000,b41abb0ff629..b41abb0ff629 mode 000000,100644..100644 --- a/contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.servfail.testns +++ b/contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.servfail.testns diff --cc contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.test index 000000000000,352026844776..352026844776 mode 000000,100644..100644 --- a/contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.test +++ b/contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.test diff --cc contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.testns index 000000000000,282b224f82bd..282b224f82bd mode 000000,100644..100644 --- a/contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.testns +++ b/contrib/unbound/testdata/cachedb_no_store.tdir/cachedb_no_store.testns diff --cc contrib/unbound/testdata/disable_edns_do.rpl index 000000000000,82a16da062f1..82a16da062f1 mode 000000,100644..100644 --- a/contrib/unbound/testdata/disable_edns_do.rpl +++ b/contrib/unbound/testdata/disable_edns_do.rpl diff --cc contrib/unbound/testdata/iter_scrub_rr_length.rpl index 000000000000,2ef73c2fe152..2ef73c2fe152 mode 000000,100644..100644 --- a/contrib/unbound/testdata/iter_scrub_rr_length.rpl +++ b/contrib/unbound/testdata/iter_scrub_rr_length.rpl diff --cc contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.conf index 000000000000,befb4fbe97b3..befb4fbe97b3 mode 000000,100644..100644 --- a/contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.conf +++ b/contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.conf diff --cc contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.dsc index 000000000000,8015ac2d13ad..8015ac2d13ad mode 000000,100644..100644 --- a/contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.dsc +++ b/contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.dsc diff --cc contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.post index 000000000000,a28599fafe7a..a28599fafe7a mode 000000,100644..100644 --- a/contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.post +++ b/contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.post diff --cc contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.pre index 000000000000,fe369bb20bbb..fe369bb20bbb mode 000000,100644..100644 --- a/contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.pre +++ b/contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.pre diff --cc contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.test index 000000000000,da64ab6e9c2d..da64ab6e9c2d mode 000000,100644..100644 --- a/contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.test +++ b/contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.test diff --cc contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.testns index 000000000000,d538f2215ecf..d538f2215ecf mode 000000,100644..100644 --- a/contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.testns +++ b/contrib/unbound/testdata/root_zonemd.tdir/root_zonemd.testns diff --cc contrib/unbound/testdata/rpz_cached_cname.rpl index 000000000000,198b946310bf..198b946310bf mode 000000,100644..100644 --- a/contrib/unbound/testdata/rpz_cached_cname.rpl +++ b/contrib/unbound/testdata/rpz_cached_cname.rpl diff --cc contrib/unbound/testdata/subnet_prezero.crpl index 000000000000,22cdfffb03b3..22cdfffb03b3 mode 000000,100644..100644 --- a/contrib/unbound/testdata/subnet_prezero.crpl +++ b/contrib/unbound/testdata/subnet_prezero.crpl diff --cc contrib/unbound/testdata/val_scrub_rr_length.rpl index 000000000000,0219b918e421..0219b918e421 mode 000000,100644..100644 --- a/contrib/unbound/testdata/val_scrub_rr_length.rpl +++ b/contrib/unbound/testdata/val_scrub_rr_length.rpl diff --cc contrib/unbound/util/config_file.c index 71c6d245794f,000000000000..5d3cdfb669af mode 100644,000000..100644 --- a/contrib/unbound/util/config_file.c +++ b/contrib/unbound/util/config_file.c @@@ -1,2711 -1,0 +1,2721 @@@ +/* + * util/config_file.c - reads and stores the config file for unbound. + * + * Copyright (c) 2007, NLnet Labs. All rights reserved. + * + * This software is open source. + * + * 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 the NLNET LABS 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 + * 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. + */ + +/** + * \file + * + * This file contains functions for the config file. + */ + +#include "config.h" +#include +#include +#ifdef HAVE_TIME_H +#include +#endif +#include "util/log.h" +#include "util/configyyrename.h" +#include "util/config_file.h" +#include "configparser.h" +#include "util/net_help.h" +#include "util/data/msgparse.h" +#include "util/module.h" +#include "util/regional.h" +#include "util/fptr_wlist.h" +#include "util/data/dname.h" +#include "util/random.h" +#include "util/rtt.h" +#include "services/cache/infra.h" +#include "sldns/wire2str.h" +#include "sldns/parseutil.h" +#include "iterator/iterator.h" +#ifdef HAVE_GLOB_H +# include +#endif +#ifdef CLIENT_SUBNET +#include "edns-subnet/edns-subnet.h" +#endif +#ifdef HAVE_PWD_H +#include +#endif + +/** from cfg username, after daemonize setup performed */ +uid_t cfg_uid = (uid_t)-1; +/** from cfg username, after daemonize setup performed */ +gid_t cfg_gid = (gid_t)-1; +/** for debug allow small timeout values for fast rollovers */ +int autr_permit_small_holddown = 0; +/** size (in bytes) of stream wait buffers max */ +size_t stream_wait_max = 4 * 1024 * 1024; +size_t http2_query_buffer_max = 4 * 1024 * 1024; +size_t http2_response_buffer_max = 4 * 1024 * 1024; + +/** global config during parsing */ +struct config_parser_state* cfg_parser = 0; + +/** init ports possible for use */ +static void init_outgoing_availports(int* array, int num); + +/** init cookie with random data */ +static void init_cookie_secret(uint8_t* cookie_secret, size_t cookie_secret_len); + +struct config_file* +config_create(void) +{ + struct config_file* cfg; + cfg = (struct config_file*)calloc(1, sizeof(struct config_file)); + if(!cfg) + return NULL; + /* the defaults if no config is present */ + cfg->verbosity = 1; + cfg->stat_interval = 0; + cfg->stat_cumulative = 0; + cfg->stat_extended = 0; + cfg->stat_inhibit_zero = 1; + cfg->num_threads = 1; + cfg->port = UNBOUND_DNS_PORT; + cfg->do_ip4 = 1; + cfg->do_ip6 = 1; + cfg->do_udp = 1; + cfg->do_tcp = 1; + cfg->tcp_reuse_timeout = 60 * 1000; /* 60s in milisecs */ + cfg->max_reuse_tcp_queries = 200; + cfg->tcp_upstream = 0; + cfg->udp_upstream_without_downstream = 0; + cfg->tcp_mss = 0; + cfg->outgoing_tcp_mss = 0; + cfg->tcp_idle_timeout = 30 * 1000; /* 30s in millisecs */ + cfg->tcp_auth_query_timeout = 3 * 1000; /* 3s in millisecs */ + cfg->do_tcp_keepalive = 0; + cfg->tcp_keepalive_timeout = 120 * 1000; /* 120s in millisecs */ + cfg->sock_queue_timeout = 0; /* do not check timeout */ + cfg->ssl_service_key = NULL; + cfg->ssl_service_pem = NULL; + cfg->ssl_port = UNBOUND_DNS_OVER_TLS_PORT; + cfg->ssl_upstream = 0; + cfg->tls_cert_bundle = NULL; + cfg->tls_win_cert = 0; + cfg->tls_use_sni = 1; + cfg->https_port = UNBOUND_DNS_OVER_HTTPS_PORT; + if(!(cfg->http_endpoint = strdup("/dns-query"))) goto error_exit; + cfg->http_max_streams = 100; + cfg->http_query_buffer_size = 4*1024*1024; + cfg->http_response_buffer_size = 4*1024*1024; + cfg->http_nodelay = 1; + cfg->use_syslog = 1; + cfg->log_identity = NULL; /* changed later with argv[0] */ + cfg->log_time_ascii = 0; + cfg->log_queries = 0; + cfg->log_replies = 0; + cfg->log_tag_queryreply = 0; + cfg->log_local_actions = 0; + cfg->log_servfail = 0; +#ifndef USE_WINSOCK +# ifdef USE_MINI_EVENT + /* select max 1024 sockets */ + cfg->outgoing_num_ports = 960; + cfg->num_queries_per_thread = 512; +# else + /* libevent can use many sockets */ + cfg->outgoing_num_ports = 4096; + cfg->num_queries_per_thread = 1024; +# endif + cfg->outgoing_num_tcp = 10; + cfg->incoming_num_tcp = 10; +#else + cfg->outgoing_num_ports = 48; /* windows is limited in num fds */ + cfg->num_queries_per_thread = 24; + cfg->outgoing_num_tcp = 2; /* leaves 64-52=12 for: 4if,1stop,thread4 */ + cfg->incoming_num_tcp = 2; +#endif + cfg->stream_wait_size = 4 * 1024 * 1024; + cfg->edns_buffer_size = 1232; /* from DNS flagday recommendation */ + cfg->msg_buffer_size = 65552; /* 64 k + a small margin */ + cfg->msg_cache_size = 4 * 1024 * 1024; + cfg->msg_cache_slabs = 4; + cfg->jostle_time = 200; + cfg->rrset_cache_size = 4 * 1024 * 1024; + cfg->rrset_cache_slabs = 4; + cfg->host_ttl = 900; + cfg->bogus_ttl = 60; + cfg->min_ttl = 0; + cfg->max_ttl = 3600 * 24; + cfg->max_negative_ttl = 3600; + cfg->prefetch = 0; + cfg->prefetch_key = 0; + cfg->deny_any = 0; + cfg->infra_cache_slabs = 4; + cfg->infra_cache_numhosts = 10000; + cfg->infra_cache_min_rtt = 50; + cfg->infra_cache_max_rtt = 120000; + cfg->infra_keep_probing = 0; + cfg->delay_close = 0; + cfg->udp_connect = 1; + if(!(cfg->outgoing_avail_ports = (int*)calloc(65536, sizeof(int)))) + goto error_exit; + init_outgoing_availports(cfg->outgoing_avail_ports, 65536); + if(!(cfg->username = strdup(UB_USERNAME))) goto error_exit; +#ifdef HAVE_CHROOT + if(!(cfg->chrootdir = strdup(CHROOT_DIR))) goto error_exit; +#endif + if(!(cfg->directory = strdup(RUN_DIR))) goto error_exit; + if(!(cfg->logfile = strdup(""))) goto error_exit; + if(!(cfg->pidfile = strdup(PIDFILE))) goto error_exit; + if(!(cfg->target_fetch_policy = strdup("3 2 1 0 0"))) goto error_exit; + cfg->fast_server_permil = 0; + cfg->fast_server_num = 3; + cfg->donotqueryaddrs = NULL; + cfg->donotquery_localhost = 1; + cfg->root_hints = NULL; + cfg->use_systemd = 0; + cfg->do_daemonize = 1; + cfg->if_automatic = 0; + cfg->if_automatic_ports = NULL; + cfg->so_rcvbuf = 0; + cfg->so_sndbuf = 0; + cfg->so_reuseport = REUSEPORT_DEFAULT; + cfg->ip_transparent = 0; + cfg->ip_freebind = 0; + cfg->ip_dscp = 0; + cfg->num_ifs = 0; + cfg->ifs = NULL; + cfg->num_out_ifs = 0; + cfg->out_ifs = NULL; + cfg->stubs = NULL; + cfg->forwards = NULL; + cfg->auths = NULL; +#ifdef CLIENT_SUBNET + cfg->client_subnet = NULL; + cfg->client_subnet_zone = NULL; + cfg->client_subnet_opcode = LDNS_EDNS_CLIENT_SUBNET; + cfg->client_subnet_always_forward = 0; + cfg->max_client_subnet_ipv4 = 24; + cfg->max_client_subnet_ipv6 = 56; + cfg->min_client_subnet_ipv4 = 0; + cfg->min_client_subnet_ipv6 = 0; + cfg->max_ecs_tree_size_ipv4 = 100; + cfg->max_ecs_tree_size_ipv6 = 100; +#endif + cfg->views = NULL; + cfg->acls = NULL; + cfg->tcp_connection_limits = NULL; + cfg->harden_short_bufsize = 1; + cfg->harden_large_queries = 0; + cfg->harden_glue = 1; + cfg->harden_dnssec_stripped = 1; + cfg->harden_below_nxdomain = 1; + cfg->harden_referral_path = 0; + cfg->harden_algo_downgrade = 0; + cfg->harden_unknown_additional = 0; + cfg->use_caps_bits_for_id = 0; + cfg->caps_whitelist = NULL; + cfg->private_address = NULL; + cfg->private_domain = NULL; + cfg->unwanted_threshold = 0; + cfg->hide_identity = 0; + cfg->hide_version = 0; + cfg->hide_trustanchor = 0; + cfg->hide_http_user_agent = 0; + cfg->identity = NULL; + cfg->version = NULL; + cfg->http_user_agent = NULL; + cfg->nsid_cfg_str = NULL; + cfg->nsid = NULL; + cfg->nsid_len = 0; + cfg->auto_trust_anchor_file_list = NULL; + cfg->trust_anchor_file_list = NULL; + cfg->trust_anchor_list = NULL; + cfg->trusted_keys_file_list = NULL; + cfg->trust_anchor_signaling = 1; + cfg->root_key_sentinel = 1; + cfg->domain_insecure = NULL; + cfg->val_date_override = 0; + cfg->val_sig_skew_min = 3600; /* at least daylight savings trouble */ + cfg->val_sig_skew_max = 86400; /* at most timezone settings trouble */ + cfg->val_max_restart = 5; + cfg->val_clean_additional = 1; + cfg->val_log_level = 0; + cfg->val_log_squelch = 0; + cfg->val_permissive_mode = 0; + cfg->aggressive_nsec = 1; + cfg->ignore_cd = 0; ++ cfg->disable_edns_do = 0; + cfg->serve_expired = 0; + cfg->serve_expired_ttl = 0; + cfg->serve_expired_ttl_reset = 0; + cfg->serve_expired_reply_ttl = 30; + cfg->serve_expired_client_timeout = 0; + cfg->ede_serve_expired = 0; + cfg->serve_original_ttl = 0; + cfg->zonemd_permissive_mode = 0; + cfg->add_holddown = 30*24*3600; + cfg->del_holddown = 30*24*3600; + cfg->keep_missing = 366*24*3600; /* one year plus a little leeway */ + cfg->permit_small_holddown = 0; + cfg->key_cache_size = 4 * 1024 * 1024; + cfg->key_cache_slabs = 4; + cfg->neg_cache_size = 1 * 1024 * 1024; + cfg->local_zones = NULL; + cfg->local_zones_nodefault = NULL; +#ifdef USE_IPSET + cfg->local_zones_ipset = NULL; +#endif + cfg->local_zones_disable_default = 0; + cfg->local_data = NULL; + cfg->local_zone_overrides = NULL; + cfg->unblock_lan_zones = 0; + cfg->insecure_lan_zones = 0; + cfg->python_script = NULL; + cfg->dynlib_file = NULL; + cfg->remote_control_enable = 0; + cfg->control_ifs.first = NULL; + cfg->control_ifs.last = NULL; + cfg->control_port = UNBOUND_CONTROL_PORT; + cfg->control_use_cert = 1; + cfg->minimal_responses = 1; + cfg->rrset_roundrobin = 1; + cfg->unknown_server_time_limit = 376; + cfg->max_udp_size = 1232; /* value taken from edns_buffer_size */ + if(!(cfg->server_key_file = strdup(RUN_DIR"/unbound_server.key"))) + goto error_exit; + if(!(cfg->server_cert_file = strdup(RUN_DIR"/unbound_server.pem"))) + goto error_exit; + if(!(cfg->control_key_file = strdup(RUN_DIR"/unbound_control.key"))) + goto error_exit; + if(!(cfg->control_cert_file = strdup(RUN_DIR"/unbound_control.pem"))) + goto error_exit; + +#ifdef CLIENT_SUBNET + if(!(cfg->module_conf = strdup("subnetcache validator iterator"))) goto error_exit; +#else + if(!(cfg->module_conf = strdup("validator iterator"))) goto error_exit; +#endif + if(!(cfg->val_nsec3_key_iterations = + strdup("1024 150 2048 150 4096 150"))) goto error_exit; +#if defined(DNSTAP_SOCKET_PATH) + if(!(cfg->dnstap_socket_path = strdup(DNSTAP_SOCKET_PATH))) + goto error_exit; +#endif + cfg->dnstap_bidirectional = 1; + cfg->dnstap_tls = 1; + cfg->disable_dnssec_lame_check = 0; + cfg->ip_ratelimit_cookie = 0; + cfg->ip_ratelimit = 0; + cfg->ratelimit = 0; + cfg->ip_ratelimit_slabs = 4; + cfg->ratelimit_slabs = 4; + cfg->ip_ratelimit_size = 4*1024*1024; + cfg->ratelimit_size = 4*1024*1024; + cfg->ratelimit_for_domain = NULL; + cfg->ratelimit_below_domain = NULL; + cfg->ip_ratelimit_factor = 10; + cfg->ratelimit_factor = 10; + cfg->ip_ratelimit_backoff = 0; + cfg->ratelimit_backoff = 0; + cfg->outbound_msg_retry = 5; + cfg->max_sent_count = 32; + cfg->max_query_restarts = 11; + cfg->qname_minimisation = 1; + cfg->qname_minimisation_strict = 0; + cfg->shm_enable = 0; + cfg->shm_key = 11777; + cfg->edns_client_strings = NULL; + cfg->edns_client_string_opcode = 65001; + cfg->dnscrypt = 0; + cfg->dnscrypt_port = 0; + cfg->dnscrypt_provider = NULL; + cfg->dnscrypt_provider_cert = NULL; + cfg->dnscrypt_provider_cert_rotated = NULL; + cfg->dnscrypt_secret_key = NULL; + cfg->dnscrypt_shared_secret_cache_size = 4*1024*1024; + cfg->dnscrypt_shared_secret_cache_slabs = 4; + cfg->dnscrypt_nonce_cache_size = 4*1024*1024; + cfg->dnscrypt_nonce_cache_slabs = 4; + cfg->pad_responses = 1; + cfg->pad_responses_block_size = 468; /* from RFC8467 */ + cfg->pad_queries = 1; + cfg->pad_queries_block_size = 128; /* from RFC8467 */ +#ifdef USE_IPSECMOD + cfg->ipsecmod_enabled = 1; + cfg->ipsecmod_ignore_bogus = 0; + cfg->ipsecmod_hook = NULL; + cfg->ipsecmod_max_ttl = 3600; + cfg->ipsecmod_whitelist = NULL; + cfg->ipsecmod_strict = 0; +#endif + cfg->do_answer_cookie = 0; + memset(cfg->cookie_secret, 0, sizeof(cfg->cookie_secret)); + cfg->cookie_secret_len = 16; + init_cookie_secret(cfg->cookie_secret, cfg->cookie_secret_len); +#ifdef USE_CACHEDB + if(!(cfg->cachedb_backend = strdup("testframe"))) goto error_exit; + if(!(cfg->cachedb_secret = strdup("default"))) goto error_exit; ++ cfg->cachedb_no_store = 0; +#ifdef USE_REDIS + if(!(cfg->redis_server_host = strdup("127.0.0.1"))) goto error_exit; + cfg->redis_server_path = NULL; + cfg->redis_server_password = NULL; + cfg->redis_timeout = 100; + cfg->redis_server_port = 6379; + cfg->redis_expire_records = 0; ++ cfg->redis_logical_db = 0; +#endif /* USE_REDIS */ +#endif /* USE_CACHEDB */ +#ifdef USE_IPSET + cfg->ipset_name_v4 = NULL; + cfg->ipset_name_v6 = NULL; +#endif + cfg->ede = 0; + return cfg; +error_exit: + config_delete(cfg); + return NULL; +} + +struct config_file* config_create_forlib(void) +{ + struct config_file* cfg = config_create(); + if(!cfg) return NULL; + /* modifications for library use, less verbose, less memory */ + free(cfg->chrootdir); + cfg->chrootdir = NULL; + cfg->verbosity = 0; + cfg->outgoing_num_ports = 16; /* in library use, this is 'reasonable' + and probably within the ulimit(maxfds) of the user */ + cfg->outgoing_num_tcp = 2; + cfg->msg_cache_size = 1024*1024; + cfg->msg_cache_slabs = 1; + cfg->rrset_cache_size = 1024*1024; + cfg->rrset_cache_slabs = 1; + cfg->infra_cache_slabs = 1; + cfg->use_syslog = 0; + cfg->key_cache_size = 1024*1024; + cfg->key_cache_slabs = 1; + cfg->neg_cache_size = 100 * 1024; + cfg->donotquery_localhost = 0; /* allow, so that you can ask a + forward nameserver running on localhost */ + cfg->val_log_level = 2; /* to fill why_bogus with */ + cfg->val_log_squelch = 1; + cfg->minimal_responses = 0; + cfg->harden_short_bufsize = 1; + return cfg; +} + +/** check that the value passed is >= 0 */ +#define IS_NUMBER_OR_ZERO \ + if(atoi(val) == 0 && strcmp(val, "0") != 0) return 0 +/** check that the value passed is > 0 */ +#define IS_NONZERO_NUMBER \ + if(atoi(val) == 0) return 0 +/** check that the value passed is not 0 and a power of 2 */ +#define IS_POW2_NUMBER \ + if(atoi(val) == 0 || !is_pow2((size_t)atoi(val))) return 0 +/** check that the value passed is yes or no */ +#define IS_YES_OR_NO \ + if(strcmp(val, "yes") != 0 && strcmp(val, "no") != 0) return 0 +/** put integer_or_zero into variable */ +#define S_NUMBER_OR_ZERO(str, var) if(strcmp(opt, str) == 0) \ + { IS_NUMBER_OR_ZERO; cfg->var = atoi(val); } +/** put integer_nonzero into variable */ +#define S_NUMBER_NONZERO(str, var) if(strcmp(opt, str) == 0) \ + { IS_NONZERO_NUMBER; cfg->var = atoi(val); } +/** put integer_or_zero into unsigned */ +#define S_UNSIGNED_OR_ZERO(str, var) if(strcmp(opt, str) == 0) \ + { IS_NUMBER_OR_ZERO; cfg->var = (unsigned)atoi(val); } +/** put integer_or_zero into size_t */ +#define S_SIZET_OR_ZERO(str, var) if(strcmp(opt, str) == 0) \ + { IS_NUMBER_OR_ZERO; cfg->var = (size_t)atoi(val); } +/** put integer_nonzero into size_t */ +#define S_SIZET_NONZERO(str, var) if(strcmp(opt, str) == 0) \ + { IS_NONZERO_NUMBER; cfg->var = (size_t)atoi(val); } +/** put yesno into variable */ +#define S_YNO(str, var) if(strcmp(opt, str) == 0) \ + { IS_YES_OR_NO; cfg->var = (strcmp(val, "yes") == 0); } +/** put memsize into variable */ +#define S_MEMSIZE(str, var) if(strcmp(opt, str)==0) \ + { return cfg_parse_memsize(val, &cfg->var); } +/** put pow2 number into variable */ +#define S_POW2(str, var) if(strcmp(opt, str)==0) \ + { IS_POW2_NUMBER; cfg->var = (size_t)atoi(val); } +/** put string into variable */ +#define S_STR(str, var) if(strcmp(opt, str)==0) \ + { free(cfg->var); return (cfg->var = strdup(val)) != NULL; } +/** put string into strlist */ +#define S_STRLIST(str, var) if(strcmp(opt, str)==0) \ + { return cfg_strlist_insert(&cfg->var, strdup(val)); } +/** put string into strlist if not present yet*/ +#define S_STRLIST_UNIQ(str, var) if(strcmp(opt, str)==0) \ + { if(cfg_strlist_find(cfg->var, val)) { return 0;} \ + return cfg_strlist_insert(&cfg->var, strdup(val)); } +/** append string to strlist */ +#define S_STRLIST_APPEND(str, var) if(strcmp(opt, str)==0) \ + { return cfg_strlist_append(&cfg->var, strdup(val)); } + +int config_set_option(struct config_file* cfg, const char* opt, + const char* val) +{ + char buf[64]; + if(!opt) return 0; + if(opt[strlen(opt)-1] != ':' && strlen(opt)+2stat_interval = 0; + else if(atoi(val) == 0) + return 0; + else cfg->stat_interval = atoi(val); + } else if(strcmp(opt, "num-threads:") == 0) { + /* not supported, library must have 1 thread in bgworker */ + return 0; + } else if(strcmp(opt, "outgoing-port-permit:") == 0) { + return cfg_mark_ports(val, 1, + cfg->outgoing_avail_ports, 65536); + } else if(strcmp(opt, "outgoing-port-avoid:") == 0) { + return cfg_mark_ports(val, 0, + cfg->outgoing_avail_ports, 65536); + } else if(strcmp(opt, "local-zone:") == 0) { + return cfg_parse_local_zone(cfg, val); + } else if(strcmp(opt, "val-override-date:") == 0) { + if(strcmp(val, "") == 0 || strcmp(val, "0") == 0) { + cfg->val_date_override = 0; + } else if(strlen(val) == 14) { + cfg->val_date_override = cfg_convert_timeval(val); + return cfg->val_date_override != 0; + } else { + if(atoi(val) == 0) return 0; + cfg->val_date_override = (uint32_t)atoi(val); + } + } else if(strcmp(opt, "local-data-ptr:") == 0) { + char* ptr = cfg_ptr_reverse((char*)opt); + return cfg_strlist_insert(&cfg->local_data, ptr); + } else if(strcmp(opt, "logfile:") == 0) { + cfg->use_syslog = 0; + free(cfg->logfile); + return (cfg->logfile = strdup(val)) != NULL; + } + else if(strcmp(opt, "log-time-ascii:") == 0) + { IS_YES_OR_NO; cfg->log_time_ascii = (strcmp(val, "yes") == 0); + log_set_time_asc(cfg->log_time_ascii); } + else S_SIZET_NONZERO("max-udp-size:", max_udp_size) + else S_YNO("use-syslog:", use_syslog) + else S_STR("log-identity:", log_identity) + else S_YNO("extended-statistics:", stat_extended) + else S_YNO("statistics-inhibit-zero:", stat_inhibit_zero) + else S_YNO("statistics-cumulative:", stat_cumulative) + else S_YNO("shm-enable:", shm_enable) + else S_NUMBER_OR_ZERO("shm-key:", shm_key) + else S_YNO("do-ip4:", do_ip4) + else S_YNO("do-ip6:", do_ip6) + else S_YNO("do-udp:", do_udp) + else S_YNO("do-tcp:", do_tcp) + else S_YNO("prefer-ip4:", prefer_ip4) + else S_YNO("prefer-ip6:", prefer_ip6) + else S_YNO("tcp-upstream:", tcp_upstream) + else S_YNO("udp-upstream-without-downstream:", + udp_upstream_without_downstream) + else S_NUMBER_NONZERO("tcp-mss:", tcp_mss) + else S_NUMBER_NONZERO("outgoing-tcp-mss:", outgoing_tcp_mss) + else S_NUMBER_NONZERO("tcp-auth-query-timeout:", tcp_auth_query_timeout) + else S_NUMBER_NONZERO("tcp-idle-timeout:", tcp_idle_timeout) + else S_NUMBER_NONZERO("max-reuse-tcp-queries:", max_reuse_tcp_queries) + else S_NUMBER_NONZERO("tcp-reuse-timeout:", tcp_reuse_timeout) + else S_YNO("edns-tcp-keepalive:", do_tcp_keepalive) + else S_NUMBER_NONZERO("edns-tcp-keepalive-timeout:", tcp_keepalive_timeout) + else S_NUMBER_OR_ZERO("sock-queue-timeout:", sock_queue_timeout) + else S_YNO("ssl-upstream:", ssl_upstream) + else S_YNO("tls-upstream:", ssl_upstream) + else S_STR("ssl-service-key:", ssl_service_key) + else S_STR("tls-service-key:", ssl_service_key) + else S_STR("ssl-service-pem:", ssl_service_pem) + else S_STR("tls-service-pem:", ssl_service_pem) + else S_NUMBER_NONZERO("ssl-port:", ssl_port) + else S_NUMBER_NONZERO("tls-port:", ssl_port) + else S_STR("ssl-cert-bundle:", tls_cert_bundle) + else S_STR("tls-cert-bundle:", tls_cert_bundle) + else S_YNO("tls-win-cert:", tls_win_cert) + else S_YNO("tls-system-cert:", tls_win_cert) + else S_STRLIST("additional-ssl-port:", tls_additional_port) + else S_STRLIST("additional-tls-port:", tls_additional_port) + else S_STRLIST("tls-additional-ports:", tls_additional_port) + else S_STRLIST("tls-additional-port:", tls_additional_port) + else S_STRLIST_APPEND("tls-session-ticket-keys:", tls_session_ticket_keys) + else S_STR("tls-ciphers:", tls_ciphers) + else S_STR("tls-ciphersuites:", tls_ciphersuites) + else S_YNO("tls-use-sni:", tls_use_sni) + else S_NUMBER_NONZERO("https-port:", https_port) + else S_STR("http-endpoint:", http_endpoint) + else S_NUMBER_NONZERO("http-max-streams:", http_max_streams) + else S_MEMSIZE("http-query-buffer-size:", http_query_buffer_size) + else S_MEMSIZE("http-response-buffer-size:", http_response_buffer_size) + else S_YNO("http-nodelay:", http_nodelay) + else S_YNO("http-notls-downstream:", http_notls_downstream) + else S_YNO("interface-automatic:", if_automatic) + else S_STR("interface-automatic-ports:", if_automatic_ports) + else S_YNO("use-systemd:", use_systemd) + else S_YNO("do-daemonize:", do_daemonize) + else S_NUMBER_NONZERO("port:", port) + else S_NUMBER_NONZERO("outgoing-range:", outgoing_num_ports) + else S_SIZET_OR_ZERO("outgoing-num-tcp:", outgoing_num_tcp) + else S_SIZET_OR_ZERO("incoming-num-tcp:", incoming_num_tcp) + else S_MEMSIZE("stream-wait-size:", stream_wait_size) + else S_SIZET_NONZERO("edns-buffer-size:", edns_buffer_size) + else S_SIZET_NONZERO("msg-buffer-size:", msg_buffer_size) + else S_MEMSIZE("msg-cache-size:", msg_cache_size) + else S_POW2("msg-cache-slabs:", msg_cache_slabs) + else S_SIZET_NONZERO("num-queries-per-thread:",num_queries_per_thread) + else S_SIZET_OR_ZERO("jostle-timeout:", jostle_time) + else S_MEMSIZE("so-rcvbuf:", so_rcvbuf) + else S_MEMSIZE("so-sndbuf:", so_sndbuf) + else S_YNO("so-reuseport:", so_reuseport) + else S_YNO("ip-transparent:", ip_transparent) + else S_YNO("ip-freebind:", ip_freebind) + else S_NUMBER_OR_ZERO("ip-dscp:", ip_dscp) + else S_MEMSIZE("rrset-cache-size:", rrset_cache_size) + else S_POW2("rrset-cache-slabs:", rrset_cache_slabs) + else S_YNO("prefetch:", prefetch) + else S_YNO("prefetch-key:", prefetch_key) + else S_YNO("deny-any:", deny_any) + else if(strcmp(opt, "cache-max-ttl:") == 0) + { IS_NUMBER_OR_ZERO; cfg->max_ttl = atoi(val); MAX_TTL=(time_t)cfg->max_ttl;} + else if(strcmp(opt, "cache-max-negative-ttl:") == 0) + { IS_NUMBER_OR_ZERO; cfg->max_negative_ttl = atoi(val); MAX_NEG_TTL=(time_t)cfg->max_negative_ttl;} + else if(strcmp(opt, "cache-min-ttl:") == 0) + { IS_NUMBER_OR_ZERO; cfg->min_ttl = atoi(val); MIN_TTL=(time_t)cfg->min_ttl;} + else if(strcmp(opt, "infra-cache-min-rtt:") == 0) { + IS_NUMBER_OR_ZERO; cfg->infra_cache_min_rtt = atoi(val); + RTT_MIN_TIMEOUT=cfg->infra_cache_min_rtt; + } + else if(strcmp(opt, "infra-cache-max-rtt:") == 0) { + IS_NUMBER_OR_ZERO; cfg->infra_cache_max_rtt = atoi(val); + RTT_MAX_TIMEOUT=cfg->infra_cache_max_rtt; + USEFUL_SERVER_TOP_TIMEOUT = RTT_MAX_TIMEOUT; + BLACKLIST_PENALTY = USEFUL_SERVER_TOP_TIMEOUT*4; + } + else S_YNO("infra-keep-probing:", infra_keep_probing) + else S_NUMBER_OR_ZERO("infra-host-ttl:", host_ttl) + else S_POW2("infra-cache-slabs:", infra_cache_slabs) + else S_SIZET_NONZERO("infra-cache-numhosts:", infra_cache_numhosts) + else S_NUMBER_OR_ZERO("delay-close:", delay_close) + else S_YNO("udp-connect:", udp_connect) + else S_STR("chroot:", chrootdir) + else S_STR("username:", username) + else S_STR("directory:", directory) + else S_STR("pidfile:", pidfile) + else S_YNO("hide-identity:", hide_identity) + else S_YNO("hide-version:", hide_version) + else S_YNO("hide-trustanchor:", hide_trustanchor) + else S_YNO("hide-http-user-agent:", hide_http_user_agent) + else S_STR("identity:", identity) + else S_STR("version:", version) + else S_STR("http-user-agent:", http_user_agent) + else if(strcmp(opt, "nsid:") == 0) { + free(cfg->nsid_cfg_str); + if (!(cfg->nsid_cfg_str = strdup(val))) + return 0; + /* Empty string is just validly unsetting nsid */ + if (*val == 0) { + free(cfg->nsid); + cfg->nsid = NULL; + cfg->nsid_len = 0; + return 1; + } + cfg->nsid = cfg_parse_nsid(val, &cfg->nsid_len); + return cfg->nsid != NULL; + } + else S_STRLIST("root-hints:", root_hints) + else S_STR("target-fetch-policy:", target_fetch_policy) + else S_YNO("harden-glue:", harden_glue) + else S_YNO("harden-short-bufsize:", harden_short_bufsize) + else S_YNO("harden-large-queries:", harden_large_queries) + else S_YNO("harden-dnssec-stripped:", harden_dnssec_stripped) + else S_YNO("harden-below-nxdomain:", harden_below_nxdomain) + else S_YNO("harden-referral-path:", harden_referral_path) + else S_YNO("harden-algo-downgrade:", harden_algo_downgrade) + else S_YNO("harden-unknown-additional:", harden_unknown_additional) + else S_YNO("use-caps-for-id:", use_caps_bits_for_id) + else S_STRLIST("caps-whitelist:", caps_whitelist) + else S_SIZET_OR_ZERO("unwanted-reply-threshold:", unwanted_threshold) + else S_STRLIST("private-address:", private_address) + else S_STRLIST("private-domain:", private_domain) + else S_YNO("do-not-query-localhost:", donotquery_localhost) + else S_STRLIST("do-not-query-address:", donotqueryaddrs) + else S_STRLIST("auto-trust-anchor-file:", auto_trust_anchor_file_list) + else S_STRLIST("trust-anchor-file:", trust_anchor_file_list) + else S_STRLIST("trust-anchor:", trust_anchor_list) + else S_STRLIST("trusted-keys-file:", trusted_keys_file_list) + else S_YNO("trust-anchor-signaling:", trust_anchor_signaling) + else S_YNO("root-key-sentinel:", root_key_sentinel) + else S_STRLIST("domain-insecure:", domain_insecure) + else S_NUMBER_OR_ZERO("val-bogus-ttl:", bogus_ttl) + else S_YNO("val-clean-additional:", val_clean_additional) + else S_NUMBER_OR_ZERO("val-log-level:", val_log_level) + else S_YNO("val-log-squelch:", val_log_squelch) + else S_YNO("log-queries:", log_queries) + else S_YNO("log-replies:", log_replies) + else S_YNO("log-tag-queryreply:", log_tag_queryreply) + else S_YNO("log-local-actions:", log_local_actions) + else S_YNO("log-servfail:", log_servfail) + else S_YNO("val-permissive-mode:", val_permissive_mode) + else S_YNO("aggressive-nsec:", aggressive_nsec) + else S_YNO("ignore-cd-flag:", ignore_cd) ++ else S_YNO("disable-edns-do:", disable_edns_do) + else if(strcmp(opt, "serve-expired:") == 0) + { IS_YES_OR_NO; cfg->serve_expired = (strcmp(val, "yes") == 0); + SERVE_EXPIRED = cfg->serve_expired; } + else if(strcmp(opt, "serve-expired-ttl:") == 0) + { IS_NUMBER_OR_ZERO; cfg->serve_expired_ttl = atoi(val); SERVE_EXPIRED_TTL=(time_t)cfg->serve_expired_ttl;} + else S_YNO("serve-expired-ttl-reset:", serve_expired_ttl_reset) + else if(strcmp(opt, "serve-expired-reply-ttl:") == 0) + { IS_NUMBER_OR_ZERO; cfg->serve_expired_reply_ttl = atoi(val); SERVE_EXPIRED_REPLY_TTL=(time_t)cfg->serve_expired_reply_ttl;} + else S_NUMBER_OR_ZERO("serve-expired-client-timeout:", serve_expired_client_timeout) + else S_YNO("ede:", ede) + else S_YNO("ede-serve-expired:", ede_serve_expired) + else S_YNO("serve-original-ttl:", serve_original_ttl) + else S_STR("val-nsec3-keysize-iterations:", val_nsec3_key_iterations) + else S_YNO("zonemd-permissive-mode:", zonemd_permissive_mode) + else S_UNSIGNED_OR_ZERO("add-holddown:", add_holddown) + else S_UNSIGNED_OR_ZERO("del-holddown:", del_holddown) + else S_UNSIGNED_OR_ZERO("keep-missing:", keep_missing) + else if(strcmp(opt, "permit-small-holddown:") == 0) + { IS_YES_OR_NO; cfg->permit_small_holddown = (strcmp(val, "yes") == 0); + autr_permit_small_holddown = cfg->permit_small_holddown; } + else S_MEMSIZE("key-cache-size:", key_cache_size) + else S_POW2("key-cache-slabs:", key_cache_slabs) + else S_MEMSIZE("neg-cache-size:", neg_cache_size) + else S_YNO("minimal-responses:", minimal_responses) + else S_YNO("rrset-roundrobin:", rrset_roundrobin) + else S_NUMBER_OR_ZERO("unknown-server-time-limit:", unknown_server_time_limit) + else S_STRLIST("local-data:", local_data) + else S_YNO("unblock-lan-zones:", unblock_lan_zones) + else S_YNO("insecure-lan-zones:", insecure_lan_zones) + else S_YNO("control-enable:", remote_control_enable) + else S_STRLIST_APPEND("control-interface:", control_ifs) *** 1994 LINES SKIPPED *** From nobody Mon Nov 13 21:58:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STjxG20bhz50rQG; Mon, 13 Nov 2023 21:58: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 4STjxG1YpVz3VCj; Mon, 13 Nov 2023 21:58:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699912722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xDY+v2qar3h7yuUDPvC/KwK5S2T8xj4x3CR9PLWhfVE=; b=L4mQu1pGUlteCgQ+IuRuq/sUUC1vzoUiL0h4jJjfKUCxbvJTOwTqH2TTDpH3F9ZWmuloof TWxVWBG03I6GQ5lDn3nodHexYTxAx5ZAw9OSCZ6QAat6aXJyY9l2VZYDzMsuCVRB3OGoG1 WM8cqc0YgYknI/h9zSvgiP0xLM+R/L8tCB31FcqX1GwkGH9GPg0oNJ4A1BrxF7PcvZpUMG tNICBQpn0GLRG0mJxbAilqpozx7uT5TY3J5RBcGOMRj5UcEwxFl/DLl7OvP8C0P0Jm3nnm BSyUlwwRiLPv1OWDMUaf0Dz/hEtUxrgvaIvnRTMKGjs1R8F2Am7+UcLMsZLRzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699912722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xDY+v2qar3h7yuUDPvC/KwK5S2T8xj4x3CR9PLWhfVE=; b=fW/LId4T1gPemqaBHCwKD2L7/By58YQ8zYvi3M5huFWMil7X2JftiL4VuAwFVCAcDllVN7 OgEC+VT2bKIjFi406BJSgw3Serp2fdTOyRAWCF5lfDix94PELDKbJz6trgak8JCwOm5xRu P94jWyN9MXOcQxI5pOorvW8M3aN1Z7cZwiFjANVJI7yDJP3BfvBYhCE4W6c4HNO7fDBKZn gWDYKGrGPPqYUu75dhSgUxasdRXXQX1LALQvEh/1zOZHeTY3LYRojM+kcJY4a002QPaJGK 0sr/fELwl7Dl+sL9c2JxM/XN0M//gRRsKt+c8L2EiOJk0ZLU26vxv7kpC18kZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699912722; a=rsa-sha256; cv=none; b=SEBHPqW8IxSHiGND/kFlHzTO3gWTzwUCShGKWjk+XLayO0vge/ciBr08iWjpgA8u1AF0+D F9rtIODpmrcO3mkBWj+w0TE5PpsFZ/r8T4vX4EuPM1P0TiFLPcqysZ/UkqYj1gCvx1beh6 X14wroQ5PQBvQL3QOxwDKYGeM6x4egpHXt4vefa4mg1t+bZxUfXhDB5eBJ3nXLrzGzku0x M0KnNDovEvL0I0E3acyDHzBvB+QchTAZTEznVScpXPTLh2R9ksahqsBCYb+iEXslwY4Wjq 0RlQt6owxl8e9tsCecVwAtLnH+CtdDMIgNNZMXC2oW4srPE0GV2b/oB/HtGPqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STjxG0dRsz7j4; Mon, 13 Nov 2023 21:58: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 3ADLwfqr012597; Mon, 13 Nov 2023 21:58:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADLwfJ6012594; Mon, 13 Nov 2023 21:58:41 GMT (envelope-from git) Date: Mon, 13 Nov 2023 21:58:41 GMT Message-Id: <202311132158.3ADLwfJ6012594@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 20ae9946c33f - stable/13 - procctl.2: improve phrasing for ASLR disable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 20ae9946c33f7d71c6d08c0a69d758a5db3ccad3 Auto-Submitted: auto-generated The branch stable/13 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=20ae9946c33f7d71c6d08c0a69d758a5db3ccad3 commit 20ae9946c33f7d71c6d08c0a69d758a5db3ccad3 Author: Brooks Davis AuthorDate: 2023-10-26 17:38:14 +0000 Commit: Brooks Davis CommitDate: 2023-11-13 21:53:19 +0000 procctl.2: improve phrasing for ASLR disable Reported by: jrtc27 Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D42364 (cherry picked from commit 4894205482555447c6b3372598c7589a66596724) --- lib/libc/sys/procctl.2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc/sys/procctl.2 b/lib/libc/sys/procctl.2 index 291a85a05fb4..f6af85a873f6 100644 --- a/lib/libc/sys/procctl.2 +++ b/lib/libc/sys/procctl.2 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 15, 2023 +.Dd October 26, 2023 .Dt PROCCTL 2 .Os .Sh NAME @@ -85,8 +85,8 @@ Controls the Address Space Layout Randomization (ASLR) in the program images created by .Xr execve 2 -in the specified process or its descendants that did not changed -the control nor modified it by other means. +in the specified process or its descendants that do not either change +the control or modify it by other means. The .Fa data parameter must point to the integer variable holding one of the following From nobody Mon Nov 13 21:58:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STjxH3Ldmz50rKs; Mon, 13 Nov 2023 21: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 4STjxH2Tbbz3V9r; Mon, 13 Nov 2023 21: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=1699912723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WQxQ8QAICvhX8buCa3FufPe46+gdzguuIbrBU4xoI7A=; b=J0ekRi0Lljyr654O8wC15mJa3HgG4U7Be9+n3ibq8Z+nKTJDGlXx7VP+VXtKbofzpvho2V +Kd57ZUj3f12JX1DUkPlR4DQRs5ywJv97g6XWCdx8F8uisZ3uM/HeqNTc14xjgJ8ir9IdM KuwkWmodzLJx77x7n7xFLTATxeCjQWIEs5LRWKiBe8lbZDvWC1acnA2l82s6uGxAyd3STC ciPU81kK8M6H3UOxkvCimLlqpvj1o3iyS7OwE1HLvnZh1R8EMjg9fF2GEre6q0Z+F69ryG ruDWp7+iuzKqbsj7KdSyC5ieBpfMr5bU9EvJYU5eHA6CWGQaUb2mfPEAKBHtlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699912723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WQxQ8QAICvhX8buCa3FufPe46+gdzguuIbrBU4xoI7A=; b=RDxdiURYM3dzZ/EYepScLzMQM383TQxCEe8nRvrnH5jO2WMxvjjlDaQ1cqhbl0nRXC8Qno nKLtwr1YaB63guB28tj859U5L1byyG7kxJ2PWx2eMu70Ysv8iePrNlM7yfg51Bf1gUjyWM J/Hc9poG66P2pLPbgdc2n6kqeMAGGzmyYPN/Jmb+K4CmVC50BO1xQKWhWcPXzq5c5WN0a9 hupzg6emGkVpzvDnrTuLowHrF5iPfmvamT8r4brvQkahBSg6Ujh4NW09mbubcJQ5V3FjYN wO85fEfYjslW1DV8jnuFM+oSBAK/53+QeYlRIEKXmMIQJVH16nXXI0sUA2lARw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699912723; a=rsa-sha256; cv=none; b=JErFvyUbfHZmRzFawuu0r3WOmVh1LEAe4Cnbs9QxB+OsEINog5czYOtE873Wby6db0IIWo rUvjKEFG/3FRoKqA5mbYm03gfsXmqZfvETGCZ0OYBQYIxolImewlOCuQEuJPoZN6FBQhYr +v2RjUeiyPD+Lek4FxEEid634AoKeS9tqoOQASc/44E4F8x7d9TMFydnmH1WI/GdyU2Lf7 YGMq7Qc0BX8SQ9GYYNgYe3n1Cuc7u9h01Wtw7K6WU9HywQi3ZJMeeV/2ny4xuVm0gYnG2X sjYW9y2XKHDseEPFdWwvomFplJ/9wSzr0PXob2ztxxTsIbbjRgsUWdTSZdWQow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STjxH1SLgz7PB; Mon, 13 Nov 2023 21: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 3ADLwhPL012636; Mon, 13 Nov 2023 21: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 3ADLwhrF012633; Mon, 13 Nov 2023 21:58:43 GMT (envelope-from git) Date: Mon, 13 Nov 2023 21:58:43 GMT Message-Id: <202311132158.3ADLwhrF012633@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 8e7cdfe45697 - stable/13 - auxv: make AT_BSDFLAGS unsigned List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 8e7cdfe45697b1cc829af09d59ca0ccbac32170b Auto-Submitted: auto-generated The branch stable/13 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8e7cdfe45697b1cc829af09d59ca0ccbac32170b commit 8e7cdfe45697b1cc829af09d59ca0ccbac32170b Author: Brooks Davis AuthorDate: 2023-10-26 17:38:35 +0000 Commit: Brooks Davis CommitDate: 2023-11-13 21:53:19 +0000 auxv: make AT_BSDFLAGS unsigned AT_BSDFLAGS shouldn't be sign extended on 64-bit systems so use a uint32_t instead of an int. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D42365 (cherry picked from commit 326bf5089ca788d5ff1951eed7a9067281a2b65e) --- sys/kern/imgact_elf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 6ab16e6cfb0c..c23d729f49b2 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1439,7 +1439,8 @@ __elfN(freebsd_copyout_auxargs)(struct image_params *imgp, uintptr_t base) Elf_Auxinfo *argarray, *pos; struct vmspace *vmspace; rlim_t stacksz; - int error, bsdflags, oc; + int error, oc; + uint32_t bsdflags; argarray = pos = malloc(AT_COUNT * sizeof(*pos), M_TEMP, M_WAITOK | M_ZERO); From nobody Mon Nov 13 22:28:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STkb60h5jz50xDS; Mon, 13 Nov 2023 22:28: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 4STkb60F80z3Yym; Mon, 13 Nov 2023 22:28:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699914482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YeMGakgBub7N67Z5sfOWeirvN03QBMc+G2in/bd0UR4=; b=QdbFrVG/NOjnmpQbDvbncw26alS4fvn5VmGehVQFpJw7pUiSCPaGbzGu4HImAUS7GxgUnJ RAUAgxHYrmJXPE2+JhS9RE+fC74T9QDGHx4kuxwnmkiCpwFukZGHQMnq1Ke4kAAhX8taet WVSnRSZXXMk4KxOweCtrFYOGL2/ZNQSQ7PU8k3O+Q+C441DFsN5Qnc4kyqjJyvsSYImI3T A0CjVR5Hx+/DE1xitEc/1asopzSUUURanZ+zIsvxzXzoe6KuL9LuQcrNcWo5GdXaSvI9Uj 52NOBWUc691x/P4QPv+Kz+gyplBQ3zuMCEaxi16cIuvueHEeHnPMKnEN6+xOdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699914482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YeMGakgBub7N67Z5sfOWeirvN03QBMc+G2in/bd0UR4=; b=WcCCL4XaOq4cjPczyLboJmPsWJyqpaMr5VFB7LBKtMCUmGAYBmgeRKe2AbfgwChn6tCScj y7FLs9KqQG0OENqWD/XbJSd+se7dmLC41w8cGCFY8aNP58dJWzOlSlo+VjD5wmYiBh6QSV 4t2anNSyhmwvpnEvT9WYbg4gmxbUfCMWQqBCXSeniBCUQ4P2V1xxbdnXAD6Lz3Y8D5cbQV xtHMcdeZAu/uo4XzIIl9jbXHjcdJEeqFTFkPegKjPa5VdJNpA+ZHzZndOla74hQbZxN09j b/y1Z1sfdF+tivWkZJQt6+5TaZwl51Z+EL89cgVxsMKiSNP0l/9Rs8Y9LHBUlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699914482; a=rsa-sha256; cv=none; b=mNVRWbut9JrK+E69UEghgiUIfeIkuGhmfHmjxbm60LJC6cTDoWghSLcIhs8jlB/uzk+RrB oNq/yHHzFJaY91NUGQwJgUPVvmXRkChmP3yno8ts7M02eQmd3W8bXEadpqnsiH6olWSD9d n2VKWzmnQxFc3b5xvlo8pEpxAOdrOpW2mHOYa6PKydT5JCYZusiTLDsfG/a/wntWR1Tzwc dfpI8vZ/3/72GjY0ErdacG/SV9IbNeiAmv66MgNLT/NAEZilPbNdNhzL2OFtfScZhcuKGW IUO+qHa6aNTFZjtOarezxtvvIK81s6eZydcDt95znYIbDleuRxQEGGX2pyFvrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STkb56PCsz80b; Mon, 13 Nov 2023 22:28: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 3ADMS12V063757; Mon, 13 Nov 2023 22:28:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADMS19n063754; Mon, 13 Nov 2023 22:28:01 GMT (envelope-from git) Date: Mon, 13 Nov 2023 22:28:01 GMT Message-Id: <202311132228.3ADMS19n063754@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: 89188bd6ba8d - main - vn_copy_file_range(): use local variables for invp/outvp vnodes v_mounts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 89188bd6ba8d8332c65498f2b71c90e5ed4b9dae Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=89188bd6ba8d8332c65498f2b71c90e5ed4b9dae commit 89188bd6ba8d8332c65498f2b71c90e5ed4b9dae Author: Konstantin Belousov AuthorDate: 2023-11-12 18:29:14 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-13 22:26:28 +0000 vn_copy_file_range(): use local variables for invp/outvp vnodes v_mounts This avoids possible NULL dereference when checking mnt_vfc names. Reviewed by: jah, rmacklem, Olivier Certner Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42554 --- sys/kern/vfs_vnops.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 4e4161ef1a7f..e2227537dde1 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3046,6 +3046,7 @@ vn_copy_file_range(struct vnode *invp, off_t *inoffp, struct vnode *outvp, off_t *outoffp, size_t *lenp, unsigned int flags, struct ucred *incred, struct ucred *outcred, struct thread *fsize_td) { + struct mount *inmp, *outmp; int error; size_t len; uint64_t uval; @@ -3075,15 +3076,17 @@ vn_copy_file_range(struct vnode *invp, off_t *inoffp, struct vnode *outvp, if (len == 0) goto out; + inmp = invp->v_mount; + outmp = outvp->v_mount; + /* * If the two vnodes are for the same file system type, call * VOP_COPY_FILE_RANGE(), otherwise call vn_generic_copy_file_range() * which can handle copies across multiple file system types. */ *lenp = len; - if (invp->v_mount == outvp->v_mount || - strcmp(invp->v_mount->mnt_vfc->vfc_name, - outvp->v_mount->mnt_vfc->vfc_name) == 0) + if (inmp == outmp || strcmp(inmp->mnt_vfc->vfc_name, + outmp->mnt_vfc->vfc_name) == 0) error = VOP_COPY_FILE_RANGE(invp, inoffp, outvp, outoffp, lenp, flags, incred, outcred, fsize_td); else From nobody Mon Nov 13 22:28:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STkb71qBSz50xK7; Mon, 13 Nov 2023 22:28: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 4STkb71FvZz3ZCT; Mon, 13 Nov 2023 22:28:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699914483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OiE5sZKNOFhDzLhvnhFepbrvYoMQ1LFDYnDiU3DbRR4=; b=Jk2GcC8+sUsVb1cNoeytFr5fWrHWoZBEA14nRmnA2IIY8A8vzy+gJwN228ZyFiY96QE2yO nbJg10OOPafaE3HUdFyXr9V6vrBXszn82IqeWh6PND1NRJ8TxUGqLCo1uGnSoGzSWdQqH7 iqntIk3pZvnUTeAjJG4OyqTKPGK+0vW6FuEwBTw6D4wA/ytFAcFq6f7F55KF4C6zUxzQYl pZXMHpLEZx4eK9KInESNIcAOuFLClP7ujklmmEw8WFOY2NeAelKaIrhaFuLR/9BGs96NtB zk7s8vJB50jQZoqdDkzm1h2u8vYiIvi+34MoYg1E//L0MTSp84qzXtjTU3L3ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699914483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OiE5sZKNOFhDzLhvnhFepbrvYoMQ1LFDYnDiU3DbRR4=; b=TgTATdcu8CFeJc9bu+dZSJ0Y3z4ONjN/6n39tH1acL83EZaUhVyB4O9iDzr7LICvlXq0qN xdQvUJxvBYvkhZyr+vWG69hoqfsVcuugSSsi5bZ/BHGswp8nEoLiX/BJ34WBzMNcS9iTBF 0MgGAmTxaOEsypfSWdEyIucWqhtgurFWPWWS12Z2afVTlRQGzeofZGkDhQPpC+R7y7h9US V3OrZw0O8ngUj7nMbP8uwFqQWahFLCChUzoJtbd5lpmfsT4JWXit9ycEWoGOZ3nybhmPTX eOYs1AhFFAdCajBIloRBrLQadeoXrjHdo5RBznS5LwkVpN54GpLEmqoZ+3NaLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699914483; a=rsa-sha256; cv=none; b=ntnZt++hQCTfOMIERa45sy9moO1VMeIrwP/ZJ3VnJmqUvSd4XLB+5LVzSZMk5SOELWoSNA xqz/XCOok0w1S4Ebg+FhnQ/r+h4xHOPLcZQn9XkHOW79URhX3wh/Y5kWZmbVmgliKtn5qO SYhnHi5crazaHKz+RdZMZ0H/wP0hOGTYeHS55KYxI2Ow6osHnl8OGsg4fCCrctYN3Tugx0 58nCELj0fdkJ5pxNIqjWKOfaoZRli1dx53b3XXHRZyGxXuZQfY4eWtz2EBj2XzmcDH0k3j Oz0J1aw/sn7kGg9sQLpdgRBHYzmwPKbc1GM0B9F+0HY4E5+q132OpQt23LNtfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STkb70Hywz8Pn; Mon, 13 Nov 2023 22:28: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 3ADMS2NM063818; Mon, 13 Nov 2023 22:28:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADMS2k6063815; Mon, 13 Nov 2023 22:28:02 GMT (envelope-from git) Date: Mon, 13 Nov 2023 22:28:02 GMT Message-Id: <202311132228.3ADMS2k6063815@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: 23210f538a00 - main - vn_copy_file_range(): busy both in and out mp around call to VOP_COPY_FILE_RANGE() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 23210f538a008788b2e16b9eddafa4f598a21663 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=23210f538a008788b2e16b9eddafa4f598a21663 commit 23210f538a008788b2e16b9eddafa4f598a21663 Author: Konstantin Belousov AuthorDate: 2023-11-12 18:37:29 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-13 22:26:34 +0000 vn_copy_file_range(): busy both in and out mp around call to VOP_COPY_FILE_RANGE() This is required e.g. for nullfs to ensure liveness of the lower mount points. Reviewed by: jah, rmacklem, Olivier Certner Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42554 --- sys/kern/vfs_vnops.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index e2227537dde1..27ce5401f15f 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3078,6 +3078,29 @@ vn_copy_file_range(struct vnode *invp, off_t *inoffp, struct vnode *outvp, inmp = invp->v_mount; outmp = outvp->v_mount; + if (inmp == NULL || outmp == NULL) { + error = EBADF; + goto out; + } + + for (;;) { + error = vfs_busy(inmp, 0); + if (error != 0) + goto out; + if (inmp == outmp) + break; + error = vfs_busy(outmp, MBF_NOWAIT); + if (error != 0) { + vfs_unbusy(inmp); + error = vfs_busy(outmp, 0); + if (error == 0) { + vfs_unbusy(outmp); + continue; + } + goto out; + } + break; + } /* * If the two vnodes are for the same file system type, call @@ -3092,6 +3115,9 @@ vn_copy_file_range(struct vnode *invp, off_t *inoffp, struct vnode *outvp, else error = vn_generic_copy_file_range(invp, inoffp, outvp, outoffp, lenp, flags, incred, outcred, fsize_td); + vfs_unbusy(outmp); + if (inmp != outmp) + vfs_unbusy(inmp); out: return (error); } From nobody Mon Nov 13 23:05:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STlQL6fVPz514d6; Mon, 13 Nov 2023 23:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4STlQL5y1Gz3flw; Mon, 13 Nov 2023 23:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699916730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wSPqjQr8yUeH3zb0cSy7RGmSVowpP6BMMZnlpbDP+hs=; b=PbCjOFySQSru5aKrJbb4aQz5eiyY8tEiRhWZgWzpo2R6tkbCj5WSyfwUDA6nfxcLb543XT vrdQUsouRiSlDjaR2FV9Kv/57/487fdwNHwBbDjQ4VJkRODCnh0FQDnkwFBdfQcA0CcSpQ In9uouHtOKeW+hdmqwf+U0+TmSFTXBmf+tpnOw1yaOzCcCM+u9J2b22X59Gd6uxNHYgJin mzgMK83UZ//DhDbr3UkYAxVzrugNhN6VSVyYRUOvfDJ0a4v6nEMDkgeDEVMZBtDt8/ADHg eUcVwvm49JKm8IkGJsEWNOI7ZVjt6BrCALJhUTshuwU4KarEfUzFG0libVaNWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699916730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wSPqjQr8yUeH3zb0cSy7RGmSVowpP6BMMZnlpbDP+hs=; b=vyixCvWMKq4HVeb7OMLE9RjKzIfZe9hZ7TY6XRMhCd/qkdI0IBMpWJy7dyjVy/NcytdP8Q Qr/pBg+V6hywxSR3MiFGuRitDHAVAOC78YIgPDxQCCbViDFXvVBjeVVAMd0FBOY18vdJ5M 6riN2nbL54Bg0Kqor6mlSHTWT+86D5TznDWOP8yBpT/sdNaWx4uwU5n1kg+0GrOyvq8NJv 3nu7XkAe0nJ302MHqe/C4FslhOjG0HYZ1gk0sdz9sq8zLLGTPPRzJiwgxK2sEptlLF0jOw R5/ZXXA/lW1eOCMB9g1+LRnz47tr/7ESVLIXQqwEWfBiLEUsHd6LPZIqSWcq6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699916730; a=rsa-sha256; cv=none; b=TU2ipBqLWDxtwdrfu54UaCX7ax4UqDcuk5tCm0MSAAwB3PGfZvleO4Qv8wQFgMuDqQO+19 DH+MbtE6NsbFP1TvRD6YQ4qSG9EvdQneWA1lSAO3vMN/8rcsO3He1buMca8ngUBcfZ5PyC 9r8vzEwU1kECtoLE8Y/NYfU5oPM8nKsvdMGDDUEorLyPvJTW9m9nlCbmKy6T06V8llfrPW kSOxZPwfxHnP4tCyiWWcvcDKt7hK3GvC7l84P301a5hICh88CJp9nwF+kIGf0dcRMHvaP0 1jWjU6XuZwufTywPem50LAll/AEvOY9/l7k7kf0Mu4ud9nivpCqSnbP0SDpePA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STlQL51qSz9J8; Mon, 13 Nov 2023 23:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3ADN5UT7030751; Mon, 13 Nov 2023 23:05:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADN5UME030749; Mon, 13 Nov 2023 23:05:30 GMT (envelope-from git) Date: Mon, 13 Nov 2023 23:05:30 GMT Message-Id: <202311132305.3ADN5UME030749@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: da8238d6cfeb - main - libc: fix typo in Makefile comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: da8238d6cfeb819395b388ce31a94f22b3ea891f Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=da8238d6cfeb819395b388ce31a94f22b3ea891f commit da8238d6cfeb819395b388ce31a94f22b3ea891f Author: Brooks Davis AuthorDate: 2023-11-13 22:01:20 +0000 Commit: Brooks Davis CommitDate: 2023-11-13 23:05:11 +0000 libc: fix typo in Makefile comment MFC after: 1 week --- lib/libc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index e817104642b8..9ab588c618cd 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -11,7 +11,7 @@ LIBC_SRCTOP?= ${.CURDIR} # MACHINE_CPUARCH, but some ABIs are different enough to require their own libc, # so allow a directory named MACHINE_ARCH to override this (though treat # powerpc64le and powerpc64 the same). -# Note: This is copeid to msun/Makefile +# Note: This is copied to msun/Makefile M=${MACHINE_ARCH:S/powerpc64le/powerpc64/} .if exists(${LIBC_SRCTOP}/${M}) LIBC_ARCH=${M} From nobody Mon Nov 13 23:39:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STm9h39nQz50Bql; Mon, 13 Nov 2023 23:39: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 4STm9h0Rm5z4FyQ; Mon, 13 Nov 2023 23:39:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699918776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5bzA/eqIuYBJdkaFTSXhhKNIZX2PJk5hpDgALkXoogA=; b=ZMNX05ax08lTblNvtieGXbs1YAst0FIt1RuDMXMwQQzfgewAkpeoA3dQUKaXAbhyAJdD+V v05FnZHv8K7STilF4FJecAaAQnyvnN8SH5UXC55ThdIszM60JROIDnJGiZ34qsIE3tHtoY tpXnb7h6abJQPwkEcP4as4UPu/g7GAkdC1XP2JCbvbBbZ9Qea5ULrNRqGII8KXpgjaajD0 Pm86CnoZxysiSc3jKETmxJwUt6oRjzdOJN7FaF0njscn+qt/54EDlOzHXwiVTIZLDF6uWk vvbKtW3Bz+Zb5s5gMqKHi8S+NXabY0YO1jlbsN0zIiEsSf++PBCKi4FNZKF6Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699918776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5bzA/eqIuYBJdkaFTSXhhKNIZX2PJk5hpDgALkXoogA=; b=CXD9RTs+Cjvdj9Bwzpwzosl4ZuVEI0d0Y65QuxuCgh1B11RnPNx6hx62VFs0re82mb+irT xjTin2K8BzWDg2PUoXiVLjTqsVSY6/MtLGk1GUCWhEMLKk2KLSRyT4Q9BIpfuaBs9kfw2/ 6L6AOHtcYEge1d5tTZvUoAW1mXJkZ3EwM4mAH6ICYdvkgqJA3bVcrjqFuoM+T9DetoZ1Zs YaTJGQC9TYK/h/tc5xr8uMB+2SfF6K3QlOdGCIX3Qs4hqgKhDVdNXk/qEwzhYgUkveyq9s F9bdJ3DQ0uNmhoKpZ/DR9blsQdzHHRBvct7Pxd0xFnIRdhApC+pRSHqOC2R3ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699918776; a=rsa-sha256; cv=none; b=AoX+htz+N/NLcEtvlQiOYXCythYnelpLR1vDAYEmw29jTtUqyO8vJTVykr9zztCP9QkwVZ mHS7cXbG+7aMBWqqlYKtPXUK3QMEFUCtz3ydd2jvjieiqmJu1oDFjnEZEyEYsQpYPdg05U Qbau4VBPWaA/NAG82K/DMBuolyLDplgcmIyUcLEcvAVb9BhDIwpe34YaFq8D1PZzaZ+6BP +15CP8D2NuySxNOuD9eLp9PI6AS9KeqJfaPQBkd/sWvm4UvxwvGlgp6/GdWsZFLXARgZoH blBom4x5rgHaZS5PZYzK8Px8Fvgyujp48yBj8WwhQwOQv7488W4vYftHrTLJwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STm9g6dXFz9ZM; Mon, 13 Nov 2023 23:39: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 3ADNdZ1M081022; Mon, 13 Nov 2023 23:39:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ADNdZKF081019; Mon, 13 Nov 2023 23:39:35 GMT (envelope-from git) Date: Mon, 13 Nov 2023 23:39:35 GMT Message-Id: <202311132339.3ADNdZKF081019@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: 99132daf6f70 - main - rc.d/ldconfig: Prepend rtld stdlib paths to ldconfig(32)_paths List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 99132daf6f70cb0cc969c555d3612547fa3cf1db Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=99132daf6f70cb0cc969c555d3612547fa3cf1db commit 99132daf6f70cb0cc969c555d3612547fa3cf1db Author: John W. O'Brien AuthorDate: 2023-11-12 22:45:27 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-13 23:39:17 +0000 rc.d/ldconfig: Prepend rtld stdlib paths to ldconfig(32)_paths Ensure that ldconfig-managed elf and elf32 hints always include the standard library paths that are known independently to rtld. PR: 275031 Reviewed by: kib MFC after: 2 weeks Sponsored by: Saltant Solutions LLC Differential Revision: https://reviews.freebsd.org/D42557 --- libexec/rc/rc.d/ldconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/ldconfig b/libexec/rc/rc.d/ldconfig index 178a8a987be4..ecbbca210ea0 100755 --- a/libexec/rc/rc.d/ldconfig +++ b/libexec/rc/rc.d/ldconfig @@ -22,7 +22,7 @@ ldconfig_start() ldconfig=${ldconfig_command} checkyesno ldconfig_insecure && _ins="-i" if [ -x "${ldconfig_command}" ]; then - _LDC="/lib /usr/lib" + _LDC=$(/libexec/ld-elf.so.1 -v | sed -n -e '/^Default lib path /s///p' | tr : ' ') for i in ${ldconfig_local_dirs}; do if [ -d "${i}" ]; then _files=`find ${i} -type f` @@ -52,6 +52,9 @@ ldconfig_start() fi done _LDC="" + if [ -x /libexec/ld-elf32.so.1 ]; then + _LDC=$(/libexec/ld-elf32.so.1 -v | sed -n -e '/^Default lib path /s///p' | tr : ' ') + fi for i in ${ldconfig32_paths}; do if [ -r "${i}" ]; then _LDC="${_LDC} ${i}" From nobody Tue Nov 14 00:27:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STnDr2cYcz50MgF; Tue, 14 Nov 2023 00:27: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 4STnDr284Xz4MFK; Tue, 14 Nov 2023 00:27:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699921644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tJkXn6ZnLfha1MhzbNxNv3wv+t2yIO/D3JhTfTd6b5k=; b=mgeS0Z3Pf21NZDi7AJv9UHyZ9GxfQwG762H8/wgztKdb4oWn4v5ar4cbjnl5Cphj+JRGXW s+t/XqBVwDl+hUKxEBFgd7kGWHlCcFOX6UdZVxYefqsW4xf+afvBQqRO++x4KeZjCoV95/ HVWAg+NJw9FQqS7i8RYfchXOFgpTSgfWVmQvASOrcgZb0lhRR0iQbe98eiJS1Z1Ux9a+U6 BSdinaWQllMFWi+tNUnBANvGGmkAoIfa7qvDfUKoPevRidqWXpCTKyh46chzkmazU6e2+y gFLLhvaw8b3WoVMy89KSKllCIgWbVkTWUfxkPWCHi/WfEg9Msgm510DOyu03TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699921644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tJkXn6ZnLfha1MhzbNxNv3wv+t2yIO/D3JhTfTd6b5k=; b=pDzVIjhPFUukkdkkYxL7eFLDeiy3rFjY5WmetQ/wZaDW2HpoAHVaxMTTllEgRnJkD5HdmR R6rYp0eIkkTDO3h2rUlRiDuLIb9LpnzVy3wXhMtXIUiBQ9cl3p7ruo9X5+/IlTUTqWlntl aZ5Q0dY8Lzn3oAEU3hwlcWFoWFgal9tS+3OYv1l0Alu1S/z2oxsDtwOft5F9KrukAQJsha ZMptOCYK2q0FKjj7NvUw5KP2n/5pVqLMCrIW6hDnAArwt1NVCVhhOdVFeTYx0fnvdV7Yhz LmCf23SAmWbKdTNCDRlBbJg42IJIOsNcRdBh7ibdr9kxwLuEdu7afZZirRgpeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699921644; a=rsa-sha256; cv=none; b=dghTybdzDe/L8dcpj5/kEppfKUIAY5jQ0kc1PPxraqHZ5xu3fHXpbJF1PyBKD0Ss66vRnv 6wMd03geYHHbChY7iIHKjWqcRIHfLfZIgUCHiAZgCU0tqh+zZf4C1gna1cdy3wcohZfAEC v1WK40p5mNc6WjyXg06AY41W+Xfx+2wU6guRKNukdnMRwWbgNjEUHt0aQmGrmpvaTttelc RYny+5CbX6HZ5DoknDKE5IUg8xKsK8ouU19sGbi4SV2zSnf9+GfkKoJZpSZK0mtl5nJ+EX +H/xDfjFQTycjHkeYXnN9ZcRv2HAe7Fk6LdyEIP1Ut0J77TUDrNThCuZ/cEK/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 4STnDr1BzbzBwq; Tue, 14 Nov 2023 00:27: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 3AE0ROZj064281; Tue, 14 Nov 2023 00:27:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AE0ROEj064278; Tue, 14 Nov 2023 00:27:24 GMT (envelope-from git) Date: Tue, 14 Nov 2023 00:27:24 GMT Message-Id: <202311140027.3AE0ROEj064278@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: f15252b4fa02 - stable/14 - linuxkpi: races between linux_queue_delayed_work_on() and linux_cancel_delayed_work_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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f15252b4fa0276aa76490e6fb915e95dc5b4e0ef Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f15252b4fa0276aa76490e6fb915e95dc5b4e0ef commit f15252b4fa0276aa76490e6fb915e95dc5b4e0ef Author: Konstantin Belousov AuthorDate: 2023-11-04 07:45:48 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-13 22:29:30 +0000 linuxkpi: races between linux_queue_delayed_work_on() and linux_cancel_delayed_work_sync() (cherry picked from commit 05fe82455f263ad107a860ce20dd89e1a5c1619c) --- sys/compat/linuxkpi/common/src/linux_work.c | 36 ++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_work.c b/sys/compat/linuxkpi/common/src/linux_work.c index 990ba5d20fd5..888ac97dbff6 100644 --- a/sys/compat/linuxkpi/common/src/linux_work.c +++ b/sys/compat/linuxkpi/common/src/linux_work.c @@ -221,16 +221,19 @@ linux_queue_delayed_work_on(int cpu, struct workqueue_struct *wq, [WORK_ST_EXEC] = WORK_ST_TIMER, /* start timeout */ [WORK_ST_CANCEL] = WORK_ST_TIMER, /* start timeout */ }; + bool res; if (atomic_read(&wq->draining) != 0) return (!work_pending(&dwork->work)); + mtx_lock(&dwork->timer.mtx); switch (linux_update_state(&dwork->work.state, states)) { case WORK_ST_EXEC: case WORK_ST_CANCEL: if (delay == 0 && linux_work_exec_unblock(&dwork->work) != 0) { dwork->timer.expires = jiffies; - return (true); + res = true; + goto out; } /* FALLTHROUGH */ case WORK_ST_IDLE: @@ -240,20 +243,21 @@ linux_queue_delayed_work_on(int cpu, struct workqueue_struct *wq, if (delay == 0) { linux_delayed_work_enqueue(dwork); } else if (unlikely(cpu != WORK_CPU_UNBOUND)) { - mtx_lock(&dwork->timer.mtx); callout_reset_on(&dwork->timer.callout, delay, &linux_delayed_work_timer_fn, dwork, cpu); - mtx_unlock(&dwork->timer.mtx); } else { - mtx_lock(&dwork->timer.mtx); callout_reset(&dwork->timer.callout, delay, &linux_delayed_work_timer_fn, dwork); - mtx_unlock(&dwork->timer.mtx); } - return (true); + res = true; + break; default: - return (false); /* already on a queue */ + res = false; + break; } +out: + mtx_unlock(&dwork->timer.mtx); + return (res); } void @@ -467,8 +471,8 @@ linux_cancel_delayed_work(struct delayed_work *dwork) * fashion. It returns non-zero if the work was successfully * cancelled. Else the work was already cancelled. */ -bool -linux_cancel_delayed_work_sync(struct delayed_work *dwork) +static bool +linux_cancel_delayed_work_sync_int(struct delayed_work *dwork) { static const uint8_t states[WORK_ST_MAX] __aligned(8) = { [WORK_ST_IDLE] = WORK_ST_IDLE, /* NOP */ @@ -478,7 +482,6 @@ linux_cancel_delayed_work_sync(struct delayed_work *dwork) [WORK_ST_CANCEL] = WORK_ST_IDLE, /* cancel and drain */ }; struct taskqueue *tq; - bool retval = false; int ret, state; bool cancelled; @@ -490,7 +493,7 @@ linux_cancel_delayed_work_sync(struct delayed_work *dwork) switch (state) { case WORK_ST_IDLE: mtx_unlock(&dwork->timer.mtx); - return (retval); + return (false); case WORK_ST_TIMER: case WORK_ST_CANCEL: cancelled = (callout_stop(&dwork->timer.callout) == 1); @@ -512,6 +515,17 @@ linux_cancel_delayed_work_sync(struct delayed_work *dwork) } } +bool +linux_cancel_delayed_work_sync(struct delayed_work *dwork) +{ + bool res; + + res = false; + while (linux_cancel_delayed_work_sync_int(dwork)) + res = true; + return (res); +} + /* * This function waits until the given work structure is completed. * It returns non-zero if the work was successfully From nobody Tue Nov 14 00:27:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STnDs4HQbz50Mm5; Tue, 14 Nov 2023 00:27: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 4STnDs3KSBz4MQW; Tue, 14 Nov 2023 00:27:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699921645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=76X4QA4wJ3a9bmWcbNkyFVE/gLy4DVQeh/is0rA1WXo=; b=PzWpsTMeJO49UFp7UdfM9OzMrEPy/GLyqyD1CAHIohG5rLTkhBpIDt53a/8l7AwFlU9TAx 3hJVvoJikvQA5E5NIiTntyJJDtTRYuyPsfZm9bwsGOM1H8C/gkO10xnZPCEJxEFzoiZq9W RZ8CEVJ0kud/8a/ZSqDMfoX+KKjjHcRG7ha737fUR6gbVir5Q9s/OkY9PHyRvN/0TxsF2H e0MxrMZXiejOKXDpf0PgPA3I/UC3bri/7H6FNd0OYY2CffZBwhSZp5nE9kgdIaU8wBG+UO Dj8QE0CVxWaYBYdzNvp5mSpcLCGLr56rkbE+QoeTRqn3BnycPLDXzwOXe98y+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699921645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=76X4QA4wJ3a9bmWcbNkyFVE/gLy4DVQeh/is0rA1WXo=; b=L9DZd1A0mKhcHyUBZ3iCH8/t6fIruZXxBq1U0oDW3nHqvw0dWmsjVmo0JEQ0n0kjfI4e3F f6IjWzYx6Piq0EJpew9HmtqAoQsktjgxYCYWfNzAlj724oRsomRFDD68lMLLF3uCu0Lbq9 ZiE2MqPcjdRw4hfpAp9/xhhLH9ld6DK0Bh7iaj1Ml6ItSg7PWDSlHKoopyKSj9818wLl6Q DFlIxlyl13MwHuonuEj1Vf+4fVtgk4FOdBTEN0BF+x3qwxkOu4h2s9jjKqSkKRKwG1FTsb ZC6YvoBzHeAp1YPZNywZwmwjgWe7Fk0W/bNKz+y/+kCB/QdzaH3lNThb3cJy8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699921645; a=rsa-sha256; cv=none; b=fXV7hNrTA2MLNtb7N98jDy58atk6YdUtpya29gOa/1RnrP86YMIVGmA67/U+VH2cgdChhA /0TDwyPSqKLa8BsTXoibeO7MGrUJ1+XdTK//OfQmYIu1X04N5PeEHlvtdIEqvUMJSZ5ITt odigPpyvfJ6AJuzMUopLf8kBYlPoCltLCa0f/CdrPn5xtIJgFRnQwQwsKs2Z35SiApO02r gFRYkP5V5nviWXVM17RchqOTqE/Vj1uD4rUUGXKASa46OTMwg5l4Ft+PW+d+enjEXG5KkB rMYZFLe7iEvXjPRNgiZjTiXlK8l3qjesNkhhh6etoWX5SylV2jr0l8bRnABDjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STnDs2C3czC7w; Tue, 14 Nov 2023 00:27: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 3AE0RPGX064333; Tue, 14 Nov 2023 00:27:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AE0RPcr064330; Tue, 14 Nov 2023 00:27:25 GMT (envelope-from git) Date: Tue, 14 Nov 2023 00:27:25 GMT Message-Id: <202311140027.3AE0RPcr064330@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: dbec48131fc0 - stable/14 - linuxkpi linux_work: use 'true' instead of 'non-zero' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: dbec48131fc0b4ce6c36220c50797e324f68a4f2 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=dbec48131fc0b4ce6c36220c50797e324f68a4f2 commit dbec48131fc0b4ce6c36220c50797e324f68a4f2 Author: Konstantin Belousov AuthorDate: 2023-11-07 10:56:39 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-13 22:29:30 +0000 linuxkpi linux_work: use 'true' instead of 'non-zero' (cherry picked from commit 96cb1d70008e6d42750e95135316cafd6899384f) --- sys/compat/linuxkpi/common/src/linux_work.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_work.c b/sys/compat/linuxkpi/common/src/linux_work.c index 888ac97dbff6..c62302ad2346 100644 --- a/sys/compat/linuxkpi/common/src/linux_work.c +++ b/sys/compat/linuxkpi/common/src/linux_work.c @@ -206,7 +206,7 @@ linux_flush_rcu_work(struct rcu_work *rwork) /* * This function queues the given work structure on the given - * workqueue after a given delay in ticks. It returns non-zero if the + * workqueue after a given delay in ticks. It returns true if the * work was successfully [re-]queued. Else the work is already pending * for completion. */ @@ -230,7 +230,7 @@ linux_queue_delayed_work_on(int cpu, struct workqueue_struct *wq, switch (linux_update_state(&dwork->work.state, states)) { case WORK_ST_EXEC: case WORK_ST_CANCEL: - if (delay == 0 && linux_work_exec_unblock(&dwork->work) != 0) { + if (delay == 0 && linux_work_exec_unblock(&dwork->work)) { dwork->timer.expires = jiffies; res = true; goto out; @@ -468,7 +468,7 @@ linux_cancel_delayed_work(struct delayed_work *dwork) /* * This function cancels the given work structure in a synchronous - * fashion. It returns non-zero if the work was successfully + * fashion. It returns true if the work was successfully * cancelled. Else the work was already cancelled. */ static bool From nobody Tue Nov 14 00:29:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STnGp3CKJz50NDZ; Tue, 14 Nov 2023 00:29: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 4STnGp2Qd6z4Mv1; Tue, 14 Nov 2023 00:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699921746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k+xtdnb9Ngb0ES/27MA3tyrFITFldfDvetCHyYwwKNE=; b=T8PX1rk8f4zTYE5yKo19CcuFVqpvzA7U9xJFkwt3wbwNQGgMHh9oXMxQfSd5+CEyDYo01k ffBT3NLsThSHd4RuSiUHYv0upQIbn30v6M81L4mSuPID3PiVQS4q6kaZCxW8kOWcObQw+F K7l9NqG5Eo7440ze15dK46jzIEu9+SATaE5lEDqU0fBZgM5bNUf3D+SLsbgYVmh6snA28j dUGwz7GdyEDd0D6M3kS6vFUhHTbpQTunnxfNGNxB79SinCCpV4Zkdl03j3XbEoWBvgcyi8 d0aWGb+lCsfo1ED7S0jV5zC3vKAdb3ZAI+JKMcPVoWZSDq+Yt6vBIyzeW8KaVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699921746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k+xtdnb9Ngb0ES/27MA3tyrFITFldfDvetCHyYwwKNE=; b=oZ5g9eZhrSgbBw8aQ3QUNJOqsaMLE8yDaYLcv5UXcFQQO2mwO353Wo265U8MFuRXg94cab whcBrvJHsGeySsGmAyQC1UYSENcC3mmqxuAUPP4R3zCZJ7aTUPYV+brm4EgQhs6+YHuXaO gwc8xohuAPS5/HjnRjGOyJJYk0yDM5KouDvJ4+eh/PSvRjprzzQQBrRsazIXTZYk/GhSC5 hyPOA9vGwVmu+Arks3JMHhOY7t7iwJfiLVJZweT9BuAkP44DfbUjHBrV1T5Dwp94O0Fi9Q SUpErAGX0RXxddF8dT3HPCy5o7zniYuYa4HaTK08gCM9Fu3vGUrvvEVkl6yj/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699921746; a=rsa-sha256; cv=none; b=MDhcKfORBKe3NfecwF7L+UHUbrWk735i9tYHU+DxNWVj52GNpDO1m2xT9yhgrhYBOd1NG4 gOliLH238c6G8F5YIvAXa1wBj+Fszl7MadjQ94Pmq5z2GAX/wSR08bRoZp2qbeI29HXnBy M95ersIU7sDsU3p6tF4VG7tpgCjGOLpG/PXnIuFar2EIIjR8d9fsYKezSpC75GVbMsruc3 NHv2Ony4se7pz2G51PkSILTW5Ljbtcrw/unO/lq+oSacQjxFnbMNFNaB3t+aVCTisLaL/K pPowuNpSANnOr+Ymuswp0hy5xAcTTZupYzQsS6S4CvmhtYhye5toMEdQvagVtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STnGp1W2vzBwv; Tue, 14 Nov 2023 00:29: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 3AE0T65H064692; Tue, 14 Nov 2023 00:29:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AE0T63Z064689; Tue, 14 Nov 2023 00:29:06 GMT (envelope-from git) Date: Tue, 14 Nov 2023 00:29:06 GMT Message-Id: <202311140029.3AE0T63Z064689@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: d0ec1aadcb41 - stable/13 - linuxkpi: races between linux_queue_delayed_work_on() and linux_cancel_delayed_work_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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d0ec1aadcb4183caad8e67d9ceb4fede8e680420 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d0ec1aadcb4183caad8e67d9ceb4fede8e680420 commit d0ec1aadcb4183caad8e67d9ceb4fede8e680420 Author: Konstantin Belousov AuthorDate: 2023-11-04 07:45:48 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-13 22:30:25 +0000 linuxkpi: races between linux_queue_delayed_work_on() and linux_cancel_delayed_work_sync() (cherry picked from commit 05fe82455f263ad107a860ce20dd89e1a5c1619c) --- sys/compat/linuxkpi/common/src/linux_work.c | 36 ++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_work.c b/sys/compat/linuxkpi/common/src/linux_work.c index 990ba5d20fd5..888ac97dbff6 100644 --- a/sys/compat/linuxkpi/common/src/linux_work.c +++ b/sys/compat/linuxkpi/common/src/linux_work.c @@ -221,16 +221,19 @@ linux_queue_delayed_work_on(int cpu, struct workqueue_struct *wq, [WORK_ST_EXEC] = WORK_ST_TIMER, /* start timeout */ [WORK_ST_CANCEL] = WORK_ST_TIMER, /* start timeout */ }; + bool res; if (atomic_read(&wq->draining) != 0) return (!work_pending(&dwork->work)); + mtx_lock(&dwork->timer.mtx); switch (linux_update_state(&dwork->work.state, states)) { case WORK_ST_EXEC: case WORK_ST_CANCEL: if (delay == 0 && linux_work_exec_unblock(&dwork->work) != 0) { dwork->timer.expires = jiffies; - return (true); + res = true; + goto out; } /* FALLTHROUGH */ case WORK_ST_IDLE: @@ -240,20 +243,21 @@ linux_queue_delayed_work_on(int cpu, struct workqueue_struct *wq, if (delay == 0) { linux_delayed_work_enqueue(dwork); } else if (unlikely(cpu != WORK_CPU_UNBOUND)) { - mtx_lock(&dwork->timer.mtx); callout_reset_on(&dwork->timer.callout, delay, &linux_delayed_work_timer_fn, dwork, cpu); - mtx_unlock(&dwork->timer.mtx); } else { - mtx_lock(&dwork->timer.mtx); callout_reset(&dwork->timer.callout, delay, &linux_delayed_work_timer_fn, dwork); - mtx_unlock(&dwork->timer.mtx); } - return (true); + res = true; + break; default: - return (false); /* already on a queue */ + res = false; + break; } +out: + mtx_unlock(&dwork->timer.mtx); + return (res); } void @@ -467,8 +471,8 @@ linux_cancel_delayed_work(struct delayed_work *dwork) * fashion. It returns non-zero if the work was successfully * cancelled. Else the work was already cancelled. */ -bool -linux_cancel_delayed_work_sync(struct delayed_work *dwork) +static bool +linux_cancel_delayed_work_sync_int(struct delayed_work *dwork) { static const uint8_t states[WORK_ST_MAX] __aligned(8) = { [WORK_ST_IDLE] = WORK_ST_IDLE, /* NOP */ @@ -478,7 +482,6 @@ linux_cancel_delayed_work_sync(struct delayed_work *dwork) [WORK_ST_CANCEL] = WORK_ST_IDLE, /* cancel and drain */ }; struct taskqueue *tq; - bool retval = false; int ret, state; bool cancelled; @@ -490,7 +493,7 @@ linux_cancel_delayed_work_sync(struct delayed_work *dwork) switch (state) { case WORK_ST_IDLE: mtx_unlock(&dwork->timer.mtx); - return (retval); + return (false); case WORK_ST_TIMER: case WORK_ST_CANCEL: cancelled = (callout_stop(&dwork->timer.callout) == 1); @@ -512,6 +515,17 @@ linux_cancel_delayed_work_sync(struct delayed_work *dwork) } } +bool +linux_cancel_delayed_work_sync(struct delayed_work *dwork) +{ + bool res; + + res = false; + while (linux_cancel_delayed_work_sync_int(dwork)) + res = true; + return (res); +} + /* * This function waits until the given work structure is completed. * It returns non-zero if the work was successfully From nobody Tue Nov 14 00:29:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STnGq3jqCz50N63; Tue, 14 Nov 2023 00:29: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 4STnGq2wjXz4N64; Tue, 14 Nov 2023 00:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699921747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ERktq7YWqBSMK4XZox3Pwbk+eVll52boTa50YpdP6Do=; b=TSFUrz+NGi5d3kuelleQVmSd+0EqGKWELXn4DFOZUmMYgGFT4fV28vuZMqxgdM4tcbLZJX WaTvx6RUw1u/WikxbeKnxjUOtWUknW4eGw9xSqfceUm+KyxvyRyMNFn9varCLBezEKOjG6 K1cdkSNZrEib4pQFCqH4pEwV5NaHMDdLwMoZqqSdHufZyDunkxYBZ2mtM8z8ReFxLcjJu0 iTcBo83qM22u2ubXJhpDp1oIVdDm++1MvHl6o7rEoCCM2zBnf+iJLGvYwKSCLC8syJmzJR E3B7y+4lsSls6hDuoksr+nmwXaFGJcgmAVc2w2v58kKPVjBWUl9Hloy+YsDxIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699921747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ERktq7YWqBSMK4XZox3Pwbk+eVll52boTa50YpdP6Do=; b=wnbDfic5b/oRpH30cW6HWhDZqNJLxJ78/6jiex2+hhe3R0OBD7Yg9r+6T7BNkW5gXSjnzT LifbyOCcuYmglqfR9wlAkSHrFnK9Oe6WLVnP+uKod+JSOfdblxWJtKjSvdeGe/rhZeMEYP Qahz7C2a+rHCSsX0Kp9WU5bQdJ9ghaIYLIs0GxpQhUhs1OlQ4LYFoyE9LXp0NcO7kWlfAb Z6GCOehUYpTZpzgDpyiQRo/Tly03meHBSwRbRqWomUUybu3dmgacHrHR3RkcWultYVtqNR /R9GxmDzvH5Qb3c7Wk5CFLm5tSXN0vBtKgdU5wOJgsXlgtnDwnJ7jku28dsD7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699921747; a=rsa-sha256; cv=none; b=AOWZ7qlA049tHX3JNcEAUmMVNCfXuCkhWOfdEuusuAOHlAHHqOx0RLb/NvqGQv3AClDCqV uO4s5Y43R1+ucJcasmbflkd3bjEKw+yGPUC5v0zJcYZ7luAiMWTJseyxjpMYWAuaVJzoRg jAcnXu13pq1+m64tWpV6+/6aUmb09YRJIHpkHX+1KRBg6svjvUYT8GknKoZWN8TJKDCRpv ZttM1KHh0HHxuhnGhfaC4brISumFXnfd+FvyMxyKZ755rIZEgacVr7zjiZWxiBMCod7qDG 4sCtbyuoBn23pkgWAMA5hO47sbdZXC49/bzjb87uAh6qzskNxSaAu6QXdZtusg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STnGq1sx7zCGJ; Tue, 14 Nov 2023 00:29: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 3AE0T7O8064745; Tue, 14 Nov 2023 00:29:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AE0T7Fi064742; Tue, 14 Nov 2023 00:29:07 GMT (envelope-from git) Date: Tue, 14 Nov 2023 00:29:07 GMT Message-Id: <202311140029.3AE0T7Fi064742@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: 4c40dda67ade - stable/13 - linuxkpi linux_work: use 'true' instead of 'non-zero' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4c40dda67ade420a0e3544b5e4fa461ac4787077 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4c40dda67ade420a0e3544b5e4fa461ac4787077 commit 4c40dda67ade420a0e3544b5e4fa461ac4787077 Author: Konstantin Belousov AuthorDate: 2023-11-07 10:56:39 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-13 22:30:25 +0000 linuxkpi linux_work: use 'true' instead of 'non-zero' (cherry picked from commit 96cb1d70008e6d42750e95135316cafd6899384f) --- sys/compat/linuxkpi/common/src/linux_work.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_work.c b/sys/compat/linuxkpi/common/src/linux_work.c index 888ac97dbff6..c62302ad2346 100644 --- a/sys/compat/linuxkpi/common/src/linux_work.c +++ b/sys/compat/linuxkpi/common/src/linux_work.c @@ -206,7 +206,7 @@ linux_flush_rcu_work(struct rcu_work *rwork) /* * This function queues the given work structure on the given - * workqueue after a given delay in ticks. It returns non-zero if the + * workqueue after a given delay in ticks. It returns true if the * work was successfully [re-]queued. Else the work is already pending * for completion. */ @@ -230,7 +230,7 @@ linux_queue_delayed_work_on(int cpu, struct workqueue_struct *wq, switch (linux_update_state(&dwork->work.state, states)) { case WORK_ST_EXEC: case WORK_ST_CANCEL: - if (delay == 0 && linux_work_exec_unblock(&dwork->work) != 0) { + if (delay == 0 && linux_work_exec_unblock(&dwork->work)) { dwork->timer.expires = jiffies; res = true; goto out; @@ -468,7 +468,7 @@ linux_cancel_delayed_work(struct delayed_work *dwork) /* * This function cancels the given work structure in a synchronous - * fashion. It returns non-zero if the work was successfully + * fashion. It returns true if the work was successfully * cancelled. Else the work was already cancelled. */ static bool From nobody Tue Nov 14 00:46:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STnfq5dBHz50RGj; Tue, 14 Nov 2023 00:46: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 4STnfq56bWz4PYp; Tue, 14 Nov 2023 00:46:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699922787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nvX5lUL1b6D36taUaMfKd3TaOVi6imVGMGoq+65wp7Q=; b=NURqvZhzQfPmq/NPnQDGty8TjIUfQgUs9qCoNln/kVIxg4KclKYPN1nmJZn7dYRMRSGgeq Nq0xRySXOMix2yl3+lcGzkxVmfDIprYgW/ry6rvx4oevIUzeVKb06UvUOYeTfcAnguPdAh iMeUJlX0cXyMiVPNLHGplywyb5/bPP+dvOeViRamOzlSeLSli+B4MEcb1/G5YS3jjbMeta gW7jv4YYsGUV1Su+vCwPNCCm8q67o7u8Rh3TrtIaIa6gcRbFz9SKcktOkfDROzj79IfhAE 8U2Vj1L8oS336MO+wvcu9rPAnr1IK/opFyPeaWQh0DcVS3TwZ+EXUmJKFVubNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699922787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nvX5lUL1b6D36taUaMfKd3TaOVi6imVGMGoq+65wp7Q=; b=WHfAw0a++6/4ZQ5NKP6HEcBBAg0xncFrgu112f4qj7a1HkEqQ7FDJPhyocyV6AHK4aeao9 /SmQrAQMC0vqwNlk4LyNEmki3lj5kxaUNL78/VeF3uttEomAsTSaKgSNHgaE6YvZ+pMYee fNbZcBv2v72YMHQYKL25kA8UUMYbNimAx31DUjIaFR6dAsYApoLlH1jXarROcZSE8ro60T ZdyoRKyF3wBez8eY6baS0O5YU/FrWEiVTVj4oBkb+OY4C6MQfIyKLtqO84wfofMnSelI2S WZTsuRyh2cErbUCCiqZenmf2CC/xltxjuxkGcw5ZeUuzdOceh0ILm/zAI7QKEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699922787; a=rsa-sha256; cv=none; b=myWTH5vTbV8IGxjgrp15XrSxJZXOxOWUy753DEN5lOeZpDfw2jLdam+q0Oi0LdPwcBIpDE rkyKDDAq/JNipSWO2dByCcAAkbiZIcGLWixm8iKCPWgSfEMRqvPnh+XHVUzeSbQvF+4pa6 fg/DjVmhQEyLV0UJ/5sLst0Jdpwj3PbqBCaYV4n+I/cXoO8jWbzgJMgghOb4LnMvn1Y23+ Gb5Ql+zrRicFXvy7NXLf2WJ/SzkdLVR8tkue6rUpW8iLLc8VtRYEbT97FXJdGAW5NUMbrL IfCW/qoOus3vs4sZbESJ9MGnBXH1l3uzQHeVFokHOmCzuXShk/tQROCrlPF2vw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STnfq48kBzCRC; Tue, 14 Nov 2023 00:46: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 3AE0kRlT097875; Tue, 14 Nov 2023 00:46:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AE0kR9g097872; Tue, 14 Nov 2023 00:46:27 GMT (envelope-from git) Date: Tue, 14 Nov 2023 00:46:27 GMT Message-Id: <202311140046.3AE0kR9g097872@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: 5aab39b24ce7 - main - Unbound: Remove backup file brought in from upstream List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 5aab39b24ce7437265b94461ffdd9b12c0723658 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=5aab39b24ce7437265b94461ffdd9b12c0723658 commit 5aab39b24ce7437265b94461ffdd9b12c0723658 Author: Cy Schubert AuthorDate: 2023-11-14 00:36:24 +0000 Commit: Cy Schubert CommitDate: 2023-11-14 00:46:12 +0000 Unbound: Remove backup file brought in from upstream Upstream tarball included config.h~. This was previously manually removed from vendor where in fact it should not have been as it would have caused a merge conflict. Reported by: "Herbert J. Skuhra" MFC: 2 weeks --- contrib/unbound/config.h.in~ | 1456 ------------------------------------------ 1 file changed, 1456 deletions(-) diff --git a/contrib/unbound/config.h.in~ b/contrib/unbound/config.h.in~ deleted file mode 100644 index f31354d01408..000000000000 --- a/contrib/unbound/config.h.in~ +++ /dev/null @@ -1,1456 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* apply the noreturn attribute to a function that exits the program */ -#undef ATTR_NORETURN - -/* apply the weak attribute to a symbol */ -#undef ATTR_WEAK - -/* Directory to chroot to */ -#undef CHROOT_DIR - -/* Define this to enable client subnet option. */ -#undef CLIENT_SUBNET - -/* Do sha512 definitions in config.h */ -#undef COMPAT_SHA512 - -/* Command line arguments used with configure */ -#undef CONFCMDLINE - -/* Pathname to the Unbound configuration file */ -#undef CONFIGFILE - -/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work - */ -#undef DARWIN_BROKEN_SETREUID - -/* Whether daemon is deprecated */ -#undef DEPRECATED_DAEMON - -/* Deprecate RSA 1024 bit length, makes that an unsupported key */ -#undef DEPRECATE_RSA_1024 - -/* Define this to enable kernel based UDP source port randomization. */ -#undef DISABLE_EXPLICIT_PORT_RANDOMISATION - -/* default dnstap socket path */ -#undef DNSTAP_SOCKET_PATH - -/* Define if you want to use debug lock checking (slow). */ -#undef ENABLE_LOCK_CHECKS - -/* Define this if you enabled-allsymbols from libunbound to link binaries to - it for smaller install size, but the libunbound export table is polluted by - internal symbols */ -#undef EXPORT_ALL_SYMBOLS - -/* Define to 1 if you have the `accept4' function. */ -#undef HAVE_ACCEPT4 - -/* Define to 1 if you have the `arc4random' function. */ -#undef HAVE_ARC4RANDOM - -/* Define to 1 if you have the `arc4random_uniform' function. */ -#undef HAVE_ARC4RANDOM_UNIFORM - -/* Define to 1 if you have the header file. */ -#undef HAVE_ARPA_INET_H - -/* Whether the C compiler accepts the "format" attribute */ -#undef HAVE_ATTR_FORMAT - -/* Whether the C compiler accepts the "noreturn" attribute */ -#undef HAVE_ATTR_NORETURN - -/* Whether the C compiler accepts the "unused" attribute */ -#undef HAVE_ATTR_UNUSED - -/* Whether the C compiler accepts the "weak" attribute */ -#undef HAVE_ATTR_WEAK - -/* If we have be64toh */ -#undef HAVE_BE64TOH - -/* Define to 1 if you have the `BIO_set_callback_ex' function. */ -#undef HAVE_BIO_SET_CALLBACK_EX - -/* Define to 1 if you have the header file. */ -#undef HAVE_BSD_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_BSD_STRING_H - -/* Define to 1 if you have the `chown' function. */ -#undef HAVE_CHOWN - -/* Define to 1 if you have the `chroot' function. */ -#undef HAVE_CHROOT - -/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ -#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA - -/* Define to 1 if you have the `CRYPTO_THREADID_set_callback' function. */ -#undef HAVE_CRYPTO_THREADID_SET_CALLBACK - -/* Define to 1 if you have the `ctime_r' function. */ -#undef HAVE_CTIME_R - -/* Define to 1 if you have the `daemon' function. */ -#undef HAVE_DAEMON - -/* Define to 1 if you have the declaration of `arc4random', and to 0 if you - don't. */ -#undef HAVE_DECL_ARC4RANDOM - -/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0 - if you don't. */ -#undef HAVE_DECL_ARC4RANDOM_UNIFORM - -/* Define to 1 if you have the declaration of `evsignal_assign', and to 0 if - you don't. */ -#undef HAVE_DECL_EVSIGNAL_ASSIGN - -/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you - don't. */ -#undef HAVE_DECL_INET_NTOP - -/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you - don't. */ -#undef HAVE_DECL_INET_PTON - -/* Define to 1 if you have the declaration of `nghttp2_session_server_new', - and to 0 if you don't. */ -#undef HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW - -/* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you - don't. */ -#undef HAVE_DECL_NID_ED25519 - -/* Define to 1 if you have the declaration of `NID_ED448', and to 0 if you - don't. */ -#undef HAVE_DECL_NID_ED448 - -/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you - don't. */ -#undef HAVE_DECL_NID_SECP384R1 - -/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0 - if you don't. */ -#undef HAVE_DECL_NID_X9_62_PRIME256V1 - -/* Define to 1 if you have the declaration of `reallocarray', and to 0 if you - don't. */ -#undef HAVE_DECL_REALLOCARRAY - -/* Define to 1 if you have the declaration of `redisConnect', and to 0 if you - don't. */ -#undef HAVE_DECL_REDISCONNECT - -/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0 - if you don't. */ -#undef HAVE_DECL_SK_SSL_COMP_POP_FREE - -/* Define to 1 if you have the declaration of - `SSL_COMP_get_compression_methods', and to 0 if you don't. */ -#undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS - -/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to - 0 if you don't. */ -#undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO - -/* Define to 1 if you have the declaration of `strlcat', and to 0 if you - don't. */ -#undef HAVE_DECL_STRLCAT - -/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you - don't. */ -#undef HAVE_DECL_STRLCPY - -/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if - you don't. */ -#undef HAVE_DECL_XML_STOPPARSER - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the `DSA_SIG_set0' function. */ -#undef HAVE_DSA_SIG_SET0 - -/* Define to 1 if you have the header file. */ -#undef HAVE_ENDIAN_H - -/* Define to 1 if you have the `endprotoent' function. */ -#undef HAVE_ENDPROTOENT - -/* Define to 1 if you have the `endpwent' function. */ -#undef HAVE_ENDPWENT - -/* Define to 1 if you have the `endservent' function. */ -#undef HAVE_ENDSERVENT - -/* Define to 1 if you have the `ENGINE_cleanup' function. */ -#undef HAVE_ENGINE_CLEANUP - -/* Define to 1 if you have the `ERR_free_strings' function. */ -#undef HAVE_ERR_FREE_STRINGS - -/* Define to 1 if you have the `ERR_load_crypto_strings' function. */ -#undef HAVE_ERR_LOAD_CRYPTO_STRINGS - -/* Define to 1 if you have the `event_assign' function. */ -#undef HAVE_EVENT_ASSIGN - -/* Define to 1 if you have the `event_base_free' function. */ -#undef HAVE_EVENT_BASE_FREE - -/* Define to 1 if you have the `event_base_get_method' function. */ -#undef HAVE_EVENT_BASE_GET_METHOD - -/* Define to 1 if you have the `event_base_new' function. */ -#undef HAVE_EVENT_BASE_NEW - -/* Define to 1 if you have the `event_base_once' function. */ -#undef HAVE_EVENT_BASE_ONCE - -/* Define to 1 if you have the header file. */ -#undef HAVE_EVENT_H - -/* Define to 1 if you have the `EVP_aes_256_cbc' function. */ -#undef HAVE_EVP_AES_256_CBC - -/* Define to 1 if you have the `EVP_cleanup' function. */ -#undef HAVE_EVP_CLEANUP - -/* Define to 1 if you have the `EVP_default_properties_is_fips_enabled' - function. */ -#undef HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED - -/* Define to 1 if you have the `EVP_DigestVerify' function. */ -#undef HAVE_EVP_DIGESTVERIFY - -/* Define to 1 if you have the `EVP_dss1' function. */ -#undef HAVE_EVP_DSS1 - -/* Define to 1 if you have the `EVP_EncryptInit_ex' function. */ -#undef HAVE_EVP_ENCRYPTINIT_EX - -/* Define to 1 if you have the `EVP_MAC_CTX_set_params' function. */ -#undef HAVE_EVP_MAC_CTX_SET_PARAMS - -/* Define to 1 if you have the `EVP_MD_CTX_new' function. */ -#undef HAVE_EVP_MD_CTX_NEW - -/* Define to 1 if you have the `EVP_sha1' function. */ -#undef HAVE_EVP_SHA1 - -/* Define to 1 if you have the `EVP_sha256' function. */ -#undef HAVE_EVP_SHA256 - -/* Define to 1 if you have the `EVP_sha512' function. */ -#undef HAVE_EVP_SHA512 - -/* Define to 1 if you have the `ev_default_loop' function. */ -#undef HAVE_EV_DEFAULT_LOOP - -/* Define to 1 if you have the `ev_loop' function. */ -#undef HAVE_EV_LOOP - -/* Define to 1 if you have the header file. */ -#undef HAVE_EXPAT_H - -/* Define to 1 if you have the `explicit_bzero' function. */ -#undef HAVE_EXPLICIT_BZERO - -/* Define to 1 if you have the `fcntl' function. */ -#undef HAVE_FCNTL - -/* Define to 1 if you have the `FIPS_mode' function. */ -#undef HAVE_FIPS_MODE - -/* Define to 1 if you have the `fork' function. */ -#undef HAVE_FORK - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -#undef HAVE_FSEEKO - -/* Define to 1 if you have the `fsync' function. */ -#undef HAVE_FSYNC - -/* Whether getaddrinfo is available */ -#undef HAVE_GETADDRINFO - -/* Define to 1 if you have the `getauxval' function. */ -#undef HAVE_GETAUXVAL - -/* Define to 1 if you have the `getentropy' function. */ -#undef HAVE_GETENTROPY - -/* Define to 1 if you have the `getifaddrs' function. */ -#undef HAVE_GETIFADDRS - -/* Define to 1 if you have the header file. */ -#undef HAVE_GETOPT_H - -/* Define to 1 if you have the `getpwnam' function. */ -#undef HAVE_GETPWNAM - -/* Define to 1 if you have the `getrlimit' function. */ -#undef HAVE_GETRLIMIT - -/* Define to 1 if you have the `gettid' function. */ -#undef HAVE_GETTID - -/* Define to 1 if you have the `glob' function. */ -#undef HAVE_GLOB - -/* Define to 1 if you have the header file. */ -#undef HAVE_GLOB_H - -/* Define to 1 if you have the `gmtime_r' function. */ -#undef HAVE_GMTIME_R - -/* Define to 1 if you have the header file. */ -#undef HAVE_GRP_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_HIREDIS_HIREDIS_H - -/* Define to 1 if you have the `HMAC_Init_ex' function. */ -#undef HAVE_HMAC_INIT_EX - -/* If we have htobe64 */ -#undef HAVE_HTOBE64 - -/* Define to 1 if you have the header file. */ -#undef HAVE_IFADDRS_H - -/* Define to 1 if you have the `if_nametoindex' function. */ -#undef HAVE_IF_NAMETOINDEX - -/* Define to 1 if you have the `inet_aton' function. */ -#undef HAVE_INET_ATON - -/* Define to 1 if you have the `inet_ntop' function. */ -#undef HAVE_INET_NTOP - -/* Define to 1 if you have the `inet_pton' function. */ -#undef HAVE_INET_PTON - -/* Define to 1 if you have the `initgroups' function. */ -#undef HAVE_INITGROUPS - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* if the function 'ioctlsocket' is available */ -#undef HAVE_IOCTLSOCKET - -/* Define to 1 if you have the header file. */ -#undef HAVE_IPHLPAPI_H - -/* Define to 1 if you have the `isblank' function. */ -#undef HAVE_ISBLANK - -/* Define to 1 if you have the `kill' function. */ -#undef HAVE_KILL - -/* Use portable libbsd functions */ -#undef HAVE_LIBBSD - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIBKERN_OSBYTEORDER_H - -/* Define if we have LibreSSL */ -#undef HAVE_LIBRESSL - -/* Define to 1 if you have the header file. */ -#undef HAVE_LINUX_NET_TSTAMP_H - -/* Define to 1 if you have the `localtime_r' function. */ -#undef HAVE_LOCALTIME_R - -/* Define to 1 if you have the header file. */ -#undef HAVE_LOGIN_CAP_H - -/* If have GNU libc compatible malloc */ -#undef HAVE_MALLOC - -/* Define to 1 if you have the `memmove' function. */ -#undef HAVE_MEMMOVE - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETDB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_IN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_TCP_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETIOAPI_H - -/* Use libnettle for crypto */ -#undef HAVE_NETTLE - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETTLE_DSA_COMPAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETTLE_EDDSA_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NET_IF_H - -/* Define this to use nghttp2 client. */ -#undef HAVE_NGHTTP2 - -/* Define to 1 if you have the header file. */ -#undef HAVE_NGHTTP2_NGHTTP2_H - -/* Use libnss for crypto */ -#undef HAVE_NSS - -/* Define to 1 if you have the `OpenSSL_add_all_digests' function. */ -#undef HAVE_OPENSSL_ADD_ALL_DIGESTS - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_BN_H - -/* Define to 1 if you have the `OPENSSL_config' function. */ -#undef HAVE_OPENSSL_CONFIG - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_CONF_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_CORE_NAMES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_DH_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_DSA_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_ENGINE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_ERR_H - -/* Define to 1 if you have the `OPENSSL_init_crypto' function. */ -#undef HAVE_OPENSSL_INIT_CRYPTO - -/* Define to 1 if you have the `OPENSSL_init_ssl' function. */ -#undef HAVE_OPENSSL_INIT_SSL - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_PARAM_BUILD_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_RAND_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_RSA_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_SSL_H - -/* Define to 1 if you have the `OSSL_PARAM_BLD_new' function. */ -#undef HAVE_OSSL_PARAM_BLD_NEW - -/* Define to 1 if you have the `poll' function. */ -#undef HAVE_POLL - -/* Define to 1 if you have the header file. */ -#undef HAVE_POLL_H - -/* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD - -/* Have PTHREAD_PRIO_INHERIT. */ -#undef HAVE_PTHREAD_PRIO_INHERIT - -/* Define to 1 if the system has the type `pthread_rwlock_t'. */ -#undef HAVE_PTHREAD_RWLOCK_T - -/* Define to 1 if the system has the type `pthread_spinlock_t'. */ -#undef HAVE_PTHREAD_SPINLOCK_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_PWD_H - -/* Define if you have Python libraries and header files. */ -#undef HAVE_PYTHON - -/* Define to 1 if you have the `random' function. */ -#undef HAVE_RANDOM - -/* Define to 1 if you have the `RAND_cleanup' function. */ -#undef HAVE_RAND_CLEANUP - -/* If we have reallocarray(3) */ -#undef HAVE_REALLOCARRAY - -/* Define to 1 if you have the `recvmsg' function. */ -#undef HAVE_RECVMSG - -/* Define to 1 if you have the `sendmsg' function. */ -#undef HAVE_SENDMSG - -/* Define to 1 if you have the `setregid' function. */ -#undef HAVE_SETREGID - -/* Define to 1 if you have the `setresgid' function. */ -#undef HAVE_SETRESGID - -/* Define to 1 if you have the `setresuid' function. */ -#undef HAVE_SETRESUID - -/* Define to 1 if you have the `setreuid' function. */ -#undef HAVE_SETREUID - -/* Define to 1 if you have the `setrlimit' function. */ -#undef HAVE_SETRLIMIT - -/* Define to 1 if you have the `setsid' function. */ -#undef HAVE_SETSID - -/* Define to 1 if you have the `setusercontext' function. */ -#undef HAVE_SETUSERCONTEXT - -/* Define to 1 if you have the `SHA512_Update' function. */ -#undef HAVE_SHA512_UPDATE - -/* Define to 1 if you have the `shmget' function. */ -#undef HAVE_SHMGET - -/* Define to 1 if you have the `sigprocmask' function. */ -#undef HAVE_SIGPROCMASK - -/* Define to 1 if you have the `sleep' function. */ -#undef HAVE_SLEEP - -/* Define to 1 if you have the `snprintf' function. */ -#undef HAVE_SNPRINTF - -/* Define to 1 if you have the `socketpair' function. */ -#undef HAVE_SOCKETPAIR - -/* Using Solaris threads */ -#undef HAVE_SOLARIS_THREADS - -/* Define to 1 if you have the `srandom' function. */ -#undef HAVE_SRANDOM - -/* Define if you have the SSL libraries installed. */ -#undef HAVE_SSL - -/* Define to 1 if you have the `SSL_CTX_set_alpn_protos' function. */ -#undef HAVE_SSL_CTX_SET_ALPN_PROTOS - -/* Define to 1 if you have the `SSL_CTX_set_alpn_select_cb' function. */ -#undef HAVE_SSL_CTX_SET_ALPN_SELECT_CB - -/* Define to 1 if you have the `SSL_CTX_set_ciphersuites' function. */ -#undef HAVE_SSL_CTX_SET_CIPHERSUITES - -/* Define to 1 if you have the `SSL_CTX_set_security_level' function. */ -#undef HAVE_SSL_CTX_SET_SECURITY_LEVEL - -/* Define to 1 if you have the `SSL_CTX_set_tlsext_ticket_key_evp_cb' - function. */ -#undef HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB - -/* Define to 1 if you have the `SSL_get0_alpn_selected' function. */ -#undef HAVE_SSL_GET0_ALPN_SELECTED - -/* Define to 1 if you have the `SSL_get0_peername' function. */ -#undef HAVE_SSL_GET0_PEERNAME - -/* Define to 1 if you have the `SSL_get1_peer_certificate' function. */ -#undef HAVE_SSL_GET1_PEER_CERTIFICATE - -/* Define to 1 if you have the `SSL_set1_host' function. */ -#undef HAVE_SSL_SET1_HOST - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDARG_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDBOOL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `strftime' function. */ -#undef HAVE_STRFTIME - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strlcat' function. */ -#undef HAVE_STRLCAT - -/* Define to 1 if you have the `strlcpy' function. */ -#undef HAVE_STRLCPY - -/* Define to 1 if you have the `strptime' function. */ -#undef HAVE_STRPTIME - -/* Define to 1 if you have the `strsep' function. */ -#undef HAVE_STRSEP - -/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ -#undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST - -/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */ -#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN - -/* Define if you have Swig libraries and header files. */ -#undef HAVE_SWIG - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYSLOG_H - -/* Define to 1 if systemd should be used */ -#undef HAVE_SYSTEMD - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_ENDIAN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_IPC_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_RESOURCE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SHA2_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SHM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKET_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SYSCTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UIO_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_WAIT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_TARGETCONDITIONALS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_TIME_H - -/* Define to 1 if you have the `tzset' function. */ -#undef HAVE_TZSET - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `usleep' function. */ -#undef HAVE_USLEEP - -/* Define to 1 if you have the `vfork' function. */ -#undef HAVE_VFORK - -/* Define to 1 if you have the header file. */ -#undef HAVE_VFORK_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_WINDOWS_H - -/* Using Windows threads */ -#undef HAVE_WINDOWS_THREADS - -/* Define to 1 if you have the header file. */ -#undef HAVE_WINSOCK2_H - -/* Define to 1 if `fork' works. */ -#undef HAVE_WORKING_FORK - -/* Define to 1 if `vfork' works. */ -#undef HAVE_WORKING_VFORK - -/* Define to 1 if you have the `writev' function. */ -#undef HAVE_WRITEV - -/* Define to 1 if you have the header file. */ -#undef HAVE_WS2TCPIP_H - -/* Define to 1 if you have the `X509_VERIFY_PARAM_set1_host' function. */ -#undef HAVE_X509_VERIFY_PARAM_SET1_HOST - -/* Define to 1 if you have the `_beginthreadex' function. */ -#undef HAVE__BEGINTHREADEX - -/* If HMAC_Init_ex() returns void */ -#undef HMAC_INIT_EX_RETURNS_VOID - -/* if lex has yylex_destroy */ -#undef LEX_HAS_YYLEX_DESTROY - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#undef LT_OBJDIR - -/* Define to the maximum message length to pass to syslog. */ -#undef MAXSYSLOGMSGLEN - -/* Define if memcmp() does not compare unsigned bytes */ -#undef MEMCMP_IS_BROKEN - -/* Define if mkdir has one argument. */ -#undef MKDIR_HAS_ONE_ARG - -/* Define if the network stack does not fully support nonblocking io (causes - lower performance). */ -#undef NONBLOCKING_IS_BROKEN - -/* Put -D_ALL_SOURCE define in config.h */ -#undef OMITTED__D_ALL_SOURCE - -/* Put -D_BSD_SOURCE define in config.h */ -#undef OMITTED__D_BSD_SOURCE - -/* Put -D_DEFAULT_SOURCE define in config.h */ -#undef OMITTED__D_DEFAULT_SOURCE - -/* Put -D_GNU_SOURCE define in config.h */ -#undef OMITTED__D_GNU_SOURCE - -/* Put -D_LARGEFILE_SOURCE=1 define in config.h */ -#undef OMITTED__D_LARGEFILE_SOURCE_1 - -/* Put -D_POSIX_C_SOURCE=200112 define in config.h */ -#undef OMITTED__D_POSIX_C_SOURCE_200112 - -/* Put -D_XOPEN_SOURCE=600 define in config.h */ -#undef OMITTED__D_XOPEN_SOURCE_600 - -/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */ -#undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 - -/* Put -D__EXTENSIONS__ define in config.h */ -#undef OMITTED__D__EXTENSIONS__ - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* default pidfile location */ -#undef PIDFILE - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -#undef PTHREAD_CREATE_JOINABLE - -/* Return type of signal handlers, but autoconf 2.70 says 'your code may - safely assume C89 semantics that RETSIGTYPE is void.' */ -#undef RETSIGTYPE - -/* if REUSEPORT is enabled by default */ -#undef REUSEPORT_DEFAULT - -/* default rootkey location */ -#undef ROOT_ANCHOR_FILE - -/* default rootcert location */ -#undef ROOT_CERT_FILE - -/* version number for resource files */ -#undef RSRC_PACKAGE_VERSION - -/* Directory to chdir to */ -#undef RUN_DIR - -/* Shared data */ -#undef SHARE_DIR - -/* The size of `pthread_t', as computed by sizeof. */ -#undef SIZEOF_PTHREAD_T - -/* The size of `size_t', as computed by sizeof. */ -#undef SIZEOF_SIZE_T - -/* The size of `time_t', as computed by sizeof. */ -#undef SIZEOF_TIME_T - -/* The size of `unsigned long', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_LONG - -/* define if (v)snprintf does not return length needed, (but length used) */ -#undef SNPRINTF_RET_BROKEN - -/* Define to 1 if libsodium supports sodium_set_misuse_handler */ -#undef SODIUM_MISUSE_HANDLER - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* use default strptime. */ -#undef STRPTIME_WORKS - -/* Use win32 resources and API */ -#undef UB_ON_WINDOWS - -/* the SYSLOG_FACILITY to use, default LOG_DAEMON */ -#undef UB_SYSLOG_FACILITY - -/* default username */ -#undef UB_USERNAME - -/* use to enable lightweight alloc assertions, for debug use */ -#undef UNBOUND_ALLOC_LITE - -/* use malloc not regions, for debug use */ -#undef UNBOUND_ALLOC_NONREGIONAL - -/* use statistics for allocs and frees, for debug use */ -#undef UNBOUND_ALLOC_STATS - -/* define this to enable debug checks. */ -#undef UNBOUND_DEBUG - -/* Define to 1 to use cachedb support */ -#undef USE_CACHEDB - -/* Define to 1 to enable dnscrypt support */ -#undef USE_DNSCRYPT - -/* Define to 1 to enable dnscrypt with xchacha20 support */ -#undef USE_DNSCRYPT_XCHACHA20 - -/* Define to 1 to enable dnstap support */ -#undef USE_DNSTAP - -/* Define this to enable DSA support. */ -#undef USE_DSA - -/* Define this to enable ECDSA support. */ -#undef USE_ECDSA - -/* Define this to enable an EVP workaround for older openssl */ -#undef USE_ECDSA_EVP_WORKAROUND - -/* Define this to enable ED25519 support. */ -#undef USE_ED25519 - -/* Define this to enable ED448 support. */ -#undef USE_ED448 - -/* Define this to enable GOST support. */ -#undef USE_GOST - -/* Define to 1 to use ipsecmod support. */ -#undef USE_IPSECMOD - -/* Define to 1 to use ipset support */ -#undef USE_IPSET - -/* Define if you enable libevent */ -#undef USE_LIBEVENT - -/* Define this to enable use of /proc/sys/net/ipv4/ip_local_port_range as a - default outgoing port range. This is only for the libunbound on Linux and - does not affect unbound resolving daemon itself. This may severely limit - the number of available outgoing ports and thus decrease randomness. Define - this only when the target system restricts (e.g. some of SELinux enabled - distributions) the use of non-ephemeral ports. */ -#undef USE_LINUX_IP_LOCAL_PORT_RANGE - -/* Define if you want to use internal select based events */ -#undef USE_MINI_EVENT - -/* Define this to enable client TCP Fast Open. */ -#undef USE_MSG_FASTOPEN - -/* Define this to enable client TCP Fast Open. */ -#undef USE_OSX_MSG_FASTOPEN - -/* Define this to use hiredis client. */ -#undef USE_REDIS - -/* Define this to enable SHA1 support. */ -#undef USE_SHA1 - -/* Define this to enable SHA256 and SHA512 support. */ -#undef USE_SHA2 - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - -/* Define this to enable server TCP Fast Open. */ -#undef USE_TCP_FASTOPEN - -/* Whether the windows socket API is used */ -#undef USE_WINSOCK - -/* the version of the windows API enabled */ -#undef WINVER - -/* Define if you want dynlib module. */ -#undef WITH_DYNLIBMODULE *** 499 LINES SKIPPED *** From nobody Tue Nov 14 00:46:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STnfs0GQkz50RLR; Tue, 14 Nov 2023 00:46: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 4STnfr66chz4Pfc; Tue, 14 Nov 2023 00:46:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699922788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LRU31xeHOJ6VNf2KMwRxJlc1fkeET3NIw6/Yipmfs7Q=; b=dJxTDSOIZx8vOancIv9JlD6PKCtpZnSPy5fFE7qv65hYZ6ExgNke4EUBAyKsuCUoM7mqNZ loipViY2X3NYsiyldyV4D+/Z/XinOF8ZMeSsjtrzPouMC9VwSpZlyF4HZ9d6/hTTQS2slD z6Q0dgLQu3n5PMyUE9OdhW9xtkPJ55O0gUVZ2oEUSZTM9AjjTlrpCFiGsFpv3wsBmXjc2h HE+sNiRsZZLjjfT4mfXNdqaQJLKzHRhg/FNwkhd4AdEaqKCQzenICRfk4yqM20d3Ex52V/ mj4dBbUYgAFE7xBSSrTifNY7fu4IChVy2kSokrGCGu75OEqS8y/zyrDBwa1J2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699922788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LRU31xeHOJ6VNf2KMwRxJlc1fkeET3NIw6/Yipmfs7Q=; b=jJT9Q3tjN2ptepj4GDQ1//FkIEYhGuIxRCqA5aT1nqI+GFomx4qKdmevlLyl2SzBHGtcMe 86BekGbVh0FUJ68MikgV1SGDOoRPE9SmDXEfz9bBxMTaaQSKFmtGwyZVCL6PGKZ/d6rHEq zCF93pWbQYEJ4ZSYP+rnUwi45W760bB+Z4TqNP0vof/QqNOQ+IZmPMYP2g55YmTdsnpSMa 0+q8B8qcB9h08F/AxRwqdPeYgM1+xgHskPzgffI9zRYBFl58IW4NqSbXgKjiULYXF9t2Rf Qv/DD4GNgRLTQn0dlRAmKBbnbnnp5zORMFgeM7i+Px9K9kdh3+QTkPPddE/d4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699922788; a=rsa-sha256; cv=none; b=rLg010de959Sfx2nfxugF09yPI2CUQyhR/8sIEWWloHjnDcnn6C9wrXMhNJmyp4NJ2QcB/ A6UhARHcXQheYUHHyywUopZJ+VIqcowkRTp7FCd93PmtY1ejN+DKVi3ElNSCUJlU4JoaGu J0hvSiIBeyPFziOUzmztYnZXFxTNHQ7+HCjt4/T5rziK9zOkEJsVHy8f9ebmjOIN+2hZkH hZpyI1wHdduzL4e7X70uj3yNWuQYqhPve0UO3SFFJaxsQf7BCBh/hiyNLP5C/AvGUg50yw eNSA1MgjuhIkTBWxBw/HV4VpBjk//LkVCXafgYFgoBgWj+kGUWv3IacTkSfxyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STnfr4mRzzCp5; Tue, 14 Nov 2023 00:46: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 3AE0kS6K097926; Tue, 14 Nov 2023 00:46:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AE0kSiP097923; Tue, 14 Nov 2023 00:46:28 GMT (envelope-from git) Date: Tue, 14 Nov 2023 00:46:28 GMT Message-Id: <202311140046.3AE0kSiP097923@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: 67267734315c - main - Unbound: Manually update version strings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 67267734315c6a48db31697f0a0669fa1f985969 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=67267734315c6a48db31697f0a0669fa1f985969 commit 67267734315c6a48db31697f0a0669fa1f985969 Author: Cy Schubert AuthorDate: 2023-11-14 00:39:10 +0000 Commit: Cy Schubert CommitDate: 2023-11-14 00:46:12 +0000 Unbound: Manually update version strings This was missed earlier today. Reported by: "Herbert J. Skuhra" Fixes: 16fd0b249104 MFC: 2 weeks --- lib/libunbound/config.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libunbound/config.h b/lib/libunbound/config.h index ef552a856a9d..2fe30076a109 100644 --- a/lib/libunbound/config.h +++ b/lib/libunbound/config.h @@ -793,7 +793,7 @@ #define PACKAGE_NAME "unbound" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "unbound 1.18.0" +#define PACKAGE_STRING "unbound 1.19.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "unbound" @@ -802,7 +802,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.18.0" +#define PACKAGE_VERSION "1.19.0" /* default pidfile location */ #define PIDFILE "/var/unbound/unbound.pid" @@ -825,7 +825,7 @@ #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem" /* version number for resource files */ -#define RSRC_PACKAGE_VERSION 1,18,0,0 +#define RSRC_PACKAGE_VERSION 1,19,0,0 /* Directory to chdir to */ #define RUN_DIR "/var/unbound" From nobody Tue Nov 14 00:47:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STngZ28Nmz50RXm; Tue, 14 Nov 2023 00:47: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 4STngZ1RnSz4Qfx; Tue, 14 Nov 2023 00:47:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699922826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1fMBgNJPAFFJuBGTbf2ZeNI5oOco++E8QjECo+5ZjA0=; b=AOZ7fDUuqznfY+yiDSPvodzGSSPgXVzr83GKAbRQjLd0D8EzVfBjq1+Ah4OWCNFkNp4u/C sVYafWTDAkuiPUMl9YVYa1npun+pMZ8HtQ7e7r3me7dnG5n+CBmOcYPcgaSB4e53PgL3id r+c0qbrebzPb2dCIyzSvcq4XLM/QkfvV1e9UyiTs9bhkbNYuRf+nVXGgkc2tVAlWLGNjhp RV3ypOKDPbICVoWDyfqFqhy5K4EcYs9P4AnrbhvjrOzcxbncvCdDLmU5VCbI14h3K8Jnxt 55k4yXwywRhlEQclDaiJ9NSndOHbkGFyeyaw/aCILtSvyRVTWcX1cykUISowWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699922826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1fMBgNJPAFFJuBGTbf2ZeNI5oOco++E8QjECo+5ZjA0=; b=CTIRG6rDUDPkEr6O38p+f7ZFIaHNED2e14+AFqO7gGHjzOuW2Qex/s6ir+49NmI3RawaG5 hAf2asL9YylF6utSyY974XVlZjaJAPsanfV+KCPaKqJja8VFrnIRv9SChUgUVJJqHe/Tqw pHetCzLDPN0YqQlfMwD7+ymSMp+scv73Le0rpy0lhz7msGaLei7Hi/VXqqnuQWocYhTwAr tUIaXy7nWvJvosnW+u0KsJ7LsYQj7thqiGbjaW0VK3bQsf/64uw8AkBrn8blaZRIK+lEQ+ UXBNcfpAEe8uKAu2BeEZwkzS8p8IxqwhsgJQfgleNBoICC4wpMKaasb1hSnJIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699922826; a=rsa-sha256; cv=none; b=iala9mjsZzJOrnNUGnB0xV60bDwehQAF2SSwVi19TK7VZQiG+Vk0tg6kHXA5V+CgJ/MzgS oiTb99P4gQxOcly41QqLedYxAw3XG58KsoN9LwYiw86GfoZ1vlv9E6Zrezrqi1bj0hwvsO Mt9W7Y0OtssZFjw48KkL1iWwrWaTQQsFSbB58tSG8nGyQeDsjNvY4xzH4rzb+6NyscV522 7OGEQOw4s4HS9QaYWawsro1J2zqnjLSvOBRf2XtgkVRPfWs5Ku40+rthDBFRHyAkhB8YM1 z86b5BFzdA2DRJyLWBzZiXqz2httLwpf70wjwW1/PFXRBGYwtzfzVDO6ET4akg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STngZ0XB7zCx6; Tue, 14 Nov 2023 00:47: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 3AE0l5AH098176; Tue, 14 Nov 2023 00:47:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AE0l5Cb098173; Tue, 14 Nov 2023 00:47:05 GMT (envelope-from git) Date: Tue, 14 Nov 2023 00:47:05 GMT Message-Id: <202311140047.3AE0l5Cb098173@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: ab063ac4444e - main - ipmi_ssif: Fix typo in debug print List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ab063ac4444e426759cb5d053e50e02fa078a3c6 Auto-Submitted: auto-generated The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=ab063ac4444e426759cb5d053e50e02fa078a3c6 commit ab063ac4444e426759cb5d053e50e02fa078a3c6 Author: Andrew Gallatin AuthorDate: 2023-11-14 00:44:27 +0000 Commit: Andrew Gallatin CommitDate: 2023-11-14 00:46:56 +0000 ipmi_ssif: Fix typo in debug print Fix a typo in a debug print that prevents compilation. Sponsored by: Netflix --- sys/dev/ipmi/ipmi_ssif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ipmi/ipmi_ssif.c b/sys/dev/ipmi/ipmi_ssif.c index 3ac1e04c2eda..532d1f7f485c 100644 --- a/sys/dev/ipmi/ipmi_ssif.c +++ b/sys/dev/ipmi/ipmi_ssif.c @@ -200,7 +200,7 @@ read_start: goto fail; } #ifdef SSIF_DEBUG - device_printf("SSIF: READ_START: ok\n"); + device_printf(dev, "SSIF: READ_START: ok\n"); #endif /* From nobody Tue Nov 14 01:01:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STp023RvJz50VHH; Tue, 14 Nov 2023 01: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 4STp021cRzz4SVG; Tue, 14 Nov 2023 01:01:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699923682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IMSNkSMzW3+4C/Mv28wdFjZl2jAuu887G4YL/JTH2Uc=; b=gTpoC05pyC54ZN6Bt72tBt/Y/TOtYzX0i0MT4Ai0plAKSbWjBo8z7kxv4a4X0XneCKjUnx it7R9PjEnDx0CTq/gutMIl3yl1jnBqPYHvxwHt2yV0laGy+6LWKOeMNMepw/rupi4Yuy9P 1hrJdoyRItjvplzrdWEKeqLPpp4ernjFR7ChBVL1ETBA6tgZZfq1f/HkMW5GZG7haTQ357 dePBe+fS2GI1YkeRGq6iBnB08xCkgK8mIky0q7Mu78KkZ3m/bHIhN8ZL5ZB9RErwZC3Ib6 snEk/OqVGTZpyHAuZugrOJxTGMcQUqzqgVc0JWw4O2N+w4XF33VMWDpATZo10A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699923682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IMSNkSMzW3+4C/Mv28wdFjZl2jAuu887G4YL/JTH2Uc=; b=iShivzN6LI4sBJb7aK0P8vqKIlcMHwJ+j5sLLRXsVM/xmTIfMiouaFwpf4pmN4mkOn1cHd JAHE3kupQenI9jdImZDw7/W63aqFmsAo5U0U0LmwoY51p6uaPg9prcwcNOvkDDtzMnCTJI e4z0c6ZGznlXB6vUNhIU0V8dowO8KbbzTtXb5rpUXLI4aZfiUqEEd4O5gkbw9vL637Jxju KttJfPmTUa0v1lUjoG4tyiKvDTObgCl+q9FX6mLEkFj3i4N0VyeBJv4rozz0haMc6xKfsP vYGX7HGoC+6i9CgpPnfhbxmNy+YW4SGrg9jh8/1cTOzidek7KyiGzMRDV3WXsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699923682; a=rsa-sha256; cv=none; b=P3oD2vS8h5EOIiVx2sLeMR+yCJRUhDw9bnnq38Bf7UscX0dRqMd6kQEt8cT9tpznPHVgvm a8yGRhlKaY9I/T73H7klWnepqrydQWjzBuB5uKuqc7F8z4A+z+WqIw6nMwOfZmMH62ITCT yYe/bMiWK4YAnLND78WvYGFJti8ORlNPD+EvYi2FrLOQQOaaZOJQE2Loju7FnQFpWov3w8 noqYWrvLjEjqrpAXxkcgS5tC90Vtjism5IFC9twKxqxiRhyDJrdpzOVOoCvmBj+hyx3Tzv YUkb2utSmYk1ad4HbHCrq1oz50c1nbNYrdeJFyhs2L7YQm5XdEBWVkOIbWcJTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STp020g9mzCnF; Tue, 14 Nov 2023 01: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 3AE11Lnd027110; Tue, 14 Nov 2023 01: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 3AE11L4a027107; Tue, 14 Nov 2023 01:01:21 GMT (envelope-from git) Date: Tue, 14 Nov 2023 01:01:21 GMT Message-Id: <202311140101.3AE11L4a027107@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: 9b57e30cf5b6 - main - abort2: Generate a core dump List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 9b57e30cf5b6036263a1a2551df8574571c6f5a4 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9b57e30cf5b6036263a1a2551df8574571c6f5a4 commit 9b57e30cf5b6036263a1a2551df8574571c6f5a4 Author: John Baldwin AuthorDate: 2023-11-14 01:00:52 +0000 Commit: John Baldwin CommitDate: 2023-11-14 01:00:52 +0000 abort2: Generate a core dump Call sigexit rather than exit1 so that a core is generated. If running the SIGABRT handler is desired, this would need to use kern_psignal() instead. In that case a userspace wrapper in libc would be needed to force an exit if the handler doesn't exit. Given that abort2(2)'s intended use case is when userland is in a sufficiently bad state such that it can't safely call syslog(3) before abort(3), a userspace abort2(3) wrapper in libc might be dubious. Reviewed by: Olivier Certner , emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42163 --- sys/kern/kern_exit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 965f4a431755..f9445a481d92 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -827,8 +827,9 @@ out: sbuf_finish(sb); log(LOG_INFO, "%s", sbuf_data(sb)); sbuf_delete(sb); - exit1(td, 0, sig); - return (0); + PROC_LOCK(p); + sigexit(td, sig); + /* NOTREACHED */ } #ifdef COMPAT_43 From nobody Tue Nov 14 02:04:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STqNQ4VHHz50jWT; Tue, 14 Nov 2023 02:04: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 4STqNQ44S1z4bg7; Tue, 14 Nov 2023 02:04:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699927446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3JclhgPWkDy2/Dyp4vS9XuxNmJHeAKEckcNYlxmrBxI=; b=HpT7sh0er+7c5m8ha6phdnB5b3FPf6vMLngnnyxh98Ypxbj8MOZOVDr/uH1X9JsK+/Sgsz 1IbIdXLwAqHHVSthku2gsGZXvXuDvffvO8yPjKhZwO6oRWbXc+ZEtVzoeeVu031oVo8daH jwEMBCMy4sTyzUZ24CFBkgAAa85NnZzxyj2CX5EVe8VO13NYH5Q/1gIak3BarmAsQp9TEz 7cNovUp1LqmPj/G1mHeqoJzHkLYipL8TT5+Y1QdWpO3BKfsgZVGMuuvK6CXX4Tfgu0fp+m txAeZf+0KpOjdO4U3tikAyiRarNlzEyS0zhesbAWbtHPl8xeLhwmQaoEYGPgdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699927446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3JclhgPWkDy2/Dyp4vS9XuxNmJHeAKEckcNYlxmrBxI=; b=YRwxfWNexl7W1LIDeYUykNMODH9017f4CMf2J3hI6D0Iuf4TTdFN7n+Vth8IaoaRtSLVbC eoLQQ3wiV78W3/mDQ4xFAwEJXoTmPbKIqM0teaQfVVRQlSKRONYJnYsK8Ad1Um+FQiUCzm 2EEHxXz1aN7TE3hFMTNz9dQFr9NC3kHDZh0nSs2FU5ATz7GhmEEWpRZhch6BOspJ15W5FB HOxxo0fM/GRoHNfi+Em9XWCDCVrcQ3Q/hfAsV4WaUW+XBkDBTN0jp65V94/Ia+tkf93FKe WybLmaC4sRyRHLXS4TwxrDKPBGB/wE4jsGoJy7VhZXtZ3cTQfdbjXrA+zuQIkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699927446; a=rsa-sha256; cv=none; b=EdmaY7uf39RN+0Iuo+yRyMqUp9ChnFWOnaunNHg6DNSH2Nu+RWKbPgRUCwYUR6s7LrINPe hS1TmK6/zq+JgHlUzcNNO7jIDEmIbOESYAbbiOASe6peD4/M+BbtSdHKyxhYvG9aVt+clq SteT+J6jK6jGL+Xn8k5+U6MXaHTm6H5ZaPbyacwkaXNBUuchSF2qWypVHgEQdrWFnvxBNl Me9T2ouCYMCOnEOqhuLkvE81n86qDFyJJ0FzEfsxMQj3ZVycGx7bOi34dGy9APfYNKkDDy H2G+p1jodEyR1QU3qTMKFWmBx5Unh0yQgoJEVmONhPGXO/+qotXI5SnIgBL8uA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STqNQ37D7zVXk; Tue, 14 Nov 2023 02:04: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 3AE246AJ031775; Tue, 14 Nov 2023 02:04:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AE246ff031772; Tue, 14 Nov 2023 02:04:06 GMT (envelope-from git) Date: Tue, 14 Nov 2023 02:04:06 GMT Message-Id: <202311140204.3AE246ff031772@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: 260e63b3d53c - stable/14 - nfscl: Handle the NFSERR_RETRYUNCACHEDREP error from a NFSv4 server List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 260e63b3d53c7df51fbe3169a7b96d7c479275af Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=260e63b3d53c7df51fbe3169a7b96d7c479275af commit 260e63b3d53c7df51fbe3169a7b96d7c479275af Author: Rick Macklem AuthorDate: 2023-10-18 19:42:12 +0000 Commit: Rick Macklem CommitDate: 2023-11-14 02:03:14 +0000 nfscl: Handle the NFSERR_RETRYUNCACHEDREP error from a NFSv4 server In a recent email list discussion related to NFSv4 mount problems against a non-FreeBSD NFSv4 server, the reporter of the issue noted that the server had replied 10068 (NFSERR_RETRYUNCACHEDREP). This did not seem related to the mount problem, but I had never seen this error before. It indicates that an RPC retry after a new TCP connection has been established failed because the server did not cache the reply. Since this should only happen for idempotent operations, redoing the RPC should be safe. This patch modifies the NFSv4.1/4.2 client to redo the RPC instead of considering the server error fatal. It should only affect the unusual case where TCP connections to NFSv4 servers are breaking without the NFSv4 server rebooting. MFC after: 2 weeks (cherry picked from commit c4e298251ab01665f5bb3edeb740a51331818a45) --- sys/fs/nfs/nfs_commonkrpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 29c7cdbd671c..29fbb8dc4351 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -1300,7 +1300,8 @@ tryagain: nd->nd_procnum != NFSPROC_LOCKU))) || (nd->nd_repstat == NFSERR_DELAY && (nd->nd_flag & ND_NFSV4) == 0) || - nd->nd_repstat == NFSERR_RESOURCE) { + nd->nd_repstat == NFSERR_RESOURCE || + nd->nd_repstat == NFSERR_RETRYUNCACHEDREP) { /* Clip at NFS_TRYLATERDEL. */ if (timespeccmp(&trylater_delay, &nfs_trylater_max, >)) From nobody Tue Nov 14 02:07:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STqSs70nkz50kL5; Tue, 14 Nov 2023 02: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 4STqSs6X88z4cCb; Tue, 14 Nov 2023 02: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=1699927677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lyZH9wweQlPkQnyF8MVE9jjNN9P3rI/gxHg8qPdxvTM=; b=GTY7GMIKFfE7QDRfqvwjuCJx/VtLeHQlzSJ++xJKJeKO+O/kW0rbeW3iPDm3hXngFtB+wv fjUkVBsRArGxdOHRVl+4GWIGVvklF0JQh83xYOvkg/dUp3HPP10sDekoggadelukm0yqZ0 IMjQUYsILAwpqOOx7va4QVfKmbPqksbsSfzvWTcmbmPcEJeh7pSRMDav8ewUKYdm43VI5+ 52rv5Z0+l4n11/cEVMw3olwiPgw+VxY6NkGVR/MFqEZMRWMz4SY6bK7+g3TwQD7gXq4AyL CjJ7T5ABpoAEPyzQ+wdqv8JK3gMM8/fiVcuRrRNzcSWqoesTRrrtL6RkSPO7eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699927677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lyZH9wweQlPkQnyF8MVE9jjNN9P3rI/gxHg8qPdxvTM=; b=hJkb5NKJgmtatI6FYV9MbvyqkOi3KOrDrVnuWMYBu0EnDr9zeFhPhbKp455DhuhN0qkQpF tKlq+ipVBBXL0dgfz1skgVGbddXiclwvdR0FPJHpRzSNh8KoSBAnGKfU0hKeAYY1DL8Yhf Tz+FmZpjOGsehs7/Qtz6VoCfmJCb+n14K9yaKb8ZPG8bZFOIiyGBw1ot0MgjnMUUg3g9Yu FLjhiR5WPiWAv/li2ooqXihiDLVggKHou+H+luNnmc4cjKcdAx4JVW7+85dwpX/GgwJDKs cTjx3EmDOHBTPoJ0nG010wRUZMZgla5ZkvGiOKt6gQBOjLxXiwwUp5X0YWFbSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699927677; a=rsa-sha256; cv=none; b=HvenT1rOA2wPPL1dIPsrvAUuHIGqFtmZuv5phRZxm9wJkfXKs/RS0hyzveSj4YxCU6G0yY xop340Yw525UkqlcyAtrCsW4dFPeOJ9UIusVe9k55RiahuAeH14RWe8xEnjb02o4xjj8op ii9yyb3m3PBRBTvmBMYpThKhJXZ6IQwS3u+qoe0yVFdlFEWjtSzmgylDbCVxh+VRZgoJFo ahtxMNng4/thsIDd4p2VYuAjQr/rHtDn7gdIroHQ8zD0xLidEA4U7/+1KCZW5vJIENXpAd XbiRJw6DaE34nTWi10vdoF7V7yvtWexROftO5ldJP3Ukr9kp8/SkeXy4jIlicA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STqSs5ZyZzWLn; Tue, 14 Nov 2023 02: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 3AE27vF2032391; Tue, 14 Nov 2023 02: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 3AE27vAg032388; Tue, 14 Nov 2023 02:07:57 GMT (envelope-from git) Date: Tue, 14 Nov 2023 02:07:57 GMT Message-Id: <202311140207.3AE27vAg032388@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: bcbbacb7d014 - stable/13 - nfscl: Handle the NFSERR_RETRYUNCACHEDREP error from a NFSv4 server List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: bcbbacb7d014161b2f98b25d81f530cccbc49845 Auto-Submitted: auto-generated The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=bcbbacb7d014161b2f98b25d81f530cccbc49845 commit bcbbacb7d014161b2f98b25d81f530cccbc49845 Author: Rick Macklem AuthorDate: 2023-10-18 19:42:12 +0000 Commit: Rick Macklem CommitDate: 2023-11-14 02:07:17 +0000 nfscl: Handle the NFSERR_RETRYUNCACHEDREP error from a NFSv4 server In a recent email list discussion related to NFSv4 mount problems against a non-FreeBSD NFSv4 server, the reporter of the issue noted that the server had replied 10068 (NFSERR_RETRYUNCACHEDREP). This did not seem related to the mount problem, but I had never seen this error before. It indicates that an RPC retry after a new TCP connection has been established failed because the server did not cache the reply. Since this should only happen for idempotent operations, redoing the RPC should be safe. This patch modifies the NFSv4.1/4.2 client to redo the RPC instead of considering the server error fatal. It should only affect the unusual case where TCP connections to NFSv4 servers are breaking without the NFSv4 server rebooting. MFC after: 2 weeks (cherry picked from commit c4e298251ab01665f5bb3edeb740a51331818a45) --- sys/fs/nfs/nfs_commonkrpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 29c7cdbd671c..29fbb8dc4351 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -1300,7 +1300,8 @@ tryagain: nd->nd_procnum != NFSPROC_LOCKU))) || (nd->nd_repstat == NFSERR_DELAY && (nd->nd_flag & ND_NFSV4) == 0) || - nd->nd_repstat == NFSERR_RESOURCE) { + nd->nd_repstat == NFSERR_RESOURCE || + nd->nd_repstat == NFSERR_RETRYUNCACHEDREP) { /* Clip at NFS_TRYLATERDEL. */ if (timespeccmp(&trylater_delay, &nfs_trylater_max, >)) From nobody Tue Nov 14 04:42:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STtv52FbDz51F30; Tue, 14 Nov 2023 04:42: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 4STtv51ksNz4vZl; Tue, 14 Nov 2023 04:42:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699936945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XRvh8TSgXsSAbImRdd3Ns/WZ2MjzKJZLJs5B5KPNywQ=; b=iuqaknqDFLzPHNvF/T6Yb3Kwi6K585hZ+xxl9tAHio7PUkp5rg2Tu2z1Csvzi3jGtdIrp9 C9yMXxoNkUETaVgCIx6wAmd23gqEYdpoi/ITSn9fcp7aPic9ubItS2rKEcVjz+NqEHlwOJ RVdlH2ZVLQIM2u83mxTtFg4KcK2SmzgRwO7K78NXOX+TozPe7QHuz5tem0w4nFOULgM+Vv HduIczNvgsoUhE985Bbiy3D1dkE+WJvpEXl9koiO5aTaG7axzCNgKtczkDS3a27Y1AtGcA vJpvWhBz8DC6B37EKKqYOKU5NIywpeYgEDMwuzy+mLoL4Qpe2z4WlJihTEfJ8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699936945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XRvh8TSgXsSAbImRdd3Ns/WZ2MjzKJZLJs5B5KPNywQ=; b=dhLSWH+ljM5oCinIbqh6NVSIbQu4mXp4tkXopkElpIVuzw5ZrUKWgJ3ssOlScWatyikEM/ WF52GmDqSxG63kwtTmPaXGDRgjxXUa8bO6Gje7W7N9WqSttZ4COqX9NqM/bY2tIJmMARmX eP2us2RdOvP38FGyz0uXSxjFqrSeZIv2kocIe3ukxe6Epeychj/I0YQGECEFHKD9ak0snU rAjefOzLfPGea5HcE0OCIVE80c5NcS5v2SSVG7bMeyfo8q7VYk57vO11dt3XE5S7ymazL8 uJFeHa6VGJTTAjVo4RXP9kAqMkxhEgS6HIINE70pYh2DshE2pb9i/cBBfV/gNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699936945; a=rsa-sha256; cv=none; b=mD5ctfYiKR49R5kPqznvf3IpMiDOIEUv0sydaTofcI7RSjdegJU4OQyuU67fHvBV7JwJtC P5d4itxUAOh5bwXC/C6BLomZW1V63C4fDFfoy2RNTbBtj3eD0GUaF13LpCKS6nySIc/8+L VNN6rkOYMvsu+N6jDz5D0i04Z2dstsdBUY5xvPo2xv53ka+aHa0zXNhl4HMM9qJtjg+lsa 4LUeizOAIxA8GF2/2te7Enac+c8oPKPFHGSbNlJ1qqRYC+WLi3YSW2PpvEEPnykPAAdm9U ZPD0WBAFjX3CBjdO5RtjAKm16bxYyzv+R016IFxWlDSHuJfVu3k4llBrUOioHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STtv50pfVzbHW; Tue, 14 Nov 2023 04:42: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 3AE4gPGO099395; Tue, 14 Nov 2023 04:42:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AE4gPj9099392; Tue, 14 Nov 2023 04:42:25 GMT (envelope-from git) Date: Tue, 14 Nov 2023 04:42:25 GMT Message-Id: <202311140442.3AE4gPj9099392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 194df014feeb - main - ipfw: fix copy&paste bug for number:array tables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 194df014feebd8b169b41ecd75ae73d63a792d6b Auto-Submitted: auto-generated The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=194df014feebd8b169b41ecd75ae73d63a792d6b commit 194df014feebd8b169b41ecd75ae73d63a792d6b Author: Andrey V. Elsukov AuthorDate: 2023-11-14 04:37:04 +0000 Commit: Andrey V. Elsukov CommitDate: 2023-11-14 04:37:04 +0000 ipfw: fix copy&paste bug for number:array tables Use compare_numarray() method for binary search. This fixes table lookups for keys greater than UINT16_MAX. Obtained from: Yandex LLC MFC after: 1 week Sponsored by: Yandex LLC --- sys/netpfil/ipfw/ip_fw_table_algo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfw/ip_fw_table_algo.c b/sys/netpfil/ipfw/ip_fw_table_algo.c index 2fa65c78c453..89e6b69bc3ad 100644 --- a/sys/netpfil/ipfw/ip_fw_table_algo.c +++ b/sys/netpfil/ipfw/ip_fw_table_algo.c @@ -2693,7 +2693,7 @@ numarray_find(struct table_info *ti, void *key) struct numarray *ri; ri = bsearch(key, ti->state, ti->data, sizeof(struct numarray), - compare_ifidx); + compare_numarray); return (ri); } From nobody Tue Nov 14 04:51:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STv5F5Fmgz51Fxb; Tue, 14 Nov 2023 04:51: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 4STv5F53jmz3Cl7; Tue, 14 Nov 2023 04:51:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699937473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f8qgQv4Ij7AaqzJt9NkosyG1Yfihu3z2FzDUrDe//ps=; b=e/N2WwSmsZrSAD9wpVgR7AQZ/znJ09CwSa8d7B6JVJP05wtLkv4trVblSUELiP2/UqYbh/ F33wt+m8S6x4qkuJbzxKw8NQbc0vK/9eLWfj4iZPyZUHdrUgFMfuKNTN2YNjJveOzxGJj3 Tqp7yqFao56xnEZm64pg2BlMg0lqSdWXlpnhDy/Mnj2XbxsRFj6tT/QQNOjbKJdfQDaB9M rOwTnN800VwQHYhpfrkho+gfoeUOSUdCjyRmmqeRri8JuPgu7zuBHtA3ymEWdZ6mHo6S46 QDYCAQu6ScK2Fw2Hz4cTooLXUO8A8caM54193HmE+jF8Leoq6ebgx6zx8OLOPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699937473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f8qgQv4Ij7AaqzJt9NkosyG1Yfihu3z2FzDUrDe//ps=; b=WluNsbBhPIZ/5+My4OiOvi2aIDCkMNFPNAQiqPGC0RrLa03HvGPuib7sPkHjwDudWkCgwQ RqW/WaK64m+MnJD8+lh+7SaIjYH3H2K7j1ZDXotx6u4LpNTSstrvAGK98eGJubEYscLiN8 4NoWrdWW9hr0U7YTa9KdmDZ0Zgly3Tmnjx9x1DyAiyC8Ck0CPPUvgO1R1x9GXWDE0IQX31 pmlYPT0Gc/HY8E5vE1PLfLCeJS3S8IVE1nQ+jcluCdhVmXF2qN3mFNukbOniv0Zcph731d xCZaBiYmgL86dQZtCKCXe1xx9V9eHVTma6yPPHBvwSR6rgGqFIwiHPabkLPzQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699937473; a=rsa-sha256; cv=none; b=DdEFEwTryCkvWnw4NhAk17f0Ez5Ecdx/wGyRCID7lZwPWcMEMlmv+Nzq0ltNK9TZq4RuIs PjArw6HBG2fJlqiAYE08iEefzOogzz10ricEwg6qzTvB7Sl9S87Qp8eSCCNhXBY1baEjbY OSZaohGrxMFTgGi2AqLhhBSK2XKBMfUFWtPpUWmbVuVjG6N7mmm52h+N6S/ZWUcHBm6k8N 01vxd1oZio+WiLw6/79JoxwB/uD5NA4pSTYVUcMeoVdaZ7IOeNr5OPn+0xGiTerSlSpYyw JQgt/bV95BSAPQu6m/UWKLVTy619cXSBKL70xcxDZPerCBkc30GCLhdYk+8GsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STv5F47nnzbGn; Tue, 14 Nov 2023 04:51: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 3AE4pDS1014218; Tue, 14 Nov 2023 04:51:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AE4p5AR014207; Tue, 14 Nov 2023 04:51:05 GMT (envelope-from git) Date: Tue, 14 Nov 2023 04:51:05 GMT Message-Id: <202311140451.3AE4p5AR014207@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: 3fd60a6b73ac - main - awk: Merge upstream 2nd Edition Awk Book List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3fd60a6b73ac01a72df89751f173970fae4cae73 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3fd60a6b73ac01a72df89751f173970fae4cae73 commit 3fd60a6b73ac01a72df89751f173970fae4cae73 Merge: 194df014feeb 2e406c584fe4 Author: Warner Losh AuthorDate: 2023-11-02 16:32:01 +0000 Commit: Warner Losh CommitDate: 2023-11-14 04:49:34 +0000 awk: Merge upstream 2nd Edition Awk Book Merge in the November 2nd, 2023 version of one true awk. This brings in Unicode support, CSV support and a number of bug fixes. Sponsored by: Netflix Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D42447 .gitattributes | 1 + UPDATING | 5 + contrib/one-true-awk/FIXES | 1373 +------------------ contrib/one-true-awk/FIXES.1e | 1429 ++++++++++++++++++++ contrib/one-true-awk/README.md | 79 +- contrib/one-true-awk/awk.1 | 31 +- contrib/one-true-awk/awk.h | 18 +- contrib/one-true-awk/awkgram.y | 49 +- contrib/one-true-awk/b.c | 322 ++++- .../one-true-awk/bugs-fixed/getline-corruption.awk | 5 + .../one-true-awk/bugs-fixed/getline-corruption.in | 1 + .../one-true-awk/bugs-fixed/getline-corruption.ok | 1 + contrib/one-true-awk/bugs-fixed/rstart-rlength.awk | 10 + contrib/one-true-awk/bugs-fixed/rstart-rlength.ok | 4 + .../one-true-awk/bugs-fixed/unicode-fs-rs-1.awk | 6 + contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.in | 2 + contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.ok | 5 + .../one-true-awk/bugs-fixed/unicode-fs-rs-2.awk | 7 + contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.in | 2 + contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.ok | 4 + .../one-true-awk/bugs-fixed/unicode-null-match.awk | 6 + .../one-true-awk/bugs-fixed/unicode-null-match.bad | 1 + .../one-true-awk/bugs-fixed/unicode-null-match.ok | 1 + contrib/one-true-awk/lex.c | 56 +- contrib/one-true-awk/lib.c | 137 +- contrib/one-true-awk/main.c | 15 +- contrib/one-true-awk/makefile | 1 + contrib/one-true-awk/parse.c | 2 +- contrib/one-true-awk/proto.h | 7 +- contrib/one-true-awk/run.c | 647 ++++++++- contrib/one-true-awk/testdir/T.argv | 6 + contrib/one-true-awk/testdir/T.csv | 81 ++ contrib/one-true-awk/testdir/T.misc | 6 + contrib/one-true-awk/testdir/T.utf | 194 +++ contrib/one-true-awk/testdir/T.utfre | 234 ++++ contrib/one-true-awk/testdir/tt.15 | 2 +- contrib/one-true-awk/testdir/xc | 17 - contrib/one-true-awk/tran.c | 26 +- 38 files changed, 3178 insertions(+), 1615 deletions(-) diff --cc .gitattributes index 11fec084166f,000000000000..ab5a1eee005d mode 100644,000000..100644 --- a/.gitattributes +++ b/.gitattributes @@@ -1,7 -1,0 +1,8 @@@ +*.c diff=cpp +*.h diff=cpp +*.cpp diff=cpp +*.hpp diff=cpp +*.py diff=python +. svn-properties=svn:keywords=tools/build/options/WITHOUT_LOADER_ZFS +.clang-format svn-properties=svn:keywords=FreeBSD=%H ++contrib/one-true-awk/bugs-fixed/unicode-null-match.bad binary diff --cc UPDATING index 763f8f29a4f0,000000000000..17117a193394 mode 100644,000000..100644 --- a/UPDATING +++ b/UPDATING @@@ -1,2101 -1,0 +1,2106 @@@ +Updating Information for users of FreeBSD-CURRENT. + +This file is maintained and copyrighted by M. Warner Losh . +See end of file for further details. For commonly done items, please see the +COMMON ITEMS: section later in the file. These instructions assume that you +basically know what you are doing. If not, then please consult the FreeBSD +handbook: + + https://docs.freebsd.org/en/books/handbook/cutting-edge/#makeworld + +Items affecting the ports and packages system can be found in +/usr/ports/UPDATING. Please read that file before updating system packages +and/or ports. + +NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: + FreeBSD 15.x has many debugging features turned on, in both the kernel + and userland. These features attempt to detect incorrect use of + system primitives, and encourage loud failure through extra sanity + checking and fail stop semantics. They also substantially impact + system performance. If you want to do performance measurement, + benchmarking, and optimization, you'll want to turn them off. This + includes various WITNESS- related kernel options, INVARIANTS, malloc + debugging flags in userland, and various verbose features in the + kernel. Many developers choose to disable these features on build + machines to maximize performance. (To completely disable malloc + debugging, define WITH_MALLOC_PRODUCTION in /etc/src.conf and rebuild + world, or to merely disable the most expensive debugging functionality + at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) + ++20231114: ++ One True Awk updated to the Second Edition as of 20231102 (254b979f32df) ++ Notable features include UTF-8 support and --csv to support comma ++ separated data. ++ +20231113: + The WITHOUT_LLD_IS_LD option has been removed. When LLD is enabled + it is always installed as /usr/bin/ld. + +20231027: + Forward compatibility (running the new code on old kernels) for the + "ino64" project have been removed. The need for it has passed long ago. + +20231018: + Commit 57ce37f9dcd0 changed the internal KAPI between the + nfscommon and nfscl modules. Both must be rebuilt from sources. + +20231010: + dialog(1) has been replaced in base by bsddialog(1), while most of the + time replacing a dialog(1) call by a bsddialog(1) call works out of the + box, bsddialog(1) is not considered as a drop-in replacement for + dialog(1). + + If you do depend on dialog(1) functionality, please install cdialog + from ports: + + pkg install cdialog + +20230927: + The EARLY_AP_STARTUP kernel option is mandatory on x86. The option + has been added to DEFAULTS, so it should automatically be included in + custom kernel configurations without any additional change. + +20230922: + A new loader tunable net.pf.default_to_drop allows pf(4)’s default + behaviour to be changed from pass to drop. Previously this required + recompiling the kernel with the option PF_DEFAULT_TO_DROP. + +20230914: + Enable splitting out pkgbase manpages into separate packages by + default. To disable this, set WITHOUT_MANSPLITPKG=yes in src.conf. + +20230911: + Move standard include files to the clibs-dev package and move clang + internal libraries and headers to clang and clang-dev. Upgrading systems + installed using pkgbase past this change involves extra steps to allow + for these file moves: + + pkg upgrade -y FreeBSD-utilities + pkg upgrade -y FreeBSD-utilities-dev + pkg upgrade -y + +20230909: + Enable vnet sysctl variables to be loader tunable. SYSCTLs which + belongs to VNETs can be initialized during early boot or module + loading if they are marked with CTLFLAG_TUN and there are + corresponding kernel environment variables. + +20230901: + The WITH_INIT_ALL_PATTERN and WITH_INIT_ALL_ZERO build options have + been replaced by INIT_ALL=pattern and INIT_ALL=zero respectively. + +20230824: + FreeBSD 15.0-CURRENT. + +20230817: + Serial communication (in boot loaders, kernel, and userland) has + been changed to default to 115200 bps, in line with common industry + practice and typcial firmware serial console redirection + configuration. + + Note that the early x86 BIOS bootloader (i.e., boot0sio) does not + support rates above 9600 bps and is not changed. boot0sio users may + set BOOT_COMCONSOLE_SPEED=9600 to use 9600 for all of the boot + components, or use the standard boot0 and have the boot2 stage start + with the serial port at 115200. + +20230807: + Following the general removal of MIPS support, the ath(4) AHB bus- + frontend has been removed, too, and building of the PCI support is + integrated with the ath(4) main module again. As a result, there's + no longer a need for if_ath_pci_load="YES" in /boot/loader.conf or + "device ath_pci" in the kernel configuration. + +20230803: + MAXCPU has been increased to 1024 in the amd64 GENERIC kernel config. + Out-of-tree kernel modules will need to be rebuilt. + +20230724: + CAM has been mechanically updated s/u_int(64|32|16|8)_t/uint\1_t/g + to move to the standard uintXX_t types from the old, traditional + BSD u_intXX_t types. This should be a NOP, but may cause problems + for out of tree changes. The SIMs were not updated since most of + the old u_intXX_t uses weren't due to CAM interfaces. + +20230713: + stable/14 branch created. + +20230629: + The heuristic for detecting old chromebooks with an EC bug that requires + atkbdc driver workarounds has changed. There should be no functional + change, but if your old chromebook's keyboard stops working, please + file a PR and assign it to imp. + +20230623: + OpenSSL has been updated to version 3.0, including changes throughout + the base system. It is important to rebuild third-party software + after upgrading. + +20230619: + To enable pf rdr rules for connections initiated from the host, pf + filter rules can be optionally enabled for packets delivered + locally. This can change the behavior of rules which match packets + delivered to lo0. To enable this feature: + + sysctl net.pf.filter_local=1 + service pf restart + + When enabled, its best to ensure that packets delivered locally are not + filtered, e.g. by adding a 'skip on lo' rule. + +20230613: + Improvements to libtacplus(8) mean that tacplus.conf(5) now + follows POSIX shell syntax rules. This may cause TACACS+ + authentication to fail if the shared secret contains a single + quote, double quote, or backslash character which isn't + already properly quoted or escaped. + +20230612: + Belatedly switch the default nvme block device on x86 from nvd to nda. + nda created nvd compatibility links by default, so this should be a + nop. If this causes problems for your application, set hw.nvme.use_nvd=1 + in your loader.conf or add `options NVME_USE_NVD=1` to your kernel + config. To disable the nvd compatibility aliases, add + kern.cam.nda.nvd_compat=0 to loader.conf. The default has been nda on + all non-x86 platforms for some time now. If you need to fall back, + please email imp@freebsd.org about why. + + Encrypted swap partitions need to be changed from nvd to nda if you + migrate, or you need to use the above to switch back to nvd. + +20230422: + Remove portsnap(8). Users are encouraged to obtain the ports tree + using git instead. + +20230420: + Add jobs.mk to save typing. Enables -j${JOB_MAX} and logging + eg. + make buildworld-jobs + runs + make -j${JOB_MAX} buildworld > ../buildworld.log 2>&1 + + where JOB_MAX is derrived from ncpus in local.sys.mk if not set in env. + +20230316: + Video related devices for some arm devices have been renamed. + If you have a custom kernel config and want to use hdmi output on + IMX6 board you need to add "device dwc_hdmi" "device imx6_hdmi" and + "device imx6_ipu" to it. + If you have a custom kernel config and want to use hdmi output on + TI AM335X board you need to add "device tda19988" to it. + If you add "device hdmi" in it you need to remove it as it doesn't + exist anymore. + +20230221: + Introduce new kernel options KBD_DELAY1 and KBD_DELAY2. See atkbdc(4) + for details. + +20230206: + sshd now defaults to having X11Forwarding disabled, following upstream. + Administrators who wish to enable X11Forwarding should add + `X11Forwarding yes` to /etc/ssh/sshd_config. + +20230204: + Since commit 75d41cb6967 Huawei 3G/4G LTE Mobile Devices do not default + to ECM, but NCM mode and need u3g and ucom modules loaded. See cdce(4). + +20230130: + As of commit 7c40e2d5f685, the dependency on netlink(4) has been added + to the linux_common(4) module. Users relying on linux_common may need + to complile netlink(4) module if it is not present in their kernel. + +20230126: + The WITHOUT_CXX option has been removed. C++ components in the base + system are now built unconditionally. + +20230113: + LinuxKPI pci.h changes may require out-of-tree drivers to be recompiled. + Bump _FreeBSD_version to 1400078 to be able to detect this change. + +20221212: + llvm-objump is now always installed as objdump. Previously there was + no /usr/bin/objdump unless the WITH_LLVM_BINUTILS knob was used. + + Some LLVM objdump options have a different output format compared to + GNU objdump; readelf is available for inspecting ELF files, and GNU + objdump is available from the devel/binutils port or package. + +20221205: + dma(8) has replaced sendmail(8) as the default mta. For people willing + to reenable sendmail(8): + + $ cp /usr/share/examples/sendmail/mailer.conf /etc/mail/mailer.conf + + and add sendmail_enable="YES" to rc.conf. + +20221204: + hw.bus.disable_failed_devices has changed from 'false' to 'true' by + default. Now if newbus succeeds in probing a device, but fails to attach + the device, we'll disable the device. In the past, we'd keep retrying + the device on each new driver loaded. To get that behavior now, one + needs to use devctl to re-enable the device, and reprobe it (or set + the sysctl/tunable hw.bus.disable_failed_devices=false). + + NOTE: This was reverted 20221205 due to unexpected compatibility issues + +20221122: + pf no longer accepts 'scrub fragment crop' or 'scrub fragment drop-ovl'. + These configurations are no longer automatically reinterpreted as + 'scrub fragment reassemble'. + +20221121: + The WITHOUT_CLANG_IS_CC option has been removed. When Clang is enabled + it is always installed as /usr/bin/cc (and c++, cpp). + +20221026: + Some programs have been moved into separate packages. It is recommended + for pkgbase users to do: + + pkg install FreeBSD-dhclient FreeBSD-geom FreeBSD-resolvconf \ + FreeBSD-devd FreeBSD-devmatch + + after upgrading to restore all the component that were previously + installed. + +20221002: + OPIE has been removed from the base system. If needed, it can + be installed from ports (security/opie) or packages (opie). + Otherwise, make sure that your PAM policies do not reference + pam_opie or pam_opieaccess. + +20220610: + LinuxKPI pm.h changes require an update to the latest drm-kmod version + before re-compiling to avoid errors. + +20211230: + The macros provided for the manipulation of CPU sets (e.g. CPU_AND) + have been modified to take 2 source arguments instead of only 1. + Externally maintained sources that use these macros will have to + be adapted. The FreeBSD version has been bumped to 1400046 to + reflect this change. + +20211214: + A number of the kernel include files are able to be included by + themselves. A test has been added to buildworld to enforce this. + +20211209: + Remove mips as a recognized target. This starts the decommissioning of + mips support in FreeBSD. mips related items will be removed wholesale in + the coming days and weeks. + + This broke the NO_CLEAN build for some people. Either do a clean build + or touch + lib/clang/include/llvm/Config/Targets.def + lib/clang/include/llvm/Config/AsmParsers.def + lib/clang/include/llvm/Config/Disassemblers.def + lib/clang/include/llvm/Config/AsmPrinters.def + before the build to force everything to rebuild that needs to. + +20211202: + Unbound support for RFC8375: The special-use domain 'home.arpa' is + by default blocked. To unblock it use a local-zone nodefault + statement in unbound.conf: + local-zone: "home.arpa." nodefault + + Or use another type of local-zone to override with your choice. + + The reason for this is discussed in Section 6.1 of RFC8375: + Because 'home.arpa.' is not globally scoped and cannot be secured + using DNSSEC based on the root domain's trust anchor, there is no way + to tell, using a standard DNS query, in which homenet scope an answer + belongs. Consequently, users may experience surprising results with + such names when roaming to different homenets. + +20211110: + Commit b8d60729deef changed the TCP congestion control framework so + that any of the included congestion control modules could be + the single module built into the kernel. Previously newreno + was automatically built in through direct reference. As of + this commit you are required to declare at least one congestion + control module (e.g. 'options CC_NEWRENO') and to also declare a + default using the CC_DEFAULT option (e.g. options CC_DEFAULT="newreno\"). + The GENERIC configuration includes CC_NEWRENO and defines newreno + as the default. If no congestion control option is built into the + kernel and you are including networking, the kernel compile will + fail. Also if no default is declared the kernel compile will fail. + +20211118: + Mips has been removed from universe builds. It will be removed from the + tree shortly. + +20211106: + Commit f0c9847a6c47 changed the arguments for VOP_ALLOCATE. + The NFS modules must be rebuilt from sources and any out + of tree file systems that implement their own VOP_ALLOCATE + may need to be modified. + +20211022: + The synchronous PPP kernel driver sppp(4) has been removed. + The cp(4) and ce(4) drivers are now always compiled with netgraph(4) + support, formerly enabled by NETGRAPH_CRONYX option. + +20211020: + sh(1) is now the default shell for the root user. To force root to use + the csh shell, please run the following command as root: + + # chsh -s csh + +20211004: + Ncurses distribution has been split between libtinfow and libncurses + with libncurses.so becoming a linker (ld) script to seamlessly link + to libtinfow as needed. Bump _FreeBSD_version to 1400035 to reflect + this change. + +20210923: + As of commit 8160a0f62be6, the dummynet module no longer depends on the + ipfw module. Dummynet can now be used by pf as well as ipfw. As such + users who relied on this dependency may need to include ipfw in the + list of modules to load on their systems. + +20210922: + As of commit 903873ce1560, the mixer(8) utility has got a slightly + new syntax. Please refer to the mixer(8) manual page for more + information. The old mixer utility can be installed from ports: + audio/freebsd-13-mixer + +20210911: + As of commit 55089ef4f8bb, the global variable nfs_maxcopyrange has + been deleted from the nfscommon.ko. As such, nfsd.ko must be built + from up to date sources to avoid an undefined reference when + being loaded. + +20210817: + As of commit 62ca9fc1ad56 OpenSSL no longer enables kernel TLS + by default. Users can enable kernel TLS via the "KTLS" SSL + option. This can be enabled globally by using a custom + OpenSSL config file via OPENSSL_CONF or via an + application-specific configuration option for applications + which permit setting SSL options via SSL_CONF_cmd(3). + +20210811: + Commit 3ad1e1c1ce20 changed the internal KAPI between the NFS + modules. Therefore, all need to be rebuilt from sources. + +20210730: + Commit b69019c14cd8 removes pf's DIOCGETSTATESNV ioctl. + As of be70c7a50d32 it is no longer used by userspace, but it does mean + users may not be able to enumerate pf states if they update the kernel + past b69019c14cd8 without first updating userspace past be70c7a50d32. + +20210729: + As of commit 01ad0c007964 if_bridge member interfaces can no longer + change their MTU. Changing the MTU of the bridge itself will change the + MTU on all member interfaces instead. + +20210716: + Commit ee29e6f31111 changed the internal KAPI between the nfscommon + and nfsd modules. Therefore, both need to be rebuilt from sources. + Bump __FreeBSD_version to 1400026 for this KAPI change. + +20210715: + The 20210707 awk update brought in a change in behavior. This has + been corrected as of d4d252c49976. Between these dates, if you + installed a new awk binary, you may not be able to build a new + kernel because the change in behavior affected the genoffset + script used to build the kernel. If you did update, the fix is + to update your sources past the above hash and do + % cd usr.bin/awk + % make clean all + % sudo -E make install + to enable building kernels again. + +20210708: + Commit 1e0a518d6548 changed the internal KAPI between the NFS + modules. They all need to be rebuilt from sources. I did not + bump __FreeBSD_version, since it was bumped recently. + +20210707: + awk has been updated to the latest one-true-awk version 20210215. + This contains a number of minor bug fixes. + +20210624: + The NFSv4 client now uses the highest minor version of NFSv4 + supported by the NFSv4 server by default instead of minor version 0, + for NFSv4 mounts. + The "minorversion" mount option may be used to override this default. + +20210618: + Bump __FreeBSD_version to 1400024 for LinuxKPI changes. + Most notably netdev.h can change now as the (last) dependencies + (mlx4/ofed) are now using struct ifnet directly, but also for PCI + additions and others. + +20210618: + The directory "blacklisted" under /usr/share/certs/ has been + renamed to "untrusted". + +20210611: + svnlite has been removed from base. Should you need svn for any reason + please install the svn package or port. + +20210611: + Commit e1a907a25cfa changed the internal KAPI between the krpc + and nfsserver. As such, both modules must be rebuilt from + sources. Bump __FreeBSD_version to 1400022. + +20210610: + The an(4) driver has been removed from FreeBSD. + +20210608: + The vendor/openzfs branch was renamed to vendor/openzfs/legacy to + start tracking OpenZFS upstream more closely. Please see +https://lists.freebsd.org/archives/freebsd-current/2021-June/000153.html + for details on how to correct any errors that might result. The + short version is that you need to remove the old branch locally: + git update-ref -d refs/remotes/freebsd/vendor/openzfs + (assuming your upstream origin is named 'freebsd'). + +20210525: + Commits 17accc08ae15 and de102f870501 add new files to LinuxKPI + which break drm-kmod. In addition various other additions where + committed. Bump __FreeBSD_version to 1400015 to be able to + detect this. + +20210513: + Commit ca179c4d74f2 changed the package in which the OpenSSL + libraries and utilities are packaged. + It is recommended for pkgbase user to do: + pkg install -f FreeBSD-openssl + before pkg upgrade otherwise some dependencies might not be met + and pkg will stop working as libssl will not be present anymore + on the system. + +20210426: + Commit 875977314881 changed the internal KAPI between + the nfsd and nfscommon modules. As such these modules + need to be rebuilt from sources. + Without this patch in your NFSv4.1/4.2 server, enabling + delegations by setting vfs.nfsd.issue_delegations non-zero + is not recommended. + +20210411: + Commit 7763814fc9c2 changed the internal KAPI between + the krpc and NFS. As such, the krpc, nfscommon and + nfscl modules must all be rebuilt from sources. + Without this patch, NFSv4.1/4.2 mounts should not + be done with the nfscbd(8) daemon running, to avoid + needing a working back channel for server->client RPCs. + +20210330: + Commit 01ae8969a9ee fixed the NFSv4.1/4.2 server so that it + handles binding of the back channel as required by RFC5661. + Until this patch is in your server, avoid use of the "nconnects" + mount option for Linux NFSv4.1/4.2 mounts. + +20210225: + For 64-bit architectures the base system is now built with Position + Independent Executable (PIE) support enabled by default. It may be + disabled using the WITHOUT_PIE knob. A clean build is required. + +20210128: + Various LinuxKPI functionality was added which conflicts with DRM. + Please update your drm-kmod port to after the __FreeBSD_version 1400003 + update. + +20210121: + stable/13 branch created. + +20210108: + PC Card attachments for all devices have been removed. In the case of + wi and cmx, the entire drivers were removed because they were only + PC Card devices. FreeBSD_version 1300134 should be used for this + since it was bumped so recently. + +20210107: + Transport-independent parts of HID support have been split off the USB + code in to separate subsystem. Kernel configs which include one of + ums, ukbd, uhid, atp, wsp, wmt, uaudio, ugold or ucycom drivers should + be updated with adding of "device hid" line. + +20210105: + ncurses installation has been modified to only keep the widechar + enabled version. Incremental build is broken for that change, so it + requires a clean build. + +20201223: + The FreeBSD project has migrated from Subversion to Git. Temporary + instructions can be found at + https://github.com/bsdimp/freebsd-git-docs/blob/main/src-cvt.md + and other documents in that repo. + +20201216: + The services database has been updated to cover more of the basic + services expected in a modern system. The database is big enough + that it will cause issues in mergemaster in Releases previous to + 12.2 and 11.3, or in very old current systems from before r358154. + +20201215: + Obsolete in-tree GDB 6.1.1 has been removed. GDB (including kgdb) + may be installed from ports or packages. + +20201124: + ping6 has been merged into ping. It can now be called as "ping -6". + See ping(8) for details. + +20201108: + Default value of net.add_addr_allfibs has been changed to 0. + If you have multi-fib configuration and rely on existence of all + interface routes in every fib, you need to set the above sysctl to 1. + +20201030: + The internal pre-processor in the calendar(1) program has been + extended to support more C pre-processor commands (e.g. #ifdef, #else, + and #undef) and to detect unbalanced conditional statements. + Error messages have been extended to include the filename and line + number if processing stops to help fixing malformed data files. + +20201026: + All the data files for the calendar(1) program, except calendar.freebsd, + have been moved to the deskutils/calendar-data port, much like the + jewish calendar entries were moved to deskutils/hebcal years ago. After + make delete-old-files, you need to install it to retain full + functionality. calendar(1) will issue a reminder for files it can't + find. + +20200923: + LINT files are no longer generated. We now include the relevant NOTES + files. Note: This may cause conflicts with updating in some cases. + find sys -name LINT\* -delete + is suggested across this commit to remove the generated LINT files. + + If you have tried to update with generated files there, the svn + command you want to un-auger the tree is + cd sys/amd64/conf + svn revert -R . + and then do the above find from the top level. Substitute 'amd64' + above with where the error message indicates a conflict. + +20200824: + OpenZFS support has been integrated. Do not upgrade root pools until + the loader is updated to support zstd. Furthermore, we caution against + 'zpool upgrade' for the next few weeks. The change should be transparent + unless you want to use new features. + + Not all "NO_CLEAN" build scenarios work across these changes. Many + scenarios have been tested and fixed, but rebuilding kernels without + rebuilding world may fail. + + The ZFS cache file has moved from /boot to /etc to match the OpenZFS + upstream default. A fallback to /boot has been added for mountroot. + + Pool auto import behavior at boot has been moved from the kernel module + to an explicit "zpool import -a" in one of the rc scripts enabled by + zfs_enable=YES. This means your non-root zpools won't auto import until + you upgrade your /etc/rc.d files. + +20200824: + The resume code now notifies devd with the 'kernel' system + rather than the old 'kern' subsystem to be consistent with + other use. The old notification will be created as well, but + will be removed prior to FreeBSD 14.0. + +20200821: + r362275 changed the internal API between the kernel RPC and the + NFS modules. As such, all the modules must be recompiled from + sources. + +20200817: + r364330 modified the internal API used between the NFS modules. + As such, all the NFS modules must be re-compiled from sources. + +20200816: + Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have + been upgraded to 11.0.0. Please see the 20141231 entry below for + information about prerequisites and upgrading, if you are not already + using clang 3.5.0 or higher. + +20200810: + r364092 modified the internal ABI used between the kernel NFS + modules. As such, all of these modules need to be rebuilt + from sources, so a version bump was done. + +20200807: + Makefile.inc has been updated to work around the issue documented in + 20200729. It was a case where the optimization of using symbolic links + to point to binaries created a situation where we'd run new binaries + with old libraries starting midway through the installworld process. + +20200729: + r363679 has redefined some undefined behavior in regcomp(3); notably, + extraneous escapes of most ordinary characters will no longer be + accepted. An exp-run has identified all of the problems with this in + ports, but other non-ports software may need extra escapes removed to + continue to function. + + Because of this change, installworld may encounter the following error + from rtld: Undefined symbol "regcomp@FBSD_1.6" -- It is imperative that + you do not halt installworld. Instead, let it run to completion (whether + successful or not) and run installworld once more. + +20200627: + A new implementation of bc and dc has been imported in r362681. This + implementation corrects non-conformant behavior of the previous bc + and adds GNU bc compatible options. It offers a number of extensions, + is much faster on large values, and has support for message catalogs + (a number of languages are already supported, contributions of further + languages welcome). The option WITHOUT_GH_BC can be used to build the + world with the previous versions of bc and dc. + +20200625: + r362639 changed the internal API used between the NFS kernel modules. + As such, they all need to be rebuilt from sources. + +20200613: + r362158 changed the arguments for VFS_CHECKEXP(). As such, any + out of tree file systems need to be modified and rebuilt. + Also, any file systems that are modules must be rebuilt. + +20200604: + read(2) of a directory fd is now rejected by default. root may + re-enable it for system root only on non-ZFS filesystems with the + security.bsd.allow_read_dir sysctl(8) MIB if + security.bsd.suser_enabled=1. + + It may be advised to setup aliases for grep to default to `-d skip` if + commonly non-recursively grepping a list that includes directories and + the potential for the resulting stderr output is not tolerable. Example + aliases are now installed, commented out, in /root/.cshrc and + /root/.shrc. + +20200523: + Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have + been upgraded to 10.0.1. Please see the 20141231 entry below for + information about prerequisites and upgrading, if you are not already + using clang 3.5.0 or higher. + +20200512: + Support for obsolete compilers has been removed from the build system. + Clang 6 and GCC 6.4 are the minimum supported versions. + +20200424: + closefrom(2) has been moved under COMPAT12, and replaced in libc with a + stub that calls close_range(2). If using a custom kernel configuration, + you may want to ensure that the COMPAT_FREEBSD12 option is included, as + a slightly older -CURRENT userland and older FreeBSD userlands may not + be functional without closefrom(2). + +20200414: + Upstream DTS from Linux 5.6 was merged and they now have the SID + and THS (Secure ID controller and THermal Sensor) node present. + The DTB overlays have now been removed from the tree for the H3/H5 and + A64 SoCs and the aw_sid and aw_thermal driver have been updated to + deal with upstream DTS. If you are using those overlays you need to + remove them from loader.conf and update the DTBs on the FAT partition. + +20200310: + Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have + been upgraded to 10.0.0. Please see the 20141231 entry below for + information about prerequisites and upgrading, if you are not already + using clang 3.5.0 or higher. + +20200309: + The amd(8) automount daemon has been removed from the source tree. + As of FreeBSD 10.1 autofs(5) is the preferred tool for automounting. + amd is still available in the sysutils/am-utils port. + +20200301: + Removed brooktree driver (bktr.4) from the tree. + +20200229: + The WITH_GPL_DTC option has been removed. The BSD-licenced device tree + compiler in usr.bin/dtc is used on all architectures which use dtc, and + the GPL dtc is available (if needed) from the sysutils/dtc port. + +20200229: + The WITHOUT_LLVM_LIBUNWIND option has been removed. LLVM's libunwind + is used by all supported CPU architectures. + +20200229: + GCC 4.2.1 has been removed from the tree. The WITH_GCC, + WITH_GCC_BOOTSTRAP, and WITH_GNUCXX options are no longer available. + Users who wish to build FreeBSD with GCC must use the external toolchain + ports or packages. + +20200220: + ncurses has been updated to a newer version (6.2-20200215). Given the ABI + has changed, users will have to rebuild all the ports that are linked to + ncurses. + +20200217: + The size of struct vnet and the magic cookie have changed. + Users need to recompile libkvm and all modules using VIMAGE + together with their new kernel. + +20200212: + Defining the long deprecated NO_CTF, NO_DEBUG_FILES, NO_INSTALLLIB, + NO_MAN, NO_PROFILE, and NO_WARNS variables is now an error. Update + your Makefiles and scripts to define MK_=no instead as required. + + One exception to this is that program or library Makefiles should + define MAN to empty rather than setting MK_MAN=no. + +20200108: + Clang/LLVM is now the default compiler and LLD the default + linker for riscv64. + +20200107: + make universe no longer uses GCC 4.2.1 on any architectures. + Architectures not supported by in-tree Clang/LLVM require an + external toolchain package. + +20200104: + GCC 4.2.1 is now not built by default, as part of the GCC 4.2.1 + retirement plan. Specifically, the GCC, GCC_BOOTSTRAP, and GNUCXX + options default to off for all supported CPU architectures. As a + short-term transition aid they may be enabled via WITH_* options. + GCC 4.2.1 is expected to be removed from the tree on 2020-03-31. + +20200102: + Support for armv5 has been disconnected and is being removed. The + machine combination MACHINE=arm MACHINE_ARCH=arm is no longer valid. + You must now use a MACHINE_ARCH of armv6 or armv7. The default + MACHINE_ARCH for MACHINE=arm is now armv7. + +20191226: + Clang/LLVM is now the default compiler for all powerpc architectures. + LLD is now the default linker for powerpc64. The change for powerpc64 + also includes a change to the ELFv2 ABI, incompatible with the existing + ABI. + +20191226: + Kernel-loadable random(4) modules are no longer unloadable. + +20191222: + Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have + been upgraded to 9.0.1. Please see the 20141231 entry below for + information about prerequisites and upgrading, if you are not already + using clang 3.5.0 or higher. + +20191212: + r355677 has modified the internal interface used between the + NFS modules in the kernel. As such, they must all be upgraded + simultaneously. I will do a version bump for this. + +20191205: + The root certificates of the Mozilla CA Certificate Store have been + imported into the base system and can be managed with the certctl(8) + utility. If you have installed the security/ca_root_nss port or package + with the ETCSYMLINK option (the default), be advised that there may be + differences between those included in the port and those included in + base due to differences in nss branch used as well as general update + frequency. Note also that certctl(8) cannot manage certs in the + format used by the security/ca_root_nss port. + +20191120: + The amd(8) automount daemon has been disabled by default, and will be + removed in the future. As of FreeBSD 10.1 the autofs(5) is available + for automounting. + +20191107: + The nctgpio and wbwd drivers have been moved to the superio bus. + If you have one of these drivers in a kernel configuration, then + you should add device superio to it. If you use one of these drivers + as a module and you compile a custom set of modules, then you should + add superio to the set. + +20191021: + KPIs for network drivers to access interface addresses have changed. + Users need to recompile NIC driver modules together with kernel. + +20191021: + The net.link.tap.user_open sysctl no longer prevents user opening of + already created /dev/tapNN devices. Access is still controlled by + node permissions, just like tun devices. The net.link.tap.user_open + sysctl is now used only to allow users to perform devfs cloning of + tap devices, and the subsequent open may not succeed if the user is not + in the appropriate group. This sysctl may be deprecated/removed + completely in the future. + +20191009: + mips, powerpc, and sparc64 are no longer built as part of + universe / tinderbox unless MAKE_OBSOLETE_GCC is defined. If + not defined, mips, powerpc, and sparc64 builds will look for + the xtoolchain binaries and if installed use them for universe + builds. As llvm 9.0 becomes vetted for these architectures, they + will be removed from the list. + +20191009: + Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have + been upgraded to 9.0.0. Please see the 20141231 entry below for + information about prerequisites and upgrading, if you are not already + using clang 3.5.0 or higher. + +20191003: + The hpt27xx, hptmv, hptnr, and hptrr drivers have been removed from + GENERIC. They are available as modules and can be loaded by adding + to /boot/loader.conf hpt27xx_load="YES", hptmv_load="YES", + hptnr_load="YES", or hptrr_load="YES", respectively. + +20190913: + ntpd no longer by default locks its pages in memory, allowing them + to be paged out by the kernel. Use rlimit memlock to restore + historic BSD behaviour. For example, add "rlimit memlock 32" + to ntp.conf to lock up to 32 MB of ntpd address space in memory. + +20190823: + Several of ping6's options have been renamed for better consistency + with ping. If you use any of -ARWXaghmrtwx, you must update your + scripts. See ping6(8) for details. + +20190727: + The vfs.fusefs.sync_unmount and vfs.fusefs.init_backgrounded sysctls + and the "-o sync_unmount" and "-o init_backgrounded" mount options have + been removed from mount_fusefs(8). You can safely remove them from + your scripts, because they had no effect. + + The vfs.fusefs.fix_broken_io, vfs.fusefs.sync_resize, + vfs.fusefs.refresh_size, vfs.fusefs.mmap_enable, + vfs.fusefs.reclaim_revoked, and vfs.fusefs.data_cache_invalidate + sysctls have been removed. If you felt the need to set any of them to + a non-default value, please tell asomers@FreeBSD.org why. + +20190713: + Default permissions on the /var/account/acct file (and copies of it + rotated by periodic daily scripts) are changed from 0644 to 0640 + because the file contains sensitive information that should not be + world-readable. If the /var/account directory must be created by + rc.d/accounting, the mode used is now 0750. Admins who use the + accounting feature are encouraged to change the mode of an existing + /var/account directory to 0750 or 0700. + +20190620: + Entropy collection and the /dev/random device are no longer optional + components. The "device random" option has been removed. + Implementations of distilling algorithms can still be made loadable + with "options RANDOM_LOADABLE" (e.g., random_fortuna.ko). + +20190612: + Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have + been upgraded to 8.0.1. Please see the 20141231 entry below for + information about prerequisites and upgrading, if you are not already + using clang 3.5.0 or higher. + +20190608: + A fix was applied to i386 kernel modules to avoid panics with + dpcpu or vnet. Users need to recompile i386 kernel modules + having pcpu or vnet sections or they will refuse to load. + +20190513: + User-wired pages now have their own counter, + vm.stats.vm.v_user_wire_count. The vm.max_wired sysctl was renamed + to vm.max_user_wired and changed from an unsigned int to an unsigned + long. bhyve VMs wired with the -S are now subject to the user + wiring limit; the vm.max_user_wired sysctl may need to be tuned to + avoid running into the limit. + +20190507: + The IPSEC option has been removed from GENERIC. Users requiring + ipsec(4) must now load the ipsec(4) kernel module. + +20190507: + The tap(4) driver has been folded into tun(4), and the module has been + renamed to tuntap. You should update any kld_list="if_tap" or + kld_list="if_tun" entries in /etc/rc.conf, if_tap_load="YES" or + if_tun_load="YES" entries in /boot/loader.conf to load the if_tuntap + module instead, and "device tap" or "device tun" entries in kernel *** 1499 LINES SKIPPED *** From nobody Tue Nov 14 07:43:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STyvq0YqSz50r9l; Tue, 14 Nov 2023 07:43: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 4STyvq04fTz3XDt; Tue, 14 Nov 2023 07:43:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699947799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Dtnnv3MiB3cyKT3QfNxHc3h7MyKcxyaeLUr+UbyYoQ=; b=OIHfXx3GTyq1OIsU2S0sU1j0XNUJ8V/tjKQf3oP5l/SuRPknNvr78jEapK3wa8ZnYIlMUt 2n2pc5euY6+m6L8reK2RwdB+393aiKIEfqoV3jdHG9vozL9cmXUf7/Oeu0apAYEDiPAZR8 iv9A4uukXWxLO4zNLCTIGPEe3Wo1iB1W0mOGIyGciCEEIob0oUOv36RpNGVR0MU8yuM8x4 46XOEiv+VU+0t2OY9buv/4bOAP1XSLNKb/EYsNBkvwEudg1e9WQD8Duhv7KqknXt9zFlFi a7HEiOmQRIoSmOQj7m5K53nl3GONQFIHuT0Etxv9zx2f3UinNYeVuNEHpUz/1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699947799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Dtnnv3MiB3cyKT3QfNxHc3h7MyKcxyaeLUr+UbyYoQ=; b=IoAxjL36sR9HPWnEQb/jCybdHRO6bCapgV2Lp2+tyMBYIGUUI9rmIaGpuxc8eZ00siTEuE 6h2A//7Sryz+wRyThmpSMfD5EfV+dBYVulxpDCEviKKcGj0gk8B0EuYcEhwbTClnDfhHT+ yTZ+7PE4YAnK5EehQ9okUq93qydvSGUaKEx1CzyeZgCovoBxgFbN3vadEdBqU80s4t4oHp qxP0otF/uqALdXAlRktDF45iOr5sBF8oIhDcClIOkGEmE+zrmQo5zT5C6SARABaCPBuNgS BTWS5gOU/iH78RNBCCyeMTF7A/Wcuy94p8t1EEkwIHmv1uES1QB5ufilbdDueg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699947799; a=rsa-sha256; cv=none; b=i4DumhzSerRe6fs3JdQJck3D8CgwUm49ieCWngtjCX0IYNYFbqEas4pDnCl4l+rYCYiChM 22TnkhdtO3PtzAKdW0cVsC/RY6sVtWd6v/38qTwY5lsYYF17wOK98MygUGncPmDkopU2Rq 6zj1YvmlgsF2plzi18plCpEi1Xhp3hDPJdCm5K2eoGe9Oow1PDE5eQziiYAKN+sLXdAql/ 17KknHYwjJXJYr7x5T31yApo0u/3FsPPhBTJh2QW8Lotg35l0TTyouuPlA6qtuVaiF6MjS NoNa0NGmlGXDxon6TrKGl9u4bsVGyrFbN4EAN8vXLFoD714nkM6VmWk/uYCWzg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STyvp6HTkzgWt; Tue, 14 Nov 2023 07:43: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 3AE7hIHm099348; Tue, 14 Nov 2023 07:43:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AE7hIWT099346; Tue, 14 Nov 2023 07:43:18 GMT (envelope-from git) Date: Tue, 14 Nov 2023 07:43:18 GMT Message-Id: <202311140743.3AE7hIWT099346@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: 030af1b62d7b - main - pkgbase: set the prefix of debug files and macros to /usr/src List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 030af1b62d7b9a86f5ecdceff5a1fa23e9570be1 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=030af1b62d7b9a86f5ecdceff5a1fa23e9570be1 commit 030af1b62d7b9a86f5ecdceff5a1fa23e9570be1 Author: Baptiste Daroussin AuthorDate: 2023-11-13 17:18:58 +0000 Commit: Baptiste Daroussin CommitDate: 2023-11-14 07:43:15 +0000 pkgbase: set the prefix of debug files and macros to /usr/src When the macro PACKAGE_BUILDING is set, then consider we are building package for pkgbase, this has already been used in Makefile.inc1 and reuse the PACKAGE_BUILDING macros already used for that purpose in the ports tree In the future this should be tied to REPRODUCIBLE_BUILD MFC After: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42569 --- share/mk/src.sys.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/mk/src.sys.mk b/share/mk/src.sys.mk index edf369638d9d..d5c2af0c559d 100644 --- a/share/mk/src.sys.mk +++ b/share/mk/src.sys.mk @@ -38,6 +38,9 @@ __postrcconf_${var}:= ${MK_${var}:U-}${WITHOUT_${var}:Uno:Dyes}${WITH_${var}:Uno # default over to -fno-common, making this redundant. CFCOMMONFLAG?= -fno-common CFLAGS+= ${CFCOMMONFLAG} +.if defined(PACKAGE_BUILDING) +CFLAGS+= -fmacro-prefix-map=${SRCTOP}=/usr/src -fdebug-prefix-map=${SRCTOP}=/usr/src +.endif DEFAULTWARNS= 6 From nobody Tue Nov 14 07:43:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4STyvr1xDZz50r9n; Tue, 14 Nov 2023 07:43: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 4STyvr1BLbz3XFL; Tue, 14 Nov 2023 07:43:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699947800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J0D4BWWG0YWMeEjZIunEI1PsNba1o4sKHsLr1r7bv1I=; b=i5EL08FZKXGzeQN65GVgF3jLYZslOFzNfoi7poiqIVdfCg0YSnZt6JXCr7uUpyp6HhGus1 mzPzHkT/uhOz11eCdxYGqpGAmTzfzsRjwudHwRawDRlwGjhzncnN/LVoQwPJAzE7mqpks5 YKKJTM5t5pY+nB2dC16q904gb8Ush4mXVdqeNoxNiq7gZkxZ2eL80FEBhzw6ulveuqYa/I MlbhcjdYKorcuxbfKdXboU8Q9ZJLy1zKTbfBZBZOJd9MXedRlyX/qeX12Sb6nffcBheG4H /wV7euN79tSox/Vgq0g/Bvl4R8IrtTF8dMm076ntzkahjGZsL10BKRpq46/1VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699947800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J0D4BWWG0YWMeEjZIunEI1PsNba1o4sKHsLr1r7bv1I=; b=PsDN8hAWfky4IOp8GzTKSXeEqw7JVy9cLxhj0tcf82uRr1qRlg78vwVhJvUbnibr2EbBso AOnqzqeO9qZrMBlWSg5WjBhvm1O8qb6wQtLm6q2rcPX1jP2XEzKDZ2tC8g2UgFjxylL42d GvNqZvlKMl/IQfVn/SFRjvEti6iAx1NswTexAkUkHqyOo2lFN3gM2RZ5gyOfAS9F1DoHDo CTAPy23+VCD6UD0yMyDaZDpBS2IjgQv6zBzM+Z2+bMnxdV2KX0zqWYcMSMLS3q79/4nv7H 2PLRC/7xC80ux+ip179KvXsSXB2riv1lS5uhQRcfBAzhhzFke9mjnJhBuCc9og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699947800; a=rsa-sha256; cv=none; b=MLbuNqVAJ+rW5p+BzEPCxzjTcuaP/sTIyWt07l9v5j8W9eRvSP0IjZ8eAdC+5X/dmeOfl6 mQX/9aRm7w98UzpWgcWKqUTinf4oW3waJI1r4Jlj0Gwt8Iq0rHi0qr2Bl6ABodjvQUROA9 QOm3k6DJNVvKOkQM2hmNi9lyyc1VRvX7pmwjQ6gKOVjDZLhOfIAmOJQ/S89jXhaZNXgttm KRzC8IQvF7NIHWNPMVf9oMgeSK0L8H63SOpINqh0xt/2NN+0fsDxVlDvULDBojrsRrpWb8 21eL4uR1OGs5a53K+Ytzpfml6QztFhU+MavymWwndvV4gxoQI8COPVnt//SErg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4STyvq73vHzgjj; Tue, 14 Nov 2023 07:43: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 3AE7hJDC099402; Tue, 14 Nov 2023 07:43:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AE7hJah099399; Tue, 14 Nov 2023 07:43:19 GMT (envelope-from git) Date: Tue, 14 Nov 2023 07:43:19 GMT Message-Id: <202311140743.3AE7hJah099399@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: 051d69d6f8b5 - main - pkgbase: create package with SRCRELDATE not OSRELDATE as OSVERSION List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 051d69d6f8b51dc1d7bba58af99be76185312222 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=051d69d6f8b51dc1d7bba58af99be76185312222 commit 051d69d6f8b51dc1d7bba58af99be76185312222 Author: Baptiste Daroussin AuthorDate: 2023-11-14 07:41:47 +0000 Commit: Baptiste Daroussin CommitDate: 2023-11-14 07:43:15 +0000 pkgbase: create package with SRCRELDATE not OSRELDATE as OSVERSION In 188fe88ec50eac7c10e1d8350bf1180f8c16e463 OSVERSION has been set to OSRELDATE which is the RELDATE of the building OS while we wanted to use SRCRELDATE which is the RELDATE of the target system --- Makefile.inc1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index c1dfb84538af..f47b9f66b69e 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2194,7 +2194,7 @@ sign-packages: _pkgbootstrap .PHONY @[ -L "${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname config ABI)/latest" ] && \ unlink ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname config ABI)/latest ; \ ${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname repo \ - -o OSVERSION="${OSRELDATE}" \ + -o OSVERSION="${SRCRELDATE}" \ -m ${WSTAGEDIR}/meta \ -o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname config ABI)/${PKG_VERSION} \ ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname config ABI)/${PKG_VERSION} \ From nobody Tue Nov 14 08:33:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SV01N3dJzz511kX for ; Tue, 14 Nov 2023 08:33:12 +0000 (UTC) (envelope-from ronald@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 4SV01N2zcPz3fnf for ; Tue, 14 Nov 2023 08:33:12 +0000 (UTC) (envelope-from ronald@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699950792; h=from:from:reply-to:subject: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=JU9B0Z0cJiqrlhsa2rFb0U810ziYHANYkwBaQbi+ORE=; b=GrBmz+RNp0WFUmWzFdUvCwb6XFiABpao1RZnt4EQXkyvFTgHvxRWkrq7N7Anenh5Hl9MtY g18RRsIb1/JUyOFMnOGM7dl+har+4o2Axsyp7jq0nzQHj7CBpfOZPl7WJjn0bBwO1RnlNo be/+jRTSfIXZvG5JmtySCgXVOmAllKFE0sw5BA6U59ZxuhpjedCKKoYT5iWghgWg0cw2qo 4cndkiaWYQjgKJw19yK825L4P4j/wvlGCM7CxDeAlX1Lhye9gUVwyS3uicKcRa95z7ljzp 3fdCOzSguK86IcQJNE9H9aKU/LW7ZSNjvbnstqD1z/WZUvRYvIpKMt95p3ga9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699950792; h=from:from:reply-to:subject: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=JU9B0Z0cJiqrlhsa2rFb0U810ziYHANYkwBaQbi+ORE=; b=EXBPHJpJrLYIQIhzI4tmH4uLfwiOm0OgKs9EOhQG8HrKz3/nmx3yV4nF9vU0spbwkin5Wk maTS3WAspnPYtts2vct1ZY48pJhfI/WjbjUPvZnUouMpgaVHckp+gdKo74oXf6fi92WdG0 lu/nmfl8+OCenqjYh78MoCj6i91r6dazeRGIkGYShPxKnhovNjpWWUXCcjOKF1Sb7XbgQg 0RLJ1vO4+CbcdEvOOk3eGmHYfFzKKmUK4LvDJNm7MVDdi2MHFU3fL8/Br+f8rxhTwMJnPd poA2ucqpo5O37bxGbnh4FC1HkBOkXuucqeWMhgFtd3Jkl1iDohi3Z5q9J/W6tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699950792; a=rsa-sha256; cv=none; b=k/kKz49V7hh52pB/7zwD37wsP8xWyMse0YfaR39HlCKci9h8wZpBQ+2tK/YILFIhcNKXft 09QFO6irm20P4DJ6jQ0J70qXJAm5ozJr7tJg3+LFNeiAP5aqal7cCBF7E41aJ1x/QEyDHo qpzGJY1f4n3ymPEAM7LDipQYm0MKgJjlPKVerGaMtXGR5KkMIBNmP5OmVbZOXfcjG4FXPj x821ZI6o/T26cp5EImDW/Kv99rkalImi/tY7MYd+jwzWaCsa74dDAkia4fOw78W0YBKGS9 S48lXZ9CY1lOKdL3ly4MzPXx8phOvX3Iv0olmBvKHikRz4ejukurZLxiPxqYyg== Received: from [IPV6:2001:1c00:2709:2010:74a9:924b:9b61:cfca] (2001-1c00-2709-2010-74a9-924b-9b61-cfca.cable.dynamic.v6.ziggo.nl [IPv6:2001:1c00:2709:2010:74a9:924b:9b61:cfca]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: ronald/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SV01M6TrPzvTX for ; Tue, 14 Nov 2023 08:33:11 +0000 (UTC) (envelope-from ronald@FreeBSD.org) Message-ID: Date: Tue, 14 Nov 2023 09:33:08 +0100 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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: 3fd60a6b73ac - main - awk: Merge upstream 2nd Edition Awk Book To: dev-commits-src-all@freebsd.org References: <202311140451.3AE4p5AR014207@gitrepo.freebsd.org> Content-Language: en-US From: Ronald Klop In-Reply-To: <202311140451.3AE4p5AR014207@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Interesting. The mail diff seems to contain the complete UPDATING file. If I click the cgit link I only get the 5 lines of changes in UPDATING as the diffstat is indicating. I have no idea who I should bother with this directly. :-) Regards, Ronald. On 11/14/23 05:51, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3fd60a6b73ac01a72df89751f173970fae4cae73 > > commit 3fd60a6b73ac01a72df89751f173970fae4cae73 > Merge: 194df014feeb 2e406c584fe4 > Author: Warner Losh > AuthorDate: 2023-11-02 16:32:01 +0000 > Commit: Warner Losh > CommitDate: 2023-11-14 04:49:34 +0000 > > awk: Merge upstream 2nd Edition Awk Book > > Merge in the November 2nd, 2023 version of one true awk. > > This brings in Unicode support, CSV support and a number of bug fixes. > > Sponsored by: Netflix > Reviewed by: delphij > Differential Revision: https://reviews.freebsd.org/D42447 > > .gitattributes | 1 + > UPDATING | 5 + > contrib/one-true-awk/FIXES | 1373 +------------------ > contrib/one-true-awk/FIXES.1e | 1429 ++++++++++++++++++++ > contrib/one-true-awk/README.md | 79 +- > contrib/one-true-awk/awk.1 | 31 +- > contrib/one-true-awk/awk.h | 18 +- > contrib/one-true-awk/awkgram.y | 49 +- > contrib/one-true-awk/b.c | 322 ++++- > .../one-true-awk/bugs-fixed/getline-corruption.awk | 5 + > .../one-true-awk/bugs-fixed/getline-corruption.in | 1 + > .../one-true-awk/bugs-fixed/getline-corruption.ok | 1 + > contrib/one-true-awk/bugs-fixed/rstart-rlength.awk | 10 + > contrib/one-true-awk/bugs-fixed/rstart-rlength.ok | 4 + > .../one-true-awk/bugs-fixed/unicode-fs-rs-1.awk | 6 + > contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.in | 2 + > contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.ok | 5 + > .../one-true-awk/bugs-fixed/unicode-fs-rs-2.awk | 7 + > contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.in | 2 + > contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.ok | 4 + > .../one-true-awk/bugs-fixed/unicode-null-match.awk | 6 + > .../one-true-awk/bugs-fixed/unicode-null-match.bad | 1 + > .../one-true-awk/bugs-fixed/unicode-null-match.ok | 1 + > contrib/one-true-awk/lex.c | 56 +- > contrib/one-true-awk/lib.c | 137 +- > contrib/one-true-awk/main.c | 15 +- > contrib/one-true-awk/makefile | 1 + > contrib/one-true-awk/parse.c | 2 +- > contrib/one-true-awk/proto.h | 7 +- > contrib/one-true-awk/run.c | 647 ++++++++- > contrib/one-true-awk/testdir/T.argv | 6 + > contrib/one-true-awk/testdir/T.csv | 81 ++ > contrib/one-true-awk/testdir/T.misc | 6 + > contrib/one-true-awk/testdir/T.utf | 194 +++ > contrib/one-true-awk/testdir/T.utfre | 234 ++++ > contrib/one-true-awk/testdir/tt.15 | 2 +- > contrib/one-true-awk/testdir/xc | 17 - > contrib/one-true-awk/tran.c | 26 +- > 38 files changed, 3178 insertions(+), 1615 deletions(-) > > diff --cc .gitattributes > index 11fec084166f,000000000000..ab5a1eee005d > mode 100644,000000..100644 > --- a/.gitattributes > +++ b/.gitattributes > @@@ -1,7 -1,0 +1,8 @@@ > +*.c diff=cpp > +*.h diff=cpp > +*.cpp diff=cpp > +*.hpp diff=cpp > +*.py diff=python > +. svn-properties=svn:keywords=tools/build/options/WITHOUT_LOADER_ZFS > +.clang-format svn-properties=svn:keywords=FreeBSD=%H > ++contrib/one-true-awk/bugs-fixed/unicode-null-match.bad binary > diff --cc UPDATING > index 763f8f29a4f0,000000000000..17117a193394 > mode 100644,000000..100644 > --- a/UPDATING > +++ b/UPDATING > @@@ -1,2101 -1,0 +1,2106 @@@ > +Updating Information for users of FreeBSD-CURRENT. > + > +This file is maintained and copyrighted by M. Warner Losh . > +See end of file for further details. For commonly done items, please see the > +COMMON ITEMS: section later in the file. These instructions assume that you > +basically know what you are doing. If not, then please consult the FreeBSD > +handbook: > + > + https://docs.freebsd.org/en/books/handbook/cutting-edge/#makeworld > + > +Items affecting the ports and packages system can be found in > +/usr/ports/UPDATING. Please read that file before updating system packages > +and/or ports. > + > +NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: > + FreeBSD 15.x has many debugging features turned on, in both the kernel > + and userland. These features attempt to detect incorrect use of > + system primitives, and encourage loud failure through extra sanity > + checking and fail stop semantics. They also substantially impact > + system performance. If you want to do performance measurement, > + benchmarking, and optimization, you'll want to turn them off. This > + includes various WITNESS- related kernel options, INVARIANTS, malloc > + debugging flags in userland, and various verbose features in the > + kernel. Many developers choose to disable these features on build > + machines to maximize performance. (To completely disable malloc > + debugging, define WITH_MALLOC_PRODUCTION in /etc/src.conf and rebuild > + world, or to merely disable the most expensive debugging functionality > + at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) > + > ++20231114: > ++ One True Awk updated to the Second Edition as of 20231102 (254b979f32df) > ++ Notable features include UTF-8 support and --csv to support comma > ++ separated data. > ++ > +20231113: > + The WITHOUT_LLD_IS_LD option has been removed. When LLD is enabled > + it is always installed as /usr/bin/ld. > + > +20231027: > + Forward compatibility (running the new code on old kernels) for the > + "ino64" project have been removed. The need for it has passed long ago. > + > +20231018: > + Commit 57ce37f9dcd0 changed the internal KAPI between the > + nfscommon and nfscl modules. Both must be rebuilt from sources. > + > +20231010: > + dialog(1) has been replaced in base by bsddialog(1), while most of the > + time replacing a dialog(1) call by a bsddialog(1) call works out of the > + box, bsddialog(1) is not considered as a drop-in replacement for > + dialog(1). > + > + If you do depend on dialog(1) functionality, please install cdialog > + from ports: > + > + pkg install cdialog > + > +20230927: > + The EARLY_AP_STARTUP kernel option is mandatory on x86. The option > + has been added to DEFAULTS, so it should automatically be included in > + custom kernel configurations without any additional change. > + > +20230922: > + A new loader tunable net.pf.default_to_drop allows pf(4)’s default > + behaviour to be changed from pass to drop. Previously this required > + recompiling the kernel with the option PF_DEFAULT_TO_DROP. > + > +20230914: > + Enable splitting out pkgbase manpages into separate packages by > + default. To disable this, set WITHOUT_MANSPLITPKG=yes in src.conf. > + > +20230911: > + Move standard include files to the clibs-dev package and move clang > + internal libraries and headers to clang and clang-dev. Upgrading systems > + installed using pkgbase past this change involves extra steps to allow > + for these file moves: > + > + pkg upgrade -y FreeBSD-utilities > + pkg upgrade -y FreeBSD-utilities-dev > + pkg upgrade -y > + > +20230909: > + Enable vnet sysctl variables to be loader tunable. SYSCTLs which > + belongs to VNETs can be initialized during early boot or module > + loading if they are marked with CTLFLAG_TUN and there are > + corresponding kernel environment variables. > + > +20230901: > + The WITH_INIT_ALL_PATTERN and WITH_INIT_ALL_ZERO build options have > + been replaced by INIT_ALL=pattern and INIT_ALL=zero respectively. > + > +20230824: > + FreeBSD 15.0-CURRENT. > + > +20230817: > + Serial communication (in boot loaders, kernel, and userland) has > + been changed to default to 115200 bps, in line with common industry > + practice and typcial firmware serial console redirection > + configuration. > + > + Note that the early x86 BIOS bootloader (i.e., boot0sio) does not > + support rates above 9600 bps and is not changed. boot0sio users may > + set BOOT_COMCONSOLE_SPEED=9600 to use 9600 for all of the boot > + components, or use the standard boot0 and have the boot2 stage start > + with the serial port at 115200. > + > +20230807: > + Following the general removal of MIPS support, the ath(4) AHB bus- > + frontend has been removed, too, and building of the PCI support is > + integrated with the ath(4) main module again. As a result, there's > + no longer a need for if_ath_pci_load="YES" in /boot/loader.conf or > + "device ath_pci" in the kernel configuration. > + > +20230803: > + MAXCPU has been increased to 1024 in the amd64 GENERIC kernel config. > + Out-of-tree kernel modules will need to be rebuilt. > + > +20230724: > + CAM has been mechanically updated s/u_int(64|32|16|8)_t/uint\1_t/g > + to move to the standard uintXX_t types from the old, traditional > + BSD u_intXX_t types. This should be a NOP, but may cause problems > + for out of tree changes. The SIMs were not updated since most of > + the old u_intXX_t uses weren't due to CAM interfaces. > + > +20230713: > + stable/14 branch created. > + > +20230629: > + The heuristic for detecting old chromebooks with an EC bug that requires > + atkbdc driver workarounds has changed. There should be no functional > + change, but if your old chromebook's keyboard stops working, please > + file a PR and assign it to imp. > + > +20230623: > + OpenSSL has been updated to version 3.0, including changes throughout > + the base system. It is important to rebuild third-party software > + after upgrading. > + > +20230619: > + To enable pf rdr rules for connections initiated from the host, pf > + filter rules can be optionally enabled for packets delivered > + locally. This can change the behavior of rules which match packets > + delivered to lo0. To enable this feature: > + > + sysctl net.pf.filter_local=1 > + service pf restart > + > + When enabled, its best to ensure that packets delivered locally are not > + filtered, e.g. by adding a 'skip on lo' rule. > + > +20230613: > + Improvements to libtacplus(8) mean that tacplus.conf(5) now > + follows POSIX shell syntax rules. This may cause TACACS+ > + authentication to fail if the shared secret contains a single > + quote, double quote, or backslash character which isn't > + already properly quoted or escaped. > + > +20230612: > + Belatedly switch the default nvme block device on x86 from nvd to nda. > + nda created nvd compatibility links by default, so this should be a > + nop. If this causes problems for your application, set hw.nvme.use_nvd=1 > + in your loader.conf or add `options NVME_USE_NVD=1` to your kernel > + config. To disable the nvd compatibility aliases, add > + kern.cam.nda.nvd_compat=0 to loader.conf. The default has been nda on > + all non-x86 platforms for some time now. If you need to fall back, > + please email imp@freebsd.org about why. > + > + Encrypted swap partitions need to be changed from nvd to nda if you > + migrate, or you need to use the above to switch back to nvd. > + > +20230422: > + Remove portsnap(8). Users are encouraged to obtain the ports tree > + using git instead. > + > +20230420: > + Add jobs.mk to save typing. Enables -j${JOB_MAX} and logging > + eg. > + make buildworld-jobs > + runs > + make -j${JOB_MAX} buildworld > ../buildworld.log 2>&1 > + > + where JOB_MAX is derrived from ncpus in local.sys.mk if not set in env. > + > +20230316: > + Video related devices for some arm devices have been renamed. > + If you have a custom kernel config and want to use hdmi output on > + IMX6 board you need to add "device dwc_hdmi" "device imx6_hdmi" and > + "device imx6_ipu" to it. > + If you have a custom kernel config and want to use hdmi output on > + TI AM335X board you need to add "device tda19988" to it. > + If you add "device hdmi" in it you need to remove it as it doesn't > + exist anymore. > + > +20230221: > + Introduce new kernel options KBD_DELAY1 and KBD_DELAY2. See atkbdc(4) > + for details. > + > +20230206: > + sshd now defaults to having X11Forwarding disabled, following upstream. > + Administrators who wish to enable X11Forwarding should add > + `X11Forwarding yes` to /etc/ssh/sshd_config. > + > +20230204: > + Since commit 75d41cb6967 Huawei 3G/4G LTE Mobile Devices do not default > + to ECM, but NCM mode and need u3g and ucom modules loaded. See cdce(4). > + > +20230130: > + As of commit 7c40e2d5f685, the dependency on netlink(4) has been added > + to the linux_common(4) module. Users relying on linux_common may need > + to complile netlink(4) module if it is not present in their kernel. > + > +20230126: > + The WITHOUT_CXX option has been removed. C++ components in the base > + system are now built unconditionally. > + > +20230113: > + LinuxKPI pci.h changes may require out-of-tree drivers to be recompiled. > + Bump _FreeBSD_version to 1400078 to be able to detect this change. > + > +20221212: > + llvm-objump is now always installed as objdump. Previously there was > + no /usr/bin/objdump unless the WITH_LLVM_BINUTILS knob was used. > + > + Some LLVM objdump options have a different output format compared to > + GNU objdump; readelf is available for inspecting ELF files, and GNU > + objdump is available from the devel/binutils port or package. > + > +20221205: > + dma(8) has replaced sendmail(8) as the default mta. For people willing > + to reenable sendmail(8): > + > + $ cp /usr/share/examples/sendmail/mailer.conf /etc/mail/mailer.conf > + > + and add sendmail_enable="YES" to rc.conf. > + > +20221204: > + hw.bus.disable_failed_devices has changed from 'false' to 'true' by > + default. Now if newbus succeeds in probing a device, but fails to attach > + the device, we'll disable the device. In the past, we'd keep retrying > + the device on each new driver loaded. To get that behavior now, one > + needs to use devctl to re-enable the device, and reprobe it (or set > + the sysctl/tunable hw.bus.disable_failed_devices=false). > + > + NOTE: This was reverted 20221205 due to unexpected compatibility issues > + > +20221122: > + pf no longer accepts 'scrub fragment crop' or 'scrub fragment drop-ovl'. > + These configurations are no longer automatically reinterpreted as > + 'scrub fragment reassemble'. > + > +20221121: > + The WITHOUT_CLANG_IS_CC option has been removed. When Clang is enabled > + it is always installed as /usr/bin/cc (and c++, cpp). > + > +20221026: > + Some programs have been moved into separate packages. It is recommended > + for pkgbase users to do: > + > + pkg install FreeBSD-dhclient FreeBSD-geom FreeBSD-resolvconf \ > + FreeBSD-devd FreeBSD-devmatch > + > + after upgrading to restore all the component that were previously > + installed. > + > +20221002: > + OPIE has been removed from the base system. If needed, it can > + be installed from ports (security/opie) or packages (opie). > + Otherwise, make sure that your PAM policies do not reference > + pam_opie or pam_opieaccess. > + > +20220610: > + LinuxKPI pm.h changes require an update to the latest drm-kmod version > + before re-compiling to avoid errors. > + > +20211230: > + The macros provided for the manipulation of CPU sets (e.g. CPU_AND) > + have been modified to take 2 source arguments instead of only 1. > + Externally maintained sources that use these macros will have to > + be adapted. The FreeBSD version has been bumped to 1400046 to > + reflect this change. > + > +20211214: > + A number of the kernel include files are able to be included by > + themselves. A test has been added to buildworld to enforce this. > + > +20211209: > + Remove mips as a recognized target. This starts the decommissioning of > + mips support in FreeBSD. mips related items will be removed wholesale in > + the coming days and weeks. > + > + This broke the NO_CLEAN build for some people. Either do a clean build > + or touch > + lib/clang/include/llvm/Config/Targets.def > + lib/clang/include/llvm/Config/AsmParsers.def > + lib/clang/include/llvm/Config/Disassemblers.def > + lib/clang/include/llvm/Config/AsmPrinters.def > + before the build to force everything to rebuild that needs to. > + > +20211202: > + Unbound support for RFC8375: The special-use domain 'home.arpa' is > + by default blocked. To unblock it use a local-zone nodefault > + statement in unbound.conf: > + local-zone: "home.arpa." nodefault > + > + Or use another type of local-zone to override with your choice. > + > + The reason for this is discussed in Section 6.1 of RFC8375: > + Because 'home.arpa.' is not globally scoped and cannot be secured > + using DNSSEC based on the root domain's trust anchor, there is no way > + to tell, using a standard DNS query, in which homenet scope an answer > + belongs. Consequently, users may experience surprising results with > + such names when roaming to different homenets. > + > +20211110: > + Commit b8d60729deef changed the TCP congestion control framework so > + that any of the included congestion control modules could be > + the single module built into the kernel. Previously newreno > + was automatically built in through direct reference. As of > + this commit you are required to declare at least one congestion > + control module (e.g. 'options CC_NEWRENO') and to also declare a > + default using the CC_DEFAULT option (e.g. options CC_DEFAULT="newreno\"). > + The GENERIC configuration includes CC_NEWRENO and defines newreno > + as the default. If no congestion control option is built into the > + kernel and you are including networking, the kernel compile will > + fail. Also if no default is declared the kernel compile will fail. > + > +20211118: > + Mips has been removed from universe builds. It will be removed from the > + tree shortly. > + > +20211106: > + Commit f0c9847a6c47 changed the arguments for VOP_ALLOCATE. > + The NFS modules must be rebuilt from sources and any out > + of tree file systems that implement their own VOP_ALLOCATE > + may need to be modified. > + > +20211022: > + The synchronous PPP kernel driver sppp(4) has been removed. > + The cp(4) and ce(4) drivers are now always compiled with netgraph(4) > + support, formerly enabled by NETGRAPH_CRONYX option. > + > +20211020: > + sh(1) is now the default shell for the root user. To force root to use > + the csh shell, please run the following command as root: > + > + # chsh -s csh > + > +20211004: > + Ncurses distribution has been split between libtinfow and libncurses > + with libncurses.so becoming a linker (ld) script to seamlessly link > + to libtinfow as needed. Bump _FreeBSD_version to 1400035 to reflect > + this change. > + > +20210923: > + As of commit 8160a0f62be6, the dummynet module no longer depends on the > + ipfw module. Dummynet can now be used by pf as well as ipfw. As such > + users who relied on this dependency may need to include ipfw in the > + list of modules to load on their systems. > + > +20210922: > + As of commit 903873ce1560, the mixer(8) utility has got a slightly > + new syntax. Please refer to the mixer(8) manual page for more > + information. The old mixer utility can be installed from ports: > + audio/freebsd-13-mixer > + > +20210911: > + As of commit 55089ef4f8bb, the global variable nfs_maxcopyrange has > + been deleted from the nfscommon.ko. As such, nfsd.ko must be built > + from up to date sources to avoid an undefined reference when > + being loaded. > + > +20210817: > + As of commit 62ca9fc1ad56 OpenSSL no longer enables kernel TLS > + by default. Users can enable kernel TLS via the "KTLS" SSL > + option. This can be enabled globally by using a custom > + OpenSSL config file via OPENSSL_CONF or via an > + application-specific configuration option for applications > + which permit setting SSL options via SSL_CONF_cmd(3). > + > +20210811: > + Commit 3ad1e1c1ce20 changed the internal KAPI between the NFS > + modules. Therefore, all need to be rebuilt from sources. > + > +20210730: > + Commit b69019c14cd8 removes pf's DIOCGETSTATESNV ioctl. > + As of be70c7a50d32 it is no longer used by userspace, but it does mean > + users may not be able to enumerate pf states if they update the kernel > + past b69019c14cd8 without first updating userspace past be70c7a50d32. > + > +20210729: > + As of commit 01ad0c007964 if_bridge member interfaces can no longer > + change their MTU. Changing the MTU of the bridge itself will change the > + MTU on all member interfaces instead. > + > +20210716: > + Commit ee29e6f31111 changed the internal KAPI between the nfscommon > + and nfsd modules. Therefore, both need to be rebuilt from sources. > + Bump __FreeBSD_version to 1400026 for this KAPI change. > + > +20210715: > + The 20210707 awk update brought in a change in behavior. This has > + been corrected as of d4d252c49976. Between these dates, if you > + installed a new awk binary, you may not be able to build a new > + kernel because the change in behavior affected the genoffset > + script used to build the kernel. If you did update, the fix is > + to update your sources past the above hash and do > + % cd usr.bin/awk > + % make clean all > + % sudo -E make install > + to enable building kernels again. > + > +20210708: > + Commit 1e0a518d6548 changed the internal KAPI between the NFS > + modules. They all need to be rebuilt from sources. I did not > + bump __FreeBSD_version, since it was bumped recently. > + > +20210707: > + awk has been updated to the latest one-true-awk version 20210215. > + This contains a number of minor bug fixes. > + > +20210624: > + The NFSv4 client now uses the highest minor version of NFSv4 > + supported by the NFSv4 server by default instead of minor version 0, > + for NFSv4 mounts. > + The "minorversion" mount option may be used to override this default. > + > +20210618: > + Bump __FreeBSD_version to 1400024 for LinuxKPI changes. > + Most notably netdev.h can change now as the (last) dependencies > + (mlx4/ofed) are now using struct ifnet directly, but also for PCI > + additions and others. > + > +20210618: > + The directory "blacklisted" under /usr/share/certs/ has been > + renamed to "untrusted". > + > +20210611: > + svnlite has been removed from base. Should you need svn for any reason > + please install the svn package or port. > + > +20210611: > + Commit e1a907a25cfa changed the internal KAPI between the krpc > + and nfsserver. As such, both modules must be rebuilt from > + sources. Bump __FreeBSD_version to 1400022. > + > +20210610: > + The an(4) driver has been removed from FreeBSD. > + > +20210608: > + The vendor/openzfs branch was renamed to vendor/openzfs/legacy to > + start tracking OpenZFS upstream more closely. Please see > +https://lists.freebsd.org/archives/freebsd-current/2021-June/000153.html > + for details on how to correct any errors that might result. The > + short version is that you need to remove the old branch locally: > + git update-ref -d refs/remotes/freebsd/vendor/openzfs > + (assuming your upstream origin is named 'freebsd'). > + > +20210525: > + Commits 17accc08ae15 and de102f870501 add new files to LinuxKPI > + which break drm-kmod. In addition various other additions where > + committed. Bump __FreeBSD_version to 1400015 to be able to > + detect this. > + > +20210513: > + Commit ca179c4d74f2 changed the package in which the OpenSSL > + libraries and utilities are packaged. > + It is recommended for pkgbase user to do: > + pkg install -f FreeBSD-openssl > + before pkg upgrade otherwise some dependencies might not be met > + and pkg will stop working as libssl will not be present anymore > + on the system. > + > +20210426: > + Commit 875977314881 changed the internal KAPI between > + the nfsd and nfscommon modules. As such these modules > + need to be rebuilt from sources. > + Without this patch in your NFSv4.1/4.2 server, enabling > + delegations by setting vfs.nfsd.issue_delegations non-zero > + is not recommended. > + > +20210411: > + Commit 7763814fc9c2 changed the internal KAPI between > + the krpc and NFS. As such, the krpc, nfscommon and > + nfscl modules must all be rebuilt from sources. > + Without this patch, NFSv4.1/4.2 mounts should not > + be done with the nfscbd(8) daemon running, to avoid > + needing a working back channel for server->client RPCs. > + > +20210330: > + Commit 01ae8969a9ee fixed the NFSv4.1/4.2 server so that it > + handles binding of the back channel as required by RFC5661. > + Until this patch is in your server, avoid use of the "nconnects" > + mount option for Linux NFSv4.1/4.2 mounts. > + > +20210225: > + For 64-bit architectures the base system is now built with Position > + Independent Executable (PIE) support enabled by default. It may be > + disabled using the WITHOUT_PIE knob. A clean build is required. > + > +20210128: > + Various LinuxKPI functionality was added which conflicts with DRM. > + Please update your drm-kmod port to after the __FreeBSD_version 1400003 > + update. > + > +20210121: > + stable/13 branch created. > + > +20210108: > + PC Card attachments for all devices have been removed. In the case of > + wi and cmx, the entire drivers were removed because they were only > + PC Card devices. FreeBSD_version 1300134 should be used for this > + since it was bumped so recently. > + > +20210107: > + Transport-independent parts of HID support have been split off the USB > + code in to separate subsystem. Kernel configs which include one of > + ums, ukbd, uhid, atp, wsp, wmt, uaudio, ugold or ucycom drivers should > + be updated with adding of "device hid" line. > + > +20210105: > + ncurses installation has been modified to only keep the widechar > + enabled version. Incremental build is broken for that change, so it > + requires a clean build. > + > +20201223: > + The FreeBSD project has migrated from Subversion to Git. Temporary > + instructions can be found at > + https://github.com/bsdimp/freebsd-git-docs/blob/main/src-cvt.md > + and other documents in that repo. > + > +20201216: > + The services database has been updated to cover more of the basic > + services expected in a modern system. The database is big enough > + that it will cause issues in mergemaster in Releases previous to > + 12.2 and 11.3, or in very old current systems from before r358154. > + > +20201215: > + Obsolete in-tree GDB 6.1.1 has been removed. GDB (including kgdb) > + may be installed from ports or packages. > + > +20201124: > + ping6 has been merged into ping. It can now be called as "ping -6". > + See ping(8) for details. > + > +20201108: > + Default value of net.add_addr_allfibs has been changed to 0. > + If you have multi-fib configuration and rely on existence of all > + interface routes in every fib, you need to set the above sysctl to 1. > + > +20201030: > + The internal pre-processor in the calendar(1) program has been > + extended to support more C pre-processor commands (e.g. #ifdef, #else, > + and #undef) and to detect unbalanced conditional statements. > + Error messages have been extended to include the filename and line > + number if processing stops to help fixing malformed data files. > + > +20201026: > + All the data files for the calendar(1) program, except calendar.freebsd, > + have been moved to the deskutils/calendar-data port, much like the > + jewish calendar entries were moved to deskutils/hebcal years ago. After > + make delete-old-files, you need to install it to retain full > + functionality. calendar(1) will issue a reminder for files it can't > + find. > + > +20200923: > + LINT files are no longer generated. We now include the relevant NOTES > + files. Note: This may cause conflicts with updating in some cases. > + find sys -name LINT\* -delete > + is suggested across this commit to remove the generated LINT files. > + > + If you have tried to update with generated files there, the svn > + command you want to un-auger the tree is > + cd sys/amd64/conf > + svn revert -R . > + and then do the above find from the top level. Substitute 'amd64' > + above with where the error message indicates a conflict. > + > +20200824: > + OpenZFS support has been integrated. Do not upgrade root pools until > + the loader is updated to support zstd. Furthermore, we caution against > + 'zpool upgrade' for the next few weeks. The change should be transparent > + unless you want to use new features. > + > + Not all "NO_CLEAN" build scenarios work across these changes. Many > + scenarios have been tested and fixed, but rebuilding kernels without > + rebuilding world may fail. > + > + The ZFS cache file has moved from /boot to /etc to match the OpenZFS > + upstream default. A fallback to /boot has been added for mountroot. > + > + Pool auto import behavior at boot has been moved from the kernel module > + to an explicit "zpool import -a" in one of the rc scripts enabled by > + zfs_enable=YES. This means your non-root zpools won't auto import until > + you upgrade your /etc/rc.d files. > + > +20200824: > + The resume code now notifies devd with the 'kernel' system > + rather than the old 'kern' subsystem to be consistent with > + other use. The old notification will be created as well, but > + will be removed prior to FreeBSD 14.0. > + > +20200821: > + r362275 changed the internal API between the kernel RPC and the > + NFS modules. As such, all the modules must be recompiled from > + sources. > + > +20200817: > + r364330 modified the internal API used between the NFS modules. > + As such, all the NFS modules must be re-compiled from sources. > + > +20200816: > + Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have > + been upgraded to 11.0.0. Please see the 20141231 entry below for > + information about prerequisites and upgrading, if you are not already > + using clang 3.5.0 or higher. > + > +20200810: > + r364092 modified the internal ABI used between the kernel NFS > + modules. As such, all of these modules need to be rebuilt > + from sources, so a version bump was done. > + > +20200807: > + Makefile.inc has been updated to work around the issue documented in > + 20200729. It was a case where the optimization of using symbolic links > + to point to binaries created a situation where we'd run new binaries > + with old libraries starting midway through the installworld process. > + > +20200729: > + r363679 has redefined some undefined behavior in regcomp(3); notably, > + extraneous escapes of most ordinary characters will no longer be > + accepted. An exp-run has identified all of the problems with this in > + ports, but other non-ports software may need extra escapes removed to > + continue to function. > + > + Because of this change, installworld may encounter the following error > + from rtld: Undefined symbol "regcomp@FBSD_1.6" -- It is imperative that > + you do not halt installworld. Instead, let it run to completion (whether > + successful or not) and run installworld once more. > + > +20200627: > + A new implementation of bc and dc has been imported in r362681. This > + implementation corrects non-conformant behavior of the previous bc > + and adds GNU bc compatible options. It offers a number of extensions, > + is much faster on large values, and has support for message catalogs > + (a number of languages are already supported, contributions of further > + languages welcome). The option WITHOUT_GH_BC can be used to build the > + world with the previous versions of bc and dc. > + > +20200625: > + r362639 changed the internal API used between the NFS kernel modules. > + As such, they all need to be rebuilt from sources. > + > +20200613: > + r362158 changed the arguments for VFS_CHECKEXP(). As such, any > + out of tree file systems need to be modified and rebuilt. > + Also, any file systems that are modules must be rebuilt. > + > +20200604: > + read(2) of a directory fd is now rejected by default. root may > + re-enable it for system root only on non-ZFS filesystems with the > + security.bsd.allow_read_dir sysctl(8) MIB if > + security.bsd.suser_enabled=1. > + > + It may be advised to setup aliases for grep to default to `-d skip` if > + commonly non-recursively grepping a list that includes directories and > + the potential for the resulting stderr output is not tolerable. Example > + aliases are now installed, commented out, in /root/.cshrc and > + /root/.shrc. > + > +20200523: > + Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have > + been upgraded to 10.0.1. Please see the 20141231 entry below for > + information about prerequisites and upgrading, if you are not already > + using clang 3.5.0 or higher. > + > +20200512: > + Support for obsolete compilers has been removed from the build system. > + Clang 6 and GCC 6.4 are the minimum supported versions. > + > +20200424: > + closefrom(2) has been moved under COMPAT12, and replaced in libc with a > + stub that calls close_range(2). If using a custom kernel configuration, > + you may want to ensure that the COMPAT_FREEBSD12 option is included, as > + a slightly older -CURRENT userland and older FreeBSD userlands may not > + be functional without closefrom(2). > + > +20200414: > + Upstream DTS from Linux 5.6 was merged and they now have the SID > + and THS (Secure ID controller and THermal Sensor) node present. > + The DTB overlays have now been removed from the tree for the H3/H5 and > + A64 SoCs and the aw_sid and aw_thermal driver have been updated to > + deal with upstream DTS. If you are using those overlays you need to > + remove them from loader.conf and update the DTBs on the FAT partition. > + > +20200310: > + Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have > + been upgraded to 10.0.0. Please see the 20141231 entry below for > + information about prerequisites and upgrading, if you are not already > + using clang 3.5.0 or higher. > + > +20200309: > + The amd(8) automount daemon has been removed from the source tree. > + As of FreeBSD 10.1 autofs(5) is the preferred tool for automounting. > + amd is still available in the sysutils/am-utils port. > + > +20200301: > + Removed brooktree driver (bktr.4) from the tree. > + > +20200229: > + The WITH_GPL_DTC option has been removed. The BSD-licenced device tree > + compiler in usr.bin/dtc is used on all architectures which use dtc, and > + the GPL dtc is available (if needed) from the sysutils/dtc port. > + > +20200229: > + The WITHOUT_LLVM_LIBUNWIND option has been removed. LLVM's libunwind > + is used by all supported CPU architectures. > + > +20200229: > + GCC 4.2.1 has been removed from the tree. The WITH_GCC, > + WITH_GCC_BOOTSTRAP, and WITH_GNUCXX options are no longer available. > + Users who wish to build FreeBSD with GCC must use the external toolchain > + ports or packages. > + > +20200220: > + ncurses has been updated to a newer version (6.2-20200215). Given the ABI > + has changed, users will have to rebuild all the ports that are linked to > + ncurses. > + > +20200217: > + The size of struct vnet and the magic cookie have changed. > + Users need to recompile libkvm and all modules using VIMAGE > + together with their new kernel. > + > +20200212: > + Defining the long deprecated NO_CTF, NO_DEBUG_FILES, NO_INSTALLLIB, > + NO_MAN, NO_PROFILE, and NO_WARNS variables is now an error. Update > + your Makefiles and scripts to define MK_=no instead as required. > + > + One exception to this is that program or library Makefiles should > + define MAN to empty rather than setting MK_MAN=no. > + > +20200108: > + Clang/LLVM is now the default compiler and LLD the default > + linker for riscv64. > + > +20200107: > + make universe no longer uses GCC 4.2.1 on any architectures. > + Architectures not supported by in-tree Clang/LLVM require an > + external toolchain package. > + > +20200104: > + GCC 4.2.1 is now not built by default, as part of the GCC 4.2.1 > + retirement plan. Specifically, the GCC, GCC_BOOTSTRAP, and GNUCXX > + options default to off for all supported CPU architectures. As a > + short-term transition aid they may be enabled via WITH_* options. > + GCC 4.2.1 is expected to be removed from the tree on 2020-03-31. > + > +20200102: > + Support for armv5 has been disconnected and is being removed. The > + machine combination MACHINE=arm MACHINE_ARCH=arm is no longer valid. > + You must now use a MACHINE_ARCH of armv6 or armv7. The default > + MACHINE_ARCH for MACHINE=arm is now armv7. > + > +20191226: > + Clang/LLVM is now the default compiler for all powerpc architectures. > + LLD is now the default linker for powerpc64. The change for powerpc64 > + also includes a change to the ELFv2 ABI, incompatible with the existing > + ABI. > + > +20191226: > + Kernel-loadable random(4) modules are no longer unloadable. > + > +20191222: > + Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have > + been upgraded to 9.0.1. Please see the 20141231 entry below for > + information about prerequisites and upgrading, if you are not already > + using clang 3.5.0 or higher. > + > +20191212: > + r355677 has modified the internal interface used between the > + NFS modules in the kernel. As such, they must all be upgraded > + simultaneously. I will do a version bump for this. > + > +20191205: > + The root certificates of the Mozilla CA Certificate Store have been > + imported into the base system and can be managed with the certctl(8) > + utility. If you have installed the security/ca_root_nss port or package > + with the ETCSYMLINK option (the default), be advised that there may be > + differences between those included in the port and those included in > + base due to differences in nss branch used as well as general update > + frequency. Note also that certctl(8) cannot manage certs in the > + format used by the security/ca_root_nss port. > + > +20191120: > + The amd(8) automount daemon has been disabled by default, and will be > + removed in the future. As of FreeBSD 10.1 the autofs(5) is available > + for automounting. > + > +20191107: > + The nctgpio and wbwd drivers have been moved to the superio bus. > + If you have one of these drivers in a kernel configuration, then > + you should add device superio to it. If you use one of these drivers > + as a module and you compile a custom set of modules, then you should > + add superio to the set. > + > +20191021: > + KPIs for network drivers to access interface addresses have changed. > + Users need to recompile NIC driver modules together with kernel. > + > +20191021: > + The net.link.tap.user_open sysctl no longer prevents user opening of > + already created /dev/tapNN devices. Access is still controlled by > + node permissions, just like tun devices. The net.link.tap.user_open > + sysctl is now used only to allow users to perform devfs cloning of > + tap devices, and the subsequent open may not succeed if the user is not > + in the appropriate group. This sysctl may be deprecated/removed > + completely in the future. > + > +20191009: > + mips, powerpc, and sparc64 are no longer built as part of > + universe / tinderbox unless MAKE_OBSOLETE_GCC is defined. If > + not defined, mips, powerpc, and sparc64 builds will look for > + the xtoolchain binaries and if installed use them for universe > + builds. As llvm 9.0 becomes vetted for these architectures, they > + will be removed from the list. > + > +20191009: > + Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have > + been upgraded to 9.0.0. Please see the 20141231 entry below for > + information about prerequisites and upgrading, if you are not already > + using clang 3.5.0 or higher. > + > +20191003: > + The hpt27xx, hptmv, hptnr, and hptrr drivers have been removed from > + GENERIC. They are available as modules and can be loaded by adding > + to /boot/loader.conf hpt27xx_load="YES", hptmv_load="YES", > + hptnr_load="YES", or hptrr_load="YES", respectively. > + > +20190913: > + ntpd no longer by default locks its pages in memory, allowing them > + to be paged out by the kernel. Use rlimit memlock to restore > + historic BSD behaviour. For example, add "rlimit memlock 32" > + to ntp.conf to lock up to 32 MB of ntpd address space in memory. > + > +20190823: > + Several of ping6's options have been renamed for better consistency > + with ping. If you use any of -ARWXaghmrtwx, you must update your > + scripts. See ping6(8) for details. > + > +20190727: > + The vfs.fusefs.sync_unmount and vfs.fusefs.init_backgrounded sysctls > + and the "-o sync_unmount" and "-o init_backgrounded" mount options have > + been removed from mount_fusefs(8). You can safely remove them from > + your scripts, because they had no effect. > + > + The vfs.fusefs.fix_broken_io, vfs.fusefs.sync_resize, > + vfs.fusefs.refresh_size, vfs.fusefs.mmap_enable, > + vfs.fusefs.reclaim_revoked, and vfs.fusefs.data_cache_invalidate > + sysctls have been removed. If you felt the need to set any of them to > + a non-default value, please tell asomers@FreeBSD.org why. > + > +20190713: > + Default permissions on the /var/account/acct file (and copies of it > + rotated by periodic daily scripts) are changed from 0644 to 0640 > + because the file contains sensitive information that should not be > + world-readable. If the /var/account directory must be created by > + rc.d/accounting, the mode used is now 0750. Admins who use the > + accounting feature are encouraged to change the mode of an existing > + /var/account directory to 0750 or 0700. > + > +20190620: > + Entropy collection and the /dev/random device are no longer optional > + components. The "device random" option has been removed. > + Implementations of distilling algorithms can still be made loadable > + with "options RANDOM_LOADABLE" (e.g., random_fortuna.ko). > + > +20190612: > + Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have > + been upgraded to 8.0.1. Please see the 20141231 entry below for > + information about prerequisites and upgrading, if you are not already > + using clang 3.5.0 or higher. > + > +20190608: > + A fix was applied to i386 kernel modules to avoid panics with > + dpcpu or vnet. Users need to recompile i386 kernel modules > + having pcpu or vnet sections or they will refuse to load. > + > +20190513: > + User-wired pages now have their own counter, > + vm.stats.vm.v_user_wire_count. The vm.max_wired sysctl was renamed > + to vm.max_user_wired and changed from an unsigned int to an unsigned > + long. bhyve VMs wired with the -S are now subject to the user > + wiring limit; the vm.max_user_wired sysctl may need to be tuned to > + avoid running into the limit. > + > +20190507: > + The IPSEC option has been removed from GENERIC. Users requiring > + ipsec(4) must now load the ipsec(4) kernel module. > + > +20190507: > + The tap(4) driver has been folded into tun(4), and the module has been > + renamed to tuntap. You should update any kld_list="if_tap" or > + kld_list="if_tun" entries in /etc/rc.conf, if_tap_load="YES" or > + if_tun_load="YES" entries in /boot/loader.conf to load the if_tuntap > + module instead, and "device tap" or "device tun" entries in kernel > *** 1499 LINES SKIPPED *** > From nobody Tue Nov 14 09:39:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SV1TS0Z8Xz51DKL; Tue, 14 Nov 2023 09:39: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 4SV1TR6ycbz4KQl; Tue, 14 Nov 2023 09:39:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699954748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cPknaPrlQi/rNWPU+SudONgDmxlTZO4RaPDAJ37bqMw=; b=TjAoqXOKEiLpIUlBXvx80D55Kprsl9AEZ9Febs6gRoTwkkcBUA0w8cMsSPdjire12gbQMc 24zApA/U7h1C6FkUI4Ggc/30z5L/8qnTyS/dMWTbIq0EE6WsxwbhnLigcJSeFrSHVBTNFl qDEPHFuZT7nI8FQqR1YaR7WJ3c7f2ZdzPgri+JIyvhQ3wUm4Y8qwNbOvk3+ZCdJmYXqJXq xUGH/R7rUWBK2Dc3+b+wfYftYau9R9Zr6oIIE2DJd7fWGZF4SofJwxM2e9XqQWHFGsn0z2 ZvBbSgdUsSTOsS5KX2iEe1HUzf7swjH7duyTVBF4ZYJSMOzdDkqzBTT6d+zltg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699954748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cPknaPrlQi/rNWPU+SudONgDmxlTZO4RaPDAJ37bqMw=; b=W84og/Sh3+wLybm5qvCMomLnJPCzyO51SQ7MzHsTxOOcuCNi+XjSawOC8xaAqfw9u7YYze RzxzPXb9Y0ghZsDWZjAmdLxe6etOSAWV4Am7hGbO2vLiq1EkVGFU9tKlJH/jPmJNITOxaG +GbWJqwKbj+dM/9WpvpkXlGa6dP0FSRXQTzrlkA0lvV1HnOZbOSQmwopyvHkzGIN8G6XyC NbAdF/Hs1WZ3SQsSQQORCGgFi8ky0qFxxLCP+7a65B1mWQ5V/fLVGi1auBNJHq9VKdH5JE OSn+GQKULgf0VRVT0Yx5FCOuAsOib0wgB641+TvrV+1zn0IY/PZEeW0g1eQdOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699954748; a=rsa-sha256; cv=none; b=R0IsWhg2LH8Mz9/Hpgp/E2O67ZNCVgyHC/cqGVPUAUWg/DfMUwKZCUfWz270Z/Bd7hTLNd pM/R8Aixld13xerXSt9RnuUEyQz8IkTehD8YOqWIcf94RDDQfKv7H/vYOciKF4KcEIvOMS f9CA0uJ4wKJ/7c9es1ukfa9HUqrZ5PZZKKAhV4Wlye/NyTlwZv8CVAm1ByQLl6Ftsa+l0J +11Ncbx6IjxlMK3DsnmW8vTAF63XCD5J2Nfz7AcQUPKq87mdD06TJfu7WiNAorrOOGTvia N6blcSnQxm1diL7JIWKLcLkq3yhDUqURdz16g8tVHbqE5Uv/DjiTCMZqoBNkTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SV1TR6296zjft; Tue, 14 Nov 2023 09:39: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 3AE9d7MN085211; Tue, 14 Nov 2023 09:39:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AE9d7wf085208; Tue, 14 Nov 2023 09:39:07 GMT (envelope-from git) Date: Tue, 14 Nov 2023 09:39:07 GMT Message-Id: <202311140939.3AE9d7wf085208@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eugene Grosbein Subject: git: 20e1f207cc78 - main - ng_ipfw: allow use of 32 bits wide cookies List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 20e1f207cc789a28783344614d6d1d1c639c5797 Auto-Submitted: auto-generated The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=20e1f207cc789a28783344614d6d1d1c639c5797 commit 20e1f207cc789a28783344614d6d1d1c639c5797 Author: Eugene Grosbein AuthorDate: 2023-11-14 09:36:08 +0000 Commit: Eugene Grosbein CommitDate: 2023-11-14 09:36:08 +0000 ng_ipfw: allow use of 32 bits wide cookies There is no reason in truncating 32 bits cookie value to 16 bits. Reviewed by: glebius MFC after: 2 weeks --- sys/netgraph/ng_ipfw.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/netgraph/ng_ipfw.c b/sys/netgraph/ng_ipfw.c index b660a825c814..01592a4bbb7d 100644 --- a/sys/netgraph/ng_ipfw.c +++ b/sys/netgraph/ng_ipfw.c @@ -69,7 +69,7 @@ static ng_findhook_t ng_ipfw_findhook; static ng_rcvdata_t ng_ipfw_rcvdata; static ng_disconnect_t ng_ipfw_disconnect; -static hook_p ng_ipfw_findhook1(node_p, u_int16_t ); +static hook_p ng_ipfw_findhook1(node_p, uint32_t ); static int ng_ipfw_input(struct mbuf **, struct ip_fw_args *, bool); /* We have only one node */ @@ -94,7 +94,7 @@ MODULE_DEPEND(ng_ipfw, ipfw, 3, 3, 3); /* Information we store for each hook */ struct ng_ipfw_hook_priv { hook_p hook; - u_int16_t rulenum; + uint32_t cookie; }; typedef struct ng_ipfw_hook_priv *hpriv_p; @@ -152,7 +152,7 @@ static int ng_ipfw_newhook(node_p node, hook_p hook, const char *name) { hpriv_p hpriv; - u_int16_t rulenum; + uint32_t cookie; const char *cp; char *endptr; @@ -166,7 +166,7 @@ ng_ipfw_newhook(node_p node, hook_p hook, const char *name) return (EINVAL); /* Convert it to integer */ - rulenum = (u_int16_t)strtol(name, &endptr, 10); + cookie = (uint32_t)strtoul(name, &endptr, 10); if (*endptr != '\0') return (EINVAL); @@ -176,7 +176,7 @@ ng_ipfw_newhook(node_p node, hook_p hook, const char *name) return (ENOMEM); hpriv->hook = hook; - hpriv->rulenum = rulenum; + hpriv->cookie = cookie; NG_HOOK_SET_PRIVATE(hook, hpriv); @@ -198,10 +198,10 @@ ng_ipfw_connect(hook_p hook) static hook_p ng_ipfw_findhook(node_p node, const char *name) { - u_int16_t n; /* numeric representation of hook */ + uint32_t n; /* numeric representation of hook */ char *endptr; - n = (u_int16_t)strtol(name, &endptr, 10); + n = (uint32_t)strtoul(name, &endptr, 10); if (*endptr != '\0') return NULL; return ng_ipfw_findhook1(node, n); @@ -209,14 +209,14 @@ ng_ipfw_findhook(node_p node, const char *name) /* Look up hook by rule number */ static hook_p -ng_ipfw_findhook1(node_p node, u_int16_t rulenum) +ng_ipfw_findhook1(node_p node, uint32_t cookie) { hook_p hook; hpriv_p hpriv; LIST_FOREACH(hook, &node->nd_hooks, hk_hooks) { hpriv = NG_HOOK_PRIVATE(hook); - if (NG_HOOK_IS_VALID(hook) && (hpriv->rulenum == rulenum)) + if (NG_HOOK_IS_VALID(hook) && (hpriv->cookie == cookie)) return (hook); } From nobody Tue Nov 14 12:57:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SV5t26J2xz50sZV; Tue, 14 Nov 2023 12:57:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SV5t25skPz3GGR; Tue, 14 Nov 2023 12:57:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699966634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2yFVPDC40YH/ervxs50WVtIjLdYHGeaPSFcR1Wya9t4=; b=kjfIulAKZr6+3WL2ey8y/0QrxRMdceb1dgZ6B6TuI6XkL+b0YPJ2siCWm0t9MQ4DkA2m9m K1HtKPgJLZxzulCQ0QaTTcrQ0OZz6GLWws05ojEXh/yqBnXFC9Zp+ojiKurhKIrk/pZdf1 wsMA9eGSlJGKvBQNRhkmJCkPzpNar4RMrO3AtL5/4gHtBgrZYcpqJgN2FclkXMLbkOgpiY qYLidGK9GOy+0Tg2kh3g06I/DIG2MnRL8T9Oqg8iUsPJ2EeFryJ/W8iqwbfWAMQPL13sFI J8zDPzbiEGrcxV41PE8eXtJ/nQRV1jccYbr+OPGsYr3QyEzPSYaM8EYlY59gMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699966634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2yFVPDC40YH/ervxs50WVtIjLdYHGeaPSFcR1Wya9t4=; b=kRk3oAOMBahxyxrglsJWF2luvSAF1FPRcSnT2GKng3opw76kIJvBDgFUSRDf/XIIphyaYB mIBVqb0G5T7fFk/5rTJY5uq2gOooqIEZE0tddytgavQDrBlomG0ZQV2704tfRmrEOFobsa r98ISQVNCIZbw+jBPB6HfYPKoyvc+y5BB7GjCw3JPkzaxAUVg3AJrJsUsuFIAAvY3LtuQ9 ifb5hMJ0WmZzpQEI7+f46ZFZPDOCfzz/Lc0hnqZ/qGhQU/WMHVzEC2sNjajDfcz5uDFbod XpeTCAsd/+S/3Ocd4h2hIeA0rFdC35vsRzJFtdeyGENqrgG5rSXNGJwkr4HcXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699966634; a=rsa-sha256; cv=none; b=ID5cpdAUfKKbFr0TceeBwpvLQkQ4Jns5oSguhRsj6+Wox+zP/fX/d5IDrZ71lgWGU0GT/T j6t0k+E6ifZf3rj4tE/Pkd04wP2fTlh5rXFhUr9bQnSKjchKGVWO/ntcMIVDhzNhmufl/g Hi9NW1ug/RRVOntESI4oGRYy3ZMV+Jq2cE+VDDw3/xT+WFR8y8aX5reMPFGPLQbf/8AHyX gfchJCBEu6XPgu+x3XCDPirJCf6ZFgqnL2O+hA9hVqIXWHiJFFfjUgagub4CHdO3jF9Enw F1CbvMXv9qkskXA0i4GLLPo+KB5yBvssxWBm3zgqFHLh6NeTb6+mSg385G5RAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SV5t24wRmzq8G; Tue, 14 Nov 2023 12:57: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 3AECvEZj017030; Tue, 14 Nov 2023 12:57:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AECvEkZ017027; Tue, 14 Nov 2023 12:57:14 GMT (envelope-from git) Date: Tue, 14 Nov 2023 12:57:14 GMT Message-Id: <202311141257.3AECvEkZ017027@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 7ab9e36fc544 - stable/14 - nvme: Introduce longer timeouts for admin 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: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7ab9e36fc54445fd72741fb0c85d84694da046f4 Auto-Submitted: auto-generated The branch stable/14 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=7ab9e36fc54445fd72741fb0c85d84694da046f4 commit 7ab9e36fc54445fd72741fb0c85d84694da046f4 Author: Alexander Motin AuthorDate: 2023-11-06 16:05:48 +0000 Commit: Alexander Motin CommitDate: 2023-11-14 12:54:18 +0000 nvme: Introduce longer timeouts for admin queue KIOXIA CD8 SSDs routinely take ~25 seconds to delete non-empty namespace. In some cases like hot-plug it takes longer, triggering timeout and controller resets after just 30 seconds. Linux for many years has separate 60 seconds timeout for admin queue. This patch does the same. And it is good to be consistent. Sponsored by: iXsystems, Inc. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42454 (cherry picked from commit 8d6c0743e36e3cff9279c40468711a82db98df23) --- sys/dev/nvme/nvme_ctrlr.c | 6 ++++++ sys/dev/nvme/nvme_private.h | 2 ++ sys/dev/nvme/nvme_qpair.c | 2 ++ sys/dev/nvme/nvme_sysctl.c | 15 ++++++++++----- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index ef4d7daa6efa..3eca24f1f6a5 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1451,6 +1451,12 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev) to = NVME_CAP_LO_TO(cap_lo) + 1; ctrlr->ready_timeout_in_ms = to * 500; + timeout_period = NVME_ADMIN_TIMEOUT_PERIOD; + TUNABLE_INT_FETCH("hw.nvme.admin_timeout_period", &timeout_period); + timeout_period = min(timeout_period, NVME_MAX_TIMEOUT_PERIOD); + timeout_period = max(timeout_period, NVME_MIN_TIMEOUT_PERIOD); + ctrlr->admin_timeout_period = timeout_period; + timeout_period = NVME_DEFAULT_TIMEOUT_PERIOD; TUNABLE_INT_FETCH("hw.nvme.timeout_period", &timeout_period); timeout_period = min(timeout_period, NVME_MAX_TIMEOUT_PERIOD); diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index 496bd8229e0a..72797d30a3bf 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -86,6 +86,7 @@ MALLOC_DECLARE(M_NVME); #define NVME_MAX_CONSUMERS (2) #define NVME_MAX_ASYNC_EVENTS (8) +#define NVME_ADMIN_TIMEOUT_PERIOD (60) /* in seconds */ #define NVME_DEFAULT_TIMEOUT_PERIOD (30) /* in seconds */ #define NVME_MIN_TIMEOUT_PERIOD (5) #define NVME_MAX_TIMEOUT_PERIOD (120) @@ -281,6 +282,7 @@ struct nvme_controller { uint32_t int_coal_threshold; /** timeout period in seconds */ + uint32_t admin_timeout_period; uint32_t timeout_period; /** doorbell stride */ diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index cd0057f444b8..2e9af4310a15 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -1158,6 +1158,8 @@ nvme_qpair_submit_tracker(struct nvme_qpair *qpair, struct nvme_tracker *tr) if (req->timeout) { if (req->cb_fn == nvme_completion_poll_cb) timeout = 1; + else if (qpair->id == 0) + timeout = ctrlr->admin_timeout_period; else timeout = ctrlr->timeout_period; tr->deadline = getsbinuptime() + timeout * SBT_1S; diff --git a/sys/dev/nvme/nvme_sysctl.c b/sys/dev/nvme/nvme_sysctl.c index ac0d507e2337..d6452a2e5492 100644 --- a/sys/dev/nvme/nvme_sysctl.c +++ b/sys/dev/nvme/nvme_sysctl.c @@ -132,8 +132,8 @@ nvme_sysctl_int_coal_threshold(SYSCTL_HANDLER_ARGS) static int nvme_sysctl_timeout_period(SYSCTL_HANDLER_ARGS) { - struct nvme_controller *ctrlr = arg1; - uint32_t newval = ctrlr->timeout_period; + uint32_t *ptr = arg1; + uint32_t newval = *ptr; int error = sysctl_handle_int(oidp, &newval, 0, req); if (error || (req->newptr == NULL)) @@ -143,7 +143,7 @@ nvme_sysctl_timeout_period(SYSCTL_HANDLER_ARGS) newval < NVME_MIN_TIMEOUT_PERIOD) { return (EINVAL); } else { - ctrlr->timeout_period = newval; + *ptr = newval; } return (0); @@ -352,10 +352,15 @@ nvme_sysctl_initialize_ctrlr(struct nvme_controller *ctrlr) nvme_sysctl_int_coal_threshold, "IU", "Interrupt coalescing threshold"); + SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO, + "admin_timeout_period", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, + &ctrlr->admin_timeout_period, 0, nvme_sysctl_timeout_period, "IU", + "Timeout period for Admin queue (in seconds)"); + SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO, "timeout_period", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, - ctrlr, 0, nvme_sysctl_timeout_period, "IU", - "Timeout period (in seconds)"); + &ctrlr->timeout_period, 0, nvme_sysctl_timeout_period, "IU", + "Timeout period for I/O queues (in seconds)"); SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO, "num_cmds", CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_MPSAFE, From nobody Tue Nov 14 12:58:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SV5vM5lxfz50sps; Tue, 14 Nov 2023 12:58: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 4SV5vM5JByz3GR1; Tue, 14 Nov 2023 12:58:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699966703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0z8Fp4YItAuUG7y2aWkiau/D2pQEI+WL5ZVbPRSgM9o=; b=ul/aTIMbHhfTJf8WCCTQYKMHd26XIP0Oy+xsroCstg4BPLdnFqXv8ECJER4YUSlOQRnu5E wjJRIJgMTuKO8DAKnbTwi+FlEWvn2ujEc+yfTRgVGaqv8hkuFg5TNaH7V9IbuYKCaAF/q6 wKcFs6hYxXK9ouC+7gttnixJ6hgKKlsEGFFSTqgELJN1lDli7jqsXkTZRXB77LdbHkJwdF WaMf4zOds/fnQZjZg/cBfJ9f1AbcxxEh8T8rzCFKWIDepV0VIf/H3dPR8rzklCbiKL7Mco XgWPWxiS9m+9e7PzB9DUcXMTorZKYuoYqTENJXhxFgMyLHl68TNnK7NiKk4y2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699966703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0z8Fp4YItAuUG7y2aWkiau/D2pQEI+WL5ZVbPRSgM9o=; b=Zq07KTCXWi+2GLzDrgvvjeym9lENQ0jmZzBesYqTvvemZS8FTN8+riqLlQtnxNRTdrGObt bVMBpqPLOKWeSjQZ+JBHQxrmLs1MlQraAj6su0bfYvvZqFAXAn31F7Hl0i/DutvzWeQH/z YmTJBaI7w3G7/R6CD0ri6Gs09lJ4mYo7KOEY3K2A/BHqHC8OV2LGZv0OzG/MgT3j0w7Yte AHjZgTUjX90HItirl6SvCpXfUOt40a+nVgWoCsGwq06mP9UI8Ck/i60dXvKkHxDDIllbJB yAAU/JEHYck4Iq5yzbolg5Qh5TV3Jkf2xXOMHvAf6NCmNuXl6vbyzCrVJ+VFwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699966703; a=rsa-sha256; cv=none; b=Z17ZewUbKjU7Gy/WXS9aADdkgLda7G7OEhe9gXPya1xlB/HxHIaTOXUMOdK9l6E4lajEIV cWWYbI2oqgo9JS4JS9DItJ2y2vPIkd6vs/7T2Vy6K7tLArmYeGIDZd21AwuIEdIbnag3yX 0wvs/VcICALhPP3lRr9xKJT13XvBGfjx6uyw1K1XxamG01koVUerye3xWVxRJRY+SHO0sq IJ2Ye/hilUc9WQiChNIZu1PmdnFQDfaeB7QMWXmD9YpSRce2rsqy24pYTr2AysJViEiuqe lGbx9pd6lf7ba5XlPhJ2uCiHghTsLCx5tzfsvQ0HJgq/2ZKcvAJON+IKflH9Zw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SV5vM4MS1zq2x; Tue, 14 Nov 2023 12:58: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 3AECwN17017303; Tue, 14 Nov 2023 12:58:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AECwNsp017300; Tue, 14 Nov 2023 12:58:23 GMT (envelope-from git) Date: Tue, 14 Nov 2023 12:58:23 GMT Message-Id: <202311141258.3AECwNsp017300@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 35372e305863 - stable/13 - nvme: Introduce longer timeouts for admin 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: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 35372e305863b7c372d8f019d3f422e7d2ee3be9 Auto-Submitted: auto-generated The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=35372e305863b7c372d8f019d3f422e7d2ee3be9 commit 35372e305863b7c372d8f019d3f422e7d2ee3be9 Author: Alexander Motin AuthorDate: 2023-11-06 16:05:48 +0000 Commit: Alexander Motin CommitDate: 2023-11-14 12:57:28 +0000 nvme: Introduce longer timeouts for admin queue KIOXIA CD8 SSDs routinely take ~25 seconds to delete non-empty namespace. In some cases like hot-plug it takes longer, triggering timeout and controller resets after just 30 seconds. Linux for many years has separate 60 seconds timeout for admin queue. This patch does the same. And it is good to be consistent. Sponsored by: iXsystems, Inc. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42454 (cherry picked from commit 8d6c0743e36e3cff9279c40468711a82db98df23) --- sys/dev/nvme/nvme_ctrlr.c | 6 ++++++ sys/dev/nvme/nvme_private.h | 2 ++ sys/dev/nvme/nvme_qpair.c | 2 ++ sys/dev/nvme/nvme_sysctl.c | 15 ++++++++++----- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 84aa402af4f8..bcbc8dc26ee1 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1437,6 +1437,12 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev) to = NVME_CAP_LO_TO(cap_lo) + 1; ctrlr->ready_timeout_in_ms = to * 500; + timeout_period = NVME_ADMIN_TIMEOUT_PERIOD; + TUNABLE_INT_FETCH("hw.nvme.admin_timeout_period", &timeout_period); + timeout_period = min(timeout_period, NVME_MAX_TIMEOUT_PERIOD); + timeout_period = max(timeout_period, NVME_MIN_TIMEOUT_PERIOD); + ctrlr->admin_timeout_period = timeout_period; + timeout_period = NVME_DEFAULT_TIMEOUT_PERIOD; TUNABLE_INT_FETCH("hw.nvme.timeout_period", &timeout_period); timeout_period = min(timeout_period, NVME_MAX_TIMEOUT_PERIOD); diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index e34dc20c2819..e2e2f5efeacc 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -85,6 +85,7 @@ MALLOC_DECLARE(M_NVME); #define NVME_MAX_CONSUMERS (2) #define NVME_MAX_ASYNC_EVENTS (8) +#define NVME_ADMIN_TIMEOUT_PERIOD (60) /* in seconds */ #define NVME_DEFAULT_TIMEOUT_PERIOD (30) /* in seconds */ #define NVME_MIN_TIMEOUT_PERIOD (5) #define NVME_MAX_TIMEOUT_PERIOD (120) @@ -287,6 +288,7 @@ struct nvme_controller { uint32_t int_coal_threshold; /** timeout period in seconds */ + uint32_t admin_timeout_period; uint32_t timeout_period; /** doorbell stride */ diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index e31e4249b20c..d810d51fadce 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -1062,6 +1062,8 @@ nvme_qpair_submit_tracker(struct nvme_qpair *qpair, struct nvme_tracker *tr) if (req->timeout) { if (req->cb_fn == nvme_completion_poll_cb) timeout = 1; + else if (qpair->id == 0) + timeout = ctrlr->admin_timeout_period; else timeout = ctrlr->timeout_period; tr->deadline = getsbinuptime() + timeout * SBT_1S; diff --git a/sys/dev/nvme/nvme_sysctl.c b/sys/dev/nvme/nvme_sysctl.c index 091c2f572eaf..c9c57ac91af5 100644 --- a/sys/dev/nvme/nvme_sysctl.c +++ b/sys/dev/nvme/nvme_sysctl.c @@ -132,8 +132,8 @@ nvme_sysctl_int_coal_threshold(SYSCTL_HANDLER_ARGS) static int nvme_sysctl_timeout_period(SYSCTL_HANDLER_ARGS) { - struct nvme_controller *ctrlr = arg1; - uint32_t newval = ctrlr->timeout_period; + uint32_t *ptr = arg1; + uint32_t newval = *ptr; int error = sysctl_handle_int(oidp, &newval, 0, req); if (error || (req->newptr == NULL)) @@ -143,7 +143,7 @@ nvme_sysctl_timeout_period(SYSCTL_HANDLER_ARGS) newval < NVME_MIN_TIMEOUT_PERIOD) { return (EINVAL); } else { - ctrlr->timeout_period = newval; + *ptr = newval; } return (0); @@ -333,10 +333,15 @@ nvme_sysctl_initialize_ctrlr(struct nvme_controller *ctrlr) nvme_sysctl_int_coal_threshold, "IU", "Interrupt coalescing threshold"); + SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO, + "admin_timeout_period", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, + &ctrlr->admin_timeout_period, 0, nvme_sysctl_timeout_period, "IU", + "Timeout period for Admin queue (in seconds)"); + SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO, "timeout_period", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, - ctrlr, 0, nvme_sysctl_timeout_period, "IU", - "Timeout period (in seconds)"); + &ctrlr->timeout_period, 0, nvme_sysctl_timeout_period, "IU", + "Timeout period for I/O queues (in seconds)"); SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO, "num_cmds", CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_MPSAFE, From nobody Tue Nov 14 16:51:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVC4s4D2Fz51Vdr; Tue, 14 Nov 2023 16:51: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 4SVC4s3l9mz4KhZ; Tue, 14 Nov 2023 16:51:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699980717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QKhjSGfiKwvTjgTppj1nqSAt0Xok4fUZWVimvI3W4N8=; b=CCbrBZLPjCOEPVfXc59uAYnspsitJLQJEI0AxpARie/6p6fjpLP5yoVLG0CUuUy29cp0S2 KSsQ0iKZoh7M4TtDQnoF5LI8J3M/MDHQxQ/egWaB9T2PnQSfjhvmT2vhBCW7TJ5H/lhAFj jbmAIcuu7PZ0l1ycFmTZNIwmS3O/0tYgOBJ8Rt5K452BDANxGZvGVi/Fyu+4Fx3whk4UHU ERSm/kJ/JxNsQiIhq3t3DW99RCVT/7Lfa0G6Kq38qm9nu0AVZrA3S5qQPWnygSCQUMBcm2 j5GTe5uNDrkfjPIXousVE/lZMl7muJXtbPN7SrYvh6/aMtJw/cMBFts8Ef93VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699980717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QKhjSGfiKwvTjgTppj1nqSAt0Xok4fUZWVimvI3W4N8=; b=Ar9Ha92IazjTGAw48UI1PejKl4qy6BNnGwVxH+pTXeCnH7fpCvB+0rEesjJW/JUlGwkL9u axRtCCbNV6EWMph+1SOYmDw+Z6tS+MuiGNyL70lz96BDZZWB3hclAitoqNki0Gsah5pzHi xi1M6ZAUOjGmPIDzgZflx+iGkfrBBbnu2UAZJaVNccy5gghOconbMLEutY/4QKCph1Ar/h vTnRk1ZVMKu3whntsIFqceSg+k3MDnX3ZUCshYP/q333vMrkq3cUho1CEkr6Tl8whdIqvl ztugHTiOuuZSyKCl+Cph4JlEFVvb2BG1n8SQaS/I9NFkbXCNavrK0JM246j0nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699980717; a=rsa-sha256; cv=none; b=Z9p+ITFzXxyvHOb3vpM0x0cBzrtH63BZ2tmJVYJAhIJ37oTR5cUFJ0Kd5O8udyVLhbu243 yU5iilo/i9aiHqOIV1GjuYIpazUujIU8bEL7j0KVPMzUCK8U80+A6Bdozs5ngPMVK+2BIU nhctvKFKUvZbsN5PmcD/errfOHIPHoldFuf1iiNLsTZPvQL0AzWvDBE09SP19LApY48Z2z tbmpdJFe61N3yQ5ShPG2P8Z2Y/Fm2wdVivVJapT4lbJlDA0hzcTPFGstYEAmBc4KmdQYOm 8p70aTvCfCJz3GhFWH2CsD4ze2R49pz9jabctEmHM2AolFj1MwpuXNaolR2BFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVC4s2s5GzwZF; Tue, 14 Nov 2023 16:51: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 3AEGpvJl015751; Tue, 14 Nov 2023 16:51:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AEGpvdD015748; Tue, 14 Nov 2023 16:51:57 GMT (envelope-from git) Date: Tue, 14 Nov 2023 16:51:57 GMT Message-Id: <202311141651.3AEGpvdD015748@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: 4ca5df80393e - main - Sort MK_BSD_CPIO before MK_BSDINSTALL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4ca5df80393e1f2bf6ac26af42fc7246acb59f71 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=4ca5df80393e1f2bf6ac26af42fc7246acb59f71 commit 4ca5df80393e1f2bf6ac26af42fc7246acb59f71 Author: Brooks Davis AuthorDate: 2023-11-09 00:54:22 +0000 Commit: Brooks Davis CommitDate: 2023-11-14 16:49:41 +0000 Sort MK_BSD_CPIO before MK_BSDINSTALL Using sort(1) order makes verification of the sort easier. Reviewed by: emaste, imp, netchild Pull Request: https://github.com/freebsd/freebsd-src/pull/896 --- tools/build/mk/OptionalObsoleteFiles.inc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 5335e5ea4ffc..f00c1b26a82c 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -395,13 +395,6 @@ OLD_FILES+=usr/sbin/bootptest OLD_FILES+=usr/share/man/man8/bootptest.8.gz .endif -.if ${MK_BSD_CPIO} == no -OLD_FILES+=usr/bin/bsdcpio -OLD_FILES+=usr/bin/cpio -OLD_FILES+=usr/share/man/man1/bsdcpio.1.gz -OLD_FILES+=usr/share/man/man1/cpio.1.gz -.endif - .if ${MK_BSDINSTALL} == no OLD_FILES+=usr/libexec/bsdinstall/adduser OLD_FILES+=usr/libexec/bsdinstall/auto @@ -440,6 +433,13 @@ OLD_FILES+=usr/share/man/man8/sade.8.gz OLD_DIRS+=usr/libexec/bsdinstall .endif +.if ${MK_BSD_CPIO} == no +OLD_FILES+=usr/bin/bsdcpio +OLD_FILES+=usr/bin/cpio +OLD_FILES+=usr/share/man/man1/bsdcpio.1.gz +OLD_FILES+=usr/share/man/man1/cpio.1.gz +.endif + .if ${MK_BSNMP} == no OLD_FILES+=etc/snmpd.config OLD_FILES+=etc/rc.d/bsnmpd From nobody Tue Nov 14 16:51:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVC4t6lNLz51Vrl; Tue, 14 Nov 2023 16: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 4SVC4t4pFBz4KkY; Tue, 14 Nov 2023 16: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=1699980718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S2zkiBtNO0/5vs+1ivX0KkWxcu4WUa/vBL90w7maanU=; b=Wj2LJDsj+iCcs7zwz5R2y4QQU3q3gzooxk7F9QuzdpNfJVaNPxypgPZNfYENxcBZPkBgDa 9Hd0xAQLQ4KqfS3wPDoONV+N5wag0C/WSymklgLlrzDshnya6gDeQ0nQkOABDXvRMBLuNk AO2tyOGq3Eg3OgiKpPLc0hnbMGax0wfiK214ZTuERIXXK1Ikyi7lfeBTwn6CToLwN/Ba4G 1fVB2LbkafAxfMj7Weriop3sc0YFx7FN+dtDw9ShsC2U3oDh9eDxtVXi+cgRpgG4vilUnC wnaa5370rsq/0D9fEYSfONNUo/HiYTi3q50ZuRAhot/VD6ytGFqQ8IZtLz91ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699980718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S2zkiBtNO0/5vs+1ivX0KkWxcu4WUa/vBL90w7maanU=; b=oorTsrUGPUXUv91hRtoDfQbKb0Xt5C/zpZXuSOnFf0k7hkYFv62TFtfhAXZ7DEnlnrVJT+ sxlS9vUAmjvBe0DHC8VZWIXnBoBjT3/MBGUPy7rbIw4IMoCH+CzxO2ke+Q5QQX4zhWXYP8 cpdX9V0cmeKDJrT6TT7Y5eew7UXOxuPuQ3Uhli3RJ6LGIJvzld5EkNKv4yZzry75GtEbeh 4h8hlyrPRYUz26GHdylBiG1bsv6aQ+f+lvDKsM3r1THBaAkpc927SS4gYT3QQdQyE1u3Pc PF7jbBVY922wtNmRJZGoMCjjJoAmbZpNZC3fCt/3tiVnedusPpTF0GaY35lzMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699980718; a=rsa-sha256; cv=none; b=atBJurJbdw1DaXliTL6s5HKqdMVZVjvY5YQ5lWbiBDjSGmWod6USgm5k1rqpYj+TRqVWSu ssgujCbQg/91Ql1dpSG1PoK3WXUNFGAVJLgWdTDk/XJsnx1+Cv50C0lmUz/WIQxQ9zwGzi BXC/ywiEw+aiO6XlFqPrvhirug1MEO5XjXc0bXw4C/C7tJ6KTceC8bwO4p5Qu+nPuqKWZ4 fmaOgVyrpZWxRkNz1Lk863vXKAGUQsDnt7SeHjcdLPNcVwYmiVGpB0gFw5T/oQiKw6dzu0 xGRzi5Wid9Ioh8JcKQDPAEQsC2j+yflA+s765ZSHq9NKxNNq4BME9J9aeaeTeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVC4t3Zjgzwx5; Tue, 14 Nov 2023 16: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 3AEGpwuj015793; Tue, 14 Nov 2023 16: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 3AEGpwhG015790; Tue, 14 Nov 2023 16:51:58 GMT (envelope-from git) Date: Tue, 14 Nov 2023 16:51:58 GMT Message-Id: <202311141651.3AEGpwhG015790@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: e70ad278f45d - main - Sort MK_HYPERV 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e70ad278f45d72a8209e61a312481910d3e03b45 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e70ad278f45d72a8209e61a312481910d3e03b45 commit e70ad278f45d72a8209e61a312481910d3e03b45 Author: Brooks Davis AuthorDate: 2023-11-09 01:08:20 +0000 Commit: Brooks Davis CommitDate: 2023-11-14 16:49:47 +0000 Sort MK_HYPERV option Reviewed by: emaste, imp, netchild Pull Request: https://github.com/freebsd/freebsd-src/pull/896 --- tools/build/mk/OptionalObsoleteFiles.inc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index f00c1b26a82c..f9c10c94a23a 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -2448,6 +2448,16 @@ OLD_FILES+=usr/share/doc/ntp/release.html OLD_FILES+=usr/share/doc/ntp/tickadj.html .endif +.if ${MK_HYPERV} == no +OLD_FILES+=etc/devd/hyperv.conf +OLD_FILES+=usr/libexec/hyperv/hv_set_ifconfig +OLD_FILES+=usr/libexec/hyperv/hv_get_dns_info +OLD_FILES+=usr/libexec/hyperv/hv_get_dhcp_info +OLD_FILES+=usr/sbin/hv_kvp_daemon +OLD_FILES+=usr/sbin/hv_vss_daemon +OLD_FILES+=usr/share/man/man8/hv_kvp_daemon.8.gz +.endif + .if ${MK_ICONV} == no OLD_FILES+=usr/bin/iconv OLD_FILES+=usr/bin/mkcsmapper @@ -9161,16 +9171,6 @@ OLD_FILES+=usr/share/snmp/defs/wlan_tree.def OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-WIRELESS-MIB.txt .endif -.if ${MK_HYPERV} == no -OLD_FILES+=etc/devd/hyperv.conf -OLD_FILES+=usr/libexec/hyperv/hv_set_ifconfig -OLD_FILES+=usr/libexec/hyperv/hv_get_dns_info -OLD_FILES+=usr/libexec/hyperv/hv_get_dhcp_info -OLD_FILES+=usr/sbin/hv_kvp_daemon -OLD_FILES+=usr/sbin/hv_vss_daemon -OLD_FILES+=usr/share/man/man8/hv_kvp_daemon.8.gz -.endif - .if ${MK_ZONEINFO} == no OLD_FILES+=usr/share/zoneinfo/Africa/Abidjan OLD_FILES+=usr/share/zoneinfo/Africa/Accra From nobody Tue Nov 14 16:51:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVC4w383Bz51Vrp; Tue, 14 Nov 2023 16:52: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 4SVC4v5GVlz4Kst; Tue, 14 Nov 2023 16:51:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699980719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n/XPSC1/nKkPBpf7GOnTwOBEnjADsD25dJ+yvyOVyIk=; b=pPlP77zMYvkADdm0qPJXkw63x/LHWFeZyo/4l0JJ5LQjZq4if7/QDeIPfwcf3AQ6vWV8FB BeNC5mXBjTU1SyBmGkbnzDDMt1hHbuJjDidCKgRO2TX3F5mKOdM/f5NfHKU3JkeaRNkO0M eMOAYgegbXQKuFddVToEkimrPgDH1vTYOxRiUJqHdNAdaiOM/+fg2D9mN+KXTnSB0lJh1i 3jGxmngeuj6v11kWK91XQ4pEqqye3bxcmwJXhBeJLuyUoGDCQxzJ0UVWtyeGknSUam34VT kxtKYNk+UAx2J2GUCY61LCkwjZsUia4WYMLpd3StxfQeLT9EMPUQlKOOn4yj3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699980719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n/XPSC1/nKkPBpf7GOnTwOBEnjADsD25dJ+yvyOVyIk=; b=q119w9VMjApQt87EeLu3sg31rZ2a7CeQ4DlghPsalnBq81aIs/yc/n+gs0598qezRMSEXv DFWndvvfiyfI9weiGMBKdeHZb4Iai2VZ1pCUQi/Dc99m44HX9Yvx8U13IGUonHYPKy4zfV 3YLNqKxQOV6i/OROx0obh8VmuJJaB64u+ZbLS46rZH/O1lFPIIjHG7lU41mzWQ+ujDAfZW W/Di/mql3oeE5aWQnsWOEmuyp+KPHDJ58Aa+7HgIR3SElfp303EQjSMcjMQPlXLthAEmMr +jq6Li+YEc8SQQ4bPA6+SJeHRzDUa3QjHCPgsW3C68OkJHKCNFm4kXoxALvq4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699980719; a=rsa-sha256; cv=none; b=i4fteU13zEL02jAxZeg+9h/ADZYmN2S9mHPhONTETGxgoErnUuf1MHkBHiHk/NAyBqOz7y aY/lYFHZpeTelwOea/ofo9M6+5Hen+a7QcqaQLUv2ww0Tg4yW/5dwt5pIeql3F2SbfH4Zw E6LVjdv2KZq2GkZU8F+M12bwcyd2Wxwk1WKlGclE1rMITFt19z1O7kmcf19XNtv/O5cvRp W1WYwSw6ImZ1iH3iz841g1bY/GIrC+N3P5WJhvyE5EAocHbgoqkE/fBAQyJM9jLgSoDTau BTCrYn75QlzEnu/XoEuuTMwYtoMQQphpOf9di4d6uVerKLUd87xBocSD3PODGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVC4v4Ly0zwZH; Tue, 14 Nov 2023 16:51: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 3AEGpx2n015838; Tue, 14 Nov 2023 16:51:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AEGpxeh015835; Tue, 14 Nov 2023 16:51:59 GMT (envelope-from git) Date: Tue, 14 Nov 2023 16:51:59 GMT Message-Id: <202311141651.3AEGpxeh015835@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: a62cefbb5c83 - main - Sort MK_DTRACE and MK_ZFS 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a62cefbb5c835eb17057bca98106f325b13bdead Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=a62cefbb5c835eb17057bca98106f325b13bdead commit a62cefbb5c835eb17057bca98106f325b13bdead Author: Brooks Davis AuthorDate: 2023-11-09 00:55:59 +0000 Commit: Brooks Davis CommitDate: 2023-11-14 16:49:50 +0000 Sort MK_DTRACE and MK_ZFS options Presumably these were under MK_CDDL at some point, but these days src.opts.mk takes care of setting them to "no" when MK_CDDL is. Reviewed by: emaste, imp, netchild Pull Request: https://github.com/freebsd/freebsd-src/pull/896 --- tools/build/mk/OptionalObsoleteFiles.inc | 540 +++++++++++++++---------------- 1 file changed, 270 insertions(+), 270 deletions(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index f9c10c94a23a..d626565acff4 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -869,266 +869,6 @@ OLD_FILES+=usr/share/man/man4/ccd.4.gz OLD_FILES+=usr/share/man/man8/ccdconfig.8.gz .endif -.if ${MK_DTRACE} == no -OLD_LIBS+=lib/libctf.so.2 -OLD_LIBS+=lib/libdtrace.so.2 -OLD_FILES+=usr/bin/ctfconvert -OLD_FILES+=usr/bin/ctfdump -OLD_FILES+=usr/bin/ctfmerge -OLD_FILES+=usr/lib/dtrace/drti.o -OLD_FILES+=usr/lib/dtrace/errno.d -OLD_FILES+=usr/lib/dtrace/io.d -OLD_FILES+=usr/lib/dtrace/ip.d -OLD_FILES+=usr/lib/dtrace/ipfw.d -OLD_FILES+=usr/lib/dtrace/mbuf.d -OLD_FILES+=usr/lib/dtrace/psinfo.d -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/lib/dtrace/regs_x86.d -.endif -OLD_FILES+=usr/lib/dtrace/sctp.d -OLD_FILES+=usr/lib/dtrace/siftr.d -OLD_FILES+=usr/lib/dtrace/signal.d -OLD_FILES+=usr/lib/dtrace/socket.d -OLD_FILES+=usr/lib/dtrace/tcp.d -OLD_FILES+=usr/lib/dtrace/udp.d -OLD_FILES+=usr/lib/dtrace/udplite.d -OLD_FILES+=usr/lib/dtrace/unistd.d -OLD_FILES+=usr/lib/libctf.a -OLD_FILES+=usr/lib/libctf.so -OLD_FILES+=usr/lib/libctf_p.a -OLD_FILES+=usr/lib/libdtrace.a -OLD_FILES+=usr/lib/libdtrace.so -OLD_FILES+=usr/lib/libdtrace_p.a -OLD_LIBS+=lib/libdtrace.so.2 -OLD_FILES+=usr/libexec/dwatch/chmod -OLD_FILES+=usr/libexec/dwatch/errno -OLD_FILES+=usr/libexec/dwatch/fchmodat -OLD_FILES+=usr/libexec/dwatch/io -OLD_FILES+=usr/libexec/dwatch/io-done -OLD_FILES+=usr/libexec/dwatch/io-start -OLD_FILES+=usr/libexec/dwatch/ip -OLD_FILES+=usr/libexec/dwatch/ip-receive -OLD_FILES+=usr/libexec/dwatch/ip-send -OLD_FILES+=usr/libexec/dwatch/kill -OLD_FILES+=usr/libexec/dwatch/lchmod -OLD_FILES+=usr/libexec/dwatch/nanosleep -OLD_FILES+=usr/libexec/dwatch/open -OLD_FILES+=usr/libexec/dwatch/openat -OLD_FILES+=usr/libexec/dwatch/proc -OLD_FILES+=usr/libexec/dwatch/proc-create -OLD_FILES+=usr/libexec/dwatch/proc-exec -OLD_FILES+=usr/libexec/dwatch/proc-exec-failure -OLD_FILES+=usr/libexec/dwatch/proc-exec-success -OLD_FILES+=usr/libexec/dwatch/proc-exit -OLD_FILES+=usr/libexec/dwatch/proc-signal -OLD_FILES+=usr/libexec/dwatch/proc-signal-clear -OLD_FILES+=usr/libexec/dwatch/proc-signal-discard -OLD_FILES+=usr/libexec/dwatch/proc-signal-send -OLD_FILES+=usr/libexec/dwatch/proc-status -OLD_FILES+=usr/libexec/dwatch/read -OLD_FILES+=usr/libexec/dwatch/recv -OLD_FILES+=usr/libexec/dwatch/recvfrom -OLD_FILES+=usr/libexec/dwatch/recvmsg -OLD_FILES+=usr/libexec/dwatch/rw -OLD_FILES+=usr/libexec/dwatch/sched -OLD_FILES+=usr/libexec/dwatch/sched-change-pri -OLD_FILES+=usr/libexec/dwatch/sched-cpu -OLD_FILES+=usr/libexec/dwatch/sched-dequeue -OLD_FILES+=usr/libexec/dwatch/sched-enqueue -OLD_FILES+=usr/libexec/dwatch/sched-exec -OLD_FILES+=usr/libexec/dwatch/sched-lend-pri -OLD_FILES+=usr/libexec/dwatch/sched-load-change -OLD_FILES+=usr/libexec/dwatch/sched-off-cpu -OLD_FILES+=usr/libexec/dwatch/sched-on-cpu -OLD_FILES+=usr/libexec/dwatch/sched-preempt -OLD_FILES+=usr/libexec/dwatch/sched-pri -OLD_FILES+=usr/libexec/dwatch/sched-queue -OLD_FILES+=usr/libexec/dwatch/sched-remain-cpu -OLD_FILES+=usr/libexec/dwatch/sched-sleep -OLD_FILES+=usr/libexec/dwatch/sched-surrender -OLD_FILES+=usr/libexec/dwatch/sched-tick -OLD_FILES+=usr/libexec/dwatch/sched-wakeup -OLD_FILES+=usr/libexec/dwatch/send -OLD_FILES+=usr/libexec/dwatch/sendmsg -OLD_FILES+=usr/libexec/dwatch/sendrecv -OLD_FILES+=usr/libexec/dwatch/sendto -OLD_FILES+=usr/libexec/dwatch/systop -OLD_FILES+=usr/libexec/dwatch/tcp -OLD_FILES+=usr/libexec/dwatch/tcp-accept -OLD_FILES+=usr/libexec/dwatch/tcp-accept-established -OLD_FILES+=usr/libexec/dwatch/tcp-accept-refused -OLD_FILES+=usr/libexec/dwatch/tcp-connect -OLD_FILES+=usr/libexec/dwatch/tcp-connect-established -OLD_FILES+=usr/libexec/dwatch/tcp-connect-refused -OLD_FILES+=usr/libexec/dwatch/tcp-connect-request -OLD_FILES+=usr/libexec/dwatch/tcp-established -OLD_FILES+=usr/libexec/dwatch/tcp-init -OLD_FILES+=usr/libexec/dwatch/tcp-io -OLD_FILES+=usr/libexec/dwatch/tcp-receive -OLD_FILES+=usr/libexec/dwatch/tcp-refused -OLD_FILES+=usr/libexec/dwatch/tcp-send -OLD_FILES+=usr/libexec/dwatch/tcp-state-change -OLD_FILES+=usr/libexec/dwatch/tcp-status -OLD_FILES+=usr/libexec/dwatch/udp -OLD_FILES+=usr/libexec/dwatch/udp-receive -OLD_FILES+=usr/libexec/dwatch/udp-send -OLD_FILES+=usr/libexec/dwatch/udplite -OLD_FILES+=usr/libexec/dwatch/udplite-receive -OLD_FILES+=usr/libexec/dwatch/udplite-send -OLD_FILES+=usr/libexec/dwatch/vop_create -OLD_FILES+=usr/libexec/dwatch/vop_lookup -OLD_FILES+=usr/libexec/dwatch/vop_mkdir -OLD_FILES+=usr/libexec/dwatch/vop_mknod -OLD_FILES+=usr/libexec/dwatch/vop_readdir -OLD_FILES+=usr/libexec/dwatch/vop_remove -OLD_FILES+=usr/libexec/dwatch/vop_rename -OLD_FILES+=usr/libexec/dwatch/vop_rmdir -OLD_FILES+=usr/libexec/dwatch/vop_symlink -OLD_FILES+=usr/libexec/dwatch/write -OLD_FILES+=usr/sbin/dtrace -OLD_FILES+=usr/sbin/dwatch -OLD_FILES+=usr/sbin/lockstat -OLD_FILES+=usr/sbin/plockstat -OLD_FILES+=usr/share/man/man1/dtrace.1.gz -OLD_FILES+=usr/share/man/man1/dtruss.1.gz -OLD_FILES+=usr/share/man/man1/lockstat.1.gz -OLD_FILES+=usr/share/man/man1/plockstat.1.gz -OLD_FILES+=usr/share/dtrace/blocking -OLD_FILES+=usr/share/dtrace/disklatency -OLD_FILES+=usr/share/dtrace/disklatencycmd -OLD_FILES+=usr/share/dtrace/hotopen -OLD_FILES+=usr/share/dtrace/nfsattrstats -OLD_FILES+=usr/share/dtrace/nfsclienttime -OLD_FILES+=usr/share/dtrace/siftr -OLD_FILES+=usr/share/dtrace/toolkit/execsnoop -OLD_FILES+=usr/share/dtrace/toolkit/hotkernel -OLD_FILES+=usr/share/dtrace/toolkit/hotuser -OLD_FILES+=usr/share/dtrace/toolkit/opensnoop -OLD_FILES+=usr/share/dtrace/toolkit/procsystime -OLD_FILES+=usr/share/dtrace/tcpconn -OLD_FILES+=usr/share/dtrace/tcpdebug -OLD_FILES+=usr/share/dtrace/tcpstate -OLD_FILES+=usr/share/dtrace/tcptrack -OLD_FILES+=usr/share/dtrace/udptrack -OLD_FILES+=usr/share/man/man1/dtrace.1.gz -OLD_DIRS+=usr/lib/dtrace -. for libcompat in ${_ALL_libcompats} -OLD_DIRS+=usr/lib${libcompat}/dtrace -. endfor -OLD_DIRS+=usr/libexec/dwatch -OLD_DIRS+=usr/share/dtrace/toolkit -OLD_DIRS+=usr/share/dtrace -.endif - -.if ${MK_ZFS} == no -OLD_FILES+=boot/gptzfsboot -OLD_FILES+=boot/zfsboot -OLD_FILES+=boot/zfsloader -OLD_FILES+=etc/rc.d/zfs -OLD_FILES+=etc/rc.d/zfsbe -OLD_FILES+=etc/rc.d/zfsd -OLD_FILES+=etc/rc.d/zfskeys -OLD_FILES+=etc/rc.d/zvol -OLD_FILES+=etc/devd/zfs.conf -OLD_FILES+=etc/periodic/daily/404.status-zfs -OLD_FILES+=etc/periodic/daily/800.scrub-zfs -OLD_FILES+=etc/zfs/exports -OLD_DIRS+=etc/zfs -OLD_LIBS+=lib/libavl.so.2 -OLD_LIBS+=lib/libnvpair.so.2 -OLD_LIBS+=lib/libumem.so.2 -OLD_LIBS+=lib/libuutil.so.2 -OLD_LIBS+=lib/libzfs.so.2 -OLD_LIBS+=lib/libzfs.so.3 -OLD_LIBS+=lib/libzfs_core.so.2 -OLD_LIBS+=lib/libzpool.so.2 -OLD_FILES+=rescue/zdb -OLD_FILES+=rescue/zfs -OLD_FILES+=rescue/zpool -OLD_FILES+=sbin/bectl -OLD_FILES+=sbin/zfs -OLD_FILES+=sbin/zpool -OLD_FILES+=sbin/zfsbootcfg -OLD_FILES+=usr/bin/zinject -OLD_FILES+=usr/bin/zstreamdump -OLD_FILES+=usr/bin/ztest -OLD_FILES+=usr/lib/libbe.a -OLD_FILES+=usr/lib/libbe_p.a -OLD_FILES+=usr/lib/libbe.so -OLD_LIBS+=lib/libbe.so.1 -OLD_FILES+=usr/lib/libavl.a -OLD_FILES+=usr/lib/libavl.so -OLD_FILES+=usr/lib/libavl_p.a -OLD_FILES+=usr/lib/libnvpair.a -OLD_FILES+=usr/lib/libnvpair.so -OLD_FILES+=usr/lib/libnvpair_p.a -OLD_FILES+=usr/lib/libumem.a -OLD_FILES+=usr/lib/libumem.so -OLD_FILES+=usr/lib/libumem_p.a -OLD_FILES+=usr/lib/libuutil.a -OLD_FILES+=usr/lib/libuutil.so -OLD_FILES+=usr/lib/libuutil_p.a -OLD_FILES+=usr/lib/libzfs.a -OLD_FILES+=usr/lib/libzfs.so -OLD_FILES+=usr/lib/libzfs_core.a -OLD_FILES+=usr/lib/libzfs_core.so -OLD_FILES+=usr/lib/libzfs_core_p.a -OLD_FILES+=usr/lib/libzfs_p.a -OLD_FILES+=usr/lib/libzpool.a -OLD_FILES+=usr/lib/libzpool.so -OLD_LIBS+=usr/lib/libzpool.so.2 -OLD_FILES+=usr/sbin/zfsd -OLD_FILES+=usr/sbin/zhack -OLD_FILES+=usr/sbin/zdb -OLD_FILES+=usr/share/man/man3/be_activate.3.gz -OLD_FILES+=usr/share/man/man3/be_active_name.3.gz -OLD_FILES+=usr/share/man/man3/be_active_path.3.gz -OLD_FILES+=usr/share/man/man3/be_create_depth.3.gz -OLD_FILES+=usr/share/man/man3/be_create_from_existing_snap.3.gz -OLD_FILES+=usr/share/man/man3/be_create_from_existing.3.gz -OLD_FILES+=usr/share/man/man3/be_create.3.gz -OLD_FILES+=usr/share/man/man3/be_deactivate.3.gz -OLD_FILES+=usr/share/man/man3/be_destroy.3.gz -OLD_FILES+=usr/share/man/man3/be_exists.3.gz -OLD_FILES+=usr/share/man/man3/be_export.3.gz -OLD_FILES+=usr/share/man/man3/be_get_bootenv_props.3.gz -OLD_FILES+=usr/share/man/man3/be_get_dataset_props.3.gz -OLD_FILES+=usr/share/man/man3/be_get_dataset_snapshots.3.gz -OLD_FILES+=usr/share/man/man3/be_import.3.gz -OLD_FILES+=usr/share/man/man3/be_is_auto_snapshot_name.3.gz -OLD_FILES+=usr/share/man/man3/be_mount.3.gz -OLD_FILES+=usr/share/man/man3/be_mounted_at.3.gz -OLD_FILES+=usr/share/man/man3/be_nextboot_name.3.gz -OLD_FILES+=usr/share/man/man3/be_nextboot_path.3.gz -OLD_FILES+=usr/share/man/man3/be_nicenum.3.gz -OLD_FILES+=usr/share/man/man3/be_prop_list_alloc.3.gz -OLD_FILES+=usr/share/man/man3/be_prop_list_free.3.gz -OLD_FILES+=usr/share/man/man3/be_rename.3.gz -OLD_FILES+=usr/share/man/man3/be_root_concat.3.gz -OLD_FILES+=usr/share/man/man3/be_root_path.3.gz -OLD_FILES+=usr/share/man/man3/be_snapshot.3.gz -OLD_FILES+=usr/share/man/man3/be_unmount.3.gz -OLD_FILES+=usr/share/man/man3/be_validate_name.3.gz -OLD_FILES+=usr/share/man/man3/be_validate_snap.3.gz -OLD_FILES+=usr/share/man/man3/libbe_close.3.gz -OLD_FILES+=usr/share/man/man3/libbe_errno.3.gz -OLD_FILES+=usr/share/man/man3/libbe_error_description.3.gz -OLD_FILES+=usr/share/man/man3/libbe_init.3.gz -OLD_FILES+=usr/share/man/man3/libbe_print_on_error.3.gz -OLD_FILES+=usr/share/man/man3/libbe.3.gz -OLD_FILES+=usr/share/man/man5/zpool-features.5.gz -OLD_FILES+=usr/share/man/man8/bectl.8.gz -OLD_FILES+=usr/share/man/man8/gptzfsboot.8.gz -OLD_FILES+=usr/share/man/man8/zdb.8.gz -OLD_FILES+=usr/share/man/man8/zfs-program.8.gz -OLD_FILES+=usr/share/man/man8/zfs.8.gz -OLD_FILES+=usr/share/man/man8/zfsboot.8.gz -OLD_FILES+=usr/share/man/man8/zfsbootcfg.8.gz -OLD_FILES+=usr/share/man/man8/zfsd.8.gz -OLD_FILES+=usr/share/man/man8/zfsloader.8.gz -OLD_FILES+=usr/share/man/man8/zpool.8.gz -.endif - .if ${MK_CLANG} == no && ${MK_LLVM_BINUTILS} == no OLD_FILES+=usr/bin/llvm-addr2line OLD_FILES+=usr/bin/llvm-ar @@ -1659,16 +1399,167 @@ OLD_FILES+=usr/share/dict/web2a OLD_FILES+=usr/share/dict/words OLD_DIRS+=usr/share/dict .endif - -.if ${MK_DMAGENT} == no -OLD_FILES+=etc/dma/dma.conf -OLD_DIRS+=etc/dma -OLD_FILES+=usr/libexec/dma -OLD_FILES+=usr/libexec/dma-mbox-create -OLD_FILES+=usr/share/man/man8/dma.8.gz -OLD_FILES+=usr/share/examples/dma/auth.conf -OLD_FILES+=usr/share/examples/dma/mailer.conf -OLD_DIRS+=usr/share/examples/dma + +.if ${MK_DMAGENT} == no +OLD_FILES+=etc/dma/dma.conf +OLD_DIRS+=etc/dma +OLD_FILES+=usr/libexec/dma +OLD_FILES+=usr/libexec/dma-mbox-create +OLD_FILES+=usr/share/man/man8/dma.8.gz +OLD_FILES+=usr/share/examples/dma/auth.conf +OLD_FILES+=usr/share/examples/dma/mailer.conf +OLD_DIRS+=usr/share/examples/dma +.endif + +.if ${MK_DTRACE} == no +OLD_LIBS+=lib/libctf.so.2 +OLD_LIBS+=lib/libdtrace.so.2 +OLD_FILES+=usr/bin/ctfconvert +OLD_FILES+=usr/bin/ctfdump +OLD_FILES+=usr/bin/ctfmerge +OLD_FILES+=usr/lib/dtrace/drti.o +OLD_FILES+=usr/lib/dtrace/errno.d +OLD_FILES+=usr/lib/dtrace/io.d +OLD_FILES+=usr/lib/dtrace/ip.d +OLD_FILES+=usr/lib/dtrace/ipfw.d +OLD_FILES+=usr/lib/dtrace/mbuf.d +OLD_FILES+=usr/lib/dtrace/psinfo.d +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" +OLD_FILES+=usr/lib/dtrace/regs_x86.d +.endif +OLD_FILES+=usr/lib/dtrace/sctp.d +OLD_FILES+=usr/lib/dtrace/siftr.d +OLD_FILES+=usr/lib/dtrace/signal.d +OLD_FILES+=usr/lib/dtrace/socket.d +OLD_FILES+=usr/lib/dtrace/tcp.d +OLD_FILES+=usr/lib/dtrace/udp.d +OLD_FILES+=usr/lib/dtrace/udplite.d +OLD_FILES+=usr/lib/dtrace/unistd.d +OLD_FILES+=usr/lib/libctf.a +OLD_FILES+=usr/lib/libctf.so +OLD_FILES+=usr/lib/libctf_p.a +OLD_FILES+=usr/lib/libdtrace.a +OLD_FILES+=usr/lib/libdtrace.so +OLD_FILES+=usr/lib/libdtrace_p.a +OLD_LIBS+=lib/libdtrace.so.2 +OLD_FILES+=usr/libexec/dwatch/chmod +OLD_FILES+=usr/libexec/dwatch/errno +OLD_FILES+=usr/libexec/dwatch/fchmodat +OLD_FILES+=usr/libexec/dwatch/io +OLD_FILES+=usr/libexec/dwatch/io-done +OLD_FILES+=usr/libexec/dwatch/io-start +OLD_FILES+=usr/libexec/dwatch/ip +OLD_FILES+=usr/libexec/dwatch/ip-receive +OLD_FILES+=usr/libexec/dwatch/ip-send +OLD_FILES+=usr/libexec/dwatch/kill +OLD_FILES+=usr/libexec/dwatch/lchmod +OLD_FILES+=usr/libexec/dwatch/nanosleep +OLD_FILES+=usr/libexec/dwatch/open +OLD_FILES+=usr/libexec/dwatch/openat +OLD_FILES+=usr/libexec/dwatch/proc +OLD_FILES+=usr/libexec/dwatch/proc-create +OLD_FILES+=usr/libexec/dwatch/proc-exec +OLD_FILES+=usr/libexec/dwatch/proc-exec-failure +OLD_FILES+=usr/libexec/dwatch/proc-exec-success +OLD_FILES+=usr/libexec/dwatch/proc-exit +OLD_FILES+=usr/libexec/dwatch/proc-signal +OLD_FILES+=usr/libexec/dwatch/proc-signal-clear +OLD_FILES+=usr/libexec/dwatch/proc-signal-discard +OLD_FILES+=usr/libexec/dwatch/proc-signal-send +OLD_FILES+=usr/libexec/dwatch/proc-status +OLD_FILES+=usr/libexec/dwatch/read +OLD_FILES+=usr/libexec/dwatch/recv +OLD_FILES+=usr/libexec/dwatch/recvfrom +OLD_FILES+=usr/libexec/dwatch/recvmsg +OLD_FILES+=usr/libexec/dwatch/rw +OLD_FILES+=usr/libexec/dwatch/sched +OLD_FILES+=usr/libexec/dwatch/sched-change-pri +OLD_FILES+=usr/libexec/dwatch/sched-cpu +OLD_FILES+=usr/libexec/dwatch/sched-dequeue +OLD_FILES+=usr/libexec/dwatch/sched-enqueue +OLD_FILES+=usr/libexec/dwatch/sched-exec +OLD_FILES+=usr/libexec/dwatch/sched-lend-pri +OLD_FILES+=usr/libexec/dwatch/sched-load-change +OLD_FILES+=usr/libexec/dwatch/sched-off-cpu +OLD_FILES+=usr/libexec/dwatch/sched-on-cpu +OLD_FILES+=usr/libexec/dwatch/sched-preempt +OLD_FILES+=usr/libexec/dwatch/sched-pri +OLD_FILES+=usr/libexec/dwatch/sched-queue +OLD_FILES+=usr/libexec/dwatch/sched-remain-cpu +OLD_FILES+=usr/libexec/dwatch/sched-sleep +OLD_FILES+=usr/libexec/dwatch/sched-surrender +OLD_FILES+=usr/libexec/dwatch/sched-tick +OLD_FILES+=usr/libexec/dwatch/sched-wakeup +OLD_FILES+=usr/libexec/dwatch/send +OLD_FILES+=usr/libexec/dwatch/sendmsg +OLD_FILES+=usr/libexec/dwatch/sendrecv +OLD_FILES+=usr/libexec/dwatch/sendto +OLD_FILES+=usr/libexec/dwatch/systop +OLD_FILES+=usr/libexec/dwatch/tcp +OLD_FILES+=usr/libexec/dwatch/tcp-accept +OLD_FILES+=usr/libexec/dwatch/tcp-accept-established +OLD_FILES+=usr/libexec/dwatch/tcp-accept-refused +OLD_FILES+=usr/libexec/dwatch/tcp-connect +OLD_FILES+=usr/libexec/dwatch/tcp-connect-established +OLD_FILES+=usr/libexec/dwatch/tcp-connect-refused +OLD_FILES+=usr/libexec/dwatch/tcp-connect-request +OLD_FILES+=usr/libexec/dwatch/tcp-established +OLD_FILES+=usr/libexec/dwatch/tcp-init +OLD_FILES+=usr/libexec/dwatch/tcp-io +OLD_FILES+=usr/libexec/dwatch/tcp-receive +OLD_FILES+=usr/libexec/dwatch/tcp-refused +OLD_FILES+=usr/libexec/dwatch/tcp-send +OLD_FILES+=usr/libexec/dwatch/tcp-state-change +OLD_FILES+=usr/libexec/dwatch/tcp-status +OLD_FILES+=usr/libexec/dwatch/udp +OLD_FILES+=usr/libexec/dwatch/udp-receive +OLD_FILES+=usr/libexec/dwatch/udp-send +OLD_FILES+=usr/libexec/dwatch/udplite +OLD_FILES+=usr/libexec/dwatch/udplite-receive +OLD_FILES+=usr/libexec/dwatch/udplite-send +OLD_FILES+=usr/libexec/dwatch/vop_create +OLD_FILES+=usr/libexec/dwatch/vop_lookup +OLD_FILES+=usr/libexec/dwatch/vop_mkdir +OLD_FILES+=usr/libexec/dwatch/vop_mknod +OLD_FILES+=usr/libexec/dwatch/vop_readdir +OLD_FILES+=usr/libexec/dwatch/vop_remove +OLD_FILES+=usr/libexec/dwatch/vop_rename +OLD_FILES+=usr/libexec/dwatch/vop_rmdir +OLD_FILES+=usr/libexec/dwatch/vop_symlink +OLD_FILES+=usr/libexec/dwatch/write +OLD_FILES+=usr/sbin/dtrace +OLD_FILES+=usr/sbin/dwatch +OLD_FILES+=usr/sbin/lockstat +OLD_FILES+=usr/sbin/plockstat +OLD_FILES+=usr/share/man/man1/dtrace.1.gz +OLD_FILES+=usr/share/man/man1/dtruss.1.gz +OLD_FILES+=usr/share/man/man1/lockstat.1.gz +OLD_FILES+=usr/share/man/man1/plockstat.1.gz +OLD_FILES+=usr/share/dtrace/blocking +OLD_FILES+=usr/share/dtrace/disklatency +OLD_FILES+=usr/share/dtrace/disklatencycmd +OLD_FILES+=usr/share/dtrace/hotopen +OLD_FILES+=usr/share/dtrace/nfsattrstats +OLD_FILES+=usr/share/dtrace/nfsclienttime +OLD_FILES+=usr/share/dtrace/siftr +OLD_FILES+=usr/share/dtrace/toolkit/execsnoop +OLD_FILES+=usr/share/dtrace/toolkit/hotkernel +OLD_FILES+=usr/share/dtrace/toolkit/hotuser +OLD_FILES+=usr/share/dtrace/toolkit/opensnoop +OLD_FILES+=usr/share/dtrace/toolkit/procsystime +OLD_FILES+=usr/share/dtrace/tcpconn +OLD_FILES+=usr/share/dtrace/tcpdebug +OLD_FILES+=usr/share/dtrace/tcpstate +OLD_FILES+=usr/share/dtrace/tcptrack +OLD_FILES+=usr/share/dtrace/udptrack +OLD_FILES+=usr/share/man/man1/dtrace.1.gz +OLD_DIRS+=usr/lib/dtrace +. for libcompat in ${_ALL_libcompats} +OLD_DIRS+=usr/lib${libcompat}/dtrace +. endfor +OLD_DIRS+=usr/libexec/dwatch +OLD_DIRS+=usr/share/dtrace/toolkit +OLD_DIRS+=usr/share/dtrace .endif .if ${MK_EE} == no @@ -9171,6 +9062,115 @@ OLD_FILES+=usr/share/snmp/defs/wlan_tree.def OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-WIRELESS-MIB.txt .endif +.if ${MK_ZFS} == no +OLD_FILES+=boot/gptzfsboot +OLD_FILES+=boot/zfsboot +OLD_FILES+=boot/zfsloader +OLD_FILES+=etc/rc.d/zfs +OLD_FILES+=etc/rc.d/zfsbe +OLD_FILES+=etc/rc.d/zfsd +OLD_FILES+=etc/rc.d/zfskeys +OLD_FILES+=etc/rc.d/zvol +OLD_FILES+=etc/devd/zfs.conf +OLD_FILES+=etc/periodic/daily/404.status-zfs +OLD_FILES+=etc/periodic/daily/800.scrub-zfs +OLD_FILES+=etc/zfs/exports +OLD_DIRS+=etc/zfs +OLD_LIBS+=lib/libavl.so.2 +OLD_LIBS+=lib/libnvpair.so.2 +OLD_LIBS+=lib/libumem.so.2 +OLD_LIBS+=lib/libuutil.so.2 +OLD_LIBS+=lib/libzfs.so.2 +OLD_LIBS+=lib/libzfs.so.3 +OLD_LIBS+=lib/libzfs_core.so.2 +OLD_LIBS+=lib/libzpool.so.2 +OLD_FILES+=rescue/zdb +OLD_FILES+=rescue/zfs +OLD_FILES+=rescue/zpool +OLD_FILES+=sbin/bectl +OLD_FILES+=sbin/zfs +OLD_FILES+=sbin/zpool +OLD_FILES+=sbin/zfsbootcfg +OLD_FILES+=usr/bin/zinject +OLD_FILES+=usr/bin/zstreamdump +OLD_FILES+=usr/bin/ztest +OLD_FILES+=usr/lib/libbe.a +OLD_FILES+=usr/lib/libbe_p.a +OLD_FILES+=usr/lib/libbe.so +OLD_LIBS+=lib/libbe.so.1 +OLD_FILES+=usr/lib/libavl.a +OLD_FILES+=usr/lib/libavl.so +OLD_FILES+=usr/lib/libavl_p.a +OLD_FILES+=usr/lib/libnvpair.a +OLD_FILES+=usr/lib/libnvpair.so +OLD_FILES+=usr/lib/libnvpair_p.a +OLD_FILES+=usr/lib/libumem.a +OLD_FILES+=usr/lib/libumem.so +OLD_FILES+=usr/lib/libumem_p.a +OLD_FILES+=usr/lib/libuutil.a +OLD_FILES+=usr/lib/libuutil.so +OLD_FILES+=usr/lib/libuutil_p.a +OLD_FILES+=usr/lib/libzfs.a +OLD_FILES+=usr/lib/libzfs.so +OLD_FILES+=usr/lib/libzfs_core.a +OLD_FILES+=usr/lib/libzfs_core.so +OLD_FILES+=usr/lib/libzfs_core_p.a +OLD_FILES+=usr/lib/libzfs_p.a +OLD_FILES+=usr/lib/libzpool.a +OLD_FILES+=usr/lib/libzpool.so +OLD_LIBS+=usr/lib/libzpool.so.2 +OLD_FILES+=usr/sbin/zfsd +OLD_FILES+=usr/sbin/zhack +OLD_FILES+=usr/sbin/zdb +OLD_FILES+=usr/share/man/man3/be_activate.3.gz +OLD_FILES+=usr/share/man/man3/be_active_name.3.gz +OLD_FILES+=usr/share/man/man3/be_active_path.3.gz +OLD_FILES+=usr/share/man/man3/be_create_depth.3.gz +OLD_FILES+=usr/share/man/man3/be_create_from_existing_snap.3.gz +OLD_FILES+=usr/share/man/man3/be_create_from_existing.3.gz +OLD_FILES+=usr/share/man/man3/be_create.3.gz +OLD_FILES+=usr/share/man/man3/be_deactivate.3.gz +OLD_FILES+=usr/share/man/man3/be_destroy.3.gz +OLD_FILES+=usr/share/man/man3/be_exists.3.gz +OLD_FILES+=usr/share/man/man3/be_export.3.gz +OLD_FILES+=usr/share/man/man3/be_get_bootenv_props.3.gz +OLD_FILES+=usr/share/man/man3/be_get_dataset_props.3.gz +OLD_FILES+=usr/share/man/man3/be_get_dataset_snapshots.3.gz +OLD_FILES+=usr/share/man/man3/be_import.3.gz +OLD_FILES+=usr/share/man/man3/be_is_auto_snapshot_name.3.gz +OLD_FILES+=usr/share/man/man3/be_mount.3.gz +OLD_FILES+=usr/share/man/man3/be_mounted_at.3.gz +OLD_FILES+=usr/share/man/man3/be_nextboot_name.3.gz +OLD_FILES+=usr/share/man/man3/be_nextboot_path.3.gz +OLD_FILES+=usr/share/man/man3/be_nicenum.3.gz +OLD_FILES+=usr/share/man/man3/be_prop_list_alloc.3.gz +OLD_FILES+=usr/share/man/man3/be_prop_list_free.3.gz +OLD_FILES+=usr/share/man/man3/be_rename.3.gz +OLD_FILES+=usr/share/man/man3/be_root_concat.3.gz +OLD_FILES+=usr/share/man/man3/be_root_path.3.gz +OLD_FILES+=usr/share/man/man3/be_snapshot.3.gz +OLD_FILES+=usr/share/man/man3/be_unmount.3.gz +OLD_FILES+=usr/share/man/man3/be_validate_name.3.gz +OLD_FILES+=usr/share/man/man3/be_validate_snap.3.gz +OLD_FILES+=usr/share/man/man3/libbe_close.3.gz +OLD_FILES+=usr/share/man/man3/libbe_errno.3.gz +OLD_FILES+=usr/share/man/man3/libbe_error_description.3.gz +OLD_FILES+=usr/share/man/man3/libbe_init.3.gz +OLD_FILES+=usr/share/man/man3/libbe_print_on_error.3.gz +OLD_FILES+=usr/share/man/man3/libbe.3.gz +OLD_FILES+=usr/share/man/man5/zpool-features.5.gz +OLD_FILES+=usr/share/man/man8/bectl.8.gz +OLD_FILES+=usr/share/man/man8/gptzfsboot.8.gz +OLD_FILES+=usr/share/man/man8/zdb.8.gz +OLD_FILES+=usr/share/man/man8/zfs-program.8.gz +OLD_FILES+=usr/share/man/man8/zfs.8.gz +OLD_FILES+=usr/share/man/man8/zfsboot.8.gz +OLD_FILES+=usr/share/man/man8/zfsbootcfg.8.gz +OLD_FILES+=usr/share/man/man8/zfsd.8.gz +OLD_FILES+=usr/share/man/man8/zfsloader.8.gz +OLD_FILES+=usr/share/man/man8/zpool.8.gz +.endif + .if ${MK_ZONEINFO} == no OLD_FILES+=usr/share/zoneinfo/Africa/Abidjan OLD_FILES+=usr/share/zoneinfo/Africa/Accra From nobody Tue Nov 14 16:52:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVC4x0l3Yz51VvS; Tue, 14 Nov 2023 16:52: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 4SVC4w67nZz4KjX; Tue, 14 Nov 2023 16:52:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699980720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xfc5EdMN4j7AfBEBoyKgKWOtxZVcTkTyJqSOvBOpZ74=; b=ZPJGM/bQ8DWxcSiHSqWgwlxcG2QajIwPAwmBkaIMsn1VuWuWyVwVvwY5vuwGTnrVxUt4Zu omZNocgfBvu34ygR7ATC2YLqpAkz6RyclSHUnIKA/u9GD0wOFZKsaXahH7pK5VQKcJVu6H TPDVukOQaVTOR7lh0bgBlXlpLzTfjYt4d5EuSAlndopr9odyxRHGJOhaHbRV8hHWu0x2/G O3iljxTTgXqs+MOUwWz6SGGIrnSFimA9bA75pNHOtkfiaxcX0+0F2tc37IJuSOrT0EELjZ mBou+B9A+M2TEAgToQzxFES4pEFjjORzB5Kc4H6HGuRdmZIFN9I9G927w7uV+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699980720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xfc5EdMN4j7AfBEBoyKgKWOtxZVcTkTyJqSOvBOpZ74=; b=SpcFwh0tVN3JxUZyWemx3DC6p2+Ac5eWevYPgpD/sieSwpf0aWirz8BR4QweP8LYAPse2O flXikGrO9Qy5OCH4gJeR6CZtv43zpmaNakbLJXNhSsr4Jybz5Ot7KLkmWfeN6VcKM1XmW+ IAuzWkobDEoilkEEi04Znp+Oj4e0U5KftGc+pplcv85xlZhimlGTY2BR+QoE9rOFft9pGe VQvDacfwySOlsuUYQoUVVMNbIDLBtjDPcDfkdl4OBSW8jQeZZr7uLGtkGrCKimHdKPR/2R 26OskXi4Dzlk+70ikStpMYIttrD5WeNjDD1BiaBihVLK/yQp8D/ikECs/JnTFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699980720; a=rsa-sha256; cv=none; b=vN7Kge2wTt9AyiZOkbAvfV7DIapC8Gyvec4d/i4kK7yq4DfqAJUjix4SHEeY5kIZW+GVKf 6nyu9vliBbmsfAreE/ES6S317BeZj6KuA8hxA05Pocn0PRlOiusaiO4FM70CYX7Lvc/Mkz 0FbeASA3axeGpV0re7r173aCvi6IDeuERWA7/5tjeFXN/rz77ptoKI7geAog2yen4OHH69 QyAxpWr4BrNkvrXYQyB1IsVHQ0z2kR1HjsR27pXjXUVqb6hbPhh3n9Ivbfr8BcHQb9mjRJ OaONVuP7D77b0FzXgYpGpyvTFWB6V2EmTVAJuGIF7wi/yj9WIWU3gsZkbr1Y+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 4SVC4w5FMxzwxM; Tue, 14 Nov 2023 16:52: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 3AEGq02O015887; Tue, 14 Nov 2023 16:52:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AEGq0DO015884; Tue, 14 Nov 2023 16:52:00 GMT (envelope-from git) Date: Tue, 14 Nov 2023 16:52:00 GMT Message-Id: <202311141652.3AEGq0DO015884@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: 16743f0e0b15 - main - Sort MK_EFI and MK_FTP 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16743f0e0b1567b38e5071814d61c04b557bcaa0 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=16743f0e0b1567b38e5071814d61c04b557bcaa0 commit 16743f0e0b1567b38e5071814d61c04b557bcaa0 Author: Brooks Davis AuthorDate: 2023-11-09 00:59:43 +0000 Commit: Brooks Davis CommitDate: 2023-11-14 16:49:53 +0000 Sort MK_EFI and MK_FTP options Reviewed by: emaste, imp, netchild Pull Request: https://github.com/freebsd/freebsd-src/pull/896 --- tools/build/mk/OptionalObsoleteFiles.inc | 52 ++++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index d626565acff4..87184f021890 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1364,32 +1364,6 @@ OLD_FILES+=usr/share/man/man3/dialog.3.gz OLD_FILES+=usr/share/man/man3/dpv.3.gz .endif -.if ${MK_EFI} == no -OLD_FILES+=usr/sbin/efibootmgr -OLD_FILES+=usr/sbin/efidp -OLD_FILES+=usr/sbin/efivar -OLD_FILES+=usr/sbin/uefisign -OLD_FILES+=usr/share/examples/uefisign/uefikeys -.endif - -.if ${MK_FTP} == no -OLD_FILES+=etc/ftpusers -OLD_FILES+=etc/newsyslog.conf.d/ftp.conf -OLD_FILES+=etc/pam.d/ftp -OLD_FILES+=etc/pam.d/ftpd -OLD_FILES+=etc/rc.d/ftpd -OLD_FILES+=etc/syslog.d/ftp.conf -OLD_FILES+=usr/bin/ftp -OLD_FILES+=usr/bin/gate-ftp -OLD_FILES+=usr/bin/pftp -OLD_FILES+=usr/libexec/ftpd -OLD_FILES+=usr/share/man/man1/ftp.1.gz -OLD_FILES+=usr/share/man/man1/gate-ftp.1.gz -OLD_FILES+=usr/share/man/man1/pftp.1.gz -OLD_FILES+=usr/share/man/man5/ftpchroot.5.gz -OLD_FILES+=usr/share/man/man8/ftpd.8.gz -.endif - .if ${MK_DICT} == no OLD_FILES+=usr/share/dict/README OLD_FILES+=usr/share/dict/freebsd @@ -1579,6 +1553,14 @@ OLD_FILES+=usr/share/nls/ru_RU.KOI8-R/ee.cat OLD_FILES+=usr/share/nls/uk_UA.KOI8-U/ee.cat .endif +.if ${MK_EFI} == no +OLD_FILES+=usr/sbin/efibootmgr +OLD_FILES+=usr/sbin/efidp +OLD_FILES+=usr/sbin/efivar +OLD_FILES+=usr/sbin/uefisign +OLD_FILES+=usr/share/examples/uefisign/uefikeys +.endif + .if ${MK_EXAMPLES} == no OLD_FILES+=usr/share/examples/BSD_daemon/FreeBSD.pfa OLD_FILES+=usr/share/examples/BSD_daemon/README @@ -1940,6 +1922,24 @@ OLD_FILES+=usr/libexec/phttpget OLD_FILES+=usr/share/man/man8/phttpget.8.gz .endif +.if ${MK_FTP} == no +OLD_FILES+=etc/ftpusers +OLD_FILES+=etc/newsyslog.conf.d/ftp.conf +OLD_FILES+=etc/pam.d/ftp +OLD_FILES+=etc/pam.d/ftpd +OLD_FILES+=etc/rc.d/ftpd +OLD_FILES+=etc/syslog.d/ftp.conf +OLD_FILES+=usr/bin/ftp +OLD_FILES+=usr/bin/gate-ftp +OLD_FILES+=usr/bin/pftp +OLD_FILES+=usr/libexec/ftpd +OLD_FILES+=usr/share/man/man1/ftp.1.gz +OLD_FILES+=usr/share/man/man1/gate-ftp.1.gz +OLD_FILES+=usr/share/man/man1/pftp.1.gz +OLD_FILES+=usr/share/man/man5/ftpchroot.5.gz +OLD_FILES+=usr/share/man/man8/ftpd.8.gz +.endif + .if ${MK_GAMES} == no OLD_FILES+=usr/bin/caesar OLD_FILES+=usr/bin/factor From nobody Tue Nov 14 16:52:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVC4y0hfnz51Vrt; Tue, 14 Nov 2023 16:52: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 4SVC4y047vz4KgD; Tue, 14 Nov 2023 16:52:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699980722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k5K1Wqk/Htn1ldVWY+C2HT8OoQqTYBE5tGtriugGmpo=; b=Hg4STpqTQYezxdA+8I5DIjawYLpD3MKlSJG+zsEu+aDKCAN4zlCzopJ2cJ2JxN2SF3kCNI GGYVKdSxg+gAfsfntyZ6/DMWn4PMVUQOL1iV5e1rR7nLR8qWNiXdyCJ0cbOdIJEchAusWX 5H5B7xQuX/8pRXlIbgtm04aeMsOmGLDl9EzaJhWoXGZzcSXbaTJDqIex96ySIo2Gw71yRk k5J1tSOLby1rg+l0HOxmMZ60RiVmTc9qSk+thDUmU+LW6gmm6g4zU/STbAsuLeQtUVwmLG zVDM5u18IjQCFwC1qrTk4ks7Un9+XorVh9FAuZzhMr2n4nxxs6/+tqyA2Xpvjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699980722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k5K1Wqk/Htn1ldVWY+C2HT8OoQqTYBE5tGtriugGmpo=; b=rtRr9K+Suecv4DONPPnr/rWjBE88oi/PIcUAxZbBay1cIQqLxEsG4BQUTiZ3LKys7kuP+X 2xym0UdhUyezBXilwULJcn7iqjL0RIL5Iu87MQTRWCTVkSHJlaxIy0oOtaAARDyj9Bm0k8 +P4MRDukdFOhCXbtoshrqqrjBCBMpe5K1jepOmtqYDX50QSRsrubTdbLZaFD4PHHNGDpvi ogAtS13LLTlT7V/h5pzU+aXs9WSqpVDgyLKRu68O7xwde/dvuuAeW6wdMHwnaJzbSD5gGE sKQrd3xc+bzsXdxOCw7dJrYsGb82OVC9DASFaNkf/PN70B99lJ9792S8cE8OMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699980722; a=rsa-sha256; cv=none; b=J/w9of8G3uwWOLpm6Wiz82GzOTcmMOpRucmal9GcTNcOexyUIm8EqAqVrfNVnHTG6xroOJ V37iyJrcQ27rn5UAiHisH0kw1RgfTKu9YEe7qfjNkJf3SyXYBKQfd+d9lmyOSJvzdBTNco CUntRDhnK98rfYJhEmtxnSa4nafjUuLisXgZkvQ0Yioz5J1/wCsfRnYf45t2bevV3zXcar BYleHymMcrXZNwgGSTOJA9e3mNm23l6GtDI7YViiG9gKE2vziAqUVPlclo82m8FK0aEX4q UJ5eA42dYtrnDg8n1ug7QheT1fS6hhlT0/y4GrYxYe6MvbVo9jVf9VpSPBvC7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVC4x6GW1zwx7; Tue, 14 Nov 2023 16:52: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 3AEGq1Gg015931; Tue, 14 Nov 2023 16:52:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AEGq1Pu015928; Tue, 14 Nov 2023 16:52:01 GMT (envelope-from git) Date: Tue, 14 Nov 2023 16:52:01 GMT Message-Id: <202311141652.3AEGq1Pu015928@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: fb173fc89e9c - main - Combine and sort MK_LLVM_COV List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: fb173fc89e9c6908426bf60b1a449f1ff19d51df Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=fb173fc89e9c6908426bf60b1a449f1ff19d51df commit fb173fc89e9c6908426bf60b1a449f1ff19d51df Author: Brooks Davis AuthorDate: 2023-11-09 01:00:36 +0000 Commit: Brooks Davis CommitDate: 2023-11-14 16:49:55 +0000 Combine and sort MK_LLVM_COV These used to be grouped with MK_GCOV option or the like. Reviewed by: emaste, imp, netchild Pull Request: https://github.com/freebsd/freebsd-src/pull/896 --- tools/build/mk/OptionalObsoleteFiles.inc | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 87184f021890..99e6ea1c8be3 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1985,18 +1985,6 @@ OLD_FILES+=usr/share/man/man8/strfile.8.gz OLD_FILES+=usr/share/man/man8/unstr.8.gz .endif -.if ${MK_LLVM_COV} == no -OLD_FILES+=usr/bin/gcov -OLD_FILES+=usr/share/man/man1/gcov.1.gz -.endif - -.if ${MK_LLVM_COV} == no -OLD_FILES+=usr/bin/llvm-cov -OLD_FILES+=usr/bin/llvm-profdata -OLD_FILES+=usr/share/man/man1/llvm-cov.1.gz -OLD_FILES+=usr/share/man/man1/llvm-profdata.1.gz -.endif - .if ${MK_GH_BC} == no OLD_FILES+=usr/share/misc/bc.library OLD_FILES+=usr/tests/usr.bin/dc/Kyuafile @@ -3620,6 +3608,15 @@ OLD_FILES+=usr/share/man/man1/lldb-server.1.gz OLD_FILES+=usr/share/man/man1/lldb.1.gz .endif +.if ${MK_LLVM_COV} == no +OLD_FILES+=usr/bin/gcov +OLD_FILES+=usr/bin/llvm-cov +OLD_FILES+=usr/bin/llvm-profdata +OLD_FILES+=usr/share/man/man1/gcov.1.gz +OLD_FILES+=usr/share/man/man1/llvm-cov.1.gz +OLD_FILES+=usr/share/man/man1/llvm-profdata.1.gz +.endif + .if ${MK_LOCALES} == no OLD_DIRS+=usr/share/locale/af_ZA.ISO8859-15 OLD_FILES+=usr/share/locale/af_ZA.ISO8859-15/LC_COLLATE From nobody Tue Nov 14 16:52:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVC4z1cTPz51Vmy; Tue, 14 Nov 2023 16:52: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 4SVC4z142Jz4L0L; Tue, 14 Nov 2023 16:52:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699980723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AZVjpZ9NKDBNCrvOQRrg04C2wj0vSgL1jWeBibZOeyo=; b=x3CcOOdCQMkikuDUMQYGl4yEh6iZ7I5zWotEYFd81a7+G4rAJg/GEC4IPzTye9TJXEMWmH zKlhNXQ00JUDA4fUJ+Pwpb2JjyY2HN8ggbqkvm1J7rZjslSevTm4BRswcSnMt6lIHTrd1q 9Ef3NsajZ4jbWNDrwfusWEtxpKFTJGb/6qdSGZxA4GKrYRtUhjK59GxjjDlQjKhEFNIFmC v9pbpdZOMkBl3v7S0Av4Ax8jZ7ClcOxh+xQpdCDjRJIYupmRqn4Eloz2OhkpfSNkUTCpra urmQ64x+s4iCFYgoOoPAXoAWY2G9nkLQGS9nwkEodkJY3Ez4ro25fihX8KJE4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699980723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AZVjpZ9NKDBNCrvOQRrg04C2wj0vSgL1jWeBibZOeyo=; b=LD7nkWNCpB6rvXcwOjfmT4pWwFu3x2q0L/C1kGxWMb65sAytmRJknxn5/xY4UMGuIv56YH rG+ExWacFTFJg7MhsFU9x0C2kb0WI6kWapWuNqzWNSdVNwTqFsqSlTx/sOz7qjwGO9qkjB PTBdJ00nfZJL8Fe6A7gwY43ucP0v5ZFn+NJsJV0+43epVx9qbOyMxI3EbNPwz/bgDWLJ7s vQkBsAvIwN1TwerZQt6Ruo1xNUxU8kXi3iJ8O3+2SIonBARpYkXj9pW39HdfRXyLrbhkpI qLn/IOFosP+wOCQJSemKVEsSfHEYGnw7FONmQTW4M0+y3g+br44ZugMYFBcrng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699980723; a=rsa-sha256; cv=none; b=L0ekXkLD16dpkf/tNwgyd/f7pz1wilsNbXOAiZwx80q/3YFv4LOELXDhB4M0nX73rdfsTW 4GpxbsUBMYHeiEGZZPbLIN5BD4D6KTPmWHj7qTHz/HPguhXp80bso/bjj+YqNkLFnFBq8m 11im1qO1mLrkar7ONaPh6UM60DSsT4E9OTVVRZbkOFW1hfNQ4LdCnNVtcwZL3hO2vqyrNB Z76tBtr42a4dM9TSXmiO8iCB38L5BQh6yLbPhZiB2elnHcHy/XtlaEtufvOZwV4NN7SFbn UvUodpI8RuvQnk/W7feGXyCu5Sh7u+Dqx/xvBaCR8KW1s40Pq8gmZo/ixzFjQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVC4z08hpzwZK; Tue, 14 Nov 2023 16:52: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 3AEGq26i015968; Tue, 14 Nov 2023 16:52:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AEGq2ca015965; Tue, 14 Nov 2023 16:52:02 GMT (envelope-from git) Date: Tue, 14 Nov 2023 16:52:02 GMT Message-Id: <202311141652.3AEGq2ca015965@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: 2b3bf27da41f - main - Sort MK_GNU_DIFF 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2b3bf27da41f1481b2025445c6adf27f0d50de99 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=2b3bf27da41f1481b2025445c6adf27f0d50de99 commit 2b3bf27da41f1481b2025445c6adf27f0d50de99 Author: Brooks Davis AuthorDate: 2023-11-09 01:01:44 +0000 Commit: Brooks Davis CommitDate: 2023-11-14 16:49:59 +0000 Sort MK_GNU_DIFF option Reviewed by: emaste, imp, netchild Pull Request: https://github.com/freebsd/freebsd-src/pull/896 --- tools/build/mk/OptionalObsoleteFiles.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 99e6ea1c8be3..c76313d173aa 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1993,6 +1993,11 @@ OLD_FILES+=usr/tests/usr.bin/dc/inout OLD_DIRS+=usr/tests/usr.bin/dc .endif +.if ${MK_GNU_DIFF} == no +OLD_FILES+=usr/bin/diff3 +OLD_FILES+=usr/share/man/man1/diff3.1.gz +.endif + .if ${MK_GOOGLETEST} == no OLD_FILES+=usr/include/private/gmock/gmock-actions.h OLD_FILES+=usr/include/private/gmock/gmock-cardinalities.h @@ -2148,11 +2153,6 @@ OLD_FILES+=usr/share/man/man3/gpio_pin_tristate.3.gz OLD_FILES+=usr/share/man/man8/gpioctl.8.gz .endif -.if ${MK_GNU_DIFF} == no -OLD_FILES+=usr/bin/diff3 -OLD_FILES+=usr/share/man/man1/diff3.1.gz -.endif - .if ${MK_GSSAPI} == no OLD_FILES+=usr/include/gssapi/gssapi.h OLD_DIRS+=usr/include/gssapi From nobody Tue Nov 14 16:52:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVC505Bhwz51Vy6; Tue, 14 Nov 2023 16:52: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 4SVC50230Rz4KxW; Tue, 14 Nov 2023 16:52:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699980724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3x+1cVCWNZFL/uEUm0KX8DEq9t8U+NmXI3WzBxLz0ZE=; b=iEYV1uyB3ixx0sbzxgoLLQsM/SWHREPPr+slxtDTECX5PTl/4+C2a7SdWcRdjBc1DnyrAS LFt6OmSMVqfsn3F/sdG3wvhsksWNgCkW9ITFlCUCv4m7sTAMHV2kI5OQsbRD104kCAsAoI 21dRss8qGFoNyjtT6hcz3hirllimn2p02hrcK7JR6qxqYjBN1/C4R/dZR10WLk8cDNhnYl ksOBWTqLIrVjAG3+6vjoqqsr/fRH+hxIvm18uA+rm3QqPGX7YgR7KirgZcHNOWyuD5frvU 3+kmDMK8rYJCPnjaP7HKBvraDp0YEGguLzrrZkvngoYtOZCo6HPPsk8dp/YklA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699980724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3x+1cVCWNZFL/uEUm0KX8DEq9t8U+NmXI3WzBxLz0ZE=; b=TJCtEICYsz8G/3xeWoOhiDIaEKC0kz8FMU8SoYFVpJGGNHtKeloPjTZZrfxc7NHARNVOmF wet6O9d6Uq5MfNf4Oa6Ys6QeI7VoN78FAvWi1PP4Sn8Q3us6nkIGf5Gf/CZWWfba8ttjgx zlF3gW+HcO5jt+Ykih7NcCqQYFwQyI9NqmhZnx6i8OYLA4bMIojd9rJSPjyrd6KcgLPtoQ 2Zczuz6ANLNWnk1+WMdx1WN7DR0ABXuYMhKz4xyFw2X9ssh3mBJfc7+nRjY0GggMXSBFHu BLd1qT9Zj4aw0bg66jKy6Jl/sDsL9Wj+gWCsRdSC2/GCFlwU3SD8+/3XFYcOfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699980724; a=rsa-sha256; cv=none; b=Ju3SrCM5f4O9k/LMOpsBPUZRwqsmSGNj/ZG5G6wEjhaCd+g0gJIn24iQyXbF5P7zcErmoL 2kWx+5OLERMrCaa22dJBKJllN3jZkKTpHGkqSLEpjM8TV8NSstKioGfwAlxJESBQzBszZz T+pKJDRDpiVriRYCBVy0Ai+eiTjyHGkj0U5Ggx1DxgAQzD8dr8gVmBaGElvn2B5Ge0FpKv Llzy+mV+BhyFPltezUcaBSJH7/OYv94UqM6QQCC28ahsKZrzH4ho7ItkNRyqiURry+t/ot DDnU6vRZpMLBzl1keIrWgYlFSHRxXVWnW+LiUxlPw8uZaLr3t9IELOyhy50Gdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVC50197Pzwcr; Tue, 14 Nov 2023 16:52: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 3AEGq4JC016004; Tue, 14 Nov 2023 16:52:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AEGq4LQ016001; Tue, 14 Nov 2023 16:52:04 GMT (envelope-from git) Date: Tue, 14 Nov 2023 16:52:04 GMT Message-Id: <202311141652.3AEGq4LQ016001@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: c90d0600ee00 - main - Sort MK_NETLINK 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c90d0600ee000e7874a55e3015953bd670574093 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=c90d0600ee000e7874a55e3015953bd670574093 commit c90d0600ee000e7874a55e3015953bd670574093 Author: Brooks Davis AuthorDate: 2023-11-09 01:03:46 +0000 Commit: Brooks Davis CommitDate: 2023-11-14 16:50:01 +0000 Sort MK_NETLINK option Reviewed by: emaste, imp, netchild Pull Request: https://github.com/freebsd/freebsd-src/pull/896 --- tools/build/mk/OptionalObsoleteFiles.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index c76313d173aa..7cefc3c816c5 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -5487,6 +5487,11 @@ OLD_FILES+=usr/share/snmp/defs/netgraph_tree.def OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-NETGRAPH.txt .endif +.if ${MK_NETLINK} == no +OLD_FILES+=usr.bin/genl +OLD_FILES+=usr/share/man/man1/genl.1.gz +.endif + .if ${MK_NIS} == no OLD_FILES+=etc/rc.d/ypbind OLD_FILES+=etc/rc.d/ypldap @@ -5551,11 +5556,6 @@ OLD_FILES+=var/yp/Makefile.dist OLD_DIRS+=var/yp .endif -.if ${MK_NETLINK} == no -OLD_FILES+=usr.bin/genl -OLD_FILES+=usr/share/man/man1/genl.1.gz -.endif - .if ${MK_NLS} == no OLD_DIRS+=usr/share/nls/ OLD_DIRS+=usr/share/nls/C From nobody Tue Nov 14 16:52:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVC514l2lz51Vn5; Tue, 14 Nov 2023 16:52: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 4SVC513BwBz4L7H; Tue, 14 Nov 2023 16:52:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699980725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fzB49KVMeAsU69xhtYH4EKJpf6V/HxTP8zbfjWeez8g=; b=MeyCE8elTerBN1qLuwLhGeC6fbDl23XGn5sd8FdZSezaBfLL1ZV7GpnN3DLgERcGwQYDxv llC1ALORRJGfRNo2Dj06vBFk3nSo4ED93omO/SHZje02sRDEu4f6LrJRVs04IO3An8CR2F OQ/HKtQ04O9AfhzHXLsO8h+pHESwG6eVtCsS55qlfCufH9x5kqfeo8V/mAEf68jK1a5pjx OPITS78bJMNb5Wo0XPLiKo32raaxzrFFUaGqNnO5lVr01pZLJLlWN56kgQvJVKVwYmcEYx kTYdzLrZTa9P2wJbxeSxixhurU6iw7LXftGN8DXDZFLmkZ9ZcRZrBeGC0FwsSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699980725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fzB49KVMeAsU69xhtYH4EKJpf6V/HxTP8zbfjWeez8g=; b=EwCym2UtfjE2OTNijwGIHZ7ngiu1VIknpXhYlGK6yC8YkQ91fISYo2Rl8TLn8SZEucLBEm POYxleEVOj4qrXeKLKSs+qFf6Gw3m/NqsdiDBshf1VXMatNLqo3Nh0cx5+dF+EkU7dawbH 2Luo0EtmYVtzC2hjrYRrnk+w1DWip4jE7lsnSwL1D+uQeDpe1d1DalBttef5b0ztd+K+dF mZH311VkcUUSymrFee2UsgQRTLmxA7VTvIKTP4BMKgmMFMj2YFN2XqTw4XwPzy2ZHmFij/ amuxoeOBOZjutpylLevBAZN8GqAkyWNXMQHJxGrrIsZFiCtnVDsWAtQ5OYbXtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699980725; a=rsa-sha256; cv=none; b=fjq0kDhcgU6KqFWRr4zXIslVU2RBgWn3+4iTpiGxh0crllZHuCMI16CztlVE4/+DG3LN9T l2C2iiTvXTbRyWxUJXHINyeO0uXLJjIuO4z9N9Dv2Lf41atWZCKU4jbs2NJEGfMq7PG9yn N4XAXlkIerY9tmbPBNoQCRHLA6Ggf5zDulTwSOls7djnAMDKOVpf3hE7dyPzQMKdlYunUn 9gFSbPRN6K23WTsKKu0sQmesAtQuSKFuYYIuUjoOPGplZz4/su9ZSpi1LseFsQBhcIOzIE 07QsPamTrlxfJIgPJ6Rkn+Ulmwr+ew2t1YflzSSiftK3wjO3JehrrWsmbSnvyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVC512HsczwnS; Tue, 14 Nov 2023 16:52: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 3AEGq5gS016044; Tue, 14 Nov 2023 16:52:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AEGq5Z1016041; Tue, 14 Nov 2023 16:52:05 GMT (envelope-from git) Date: Tue, 14 Nov 2023 16:52:05 GMT Message-Id: <202311141652.3AEGq5Z1016041@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: 4cd0f014a128 - main - OptionalObsoleteFiles.inc: document block order List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4cd0f014a1285c1b57e583b260282ca433a8ccdd Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=4cd0f014a1285c1b57e583b260282ca433a8ccdd commit 4cd0f014a1285c1b57e583b260282ca433a8ccdd Author: Brooks Davis AuthorDate: 2023-11-13 23:13:03 +0000 Commit: Brooks Davis CommitDate: 2023-11-14 16:50:52 +0000 OptionalObsoleteFiles.inc: document block order Options should be in sort(1) order by primary option (usually, but not always, first in the if statement). Reviewed by: emaste, imp, netchild Pull Request: https://github.com/freebsd/freebsd-src/pull/896 --- tools/build/mk/OptionalObsoleteFiles.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 7cefc3c816c5..aaf1dbda5710 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -3,6 +3,8 @@ # This file adds support for the WITHOUT_* and WITH_* knobs in src.conf(5) to # the check-old* and delete-old* targets. # +# Blocks should be in sort(1) order by primary option. +# .if ${MK_ACCT} == no OLD_FILES+=etc/rc.d/accounting From nobody Tue Nov 14 17:34:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVD2K4vdBz51cMp; Tue, 14 Nov 2023 17:34:49 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oo1-xc34.google.com (mail-oo1-xc34.google.com [IPv6:2607:f8b0:4864:20::c34]) (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 4SVD2K30P5z3Vgx; Tue, 14 Nov 2023 17:34:49 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oo1-xc34.google.com with SMTP id 006d021491bc7-589d4033e84so3010103eaf.1; Tue, 14 Nov 2023 09:34:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699983288; x=1700588088; 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=MY4B18eXxgcdW+CNXzUXbIWy6O7g6CzQbkkHpM86L0E=; b=CSJHA91FPRRnC3kiwe8uxSHfpE7e3C6vW8B/TbtY4v+KJCozMhG2YCJ7hn5VcwX17Z 4kgzCRQafJHfZNdGei3T8uDw283ipNWBJVHJ1BHR4+SnFXc6OLVzmYk+tYqr4CSr05XV AlXTB3a0RPgjqbUx7aQkN6H15timee8AhfqBO/i9Ib5QMtV4nawautKlJdDJNCRUoHCm vY9Fzgn0TGs+3rNjJHM7fQqE5O4onQdI8bDLShh20lPCR9ONU6jmCzH4IdCre9itYVF9 2i6r/OREDNMEv0QcmoukoBUEZvjkAjQ9rL7hBy6FKX1dDJaOlrArRSRYpUD1L8ePHzAw /FQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699983288; x=1700588088; 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=MY4B18eXxgcdW+CNXzUXbIWy6O7g6CzQbkkHpM86L0E=; b=aD+R6d69G5E8D3HYAe8JOMm7nEyWeUs2N5x9LIiUC7W3TMxQ3V6Ykmopr/tXBgH/9+ Ym7xbgYXBDoaHSjSyqG2RggYSSUSHf3Mv5/wymrf551jOzvPBpo3agO9ySqQC+4boWL9 zUr5s3XMThRiYMuDBgFHY8+M7pco4AuWPbbVkvsiTJdeAMIkvFWiZ8h3aAkbj6kWt3Mq Y3hrCVqNe+m933S9fUbYgm7NvUjGGTr6ttisdg2xDVkthOQZe8VM887+DS8MQkp3gXAj DYpbMTxXniD0moGg9PbpIPpiylYOPA37hqS0umBI2qp37BGQVspHtezpHtmdgQ11HEOu f7uA== X-Gm-Message-State: AOJu0YwO4NnN7da0spOwxBlUvpKqatiY/pcwB/q+F+b/dQ8LpknHow9p d0J1ei/kaOyTHtTGz4ZHe2vTifLwBwsv//UirtLlKSTw X-Google-Smtp-Source: AGHT+IG2DwzheGi5SohUthV1CrgbAZKS7PJ2zOvRqpvhTaRayHtdcAcZ7yPhgV2LAsgPQH7TbDUOZaqeL7LgCTibHC4= X-Received: by 2002:a4a:ea28:0:b0:57b:7e41:9f11 with SMTP id y8-20020a4aea28000000b0057b7e419f11mr10185003ood.2.1699983288215; Tue, 14 Nov 2023 09:34:48 -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:ac9:57d4:0:b0:4f0:1250:dd51 with HTTP; Tue, 14 Nov 2023 09:34:47 -0800 (PST) In-Reply-To: <202311132228.3ADMS19n063754@gitrepo.freebsd.org> References: <202311132228.3ADMS19n063754@gitrepo.freebsd.org> From: Mateusz Guzik Date: Tue, 14 Nov 2023 18:34:47 +0100 Message-ID: Subject: Re: git: 89188bd6ba8d - main - vn_copy_file_range(): use local variables for invp/outvp vnodes v_mounts To: Konstantin Belousov 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-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4SVD2K30P5z3Vgx On 11/13/23, Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=89188bd6ba8d8332c65498f2b71c90e5ed4b9dae > > commit 89188bd6ba8d8332c65498f2b71c90e5ed4b9dae > Author: Konstantin Belousov > AuthorDate: 2023-11-12 18:29:14 +0000 > Commit: Konstantin Belousov > CommitDate: 2023-11-13 22:26:28 +0000 > > vn_copy_file_range(): use local variables for invp/outvp vnodes > v_mounts > > This avoids possible NULL dereference when checking mnt_vfc names. > > Reviewed by: jah, rmacklem, Olivier Certner > > Tested by: pho > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D42554 > --- > sys/kern/vfs_vnops.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c > index 4e4161ef1a7f..e2227537dde1 100644 > --- a/sys/kern/vfs_vnops.c > +++ b/sys/kern/vfs_vnops.c > @@ -3046,6 +3046,7 @@ vn_copy_file_range(struct vnode *invp, off_t *inoffp, > struct vnode *outvp, > off_t *outoffp, size_t *lenp, unsigned int flags, struct ucred > *incred, > struct ucred *outcred, struct thread *fsize_td) > { > + struct mount *inmp, *outmp; > int error; > size_t len; > uint64_t uval; > @@ -3075,15 +3076,17 @@ vn_copy_file_range(struct vnode *invp, off_t > *inoffp, struct vnode *outvp, > if (len == 0) > goto out; > > + inmp = invp->v_mount; > + outmp = outvp->v_mount; > + > /* > * If the two vnodes are for the same file system type, call > * VOP_COPY_FILE_RANGE(), otherwise call vn_generic_copy_file_range() > * which can handle copies across multiple file system types. > */ > *lenp = len; > - if (invp->v_mount == outvp->v_mount || > - strcmp(invp->v_mount->mnt_vfc->vfc_name, > - outvp->v_mount->mnt_vfc->vfc_name) == 0) > + if (inmp == outmp || strcmp(inmp->mnt_vfc->vfc_name, > + outmp->mnt_vfc->vfc_name) == 0) > error = VOP_COPY_FILE_RANGE(invp, inoffp, outvp, outoffp, > lenp, flags, incred, outcred, fsize_td); > else > > ->mnt_vfc is global per filesystem code, so this strcmp does not make any sense. mere comparison to mnt_vfc will do it. -- Mateusz Guzik From nobody Tue Nov 14 17:50:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVDMv1PTVz50Q5b; Tue, 14 Nov 2023 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 4SVDMv0rLQz3d0l; Tue, 14 Nov 2023 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=1699984203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cNxRrDsjeWH0sTgTVrMQjA0MX4HSsayV9WY3akxqUcM=; b=Dtjo7Jsqp4Y1xZeJrHqRKRIOeQf3XQoEHrHz0Yb++WrDRA+T9bQ1vI3Py/6yamTL6+SQwW jZrPse2zFe6N5miwZAH+n9MPRpNXpUk8z8RUKhjTlQCDjUZ+O3D1fJT3z9hE3Juiob4rWx FKX/H9goqR5mPsrhp54CrJrrKGukNgFba8xl4YrdNrZquDY73Mjls/HJVjnK1ZIJ4lhIPj 93zkogVElOVz4b9Sc51NLXTgmLkarWwqyNINmjRmaMNsUgm+8q3p6UF4LNGx1a1EJYxf+v YE5n752iRgISZ6F/yHT74BBjRZz6Evm3kscA3ByDQUCqMtBfAjV360QdYqzqKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699984203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cNxRrDsjeWH0sTgTVrMQjA0MX4HSsayV9WY3akxqUcM=; b=ShgXGm4NXJ5KsU0gVSYxxWEldhwi/MKyS/lNRs3UJm6HGwzs57onuO3q53jTguh8MZXBbN EfGemRmwmS4DhQQ7DX8k89uA8xPCP8EYZDY9brxP9uQ/WltXHv3XojbgkUYwh8P5d5bhzD Ykc1m0+ueEKLNm9g0wY3THM7anLGibOAs4xG08QKALh7xD/XifkcVh5uWmHY/kOmGgyJTQ 3TdeQF9pRveCdzDQaeABdQjTdYfF0BbI+ScFPeAYb+bTSeTHcxDG3bQDcVbEu7nl4bINTj 5UDN0hoFCK7fAghS7maQjHp1fYNvN0iroeUKDPN7ICRQ8wmhU1+9W6bkFBvvew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699984203; a=rsa-sha256; cv=none; b=G8x1pZCu+/fvAqxOup8lh/zKU2ehVX/CH6XQwFZUVWfK1mtgtG2s1/18i1XiAQmsINgui5 Ax7r03kdXWiAEEu9e+mwhqMexBL5W4vHWkxdOCkMxLpPAvaaPFx8VZqhv1eqVfJxc6+gtr nkTUTwDt8jz/gs7haeiaO6CMcdYe/WFyBxfG9scEtwg1vtMWlbjLHJjnRJ4vWntycXLCob pivtYX8+8JFgrglP4piKGeuCwDlZHzkLJoQQPTFVI2kAzGCJ1wNOYBxeAszCreF79QC38N gR5HkKtFUTpOlxY557G8kKlqkJLOygZ+gGLJfp/EqPAruvf9i1qfjzqs08nCrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVDMt72p7zyHy; Tue, 14 Nov 2023 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 3AEHo2MT024061; Tue, 14 Nov 2023 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 3AEHo2tV024057; Tue, 14 Nov 2023 17:50:02 GMT (envelope-from git) Date: Tue, 14 Nov 2023 17:50:02 GMT Message-Id: <202311141750.3AEHo2tV024057@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: b49596de2622 - main - lib/libc/tests/string: add extended unit tests for strcmp() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b49596de2622a51e5673ba2c0b3718cd88a2aa41 Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=b49596de2622a51e5673ba2c0b3718cd88a2aa41 commit b49596de2622a51e5673ba2c0b3718cd88a2aa41 Author: Robert Clausecker AuthorDate: 2023-09-22 20:42:00 +0000 Commit: Robert Clausecker CommitDate: 2023-11-14 17:37:06 +0000 lib/libc/tests/string: add extended unit tests for strcmp() This changeset add a new set of tests that comprehensively test strcmp() on various alignments of the input. This made it easy to smoke out many exciting new bugs in the new SSE strcmp() implementation from D41971. MFC after: 1 week Reviewed by: ngie Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41970 --- lib/libc/tests/string/Makefile | 2 + lib/libc/tests/string/strcmp_test.c | 132 ++++++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+) diff --git a/lib/libc/tests/string/Makefile b/lib/libc/tests/string/Makefile index e312787c8831..a090e1bd3463 100644 --- a/lib/libc/tests/string/Makefile +++ b/lib/libc/tests/string/Makefile @@ -12,6 +12,7 @@ ATF_TESTS_C+= flsll_test ATF_TESTS_C+= memcmp_test ATF_TESTS_C+= memset_s_test ATF_TESTS_C+= stpncpy_test +ATF_TESTS_C+= strcmp2_test ATF_TESTS_C+= strcspn_test ATF_TESTS_C+= strerror2_test ATF_TESTS_C+= strspn_test @@ -40,6 +41,7 @@ NETBSD_ATF_TESTS_C+= strpbrk_test NETBSD_ATF_TESTS_C+= strrchr_test NETBSD_ATF_TESTS_C+= swab_test +SRCS.strcmp2_test= strcmp_test.c SRCS.strerror2_test= strerror_test.c .include "../Makefile.netbsd-tests" diff --git a/lib/libc/tests/string/strcmp_test.c b/lib/libc/tests/string/strcmp_test.c new file mode 100644 index 000000000000..75ebcbcadda2 --- /dev/null +++ b/lib/libc/tests/string/strcmp_test.c @@ -0,0 +1,132 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Robert Clausecker + * 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 + * 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 + +int (*volatile strcmp_fn)(const char *, const char *); + +ATF_TC(strcmp_alignments); +ATF_TC_HEAD(strcmp_alignments, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test strcmp(3) with various alignments"); +} + +static void +alignment_testcase(char *a, char *b, int want) +{ + int res; + + res = strcmp_fn(a, b); + ATF_CHECK_MSG(want == (res > 0) - (res < 0), + "strcmp(%p \"%s\", %p \"%s\") = %d != %d", + (void *)a, a, (void *)b, b, res, want); +} + +static void +check_strcmp_alignments(char a[], char b[], + size_t a_off, size_t b_off, size_t len, size_t pos) +{ + char *a_str, *b_str, a_orig, b_orig; + + a[a_off] = '\0'; + b[b_off] = '\0'; + + a_str = a + a_off + 1; + b_str = b + b_off + 1; + + a_str[len] = '\0'; + b_str[len] = '\0'; + a_str[len+1] = 'A'; + b_str[len+1] = 'B'; + + a_orig = a_str[pos]; + b_orig = b_str[pos]; + + alignment_testcase(a_str, b_str, 0); + + if (pos < len) { + a_str[pos] = '\0'; + alignment_testcase(a_str, b_str, -1); + a_str[pos] = a_orig; + b_str[pos] = '\0'; + alignment_testcase(a_str, b_str, 1); + b_str[pos] = b_orig; + } + + a_str[pos] = 'X'; + alignment_testcase(a_str, b_str, 1); + a_str[pos] = a_orig; + b_str[pos] = 'X'; + alignment_testcase(a_str, b_str, -1); + b_str[pos] = b_orig; + + a[a_off] = '-'; + b[b_off] = '-'; + a_str[len] = '-'; + b_str[len] = '-'; + a_str[len+1] = '-'; + b_str[len+1] = '-'; +} + +ATF_TC_BODY(strcmp_alignments, tc) +{ + size_t a_off, b_off, len, pos; + /* 16B alignment offset + 64B buffer + sentinel before/after + NUL */ + char a[64+16+3], b[64+16+3]; + + memset(a, '-', sizeof(a)); + memset(b, '-', sizeof(b)); + a[sizeof(a) - 1] = '\0'; + b[sizeof(b) - 1] = '\0'; + + /* check alignment offsets relevant for SSE routines */ + for (a_off = 0; a_off < 16; a_off++) + for (b_off = 0; b_off < 16; b_off++) + /* ensure main loop (@ 32B) is completed at least once */ + for (len = 1; len <= 64; len++) + for (pos = 0; pos <= len; pos++) + check_strcmp_alignments(a, b, a_off, b_off, len, pos); +} + +ATF_TP_ADD_TCS(tp) +{ + void *dl_handle; + + dl_handle = dlopen(NULL, RTLD_LAZY); + strcmp_fn = dlsym(dl_handle, "test_strcmp"); + if (strcmp_fn == NULL) + strcmp_fn = strcmp; + + ATF_TP_ADD_TC(tp, strcmp_alignments); + + return atf_no_error(); +} From nobody Tue Nov 14 19:40:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVGqF2kNTz50frK; Tue, 14 Nov 2023 19:40:25 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4SVGqD2Rltz4RRT; Tue, 14 Nov 2023 19:40:24 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of brooks@spindle.one-eyed-alien.net has no SPF policy when checking 199.48.129.229) smtp.mailfrom=brooks@spindle.one-eyed-alien.net; dmarc=none Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id E03983C019A; Tue, 14 Nov 2023 19:40:22 +0000 (UTC) Date: Tue, 14 Nov 2023 19:40:22 +0000 From: Brooks Davis To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 4cd0f014a128 - main - OptionalObsoleteFiles.inc: document block order Message-ID: References: <202311141652.3AEGq5Z1016041@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=us-ascii Content-Disposition: inline In-Reply-To: <202311141652.3AEGq5Z1016041@gitrepo.freebsd.org> X-Spamd-Result: default: False [-1.51 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.81)[-0.807]; FORGED_SENDER(0.30)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; MIME_GOOD(-0.10)[text/plain]; ONCE_RECEIVED(0.10)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_NA(0.00)[no SPF record]; ARC_NA(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; FREEFALL_USER(0.00)[brooks]; TO_DN_NONE(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; FROM_HAS_DN(0.00)[]; FROM_NEQ_ENVFROM(0.00)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Queue-Id: 4SVGqD2Rltz4RRT X-Spamd-Bar: - On Tue, Nov 14, 2023 at 04:52:05PM +0000, Brooks Davis wrote: > The branch main has been updated by brooks: > > URL: https://cgit.FreeBSD.org/src/commit/?id=4cd0f014a1285c1b57e583b260282ca433a8ccdd > > commit 4cd0f014a1285c1b57e583b260282ca433a8ccdd > Author: Brooks Davis > AuthorDate: 2023-11-13 23:13:03 +0000 > Commit: Brooks Davis > CommitDate: 2023-11-14 16:50:52 +0000 > > OptionalObsoleteFiles.inc: document block order > > Options should be in sort(1) order by primary option (usually, but not > always, first in the if statement). There would be some value in describing how the contents of blocks should be sorted (along with fixing it since the first two entries are pretty obviously reversed), but I'll leave that for another day. It would probably benefit from a bit of scripting. -- Brooks From nobody Tue Nov 14 21:11:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVJrN3f87z50sNT; Tue, 14 Nov 2023 21:11: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 4SVJrN389Bz3Bn6; Tue, 14 Nov 2023 21:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699996292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TGMsMT7q/eIud0poKm97nTdwYypHVJ5D7eEhUDoVQh4=; b=lokULtpJ7uefPBRT1uRyErK9LAeKrxu8PsfyEaKM4kkkHs4qHFgHnqoi/106uXNZyo6ZLu zg57zPh6/V1GpbMrpsazCdEAOcBmJQewUCbpMWagUeraLno43MOMm6Td2watfFmHCob4hw AHv5LpDIUr97C2sJc272VpIvkoQgbigKZFomabjiavgVHlbumIUmC4Yiwlm/1lqzBYDTJA tLw+QHGS/qXdBsM0QJPLkdTW+3T6wAumG5els/H8HR/sp/wCrKYa/Qbp4HiIowEoI84lcR Wr13Eqpob7RLHB9zKcaPUErZCLHA+F5AFBkk0nldyPd+6beHBJ3XlnB030vbpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699996292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TGMsMT7q/eIud0poKm97nTdwYypHVJ5D7eEhUDoVQh4=; b=QvuS89PjlyUKf7FHHU1croJAxueV9946/EYW84NrZEFHRdlcWHZ0laBWyGnWPkpbV2Vcwi 3NQCxVjDVbVW9s/QnxIsDvuHTb6/RGtPXrNE9KJxojVw7A9hEQjLOEvDEf1ueQKz4TwMZs wQvqFPHqIWvluEBHFkdJgDJ+TfM3niPhxYgibsKUMa9nwZ1RZmTOKmJG8UKK4fICgAWSYu StF1gyu5jyP1WQ8kb4wkWgWA7ZeXUh2aUr313zE5Ip5MpVEwHIFs/hoFHCDS5pEUiOIi6u sVmO11w+R714PHy6EPMGvufBwxVqzvHQjl7aFInBGcbp5sV4InT4zVhcGFqd1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699996292; a=rsa-sha256; cv=none; b=kr4P6Qy0R1uFCR71u4Fn3i7zGumnuu8OPTlmf7cziD5bZLd1JXTe4eMH4pjyEmo3YO3gZz 8SpvAVVsMWDmR5SmfRbY581ZwG6cydxKKvciig1QnbCAbUd9krhl2Z11Dn88VrtQ5keYnS eu8pEj7T85Yw/xsaxGZwFmPI7MNtubSM9/BzfOAMRhJAS3XOSLxv519qt0O1qcmP3vCSPj tJ1gmXq1Jx5zKYZn6RwqJtsML48A718puhz65j/XSXCr44ilgM1euLZIrw6ZmEYi8d84KS 3huKgbEp8i7sW2sSur3PJLQqLf+8fWBtInSFz/lSABrTXdw2lR6vFEYr1UsXTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVJrN2C5Vz14MY; Tue, 14 Nov 2023 21:11: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 3AELBWFZ067837; Tue, 14 Nov 2023 21:11:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AELBWJn067834; Tue, 14 Nov 2023 21:11:32 GMT (envelope-from git) Date: Tue, 14 Nov 2023 21:11:32 GMT Message-Id: <202311142111.3AELBWJn067834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "George V. Neville-Neil" Subject: git: b2e41172bdc0 - main - A skeleton kernel module suitable for creating new such modules. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b2e41172bdc00f177f7de4d4f4963cc4d99a3178 Auto-Submitted: auto-generated The branch main has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=b2e41172bdc00f177f7de4d4f4963cc4d99a3178 commit b2e41172bdc00f177f7de4d4f4963cc4d99a3178 Author: George V. Neville-Neil AuthorDate: 2023-10-05 20:05:31 +0000 Commit: George V. Neville-Neil CommitDate: 2023-11-14 21:08:13 +0000 A skeleton kernel module suitable for creating new such modules. --- share/examples/modules/Makefile | 6 +++ share/examples/modules/skel.c | 87 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) diff --git a/share/examples/modules/Makefile b/share/examples/modules/Makefile new file mode 100644 index 000000000000..0f0a2fb01e8a --- /dev/null +++ b/share/examples/modules/Makefile @@ -0,0 +1,6 @@ +.PATH: ${SRCTOP}/sys/skel + +KMOD= skel +SRCS= skel.c + +.include diff --git a/share/examples/modules/skel.c b/share/examples/modules/skel.c new file mode 100644 index 000000000000..fc99e13ab444 --- /dev/null +++ b/share/examples/modules/skel.c @@ -0,0 +1,87 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 George V. Neville-Neil + * + * 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. + * + */ + +/* + * SKEL Loadable Kernel Module for the FreeBSD Operating System + * + * The SKEL module is meant to act as a skeleton for creating new + * kernel modules. + * + * This module can be loaded and unloaded from * FreeBSD and is for + * use in teaching as well. + * + */ + +#include +#include +#include +#include +#include + +/* + * Every module can hav ea module specific piece of code that is + * executed whenever the module is loaded or unloaded. The following + * is a trivial example that prints a message on the console whenever + * the module is loaded or unloaded. + */ + +static int +skel_mod_event(module_t mod, int type, void *data) +{ + + switch (type) { + case MOD_LOAD: + printf("SKEL module loading.\n"); + return (0); + case MOD_UNLOAD: + printf("SKEL module unloadin.\n"); + return (0); + } + return (EOPNOTSUPP); +} + +/* + * Modules can have associated data and the module data also contains + * an entry for the function called by the kernel on load and unload. + */ + +static moduledata_t skel_mod = { + "skel", + skel_mod_event, + NULL, +}; + +/* + * Each module is declared with its name and module data. The + * ordering arguments at the end put this module into the device + * driver class, which is sufficient for our needs. The complete list + * of modules types and ording can be found in sys/kernel.h + */ + +DECLARE_MODULE(skel, skel_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); + From nobody Tue Nov 14 21:11:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVJrP42Yqz50sCW; Tue, 14 Nov 2023 21:11: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 4SVJrP3cjKz3C43; Tue, 14 Nov 2023 21:11:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699996293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tF6We63QiA84pOHpXuOaI8pbb5XEmVlXYkXxXNF9GLQ=; b=QYPJbyx4a+EvHU1FzKMb+EnT6i+5emYFairwVB1Mi/DEggV21/tEbEB5avWmWMKuh26miU COEVcF9SeihV2ewBiU4hjKk1OT2nNYtwR1OeQR2r01ZK1fynofR+2o986HhKE8sMVuACR3 1zc/AYL2qXz4MDg9UakODYGy8Ou7OaWJ+tPGJjcNs8AjSHilXC7XWuZzEcBQKUBw8eJyv7 fp4A8v6VCtAf+1Oev+ZGM/40A5yzcIH8v5SF6T1qSpuXbL9ZFUdi0l07SxlDrfVeIgRokq 4xgvSIeUNTPfDJLRnm7KukUNbKgGLLxolANUPGkDX/+0dty8FH4hbMtYnAXmaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699996293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tF6We63QiA84pOHpXuOaI8pbb5XEmVlXYkXxXNF9GLQ=; b=Z92MfjA7FZoIbFQyZKZCnxn5XoIQMxGAYPHZ28gyZX55s8TH9AgXGuL4Fsi3wqdCdgXN4b 8MpKFof2/if7OA7as/u+thKAKpD1cQL2XRRqzOXoDDuiehwUnVxHhR7sGyUa8I4yOTe+uH ALZwujoEI95vX5gtZA+1GY5FHYEgn4lScuCPTkrMsdHe8jrKhKuFOahG+AEsn6bcjdkD99 nfCd4THs2Mq57nTxiTvssbLJ+ggwfql/gHy8wWNP/Wk1fHYcuQaoe5q+d86rdlMhnvgmi5 prgGo3rGtvzpQwuuDeGBKOj/dLKc/bNo4Al0tb5hh3rNf71OO4/OoWYKDJf6oQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699996293; a=rsa-sha256; cv=none; b=eY01nG2pVo2Z5gdFmvN57hIiXwcPOFCXQH7cUKRaSL7xLWWmRkxp6FLiYiJVNorbd1RJNx Xs3MBLPGmZxOSg3iJces1gLKkA+bgUPtChFkN8YFiK8W5A1WKqfQQpJTJHGKDmRHspvC5q CznUnkgiUDMx9gSoAz3/ukYiVtBOlalhENfOqF09WHtkdUD0b8C6MzYO+R5gXeCENYzaZj vsO1PFZPk2MjXCt8YayOGwp2nf3mYAqMcRjcJzCShOEuLppPjSSmdX+osbTs29AkQLenA0 +PlSyIea55zCVAxEoyBwFt8UDjDkfdDdaq4WmhCKuvyAPKVQMiwmbjn40mZI1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVJrP2h8Tz13xH; Tue, 14 Nov 2023 21:11: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 3AELBXGP067890; Tue, 14 Nov 2023 21:11:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AELBXBj067887; Tue, 14 Nov 2023 21:11:33 GMT (envelope-from git) Date: Tue, 14 Nov 2023 21:11:33 GMT Message-Id: <202311142111.3AELBXBj067887@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "George V. Neville-Neil" Subject: git: 029848334f85 - main - Address review feedback on a typo. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 029848334f85e03895234db8b89f5544ffb6e720 Auto-Submitted: auto-generated The branch main has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=029848334f85e03895234db8b89f5544ffb6e720 commit 029848334f85e03895234db8b89f5544ffb6e720 Author: George V. Neville-Neil AuthorDate: 2023-11-14 21:09:18 +0000 Commit: George V. Neville-Neil CommitDate: 2023-11-14 21:09:50 +0000 Address review feedback on a typo. Reviewed by: jhb, gbe Differential Revision: --- share/examples/modules/skel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/examples/modules/skel.c b/share/examples/modules/skel.c index fc99e13ab444..407cbee32e8a 100644 --- a/share/examples/modules/skel.c +++ b/share/examples/modules/skel.c @@ -59,7 +59,7 @@ skel_mod_event(module_t mod, int type, void *data) printf("SKEL module loading.\n"); return (0); case MOD_UNLOAD: - printf("SKEL module unloadin.\n"); + printf("SKEL module unloading.\n"); return (0); } return (EOPNOTSUPP); From nobody Tue Nov 14 21:48:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVKg810Klz50xJk; Tue, 14 Nov 2023 21:48: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 4SVKg75wBsz3QTg; Tue, 14 Nov 2023 21:48:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699998515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WzG31V9VWSh7rANDNa3qJOH6LdOj6HKVsSGVVioIeqY=; b=n7QmbVF/1g9ByE6QGQjADbRswnLYtWHntgG9d4/chyajI/U/mO1s3UaBbGgh2ZFA1iqbyL l/DnkmNgJ9vJZSHYTJomykUzUG1SHplf4GyCdCc2SpHSnLvOZG4MPRdqToSJKPgHrbQs+0 hqMDn1fX4YuBOQJ/irRNjMiWs3sOmq/Sumym5nOEwLMuWVCzoQxMhZHjijydr/ZdXE235Q 5fIvDyVVldI5GvxQ3rqPWlrtg6qMCU/ZPaxLy9nYTK1vZK62BMbldop3iGYszUZllrx6Fi awcJQT+qu+BRw6lDeHTemlNvaOJhmQUVEy4Wgk+xXcrGNkS1PJEqYFcAMZ16KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699998515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WzG31V9VWSh7rANDNa3qJOH6LdOj6HKVsSGVVioIeqY=; b=fVa20v4QQNoSI2MDCV5L8BFTMvJOErzRw07R1Q4LwTUWocC6tSOVtWru8fBLOuJEG/0eS/ xqJ280nKgXb8s9swnYmAnbV5SHPiv2hQIoE/5iOdzD4nJumxRbPwp+Oj8hevUApHtIjTkR Aiur+n/x15muj0La/7mTZ8VynSFYnyOW30sDmCN7YR+1NCH4jL1Fyc+eSIL4BNaIO/g5J0 t3OmWwZ4wf3lPFBPAzkd/aAL+gVKgQi5+nL/O1Kmmb5V2Isx/c1V5ymtK6xIqHTn6pvMg2 Rui02kSSLBV38v7xki0K+vH98h85bRzEmCFwz57gaJJfDZ6kAumAS/6hX6WFOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699998515; a=rsa-sha256; cv=none; b=rJdfUQEMYKrp23nx3hhXQfr9CSZkLNz1nFMkS64wNg127JDgpmnetAc3anjz0tjApvklqj bDt24pdekBcJhkPV8oILvLvCiD9Mb/NYNlG+NiRkxuIq4nb6i3Q/L+78jmuwNB+h4PhA8K EFLFnxULNqyHkLSGxwj7gNw7WMwZQG9iDITYZNru/p+ZpMgnw2gPdOdlxuQ2KJvHN/ZzyZ 9FJj6yiJE2gDZVt2rhEgNWf1oNf64lZePny0LFsuFaw8zELx2zzt9GCxR6bE8gWp25EtNQ FUesEVjfLWBySMygWU9oDicfP5NGZKIItTxlsjQkJvYDFdIq5XYsRSLirMg+9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVKg751t1z15Jf; Tue, 14 Nov 2023 21:48: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 3AELmZwO026248; Tue, 14 Nov 2023 21:48:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AELmZwa026245; Tue, 14 Nov 2023 21:48:35 GMT (envelope-from git) Date: Tue, 14 Nov 2023 21:48:35 GMT Message-Id: <202311142148.3AELmZwa026245@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 8ef8939fd458 - main - bcm2835/spi: Support SPI_FLAG_KEEP_CS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8ef8939fd4581572e17860d7089cc6e06fd0221f Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=8ef8939fd4581572e17860d7089cc6e06fd0221f commit 8ef8939fd4581572e17860d7089cc6e06fd0221f Author: Justin Hibbits AuthorDate: 2023-11-02 20:09:14 +0000 Commit: Justin Hibbits CommitDate: 2023-11-14 21:47:35 +0000 bcm2835/spi: Support SPI_FLAG_KEEP_CS Summary: 3c08673438 brought in SPI_FLAG_KEEP_CS to keep the SPI chip select held post-transfer completion. Add this support to bcm2835 SPI for SPI devices that need it. As part of this, the owner thread needed carried through so that no other thread can take over the SPI bus until the owner releases the chip select. Reviewed by: manu Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D42599 --- sys/arm/broadcom/bcm2835/bcm2835_spi.c | 33 +++++++++++++++++++++---------- sys/arm/broadcom/bcm2835/bcm2835_spivar.h | 2 ++ 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_spi.c b/sys/arm/broadcom/bcm2835/bcm2835_spi.c index 7d11e6aa50f7..b7f53be2da8d 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_spi.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_spi.c @@ -388,8 +388,10 @@ bcm_spi_intr(void *arg) /* Check for end of transfer. */ if (sc->sc_written == sc->sc_len && sc->sc_read == sc->sc_len) { /* Disable interrupts and the SPI engine. */ - bcm_spi_modifyreg(sc, SPI_CS, - SPI_CS_TA | SPI_CS_INTR | SPI_CS_INTD, 0); + if ((sc->sc_flags & BCM_SPI_KEEP_CS) == 0) { + bcm_spi_modifyreg(sc, SPI_CS, + SPI_CS_TA | SPI_CS_INTR | SPI_CS_INTD, 0); + } wakeup(sc->sc_dev); } @@ -438,16 +440,23 @@ bcm_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) /* If the controller is in use wait until it is available. */ BCM_SPI_LOCK(sc); - while (sc->sc_flags & BCM_SPI_BUSY) - mtx_sleep(dev, &sc->sc_mtx, 0, "bcm_spi", 0); + if (sc->sc_thread != curthread) + while (sc->sc_flags & BCM_SPI_BUSY) + mtx_sleep(dev, &sc->sc_mtx, 0, "bcm_spi", 0); /* Now we have control over SPI controller. */ sc->sc_flags = BCM_SPI_BUSY; + if ((cmd->flags & SPI_FLAG_KEEP_CS) != 0) + sc->sc_flags |= BCM_SPI_KEEP_CS; + /* Clear the FIFO. */ - bcm_spi_modifyreg(sc, SPI_CS, - SPI_CS_CLEAR_RXFIFO | SPI_CS_CLEAR_TXFIFO, - SPI_CS_CLEAR_RXFIFO | SPI_CS_CLEAR_TXFIFO); + if (sc->sc_thread != curthread) + bcm_spi_modifyreg(sc, SPI_CS, + SPI_CS_CLEAR_RXFIFO | SPI_CS_CLEAR_TXFIFO, + SPI_CS_CLEAR_RXFIFO | SPI_CS_CLEAR_TXFIFO); + + sc->sc_thread = curthread; /* Save a pointer to the SPI command. */ sc->sc_cmd = cmd; @@ -517,11 +526,15 @@ bcm_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) err = mtx_sleep(dev, &sc->sc_mtx, 0, "bcm_spi", hz * 2); /* Make sure the SPI engine and interrupts are disabled. */ - bcm_spi_modifyreg(sc, SPI_CS, SPI_CS_TA | SPI_CS_INTR | SPI_CS_INTD, 0); + if (!(cmd->flags & SPI_FLAG_KEEP_CS)) { + bcm_spi_modifyreg(sc, + SPI_CS, SPI_CS_TA | SPI_CS_INTR | SPI_CS_INTD, 0); + sc->sc_thread = 0; + } - /* Release the controller and wakeup the next thread waiting for it. */ - sc->sc_flags = 0; wakeup_one(dev); + sc->sc_flags &= ~BCM_SPI_BUSY; + /* Release the controller and wakeup the next thread waiting for it. */ BCM_SPI_UNLOCK(sc); /* diff --git a/sys/arm/broadcom/bcm2835/bcm2835_spivar.h b/sys/arm/broadcom/bcm2835/bcm2835_spivar.h index 1c9a81edc777..85b13626a026 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_spivar.h +++ b/sys/arm/broadcom/bcm2835/bcm2835_spivar.h @@ -36,6 +36,7 @@ struct bcm_spi_softc { struct resource * sc_mem_res; struct resource * sc_irq_res; struct spi_command *sc_cmd; + struct thread *sc_thread; bus_space_tag_t sc_bst; bus_space_handle_t sc_bsh; uint32_t sc_len; @@ -46,6 +47,7 @@ struct bcm_spi_softc { }; #define BCM_SPI_BUSY 0x1 +#define BCM_SPI_KEEP_CS 0x2 #define BCM_SPI_WRITE(_sc, _off, _val) \ bus_space_write_4(_sc->sc_bst, _sc->sc_bsh, _off, _val) From nobody Tue Nov 14 22:17:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVLJ73xNTz511B5; Tue, 14 Nov 2023 22:17:11 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from glebi.us (glebi.us [162.251.186.162]) by mx1.freebsd.org (Postfix) with ESMTP id 4SVLJ71WY3z3WLm; Tue, 14 Nov 2023 22:17:11 +0000 (UTC) (envelope-from glebius@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: by glebi.us (Postfix, from userid 1000) id ED80555594; Tue, 14 Nov 2023 14:17:03 -0800 (PST) Date: Tue, 14 Nov 2023 14:17:03 -0800 From: Gleb Smirnoff To: "George V. Neville-Neil" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b2e41172bdc0 - main - A skeleton kernel module suitable for creating new such modules. Message-ID: References: <202311142111.3AELBWJn067834@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=us-ascii Content-Disposition: inline In-Reply-To: <202311142111.3AELBWJn067834@gitrepo.freebsd.org> X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US] X-Rspamd-Queue-Id: 4SVLJ71WY3z3WLm On Tue, Nov 14, 2023 at 09:11:32PM +0000, George V. Neville-Neil wrote: G> The branch main has been updated by gnn: G> G> URL: https://cgit.FreeBSD.org/src/commit/?id=b2e41172bdc00f177f7de4d4f4963cc4d99a3178 G> G> commit b2e41172bdc00f177f7de4d4f4963cc4d99a3178 G> Author: George V. Neville-Neil G> AuthorDate: 2023-10-05 20:05:31 +0000 G> Commit: George V. Neville-Neil G> CommitDate: 2023-11-14 21:08:13 +0000 G> G> A skeleton kernel module suitable for creating new such modules. G> --- G> share/examples/modules/Makefile | 6 +++ G> share/examples/modules/skel.c | 87 +++++++++++++++++++++++++++++++++++++++++ G> 2 files changed, 93 insertions(+) Are you aware there exists share/examples/kld that already has several kernel module examples? I'm not sure if a very minimal kernel module adds more value to examples, but pretty sure that it belongs to the existing directory instead of a new one. The existing directory is also connected to the build, which makes examples installed. -- Gleb Smirnoff From nobody Tue Nov 14 23:57:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVNWp0YSdz51CDs for ; Tue, 14 Nov 2023 23:57: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 4SVNWp05xQz4DV6; Tue, 14 Nov 2023 23:57:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700006246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NYBr2XFH8SC8ndzWA2sPRzEueXXnDxafKAb/7I8BE5k=; b=nkkOspBHAHYadkYpy5TlK9X2toxepqluVmTzWsyK/2AT4JMvf+DzFzMdWIJ8oQ8L0hw0ks y8A7x65zGbAbfUVgCxwq27fUqciW9y5zt9givK2xfTcrRKKvDJPcxDI8nLbLUnGXI9t0Sb gh0XyLd4K5h5N0EOB4yiA/erl6XO7yHu5atnICtgNiJXi5/H1rIyKi+2JDYCP7FL96ezX8 fimsNjJlGpd+Cp/ebz3WMlEftvWsu0ZOKIxm+wv7mgzgcMeYS5+r5IoS7n4CvZUlOZ/aRH e+wNwcXTxZUH/eQyD5LLc0SCEjBhKC+JgQouZXJVM+ajjwKIN3DFeaOwNSXo6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700006246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NYBr2XFH8SC8ndzWA2sPRzEueXXnDxafKAb/7I8BE5k=; b=HyC91WDdiM3x+rW7CH0zvjV/3SSvDO9a7guFQ9BqWtMFwEi4JN6F2UbJgDHwRJYN3rqg5W b7z12rCWxQS10ZmTGdu0UX4OULvAzFbcBoRWoPM4xmVqdwNDZMLWIKTr9cxGl1s+ZBDc0E uNIimORBCBX2J5u6oDOZ6Q6ohcKtVeZ8LpQN0ISvZn6vX8j50TuAbuIIbO95Kt9lh1stNr fty73LMpqd9GzFmQgJ5/nTnejX8JBBVxuFdPGGs34wuf8MgRUHyrk70UeX7g+1KT7XJnos tCRHO9+3I7tZQ/4eLZwRw103UefnOxVYCuikdKY8rZXP7TeEpsNC5s5O/XvXzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700006246; a=rsa-sha256; cv=none; b=HJnmJlhOznvyAvnxYxy68KcSKWyywk5a+hxgSX3o7D3PXv09udOEzGrPWO0EV38BAS6juP JqnVlcFPBPycujWdFKI3dM0uPUMJyJ/9NeaFZOID8Bg7dXNQYDtbjn2DjV6b8bQUjgi6sV N/zg2XzQVlZI/xfOGsWG+ogeMpSo8UeIJeV13QRddtY23YU1n7CGYq8z0OV/CXuWG3fuOO w2KVaUxrFn3yPZp/yD9sDNT6hzKSamfbR/pMVnFxiFlvoVqWl/XBpcjnaTaby8NPW9GkXB h4f9rgPT2q56wemJHvNWF6V78SjVaJbcaTFysSo8QnOTDlWpRf6X/d/qT8Ps/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 4SVNWn5y4Kz18Tt; Tue, 14 Nov 2023 23:57: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 3AENvP3A042034; Tue, 14 Nov 2023 23:57:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AENvPNh042033; Tue, 14 Nov 2023 23:57:25 GMT (envelope-from git) Date: Tue, 14 Nov 2023 23:57:25 GMT Message-Id: <202311142357.3AENvPNh042033@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: cbc620a473ce..5223d1d95fdd - vendor/libevent - 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/vendor/libevent X-Git-Reftype: branch X-Git-Commit: 5223d1d95fddcef6f9a36e264a5800bd907ade8b X-Git-Oldrev: cbc620a473ce23d882ba3e9f91ec0c6c12dcd239 X-Git-Newrev: 5223d1d95fddcef6f9a36e264a5800bd907ade8b Auto-Submitted: auto-generated The branch vendor/libevent has been updated by cy: URL: https://cgit.FreeBSD.org/src/log/?id=cbc620a473ce..5223d1d95fdd 5223d1d95fdd libevent: Import libevent 2.1.12 From nobody Tue Nov 14 23:57:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVNXM1ms0z51CSJ for ; Tue, 14 Nov 2023 23: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 4SVNXM1LJzz4Dm8; Tue, 14 Nov 2023 23: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=1700006275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FC1898oWpy2Sa0s38vRv++ndJ9G3vXTmTpHj7IbV+7Y=; b=vV/pXI60z1T1unFMxmeJ0zpKdxk7TvFAfxh1TOP6Get/dgOBCuF937MSvOZH/Aeo3gkZH/ bzE72sVjGvTrTNNy/a4TL6qYqOvEJNepS6Wk/OosVQGmfJLUPQffCOxvUFMvio1Z3559J4 k4KrYAuXX534VFO+Zhh9nbg2x7/HZ52Uo1HCV4pLsOjDUQfu4Ba/tzhlQW9Iv1eP7TSl6z w1YkGBASrw3omHj7V39ELSnIs1qgB07TsOPuVdPraNGpf5PD9ws2Ip2cOnq8riL1mkqVa3 6Q1F/miHyMhrKN4NaO1EGcUfVdIIa1YF6j2PVlCWq17E4wSx0Bp3P/Uf8AdErQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700006275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FC1898oWpy2Sa0s38vRv++ndJ9G3vXTmTpHj7IbV+7Y=; b=rfiUa/LhRDwj5kPH0wKnAgkLzETh+jecPPkOW6rOeL1paTnwqk92McFyAz3L8CQNYJIbc7 vSEY3MqRjS9e6rw2lcdzldnu71YT2q06vv96BJWfaeI5f97VKTDsYHZrlxmA5+wdydcg1y cxl1F9jwXIfq2H0UhBpFmZnpxg8hR3+nivcdj0sepA4VfvMj419kgqaHUuSJacBXMJHIPr YydnpmsEao018sFM1WM0LoHm5fuHYyOfKec/RW0ppAs6Xev70pWy2tjB3o4KIWW3o3AoE0 w9QJC4OEgK79iU1Qq6vRI0+Yz0hcNFjhu/9dslhaton4CcJTAAqQAcrSMyMtIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700006275; a=rsa-sha256; cv=none; b=pBXbS6ZfgXz8HqB3ExKDFTkthbbMOPdDEyb3VselZaL7UN+ofWhsaqyIrdbtyy5oo4GpOY czONQvJH2Yv4tbdGWNhWLbukubwp+9EWlwS9N7Uol+wlxa6QZ8OZXlYAr4IfqGzDe6KjKq 7FzzNZ+ULkXb/Bk0Bv5w0Npjy4yU8NHVAADd/AHNSpindlnxEO+AJz/zAYA3uri6nMfI0e /zdBoYYUMxUtpeyz5yW1Qj43PAxbIEpOF3UybXjSEeaagTCAD2J/FCdR04IfS42j8CS4V/ Kr8VJl/+50cUZZiril/FcWVwrvsbdKDrP0EOhKxSD7YPL5TFSpZ1JXcNvEaBCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVNXM0Pgkz18Cw; Tue, 14 Nov 2023 23: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 3AENvsMc042169; Tue, 14 Nov 2023 23:57:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AENvsGv042167; Tue, 14 Nov 2023 23:57:54 GMT (envelope-from git) Date: Tue, 14 Nov 2023 23:57:54 GMT Message-Id: <202311142357.3AENvsGv042167@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: 87c01dbb9d81 - Create tag vendor/libevent/2.1.8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/tags/vendor/libevent/2.1.8 X-Git-Reftype: annotated tag X-Git-Commit: 87c01dbb9d816fb600e872e145168a1d637670ab Auto-Submitted: auto-generated The annotated tag vendor/libevent/2.1.8 has been created by cy: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/libevent/2.1.8 tag vendor/libevent/2.1.8 Tagger: Cy Schubert TaggerDate: 2023-11-14 22:56:59 +0000 libevent: Tag 2.1.8 commit cbc620a473ce23d882ba3e9f91ec0c6c12dcd239 Author: Ed Maste AuthorDate: 2018-09-24 16:32:10 +0000 Commit: Ed Maste CommitDate: 2018-09-24 16:32:10 +0000 Import libevent 2.1.18 This will be used to replace the embedded libevent in ntp, for OpenSSL 1.1.1 compatibility. Sponsored by: The FreeBSD Foundation From nobody Wed Nov 15 00:53:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVPmb5Yj7z51JmM; Wed, 15 Nov 2023 00:53: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 4SVPmb55pJz4JNj; Wed, 15 Nov 2023 00:53:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700009615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YdMtX08CIYcM7B63/4TjmJwGfpyXLgV9GneOXlGgbH4=; b=qUeCqfnbBMIq1fSK2sa7bvPldKz6XwMU+ta80odY5OXBhEXiRUd8E7lFXxi1tdZYxOdg8T JMR23FCfSsyi+3ZrDzXqO+fhBZMdzjgmhiWdHInaACsBQVRO/9aQOMPu5X1o2maMLZoUOg 1A97oKisNavJx3JvisGzwtL1WJZiFvStLO3x2COB2dpV0sBhCg3pOkoSpyBWuJOh3ZlbAS LhJURwfWGJl0sQK+zNqDJjmjNThb55kWaFmvU1R+i/tfiNqc7+SON/fIEjYFJSCwyqys9n +MWxNfbONjDcexqPTXZKIVOYK3z4MGwNzLUWwkHmzEph39Eta8P+UdGl3TkeHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700009615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YdMtX08CIYcM7B63/4TjmJwGfpyXLgV9GneOXlGgbH4=; b=UGBRCSRp9iG02Vyo5KwnsFkRrFaK+zOwtOyRnh9++3wQXSnWaBwxcLTkmHkVQeV5ElRL+B NaIK26grH4U8Sil6IRrbMohcKwS7wP+xq69mf+5ps8//yaZo6YF+Xw1UoRyEvK6JEY8skh sp8wF695tjKrJMow9c6rlKL01wUICTrr3h4bkecWv3uUrMINpzY1cVIdFE7HEYKE34d0t6 pHu5cBTXtP/4J6AgIVZ+Vq3eydAX9P1bkWUnU0FCK3zZqR44YgL/rFYxSlzIDetOdIEb0G KAFXAAdS2Y6B49dA9FBCAjOgzmQCCHVYulruBKp+lnIGP+y3MvxKxz8y6wvAKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700009615; a=rsa-sha256; cv=none; b=QkXkSmpO1A9hl8V5/oTzlPaK++dRdOo5DZ3TrA/nKQbh49c70mL75uv7gcOv58SMjLD61w 7M8ASi9PNUQ5igORQculJHFMkaM0/AgHc8Vf4yv2/lcbQvxL25r7AGnkjI3AYyMFuhIm4b DYGOKWdUCGfHOOIYO4aZl74uAiYCBsho2qKcqsnyA+QBMXkNUKtBcrXGceGe+ujWYB522q Ln9W2XvoSP5fyQpZJOMmoG3R/JYvR08XezjLgff41MVb1J3h/wnaOAW4UEDYWNXPZ0z833 q+RtJ9l35Qs/x+hp5NilEw/yn/Ql7CY6I28y5oiokbWlufgUVMajYPXNpf5KOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVPmb48N3z19Rq; Wed, 15 Nov 2023 00:53: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 3AF0rZF3041645; Wed, 15 Nov 2023 00:53:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AF0rZj9041642; Wed, 15 Nov 2023 00:53:35 GMT (envelope-from git) Date: Wed, 15 Nov 2023 00:53:35 GMT Message-Id: <202311150053.3AF0rZj9041642@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: fa08011a521c - main - zoneinfo: fix makefile rules script List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa08011a521c1f15ca44d6a4f30a318d0a37a3a7 Auto-Submitted: auto-generated The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=fa08011a521c1f15ca44d6a4f30a318d0a37a3a7 commit fa08011a521c1f15ca44d6a4f30a318d0a37a3a7 Author: Stephen J. Kiernan AuthorDate: 2023-11-15 00:38:47 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-11-15 00:51:40 +0000 zoneinfo: fix makefile rules script In make target rules, one needs to use subshell if there are change directory commands that should only have an effect on the other commands in the same line. Otherwise, if make is not running in compatibility mode (for example, when -j flag is specified), commands would be executed in a single shell and lines following the "cd" might not work as expected. Adjust the target script lines that use "cd" to run in a subshell by adding appropriate parenthesis. Reviewed by: sjg Differential Revision: https://reviews.freebsd.org/D42608 --- share/zoneinfo/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/zoneinfo/Makefile b/share/zoneinfo/Makefile index f2f14c01c7be..60ae1f76f5b5 100644 --- a/share/zoneinfo/Makefile +++ b/share/zoneinfo/Makefile @@ -93,10 +93,10 @@ ZIC= ${STAGE_HOST_OBJTOP}/usr/sbin/zic zoneinfo: ${TDATA} mkdir -p ${TZBUILDDIR} - cd ${TZBUILDDIR}; mkdir -p ${TZBUILDSUBDIRS} - umask 022; cd ${.CURDIR}; \ + (cd ${TZBUILDDIR}; mkdir -p ${TZBUILDSUBDIRS}) + (umask 022; cd ${.CURDIR}; \ ${ZIC:Uzic} -D -d ${TZBUILDDIR} ${ZICFLAGS} -m ${NOBINMODE} \ - ${LEAPFILE} ${TZFILES} + ${LEAPFILE} ${TZFILES}) # # Sort TZS to ensure they are the same every build. find -s might @@ -110,7 +110,7 @@ TZS!= cd ${TZBUILDDIR} && find * -type f | LC_ALL=C sort beforeinstall: install-zoneinfo install-zoneinfo: mkdir -p ${DESTDIR}/usr/share/zoneinfo - cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p ${TZBUILDSUBDIRS} + (cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p ${TZBUILDSUBDIRS}) .for f in ${TZS} ${INSTALL} ${TAG_ARGS} \ -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ From nobody Wed Nov 15 01:15:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVQFQ5xQXz51Lsm; Wed, 15 Nov 2023 01:15: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 4SVQFQ5RwJz4LSV; Wed, 15 Nov 2023 01:15:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700010906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uB2pkifkovetuvaqKCvYuTdcbeMVEWF2CPF4t0IEHuU=; b=HT6BLMvYvqQJRipvRogf1OhOG43ocCgsqcus+sGLIZnTN92pQ2i9guGuZYm/4WYgRSpee3 IO2/dcxRikt1jnXruiOmbAOiFytY7PCnkJdRylviOp3jZSJ8x9X2DKkIi2FCmLy7bZ4qhW /pt47OomgcrH7QmLvpHJTXKNWdei0DvjjClIRf5oZXlMXhuT3TocxtFQWGaLejvzzMefWk JyX5qY1Fu0nEyrGxJQkgyPXGCFVwXVCVgyh1cTn0J7xmKbzJOf1Fsr86J+z5uU08IVewjN yuJIvfXYmj8GcyMr8p8DKtL3+p1C2C+6n3hWgiYOt4DJlhb+AlTaPK4fk1bQfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700010906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uB2pkifkovetuvaqKCvYuTdcbeMVEWF2CPF4t0IEHuU=; b=H4uoqEw5LvopDNhY00fQS4BhyvObj1mT2Jeb9jSRCcFg34qSmudj2fha3aq0ijccAqXBxV 2R/O4Wprtm1Gl1vjL3p2qKMqTVdUO6FE910+yLz9iVETUcr5r66CIVwAif/TQzLYkBkw5S dUSfAeElTBMfU87P2+MpVUBip0pM0lERGhB0l2hvu0ZzL51TduzS2TguipHCxQlBAP9Vtg WBDLpYwXJIk7Y7P8fLv0wglv7dEWbmX2td9vIjNAUa+Rb1J2afsS7S8OTO8g2CXvjKHLIg VEoV5YZePZxbUVrOAbyynBGR4ZkCHAF7Arq7sBezjb1mLeIKiQfSTeXQc/MQxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700010906; a=rsa-sha256; cv=none; b=A1EYFVQD70hiB9G3z2OCGcEX1Do2Vjazkp7oTjOIuykj2a6k2EiIiT8Cl1wqlya/lzdZMI Y51m/5bZKbs4Leqxydid+s/R7JiWVWACwJzAa5XAp2Av6RSqrUfwB9BuI+j6vkqArnpkGT G9M8Iq6djYa8P8NLA/0dgiRJh4hJKCYhgzSqyE+jooT8vwu5VzapCAcn7RG/hF4Ph31JGo WJkNpae4VwEeSQCKj+AW8+AFp69o8meX2Pf+SuRpKnok7v5P4t8X8/UQq4gdNu5m3s5r7x ly55F86qAQBm4j166UvdnA6hii9bkUZMGJGWls/uyliYibmAy9yPE63olSsOlg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVQFQ4X90z1B9j; Wed, 15 Nov 2023 01:15: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 3AF1F6Be075806; Wed, 15 Nov 2023 01:15:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AF1F4IQ075790; Wed, 15 Nov 2023 01:15:04 GMT (envelope-from git) Date: Wed, 15 Nov 2023 01:15:04 GMT Message-Id: <202311150115.3AF1F4IQ075790@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: b50261e21f39 - main - libevent: Import libevent 2.1.12 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b50261e21f39a6c7249a49e7b60aa878c98512a8 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=b50261e21f39a6c7249a49e7b60aa878c98512a8 commit b50261e21f39a6c7249a49e7b60aa878c98512a8 Merge: fa08011a521c 5223d1d95fdd Author: Cy Schubert AuthorDate: 2023-11-14 23:04:28 +0000 Commit: Cy Schubert CommitDate: 2023-11-15 01:13:02 +0000 libevent: Import libevent 2.1.12 MFC after: 2 weeks Merge commit '5223d1d95fddcef6f9a36e264a5800bd907ade8b' into main contrib/libevent/CMakeLists.txt | 1575 +++++++++ contrib/libevent/ChangeLog | 313 ++ contrib/libevent/ChangeLog-1.4 | 2 +- contrib/libevent/ChangeLog-2.0 | 2 +- contrib/libevent/Doxyfile | 46 +- contrib/libevent/Makefile.am | 67 +- contrib/libevent/Makefile.in | 1486 ++++++--- contrib/libevent/README.md | 487 +++ contrib/libevent/WIN32-Code/getopt.c | 149 + contrib/libevent/WIN32-Code/getopt.h | 33 + contrib/libevent/WIN32-Code/getopt_long.c | 234 ++ .../WIN32-Code/nmake/event2/event-config.h | 26 +- contrib/libevent/aclocal.m4 | 193 +- contrib/libevent/arc4random.c | 40 +- contrib/libevent/buffer.c | 50 +- contrib/libevent/buffer_iocp.c | 1 + contrib/libevent/bufferevent-internal.h | 36 + contrib/libevent/bufferevent.c | 115 +- contrib/libevent/bufferevent_async.c | 66 +- contrib/libevent/bufferevent_filter.c | 10 +- contrib/libevent/bufferevent_openssl.c | 75 +- contrib/libevent/bufferevent_pair.c | 4 +- contrib/libevent/bufferevent_ratelim.c | 9 +- contrib/libevent/bufferevent_sock.c | 74 +- contrib/libevent/{ => build-aux}/compile | 17 +- contrib/libevent/{ => build-aux}/config.guess | 970 +++--- contrib/libevent/build-aux/config.sub | 1793 +++++++++++ contrib/libevent/{ => build-aux}/depcomp | 10 +- contrib/libevent/{ => build-aux}/install-sh | 60 +- contrib/libevent/{ => build-aux}/ltmain.sh | 766 +++-- contrib/libevent/{ => build-aux}/missing | 16 +- contrib/libevent/{ => build-aux}/test-driver | 10 +- contrib/libevent/cmake/AddCompilerFlags.cmake | 13 + contrib/libevent/cmake/AddEventLibrary.cmake | 193 ++ contrib/libevent/cmake/COPYING-CMAKE-SCRIPTS | 22 + contrib/libevent/cmake/CheckConstExists.cmake | 25 + contrib/libevent/cmake/CheckFileOffsetBits.c | 14 + contrib/libevent/cmake/CheckFileOffsetBits.cmake | 43 + contrib/libevent/cmake/CheckFunctionKeywords.cmake | 14 + .../libevent/cmake/CheckPrototypeDefinition.c.in | 29 + .../libevent/cmake/CheckPrototypeDefinition.cmake | 82 + contrib/libevent/cmake/CheckWorkingKqueue.cmake | 52 + contrib/libevent/cmake/CodeCoverage.cmake | 165 + contrib/libevent/cmake/Copyright.txt | 57 + contrib/libevent/cmake/LibeventConfig.cmake.in | 183 ++ .../libevent/cmake/LibeventConfigVersion.cmake.in | 11 + contrib/libevent/cmake/Macros.cmake | 36 + contrib/libevent/cmake/Uninstall.cmake.in | 23 + contrib/libevent/cmake/UseDoxygen.cmake | 111 + contrib/libevent/cmake/VersionViaGit.cmake | 66 + contrib/libevent/config.h.in | 63 +- contrib/libevent/config.sub | 1807 ----------- contrib/libevent/configure | 3390 +++++++++++++++++--- contrib/libevent/configure.ac | 328 +- contrib/libevent/defer-internal.h | 3 + contrib/libevent/doxygen.am | 55 + contrib/libevent/epoll.c | 15 +- contrib/libevent/epolltable-internal.h | 2 +- contrib/libevent/evbuffer-internal.h | 2 +- contrib/libevent/evconfig-private.h.cmake | 40 + contrib/libevent/evconfig-private.h.in | 7 + contrib/libevent/evdns.c | 144 +- contrib/libevent/event-config.h.cmake | 513 +++ contrib/libevent/event-internal.h | 13 +- contrib/libevent/event.c | 392 ++- contrib/libevent/event_iocp.c | 2 +- contrib/libevent/event_rpcgen.py | 2057 ++++++------ contrib/libevent/event_tagging.c | 4 + contrib/libevent/evmap.c | 43 +- contrib/libevent/evrpc.c | 6 +- contrib/libevent/evthread-internal.h | 16 +- contrib/libevent/evthread.c | 2 +- contrib/libevent/evutil.c | 144 +- contrib/libevent/evutil_rand.c | 6 +- contrib/libevent/evutil_time.c | 65 +- contrib/libevent/http-internal.h | 9 +- contrib/libevent/http.c | 254 +- contrib/libevent/include/event2/buffer.h | 3 +- contrib/libevent/include/event2/buffer_compat.h | 3 +- contrib/libevent/include/event2/bufferevent.h | 11 +- .../libevent/include/event2/bufferevent_compat.h | 4 + contrib/libevent/include/event2/dns.h | 46 +- contrib/libevent/include/event2/dns_compat.h | 24 +- contrib/libevent/include/event2/event.h | 77 +- contrib/libevent/include/event2/http.h | 13 +- contrib/libevent/include/event2/http_compat.h | 6 +- contrib/libevent/include/event2/listener.h | 12 + contrib/libevent/include/event2/rpc.h | 48 +- contrib/libevent/include/event2/rpc_struct.h | 14 + contrib/libevent/include/event2/util.h | 34 +- contrib/libevent/include/event2/visibility.h | 31 +- contrib/libevent/include/include.am | 7 +- contrib/libevent/iocp-internal.h | 14 + contrib/libevent/kqueue.c | 17 +- contrib/libevent/listener.c | 29 +- contrib/libevent/log-internal.h | 25 +- contrib/libevent/log.c | 11 +- contrib/libevent/m4/ax_check_funcs_ex.m4 | 22 + contrib/libevent/m4/ax_prog_doxygen.m4 | 600 ++++ contrib/libevent/m4/libevent_openssl.m4 | 9 + contrib/libevent/m4/libtool.m4 | 102 +- contrib/libevent/m4/ltoptions.m4 | 2 +- contrib/libevent/m4/ltsugar.m4 | 2 +- contrib/libevent/m4/ltversion.m4 | 12 +- contrib/libevent/m4/lt~obsolete.m4 | 2 +- contrib/libevent/make-event-config.sed | 10 +- contrib/libevent/minheap-internal.h | 6 +- contrib/libevent/mm-internal.h | 5 + contrib/libevent/openssl-compat.h | 16 +- contrib/libevent/poll.c | 25 +- contrib/libevent/sample/dns-example.c | 17 +- contrib/libevent/sample/event-read-fifo.c | 4 +- contrib/libevent/sample/hello-world.c | 3 +- contrib/libevent/sample/http-connect.c | 86 +- contrib/libevent/sample/http-server.c | 292 +- contrib/libevent/sample/https-client.c | 88 +- contrib/libevent/sample/include.am | 11 +- contrib/libevent/sample/le-proxy.c | 16 +- .../libevent/sample/openssl_hostname_validation.c | 3 +- contrib/libevent/sample/signal-test.c | 25 +- contrib/libevent/sample/time-test.c | 7 +- contrib/libevent/select.c | 2 +- contrib/libevent/signal.c | 2 + contrib/libevent/strlcpy-internal.h | 2 + contrib/libevent/test/bench.c | 60 +- contrib/libevent/test/bench_cascade.c | 8 +- contrib/libevent/test/bench_http.c | 3 + contrib/libevent/test/bench_httpclient.c | 4 +- contrib/libevent/test/check-dumpevents.py | 10 +- contrib/libevent/test/include.am | 43 +- contrib/libevent/test/print-winsock-errors.c | 86 + contrib/libevent/test/regress.c | 332 +- contrib/libevent/test/regress.gen.c | 105 +- contrib/libevent/test/regress.gen.h | 11 +- contrib/libevent/test/regress.h | 7 +- contrib/libevent/test/regress_buffer.c | 369 ++- contrib/libevent/test/regress_bufferevent.c | 156 +- contrib/libevent/test/regress_dns.c | 522 ++- contrib/libevent/test/regress_et.c | 146 +- contrib/libevent/test/regress_finalize.c | 48 + contrib/libevent/test/regress_http.c | 479 ++- contrib/libevent/test/regress_listener.c | 100 +- contrib/libevent/test/regress_main.c | 68 +- contrib/libevent/test/regress_rpc.c | 49 +- contrib/libevent/test/regress_ssl.c | 404 ++- contrib/libevent/test/regress_testutils.c | 2 +- contrib/libevent/test/regress_thread.c | 8 +- contrib/libevent/test/regress_thread.h | 34 +- contrib/libevent/test/regress_util.c | 196 +- contrib/libevent/test/rpcgen_wrapper.sh | 11 +- contrib/libevent/test/test-changelist.c | 4 +- contrib/libevent/test/test-closed.c | 1 + contrib/libevent/test/test-eof.c | 4 +- contrib/libevent/test/test-fdleak.c | 15 +- contrib/libevent/test/test-init.c | 2 +- contrib/libevent/test/test-ratelim.c | 87 +- contrib/libevent/test/test-time.c | 25 +- contrib/libevent/test/test-weof.c | 4 +- contrib/libevent/test/test.sh | 4 +- contrib/libevent/test/tinytest.c | 169 +- contrib/libevent/test/tinytest.h | 5 +- contrib/libevent/test/tinytest_macros.h | 12 +- contrib/libevent/time-internal.h | 3 + contrib/libevent/util-internal.h | 72 +- contrib/libevent/win32select.c | 3 +- 165 files changed, 18349 insertions(+), 6378 deletions(-) diff --cc contrib/libevent/CMakeLists.txt index 000000000000,676727f16563..676727f16563 mode 000000,100644..100644 --- a/contrib/libevent/CMakeLists.txt +++ b/contrib/libevent/CMakeLists.txt diff --cc contrib/libevent/README.md index 000000000000,000000000000..1247e220f50e new file mode 100644 --- /dev/null +++ b/contrib/libevent/README.md @@@ -1,0 -1,0 +1,487 @@@ ++

++ libevent logo ++

++ ++ ++ ++[![Appveyor Win32 Build Status](https://ci.appveyor.com/api/projects/status/ng3jg0uhy44mp7ik?svg=true)](https://ci.appveyor.com/project/libevent/libevent) ++[![Travis Build Status](https://travis-ci.org/libevent/libevent.svg?branch=master)](https://travis-ci.org/libevent/libevent) ++[![Coverage Status](https://coveralls.io/repos/github/libevent/libevent/badge.svg)](https://coveralls.io/github/libevent/libevent) ++[![Join the chat at https://gitter.im/libevent/libevent](https://badges.gitter.im/libevent/libevent.svg)](https://gitter.im/libevent/libevent?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) ++ ++ ++ ++# 0. BUILDING AND INSTALLATION (Briefly) ++ ++## Autoconf ++ ++ $ ./configure ++ $ make ++ $ make verify # (optional) ++ $ sudo make install ++ ++## CMake (General) ++ ++ ++The following Libevent specific CMake variables are as follows (the values being ++the default). ++ ++``` ++# Type of the library to build (SHARED or STATIC) ++# Default is: SHARED for MSVC, otherwise BOTH ++EVENT__LIBRARY_TYPE:STRING=DEFAULT ++ ++# Installation directory for CMake files ++EVENT_INSTALL_CMAKE_DIR:PATH=lib/cmake/libevent ++ ++# Enable running gcov to get a test coverage report (only works with ++# GCC/CLang). Make sure to enable -DCMAKE_BUILD_TYPE=Debug as well. ++EVENT__COVERAGE:BOOL=OFF ++ ++# Defines if Libevent should build without the benchmark executables ++EVENT__DISABLE_BENCHMARK:BOOL=OFF ++ ++# Define if Libevent should build without support for a debug mode ++EVENT__DISABLE_DEBUG_MODE:BOOL=OFF ++ ++# Define if Libevent should not allow replacing the mm functions ++EVENT__DISABLE_MM_REPLACEMENT:BOOL=OFF ++ ++# Define if Libevent should build without support for OpenSSL encryption ++EVENT__DISABLE_OPENSSL:BOOL=OFF ++ ++# Disable the regress tests ++EVENT__DISABLE_REGRESS:BOOL=OFF ++ ++# Disable sample files ++EVENT__DISABLE_SAMPLES:BOOL=OFF ++ ++# If tests should be compiled or not ++EVENT__DISABLE_TESTS:BOOL=OFF ++ ++# Define if Libevent should not be compiled with thread support ++EVENT__DISABLE_THREAD_SUPPORT:BOOL=OFF ++ ++# Enables verbose debugging ++EVENT__ENABLE_VERBOSE_DEBUG:BOOL=OFF ++ ++# When cross compiling, forces running a test program that verifies that Kqueue ++# works with pipes. Note that this requires you to manually run the test program ++# on the the cross compilation target to verify that it works. See CMake ++# documentation for try_run for more details ++EVENT__FORCE_KQUEUE_CHECK:BOOL=OFF ++``` ++ ++__More variables can be found by running `cmake -LAH `__ ++ ++ ++## CMake (Windows) ++ ++Install CMake: ++ ++ ++ $ md build && cd build ++ $ cmake -G "Visual Studio 10" .. # Or whatever generator you want to use cmake --help for a list. ++ $ start libevent.sln ++ ++## CMake (Unix) ++ ++ $ mkdir build && cd build ++ $ cmake .. # Default to Unix Makefiles. ++ $ make ++ $ make verify # (optional) ++ ++ ++# 1. BUILDING AND INSTALLATION (In Depth) ++ ++## Autoconf ++ ++To build Libevent, type ++ ++ $ ./configure && make ++ ++ ++ (If you got Libevent from the git repository, you will ++ first need to run the included "autogen.sh" script in order to ++ generate the configure script.) ++ ++You can run the regression tests by running ++ ++ $ make verify ++ ++Install as root via ++ ++ $ make install ++ ++Before reporting any problems, please run the regression tests. ++ ++To enable low-level tracing, build the library as: ++ ++ $ CFLAGS=-DUSE_DEBUG ./configure [...] ++ ++Standard configure flags should work. In particular, see: ++ ++ --disable-shared Only build static libraries. ++ --prefix Install all files relative to this directory. ++ ++ ++The configure script also supports the following flags: ++ ++ --enable-gcc-warnings Enable extra compiler checking with GCC. ++ --disable-malloc-replacement ++ Don't let applications replace our memory ++ management functions. ++ --disable-openssl Disable support for OpenSSL encryption. ++ --disable-thread-support Don't support multithreaded environments. ++ ++## CMake (Windows) ++ ++(Note that autoconf is currently the most mature and supported build ++environment for Libevent; the CMake instructions here are new and ++experimental, though they _should_ be solid. We hope that CMake will ++still be supported in future versions of Libevent, and will try to ++make sure that happens.) ++ ++First of all install . ++ ++To build Libevent using Microsoft Visual studio open the "Visual Studio Command prompt" and type: ++ ++``` ++$ cd ++$ mkdir build && cd build ++$ cmake -G "Visual Studio 10" .. # Or whatever generator you want to use cmake --help for a list. ++$ start libevent.sln ++``` ++ ++In the above, the ".." refers to the dir containing the Libevent source code. ++You can build multiple versions (with different compile time settings) from the same source tree ++by creating other build directories. ++ ++It is highly recommended to build "out of source" when using ++CMake instead of "in source" like the normal behaviour of autoconf for this reason. ++ ++The "NMake Makefiles" CMake generator can be used to build entirely via the command line. ++ ++To get a list of settings available for the project you can type: ++ ++``` ++$ cmake -LH .. ++``` ++ ++### GUI ++ ++CMake also provides a GUI that lets you specify the source directory and output (binary) directory ++that the build should be placed in. ++ ++# 2. USEFUL LINKS: ++ ++For the latest released version of Libevent, see the official website at ++ . ++ ++There's a pretty good work-in-progress manual up at ++ . ++ ++For the latest development versions of Libevent, access our Git repository ++via ++ ++``` ++$ git clone https://github.com/libevent/libevent.git ++``` ++ ++You can browse the git repository online at: ++ ++ ++ ++To report bugs, issues, or ask for new features: ++ ++__Patches__: https://github.com/libevent/libevent/pulls ++> OK, those are not really _patches_. You fork, modify, and hit the "Create Pull Request" button. ++> You can still submit normal git patches via the mailing list. ++ ++__Bugs, Features [RFC], and Issues__: https://github.com/libevent/libevent/issues ++> Or you can do it via the mailing list. ++ ++There's also a libevent-users mailing list for talking about Libevent ++use and development: ++ ++ ++ ++# 3. ACKNOWLEDGMENTS ++ ++The following people have helped with suggestions, ideas, code or ++fixing bugs: ++ ++ * Samy Al Bahra ++ * Antony Antony ++ * Jacob Appelbaum ++ * Arno Bakker ++ * Weston Andros Adamson ++ * William Ahern ++ * Ivan Andropov ++ * Sergey Avseyev ++ * Avi Bab ++ * Joachim Bauch ++ * Andrey Belobrov ++ * Gilad Benjamini ++ * Stas Bekman ++ * Denis Bilenko ++ * Julien Blache ++ * Kevin Bowling ++ * Tomash Brechko ++ * Kelly Brock ++ * Ralph Castain ++ * Adrian Chadd ++ * Lawnstein Chan ++ * Shuo Chen ++ * Ka-Hing Cheung ++ * Andrew Cox ++ * Paul Croome ++ * George Danchev ++ * Andrew Danforth ++ * Ed Day ++ * Christopher Davis ++ * Mike Davis ++ * Frank Denis ++ * Antony Dovgal ++ * Mihai Draghicioiu ++ * Alexander Drozdov ++ * Mark Ellzey ++ * Shie Erlich ++ * Leonid Evdokimov ++ * Juan Pablo Fernandez ++ * Christophe Fillot ++ * Mike Frysinger ++ * Remi Gacogne ++ * Artem Germanov ++ * Alexander von Gernler ++ * Diego Giagio ++ * Artur Grabowski ++ * Diwaker Gupta ++ * Kuldeep Gupta ++ * Sebastian Hahn ++ * Dave Hart ++ * Greg Hazel ++ * Nicholas Heath ++ * Michael Herf ++ * Savg He ++ * Mark Heily ++ * Maxime Henrion ++ * Michael Herf ++ * Greg Hewgill ++ * Andrew Hochhaus ++ * Aaron Hopkins ++ * Tani Hosokawa ++ * Jamie Iles ++ * Xiuqiang Jiang ++ * Claudio Jeker ++ * Evan Jones ++ * Marcin Juszkiewicz ++ * George Kadianakis ++ * Makoto Kato ++ * Phua Keat ++ * Azat Khuzhin ++ * Alexander Klauer ++ * Kevin Ko ++ * Brian Koehmstedt ++ * Marko Kreen ++ * OndÅ™ej Kuzník ++ * Valery Kyholodov ++ * Ross Lagerwall ++ * Scott Lamb ++ * Christopher Layne ++ * Adam Langley ++ * Graham Leggett ++ * Volker Lendecke ++ * Philip Lewis ++ * Zhou Li ++ * David Libenzi ++ * Yan Lin ++ * Moshe Litvin ++ * Simon Liu ++ * Mitchell Livingston ++ * Hagne Mahre ++ * Lubomir Marinov ++ * Abilio Marques ++ * Nicolas Martyanoff ++ * Abel Mathew ++ * Nick Mathewson ++ * James Mansion ++ * Nicholas Marriott ++ * Andrey Matveev ++ * Caitlin Mercer ++ * Dagobert Michelsen ++ * Andrea Montefusco ++ * Mansour Moufid ++ * Mina Naguib ++ * Felix Nawothnig ++ * Trond Norbye ++ * Linus Nordberg ++ * Richard Nyberg ++ * Jon Oberheide ++ * John Ohl ++ * Phil Oleson ++ * Alexey Ozeritsky ++ * Dave Pacheco ++ * Derrick Pallas ++ * Tassilo von Parseval ++ * Catalin Patulea ++ * Patrick Pelletier ++ * Simon Perreault ++ * Dan Petro ++ * Pierre Phaneuf ++ * Amarin Phaosawasdi ++ * Ryan Phillips ++ * Dimitre Piskyulev ++ * Pavel Plesov ++ * Jon Poland ++ * Roman Puls ++ * Nate R ++ * Robert Ransom ++ * Balint Reczey ++ * Bert JW Regeer ++ * Nate Rosenblum ++ * Peter Rosin ++ * Maseeb Abdul Qadir ++ * Wang Qin ++ * Alex S ++ * Gyepi Sam ++ * Hanna Schroeter ++ * Ralf Schmitt ++ * Mike Smellie ++ * Steve Snyder ++ * Nir Soffer ++ * Dug Song ++ * Dongsheng Song ++ * Hannes Sowa ++ * Joakim Soderberg ++ * Joseph Spadavecchia ++ * Kevin Springborn ++ * Harlan Stenn ++ * Andrew Sweeney ++ * Ferenc Szalai ++ * Brodie Thiesfield ++ * Jason Toffaletti ++ * Brian Utterback ++ * Gisle Vanem ++ * Bas Verhoeven ++ * Constantine Verutin ++ * Colin Watt ++ * Zack Weinberg ++ * Jardel Weyrich ++ * Jay R. Wren ++ * Zack Weinberg ++ * Mobai Zhang ++ * Alejo ++ * Alex ++ * Taral ++ * propanbutan ++ * masksqwe ++ * mmadia ++ * yangacer ++ * Andrey Skriabin ++ * basavesh.as ++ * billsegall ++ * Bill Vaughan ++ * Christopher Wiley ++ * David Paschich ++ * Ed Schouten ++ * Eduardo Panisset ++ * Jan Heylen ++ * jer-gentoo ++ * Joakim Söderberg ++ * kirillDanshin ++ * lzmths ++ * Marcus Sundberg ++ * Mark Mentovai ++ * Mattes D ++ * Matyas Dolak ++ * Neeraj Badlani ++ * Nick Mathewson ++ * Rainer Keller ++ * Seungmo Koo ++ * Thomas Bernard ++ * Xiao Bao Clark ++ * zeliard ++ * Zonr Chang ++ * Kurt Roeckx ++ * Seven ++ * Simone Basso ++ * Vlad Shcherban ++ * Tim Hentenaar ++ * Breaker ++ * johnsonlee ++ * Philip Prindeville ++ * Vis Virial ++ * Andreas Gustafsson ++ * Andrey Okoshkin ++ * an-tao ++ * baixiangcpp ++ * Bernard Spil ++ * Bogdan Harjoc ++ * Carlo Marcelo Arenas Belón ++ * David Benjamin ++ * David Disseldorp ++ * Dmitry Alimov ++ * Dominic Chen ++ * dpayne ++ * ejurgensen ++ * Fredrik Strupe ++ * Gonçalo Ribeiro ++ * James Synge ++ * Jan Beich ++ * Jesse Fang ++ * Jiri Luznicky ++ * José Luis Millán ++ * Kiyoshi Aman ++ * Leo Zhang ++ * lightningkay ++ * Luke Dashjr ++ * Marcin Szewczyk ++ * Maximilian Brunner ++ * Maya Rashish ++ * Murat Demirten ++ * Nathan French ++ * Nikolay Edigaryev ++ * Philip Herron ++ * Redfoxmoon ++ * stenn ++ * SuckShit ++ * The Gitter Badger ++ * tim-le ++ * Vincent JARDIN ++ * Xiang Zhang ++ * Xiaozhou Liu ++ * yongqing.jiao ++ * Enji Cooper ++ * linxiaohui ++ * Seong-Joong Kim ++ * Tobias Stoeckmann ++ * Yury Korzhetsky ++ * zhuizhuhaomeng ++ * Pierce Lopez ++ * yuangongji ++ * Keith Smiley ++ * jeremyerb ++ * Fabrice Fontaine ++ * wenyg ++ * Aleksandr-Melnikov ++ * ayuseleznev ++ * chenguolong ++ * Dimo Markov ++ * dota17 ++ * fanquake ++ * Jan Kasiak ++ * Kamil Rytarowski ++ * Mario Emmenlauer ++ * Michael Davidsaver ++ * mohuang ++ * Nick Grifka ++ * Nicolas J. Bouliane ++ * Paul Osborne ++ * Philip Homburg ++ * Wataru Ashihara ++ * William A Rowe Jr ++ * yangyongsheng ++ ++ ++If we have forgotten your name, please contact us. diff --cc contrib/libevent/WIN32-Code/getopt.c index 000000000000,0fcba5d91529..0fcba5d91529 mode 000000,100644..100644 --- a/contrib/libevent/WIN32-Code/getopt.c +++ b/contrib/libevent/WIN32-Code/getopt.c diff --cc contrib/libevent/WIN32-Code/getopt.h index 000000000000,796f4550509d..796f4550509d mode 000000,100644..100644 --- a/contrib/libevent/WIN32-Code/getopt.h +++ b/contrib/libevent/WIN32-Code/getopt.h diff --cc contrib/libevent/WIN32-Code/getopt_long.c index 000000000000,092defbc4bed..092defbc4bed mode 000000,100644..100644 --- a/contrib/libevent/WIN32-Code/getopt_long.c +++ b/contrib/libevent/WIN32-Code/getopt_long.c diff --cc contrib/libevent/build-aux/config.sub index 000000000000,f02d43ad500c..f02d43ad500c mode 000000,100755..100755 --- a/contrib/libevent/build-aux/config.sub +++ b/contrib/libevent/build-aux/config.sub diff --cc contrib/libevent/build-aux/ltmain.sh index 0f0a2da3f9dd,48cea9b0e5bd..48cea9b0e5bd mode 100755,100644..100644 --- a/contrib/libevent/build-aux/ltmain.sh +++ b/contrib/libevent/build-aux/ltmain.sh diff --cc contrib/libevent/cmake/AddCompilerFlags.cmake index 000000000000,9dc21d03adc5..9dc21d03adc5 mode 000000,100644..100644 --- a/contrib/libevent/cmake/AddCompilerFlags.cmake +++ b/contrib/libevent/cmake/AddCompilerFlags.cmake diff --cc contrib/libevent/cmake/AddEventLibrary.cmake index 000000000000,04f5837e9860..04f5837e9860 mode 000000,100644..100644 --- a/contrib/libevent/cmake/AddEventLibrary.cmake +++ b/contrib/libevent/cmake/AddEventLibrary.cmake diff --cc contrib/libevent/cmake/COPYING-CMAKE-SCRIPTS index 000000000000,ab3c4d25d164..ab3c4d25d164 mode 000000,100644..100644 --- a/contrib/libevent/cmake/COPYING-CMAKE-SCRIPTS +++ b/contrib/libevent/cmake/COPYING-CMAKE-SCRIPTS diff --cc contrib/libevent/cmake/CheckConstExists.cmake index 000000000000,de074581df4c..de074581df4c mode 000000,100644..100644 --- a/contrib/libevent/cmake/CheckConstExists.cmake +++ b/contrib/libevent/cmake/CheckConstExists.cmake diff --cc contrib/libevent/cmake/CheckFileOffsetBits.c index 000000000000,d948fecf2b4e..d948fecf2b4e mode 000000,100644..100644 --- a/contrib/libevent/cmake/CheckFileOffsetBits.c +++ b/contrib/libevent/cmake/CheckFileOffsetBits.c diff --cc contrib/libevent/cmake/CheckFileOffsetBits.cmake index 000000000000,12534401605c..12534401605c mode 000000,100644..100644 --- a/contrib/libevent/cmake/CheckFileOffsetBits.cmake +++ b/contrib/libevent/cmake/CheckFileOffsetBits.cmake diff --cc contrib/libevent/cmake/CheckFunctionKeywords.cmake index 000000000000,3d968b8a6b1a..3d968b8a6b1a mode 000000,100644..100644 --- a/contrib/libevent/cmake/CheckFunctionKeywords.cmake +++ b/contrib/libevent/cmake/CheckFunctionKeywords.cmake diff --cc contrib/libevent/cmake/CheckPrototypeDefinition.c.in index 000000000000,a97344ac3e10..a97344ac3e10 mode 000000,100644..100644 --- a/contrib/libevent/cmake/CheckPrototypeDefinition.c.in +++ b/contrib/libevent/cmake/CheckPrototypeDefinition.c.in diff --cc contrib/libevent/cmake/CheckPrototypeDefinition.cmake index 000000000000,940d1ff0ce38..940d1ff0ce38 mode 000000,100644..100644 --- a/contrib/libevent/cmake/CheckPrototypeDefinition.cmake +++ b/contrib/libevent/cmake/CheckPrototypeDefinition.cmake diff --cc contrib/libevent/cmake/CheckWorkingKqueue.cmake index 000000000000,f22f011b5875..f22f011b5875 mode 000000,100644..100644 --- a/contrib/libevent/cmake/CheckWorkingKqueue.cmake +++ b/contrib/libevent/cmake/CheckWorkingKqueue.cmake diff --cc contrib/libevent/cmake/CodeCoverage.cmake index 000000000000,eba85b3fb77e..eba85b3fb77e mode 000000,100644..100644 --- a/contrib/libevent/cmake/CodeCoverage.cmake +++ b/contrib/libevent/cmake/CodeCoverage.cmake diff --cc contrib/libevent/cmake/Copyright.txt index 000000000000,813124f02eef..813124f02eef mode 000000,100644..100644 --- a/contrib/libevent/cmake/Copyright.txt +++ b/contrib/libevent/cmake/Copyright.txt diff --cc contrib/libevent/cmake/LibeventConfig.cmake.in index 000000000000,7b808c324543..7b808c324543 mode 000000,100644..100644 --- a/contrib/libevent/cmake/LibeventConfig.cmake.in +++ b/contrib/libevent/cmake/LibeventConfig.cmake.in diff --cc contrib/libevent/cmake/LibeventConfigVersion.cmake.in index 000000000000,56371a8fee77..56371a8fee77 mode 000000,100644..100644 --- a/contrib/libevent/cmake/LibeventConfigVersion.cmake.in +++ b/contrib/libevent/cmake/LibeventConfigVersion.cmake.in diff --cc contrib/libevent/cmake/Macros.cmake index 000000000000,e480bbfdca8a..e480bbfdca8a mode 000000,100644..100644 --- a/contrib/libevent/cmake/Macros.cmake +++ b/contrib/libevent/cmake/Macros.cmake diff --cc contrib/libevent/cmake/Uninstall.cmake.in index 000000000000,c6dc09efe109..c6dc09efe109 mode 000000,100644..100644 --- a/contrib/libevent/cmake/Uninstall.cmake.in +++ b/contrib/libevent/cmake/Uninstall.cmake.in diff --cc contrib/libevent/cmake/UseDoxygen.cmake index 000000000000,3b60d5a0f58b..3b60d5a0f58b mode 000000,100644..100644 --- a/contrib/libevent/cmake/UseDoxygen.cmake +++ b/contrib/libevent/cmake/UseDoxygen.cmake diff --cc contrib/libevent/cmake/VersionViaGit.cmake index 000000000000,24eb6af9b7de..24eb6af9b7de mode 000000,100644..100644 --- a/contrib/libevent/cmake/VersionViaGit.cmake +++ b/contrib/libevent/cmake/VersionViaGit.cmake diff --cc contrib/libevent/doxygen.am index 000000000000,916d7c4079b2..916d7c4079b2 mode 000000,100644..100644 --- a/contrib/libevent/doxygen.am +++ b/contrib/libevent/doxygen.am diff --cc contrib/libevent/evconfig-private.h.cmake index 000000000000,1adf9c03d1b4..1adf9c03d1b4 mode 000000,100644..100644 --- a/contrib/libevent/evconfig-private.h.cmake +++ b/contrib/libevent/evconfig-private.h.cmake diff --cc contrib/libevent/event-config.h.cmake index 000000000000,fccf0cf05970..fccf0cf05970 mode 000000,100644..100644 --- a/contrib/libevent/event-config.h.cmake +++ b/contrib/libevent/event-config.h.cmake diff --cc contrib/libevent/evutil_rand.c index 24efa69288da,8e9afdaa6753..f56fd9d30d25 --- a/contrib/libevent/evutil_rand.c +++ b/contrib/libevent/evutil_rand.c @@@ -195,7 -194,10 +194,8 @@@ evutil_secure_rng_get_bytes(void *buf, void evutil_secure_rng_add_bytes(const char *buf, size_t n) { - arc4random_addrandom((unsigned char*)buf, - n>(size_t)INT_MAX ? INT_MAX : (int)n); } + #endif void evutil_free_secure_rng_globals_(void) diff --cc contrib/libevent/m4/ax_check_funcs_ex.m4 index 000000000000,7aaa58b054d5..7aaa58b054d5 mode 000000,100644..100644 --- a/contrib/libevent/m4/ax_check_funcs_ex.m4 +++ b/contrib/libevent/m4/ax_check_funcs_ex.m4 diff --cc contrib/libevent/m4/ax_prog_doxygen.m4 index 000000000000,e5bdeb5992dc..e5bdeb5992dc mode 000000,100644..100644 --- a/contrib/libevent/m4/ax_prog_doxygen.m4 +++ b/contrib/libevent/m4/ax_prog_doxygen.m4 diff --cc contrib/libevent/test/print-winsock-errors.c index 000000000000,64d6b0e70e4d..64d6b0e70e4d mode 000000,100644..100644 --- a/contrib/libevent/test/print-winsock-errors.c +++ b/contrib/libevent/test/print-winsock-errors.c From nobody Wed Nov 15 01:16:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVQHC32Kcz51LxS; Wed, 15 Nov 2023 01:16:39 +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 4SVQHC0TZdz4Mwc; Wed, 15 Nov 2023 01:16:38 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id 2tgmr4ufnB0n034WDrfCUm; Wed, 15 Nov 2023 01:16:37 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id 34WBrpO5zDqGY34WCrfuGt; Wed, 15 Nov 2023 01:16:37 +0000 X-Authority-Analysis: v=2.4 cv=Cousz10D c=1 sm=1 tr=0 ts=65541bf5 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=8nJEP1OIZ-IA:10 a=BNY50KLci1gA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=sOO-6q71OLLGGMM_we8A:9 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id E045B104C; Tue, 14 Nov 2023 17:16:34 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id D93F144A; Tue, 14 Nov 2023 17:16:34 -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: Cy Schubert cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: b50261e21f39 - main - libevent: Import libevent 2.1.12 In-reply-to: <202311150115.3AF1F4IQ075790@gitrepo.freebsd.org> References: <202311150115.3AF1F4IQ075790@gitrepo.freebsd.org> Comments: In-reply-to Cy Schubert message dated "Wed, 15 Nov 2023 01:15:04 +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=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Tue, 14 Nov 2023 17:16:34 -0800 Message-Id: <20231115011634.D93F144A@slippy.cwsent.com> X-CMAE-Envelope: MS4xfPXy7dqtD4/TrrDV0WAad2sbbQyhDaXtHSSONZqq1dhTKgu066xsbO4tH1rozOkf3SjP7pCQTGAffhl4Uq3RWSlQNoj3pvXuykPGx0SPjz0CMXwECiiW ZdozhGoFWV9riP47qdIFIHs6mjRD3z+0moq2DhDvxVvxah8WvVRyQInwozk5Mxhn3aq869E6lTEFYo1bmIUaoWf5XDjAs7mE/79k/RT0w3dxxdfdOY/6dX/H Q7UEP+qU8nEYUsy8julVYqWywEJiEnXez7H/mRq+g1E9lPSQXH2JlVJyRkPO59sgqF5dLACBvZgBv/yTFeebLZSxy8KUzZSDXDNKVU5pO0w= X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4SVQHC0TZdz4Mwc In message <202311150115.3AF1F4IQ075790@gitrepo.freebsd.org>, Cy Schubert write s: > The branch main has been updated by cy: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b50261e21f39a6c7249a49e7b60aa878 > c98512a8 > > commit b50261e21f39a6c7249a49e7b60aa878c98512a8 > Merge: fa08011a521c 5223d1d95fdd > Author: Cy Schubert > AuthorDate: 2023-11-14 23:04:28 +0000 > Commit: Cy Schubert > CommitDate: 2023-11-15 01:13:02 +0000 > > libevent: Import libevent 2.1.12 > > MFC after: 2 weeks PR: 275093 > > Merge commit '5223d1d95fddcef6f9a36e264a5800bd907ade8b' into main > > contrib/libevent/CMakeLists.txt | 1575 +++++++++ > contrib/libevent/ChangeLog | 313 ++ > contrib/libevent/ChangeLog-1.4 | 2 +- > contrib/libevent/ChangeLog-2.0 | 2 +- > contrib/libevent/Doxyfile | 46 +- > contrib/libevent/Makefile.am | 67 +- > contrib/libevent/Makefile.in | 1486 ++++++--- > contrib/libevent/README.md | 487 +++ > contrib/libevent/WIN32-Code/getopt.c | 149 + > contrib/libevent/WIN32-Code/getopt.h | 33 + > contrib/libevent/WIN32-Code/getopt_long.c | 234 ++ > .../WIN32-Code/nmake/event2/event-config.h | 26 +- > contrib/libevent/aclocal.m4 | 193 +- > contrib/libevent/arc4random.c | 40 +- > contrib/libevent/buffer.c | 50 +- > contrib/libevent/buffer_iocp.c | 1 + > contrib/libevent/bufferevent-internal.h | 36 + > contrib/libevent/bufferevent.c | 115 +- > contrib/libevent/bufferevent_async.c | 66 +- > contrib/libevent/bufferevent_filter.c | 10 +- > contrib/libevent/bufferevent_openssl.c | 75 +- > contrib/libevent/bufferevent_pair.c | 4 +- > contrib/libevent/bufferevent_ratelim.c | 9 +- > contrib/libevent/bufferevent_sock.c | 74 +- > contrib/libevent/{ => build-aux}/compile | 17 +- > contrib/libevent/{ => build-aux}/config.guess | 970 +++--- > contrib/libevent/build-aux/config.sub | 1793 +++++++++++ > contrib/libevent/{ => build-aux}/depcomp | 10 +- > contrib/libevent/{ => build-aux}/install-sh | 60 +- > contrib/libevent/{ => build-aux}/ltmain.sh | 766 +++-- > contrib/libevent/{ => build-aux}/missing | 16 +- > contrib/libevent/{ => build-aux}/test-driver | 10 +- > contrib/libevent/cmake/AddCompilerFlags.cmake | 13 + > contrib/libevent/cmake/AddEventLibrary.cmake | 193 ++ > contrib/libevent/cmake/COPYING-CMAKE-SCRIPTS | 22 + > contrib/libevent/cmake/CheckConstExists.cmake | 25 + > contrib/libevent/cmake/CheckFileOffsetBits.c | 14 + > contrib/libevent/cmake/CheckFileOffsetBits.cmake | 43 + > contrib/libevent/cmake/CheckFunctionKeywords.cmake | 14 + > .../libevent/cmake/CheckPrototypeDefinition.c.in | 29 + > .../libevent/cmake/CheckPrototypeDefinition.cmake | 82 + > contrib/libevent/cmake/CheckWorkingKqueue.cmake | 52 + > contrib/libevent/cmake/CodeCoverage.cmake | 165 + > contrib/libevent/cmake/Copyright.txt | 57 + > contrib/libevent/cmake/LibeventConfig.cmake.in | 183 ++ > .../libevent/cmake/LibeventConfigVersion.cmake.in | 11 + > contrib/libevent/cmake/Macros.cmake | 36 + > contrib/libevent/cmake/Uninstall.cmake.in | 23 + > contrib/libevent/cmake/UseDoxygen.cmake | 111 + > contrib/libevent/cmake/VersionViaGit.cmake | 66 + > contrib/libevent/config.h.in | 63 +- > contrib/libevent/config.sub | 1807 ----------- > contrib/libevent/configure | 3390 +++++++++++++++++- > -- > contrib/libevent/configure.ac | 328 +- > contrib/libevent/defer-internal.h | 3 + > contrib/libevent/doxygen.am | 55 + > contrib/libevent/epoll.c | 15 +- > contrib/libevent/epolltable-internal.h | 2 +- > contrib/libevent/evbuffer-internal.h | 2 +- > contrib/libevent/evconfig-private.h.cmake | 40 + > contrib/libevent/evconfig-private.h.in | 7 + > contrib/libevent/evdns.c | 144 +- > contrib/libevent/event-config.h.cmake | 513 +++ > contrib/libevent/event-internal.h | 13 +- > contrib/libevent/event.c | 392 ++- > contrib/libevent/event_iocp.c | 2 +- > contrib/libevent/event_rpcgen.py | 2057 ++++++------ > contrib/libevent/event_tagging.c | 4 + > contrib/libevent/evmap.c | 43 +- > contrib/libevent/evrpc.c | 6 +- > contrib/libevent/evthread-internal.h | 16 +- > contrib/libevent/evthread.c | 2 +- > contrib/libevent/evutil.c | 144 +- > contrib/libevent/evutil_rand.c | 6 +- > contrib/libevent/evutil_time.c | 65 +- > contrib/libevent/http-internal.h | 9 +- > contrib/libevent/http.c | 254 +- > contrib/libevent/include/event2/buffer.h | 3 +- > contrib/libevent/include/event2/buffer_compat.h | 3 +- > contrib/libevent/include/event2/bufferevent.h | 11 +- > .../libevent/include/event2/bufferevent_compat.h | 4 + > contrib/libevent/include/event2/dns.h | 46 +- > contrib/libevent/include/event2/dns_compat.h | 24 +- > contrib/libevent/include/event2/event.h | 77 +- > contrib/libevent/include/event2/http.h | 13 +- > contrib/libevent/include/event2/http_compat.h | 6 +- > contrib/libevent/include/event2/listener.h | 12 + > contrib/libevent/include/event2/rpc.h | 48 +- > contrib/libevent/include/event2/rpc_struct.h | 14 + > contrib/libevent/include/event2/util.h | 34 +- > contrib/libevent/include/event2/visibility.h | 31 +- > contrib/libevent/include/include.am | 7 +- > contrib/libevent/iocp-internal.h | 14 + > contrib/libevent/kqueue.c | 17 +- > contrib/libevent/listener.c | 29 +- > contrib/libevent/log-internal.h | 25 +- > contrib/libevent/log.c | 11 +- > contrib/libevent/m4/ax_check_funcs_ex.m4 | 22 + > contrib/libevent/m4/ax_prog_doxygen.m4 | 600 ++++ > contrib/libevent/m4/libevent_openssl.m4 | 9 + > contrib/libevent/m4/libtool.m4 | 102 +- > contrib/libevent/m4/ltoptions.m4 | 2 +- > contrib/libevent/m4/ltsugar.m4 | 2 +- > contrib/libevent/m4/ltversion.m4 | 12 +- > contrib/libevent/m4/lt~obsolete.m4 > contrib/libevent/make-event-config.sed | 10 +- > contrib/libevent/minheap-internal.h | 6 +- > contrib/libevent/mm-internal.h | 5 + > contrib/libevent/openssl-compat.h | 16 +- > contrib/libevent/poll.c | 25 +- > contrib/libevent/sample/dns-example.c | 17 +- > contrib/libevent/sample/event-read-fifo.c | 4 +- > contrib/libevent/sample/hello-world.c | 3 +- > contrib/libevent/sample/http-connect.c | 86 +- > contrib/libevent/sample/http-server.c | 292 +- > contrib/libevent/sample/https-client.c | 88 +- > contrib/libevent/sample/include.am | 11 +- > contrib/libevent/sample/le-proxy.c | 16 +- > .../libevent/sample/openssl_hostname_validation.c | 3 +- > contrib/libevent/sample/signal-test.c | 25 +- > contrib/libevent/sample/time-test.c | 7 +- > contrib/libevent/select.c | 2 +- > contrib/libevent/signal.c | 2 + > contrib/libevent/strlcpy-internal.h | 2 + > contrib/libevent/test/bench.c | 60 +- > contrib/libevent/test/bench_cascade.c | 8 +- > contrib/libevent/test/bench_http.c | 3 + > contrib/libevent/test/bench_httpclient.c | 4 +- > contrib/libevent/test/check-dumpevents.py | 10 +- > contrib/libevent/test/include.am | 43 +- > contrib/libevent/test/print-winsock-errors.c | 86 + > contrib/libevent/test/regress.c | 332 +- > contrib/libevent/test/regress.gen.c | 105 +- > contrib/libevent/test/regress.gen.h | 11 +- > contrib/libevent/test/regress.h | 7 +- > contrib/libevent/test/regress_buffer.c | 369 ++- > contrib/libevent/test/regress_bufferevent.c | 156 +- > contrib/libevent/test/regress_dns.c | 522 ++- > contrib/libevent/test/regress_et.c | 146 +- > contrib/libevent/test/regress_finalize.c | 48 + > contrib/libevent/test/regress_http.c | 479 ++- > contrib/libevent/test/regress_listener.c | 100 +- > contrib/libevent/test/regress_main.c | 68 +- > contrib/libevent/test/regress_rpc.c | 49 +- > contrib/libevent/test/regress_ssl.c | 404 ++- > contrib/libevent/test/regress_testutils.c | 2 +- > contrib/libevent/test/regress_thread.c | 8 +- > contrib/libevent/test/regress_thread.h | 34 +- > contrib/libevent/test/regress_util.c | 196 +- > contrib/libevent/test/rpcgen_wrapper.sh | 11 +- > contrib/libevent/test/test-changelist.c | 4 +- > contrib/libevent/test/test-closed.c | 1 + > contrib/libevent/test/test-eof.c | 4 +- > contrib/libevent/test/test-fdleak.c | 15 +- > contrib/libevent/test/test-init.c | 2 +- > contrib/libevent/test/test-ratelim.c | 87 +- > contrib/libevent/test/test-time.c | 25 +- > contrib/libevent/test/test-weof.c | 4 +- > contrib/libevent/test/test.sh | 4 +- > contrib/libevent/test/tinytest.c | 169 +- > contrib/libevent/test/tinytest.h | 5 +- > contrib/libevent/test/tinytest_macros.h | 12 +- > contrib/libevent/time-internal.h | 3 + > contrib/libevent/util-internal.h | 72 +- > contrib/libevent/win32select.c | 3 +- > 165 files changed, 18349 insertions(+), 6378 deletions(-) -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Wed Nov 15 02:37:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVS4j1SYJz50XBg; Wed, 15 Nov 2023 02:37: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 4SVS4j10fcz4XMZ; Wed, 15 Nov 2023 02:37:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3yq4M6MEg55EKq8iFY3KUXDNDSHn86neXQYfK5j7w4s=; b=Qdv+srwgRtFEgzDyKrwehwJ8zAM6ckN7jbhSAaJNEole3T6iaV89WKYf/gIo8RHWk70iY8 Yk0hxcw3Yb/cy8UsKT290Mcn/ToLk3mCqGD3VEVkQqiCJtt219Eb03UiycaH+Czq1IjrBb Kp0wCx3p+MNYwtXG7PUhvpTNC3X95u+ZGGTbu7KRwmeoptT1E09yh+CDLmxBQ1PjtwQHdI HrSF8t+upGBmfzAqOrMahJ0cXyPNqo/Hvd2kxMoBJPM9Djr4ReLxzWdP2gAnY6S0ntL8gu Gb20fX6nEUTte6VgB5ep9zucwg89T2cChJVo1pLsmf9zXv4lrXfgUsZ7BrXtNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3yq4M6MEg55EKq8iFY3KUXDNDSHn86neXQYfK5j7w4s=; b=bednik3csFZqg3TMAYZda2dYAXKDngVy/s1bVntOPwMBHSeWFNZGrYHIYlq/bSyaJpbaHf LEpOoatgImYAXICoHE1cewfLpWtLKCQAfuyBtFMsRSG5IQ4pR6m1ao2cnDGgeLACmvjqdi erVd9ABR7Hygn0KcohRn3N7KC0EZNas2T7HqAGwyOWu3FUxQwe4rMkfnp2YYWYlQYw6rF5 7OTze9T5i+4GrP7JhFRHGtBvKmj01EmPGH93YCqymqrawOF6DL52v6YrL7m31Q4U8bWC1Y dwUnYb8KYj4dZdcGiDbVeCEyt9LcTO961wRapSxdmUq3FC1kBfwXBFdkTXHg0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700015861; a=rsa-sha256; cv=none; b=KRk3/sA6WPwT9Q5IQSJORuEmwekubpk/5R7ZNjIxjm/oopowzwPU7d0Hg7877VuVQSdn4C F1lXoFLUCSqCIRWohWtAhU6xnYVxPQDBEjL115RbAJHmCh29n0aVGeuqXcsiNek3SPjLW+ B4ME9uRORmrdPtOHNUIGSVPbdg9zDmUwxLjFAXd0SoKGPm7vyU4pzOIR/p+BlsmfHboD1D Uk2wHNhaFidMllOb6BZkR7l1rLf+bXMa9Sst7DSmaYWVak+2lxJ+5ytn13BpmCaLr1fW4T 1VoBb5kgO+DPbU5Xzrbly7v6tV2KJLt+Cs3uraK73wtohFKTb38nMS7p7S8uMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVS4h759qz1DWd; Wed, 15 Nov 2023 02:37: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 3AF2be3c009579; Wed, 15 Nov 2023 02:37:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AF2beAt009576; Wed, 15 Nov 2023 02:37:40 GMT (envelope-from git) Date: Wed, 15 Nov 2023 02:37:40 GMT Message-Id: <202311150237.3AF2beAt009576@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: b7f7cc25c01a - main - libcasper: Neuter false positive -Wuse-after-free warnings from GCC 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7f7cc25c01aeacaafb86ebcffdeb258b7933b08 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b7f7cc25c01aeacaafb86ebcffdeb258b7933b08 commit b7f7cc25c01aeacaafb86ebcffdeb258b7933b08 Author: John Baldwin AuthorDate: 2023-11-15 02:34:01 +0000 Commit: John Baldwin CommitDate: 2023-11-15 02:34:01 +0000 libcasper: Neuter false positive -Wuse-after-free warnings from GCC 13 GCC 13 incorrectly thinks a call to free after a failed realloc is a use after free. lib/libcasper/services/cap_grp/cap_grp.c: In function 'group_resize': lib/libcasper/services/cap_grp/cap_grp.c:65:17: error: pointer 'buf' may be used after 'realloc' [-Werror=use-after-free] 65 | free(buf); | ^~~~~~~~~ lib/libcasper/services/cap_grp/cap_grp.c:63:19: note: call to 'realloc' here 63 | gbuffer = realloc(buf, gbufsize); | ^~~~~~~~~~~~~~~~~~~~~~ Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42576 --- lib/libcasper/services/cap_grp/Makefile | 3 +++ lib/libcasper/services/cap_netdb/Makefile | 3 +++ lib/libcasper/services/cap_pwd/Makefile | 3 +++ 3 files changed, 9 insertions(+) diff --git a/lib/libcasper/services/cap_grp/Makefile b/lib/libcasper/services/cap_grp/Makefile index b46f3bfdaa47..0f722e3979f9 100644 --- a/lib/libcasper/services/cap_grp/Makefile +++ b/lib/libcasper/services/cap_grp/Makefile @@ -40,3 +40,6 @@ MLINKS+=cap_grp.3 cap_grp_limit_fields.3 MLINKS+=cap_grp.3 cap_grp_limit_groups.3 .include + +# GCC 13 complains incorrectly about free after failed realloc: GCC bug #110501 +CFLAGS.cap_grp.c+= ${NO_WUSE_AFTER_FREE} diff --git a/lib/libcasper/services/cap_netdb/Makefile b/lib/libcasper/services/cap_netdb/Makefile index 36c57103b414..653aa21c9b32 100644 --- a/lib/libcasper/services/cap_netdb/Makefile +++ b/lib/libcasper/services/cap_netdb/Makefile @@ -29,3 +29,6 @@ MLINKS+=cap_netdb.3 libcap_netdb.3 MLINKS+=cap_netdb.3 cap_getprotobyname.3 .include + +# GCC 13 complains incorrectly about free after failed realloc: GCC bug #110501 +CFLAGS.cap_netdb.c+= ${NO_WUSE_AFTER_FREE} diff --git a/lib/libcasper/services/cap_pwd/Makefile b/lib/libcasper/services/cap_pwd/Makefile index be6b4b21070f..4e0e6db6f86d 100644 --- a/lib/libcasper/services/cap_pwd/Makefile +++ b/lib/libcasper/services/cap_pwd/Makefile @@ -40,3 +40,6 @@ MLINKS+=cap_pwd.3 cap_pwd_limit_fields.3 MLINKS+=cap_pwd.3 cap_pwd_limit_users.3 .include + +# GCC 13 complains incorrectly about free after failed realloc: GCC bug #110501 +CFLAGS.cap_pwd.c+= ${NO_WUSE_AFTER_FREE} From nobody Wed Nov 15 02:37:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVS4k2STbz50XBj; Wed, 15 Nov 2023 02:37: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 4SVS4k1rf3z4XJ1; Wed, 15 Nov 2023 02:37:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wzkLkIQ8yNunWANy3nPNiGMF+HfFXpQbHDQKUoOdiec=; b=s6ZkaWZ61jCqVz0O41fumrd35+EZ0x10isKbAiaNiSTrvoMKXUf4Z75Fs7XAoBaFLL2ioD dIUTGjeFr0eCKag3xlruEJlJsBBI2UtgHZ6upTcx4xrewmSZybp7Gslo7YQIW0p0//7wys g+NcWluaUGJCUzm5zIAfnGpldEoxdOjvl6iTlCURF+et+wbHwlU7IqYsAaOYNurnvSCf7O Z/LLk3nAQtWscWSuIE1wZgowTyarOrAX483FfXFWeAVSx/MIW2T8s7AgwBQD1RhTvIuh4z T/3O91IBbYan2pzWg4t3YKKTYpOd1vXfpv0jd49UPqEXod2JF25UBh6QQiw2Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wzkLkIQ8yNunWANy3nPNiGMF+HfFXpQbHDQKUoOdiec=; b=pFO9UkzdNjBRhdPTK55vSdUQBzzT1rH8Kx4rfBaMmOMLngSQYq0jVw3FGzwSVZ3F+7YzEl 0xLHKv7Kh6RYYn8F/ciFLAXJC5b7g3FuDagqHUO/M8bYSfnbTu7wUkQF8P2FYYez8m0DJp xXmfjVPeIKs5m1JvKrDhJJWvpNnGSvjtPPHsVBP+9pUKyX9/z4GlNO+4C5jIY67b7aQ1ho 9mSLSl1Vi3ekYGYAW5msrXGW7ravCUDHCriBbgCda87DfUDshnNlc/PeGZTq5aYdWiPAmJ QLIeFpfVHuPKN5OqMxEQHQ4VvI96Wsjjw34FWK6MF/DlGHqWM5lPbU8fryYSwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700015862; a=rsa-sha256; cv=none; b=JZzOiOz85zrXnBC4E3Izou4jAllaFc5N1Rdx7EmqiudjrLDfdHuT5OqiibhTyLOI+ApSO6 jTtXGCn0797gJZY0jlE/fil/yG3gcbuytgHyF3+exK/4VQsdWzZXXiEwcad2KEUYE2gBgo orU3sraJLk9GT4/hTtcOjMxUtVWwabFUBRW7JMrq+C4SxEoWQ61SkCj5ZdpM9n8BTVnByS bvc1z3Q6H1zN9cWrZzJVdc1e0VxrsjYDuqZ0skuL/jYvNxYQE4ibIEYoXdOiSsqUl6LwJz iO74K1QSOYD6uOeAYsrLMHUw5vnGSCoufzNptn9nrNXqg+vEE3Y4TcpcEvfW0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVS4k0jPzz1DT5; Wed, 15 Nov 2023 02:37: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 3AF2bgK3009624; Wed, 15 Nov 2023 02:37:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AF2bfup009621; Wed, 15 Nov 2023 02:37:41 GMT (envelope-from git) Date: Wed, 15 Nov 2023 02:37:41 GMT Message-Id: <202311150237.3AF2bfup009621@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: 0355ecace82c - main - libgpio: Fix type mismatch for gpio_pin_[gs]et List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0355ecace82cce8322e5fcdf48f751d253792ce3 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0355ecace82cce8322e5fcdf48f751d253792ce3 commit 0355ecace82cce8322e5fcdf48f751d253792ce3 Author: John Baldwin AuthorDate: 2023-11-15 02:34:21 +0000 Commit: John Baldwin CommitDate: 2023-11-15 02:34:21 +0000 libgpio: Fix type mismatch for gpio_pin_[gs]et Reported by: GCC 13 via -Wenum-int-mismatch Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42577 --- lib/libgpio/libgpio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libgpio/libgpio.h b/lib/libgpio/libgpio.h index b493d63dc9e2..35651ecd8cca 100644 --- a/lib/libgpio/libgpio.h +++ b/lib/libgpio/libgpio.h @@ -81,8 +81,8 @@ int gpio_pin_set_flags(gpio_handle_t, gpio_config_t *); /* * GPIO pin values. */ -int gpio_pin_get(gpio_handle_t, gpio_pin_t); -int gpio_pin_set(gpio_handle_t, gpio_pin_t, int); +gpio_value_t gpio_pin_get(gpio_handle_t, gpio_pin_t); +int gpio_pin_set(gpio_handle_t, gpio_pin_t, gpio_value_t); int gpio_pin_toggle(gpio_handle_t, gpio_pin_t); /* * Helper functions to set pin states. From nobody Wed Nov 15 02:37:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVS4l56MJz50XMk; Wed, 15 Nov 2023 02:37: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 4SVS4l2h6zz4XLB; Wed, 15 Nov 2023 02:37:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uup8CrGcEEYWt+DTFpNujGFRbUADWwdXyTrqgruq3ts=; b=p++BQgWsCSBHmksARLTaLryxXo/JfSh5ciXC6IMdA4Ne7+iyW5gvqV9f5uBIKgZypVAYuR ur7FLTCkj6iYlIAYemTF0vU2D6F+4ayclw9cdARFXcx9LFLzYAGmw0jlaMtI27pCdvSMs1 BCi8uT/JWrBkTWNV10zRvjVu7bfYMU6Xzx++7zyIO/wLqws4V+DwjNg3lRh3wqUBFq15N3 0j3VIdV3cYvONPv5sdv4/4lMuBDkpVhHPgbeuPXBTl8XQH2PRyUpWQeKlxeVUxxNvPYUFM 0a+LdRsJ6lk+UxFIq4o3XEfGL5ArS3foiy5MNr2egmjfFwrVJy0doFHiT5s69Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uup8CrGcEEYWt+DTFpNujGFRbUADWwdXyTrqgruq3ts=; b=LDIwKazb6nQUZ8MAXpRZhO8w82bqqKvFBd+QYV3FxzYzTyN4esUs48OpBo6R1CyULRoI63 kQTjb47P0vu4u2Tg8EZQIPUlMtm08vtOyOfIQvUNAlgq8gRRiFKGqL5HvTPR95kzr2ncwA wKj+CAimco5nvJ2AZXTv+8wADgfegdDUjAFwGPHGDlgXyT8RQyBZe9SsoNRiKSWs0ydk+i obUgzlG0iVAyfRzOI9t/C/jReO+5Qiyh8r0JfbveK3Ekx9lVV+2zNiEqDmuKYzqXdm95kk Dgk8zdvuwr/En5KbT3Hr1upgvfie2RScWYTqkhVdExiK+1tBbciFy7AtLIxIuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700015863; a=rsa-sha256; cv=none; b=jJ+l47PtX78dkY1DuJhypriP8GS3+9XDmMz7ZRuaX3BLq4cDoDC1izxDW/szXp8RRodPql TRvWtrz6gd35K8LJdu4x6NB98NJfGjVlgJvQixTVIUST0rK4hldlxh3U73KhcopNkiZ/zA w6kJmO1Bk5CYjCgTK7PiKL54CxuCV29HfUNqOvTSHRZq2oxMc1oZjzgRl+uhNEHMZVSsjz fo4NyoYCE5XmFqzl1p6l+9RnJp9zWzQxzW+VjdbiVq6j2FfZrGI9jGBmDFBMCoQ76SITaQ PW7itph3wCPh8b8w0QLXJkkaQCFqzBJaT7wBERKGh7mCtd+Gr1LSZWRYBg5X+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 4SVS4l1mKSz1DcG; Wed, 15 Nov 2023 02:37: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 3AF2bhOv009678; Wed, 15 Nov 2023 02:37:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AF2bh5N009675; Wed, 15 Nov 2023 02:37:43 GMT (envelope-from git) Date: Wed, 15 Nov 2023 02:37:43 GMT Message-Id: <202311150237.3AF2bh5N009675@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: ab43851b0c7b - main - Merge commit 3537338d1ab9 from llvm git (by Nikolas Klauser): List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ab43851b0c7bd5f21ade72c3cae3d3ee09eb8891 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ab43851b0c7bd5f21ade72c3cae3d3ee09eb8891 commit ab43851b0c7bd5f21ade72c3cae3d3ee09eb8891 Author: John Baldwin AuthorDate: 2023-11-15 02:34:45 +0000 Commit: John Baldwin CommitDate: 2023-11-15 02:34:45 +0000 Merge commit 3537338d1ab9 from llvm git (by Nikolas Klauser): [libc++][libunwind] Fixes to allow GCC 13 to compile libunwind/libc++abi/libc++ These are changes to allow GCC 13 to successfully compile the runtimes stack. Reviewed By: ldionne, #libc, #libunwind, MaskRay Spies: MaskRay, zibi, SeanP, power-llvm-team, mstorsjo, arichardson, libcxx-commits Differential Revision: https://reviews.llvm.org/D151387 Reviewed by: imp, dim, emaste Differential Revision: https://reviews.freebsd.org/D42578 --- contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h | 2 +- contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h index ea85e23b8065..4c063e134d8e 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__remove_cv) +#if __has_builtin(__remove_cv) && !defined(_LIBCPP_COMPILER_GCC) template struct remove_cv { using type _LIBCPP_NODEBUG = __remove_cv(_Tp); diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h index e96cc6523b71..1956ac3e5a43 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h @@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__remove_cvref) +#if __has_builtin(__remove_cvref) && !defined(_LIBCPP_COMPILER_GCC) template using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp); #else From nobody Wed Nov 15 02:37:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVS4m3sq5z50XMp; Wed, 15 Nov 2023 02:37: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 4SVS4m3Dcdz4Xfb; Wed, 15 Nov 2023 02:37:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2d1je0kEIqEpGktCTquPvs3QFbrGkodpowxDNhW1pTQ=; b=W/KVjW2zfjy7HmSdkwFzybDAoGaN1MwiJDOePtVsJ0FXYyFeJHTkm+eHrCj90smG137hoM fH5iRB6UWSBfjpbJW7ibPYwlornCQUlowqDRBS9JO3gFyaxJ/TmfzjNoJJpsRLazJJpWDc BDppZFhEFKGOuBVVXu5QXh9wSUBPA5QiDAvYV9DfEQX2FQYBIBrFBn6zvLvrolev8/BGYq LYs5pHVNPMqjPBjf32m0b45+cjTgo15S0c+VNjOHh/9N9Cc9wZARd+DF1pEe9MuaSDe9ju Bxb/Gm6Yk/Rx2LlmE1/yh2z0c4jbDG4EMYwLfwIb7VQVLGnxxVTGE0ABGHdW3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2d1je0kEIqEpGktCTquPvs3QFbrGkodpowxDNhW1pTQ=; b=SmF1x831iXudSJFkWAO3+1uSuWe0hq0d81xH8jbVXV1fCl2ZMytPxkeytz0C/IL5RlfbYy gtPO1Z18D2YNrx1LQ+fRbOAOuUkf4jRShlQ9zyRIp5s0EI2s5xW2BFefF4L8Hi6ErkosJI ybNspONoL7LAmhyxxAzvD5KFXc3R7FCQlmk+2Pm3EzpQjF/umY6tKEJ6e1KNhgaCvLSm8s Itk5KY/9aYrOTysdhRBYJzUnD5QR5B3Dyd1EbrMjmyilkOcbEKDbLWkWH6QXbYF/YAHLh3 v74sZzbLn8O6IMCLwUnq1rpvcG0xWlMT/YDDkOexpQZW1y36WusVWENInzZO1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700015864; a=rsa-sha256; cv=none; b=HWgeVJAx+xViB89xNgs/GpSPXlEdymOicyQt7RZkHz0oXtYpxUp1pbHwEtgxvgoZdU9hcw H9Ktpa11sShw90HUekbsgoBspNCtfZgl4IXH5+3N+jx/vNAV3kmxXMPTRucnvLOroBOQYF 1oxs6lzYhwR4fXR8GuQ5XYu8K6QdP2t01ifWNDiLLUCoF3sI+kNKxiZLCZ3MWj5o/DgG9U 3MG7V6Gm/NkGjDKqiw2F1hc+23XglDhDIvhkAEQ2DTjhVH0HPbZpOk1LzQsra1/OrWPXYu whCKDTRmT1UmWb16hYaSh8Rpm/nf0ezNjlK5XVUvygvD4lwot6P9YTRhWxWLHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVS4m2LDrz1DZH; Wed, 15 Nov 2023 02:37: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 3AF2bid2009726; Wed, 15 Nov 2023 02:37:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AF2bikM009723; Wed, 15 Nov 2023 02:37:44 GMT (envelope-from git) Date: Wed, 15 Nov 2023 02:37:44 GMT Message-Id: <202311150237.3AF2bikM009723@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: 28fc837b7037 - main - bsd.sys.mk: Disable -Wdangling-reference for GCC 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28fc837b70372a1a99c28ef4f74325bce711960a Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=28fc837b70372a1a99c28ef4f74325bce711960a commit 28fc837b70372a1a99c28ef4f74325bce711960a Author: John Baldwin AuthorDate: 2023-11-15 02:35:04 +0000 Commit: John Baldwin CommitDate: 2023-11-15 02:35:04 +0000 bsd.sys.mk: Disable -Wdangling-reference for GCC 13+ GCC raises this warning for libc++'s istream. It raises false positives in other cases as well (GCC bugs 109640, 109642, 109671). Warning from : /usr/include/c++/v1/istream:1464:34: error: possibly dangling reference to a temporary [-Werror=dangling-reference] 1464 | const ctype<_CharT>& __ct = std::use_facet >(__is.getloc()); | ^~~~ /usr/include/c++/v1/istream:1464:71: note: the temporary was destroyed at the end of the full expression 'std::__1::use_facet >(std::__1::ios_base::getloc() const())' 1464 | const ctype<_CharT>& __ct = std::use_facet >(__is.getloc()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42579 --- share/mk/bsd.sys.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 4cbe01404876..de91e00d8cc7 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -234,6 +234,13 @@ CXXWARNFLAGS+= -Wno-literal-suffix \ -Wno-error=unknown-pragmas .endif +# GCC 13.1.0 +.if ${COMPILER_VERSION} >= 130100 +# These warnings are raised by headers in libc++ so are disabled +# globally for all C++ +CXXWARNFLAGS+= -Wno-dangling-reference +.endif + # GCC produces false positives for functions that switch on an # enum (GCC bug 87950) CWARNFLAGS+= -Wno-return-type From nobody Wed Nov 15 02:37:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVS4n4qLqz50XBp; Wed, 15 Nov 2023 02:37: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 4SVS4n4MQpz4XgW; Wed, 15 Nov 2023 02:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CqTagZpI8RMzN6H9dcUGHP4Fm91IEekRy3jTPKVGL4U=; b=YZElWG+BryXzsYtGomg2Rspe/OjfK333TPYvR/nCqhl/KT5jD+4WZpgubXIPXtI58prbIq rydlszZmuglPU1NIxCfCZ9sSt0lolQlk8rZpsMQdj4czG7JWua0xHU0dQVApJZYC5aZye7 2LyAISGEywzYAm4RQmVMcSswukfyUbuK2JzU+GIe43dbiWoJq4tIGBD4Df8XtUi1Gq3ZuU /VzOPLzQzl6QvCxbV21++8CVeYw4FhmZrBbbUu6cQV6xvFQjWZKr7RIRoTOtkEqWrCjdqZ WefLYgyHRqDBPuEoIU7PArZKndkyv4SdmWmEwpZDV2feGEc4gPvvsjyAMr7jLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CqTagZpI8RMzN6H9dcUGHP4Fm91IEekRy3jTPKVGL4U=; b=X7hPR62NAFeEoNhBh0z44Yx5DpaMJ2KMusfhC5PB76Ww2NymDyrbO0MgiM3vlC3B0oILAT gOaaL3dq9G8oKt1l/IQE8crKR+/KMwjhYzXVKuGpcV0nWsbr7kaRACjoqECtr023k/XFYa uOzDdEGE59cZAGyKiCJqYTj6fAfm36DNAxusXpzSIwvDaHmxH7Ok+ZMRZ+iqRVSs3SwI5+ RN8E2dMdVNd/n+IA/Ci/01wjYTLbs1XS9a+sbyuiuPnQuCmgCDEDoj0ZV83u/UJQMT1ppR 0/t2amQ6CyGxW1rRnYZyzTc4+c89/cpWRYfqAcjXx8XChAwvNrln6BcwWBgGeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700015865; a=rsa-sha256; cv=none; b=eY5rDgD8mPGXndvTBpWeAy5sYrtswkdO0xVhD1EqtGg7hYz/NRncZ6MPv/VM4F/kFDK8vQ kV9oaPPoOadsf4jM8k442k6Szt2gvIY3QeWEEdGrDjaxZHSep/lFtlBhnW79XWDUv62khd yb2eQLIlS0BmYuqQ/3pfuc6OpQv4rm538bcVEkOSjdBSr2Kz5XW7qQlcZ6GveOawY3+QRH mrZsE7uGYhGgfi+ZoqAjJLJiytePhzaQUM4B7jcriVEQ6ecwO6wDRWJP4V5zYIEJxc4oDA v5mCnVvwKhk/pQ3wxboSCRYztLPp5Fygx4VBxlpHtSRYa3IbEl6bVeNusqzoSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVS4n3MY2z1DKy; Wed, 15 Nov 2023 02:37: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 3AF2bjBX009775; Wed, 15 Nov 2023 02:37:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AF2bjfj009772; Wed, 15 Nov 2023 02:37:45 GMT (envelope-from git) Date: Wed, 15 Nov 2023 02:37:45 GMT Message-Id: <202311150237.3AF2bjfj009772@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: c06962057bed - main - makefs cd9660: Unexpand a few TAILQ 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c06962057bedb3f1ed8c3560c1d1147dbf04ba68 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c06962057bedb3f1ed8c3560c1d1147dbf04ba68 commit c06962057bedb3f1ed8c3560c1d1147dbf04ba68 Author: John Baldwin AuthorDate: 2023-11-15 02:35:27 +0000 Commit: John Baldwin CommitDate: 2023-11-15 02:35:27 +0000 makefs cd9660: Unexpand a few TAILQ macros Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42580 --- usr.sbin/makefs/cd9660.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/makefs/cd9660.c b/usr.sbin/makefs/cd9660.c index 3429e2a33b4c..8cdfaee9464c 100644 --- a/usr.sbin/makefs/cd9660.c +++ b/usr.sbin/makefs/cd9660.c @@ -1508,10 +1508,10 @@ cd9660_generate_path_table(iso9660_disk *diskStructure) TAILQ_INSERT_HEAD(&pt_head, n, ptq); /* Breadth-first traversal of file structure */ - while (pt_head.tqh_first != 0) { - n = pt_head.tqh_first; + while (!TAILQ_EMPTY(&pt_head)) { + n = TAILQ_FIRST(&pt_head); dirNode = n->node; - TAILQ_REMOVE(&pt_head, pt_head.tqh_first, ptq); + TAILQ_REMOVE(&pt_head, n, ptq); free(n); /* Update the size */ From nobody Wed Nov 15 02:37:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVS4p5prdz50XVx; Wed, 15 Nov 2023 02:37: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 4SVS4p5Dhnz4Xj7; Wed, 15 Nov 2023 02:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SgpHy3azksl6aW7pTaFk597W9bXKzXM169R8h9S20ik=; b=kXri49C5S4awMJVkqoOY0MEuX4IfLUYn/CT8ABWi2qcJf1p56G4isnxodEYbfY1eIysqRK qbOk666AunWbWjsBLb2LBi8/4ywt/6F9k+0zgaXhQf0bFLD4hxTN9Q7E9UQZyLHND7OKPE 3vnAYGs9RnCgTQGSXBAjH/azmRnXS/IRL7d7s8B9dF8OanPS1x5YMjp9l9XwIVkddZ4U/w N5/QIl5flxmVuQd/UHytU/L/3XlJxPlrY082GPbD7VhkO6vXjSzST9LewhMOwfwn+ASK4y vdRBV3co/fleL5flqPQaJv0OUwabzbLdOiZ6iaF3NIUw3o0vuynWTUNrKh1kwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SgpHy3azksl6aW7pTaFk597W9bXKzXM169R8h9S20ik=; b=mzjeOWHR+14h/mCipZDBBsmDQnoU3wZe5nXzWpbv33AA56NbfPOoQKFsBaiPFeXt2Qf0dJ tSMxTtwjh4Auv8vtPfXHgNXsbKueCxR5wDv/jb8iYZb7cmmoNdjD6d6qOMnp35xhTkv0R0 zx57BSsUmiBzDyY1osxOiveV8vIqRv+GwpXYo+7yMJ6QV+CujXtyfQpA8ldmOFfBAGvxTs z1LxpHChxQub15lPbgj06ndVjzv7WqVAI3U3h/b/u376SmeeL2rZCsujCJynztAnJC0kxd 69ws+cHGwW3PdbvX50N/8tb0fBmxyJJXolwF7OaUd/vi6ujxGU04Tg2Jw2+hmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700015866; a=rsa-sha256; cv=none; b=UbFqeCs6bGY9VYLiiaMFWWPYBOrlAnOGp/Bm4NaezWaqNfQRuUmDVVg6g9ag+/TyAcpJTe 9tMsmqYS72hbzOY5MnoWwasf5wZL98W6ZbsGCjDXRYhKk3ZqK5YYtiEQ/xNyPP5k+UZpyV 8D0de3bvBEAiYdeChEmUte4ld05HeTBuMu7rd9l5GpU8SBq2HJMFwbE0SEUy+2ElnA5L6Q qmqqRVeQ5ZAd6cRrP0F0nP5pg5zzJ+QZonjwyge+AZ33tD6Zg+yYl2aHAVnpEcf92G1qxr nSeEYptRjPcIf3OfI52MNU6X2omZnrEfv6x+d6sdISO7OXzpvcux8GZCi4zC1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVS4p4L9sz1DZJ; Wed, 15 Nov 2023 02:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AF2bkjC009829; Wed, 15 Nov 2023 02:37:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AF2bkps009826; Wed, 15 Nov 2023 02:37:46 GMT (envelope-from git) Date: Wed, 15 Nov 2023 02:37:46 GMT Message-Id: <202311150237.3AF2bkps009826@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: 5fc8ed931360 - main - makefs: Quiet a -Wdangling-pointer warning in cd9660_generate_path_table List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 5fc8ed9313609fbafe505deaea253e6bde5ac165 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5fc8ed9313609fbafe505deaea253e6bde5ac165 commit 5fc8ed9313609fbafe505deaea253e6bde5ac165 Author: John Baldwin AuthorDate: 2023-11-15 02:35:44 +0000 Commit: John Baldwin CommitDate: 2023-11-15 02:35:44 +0000 makefs: Quiet a -Wdangling-pointer warning in cd9660_generate_path_table This function temporarily stores a pointer to an on-stack variable (a TAILQ_HEAD of a temporary list) into a global variable (*n). Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42581 --- usr.sbin/makefs/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr.sbin/makefs/Makefile b/usr.sbin/makefs/Makefile index 9c690fa7e704..c0f4469d29f1 100644 --- a/usr.sbin/makefs/Makefile +++ b/usr.sbin/makefs/Makefile @@ -49,4 +49,9 @@ LIBADD= netbsd util sbuf HAS_TESTS= SUBDIR.${MK_TESTS}+= tests +# cd9660_generate_path_table adds a global variable to an on-stack +# TAILQ which temporarily stores a pointer to the on-stack TAILQ head +# in the global +CWARNFLAGS.cd9660.c+= ${NO_WDANGLING_POINTER} + .include From nobody Wed Nov 15 02:37:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVS4r1X2cz50XGq; Wed, 15 Nov 2023 02: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 4SVS4q6J1Gz4XxS; Wed, 15 Nov 2023 02:37:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dn2b5hh+RLf9fae5tKO+KP9v2/x6WStVqJUtgOtqrR4=; b=LF9P9I3SWatqvYBkT2Py39fxGOKcOfqQn8KdM96aruZ1sm5JMkewl62pYxtJZzlVrFHQ4x YvWCyczi/EXumCGyLAR7Hlnzi/5p+G1L8GbEMm8H0Xv8XMQXokQbFFd5yJoUDeciXAX3Zm YAiHTkwgop5akQMYM6jOUSCUaeZW6N3LBBf2kiHkPl237OFq/iRF63IoEtPiKGE+j6sf64 zCDVEpvMlY6DiXNHkNE3cW6z5CWPwwRq0JNcKER2GBCSDJ+KLp3bwuYefDUDDJTFopTAfQ Q8WxZF/HYCl/XdYgBvgsKhtElzEk7tRPTwOnpyEMjWCGrGg+g9PQCQbNBX46OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dn2b5hh+RLf9fae5tKO+KP9v2/x6WStVqJUtgOtqrR4=; b=X0mlaraCkI/JT1MqdW8q3fUTN6WZ5uW1cxXyL597vBo9YjCfIMsO/T/oTVjDCWvXj0DUci y/S5ipU3/unLKq3WfeRwi4dSN+U7aYcKERNzltsVAuFGT9XVg+sRYMY4yHgLc1hNBqVNwK REuq8CviHwS/13NOCGX0IsQGXej4jGeEskoJsGWjbxBghXfwJWsai1lbcN/NdUG6D28o86 AZZLZSWRiqFHh/pTOm1u91NUDZW6eHl8sFLiC5eUsnqjTRJ0iw1wyRfHFQ9yaEkrwQw7vn tN2AIAxvbnoWYBAxRQF/2JDaO3drp9nBMexPv//Oki5mSc5IAx/Yvn7sqt9cFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700015867; a=rsa-sha256; cv=none; b=CIBWn/wHLDOWbWzf5u5DCZDJEsr6ET2n6cXXzEHHL8/hHfh7VyKIhjZ71xC+JRyJJ9BSeN XWmK5+vMoVjo9XWYHe2qTE14GE1Itq8Tnbm1GuifNSingZ5ryjPDNRXQV3bvqbIERAu055 oBG8t4WKaXZ8ZmxAcTS9YkrVLgzG4ck/EiX+3lzzMYvjwxYZ9ErN9SYH8qKvXLju05XUXP hRorSP3yOfhULyNGwihjbRxs9zJcgQZMO7i63843idrPaZf6ZLlhwsf1HSS1OFo+VNjSA9 MkyXTNv1U4V+CT2NxGD23RfaWVU6uNZnHLmZRrU3OLOa8Bb7Hx+R62zh9Zey5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVS4q5Q6bz1DCB; Wed, 15 Nov 2023 02:37: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 3AF2blv9009886; Wed, 15 Nov 2023 02:37:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AF2blcU009883; Wed, 15 Nov 2023 02:37:47 GMT (envelope-from git) Date: Wed, 15 Nov 2023 02:37:47 GMT Message-Id: <202311150237.3AF2blcU009883@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: cc61bf9eccd4 - main - snmp_wlan: Fix a couple of type mismatches in function prototypes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: cc61bf9eccd46592704f3e7bc189c94ccae8f524 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cc61bf9eccd46592704f3e7bc189c94ccae8f524 commit cc61bf9eccd46592704f3e7bc189c94ccae8f524 Author: John Baldwin AuthorDate: 2023-11-15 02:36:03 +0000 Commit: John Baldwin CommitDate: 2023-11-15 02:36:03 +0000 snmp_wlan: Fix a couple of type mismatches in function prototypes Reported by: GCC 13 via -Wenum-int-mismatch Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42582 --- usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c b/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c index e5a6e0653b39..b129e42b9d85 100644 --- a/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c +++ b/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c @@ -68,8 +68,8 @@ static uint32_t wlan_cryptocaps_to_snmp(uint32_t); static uint32_t wlan_htcaps_to_snmp(uint32_t); static uint32_t wlan_peerstate_to_snmp(uint32_t); static uint32_t wlan_peercaps_to_snmp(uint32_t ); -static uint32_t wlan_channel_flags_to_snmp_phy(uint32_t); -static uint32_t wlan_regdomain_to_snmp(int); +static enum WlanIfPhyMode wlan_channel_flags_to_snmp_phy(uint32_t); +static enum WlanRegDomainCode wlan_regdomain_to_snmp(int); static uint32_t wlan_snmp_to_scan_flags(int); static int wlan_config_snmp2ioctl(int); static int wlan_snmp_to_regdomain(enum WlanRegDomainCode); From nobody Wed Nov 15 02:37:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVS4s29njz50XXs; Wed, 15 Nov 2023 02:37: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 4SVS4s00MLz4Xjy; Wed, 15 Nov 2023 02:37:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gfCUTNoqtvGmzf8lFsd+QFuHj1/WcRa489Naut5gnjg=; b=sL5LmkWDMUQaWhMHMRu9K7/suByQP8UJUtic5CWIZPBd4lBPLSK2JMNe+FmVSyeoONrT+2 hdpxGLlus1wXbJLrti0CWCbD9H0MzywZBm9jJZWtLqTeTlUXF8hMEz+anjRrEnLkrfjsLS DIM/xcXBfl6ajK1nfjuQiJa1udwkHY1SUdFFB63Xyo/ayuFCqcnvFfIUCLMsrlUd8jGlNi 5WLhRIXVJ5VQ0RUw5sFabVo4p3Dn+MEcWXx/Vi2wjjEYX6uI0TUQFOJR30/4CvK+InyIXV 3kKMwjBJzL7GciGGIf9iTU9db+lcGn1p6CMoKW1abi9SNnQd1/ZK1L5XbHCffQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gfCUTNoqtvGmzf8lFsd+QFuHj1/WcRa489Naut5gnjg=; b=X5g0OCXT9Pfy2eXg6FOeoamMn0AQHhpXjssRRy7nKW/PRJpiHUshK68SVr8OKhDTCVV5zz MWS/IEE6BEqH2zlL/vOnpgjqAZ2+mfuwsUcyC4Cyiws4uf1Dkw21pqtvcpv517ti6W+EdR BjPWOMLpuDklk8oqH6WnVpRnJwUMgcX4wtelWFtmToHagHAVKUuv3944RdhLlJRrXd3klj A/GA0u2rvakIdaTEXEDAjFiJxzI99or70tlM+zCJfMvj6slg3y70laBgALfvqCqpoIhv2Z S2rrw+K/YDTvNrI74SSVkAAIY4+R+qYjcVVgXN0UeVYJT6DTnVEW3KbA9qKdyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700015869; a=rsa-sha256; cv=none; b=es8z9imP1SZJyhWu5dOsJRlW/fW+R577HalwJfagHrtOpL2Dy/7ou45pK+6V8kRcv494a/ /PkfkJarqlckzDBGrnvASWflNcwDYbUYRWWTSP0xXz9diTyZ6QpTuKBgigtMNKYkM0QM/G 3b7tJkG5CoLlvenW+KBvZ7gsLvbh8DITpIS9obPYGNha9h4I0EipVyiLAI7pVxMFxHTAQ3 dYI6X0fYUPG+RgLRGWB/zJ60RE2SmS4z2/kHLHBeOy8zt5W2UOQd6qwcVj7zYq69709a8l cKMqZSX4E8+4+U07+HYkL+OyVhqkNu/Qr3vcSZ/G3I94buMIXIZ57Rx1vPGGXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVS4r6D3dz1CvG; Wed, 15 Nov 2023 02: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 3AF2bm7k009943; Wed, 15 Nov 2023 02: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 3AF2bmbH009940; Wed, 15 Nov 2023 02:37:48 GMT (envelope-from git) Date: Wed, 15 Nov 2023 02:37:48 GMT Message-Id: <202311150237.3AF2bmbH009940@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: 1e65df68403a - main - ath_hal: Fix a couple of type mismatches in function prototypes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1e65df68403acac2231dda161fd12e62f888a031 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1e65df68403acac2231dda161fd12e62f888a031 commit 1e65df68403acac2231dda161fd12e62f888a031 Author: John Baldwin AuthorDate: 2023-11-15 02:36:32 +0000 Commit: John Baldwin CommitDate: 2023-11-15 02:36:32 +0000 ath_hal: Fix a couple of type mismatches in function prototypes Reported by: GCC 13 via -Wenum-int-mismatch Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42584 --- sys/dev/ath/ath_hal/ar5210/ar5210.h | 2 +- sys/dev/ath/ath_hal/ar5211/ar5211.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ath/ath_hal/ar5210/ar5210.h b/sys/dev/ath/ath_hal/ar5210/ar5210.h index e3524eda6965..567fea567cba 100644 --- a/sys/dev/ath/ath_hal/ar5210/ar5210.h +++ b/sys/dev/ath/ath_hal/ar5210/ar5210.h @@ -278,7 +278,7 @@ extern HAL_BOOL ar5210SetKeyCacheEntry(struct ath_hal *, uint16_t entry, extern HAL_BOOL ar5210SetKeyCacheEntryMac(struct ath_hal *, uint16_t, const uint8_t *); -extern HAL_BOOL ar5210SetPowerMode(struct ath_hal *, uint32_t powerRequest, +extern HAL_BOOL ar5210SetPowerMode(struct ath_hal *, HAL_POWER_MODE mode, int setChip); extern HAL_POWER_MODE ar5210GetPowerMode(struct ath_hal *); diff --git a/sys/dev/ath/ath_hal/ar5211/ar5211.h b/sys/dev/ath/ath_hal/ar5211/ar5211.h index 45fe7e366190..08396ed85dcb 100644 --- a/sys/dev/ath/ath_hal/ar5211/ar5211.h +++ b/sys/dev/ath/ath_hal/ar5211/ar5211.h @@ -304,7 +304,7 @@ extern HAL_BOOL ar5211SetKeyCacheEntry(struct ath_hal *, uint16_t entry, extern HAL_BOOL ar5211SetKeyCacheEntryMac(struct ath_hal *, uint16_t, const uint8_t *); -extern HAL_BOOL ar5211SetPowerMode(struct ath_hal *, uint32_t powerRequest, +extern HAL_BOOL ar5211SetPowerMode(struct ath_hal *, HAL_POWER_MODE mode, int setChip); extern HAL_POWER_MODE ar5211GetPowerMode(struct ath_hal *); From nobody Wed Nov 15 02:37:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVS4t2Bgnz50XLQ; Wed, 15 Nov 2023 02:37: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 4SVS4t1TYTz4Xn7; Wed, 15 Nov 2023 02:37:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AxWWEMynh88BOV1MMKwrlrDhWqzx/sE2lNc7BUCKbFc=; b=cRqpflpz3GPrCrefmxx3k3MvSdF2kd9rj6DCrxg+s0CSE8Coi/DPCNGThUDK0Dk0Oib1nj 0K/kuY10LWxlltEmqFTJcZ4xrML5UW3zTIgngSOu6MrcDnPDrq8Kg9adx1X0qGnVTjlshD N477y9oOSZqVAVO5UgzK9fKXFv8FbscPAN48ZKTrl56uFbCuO+ZyExFvVwWvqkiKqB5CLO EW42u/fX846ExgLvT2ntBz9Bco2BsMKZDic7QmCs+40e7d9iFR8gPPIol0fZ8NkXRKEv79 t8wRkFEutZREqNsxRvnL8VQaWZ28XIVEPEUNwaCGEJLf6JgC8rjIpFGeix5SEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AxWWEMynh88BOV1MMKwrlrDhWqzx/sE2lNc7BUCKbFc=; b=ongpqje8qKS9eg1HR/AyWz9DZaBNZzOPISk4K+QWiMpJkwqBP0PyTnYBlTTiYb0Ne2qVNF 57XM91SePGTt+8YCZFaeFeIaZoxrZcV1N69Emfq6WAj1RuVD/6Rtd687qMQmZhV1O694K4 BM76t+/Bqr0U2I7Kh+wXAqLRJK7Zip17jdXRZRT0qW0a0Vde0/ZJl1aPV8TLNNRzNKCBkg I+KYV+BkFVeT9m8LKzwYUp5gv9UdpU/+mxGkIR3jKwlwcLw4EZl6QjCkNaKJhCv5H+OyAi 0wjl+b//tYdzyICOFs4KPtArUZrJZOgCHsZPuJ5tTKWHv721gb784WhiwOpH/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700015870; a=rsa-sha256; cv=none; b=vWu3maAKif3NXQQYF3uuaodgo3xy/GDU0b4mCN9mzdCMm2FAnoouowABsZMA5EI6hYh4H6 6HvDyJw/RZJcM+XT8EHVlm8lyHlNquOWjnnOXTW8zOKhO7MfS8dnT+HR7SWZEb66vdO7Fz TG4LA5JpNWZe5XZXrbA1nFe7d9Ra7Q5Gm478vhiwXh2Z7Vbviki0pefg3Q7P+M88c7mtpS kaOY2XFVIFaFKzclGj0ZLWx5kkDAtOPc5MqYwNTeobeBfZd6sClrlg2a6Pq16xIMeuuf1/ GLqMDb6b9mOQ8VrLpJSdhD7iRcNdvrTwMInnijhnmDzBi3f33Y3uvQk5rB094Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVS4t0ZrFz1DL0; Wed, 15 Nov 2023 02:37: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 3AF2bnxd010000; Wed, 15 Nov 2023 02:37:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AF2bndA009997; Wed, 15 Nov 2023 02:37:49 GMT (envelope-from git) Date: Wed, 15 Nov 2023 02:37:49 GMT Message-Id: <202311150237.3AF2bndA009997@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: 7aa5b2a9e7f5 - main - ocs: Fix a couple of type mismatches in function prototypes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7aa5b2a9e7f5f3cd33e72cb1e95790fe7637f10f Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7aa5b2a9e7f5f3cd33e72cb1e95790fe7637f10f commit 7aa5b2a9e7f5f3cd33e72cb1e95790fe7637f10f Author: John Baldwin AuthorDate: 2023-11-15 02:36:48 +0000 Commit: John Baldwin CommitDate: 2023-11-15 02:36:48 +0000 ocs: Fix a couple of type mismatches in function prototypes Reported by: GCC 13 via -Wenum-int-mismatch Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42585 --- sys/dev/ocs_fc/ocs_hw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/ocs_fc/ocs_hw.c b/sys/dev/ocs_fc/ocs_hw.c index 097228d12bfb..4db6634d3d90 100644 --- a/sys/dev/ocs_fc/ocs_hw.c +++ b/sys/dev/ocs_fc/ocs_hw.c @@ -7740,7 +7740,7 @@ ocs_hw_get_active_profile_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *a * context. * - OCS_HW_RTN_ERROR on any other error. */ -int32_t +ocs_hw_rtn_e ocs_hw_get_active_profile(ocs_hw_t *hw, ocs_get_active_profile_cb_t cb, void* ul_arg) { uint8_t *mbxdata; @@ -7837,7 +7837,7 @@ ocs_hw_get_nvparms_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *arg) * context. * - OCS_HW_RTN_ERROR on any other error. */ -int32_t +ocs_hw_rtn_e ocs_hw_get_nvparms(ocs_hw_t *hw, ocs_get_nvparms_cb_t cb, void* ul_arg) { uint8_t *mbxdata; @@ -7934,7 +7934,7 @@ ocs_hw_set_nvparms_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *arg) * context. * - OCS_HW_RTN_ERROR on any other error. */ -int32_t +ocs_hw_rtn_e ocs_hw_set_nvparms(ocs_hw_t *hw, ocs_set_nvparms_cb_t cb, uint8_t *wwpn, uint8_t *wwnn, uint8_t hard_alpa, uint32_t preferred_d_id, void* ul_arg) { @@ -8099,7 +8099,7 @@ ocs_hw_set_active_profile_cb(ocs_hw_t *hw, int32_t status, uint8_t *mqe, void *a * context. * - OCS_HW_RTN_ERROR on any other error. */ -int32_t +ocs_hw_rtn_e ocs_hw_set_active_profile(ocs_hw_t *hw, ocs_set_active_profile_cb_t cb, uint32_t profile_id, void* ul_arg) { uint8_t *mbxdata; From nobody Wed Nov 15 02:37:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVS4v2x00z50XNB; Wed, 15 Nov 2023 02:37: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 4SVS4v2M7Xz4Y22; Wed, 15 Nov 2023 02:37:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vdRYaFpgTwLGaYhNTyHTA7njZSa0SDlDWb7ff0ozOZY=; b=RyEmzGWO+EUxTT2JkVF0VZ3fe/IqBqbwsn6TAopCKfCNHW7dK+biAZWzLi/0mD9yoT1zyQ 0GiZqasYECH93suWwvRj3tO731UEnsG/uk9KXjB0ObIqqv9qz/puHTCktqkxn/JZf6kzJ/ WEcGlh46Xx56Atei4gMDBxOYXY3H4Gqxs0VeL4esRoYgtScrWNB4BH1ts/eB/u550x5tTf Rq2p58q5mmZSWDH19XvF6YJxpWrIU8wVq5evp1IAqHBq5/7HV0c2lfxNxwqdp5JEVWfv4y KkXyMQu1ikdbqjwqmv874Wj740aAf26B1KUQKAh6PEnKM6Ti4vy81NFupDZyxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vdRYaFpgTwLGaYhNTyHTA7njZSa0SDlDWb7ff0ozOZY=; b=DhgUHpr6dvZVpMB+PKedPSvOVkInNa+wsv0JdLztTmItHo3G/A9WphWyuyMlLVWpHYwSrH INnIs3xztNjql50tudrrXl4Sx5lEBXBh5x4b+OnyByncpJkekPeAD003T2AOO1O8a00m8U f5vqBg7qkAKpJEW2P7U1ekobXifv5JoDjJr4Kg1jEPFRqmOIfcDaydW8QUmMe7AoEmy/r0 SpgLnkDJaDafPxiEv89VmvdcKr2e8tzmQ17jWk/wJsyRfmGxb231X0HenVtWfcDcoSmqno EYddH3Bg2ctmpAZQHFbIaYRIrphw4QRJSKTl/IyQaUiisTpjJnbVgRDEIE5t+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700015871; a=rsa-sha256; cv=none; b=YSOFCzPNh1ViEhuBVJNS3g8o0TbcS6iOS8TrONIW+S7b0y5DtsKPt24lgVYoZahvMPFxlJ EnqsIPNylmu2Y4sG0rYqTxKivjtIS1GlCCwo5hKPTIdX5Yvj4DgVxTtvGrTDk9GPelYcG2 zVJ7ufSXnBKPaMoSAZx2KiGSqY5I+GOPiSYJ493UoDQPCCfzqv7LPZDkNjRHYoIs/8PbWs HB69gyrH7vdUwjEayPwsj8r/94Iidn9qTjSzB4U70jGPPialBSrJZ1QZ/yBGH2uD3j/ywV vIvdF6NipOov/kH+BkDtsoiZzml9Ex58fQZM3vgU+Br3p9trm8eSDSYRdjOCng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVS4v1Rm2z1DT6; Wed, 15 Nov 2023 02:37: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 3AF2bpsG010057; Wed, 15 Nov 2023 02:37:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AF2bpS0010054; Wed, 15 Nov 2023 02:37:51 GMT (envelope-from git) Date: Wed, 15 Nov 2023 02:37:51 GMT Message-Id: <202311150237.3AF2bpS0010054@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: be909a79a8e2 - main - qlnx: Fix a couple of type mismatches in function declarations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: be909a79a8e2506b49ed81f9bd8115512dd613a4 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=be909a79a8e2506b49ed81f9bd8115512dd613a4 commit be909a79a8e2506b49ed81f9bd8115512dd613a4 Author: John Baldwin AuthorDate: 2023-11-15 02:37:06 +0000 Commit: John Baldwin CommitDate: 2023-11-15 02:37:06 +0000 qlnx: Fix a couple of type mismatches in function declarations Reported by: GCC 13 via -Wenum-int-mismatch Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D42586 --- sys/dev/qlnx/qlnxe/ecore_l2.c | 6 ++++-- sys/dev/qlnx/qlnxe/ecore_sriov.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/ecore_l2.c b/sys/dev/qlnx/qlnxe/ecore_l2.c index 487b56629009..ee7d225540d0 100644 --- a/sys/dev/qlnx/qlnxe/ecore_l2.c +++ b/sys/dev/qlnx/qlnxe/ecore_l2.c @@ -2240,7 +2240,8 @@ ecore_configure_rfs_ntuple_filter(struct ecore_hwfn *p_hwfn, return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL); } -int ecore_get_rxq_coalesce(struct ecore_hwfn *p_hwfn, +enum _ecore_status_t +ecore_get_rxq_coalesce(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, struct ecore_queue_cid *p_cid, u16 *p_rx_coal) @@ -2275,7 +2276,8 @@ int ecore_get_rxq_coalesce(struct ecore_hwfn *p_hwfn, return ECORE_SUCCESS; } -int ecore_get_txq_coalesce(struct ecore_hwfn *p_hwfn, +enum _ecore_status_t +ecore_get_txq_coalesce(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, struct ecore_queue_cid *p_cid, u16 *p_tx_coal) diff --git a/sys/dev/qlnx/qlnxe/ecore_sriov.c b/sys/dev/qlnx/qlnxe/ecore_sriov.c index 65df523bb83e..e1198f91e497 100644 --- a/sys/dev/qlnx/qlnxe/ecore_sriov.c +++ b/sys/dev/qlnx/qlnxe/ecore_sriov.c @@ -4925,7 +4925,7 @@ bool ecore_iov_is_vf_started(struct ecore_hwfn *p_hwfn, } #endif -enum _ecore_status_t +int ecore_iov_get_vf_min_rate(struct ecore_hwfn *p_hwfn, int vfid) { struct ecore_wfq_data *vf_vp_wfq; From nobody Wed Nov 15 02:37:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVS4w4Ggqz50XXy; Wed, 15 Nov 2023 02:37: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 4SVS4w3ZTKz4Y6x; Wed, 15 Nov 2023 02:37:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3d9MMQPkaqY5/BxryAX6AkoBY9mG54nbcgITg34DUjY=; b=EXNkW8wUffWtVwthBNlwyAG7VQA5t4Ia1zOvnm3QpEqEajBNiME5V3JsSzpFdMQoYCNKTJ 3pBJfzexRRKTiSQOQg6wtQowvdvaT+NAJ9D02cIdUhEdse9PKh9Nj9Efkab/0WmnsvgS3l +ZgUI8uI61ncWAfQakVCdiFhgJfphYI5g3o4MOILSqm2G2eRaOUPI55VlK3voKFNdlt93k b4zJxy90v1Pj0EMFUm6MBjFezwqZk8FmeXxovbEUxMdqeswB8uuvRiE9ogQ3cml7JKNBTf yJZOZFw+1PXqSHrzbrIgSjqly5/OXoQYpqXAGyNEhVDEdxuuH2gK2JSILrry8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700015872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3d9MMQPkaqY5/BxryAX6AkoBY9mG54nbcgITg34DUjY=; b=acKaBwU8H5XKW4vL/AqN8DrmVZFQiOi+PqgEQ3YJLv5/ZWTaF/UWTFnRywrhTlPqsL6Nyg mvIDFZOLNQikc/WhDAMZZqn/kJ4ndEJb+1f84/UwTPEpYnaUzf8e2MyERYnWbQx/5PJhwT HYv+XFVdUr+CahBNUhdn1m2xzHIGqKpIyv29M2UGu3R17wK/e8lfyVK3AzNCS7admBg/SB Vddb8H8yWJhIaCbHCoEXeD/3U3JAAtJ28/4owgzSbA9Df8E0mCAS3ENj7b/Ao0R3NP2mNq A648HKuYydj4DLu6WjKDy+exC7sJFU4j3gSrSUeb/Goa+jXPg6/75qdBlF6REw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700015872; a=rsa-sha256; cv=none; b=OIEn4zap6Y2dCFWnqq7BOwKU50d+wi8JdaHDpoEkuPJj86WDyxCNRcEmvT9D3f1AccPi3e iX8b4zp9G0of/+D0HUy3Njueu5/sajsbvRPllmYPXwOJBO5g6lBCFqg7XyV4LZeJ2hvIZK MR+wANpbjOW3mKbaTXzDyAKOUqJnaR2ZQ0uMtGTHBr2DEywxreK93l2aRctYzt5aI1iDjn ulGh3mS/2pcg3jzhUvdtvrR9lwo82x0Yk7/F9Yg4nGV3rG5VKl7X03G/t192O2KszVYEHy exHX8b3ijOqezeIBUd1R7QOVQgowQpI8OsfX2Kpwn/EMJV03bOnEvqiwn2d1Tg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVS4w2gCPz1CvH; Wed, 15 Nov 2023 02:37: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 3AF2bqun010108; Wed, 15 Nov 2023 02:37:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AF2bqxF010105; Wed, 15 Nov 2023 02:37:52 GMT (envelope-from git) Date: Wed, 15 Nov 2023 02:37:52 GMT Message-Id: <202311150237.3AF2bqxF010105@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: ede077bf2a25 - main - sys: Disable -Walloc-size-larger-than for GCC 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ede077bf2a259c23923d1ab1231dc8c4577e6672 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ede077bf2a259c23923d1ab1231dc8c4577e6672 commit ede077bf2a259c23923d1ab1231dc8c4577e6672 Author: John Baldwin AuthorDate: 2023-11-15 02:37:25 +0000 Commit: John Baldwin CommitDate: 2023-11-15 02:37:25 +0000 sys: Disable -Walloc-size-larger-than for GCC 9+ By default this warns about sizes larger than PTRDIFF_MAX passed to malloc (rather than SIZE_MAX). This doesn't trigger deterministically, but it does trigger for kmalloc() of struct_size() in iwlwifi's iwl_configure_rxq even when struct_size() is changed to use PTRDIFF_MAX. NB: struct_size() in Linux caps the size at SIZE_MAX, not PTRDIFF_MAX via size_mul(). Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42587 --- sys/conf/kern.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 72b7387d3959..08779b4da193 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -76,6 +76,7 @@ CWARNEXTRA+= -Wno-error=packed-not-aligned .endif .if ${COMPILER_VERSION} >= 90100 CWARNEXTRA+= -Wno-address-of-packed-member \ + -Wno-alloc-size-larger-than \ -Wno-error=alloca-larger-than= .if ${COMPILER_VERSION} >= 120100 CWARNEXTRA+= -Wno-error=nonnull \ From nobody Wed Nov 15 05:52:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVXPV2fJwz50wfK; Wed, 15 Nov 2023 05:52:30 +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 4SVXPV2Btyz3CfF; Wed, 15 Nov 2023 05:52:30 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700027550; h=from:from:reply-to:subject: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=ZGMZNnlXFZTsuP4gBhDSj3CggJQ0Pa9CGyZBLZTqsqA=; b=gb9nKmsRMmIWRIWbHIxLCQYCn1W5bSAQ2Md8UycHdyTAtOiDcu0+3hTnz7OToDGUsOpx3N 9GAYRQggSxQboy10tSZz+F19/woAjYvGOTG6/oONbAGWmWFXEKeM6ELar7QoT/mr3EhEP1 VZ60qaksrhx9E2Dnn3AeJqYz3mp/bEqntoUHQIhlglt2EtHKVeaDJZSSoXznpWzVQHJbRR 96NRtGhUegMmDvd7S2XH986Gmj7nKtWeaxIRFyPVAoL1Q80a8Vg5qcJNwhf0KMfjiL5vMP 7iRZx1OItwjPXtkmqdeWw001H8dj2aBOGGGzZgKs2Q3NrLapRw9RbKZt3Vyqng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700027550; h=from:from:reply-to:subject: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=ZGMZNnlXFZTsuP4gBhDSj3CggJQ0Pa9CGyZBLZTqsqA=; b=xdvfIGoWgaE4XsfggHH3yh0nJOWcgDZk9EGREYnUJV0MV4qCmro0qjWputIpXFVtmOGBO2 TT/LUa3w3gXIMjyg4Vm6ok/sA3x/pF4zdvEIMaiYthE0R/pSJ4Nv3w7lgbxkb23BcJi1RL 85E+KZtAKhc+gxSAw4SCo07vaBWIfwU+Fz/nVFvFoUrBZsbwQ89rFhvTyErEv53BRRAsIp 9X/wOrvbw044M3rKVZ+vroBTuGgwMvwsGps2vukFQKZp1vQyq0U8wQnFryTUNrjX302+VI pTAilRjy1KaFdNNFqckavab0Wr9M+2HiUc5kHhWLihyXT4tZNzm8p7Q4cPQd8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700027550; a=rsa-sha256; cv=none; b=vBs+tfjx6iFDj1eNdhISb56OqCA3ke+iJRILbmkbg+yFVydegxtkCoz1/oQcPr1lRxhPC1 7v97K7qtHasq/ck46IIVsKdWeseWfo10HqrTuGxGKNNYzH5HegVgrqHFtM1IR8rpPNHbuD U8alDU/g5YkaVjubMdBAb1EZrvh2rUT3Rl7XUykOSBvLG8YdKOREuNznmX8yXtGc9Luokm wssLn4IJleJlaGitFtjPDCreSv4yi4W3VoTT0EMROYCkLkcAFkWiGyLYU9+Z8BNXikk3by ROX6qB74K1e02PDAeDNh0zQXvZCchKvPbFaWl3BxcCrYTiDrZgZLdY0Ubaiqgg== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SVXPT5lTKz1Ksy; Wed, 15 Nov 2023 05:52:29 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <3d9f647b-ad52-4dad-90e5-021ff95f25b9@FreeBSD.org> Date: Tue, 14 Nov 2023 23:52:27 -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: b2e41172bdc0 - main - A skeleton kernel module suitable for creating new such modules. Content-Language: en-US To: "George V. Neville-Neil" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202311142111.3AELBWJn067834@gitrepo.freebsd.org> From: Kyle Evans In-Reply-To: <202311142111.3AELBWJn067834@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/14/23 15:11, George V. Neville-Neil wrote: > The branch main has been updated by gnn: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b2e41172bdc00f177f7de4d4f4963cc4d99a3178 > > commit b2e41172bdc00f177f7de4d4f4963cc4d99a3178 > Author: George V. Neville-Neil > AuthorDate: 2023-10-05 20:05:31 +0000 > Commit: George V. Neville-Neil > CommitDate: 2023-11-14 21:08:13 +0000 > > A skeleton kernel module suitable for creating new such modules. > --- > share/examples/modules/Makefile | 6 +++ > share/examples/modules/skel.c | 87 +++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 93 insertions(+) > > diff --git a/share/examples/modules/Makefile b/share/examples/modules/Makefile > new file mode 100644 > index 000000000000..0f0a2fb01e8a > --- /dev/null > +++ b/share/examples/modules/Makefile > @@ -0,0 +1,6 @@ > +.PATH: ${SRCTOP}/sys/skel > + > +KMOD= skel > +SRCS= skel.c > + > +.include > diff --git a/share/examples/modules/skel.c b/share/examples/modules/skel.c > new file mode 100644 > index 000000000000..fc99e13ab444 > --- /dev/null > +++ b/share/examples/modules/skel.c > @@ -0,0 +1,87 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause > + * > + * Copyright (c) 2023 George V. Neville-Neil > + * > + * 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. > + * > + */ > + > +/* > + * SKEL Loadable Kernel Module for the FreeBSD Operating System > + * > + * The SKEL module is meant to act as a skeleton for creating new > + * kernel modules. > + * > + * This module can be loaded and unloaded from * FreeBSD and is for > + * use in teaching as well. > + * > + */ > + > +#include > +#include > +#include > +#include > +#include > + sys/systm.h should be after sys/{param,types}.h with the rest sorrted alphabetically after that. > +/* > + * Every module can hav ea module specific piece of code that is > + * executed whenever the module is loaded or unloaded. The following > + * is a trivial example that prints a message on the console whenever > + * the module is loaded or unloaded. > + */ > + "hav ea" -> "have a" > +static int > +skel_mod_event(module_t mod, int type, void *data) > +{ > + > + switch (type) { > + case MOD_LOAD: > + printf("SKEL module loading.\n"); > + return (0); > + case MOD_UNLOAD: > + printf("SKEL module unloadin.\n"); > + return (0); > + } > + return (EOPNOTSUPP); > +} > + > +/* > + * Modules can have associated data and the module data also contains > + * an entry for the function called by the kernel on load and unload. > + */ > + > +static moduledata_t skel_mod = { > + "skel", > + skel_mod_event, > + NULL, > +}; > + > +/* > + * Each module is declared with its name and module data. The > + * ordering arguments at the end put this module into the device > + * driver class, which is sufficient for our needs. The complete list > + * of modules types and ording can be found in sys/kernel.h > + */ > + "modules" -> "module" "ording" -> "ordering" It probably makese sense to stylize sys/kernel.h as either or src/sys/sys/kernel.h to make it clear that we're either referencing a relative path that could be found inside your standard include path, or a location in the tree that one can quickly browse to. > +DECLARE_MODULE(skel, skel_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); > + Thanks, Kyle Evans From nobody Wed Nov 15 09:37:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVdP815wqz51G8P; Wed, 15 Nov 2023 09:37: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 4SVdP76hWcz4Jcx; Wed, 15 Nov 2023 09:37:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700041051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Ksh8+kA3VCg3Y+6THzdV6oqTbOKght8Ezm0ZIOSlDw=; b=PRD3FG7PqQQ4fJJW9+vWI3RGxHU16b5hz8QxYF0iC+IZM2fE7M7GPyG0l+Svze0v/us4wV NTfinGUj12YKMqke0jD3dbmfs2QcGI8movQtLDOlmMa5asxs41EUNrRZVu5vLuTy/zNvgH UwrFkDgXZn3XvywVcGBC9N6mf36Br2bzJQRC2buV98lQK7ugcu/x5eLKUoucGG8Rrr69vg 8OgpZT/nQW5jKknv9rcLFlxmxCK6vtxSPqThc1rAbS0uWIMSlEH8xXxWLx82kwYunfcyo9 /CSPPSeuunoMbtt+Zm8O1ro70UhQjy8Jd8QVkPmSoZb8zvJUjlbkSvVd+pG5lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700041051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Ksh8+kA3VCg3Y+6THzdV6oqTbOKght8Ezm0ZIOSlDw=; b=ZWD8P9q/8ohFiP+4jFVI8Y1GDanYlRHVxZA9x4tJHinOXe8sKL57+Qpr/c9U+nE+dwdAmO GGr3rlmYG5UWUrceKnDnvdDNI3wNb/0ddb4WozMpb/xvZ0f7cKrj341ABeNOtAGJ9BbrF2 iW3OEfuex+4NN2tJNZckYYjxpLcKg4vQpjl193yWQtjSV4EUQUhFvUWr2h8dSCxMOgVYoU 5V+r/9CPaAz6L9gC3bU8Hf6njNUnDXt/02C7fDOCIA9D1IHYLjVTUy24BM9SBhev/qmvXD uNZkSwhBCsLuSAdV23mwmNdMXjvn3qfj54CrlCxZfIguzVWImf47NZ17+IzlUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700041051; a=rsa-sha256; cv=none; b=jyPPPmbWrjwqW/+048dDYO6G400oETBSCTLXNzuNBgV0VPOtdxCoQHLcqOUmgasypHN558 jyndP9mOvY3ltY+WKdb4LApig+fMfyl74rAcQWNNVsYrBkPmYroHVVTc9FE7fYjUo51N0w uTbfsvqKEbxsUpqrIBJIlZ/VqI6CLaNeuiyBn4Y+MRLDGVe6yhlQ7YDa5e71DCSIiIjexH uBCo0IjdJiPyp5QKA1Mbbv2c30FynU0e0tOl6TaDh2Lw2K18Xoxpht9/CrtkJqP2+4wSDD /jqkzYQKse9QGQcwan8imIfeyYS+0w2mEnIRMEYaPsxALEqnBc766l6mztB6iw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVdP75nkdz1Prm; Wed, 15 Nov 2023 09:37: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 3AF9bVg8009676; Wed, 15 Nov 2023 09:37:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AF9bVQ4009673; Wed, 15 Nov 2023 09:37:31 GMT (envelope-from git) Date: Wed, 15 Nov 2023 09:37:31 GMT Message-Id: <202311150937.3AF9bVQ4009673@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 2a4897bd4e1b - main - vm_phys: fix freelist_contig List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a4897bd4e1bd8430d955abd3cf6675956bb9d61 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=2a4897bd4e1bd8430d955abd3cf6675956bb9d61 commit 2a4897bd4e1bd8430d955abd3cf6675956bb9d61 Author: Doug Moore AuthorDate: 2023-11-15 09:25:45 +0000 Commit: Doug Moore CommitDate: 2023-11-15 09:25:45 +0000 vm_phys: fix freelist_contig vm_phys_find_freelist_contig is called to search a list of max-sized free page blocks and find one that, when joined with adjacent blocks in memory, can satisfy a request for a memory allocation bigger than any single max-sized free page block. In commit fa8a6585c7522b7de6d29802967bd5eba2f2dcf1, I defined this function in order to offer two improvements: 1) reduce the worst-case search time, and 2) allow solutions that include less-than max-sized free page blocks at the front or back of the giant allocation. However, it turns out that this change introduced an error, reported in In Bug 274592. That error concerns failing to check segment boundaries. This change fixes an error in vm_phys_find_freelist_config that resolves that bug. It also abandons improvement 2), because the value of that improvement is small and because preserving it would require more testing than I am able to do. PR: 274592 Reported by: shafaisal.us@gmail.com Reviewed by: alc, markj Tested by: shafaisal.us@gmail.com Fixes: fa8a6585c752 vm_phys: avoid waste in multipage allocation MFC after: 10 days Differential Revision: https://reviews.freebsd.org/D42509 --- sys/vm/vm_phys.c | 146 +++++++++++++++++++++++-------------------------------- 1 file changed, 62 insertions(+), 84 deletions(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index bc992bdfc58b..cd75ed092691 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -1360,108 +1360,75 @@ vm_phys_unfree_page(vm_page_t m) } /* - * Find a run of contiguous physical pages from the specified page list. + * Find a run of contiguous physical pages, meeting alignment requirements, from + * a list of max-sized page blocks, where we need at least two consecutive + * blocks to satisfy the (large) page request. */ static vm_page_t -vm_phys_find_freelist_contig(struct vm_freelist *fl, int oind, u_long npages, +vm_phys_find_freelist_contig(struct vm_freelist *fl, u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary) { struct vm_phys_seg *seg; - vm_paddr_t frag, lbound, pa, page_size, pa_end, pa_pre, size; - vm_page_t m, m_listed, m_ret; - int order; + vm_page_t m, m_iter, m_ret; + vm_paddr_t max_size, size; + int max_order; - KASSERT(npages > 0, ("npages is 0")); - KASSERT(powerof2(alignment), ("alignment is not a power of 2")); - KASSERT(powerof2(boundary), ("boundary is not a power of 2")); - /* Search for a run satisfying the specified conditions. */ - page_size = PAGE_SIZE; + max_order = VM_NFREEORDER - 1; size = npages << PAGE_SHIFT; - frag = (npages & ~(~0UL << oind)) << PAGE_SHIFT; - TAILQ_FOREACH(m_listed, &fl[oind].pl, listq) { - /* - * Determine if the address range starting at pa is - * too low. - */ - pa = VM_PAGE_TO_PHYS(m_listed); - if (pa < low) - continue; + max_size = (vm_paddr_t)1 << (PAGE_SHIFT + max_order); + KASSERT(size > max_size, ("size is too small")); + /* + * In order to avoid examining any free max-sized page block more than + * twice, identify the ones that are first in a physically-contiguous + * sequence of such blocks, and only for those walk the sequence to + * check if there are enough free blocks starting at a properly aligned + * block. Thus, no block is checked for free-ness more than twice. + */ + TAILQ_FOREACH(m, &fl[max_order].pl, listq) { /* - * If this is not the first free oind-block in this range, bail - * out. We have seen the first free block already, or will see - * it before failing to find an appropriate range. + * Skip m unless it is first in a sequence of free max page + * blocks >= low in its segment. */ - seg = &vm_phys_segs[m_listed->segind]; - lbound = low > seg->start ? low : seg->start; - pa_pre = pa - (page_size << oind); - m = &seg->first_page[atop(pa_pre - seg->start)]; - if (pa != 0 && pa_pre >= lbound && m->order == oind) + seg = &vm_phys_segs[m->segind]; + if (VM_PAGE_TO_PHYS(m) < MAX(low, seg->start)) + continue; + if (VM_PAGE_TO_PHYS(m) >= max_size && + VM_PAGE_TO_PHYS(m) - max_size >= MAX(low, seg->start) && + max_order == m[-1 << max_order].order) continue; - - if (!vm_addr_align_ok(pa, alignment)) - /* Advance to satisfy alignment condition. */ - pa = roundup2(pa, alignment); - else if (frag != 0 && lbound + frag <= pa) { - /* - * Back up to the first aligned free block in this - * range, without moving below lbound. - */ - pa_end = pa; - for (order = oind - 1; order >= 0; order--) { - pa_pre = pa_end - (page_size << order); - if (!vm_addr_align_ok(pa_pre, alignment)) - break; - m = &seg->first_page[atop(pa_pre - seg->start)]; - if (pa_pre >= lbound && m->order == order) - pa_end = pa_pre; - } - /* - * If the extra small blocks are enough to complete the - * fragment, use them. Otherwise, look to allocate the - * fragment at the other end. - */ - if (pa_end + frag <= pa) - pa = pa_end; - } - - /* Advance as necessary to satisfy boundary conditions. */ - if (!vm_addr_bound_ok(pa, size, boundary)) - pa = roundup2(pa + 1, boundary); - pa_end = pa + size; /* - * Determine if the address range is valid (without overflow in - * pa_end calculation), and fits within the segment. + * Advance m_ret from m to the first of the sequence, if any, + * that satisfies alignment conditions and might leave enough + * space. */ - if (pa_end < pa || seg->end < pa_end) - continue; - - m_ret = &seg->first_page[atop(pa - seg->start)]; + m_ret = m; + while (!vm_addr_ok(VM_PAGE_TO_PHYS(m_ret), + size, alignment, boundary) && + VM_PAGE_TO_PHYS(m_ret) + size <= MIN(high, seg->end) && + max_order == m_ret[1 << max_order].order) + m_ret += 1 << max_order; /* - * Determine whether there are enough free oind-blocks here to - * satisfy the allocation request. + * Skip m unless some block m_ret in the sequence is properly + * aligned, and begins a sequence of enough pages less than + * high, and in the same segment. */ - pa = VM_PAGE_TO_PHYS(m_listed); - do { - pa += page_size << oind; - if (pa >= pa_end) - return (m_ret); - m = &seg->first_page[atop(pa - seg->start)]; - } while (oind == m->order); + if (VM_PAGE_TO_PHYS(m_ret) + size > MIN(high, seg->end)) + continue; /* - * Determine if an additional series of free blocks of - * diminishing size can help to satisfy the allocation request. + * Skip m unless the blocks to allocate starting at m_ret are + * all free. */ - while (m->order < oind && - pa + 2 * (page_size << m->order) > pa_end) { - pa += page_size << m->order; - if (pa >= pa_end) - return (m_ret); - m = &seg->first_page[atop(pa - seg->start)]; + for (m_iter = m_ret; + m_iter < m_ret + npages && max_order == m_iter->order; + m_iter += 1 << max_order) { } + if (m_iter < m_ret + npages) + continue; + return (m_ret); } return (NULL); } @@ -1508,11 +1475,10 @@ vm_phys_find_queues_contig( } if (order < VM_NFREEORDER) return (NULL); - /* Search for a long-enough sequence of small blocks. */ - oind = VM_NFREEORDER - 1; + /* Search for a long-enough sequence of max-order blocks. */ for (pind = 0; pind < VM_NFREEPOOL; pind++) { fl = (*queues)[pind]; - m_ret = vm_phys_find_freelist_contig(fl, oind, npages, + m_ret = vm_phys_find_freelist_contig(fl, npages, low, high, alignment, boundary); if (m_ret != NULL) return (m_ret); @@ -1593,6 +1559,18 @@ vm_phys_alloc_contig(int domain, u_long npages, vm_paddr_t low, vm_paddr_t high, /* Return excess pages to the free lists. */ fl = (*queues)[VM_FREEPOOL_DEFAULT]; vm_phys_enq_range(&m_run[npages], m - &m_run[npages], fl, 0); + + /* Return page verified to satisfy conditions of request. */ + pa_start = VM_PAGE_TO_PHYS(m_run); + KASSERT(low <= pa_start, + ("memory allocated below minimum requested range")); + KASSERT(pa_start + ptoa(npages) <= high, + ("memory allocated above maximum requested range")); + seg = &vm_phys_segs[m_run->segind]; + KASSERT(seg->domain == domain, + ("memory not allocated from specified domain")); + KASSERT(vm_addr_ok(pa_start, ptoa(npages), alignment, boundary), + ("memory alignment/boundary constraints not satisfied")); return (m_run); } From nobody Wed Nov 15 15:22:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVn342RRVz50Pjq; Wed, 15 Nov 2023 15:22:24 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SVn34210Rz3Qs4; Wed, 15 Nov 2023 15:22:24 +0000 (UTC) (envelope-from mhorne@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700061744; h=from:from:reply-to:subject: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:autocrypt:autocrypt; bh=i7/rbzGqd6+0hYprJABHwNIVe2D8dP4ZKvHSznLGJcM=; b=qAYPcTuqLt4te+eDKYUyNycZ4bIoLQYPcI6SUU0OMqvqU/sC6TmpuF8w0fPX9kp9GlS5rK Jx+zZIiTkTRqo9nkp1dsPDEciRjcc/nT8M8GmbdMm33HnwU5Hf2Uaapjup87d87h3+uziY Ql9xuGeH0MfT3JXGAgJLdKtTrxR5ID0vCqzDd/HlOMuOVcPLWm7CKIoQEs7/uPkbp8TvQN 5GKpJZW6EQi1qREOHtOjPXWEGkCWEC1sr4XU6MNOj5n/kLrdeBeYsb4AuWmG1Z6Fb4QbTq OaJFK+XR2rGklSQvbnGZx/0t9YIjafI6YhDDKoqkklBaF7wS32l8t6yHPPI+pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700061744; h=from:from:reply-to:subject: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:autocrypt:autocrypt; bh=i7/rbzGqd6+0hYprJABHwNIVe2D8dP4ZKvHSznLGJcM=; b=TP4JPGgQOf/YAoPHaqvHFfFDhKH5CP7t43FxqJQzXFoYeR26dtWGpn6wfFonzD07IDlIkF vf3N44adtLpfUUARnDv6ysS5zFm6X0YN6tiZ3Tn4x7Z9nfrX+vxHGABDn0Q6lls4k2EUu5 3rnj0ddbFwzFsEMr8pfXe/hM6YoGpD01UPW3sclFR6WKZ3CmG37HN2eXufEuUmTQUBJqiV 2j3ezfAiScC+VAtvcyPL84XCwWnnOmaOjoT6SluYjVP3R7RjGUiJdEPP592QtW/kTHXfxF F/H57xZGnxYryb5UB8q5fR63zTVcjB8J7x3/GMtlbgHFxkXtBu+5DhU9F4h3LA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700061744; a=rsa-sha256; cv=none; b=LOCnSBMtH6B70nV7fOfFD+qk3A/GPb+PbX0apkFFZROeaE2u/jt6II8yxc7A8fbtvH889G qWLANLTg3lVftFxkCdKr+QPFo3rwyXb8UFvEaPlOl2muCriRm/tN1qYTZuRfIeEj1m+XBM 35f7TRQMEtQpQQofYYroegj2ifS0QCqt2fpi+EJWkUF9Iozmwc3IORsapWRGTUI14I46M7 uqU3IWc9MhtFBTBLODsH9DkU5WmZxFxKGWYQjoggbo+bX+O+bCTMOK+LczWHuMWDZGl3Z1 7wWs7KYHjJ7AFeHYv7Xs0qBYp+qDn/BzkEppgDhwg3GZAmERbur/h9TXai6hzg== Received: from [192.168.1.151] (host-173-212-76-127.public.eastlink.ca [173.212.76.127]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SVn336PLVz2nr; Wed, 15 Nov 2023 15:22:23 +0000 (UTC) (envelope-from mhorne@freebsd.org) Message-ID: Date: Wed, 15 Nov 2023 11:22:22 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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: b2e41172bdc0 - main - A skeleton kernel module suitable for creating new such modules. Content-Language: en-CA To: "George V. Neville-Neil" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202311142111.3AELBWJn067834@gitrepo.freebsd.org> From: Mitchell Horne Autocrypt: addr=mhorne@freebsd.org; keydata= xsBNBFyS2dQBCADdiXBG8hBVLmYbxu7aSzbwLwUf3HkGFz3rooS1kwyy+SfmjZ4UKNnl9WMx WKrJ7OAZpiNH6bLQ5nsqfx09OnpWL8c/QuPbhNdUywQoqqYpRI0K8GEn//nS9Gs0KTYwVpWb XlrzP+jf3Uh/9L5mcQmStLIH4zaaqMYHW+pMuPrvBmLIHTvLj2QjOkxslrcUdord9uvxe5Ht LU8RuTpQpHOKz705Z9/v7twFdi2HtKzpLwO6SzVyu351di1J+GihsVpcT5josQV5cHbIP3Un x+kmtKBEEc/jl/zBglF7ruWUtwgbryID+2ZPEaO1Mj+RResX4LFVMusq3uUpWRb5WJXxABEB AAHNI01pdGNoZWxsIEhvcm5lIDxtaG9ybmVARnJlZUJTRC5vcmc+wsCUBBMBCgA+AhsDBQsJ CAcCBhUKCQgLAgQWAgMBAh4BAheAFiEEkp/cYPcfabAiQvACi/gnTOdUid8FAmIyDpUFCQtC z0EACgkQi/gnTOdUid8IsQf+N8IptrrCgifT5Z0/WUVFfnHThFOKf4zBjaGswsIM8+VKsKnF 15jCWHODUHP6s+dcQ4nQi81PHPsnMfBSkGPvN/X3ess2/1KUVkH+6tAJbqXDjXhD8HT+i0NM QEFIXlLnotpgIKW3yOHjKv3ZvKw9LCvUjyNY9vOJmLk/6AbbkFh+INo65nXtQWb/hM5FVEHW S+zUoU8AqZRJoVAQfj9wmIfg/HdsxeDGKL0zkv5AwKpccvb8VJNGJbCVMgoy5uQYcUeXxcie cg0VlbFLshNQTfyhVQ85vyuHahARrUWs/k8KiYODoBnW1ChtyF8yM6VZTzSYx7pINqPq2YZy i/Htd87ATQRcktnUAQgA3zt4M4ecoQqfxpjliNLujt9klDqvmkJvWmzMuMXdzlPgGRJ0doio 9YIeEdkOt6xN0pPTK/ReCZ8WqFQ8zo23u1pwGuo0CnR58XF19wyxyUuKu/PHbt+56mC8tNHm AXsMyXQmlDqWvn/WzLY7euNRtNS4QQIwtxfM5EC4GGa5KQwxn0kM7dkUSOE/cxr+/kNbHHzb gagZR4cnNUqtPPr3dYXcibCTzgz96Lyt3/qMLXX9RTBRzu+O6E+byxWOe8ar/ZlwY2b4wTQG mhgNttkSxKtxMpZnd8+DGV/bI1P5Ct/K2GeCwNyupQGON5ymn6o7jTch+qmFX0ItkBWO4zn4 9QARAQABwsB8BBgBCgAmAhsMFiEEkp/cYPcfabAiQvACi/gnTOdUid8FAmIyDtwFCQtCz4gA CgkQi/gnTOdUid/i5gf/aQ75pJR4TJFM2vVVr6PDIwTdl0b5EchB4w4s4g/zE84XNbMOQanb BginLYEhAacLQVAvM3XdvUEhwrhaMQdjdSEB1krResL3/mbxrtKwdHSMbHA3IS3XdvxFWTB7 P5JjUSPsW6hqgoidbn4w3OxaNHhs45H2b0Nx5QiKcSyepmCZuB52gCEHnEnrdaz8TFQMXOLq 94WbTmZeIjChW3FB61m1gTf0UEFjoZAfTAUB+pbwoCa4AykIeZnDC19vjsruVU9Gy5rLglwd bjsZNfXIJGOZNEvdF8FOBwM7DlXx7SYvTJcUNoNJjOKtQ0bYGVgGqYOB/y2mTjVuKeU0eOkN Uw== In-Reply-To: <202311142111.3AELBWJn067834@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/14/23 17:11, George V. Neville-Neil wrote: > The branch main has been updated by gnn: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b2e41172bdc00f177f7de4d4f4963cc4d99a3178 > > commit b2e41172bdc00f177f7de4d4f4963cc4d99a3178 > Author: George V. Neville-Neil > AuthorDate: 2023-10-05 20:05:31 +0000 > Commit: George V. Neville-Neil > CommitDate: 2023-11-14 21:08:13 +0000 > > A skeleton kernel module suitable for creating new such modules. I do not like to use my voice to squash the work of others, especially after it has hit the tree. But I dare to say that you didn't have to work very hard on this. So understand my honest question: what is the purpose of this addition? If it is well thought out then it is not clearly explained. Cheers, Mitchell > --- > share/examples/modules/Makefile | 6 +++ > share/examples/modules/skel.c | 87 +++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 93 insertions(+) > > diff --git a/share/examples/modules/Makefile b/share/examples/modules/Makefile > new file mode 100644 > index 000000000000..0f0a2fb01e8a > --- /dev/null > +++ b/share/examples/modules/Makefile > @@ -0,0 +1,6 @@ > +.PATH: ${SRCTOP}/sys/skel > + > +KMOD= skel > +SRCS= skel.c > + > +.include > diff --git a/share/examples/modules/skel.c b/share/examples/modules/skel.c > new file mode 100644 > index 000000000000..fc99e13ab444 > --- /dev/null > +++ b/share/examples/modules/skel.c > @@ -0,0 +1,87 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause > + * > + * Copyright (c) 2023 George V. Neville-Neil > + * > + * 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. > + * > + */ > + > +/* > + * SKEL Loadable Kernel Module for the FreeBSD Operating System > + * > + * The SKEL module is meant to act as a skeleton for creating new > + * kernel modules. > + * > + * This module can be loaded and unloaded from * FreeBSD and is for > + * use in teaching as well. > + * > + */ > + > +#include > +#include > +#include > +#include > +#include > + > +/* > + * Every module can hav ea module specific piece of code that is > + * executed whenever the module is loaded or unloaded. The following > + * is a trivial example that prints a message on the console whenever > + * the module is loaded or unloaded. > + */ > + > +static int > +skel_mod_event(module_t mod, int type, void *data) > +{ > + > + switch (type) { > + case MOD_LOAD: > + printf("SKEL module loading.\n"); > + return (0); > + case MOD_UNLOAD: > + printf("SKEL module unloadin.\n"); > + return (0); > + } > + return (EOPNOTSUPP); > +} > + > +/* > + * Modules can have associated data and the module data also contains > + * an entry for the function called by the kernel on load and unload. > + */ > + > +static moduledata_t skel_mod = { > + "skel", > + skel_mod_event, > + NULL, > +}; > + > +/* > + * Each module is declared with its name and module data. The > + * ordering arguments at the end put this module into the device > + * driver class, which is sufficient for our needs. The complete list > + * of modules types and ording can be found in sys/kernel.h > + */ > + > +DECLARE_MODULE(skel, skel_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); > + From nobody Wed Nov 15 16:49:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVpz902XNz50TmB; Wed, 15 Nov 2023 16:49: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 4SVpz86f6Gz3ddg; Wed, 15 Nov 2023 16:49:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700066948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=toRB9PpmWrbhDNThBKHLee/4nF2o+DUNVYtY6DzdPSw=; b=SiiCYl8SyMM5RDBLEHj8UVRavDJGOrYV6fbh2d1yuzwT94ZPj8TvqZUdeKqB+0iRcP7WFZ 5NAF+ACl2g516A+FxN33KHbxsgwVIHE07ImEYuYcD3t5yyTrhm1hiirM9ypl33fvia7JhD m2VEPf57KPZdUCTsXeTxG2p9hBV9bv2uELXg+kp/ULJKt3U5fna7/ht6Xq+kW8xF+tP7Ra AVnsL/f48fHjcsoXcRZKxWqLunRfHFuaaemXfx9wzmAwnJlte3KMILER3G9KHZmLPA9/cM EoWmmju+0DIT2cXTG3hGZz9HVRp3sPZ+SPOv9k8AjOkMtSB7M0A7wQmTgHKYdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700066948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=toRB9PpmWrbhDNThBKHLee/4nF2o+DUNVYtY6DzdPSw=; b=cI+cUwRjTy1YymZBl46DRX1vxjTXT8EWZbYqkAPEYxJ4kmSYUB7/klcGZKz/2bwPyvE01i IfenogLQyD01J3VF8Z2w+6hSmcpWOCJIQnnPt+eBY1POGufXhylibhmYlKX4hwXUnoFUCW 1Zdg6maHO4sj7qZcnIDtNiADZVIsYAC9uq6X6/epGoVM3nWpze0PiQ8pq8TmkTDjUohYs9 o48mQqbdOoPliGGZkIlyMrCM6gu17YxNXG0kn34qvZMBb/+eLUrMDSCdP9rKVs2KR9Gnz6 k+HYDzRWvHHNg4GaF/nv56qbZ3PTcx34RS2nwmmx6/7fmrhomef3JtSzPgrBuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700066948; a=rsa-sha256; cv=none; b=nLltGCmyvvraqeUXP4AC71dRCgLDFF5Wf5qYWCc7usaNq0b2cqgIGjCj7IBOp2GW2Y2tq1 BKt7QOxAyb/pM4S3Tp5+Ip7J3WMncfo+MoO+nLHevB4HtTT5eWvpQE/BX06up5RyldX5OQ e2sNNFfzvXeQwmtnBeJHRJSt6t7YEMtf7nmzJow6hZKkoii2TeotfXkNHtJMoCWypeeBAS c3RDU9gWiscZk6EI7C9df/iNQFfMK/7y8NSsWXMXZ6fzwlzEiCs3tUUR6yv9/qLllrVboF UV2xdC8Egiy8+zJ67rq3qBDAGP6zV/tiqsHPKhuDb1CcS1sAugEGMlYT0WSr8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVpz85h4vz8lN; Wed, 15 Nov 2023 16:49: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 3AFGn89g027730; Wed, 15 Nov 2023 16:49:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFGn8L6027727; Wed, 15 Nov 2023 16:49:08 GMT (envelope-from git) Date: Wed, 15 Nov 2023 16:49:08 GMT Message-Id: <202311151649.3AFGn8L6027727@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: ba0e4d7971e0 - main - smbios: handle smbios3 for arm64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ba0e4d7971e05ee64281a4fc49a2fb408c8ad816 Auto-Submitted: auto-generated The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=ba0e4d7971e05ee64281a4fc49a2fb408c8ad816 commit ba0e4d7971e05ee64281a4fc49a2fb408c8ad816 Author: Andrew Gallatin AuthorDate: 2023-11-15 16:11:53 +0000 Commit: Andrew Gallatin CommitDate: 2023-11-15 16:20:04 +0000 smbios: handle smbios3 for arm64 Get smbios working on arm64 where it seems to be exclusively smbios version 3.x The "interesting" thing here is that the smbios table seems to be RAM in the EFI runtime services table. This makes it owned by "ram0", and not io memory. That prevents bus_alloc_resource() from being able to claim it, since ram0 already owns it. According to jhb, this is how things are supposed to work. Eg, bus_alloc_resource() is meant to be used with IO memory, not physical memory. Following his suggestion, I converted the driver to simply use pmap_mapbios(). This is a prerequisite for getting IPMI to attach via the SSIF attachment on arm64 servers, where all IPMI that I've seen uses SSIF. Note that this change is based on initial work by Allan Jude in https://reviews.freebsd.org/D28739. Reviewed by: imp Sponsored by: Netflix, Ampere Computing LLC (D28739) Differential Revision: https://reviews.freebsd.org/D42592 --- sys/dev/smbios/smbios.c | 176 ++++++++++++++++++++++++++++++++---------------- sys/dev/smbios/smbios.h | 15 +++++ 2 files changed, 132 insertions(+), 59 deletions(-) diff --git a/sys/dev/smbios/smbios.c b/sys/dev/smbios/smbios.c index b9dd8a40e9e4..7f89430226c8 100644 --- a/sys/dev/smbios/smbios.c +++ b/sys/dev/smbios/smbios.c @@ -57,41 +57,49 @@ struct smbios_softc { device_t dev; - struct resource * res; - int rid; - - struct smbios_eps * eps; + union { + struct smbios_eps * eps; + struct smbios3_eps * eps3; + }; + bool is_eps3; }; -#define RES2EPS(res) ((struct smbios_eps *)rman_get_virtual(res)) - static void smbios_identify (driver_t *, device_t); static int smbios_probe (device_t); static int smbios_attach (device_t); static int smbios_detach (device_t); static int smbios_modevent (module_t, int, void *); -static int smbios_cksum (struct smbios_eps *); +static int smbios_cksum (void *); +static bool smbios_eps3 (void *); static void smbios_identify (driver_t *driver, device_t parent) { #ifdef ARCH_MAY_USE_EFI struct uuid efi_smbios = EFI_TABLE_SMBIOS; + struct uuid efi_smbios3 = EFI_TABLE_SMBIOS3; void *addr_efi; #endif struct smbios_eps *eps; + struct smbios3_eps *eps3; + void *ptr; device_t child; vm_paddr_t addr = 0; + size_t map_size = sizeof (*eps); int length; - int rid; if (!device_is_alive(parent)) return; #ifdef ARCH_MAY_USE_EFI - if (!efi_get_table(&efi_smbios, &addr_efi)) + if (!efi_get_table(&efi_smbios3, &addr_efi)) { addr = (vm_paddr_t)addr_efi; + map_size = sizeof (*eps3); + } else if (!efi_get_table(&efi_smbios, &addr_efi)) { + addr = (vm_paddr_t)addr_efi; + } + #endif #if defined(__amd64__) || defined(__i386__) @@ -101,28 +109,50 @@ smbios_identify (driver_t *driver, device_t parent) #endif if (addr != 0) { - eps = pmap_mapbios(addr, 0x1f); - rid = 0; - length = eps->length; - - if (length != 0x1f) { + ptr = pmap_mapbios(addr, map_size); + if (ptr == NULL) + return; + if (map_size == sizeof (*eps3)) { + eps3 = ptr; + length = eps3->length; + if (memcmp(eps3->anchor_string, + SMBIOS3_SIG, SMBIOS3_LEN) != 0) { + printf("smbios3: corrupt sig %s found\n", + eps3->anchor_string); + return; + } + } else { + eps = ptr; + length = eps->length; + if (memcmp(eps->anchor_string, + SMBIOS_SIG, SMBIOS_LEN) != 0) { + printf("smbios: corrupt sig %s found\n", + eps->anchor_string); + return; + } + } + if (length != map_size) { u_int8_t major, minor; major = eps->major_version; minor = eps->minor_version; /* SMBIOS v2.1 implementation might use 0x1e. */ - if (length == 0x1e && major == 2 && minor == 1) + if (length == 0x1e && major == 2 && minor == 1) { length = 0x1f; - else + } else { + pmap_unmapbios(eps, map_size); return; + } } child = BUS_ADD_CHILD(parent, 5, "smbios", -1); device_set_driver(child, driver); - bus_set_resource(child, SYS_RES_MEMORY, rid, addr, length); + + /* smuggle the phys addr into probe and attach */ + bus_set_resource(child, SYS_RES_MEMORY, 0, addr, length); device_set_desc(child, "System Management BIOS"); - pmap_unmapbios(eps, 0x1f); + pmap_unmapbios(ptr, map_size); } return; @@ -131,28 +161,27 @@ smbios_identify (driver_t *driver, device_t parent) static int smbios_probe (device_t dev) { - struct resource *res; - int rid; + vm_paddr_t pa; + vm_size_t size; + void *va; int error; error = 0; - rid = 0; - res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (res == NULL) { - device_printf(dev, "Unable to allocate memory resource.\n"); - error = ENOMEM; - goto bad; + + pa = bus_get_resource_start(dev, SYS_RES_MEMORY, 0); + size = bus_get_resource_count(dev, SYS_RES_MEMORY, 0); + va = pmap_mapbios(pa, size); + if (va == NULL) { + device_printf(dev, "Unable to map memory.\n"); + return (ENOMEM); } - if (smbios_cksum(RES2EPS(res))) { + if (smbios_cksum(va)) { device_printf(dev, "SMBIOS checksum failed.\n"); error = ENXIO; - goto bad; } -bad: - if (res) - bus_release_resource(dev, SYS_RES_MEMORY, rid, res); + pmap_unmapbios(va, size); return (error); } @@ -160,46 +189,55 @@ static int smbios_attach (device_t dev) { struct smbios_softc *sc; - int error; + void *va; + vm_paddr_t pa; + vm_size_t size; sc = device_get_softc(dev); - error = 0; - sc->dev = dev; - sc->rid = 0; - sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->rid, - RF_ACTIVE); - if (sc->res == NULL) { - device_printf(dev, "Unable to allocate memory resource.\n"); - error = ENOMEM; - goto bad; + pa = bus_get_resource_start(dev, SYS_RES_MEMORY, 0); + size = bus_get_resource_count(dev, SYS_RES_MEMORY, 0); + va = pmap_mapbios(pa, size); + if (va == NULL) { + device_printf(dev, "Unable to map memory.\n"); + return (ENOMEM); + } + sc->is_eps3 = smbios_eps3(va); + + if (sc->is_eps3) { + sc->eps3 = va; + device_printf(dev, "Version: %u.%u", + sc->eps3->major_version, sc->eps3->minor_version); + } else { + sc->eps = va; + device_printf(dev, "Version: %u.%u", + sc->eps->major_version, sc->eps->minor_version); + if (bcd2bin(sc->eps->BCD_revision)) + printf(", BCD Revision: %u.%u", + bcd2bin(sc->eps->BCD_revision >> 4), + bcd2bin(sc->eps->BCD_revision & 0x0f)); } - sc->eps = RES2EPS(sc->res); - - device_printf(dev, "Version: %u.%u", - sc->eps->major_version, sc->eps->minor_version); - if (bcd2bin(sc->eps->BCD_revision)) - printf(", BCD Revision: %u.%u", - bcd2bin(sc->eps->BCD_revision >> 4), - bcd2bin(sc->eps->BCD_revision & 0x0f)); printf("\n"); - return (0); -bad: - if (sc->res) - bus_release_resource(dev, SYS_RES_MEMORY, sc->rid, sc->res); - return (error); } static int smbios_detach (device_t dev) { struct smbios_softc *sc; + vm_size_t size; + void *va; sc = device_get_softc(dev); + va = (sc->is_eps3 ? (void *)sc->eps3 : (void *)sc->eps); + if (sc->is_eps3) + va = sc->eps3; + else + va = sc->eps; + size = bus_get_resource_count(dev, SYS_RES_MEMORY, 0); - if (sc->res) - bus_release_resource(dev, SYS_RES_MEMORY, sc->rid, sc->res); + if (va != NULL) + pmap_unmapbios(va, size); return (0); } @@ -249,16 +287,36 @@ MODULE_DEPEND(smbios, efirt, 1, 1, 1); #endif MODULE_VERSION(smbios, 1); + +static bool +smbios_eps3 (void *v) +{ + struct smbios3_eps *e; + + e = (struct smbios3_eps *)v; + return (memcmp(e->anchor_string, SMBIOS3_SIG, SMBIOS3_LEN) == 0); +} + static int -smbios_cksum (struct smbios_eps *e) +smbios_cksum (void *v) { + struct smbios3_eps *eps3; + struct smbios_eps *eps; u_int8_t *ptr; u_int8_t cksum; + u_int8_t length; int i; - ptr = (u_int8_t *)e; + if (smbios_eps3(v)) { + eps3 = (struct smbios3_eps *)v; + length = eps3->length; + } else { + eps = (struct smbios_eps *)v; + length = eps->length; + } + ptr = (u_int8_t *)v; cksum = 0; - for (i = 0; i < e->length; i++) { + for (i = 0; i < length; i++) { cksum += ptr[i]; } diff --git a/sys/dev/smbios/smbios.h b/sys/dev/smbios/smbios.h index 286f4f4ca3ac..42b7e1181486 100644 --- a/sys/dev/smbios/smbios.h +++ b/sys/dev/smbios/smbios.h @@ -38,6 +38,8 @@ #define SMBIOS_OFF 0 #define SMBIOS_LEN 4 #define SMBIOS_SIG "_SM_" +#define SMBIOS3_LEN 5 +#define SMBIOS3_SIG "_SM3_" struct smbios_eps { uint8_t anchor_string[4]; /* '_SM_' */ @@ -56,6 +58,19 @@ struct smbios_eps { uint8_t BCD_revision; } __packed; +struct smbios3_eps { + uint8_t anchor_string[5]; /* '_SM3_' */ + uint8_t checksum; + uint8_t length; + uint8_t major_version; + uint8_t minor_version; + uint8_t docrev; + uint8_t entry_point_revision; + uint8_t reserved; + uint32_t structure_table_max_size; + uint64_t structure_table_address; +}; + struct smbios_structure_header { uint8_t type; uint8_t length; From nobody Wed Nov 15 16:51:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVq2d5cTfz50VNh for ; Wed, 15 Nov 2023 16:52:09 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (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 4SVq2d1WQXz3dm4 for ; Wed, 15 Nov 2023 16:52:09 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.208.182 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com; dmarc=none Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2c79d8b67f3so80208751fa.0 for ; Wed, 15 Nov 2023 08:52:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700067126; x=1700671926; 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=IxH+zU6PtX+f7yasxL1o8jfymNB65es4KA049KL49Yg=; b=EMRtc7MJtOVHmCDlk/FY6I29csewG2dSnm5Ydh8reJu9u4gcmGyC5B+1zj6/Gro+uG fCKvsQ9TJUJbz/jB46G1gCTZTacfQ/8rreOsvSFfDq2f0K45Q/ymbATWNI3yhPFL36ah KkbM2PfuP8HAUI1LGvq525JYu3Y/WwVupIiaoKjPj+v5bx3hR0kEzS4Dd3KfPvq7x75J yS8DE1dZxAHGHdCU6Qa8aE+9zpO761xiQsJXY3rbNWNhsgbJDyijZ246jjmH/8EYiQJ3 +0C3Hrp+cx1izE34H4hK86BaMqExydQRuAD7wJpTci0nfUMglbRvCRGcd7AcUE5F3GFR XbSw== X-Gm-Message-State: AOJu0YwrhdH5fFFjzhH4EE9bJK5lj8kw7RFwGFZELnj6HplFP+x2AMws TAkqlf2MmziIUmILIss0RH9NWQ== X-Google-Smtp-Source: AGHT+IFbd9rh1ym9u35R1Bm8ONM4s3iTGzRBfDDASahQ3eO1ju6UZ4vqOB2Q89AeocliIGvVoCvqjg== X-Received: by 2002:a2e:b0e8:0:b0:2c7:fa5:6db9 with SMTP id h8-20020a2eb0e8000000b002c70fa56db9mr4132248ljl.48.1700067125662; Wed, 15 Nov 2023 08:52:05 -0800 (PST) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id f19-20020a05600c4e9300b00405d9a950a2sm243844wmq.28.2023.11.15.08.52.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Nov 2023 08:52: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: 3fd60a6b73ac - main - awk: Merge upstream 2nd Edition Awk Book From: Jessica Clarke In-Reply-To: <202311140451.3AE4p5AR014207@gitrepo.freebsd.org> Date: Wed, 15 Nov 2023 16:51:54 +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: <202311140451.3AE4p5AR014207@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Spamd-Result: default: False [-2.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.182:from]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.182:from]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; R_DKIM_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4SVq2d1WQXz3dm4 X-Spamd-Bar: -- On 14 Nov 2023, at 04:51, Warner Losh wrote: >=20 > The branch main has been updated by imp: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D3fd60a6b73ac01a72df89751f173970f= ae4cae73 >=20 > commit 3fd60a6b73ac01a72df89751f173970fae4cae73 > Merge: 194df014feeb 2e406c584fe4 > Author: Warner Losh > AuthorDate: 2023-11-02 16:32:01 +0000 > Commit: Warner Losh > CommitDate: 2023-11-14 04:49:34 +0000 >=20 > awk: Merge upstream 2nd Edition Awk Book >=20 > Merge in the November 2nd, 2023 version of one true awk. >=20 > This brings in Unicode support, CSV support and a number of bug = fixes. >=20 > Sponsored by: Netflix > Reviewed by: delphij > Differential Revision: https://reviews.freebsd.org/D42447 This seems to have broken the GitHub CI for cross-building; contrast: https://github.com/freebsd/freebsd-src/actions/runs/6859373313 with: https://github.com/freebsd/freebsd-src/actions/runs/6859316228 Has this broken makeobjops.awk somehow? If so it should be reproducible on FreeBSD with BOOTSTRAP_ALL_TOOLS=3D1, or by rebuilding on an updated system. Cross-building will just show it first because we always bootstrap awk there, like many other tools. Jess From nobody Wed Nov 15 17:51:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVrMG1hNLz50YTn; Wed, 15 Nov 2023 17:51: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 4SVrMG1FJGz4JBj; Wed, 15 Nov 2023 17:51:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700070698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1yMUVqlGDPl4XBG2rwLgUc1JG3ncbMkOjvmG+k4+qck=; b=nqwWBy6xy9luy+8b6iED8v313VHIDG6cNXa+PdybjZsu7TLm3YP+/9kV2+Nh+CW8l0AA1X oeYAe2lW5Pic9rfnmqtkxrCKhbraoRYwlRXU0silq0OF5r5BdF7NVkBdQM1+1V0uBPIQdS zfdlKd/ECkA4Hlt2rDcoyPoFbSsif5fJHfdHCSDGoY3CuQnPT0GNMkCErXfVXG1oPjtV0K OH2MCWuGG8eI+NN7wpy64msbDLQUb42w8FCXZcVdWhw+kEieCM6v85hemkttZIp90eyXK1 Eik7Ccu60NCYzSExnFlEPSz2bYGzqEysQSk2LVeNYMa6xkk3k6d0pyECJKFchg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700070698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1yMUVqlGDPl4XBG2rwLgUc1JG3ncbMkOjvmG+k4+qck=; b=S79ps5Jrhxj+pTBLkihzJuGKVcExdqb3BseN/Kx2+84HG65hhFIk1rNk4cdKNn6R+SE8Jl 8bRk+f3Qbnv7sVWhfiNJoxwmz2C9z/ydK0+5F2FNdlcMqULwc7WceTw0boBuMFBTzHbZeI aLMtdKYc5Z0U15J9cA94IE+F+m5ty9HZ0lHQonOJ4qGtV+0WJqaZDL74bHp/FGFcQoEo0s LVjoTeMwZaD9yJcsmzm4KRLGGIAL1X58RXK3nA+nm6tpx3ZTi4xsXVpV0wdtsyxGTPdfYu tVWUHm537VgnNGDTu1bWbZewqscDIFgsRctA6GBYMnmFxmau68gFISPnpNHPdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700070698; a=rsa-sha256; cv=none; b=LA1KywvDVh0SkdKdmU9J4X/t71DbA6y3of/FvP/2bXM7boyi4qOTEbNn4snhFrzvHFG5EG hCpCbF5czxgAqHyLIdOCclgcRewBNppS86cXf9FWAJ1T8v3SJ5G9oLv7iP/KmRlEdTuDnJ isPRvQLVE+4egVXSeEkiQnFguLOhoT3TJ9Cxp9eLuIDUQ4nfPAi1KgV8hffRLX9Bca4SaV mqMProWqb4NnmCzQ0MFc5fhqBmX2SVl0+zZOA+UIYOvDcUd37ujq36MpaRCNBpS/qK5kM6 AQVRQB3OBLQSUxtdEVuGJF4STRv19U3j77lL9sWMyAgn2m4nqe+S2sp2cTWRcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVrMG0JT0zBnq; Wed, 15 Nov 2023 17:51: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 3AFHpbKM038101; Wed, 15 Nov 2023 17:51:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFHpbCw038098; Wed, 15 Nov 2023 17:51:37 GMT (envelope-from git) Date: Wed, 15 Nov 2023 17:51:37 GMT Message-Id: <202311151751.3AFHpbCw038098@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: afe1e6ba860b - main - Sort .git-blame-ignore-revs by commit order List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: afe1e6ba860bb3733d9aae9083ce2622597cabfc Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=afe1e6ba860bb3733d9aae9083ce2622597cabfc commit afe1e6ba860bb3733d9aae9083ce2622597cabfc Author: Brooks Davis AuthorDate: 2023-11-15 17:46:57 +0000 Commit: Brooks Davis CommitDate: 2023-11-15 17:46:57 +0000 Sort .git-blame-ignore-revs by commit order This makes it easier to add blocks of commits such as 4ca5df80393e1f2..c90d0600ee000e78 which do a single thing over the course of multiple commits. Sorting by hash would require manually inserting each one with a comment. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42601 --- .git-blame-ignore-revs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 2a4ab51f89c1..356201cef3c9 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -6,11 +6,11 @@ # `git config --global blame.ignoreRevsFile .git-blame-ignore-revs`. GitHub's # blame view also uses this by default. # -# For consistency this file is sorted by hash. +# This file is sorted in git log order (newest commits first). +# elfctl whitespace +828e50092ac84f50247fb3f400027fc7510d8141 # regen syscall files after d51198d63b63 2c9764f36b6f20e9a6c71ce64a21988a394050b6 # Remove whitespace at EOL. 7ebcc426efefea9cd16ac6f565e72030c608f7a4 -# elfctl whitespace -828e50092ac84f50247fb3f400027fc7510d8141 From nobody Wed Nov 15 17:51:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVrMH2sQyz50Ygt; Wed, 15 Nov 2023 17:51: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 4SVrMH27MSz4JVb; Wed, 15 Nov 2023 17:51:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700070699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qajSbNm/H2ygL5i1YqTU6LbL2eNnL7ArI4lx1p5pD0w=; b=nS+uz7zF6HtaAIJzGyiEDiMmgHc14Y8xM1D8Ez8K/DIdQIHETo/bFQzHjeXgHAnmo7mY+0 +DjCbA5L1FcwL1+r3lYoJoHGr5+dts1GiWdjo+uV0m9kCNwOM2NMd0QO9btzAaQco76uDk Np1AWxORGzgq1LE90ymHYlyoErtT/wJWhZ524PUv8S2UjsaIbBQwqIvoiMOs0diJ4OVxzO H4JHabo86w5Qw3jXvwrX7sJj1a1qv1Eh2SvPZjhj4NbBblNErYFTKYw8AM5Q1lZ4kTqZAk jV6zdrHHBe8YC6boOM/3r5j5H0H4iU1uac03NbyuaCTTQF9aSghNNxvR6Fyf5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700070699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qajSbNm/H2ygL5i1YqTU6LbL2eNnL7ArI4lx1p5pD0w=; b=d4i0Hhns+bXM5gcaE8ZcalDyJAiOnnWh/LKPB810fVM6J7j/ciNK4ZfcsWAZzwlUARDdKL 5WawHHIGUVhJI/g2ZX+njwzwhkIeu9PA5C/kyeN33m9iOY4FTwQGFObe/Va1QC0AJm+pG5 n/83HPzpHnJZ13YysL83BFOlDDXNMxiwAI4HIrmQ6ALfO/S+RCyhqAUU5c39w6m57BzGhn eKNNF5OB7aJx4UJuDsh6zeSyqXYABewjfAwNNhW1L/9/vsMKYvLGIUKqJMrZCPBCh98G6K YhbUoeuZxvADtlo9nhzh7BGEdEWSqjrkCbRcIVdSwOLUtHQ4DedaRIcSdngLrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700070699; a=rsa-sha256; cv=none; b=ZRCCOuM/p2k3gQHpozJJCChg4wsIrFGPjq+n5ZoSkhax+sPZ3kqQ08Jelr/oNz+ZHbzpSv A2qdKziqP3RbqSmplVCHz6Y/KRyF5SlFQbmGLxvcl7fJSkxIjiK/qO/j39VBOE4us7SnR8 kK7aWhFha0yqzyIViC78Rp4cTIUjqZ+ccXJUF+/C8WO8g7Ipz1NSno7tlqdUWbFjVExHDd l4V5GTUTWN/BifyF4R9ehb9jTZy8CS5v9zXga/tWWd0s6AojjAeAkJE9yBIMZASUskJlM/ FrCcD6azO/bpDi59bOYvEGoQ3k0LO4TLfc6n+IZQznYgmZPNYMP7pImR9KhYJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVrMH17xdzBNC; Wed, 15 Nov 2023 17:51: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 3AFHpdXJ038147; Wed, 15 Nov 2023 17:51:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFHpd92038144; Wed, 15 Nov 2023 17:51:39 GMT (envelope-from git) Date: Wed, 15 Nov 2023 17:51:39 GMT Message-Id: <202311151751.3AFHpd92038144@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: b146e5e68abd - main - git-blame-ignore-revs: OptionalObsoleteFiles.inc sorting commits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b146e5e68abd92fa59b6c032edc3c7b134c4e155 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=b146e5e68abd92fa59b6c032edc3c7b134c4e155 commit b146e5e68abd92fa59b6c032edc3c7b134c4e155 Author: Brooks Davis AuthorDate: 2023-11-15 17:47:02 +0000 Commit: Brooks Davis CommitDate: 2023-11-15 17:47:02 +0000 git-blame-ignore-revs: OptionalObsoleteFiles.inc sorting commits Add sorting commits. This causes (suitably configured) git blame to ignore the moving of blocks, correcting the associated commit for ~300 lines. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42602 --- .git-blame-ignore-revs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 356201cef3c9..5cc8ba2a300a 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -8,6 +8,14 @@ # # This file is sorted in git log order (newest commits first). +# sort OptionalObsoleteFiles.inc blocks +c90d0600ee000e7874a55e3015953bd670574093 +2b3bf27da41f1481b2025445c6adf27f0d50de99 +fb173fc89e9c6908426bf60b1a449f1ff19d51df +16743f0e0b1567b38e5071814d61c04b557bcaa0 +a62cefbb5c835eb17057bca98106f325b13bdead +e70ad278f45d72a8209e61a312481910d3e03b45 +4ca5df80393e1f2bf6ac26af42fc7246acb59f71 # elfctl whitespace 828e50092ac84f50247fb3f400027fc7510d8141 # regen syscall files after d51198d63b63 From nobody Wed Nov 15 17:51:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVrMJ3W4sz50YPb; Wed, 15 Nov 2023 17:51: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 4SVrMJ33vpz4JYR; Wed, 15 Nov 2023 17:51:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700070700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Evc7tO4nrCcxnd7TFTKd3UVCuyODgbjZUYLbJfbXpns=; b=jxp0v4suDmVAm9ARKhimlYQk/IL3m++S0inQoci3q8hzTrxEvwkA3uRBhiEt63MVlE9sbR 81YPTw0kV0FnR0Fp3ijEVcoV5idggKnau7sJOPpc0sH1RjQC55wMGvaRD1ldTcG3XFT/7n hNGEToBoGdGMgqevUxICYGp9/zao9mKaJncQ5q8Ic0oarqTwwpxc7Fg9wJdIInsHHk+njP U339e1puKTPjxbqP1ACFHM5Pa7bKSIQENAzvC2wYAzL30g7DZhXOipXRGOgDzY9T6KHxy1 gpnqMLfq422m78ceCJoYuMrX/+BafhwMVZlBPJqVF7wdaqRIk8b6GVhpdclGZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700070700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Evc7tO4nrCcxnd7TFTKd3UVCuyODgbjZUYLbJfbXpns=; b=nd9Bo6UCPxkGjVaQh3baK0gp0Cy2br0HmShcYPInH24bblZCp/0f50BgKyMNy01qzheaS7 2EqdFPY2UzADv2R1k36MS2U/X9mJaZCeF5m05c+w/QRKxnK8qw1kT4q+CHNu3UQ/W7FhEc D/Qpe60XjqYu1IIGbDX0HCyNzfd8jHRS7M72nq/QI1B4OXxv8Lrsu3y3x0HKcZL+i6ziKl LKLAcpJnAHyV6XpSJkq4m75FvvSo3K4De55rh6wSmWBaFaZqfqY9JrsZ8qvs1kMHA0766h w4G3glKMCzxF9WNRIaHwiNY85BsRNjQPJhflUE6O2oZ4Vq/hHDt92odVpqap1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700070700; a=rsa-sha256; cv=none; b=fy+PgoaKRhDp3ooTXiMJxKYPI6CEg1KJfRN3C6/5xAfarqV1SVMQDDM/dWgFHsXMETlhB2 QwfYMM4WGrvxyrJ5xeeyjzekFmlUD9j8MjiHTQ4WZAtezs3uFIbl5slfGXTbULWI6arDJK FepTjKRaRwaTcPZaioxbCX2rA/5jw+UlLefVWQt5KXu7fYNwWcaS1l1V/9wi2TY8g7KFFY 1beFEEyIDwBfEeTL57LZY1VDBsCDRcUjHuGUHkVvVQ0A9Bi3v0ojo+VaE2W+GU67TkIxTK VXS8DUrC6XBl0GWrQ287fp1y4mpJg+nniER7wyvQ4GlLFVorp83t00c+6ccl9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVrMJ28nGzBZC; Wed, 15 Nov 2023 17:51: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 3AFHpeYT038183; Wed, 15 Nov 2023 17:51:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFHpeLL038180; Wed, 15 Nov 2023 17:51:40 GMT (envelope-from git) Date: Wed, 15 Nov 2023 17:51:40 GMT Message-Id: <202311151751.3AFHpeLL038180@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: b73eace889f1 - main - libc//sys/Makefile.inc: remove cruft List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b73eace889f1db518a7b0b3372351e0cbf550085 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=b73eace889f1db518a7b0b3372351e0cbf550085 commit b73eace889f1db518a7b0b3372351e0cbf550085 Author: Brooks Davis AuthorDate: 2023-11-15 17:50:53 +0000 Commit: Brooks Davis CommitDate: 2023-11-15 17:50:53 +0000 libc//sys/Makefile.inc: remove cruft Remove stray blank lines left over from $FreeBSD$ removal as well as some CVS-era (perhaps pre-repocopy) version comments. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42611 --- lib/libc/aarch64/sys/Makefile.inc | 1 - lib/libc/amd64/sys/Makefile.inc | 2 -- lib/libc/arm/sys/Makefile.inc | 1 - lib/libc/i386/sys/Makefile.inc | 2 -- lib/libc/powerpc/sys/Makefile.inc | 1 - lib/libc/powerpc64/sys/Makefile.inc | 1 - lib/libc/powerpcspe/sys/Makefile.inc | 1 - lib/libc/riscv/sys/Makefile.inc | 1 - lib/libc/x86/sys/Makefile.inc | 1 - 9 files changed, 11 deletions(-) diff --git a/lib/libc/aarch64/sys/Makefile.inc b/lib/libc/aarch64/sys/Makefile.inc index eb8b600208b7..7cb0544a2997 100644 --- a/lib/libc/aarch64/sys/Makefile.inc +++ b/lib/libc/aarch64/sys/Makefile.inc @@ -1,4 +1,3 @@ - MIASM:= ${MIASM:Nfreebsd[467]_*} SRCS+= __vdso_gettc.c \ diff --git a/lib/libc/amd64/sys/Makefile.inc b/lib/libc/amd64/sys/Makefile.inc index 43af1d2a85a2..32c03ccf2963 100644 --- a/lib/libc/amd64/sys/Makefile.inc +++ b/lib/libc/amd64/sys/Makefile.inc @@ -1,5 +1,3 @@ -# from: Makefile.inc,v 1.1 1993/09/03 19:04:23 jtc Exp - SRCS+= \ amd64_get_fsbase.c \ amd64_get_gsbase.c \ diff --git a/lib/libc/arm/sys/Makefile.inc b/lib/libc/arm/sys/Makefile.inc index dcc1bdb3ea03..398ac494f2bc 100644 --- a/lib/libc/arm/sys/Makefile.inc +++ b/lib/libc/arm/sys/Makefile.inc @@ -1,4 +1,3 @@ - SRCS+= __vdso_gettc.c \ sched_getcpu_gen.c diff --git a/lib/libc/i386/sys/Makefile.inc b/lib/libc/i386/sys/Makefile.inc index f89099385dc9..accdc3367ac8 100644 --- a/lib/libc/i386/sys/Makefile.inc +++ b/lib/libc/i386/sys/Makefile.inc @@ -1,5 +1,3 @@ -# from: Makefile.inc,v 1.1 1993/09/03 19:04:23 jtc Exp - SRCS+= i386_get_fsbase.c i386_get_gsbase.c i386_get_ioperm.c i386_get_ldt.c \ i386_set_fsbase.c i386_set_gsbase.c i386_set_ioperm.c i386_set_ldt.c \ i386_clr_watch.c i386_set_watch.c i386_vm86.c diff --git a/lib/libc/powerpc/sys/Makefile.inc b/lib/libc/powerpc/sys/Makefile.inc index 17b7b3b26111..9979d5179f51 100644 --- a/lib/libc/powerpc/sys/Makefile.inc +++ b/lib/libc/powerpc/sys/Makefile.inc @@ -1,4 +1,3 @@ - SRCS+= __vdso_gettc.c \ sched_getcpu_gen.c diff --git a/lib/libc/powerpc64/sys/Makefile.inc b/lib/libc/powerpc64/sys/Makefile.inc index 17b7b3b26111..9979d5179f51 100644 --- a/lib/libc/powerpc64/sys/Makefile.inc +++ b/lib/libc/powerpc64/sys/Makefile.inc @@ -1,4 +1,3 @@ - SRCS+= __vdso_gettc.c \ sched_getcpu_gen.c diff --git a/lib/libc/powerpcspe/sys/Makefile.inc b/lib/libc/powerpcspe/sys/Makefile.inc index 8f48df0d6021..328c43d2b1ca 100644 --- a/lib/libc/powerpcspe/sys/Makefile.inc +++ b/lib/libc/powerpcspe/sys/Makefile.inc @@ -1,3 +1,2 @@ - .PATH: ${LIBC_SRCTOP}/powerpc/sys .sinclude "${LIBC_SRCTOP}/powerpc/sys/Makefile.inc" diff --git a/lib/libc/riscv/sys/Makefile.inc b/lib/libc/riscv/sys/Makefile.inc index e98d2ceeccad..f1cc8d489553 100644 --- a/lib/libc/riscv/sys/Makefile.inc +++ b/lib/libc/riscv/sys/Makefile.inc @@ -1,4 +1,3 @@ - SRCS+= __vdso_gettc.c \ sched_getcpu_gen.c diff --git a/lib/libc/x86/sys/Makefile.inc b/lib/libc/x86/sys/Makefile.inc index c06d18b06e3d..cbc28773ab79 100644 --- a/lib/libc/x86/sys/Makefile.inc +++ b/lib/libc/x86/sys/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${LIBC_SRCTOP}/x86/sys SRCS+= \ From nobody Wed Nov 15 17:51:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVrMK4YH5z50YS5; Wed, 15 Nov 2023 17:51: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 4SVrMK3tkHz4JcK; Wed, 15 Nov 2023 17:51:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700070701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DvpAllMFcaRdTIWjpOnEwOVd+8LXZqU7LNfiCrHlDos=; b=XrOjo3f4hll3AE2nTzC8y9GWK6eNt63UVZIkYySxXyXE6vkeu81uLpkwwsYjSxa1xyO9Pm s8epEVKxUqoLkT5D5euAIQyRMJAmujVDN4pe9X7OPWnJo9ZH++qqtFDgveFUcrzYyQZYIV zd3jTBiG8Zau+QFdRPt3Qf7QgQoFVyCVTmaky/BPQgzRoJjRx5FFcRrMXfkS18bwVnlHHT NbbQPaBTiOkArT1h28kY2HjNpz0uYORclPwHt41tgCgQijyKZYc+q6Az3i+c8e0u98Ih1t iAXfJcf7PQRiNt7EXPsgvfuJ4KRO2gpOOp1r8MYptx30ZR2nPYJCockZVPIdKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700070701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DvpAllMFcaRdTIWjpOnEwOVd+8LXZqU7LNfiCrHlDos=; b=xjq/44mNRHojJ/kK0oyLYkEVr0qM6Kr0hfr9ja6W4furmpI2x5sJ8njavINjuj0MgNu1yG o1By16YdBNLJkA7SOYiD6HcWfsCbibIykOI419x0MP3vX52L/BJmg3JmJVblDboWtXbYAl ta59gau8QoFWa49pi0Dmcmn1vXwqzNagx5gWq3gQDT4ODW/ggAJqy8DgCiXmNYFQk5wN8L BLsYcAGMF1vWDudFCUH8wSBNo25xnsvposA9jHasneghPMZ7/pqHjio/Hswq2Pm0itypzL sIrFJj2P6CDSZaIPw27u0HUwZuQp0d8sFrCmxqJUMK9ygcJMybESS04UHncAew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700070701; a=rsa-sha256; cv=none; b=q9OQk9zsdykHEJo4MrLRGZkDbY8Jbg43dZUlMtRvPbb2XP4TZc/fsSQFoann96ExTMazyr YTfg+J5D75MBsLmvccPxVWx2n+CucRt5GgZwzdh2oDBx/cF9Bj6VbR7N3ND3OcKiWYkCxp rSjmDv27ck1lpbgMVCW55EpFXQzlD1QeHVv+DdQbxhQ6V0269CjrF8u2EjFsJxsm+fifZr EJ4IqEGqtSXXNGspO3yo9HHGiRAObwEs7ZEE9I/LwhSY4Rrf6KyV5rABSRFSrolg3jIvdw wiFmtzYRc5CSQgSDmwh7aagXsMmgtB8Cgk2oHXtPH1oDAiYLv3COSWs78o5Vvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVrMK2yVPzBYF; Wed, 15 Nov 2023 17:51: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 3AFHpfaA038231; Wed, 15 Nov 2023 17:51:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFHpfPI038228; Wed, 15 Nov 2023 17:51:41 GMT (envelope-from git) Date: Wed, 15 Nov 2023 17:51:41 GMT Message-Id: <202311151751.3AFHpfPI038228@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: 1ca63a8219b8 - main - libc: Remove empty comments in Symbol.map List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1ca63a8219b88b752b064d19bd3428c61dbcf1f9 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=1ca63a8219b88b752b064d19bd3428c61dbcf1f9 commit 1ca63a8219b88b752b064d19bd3428c61dbcf1f9 Author: Brooks Davis AuthorDate: 2023-11-15 17:51:03 +0000 Commit: Brooks Davis CommitDate: 2023-11-15 17:51:03 +0000 libc: Remove empty comments in Symbol.map These were left over from $FreeBSD$ removal. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42612 --- lib/libc/aarch64/Symbol.map | 3 --- lib/libc/amd64/Symbol.map | 3 --- lib/libc/arm/Symbol.map | 3 --- lib/libc/arm/aeabi/Symbol.map | 3 --- lib/libc/capability/Symbol.map | 3 --- lib/libc/compat-43/Symbol.map | 3 --- lib/libc/db/Symbol.map | 3 --- lib/libc/gdtoa/Symbol.map | 3 --- lib/libc/gen/Symbol.map | 3 --- lib/libc/gmon/Symbol.map | 3 --- lib/libc/i386/Symbol.map | 3 --- lib/libc/iconv/Symbol.map | 3 --- lib/libc/inet/Symbol.map | 3 --- lib/libc/locale/Symbol.map | 3 --- lib/libc/nameser/Symbol.map | 3 --- lib/libc/net/Symbol.map | 3 --- lib/libc/nls/Symbol.map | 3 --- lib/libc/posix1e/Symbol.map | 3 --- lib/libc/powerpc/Symbol.map | 3 --- lib/libc/powerpc64/Symbol.map | 3 --- lib/libc/quad/Symbol.map | 3 --- lib/libc/regex/Symbol.map | 3 --- lib/libc/resolv/Symbol.map | 3 --- lib/libc/riscv/Symbol.map | 3 --- lib/libc/rpc/Symbol.map | 3 --- lib/libc/secure/Symbol.map | 3 --- lib/libc/softfloat/Symbol.map | 3 --- lib/libc/stdio/Symbol.map | 3 --- lib/libc/stdlib/Symbol.map | 3 --- lib/libc/stdlib/malloc/Symbol.map | 3 --- lib/libc/stdtime/Symbol.map | 3 --- lib/libc/string/Symbol.map | 3 --- lib/libc/sys/Symbol.map | 3 --- lib/libc/uuid/Symbol.map | 3 --- lib/libc/xdr/Symbol.map | 3 --- lib/libc/yp/Symbol.map | 3 --- 36 files changed, 108 deletions(-) diff --git a/lib/libc/aarch64/Symbol.map b/lib/libc/aarch64/Symbol.map index 7f5b9ee9b56c..574b5e49d106 100644 --- a/lib/libc/aarch64/Symbol.map +++ b/lib/libc/aarch64/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * This only needs to contain symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in diff --git a/lib/libc/amd64/Symbol.map b/lib/libc/amd64/Symbol.map index 39a913bd5e84..0bd3dabdb19e 100644 --- a/lib/libc/amd64/Symbol.map +++ b/lib/libc/amd64/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * This only needs to contain symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map index 7b3d173d72ed..d91e681f4478 100644 --- a/lib/libc/arm/Symbol.map +++ b/lib/libc/arm/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * This only needs to contain symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in diff --git a/lib/libc/arm/aeabi/Symbol.map b/lib/libc/arm/aeabi/Symbol.map index 823e4ad0d79d..175884c82881 100644 --- a/lib/libc/arm/aeabi/Symbol.map +++ b/lib/libc/arm/aeabi/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * This only needs to contain AEABI symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in diff --git a/lib/libc/capability/Symbol.map b/lib/libc/capability/Symbol.map index 65e112348012..0deff024a046 100644 --- a/lib/libc/capability/Symbol.map +++ b/lib/libc/capability/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.3 { __cap_rights_clear; cap_rights_contains; diff --git a/lib/libc/compat-43/Symbol.map b/lib/libc/compat-43/Symbol.map index 588a693dabb7..b0ce99f4e416 100644 --- a/lib/libc/compat-43/Symbol.map +++ b/lib/libc/compat-43/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { creat; gethostid; diff --git a/lib/libc/db/Symbol.map b/lib/libc/db/Symbol.map index cb00d6bd1290..2cca589af9f0 100644 --- a/lib/libc/db/Symbol.map +++ b/lib/libc/db/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { dbopen; dbm_open; diff --git a/lib/libc/gdtoa/Symbol.map b/lib/libc/gdtoa/Symbol.map index a3cfd8df6819..55fe12e87c57 100644 --- a/lib/libc/gdtoa/Symbol.map +++ b/lib/libc/gdtoa/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { /* * Standard functions from contrib/gdtoa diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index bdd659197644..1fa5478b7918 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { __xuname; pthread_atfork; diff --git a/lib/libc/gmon/Symbol.map b/lib/libc/gmon/Symbol.map index 9d880afd8841..7fd880a1b898 100644 --- a/lib/libc/gmon/Symbol.map +++ b/lib/libc/gmon/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { _mcleanup; monstartup; diff --git a/lib/libc/i386/Symbol.map b/lib/libc/i386/Symbol.map index 9d6ea7fff9f3..d09c98487f64 100644 --- a/lib/libc/i386/Symbol.map +++ b/lib/libc/i386/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * This only needs to contain symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in diff --git a/lib/libc/iconv/Symbol.map b/lib/libc/iconv/Symbol.map index f883fe0d3e87..49dd63aca9da 100644 --- a/lib/libc/iconv/Symbol.map +++ b/lib/libc/iconv/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.3 { __bsd___iconv; __bsd___iconv_free_list; diff --git a/lib/libc/inet/Symbol.map b/lib/libc/inet/Symbol.map index e26556cd5fe4..11e22a1f6945 100644 --- a/lib/libc/inet/Symbol.map +++ b/lib/libc/inet/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { __inet_addr; __inet_aton; diff --git a/lib/libc/locale/Symbol.map b/lib/libc/locale/Symbol.map index f29e6226855b..a38771e9c3fc 100644 --- a/lib/libc/locale/Symbol.map +++ b/lib/libc/locale/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { btowc; digittoint; diff --git a/lib/libc/nameser/Symbol.map b/lib/libc/nameser/Symbol.map index db66ed0951ec..0d328cb0f23c 100644 --- a/lib/libc/nameser/Symbol.map +++ b/lib/libc/nameser/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { __ns_makecanon; __ns_msg_getflag; diff --git a/lib/libc/net/Symbol.map b/lib/libc/net/Symbol.map index b2ecd4f08735..fa76adce06a1 100644 --- a/lib/libc/net/Symbol.map +++ b/lib/libc/net/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { __b64_ntop; __b64_pton; diff --git a/lib/libc/nls/Symbol.map b/lib/libc/nls/Symbol.map index d8ee248d60f0..0703131b8415 100644 --- a/lib/libc/nls/Symbol.map +++ b/lib/libc/nls/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { catopen; catgets; diff --git a/lib/libc/posix1e/Symbol.map b/lib/libc/posix1e/Symbol.map index 87e18493d1ec..92a0bf85cfa2 100644 --- a/lib/libc/posix1e/Symbol.map +++ b/lib/libc/posix1e/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { acl_calc_mask; acl_copy_entry; diff --git a/lib/libc/powerpc/Symbol.map b/lib/libc/powerpc/Symbol.map index fb82bcdb27f0..ff99e09028db 100644 --- a/lib/libc/powerpc/Symbol.map +++ b/lib/libc/powerpc/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * This only needs to contain symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map index 7d010fda6693..bad72c5a6efc 100644 --- a/lib/libc/powerpc64/Symbol.map +++ b/lib/libc/powerpc64/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * This only needs to contain symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in diff --git a/lib/libc/quad/Symbol.map b/lib/libc/quad/Symbol.map index 2752be26abb4..86fc2ee9c334 100644 --- a/lib/libc/quad/Symbol.map +++ b/lib/libc/quad/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { /* * These symbols really shouldn't be exported since they should diff --git a/lib/libc/regex/Symbol.map b/lib/libc/regex/Symbol.map index 3b9072571740..436398f639c7 100644 --- a/lib/libc/regex/Symbol.map +++ b/lib/libc/regex/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { regerror; regexec; diff --git a/lib/libc/resolv/Symbol.map b/lib/libc/resolv/Symbol.map index c93d8bea6f15..6b9c43298fb5 100644 --- a/lib/libc/resolv/Symbol.map +++ b/lib/libc/resolv/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { /* h_nerr; */ /* Why is this not staticized in net/herror.c? */ h_errlist; diff --git a/lib/libc/riscv/Symbol.map b/lib/libc/riscv/Symbol.map index c19f7ddf631e..6726863e9b97 100644 --- a/lib/libc/riscv/Symbol.map +++ b/lib/libc/riscv/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * This only needs to contain symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in diff --git a/lib/libc/rpc/Symbol.map b/lib/libc/rpc/Symbol.map index 89b434ce67db..5bf364f28d81 100644 --- a/lib/libc/rpc/Symbol.map +++ b/lib/libc/rpc/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { /* From crypt_clnt.c (generated by rpcgen - include/rpcsvc/crypt.x) */ des_crypt_1; diff --git a/lib/libc/secure/Symbol.map b/lib/libc/secure/Symbol.map index 4f9f34844131..641f451b5421 100644 --- a/lib/libc/secure/Symbol.map +++ b/lib/libc/secure/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { __chk_fail; __stack_chk_fail; diff --git a/lib/libc/softfloat/Symbol.map b/lib/libc/softfloat/Symbol.map index ee6d1b0eac52..9c5229a18066 100644 --- a/lib/libc/softfloat/Symbol.map +++ b/lib/libc/softfloat/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { _fpgetmask; fpgetmask; diff --git a/lib/libc/stdio/Symbol.map b/lib/libc/stdio/Symbol.map index 575dc3cd923c..f5e74eeddfd4 100644 --- a/lib/libc/stdio/Symbol.map +++ b/lib/libc/stdio/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { flockfile; ftrylockfile; diff --git a/lib/libc/stdlib/Symbol.map b/lib/libc/stdlib/Symbol.map index e10789ceab1a..d74df869cf54 100644 --- a/lib/libc/stdlib/Symbol.map +++ b/lib/libc/stdlib/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { _Exit; a64l; diff --git a/lib/libc/stdlib/malloc/Symbol.map b/lib/libc/stdlib/malloc/Symbol.map index 4356337d1c37..15e4f9e6c69c 100644 --- a/lib/libc/stdlib/malloc/Symbol.map +++ b/lib/libc/stdlib/malloc/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { _malloc_options; _malloc_message; diff --git a/lib/libc/stdtime/Symbol.map b/lib/libc/stdtime/Symbol.map index acdd3bbb89b4..0dca02903a1a 100644 --- a/lib/libc/stdtime/Symbol.map +++ b/lib/libc/stdtime/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { _time32_to_time; _time_to_time32; diff --git a/lib/libc/string/Symbol.map b/lib/libc/string/Symbol.map index ec4778ff3c24..fd854d1f9479 100644 --- a/lib/libc/string/Symbol.map +++ b/lib/libc/string/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { bcmp; bcopy; diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index 7937661e3787..05a2f21d554e 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - /* * It'd be nice to automatically generate the syscall symbols, but we * don't know to what version they will eventually belong to, so for now diff --git a/lib/libc/uuid/Symbol.map b/lib/libc/uuid/Symbol.map index 49fb239913d2..e1e587199a92 100644 --- a/lib/libc/uuid/Symbol.map +++ b/lib/libc/uuid/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { uuid_to_string; uuid_is_nil; diff --git a/lib/libc/xdr/Symbol.map b/lib/libc/xdr/Symbol.map index 1ee5afda2425..0a964fecdbdb 100644 --- a/lib/libc/xdr/Symbol.map +++ b/lib/libc/xdr/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { xdr_free; xdr_void; diff --git a/lib/libc/yp/Symbol.map b/lib/libc/yp/Symbol.map index ecd17af4a29a..fff2b2e60e39 100644 --- a/lib/libc/yp/Symbol.map +++ b/lib/libc/yp/Symbol.map @@ -1,6 +1,3 @@ -/* - */ - FBSD_1.0 { xdr_datum; xdr_ypresp_all_seq; From nobody Wed Nov 15 18:12:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVrq54wcRz50ZTP; Wed, 15 Nov 2023 18:12: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 4SVrq54Spvz4MtG; Wed, 15 Nov 2023 18:12:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700071937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wv5zNNV1pOEI1u1S+lVN5SPVjKi+jrZLPJxkKJNF5Sw=; b=u8yfvYEeEMncxLA5OpslKzmC/PSbXAt0WFnAGCB/IgnT9vsA9QbdGigvHSSJgXjl55fo/5 EUILdC1/YrVSOAsi1xbIBM9vx6HHTrOcKCrSjNS8gYkhSoi1Jgk1Vhj9yrfKwT+G/nz0SI SDrug6OHtPwz4BlVHeyqu3VRzBhesT4MVyUMDc2ouTGiEjp5nBWJMGFDyrpYrpb7OrTGbo uVMfxhKHsKQQ5fTJBXkJu41n8CJlLuCeIwK8/EJ9udLrBOIo3vSFppcuQG4GoLRAoLg945 aAvcTfONXOJ8UzeTYKu0lf7jpxfE6rA2EdAkuuEXGPb58XAaL1jgeMRGUDhP/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700071937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wv5zNNV1pOEI1u1S+lVN5SPVjKi+jrZLPJxkKJNF5Sw=; b=MhS6soWCXUIliWfZysoMttSzIedGO26xBu0oi2dIz/v9USxzJZ1q2DlR0pFmCykC7PYiG+ 3gjV935Wg9kzkrThWc+opcHVNfQMLYyppdJyGb6rJbHVd5+uWCNk1hkrUg3V1D+gK4xmNz MrxxXZWqMGsmyX6y/FSdwNdYLAr8a/kFk9ICJ3wo8VxkeRERET+PmWV+E5SrO3/6HU5VVD uLmPfM7Iveu3CQRQjRvvzrRNm2tV9JvFZTBJo+67PPJo3r6xdsmIgRJHS3uIrNfmL1zeNA k7dwQi58f74I1ljPW0djeijCcWUzRPWYJkH8KCoAQEnEtQErGCT2D4Jv5O5Sww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700071937; a=rsa-sha256; cv=none; b=Sj2EGSVN4K1EbqorQbpvA2aWZu70Biw7uqdgOaBiAFHmSlkeVfbfhSWdN6jKgXqWDxGnUQ m581kBhRIlh2Yt3ljzE+wbxxU9/g929OK832DnCYVwzN0xh8fJD8Nfqmf12rgTpZa+OgYL a+hD2nEEfB1dexfVQ/sLAA7rAUtt+ZcOjw4zE0rOogH5KFsXfRSe8Pt2Y2CIX90n6zrNvg j801GUlrjEPfce/ZiDGxY4WTe6F4I/HSPMKRXXsVQdgaOwd016taUU+5+giO9qCfzsHw1b 0EPRazsdyS6BWzWjEXZYln2QjIpN79Cx+C6UUEYydpgvx0ydxzJ/AiiTFaOD1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVrq53YF6zCDj; Wed, 15 Nov 2023 18:12: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 3AFICHEn077371; Wed, 15 Nov 2023 18:12:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFICH9p077368; Wed, 15 Nov 2023 18:12:17 GMT (envelope-from git) Date: Wed, 15 Nov 2023 18:12:17 GMT Message-Id: <202311151812.3AFICH9p077368@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 7eb26be9c808 - main - arm64: Use adrp + :lo12: to load globals from asm List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7eb26be9c8080686f64fdc0a28e5ae7839bbc82d Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=7eb26be9c8080686f64fdc0a28e5ae7839bbc82d commit 7eb26be9c8080686f64fdc0a28e5ae7839bbc82d Author: Andrew Turner AuthorDate: 2023-11-11 09:27:30 +0000 Commit: Andrew Turner CommitDate: 2023-11-15 18:05:08 +0000 arm64: Use adrp + :lo12: to load globals from asm When loading a global variable we can use a pseudo-instruction similar to "ldr, xn, =global" to load the address of the symbol. As this is unlikely to be supported by a mov instruction a pc-relative load is used, with the absolute address written at the end of the function so it will be loaded. This load can be partially replaced with an adrp instruction. This generates the address, aligned to a 4k boundary, using a pc-relative addition. Because the address is 4k-aligned we then update reading the global variable using a load with the offset of the load the low 12-bits of the global. Arm64 assemblers have :lo12: to support this, e.g. "ldr xn, [xn, :lo12:global]". The only remaining users of "ldr, xn, =global" that I can find are executed from the physical address space the kernel was loaded in and need an address in the kernels virtual address space. Because of this they can't use adrp. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42565 --- sys/arm64/arm64/cpufunc_asm.S | 7 ++++--- sys/arm64/arm64/locore.S | 4 ++-- sys/arm64/arm64/support.S | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/sys/arm64/arm64/cpufunc_asm.S b/sys/arm64/arm64/cpufunc_asm.S index 2b2ca6836530..8163e6c3d0d0 100644 --- a/sys/arm64/arm64/cpufunc_asm.S +++ b/sys/arm64/arm64/cpufunc_asm.S @@ -52,11 +52,12 @@ */ .macro cache_handle_range dcop = 0, ic = 0, icop = 0 .if \ic == 0 - ldr x3, =dcache_line_size /* Load the D cache line size */ + adrp x3, dcache_line_size /* Load the D cache line size */ + ldr x3, [x3, :lo12:dcache_line_size] .else - ldr x3, =idcache_line_size /* Load the I & D cache line size */ + adrp x3, idcache_line_size /* Load the I & D cache line size */ + ldr x3, [x3, :lo12:idcache_line_size] .endif - ldr x3, [x3] sub x4, x3, #1 /* Get the address mask */ and x2, x0, x4 /* Get the low bits of the address */ add x1, x1, x2 /* Add these to the size */ diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index d77963d42461..2d4501d4bfea 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -227,8 +227,8 @@ mp_virtdone: BTI_J /* Start using the AP boot stack */ - ldr x4, =bootstack - ldr x4, [x4] + adrp x4, bootstack + ldr x4, [x4, :lo12:bootstack] mov sp, x4 #if defined(PERTHREAD_SSP) diff --git a/sys/arm64/arm64/support.S b/sys/arm64/arm64/support.S index f4b35da88638..bb93cfd521e1 100644 --- a/sys/arm64/arm64/support.S +++ b/sys/arm64/arm64/support.S @@ -376,8 +376,8 @@ END(pagezero_simple) ENTRY(pagezero_cache) add x1, x0, #PAGE_SIZE - ldr x2, =dczva_line_size - ldr x2, [x2] + adrp x2, dczva_line_size + ldr x2, [x2, :lo12:dczva_line_size] 1: dc zva, x0 From nobody Wed Nov 15 18:12:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVrq66KPxz50ZLJ; Wed, 15 Nov 2023 18:12: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 4SVrq65SpLz4MbG; Wed, 15 Nov 2023 18:12:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700071938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eqa0v0YwgN07RLgViKu/4O0Q+qzXBo8XUGqVMpwatSE=; b=cD+W1jDH42JLmEnbNP1jqjojNL5gBTmqW422bb6Gc8ir4z8P1zzeyhKJoixgQxoqXcdvVu 4a1odkWer6vTclzQ/LlychemJ3Xh3pFzNKquspncJIkV6mtef8RgqJMA51VxDGAyjuzcdd +gcHrlVDCkHjZdccRxSmK9nuworvbRMtsABV9JbbpFNbW1qSbc0nlBjVX0KQCgQaUS4oyZ WBeURJP1VQd3RkRJLnivsZjs/f2wzDMAAbrcKtDdHdf+Q+hYtJ2fjRrEDe8tJKFNo46x/M E2muAsDHHAd1Phg9W8YxCxlsF1C5Mw1PMc76sr72d7XoaopaZfHvl4/yk+IGcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700071938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eqa0v0YwgN07RLgViKu/4O0Q+qzXBo8XUGqVMpwatSE=; b=wJYHaEg/efooyjwegsfBgkGmiVKdbulpJ8Ds5mDAhpNojq3GVAXnDR0I3OUx8kuHgIfpki 8eM89NUIJcxnW+XQUFFqkd1h9YyTfax5XTW+cMNXKxf0m6CdJSLrJPKctW4vbzrx6RMyDh Qp8i2jN7ewEGn/ZgCj8Y0jZIr65AWz01E2C/KovJQ6lpsIVzcRsUSJOimnvHWe7xdPwdlg G6dp/Rc4qVqzRrQyB5qglEKCRo2NK/CbUxUrB/JBX4rDdhV6XCW26+7fexyefBiHLgv6UQ /dXMV80LQ/dMbqUMEfcRM6w32c63E6R9sRAr1SRe4BkLOE2cRle18lIfdWyjiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700071938; a=rsa-sha256; cv=none; b=aIKrQhp2/+fCthyD/Kd7XgxTESKssYNxtJHPTDtPY6s5K8UeEwbpt3CSdtBGekmOqkHPb4 Rv6PsbkmQM9C/MV3jhhKL4ml/E+CACX4QHXqj2TqdgxDQ00oOcsNxkB4s2oPhV4Mb9QLfA pm1A79KHUcABxIlkg8Nt4NEWN2Y/76SVx9STdkf9jsMv0YAyKkr7AjckYWMEoSRQLZUawF r4nV85xwv7k98iIEmCnz3/gbktjsGDxtuVPuzD1vWIuhNKjXSqMXhK79kFATkqBsD9zsxZ CFn++W/X3SeE1icWLysiNRI7eS2tlLkYoC9LTV8xR+6IkcbHVARRqEneE7DmKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVrq64XnGzCDk; Wed, 15 Nov 2023 18:12: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 3AFICIIa077420; Wed, 15 Nov 2023 18:12:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFICIqp077417; Wed, 15 Nov 2023 18:12:18 GMT (envelope-from git) Date: Wed, 15 Nov 2023 18:12:18 GMT Message-Id: <202311151812.3AFICIqp077417@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 5fae53589eac - main - arm64: Use pmap_early_vtophys in pmap_bootstrap_san List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fae53589eacbf65855419922c881b3a25a68e03 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=5fae53589eacbf65855419922c881b3a25a68e03 commit 5fae53589eacbf65855419922c881b3a25a68e03 Author: Andrew Turner AuthorDate: 2023-11-13 16:34:56 +0000 Commit: Andrew Turner CommitDate: 2023-11-15 18:05:08 +0000 arm64: Use pmap_early_vtophys in pmap_bootstrap_san Use pmap_early_vtophys to find the physical address of the kernel base rather than using the calculated offset as it will be removed in a latter commit. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42566 --- sys/arm64/arm64/machdep.c | 2 +- sys/arm64/arm64/pmap.c | 5 ++++- sys/arm64/include/pmap.h | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index bb7689c19101..7aa20357acf4 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -973,7 +973,7 @@ initarm(struct arm64_bootparams *abp) * segments also get excluded from phys_avail. */ #if defined(KASAN) - pmap_bootstrap_san(KERNBASE - abp->kern_delta); + pmap_bootstrap_san(); #endif physmem_init_kernel_globals(); diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 8c2c6f9d7b81..3dc74626f01b 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1365,11 +1365,14 @@ pmap_bootstrap(vm_paddr_t kernstart, vm_size_t kernlen) * - Map that entire range using L2 superpages. */ void -pmap_bootstrap_san(vm_paddr_t kernstart) +pmap_bootstrap_san(void) { vm_offset_t va; + vm_paddr_t kernstart; int i, shadow_npages, nkasan_l2; + kernstart = pmap_early_vtophys(KERNBASE); + /* * Rebuild physmap one more time, we may have excluded more regions from * allocation since pmap_bootstrap(). diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h index 1789588210c3..ad9aa409815a 100644 --- a/sys/arm64/include/pmap.h +++ b/sys/arm64/include/pmap.h @@ -192,7 +192,7 @@ pmap_vmspace_copy(pmap_t dst_pmap __unused, pmap_t src_pmap __unused) #if defined(KASAN) || defined(KMSAN) struct arm64_bootparams; -void pmap_bootstrap_san(vm_paddr_t); +void pmap_bootstrap_san(void); void pmap_san_enter(vm_offset_t); void pmap_san_bootstrap(struct arm64_bootparams *); #endif From nobody Wed Nov 15 18:12:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVrq80R0Vz50Zcd; Wed, 15 Nov 2023 18:12: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 4SVrq76Vhzz4N3f; Wed, 15 Nov 2023 18:12:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700071939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t1yu2X5wNVsOg4ubMyjuGxBdwfboFWemU3eGgr1072c=; b=Dc758dooYVqrkwnkNtLLRfQvyX3TrcFujiGyO3Ykcq3gvmTevkWtnk881cqN2xuvVD7NSp zqOvcfgPL4g+DxA4WQKwGbDrN6ouIl2gFRLLlrVwSZqw6r+qZrf2YptqxMd9DoUHyMfZ12 dpw07gYG0tUszDZF6eVhMczqBUpaKHYXaCE2l+jUdddKantjNCQ71Gkx1h7vE3mEs6Uvmh L2jpfFL3rHjriP4pQTzGDGzK6Q3zhgvdXaGb6Lkof3C00BLfW3eHiOemx8AS86kLNmFp/p +hYFVxn/xYJa99RdANNpn6nM3Jea41bqv0kEu73o3vYp+5TuFxqtEURQDCUR0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700071939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t1yu2X5wNVsOg4ubMyjuGxBdwfboFWemU3eGgr1072c=; b=YVyCrwgbliIvbME53JC4Av/Ch4usrxkeX/b86s8TXkQh33q+1ZwLcamzS/AOEJm1NNXsbn jPEeIxKtd4F4bwmC3U6Yr4qVq97pymiZ1uuq+n62o6SeeG/84dwAXcyy38D0pYvojRJjf0 IKrwxR4XYzw0VNtwD5+LsRKJCkDER/97C59dhqcZOcxdw49Wn2GURyeTEJNG6k9O7nX83k tcnff7yPxW0JqWDqHvebjtKr3ezODW3tTuJw2+3tpGs/zhiBqns57OdM0PQCoB5Dwwk+ZT pQmSFCHBnf6jOAqQplp48mzd2wVQjS1DTMaOl+swBLy1tUDZDb5tOHAEj7/Fvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700071940; a=rsa-sha256; cv=none; b=TNKM7zhawkPVAZPGbYsYrR6frbLwbM+Jk8CPxF3Gfp46Wvkfgljf368lGMSIEIjziufifc 4gDZFYz4dXmJqOq+vSz1hAlJmCyuoXfi2j3s16mJ3H0abEyi3tfcgfO5TpcobYcgihorhe G5wyjLdZS/TM9osLhqwTBGAZ2SVb+Xna5a4JfHwXV7hpcdhCwnkrm+Gwl3O/zXc63EI2GS EskwiWF+UxqAR3srsSqEGI14HEf/+ym4lWVM+rUw4t6aGzOqMcDr0lB1n91mvN4bisCMo/ mlT+WHHsP1qee/279/f+TAiuwBEwcdkUEiUlkNMn9+ULj8/RSHPgPT8AfRVj2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVrq75btszBwp; Wed, 15 Nov 2023 18:12: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 3AFICJ0F077472; Wed, 15 Nov 2023 18:12:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFICJ3T077468; Wed, 15 Nov 2023 18:12:19 GMT (envelope-from git) Date: Wed, 15 Nov 2023 18:12:19 GMT Message-Id: <202311151812.3AFICJ3T077468@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: ba31362694fe - main - arm64: Make kern_delta unneeded in the boot params List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba31362694fe465b88a025ac7c35ad7f378efc86 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=ba31362694fe465b88a025ac7c35ad7f378efc86 commit ba31362694fe465b88a025ac7c35ad7f378efc86 Author: Andrew Turner AuthorDate: 2023-11-13 15:29:30 +0000 Commit: Andrew Turner CommitDate: 2023-11-15 18:05:08 +0000 arm64: Make kern_delta unneeded in the boot params Use pmap_early_vtophys to translate from a virtual to physical where we were previously using the calculated delta. This means that, while we still calculate it, we don't need to pass it to initarm or either pmap bootstrap functions. While here remove an unneeded printf that indirectly used it or was related to the previous printf. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42567 --- sys/arm64/arm64/genassym.c | 1 - sys/arm64/arm64/locore.S | 13 ++++--------- sys/arm64/arm64/machdep.c | 2 +- sys/arm64/arm64/pmap.c | 14 ++++---------- sys/arm64/include/machdep.h | 1 - sys/arm64/include/pmap.h | 2 +- 6 files changed, 10 insertions(+), 23 deletions(-) diff --git a/sys/arm64/arm64/genassym.c b/sys/arm64/arm64/genassym.c index 0fb00d8aceba..d4970177ab71 100644 --- a/sys/arm64/arm64/genassym.c +++ b/sys/arm64/arm64/genassym.c @@ -40,7 +40,6 @@ ASSYM(BOOTPARAMS_SIZE, roundup2(sizeof(struct arm64_bootparams), STACKALIGNBYTES + 1)); ASSYM(BP_MODULEP, offsetof(struct arm64_bootparams, modulep)); -ASSYM(BP_KERN_DELTA, offsetof(struct arm64_bootparams, kern_delta)); ASSYM(BP_KERN_STACK, offsetof(struct arm64_bootparams, kern_stack)); ASSYM(BP_KERN_TTBR0, offsetof(struct arm64_bootparams, kern_ttbr0)); ASSYM(BP_BOOT_EL, offsetof(struct arm64_bootparams, boot_el)); diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index 2d4501d4bfea..cea2f690b60f 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -77,11 +77,10 @@ ENTRY(_start) msr contextidr_el1, xzr /* Get the virt -> phys offset */ - bl get_virt_delta + bl get_load_phys_addr /* * At this point: - * x29 = PA - VA * x28 = Our physical load address */ @@ -136,10 +135,8 @@ virtdone: mov x0, sp /* Negate the delta so it is VA -> PA */ - neg x29, x29 str x1, [x0, #BP_MODULEP] - str x29, [x0, #BP_KERN_DELTA] adrp x25, initstack add x25, x25, :lo12:initstack str x25, [x0, #BP_KERN_STACK] @@ -359,11 +356,9 @@ LENTRY(drop_to_el1) LEND(drop_to_el1) /* - * Get the delta between the physical address we were loaded to and the - * virtual address we expect to run from. This is used when building the - * initial page table. + * Get the physical address the kernel was loaded at. */ -LENTRY(get_virt_delta) +LENTRY(get_load_phys_addr) /* Load the physical address of virt_map */ adrp x29, virt_map add x29, x29, :lo12:virt_map @@ -379,7 +374,7 @@ LENTRY(get_virt_delta) .align 3 virt_map: .quad virt_map -LEND(get_virt_delta) +LEND(get_load_phys_addr) /* * This builds the page tables containing the identity map, and the kernel diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 7aa20357acf4..01896c15e650 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -957,7 +957,7 @@ initarm(struct arm64_bootparams *abp) pan_setup(); /* Bootstrap enough of pmap to enter the kernel proper */ - pmap_bootstrap(KERNBASE - abp->kern_delta, lastaddr - KERNBASE); + pmap_bootstrap(lastaddr - KERNBASE); /* Exclude entries needed in the DMAP region, but not phys_avail */ if (efihdr != NULL) exclude_efi_map_entries(efihdr); diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 3dc74626f01b..adb5e3312e50 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1258,22 +1258,16 @@ pmap_bootstrap_allocate_kasan_l2(vm_paddr_t start_pa, vm_paddr_t end_pa, * Bootstrap the system enough to run with virtual memory. */ void -pmap_bootstrap(vm_paddr_t kernstart, vm_size_t kernlen) +pmap_bootstrap(vm_size_t kernlen) { vm_offset_t dpcpu, msgbufpv; vm_paddr_t start_pa, pa, min_pa; - uint64_t kern_delta; int i; /* Verify that the ASID is set through TTBR0. */ KASSERT((READ_SPECIALREG(tcr_el1) & TCR_A1) == 0, ("pmap_bootstrap: TCR_EL1.A1 != 0")); - kern_delta = KERNBASE - kernstart; - - printf("pmap_bootstrap %lx %lx\n", kernstart, kernlen); - printf("%lx\n", (KERNBASE >> L1_SHIFT) & Ln_ADDR_MASK); - /* Set this early so we can use the pagetable walking functions */ kernel_pmap_store.pm_l0 = pagetable_l0_ttbr1; PMAP_LOCK_INIT(kernel_pmap); @@ -1288,7 +1282,7 @@ pmap_bootstrap(vm_paddr_t kernstart, vm_size_t kernlen) kernel_pmap->pm_asid_set = &asids; /* Assume the address we were loaded to is a valid physical address */ - min_pa = KERNBASE - kern_delta; + min_pa = pmap_early_vtophys(KERNBASE); physmap_idx = physmem_avail(physmap, nitems(physmap)); physmap_idx /= 2; @@ -1316,7 +1310,7 @@ pmap_bootstrap(vm_paddr_t kernstart, vm_size_t kernlen) */ bs_state.table_attrs &= ~TATTR_PXN_TABLE; - start_pa = pa = KERNBASE - kern_delta; + start_pa = pa = pmap_early_vtophys(KERNBASE); /* * Create the l2 tables up to VM_MAX_KERNEL_ADDRESS. We assume that the @@ -7848,7 +7842,7 @@ void __nosanitizeaddress pmap_san_bootstrap(struct arm64_bootparams *abp) { - pmap_san_early_kernstart = KERNBASE - abp->kern_delta; + pmap_san_early_kernstart = pmap_early_vtophys(KERNBASE); kasan_init_early(abp->kern_stack, KSTACK_PAGES * PAGE_SIZE); } diff --git a/sys/arm64/include/machdep.h b/sys/arm64/include/machdep.h index 026a64e0a350..80cb28bcfbeb 100644 --- a/sys/arm64/include/machdep.h +++ b/sys/arm64/include/machdep.h @@ -31,7 +31,6 @@ struct arm64_bootparams { vm_offset_t modulep; - uint64_t kern_delta; vm_offset_t kern_stack; vm_paddr_t kern_ttbr0; uint64_t hcr_el2; diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h index ad9aa409815a..efbf7eaaae91 100644 --- a/sys/arm64/include/pmap.h +++ b/sys/arm64/include/pmap.h @@ -144,7 +144,7 @@ extern vm_offset_t virtual_end; #define pmap_vm_page_alloc_check(m) void pmap_activate_vm(pmap_t); -void pmap_bootstrap(vm_paddr_t, vm_size_t); +void pmap_bootstrap(vm_size_t); int pmap_change_attr(vm_offset_t va, vm_size_t size, int mode); int pmap_change_prot(vm_offset_t va, vm_size_t size, vm_prot_t prot); void pmap_kenter(vm_offset_t sva, vm_size_t size, vm_paddr_t pa, int mode); From nobody Wed Nov 15 18:12:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVrq93p3vz50Zck; Wed, 15 Nov 2023 18:12: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 4SVrq90365z4N40; Wed, 15 Nov 2023 18:12:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700071941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Wb7pzDPyaODOrwuJt3H/6A8s/reJLUP9tAqUy7vtxk=; b=Ul4XXQX+5GfOTkorLxePCQd68CWlYTBBEnydMjmn+8O/cIPAbEPmOonOVnNvidnDhMwRJQ 0Fie8JcPANube48r/o3ujC2MS9Gg1miu1GPXXXQ/jh9BuGd4lhvnRD3AM68yP8ddlheYD6 8YYczV8JOI7B2EWCaBTIwssZhw5z7XQQYGeGoepXSxldxHCRBXTt7GBF0EccMjvUD7rF7q 2DCguaZf87oJGxij4mCzTVq6PmVrWqYW80fv6xieQ/E6OUc8tI3FmZG/3voSCJFls3ymtg W+nrAdPh6ANTkytqqpTB+oaHm2ztoeUBNKTET2ZikYi13oaHhbvkBogUXYFh3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700071941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Wb7pzDPyaODOrwuJt3H/6A8s/reJLUP9tAqUy7vtxk=; b=VHTB3M27if/M9jl5y9reDlrYQvhYKCR54Er9h4Z+JBRFEO1VJhpSAlZiUrshMJatgjeOLE qaj5rqsAEBTeWOXF6rK3IKImYn2mDhicrDevqE9yYI5jROQGMSDHocg7TuneTKTcSMuGn7 oQpXZ5ikXl11xtOli7cVWhzwg+uieB2nCeD8BpGNVhB0okNiGPrRAYjrxSNhZZqAiIUrzE dwhI8PLOHQJwzN9nbyreSPIB7OnvgTxtcf1KOTkoAW/aGA/sVqzBVr3XvUuZTevXA+h3Df nKxZBcJzIu9JJEVJigWpFAIxG0H6TmuSOIWz3tvUymCX9qJdMhfwA8M/yHt/UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700071941; a=rsa-sha256; cv=none; b=ZOQxJW2DyURMQ+mLLNMphi58XuLOeEXHClS83Tm5an/11KceJq5KV03Rp21FBQHBKGVsdq 63MtMKIDnOY/6Pt4vBKacDaIblh1ZRbnqz10HqSqD8IDEuXkMFRsE368Vnttzu9zKynv4u DpIOwQQjpBCXRHsE0vCDCFphrO6hFs2azuS+hvcn/+lgNZS+dgTpOtvcmkOPTgETqR4yCo G9iDvsQjosfJ/OqqLjGl0XH4TO+ydXXfR3gMjgRmz4NJYKxQrjC9QtEDkuXM6ZHIDNh5Cs 3epA7NqkY8Xi9X0l5ylKs7HhaLWAkmSerwPeXsenJfrHSgzOdObY6/y2cgL4AA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVrq86GwNzCJN; Wed, 15 Nov 2023 18:12: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 3AFICKSO077522; Wed, 15 Nov 2023 18:12:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFICKgF077519; Wed, 15 Nov 2023 18:12:20 GMT (envelope-from git) Date: Wed, 15 Nov 2023 18:12:20 GMT Message-Id: <202311151812.3AFICKgF077519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 61f14f1da37b - main - arm64: Clean up finding our load 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61f14f1da37b4e6db8f9efe40c6b544c855fb9bd Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=61f14f1da37b4e6db8f9efe40c6b544c855fb9bd commit 61f14f1da37b4e6db8f9efe40c6b544c855fb9bd Author: Andrew Turner AuthorDate: 2023-11-13 15:39:06 +0000 Commit: Andrew Turner CommitDate: 2023-11-15 18:05:08 +0000 arm64: Clean up finding our load address Use the linker to pre-calculate the offset of a known symbol from KERNBASE, and use this to find the physical address KERNBASE should map to. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42568 --- sys/arm64/arm64/locore.S | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index cea2f690b60f..ffd13610ec02 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -359,21 +359,13 @@ LEND(drop_to_el1) * Get the physical address the kernel was loaded at. */ LENTRY(get_load_phys_addr) + /* Load the offset of get_load_phys_addr from KERNBASE */ + ldr x28, =(get_load_phys_addr - KERNBASE) /* Load the physical address of virt_map */ - adrp x29, virt_map - add x29, x29, :lo12:virt_map - /* Load the virtual address of virt_map stored in virt_map */ - ldr x28, [x29] - /* Find PA - VA as PA' = VA' - VA + PA = VA' + (PA - VA) = VA' + x29 */ - sub x29, x29, x28 - /* Find the load address for the kernel */ - mov x28, #(KERNBASE) - add x28, x28, x29 + adr x29, get_load_phys_addr + /* Find the physical address of KERNBASE, i.e. our load address */ + sub x28, x29, x28 ret - - .align 3 -virt_map: - .quad virt_map LEND(get_load_phys_addr) /* From nobody Wed Nov 15 18:12:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVrqB1hs3z50Zfc; Wed, 15 Nov 2023 18:12: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 4SVrqB0ry0z4NHl; Wed, 15 Nov 2023 18:12:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700071942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3q+vuD8dGe2+zVWk7q9Y64Q+dEm2oL76FxCGQRSfyB8=; b=ItaROB9eQRVqWC9CE6YdEmybd9DSygoB/ubB5qmfvuo/+bM3gh5Is2NSO4W/j1wTu6Xy7n 6xL3HV9BExTxdnknkARzrqeDfQitArA4uwNlfcFa3q7PvTgcOOz78N8AjoZLB1Vb2QB2u5 H15ja/Gxp3ESdzSzO7owH09DmTZmNKPFtdhtb7RLCpivXGAw1AollHEZeoXOlEkQLy9OH/ orpc43AhdEhOE8FwgXx9u75aFxkyea+DE9UclQzsMQr4zsRIJoiIBjik7jiZWpW41LZLQR DJtgQNMBPhT7PY6+KYVHZEyzt+Vrk7TSNpszIhicanAIi95wq0KkgBweC+z5Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700071942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3q+vuD8dGe2+zVWk7q9Y64Q+dEm2oL76FxCGQRSfyB8=; b=xp2PJUcenS57qJAnSoCK3bbMF9CnY5uploaLHok1pmFVt3PJei/poV1+BBLc6f+gU64dKk sPpoblT2NbVYTgmgVGg73Vbb5En9eGR94Sx1tJZhlSjapHP3zO7OngatrPfB5Ruudlh7ZJ S5vKyPlgz5GPa/6ZW/29j1WAPaOJPw7NLQZJlW/NnZre0bF9g9u6JogglAFu1fHCux6c/L Y2qOsAX2Vg0MpEi/VF/ItmRoYdMeZ7j5LBgKdsHdsPwDC1CfVBirbfY8+m71EXi9nCNImK XGH2JH8uVQVrFY8epxQB8JYHQ9wMW3Sjy2XMv32HdsU2ZpGcOgC9baR7IQtcVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700071942; a=rsa-sha256; cv=none; b=cAGwupWIFIA5WlWe7NUj1fOzNqsuAPBMeVsby5wnpULW8UlUt0Il2r4e3rWKKZeWu/rVYi jBZTHUsdIjowbcEYxXBmSrhcIE9GUkHng/HywtTMRogpgIaOONJXbn6zmYAjpkMsX8svz9 pjCSBbqMOqjlo3Ayr1ZskHkn1TqTiofrQ5HqRKByoVozKQArxncRWjYLAK4roAQEQW9pFe /jANL2waKxTQoZgXoIuutBg4zaIGMp96n6x/DHbPQcb4+yDlHYLL4LEttjFdi3wmaBTbSe a8iy73DLiUs2sXmQ4uNFglQHNsePSPNt1eeN57uHgbZa7XVefFzPOJYRZi1fvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVrq974D3zCHy; Wed, 15 Nov 2023 18:12: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 3AFICLee077570; Wed, 15 Nov 2023 18:12:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFICLIs077567; Wed, 15 Nov 2023 18:12:21 GMT (envelope-from git) Date: Wed, 15 Nov 2023 18:12:21 GMT Message-Id: <202311151812.3AFICLIs077567@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 9eecef052155 - main - Add an Armv8 rndr random number 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9eecef052155646fbc5f8f533b952b372572d06a Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=9eecef052155646fbc5f8f533b952b372572d06a commit 9eecef052155646fbc5f8f533b952b372572d06a Author: Andrew Turner AuthorDate: 2023-11-15 17:42:02 +0000 Commit: Andrew Turner CommitDate: 2023-11-15 18:05:08 +0000 Add an Armv8 rndr random number provider Armv8.5 adds an optional random number generator. This is implemented as two special registers one to read a random number, the other to re-seed the entropy pool before reading a random number. Both registers will set the condition flags to tell the caller they can't produce a random number in a reasonable amount of time. Without a signal to reseed the entropy pool use the latter register to provide random numbers to the kernel pool. If at a later time we had a way to tell the provider if it needs to reseed or not we could use the former. On an Amazon AWS Graviton3 VM this never failed, however this may not be the case on low end CPUs so retry reading the random number 10 times before returning an error. Reviewed by: imp, delphij (csprng) Sponsored by: The FreeBSD Foundation Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D35411 --- sys/arm64/conf/std.dev | 1 + sys/conf/files.arm64 | 2 + sys/dev/random/armv8rng.c | 135 +++++++++++++++++++++++++++++++++++++++ sys/dev/random/random_harvestq.c | 1 + sys/modules/Makefile | 2 + sys/modules/armv8_rng/Makefile | 11 ++++ sys/sys/random.h | 1 + 7 files changed, 153 insertions(+) diff --git a/sys/arm64/conf/std.dev b/sys/arm64/conf/std.dev index 74d2407e0aec..0ebf2e775b11 100644 --- a/sys/arm64/conf/std.dev +++ b/sys/arm64/conf/std.dev @@ -53,6 +53,7 @@ device vt_simplefb # Pseudo devices. device crypto # core crypto support +device armv8_rng # Armv8.5 rndr RNG device loop # Network loopback device ether # Ethernet support device vlan # 802.1Q VLAN support diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 38b9e40463eb..9ccead6a98e1 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -379,6 +379,8 @@ dev/psci/psci.c standard dev/psci/smccc_arm64.S standard dev/psci/smccc.c standard +dev/random/armv8rng.c optional armv8_rng !random_loadable + dev/safexcel/safexcel.c optional safexcel fdt dev/sdhci/sdhci_xenon.c optional sdhci_xenon sdhci diff --git a/sys/dev/random/armv8rng.c b/sys/dev/random/armv8rng.c new file mode 100644 index 000000000000..3cca42a5bbf3 --- /dev/null +++ b/sys/dev/random/armv8rng.c @@ -0,0 +1,135 @@ +/*- + * Copyright (c) 2022 The FreeBSD Foundation + * + * This software was developed by Andrew Turner 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 + * 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 +#include + +#include + +#include + +static u_int random_rndr_read(void *, u_int); + +static bool has_rndr; +static struct random_source random_armv8_rndr = { + .rs_ident = "Armv8 rndr RNG", + .rs_source = RANDOM_PURE_ARMV8, + .rs_read = random_rndr_read, +}; + +static inline int +random_rndr_read_one(u_long *buf) +{ + u_long val; + int loop, ret; + + loop = 10; + do { + __asm __volatile( + ".arch_extension rng \n" + "mrs %0, rndrrs \n" /* Read the random number */ + "cset %w1, ne \n" /* 1 on success, 0 on failure */ + ".arch_extension norng \n" + : "=&r" (val), "=&r"(ret) :: "cc"); + } while (ret != 0 && --loop > 0); + + if (ret != 0) + *buf = val; + + return (ret); +} + +static u_int +random_rndr_read(void *buf, u_int c) +{ + u_long *b; + u_int count; + + b = buf; + for (count = 0; count < c; count += sizeof(*b)) { + if (!random_rndr_read_one(b)) + break; + + b++; + } + + return (count); +} + +static int +rndr_modevent(module_t mod, int type, void *unused) +{ + uint64_t reg; + int error = 0; + + switch (type) { + case MOD_LOAD: + has_rndr = false; + if (get_kernel_reg(ID_AA64ISAR0_EL1, ®) && + ID_AA64ISAR0_RNDR_VAL(reg) != ID_AA64ISAR0_RNDR_NONE) { + has_rndr = true; + random_source_register(&random_armv8_rndr); + printf("random: fast provider: \"%s\"\n", + random_armv8_rndr.rs_ident); + } + break; + + case MOD_UNLOAD: + if (has_rndr) + random_source_deregister(&random_armv8_rndr); + break; + + case MOD_SHUTDOWN: + break; + + default: + error = EOPNOTSUPP; + break; + + } + + return (error); +} + +static moduledata_t rndr_mod = { + "rndr", + rndr_modevent, + 0 +}; + +DECLARE_MODULE(rndr, rndr_mod, SI_SUB_RANDOM, SI_ORDER_FOURTH); +MODULE_VERSION(rndr, 1); +MODULE_DEPEND(rndr, random_harvestq, 1, 1, 1); diff --git a/sys/dev/random/random_harvestq.c b/sys/dev/random/random_harvestq.c index 09b81950281b..dce0878513db 100644 --- a/sys/dev/random/random_harvestq.c +++ b/sys/dev/random/random_harvestq.c @@ -385,6 +385,7 @@ static const char *random_source_descr[ENTROPYSOURCE] = { [RANDOM_PURE_TPM] = "PURE_TPM", [RANDOM_PURE_VMGENID] = "PURE_VMGENID", [RANDOM_PURE_QUALCOMM] = "PURE_QUALCOMM", + [RANDOM_PURE_ARMV8] = "PURE_ARMV8", /* "ENTROPYSOURCE" */ }; diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 3eff75312fd3..f9079498dc1f 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -41,6 +41,7 @@ SUBDIR= \ ${_arcmsr} \ ${_allwinner} \ ${_armv8crypto} \ + ${_armv8_rng} \ ${_asmc} \ ata \ ath \ @@ -674,6 +675,7 @@ _cxgb= cxgb .if ${MACHINE_CPUARCH} == "aarch64" _armv8crypto= armv8crypto +_armv8_rng= armv8_rng _dpaa2= dpaa2 _sff= sff _em= em diff --git a/sys/modules/armv8_rng/Makefile b/sys/modules/armv8_rng/Makefile new file mode 100644 index 000000000000..29d2907aed06 --- /dev/null +++ b/sys/modules/armv8_rng/Makefile @@ -0,0 +1,11 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/dev/random + +KMOD= armv8_rng +SRCS= armv8rng.c +SRCS+= bus_if.h device_if.h + +CFLAGS+= -I${SRCTOP}/sys + +.include diff --git a/sys/sys/random.h b/sys/sys/random.h index 0e6ae02ac078..aa4457fc8c22 100644 --- a/sys/sys/random.h +++ b/sys/sys/random.h @@ -102,6 +102,7 @@ enum random_entropy_source { RANDOM_PURE_TPM, RANDOM_PURE_VMGENID, RANDOM_PURE_QUALCOMM, + RANDOM_PURE_ARMV8, ENTROPYSOURCE }; _Static_assert(ENTROPYSOURCE <= 32, From nobody Wed Nov 15 18:14:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVrt30rQBz50ZdQ; Wed, 15 Nov 2023 18:14: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 4SVrt30FX9z4PX9; Wed, 15 Nov 2023 18:14:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700072091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RZT4jJL2Lq1NoMd7MR96K6Mf293XsTZ1IfouJtaKdR0=; b=RPJvjiLjs8RsqqcDLwMcFFkuQKP9CkRZ3AcvJad3pu7rUVUGPW08Q/aLcqKjKBBeHC1+QY Tib6nA64IQBJAih6IBJ6YNZvOqIW5EGM5lvN1OHgnqB1fZYWuzZJTosJsidL1J+P0Cdq2C qZqWGc8LnAtHMa7mMQmpogwn+tUstVXonGZT61pgqYVgPxk0IlsMK7casB9TG6/h3o6SQc T9rbdcoac3yBDlK7sMBInNb27SfawwePmsl8uMAoVGOV2kGPMqQtPVPz8fS+nBkgse0M+M ChU/Csd/R8VJAvyaDF2Rjlu/kj5RAd72VyRecrCHT8q/63kSYBwzUd+8iqn3Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700072091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RZT4jJL2Lq1NoMd7MR96K6Mf293XsTZ1IfouJtaKdR0=; b=bNtn78OmKk3/OqQa2suuZrwjzALEE/w9Hdz+rGf6cxrPHxGXC6QzBDaU99qwchm8QFqa8e cgNRFiJJjySgJpAf1vNoOx0/7+HtF5TB6M51CjcNIS3OQ9i1/KMGxXY/A/OAbjMqrCKVpJ PZv0qteB+SBePEuZhu8MyXAHKLKvB6MCiuOEyW+mEzZDS+/3+NOuAC7zMENE9+NmaZXZ5d 2xFGb8cB5IhiV7YvNpF+1KLp2zYPmsZW4Uw3qfsmWx+p56rKXmWq7HeZW3Yot6VaBtxQlF olv6CkvfObfZiM0yOjdG9tC8wG6LP1QXClx9MS1a3AaIxjfhMIEKWViSaaAFmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700072091; a=rsa-sha256; cv=none; b=QGall/w7UdZjH/3ZJJJ88022E3gNDZ+wjK4/DM59IbNkVRULhE0t2Qy3OR3NZ2iwbPAiKY WHbGKA8U2mzB8iqjmcMnHISSkkB4+HwUbyuvKXvP1Q/lS9K1aJvHFtAtU+UoDFrLrh+MGL tZOGZnII3axuaGpaskP3/lDwWNBi/lniEexYVSLxwj9+8IElR0auq3fXE65y55xW0h4M1z RtDXcyJxd3gKi+zePomajZ+7ShtdpBOBbuKJOF8Y5YB4HxqqzH+rlyuvayUQ0vA2f+facF OJzoRWrR/OcugJmM4BzZotitks8eKJLxInGl3sqpqGWzmwsGAdtQsTyFQ6YhbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVrt26QTvzCJm; Wed, 15 Nov 2023 18:14: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 3AFIEoKR078059; Wed, 15 Nov 2023 18:14:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFIEo2B078056; Wed, 15 Nov 2023 18:14:50 GMT (envelope-from git) Date: Wed, 15 Nov 2023 18:14:50 GMT Message-Id: <202311151814.3AFIEo2B078056@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 257b04454818 - main - arm64: Correct a comment in locore.S List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 257b04454818c80d9b85a840e3ea8db1ea891265 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=257b04454818c80d9b85a840e3ea8db1ea891265 commit 257b04454818c80d9b85a840e3ea8db1ea891265 Author: Andrew Turner AuthorDate: 2023-11-15 18:13:39 +0000 Commit: Andrew Turner CommitDate: 2023-11-15 18:13:39 +0000 arm64: Correct a comment in locore.S We now use the physical address of get_load_phys_addr. Use it in a comment rather than the old symbol. Sponsored by: Arm Ltd --- sys/arm64/arm64/locore.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index ffd13610ec02..0b177438da82 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -361,7 +361,7 @@ LEND(drop_to_el1) LENTRY(get_load_phys_addr) /* Load the offset of get_load_phys_addr from KERNBASE */ ldr x28, =(get_load_phys_addr - KERNBASE) - /* Load the physical address of virt_map */ + /* Load the physical address of get_load_phys_addr */ adr x29, get_load_phys_addr /* Find the physical address of KERNBASE, i.e. our load address */ sub x28, x29, x28 From nobody Wed Nov 15 18:23:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVs4D49XNz50bRl for ; Wed, 15 Nov 2023 18:23:40 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 4SVs4C6sPJz4QPm for ; Wed, 15 Nov 2023 18:23:39 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-408425c7c10so57202365e9.0 for ; Wed, 15 Nov 2023 10:23:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700072618; x=1700677418; 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=YfSwpvwtjomOymK8q9uYfNiMrsbUXQ9Fhv2qryi/32s=; b=j2jNzEy/FIywkDiNwJ3TPGLescri7SLb8JpKmyM9JvEQ29nBWucWzp3mJOS7P3AaR9 t4phxgr2XyLJKMwYCIjhFzJv45WFf2zdLOGXmneIvvxwRK5uGUzpeeGFS4YICUjeeX3Y MZJ+tGc5ROBThfCwZMBatqwagpT807khCe9bwvBBTvbtUGkAzN+5qw0vInvo6EWp6B56 qc3wd46NNrktSSP2HJiBftgpL4wx2HSN2AP59sxa8I89n+nSUA4jj8NyKadLNNgiBAxi IlExFHvZowRez78fGbgT48xEmvH/7meSACaD16ZMntsXi908CFMxCWwyqG/lMuHUNOPK lmXQ== X-Gm-Message-State: AOJu0Yw4B7XD5p8jBDXGNOzicK+iZCWeFx0OeO18+bKDfXVBAsm9aKBG c+/Lm5Vtg8QCHrAtMTiGp5mTCg== X-Google-Smtp-Source: AGHT+IHf30SZh3haGJcCN6H9EKIU8Ej6th4TwpTPw0H+6D3Dl6KLeK8vuzZnGNRlBUtsTyMBqOMxzw== X-Received: by 2002:a05:600c:3b8d:b0:408:3c8a:65ec with SMTP id n13-20020a05600c3b8d00b004083c8a65ecmr10884599wms.8.1700072618144; Wed, 15 Nov 2023 10:23:38 -0800 (PST) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id je14-20020a05600c1f8e00b00405bbfd5d16sm524779wmb.7.2023.11.15.10.23.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Nov 2023 10:23:37 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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: 7eb26be9c808 - main - arm64: Use adrp + :lo12: to load globals from asm From: Jessica Clarke In-Reply-To: <202311151812.3AFICH9p077368@gitrepo.freebsd.org> Date: Wed, 15 Nov 2023 18:23:27 +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: <202311151812.3AFICH9p077368@gitrepo.freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4SVs4C6sPJz4QPm On 15 Nov 2023, at 18:12, Andrew Turner wrote: >=20 > The branch main has been updated by andrew: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D7eb26be9c8080686f64fdc0a28e5ae78= 39bbc82d >=20 > commit 7eb26be9c8080686f64fdc0a28e5ae7839bbc82d > Author: Andrew Turner > AuthorDate: 2023-11-11 09:27:30 +0000 > Commit: Andrew Turner > CommitDate: 2023-11-15 18:05:08 +0000 >=20 > arm64: Use adrp + :lo12: to load globals from asm >=20 > When loading a global variable we can use a pseudo-instruction = similar > to "ldr, xn, =3Dglobal" to load the address of the symbol. As this = is > unlikely to be supported by a mov instruction a pc-relative load is > used, with the absolute address written at the end of the function = so > it will be loaded. >=20 > This load can be partially replaced with an adrp instruction. This > generates the address, aligned to a 4k boundary, using a = pc-relative > addition. Because the address is 4k-aligned we then update reading = the > global variable using a load with the offset of the load the low > 12-bits of the global. Arm64 assemblers have :lo12: to support = this, > e.g. "ldr xn, [xn, :lo12:global]". >=20 > The only remaining users of "ldr, xn, =3Dglobal" that I can find = are > executed from the physical address space the kernel was loaded in = and > need an address in the kernels virtual address space. Because of = this > they can't use adrp. >=20 > Sponsored by: Arm Ltd > Differential Revision: https://reviews.freebsd.org/D42565 I assume the motivation for this, which seems to be missing from the description, is that it removes an unnecessary level of indirection, rather than that there are issues with the PC-relative load literal instruction not working, given that I doubt we=E2=80=99re hitting the 1 = MiB literal pool offset range limit in hand-written assembly? Jess From nobody Wed Nov 15 18:27:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVs9Q6vcSz50bZS for ; Wed, 15 Nov 2023 18:28:10 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (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 4SVs9Q5473z4Qrk for ; Wed, 15 Nov 2023 18:28:10 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2c501bd6ff1so95954901fa.3 for ; Wed, 15 Nov 2023 10:28:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700072889; x=1700677689; 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=IQyTCP350EGzSNfKztupNZhx0mjq6WiWXHOOfWtBN/U=; b=vqIwQix1TvnVSNe18Easb/x6HaAqCkXkjbm2pW9vWggpCqZq79NFjMCdpv7THrA6L1 e321/m7jQ5l7/4M8J2LbJprTbL1WWtda7Jv9pbqk4sOWri6GsDt92OvPdQQuAarMI0hT qEocJI1rjQ87KndKfzfwdLJ6cgeYK5zIuDAjZA6wxvqmdGPuIXXFNWr7E+Fccji/o78J JOdFMmolRnjrDnsASjezhog3ZNQYwuN2Bg3LXcqIptBpy22eu19jg6rO722rm7NXG6Vp WLD7IV2Vo9D63gvxqV9BphNVtmqTv3T0PnnBLdEX6rC+U1Aa5syjQqzpWLEU7n45MOsj 2how== X-Gm-Message-State: AOJu0YxiErwT44kC1tqscTj/mCjfx2TmvZi3EuQtRXNGlqtWZOVT50fk j01VY8kTn0NeXFiWeY3c/Z+Fg1IVfr5V7IorAubjvQ== X-Google-Smtp-Source: AGHT+IHiwdJ9GjVhq8qw01DkGqEuHkEMwsaEMa1gAkJl0+mn+9pTKzjLq/lRCafHtIUvDbxYmncUyQ== X-Received: by 2002:a2e:87c5:0:b0:2c5:380:2a10 with SMTP id v5-20020a2e87c5000000b002c503802a10mr5232639ljj.25.1700072888580; Wed, 15 Nov 2023 10:28:08 -0800 (PST) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id k27-20020a05600c1c9b00b00407752bd834sm529560wms.1.2023.11.15.10.28.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Nov 2023 10:28:08 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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: 9eecef052155 - main - Add an Armv8 rndr random number provider From: Jessica Clarke In-Reply-To: <202311151812.3AFICLIs077567@gitrepo.freebsd.org> Date: Wed, 15 Nov 2023 18:27:57 +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: <202311151812.3AFICLIs077567@gitrepo.freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4SVs9Q5473z4Qrk On 15 Nov 2023, at 18:12, Andrew Turner wrote: >=20 > The branch main has been updated by andrew: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D9eecef052155646fbc5f8f533b952b37= 2572d06a >=20 > commit 9eecef052155646fbc5f8f533b952b372572d06a > Author: Andrew Turner > AuthorDate: 2023-11-15 17:42:02 +0000 > Commit: Andrew Turner > CommitDate: 2023-11-15 18:05:08 +0000 >=20 > Add an Armv8 rndr random number provider >=20 > Armv8.5 adds an optional random number generator. This is = implemented > as two special registers one to read a random number, the other to > re-seed the entropy pool before reading a random number. Both = registers > will set the condition flags to tell the caller they can't produce = a > random number in a reasonable amount of time. >=20 > Without a signal to reseed the entropy pool use the latter register > to provide random numbers to the kernel pool. If at a later time we > had a way to tell the provider if it needs to reseed or not we = could > use the former. >=20 > On an Amazon AWS Graviton3 VM this never failed, however this may = not > be the case on low end CPUs so retry reading the random number 10 = times > before returning an error. >=20 > Reviewed by: imp, delphij (csprng) > Sponsored by: The FreeBSD Foundation > Sponsored by: Arm Ltd > Differential Revision: https://reviews.freebsd.org/D35411 > --- > sys/arm64/conf/std.dev | 1 + > sys/conf/files.arm64 | 2 + > sys/dev/random/armv8rng.c | 135 = +++++++++++++++++++++++++++++++++++++++ > sys/dev/random/random_harvestq.c | 1 + > sys/modules/Makefile | 2 + > sys/modules/armv8_rng/Makefile | 11 ++++ > sys/sys/random.h | 1 + > 7 files changed, 153 insertions(+) >=20 > diff --git a/sys/arm64/conf/std.dev b/sys/arm64/conf/std.dev > index 74d2407e0aec..0ebf2e775b11 100644 > --- a/sys/arm64/conf/std.dev > +++ b/sys/arm64/conf/std.dev > @@ -53,6 +53,7 @@ device vt_simplefb >=20 > # Pseudo devices. > device crypto # core crypto support > +device armv8_rng # Armv8.5 rndr RNG > device loop # Network loopback > device ether # Ethernet support > device vlan # 802.1Q VLAN support > diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 > index 38b9e40463eb..9ccead6a98e1 100644 > --- a/sys/conf/files.arm64 > +++ b/sys/conf/files.arm64 > @@ -379,6 +379,8 @@ dev/psci/psci.c standard > dev/psci/smccc_arm64.S standard > dev/psci/smccc.c standard >=20 > +dev/random/armv8rng.c optional armv8_rng !random_loadable > + > dev/safexcel/safexcel.c optional safexcel fdt >=20 > dev/sdhci/sdhci_xenon.c optional sdhci_xenon sdhci > diff --git a/sys/dev/random/armv8rng.c b/sys/dev/random/armv8rng.c > new file mode 100644 > index 000000000000..3cca42a5bbf3 > --- /dev/null > +++ b/sys/dev/random/armv8rng.c > @@ -0,0 +1,135 @@ > +/*- > + * Copyright (c) 2022 The FreeBSD Foundation > + * > + * This software was developed by Andrew Turner 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 > + * 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 > +#include > + > +#include > + > +#include > + > +static u_int random_rndr_read(void *, u_int); > + > +static bool has_rndr; > +static struct random_source random_armv8_rndr =3D { > + .rs_ident =3D "Armv8 rndr RNG", > + .rs_source =3D RANDOM_PURE_ARMV8, > + .rs_read =3D random_rndr_read, > +}; > + > +static inline int > +random_rndr_read_one(u_long *buf) > +{ > + u_long val; > + int loop, ret; > + > + loop =3D 10; > + do { > + __asm __volatile( > + ".arch_extension rng \n" > + "mrs %0, rndrrs \n" /* Read the random number */ > + "cset %w1, ne \n" /* 1 on success, 0 on failure */ > + ".arch_extension norng \n" > + : "=3D&r" (val), "=3D&r"(ret) :: "cc"); Early clobber doesn=E2=80=99t make sense with no inputs. Jess > + } while (ret !=3D 0 && --loop > 0); > + > + if (ret !=3D 0) > + *buf =3D val; > + > + return (ret); > +} > + > +static u_int > +random_rndr_read(void *buf, u_int c) > +{ > + u_long *b; > + u_int count; > + > + b =3D buf; > + for (count =3D 0; count < c; count +=3D sizeof(*b)) { > + if (!random_rndr_read_one(b)) > + break; > + > + b++; > + } > + > + return (count); > +} > + > +static int > +rndr_modevent(module_t mod, int type, void *unused) > +{ > + uint64_t reg; > + int error =3D 0; > + > + switch (type) { > + case MOD_LOAD: > + has_rndr =3D false; > + if (get_kernel_reg(ID_AA64ISAR0_EL1, ®) && > + ID_AA64ISAR0_RNDR_VAL(reg) !=3D ID_AA64ISAR0_RNDR_NONE) { > + has_rndr =3D true; > + random_source_register(&random_armv8_rndr); > + printf("random: fast provider: \"%s\"\n", > + random_armv8_rndr.rs_ident); > + } > + break; > + > + case MOD_UNLOAD: > + if (has_rndr) > + random_source_deregister(&random_armv8_rndr); > + break; > + > + case MOD_SHUTDOWN: > + break; > + > + default: > + error =3D EOPNOTSUPP; > + break; > + > + } > + > + return (error); > +} > + > +static moduledata_t rndr_mod =3D { > + "rndr", > + rndr_modevent, > + 0 > +}; > + > +DECLARE_MODULE(rndr, rndr_mod, SI_SUB_RANDOM, SI_ORDER_FOURTH); > +MODULE_VERSION(rndr, 1); > +MODULE_DEPEND(rndr, random_harvestq, 1, 1, 1); > diff --git a/sys/dev/random/random_harvestq.c = b/sys/dev/random/random_harvestq.c > index 09b81950281b..dce0878513db 100644 > --- a/sys/dev/random/random_harvestq.c > +++ b/sys/dev/random/random_harvestq.c > @@ -385,6 +385,7 @@ static const char = *random_source_descr[ENTROPYSOURCE] =3D { > [RANDOM_PURE_TPM] =3D "PURE_TPM", > [RANDOM_PURE_VMGENID] =3D "PURE_VMGENID", > [RANDOM_PURE_QUALCOMM] =3D "PURE_QUALCOMM", > + [RANDOM_PURE_ARMV8] =3D "PURE_ARMV8", > /* "ENTROPYSOURCE" */ > }; >=20 > diff --git a/sys/modules/Makefile b/sys/modules/Makefile > index 3eff75312fd3..f9079498dc1f 100644 > --- a/sys/modules/Makefile > +++ b/sys/modules/Makefile > @@ -41,6 +41,7 @@ SUBDIR=3D \ > ${_arcmsr} \ > ${_allwinner} \ > ${_armv8crypto} \ > + ${_armv8_rng} \ > ${_asmc} \ > ata \ > ath \ > @@ -674,6 +675,7 @@ _cxgb=3D cxgb >=20 > .if ${MACHINE_CPUARCH} =3D=3D "aarch64" > _armv8crypto=3D armv8crypto > +_armv8_rng=3D armv8_rng > _dpaa2=3D dpaa2 > _sff=3D sff > _em=3D em > diff --git a/sys/modules/armv8_rng/Makefile = b/sys/modules/armv8_rng/Makefile > new file mode 100644 > index 000000000000..29d2907aed06 > --- /dev/null > +++ b/sys/modules/armv8_rng/Makefile > @@ -0,0 +1,11 @@ > +# $FreeBSD$ > + > +.PATH: ${SRCTOP}/sys/dev/random > + > +KMOD=3D armv8_rng > +SRCS=3D armv8rng.c > +SRCS+=3D bus_if.h device_if.h > + > +CFLAGS+=3D -I${SRCTOP}/sys > + > +.include > diff --git a/sys/sys/random.h b/sys/sys/random.h > index 0e6ae02ac078..aa4457fc8c22 100644 > --- a/sys/sys/random.h > +++ b/sys/sys/random.h > @@ -102,6 +102,7 @@ enum random_entropy_source { > RANDOM_PURE_TPM, > RANDOM_PURE_VMGENID, > RANDOM_PURE_QUALCOMM, > + RANDOM_PURE_ARMV8, > ENTROPYSOURCE > }; > _Static_assert(ENTROPYSOURCE <=3D 32, From nobody Wed Nov 15 20:00:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVvCX3NQqz50glP; Wed, 15 Nov 2023 20:00: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 4SVvCX2Wqgz4XV3; Wed, 15 Nov 2023 20:00:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700078408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=flWY8x64bz8Ls++9ggpoJn+UeiSLkUxiEItq7Hqc0Mg=; b=i1SNhUv2QvAwqV4q5mvIU4NPEN+qQebXdwqkcxwYdyJMKLmqF0GffD4gQHdnOND63xE6qQ bVHIU5TTlxlrsfgk2qZYLSnuxF35jBieZ4dSt4KByK0QI4uzK9Zu0Hfq93QQ2MB8vWRt6Y uIE401lR+r1XQPjfEnkfo7C7XyXjx0ftTHgu3QNM6bW8Dx7idIBnC38sMdm+hF4iOvG6sc zTnRZHSF7P+EGiz09paBNWMSlBz/Fq/9l8A3wHMwjCNOHlDZ68nS7O0lRCfoHdbt4r9CpI IH1lJ7sbm270b+UDCQJNwcGOD9c27aZa9BdV7Dfkaz4AiUC24BrKgDJpHGzEqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700078408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=flWY8x64bz8Ls++9ggpoJn+UeiSLkUxiEItq7Hqc0Mg=; b=CvoXcqJxHZta6ubVCkFtuMPRgSRE2qNjS3/IHjIFNnnescZvHIrcDAd66xJk52DnRWSpWs s4Yy0kJsW09KENYsZgCCH3Con9Y60NwP39dZg4TqY1Emh8hjPBUcV+CRmCzYI35c95u2Xm PIRXpefUa9RW9m+DPpPPSLvW+5AAJ06ogR4P4Vs+t/jJANTuQ//vY2c+40x/Mj4/5xm6by /brw4g13fVVwTG7t+VWvJ14XBHlJGDKOqCppjubv0JogH6fGooDTEF7aS9Sh2ODsUnGlcE Iy23FWT0ix/I59hdByduzBukfGKa/6XFmQyld430Me8qzJGEd9VLAk2Z4uKZ7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700078408; a=rsa-sha256; cv=none; b=S3/BK7fljz0M2naDEIKfUb9Fkn9Q6Mon8QdbHvOxEMmfigPfILXDivILKfplmVujZG8q5x WXyc5g+f47dMNC3a+mchlBJykwxhXddP4p43N7rOenqElpwBh3ZjuB1qKOkA+O9oQ/lWTx a+Oxo23ep2qJUVywphTGzqeqkTkNB4kl6JEjAlgWWip7Gzr0Hy3DoM6zZwxVdlqc/DYLjl EYvEBR8ePfFpeJIX1oJ6tkK+x+4P9rEPh6giIur/T65K0cxbcz6+rEMEa8q3bukYySwuLp T9Ru6OwYxPzBsGvE0DBYi+8I33cyKz0aNoKSOjxX7IS2D8uaAa2oOcVMrBoPpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVvCX1b07zVh2; Wed, 15 Nov 2023 20:00: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 3AFK08QJ049680; Wed, 15 Nov 2023 20:00:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFK08su049676; Wed, 15 Nov 2023 20:00:08 GMT (envelope-from git) Date: Wed, 15 Nov 2023 20:00:08 GMT Message-Id: <202311152000.3AFK08su049676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: f88698a4ebc6 - stable/14 - tcpdump: decode pfsync packets on network 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f88698a4ebc6e879608a435a6ffda475190dc739 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f88698a4ebc6e879608a435a6ffda475190dc739 commit f88698a4ebc6e879608a435a6ffda475190dc739 Author: Luiz Amaral AuthorDate: 2023-11-08 15:12:14 +0000 Commit: Kristof Provost CommitDate: 2023-11-15 09:45:33 +0000 tcpdump: decode pfsync packets on network interfaces When print-ip-demux.c was introduced on ee67461e, the pfsync_ip_print function was missed, causing tcpdump to treat pfsync packets on network interfaces as an unknown protocol. MFC after: 1 week Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D42504 (cherry picked from commit 85247ee6a2ba1c2dd0053e9be9055efa4be1438e) --- contrib/tcpdump/print-ip-demux.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/tcpdump/print-ip-demux.c b/contrib/tcpdump/print-ip-demux.c index a0a6fbd11f3a..758601910881 100644 --- a/contrib/tcpdump/print-ip-demux.c +++ b/contrib/tcpdump/print-ip-demux.c @@ -216,6 +216,12 @@ again: } break; +#ifdef HAVE_NET_IF_PFLOG_H + case IPPROTO_PFSYNC: + pfsync_ip_print(ndo, bp, length); + break; +#endif + case IPPROTO_NONE: ND_PRINT("no next header"); break; From nobody Wed Nov 15 21:28:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVx9G5C2Qz50mBb; Wed, 15 Nov 2023 21:28: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 4SVx9G4SWqz4flW; Wed, 15 Nov 2023 21:28:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700083698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qBjols3lSFaL0gj2WQR8kFoplWtYItZScJscYK85/MA=; b=K8z/55VmRoKH0D43tAmC8kw1j4R0X8mQj8Exejvfn3yiQWD0vJvsbZAr8KKGHQcu8z/6XB k2qr/OTJ3YaYbcEyE7xRaL/G+VCprx1t6G8et6o7nuAI8pwGce/MRds3zrr9iHfwY9Yxy+ W/ve66SN62GJ0Uw39NhFG4jBoYmyN7Ke7zqYOdzVAY7x4rT4Z50Z/OOGMo7LSaW4hh2GWM fYbMEeQsk9snPX7oQKisvvg8aSLk7RGqYFYik+K6Oukzm3GI5/OwgnPST8EuirpTXYU42x MX+xZDI2xX6/R05U2uu0QjLiUMFG0vqesc2YAhdpS0JnPb6w4fK3JzQx1NIpZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700083698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qBjols3lSFaL0gj2WQR8kFoplWtYItZScJscYK85/MA=; b=HJvlXGQTZuRUoHTOZjK24PbWdxGI/Y5Fg5T57Cmhm/Q5vvoad70JDL/Tw70QUry55tkyGq tpIOfhRg4AD8INrwfXn/Y0fYVK/lxWe0kMSE7knpJieVsIlU9AFcppT4LCeP9mJxvTU3h4 6qpcrojhG2RZVofOBx3RSM5Cwqat06QHx3b/I/mQRZevNvBBBzLzsz8Sdc8SqH9hl+9PsV jaT2w25nK6oA9F+BydcNeYyaWbAXJo31ZvUYNm//hMW0ev/T4EWTvNSkQHRK5u/jiNBNXS atKpW11pMRoLlVgVpTB6UszMw/3q2KrzA+mPbQGJfJGXxTHLrnWAmoQCc7qb/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700083698; a=rsa-sha256; cv=none; b=W//tkh+Iv/tYWMscgoYcqvN6bp20GKnPs0FGYLP1NFYno7eIXGOzC8D+4yU3z0StQbVcPf dweU8K8uLSGCL/gHbUsKMaUObP8UVPdYynxqCyMm8jY7mJtmkacNXULVNsHXR2xW6Hk7Aa aYor44RLDCzeWgZ5fyUAfdZgp4tVRx+k0kphBmULXy/cYcVfsWeiQxvBK5WP31H5RMNctt 3btZ6y6+gVe6mPEWrY1vyFIKrKmNX7xXfL0+A3vvI1/9f2pqRx7LsiDKg+jhPFQO5Y1JBv +7iNflFnL5Tinwz6dHxtJWT4UBSIhk6w2+dsJjhZ6wtmSc5vBMEEEVn9XW/5PQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVx9G3Wd7zYNL; Wed, 15 Nov 2023 21:28: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 3AFLSId2096571; Wed, 15 Nov 2023 21:28:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFLSIcs096568; Wed, 15 Nov 2023 21:28:18 GMT (envelope-from git) Date: Wed, 15 Nov 2023 21:28:18 GMT Message-Id: <202311152128.3AFLSIcs096568@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: 6f38d2e7b059 - main - acpi: Add workaround for Altra I2C memory resource List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 6f38d2e7b0599f9b61c04686eb9a7faf3264b8ec Auto-Submitted: auto-generated The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=6f38d2e7b0599f9b61c04686eb9a7faf3264b8ec commit 6f38d2e7b0599f9b61c04686eb9a7faf3264b8ec Author: Andrew Gallatin AuthorDate: 2023-11-15 21:22:00 +0000 Commit: Andrew Gallatin CommitDate: 2023-11-15 21:25:00 +0000 acpi: Add workaround for Altra I2C memory resource Submitted by: allanjude Sponsored by: Ampere Computing LLC Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D28741 --- sys/dev/acpica/acpi_resource.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/acpica/acpi_resource.c b/sys/dev/acpica/acpi_resource.c index 373cc6da9820..b845fd146f67 100644 --- a/sys/dev/acpica/acpi_resource.c +++ b/sys/dev/acpica/acpi_resource.c @@ -517,6 +517,13 @@ acpi_parse_resources(device_t dev, ACPI_HANDLE handle, acpi_MatchHid(handle, "ARMHD620") != ACPI_MATCHHID_NOMATCH) arc.ignore_producer_flag = true; + /* + * The DesignWare I2C Controller on Ampere Altra sets ResourceProducer on + * memory resources. + */ + if (acpi_MatchHid(handle, "APMC0D0F") != ACPI_MATCHHID_NOMATCH) + arc.ignore_producer_flag = true; + status = AcpiWalkResources(handle, "_CRS", acpi_parse_resource, &arc); if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { printf("can't fetch resources for %s - %s\n", From nobody Wed Nov 15 21:59:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVxss6gwkz50ndY for ; Wed, 15 Nov 2023 22:00:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) (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 4SVxss4j3yz3FTt for ; Wed, 15 Nov 2023 22:00:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-50970c2115eso181861e87.1 for ; Wed, 15 Nov 2023 14:00:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1700085599; x=1700690399; 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=UKG7waAEJ0xqWSnVrWVhrN3uuI4hHzqHFT0KWKOSGtg=; b=eAy7vBdEdFoGEF8/a/+/7IjtxHKTKH9r6F8oiYgvgBpSliJSu4IuYwcYUotAX/r/qr jcDKJTh9YhJpzYIG63VbtmmLvAr3FPG8ODQIeWka82djz7ngDd4J28eQAvilOCitZwV5 uDPfZljH6M3oNXFHmECSRkl9pdc3v8zznUtuCvxO7dOKF3t6jTAYA5dQTdh3AoSXKE9W 1CrXF62HxIbIEGheRFlx6CMs4mRfCAx/v2xMok9kkFzMML0nKU6OB38oOH6Npl7DIHTx Dk6W3MkLKR9hwLxxaFF9ieI7jlvOby6HfHebC0dIRc/1st0aXG3ykvaVJpDjB2kF+Jvl MuuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700085599; x=1700690399; 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=UKG7waAEJ0xqWSnVrWVhrN3uuI4hHzqHFT0KWKOSGtg=; b=jnIGn0TdR9QuIn9Lb64F2WYsCgGrHVJrcHtltJDyhfAs/lvOsIdWgz606b5Fd1TkL4 GXY2mQA7l+fJkW3sDscXs43BdUqV0UXrJ006iMT5gd7IMV1MbeFRn9En5xh4TKbPX4xH als6uX6r/A5hs6w4n5HeCiimpLk+3rwnatmA7vXbd3SY+r61abhchytc6K1kyj6aQoZj zow18d//y6d7DLdVBB+XkCRKHrZ6zxrHkF5TRerqQoBqmv3hRmYg5jR6a0+SODrsgf2a wCiy9rBLvayy/exh6vxsy4iHFSFc/Aur0OucdaeyX3hTww65ZRn9DpXMNTj+wH+X/8VA noWw== X-Gm-Message-State: AOJu0Yx22MP7uRinpUZgqpcovbz0YUg4WVypDMi1+WZpI7EXJYQTP3BQ vuAd0afE4uprBNfwS9gS5lLGvYpA4wtHGEVoXuPMlA== X-Google-Smtp-Source: AGHT+IFZIlljXTbmPcc6vb40v2AugPuP5fwHKVBD355bnI8Mp/bPqM9e/71DguUzbAgHMOGdt3KBa1Snzsi2xz8UZps= X-Received: by 2002:a05:6512:60d:b0:503:3808:389a with SMTP id b13-20020a056512060d00b005033808389amr8108814lfe.11.1700085598338; Wed, 15 Nov 2023 13:59:58 -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: <202311140451.3AE4p5AR014207@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 15 Nov 2023 14:59:46 -0700 Message-ID: Subject: Re: git: 3fd60a6b73ac - main - awk: Merge upstream 2nd Edition Awk Book To: Jessica Clarke Cc: Warner Losh , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="0000000000002d5458060a380609" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4SVxss4j3yz3FTt --0000000000002d5458060a380609 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 15, 2023 at 9:52=E2=80=AFAM Jessica Clarke = wrote: > On 14 Nov 2023, at 04:51, Warner Losh wrote: > > > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D3fd60a6b73ac01a72df89751f173970= fae4cae73 > > > > commit 3fd60a6b73ac01a72df89751f173970fae4cae73 > > Merge: 194df014feeb 2e406c584fe4 > > Author: Warner Losh > > AuthorDate: 2023-11-02 16:32:01 +0000 > > Commit: Warner Losh > > CommitDate: 2023-11-14 04:49:34 +0000 > > > > awk: Merge upstream 2nd Edition Awk Book > > > > Merge in the November 2nd, 2023 version of one true awk. > > > > This brings in Unicode support, CSV support and a number of bug fixe= s. > > > > Sponsored by: Netflix > > Reviewed by: delphij > > Differential Revision: https://reviews.freebsd.org/D42447 > > This seems to have broken the GitHub CI for cross-building; contrast: > > https://github.com/freebsd/freebsd-src/actions/runs/6859373313 > > with: > > https://github.com/freebsd/freebsd-src/actions/runs/6859316228 > > Has this broken makeobjops.awk somehow? If so it should be reproducible > on FreeBSD with BOOTSTRAP_ALL_TOOLS=3D1, or by rebuilding on an updated > system. Cross-building will just show it first because we always > bootstrap awk there, like many other tools. > It worked when it was the system awk for me... But that might not be the most helpful observation. Why didn't it work for you/github's ci runs? makeobjops.awk doesn't have any of the issues that I know are minor changes in awk. I'll add it to the list of things to look into, though. I also broke the Jenkins CI run, but not 'make check' for reasons I don't understand. Warner --0000000000002d5458060a380609 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Nov 15, 2023 at 9:52=E2=80=AF= AM Jessica Clarke <jrtc27@freebsd.= org> wrote:
On 14 Nov 2023, at 04:51, Warner Losh <imp@FreeBSD.org> wrote:
>
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D3fd60a6b73ac01a72df89751f173970fae4cae73<= /a>
>
> commit 3fd60a6b73ac01a72df89751f173970fae4cae73
> Merge: 194df014feeb 2e406c584fe4
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2023-11-02 16:32:01 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2023-11-14 04:49:34 +0000
>
>=C2=A0 =C2=A0 awk: Merge upstream 2nd Edition Awk Book
>
>=C2=A0 =C2=A0 Merge in the November 2nd, 2023 version of one true awk.<= br> >
>=C2=A0 =C2=A0 This brings in Unicode support, CSV support and a number = of bug fixes.
>
>=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Net= flix
>=C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 del= phij
>=C2=A0 =C2=A0 Differential Revision:=C2=A0
https://reviews.fre= ebsd.org/D42447

This seems to have broken the GitHub CI for cross-building; contrast:

https://github.com/freebsd/freebsd-src= /actions/runs/6859373313

with:

https://github.com/freebsd/freebsd-src= /actions/runs/6859316228

Has this broken makeobjops.awk somehow? If so it should be reproducible
on FreeBSD with BOOTSTRAP_ALL_TOOLS=3D1, or by rebuilding on an updated
system. Cross-building will just show it first because we always
bootstrap awk there, like many other tools.

=
It worked when it was the system awk for me...=C2=A0 But that might no= t be the most
helpful observation. Why didn't it work for you= /github's ci runs?

makeobjops.awk=C2=A0doesn&#= 39;t have any of the issues that I know are minor changes
in awk.= I'll add it to the list of things to look into, though.

=
I also broke the Jenkins CI run, but not 'make check' fo= r reasons I don't
understand.

Warner=


--0000000000002d5458060a380609-- From nobody Wed Nov 15 22:13:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVy9z48Yfz50pR8 for ; Wed, 15 Nov 2023 22:13:59 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (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 4SVy9y5ygGz3Gv5 for ; Wed, 15 Nov 2023 22:13:58 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-32fb1c35fe0so103181f8f.1 for ; Wed, 15 Nov 2023 14:13:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700086437; x=1700691237; 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=vKNycPreq/lMit01zZ62+fw2eFvnZ0nTCmD2Q7/g2aY=; b=bYNT5fEUMqFZ4UOjYh1g0j3XaN4wSu+0qV/qBhJlT2NCfcpTa1EmbM2MgwRoC2qdcl AbYmkG0rBHaNqvcGHvP9UxQ3y4bQZXaplh0r2x2j9U8o4Ki12Na2Ibxf7sW3+TPhbJ49 f1vl3LoX4ytQpk4LI3HYNRRtuzw01xShWxtGLY2WMrBgvSnh90GsxR+pb0vVTq8dJtId XmZ6PssNq7LK5miZu58B2Tr3VbH97wBCmQUegqkvi9+yVgrqX8JuhNhEu+fn42aRdvX3 SmOIyAKFdwrWxRJ0FVffsx12uC/MM6zUBw5eWExlJ/zHg851jW6vuP0aFMOqhekUUdWU xYdA== X-Gm-Message-State: AOJu0YyoEYxhN7g0TbLQNf+SbAg9zYz7EFIejcdzTsiGV/jxEpIvGcDS pDK7D+OAtMVjxwlB4EArchMfOw== X-Google-Smtp-Source: AGHT+IF06TnZpufnQuK5Uq0kqSdpJ6UdaOyeJ8ERppTfOnALTSEqDj+q6bvKUAhA8Ds/wTXOWlwbPw== X-Received: by 2002:adf:e110:0:b0:32f:889a:2b9f with SMTP id t16-20020adfe110000000b0032f889a2b9fmr9929321wrz.15.1700086436456; Wed, 15 Nov 2023 14:13:56 -0800 (PST) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id p15-20020a056000018f00b0032d96dd703bsm11714218wrx.70.2023.11.15.14.13.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Nov 2023 14:13:56 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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: 3fd60a6b73ac - main - awk: Merge upstream 2nd Edition Awk Book From: Jessica Clarke In-Reply-To: Date: Wed, 15 Nov 2023 22:13:45 +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: <202311140451.3AE4p5AR014207@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4SVy9y5ygGz3Gv5 On 15 Nov 2023, at 21:59, Warner Losh wrote: >=20 >=20 >=20 > On Wed, Nov 15, 2023 at 9:52=E2=80=AFAM Jessica Clarke = wrote: >> On 14 Nov 2023, at 04:51, Warner Losh wrote: >> >=20 >> > The branch main has been updated by imp: >> >=20 >> > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D3fd60a6b73ac01a72df89751f173970f= ae4cae73 >> >=20 >> > commit 3fd60a6b73ac01a72df89751f173970fae4cae73 >> > Merge: 194df014feeb 2e406c584fe4 >> > Author: Warner Losh >> > AuthorDate: 2023-11-02 16:32:01 +0000 >> > Commit: Warner Losh >> > CommitDate: 2023-11-14 04:49:34 +0000 >> >=20 >> > awk: Merge upstream 2nd Edition Awk Book >> >=20 >> > Merge in the November 2nd, 2023 version of one true awk. >> >=20 >> > This brings in Unicode support, CSV support and a number of bug = fixes. >> >=20 >> > Sponsored by: Netflix >> > Reviewed by: delphij >> > Differential Revision: https://reviews.freebsd.org/D42447 >>=20 >> This seems to have broken the GitHub CI for cross-building; contrast: >>=20 >> https://github.com/freebsd/freebsd-src/actions/runs/6859373313 >>=20 >> with: >>=20 >> https://github.com/freebsd/freebsd-src/actions/runs/6859316228 >>=20 >> Has this broken makeobjops.awk somehow? If so it should be = reproducible >> on FreeBSD with BOOTSTRAP_ALL_TOOLS=3D1, or by rebuilding on an = updated >> system. Cross-building will just show it first because we always >> bootstrap awk there, like many other tools. >=20 > It worked when it was the system awk for me... But that might not be = the most > helpful observation. For a clean kernel build? > Why didn't it work for you/github's ci runs? =46rom GitHub (indentation sadly lost when copying): > In file included from = /Users/runner/work/freebsd-src/freebsd-src/sys/cam/cam.c:45:=20 > In file included from = /Users/runner/work/freebsd-src/freebsd-src/sys/cam/cam_ccb.h:1052:=20 > In file included from = /Users/runner/work/freebsd-src/freebsd-src/sys/cam/mmc/mmc_bus.h:4:=20 > In file included from = /Users/runner/work/freebsd-src/freebsd-src/sys/dev/mmc/bridge.h:57:=20 > In file included from = /Users/runner/work/freebsd-src/freebsd-src/sys/sys/bus.h:787:=20 > ./bus_if.h:217:35: error: expected ')'=20 > int _unit);=20 > ^=20 > ./bus_if.h:216:33: note: to match this '('=20 > typedef device_t bus_add_child_t(device_t _dev, u_int _order, const = char *_name=20 > ^=20 > ./bus_if.h:241:41: error: expected ')'=20 > const char *_name, int _unit)=20 > ^=20 > ./bus_if.h:240:39: note: to match this '('=20 > static __inline device_t BUS_ADD_CHILD(device_t _dev, u_int _order=20 > ^ > ... Hence the assumption that makeobjops.awk has stopped working properly, which is highly consistent with this being the first commit to fail in CI. It looks like we=E2=80=99re missing commas, maybe from format_line. I haven=E2=80=99t tried to reproduce it locally, but given it=E2=80=99s = across all macOS and Ubuntu versions I would be surprised if I couldn=E2=80=99t. > makeobjops.awk doesn't have any of the issues that I know are minor = changes > in awk. I'll add it to the list of things to look into, though. On what timeline? If not soon, can we please revert the import as it=E2=80= =99s breaking important things and thus not ready for the tree? Jess > I also broke the Jenkins CI run, but not 'make check' for reasons I = don't > understand. >=20 > Warner From nobody Wed Nov 15 22:20:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVyKJ1Chvz50pCX for ; Wed, 15 Nov 2023 22:20:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (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 4SVyKH6Njhz3H5S for ; Wed, 15 Nov 2023 22:20:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-543c3756521so256549a12.2 for ; Wed, 15 Nov 2023 14:20:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1700086818; x=1700691618; 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=60BXZOlkzDOkrlt4Q26NjoIk1RlOlGJXWDB5F6qrVvY=; b=xpHzpRH7InJYm6hWGcMt2tsykUPM0+wZFj0tZ/J4+ep5/QjWEJ9w93cD12KxjsPFpr IIFNT135kZ0uqGnT+WiH7LbXqPqhzFQztAsiPCD5eWwfxFrsgTDm5Ru7B4V11Jwzgscf coZFaOEYiuKvXfMCdhSHcBQh/0eoIcHMD+PO6dKHlgc/QW3J/sdQiSOyKi2WZyY0Y1sb drfZFfYDymdwPzQKrL6LWYdXTh2cChAffaa11In70gSGJjVwMCbLAYILXmQ94zJzjx3q JjhO/UJLII1WZ5Bhg8bHY4MBLHBvslE6ziiM4VuhN5S4i2RelhhCbtZakOlRZ/H3svDq xWmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700086818; x=1700691618; 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=60BXZOlkzDOkrlt4Q26NjoIk1RlOlGJXWDB5F6qrVvY=; b=P0+TKJJM1Ffszi55hpL/fhQ4MvWOmFsQdkqQh2z3jEZC/LqDWH7jzVQBTmPRY1S8ru YgcjS09ldLTGbWz8AzUMI5TJJ25jczWhgDyjKGnIIt9QZINL5MHUSbLF29b5mTvl46PE vvtujSIl0S09N+aFDBP3uhMjWSY0rgAiBJv+FvNiwqUQkiBSSY5Sk4ezZIz2ZnFN8jgi iybRG2T+s/8JBjKQooYY7rmiczAl5EttWHOP6/Wgen6KFrIqQx4TbjC0KRnqrObrZ8sv 3aY9MSjCCMtg5siW8zXkL96709JAYpZn+nBzle6MLdkXdMwd0N0yA6g+MHBWhzYmriJt 6ZIg== X-Gm-Message-State: AOJu0YxwNpb3GlV9te3tV/8FrN+Pv8OT7JyvDNQq4ZfqU9VJv5GoLwvi GnIu5QvwZrY6q2Av6HUO8s7mCD5bFc/Sk4T1gAH3uA== X-Google-Smtp-Source: AGHT+IG4optzvxh+vfm/8WKnoguf4y6Br1M6sYSonPsG9SLuaE4Is/Uck3EYDtYOnBftvz6hj7ZhnqEzTRI1ZirYq3s= X-Received: by 2002:a05:6402:d8:b0:532:bf2a:8cbc with SMTP id i24-20020a05640200d800b00532bf2a8cbcmr477696edu.16.1700086817662; Wed, 15 Nov 2023 14:20:17 -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: <202311140451.3AE4p5AR014207@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 15 Nov 2023 15:20:06 -0700 Message-ID: Subject: Re: git: 3fd60a6b73ac - main - awk: Merge upstream 2nd Edition Awk Book To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="000000000000dab779060a384eee" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4SVyKH6Njhz3H5S --000000000000dab779060a384eee Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 15, 2023 at 3:13=E2=80=AFPM Jessica Clarke = wrote: > On 15 Nov 2023, at 21:59, Warner Losh wrote: > > > > > > > > On Wed, Nov 15, 2023 at 9:52=E2=80=AFAM Jessica Clarke > wrote: > >> On 14 Nov 2023, at 04:51, Warner Losh wrote: > >> > > >> > The branch main has been updated by imp: > >> > > >> > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D3fd60a6b73ac01a72df89751f173970= fae4cae73 > >> > > >> > commit 3fd60a6b73ac01a72df89751f173970fae4cae73 > >> > Merge: 194df014feeb 2e406c584fe4 > >> > Author: Warner Losh > >> > AuthorDate: 2023-11-02 16:32:01 +0000 > >> > Commit: Warner Losh > >> > CommitDate: 2023-11-14 04:49:34 +0000 > >> > > >> > awk: Merge upstream 2nd Edition Awk Book > >> > > >> > Merge in the November 2nd, 2023 version of one true awk. > >> > > >> > This brings in Unicode support, CSV support and a number of bug > fixes. > >> > > >> > Sponsored by: Netflix > >> > Reviewed by: delphij > >> > Differential Revision: https://reviews.freebsd.org/D42447 > >> > >> This seems to have broken the GitHub CI for cross-building; contrast: > >> > >> https://github.com/freebsd/freebsd-src/actions/runs/6859373313 > >> > >> with: > >> > >> https://github.com/freebsd/freebsd-src/actions/runs/6859316228 > >> > >> Has this broken makeobjops.awk somehow? If so it should be reproducibl= e > >> on FreeBSD with BOOTSTRAP_ALL_TOOLS=3D1, or by rebuilding on an update= d > >> system. Cross-building will just show it first because we always > >> bootstrap awk there, like many other tools. > > > > It worked when it was the system awk for me... But that might not be > the most > > helpful observation. > > For a clean kernel build? > > > Why didn't it work for you/github's ci runs? > > From GitHub (indentation sadly lost when copying): > > > In file included from > /Users/runner/work/freebsd-src/freebsd-src/sys/cam/cam.c:45: > > In file included from > /Users/runner/work/freebsd-src/freebsd-src/sys/cam/cam_ccb.h:1052: > > In file included from > /Users/runner/work/freebsd-src/freebsd-src/sys/cam/mmc/mmc_bus.h:4: > > In file included from > /Users/runner/work/freebsd-src/freebsd-src/sys/dev/mmc/bridge.h:57: > > In file included from > /Users/runner/work/freebsd-src/freebsd-src/sys/sys/bus.h:787: > > ./bus_if.h:217:35: error: expected ')' > > int _unit); > > ^ > > ./bus_if.h:216:33: note: to match this '(' > > typedef device_t bus_add_child_t(device_t _dev, u_int _order, const cha= r > *_name > > ^ > > ./bus_if.h:241:41: error: expected ')' > > const char *_name, int _unit) > > ^ > > ./bus_if.h:240:39: note: to match this '(' > > static __inline device_t BUS_ADD_CHILD(device_t _dev, u_int _order > > ^ > > ... > > Hence the assumption that makeobjops.awk has stopped working properly, > which is highly consistent with this being the first commit to fail in > CI. It looks like we=E2=80=99re missing commas, maybe from format_line. > > I haven=E2=80=99t tried to reproduce it locally, but given it=E2=80=99s a= cross all > macOS and Ubuntu versions I would be surprised if I couldn=E2=80=99t. > > > makeobjops.awk doesn't have any of the issues that I know are minor > changes > > in awk. I'll add it to the list of things to look into, though. > > On what timeline? If not soon, can we please revert the import as it=E2= =80=99s > breaking important things and thus not ready for the tree? > I wanted to try to recreate it, or figure out what in the env is causing it to go astray. I also want to confirm your diagnosis that this is coming from this awk and not because we're building it to a weird new name (so all my testing is with the old awk) and thus falling back to using the system's awk... I don't like mysteries.... but if we still have one after spending an hour or two on it, I'll revert. That puts it at anywhere from an hour or two from now, or first thing in the morning worst case (eg, something crazy comes up... though the odds of that are low). Otherwise I'll commit a fix. Warner > Jess > > > I also broke the Jenkins CI run, but not 'make check' for reasons I don= 't > > understand. > > > > Warner > > > --000000000000dab779060a384eee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Nov 15, 2023 at 3:13=E2=80=AF= PM Jessica Clarke <jrtc27@freebsd.= org> wrote:
On 15 Nov 2023, at 21:59, Warner Losh <imp@bsdimp.com> wrote:
>
>
>
> On Wed, Nov 15, 2023 at 9:52=E2=80=AFAM Jessica Clarke <jrtc27@freebsd.org> wro= te:
>> On 14 Nov 2023, at 04:51, Warner Losh <imp@FreeBSD.org> wrot= e:
>> >
>> > The branch main has been updated by imp:
>> >
>> > URL: https://cgit.FreeBSD.org/src/commit/?id=3D3fd60a6b73ac01a72df89751f173970f= ae4cae73
>> >
>> > commit 3fd60a6b73ac01a72df89751f173970fae4cae73
>> > Merge: 194df014feeb 2e406c584fe4
>> > Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>= ;
>> > AuthorDate: 2023-11-02 16:32:01 +0000
>> > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>= ;
>> > CommitDate: 2023-11-14 04:49:34 +0000
>> >
>> >=C2=A0 =C2=A0 awk: Merge upstream 2nd Edition Awk Book
>> >
>> >=C2=A0 =C2=A0 Merge in the November 2nd, 2023 version of one t= rue awk.
>> >
>> >=C2=A0 =C2=A0 This brings in Unicode support, CSV support and = a number of bug fixes.
>> >
>> >=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Netflix
>> >=C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 delphij
>> >=C2=A0 =C2=A0 Differential Revision:=C2=A0 https://re= views.freebsd.org/D42447
>>
>> This seems to have broken the GitHub CI for cross-building; contra= st:
>>
>> https://github.com/freebsd/fr= eebsd-src/actions/runs/6859373313
>>
>> with:
>>
>> https://github.com/freebsd/fr= eebsd-src/actions/runs/6859316228
>>
>> Has this broken makeobjops.awk somehow? If so it should be reprodu= cible
>> on FreeBSD with BOOTSTRAP_ALL_TOOLS=3D1, or by rebuilding on an up= dated
>> system. Cross-building will just show it first because we always >> bootstrap awk there, like many other tools.
>
> It worked when it was the system awk for me...=C2=A0 But that might no= t be the most
> helpful observation.

For a clean kernel build?

> Why didn't it work for you/github's ci runs?

>From GitHub (indentation sadly lost when copying):

> In file included from /Users/runner/work/freebsd-src/freebsd-src/sys/c= am/cam.c:45:
> In file included from /Users/runner/work/freebsd-src/freebsd-src/sys/c= am/cam_ccb.h:1052:
> In file included from /Users/runner/work/freebsd-src/freebsd-src/sys/c= am/mmc/mmc_bus.h:4:
> In file included from /Users/runner/work/freebsd-src/freebsd-src/sys/d= ev/mmc/bridge.h:57:
> In file included from /Users/runner/work/freebsd-src/freebsd-src/sys/s= ys/bus.h:787:
> ./bus_if.h:217:35: error: expected ')'
> int _unit);
> ^
> ./bus_if.h:216:33: note: to match this '('
> typedef device_t bus_add_child_t(device_t _dev, u_int _order, const ch= ar *_name
> ^
> ./bus_if.h:241:41: error: expected ')'
> const char *_name, int _unit)
> ^
> ./bus_if.h:240:39: note: to match this '('
> static __inline device_t BUS_ADD_CHILD(device_t _dev, u_int _order > ^
> ...

Hence the assumption that makeobjops.awk has stopped working properly,
which is highly consistent with this being the first commit to fail in
CI. It looks like we=E2=80=99re missing commas, maybe from format_line.

I haven=E2=80=99t tried to reproduce it locally, but given it=E2=80=99s acr= oss all
macOS and Ubuntu versions I would be surprised if I couldn=E2=80=99t.

> makeobjops.awk doesn't have any of the issues that I know are mino= r changes
> in awk. I'll add it to the list of things to look into, though.
On what timeline? If not soon, can we please revert the import as it=E2=80= =99s
breaking important things and thus not ready for the tree?
=

I wanted to try to recreate it, or figure out what in t= he env is causing it
to go astray. I also want to confirm your di= agnosis that this is coming
from this awk and not because we'= re building it to a weird new name
(so all my testing is with the= old awk) and thus falling back to using
the system's awk...<= /div>

I don't like mysteries.... but if we still hav= e one after spending
an hour or two on it, I'll revert. That = puts it at anywhere from an hour
or two from now, or first thing = in the morning worst case (eg, something
crazy comes up... though= the odds of that are low).=C2=A0 Otherwise I'll
commit a fix= .

Warner
=C2=A0
Jess

> I also broke the Jenkins CI run, but not 'make check' for reas= ons I don't
> understand.
>
> Warner


--000000000000dab779060a384eee-- From nobody Wed Nov 15 22:31:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVyZP55SFz50q9H; Wed, 15 Nov 2023 22:31: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 4SVyZP4pB3z3J3M; Wed, 15 Nov 2023 22:31:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700087501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=opKTj68RDLNsvKYS+p1inOYjzJu0U5/sZ3rYWTQLZno=; b=EQqpd2vlWHDuMb+J0CfYqhObk+2fRulgLjbXXLofqthWacc+jjtcgzN9CvuH+FdBtC7VX4 7ilkQmUccM+QrQTZ15H22dwLZqLwKe1yeuTsVuvtLS7crGv3PXdLjjc/e0qbkxf8LpSwuR rUCFVlX2nIx1aYYue4YJUWW0upDnI2jPGqQOy5ldNdkUTBgxA6yBiPAxQ6YqOEeqRFWXa5 DceI+UBvXfffiu7sMzaourUiuLxQBgNiaE2sMrGQDTkk5S3u9y/eHuagRlaepDNY02t47j z8cHQXpmPdL6YFYTsDXQU35lsdvKvajrAlJcaDg+SxieffKcJ227W46yHh+ryQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700087501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=opKTj68RDLNsvKYS+p1inOYjzJu0U5/sZ3rYWTQLZno=; b=LYT75fsBqsgj1q/RPvx8yae6eQcLUHvP1m2DiDxSF3FDalcKJq8Suhyie8xEeEQeY/VjcZ I3i0GNnxavOSjEPYB20D29djlYyRzAAtzTRGbcZBmX1UkcQnz1IOvjKRERBVbJcfIxXzxR UKcqmDRj2c/5oe8pqX+psdKjBnJEgISwIxNVshYmaUs3dF1OuyWzxMe3yfun9qRTFugaQT lQL+sUpcWFz0SAlFG3e8NUnJjCcIa3l0l/Bj93lPPfCeSKxQnzRQ7xWOw81uIlzNBYw2AI 1MYv/bmVxuQWyFYqk6LSd71zCsxQwYNY5plTF556IK1hFJRhXjKxZr3FJqg9kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700087501; a=rsa-sha256; cv=none; b=H6GClIiOQN1GyhllD9co5CA88Eh00BBh3GePXgIV2rxRc4SbRVXDvBVSbHIa4GQ/QWbgN/ wxGXvhZmG+r8/6lLsLuu83V4m4KgXV0GL9mmSce1WUrfbwOPolPiHw3F+KPeF5Qu9j3cBg fX/7dtezsHiRg+bEjXZTYaWvDl+DJzgujPqZZekOOvLgR19lKL0300kBoyTHrDjDn/91Mu Bj7Y+izPkTN1R8/yEXXzuJ2rnptJidO3Sfpu2ThXzbnWx8EKUOpBBPY08uwd24EyMzVu0R ZynaL/pTcPo8wiZaq+aPh+sib5AzfFnwiZXgVIgMVV7A7UntDuBdaCwEt3XABQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVyZP3rSRzb2c; Wed, 15 Nov 2023 22:31: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 3AFMVfS6007090; Wed, 15 Nov 2023 22:31:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFMVfMF007087; Wed, 15 Nov 2023 22:31:41 GMT (envelope-from git) Date: Wed, 15 Nov 2023 22:31:41 GMT Message-Id: <202311152231.3AFMVfMF007087@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: b2376a5f1e15 - main - Revert "awk: Merge upstream 2nd Edition Awk Book" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b2376a5f1e15abc6806a5ba6e7645e3be20bf620 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b2376a5f1e15abc6806a5ba6e7645e3be20bf620 commit b2376a5f1e15abc6806a5ba6e7645e3be20bf620 Author: Warner Losh AuthorDate: 2023-11-15 22:28:05 +0000 Commit: Warner Losh CommitDate: 2023-11-15 22:28:05 +0000 Revert "awk: Merge upstream 2nd Edition Awk Book" The pre-push testing I did turned out to be testing the old version with the old testsuite (for reasons I don't understnad). There's issues with the new version, the new test in the suite or (likely) both. Revert until they can be chased down. This should also fix the github CI that's gone red since this commit. This reverts commit 3fd60a6b73ac01a72df89751f173970fae4cae73, reversing changes made to 194df014feebd8b169b41ecd75ae73d63a792d6b. Sponsored by: Netflix --- .gitattributes | 1 - UPDATING | 5 - contrib/one-true-awk/FIXES | 1373 ++++++++++++++++++- contrib/one-true-awk/FIXES.1e | 1429 -------------------- contrib/one-true-awk/README.md | 79 +- contrib/one-true-awk/awk.1 | 31 +- contrib/one-true-awk/awk.h | 18 +- contrib/one-true-awk/awkgram.y | 49 +- contrib/one-true-awk/b.c | 322 +---- .../one-true-awk/bugs-fixed/getline-corruption.awk | 5 - .../one-true-awk/bugs-fixed/getline-corruption.in | 1 - .../one-true-awk/bugs-fixed/getline-corruption.ok | 1 - contrib/one-true-awk/bugs-fixed/rstart-rlength.awk | 10 - contrib/one-true-awk/bugs-fixed/rstart-rlength.ok | 4 - .../one-true-awk/bugs-fixed/unicode-fs-rs-1.awk | 6 - contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.in | 2 - contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.ok | 5 - .../one-true-awk/bugs-fixed/unicode-fs-rs-2.awk | 7 - contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.in | 2 - contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.ok | 4 - .../one-true-awk/bugs-fixed/unicode-null-match.awk | 6 - .../one-true-awk/bugs-fixed/unicode-null-match.bad | 1 - .../one-true-awk/bugs-fixed/unicode-null-match.ok | 1 - contrib/one-true-awk/lex.c | 56 +- contrib/one-true-awk/lib.c | 137 +- contrib/one-true-awk/main.c | 15 +- contrib/one-true-awk/makefile | 1 - contrib/one-true-awk/parse.c | 2 +- contrib/one-true-awk/proto.h | 7 +- contrib/one-true-awk/run.c | 647 +-------- contrib/one-true-awk/testdir/T.argv | 6 - contrib/one-true-awk/testdir/T.csv | 81 -- contrib/one-true-awk/testdir/T.misc | 6 - contrib/one-true-awk/testdir/T.utf | 194 --- contrib/one-true-awk/testdir/T.utfre | 234 ---- contrib/one-true-awk/testdir/tt.15 | 2 +- contrib/one-true-awk/testdir/xc | 17 + contrib/one-true-awk/tran.c | 26 +- 38 files changed, 1615 insertions(+), 3178 deletions(-) diff --git a/.gitattributes b/.gitattributes index ab5a1eee005d..11fec084166f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,4 +5,3 @@ *.py diff=python . svn-properties=svn:keywords=tools/build/options/WITHOUT_LOADER_ZFS .clang-format svn-properties=svn:keywords=FreeBSD=%H -contrib/one-true-awk/bugs-fixed/unicode-null-match.bad binary diff --git a/UPDATING b/UPDATING index 17117a193394..763f8f29a4f0 100644 --- a/UPDATING +++ b/UPDATING @@ -27,11 +27,6 @@ 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".) -20231114: - One True Awk updated to the Second Edition as of 20231102 (254b979f32df) - Notable features include UTF-8 support and --csv to support comma - separated data. - 20231113: The WITHOUT_LLD_IS_LD option has been removed. When LLD is enabled it is always installed as /usr/bin/ld. diff --git a/contrib/one-true-awk/FIXES b/contrib/one-true-awk/FIXES index a13ca50ccde0..8a2befccd624 100644 --- a/contrib/one-true-awk/FIXES +++ b/contrib/one-true-awk/FIXES @@ -22,49 +22,1354 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ -This file lists all bug fixes, changes, etc., made since the -second edition of the AWK book was published in September 2023. +This file lists all bug fixes, changes, etc., made since the AWK book +was sent to the printers in August, 1987. -Oct 30, 2023: - multiple fixes and a minor code cleanup. - disabled utf-8 for non-multibyte locales, such as C or POSIX. - fixed a bad char * cast that causes incorrect results on big-endian - systems. also fixed an out-of-bounds read for empty CCL. - fixed a buffer overflow in substr with utf-8 strings. - many thanks to Todd C Miller. - +July 27, 2021: + As per IEEE Std 1003.1-2008, -F "str" is now consistent with + -v FS="str" when str is null. Thanks to Warner Losh. -Sep 24, 2023: - fnematch and getrune have been overhauled to solve issues around - unicode FS and RS. also fixed gsub null match issue with unicode. - big thanks to Arnold Robbins. +July 24, 2021: + Fix readrec's definition of a record. This fixes an issue + with NetBSD's RS regular expression support that can cause + an infinite read loop. Thanks to Miguel Pineiro Jr. -Sep 12, 2023: - Fixed a length error in u8_byte2char that set RSTART to - incorrect (cannot happen) value for EOL match(str, /$/). + Fix regular expression RS ^-anchoring. RS ^-anchoring needs to + know if it is reading the first record of a file. This change + restores a missing line that was overlooked when porting NetBSD's + RS regex functionality. Thanks to Miguel Pineiro Jr. + Fix size computation in replace_repeat() for special case + REPEAT_WITH_Q. Thanks to Todd C. Miller. ------------------------------------------------------------------ +February 15, 2021: + Small fix so that awk will compile again with g++. Thanks to + Arnold Robbins. -[This entry is a summary, not a precise list of changes.] +January 06, 2021: + Fix a decision bug with trailing stuff in lib.c:is_valid_number + after recent changes. Thanks to Ozan Yigit. - Added --csv option to enable processing of comma-separated - values inputs. When --csv is enabled, fields are separated - by commas, fields may be quoted with " double quotes, fields - may contain embedded newlines. +December 18, 2020: + Fix problems converting inf and NaN values in lib.c:is_valid_number. + Enhance number to string conversion to do the right thing for + NaN and inf values. Things are now pretty much the same as in + gawk. (Found a gawk bug while we're at it.) Added a torture + test for these values. Thanks to Arnold Robbins. Allows closing + of PR #101. - If no explicit separator argument is provided, split() uses - the setting of --csv to determine how fields are split. +December 15, 2020: + Merge PR #99, which gets the right header for strcasecmp. + Thanks to GitHub user michaelforney. - Strings may now contain UTF-8 code points (not necessarily - characters). Functions that operate on characters, like - length, substr, index, match, etc., use UTF-8, so the length - of a string of 3 emojis is 3, not 12 as it would be if bytes - were counted. +December 8, 2020: + Merge PR #98: Disallow hex data. Allow only +nan, -nan, + +inf, -inf (case independent) to give NaN and infinity values. + Improve things so that string to double conversion is only + done once, yielding something of a speedup. This obviate + PR #95. Thanks to Arnold Robbins. - Regular expressions are processes as UTF-8. +December 3, 2020: + Fix to argument parsing to avoid printing spurious newlines. + Thanks to Todd Miller. Merges PR #97. + +October 13, 2020: + Add casts before all the calls to malloc/calloc/realloc in order + to get it to compile with g++. Thanks to Arnold Robbins. + +August 16, 2020: + Additional fixes for DJGPP. Thanks to Eli Zaretskii for + the testing. + +August 7, 2020: + Merge PR #93, which adds casts to (void*) for debug prints + using the %p format specifier. Thanks to GitHub user YongHaoWu + ("Chris") for the fixes. + +August 4, 2020: + In run.c, use non-restartable multibyte routines to attain + portability to DJGPP. Should fix Issue 92. Thanks to Albert Wik + for the report and to Todd Miller for the suggested fix. + +July 30, 2020: + Merge PRs 88-91 which fix small bugs. Thanks to Todd Miller and + Tim van der Molen for the fixes. + + In order to make life easier, we move exclusively to bison + as the parser generator. + +July 2, 2020: + Merge PRs 85 and 86 which fix regressions. Thanks to + Tim van der Molen for the fixes. + +June 25, 2020: + Merge PRs 82 and 84. The latter fixes issue #83. Thanks to + Todd Miller and awkfan77. + +June 12, 2020: + Clear errno before calling errcheck to avoid any spurious errors + left over from previous calls that may have set it. Thanks to + Todd Miller for the fix, from PR #80. + + Fix Issue #78 by allowing \r to follow floating point numbers in + lib.c:is_number. Thanks to GitHub user ajcarr for the report + and to Arnold Robbins for the fix. + +June 5, 2020: + In fldbld(), make sure that inputFS is set before trying to + use it. Thanks to Steffen Nurpmeso + for the report. + +May 5, 2020: + Fix checks for compilers that can handle noreturn. Thanks to + GitHub user enh-google for pointing it out. Closes Issue #79. + +April 16, 2020: + Handle old compilers that don't support C11 (for noreturn). + Thanks to Arnold Robbins. + +April 5, 2020: + Use and noreturn instead of GCC attributes. + Thanks to GitHub user awkfan77. Closes PR #77. + +February 28, 2020: + More cleanups from Christos Zoulas: notably backslash continuation + inside strings removes the newline and a fix for RS = "^a". + Fix for address sanitizer-found problem. Thanks to GitHub user + enh-google. + +February 19, 2020: + More small cleanups from Christos Zoulas. + +February 18, 2020: + Additional cleanups from Christos Zoulas. It's no longer necessary + to use the -y flag to bison. + +February 6, 2020: + Additional small cleanups from Christos Zoulas. awk is now + a little more robust about reporting I/O errors upon exit. + +January 31, 2020: + Merge PR #70, which avoids use of variable length arrays. Thanks + to GitHub user michaelforney. Fix issue #60 ({0} in interval + expressions doesn't work). Also get all tests working again. + Thanks to Arnold Robbins. + +January 24, 2020: + A number of small cleanups from Christos Zoulas. Add the close + on exec flag to files/pipes opened for redirection; courtesy of + Arnold Robbins. + +January 19, 2020: + If POSIXLY_CORRECT is set in the environment, then sub and gsub + use POSIX rules for multiple backslashes. This fixes Issue #66, + while maintaining backwards compatibility. + +January 9, 2020: + Input/output errors on closing files are now fatal instead of + mere warnings. Thanks to Martijn Dekker . + +January 5, 2020: + Fix a bug in the concatentation of two string constants into + one done in the grammar. Fixes GitHub issue #61. Thanks + to GitHub user awkfan77 for pointing out the direction for + the fix. New test T.concat added to the test suite. + Fix a few memory leaks reported by valgrind, as well. + +December 27, 2019: + Fix a bug whereby a{0,3} could match four a's. Thanks to + "Anonymous AWK fan" for the report. + +December 11, 2019: + Further printf-related fixes for 32 bit systems. + Thanks again to Christos Zoulas. + +December 8, 2019: + Fix the return value of sprintf("%d") on 32 bit systems. + Thanks to Jim Lowe for the report and to Christos Zoulas + for the fix. + +November 10, 2019: + Convert a number of Boolean integer variables into + actual bools. Convert compile_time variable into an + enum and simplify some of the related code. Thanks + to Arnold Robbins. + +November 8, 2019: + Fix from Ori Bernstein to get UTF-8 characters instead of + bytes when FS = "". This is currently the only bit of + the One True Awk that understands multibyte characters. + From Arnold Robbins, apply some cleanups in the test suite. + +October 25, 2019: + More fixes and cleanups from NetBSD, courtesy of Christos + Zoulas. Merges PRs 54 and 55. + +October 24, 2019: + Import second round of code cleanups from NetBSD. Much thanks + to Christos Zoulas (GitHub user zoulasc). Merges PR 53. + Add an optimization for string concatenation, also from + Christos. + +October 17, 2019: + Import code cleanups from NetBSD. Much thanks to Christos + Zoulas (GitHub user zoulasc). Merges PR 51. + +October 6, 2019: + Import code from NetBSD awk that implements RS as a regular + expression. + +September 10, 2019: + Fixes for various array / memory overruns found via gcc's + -fsanitize=unknown. Thanks to Alexander Richardson (GitHub + user arichardson). Merges PRs 47 and 48. + +July 28, 2019: + Import grammar optimization from NetBSD: Two string constants + concatenated together get turned into a single string. + +July 26, 2019: + Support POSIX-specified C-style escape sequences "\a" (alarm) + and "\v" (vertical tab) in command line arguments and regular + expressions, further to the support for them in strings added on + Apr 9, 1989. These now no longer match as literal "a" and "v" + characters (as they don't on other awk implementations). + Thanks to Martijn Dekker. + +July 17, 2019: + Pull in a number of code cleanups and minor fixes from + Warner Losh's bsd-ota branch. The only user visible change + is the use of random(3) as the random number generator. + Thanks to Warner Losh for collecting all these fixes in + one easy place to get them from. + +July 16, 2019: + Fix field splitting to use FS value as of the time a record + was read or assigned to. Thanks to GitHub user Cody Mello (melloc) + for the fix. (Merged from his branch, via PR #42.) Updated + testdir/T.split per said PR as well. + +June 24, 2019: + Extract awktest.tar into testdir directory. Add some very + simple mechanics to the makefile for running the tests and + for cleaning up. No changes to awk itself. + +June 17, 2019: + Disallow deleting SYMTAB and its elements, which creates + use-after-free bugs. Thanks to GitHub user Cody Mello (melloc) + for the fix. (Merged from PR #43.) + +June 5, 2019: + Allow unmatched right parenthesis in a regular expression to + be treated literally. Fixes Issue #40. Thanks to GitHub user + Warner Losh (bsdimp) for the report. Thanks to Arnold Robbins + for the fix. + +May 29,2019: + Fix check for command line arguments to no longer require that + first character after '=' not be another '='. Reverts change of + August 11, 1989. Thanks to GitHub user Jamie Landeg Jones for + pointing out the issue; from Issue #38. + +Apr 7, 2019: + Update awktest.tar(p.50) to use modern options to sort. Needed + for Android development. Thanks to GitHub user mohd-akram (Mohamed + Akram). From Issue #33. + +Mar 12, 2019: + Added very simplistic support for cross-compiling in the + makefile. We are NOT going to go in the direction of the + autotools, though. Thanks to GitHub user nee-san for + the basic change. (Merged from PR #34.) + +Mar 5, 2019: + Added support for POSIX-standard interval expressions (a.k.a. + bounds, a.k.a. repetition expressions) in regular expressions, + backported (via NetBSD) from Apple awk-24 (20070501). + Thanks to Martijn Dekker for the port. + (Merged from PR #30.) + +Mar 3, 2019: + Merge PRs as follows: + #12: Avoid undefined behaviour when using ctype(3) functions in + relex(). Thanks to GitHub user iamleot. + #31: Make getline handle numeric strings, and update FIXES. Thanks + to GitHub user arnoldrobbins. + #32: maketab: support build systems with read-only source. Thanks + to GitHub user enh. + +Jan 25, 2019: + Make getline handle numeric strings properly in all cases. + (Thanks, Arnold.) + +Jan 21, 2019: + Merged a number of small fixes from GitHub pull requests. + Thanks to GitHub users Arnold Robbins (arnoldrobbins), + Cody Mello (melloc) and Christoph Junghans (junghans). + PR numbers: 13-21, 23, 24, 27. + +Oct 25, 2018: + Added test in maketab.c to prevent generating a proctab entry + for YYSTYPE_IS_DEFINED. It was harmless but some gcc settings + generated a warning message. Thanks to Nan Xiao for report. + +Aug 27, 2018: + Disallow '$' in printf formats; arguments evaluated in order + and printed in order. + + Added some casts to silence warnings on debugging printfs. + (Thanks, Arnold.) + +Aug 23, 2018: + A long list of fixes courtesy of Arnold Robbins, + to whom profound thanks. + + 1. ofs-rebuild: OFS value used to rebuild the record was incorrect. + Fixed August 19, 2014. Revised fix August 2018. + + 2. system-status: Instead of a floating-point division by 256, use + the wait(2) macros to create a reasonable exit status. + Fixed March 12, 2016. + + 3. space: Use provided xisblank() function instead of ispace() for + matching [[:blank:]]. + + 4. a-format: Add POSIX standard %a and %A to supported formats. Check + at runtime that this format is available. + + 5. decr-NF: Decrementing NF did not change $0. This is a decades-old + bug. There are interactions with the old and new value of OFS as well. + Most of the fix came from the NetBSD awk. + + 6. string-conv: String conversions of scalars were sticky. Once a + conversion to string happened, even with OFMT, that value was used until + a new numeric value was assigned, even if OFMT differed from CONVFMT, + and also if CONVFMT changed. + + 7. unary-plus: Unary plus on a string constant returned the string. + Instead, it should convert the value to numeric and give that value. + + Also added Arnold's tests for these to awktest.tar as T.arnold. + +Aug 15, 2018: + fixed mangled awktest.tar (thanks, Arnold), posted all + current (very minor) fixes to github / onetrueawk + +Jun 7, 2018: + (yes, a long layoff) + Updated some broken tests (beebe.tar, T.lilly) + [thanks to Arnold Robbins] + +Mar 26, 2015: + buffer overflow in error reporting; thanks to tobias ulmer + and john-mark gurney for spotting it and the fix. + +Feb 4, 2013: + cleaned up a handful of tests that didn't seem to actually + test for correct behavior: T.latin1, T.gawk. + +Jan 5, 2013: + added ,NULL initializer to static Cells in run.c; not really + needed but cleaner. Thanks to Michael Bombardieri. + +Dec 20, 2012: + fiddled makefile to get correct yacc and bison flags. pick yacc + (linux) or bison (mac) as necessary. + + added __attribute__((__noreturn__)) to a couple of lines in + proto.h, to silence someone's enthusiastic checker. + + fixed obscure call by value bug in split(a[1],a) reported on + 9fans. the management of temporary values is just a mess; i + took a shortcut by making an extra string copy. thanks + to paul patience and arnold robbins for passing it on and for + proposed patches. + + tiny fiddle in setfval to eliminate -0 results in T.expr, which + has irritated me for 20+ years. + +Aug 10, 2011: + another fix to avoid core dump with delete(ARGV); again, many thanks + to ruslan ermilov. + +Aug 7, 2011: + split(s, a, //) now behaves the same as split(s, a, "") + +Jun 12, 2011: + /pat/, \n /pat/ {...} is now legal, though bad style to use. + + added checks to new -v code that permits -vnospace; thanks to + ruslan ermilov for spotting this and providing the patch. + + removed fixed limit on number of open files; thanks to aleksey + cheusov and christos zoulos. + + fixed day 1 bug that resurrected deleted elements of ARGV when + used as filenames (in lib.c). + + minor type fiddles to make gcc -Wall -pedantic happier (but not + totally so); turned on -fno-strict-aliasing in makefile. + +May 6, 2011: + added #ifdef for isblank. + now allows -ffoo as well as -f foo arguments. + (thanks, ruslan) + +May 1, 2011: + after advice from todd miller, kevin lo, ruslan ermilov, + and arnold robbins, changed srand() to return the previous + seed (which is 1 on the first call of srand). the seed is + an Awkfloat internally though converted to unsigned int to + pass to the library srand(). thanks, everyone. + + fixed a subtle (and i hope low-probability) overflow error + in fldbld, by adding space for one extra \0. thanks to + robert bassett for spotting this one and providing a fix. + + removed the files related to compilation on windows. i no + longer have anything like a current windows environment, so + i can't test any of it. + +May 23, 2010: + fixed long-standing overflow bug in run.c; many thanks to + nelson beebe for spotting it and providing the fix. + + fixed bug that didn't parse -vd=1 properly; thanks to santiago + vila for spotting it. + +Feb 8, 2010: + i give up. replaced isblank with isspace in b.c; there are + no consistent header files. + +Nov 26, 2009: + fixed a long-standing issue with when FS takes effect. a + change to FS is now noticed immediately for subsequent splits. + + changed the name getline() to awkgetline() to avoid yet another + name conflict somewhere. + +Feb 11, 2009: + temporarily for now defined HAS_ISBLANK, since that seems to + be the best way through the thicket. isblank arrived in C99, + but seems to be arriving at different systems at different + times. + +Oct 8, 2008: + fixed typo in b.c that set tmpvec wrongly. no one had ever + run into the problem, apparently. thanks to alistair crooks. + +Oct 23, 2007: + minor fix in lib.c: increase inputFS to 100, change malloc + for fields to n+1. + + fixed memory fault caused by out of order test in setsval. + + thanks to david o'brien, freebsd, for both fixes. + +May 1, 2007: + fiddle in makefile to fix for BSD make; thanks to igor sobrado. + +Mar 31, 2007: + fixed some null pointer refs calling adjbuf. + +Feb 21, 2007: + fixed a bug in matching the null RE in sub and gsub. thanks to al aho + who actually did the fix (in b.c), and to wolfgang seeberg for finding + it and providing a very compact test case. + + fixed quotation in b.c; thanks to Hal Pratt and the Princeton Dante + Project. + + removed some no-effect asserts in run.c. + + fiddled maketab.c to not complain about bison-generated values. + + removed the obsolete -V argument; fixed --version to print the + version and exit. + + fixed wording and an outright error in the usage message; thanks to igor + sobrado and jason mcintyre. + + fixed a bug in -d that caused core dump if no program followed. + +Jan 1, 2007: + dropped mac.code from makefile; there are few non-MacOSX + mac's these days. + +Jan 17, 2006: + system() not flagged as unsafe in the unadvertised -safe option. + found it while enhancing tests before shipping the ;login: article. + practice what you preach. + + removed the 9-years-obsolete -mr and -mf flags. + + added -version and --version options. + + core dump on linux with BEGIN {nextfile}, now fixed. + + removed some #ifdef's in run.c and lex.c that appear to no + longer be necessary. + +Apr 24, 2005: + modified lib.c so that values of $0 et al are preserved in the END + block, apparently as required by posix. thanks to havard eidnes + for the report and code. + +Jan 14, 2005: + fixed infinite loop in parsing, originally found by brian tsang. + thanks to arnold robbins for a suggestion that started me + rethinking it. + +Dec 31, 2004: + prevent overflow of -f array in main, head off potential error in + call of SYNTAX(), test malloc return in lib.c, all with thanks to + todd miller. + +Dec 22, 2004: + cranked up size of NCHARS; coverity thinks it can be overrun with + smaller size, and i think that's right. added some assertions to b.c + to catch places where it might overrun. the RE code is still fragile. + +Dec 5, 2004: + fixed a couple of overflow problems with ridiculous field numbers: + e.g., print $(2^32-1). thanks to ruslan ermilov, giorgos keramidas + and david o'brien at freebsd.org for patches. this really should + be re-done from scratch. + +Nov 21, 2004: + fixed another 25-year-old RE bug, in split. it's another failure + to (re-)initialize. thanks to steve fisher for spotting this and + providing a good test case. + +Nov 22, 2003: + fixed a bug in regular expressions that dates (so help me) from 1977; + it's been there from the beginning. an anchored longest match that + was longer than the number of states triggered a failure to initialize + the machine properly. many thanks to moinak ghosh for not only finding + this one but for providing a fix, in some of the most mysterious + code known to man. + + fixed a storage leak in call() that appears to have been there since + 1983 or so -- a function without an explicit return that assigns a + string to a parameter leaked a Cell. thanks to moinak ghosh for + spotting this very subtle one. + +Jul 31, 2003: + fixed, thanks to andrey chernov and ruslan ermilov, a bug in lex.c + that mis-handled the character 255 in input. (it was being compared + to EOF with a signed comparison.) + +Jul 29, 2003: + fixed (i think) the long-standing botch that included the beginning of + line state ^ for RE's in the set of valid characters; this led to a + variety of odd problems, including failure to properly match certain + regular expressions in non-US locales. thanks to ruslan for keeping + at this one. + +Jul 28, 2003: + n-th try at getting internationalization right, with thanks to volker + kiefel, arnold robbins and ruslan ermilov for advice, though they + should not be blamed for the outcome. according to posix, "." is the + radix character in programs and command line arguments regardless of + the locale; otherwise, the locale should prevail for input and output + of numbers. so it's intended to work that way. + + i have rescinded the attempt to use strcoll in expanding shorthands in + regular expressions (cclenter). its properties are much too + surprising; for example [a-c] matches aAbBc in locale en_US but abBcC + in locale fr_CA. i can see how this might arise by implementation + but i cannot explain it to a human user. (this behavior can be seen + in gawk as well; we're leaning on the same library.) + + the issue appears to be that strcoll is meant for sorting, where + merging upper and lower case may make sense (though note that unix + sort does not do this by default either). it is not appropriate + for regular expressions, where the goal is to match specific + patterns of characters. in any case, the notations [:lower:], etc., + are available in awk, and they are more likely to work correctly in + most locales. + + a moratorium is hereby declared on internationalization changes. + i apologize to friends and colleagues in other parts of the world. + i would truly like to get this "right", but i don't know what + that is, and i do not want to keep making changes until it's clear. + +Jul 4, 2003: + fixed bug that permitted non-terminated RE, as in "awk /x". + +Jun 1, 2003: + subtle change to split: if source is empty, number of elems + is always 0 and the array is not set. + +Mar 21, 2003: + added some parens to isblank, in another attempt to make things + internationally portable. + +Mar 14, 2003: + the internationalization changes, somewhat modified, are now + reinstated. in theory awk will now do character comparisons + and case conversions in national language, but "." will always + be the decimal point separator on input and output regardless + of national language. isblank(){} has an #ifndef. + + this no longer compiles on windows: LC_MESSAGES isn't defined + in vc6++. + + fixed subtle behavior in field and record splitting: if FS is + a single character and RS is not empty, \n is NOT a separator. + this tortuous reading is found in the awk book; behavior now + matches gawk and mawk. + +Dec 13, 2002: + for the moment, the internationalization changes of nov 29 are + rolled back -- programs like x = 1.2 don't work in some locales, + because the parser is expecting x = 1,2. until i understand this + better, this will have to wait. + +Nov 29, 2002: + modified b.c (with tiny changes in main and run) to support + locales, using strcoll and iswhatever tests for posix character + classes. thanks to ruslan ermilov (ru@freebsd.org) for code. + the function isblank doesn't seem to have propagated to any + header file near me, so it's there explicitly. not properly + tested on non-ascii character sets by me. + +Jun 28, 2002: + modified run/format() and tran/getsval() to do a slightly better + job on using OFMT for output from print and CONVFMT for other + number->string conversions, as promised by posix and done by + gawk and mawk. there are still places where it doesn't work + right if CONVFMT is changed; by then the STR attribute of the + variable has been irrevocably set. thanks to arnold robbins for + code and examples. + + fixed subtle bug in format that could get core dump. thanks to + Jaromir Dolecek for finding and fixing. + minor cleanup in run.c / format() at the same time. + + added some tests for null pointers to debugging printf's, which + were never intended for external consumption. thanks to dave + kerns (dkerns@lucent.com) for pointing this out. + + GNU compatibility: an empty regexp matches anything (thanks to + dag-erling smorgrav, des@ofug.org). subject to reversion if + this does more harm than good. + + pervasive small changes to make things more const-correct, as + reported by gcc's -Wwrite-strings. as it says in the gcc manual, + this may be more nuisance than useful. provoked by a suggestion + and code from arnaud desitter, arnaud@nimbus.geog.ox.ac.uk + + minor documentation changes to note that this now compiles out + of the box on Mac OS X. + +Feb 10, 2002: + changed types in posix chars structure to quiet solaris cc. + +Jan 1, 2002: + fflush() or fflush("") flushes all files and pipes. + + length(arrayname) returns number of elements; thanks to + arnold robbins for suggestion. + + added a makefile.win to make it easier to build on windows. + based on dan allen's buildwin.bat. + +Nov 16, 2001: + added support for posix character class names like [:digit:], + which are not exactly shorter than [0-9] and perhaps no more + portable. thanks to dag-erling smorgrav for code. + +Feb 16, 2001: + removed -m option; no longer needed, and it was actually + broken (noted thanks to volker kiefel). + +Feb 10, 2001: + fixed an appalling bug in gettok: any sequence of digits, +,-, E, e, + and period was accepted as a valid number if it started with a period. + this would never have happened with the lex version. + + other 1-character botches, now fixed, include a bare $ and a + bare " at the end of the input. + +Feb 7, 2001: + more (const char *) casts in b.c and tran.c to silence warnings. + +Nov 15, 2000: + fixed a bug introduced in august 1997 that caused expressions + like $f[1] to be syntax errors. thanks to arnold robbins for + noticing this and providing a fix. + +Oct 30, 2000: + fixed some nextfile bugs: not handling all cases. thanks to + arnold robbins for pointing this out. new regressions added. + + close() is now a function. it returns whatever the library + fclose returns, and -1 for closing a file or pipe that wasn't + opened. + +Sep 24, 2000: + permit \n explicitly in character classes; won't work right + if comes in as "[\n]" but ok as /[\n]/, because of multiple + processing of \'s. thanks to arnold robbins. + +July 5, 2000: + minor fiddles in tran.c to keep compilers happy about uschar. + thanks to norman wilson. + +May 25, 2000: + yet another attempt at making 8-bit input work, with another + band-aid in b.c (member()), and some (uschar) casts to head + off potential errors in subscripts (like isdigit). also + changed HAT to NCHARS-2. thanks again to santiago vila. + + changed maketab.c to ignore apparently out of range definitions + instead of halting; new freeBSD generates one. thanks to + jon snader for pointing out the problem. + +May 2, 2000: + fixed an 8-bit problem in b.c by making several char*'s into + unsigned char*'s. not clear i have them all yet. thanks to + Santiago Vila for the bug report. + +Apr 21, 2000: + finally found and fixed a memory leak in function call; it's + been there since functions were added ~1983. thanks to + jon bentley for the test case that found it. + + added test in envinit to catch environment "variables" with + names beginning with '='; thanks to Berend Hasselman. + +Jul 28, 1999: + added test in defn() to catch function foo(foo), which + otherwise recurses until core dump. thanks to arnold + robbins for noticing this. + +Jun 20, 1999: + added *bp in gettok in lex.c; appears possible to exit function + without terminating the string. thanks to russ cox. + +Jun 2, 1999: + added function stdinit() to run to initialize files[] array, + in case stdin, etc., are not constants; some compilers care. + +May 10, 1999: + replaced the ERROR ... FATAL, etc., macros with functions + based on vprintf, to avoid problems caused by overrunning + fixed-size errbuf array. thanks to ralph corderoy for the + impetus, and for pointing out a string termination bug in + qstring as well. + +Apr 21, 1999: + fixed bug that caused occasional core dumps with commandline + variable with value ending in \. (thanks to nelson beebe for + the test case.) + +Apr 16, 1999: + with code kindly provided by Bruce Lilly, awk now parses + /=/ and similar constructs more sensibly in more places. + Bruce also provided some helpful test cases. + +Apr 5, 1999: + changed true/false to True/False in run.c to make it + easier to compile with C++. Added some casts on malloc + and realloc to be honest about casts; ditto. changed + ltype int to long in struct rrow to reduce some 64-bit + complaints; other changes scattered throughout for the + same purpose. thanks to Nelson Beebe for these portability + improvements. + + removed some horrible pointer-int casting in b.c and elsewhere + by adding ptoi and itonp to localize the casts, which are + all benign. fixed one incipient bug that showed up on sgi + in 64-bit mode. + + reset lineno for new source file; include filename in error + message. also fixed line number error in continuation lines. + (thanks to Nelson Beebe for both of these.) + +Mar 24, 1999: + Nelson Beebe notes that irix 5.3 yacc dies with a bogus + error; use a newer version or switch to bison, since sgi + is unlikely to fix it. + +Mar 5, 1999: + changed isnumber to is_number to avoid the problem caused by + versions of ctype.h that include the name isnumber. + + distribution now includes a script for building on a Mac, + thanks to Dan Allen. + +Feb 20, 1999: + fixed memory leaks in run.c (call) and tran.c (setfval). + thanks to Stephen Nutt for finding these and providing the fixes. + +Jan 13, 1999: + replaced srand argument by (unsigned int) in run.c; + avoids problem on Mac and potentially on Unix & Windows. + thanks to Dan Allen. + + added a few (int) casts to silence useless compiler warnings. + e.g., errorflag= in run.c jump(). + + added proctab.c to the bundle outout; one less thing + to have to compile out of the box. + + added calls to _popen and _pclose to the win95 stub for + pipes (thanks to Steve Adams for this helpful suggestion). + seems to work, though properties are not well understood + by me, and it appears that under some circumstances the + pipe output is truncated. Be careful. + +Oct 19, 1998: + fixed a couple of bugs in getrec: could fail to update $0 + after a getline var; because inputFS wasn't initialized, + could split $0 on every character, a misleading diversion. + + fixed caching bug in makedfa: LRU was actually removing + least often used. + + thanks to ross ridge for finding these, and for providing + great bug reports. + +May 12, 1998: + fixed potential bug in readrec: might fail to update record + pointer after growing. thanks to dan levy for spotting this + and suggesting the fix. + +Mar 12, 1998: + added -V to print version number and die. + +[notify dave kerns, dkerns@dacsoup.ih.lucent.com] + +Feb 11, 1998: + subtle silent bug in lex.c: if the program ended with a number + longer than 1 digit, part of the input would be pushed back and + parsed again because token buffer wasn't terminated right. + example: awk 'length($0) > 10'. blush. at least i found it + myself. + +Aug 31, 1997: + s/adelete/awkdelete/: SGI uses this in malloc.h. + thanks to nelson beebe for pointing this one out. + +Aug 21, 1997: + fixed some bugs in sub and gsub when replacement includes \\. + this is a dark, horrible corner, but at least now i believe that + the behavior is the same as gawk and the intended posix standard. + thanks to arnold robbins for advice here. + +Aug 9, 1997: + somewhat regretfully, replaced the ancient lex-based lexical + analyzer with one written in C. it's longer, generates less code, + and more portable; the old one depended too much on mysterious + properties of lex that were not preserved in other environments. + in theory these recognize the same language. + + now using strtod to test whether a string is a number, instead of + the convoluted original function. should be more portable and + reliable if strtod is implemented right. + + removed now-pointless optimization in makefile that tries to avoid + recompilation when awkgram.y is changed but symbols are not. + + removed most fixed-size arrays, though a handful remain, some + of which are unchecked. you have been warned. + +Aug 4, 1997: + with some trepidation, replaced the ancient code that managed + fields and $0 in fixed-size arrays with arrays that grow on + demand. there is still some tension between trying to make this *** 5201 LINES SKIPPED *** From nobody Wed Nov 15 22:33:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVyd86YGPz50qTV for ; Wed, 15 Nov 2023 22:34:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (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 4SVyd81c0cz3Jlx for ; Wed, 15 Nov 2023 22:34:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b=dvqbYMot; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::52a) smtp.mailfrom=wlosh@bsdimp.com; dmarc=none Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-540c54944c4so326148a12.1 for ; Wed, 15 Nov 2023 14:34:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1700087643; x=1700692443; 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=yWGfgFEPlsVtk6nPfPgf+BV6QhRgBi4AZ3Ru88/QiZc=; b=dvqbYMot2DZQwI+Z2YotzmD58bDdQ2tGk0mK0/e4B7Szye0TyhXQeBPsbTtf/DXuPq 0a1zHPlKCqMgaXmGAwPu+bjoPJor/5drnVJ2KYFM4s82xPUzQhpbKeufBj9FfXeHGtPu 2li0gERWlXtT1NdsPIyD8O53/ZiTyLzf51qcf5VAXYPaWuqJLqhQSFwdQWGdQeDkX/8D NwicSV/Xp7Y3kQzzm9W/vo3aCLQ/2GaTqrEh9hWfYjiKWq9RGD+zuiO3BLukFnBfXSFz dseoWei02A0YZb2/Dnpy6/eaYl+6Jy4ebJPzM7xy/XklhNbPNFJgzt2vA777kyqYkix0 lJZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700087643; x=1700692443; 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=yWGfgFEPlsVtk6nPfPgf+BV6QhRgBi4AZ3Ru88/QiZc=; b=JQUG1iJTxg3uHpaetuqz0I3URqI3r6m3R3oGTBSCUgxRSGhcOsnrhE3VlBYdkv1FAP 7DHXrE5NMBTD3qVFiTvYH2SrhpP6dfIp8JDnnCp53HYRuLWiud/aAcgNTsZNKPXjX0RK PN1Wp2EKg5VCwalK1W/RQ/FA0mqSmw13Dc4W7XFtrxKytg0mLiYUFKiqtir12AE276GN iXpvWxFNopVZW/Tu6lG0jHlSvvBbrlyCicbIwkatEvtA9K4v8YCq7D7VVkundyDqgGZq VCXLOp2BM3gW2I6fJKj8MxiptoG+1r0yXVigeEVUu1kXmB3djNFaQZ8POtgJA3PIoJ7T XxBA== X-Gm-Message-State: AOJu0YwCSyNP/n5eD7Mteh+SHjvS3toAtVaZcGBTDl279txqR86CcEuK 3WhcMKAz3Y3HFc3kZ5/ws5/zRR4rwLuhgamCWlsJow== X-Google-Smtp-Source: AGHT+IFS9OyKnhf9BycTxn/pcV2I6Cac2XIbe+V4k9FlXTO2HUTuP8DtBK1ABuwW29Qv03xH1d/TtzRZOzIUFmqSEU0= X-Received: by 2002:a05:6402:115a:b0:53d:b59c:8f8d with SMTP id g26-20020a056402115a00b0053db59c8f8dmr6369150edw.8.1700087642885; Wed, 15 Nov 2023 14:34:02 -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: <202311140451.3AE4p5AR014207@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 15 Nov 2023 15:33:51 -0700 Message-ID: Subject: Re: git: 3fd60a6b73ac - main - awk: Merge upstream 2nd Edition Awk Book To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="0000000000000aa0ab060a388086" X-Spamd-Result: default: False [-2.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.995]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::52a:from]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+]; RCPT_COUNT_THREE(0.00)[4]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[bsdimp.com]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] X-Rspamd-Queue-Id: 4SVyd81c0cz3Jlx X-Spamd-Bar: -- --0000000000000aa0ab060a388086 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 15, 2023 at 3:20=E2=80=AFPM Warner Losh wrote: > > > On Wed, Nov 15, 2023 at 3:13=E2=80=AFPM Jessica Clarke wrote: > >> On 15 Nov 2023, at 21:59, Warner Losh wrote: >> > >> > >> > >> > On Wed, Nov 15, 2023 at 9:52=E2=80=AFAM Jessica Clarke >> wrote: >> >> On 14 Nov 2023, at 04:51, Warner Losh wrote: >> >> > >> >> > The branch main has been updated by imp: >> >> > >> >> > URL: >> https://cgit.FreeBSD.org/src/commit/?id=3D3fd60a6b73ac01a72df89751f17397= 0fae4cae73 >> >> > >> >> > commit 3fd60a6b73ac01a72df89751f173970fae4cae73 >> >> > Merge: 194df014feeb 2e406c584fe4 >> >> > Author: Warner Losh >> >> > AuthorDate: 2023-11-02 16:32:01 +0000 >> >> > Commit: Warner Losh >> >> > CommitDate: 2023-11-14 04:49:34 +0000 >> >> > >> >> > awk: Merge upstream 2nd Edition Awk Book >> >> > >> >> > Merge in the November 2nd, 2023 version of one true awk. >> >> > >> >> > This brings in Unicode support, CSV support and a number of bug >> fixes. >> >> > >> >> > Sponsored by: Netflix >> >> > Reviewed by: delphij >> >> > Differential Revision: https://reviews.freebsd.org/D42447 >> >> >> >> This seems to have broken the GitHub CI for cross-building; contrast: >> >> >> >> https://github.com/freebsd/freebsd-src/actions/runs/6859373313 >> >> >> >> with: >> >> >> >> https://github.com/freebsd/freebsd-src/actions/runs/6859316228 >> >> >> >> Has this broken makeobjops.awk somehow? If so it should be reproducib= le >> >> on FreeBSD with BOOTSTRAP_ALL_TOOLS=3D1, or by rebuilding on an updat= ed >> >> system. Cross-building will just show it first because we always >> >> bootstrap awk there, like many other tools. >> > >> > It worked when it was the system awk for me... But that might not be >> the most >> > helpful observation. >> >> For a clean kernel build? >> >> > Why didn't it work for you/github's ci runs? >> >> From GitHub (indentation sadly lost when copying): >> >> > In file included from >> /Users/runner/work/freebsd-src/freebsd-src/sys/cam/cam.c:45: >> > In file included from >> /Users/runner/work/freebsd-src/freebsd-src/sys/cam/cam_ccb.h:1052: >> > In file included from >> /Users/runner/work/freebsd-src/freebsd-src/sys/cam/mmc/mmc_bus.h:4: >> > In file included from >> /Users/runner/work/freebsd-src/freebsd-src/sys/dev/mmc/bridge.h:57: >> > In file included from >> /Users/runner/work/freebsd-src/freebsd-src/sys/sys/bus.h:787: >> > ./bus_if.h:217:35: error: expected ')' >> > int _unit); >> > ^ >> > ./bus_if.h:216:33: note: to match this '(' >> > typedef device_t bus_add_child_t(device_t _dev, u_int _order, const >> char *_name >> > ^ >> > ./bus_if.h:241:41: error: expected ')' >> > const char *_name, int _unit) >> > ^ >> > ./bus_if.h:240:39: note: to match this '(' >> > static __inline device_t BUS_ADD_CHILD(device_t _dev, u_int _order >> > ^ >> > ... >> >> Hence the assumption that makeobjops.awk has stopped working properly, >> which is highly consistent with this being the first commit to fail in >> CI. It looks like we=E2=80=99re missing commas, maybe from format_line. >> >> I haven=E2=80=99t tried to reproduce it locally, but given it=E2=80=99s = across all >> macOS and Ubuntu versions I would be surprised if I couldn=E2=80=99t. >> >> > makeobjops.awk doesn't have any of the issues that I know are minor >> changes >> > in awk. I'll add it to the list of things to look into, though. >> >> On what timeline? If not soon, can we please revert the import as it=E2= =80=99s >> breaking important things and thus not ready for the tree? >> > > I wanted to try to recreate it, or figure out what in the env is causing = it > to go astray. I also want to confirm your diagnosis that this is coming > from this awk and not because we're building it to a weird new name > (so all my testing is with the old awk) and thus falling back to using > the system's awk... > > I don't like mysteries.... but if we still have one after spending > an hour or two on it, I'll revert. That puts it at anywhere from an hour > or two from now, or first thing in the morning worst case (eg, something > crazy comes up... though the odds of that are low). Otherwise I'll > commit a fix. > OK. As near as I can tell my pre-push testing was with the old-awk and old-test suite. The new awk with the new test suite shows the bigs. I think I did the tests from the wrong checked out tree, but I'm still trying to prove that to myself (I remember the results I got, and they only match old-awk + old-testsuite, not new-awk + new-testsuite). Sorry for the hassle this sloppiness has caused. Warner > Warner > > >> Jess >> >> > I also broke the Jenkins CI run, but not 'make check' for reasons I >> don't >> > understand. >> > >> > Warner >> >> >> --0000000000000aa0ab060a388086 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Nov 15, 2023 at 3:20=E2=80=AF= PM Warner Losh <imp@bsdimp.com>= wrote:


On Wed, Nov 15, 2023 at 3:13=E2=80=AFPM Jessi= ca Clarke <jrtc2= 7@freebsd.org> wrote:
On 15 Nov 2023, at 21:59, Warner Losh <imp@bsdimp.com> wrote:
>
>
>
> On Wed, Nov 15, 2023 at 9:52=E2=80=AFAM Jessica Clarke <jrtc27@freebsd.org> wro= te:
>> On 14 Nov 2023, at 04:51, Warner Losh <imp@FreeBSD.org> wrot= e:
>> >
>> > The branch main has been updated by imp:
>> >
>> > URL: https://cgit.FreeBSD.org/src/commit/?id=3D3fd60a6b73ac01a72df89751f173970f= ae4cae73
>> >
>> > commit 3fd60a6b73ac01a72df89751f173970fae4cae73
>> > Merge: 194df014feeb 2e406c584fe4
>> > Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>= ;
>> > AuthorDate: 2023-11-02 16:32:01 +0000
>> > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>= ;
>> > CommitDate: 2023-11-14 04:49:34 +0000
>> >
>> >=C2=A0 =C2=A0 awk: Merge upstream 2nd Edition Awk Book
>> >
>> >=C2=A0 =C2=A0 Merge in the November 2nd, 2023 version of one t= rue awk.
>> >
>> >=C2=A0 =C2=A0 This brings in Unicode support, CSV support and = a number of bug fixes.
>> >
>> >=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Netflix
>> >=C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 delphij
>> >=C2=A0 =C2=A0 Differential Revision:=C2=A0 https://re= views.freebsd.org/D42447
>>
>> This seems to have broken the GitHub CI for cross-building; contra= st:
>>
>> https://github.com/freebsd/fr= eebsd-src/actions/runs/6859373313
>>
>> with:
>>
>> https://github.com/freebsd/fr= eebsd-src/actions/runs/6859316228
>>
>> Has this broken makeobjops.awk somehow? If so it should be reprodu= cible
>> on FreeBSD with BOOTSTRAP_ALL_TOOLS=3D1, or by rebuilding on an up= dated
>> system. Cross-building will just show it first because we always >> bootstrap awk there, like many other tools.
>
> It worked when it was the system awk for me...=C2=A0 But that might no= t be the most
> helpful observation.

For a clean kernel build?

> Why didn't it work for you/github's ci runs?

>From GitHub (indentation sadly lost when copying):

> In file included from /Users/runner/work/freebsd-src/freebsd-src/sys/c= am/cam.c:45:
> In file included from /Users/runner/work/freebsd-src/freebsd-src/sys/c= am/cam_ccb.h:1052:
> In file included from /Users/runner/work/freebsd-src/freebsd-src/sys/c= am/mmc/mmc_bus.h:4:
> In file included from /Users/runner/work/freebsd-src/freebsd-src/sys/d= ev/mmc/bridge.h:57:
> In file included from /Users/runner/work/freebsd-src/freebsd-src/sys/s= ys/bus.h:787:
> ./bus_if.h:217:35: error: expected ')'
> int _unit);
> ^
> ./bus_if.h:216:33: note: to match this '('
> typedef device_t bus_add_child_t(device_t _dev, u_int _order, const ch= ar *_name
> ^
> ./bus_if.h:241:41: error: expected ')'
> const char *_name, int _unit)
> ^
> ./bus_if.h:240:39: note: to match this '('
> static __inline device_t BUS_ADD_CHILD(device_t _dev, u_int _order > ^
> ...

Hence the assumption that makeobjops.awk has stopped working properly,
which is highly consistent with this being the first commit to fail in
CI. It looks like we=E2=80=99re missing commas, maybe from format_line.

I haven=E2=80=99t tried to reproduce it locally, but given it=E2=80=99s acr= oss all
macOS and Ubuntu versions I would be surprised if I couldn=E2=80=99t.

> makeobjops.awk doesn't have any of the issues that I know are mino= r changes
> in awk. I'll add it to the list of things to look into, though.
On what timeline? If not soon, can we please revert the import as it=E2=80= =99s
breaking important things and thus not ready for the tree?
=

I wanted to try to recreate it, or figure out what in t= he env is causing it
to go astray. I also want to confirm your di= agnosis that this is coming
from this awk and not because we'= re building it to a weird new name
(so all my testing is with the= old awk) and thus falling back to using
the system's awk...<= /div>

I don't like mysteries.... but if we still hav= e one after spending
an hour or two on it, I'll revert. That = puts it at anywhere from an hour
or two from now, or first thing = in the morning worst case (eg, something
crazy comes up... though= the odds of that are low).=C2=A0 Otherwise I'll
commit a fix= .

OK. As near as I can te= ll my pre-push testing was with the old-awk and old-test suite.
T= he new awk with the new test suite shows the bigs. I think I did the tests = from
the wrong checked out tree, but I'm still trying to prov= e that to myself (I remember the
results I got, and they only mat= ch old-awk=C2=A0+ old-testsuite, not new-awk + new-testsuite).
Sorry for the hassle this sloppiness has caused.
Warner
=C2=A0
Warner
=C2=A0
Jess

> I also broke the Jenkins CI run, but not 'make check' for reas= ons I don't
> understand.
>
> Warner


--0000000000000aa0ab060a388086-- From nobody Wed Nov 15 23:09:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVzPX0Nqmz50rnn; Wed, 15 Nov 2023 23:09: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 4SVzPW6z1cz3MpX; Wed, 15 Nov 2023 23:09:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iOdcP1SkeATfipBrGDPiaoAwp+dUJw2lWHoa5DCZD5E=; b=CK6jT52fXN4jEZv6U9RW+dgswJPJ9skRiBh5hURT4h100Af57YgP09Cjixebom+Zpujfqy KrwK9iGHvD/tasnCJ+WlhItkb/sol6o5HMXUkT+bH/yFqkCDEzdus045vmc6ZR0V9Cuc4S p4dSppZfo1qrgqxYpqkrp5aTKJjyZNavjM/zkMy7RONpEMsp3ZkL01hvB75mvDumTzrkEn RtFhcy39zCvsvGmoC2blbCLjK/P7JXYi/zanWwWlvQfoINtgRKY2NW2ErjmdYYjNaFhHji whSeDmsnlBekOfZQ8bjVhEMhaPNr1gKNakUIYWXHHTPRxZHGCoRihdjd2T69iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iOdcP1SkeATfipBrGDPiaoAwp+dUJw2lWHoa5DCZD5E=; b=F1Z5niH0mwihX3LxL325VF5a8TfboKC+6+mFjqT7rWAjqeF3ySaBmK50p/DCctX74MmJ9h BOdxkUzw1z7ccnPgunGNlv+gBpg3twj7KexSBswQcpzrmsho2INjql2wQieNDrhrtOX2i7 uj5Qf0jGkc40giStuiXE3E43PNFBbMiYf+GRXf7UZtcLanofomKQsUHnb9KVTz/fgG/Pik Ndw2LWwZUvSwCLii4KtCgjQHzxqhVKr9SafeIVXLu/t7p6qVyet2hKk50u9EKLThwh2IwP wyEYVINbo3+2wAdRx8jiwLzxOHyhIXOxh14OJrTUHSHfE6BW4NoVwDk/lLiRZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700089744; a=rsa-sha256; cv=none; b=TT6Z56KFQ1w93v09v6uNKfzfVdxrnJ9pXa2XEeY903CBgoUAMdJk27jaB+iy5fb78KYNsX JfmltzMQZdNfAUM8PG3rfYWkAP9/CKkV2KVt2ZGKsSxjTSZ+Iza3Ed7tQ9iD73pyIOxILD boBEMAJ+K28QHfZiQ2ZXK3YzVazYG+S7LrYih6SVHKIQwks1gNnmWJCH1xh1/F7ANiMoLA fwreq4Og0WJDN5vrg50CKid5W7TbwXYSHbXwwxGkW8L0eOwk4Plt5gTFi+9Q/yCejH4SOA cJO3aOz4hR/sSHi3EQprt2ZfeeHQ+HwQNAjkj03N8K69FPOYK3c7PbcxURe0zg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVzPW5rVzzc2Q; Wed, 15 Nov 2023 23:09: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 3AFN93r5064504; Wed, 15 Nov 2023 23:09:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFN93am064501; Wed, 15 Nov 2023 23:09:03 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:09:03 GMT Message-Id: <202311152309.3AFN93am064501@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: e4f84168b3c8 - main - mlx5: Add modify header 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4f84168b3c8bf99297dda712b147906d463b20e Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e4f84168b3c8bf99297dda712b147906d463b20e commit e4f84168b3c8bf99297dda712b147906d463b20e Author: Mark Bloch AuthorDate: 2023-02-19 08:41:24 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-15 23:08:15 +0000 mlx5: Add modify header support Add support to allocating a modify header context. Signed-off-by: Mark Bloch Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/fs.h | 6 ++ sys/dev/mlx5/mlx5_core/fs_core.h | 15 ++++ sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c | 73 ++++++++++++++++ sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c | 32 +++++++ sys/dev/mlx5/mlx5_ifc.h | 160 +++++++++++++++++++++++++++++++++- 5 files changed, 283 insertions(+), 3 deletions(-) diff --git a/sys/dev/mlx5/fs.h b/sys/dev/mlx5/fs.h index b630ab22d465..db5ba1964845 100644 --- a/sys/dev/mlx5/fs.h +++ b/sys/dev/mlx5/fs.h @@ -228,4 +228,10 @@ bool fs_match_exact_mask( void *mask2); /**********end API for sniffer**********/ +struct mlx5_modify_hdr *mlx5_modify_header_alloc(struct mlx5_core_dev *dev, + enum mlx5_flow_namespace_type ns_type, + u8 num_actions, + void *modify_actions); +void mlx5_modify_header_dealloc(struct mlx5_core_dev *dev, + struct mlx5_modify_hdr *modify_hdr); #endif diff --git a/sys/dev/mlx5/mlx5_core/fs_core.h b/sys/dev/mlx5/mlx5_core/fs_core.h index c1033e24a20e..11b042863454 100644 --- a/sys/dev/mlx5/mlx5_core/fs_core.h +++ b/sys/dev/mlx5/mlx5_core/fs_core.h @@ -168,6 +168,11 @@ struct fs_client_priv_data { void *client_dst_data; }; +struct mlx5_modify_hdr { + enum mlx5_flow_namespace_type ns_type; + u32 id; +}; + void _fs_remove_node(struct kref *kref); #define fs_get_obj(v, _base) {v = container_of((_base), typeof(*v), base); } #define fs_get_parent(v, child) {v = (child)->base.parent ? \ @@ -295,4 +300,14 @@ int mlx5_cmd_update_root_ft(struct mlx5_core_dev *dev, int mlx5_init_fs(struct mlx5_core_dev *dev); void mlx5_cleanup_fs(struct mlx5_core_dev *dev); +void mlx5_fc_update_sampling_interval(struct mlx5_core_dev *dev, + unsigned long interval); + +int mlx5_cmd_modify_header_alloc(struct mlx5_core_dev *dev, + enum mlx5_flow_namespace_type namespace, + u8 num_actions, + void *modify_actions, + struct mlx5_modify_hdr *modify_hdr); +void mlx5_cmd_modify_header_dealloc(struct mlx5_core_dev *dev, + struct mlx5_modify_hdr *modify_hdr); #endif diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c index 75e48909aae6..214b4141a973 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c @@ -283,3 +283,76 @@ int mlx5_cmd_fs_delete_fte(struct mlx5_core_dev *dev, return err; } + +int mlx5_cmd_modify_header_alloc(struct mlx5_core_dev *dev, + enum mlx5_flow_namespace_type namespace, + u8 num_actions, + void *modify_actions, + struct mlx5_modify_hdr *modify_hdr) +{ + u32 out[MLX5_ST_SZ_DW(alloc_modify_header_context_out)] = {}; + int max_actions, actions_size, inlen, err; + void *actions_in; + u8 table_type; + u32 *in; + + switch (namespace) { + case MLX5_FLOW_NAMESPACE_FDB: + max_actions = MLX5_CAP_ESW_FLOWTABLE_FDB(dev, max_modify_header_actions); + table_type = FS_FT_FDB; + break; + case MLX5_FLOW_NAMESPACE_KERNEL: + case MLX5_FLOW_NAMESPACE_BYPASS: + max_actions = MLX5_CAP_FLOWTABLE_NIC_RX(dev, max_modify_header_actions); + table_type = FS_FT_NIC_RX; + break; + case MLX5_FLOW_NAMESPACE_ESW_INGRESS: + max_actions = MLX5_CAP_ESW_INGRESS_ACL(dev, max_modify_header_actions); + table_type = FS_FT_ESW_INGRESS_ACL; + break; + default: + return -EOPNOTSUPP; + } + + if (num_actions > max_actions) { + mlx5_core_warn(dev, "too many modify header actions %d, max supported %d\n", + num_actions, max_actions); + return -EOPNOTSUPP; + } + + actions_size = MLX5_UN_SZ_BYTES(set_add_copy_action_in_auto) * num_actions; + inlen = MLX5_ST_SZ_BYTES(alloc_modify_header_context_in) + actions_size; + + in = kzalloc(inlen, GFP_KERNEL); + if (!in) + return -ENOMEM; + + MLX5_SET(alloc_modify_header_context_in, in, opcode, + MLX5_CMD_OP_ALLOC_MODIFY_HEADER_CONTEXT); + MLX5_SET(alloc_modify_header_context_in, in, table_type, table_type); + MLX5_SET(alloc_modify_header_context_in, in, num_of_actions, num_actions); + + actions_in = MLX5_ADDR_OF(alloc_modify_header_context_in, in, actions); + memcpy(actions_in, modify_actions, actions_size); + + err = mlx5_cmd_exec(dev, in, inlen, out, sizeof(out)); + + modify_hdr->id = MLX5_GET(alloc_modify_header_context_out, out, modify_header_id); + kfree(in); + + return err; +} + +void mlx5_cmd_modify_header_dealloc(struct mlx5_core_dev *dev, + struct mlx5_modify_hdr *modify_hdr) +{ + u32 out[MLX5_ST_SZ_DW(dealloc_modify_header_context_out)] = {}; + u32 in[MLX5_ST_SZ_DW(dealloc_modify_header_context_in)] = {}; + + MLX5_SET(dealloc_modify_header_context_in, in, opcode, + MLX5_CMD_OP_DEALLOC_MODIFY_HEADER_CONTEXT); + MLX5_SET(dealloc_modify_header_context_in, in, modify_header_id, + modify_hdr->id); + + mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out)); +} diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c index 734992be9de1..9e9febfe902e 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c @@ -2739,3 +2739,35 @@ free_list: mlx5_del_flow_rules_list(rules_list); return NULL; } + +struct mlx5_modify_hdr *mlx5_modify_header_alloc(struct mlx5_core_dev *dev, + enum mlx5_flow_namespace_type ns_type, + u8 num_actions, + void *modify_actions) +{ + struct mlx5_modify_hdr *modify_hdr; + int err; + + modify_hdr = kzalloc(sizeof(*modify_hdr), GFP_KERNEL); + if (!modify_hdr) + return ERR_PTR(-ENOMEM); + + modify_hdr->ns_type = ns_type; + err = mlx5_cmd_modify_header_alloc(dev, ns_type, num_actions, + modify_actions, modify_hdr); + if (err) { + kfree(modify_hdr); + return ERR_PTR(err); + } + + return modify_hdr; +} +EXPORT_SYMBOL(mlx5_modify_header_alloc); + +void mlx5_modify_header_dealloc(struct mlx5_core_dev *dev, + struct mlx5_modify_hdr *modify_hdr) +{ + mlx5_cmd_modify_header_dealloc(dev, modify_hdr); + kfree(modify_hdr); +} +EXPORT_SYMBOL(mlx5_modify_header_dealloc); diff --git a/sys/dev/mlx5/mlx5_ifc.h b/sys/dev/mlx5/mlx5_ifc.h index 5293a83f56d9..fcea7342532b 100644 --- a/sys/dev/mlx5/mlx5_ifc.h +++ b/sys/dev/mlx5/mlx5_ifc.h @@ -473,7 +473,8 @@ struct mlx5_ifc_flow_table_prop_layout_bits { u8 reserved_at_20[0x2]; u8 log_max_ft_size[0x6]; - u8 reserved_at_28[0x10]; + u8 log_max_modify_header_context[0x8]; + u8 max_modify_header_actions[0x8]; u8 max_ft_level[0x8]; u8 reserved_at_40[0x20]; @@ -2251,11 +2252,15 @@ struct mlx5_ifc_flow_context_bits { u8 reserved_4[0x8]; u8 flow_counter_list_size[0x18]; - u8 reserved_5[0x140]; + u8 reserved_5[0x20]; + + u8 modify_header_id[0x20]; + + u8 reserved_6[0x100]; struct mlx5_ifc_fte_match_param_bits match_value; - u8 reserved_6[0x600]; + u8 reserved_7[0x600]; union mlx5_ifc_dest_format_struct_flow_counter_list_auto_bits destination[0]; }; @@ -5199,6 +5204,155 @@ struct mlx5_ifc_query_eq_in_bits { u8 reserved_3[0x20]; }; +struct mlx5_ifc_set_action_in_bits { + u8 action_type[0x4]; + u8 field[0xc]; + u8 reserved_at_10[0x3]; + u8 offset[0x5]; + u8 reserved_at_18[0x3]; + u8 length[0x5]; + + u8 data[0x20]; +}; + +struct mlx5_ifc_add_action_in_bits { + u8 action_type[0x4]; + u8 field[0xc]; + u8 reserved_at_10[0x10]; + + u8 data[0x20]; +}; + +struct mlx5_ifc_copy_action_in_bits { + u8 action_type[0x4]; + u8 src_field[0xc]; + u8 reserved_at_10[0x3]; + u8 src_offset[0x5]; + u8 reserved_at_18[0x3]; + u8 length[0x5]; + + u8 reserved_at_20[0x4]; + u8 dst_field[0xc]; + u8 reserved_at_30[0x3]; + u8 dst_offset[0x5]; + u8 reserved_at_38[0x8]; +}; + +union mlx5_ifc_set_add_copy_action_in_auto_bits { + struct mlx5_ifc_set_action_in_bits set_action_in; + struct mlx5_ifc_add_action_in_bits add_action_in; + struct mlx5_ifc_copy_action_in_bits copy_action_in; + u8 reserved_at_0[0x40]; +}; + +enum { + MLX5_ACTION_TYPE_SET = 0x1, + MLX5_ACTION_TYPE_ADD = 0x2, + MLX5_ACTION_TYPE_COPY = 0x3, +}; + +enum { + MLX5_ACTION_IN_FIELD_OUT_SMAC_47_16 = 0x1, + MLX5_ACTION_IN_FIELD_OUT_SMAC_15_0 = 0x2, + MLX5_ACTION_IN_FIELD_OUT_ETHERTYPE = 0x3, + MLX5_ACTION_IN_FIELD_OUT_DMAC_47_16 = 0x4, + MLX5_ACTION_IN_FIELD_OUT_DMAC_15_0 = 0x5, + MLX5_ACTION_IN_FIELD_OUT_IP_DSCP = 0x6, + MLX5_ACTION_IN_FIELD_OUT_TCP_FLAGS = 0x7, + MLX5_ACTION_IN_FIELD_OUT_TCP_SPORT = 0x8, + MLX5_ACTION_IN_FIELD_OUT_TCP_DPORT = 0x9, + MLX5_ACTION_IN_FIELD_OUT_IP_TTL = 0xa, + MLX5_ACTION_IN_FIELD_OUT_UDP_SPORT = 0xb, + MLX5_ACTION_IN_FIELD_OUT_UDP_DPORT = 0xc, + MLX5_ACTION_IN_FIELD_OUT_SIPV6_127_96 = 0xd, + MLX5_ACTION_IN_FIELD_OUT_SIPV6_95_64 = 0xe, + MLX5_ACTION_IN_FIELD_OUT_SIPV6_63_32 = 0xf, + MLX5_ACTION_IN_FIELD_OUT_SIPV6_31_0 = 0x10, + MLX5_ACTION_IN_FIELD_OUT_DIPV6_127_96 = 0x11, + MLX5_ACTION_IN_FIELD_OUT_DIPV6_95_64 = 0x12, + MLX5_ACTION_IN_FIELD_OUT_DIPV6_63_32 = 0x13, + MLX5_ACTION_IN_FIELD_OUT_DIPV6_31_0 = 0x14, + MLX5_ACTION_IN_FIELD_OUT_SIPV4 = 0x15, + MLX5_ACTION_IN_FIELD_OUT_DIPV4 = 0x16, + MLX5_ACTION_IN_FIELD_OUT_FIRST_VID = 0x17, + MLX5_ACTION_IN_FIELD_OUT_IPV6_HOPLIMIT = 0x47, + MLX5_ACTION_IN_FIELD_METADATA_REG_A = 0x49, + MLX5_ACTION_IN_FIELD_METADATA_REG_B = 0x50, + MLX5_ACTION_IN_FIELD_METADATA_REG_C_0 = 0x51, + MLX5_ACTION_IN_FIELD_METADATA_REG_C_1 = 0x52, + MLX5_ACTION_IN_FIELD_METADATA_REG_C_2 = 0x53, + MLX5_ACTION_IN_FIELD_METADATA_REG_C_3 = 0x54, + MLX5_ACTION_IN_FIELD_METADATA_REG_C_4 = 0x55, + MLX5_ACTION_IN_FIELD_METADATA_REG_C_5 = 0x56, + MLX5_ACTION_IN_FIELD_METADATA_REG_C_6 = 0x57, + MLX5_ACTION_IN_FIELD_METADATA_REG_C_7 = 0x58, + MLX5_ACTION_IN_FIELD_OUT_TCP_SEQ_NUM = 0x59, + MLX5_ACTION_IN_FIELD_OUT_TCP_ACK_NUM = 0x5B, + MLX5_ACTION_IN_FIELD_IPSEC_SYNDROME = 0x5D, + MLX5_ACTION_IN_FIELD_OUT_EMD_47_32 = 0x6F, + MLX5_ACTION_IN_FIELD_OUT_EMD_31_0 = 0x70, +}; + +struct mlx5_ifc_alloc_modify_header_context_out_bits { + u8 status[0x8]; + u8 reserved_at_8[0x18]; + + u8 syndrome[0x20]; + + u8 modify_header_id[0x20]; + + u8 reserved_at_60[0x20]; +}; + +struct mlx5_ifc_alloc_modify_header_context_in_bits { + u8 opcode[0x10]; + u8 reserved_at_10[0x10]; + + u8 reserved_at_20[0x10]; + u8 op_mod[0x10]; + + u8 reserved_at_40[0x20]; + + u8 table_type[0x8]; + u8 reserved_at_68[0x10]; + u8 num_of_actions[0x8]; + + union mlx5_ifc_set_add_copy_action_in_auto_bits actions[]; +}; + +struct mlx5_ifc_dealloc_modify_header_context_out_bits { + u8 status[0x8]; + u8 reserved_at_8[0x18]; + + u8 syndrome[0x20]; + + u8 reserved_at_40[0x40]; +}; + +struct mlx5_ifc_dealloc_modify_header_context_in_bits { + u8 opcode[0x10]; + u8 reserved_at_10[0x10]; + + u8 reserved_at_20[0x10]; + u8 op_mod[0x10]; + + u8 modify_header_id[0x20]; + + u8 reserved_at_60[0x20]; +}; + +struct mlx5_ifc_query_modify_header_context_in_bits { + u8 opcode[0x10]; + u8 uid[0x10]; + + u8 reserved_at_20[0x10]; + u8 op_mod[0x10]; + + u8 modify_header_id[0x20]; + + u8 reserved_at_60[0xa0]; +}; + struct mlx5_ifc_query_dct_out_bits { u8 status[0x8]; u8 reserved_0[0x18]; From nobody Wed Nov 15 23:09:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVzPY2P5Sz50s0d; Wed, 15 Nov 2023 23:09: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 4SVzPX73fZz3Mfc; Wed, 15 Nov 2023 23:09:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CXxcjXf3WD+acHW8aTzhMnxPO7d26j+B2BRkhiSdPI4=; b=LariazfmD6PtfcnAVIGEoacy9SN5CW6ARBiJBXv9u5CFldn6TRrfHZ5txoiqrKT4xF7DDX zxWklMXFzvp9F5UjG519h0XoDZs4SYlM+8viTzV5O0Z2fS1JcSmJhMe3diapa9zCTfrO8j hnHh7jHhPoyched0rICxIbvMtN2EA73+9k9ZBhRxGW8zz9ubEgj9aY6BhExxbjuwWjmRia c/piANa0G12159FZ6ZllYcOcRi/F5NunYLQZ839TQ7nrIrcFRjUfGnpaB3uE3cFHaROp8l PgR3oYOle+erGeK2eRXJYp4G3qYD7BxJpEJvxOE0CBcJ5Fu1/IXexk5Hai9pEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CXxcjXf3WD+acHW8aTzhMnxPO7d26j+B2BRkhiSdPI4=; b=Bmr0GFsiap/FG0AQHi9a0WgJEA+3YDKJ7nv2ybKfvWQ7PJhl0ZiUl1w4S0WkJ5xLyBmiGE 3bcB2dbotYrq00jvT3d/QkpSLgMVGRjML9Eafkm+RenbwduS1AEM2VEBLwi0gLV17gT6H1 xVLKiyFgfgBUU/p62BKEiHJ63ORQgzsAw2BUUjEr/39GvUdY0u6i5WAv3J0Je2ltdbFvQI JJF+QKmFyFsCODIeb+9uhhFROlrpX6PqNN0qLjaEeQXt4oxtd7kpkIABeXpZTh8LweapqN ArwCyInnx8amJf8zashhn5V5ceElk2mYkQaG9gJZftFUVLfFL6BVw2lPHdrvoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700089745; a=rsa-sha256; cv=none; b=HZClqjIz0VBBeaeq9pab4nj0zjCdGFrW+Dka29sA+oWTOS/+PyScRXFqp+9AeegGUngt4a 4SbTmj3iU4ApZdOpLFzN09IicYxugZ5GcXdsfyj4ePoujCfMP7e0mi3UrNEtRylBv+e7qF 80bWH/qh1lCOfm7N1PJ5euEGWecfqRRawa3lCMpq6yb0u2WntB307cU7PSlW6guJqiAAJs +97/nGqF77dxOXoLqMs2bbIwBGNJHqZSSl8vEvXq7drlqwAuRnRs5wleYLPz6QUTYUBJY+ AtBI0bChzNlxD4jOfxGhFlguTPVgviOBO2u+XH6h59cHmhxqxFf0+XqQ82+JpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVzPX68M2zbK6; Wed, 15 Nov 2023 23:09: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 3AFN9415064549; Wed, 15 Nov 2023 23:09:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFN94u3064546; Wed, 15 Nov 2023 23:09:04 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:09:04 GMT Message-Id: <202311152309.3AFN94u3064546@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: bb4645b95b0b - main - mlx5: Add packet reformat allocation 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb4645b95b0b3976decb4e68934b2e5cc002c53d Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=bb4645b95b0b3976decb4e68934b2e5cc002c53d commit bb4645b95b0b3976decb4e68934b2e5cc002c53d Author: Mark Bloch AuthorDate: 2023-02-19 09:36:07 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-15 23:08:16 +0000 mlx5: Add packet reformat allocation support Add support to allocating a packet reformat context. Signed-off-by: Mark Bloch Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/fs.h | 14 +++++++ sys/dev/mlx5/mlx5_core/fs_core.h | 12 ++++++ sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c | 72 +++++++++++++++++++++++++++++++ sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c | 33 +++++++++++++++ sys/dev/mlx5/mlx5_ifc.h | 79 +++++++++++++++++++++++++---------- 5 files changed, 187 insertions(+), 23 deletions(-) diff --git a/sys/dev/mlx5/fs.h b/sys/dev/mlx5/fs.h index db5ba1964845..81384b43131d 100644 --- a/sys/dev/mlx5/fs.h +++ b/sys/dev/mlx5/fs.h @@ -234,4 +234,18 @@ struct mlx5_modify_hdr *mlx5_modify_header_alloc(struct mlx5_core_dev *dev, void *modify_actions); void mlx5_modify_header_dealloc(struct mlx5_core_dev *dev, struct mlx5_modify_hdr *modify_hdr); + +struct mlx5_pkt_reformat_params { + int type; + u8 param_0; + u8 param_1; + size_t size; + void *data; +}; + +struct mlx5_pkt_reformat *mlx5_packet_reformat_alloc(struct mlx5_core_dev *dev, + struct mlx5_pkt_reformat_params *params, + enum mlx5_flow_namespace_type ns_type); +void mlx5_packet_reformat_dealloc(struct mlx5_core_dev *dev, + struct mlx5_pkt_reformat *pkt_reformat); #endif diff --git a/sys/dev/mlx5/mlx5_core/fs_core.h b/sys/dev/mlx5/mlx5_core/fs_core.h index 11b042863454..bd7aade07876 100644 --- a/sys/dev/mlx5/mlx5_core/fs_core.h +++ b/sys/dev/mlx5/mlx5_core/fs_core.h @@ -173,6 +173,12 @@ struct mlx5_modify_hdr { u32 id; }; +struct mlx5_pkt_reformat { + enum mlx5_flow_namespace_type ns_type; + int reformat_type; /* from mlx5_ifc */ + u32 id; +}; + void _fs_remove_node(struct kref *kref); #define fs_get_obj(v, _base) {v = container_of((_base), typeof(*v), base); } #define fs_get_parent(v, child) {v = (child)->base.parent ? \ @@ -310,4 +316,10 @@ int mlx5_cmd_modify_header_alloc(struct mlx5_core_dev *dev, struct mlx5_modify_hdr *modify_hdr); void mlx5_cmd_modify_header_dealloc(struct mlx5_core_dev *dev, struct mlx5_modify_hdr *modify_hdr); +int mlx5_cmd_packet_reformat_alloc(struct mlx5_core_dev *dev, + struct mlx5_pkt_reformat_params *params, + enum mlx5_flow_namespace_type namespace, + struct mlx5_pkt_reformat *pkt_reformat); +void mlx5_cmd_packet_reformat_dealloc(struct mlx5_core_dev *dev, + struct mlx5_pkt_reformat *pkt_reformat); #endif diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c index 214b4141a973..7dcd32ed0c44 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c @@ -356,3 +356,75 @@ void mlx5_cmd_modify_header_dealloc(struct mlx5_core_dev *dev, mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out)); } + +int mlx5_cmd_packet_reformat_alloc(struct mlx5_core_dev *dev, + struct mlx5_pkt_reformat_params *params, + enum mlx5_flow_namespace_type namespace, + struct mlx5_pkt_reformat *pkt_reformat) +{ + u32 out[MLX5_ST_SZ_DW(alloc_packet_reformat_context_out)] = {}; + void *packet_reformat_context_in; + int max_encap_size; + void *reformat; + int inlen; + int err; + u32 *in; + + if (namespace == MLX5_FLOW_NAMESPACE_FDB) + max_encap_size = MLX5_CAP_ESW(dev, max_encap_header_size); + else + max_encap_size = MLX5_CAP_FLOWTABLE(dev, max_encap_header_size); + + if (params->size > max_encap_size) { + mlx5_core_warn(dev, "encap size %zd too big, max supported is %d\n", + params->size, max_encap_size); + return -EINVAL; + } + + in = kzalloc(MLX5_ST_SZ_BYTES(alloc_packet_reformat_context_in) + + params->size, GFP_KERNEL); + if (!in) + return -ENOMEM; + + packet_reformat_context_in = MLX5_ADDR_OF(alloc_packet_reformat_context_in, + in, packet_reformat_context); + reformat = MLX5_ADDR_OF(packet_reformat_context_in, + packet_reformat_context_in, + reformat_data); + inlen = reformat - (void *)in + params->size; + + MLX5_SET(alloc_packet_reformat_context_in, in, opcode, + MLX5_CMD_OP_ALLOC_PACKET_REFORMAT_CONTEXT); + MLX5_SET(packet_reformat_context_in, packet_reformat_context_in, + reformat_data_size, params->size); + MLX5_SET(packet_reformat_context_in, packet_reformat_context_in, + reformat_type, params->type); + MLX5_SET(packet_reformat_context_in, packet_reformat_context_in, + reformat_param_0, params->param_0); + MLX5_SET(packet_reformat_context_in, packet_reformat_context_in, + reformat_param_1, params->param_1); + if (params->data && params->size) + memcpy(reformat, params->data, params->size); + + err = mlx5_cmd_exec(dev, in, inlen, out, sizeof(out)); + + pkt_reformat->id = MLX5_GET(alloc_packet_reformat_context_out, + out, packet_reformat_id); + kfree(in); + + return err; +} + +void mlx5_cmd_packet_reformat_dealloc(struct mlx5_core_dev *dev, + struct mlx5_pkt_reformat *pkt_reformat) +{ + u32 out[MLX5_ST_SZ_DW(dealloc_packet_reformat_context_out)] = {}; + u32 in[MLX5_ST_SZ_DW(dealloc_packet_reformat_context_in)] = {}; + + MLX5_SET(dealloc_packet_reformat_context_in, in, opcode, + MLX5_CMD_OP_DEALLOC_PACKET_REFORMAT_CONTEXT); + MLX5_SET(dealloc_packet_reformat_context_in, in, packet_reformat_id, + pkt_reformat->id); + + mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out)); +} diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c index 9e9febfe902e..358eb671de5a 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c @@ -2771,3 +2771,36 @@ void mlx5_modify_header_dealloc(struct mlx5_core_dev *dev, kfree(modify_hdr); } EXPORT_SYMBOL(mlx5_modify_header_dealloc); + +struct mlx5_pkt_reformat *mlx5_packet_reformat_alloc(struct mlx5_core_dev *dev, + struct mlx5_pkt_reformat_params *params, + enum mlx5_flow_namespace_type ns_type) +{ + struct mlx5_pkt_reformat *pkt_reformat; + int err; + + pkt_reformat = kzalloc(sizeof(*pkt_reformat), GFP_KERNEL); + if (!pkt_reformat) + return ERR_PTR(-ENOMEM); + + pkt_reformat->ns_type = ns_type; + pkt_reformat->reformat_type = params->type; + err = mlx5_cmd_packet_reformat_alloc(dev, params, ns_type, + pkt_reformat); + if (err) { + kfree(pkt_reformat); + return ERR_PTR(err); + } + + return pkt_reformat; +} +EXPORT_SYMBOL(mlx5_packet_reformat_alloc); + +void mlx5_packet_reformat_dealloc(struct mlx5_core_dev *dev, + struct mlx5_pkt_reformat *pkt_reformat) +{ + mlx5_cmd_packet_reformat_dealloc(dev, pkt_reformat); + kfree(pkt_reformat); +} +EXPORT_SYMBOL(mlx5_packet_reformat_dealloc); + diff --git a/sys/dev/mlx5/mlx5_ifc.h b/sys/dev/mlx5/mlx5_ifc.h index fcea7342532b..340e3b2e2d03 100644 --- a/sys/dev/mlx5/mlx5_ifc.h +++ b/sys/dev/mlx5/mlx5_ifc.h @@ -778,18 +778,40 @@ struct mlx5_ifc_snapshot_cap_bits { }; struct mlx5_ifc_e_switch_cap_bits { - u8 vport_svlan_strip[0x1]; - u8 vport_cvlan_strip[0x1]; - u8 vport_svlan_insert[0x1]; - u8 vport_cvlan_insert_if_not_exist[0x1]; - u8 vport_cvlan_insert_overwrite[0x1]; - - u8 reserved_0[0x19]; - - u8 nic_vport_node_guid_modify[0x1]; - u8 nic_vport_port_guid_modify[0x1]; + u8 vport_svlan_strip[0x1]; + u8 vport_cvlan_strip[0x1]; + u8 vport_svlan_insert[0x1]; + u8 vport_cvlan_insert_if_not_exist[0x1]; + u8 vport_cvlan_insert_overwrite[0x1]; + u8 reserved_at_5[0x1]; + u8 vport_cvlan_insert_always[0x1]; + u8 esw_shared_ingress_acl[0x1]; + u8 esw_uplink_ingress_acl[0x1]; + u8 root_ft_on_other_esw[0x1]; + u8 reserved_at_a[0xf]; + u8 esw_functions_changed[0x1]; + u8 reserved_at_1a[0x1]; + u8 ecpf_vport_exists[0x1]; + u8 counter_eswitch_affinity[0x1]; + u8 merged_eswitch[0x1]; + u8 nic_vport_node_guid_modify[0x1]; + u8 nic_vport_port_guid_modify[0x1]; + + u8 vxlan_encap_decap[0x1]; + u8 nvgre_encap_decap[0x1]; + u8 reserved_at_22[0x1]; + u8 log_max_fdb_encap_uplink[0x5]; + u8 reserved_at_21[0x3]; + u8 log_max_packet_reformat_context[0x5]; + u8 reserved_2b[0x6]; + u8 max_encap_header_size[0xa]; + + u8 reserved_at_40[0xb]; + u8 log_max_esw_sf[0x5]; + u8 esw_sf_base_id[0x10]; + + u8 reserved_at_60[0x7a0]; - u8 reserved_1[0x7e0]; }; struct mlx5_ifc_flow_table_eswitch_cap_bits { @@ -806,9 +828,18 @@ struct mlx5_ifc_flow_table_eswitch_cap_bits { struct mlx5_ifc_flow_table_nic_cap_bits { u8 nic_rx_multi_path_tirs[0x1]; - u8 nic_rx_multi_path_tirs_fts[0x1]; - u8 allow_sniffer_and_nic_rx_shared_tir[0x1]; - u8 reserved_at_3[0x1fd]; + u8 nic_rx_multi_path_tirs_fts[0x1]; + u8 allow_sniffer_and_nic_rx_shared_tir[0x1]; + u8 reserved_at_3[0x4]; + u8 sw_owner_reformat_supported[0x1]; + u8 reserved_at_8[0x18]; + + u8 encap_general_header[0x1]; + u8 reserved_at_21[0xa]; + u8 log_max_packet_reformat_context[0x5]; + u8 reserved_at_30[0x6]; + u8 max_encap_header_size[0xa]; + u8 reserved_at_40[0x1c0]; struct mlx5_ifc_flow_table_prop_layout_bits flow_table_properties_nic_receive; @@ -2252,7 +2283,7 @@ struct mlx5_ifc_flow_context_bits { u8 reserved_4[0x8]; u8 flow_counter_list_size[0x18]; - u8 reserved_5[0x20]; + u8 packet_reformat_id[0x20]; u8 modify_header_id[0x20]; @@ -2923,7 +2954,7 @@ enum { }; struct mlx5_ifc_flow_table_context_bits { - u8 encap_en[0x1]; + u8 reformat_en[0x1]; u8 decap_en[0x1]; u8 reserved_at_2[0x2]; u8 table_miss_action[0x4]; @@ -5404,15 +5435,17 @@ struct mlx5_ifc_query_dc_cnak_trace_in_bits { }; struct mlx5_ifc_packet_reformat_context_in_bits { - u8 reserved_at_0[0x5]; - u8 reformat_type[0x3]; - u8 reserved_at_8[0xe]; - u8 reformat_data_size[0xa]; + u8 reformat_type[0x8]; + u8 reserved_at_8[0x4]; + u8 reformat_param_0[0x4]; + u8 reserved_at_10[0x6]; + u8 reformat_data_size[0xa]; - u8 reserved_at_20[0x10]; - u8 reformat_data[2][0x8]; + u8 reformat_param_1[0x8]; + u8 reserved_at_28[0x8]; + u8 reformat_data[2][0x8]; - u8 more_reformat_data[0][0x8]; + u8 more_reformat_data[][0x8]; }; struct mlx5_ifc_query_packet_reformat_context_out_bits { From nobody Wed Nov 15 23:09:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVzPZ2tL8z50rns; Wed, 15 Nov 2023 23:09: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 4SVzPZ0FJZz3MqM; Wed, 15 Nov 2023 23:09:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2EBPqSz9bjzDkcd3ObgSCFKWfP7vyxCAccDTFjK/4jc=; b=jswKCckpxCpomt7P2IMfEW0EPL3Q4TfQWX6nnlxCxXj2d0o06r3aPO8t63ngMMFvHo6RPl 0wiamLpz64vfB5mJeuCNw/PvmScENZotc2IVSOqgpCA9cqzBPQwB3dGnIimPsqgBlDs9J5 IZIYwZp5h05c+5bLeHDn8HiL8RG88n2gPdaIE2swq9N7nb+LFZ0j9kVZx5DP5DgxsWc6QW XUn0cSRW0bhKh+lqhw42eUB20SzsUREjDIJICznSeVKtjWrqjCQZ6OeUZxC7Ty+AEun/gl wrpXCjRBevCgdaIPEJbEbSZQ3PpDM+cy3yL81GcAaw05GnqEvtFQPwRD4eks2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2EBPqSz9bjzDkcd3ObgSCFKWfP7vyxCAccDTFjK/4jc=; b=P8yjDzENBbV0Khc2V2Tpsqh8cpZfyyn6kbgvSKH+1++Ajmbg0YA88O4hBbTa4VoenPohny 24PMTKOCVCdXCpOcBv8Q/mNV8JMYetuacEjG+cwIUP0qI1OYf2m9UwuygUkzKyWkmFukWl ExrOSSABi0G3H16HlZ4uOWwK5ABBFwXxIWjRj6miS5gN/CdwEN0TezBeNddHpip0xwYF1s ep2Gtw0xZMkh4gF0hj07C2z1s8fr/F5zZDlRGDo8WmxCI2DaOXxtdy8FdMldxb/JCauP2l 2tACALHzbIIOKN6o3iJSHUDCA8V3sqU56FomFrZsdvKLeD3BI1mEg+GKeKeFfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700089746; a=rsa-sha256; cv=none; b=gkiHsgfzexWfR2Afvx+5U4CyCSGSugPKe4C81yjs1Bp6p6k0mwyia2lKVr5yxNz4W/hvN8 pWL70WMe958xBURXCuN/Cs/OR/srEIqa6qzTwi2O70tAXbRYR7TWN+KIrgPs/g8BiHKI37 ZDozH9jku5HCqr+f/cqdqDbixf4wfWIlmgmlc/79ut3VAZ7PnuK9R80iGBlQUrDuvufuvn Xn/0BWAM9xdjS5vkDBivbQKWC1KASdU1bDeo3aY25Ky6f2z/q55AVxOsLDI8zv/xy5jjUB 5pnauM1p/V53PUKTqKNaa0uPf7RLUdDrPqTDBYj1mFYPa/CjeUcUGqauMfLzHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVzPY6SdVzbqf; Wed, 15 Nov 2023 23:09: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 3AFN95qB064597; Wed, 15 Nov 2023 23:09:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFN957m064594; Wed, 15 Nov 2023 23:09:05 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:09:05 GMT Message-Id: <202311152309.3AFN957m064594@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: cb054a493a95 - main - mlx5: Refactor flow actions into a struct List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: cb054a493a95cbd5a4b00c693c3924622914c51a Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cb054a493a95cbd5a4b00c693c3924622914c51a commit cb054a493a95cbd5a4b00c693c3924622914c51a Author: Mark Bloch AuthorDate: 2023-02-19 10:47:50 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-15 23:08:16 +0000 mlx5: Refactor flow actions into a struct Create a struct to hold flow actions to be used when creating a flow rule. Signed-off-by: Mark Bloch Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/fs.h | 11 ++++- sys/dev/mlx5/mlx5_core/fs_core.h | 4 +- sys/dev/mlx5/mlx5_core/mlx5_eswitch.c | 11 +++-- sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c | 5 ++- sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c | 12 +++++- sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c | 58 +++++++++++++++++-------- sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c | 70 ++++++++++++++++++++----------- sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c | 6 ++- 8 files changed, 123 insertions(+), 54 deletions(-) diff --git a/sys/dev/mlx5/fs.h b/sys/dev/mlx5/fs.h index 81384b43131d..7ed7a5380cf1 100644 --- a/sys/dev/mlx5/fs.h +++ b/sys/dev/mlx5/fs.h @@ -82,6 +82,15 @@ struct mlx5_flow_destination { }; }; +enum mlx5_flow_act_actions { + MLX5_FLOW_ACT_ACTIONS_FLOW_TAG = 1 << 0, +}; + +struct mlx5_flow_act { + u32 actions; /* See enum mlx5_flow_act_actions */ + u32 flow_tag; +}; + #define FT_NAME_STR_SZ 20 #define LEFTOVERS_RULE_NUM 2 static inline void build_leftovers_ft_param(char *name, @@ -154,7 +163,7 @@ mlx5_add_flow_rule(struct mlx5_flow_table *ft, u32 *match_criteria, u32 *match_value, u32 action, - u32 flow_tag, + struct mlx5_flow_act *flow_act, struct mlx5_flow_destination *dest); void mlx5_del_flow_rule(struct mlx5_flow_rule **); diff --git a/sys/dev/mlx5/mlx5_core/fs_core.h b/sys/dev/mlx5/mlx5_core/fs_core.h index bd7aade07876..40c6cadf3223 100644 --- a/sys/dev/mlx5/mlx5_core/fs_core.h +++ b/sys/dev/mlx5/mlx5_core/fs_core.h @@ -78,9 +78,9 @@ struct fs_fte { struct fs_base base; u32 val[MLX5_ST_SZ_DW(fte_match_param)]; uint32_t dests_size; - uint32_t flow_tag; struct list_head dests; uint32_t index; /* index in ft */ + struct mlx5_flow_act flow_act; u8 action; /* MLX5_FLOW_CONTEXT_ACTION */ enum fs_fte_status status; }; @@ -290,7 +290,7 @@ int mlx5_cmd_fs_set_fte(struct mlx5_core_dev *dev, u32 *match_val, enum fs_ft_type type, unsigned int table_id, unsigned int index, unsigned int group_id, - unsigned int flow_tag, + struct mlx5_flow_act *flow_act, unsigned short action, int dest_size, struct list_head *dests); /* mlx5_flow_desination */ diff --git a/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c b/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c index 16e25df2b7ab..9f9350e0260b 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c @@ -221,6 +221,7 @@ esw_fdb_set_vport_rule(struct mlx5_eswitch *esw, u8 mac[ETH_ALEN], u32 vport) int match_header = MLX5_MATCH_OUTER_HEADERS; struct mlx5_flow_destination dest; struct mlx5_flow_rule *flow_rule = NULL; + struct mlx5_flow_act flow_act = {}; u32 *match_v; u32 *match_c; u8 *dmac_v; @@ -253,7 +254,7 @@ esw_fdb_set_vport_rule(struct mlx5_eswitch *esw, u8 mac[ETH_ALEN], u32 vport) match_c, match_v, MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, - 0, &dest); + &flow_act, &dest); if (IS_ERR_OR_NULL(flow_rule)) { printf("mlx5_core: WARN: ""FDB: Failed to add flow rule: dmac_v(%pM) dmac_c(%pM) -> vport(%d), err(%ld)\n", dmac_v, dmac_c, vport, PTR_ERR(flow_rule)); flow_rule = NULL; @@ -783,6 +784,7 @@ static void esw_vport_disable_ingress_acl(struct mlx5_eswitch *esw, static int esw_vport_ingress_config(struct mlx5_eswitch *esw, struct mlx5_vport *vport) { + struct mlx5_flow_act flow_act = {}; struct mlx5_flow_destination dest; u32 *match_v; u32 *match_c; @@ -824,7 +826,7 @@ static int esw_vport_ingress_config(struct mlx5_eswitch *esw, match_c, match_v, MLX5_FLOW_CONTEXT_ACTION_DROP, - 0, &dest); + &flow_act, &dest); if (IS_ERR_OR_NULL(vport->ingress.drop_rule)) { err = PTR_ERR(vport->ingress.drop_rule); printf("mlx5_core: WARN: ""vport[%d] configure ingress rules, err(%d)\n", vport->vport, err); @@ -839,6 +841,7 @@ out: static int esw_vport_egress_config(struct mlx5_eswitch *esw, struct mlx5_vport *vport) { + struct mlx5_flow_act flow_act = {}; struct mlx5_flow_destination dest; u32 *match_v; u32 *match_c; @@ -883,7 +886,7 @@ static int esw_vport_egress_config(struct mlx5_eswitch *esw, match_c, match_v, MLX5_FLOW_CONTEXT_ACTION_ALLOW, - 0, &dest); + &flow_act, &dest); if (IS_ERR_OR_NULL(vport->egress.allowed_vlan)) { err = PTR_ERR(vport->egress.allowed_vlan); printf("mlx5_core: WARN: ""vport[%d] configure egress allowed vlan rule failed, err(%d)\n", vport->vport, err); @@ -900,7 +903,7 @@ static int esw_vport_egress_config(struct mlx5_eswitch *esw, match_c, match_v, MLX5_FLOW_CONTEXT_ACTION_DROP, - 0, &dest); + &flow_act, &dest); if (IS_ERR_OR_NULL(vport->egress.drop_rule)) { err = PTR_ERR(vport->egress.drop_rule); printf("mlx5_core: WARN: ""vport[%d] configure egress drop rule failed, err(%d)\n", vport->vport, err); diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c index 7dcd32ed0c44..5ac0c95c7bca 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c @@ -164,7 +164,7 @@ int mlx5_cmd_fs_set_fte(struct mlx5_core_dev *dev, u32 *match_val, enum fs_ft_type type, unsigned int table_id, unsigned int index, unsigned int group_id, - unsigned int flow_tag, + struct mlx5_flow_act *flow_act, unsigned short action, int dest_size, struct list_head *dests) /* mlx5_flow_desination */ { @@ -219,7 +219,8 @@ int mlx5_cmd_fs_set_fte(struct mlx5_core_dev *dev, in_flow_context = MLX5_ADDR_OF(set_fte_in, in, flow_context); MLX5_SET(flow_context, in_flow_context, group_id, group_id); - MLX5_SET(flow_context, in_flow_context, flow_tag, flow_tag); + if (flow_act->actions & MLX5_FLOW_ACT_ACTIONS_FLOW_TAG) + MLX5_SET(flow_context, in_flow_context, flow_tag, flow_act->flow_tag); MLX5_SET(flow_context, in_flow_context, action, action); MLX5_SET(flow_context, in_flow_context, destination_list_size, dest_size); diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c index 2bdf01081650..69df9ecba210 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c @@ -98,6 +98,10 @@ mlx5e_accel_fs_add_inpcb(struct mlx5e_priv *priv, #endif struct mlx5_flow_rule *flow; struct mlx5_flow_spec *spec; + struct mlx5_flow_act flow_act = { + .actions = MLX5_FLOW_ACT_ACTIONS_FLOW_TAG, + .flow_tag = flow_tag, + }; spec = kvzalloc(sizeof(*spec), GFP_KERNEL); if (!spec) @@ -161,7 +165,7 @@ mlx5e_accel_fs_add_inpcb(struct mlx5e_priv *priv, spec->match_criteria, spec->match_value, MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, - flow_tag, + &flow_act, &dest); out: kvfree(spec); @@ -176,6 +180,10 @@ accel_fs_tcp_add_default_rule(struct mlx5e_priv *priv, int type) struct mlx5_flow_destination dest = {}; struct mlx5e_accel_fs_tcp *fs_tcp; struct mlx5_flow_rule *rule; + struct mlx5_flow_act flow_act = { + .actions = MLX5_FLOW_ACT_ACTIONS_FLOW_TAG, + .flow_tag = MLX5_FS_DEFAULT_FLOW_TAG, + }; fs_tcp = &priv->fts.accel_tcp; @@ -192,7 +200,7 @@ accel_fs_tcp_add_default_rule(struct mlx5e_priv *priv, int type) priv->fts.vlan.t : fs_tcp->tables[type + 1].t; rule = mlx5_add_flow_rule(fs_tcp->tables[type].t, 0, match_criteria, match_value, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, MLX5_FS_DEFAULT_FLOW_TAG, &dest); + MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); if (IS_ERR(rule)) return (PTR_ERR(rule)); diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c index 358eb671de5a..8e203a9662bb 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c @@ -303,7 +303,7 @@ static void fs_remove_node_parent_locked(struct fs_base *node) } static struct fs_fte *fs_alloc_fte(u8 action, - u32 flow_tag, + struct mlx5_flow_act *flow_act, u32 *match_value, unsigned int index) { @@ -317,9 +317,9 @@ static struct fs_fte *fs_alloc_fte(u8 action, memcpy(fte->val, match_value, sizeof(fte->val)); fte->base.type = FS_TYPE_FLOW_ENTRY; fte->dests_size = 0; - fte->flow_tag = flow_tag; fte->index = index; INIT_LIST_HEAD(&fte->dests); + fte->flow_act = *flow_act; fte->action = action; return fte; @@ -333,12 +333,16 @@ static struct fs_fte *alloc_star_ft_entry(struct mlx5_flow_table *ft, int err; struct fs_fte *fte; struct mlx5_flow_rule *dst; + struct mlx5_flow_act flow_act = { + .actions = MLX5_FLOW_ACT_ACTIONS_FLOW_TAG, + .flow_tag = MLX5_FS_DEFAULT_FLOW_TAG, + }; if (fg->num_ftes == fg->max_ftes) return ERR_PTR(-ENOSPC); fte = fs_alloc_fte(MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, - MLX5_FS_DEFAULT_FLOW_TAG, match_value, index); + &flow_act, match_value, index); if (IS_ERR(fte)) return fte; @@ -442,7 +446,7 @@ static int fs_set_star_rule(struct mlx5_core_dev *dev, match_value, src_ft->type, src_ft->id, src_fte->index, src_ft->star_rule.fg->id, - src_fte->flow_tag, + &src_fte->flow_act, src_fte->action, src_fte->dests_size, &src_fte->dests); @@ -1583,7 +1587,7 @@ static struct mlx5_flow_rule *_fs_add_dst_fte(struct fs_fte *fte, ft->vport, &fte->status, fte->val, ft->type, - ft->id, fte->index, fg->id, fte->flow_tag, + ft->id, fte->index, fg->id, &fte->flow_act, fte->action, fte->dests_size, &fte->dests); if (err) goto free_dst; @@ -1647,14 +1651,14 @@ static unsigned int fs_get_free_fg_index(struct mlx5_flow_group *fg, static struct fs_fte *fs_create_fte(struct mlx5_flow_group *fg, u32 *match_value, u8 action, - u32 flow_tag, + struct mlx5_flow_act *flow_act, struct list_head **prev) { struct fs_fte *fte; int index = 0; index = fs_get_free_fg_index(fg, prev); - fte = fs_alloc_fte(action, flow_tag, match_value, index); + fte = fs_alloc_fte(action, flow_act, match_value, index); if (IS_ERR(fte)) return fte; @@ -1704,7 +1708,7 @@ static void fs_del_dst(struct mlx5_flow_rule *dst) err = mlx5_cmd_fs_set_fte(dev, ft->vport, &fte->status, match_value, ft->type, ft->id, fte->index, fg->id, - fte->flow_tag, fte->action, + &fte->flow_act, fte->action, fte->dests_size, &fte->dests); if (err) { mlx5_core_warn(dev, "%s can't delete dst %s\n", @@ -1740,12 +1744,31 @@ static void fs_del_fte(struct fs_fte *fte) fg->num_ftes--; } +static bool check_conflicting_actions(const struct mlx5_flow_act *act1, + const struct mlx5_flow_act *act2) +{ + u32 action1 = act1->actions; + u32 action2 = act2->actions; + u32 xored_actions; + + xored_actions = action1 ^ action2; + + if (xored_actions & (MLX5_FLOW_ACT_ACTIONS_FLOW_TAG)) + return true; + + if (action1 & MLX5_FLOW_ACT_ACTIONS_FLOW_TAG && + act1->flow_tag != act2->flow_tag) + return true; + + return false; +} + /* assuming parent fg is locked */ /* Add dst algorithm */ static struct mlx5_flow_rule *fs_add_dst_fg(struct mlx5_flow_group *fg, u32 *match_value, u8 action, - u32 flow_tag, + struct mlx5_flow_act *flow_act, struct mlx5_flow_destination *dest) { struct fs_fte *fte; @@ -1759,7 +1782,8 @@ static struct mlx5_flow_rule *fs_add_dst_fg(struct mlx5_flow_group *fg, /* TODO: Check of size against PRM max size */ mutex_lock(&fte->base.lock); if (fs_match_exact_val(&fg->mask, match_value, &fte->val) && - action == fte->action && flow_tag == fte->flow_tag) { + action == fte->action && + !check_conflicting_actions(flow_act, &fte->flow_act)) { dst = _fs_add_dst_fte(fte, fg, dest); mutex_unlock(&fte->base.lock); if (IS_ERR(dst)) @@ -1775,7 +1799,7 @@ static struct mlx5_flow_rule *fs_add_dst_fg(struct mlx5_flow_group *fg, goto unlock_fg; } - fte = fs_create_fte(fg, match_value, action, flow_tag, &prev); + fte = fs_create_fte(fg, match_value, action, flow_act, &prev); if (IS_ERR(fte)) { dst = (void *)fte; goto unlock_fg; @@ -1803,7 +1827,8 @@ static struct mlx5_flow_rule *fs_add_dst_ft(struct mlx5_flow_table *ft, u8 match_criteria_enable, u32 *match_criteria, u32 *match_value, - u8 action, u32 flow_tag, + u8 action, + struct mlx5_flow_act *flow_act, struct mlx5_flow_destination *dest) { /*? where dst_entry is allocated*/ @@ -1819,8 +1844,7 @@ static struct mlx5_flow_rule *fs_add_dst_ft(struct mlx5_flow_table *ft, match_criteria)) { mutex_unlock(&ft->base.lock); - dst = fs_add_dst_fg(g, match_value, - action, flow_tag, dest); + dst = fs_add_dst_fg(g, match_value, action, flow_act, dest); if (PTR_ERR(dst) && PTR_ERR(dst) != -ENOSPC) goto unlock; } @@ -1833,7 +1857,7 @@ static struct mlx5_flow_rule *fs_add_dst_ft(struct mlx5_flow_table *ft, } dst = fs_add_dst_fg(g, match_value, - action, flow_tag, dest); + action, flow_act, dest); if (IS_ERR(dst)) { /* Remove assumes refcount > 0 and autogroup creates a group * with a refcount = 0. @@ -1854,7 +1878,7 @@ mlx5_add_flow_rule(struct mlx5_flow_table *ft, u32 *match_criteria, u32 *match_value, u32 action, - u32 flow_tag, + struct mlx5_flow_act *flow_act, struct mlx5_flow_destination *dest) { struct mlx5_flow_rule *dst; @@ -1864,7 +1888,7 @@ mlx5_add_flow_rule(struct mlx5_flow_table *ft, if (ns) down_read(&ns->dests_rw_sem); dst = fs_add_dst_ft(ft, match_criteria_enable, match_criteria, - match_value, action, flow_tag, dest); + match_value, action, flow_act, dest); if (ns) up_read(&ns->dests_rw_sem); diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c index 8167c3062100..cb23b80deae4 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c @@ -261,6 +261,10 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, u32 *tirn = priv->tirn; u32 tt_vec; int err = 0; + struct mlx5_flow_act flow_act = { + .actions = MLX5_FLOW_ACT_ACTIONS_FLOW_TAG, + .flow_tag = MLX5_FS_ETH_FLOW_TAG, + }; dest.type = MLX5_FLOW_DESTINATION_TYPE_TIR; @@ -290,7 +294,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, dest.tir_num = tirn[MLX5E_TT_ANY]; *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, - MLX5_FS_ETH_FLOW_TAG, &dest); + &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; } @@ -305,7 +309,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, - MLX5_FS_ETH_FLOW_TAG, &dest); + &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; } @@ -317,7 +321,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, - MLX5_FS_ETH_FLOW_TAG, &dest); + &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; } @@ -332,7 +336,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, - MLX5_FS_ETH_FLOW_TAG, &dest); + &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; } @@ -344,7 +348,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, - MLX5_FS_ETH_FLOW_TAG, &dest); + &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; } @@ -358,7 +362,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, - MLX5_FS_ETH_FLOW_TAG, &dest); + &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; } @@ -370,7 +374,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, - MLX5_FS_ETH_FLOW_TAG, &dest); + &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; } @@ -384,7 +388,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, - MLX5_FS_ETH_FLOW_TAG, &dest); + &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; } @@ -396,7 +400,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, - MLX5_FS_ETH_FLOW_TAG, &dest); + &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; } @@ -410,7 +414,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, - MLX5_FS_ETH_FLOW_TAG, &dest); + &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; } @@ -422,7 +426,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, - MLX5_FS_ETH_FLOW_TAG, &dest); + &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; } @@ -486,6 +490,10 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) struct mlx5_flow_rule **rule_p; struct mlx5_flow_table *ft = priv->fts.main_vxlan.t; u32 *tirn = priv->tirn_inner_vxlan; + struct mlx5_flow_act flow_act = { + .actions = MLX5_FLOW_ACT_ACTIONS_FLOW_TAG, + .flow_tag = MLX5_FS_ETH_FLOW_TAG, + }; int err = 0; dest.type = MLX5_FLOW_DESTINATION_TYPE_TIR; @@ -497,7 +505,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV4]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, MLX5_FS_ETH_FLOW_TAG, &dest); + MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -505,7 +513,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV6]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, MLX5_FS_ETH_FLOW_TAG, &dest); + MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -516,7 +524,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV4_UDP]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, MLX5_FS_ETH_FLOW_TAG, &dest); + MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -524,7 +532,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV6_UDP]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, MLX5_FS_ETH_FLOW_TAG, &dest); + MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -534,7 +542,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV4_TCP]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, MLX5_FS_ETH_FLOW_TAG, &dest); + MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -542,7 +550,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV6_TCP]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, MLX5_FS_ETH_FLOW_TAG, &dest); + MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -552,7 +560,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV4_IPSEC_AH]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, MLX5_FS_ETH_FLOW_TAG, &dest); + MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -560,7 +568,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV6_IPSEC_AH]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, MLX5_FS_ETH_FLOW_TAG, &dest); + MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -570,7 +578,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV4_IPSEC_ESP]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, MLX5_FS_ETH_FLOW_TAG, &dest); + MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -579,7 +587,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, MLX5_FS_ETH_FLOW_TAG, &dest); + MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -589,7 +597,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) rule_p = &priv->fts.main_vxlan_rule[MLX5E_TT_ANY]; dest.tir_num = tirn[MLX5E_TT_ANY]; *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, MLX5_FS_ETH_FLOW_TAG, &dest); + MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -686,6 +694,10 @@ mlx5e_add_vlan_rule_sub(struct mlx5e_priv *priv, u8 mc_enable = 0; struct mlx5_flow_rule **rule_p; int err = 0; + struct mlx5_flow_act flow_act = { + .actions = MLX5_FLOW_ACT_ACTIONS_FLOW_TAG, + .flow_tag = MLX5_FS_ETH_FLOW_TAG, + }; dest.type = MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE; dest.ft = priv->fts.vxlan.t; @@ -719,7 +731,7 @@ mlx5e_add_vlan_rule_sub(struct mlx5e_priv *priv, *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, - MLX5_FS_ETH_FLOW_TAG, + &flow_act, &dest); if (IS_ERR(*rule_p)) { @@ -1679,6 +1691,10 @@ mlx5e_add_vxlan_rule_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv, u8 mc_enable; struct mlx5_flow_rule **rule_p; int err = 0; + struct mlx5_flow_act flow_act = { + .actions = MLX5_FLOW_ACT_ACTIONS_FLOW_TAG, + .flow_tag = MLX5_FS_ETH_FLOW_TAG, + }; dest.type = MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE; dest.ft = priv->fts.main_vxlan.t; @@ -1693,7 +1709,7 @@ mlx5e_add_vxlan_rule_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv, MLX5_SET(fte_match_param, mv, outer_headers.udp_dport, el->port); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, MLX5_FS_ETH_FLOW_TAG, &dest); + MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); if (IS_ERR(*rule_p)) { err = PTR_ERR(*rule_p); @@ -1809,13 +1825,17 @@ mlx5e_add_vxlan_catchall_rule_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) u8 mc_enable = 0; struct mlx5_flow_rule **rule_p; int err = 0; + struct mlx5_flow_act flow_act = { + .actions = MLX5_FLOW_ACT_ACTIONS_FLOW_TAG, + .flow_tag = MLX5_FS_ETH_FLOW_TAG, + }; dest.type = MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE; dest.ft = priv->fts.main.t; rule_p = &priv->fts.vxlan_catchall_ft_rule; *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, MLX5_FS_ETH_FLOW_TAG, &dest); + MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); if (IS_ERR(*rule_p)) { err = PTR_ERR(*rule_p); diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c index 1b02c8741a56..dc5396d348c5 100644 --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c @@ -2180,6 +2180,10 @@ static struct mlx5_ib_flow_handler *create_flow_rule(struct mlx5_ib_dev *dev, struct mlx5_flow_spec *spec; const void *ib_flow = (const void *)flow_attr + sizeof(*flow_attr); unsigned int spec_index; + struct mlx5_flow_act flow_act = { + .actions = MLX5_FLOW_ACT_ACTIONS_FLOW_TAG, + .flow_tag = MLX5_FS_DEFAULT_FLOW_TAG, + }; u32 action; int err = 0; @@ -2211,7 +2215,7 @@ static struct mlx5_ib_flow_handler *create_flow_rule(struct mlx5_ib_dev *dev, spec->match_criteria, spec->match_value, action, - MLX5_FS_DEFAULT_FLOW_TAG, + &flow_act, dst); if (IS_ERR(handler->rule)) { From nobody Wed Nov 15 23:09:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVzPb2sRlz50ry3; Wed, 15 Nov 2023 23:09: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 4SVzPb1s5jz3N1y; Wed, 15 Nov 2023 23:09:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i8OrzAgWXtWSuoejGfjBOVnT9YwJmjtO37M8vT5KzdA=; b=YFK3zvh+/P7InzbFG+WDGDzVcgj7xLcvuhFcnRkHfvVoAohrvG29Xi0BCGhnPJTFpWhr+s hjgrIf86I+UgAuG4Kbx2h1Ztjy91Yc4Ja5wpr6h7TZj0S881+VkBfe5gnfFWaVzOOQZALJ WqFpgTYtYSTuz9HEBvltvFeteeFmBmnr98RMNE3oyL+jfSjOkeMjN7kXz5/McIgvZDVaan isa9euMLYITtROQNx6hp3bOV67jVkiPVDL1U349aYjaSzKzpz8rb/qirfqgej3Pou7zBO6 wExuSEZ6hd+yACj3gWTy1hMU384qdRX16BcRV6HgSm0S6frs64hU1dsM+p/sxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i8OrzAgWXtWSuoejGfjBOVnT9YwJmjtO37M8vT5KzdA=; b=gfK0omYfvRaSMfvPgT1bmcFgE1Ofk5QoJcPb6ewBu2ZvloLIykW/d7A9j20L9rrgdcg1RK Mb4DNzKAKCJ/u0RR/ZrU6Tv+apPgAI6S8ikSscfeowEbYGUvle2DmOcOFtGhDAWl1xCH9Q D0QcX4Tvfi0L4lARBB0JoJHhS+0QenwZAHzTaTGcKikmz8xZIvaHKJ6shTiy1xVWZxVfBj K/biLaFs1z0eCjv552pzFENCjEV8eSuOD/uYQnHoE3jEUZp4s9V1d0Bkhop0P/5jk/uMsG Ye/hKqMqC9ybxITuZHxlXMjMiDMIah974rS3Ln2Jl+ZhibTJ7681hgyoXtAcMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700089747; a=rsa-sha256; cv=none; b=Y+aA5W5Yi/3K+PB15eDqrPX8KiVgSVhuY6Z5jIFgq8/MLzCm/A89IZ5/KwlOg5/3PvO20a SFEEFAYVxADoeYBd2GVDp6m0579erioeM/v1S9UowuOAFwYWyng3X1oue8SsHYuAPimcno z1Dp0UkN2XCDqTcAHP/pDiPv/ADZkqSwTtYJUHCxYHSYl1rqItjYYfVu/rjFR6eQP/tp+u mPoXy0QSoNAVTHOSn5Ev3Zg/nTxYuVQZdJHw7kiq2gWVaLlVajFIE4e70U+xKOGLILaWsV ZsyuXzuxaJ/VP0SIUIXOwEj0Ldj2EMSdXz2swuOMHzqwpeRo8GgykxBAtjcNnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVzPb0Y0Jzbqg; Wed, 15 Nov 2023 23:09: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 3AFN96M9064650; Wed, 15 Nov 2023 23:09:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFN96fI064647; Wed, 15 Nov 2023 23:09:06 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:09:06 GMT Message-Id: <202311152309.3AFN96fI064647@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: 847542c60c2b - main - mlx5: Add modify header support to flow rules List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 847542c60c2b3d922d636cc36ce51714032f9825 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=847542c60c2b3d922d636cc36ce51714032f9825 commit 847542c60c2b3d922d636cc36ce51714032f9825 Author: Mark Bloch AuthorDate: 2023-02-19 11:15:00 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-15 23:08:16 +0000 mlx5: Add modify header support to flow rules Allow attaching a modify header to a flow rule. Signed-off-by: Mark Bloch Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/fs.h | 2 ++ sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c | 9 ++++++++- sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c | 4 ++++ sys/dev/mlx5/mlx5_ifc.h | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/sys/dev/mlx5/fs.h b/sys/dev/mlx5/fs.h index 7ed7a5380cf1..bb087718d12f 100644 --- a/sys/dev/mlx5/fs.h +++ b/sys/dev/mlx5/fs.h @@ -84,11 +84,13 @@ struct mlx5_flow_destination { enum mlx5_flow_act_actions { MLX5_FLOW_ACT_ACTIONS_FLOW_TAG = 1 << 0, + MLX5_FLOW_ACT_ACTIONS_MODIFY_HDR = 1 << 1, }; struct mlx5_flow_act { u32 actions; /* See enum mlx5_flow_act_actions */ u32 flow_tag; + struct mlx5_modify_hdr *modify_hdr; }; #define FT_NAME_STR_SZ 20 diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c index 5ac0c95c7bca..22bc945a4b62 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c @@ -179,10 +179,12 @@ int mlx5_cmd_fs_set_fte(struct mlx5_core_dev *dev, int opmod = 0; int modify_mask = 0; int atomic_mod_cap; + u32 prm_action = 0; if (action != MLX5_FLOW_CONTEXT_ACTION_FWD_DEST) dest_size = 0; + prm_action = action; inlen = MLX5_ST_SZ_BYTES(set_fte_in) + dest_size * MLX5_ST_SZ_BYTES(dest_format_struct); @@ -221,7 +223,11 @@ int mlx5_cmd_fs_set_fte(struct mlx5_core_dev *dev, MLX5_SET(flow_context, in_flow_context, group_id, group_id); if (flow_act->actions & MLX5_FLOW_ACT_ACTIONS_FLOW_TAG) MLX5_SET(flow_context, in_flow_context, flow_tag, flow_act->flow_tag); - MLX5_SET(flow_context, in_flow_context, action, action); + if (flow_act->actions & MLX5_FLOW_ACT_ACTIONS_MODIFY_HDR) { + MLX5_SET(flow_context, in_flow_context, modify_header_id, + flow_act->modify_hdr->id); + prm_action |= MLX5_FLOW_CONTEXT_ACTION_MOD_HDR; + } MLX5_SET(flow_context, in_flow_context, destination_list_size, dest_size); in_match_value = MLX5_ADDR_OF(flow_context, in_flow_context, @@ -244,6 +250,7 @@ int mlx5_cmd_fs_set_fte(struct mlx5_core_dev *dev, } } + MLX5_SET(flow_context, in_flow_context, action, prm_action); err = mlx5_cmd_exec(dev, in, inlen, out, sizeof(out)); if (!err) *fte_status |= FS_FTE_STATUS_EXISTING; diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c index 8e203a9662bb..7c3eb1e86d6d 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c @@ -1760,6 +1760,10 @@ static bool check_conflicting_actions(const struct mlx5_flow_act *act1, act1->flow_tag != act2->flow_tag) return true; + /* Can even have complex actions in merged rules */ + if (action1 & MLX5_FLOW_ACT_ACTIONS_MODIFY_HDR) + return true; + return false; } diff --git a/sys/dev/mlx5/mlx5_ifc.h b/sys/dev/mlx5/mlx5_ifc.h index 340e3b2e2d03..9534ac3d1c94 100644 --- a/sys/dev/mlx5/mlx5_ifc.h +++ b/sys/dev/mlx5/mlx5_ifc.h @@ -2264,6 +2264,7 @@ enum { MLX5_FLOW_CONTEXT_ACTION_DROP = 0x2, MLX5_FLOW_CONTEXT_ACTION_FWD_DEST = 0x4, MLX5_FLOW_CONTEXT_ACTION_COUNT = 0x8, + MLX5_FLOW_CONTEXT_ACTION_MOD_HDR = 0x40, }; struct mlx5_ifc_flow_context_bits { From nobody Wed Nov 15 23:09:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVzPc3xrnz50rtp; Wed, 15 Nov 2023 23:09: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 4SVzPc31Jgz3N07; Wed, 15 Nov 2023 23:09:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uwodbp8diYyqxeANDUTJDR0NpDoCcTVlCgaySIK07YI=; b=GYQs/6hC5C9Nib40eapjDKV9E4j4QKV4WPOJro+EPNDsWGEd1enIHKYvYp3ZlmilWQF2yM jmh89vkWm5ea2KRDHCB3+ECF517SPoR8QUshvVeTnaHmKrBpeOeDVYYcmaqFIUV6dhNZ55 EXHZLcTFrQIhmSsSo3ujJg08UI3Ct/HlUtvQbr03J6Z+8bUlh8xzkNx4oDzaIJVehIZfIw +oWYlx6JLmtpd6+mAehAZRNYKwaqXlX62c982M+vXoYURTvizzA4+BM+gAZYZ1nRln97ZE Mbizag4rVziuxct3NfkrI58sXlCEtdjA0JfhSopnX+xyoxHERC5a/+sJmYXx4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uwodbp8diYyqxeANDUTJDR0NpDoCcTVlCgaySIK07YI=; b=R0Sg9zhWYp00ZY5CImsKMN2q5JajUpHUyy6uHqW67Z+TfWiYRq0iby4SlXwqDbTQcgcCfo xq0P040nPztHXanRoSIVmVvoWCOPxh6+Ggp0WxevZeFke5eisiyRn3XbRml/FQ2AN9pN7V eTPeuvzV1aWiVeQROgXEE5avvQMjffn3FFSe2vTUnIqrN0J575vG9aMzgO2lpG4JT8vmcc MM3lBBTyPPoIwboyMsAFTLcqUyk0LYY+GWFWKBr2J7eXAfNAhkor4xW8m3zxAjuBgfIWtd vAbyAIDDt9lOYgrh2vehci19ltslSmL+p5CQQ0PH2HdPCScCbf3y2wsDPzS+Dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700089748; a=rsa-sha256; cv=none; b=fVTNnzkrqJRFvK5zLWeBOZUfdmvZFokjaG8n0AlB7VR3cT9iYOIRM/o5bKO91tnWSRbSfO 9qh759kXWMZhGuQT6+edL5blKZzxNT3SFze41Y73rMT4kD0DTY7WYxJNflDc+oRPtyllE8 VPMv/Q8e125Fa9FfczMNStA65hqHYzq78xLr/NGW8uGMRgUndlqRiE2vSf8aVjIp4wMAsr FyI34t6saRmXTu5CS7lXhoWYMJsorVIk7EKWIyCLJCbTO0SHQSoWT2JaeJ5u8Ar3Br9NMH BMzr8WO+X17JHIkwLo/FuqGOcEZ8yOogKV0kvZTr7mTY4mY8H9nZ5xxybDCTAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVzPc1XvwzbK7; Wed, 15 Nov 2023 23:09: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 3AFN9808064708; Wed, 15 Nov 2023 23:09:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFN98kT064705; Wed, 15 Nov 2023 23:09:08 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:09:08 GMT Message-Id: <202311152309.3AFN98kT064705@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: 45e2e55df665 - main - mlx5: Add packet reformat support to flow rules List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 45e2e55df665c9b5749c9f2269d1b804147917eb Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=45e2e55df665c9b5749c9f2269d1b804147917eb commit 45e2e55df665c9b5749c9f2269d1b804147917eb Author: Mark Bloch AuthorDate: 2023-02-19 11:27:30 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-15 23:08:16 +0000 mlx5: Add packet reformat support to flow rules Allow attaching a packet reformat action to a flow rule. Signed-off-by: Mark Bloch Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/fs.h | 4 ++++ sys/dev/mlx5/mlx5_core/fs_core.h | 5 ++--- sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c | 13 ++++++++++--- sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c | 19 ++++++++++++------- sys/dev/mlx5/mlx5_ifc.h | 1 + 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/sys/dev/mlx5/fs.h b/sys/dev/mlx5/fs.h index bb087718d12f..58bdf19ccdab 100644 --- a/sys/dev/mlx5/fs.h +++ b/sys/dev/mlx5/fs.h @@ -50,6 +50,8 @@ enum { #define FS_MAX_TYPES 10 #define FS_MAX_ENTRIES 32000U +#define FS_REFORMAT_KEYWORD "_reformat" + enum mlx5_flow_namespace_type { MLX5_FLOW_NAMESPACE_BYPASS, MLX5_FLOW_NAMESPACE_OFFLOADS, @@ -85,12 +87,14 @@ struct mlx5_flow_destination { enum mlx5_flow_act_actions { MLX5_FLOW_ACT_ACTIONS_FLOW_TAG = 1 << 0, MLX5_FLOW_ACT_ACTIONS_MODIFY_HDR = 1 << 1, + MLX5_FLOW_ACT_ACTIONS_PACKET_REFORMAT = 1 << 2, }; struct mlx5_flow_act { u32 actions; /* See enum mlx5_flow_act_actions */ u32 flow_tag; struct mlx5_modify_hdr *modify_hdr; + struct mlx5_pkt_reformat *pkt_reformat; }; #define FT_NAME_STR_SZ 20 diff --git a/sys/dev/mlx5/mlx5_core/fs_core.h b/sys/dev/mlx5/mlx5_core/fs_core.h index 40c6cadf3223..34dacf1af253 100644 --- a/sys/dev/mlx5/mlx5_core/fs_core.h +++ b/sys/dev/mlx5/mlx5_core/fs_core.h @@ -264,9 +264,8 @@ void _fs_remove_node(struct kref *kref); &(fte)->dests) int mlx5_cmd_fs_create_ft(struct mlx5_core_dev *dev, - u16 vport, - enum fs_ft_type type, unsigned int level, - unsigned int log_size, unsigned int *table_id); + u16 vport, enum fs_ft_type type, unsigned int level, + unsigned int log_size, const char *name, unsigned int *table_id); int mlx5_cmd_fs_destroy_ft(struct mlx5_core_dev *dev, u16 vport, diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c index 22bc945a4b62..8c2708c504ee 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c @@ -54,9 +54,8 @@ int mlx5_cmd_update_root_ft(struct mlx5_core_dev *dev, } int mlx5_cmd_fs_create_ft(struct mlx5_core_dev *dev, - u16 vport, - enum fs_ft_type type, unsigned int level, - unsigned int log_size, unsigned int *table_id) + u16 vport, enum fs_ft_type type, unsigned int level, + unsigned int log_size, const char *name, unsigned int *table_id) { u32 in[MLX5_ST_SZ_DW(create_flow_table_in)] = {0}; u32 out[MLX5_ST_SZ_DW(create_flow_table_out)] = {0}; @@ -72,6 +71,9 @@ int mlx5_cmd_fs_create_ft(struct mlx5_core_dev *dev, MLX5_SET(create_flow_table_in, in, flow_table_context.level, level); MLX5_SET(create_flow_table_in, in, flow_table_context.log_size, log_size); + if (strstr(name, FS_REFORMAT_KEYWORD) != NULL) + MLX5_SET(create_flow_table_in, in, + flow_table_context.reformat_en, 1); if (vport) { MLX5_SET(create_flow_table_in, in, vport_number, vport); MLX5_SET(create_flow_table_in, in, other_vport, 1); @@ -228,6 +230,11 @@ int mlx5_cmd_fs_set_fte(struct mlx5_core_dev *dev, flow_act->modify_hdr->id); prm_action |= MLX5_FLOW_CONTEXT_ACTION_MOD_HDR; } + if (flow_act->actions & MLX5_FLOW_ACT_ACTIONS_PACKET_REFORMAT) { + MLX5_SET(flow_context, in_flow_context, packet_reformat_id, + flow_act->pkt_reformat->id); + prm_action |= MLX5_FLOW_CONTEXT_ACTION_PACKET_REFORMAT; + } MLX5_SET(flow_context, in_flow_context, destination_list_size, dest_size); in_match_value = MLX5_ADDR_OF(flow_context, in_flow_context, diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c index 7c3eb1e86d6d..55d7e69d6140 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c @@ -816,8 +816,14 @@ static struct mlx5_flow_table *_create_ft_common(struct mlx5_flow_namespace *ns, /*User isn't aware to those rules*/ ft->max_fte = ft_size - 2; log_table_sz = ilog2(ft_size); + + if (name == NULL || name[0] == '\0') { + snprintf(gen_name, sizeof(gen_name), "flow_table_%u", ft->id); + name = gen_name; + } + err = mlx5_cmd_fs_create_ft(root->dev, ft->vport, ft->type, - ft->level, log_table_sz, &ft->id); + ft->level, log_table_sz, name, &ft->id); if (err) goto free_ft; @@ -832,12 +838,8 @@ static struct mlx5_flow_table *_create_ft_common(struct mlx5_flow_namespace *ns, goto destroy_star_rule; } - if (!name || !strlen(name)) { - snprintf(gen_name, 20, "flow_table_%u", ft->id); - _fs_add_node(&ft->base, gen_name, &fs_prio->base); - } else { - _fs_add_node(&ft->base, name, &fs_prio->base); - } + _fs_add_node(&ft->base, name, &fs_prio->base); + list_add_tail(&ft->base.list, &fs_prio->objs); fs_prio->num_ft++; @@ -1764,6 +1766,9 @@ static bool check_conflicting_actions(const struct mlx5_flow_act *act1, if (action1 & MLX5_FLOW_ACT_ACTIONS_MODIFY_HDR) return true; + if (action1 & MLX5_FLOW_ACT_ACTIONS_PACKET_REFORMAT) + return true; + return false; } diff --git a/sys/dev/mlx5/mlx5_ifc.h b/sys/dev/mlx5/mlx5_ifc.h index 9534ac3d1c94..382d6c195ac9 100644 --- a/sys/dev/mlx5/mlx5_ifc.h +++ b/sys/dev/mlx5/mlx5_ifc.h @@ -2264,6 +2264,7 @@ enum { MLX5_FLOW_CONTEXT_ACTION_DROP = 0x2, MLX5_FLOW_CONTEXT_ACTION_FWD_DEST = 0x4, MLX5_FLOW_CONTEXT_ACTION_COUNT = 0x8, + MLX5_FLOW_CONTEXT_ACTION_PACKET_REFORMAT = 0x10, MLX5_FLOW_CONTEXT_ACTION_MOD_HDR = 0x40, }; From nobody Wed Nov 15 23:09:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVzPd5FvMz50s0n; Wed, 15 Nov 2023 23:09: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 4SVzPd3qdkz3Mp3; Wed, 15 Nov 2023 23:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VHg6mFiq39WNHRy+Ab9A6+oWn8iXWAUjaSVQRddx5Hw=; b=t33Dovw4x1DtQDuwiGGMzC4rfK8/RAexOK1KbxF0UWNbTnSZ+JdbHleoJwscS056tAFaVN 3c0bbaCA7uxSn39i3a2YTs4bxg2+FKi7e41v8DXRecqh0D9nVxcKmSc79/yXZoaoPZf8H5 Gnr/oeWquRuNWcnSMGIBMaeYX+ikrv6ZnK/8Exi3N1sl9e5FZ9kjgbw2hbJUrDFyJmGqep bRNDVrgoSo9teeHvOLfFCR1/gLsA2df6s224StCpvTlsrMv1ZqiEbOrZD18P5knUTFahhZ nrzKp0EbX9iX7MtdjuZDuJ/KRmhYKqgFNHYeFVasELPC4SA0kYGXLgt4uLuqRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VHg6mFiq39WNHRy+Ab9A6+oWn8iXWAUjaSVQRddx5Hw=; b=ioAAbXjjLBtX5Jr7+AVVHmBNPk0u10LafDbVxfSUcWmAGJ6I3cx/CfWkxsMtxA/hoXKicb XhCPhxRardW6gkIQiRi7/9Pqtvu2DV+mW+RfBAAHkMSlJH4Ms5mk1BSJKo7eTdPY7BJms2 0Z8W9WXnoMzRSNaGVEIyA7kT8YXRhAc+MkvmOQQAMR44i6FigevbHLOl/z6FAs+YciaIyw ZeujA6d7JTIvJLqn3uNQ79IhWWF0qPLXmnwQKPysTf1/VG/fdVg/zVn7yJ6U2BiJ93n5vc 8HNz5k/Ydd7VSwDsI+AzuVW40V4/zDKBqNJQjYKFGdphie//BQDjCPqBaiw53Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700089749; a=rsa-sha256; cv=none; b=GKjlQjod6U7vZMu8BgX806GGhtv2adCVlK1dPnV/bf4zTSqEjGMJ8Heu07/esjuQeKq2Uq TSH2QU8VQ1z3RDrEvMXyhjtdUFdjs5mk3peqVwoPqoa+1nAqWc8XD4WSlzfzaut7DmHteh akKKpsqIglUSg3Xp9VYk4pJYMmdSLv37E74tGil/fNCPVykVyZ8fyfzEjaKmbDw2Dvnw4m on+yJ9+2wIKhJmgefAgkiJSjPMjiZnYE9b2q9n0D17DDnBpSB+QsOyimtiH7kew4Wn/eg3 tTwhl9g1f+cj2YnCxwZtoFPGTrgXGkjnA9s6kO8wGACf+mE4i1D2+d/i8aeGLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVzPd2KMyzbK8; Wed, 15 Nov 2023 23:09: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 3AFN99o6064762; Wed, 15 Nov 2023 23:09:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFN99xF064759; Wed, 15 Nov 2023 23:09:09 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:09:09 GMT Message-Id: <202311152309.3AFN99xF064759@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: 76ed99ed8ad2 - main - mlx5: Use software enum in APIs instead of PRM List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 76ed99ed8ad259792fea752461e2cd1ed481e8e1 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=76ed99ed8ad259792fea752461e2cd1ed481e8e1 commit 76ed99ed8ad259792fea752461e2cd1ed481e8e1 Author: Mark Bloch AuthorDate: 2023-02-19 12:25:10 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-15 23:08:16 +0000 mlx5: Use software enum in APIs instead of PRM Users of the steering APIs shouldn't use the PRM directly. Create an software enum to be used instead. Signed-off-by: Mark Bloch Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/fs.h | 8 ++++- sys/dev/mlx5/mlx5_core/fs_core.h | 4 +-- sys/dev/mlx5/mlx5_core/mlx5_eswitch.c | 8 ++--- sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c | 14 +++++++-- sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c | 4 +-- sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c | 32 ++++++++++---------- sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c | 50 +++++++++++++++---------------- sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c | 3 +- 8 files changed, 68 insertions(+), 55 deletions(-) diff --git a/sys/dev/mlx5/fs.h b/sys/dev/mlx5/fs.h index 58bdf19ccdab..da1a469d333c 100644 --- a/sys/dev/mlx5/fs.h +++ b/sys/dev/mlx5/fs.h @@ -43,6 +43,12 @@ enum { MLX5_FS_SNIFFER_FLOW_TAG = 0xFFFFFD, }; +enum mlx5_rule_fwd_action { + MLX5_FLOW_RULE_FWD_ACTION_ALLOW = 0x1, + MLX5_FLOW_RULE_FWD_ACTION_DROP = 0x2, + MLX5_FLOW_RULE_FWD_ACTION_DEST = 0x4, +}; + enum { MLX5_FS_FLOW_TAG_MASK = 0xFFFFFF, }; @@ -168,7 +174,7 @@ mlx5_add_flow_rule(struct mlx5_flow_table *ft, u8 match_criteria_enable, u32 *match_criteria, u32 *match_value, - u32 action, + u32 sw_action, struct mlx5_flow_act *flow_act, struct mlx5_flow_destination *dest); void mlx5_del_flow_rule(struct mlx5_flow_rule **); diff --git a/sys/dev/mlx5/mlx5_core/fs_core.h b/sys/dev/mlx5/mlx5_core/fs_core.h index 34dacf1af253..3eae7868833f 100644 --- a/sys/dev/mlx5/mlx5_core/fs_core.h +++ b/sys/dev/mlx5/mlx5_core/fs_core.h @@ -81,7 +81,7 @@ struct fs_fte { struct list_head dests; uint32_t index; /* index in ft */ struct mlx5_flow_act flow_act; - u8 action; /* MLX5_FLOW_CONTEXT_ACTION */ + u32 sw_action; /* enum mlx5_rule_fwd_action */ enum fs_fte_status status; }; @@ -290,7 +290,7 @@ int mlx5_cmd_fs_set_fte(struct mlx5_core_dev *dev, enum fs_ft_type type, unsigned int table_id, unsigned int index, unsigned int group_id, struct mlx5_flow_act *flow_act, - unsigned short action, int dest_size, + u32 sw_action, int dest_size, struct list_head *dests); /* mlx5_flow_desination */ int mlx5_cmd_fs_delete_fte(struct mlx5_core_dev *dev, diff --git a/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c b/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c index 9f9350e0260b..15f5f0ff0336 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c @@ -253,7 +253,7 @@ esw_fdb_set_vport_rule(struct mlx5_eswitch *esw, u8 mac[ETH_ALEN], u32 vport) match_header, match_c, match_v, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(flow_rule)) { printf("mlx5_core: WARN: ""FDB: Failed to add flow rule: dmac_v(%pM) dmac_c(%pM) -> vport(%d), err(%ld)\n", dmac_v, dmac_c, vport, PTR_ERR(flow_rule)); @@ -825,7 +825,7 @@ static int esw_vport_ingress_config(struct mlx5_eswitch *esw, MLX5_MATCH_OUTER_HEADERS, match_c, match_v, - MLX5_FLOW_CONTEXT_ACTION_DROP, + MLX5_FLOW_RULE_FWD_ACTION_DROP, &flow_act, &dest); if (IS_ERR_OR_NULL(vport->ingress.drop_rule)) { err = PTR_ERR(vport->ingress.drop_rule); @@ -885,7 +885,7 @@ static int esw_vport_egress_config(struct mlx5_eswitch *esw, MLX5_MATCH_OUTER_HEADERS, match_c, match_v, - MLX5_FLOW_CONTEXT_ACTION_ALLOW, + MLX5_FLOW_RULE_FWD_ACTION_ALLOW, &flow_act, &dest); if (IS_ERR_OR_NULL(vport->egress.allowed_vlan)) { err = PTR_ERR(vport->egress.allowed_vlan); @@ -902,7 +902,7 @@ static int esw_vport_egress_config(struct mlx5_eswitch *esw, 0, match_c, match_v, - MLX5_FLOW_CONTEXT_ACTION_DROP, + MLX5_FLOW_RULE_FWD_ACTION_DROP, &flow_act, &dest); if (IS_ERR_OR_NULL(vport->egress.drop_rule)) { err = PTR_ERR(vport->egress.drop_rule); diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c index 8c2708c504ee..8032d1a632e5 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c @@ -167,7 +167,7 @@ int mlx5_cmd_fs_set_fte(struct mlx5_core_dev *dev, enum fs_ft_type type, unsigned int table_id, unsigned int index, unsigned int group_id, struct mlx5_flow_act *flow_act, - unsigned short action, int dest_size, + u32 sw_action, int dest_size, struct list_head *dests) /* mlx5_flow_desination */ { u32 out[MLX5_ST_SZ_DW(set_fte_out)] = {0}; @@ -183,10 +183,18 @@ int mlx5_cmd_fs_set_fte(struct mlx5_core_dev *dev, int atomic_mod_cap; u32 prm_action = 0; - if (action != MLX5_FLOW_CONTEXT_ACTION_FWD_DEST) + if (sw_action != MLX5_FLOW_RULE_FWD_ACTION_DEST) dest_size = 0; - prm_action = action; + if (sw_action & MLX5_FLOW_RULE_FWD_ACTION_ALLOW) + prm_action |= MLX5_FLOW_CONTEXT_ACTION_ALLOW; + + if (sw_action & MLX5_FLOW_RULE_FWD_ACTION_DROP) + prm_action |= MLX5_FLOW_CONTEXT_ACTION_DROP; + + if (sw_action & MLX5_FLOW_RULE_FWD_ACTION_DEST) + prm_action |= MLX5_FLOW_CONTEXT_ACTION_FWD_DEST; + inlen = MLX5_ST_SZ_BYTES(set_fte_in) + dest_size * MLX5_ST_SZ_BYTES(dest_format_struct); diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c index 69df9ecba210..d7d63d7932a1 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c @@ -164,7 +164,7 @@ mlx5e_accel_fs_add_inpcb(struct mlx5e_priv *priv, flow = mlx5_add_flow_rule(ft->t, spec->match_criteria_enable, spec->match_criteria, spec->match_value, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); out: @@ -200,7 +200,7 @@ accel_fs_tcp_add_default_rule(struct mlx5e_priv *priv, int type) priv->fts.vlan.t : fs_tcp->tables[type + 1].t; rule = mlx5_add_flow_rule(fs_tcp->tables[type].t, 0, match_criteria, match_value, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR(rule)) return (PTR_ERR(rule)); diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c index 55d7e69d6140..60353e4b3d5b 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c @@ -302,7 +302,7 @@ static void fs_remove_node_parent_locked(struct fs_base *node) kfree(node); } -static struct fs_fte *fs_alloc_fte(u8 action, +static struct fs_fte *fs_alloc_fte(u32 sw_action, struct mlx5_flow_act *flow_act, u32 *match_value, unsigned int index) @@ -320,7 +320,7 @@ static struct fs_fte *fs_alloc_fte(u8 action, fte->index = index; INIT_LIST_HEAD(&fte->dests); fte->flow_act = *flow_act; - fte->action = action; + fte->sw_action = sw_action; return fte; } @@ -341,7 +341,7 @@ static struct fs_fte *alloc_star_ft_entry(struct mlx5_flow_table *ft, if (fg->num_ftes == fg->max_ftes) return ERR_PTR(-ENOSPC); - fte = fs_alloc_fte(MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, + fte = fs_alloc_fte(MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, match_value, index); if (IS_ERR(fte)) return fte; @@ -447,7 +447,7 @@ static int fs_set_star_rule(struct mlx5_core_dev *dev, src_ft->id, src_fte->index, src_ft->star_rule.fg->id, &src_fte->flow_act, - src_fte->action, + src_fte->sw_action, src_fte->dests_size, &src_fte->dests); if (err) @@ -1590,7 +1590,7 @@ static struct mlx5_flow_rule *_fs_add_dst_fte(struct fs_fte *fte, &fte->status, fte->val, ft->type, ft->id, fte->index, fg->id, &fte->flow_act, - fte->action, fte->dests_size, &fte->dests); + fte->sw_action, fte->dests_size, &fte->dests); if (err) goto free_dst; @@ -1652,7 +1652,7 @@ static unsigned int fs_get_free_fg_index(struct mlx5_flow_group *fg, static struct fs_fte *fs_create_fte(struct mlx5_flow_group *fg, u32 *match_value, - u8 action, + u32 sw_action, struct mlx5_flow_act *flow_act, struct list_head **prev) { @@ -1660,7 +1660,7 @@ static struct fs_fte *fs_create_fte(struct mlx5_flow_group *fg, int index = 0; index = fs_get_free_fg_index(fg, prev); - fte = fs_alloc_fte(action, flow_act, match_value, index); + fte = fs_alloc_fte(sw_action, flow_act, match_value, index); if (IS_ERR(fte)) return fte; @@ -1710,7 +1710,7 @@ static void fs_del_dst(struct mlx5_flow_rule *dst) err = mlx5_cmd_fs_set_fte(dev, ft->vport, &fte->status, match_value, ft->type, ft->id, fte->index, fg->id, - &fte->flow_act, fte->action, + &fte->flow_act, fte->sw_action, fte->dests_size, &fte->dests); if (err) { mlx5_core_warn(dev, "%s can't delete dst %s\n", @@ -1776,7 +1776,7 @@ static bool check_conflicting_actions(const struct mlx5_flow_act *act1, /* Add dst algorithm */ static struct mlx5_flow_rule *fs_add_dst_fg(struct mlx5_flow_group *fg, u32 *match_value, - u8 action, + u32 sw_action, struct mlx5_flow_act *flow_act, struct mlx5_flow_destination *dest) { @@ -1791,7 +1791,7 @@ static struct mlx5_flow_rule *fs_add_dst_fg(struct mlx5_flow_group *fg, /* TODO: Check of size against PRM max size */ mutex_lock(&fte->base.lock); if (fs_match_exact_val(&fg->mask, match_value, &fte->val) && - action == fte->action && + sw_action == fte->sw_action && !check_conflicting_actions(flow_act, &fte->flow_act)) { dst = _fs_add_dst_fte(fte, fg, dest); mutex_unlock(&fte->base.lock); @@ -1808,7 +1808,7 @@ static struct mlx5_flow_rule *fs_add_dst_fg(struct mlx5_flow_group *fg, goto unlock_fg; } - fte = fs_create_fte(fg, match_value, action, flow_act, &prev); + fte = fs_create_fte(fg, match_value, sw_action, flow_act, &prev); if (IS_ERR(fte)) { dst = (void *)fte; goto unlock_fg; @@ -1836,7 +1836,7 @@ static struct mlx5_flow_rule *fs_add_dst_ft(struct mlx5_flow_table *ft, u8 match_criteria_enable, u32 *match_criteria, u32 *match_value, - u8 action, + u32 sw_action, struct mlx5_flow_act *flow_act, struct mlx5_flow_destination *dest) { @@ -1853,7 +1853,7 @@ static struct mlx5_flow_rule *fs_add_dst_ft(struct mlx5_flow_table *ft, match_criteria)) { mutex_unlock(&ft->base.lock); - dst = fs_add_dst_fg(g, match_value, action, flow_act, dest); + dst = fs_add_dst_fg(g, match_value, sw_action, flow_act, dest); if (PTR_ERR(dst) && PTR_ERR(dst) != -ENOSPC) goto unlock; } @@ -1866,7 +1866,7 @@ static struct mlx5_flow_rule *fs_add_dst_ft(struct mlx5_flow_table *ft, } dst = fs_add_dst_fg(g, match_value, - action, flow_act, dest); + sw_action, flow_act, dest); if (IS_ERR(dst)) { /* Remove assumes refcount > 0 and autogroup creates a group * with a refcount = 0. @@ -1886,7 +1886,7 @@ mlx5_add_flow_rule(struct mlx5_flow_table *ft, u8 match_criteria_enable, u32 *match_criteria, u32 *match_value, - u32 action, + u32 sw_action, struct mlx5_flow_act *flow_act, struct mlx5_flow_destination *dest) { @@ -1897,7 +1897,7 @@ mlx5_add_flow_rule(struct mlx5_flow_table *ft, if (ns) down_read(&ns->dests_rw_sem); dst = fs_add_dst_ft(ft, match_criteria_enable, match_criteria, - match_value, action, flow_act, dest); + match_value, sw_action, flow_act, dest); if (ns) up_read(&ns->dests_rw_sem); diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c index cb23b80deae4..4939deb4c122 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c @@ -293,7 +293,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, rule_p = &ai->ft_rule[MLX5E_TT_ANY]; dest.tir_num = tirn[MLX5E_TT_ANY]; *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -308,7 +308,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_SET(fte_match_param, mv, outer_headers.ethertype, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -320,7 +320,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_SET(fte_match_param, mv, outer_headers.ethertype, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -335,7 +335,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_SET(fte_match_param, mv, outer_headers.ethertype, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -347,7 +347,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_SET(fte_match_param, mv, outer_headers.ethertype, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -361,7 +361,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_SET(fte_match_param, mv, outer_headers.ethertype, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -373,7 +373,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_SET(fte_match_param, mv, outer_headers.ethertype, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -387,7 +387,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_SET(fte_match_param, mv, outer_headers.ethertype, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -399,7 +399,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_SET(fte_match_param, mv, outer_headers.ethertype, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -413,7 +413,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_SET(fte_match_param, mv, outer_headers.ethertype, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -425,7 +425,7 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_SET(fte_match_param, mv, outer_headers.ethertype, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -505,7 +505,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV4]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -513,7 +513,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV6]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -524,7 +524,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV4_UDP]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -532,7 +532,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV6_UDP]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -542,7 +542,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV4_TCP]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -550,7 +550,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV6_TCP]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -560,7 +560,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV4_IPSEC_AH]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -568,7 +568,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV6_IPSEC_AH]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -578,7 +578,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) dest.tir_num = tirn[MLX5E_TT_IPV4_IPSEC_ESP]; MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IP); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -587,7 +587,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) MLX5_SET(fte_match_param, mv, inner_headers.ethertype, ETHERTYPE_IPV6); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -597,7 +597,7 @@ mlx5e_add_main_vxlan_rules_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) rule_p = &priv->fts.main_vxlan_rule[MLX5E_TT_ANY]; dest.tir_num = tirn[MLX5E_TT_ANY]; *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; @@ -730,7 +730,7 @@ mlx5e_add_vlan_rule_sub(struct mlx5e_priv *priv, } *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); @@ -1709,7 +1709,7 @@ mlx5e_add_vxlan_rule_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv, MLX5_SET(fte_match_param, mv, outer_headers.udp_dport, el->port); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR(*rule_p)) { err = PTR_ERR(*rule_p); @@ -1835,7 +1835,7 @@ mlx5e_add_vxlan_catchall_rule_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv) rule_p = &priv->fts.vxlan_catchall_ft_rule; *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, &flow_act, &dest); + MLX5_FLOW_RULE_FWD_ACTION_DEST, &flow_act, &dest); if (IS_ERR(*rule_p)) { err = PTR_ERR(*rule_p); diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c index dc5396d348c5..b4c9115bc420 100644 --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c @@ -2209,8 +2209,7 @@ static struct mlx5_ib_flow_handler *create_flow_rule(struct mlx5_ib_dev *dev, } spec->match_criteria_enable = get_match_criteria_enable(spec->match_criteria); - action = dst ? MLX5_FLOW_CONTEXT_ACTION_FWD_DEST : - MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO; + action = dst ? MLX5_FLOW_RULE_FWD_ACTION_DEST : 0; handler->rule = mlx5_add_flow_rule(ft, spec->match_criteria_enable, spec->match_criteria, spec->match_value, From nobody Wed Nov 15 23:09:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVzPg04Zjz50ryF; Wed, 15 Nov 2023 23:09: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 4SVzPf4H9lz3N9P; Wed, 15 Nov 2023 23:09:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xlh0Ce9/uDN1PlZKDNkB3ZAh0yM40gxDXaoBOTfiSd4=; b=IxLC0r3b3YFMBi+GDBSHCGkzFuXNIhlzR4vLTQbwK1LssWhq990XCp/Ar8UY6pNOqUORSa SAiDVkkIJBHTxf5ly6c4jjrVyD85wsLdc0OhPw7cNlHPKxyLq82QnTcoAMh6eP3D9fwTCB OfuF6P118SVF+6OZTixaLMmYD6N8MqQcna7ApaJCPixoTUsDaTrhKFJSO2adz19lPNbF5K zYqR3xc4wJBQXYEzmBOGEFqHj7eNRg3vWm7aHcRJ64i0lzC3A+QxtHaLe/xyWen3sfhvio gc4lUSGT29fyK1WPPdYwxXypZlquW7fg0e7edWMCXpWE94S7ee5Zsx3499R/EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xlh0Ce9/uDN1PlZKDNkB3ZAh0yM40gxDXaoBOTfiSd4=; b=aujgl+TUF3n8x8QkfNQyOkyoubVy/wnQ23RNgVj+wDBO3Hpg7F1FwHL04G6G0E4YyB3Jl6 8Ca6iLaVkbsg5Ley7lgEIo2efp2aYrCN/tIeEF97Vteu7zzjyKznBxM+6gIcEfNBdZ6Ua9 vGyvrEUgImaHibOGNciHKBeaRVf1dqNRd8kztCARbjFPIuRv+faozUc2AncjBdHZwMEZsw EdjTgeGjhWZS0qcGgXGB1+Ay4fT/7NpfufiYkwFwmuRiJ4daPOp5/Dc+89RNm4tt4rnAvm z5xS7uH1f1GcOGofCaLZe2XFjzKVi959ctvJqx0hVf//OAsSgwuMlxUkMD4agQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700089750; a=rsa-sha256; cv=none; b=J8dwsLg2EZhmTV+K6QGFxC7xuF58G3vF6gMsLAJhVKihaeKc0nUn69nvILVJyN3LHq/DmJ /qBofNCyqEepWwNB+QwcPEIJpXkfet1QJJKXAkC9qwD1OvDtheybziR5Vbd+bI8iJdebkB mTGIu23MKOwJic74tRE1L3nC3xZgEY7Uco5naZ5CrcMoyE/6HTri0DAO7TrYtPINOvtdMT UIumlcceplWTCQFhqOGL/fZVjsjXi8qkgeyBqKDTOdJNGAjYmii07kkFDtxCKwMqQIatem Jfae+36XcktwNEV/V/klTH4MAQGAit8jcxoZK/X5f3EqEdJK0/gxwLEtwvkD5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVzPf3Ln5zbK9; Wed, 15 Nov 2023 23:09: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 3AFN9AG2064807; Wed, 15 Nov 2023 23:09:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFN9AcW064804; Wed, 15 Nov 2023 23:09:10 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:09:10 GMT Message-Id: <202311152309.3AFN9AcW064804@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: 04db54fe4309 - main - net/mlx5: Fix auto group size calculation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 04db54fe4309e896c4c80baadbcc47b171722027 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=04db54fe4309e896c4c80baadbcc47b171722027 commit 04db54fe4309e896c4c80baadbcc47b171722027 Author: Mark Bloch AuthorDate: 2023-02-19 14:05:16 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-15 23:08:16 +0000 net/mlx5: Fix auto group size calculation Once all the large flow groups (defined by the user when the flow table is created - max_num_groups) were created, then all the following new flow groups will have only one flow table entry, even though the flow table has place to larger groups. Fix the condition to prefer large flow group. Upstream Linux commit: 97fd8da281f80e7e69e0114bc906575734d4dfaf Signed-off-by: Mark Bloch Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/mlx5_core/fs_core.h | 1 + sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/dev/mlx5/mlx5_core/fs_core.h b/sys/dev/mlx5/mlx5_core/fs_core.h index 3eae7868833f..dc619fc2d2db 100644 --- a/sys/dev/mlx5/mlx5_core/fs_core.h +++ b/sys/dev/mlx5/mlx5_core/fs_core.h @@ -97,6 +97,7 @@ struct mlx5_flow_table { struct { bool active; unsigned int max_types; + unsigned int group_size; unsigned int num_types; } autogroup; unsigned int max_fte; diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c index 60353e4b3d5b..b59373d48730 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c @@ -918,6 +918,9 @@ struct mlx5_flow_table *mlx5_create_auto_grouped_flow_table(struct mlx5_flow_nam ft->autogroup.active = true; ft->autogroup.max_types = max_num_groups; + /* We save place for flow groups in addition to max types */ + ft->autogroup.group_size = ft->max_fte / (max_num_groups + 1); + if (is_shared_prio) ft->shared_refcount = 1; @@ -1066,6 +1069,7 @@ static struct mlx5_flow_group *fs_create_fg(struct mlx5_core_dev *dev, int refcount) { struct mlx5_flow_group *fg; + unsigned int group_size; int err; char name[20]; @@ -1073,6 +1077,8 @@ static struct mlx5_flow_group *fs_create_fg(struct mlx5_core_dev *dev, if (IS_ERR(fg)) return fg; + group_size = MLX5_GET(create_flow_group_in, fg_in, end_flow_index) - + MLX5_GET(create_flow_group_in, fg_in, start_flow_index) + 1; err = mlx5_cmd_fs_create_fg(dev, fg_in, ft->vport, ft->type, ft->id, &fg->id); @@ -1080,7 +1086,8 @@ static struct mlx5_flow_group *fs_create_fg(struct mlx5_core_dev *dev, goto free_fg; mutex_lock(&ft->base.lock); - if (ft->autogroup.active) + + if (ft->autogroup.active && group_size == ft->autogroup.group_size) ft->autogroup.num_types++; snprintf(name, sizeof(name), "group_%u", fg->id); @@ -1125,7 +1132,7 @@ static void fs_del_fg(struct mlx5_flow_group *fg) dev = fs_get_dev(&parent_ft->base); WARN_ON(!dev); - if (parent_ft->autogroup.active) + if (parent_ft->autogroup.active && fg->max_ftes == parent_ft->autogroup.group_size) parent_ft->autogroup.num_types--; if (mlx5_cmd_fs_destroy_fg(dev, parent_ft->vport, @@ -1432,7 +1439,7 @@ static struct mlx5_flow_group *create_autogroup(struct mlx5_flow_table *ft, if (ft->autogroup.num_types < ft->autogroup.max_types) - group_size = ft->max_fte / (ft->autogroup.max_types + 1); + group_size = ft->autogroup.group_size; else group_size = 1; From nobody Wed Nov 15 23:09:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVzPg6btsz50rr7; Wed, 15 Nov 2023 23:09: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 4SVzPg4rQ3z3N3H; Wed, 15 Nov 2023 23:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Fg1nOdKho+hfxyxWUbEwS8UFfpgTEOO+nxMVKpukaM=; b=xjJGpDmAgJjXbMFboM58dP97Vp1V+0RfZIX9lobXOWhGqFWzm91Y2kVTO9tk3lFXtmxP/f a0BpDv1Wj3ZRoAH4X8Zx05ItuScLvYTy6V1ZawnQzYbBKGVVyqBaWZmOBYgPLye2Cc96PR 9+BohHC3Ux/2CLE70VAD3/yQaSoWyfE9x+6BUbCWgAWL7sKF+7sMwNIAPnZeTFevd6Tels kA449XFOLAPFaw8SPxy7Jf5AjfvxUmL0vB/BKaLmHtyTLHF+YqledicFQQwTgWLdEx3Qpt WVBwg97juyl1bFh2S10AxELDD50dbEQolHGYuFdqjM+Cyf27vqZzoE8k2AByzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Fg1nOdKho+hfxyxWUbEwS8UFfpgTEOO+nxMVKpukaM=; b=Sy7VqDyjGMrxsNAFpzq699glMPpODB5ypNC84/ZS7+kG/OaTKup9s1DLGHFgRHpKc/j+xZ GfQTuAVssX7sd+xdACLK8DAULhFnRU8tooGQVRJJ5/EZko3eVsnVXX0sffSRfVbJ9s6aGn u1pV0u8CIa3bmuDrB/vthHsRxCiL0bUgeMt5CclMBrjaynohBL9H/2wyDmbYGTnr/N4PnD ik8VerdI5biQV8TpxSh/QUHI6NJt4SJE7UIt7oSwsRZ+JApvJ1ZKGBJGrNHJG6LxRKJ5Wm T+ZWqGkRy+q+ideU8Dzz3Gec3UseRjLDWyklDV/0XsMgnw7PEQGs1werSxhEsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700089751; a=rsa-sha256; cv=none; b=hpBeYMVrv6IaNONL+dRWfYbMpQtELmdvVoxWHV0XA3oiI5T5/FFMF28808Q3URezeAUiXu HgswjHFVycI62ZcgJ6TPe5dYCF06JDTsagB9sR6JJNfUsffaUnHKDE7oVKj5CWEv8LPakQ t2ZaQcnOCOnYzr+iIeINJ9854W/KvM98nPNP8OOcpRnSltgubRz3cLsTlH9TLGQOWJtEIv ZxQfYHjn64qy9uyGiw29dbTGouyCGqoPz0HPqS+U1pX12FjVmoOpqzoWtVxFX4tGlHETGF iYhW9s9RIkT9Dim3xGf9z0YrBrirh1KvqkZTUCBqxQ0yMUPzFb6IbAorYblRLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVzPg3x8gzc04; Wed, 15 Nov 2023 23:09: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 3AFN9Bg5064858; Wed, 15 Nov 2023 23:09:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFN9BaC064855; Wed, 15 Nov 2023 23:09:11 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:09:11 GMT Message-Id: <202311152309.3AFN9BaC064855@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: 0a5db6bb3a95 - main - net/mlx5: Allow creating autogroups with reserved 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a5db6bb3a953bd22f53f3607ae6853487548532 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0a5db6bb3a953bd22f53f3607ae6853487548532 commit 0a5db6bb3a953bd22f53f3607ae6853487548532 Author: Mark Bloch AuthorDate: 2023-02-19 14:16:43 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-15 23:08:16 +0000 net/mlx5: Allow creating autogroups with reserved entries Exclude the last n entries for an autogrouped flow table. Reserving entries at the end of the FT will ensure that this FG will be the last to be evaluated. This will be used in the next patch to create Linux upstream commit: 79cdb0aaea8b5478db34afa1d4d5ecc808689a67 Signed-off-by: Mark Bloch Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/fs.h | 3 ++- sys/dev/mlx5/mlx5_core/fs_core.h | 1 + sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c | 22 +++++++++++++++++----- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/sys/dev/mlx5/fs.h b/sys/dev/mlx5/fs.h index da1a469d333c..d61a2bb498b7 100644 --- a/sys/dev/mlx5/fs.h +++ b/sys/dev/mlx5/fs.h @@ -140,7 +140,8 @@ mlx5_create_auto_grouped_flow_table(struct mlx5_flow_namespace *ns, int prio, const char *name, int num_flow_table_entries, - int max_num_groups); + int max_num_groups, + int num_reserved_entries); struct mlx5_flow_table * mlx5_create_vport_flow_table(struct mlx5_flow_namespace *ns, diff --git a/sys/dev/mlx5/mlx5_core/fs_core.h b/sys/dev/mlx5/mlx5_core/fs_core.h index dc619fc2d2db..a9273fdab61c 100644 --- a/sys/dev/mlx5/mlx5_core/fs_core.h +++ b/sys/dev/mlx5/mlx5_core/fs_core.h @@ -99,6 +99,7 @@ struct mlx5_flow_table { unsigned int max_types; unsigned int group_size; unsigned int num_types; + unsigned int max_fte; } autogroup; unsigned int max_fte; unsigned int level; diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c index b59373d48730..dcf93e5fc892 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c @@ -892,12 +892,18 @@ struct mlx5_flow_table *mlx5_create_auto_grouped_flow_table(struct mlx5_flow_nam int prio, const char *name, int num_flow_table_entries, - int max_num_groups) + int max_num_groups, + int num_reserved_entries) { struct mlx5_flow_table *ft = NULL; struct fs_prio *fs_prio; bool is_shared_prio; + if (max_num_groups > (num_flow_table_entries - num_reserved_entries)) + return ERR_PTR(-EINVAL); + if (num_reserved_entries > num_flow_table_entries) + return ERR_PTR(-EINVAL); + fs_prio = find_prio(ns, prio); if (!fs_prio) return ERR_PTR(-EINVAL); @@ -918,8 +924,9 @@ struct mlx5_flow_table *mlx5_create_auto_grouped_flow_table(struct mlx5_flow_nam ft->autogroup.active = true; ft->autogroup.max_types = max_num_groups; + ft->autogroup.max_fte = num_flow_table_entries - num_reserved_entries; /* We save place for flow groups in addition to max types */ - ft->autogroup.group_size = ft->max_fte / (max_num_groups + 1); + ft->autogroup.group_size = ft->autogroup.max_fte / (max_num_groups + 1); if (is_shared_prio) ft->shared_refcount = 1; @@ -1109,11 +1116,13 @@ struct mlx5_flow_group *mlx5_create_flow_group(struct mlx5_flow_table *ft, { struct mlx5_flow_group *fg; struct mlx5_core_dev *dev = fs_get_dev(&ft->base); + unsigned int start_index; + start_index = MLX5_GET(create_flow_group_in, in, start_flow_index); if (!dev) return ERR_PTR(-ENODEV); - if (ft->autogroup.active) + if (ft->autogroup.active && start_index < ft->autogroup.max_fte) return ERR_PTR(-EPERM); fg = fs_create_fg(dev, ft, ft->fgs.prev, in, 1); @@ -1132,7 +1141,9 @@ static void fs_del_fg(struct mlx5_flow_group *fg) dev = fs_get_dev(&parent_ft->base); WARN_ON(!dev); - if (parent_ft->autogroup.active && fg->max_ftes == parent_ft->autogroup.group_size) + if (parent_ft->autogroup.active && + fg->max_ftes == parent_ft->autogroup.group_size && + fg->start_index < parent_ft->autogroup.max_fte) parent_ft->autogroup.num_types--; if (mlx5_cmd_fs_destroy_fg(dev, parent_ft->vport, @@ -1423,6 +1434,7 @@ static struct mlx5_flow_group *create_autogroup(struct mlx5_flow_table *ft, u32 *in; int inlen = MLX5_ST_SZ_BYTES(create_flow_group_in); void *match_criteria_addr; + u32 max_fte = ft->autogroup.max_fte; if (!ft->autogroup.active) return ERR_PTR(-ENOENT); @@ -1459,7 +1471,7 @@ static struct mlx5_flow_group *create_autogroup(struct mlx5_flow_table *ft, prev = &g->base.list; } - if (candidate_index + group_size > ft->max_fte) { + if (candidate_index + group_size > max_fte) { ret = ERR_PTR(-ENOSPC); goto out; } From nobody Wed Nov 15 23:09:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVzPj077Mz50rlv; Wed, 15 Nov 2023 23:09: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 4SVzPh66wZz3N3b; Wed, 15 Nov 2023 23:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iS5vFe24Nrz9Yo9pLvlehntej2zVYQjqWJJh934b/Ok=; b=NyCFqWwm/GYoEy7NFfNSMZETSeQRVSLgAUtLap9ojwQq3hA/jhuzRfnI2xv6ApkyBcYPSN WDsv8B4hbokprhlf6iA8fRGwYcEqtoDSeS8ViEvn4kyxcQ/6pwFZA0DrNP77pbyzKa/seK ZgD2h6BpYKyB9WDMpq8QlAETG3Qukt1zwNv1c5nr+moxQB6k876mPAgSjoGAMa6fK5bvHm sHKzEnB2r8xXf8UvTr+LXzxN9DYuv+QX7OH2NNNftsGpFSPvSxVlrNVtfJOdGXuU3rqgRf TxheJ+pUclTEqkt+RaL8uhXh1ha93QjvKc8LmWzIbJzB4ejEidov2kO9/w3ivw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iS5vFe24Nrz9Yo9pLvlehntej2zVYQjqWJJh934b/Ok=; b=uoxQRMCdrUAC1qpjsyEjXRlJP/qUdf4926dCzndyW0nIcjwDnpNXlCrs18oEYq2caqtf6z k8AT2BzEAKUfJOsMvb01Bx2Td0bZNuMZ7kqb61Fn5j6MqRs0i7+FOqdvJF3DIfJEyvacba xyBKDyhBrvJwU+DMSLluxh8kLxhnyIBlz58p7c4QxLpbdIhkTAwNlO87eZCuCkvWPhP9Xh oEDIoMTXR7zjvL0zfgMR2iVc4TYYQLPQ4r+jjZJ7SwVwhEF4ZLZwn/BSFkD2tpsP1sSWEN 8Yu2T/PanYfiwdh8PRpZ9IygSnZzq/eeu41f2ktIDodZS3qRO/j04bhsFDnb+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700089752; a=rsa-sha256; cv=none; b=JEEwEdDDdn8R2JvdoDxvARm9fJJzuNbLaiAWfHYAmJjcuQMOnPwQMtE9YhHgaCqJQQbCHQ UvxCnZPp6VvOGxnkHddUiD8rlAKRo1lytREzTlYvacSTnBMF168jca4scPA/daSxMOipRX FnmGl8UnMfWsH3Y+dXVWxwBxEQ55FmZRw7yqBHs72nAo8zc4ZNPp6x6N1c7rkBLOeM3X5B BRb6BHOb5TPGPAGAXYO16bFJCIXXHMXq3StjIEMgrIDrspkU26R1jMnDpbMyCGNBJEpQ2p JHcyzgZyB5hUWOSqppcr9Tu60EjufYsbuiQ+M89IFCDI55xW0LJ97KCC7mBAmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVzPh58zCzbKB; Wed, 15 Nov 2023 23:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AFN9Cs2064910; Wed, 15 Nov 2023 23:09:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFN9C7X064907; Wed, 15 Nov 2023 23:09:12 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:09:12 GMT Message-Id: <202311152309.3AFN9C7X064907@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: 6a6af22b6ec4 - main - mlx5: Add a no-append flow insertion 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6a6af22b6ec42eb0436381fae8dd1b86bc4c6327 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6a6af22b6ec42eb0436381fae8dd1b86bc4c6327 commit 6a6af22b6ec42eb0436381fae8dd1b86bc4c6327 Author: Mark Bloch AuthorDate: 2023-02-20 15:46:42 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-15 23:08:16 +0000 mlx5: Add a no-append flow insertion mode This allows to insert a rule and make sure it doesn't get combined by the steering layer with any other rule. Signed-off-by: Mark Bloch Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/fs.h | 5 +++++ sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/sys/dev/mlx5/fs.h b/sys/dev/mlx5/fs.h index d61a2bb498b7..f62716d806d0 100644 --- a/sys/dev/mlx5/fs.h +++ b/sys/dev/mlx5/fs.h @@ -96,8 +96,13 @@ enum mlx5_flow_act_actions { MLX5_FLOW_ACT_ACTIONS_PACKET_REFORMAT = 1 << 2, }; +enum MLX5_FLOW_ACT_FLAGS { + MLX5_FLOW_ACT_NO_APPEND = 1 << 0, +}; + struct mlx5_flow_act { u32 actions; /* See enum mlx5_flow_act_actions */ + u32 flags; u32 flow_tag; struct mlx5_modify_hdr *modify_hdr; struct mlx5_pkt_reformat *pkt_reformat; diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c index dcf93e5fc892..c4edc940b1bc 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c @@ -1806,6 +1806,9 @@ static struct mlx5_flow_rule *fs_add_dst_fg(struct mlx5_flow_group *fg, char fte_name[20]; mutex_lock(&fg->base.lock); + if (flow_act->flags & MLX5_FLOW_ACT_NO_APPEND) + goto insert_fte; + fs_for_each_fte(fte, fg) { /* TODO: Check of size against PRM max size */ mutex_lock(&fte->base.lock); @@ -1821,6 +1824,7 @@ static struct mlx5_flow_rule *fs_add_dst_fg(struct mlx5_flow_group *fg, mutex_unlock(&fte->base.lock); } +insert_fte: fs_get_parent(ft, fg); if (fg->num_ftes == fg->max_ftes) { dst = ERR_PTR(-ENOSPC); From nobody Wed Nov 15 23:09:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVzPk08RXz50s4t; Wed, 15 Nov 2023 23:09: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 4SVzPj6kYgz3NS4; Wed, 15 Nov 2023 23:09:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ufkOYGH5pe2fmDFa3On4iAJtpUbd2T+vYnJFB0+dDEw=; b=L5/Ep1Ns4JSo4cEGs8BW2oTTmLUqJ97axkjvUUvUCXDiY98Er3idBwMiXXJ7uFJgtLmqJB WqYAValmphqwgDMp9yrRbeHJXlnkwwr4dX8D6wgA00lnnGwcbAC0EERVvixmFFhVt9BhGs PgNuKmiTtgbhCkDRviSBJTpOHZItzYWujRMiaW3+ja0jCo4+0OS+MYiRjiz4nHlBp17BuO WHgDT0/NJoMBh7d7NtFo1FfGU9UMrCQ1/hD0l5LiAKFwHDpQKG6UWxsQoYixPqIuKjNcvr cXwxa+I5sKgIMCxHTga+O7y93yGhyYaRQ8hPIfij9lpMq0UiA/z9Eu/ERnWaGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ufkOYGH5pe2fmDFa3On4iAJtpUbd2T+vYnJFB0+dDEw=; b=rxhvE+V6YiGUEaT0fdENEjzWV5HVgx0e79IqlmK4xzf2MxqwhAmDqRk5rMwPkLakowOziv cmMZVVV7JAEOMli5EQVzAqFak2zUquRADjiO96Ox7gZKAxocbKwKlhEMg0gmLs4vM4OiSv U8jr4jlqmzpwZ0zL1TC9sxgpRb2nQLgxRggAjRIj7ZlbJl6LrusuHR8kF52av8ogZi9n1p v9YCa+BHFKku8Ml13gh8F80OQHzInuW49yxknR2I5pyR1gZ4ycGowuPZlnsKPoXOcQth4S 4Tyk4ErnqHbUs2/fdLQzKerMVpRfghcBCcVduADz+GtW/Vxh40psdAhKpqfwoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700089753; a=rsa-sha256; cv=none; b=jseacqHYLaRpV2hdORFFK+XB+2O6gj0hWAdGVaR2r9rBWTRDYxzJKwp+ZuEsp3B6ArC2Cg pSeZPwAY7aVRldtM2OJvJ1LX580dhEn7kpnSjrOGRLU5dR7NJ4fGRczVSuPW96BWcrMe3C rqucJtTkITbvrZW9bkwUEhW+A3D+IO8mXBJkFt20oDENaYMAmvxS2N59d2ERTNsCaWFrcf q/yehoZ4fE5XK1gyjRK61c7jLW0Fk4m2tWF57cDMJ2TYh2f7d2KKU2X+q/mD4hDrkluEci 5+fqBE/0eWRTKsBb1ebKxF/OV/J/3XfTvQOBELqrXdoMuwA/ojistxS93ezS+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 4SVzPj5Tr4zbbm; Wed, 15 Nov 2023 23:09: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 3AFN9Dt4064951; Wed, 15 Nov 2023 23:09:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFN9DSu064947; Wed, 15 Nov 2023 23:09:13 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:09:13 GMT Message-Id: <202311152309.3AFN9DSu064947@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: 35bbcf091699 - main - mlx5: add fs_counters List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 35bbcf0916992d77fe1521962db42b3106a701fb Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=35bbcf0916992d77fe1521962db42b3106a701fb commit 35bbcf0916992d77fe1521962db42b3106a701fb Author: Raed Salem AuthorDate: 2023-02-20 16:10:29 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-15 23:08:17 +0000 mlx5: add fs_counters Signed-off-by: Raed Salem Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/driver.h | 43 ++ sys/dev/mlx5/fs.h | 16 +- sys/dev/mlx5/mlx5_core/fs_core.h | 5 + sys/dev/mlx5/mlx5_core/mlx5_fc_cmd.c | 102 ++++ sys/dev/mlx5/mlx5_core/mlx5_fc_cmd.h | 54 +++ sys/dev/mlx5/mlx5_core/mlx5_fs_counters.c | 758 ++++++++++++++++++++++++++++++ sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c | 5 + sys/dev/mlx5/mlx5_ifc.h | 22 +- sys/modules/mlx5/Makefile | 2 + 9 files changed, 1003 insertions(+), 4 deletions(-) diff --git a/sys/dev/mlx5/driver.h b/sys/dev/mlx5/driver.h index cb1a2907a443..9daa1235bd9c 100644 --- a/sys/dev/mlx5/driver.h +++ b/sys/dev/mlx5/driver.h @@ -50,6 +50,7 @@ #define MLX5_MAX_NUMBER_OF_VFS 128 #define MLX5_INVALID_QUEUE_HANDLE 0xffffffff +#define MLX5_ST_SZ_BYTES(typ) (sizeof(struct mlx5_ifc_##typ##_bits) / 8) enum { MLX5_BOARD_ID_LEN = 64, @@ -269,6 +270,36 @@ struct mlx5_traffic_counter { u64 octets; }; +struct mlx5_fc_pool { + struct mlx5_core_dev *dev; + struct mutex pool_lock; /* protects pool lists */ + struct list_head fully_used; + struct list_head partially_used; + struct list_head unused; + int available_fcs; + int used_fcs; + int threshold; +}; + +struct mlx5_fc_stats { + spinlock_t counters_idr_lock; /* protects counters_idr */ + struct idr counters_idr; + struct list_head counters; + struct llist_head addlist; + struct llist_head dellist; + + struct workqueue_struct *wq; + struct delayed_work work; + unsigned long next_query; + unsigned long sampling_interval; /* jiffies */ + u32 *bulk_query_out; + int bulk_query_len; + size_t num_counters; + bool bulk_query_alloc_failed; + unsigned long next_bulk_query_alloc; + struct mlx5_fc_pool fc_pool; +}; + enum mlx5_cmd_mode { MLX5_CMD_MODE_POLLING, MLX5_CMD_MODE_EVENTS @@ -607,6 +638,7 @@ struct mlx5_priv { struct mlx5_bfreg_data bfregs; struct mlx5_uars_page *uar; + struct mlx5_fc_stats fc_stats; }; enum mlx5_device_state { @@ -963,6 +995,17 @@ int mlx5_cmd_exec_cb(struct mlx5_async_ctx *ctx, void *in, int in_size, struct mlx5_async_work *work); int mlx5_cmd_exec(struct mlx5_core_dev *dev, void *in, int in_size, void *out, int out_size); +#define mlx5_cmd_exec_inout(dev, ifc_cmd, in, out) \ + ({ \ + mlx5_cmd_exec(dev, in, MLX5_ST_SZ_BYTES(ifc_cmd##_in), out, \ + MLX5_ST_SZ_BYTES(ifc_cmd##_out)); \ + }) + +#define mlx5_cmd_exec_in(dev, ifc_cmd, in) \ + ({ \ + u32 _out[MLX5_ST_SZ_DW(ifc_cmd##_out)] = {}; \ + mlx5_cmd_exec_inout(dev, ifc_cmd, in, _out); \ + }) int mlx5_cmd_exec_polling(struct mlx5_core_dev *dev, void *in, int in_size, void *out, int out_size); int mlx5_cmd_alloc_uar(struct mlx5_core_dev *dev, u32 *uarn); diff --git a/sys/dev/mlx5/fs.h b/sys/dev/mlx5/fs.h index f62716d806d0..65d38b9ee67a 100644 --- a/sys/dev/mlx5/fs.h +++ b/sys/dev/mlx5/fs.h @@ -254,7 +254,6 @@ bool fs_match_exact_mask( void *mask1, void *mask2); /**********end API for sniffer**********/ - struct mlx5_modify_hdr *mlx5_modify_header_alloc(struct mlx5_core_dev *dev, enum mlx5_flow_namespace_type ns_type, u8 num_actions, @@ -275,4 +274,19 @@ struct mlx5_pkt_reformat *mlx5_packet_reformat_alloc(struct mlx5_core_dev *dev, enum mlx5_flow_namespace_type ns_type); void mlx5_packet_reformat_dealloc(struct mlx5_core_dev *dev, struct mlx5_pkt_reformat *pkt_reformat); +/********** Flow counters API **********/ +struct mlx5_fc; +struct mlx5_fc *mlx5_fc_create(struct mlx5_core_dev *dev, bool aging); + +/* As mlx5_fc_create() but doesn't queue stats refresh thread. */ +struct mlx5_fc *mlx5_fc_create_ex(struct mlx5_core_dev *dev, bool aging); + +void mlx5_fc_destroy(struct mlx5_core_dev *dev, struct mlx5_fc *counter); +u64 mlx5_fc_query_lastuse(struct mlx5_fc *counter); +void mlx5_fc_query_cached(struct mlx5_fc *counter, + u64 *bytes, u64 *packets, u64 *lastuse); +int mlx5_fc_query(struct mlx5_core_dev *dev, struct mlx5_fc *counter, + u64 *packets, u64 *bytes); +u32 mlx5_fc_id(struct mlx5_fc *counter); +/******* End of Flow counters API ******/ #endif diff --git a/sys/dev/mlx5/mlx5_core/fs_core.h b/sys/dev/mlx5/mlx5_core/fs_core.h index a9273fdab61c..05757f493469 100644 --- a/sys/dev/mlx5/mlx5_core/fs_core.h +++ b/sys/dev/mlx5/mlx5_core/fs_core.h @@ -323,4 +323,9 @@ int mlx5_cmd_packet_reformat_alloc(struct mlx5_core_dev *dev, struct mlx5_pkt_reformat *pkt_reformat); void mlx5_cmd_packet_reformat_dealloc(struct mlx5_core_dev *dev, struct mlx5_pkt_reformat *pkt_reformat); +int mlx5_init_fc_stats(struct mlx5_core_dev *dev); +void mlx5_cleanup_fc_stats(struct mlx5_core_dev *dev); +void mlx5_fc_queue_stats_work(struct mlx5_core_dev *dev, + struct delayed_work *dwork, + unsigned long delay); #endif diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fc_cmd.c b/sys/dev/mlx5/mlx5_core/mlx5_fc_cmd.c new file mode 100644 index 000000000000..f3410249e67f --- /dev/null +++ b/sys/dev/mlx5/mlx5_core/mlx5_fc_cmd.c @@ -0,0 +1,102 @@ +/*- + * Copyright (c) 2022 NVIDIA corporation & affiliates. + * + * 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 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 AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include + +int mlx5_cmd_fc_bulk_alloc(struct mlx5_core_dev *dev, + enum mlx5_fc_bulk_alloc_bitmask alloc_bitmask, + u32 *id) +{ + u32 out[MLX5_ST_SZ_DW(alloc_flow_counter_out)] = {}; + u32 in[MLX5_ST_SZ_DW(alloc_flow_counter_in)] = {}; + int err; + + MLX5_SET(alloc_flow_counter_in, in, opcode, + MLX5_CMD_OP_ALLOC_FLOW_COUNTER); + MLX5_SET(alloc_flow_counter_in, in, flow_counter_bulk, alloc_bitmask); + + err = mlx5_cmd_exec_inout(dev, alloc_flow_counter, in, out); + if (!err) + *id = MLX5_GET(alloc_flow_counter_out, out, flow_counter_id); + return err; +} + +int mlx5_cmd_fc_alloc(struct mlx5_core_dev *dev, u32 *id) +{ + return mlx5_cmd_fc_bulk_alloc(dev, 0, id); +} + +int mlx5_cmd_fc_free(struct mlx5_core_dev *dev, u32 id) +{ + u32 in[MLX5_ST_SZ_DW(dealloc_flow_counter_in)] = {}; + + MLX5_SET(dealloc_flow_counter_in, in, opcode, + MLX5_CMD_OP_DEALLOC_FLOW_COUNTER); + MLX5_SET(dealloc_flow_counter_in, in, flow_counter_id, id); + return mlx5_cmd_exec_in(dev, dealloc_flow_counter, in); +} + +int mlx5_cmd_fc_query(struct mlx5_core_dev *dev, u32 id, + u64 *packets, u64 *bytes) +{ + u32 out[MLX5_ST_SZ_BYTES(query_flow_counter_out) + + MLX5_ST_SZ_BYTES(traffic_counter)] = {}; + u32 in[MLX5_ST_SZ_DW(query_flow_counter_in)] = {}; + void *stats; + int err = 0; + + MLX5_SET(query_flow_counter_in, in, opcode, + MLX5_CMD_OP_QUERY_FLOW_COUNTER); + MLX5_SET(query_flow_counter_in, in, op_mod, 0); + MLX5_SET(query_flow_counter_in, in, flow_counter_id, id); + err = mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out)); + if (err) + return err; + + stats = MLX5_ADDR_OF(query_flow_counter_out, out, flow_statistics); + *packets = MLX5_GET64(traffic_counter, stats, packets); + *bytes = MLX5_GET64(traffic_counter, stats, octets); + return 0; +} + +int mlx5_cmd_fc_bulk_query(struct mlx5_core_dev *dev, u32 base_id, int bulk_len, + u32 *out) +{ + int outlen = mlx5_cmd_fc_get_bulk_query_out_len(bulk_len); + u32 in[MLX5_ST_SZ_DW(query_flow_counter_in)] = {}; + + MLX5_SET(query_flow_counter_in, in, opcode, + MLX5_CMD_OP_QUERY_FLOW_COUNTER); + MLX5_SET(query_flow_counter_in, in, flow_counter_id, base_id); + MLX5_SET(query_flow_counter_in, in, num_of_counters, bulk_len); + return mlx5_cmd_exec(dev, in, sizeof(in), out, outlen); +} + diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fc_cmd.h b/sys/dev/mlx5/mlx5_core/mlx5_fc_cmd.h new file mode 100644 index 000000000000..3adebb3ca94c --- /dev/null +++ b/sys/dev/mlx5/mlx5_core/mlx5_fc_cmd.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2023, NVIDIA Technologies. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * 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. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef _MLX5_FC_CMD_ +#define _MLX5_FC_CMD_ + +#include "fs_core.h" + +int mlx5_cmd_fc_alloc(struct mlx5_core_dev *dev, u32 *id); +int mlx5_cmd_fc_bulk_alloc(struct mlx5_core_dev *dev, + enum mlx5_fc_bulk_alloc_bitmask alloc_bitmask, + u32 *id); +int mlx5_cmd_fc_free(struct mlx5_core_dev *dev, u32 id); +int mlx5_cmd_fc_query(struct mlx5_core_dev *dev, u32 id, + u64 *packets, u64 *bytes); + +int mlx5_cmd_fc_bulk_query(struct mlx5_core_dev *dev, u32 base_id, int bulk_len, + u32 *out); +static inline int mlx5_cmd_fc_get_bulk_query_out_len(int bulk_len) +{ + return MLX5_ST_SZ_BYTES(query_flow_counter_out) + + MLX5_ST_SZ_BYTES(traffic_counter) * bulk_len; +} + +#endif diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_counters.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_counters.c new file mode 100644 index 000000000000..7214c5256388 --- /dev/null +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_counters.c @@ -0,0 +1,758 @@ +/*- + * Copyright (c) 2013-2019, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2022 NVIDIA corporation & affiliates. + * + * 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 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 AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include + +#define MLX5_FC_STATS_PERIOD msecs_to_jiffies(1000) +#define MLX5_FC_BULK_QUERY_ALLOC_PERIOD msecs_to_jiffies(180 * 1000) +/* Max number of counters to query in bulk read is 32K */ +#define MLX5_SW_MAX_COUNTERS_BULK BIT(15) +#define MLX5_INIT_COUNTERS_BULK 8 +#define MLX5_FC_POOL_MAX_THRESHOLD BIT(18) +#define MLX5_FC_POOL_USED_BUFF_RATIO 10 + +struct mlx5_fc_cache { + u64 packets; + u64 bytes; + u64 lastuse; +}; + +struct mlx5_fc { + struct list_head list; + struct llist_node addlist; + struct llist_node dellist; + + /* last{packets,bytes} members are used when calculating the delta since + * last reading + */ + u64 lastpackets; + u64 lastbytes; + + struct mlx5_fc_bulk *bulk; + u32 id; + bool aging; + + struct mlx5_fc_cache cache ____cacheline_aligned_in_smp; +}; + +static void mlx5_fc_pool_init(struct mlx5_fc_pool *fc_pool, struct mlx5_core_dev *dev); +static void mlx5_fc_pool_cleanup(struct mlx5_fc_pool *fc_pool); +static struct mlx5_fc *mlx5_fc_pool_acquire_counter(struct mlx5_fc_pool *fc_pool); +static void mlx5_fc_pool_release_counter(struct mlx5_fc_pool *fc_pool, struct mlx5_fc *fc); + +/* locking scheme: + * + * It is the responsibility of the user to prevent concurrent calls or bad + * ordering to mlx5_fc_create(), mlx5_fc_destroy() and accessing a reference + * to struct mlx5_fc. + * e.g en_tc.c is protected by RTNL lock of its caller, and will never call a + * dump (access to struct mlx5_fc) after a counter is destroyed. + * + * access to counter list: + * - create (user context) + * - mlx5_fc_create() only adds to an addlist to be used by + * mlx5_fc_stats_work(). addlist is a lockless single linked list + * that doesn't require any additional synchronization when adding single + * node. + * - spawn thread to do the actual destroy + * + * - destroy (user context) + * - add a counter to lockless dellist + * - spawn thread to do the actual del + * + * - dump (user context) + * user should not call dump after destroy + * + * - query (single thread workqueue context) + * destroy/dump - no conflict (see destroy) + * query/dump - packets and bytes might be inconsistent (since update is not + * atomic) + * query/create - no conflict (see create) + * since every create/destroy spawn the work, only after necessary time has + * elapsed, the thread will actually query the hardware. + */ + +static struct list_head *mlx5_fc_counters_lookup_next(struct mlx5_core_dev *dev, + u32 id) +{ + struct mlx5_fc_stats *fc_stats = &dev->priv.fc_stats; + struct mlx5_fc *counter; + int next_id = id + 1; + + rcu_read_lock(); + /* skip counters that are in idr, but not yet in counters list */ + while ((counter = idr_get_next(&fc_stats->counters_idr, &next_id)) != NULL && + list_empty(&counter->list)) + next_id++; + rcu_read_unlock(); + + return counter ? &counter->list : &fc_stats->counters; +} + +static void mlx5_fc_stats_insert(struct mlx5_core_dev *dev, + struct mlx5_fc *counter) +{ + struct list_head *next = mlx5_fc_counters_lookup_next(dev, counter->id); + + list_add_tail(&counter->list, next); +} + +static void mlx5_fc_stats_remove(struct mlx5_core_dev *dev, + struct mlx5_fc *counter) +{ + struct mlx5_fc_stats *fc_stats = &dev->priv.fc_stats; + + list_del(&counter->list); + + spin_lock(&fc_stats->counters_idr_lock); + WARN_ON(!idr_remove(&fc_stats->counters_idr, counter->id)); + spin_unlock(&fc_stats->counters_idr_lock); +} + +static int get_init_bulk_query_len(struct mlx5_core_dev *dev) +{ + return min_t(int, MLX5_INIT_COUNTERS_BULK, + (1 << MLX5_CAP_GEN(dev, log_max_flow_counter_bulk))); +} + +static int get_max_bulk_query_len(struct mlx5_core_dev *dev) +{ + return min_t(int, MLX5_SW_MAX_COUNTERS_BULK, + (1 << MLX5_CAP_GEN(dev, log_max_flow_counter_bulk))); +} + +static void update_counter_cache(int index, u32 *bulk_raw_data, + struct mlx5_fc_cache *cache) +{ + void *stats = MLX5_ADDR_OF(query_flow_counter_out, bulk_raw_data, + flow_statistics[index]); + u64 packets = MLX5_GET64(traffic_counter, stats, packets); + u64 bytes = MLX5_GET64(traffic_counter, stats, octets); + + if (cache->packets == packets) + return; + + cache->packets = packets; + cache->bytes = bytes; + cache->lastuse = jiffies; +} + +static void mlx5_fc_stats_query_counter_range(struct mlx5_core_dev *dev, + struct mlx5_fc *first, + u32 last_id) +{ + struct mlx5_fc_stats *fc_stats = &dev->priv.fc_stats; + bool query_more_counters = (first->id <= last_id); + int cur_bulk_len = fc_stats->bulk_query_len; + u32 *data = fc_stats->bulk_query_out; + struct mlx5_fc *counter = first; + u32 bulk_base_id; + int bulk_len; + int err; + + while (query_more_counters) { + /* first id must be aligned to 4 when using bulk query */ + bulk_base_id = counter->id & ~0x3; + + /* number of counters to query inc. the last counter */ + bulk_len = min_t(int, cur_bulk_len, + ALIGN(last_id - bulk_base_id + 1, 4)); + + err = mlx5_cmd_fc_bulk_query(dev, bulk_base_id, bulk_len, + data); + if (err) { + mlx5_core_err(dev, "Error doing bulk query: %d\n", err); + return; + } + query_more_counters = false; + + list_for_each_entry_from(counter, &fc_stats->counters, list) { + int counter_index = counter->id - bulk_base_id; + struct mlx5_fc_cache *cache = &counter->cache; + + if (counter->id >= bulk_base_id + bulk_len) { + query_more_counters = true; + break; + } + + update_counter_cache(counter_index, data, cache); + } + } +} + +static void mlx5_fc_free(struct mlx5_core_dev *dev, struct mlx5_fc *counter) +{ + mlx5_cmd_fc_free(dev, counter->id); + kfree(counter); +} + +static void mlx5_fc_release(struct mlx5_core_dev *dev, struct mlx5_fc *counter) +{ + struct mlx5_fc_stats *fc_stats = &dev->priv.fc_stats; + + if (counter->bulk) + mlx5_fc_pool_release_counter(&fc_stats->fc_pool, counter); + else + mlx5_fc_free(dev, counter); +} + +static void mlx5_fc_stats_bulk_query_size_increase(struct mlx5_core_dev *dev) +{ + struct mlx5_fc_stats *fc_stats = &dev->priv.fc_stats; + int max_bulk_len = get_max_bulk_query_len(dev); + unsigned long now = jiffies; + u32 *bulk_query_out_tmp; + int max_out_len; + + if (fc_stats->bulk_query_alloc_failed && + time_before(now, fc_stats->next_bulk_query_alloc)) + return; + + max_out_len = mlx5_cmd_fc_get_bulk_query_out_len(max_bulk_len); + bulk_query_out_tmp = kzalloc(max_out_len, GFP_KERNEL); + if (!bulk_query_out_tmp) { + mlx5_core_warn(dev, + "Can't increase flow counters bulk query buffer size, insufficient memory, bulk_size(%d)\n", + max_bulk_len); + fc_stats->bulk_query_alloc_failed = true; + fc_stats->next_bulk_query_alloc = + now + MLX5_FC_BULK_QUERY_ALLOC_PERIOD; + return; + } + + kfree(fc_stats->bulk_query_out); + fc_stats->bulk_query_out = bulk_query_out_tmp; + fc_stats->bulk_query_len = max_bulk_len; + if (fc_stats->bulk_query_alloc_failed) { + mlx5_core_info(dev, + "Flow counters bulk query buffer size increased, bulk_size(%d)\n", + max_bulk_len); + fc_stats->bulk_query_alloc_failed = false; + } +} + +static void mlx5_fc_stats_work(struct work_struct *work) +{ + struct mlx5_core_dev *dev = container_of(work, struct mlx5_core_dev, + priv.fc_stats.work.work); + struct mlx5_fc_stats *fc_stats = &dev->priv.fc_stats; + /* Take dellist first to ensure that counters cannot be deleted before + * they are inserted. + */ + struct llist_node *dellist = llist_del_all(&fc_stats->dellist); + struct llist_node *addlist = llist_del_all(&fc_stats->addlist); + struct mlx5_fc *counter = NULL, *last = NULL, *tmp; + unsigned long now = jiffies; + + if (addlist || !list_empty(&fc_stats->counters)) + queue_delayed_work(fc_stats->wq, &fc_stats->work, + fc_stats->sampling_interval); + + llist_for_each_entry(counter, addlist, addlist) { + mlx5_fc_stats_insert(dev, counter); + fc_stats->num_counters++; + } + + llist_for_each_entry_safe(counter, tmp, dellist, dellist) { + mlx5_fc_stats_remove(dev, counter); + + mlx5_fc_release(dev, counter); + fc_stats->num_counters--; + } + + if (fc_stats->bulk_query_len < get_max_bulk_query_len(dev) && + fc_stats->num_counters > get_init_bulk_query_len(dev)) + mlx5_fc_stats_bulk_query_size_increase(dev); + + if (time_before(now, fc_stats->next_query) || + list_empty(&fc_stats->counters)) + return; + last = list_last_entry(&fc_stats->counters, struct mlx5_fc, list); + + counter = list_first_entry(&fc_stats->counters, struct mlx5_fc, + list); + if (counter) + mlx5_fc_stats_query_counter_range(dev, counter, last->id); + + fc_stats->next_query = now + fc_stats->sampling_interval; +} + +static struct mlx5_fc *mlx5_fc_single_alloc(struct mlx5_core_dev *dev) +{ + struct mlx5_fc *counter; + int err; + + counter = kzalloc(sizeof(*counter), GFP_KERNEL); + if (!counter) + return ERR_PTR(-ENOMEM); + + err = mlx5_cmd_fc_alloc(dev, &counter->id); + if (err) { + kfree(counter); + return ERR_PTR(err); + } + + return counter; +} + +static struct mlx5_fc *mlx5_fc_acquire(struct mlx5_core_dev *dev, bool aging) +{ + struct mlx5_fc_stats *fc_stats = &dev->priv.fc_stats; + struct mlx5_fc *counter; + + if (aging && MLX5_CAP_GEN(dev, flow_counter_bulk_alloc) != 0) { + counter = mlx5_fc_pool_acquire_counter(&fc_stats->fc_pool); + if (!IS_ERR(counter)) + return counter; + } + + return mlx5_fc_single_alloc(dev); +} + +struct mlx5_fc *mlx5_fc_create_ex(struct mlx5_core_dev *dev, bool aging) +{ + struct mlx5_fc *counter = mlx5_fc_acquire(dev, aging); + struct mlx5_fc_stats *fc_stats = &dev->priv.fc_stats; + int err = 0; + + if (IS_ERR(counter)) + return counter; + + INIT_LIST_HEAD(&counter->list); + counter->aging = aging; + + if (aging) { + u32 id = counter->id; + + counter->cache.lastuse = jiffies; + counter->lastbytes = counter->cache.bytes; + counter->lastpackets = counter->cache.packets; + + idr_preload(GFP_KERNEL); + spin_lock(&fc_stats->counters_idr_lock); + + err = idr_alloc(&fc_stats->counters_idr, counter, id, id + 1, + GFP_NOWAIT); + + spin_unlock(&fc_stats->counters_idr_lock); + idr_preload_end(); + if (err < 0 || err != id) + goto err_out_alloc; + + llist_add(&counter->addlist, &fc_stats->addlist); + } + + return counter; + +err_out_alloc: + mlx5_fc_release(dev, counter); + return ERR_PTR(err); +} + +struct mlx5_fc *mlx5_fc_create(struct mlx5_core_dev *dev, bool aging) +{ + struct mlx5_fc *counter = mlx5_fc_create_ex(dev, aging); + struct mlx5_fc_stats *fc_stats = &dev->priv.fc_stats; + + if (aging) + mod_delayed_work(fc_stats->wq, &fc_stats->work, 0); + return counter; +} +EXPORT_SYMBOL(mlx5_fc_create); + +u32 mlx5_fc_id(struct mlx5_fc *counter) +{ + return counter->id; +} +EXPORT_SYMBOL(mlx5_fc_id); + +void mlx5_fc_destroy(struct mlx5_core_dev *dev, struct mlx5_fc *counter) +{ + struct mlx5_fc_stats *fc_stats = &dev->priv.fc_stats; + + if (!counter) + return; + + if (counter->aging) { + llist_add(&counter->dellist, &fc_stats->dellist); + mod_delayed_work(fc_stats->wq, &fc_stats->work, 0); + return; + } + + mlx5_fc_release(dev, counter); +} +EXPORT_SYMBOL(mlx5_fc_destroy); + +int mlx5_init_fc_stats(struct mlx5_core_dev *dev) +{ + struct mlx5_fc_stats *fc_stats = &dev->priv.fc_stats; + int init_bulk_len; + int init_out_len; + + spin_lock_init(&fc_stats->counters_idr_lock); + idr_init(&fc_stats->counters_idr); + INIT_LIST_HEAD(&fc_stats->counters); + init_llist_head(&fc_stats->addlist); + init_llist_head(&fc_stats->dellist); + + init_bulk_len = get_init_bulk_query_len(dev); + init_out_len = mlx5_cmd_fc_get_bulk_query_out_len(init_bulk_len); + fc_stats->bulk_query_out = kzalloc(init_out_len, GFP_KERNEL); + if (!fc_stats->bulk_query_out) + return -ENOMEM; + fc_stats->bulk_query_len = init_bulk_len; + + fc_stats->wq = create_singlethread_workqueue("mlx5_fc"); + if (!fc_stats->wq) + goto err_wq_create; + + fc_stats->sampling_interval = MLX5_FC_STATS_PERIOD; + INIT_DELAYED_WORK(&fc_stats->work, mlx5_fc_stats_work); + + mlx5_fc_pool_init(&fc_stats->fc_pool, dev); + return 0; + +err_wq_create: + kfree(fc_stats->bulk_query_out); + return -ENOMEM; +} + +void mlx5_cleanup_fc_stats(struct mlx5_core_dev *dev) +{ + struct mlx5_fc_stats *fc_stats = &dev->priv.fc_stats; + struct llist_node *tmplist; + struct mlx5_fc *counter; + struct mlx5_fc *tmp; + + if (!dev->priv.fc_stats.wq) + return; + + cancel_delayed_work_sync(&dev->priv.fc_stats.work); + destroy_workqueue(dev->priv.fc_stats.wq); + dev->priv.fc_stats.wq = NULL; + + tmplist = llist_del_all(&fc_stats->addlist); + llist_for_each_entry_safe(counter, tmp, tmplist, addlist) + mlx5_fc_release(dev, counter); + + list_for_each_entry_safe(counter, tmp, &fc_stats->counters, list) + mlx5_fc_release(dev, counter); + + mlx5_fc_pool_cleanup(&fc_stats->fc_pool); + idr_destroy(&fc_stats->counters_idr); + kfree(fc_stats->bulk_query_out); +} + +int mlx5_fc_query(struct mlx5_core_dev *dev, struct mlx5_fc *counter, + u64 *packets, u64 *bytes) +{ + return mlx5_cmd_fc_query(dev, counter->id, packets, bytes); +} +EXPORT_SYMBOL(mlx5_fc_query); + +u64 mlx5_fc_query_lastuse(struct mlx5_fc *counter) +{ + return counter->cache.lastuse; +} + +void mlx5_fc_query_cached(struct mlx5_fc *counter, + u64 *bytes, u64 *packets, u64 *lastuse) +{ + struct mlx5_fc_cache c; + + c = counter->cache; + + *bytes = c.bytes - counter->lastbytes; + *packets = c.packets - counter->lastpackets; + *lastuse = c.lastuse; + + counter->lastbytes = c.bytes; + counter->lastpackets = c.packets; +} + +void mlx5_fc_queue_stats_work(struct mlx5_core_dev *dev, + struct delayed_work *dwork, + unsigned long delay) +{ + struct mlx5_fc_stats *fc_stats = &dev->priv.fc_stats; + + queue_delayed_work(fc_stats->wq, dwork, delay); +} + +void mlx5_fc_update_sampling_interval(struct mlx5_core_dev *dev, + unsigned long interval) +{ + struct mlx5_fc_stats *fc_stats = &dev->priv.fc_stats; + + fc_stats->sampling_interval = min_t(unsigned long, interval, + fc_stats->sampling_interval); +} + +/* Flow counter bluks */ + +struct mlx5_fc_bulk { + struct list_head pool_list; + u32 base_id; + int bulk_len; + unsigned long *bitmask; + struct mlx5_fc fcs[]; +}; + +static void mlx5_fc_init(struct mlx5_fc *counter, struct mlx5_fc_bulk *bulk, + u32 id) +{ + counter->bulk = bulk; + counter->id = id; +} + +static int mlx5_fc_bulk_get_free_fcs_amount(struct mlx5_fc_bulk *bulk) +{ + return bitmap_weight(bulk->bitmask, bulk->bulk_len); +} + +static struct mlx5_fc_bulk *mlx5_fc_bulk_create(struct mlx5_core_dev *dev) +{ + enum mlx5_fc_bulk_alloc_bitmask alloc_bitmask; + struct mlx5_fc_bulk *bulk; + int err = -ENOMEM; + int bulk_len; + u32 base_id; + int i; + + alloc_bitmask = MLX5_CAP_GEN(dev, flow_counter_bulk_alloc); + bulk_len = alloc_bitmask > 0 ? MLX5_FC_BULK_NUM_FCS(alloc_bitmask) : 1; + + bulk = kvzalloc(struct_size(bulk, fcs, bulk_len), GFP_KERNEL); + if (!bulk) + goto err_alloc_bulk; + + bulk->bitmask = kvcalloc(BITS_TO_LONGS(bulk_len), sizeof(unsigned long), + GFP_KERNEL); + if (!bulk->bitmask) + goto err_alloc_bitmask; + + err = mlx5_cmd_fc_bulk_alloc(dev, alloc_bitmask, &base_id); + if (err) + goto err_mlx5_cmd_bulk_alloc; + + bulk->base_id = base_id; + bulk->bulk_len = bulk_len; + for (i = 0; i < bulk_len; i++) { + mlx5_fc_init(&bulk->fcs[i], bulk, base_id + i); + set_bit(i, bulk->bitmask); + } + + return bulk; + +err_mlx5_cmd_bulk_alloc: + kvfree(bulk->bitmask); +err_alloc_bitmask: + kvfree(bulk); +err_alloc_bulk: + return ERR_PTR(err); +} + +static int +mlx5_fc_bulk_destroy(struct mlx5_core_dev *dev, struct mlx5_fc_bulk *bulk) +{ + if (mlx5_fc_bulk_get_free_fcs_amount(bulk) < bulk->bulk_len) { + mlx5_core_err(dev, "Freeing bulk before all counters were released\n"); + return -EBUSY; + } + + mlx5_cmd_fc_free(dev, bulk->base_id); + kvfree(bulk->bitmask); + kvfree(bulk); + + return 0; +} + +static struct mlx5_fc *mlx5_fc_bulk_acquire_fc(struct mlx5_fc_bulk *bulk) +{ + int free_fc_index = find_first_bit(bulk->bitmask, bulk->bulk_len); + + if (free_fc_index >= bulk->bulk_len) + return ERR_PTR(-ENOSPC); + + clear_bit(free_fc_index, bulk->bitmask); + return &bulk->fcs[free_fc_index]; +} + +static int mlx5_fc_bulk_release_fc(struct mlx5_fc_bulk *bulk, struct mlx5_fc *fc) +{ + int fc_index = fc->id - bulk->base_id; + + if (test_bit(fc_index, bulk->bitmask)) + return -EINVAL; + + set_bit(fc_index, bulk->bitmask); + return 0; +} + +/* Flow counters pool API */ + +static void mlx5_fc_pool_init(struct mlx5_fc_pool *fc_pool, struct mlx5_core_dev *dev) +{ + fc_pool->dev = dev; + mutex_init(&fc_pool->pool_lock); + INIT_LIST_HEAD(&fc_pool->fully_used); + INIT_LIST_HEAD(&fc_pool->partially_used); + INIT_LIST_HEAD(&fc_pool->unused); + fc_pool->available_fcs = 0; + fc_pool->used_fcs = 0; + fc_pool->threshold = 0; +} + +static void mlx5_fc_pool_cleanup(struct mlx5_fc_pool *fc_pool) +{ + struct mlx5_core_dev *dev = fc_pool->dev; + struct mlx5_fc_bulk *bulk; + struct mlx5_fc_bulk *tmp; + + list_for_each_entry_safe(bulk, tmp, &fc_pool->fully_used, pool_list) + mlx5_fc_bulk_destroy(dev, bulk); + list_for_each_entry_safe(bulk, tmp, &fc_pool->partially_used, pool_list) + mlx5_fc_bulk_destroy(dev, bulk); + list_for_each_entry_safe(bulk, tmp, &fc_pool->unused, pool_list) + mlx5_fc_bulk_destroy(dev, bulk); +} + +static void mlx5_fc_pool_update_threshold(struct mlx5_fc_pool *fc_pool) +{ + fc_pool->threshold = min_t(int, MLX5_FC_POOL_MAX_THRESHOLD, + fc_pool->used_fcs / MLX5_FC_POOL_USED_BUFF_RATIO); +} + +static struct mlx5_fc_bulk * +mlx5_fc_pool_alloc_new_bulk(struct mlx5_fc_pool *fc_pool) +{ + struct mlx5_core_dev *dev = fc_pool->dev; + struct mlx5_fc_bulk *new_bulk; + + new_bulk = mlx5_fc_bulk_create(dev); + if (!IS_ERR(new_bulk)) + fc_pool->available_fcs += new_bulk->bulk_len; + mlx5_fc_pool_update_threshold(fc_pool); *** 177 LINES SKIPPED *** From nobody Wed Nov 15 23:09:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVzPl4wlBz50s51; Wed, 15 Nov 2023 23:09: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 4SVzPl0X88z3NF8; Wed, 15 Nov 2023 23:09:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089755; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6D3q5uycpKtNszebeQ0GQ5qJt5wupyJHXHlh9O2Fk/I=; b=j/lQRFl3UMOGCAjiLqAEkbmvaBe1f6fHFf9foPMkqfgV+c+sxkykXCv94kK7JY4dqDmeFf auYqHAq70Uj/inbMesfv5Ep1hNKX5N7IkInVMhTkxM+roX3jophd7PHJ6ydV/N28g9sVfg Kd/E9PMMmj7uuUBXJLikkSDiwY+CkEpaAv/rMoRkcZJAi7TBzWNpiEpAU7zSRTG3n+GhGi HmpghrWyKftFQhwK3EgX1d9xD5QytjHuddashr1e3SC8BUvcIJxBvXzd5x9nP7HmqY2Gho sNVwDGskSTtEIT8RsYSNzXE5E0TpRd6E4F4SeVz5y1tlYS/QSnMVQzZRHHm9PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089755; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6D3q5uycpKtNszebeQ0GQ5qJt5wupyJHXHlh9O2Fk/I=; b=yvevbaUoiTaBKEclcAtGv3hYuwXdZwZQAvSjsUViHG0gnSqy4s3TtItc8HO6H5N3yxO+d9 aXv4N/HwMpRZaZYM4KWg+stW9axIVwzcjDt9lWogZtUt/mji9pzEWyR9iSwcsrqCgcCJtk 2PYwvVCbCrOlzofqjE/xpM7IjmoT6a8LQlRdRqoo5FaKyJ016HoHy3+6+5qQTyQ+lmCbzV mLIJEiCtUJoNlcUezL9dbJ/DIRZFzYE1VGez//MM10XqDGVhLCMWwt0GDEZHYFwiwaWTBS ArGAuXKtImQotZkSSq8gG8DY4Q8I3JbUfI58mutkZ39XBlNb3x62zmLWysWzfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700089755; a=rsa-sha256; cv=none; b=DBC2aZ4FydVIeWwJdmBbXXEJRgm/bTr+3YVAMdi+cc7B5tUhFNcd3HC/yTE4BK8VDVmf8S 9uAuK955D9iB1H1UmZ9fN9VPY+WqHDdrD43iS5wybS33tmn6laPTIA9S6XNfVDSRUkTkUd VJMlgAasfZROGMivCx++mSYvsmP4u+83CQgHItDz9Gr7LTWNiAbuCHYl1kPSUsp5SoxhND u9bDts1AEyeowpcBYmfzfnfYv1bgnBjNXwsGyGwz1SunWZH1AsAqYAwIl2cPp6I8LGGUdW +TLlAnyM6lHh5Kb+plfX0LUd7faF6KtsbX9Q+/fFifgRZ/dTLaEnNz4xcCrDzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVzPk6klrzbqh; Wed, 15 Nov 2023 23:09: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 3AFN9EQ6065009; Wed, 15 Nov 2023 23:09:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFN9Ess065006; Wed, 15 Nov 2023 23:09:14 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:09:14 GMT Message-Id: <202311152309.3AFN9Ess065006@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: ad744541311b - main - mlx5: add ability to attach flow counter to steering rule List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ad744541311bfddd74ea3c5d49d52a4c366b9762 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ad744541311bfddd74ea3c5d49d52a4c366b9762 commit ad744541311bfddd74ea3c5d49d52a4c366b9762 Author: Mark Bloch AuthorDate: 2023-02-22 05:44:56 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-15 23:08:17 +0000 mlx5: add ability to attach flow counter to steering rule Expose a way to attach a counter to a flow rule. Signed-off-by: Mark Bloch Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/fs.h | 2 ++ sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c | 19 +++++++++++++++++-- sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c | 3 +++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/sys/dev/mlx5/fs.h b/sys/dev/mlx5/fs.h index 65d38b9ee67a..8aaa0e201f4a 100644 --- a/sys/dev/mlx5/fs.h +++ b/sys/dev/mlx5/fs.h @@ -94,6 +94,7 @@ enum mlx5_flow_act_actions { MLX5_FLOW_ACT_ACTIONS_FLOW_TAG = 1 << 0, MLX5_FLOW_ACT_ACTIONS_MODIFY_HDR = 1 << 1, MLX5_FLOW_ACT_ACTIONS_PACKET_REFORMAT = 1 << 2, + MLX5_FLOW_ACT_ACTIONS_COUNT = 1 << 3, }; enum MLX5_FLOW_ACT_FLAGS { @@ -106,6 +107,7 @@ struct mlx5_flow_act { u32 flow_tag; struct mlx5_modify_hdr *modify_hdr; struct mlx5_pkt_reformat *pkt_reformat; + struct mlx5_fc *counter; }; #define FT_NAME_STR_SZ 20 diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c index 8032d1a632e5..0f827f0e69d3 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c @@ -182,6 +182,7 @@ int mlx5_cmd_fs_set_fte(struct mlx5_core_dev *dev, int modify_mask = 0; int atomic_mod_cap; u32 prm_action = 0; + int count_list = 0; if (sw_action != MLX5_FLOW_RULE_FWD_ACTION_DEST) dest_size = 0; @@ -195,8 +196,13 @@ int mlx5_cmd_fs_set_fte(struct mlx5_core_dev *dev, if (sw_action & MLX5_FLOW_RULE_FWD_ACTION_DEST) prm_action |= MLX5_FLOW_CONTEXT_ACTION_FWD_DEST; + if (flow_act->actions & MLX5_FLOW_ACT_ACTIONS_COUNT) { + prm_action |= MLX5_FLOW_CONTEXT_ACTION_COUNT; + count_list = 1; + } + inlen = MLX5_ST_SZ_BYTES(set_fte_in) + - dest_size * MLX5_ST_SZ_BYTES(dest_format_struct); + (dest_size + count_list) * MLX5_ST_SZ_BYTES(dest_format_struct); if (!dev) return -EINVAL; @@ -248,8 +254,10 @@ int mlx5_cmd_fs_set_fte(struct mlx5_core_dev *dev, in_match_value = MLX5_ADDR_OF(flow_context, in_flow_context, match_value); memcpy(in_match_value, match_val, MLX5_ST_SZ_BYTES(fte_match_param)); + + in_dests = MLX5_ADDR_OF(flow_context, in_flow_context, destination); + if (dest_size) { - in_dests = MLX5_ADDR_OF(flow_context, in_flow_context, destination); list_for_each_entry(dst, dests, base.list) { unsigned int id; @@ -265,6 +273,13 @@ int mlx5_cmd_fs_set_fte(struct mlx5_core_dev *dev, } } + if (flow_act->actions & MLX5_FLOW_ACT_ACTIONS_COUNT) { + MLX5_SET(dest_format_struct, in_dests, destination_id, + mlx5_fc_id(flow_act->counter)); + in_dests += MLX5_ST_SZ_BYTES(dest_format_struct); + MLX5_SET(flow_context, in_flow_context, flow_counter_list_size, 1); + } + MLX5_SET(flow_context, in_flow_context, action, prm_action); err = mlx5_cmd_exec(dev, in, inlen, out, sizeof(out)); if (!err) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c index 91543d3878ef..5966a73c58d1 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c @@ -1788,6 +1788,9 @@ static bool check_conflicting_actions(const struct mlx5_flow_act *act1, if (action1 & MLX5_FLOW_ACT_ACTIONS_PACKET_REFORMAT) return true; + if (action1 & MLX5_FLOW_ACT_ACTIONS_COUNT) + return true; + return false; } From nobody Wed Nov 15 23:09:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVzPm5Tg2z50s2f; Wed, 15 Nov 2023 23:09: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 4SVzPm1W7Nz3NK8; Wed, 15 Nov 2023 23:09:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fqnu4rUjpoxD0xwSq9P7MBntZ6DJh4seF+dAkxvZ5x4=; b=P432SiryZPlDfqj2jLAvcBjIDvz7DXJaH3D9RYMzn59WOh99hKOMVMS0LU+QGhLcAvqOwr WfN8NB+e3GrI7W6E+H33ayHeETNkDx9Jh1qu1Y20QTh8o5GiHfR21BtjDFmkTZm0rML9jG dtxv8kFnip2suyBBAIbsLI+Yim/ieRH1saZLtg+KbdFxOjiuAt/WiZskJJNnI8gdyVBE95 wX8NRURjA//OmhpQxojsQR6FxUzWbs6a2JsK9ctK0667Jf0nEvL2+fe5lXivxtqD41Ziya TpFMlvaJuQsocRG+hYTTH/WaCWUALuIlgdWy9LE3Ina5wZWnPomNvKmLfHrJfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fqnu4rUjpoxD0xwSq9P7MBntZ6DJh4seF+dAkxvZ5x4=; b=iXT42mIzHNPGiYA+2Lgk0/VpZ3c/Mmpc2NvEz5sPOOYyg3ozz1TuzbCljAcSbgOOcd1fjN dzTZHIPPlZZkEkqLRmjZxpoxSSH/Js+2M1OzrLOMRizyNtS40JlOCFJFgkhcW009MsudGs MaMd4c8Am96PDir/Oy3AUmTrX6WQomqlunUlkG+r57DLBXvlrsfCuVs/wGAAtwB/hvGioj r5GJyO1ad7gZJkpmTGBtWgTqgz61bhSuvZSnft+Oc1G2PiASrfeMqUMAwQLy/aWXaJ/3r4 6JHAQHP51GZrLw9mHErujr3IEMwKRfihEp6GvR/SdQTYrIMFs1PZAyK0iiQcFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700089756; a=rsa-sha256; cv=none; b=EbqWTM4ZrM/mPHGXaiNorz5rfK7tfTRL2MKw0VVrsEHRw0fn+Ad8PQogEPk8aprsjsdFc7 gQChCL74sdpWbYT1X7L8MqleuTsIjoSn/40PyNkddTl1q/dkn6R4Yg8rD4kpp5flm42bOf yYVWi/YcmqGam8/iDfsoGKTGd2JMJ6pRIyPubTZ1p/m1/wLsQ+nMppRRXjtnxZZqdS/94x TGunQn7xzgvq+fWJ0aPsAal7rtCvobXPtpW7LgJR/KHPEHOIoB6JrSoJrH0+jPne+ff3MR IXq6gAkYZCKbe3pncUgUQz8/CjhKilw9kcw2ANhKi5zOVRXCPkbI22BxKSeBbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVzPm0XdhzbKC; Wed, 15 Nov 2023 23:09: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 3AFN9FOK065057; Wed, 15 Nov 2023 23:09:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFN9FVv065054; Wed, 15 Nov 2023 23:09:15 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:09:15 GMT Message-Id: <202311152309.3AFN9FVv065054@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: b94ef2a3bcbb - main - mlx5ib: adjust for the mlx5_create_auto_grouped_flow_table() interface change List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b94ef2a3bcbb369d85b276a45504d42f2f2cd369 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b94ef2a3bcbb369d85b276a45504d42f2f2cd369 commit b94ef2a3bcbb369d85b276a45504d42f2f2cd369 Author: Konstantin Belousov AuthorDate: 2023-11-13 00:16:51 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-15 23:08:17 +0000 mlx5ib: adjust for the mlx5_create_auto_grouped_flow_table() interface change Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c index b4c9115bc420..027f8ded3faf 100644 --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c @@ -2157,7 +2157,8 @@ static struct mlx5_ib_flow_prio *get_flow_table(struct mlx5_ib_dev *dev, if (!ft) { ft = mlx5_create_auto_grouped_flow_table(ns, priority, "bypass", num_entries, - num_groups); + num_groups, + 0); if (!IS_ERR(ft)) { prio->refcount = 0; From nobody Wed Nov 15 23:09:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVzPn4DV4z50s1B; Wed, 15 Nov 2023 23:09: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 4SVzPn2l6Zz3NCS; Wed, 15 Nov 2023 23:09:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zXKPL95pYFQo4FewN6aZSweP+fJU7caC01DcOaalylo=; b=QZt4Mu35o3WwbfCXkV1S5V+aUGvb7ZvDNAYB2IJ7bN1govLYPtUuzKIyVjIso7H/p+8Frn v5drdCkBR2E1GkvSzVmIJj2dGmGG9u4eVnOLeyAfeWTCBPKpWUoIfCHFqCC0ibr8TPzCm9 hr29sPE3SHh5JuRdutdepTbt1HI9RR81DO4E3HsIwgmwYpwqJsA3ruUAbGs9JmrGV5UDyd +gch8Du+gRVdAui+9YwvH5WqLQ2MNKZ6vSs9TpL4KOAeIBk8L88LjdZTcJ5HBrYVk5PMno qlU+l2dzX4Sx+2N+NMrG0Aqd7HfAr8Zi5FbQKnpHYlr9HpvKuxIUg4mzPHlD7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zXKPL95pYFQo4FewN6aZSweP+fJU7caC01DcOaalylo=; b=NbkmkjQtB84vPp/WkFmAAZ12WPElUQ0vOfF4RjwnGOFhxIZBf/WnZrVVI8cmE2JGjid0N1 gkyY59C0wTviQFtl4QW39L2gb6UufJJM94B6SirVtiXKK8fm4qy4rI9us2OvIuydraJMiO qrYhMwQStLzOFxFGoL4w5C08Tbsh7SFG1Nd/KZttTsqQsOHegxxgmr5nmRtk+S9/nFG/us eKM10gldrNDDK9GPHO67MjObvexEuQ/kEp/AcNtwawraBgErTA/3gT1PD7jg2CHlvA2Y2P xllIkQKpy/AnKWdmUzMKnU4do/hu3KMaHyfQnDU/OAOgM8sTTcKMUQh0reGI9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700089757; a=rsa-sha256; cv=none; b=wRo9oJSbgQ0U2TUg2BEYjNIEe0Bi3anD1kiYV0sqv6J6WSLBSKK0k/OYffFbDMWZW75+OQ 1ChwamQJxWtLaApBOwEbLa95b/Nkd5U43lPRUXQQ/hivX6Ghv2CuB6mxP0jToKoFkx9sXH UNRqC0vaRf586HtD+vkPw22luSdtvjUf6kg3s5T1vwTmciClPKQ1bV1AKjuSzZbx03QDbb +hiFSS1x8dGfh2R37bAc3XwyGLCRBdR3+HJM12DPT5TXX6gh6SJR1/rTWGh6Jly8+W8fGE foT9KmyWpxUhH31/MT/gkiMO3DhOU2JC/kg1nG01YOQzy+f1ANSEh3F1iTKsfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVzPn1mJ1zbqj; Wed, 15 Nov 2023 23:09: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 3AFN9HRB065102; Wed, 15 Nov 2023 23:09:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFN9HuK065099; Wed, 15 Nov 2023 23:09:17 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:09:17 GMT Message-Id: <202311152309.3AFN9HuK065099@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: 7b959396ca6f - main - mlx5: Introduce new destination type TABLE_TYPE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7b959396ca6fae5635260131eedb9bc19f2726a3 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7b959396ca6fae5635260131eedb9bc19f2726a3 commit 7b959396ca6fae5635260131eedb9bc19f2726a3 Author: Patrisious Haddad AuthorDate: 2023-04-04 06:01:24 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-15 23:08:17 +0000 mlx5: Introduce new destination type TABLE_TYPE This new destination type supports flow transition between different table types, e.g. from NIC_RX to RDMA_RX or from RDMA_TX to NIC_TX. In addition add driver support to be able to query the capability for this new destination type. Signed-off-by: Patrisious Haddad Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/device.h | 4 +++ sys/dev/mlx5/mlx5_core/mlx5_main.c | 43 +++++++++++++++++++++++++++++ sys/dev/mlx5/mlx5_ifc.h | 55 ++++++++++++++++++++++++++++++++++++-- 3 files changed, 100 insertions(+), 2 deletions(-) diff --git a/sys/dev/mlx5/device.h b/sys/dev/mlx5/device.h index 11afc68efdf2..4b7cf8686794 100644 --- a/sys/dev/mlx5/device.h +++ b/sys/dev/mlx5/device.h @@ -993,6 +993,7 @@ enum mlx5_cap_type { MLX5_CAP_DEC, MLX5_CAP_TLS, MLX5_CAP_DEV_EVENT = 0x14, + MLX5_CAP_GENERAL_2 = 0x20, /* NUM OF CAP Types */ MLX5_CAP_NUM }; @@ -1031,6 +1032,9 @@ enum mlx5_mcam_feature_groups { #define MLX5_CAP_GEN_MAX(mdev, cap) \ MLX5_GET(cmd_hca_cap, mdev->hca_caps_max[MLX5_CAP_GENERAL], cap) +#define MLX5_CAP_GEN_2(mdev, cap) \ + MLX5_GET(cmd_hca_cap_2, mdev->hca_caps_cur[MLX5_CAP_GENERAL_2], cap) + #define MLX5_CAP_ETH(mdev, cap) \ MLX5_GET(per_protocol_networking_offload_caps,\ mdev->hca_caps_cur[MLX5_CAP_ETHERNET_OFFLOADS], cap) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c index df38a41a8be0..efaf726e19e5 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_main.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c @@ -559,6 +559,43 @@ static int handle_hca_cap_atomic(struct mlx5_core_dev *dev) return err; } +static int handle_hca_cap_2(struct mlx5_core_dev *dev) +{ + void *set_ctx; + void *set_hca_cap; + int set_sz = MLX5_ST_SZ_BYTES(set_hca_cap_in); + int err; + + if (MLX5_CAP_GEN_MAX(dev, hca_cap_2)) { + err = mlx5_core_get_caps(dev, MLX5_CAP_GENERAL_2); + if (err) + return err; + } else { + return 0; + } + + /* To be added if sw_vhca support was added */ + /*if (!MLX5_CAP_GEN_2_MAX(dev, sw_vhca_id_valid) || + !(dev->priv.sw_vhca_id > 0)) + return 0;*/ + + set_ctx = kzalloc(set_sz, GFP_KERNEL); + if (!set_ctx) + return -ENOMEM; + + MLX5_SET(set_hca_cap_in, set_ctx, op_mod, + MLX5_CAP_GENERAL_2 << 1); + set_hca_cap = MLX5_ADDR_OF(set_hca_cap_in, set_ctx, capability); + memcpy(set_hca_cap, dev->hca_caps_cur[MLX5_CAP_GENERAL_2], + MLX5_ST_SZ_BYTES(cmd_hca_cap_2)); + //MLX5_SET(cmd_hca_cap_2, set_hca_cap, sw_vhca_id_valid, 1); + + err = set_caps(dev, set_ctx, set_sz); + + kfree(set_ctx); + return err; +} + static int set_hca_ctrl(struct mlx5_core_dev *dev) { struct mlx5_reg_host_endianess he_in; @@ -1139,6 +1176,12 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv, goto reclaim_boot_pages; } + err = handle_hca_cap_2(dev); + if (err) { + mlx5_core_err(dev, "handle_hca_cap_2 failed\n"); + goto reclaim_boot_pages; + } + err = mlx5_satisfy_startup_pages(dev, 0); if (err) { mlx5_core_err(dev, "failed to allocate init pages\n"); diff --git a/sys/dev/mlx5/mlx5_ifc.h b/sys/dev/mlx5/mlx5_ifc.h index 7e76112cbec9..a10cb60dbfdd 100644 --- a/sys/dev/mlx5/mlx5_ifc.h +++ b/sys/dev/mlx5/mlx5_ifc.h @@ -302,6 +302,11 @@ enum { MLX5_CMD_OP_GENERAL_END = 0xd00, }; +enum { + MLX5_FT_NIC_RX_2_NIC_RX_RDMA = BIT(0), + MLX5_FT_NIC_TX_RDMA_2_NIC_TX = BIT(1), +}; + enum { MLX5_ICMD_CMDS_OPCODE_ICMD_OPCODE_QUERY_FW_INFO = 0x8007, MLX5_ICMD_CMDS_OPCODE_ICMD_QUERY_CAPABILITY = 0x8400, @@ -524,7 +529,9 @@ struct mlx5_ifc_dest_format_struct_bits { u8 destination_type[0x8]; u8 destination_id[0x18]; - u8 reserved_0[0x20]; + u8 reserved_0[0x8]; + u8 destination_table_type[0x8]; + u8 reserved_at_1[0x10]; }; struct mlx5_ifc_ipv4_layout_bits { @@ -1144,7 +1151,12 @@ enum { }; struct mlx5_ifc_cmd_hca_cap_bits { - u8 reserved_0[0x80]; + u8 reserved_0[0x20]; + + u8 hca_cap_2[0x1]; + u8 reserved_at_21[0x1f]; + + u8 reserved_at_40[0x40]; u8 log_max_srq_sz[0x8]; u8 log_max_qp_sz[0x8]; @@ -1439,10 +1451,48 @@ struct mlx5_ifc_cmd_hca_cap_bits { u8 reserved_at_7c0[0x40]; }; +struct mlx5_ifc_cmd_hca_cap_2_bits { + u8 reserved_at_0[0x80]; + + u8 migratable[0x1]; + u8 reserved_at_81[0x1f]; + + u8 max_reformat_insert_size[0x8]; + u8 max_reformat_insert_offset[0x8]; + u8 max_reformat_remove_size[0x8]; + u8 max_reformat_remove_offset[0x8]; + + u8 reserved_at_c0[0x8]; + u8 migration_multi_load[0x1]; + u8 migration_tracking_state[0x1]; + u8 reserved_at_ca[0x16]; + + u8 reserved_at_e0[0xc0]; + + u8 flow_table_type_2_type[0x8]; + u8 reserved_at_1a8[0x3]; + u8 log_min_mkey_entity_size[0x5]; + u8 reserved_at_1b0[0x10]; + + u8 reserved_at_1c0[0x60]; + + u8 reserved_at_220[0x1]; + u8 sw_vhca_id_valid[0x1]; + u8 sw_vhca_id[0xe]; + u8 reserved_at_230[0x10]; + + u8 reserved_at_240[0xb]; + u8 ts_cqe_metadata_size2wqe_counter[0x5]; + u8 reserved_at_250[0x10]; + + u8 reserved_at_260[0x5a0]; +}; + enum mlx5_flow_destination_type { MLX5_FLOW_DESTINATION_TYPE_VPORT = 0x0, MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE = 0x1, MLX5_FLOW_DESTINATION_TYPE_TIR = 0x2, + MLX5_FLOW_DESTINATION_TYPE_TABLE_TYPE = 0xA, }; union mlx5_ifc_dest_format_struct_flow_counter_list_auto_bits { @@ -2937,6 +2987,7 @@ struct mlx5_ifc_hca_vport_context_bits { union mlx5_ifc_hca_cap_union_bits { struct mlx5_ifc_cmd_hca_cap_bits cmd_hca_cap; + struct mlx5_ifc_cmd_hca_cap_2_bits cmd_hca_cap_2; struct mlx5_ifc_odp_cap_bits odp_cap; struct mlx5_ifc_atomic_caps_bits atomic_caps; struct mlx5_ifc_roce_cap_bits roce_cap; From nobody Wed Nov 15 23:09:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVzPp4Wb0z50s2k; Wed, 15 Nov 2023 23:09:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SVzPp3pwLz3NKr; Wed, 15 Nov 2023 23:09:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/QQiq9BkHc81M/wLcm12WHdxfjP3uxKJMTODnG+J0ac=; b=ii3rYGwd4/xzR4po57x3JlsMsy1p7aj8I3GrmvuI146gv/fTqEoqCDYOx+oXjPiroRTfHe JwgV1F7lbjp/1vqlXhp3UZ68MVcCzf63XqxEpQWFuZEcPXc7YXXdl+BOC4z5poHkqxJDfS 0naZEDIJtgMmU6jUPSCc/G4roXGTcE7FyBKwX79rPVJbkIBWzdpxbNxhytZXMRFk2uOWSe maLtJLWqd+fll7zHdrust4dKvCOBRSXos5mkixHsGds9JkMf1IwGhYA2pwc//DoriNizV+ j7Wb9ThNcKXd5sfr4+NE15gKtQuLi0hqBxjObG0Zcd2fjrazdJZC+GLI9tbpIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/QQiq9BkHc81M/wLcm12WHdxfjP3uxKJMTODnG+J0ac=; b=NMQFZOOuXQRdnxZ0+3V26CzWnvXP02HOk2A6sEMzf9na2/eQOdlT4BLCMvZpChqdIyEUgp +Zrk1Vrjzm5DH4cRfOpacUS5U853B6UMdiq3/XNgUBjqGlaR9VwaH4IcLFaxPPsJHAJzWP ziTL92CXcYWNSS7XOSrFcJBL5i3nQsXqkHsx6DYbwhSBUDDqsYMmQnkLnVq6ff+s7hsFTS a6pRf+9QAUD+TUA8r0SfEWfXzYCvwBE1Ypqsyz2jWyrKrEixQk3wdXT6RcdE9oVK9SQO3M 2cvmeHnrAI0lZRqRRHHy1nXFISrPLJZNQg9LfU9TWTkjan3Pm5ez92IM0z7Nfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700089758; a=rsa-sha256; cv=none; b=b7PjGq93bAN4I5q0htSIe3kPhFXJb6h8HpYxdm1FDk5wEOCPGAp460LPN1IPIYUDDbBSkJ v0Q0TA2j+5mFpw/YAmrx1wUdf64VcxdTy6R8AKi03U7iob0AfNORR7gudeC3kAuInEuAH/ 19dyuqMwsaJOdaCNZpNpojTvRpFJHNgwNzU5cOOuJKljsAeNIO0N3S20PbacFI7336AVB3 lzHUSfdpclfOdJnbYpn5KZPLFTnSwLCPuN0oW/TUgwlW+SsR9eLKlA//a2R4E33MXo60N7 qnBzsbZ8V4r112p5nWYWDSx2yla8fUcYqooy3/kEllWWs0IadEzZ0YxuzXIJLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVzPp2rZCzbkj; Wed, 15 Nov 2023 23:09:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AFN9IDG065156; Wed, 15 Nov 2023 23:09:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFN9ILR065153; Wed, 15 Nov 2023 23:09:18 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:09:18 GMT Message-Id: <202311152309.3AFN9ILR065153@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: 97beac79edf4 - main - mlx5core: add linux/bitops.h include for mlx5_ifc.h use of BIT() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 97beac79edf450851474934199e504e6244a7116 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=97beac79edf450851474934199e504e6244a7116 commit 97beac79edf450851474934199e504e6244a7116 Author: Konstantin Belousov AuthorDate: 2023-11-13 00:17:09 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-15 23:08:17 +0000 mlx5core: add linux/bitops.h include for mlx5_ifc.h use of BIT() Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/fs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/mlx5/fs.h b/sys/dev/mlx5/fs.h index 8aaa0e201f4a..8107726bc76a 100644 --- a/sys/dev/mlx5/fs.h +++ b/sys/dev/mlx5/fs.h @@ -27,6 +27,7 @@ #define _MLX5_FS_ #include +#include #include #include From nobody Wed Nov 15 23:09:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVzPq50Rcz50s56; Wed, 15 Nov 2023 23:09:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SVzPq4bD7z3NYy; Wed, 15 Nov 2023 23:09:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tzho9Ci2hoUNG0mOtiRAPI2gYbS78UG7LSMlhlSZvVM=; b=qAQZWnY00lLQP3u5CqbT5mmBFV80o4ktby9yVk0I5HHFIQJRVrkE9Wvzp3Bw3lOmUzTElg H9ncbsrJ7LFq9ESXzlY5vaDJ79Xrl6zTPJewe4Rnbw3T/wK5FV62zIVRAK54XLDqrQWMYM 1uPNxKREwUiYy40JGa7OAiVdXBCX/ML7cBR8QMTJxrnY03Vb57MLLkGOxpHd+GH7q2yJcR tSgKvo8W4hdjf72lH4IoJzFtHphVXuP4dyUK2c3D60VU9Tza02pGEkN3gooPtNBRG1514I INuhP+KAb8Y0y/33zkSQWTutKZFO520UPY8ox4BxJdNmhwhuoZvkkBQitGVztA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tzho9Ci2hoUNG0mOtiRAPI2gYbS78UG7LSMlhlSZvVM=; b=NdaBa8Hagh7qXvD2kQjVUOP2n/kDp+IBQXBwqQz5PKEWag8MpcK/19zHNyJn28Bh1gM+tY 3hmwG7TRIxO1RDTwMVfiTpOgotPj809tVtOlbQbYPbo8tpgWiqj+VD/wcdr3Xq4/qn7lFb Zz4fajeenpQ0JulN9OYo6WiRxgY34UzyaxSVb1ruaFmOQHgihk28GxKFWCPM/6wZgF3OS0 47IWr5g0wpFNmrBrWhzGFKBmv+anANyVvm/l2UseLhCzbSOO4c3jH20eq98ohnlOpLsZxh iOpcOyoD6G6GSXr2KTAfg151DaqIkTbPKEUSIsx8/hOYKvPTaW6u+8/yZop2KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700089759; a=rsa-sha256; cv=none; b=is+qmpEXncA4PxS24Jnj3zyxQGc9kQNm63/A3d/KNL1No3xrwvqNLIKMJSKHTUWh8OAEdV fjXGNnRPHnmIVVkJhHLrpe3niD6lq/XQhG3T/8q4cGkk6dCQOyIqs6C8PGYyyu6U13igSn GC5sz8XRx/aQG61vpvOc81oTqFiZkfm4n1rFVMXCCQqhstELHpcNu1LfSTk2ExQZRTKqsT HJJAauzBXxrGAQ83rpKiFXGzOwJ/KJ2dCEBQ/+UCnoSeG7CDf14B37HmK8gIQeoTtXm69I ldoSqxugbzERusdU8kbGE8ziPaSTMweLt1oFP00b4BVK0GaOjGPkCoVHiExyJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVzPq3j2lzbkk; Wed, 15 Nov 2023 23:09:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AFN9Jx1065216; Wed, 15 Nov 2023 23:09:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFN9JLs065213; Wed, 15 Nov 2023 23:09:19 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:09:19 GMT Message-Id: <202311152309.3AFN9JLs065213@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: 6eda49b7bfd3 - main - mlx5_core: add new files to the static files list List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 6eda49b7bfd3a5e013bef54262dddf9a54a3be07 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6eda49b7bfd3a5e013bef54262dddf9a54a3be07 commit 6eda49b7bfd3a5e013bef54262dddf9a54a3be07 Author: Konstantin Belousov AuthorDate: 2023-11-13 00:09:57 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-15 23:08:17 +0000 mlx5_core: add new files to the static files list Sponsored by: NVidia networking MFC after: 1 week --- sys/conf/files | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/conf/files b/sys/conf/files index 51d052e3c31d..1fecda73bf4e 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4912,8 +4912,12 @@ dev/mlx5/mlx5_core/mlx5_eq.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_eswitch.c optional mlx5 pci \ compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_fc_cmd.c optional mlx5 pci \ + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fs_cmd.c optional mlx5 pci \ compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_fs_counters.c optional mlx5 pci \ + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fs_tcp.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fs_tree.c optional mlx5 pci \ From nobody Wed Nov 15 23:13:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVzVG5Tdnz50sQh; Wed, 15 Nov 2023 23:13: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 4SVzVG4bpxz3Swd; Wed, 15 Nov 2023 23:13:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6fwo8tQt0Wrsc9rjBzkpOvoolQ9tBFgi9WpF5Ere+z4=; b=sKEH2M1mBMpTTlzBdNtW++uVTyn3whqSSGnM+6zk+C/iTTMXW9RGj8/Y9Aid/SeTS3RzcX nsS7J27HCCmW04GFbPrKSO/6hBu6th2WjVkfIxTqxIrAR/089kXLztfRrN/SDOFLEGemCC bY5prAi6xnDDM+gmUpvzgy3S6xaOKU+/xVwDK8Ke3IdfcXOy4hOSDgKVbe67tLRE3bSvqR HYv7kbJduTyyrROmrdse8bzhH/Sa9FDQKA+CE/qJ7zOE+BtqHKwYEkFS4dcgwNrJ1PrYuG llSarS52mP0PGFJKJjiu6mUioKZqd0RxC13B2J9CquRUjmN6yOIeD+Jp3QOahg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6fwo8tQt0Wrsc9rjBzkpOvoolQ9tBFgi9WpF5Ere+z4=; b=ouWkgg8odMvJd0xhjSI6TCv7RrovbiQfVTdDvlR4QcV/FVgaF5+5xdOh/IoUKSyFTn/Bxe /l/5sHhG43uNgXfn2yi+sKaUjvIHUXPMPL0XtsPgN2Va2zk0a0RcAlHlAF9gm7ZZTVirTn ObtHUA3LAz5Sgt60l87ATcPu7evJ8PaRaaFewzR/yHN1EDRs642WOFEcR4KauRIi1dWN/b S0qgCNyA0BFd+f0GTPcO7qv+e1RQ9YkleY+ojSaS+dgN7wHbgtJrm+kiheq405PdqxO58Y /g4hviht7iT6MvPsq7/gZB8g5Lqj0WopaYRgcBVDqrG8jnGDwANX1VMKEvsK2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700089990; a=rsa-sha256; cv=none; b=cwOC/6vVFJIU+a9+w91+1bRaiD/6UdIVnq2gvFtVBMGyGjBfcVVug1+YemjA7GViudaaf6 MAAVKovhZ89woO3yeHjHMaidVNuPLjVa34pf8CRyLufrXmebYZ+jJmtRk7TH9EiaBybbte CuE8X3MVwo4wwaCB7nnCQHaWwTZbUY+rGj1jSYLtQEGAG+thmyoXesAW3IvQjOFoZw5WBq tkIouoxhpd98owvV0cJ7c+b0sEFbskOWxmlmSEMIjJxVF+zPVmA5hqxlh5URo1F89z4yBQ Y6yKVJ5Ju9mollpcPjBBqHGQCCc9ewvPSUDa1V23M0xNz2QiMEFvX9jEIeqobw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SVzVG3gTrzbcm; Wed, 15 Nov 2023 23:13: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 3AFNDAIO081392; Wed, 15 Nov 2023 23:13:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFNDA85081389; Wed, 15 Nov 2023 23:13:10 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:13:10 GMT Message-Id: <202311152313.3AFNDA85081389@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: a5c2f4e93943 - main - libc/libc/rpc: refactor some global variables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a5c2f4e939430f0048136c39fb9fa6093d401905 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=a5c2f4e939430f0048136c39fb9fa6093d401905 commit a5c2f4e939430f0048136c39fb9fa6093d401905 Author: Alan Somers AuthorDate: 2023-11-09 22:58:56 +0000 Commit: Alan Somers CommitDate: 2023-11-15 23:12:50 +0000 libc/libc/rpc: refactor some global variables * Combine dg_fd_locks and dg_cv into one array. * Similarly for vc_fd_locks and vc_cv * Turn some macros into inline functions This is a mostly cosmetic change to make refactoring these strutures in a future commit easier. MFC after: 2 weeks Sponsored by: Axcient Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D42597 --- lib/libc/rpc/clnt_dg.c | 93 +++++++++++++++++++++++--------------------------- lib/libc/rpc/clnt_vc.c | 92 ++++++++++++++++++++++--------------------------- 2 files changed, 83 insertions(+), 102 deletions(-) diff --git a/lib/libc/rpc/clnt_dg.c b/lib/libc/rpc/clnt_dg.c index 40511f30135e..7f741f932c42 100644 --- a/lib/libc/rpc/clnt_dg.c +++ b/lib/libc/rpc/clnt_dg.c @@ -89,28 +89,31 @@ static void clnt_dg_destroy(CLIENT *); * This machinery implements per-fd locks for MT-safety. It is not * sufficient to do per-CLIENT handle locks for MT-safety because a * user may create more than one CLIENT handle with the same fd behind - * it. Therefore, we allocate an array of flags (dg_fd_locks), protected - * by the clnt_fd_lock mutex, and an array (dg_cv) of condition variables - * similarly protected. Dg_fd_lock[fd] == 1 => a call is active on some - * CLIENT handle created for that fd. - * The current implementation holds locks across the entire RPC and reply, - * including retransmissions. Yes, this is silly, and as soon as this - * code is proven to work, this should be the first thing fixed. One step - * at a time. + * it. Therefore, we allocate an array of flags and condition variables + * (dg_fd) protected by the clnt_fd_lock mutex. dg_fd[fd].lock == 1 => a + * call is active on some CLIENT handle created for that fd. The current + * implementation holds locks across the entire RPC and reply, including + * retransmissions. Yes, this is silly, and as soon as this code is + * proven to work, this should be the first thing fixed. One step at a + * time. */ -static int *dg_fd_locks; -static cond_t *dg_cv; -#define release_fd_lock(fd, mask) { \ - mutex_lock(&clnt_fd_lock); \ - dg_fd_locks[fd] = 0; \ - mutex_unlock(&clnt_fd_lock); \ - thr_sigsetmask(SIG_SETMASK, &(mask), NULL); \ - cond_signal(&dg_cv[fd]); \ +static struct { + int lock; + cond_t cv; +} *dg_fd; +static void +release_fd_lock(int fd, sigset_t mask) +{ + mutex_lock(&clnt_fd_lock); + dg_fd[fd].lock = 0; + mutex_unlock(&clnt_fd_lock); + thr_sigsetmask(SIG_SETMASK, &mask, NULL); + cond_signal(&dg_fd[fd].cv); } static const char mem_err_clnt_dg[] = "clnt_dg_create: out of memory"; -/* VARIABLES PROTECTED BY clnt_fd_lock: dg_fd_locks, dg_cv */ +/* VARIABLES PROTECTED BY clnt_fd_lock: dg_fd */ #define MCALL_MSG_SIZE 24 @@ -176,34 +179,22 @@ clnt_dg_create(int fd, const struct netbuf *svcaddr, rpcprog_t program, sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - if (dg_fd_locks == (int *) NULL) { - int cv_allocsz; - size_t fd_allocsz; + if (dg_fd == NULL) { + size_t allocsz; + int i; int dtbsize = __rpc_dtbsize(); - fd_allocsz = dtbsize * sizeof (int); - dg_fd_locks = (int *) mem_alloc(fd_allocsz); - if (dg_fd_locks == (int *) NULL) { + allocsz = dtbsize * sizeof (dg_fd[0]); + dg_fd = mem_alloc(allocsz); + if (dg_fd == NULL) { mutex_unlock(&clnt_fd_lock); thr_sigsetmask(SIG_SETMASK, &(mask), NULL); goto err1; - } else - memset(dg_fd_locks, '\0', fd_allocsz); - - cv_allocsz = dtbsize * sizeof (cond_t); - dg_cv = (cond_t *) mem_alloc(cv_allocsz); - if (dg_cv == (cond_t *) NULL) { - mem_free(dg_fd_locks, fd_allocsz); - dg_fd_locks = (int *) NULL; - mutex_unlock(&clnt_fd_lock); - thr_sigsetmask(SIG_SETMASK, &(mask), NULL); - goto err1; - } else { - int i; - - for (i = 0; i < dtbsize; i++) - cond_init(&dg_cv[i], 0, (void *) 0); } + memset(dg_fd, '\0', allocsz); + + for (i = 0; i < dtbsize; i++) + cond_init(&dg_fd[i].cv, 0, (void *) 0); } mutex_unlock(&clnt_fd_lock); @@ -340,13 +331,13 @@ clnt_dg_call(CLIENT *cl, rpcproc_t proc, xdrproc_t xargs, void *argsp, sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - while (dg_fd_locks[cu->cu_fd]) - cond_wait(&dg_cv[cu->cu_fd], &clnt_fd_lock); + while (dg_fd[cu->cu_fd].lock) + cond_wait(&dg_fd[cu->cu_fd].cv, &clnt_fd_lock); if (__isthreaded) rpc_lock_value = 1; else rpc_lock_value = 0; - dg_fd_locks[cu->cu_fd] = rpc_lock_value; + dg_fd[cu->cu_fd].lock = rpc_lock_value; mutex_unlock(&clnt_fd_lock); if (cu->cu_total.tv_usec == -1) { timeout = utimeout; /* use supplied timeout */ @@ -625,13 +616,13 @@ clnt_dg_freeres(CLIENT *cl, xdrproc_t xdr_res, void *res_ptr) sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - while (dg_fd_locks[cu->cu_fd]) - cond_wait(&dg_cv[cu->cu_fd], &clnt_fd_lock); + while (dg_fd[cu->cu_fd].lock) + cond_wait(&dg_fd[cu->cu_fd].cv, &clnt_fd_lock); xdrs->x_op = XDR_FREE; dummy = (*xdr_res)(xdrs, res_ptr); mutex_unlock(&clnt_fd_lock); thr_sigsetmask(SIG_SETMASK, &mask, NULL); - cond_signal(&dg_cv[cu->cu_fd]); + cond_signal(&dg_fd[cu->cu_fd].cv); return (dummy); } @@ -653,13 +644,13 @@ clnt_dg_control(CLIENT *cl, u_int request, void *info) sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - while (dg_fd_locks[cu->cu_fd]) - cond_wait(&dg_cv[cu->cu_fd], &clnt_fd_lock); + while (dg_fd[cu->cu_fd].lock) + cond_wait(&dg_fd[cu->cu_fd].cv, &clnt_fd_lock); if (__isthreaded) rpc_lock_value = 1; else rpc_lock_value = 0; - dg_fd_locks[cu->cu_fd] = rpc_lock_value; + dg_fd[cu->cu_fd].lock = rpc_lock_value; mutex_unlock(&clnt_fd_lock); switch (request) { case CLSET_FD_CLOSE: @@ -795,8 +786,8 @@ clnt_dg_destroy(CLIENT *cl) sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - while (dg_fd_locks[cu_fd]) - cond_wait(&dg_cv[cu_fd], &clnt_fd_lock); + while (dg_fd[cu_fd].lock) + cond_wait(&dg_fd[cu_fd].cv, &clnt_fd_lock); if (cu->cu_closeit) (void)_close(cu_fd); if (cu->cu_kq >= 0) @@ -810,7 +801,7 @@ clnt_dg_destroy(CLIENT *cl) mem_free(cl, sizeof (CLIENT)); mutex_unlock(&clnt_fd_lock); thr_sigsetmask(SIG_SETMASK, &mask, NULL); - cond_signal(&dg_cv[cu_fd]); + cond_signal(&dg_fd[cu_fd].cv); } static struct clnt_ops * diff --git a/lib/libc/rpc/clnt_vc.c b/lib/libc/rpc/clnt_vc.c index 25cd5a273531..8b0fe0dd7793 100644 --- a/lib/libc/rpc/clnt_vc.c +++ b/lib/libc/rpc/clnt_vc.c @@ -120,22 +120,25 @@ struct ct_data { * This machinery implements per-fd locks for MT-safety. It is not * sufficient to do per-CLIENT handle locks for MT-safety because a * user may create more than one CLIENT handle with the same fd behind - * it. Therefore, we allocate an array of flags (vc_fd_locks), protected - * by the clnt_fd_lock mutex, and an array (vc_cv) of condition variables - * similarly protected. Vc_fd_lock[fd] == 1 => a call is active on some - * CLIENT handle created for that fd. - * The current implementation holds locks across the entire RPC and reply. - * Yes, this is silly, and as soon as this code is proven to work, this - * should be the first thing fixed. One step at a time. + * it. Therefore, we allocate an array of flags and condition variables + * (vc_fd) protected by the clnt_fd_lock mutex. vc_fd_lock[fd] == 1 => a + * call is active on some CLIENT handle created for that fd. The current + * implementation holds locks across the entire RPC and reply. Yes, this + * is silly, and as soon as this code is proven to work, this should be + * the first thing fixed. One step at a time. */ -static int *vc_fd_locks; -static cond_t *vc_cv; -#define release_fd_lock(fd, mask) { \ - mutex_lock(&clnt_fd_lock); \ - vc_fd_locks[fd] = 0; \ - mutex_unlock(&clnt_fd_lock); \ - thr_sigsetmask(SIG_SETMASK, &(mask), (sigset_t *) NULL); \ - cond_signal(&vc_cv[fd]); \ +static struct { + int lock; + cond_t cv; +} *vc_fd; +static void +release_fd_lock(int fd, sigset_t mask) +{ + mutex_lock(&clnt_fd_lock); + vc_fd[fd].lock = 0; + mutex_unlock(&clnt_fd_lock); + thr_sigsetmask(SIG_SETMASK, &mask, (sigset_t *) NULL); + cond_signal(&vc_fd[fd].cv); } static const char clnt_vc_errstr[] = "%s : %s"; @@ -191,36 +194,23 @@ clnt_vc_create(int fd, const struct netbuf *raddr, const rpcprog_t prog, sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - if (vc_fd_locks == (int *) NULL) { - int cv_allocsz, fd_allocsz; + if (vc_fd == NULL) { + size_t allocsz; + int i; int dtbsize = __rpc_dtbsize(); - fd_allocsz = dtbsize * sizeof (int); - vc_fd_locks = (int *) mem_alloc(fd_allocsz); - if (vc_fd_locks == (int *) NULL) { + allocsz = dtbsize * sizeof (vc_fd[0]); + vc_fd = mem_alloc(allocsz); + if (vc_fd == NULL) { mutex_unlock(&clnt_fd_lock); thr_sigsetmask(SIG_SETMASK, &(mask), NULL); goto err; - } else - memset(vc_fd_locks, '\0', fd_allocsz); - - assert(vc_cv == (cond_t *) NULL); - cv_allocsz = dtbsize * sizeof (cond_t); - vc_cv = (cond_t *) mem_alloc(cv_allocsz); - if (vc_cv == (cond_t *) NULL) { - mem_free(vc_fd_locks, fd_allocsz); - vc_fd_locks = (int *) NULL; - mutex_unlock(&clnt_fd_lock); - thr_sigsetmask(SIG_SETMASK, &(mask), NULL); - goto err; - } else { - int i; - - for (i = 0; i < dtbsize; i++) - cond_init(&vc_cv[i], 0, (void *) 0); } - } else - assert(vc_cv != (cond_t *) NULL); + memset(vc_fd, '\0', allocsz); + + for (i = 0; i < dtbsize; i++) + cond_init(&vc_fd[i].cv, 0, (void *) 0); + } /* * XXX - fvdl connecting while holding a mutex? @@ -331,13 +321,13 @@ clnt_vc_call(CLIENT *cl, rpcproc_t proc, xdrproc_t xdr_args, void *args_ptr, sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - while (vc_fd_locks[ct->ct_fd]) - cond_wait(&vc_cv[ct->ct_fd], &clnt_fd_lock); + while (vc_fd[ct->ct_fd].lock) + cond_wait(&vc_fd[ct->ct_fd].cv, &clnt_fd_lock); if (__isthreaded) rpc_lock_value = 1; else rpc_lock_value = 0; - vc_fd_locks[ct->ct_fd] = rpc_lock_value; + vc_fd[ct->ct_fd].lock = rpc_lock_value; mutex_unlock(&clnt_fd_lock); if (!ct->ct_waitset) { /* If time is not within limits, we ignore it. */ @@ -484,13 +474,13 @@ clnt_vc_freeres(CLIENT *cl, xdrproc_t xdr_res, void *res_ptr) sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - while (vc_fd_locks[ct->ct_fd]) - cond_wait(&vc_cv[ct->ct_fd], &clnt_fd_lock); + while (vc_fd[ct->ct_fd].lock) + cond_wait(&vc_fd[ct->ct_fd].cv, &clnt_fd_lock); xdrs->x_op = XDR_FREE; dummy = (*xdr_res)(xdrs, res_ptr); mutex_unlock(&clnt_fd_lock); thr_sigsetmask(SIG_SETMASK, &(mask), NULL); - cond_signal(&vc_cv[ct->ct_fd]); + cond_signal(&vc_fd[ct->ct_fd].cv); return dummy; } @@ -531,13 +521,13 @@ clnt_vc_control(CLIENT *cl, u_int request, void *info) sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - while (vc_fd_locks[ct->ct_fd]) - cond_wait(&vc_cv[ct->ct_fd], &clnt_fd_lock); + while (vc_fd[ct->ct_fd].lock) + cond_wait(&vc_fd[ct->ct_fd].cv, &clnt_fd_lock); if (__isthreaded) rpc_lock_value = 1; else rpc_lock_value = 0; - vc_fd_locks[ct->ct_fd] = rpc_lock_value; + vc_fd[ct->ct_fd].lock = rpc_lock_value; mutex_unlock(&clnt_fd_lock); switch (request) { @@ -648,8 +638,8 @@ clnt_vc_destroy(CLIENT *cl) sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - while (vc_fd_locks[ct_fd]) - cond_wait(&vc_cv[ct_fd], &clnt_fd_lock); + while (vc_fd[ct_fd].lock) + cond_wait(&vc_fd[ct_fd].cv, &clnt_fd_lock); if (ct->ct_closeit && ct->ct_fd != -1) { (void)_close(ct->ct_fd); } @@ -663,7 +653,7 @@ clnt_vc_destroy(CLIENT *cl) mem_free(cl, sizeof(CLIENT)); mutex_unlock(&clnt_fd_lock); thr_sigsetmask(SIG_SETMASK, &(mask), NULL); - cond_signal(&vc_cv[ct_fd]); + cond_signal(&vc_fd[ct_fd].cv); } /* From nobody Wed Nov 15 23:13:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SVzVJ0rB7z50s6S; Wed, 15 Nov 2023 23:13: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 4SVzVH5gcqz3Smk; Wed, 15 Nov 2023 23:13:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rj5xKyt0dja7XZR77STs2jYWnO1ZtRnf+ygc9Df5GY4=; b=ijQOr2LaYMAec84Z82v/s0DnrmRN0vTpYEBTZUfXNxjRYH3iZYXK1Sz4qxiC3A4eD3NNZ7 YbwsIXKKvwErCOPLdfXazkVej1KEPAs/cg5pMSdXs1sMxcGyXLvBtog0QIXWfupCpCCCDQ 3IjGF5/XUSxDdIL8Eoc2afwudt3Mqw5dOzAOhrad6hI+KlCsNLepScb3AU5BN7LVY4F3CQ H70VFC9SxyIjJzlOmfXRTmFNwcd70U3/ZnPAiSAYk/1bTMhfn44b5bUFXKBgbIZD3Wzbwi 7CdS6YeQfcWKawN+Q+wvhUvA2+r9HnRasuWvGGTrAxaGnZFMI7WJiuYKCxX1iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700089991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rj5xKyt0dja7XZR77STs2jYWnO1ZtRnf+ygc9Df5GY4=; b=bjHTZaxMsieKfny/FeVydZLE9KULAYipxt+dZ5MeYBYR6CN2aYLv+uu0bELWtqqJZJLoEv TpxLrqYGjY1i/434qnabBG7Oylh1JykRlkqR6X6qL4dUdjNHUwrbpwWnfoApKQfPis5SgR BjEHEnSkvwUUIFpRXUmF953Uq8Jq7S5NN7WdG4ybYu2MOBf+8KBe2lsyvOIKGnge4TC75i yz9UEY68ysmtvXXaoVo9ROeHyPGAsHse5H/EjCcCDlVOCkohf6tgp6Z44tq0FDfMmyDkQN q19OhkV+jmIPR4IUzlSBh9VD9WgXfiw6ODZ1BkG3kbY2AH9q3QBWI+A4QvCP/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700089991; a=rsa-sha256; cv=none; b=N5Kp1bcmIcX29BT8udOzETE2vOvQea5uZD5TQNBIu5etRBsYmDnrJLm+XGoxqwYkrE+0DL CimKUmU6OcOGjrNvcOC9FbkbeLBN/YNUoT714Zt/i/EwD0NjGL6bMeOAZGudiW4rybEdYX 5t4DblhZMdyhS+8oc3zqjrc1bEOjtdVPM19trrzeoIuxDEwyGLIE8kbflIpOSvVTeqmjnM 71CI7iWflys1Dqu0iv02MEe+dSMa+TFfciVMqsLLGFxE95F2TzTWvlK+54l+nxrgaKtISk 5fIexGqtrbZMBxCg6auiry+4v7V37cgwZDrkJI2SQEYQ49No+kW8x+o3vl3l/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 4SVzVH4bc0zcDL; Wed, 15 Nov 2023 23:13: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 3AFNDBud081457; Wed, 15 Nov 2023 23:13:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFNDBxF081454; Wed, 15 Nov 2023 23:13:11 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:13:11 GMT Message-Id: <202311152313.3AFNDBxF081454@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: 24938f9311c9 - main - lib/libc/rpc: switch the per-fd structs in clnt_{dg,vc}.c 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: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 24938f9311c9c9acc1ce747f4e6a088c2dbc967d Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=24938f9311c9c9acc1ce747f4e6a088c2dbc967d commit 24938f9311c9c9acc1ce747f4e6a088c2dbc967d Author: Alan Somers AuthorDate: 2023-11-10 17:28:32 +0000 Commit: Alan Somers CommitDate: 2023-11-15 23:12:50 +0000 lib/libc/rpc: switch the per-fd structs in clnt_{dg,vc}.c to RB Trees This saves oodles of memory, especially when "ulimit -n" is large. It also prevents a buffer overflow if getrlimit should fail. Also replace per-fd condvars with mutexes to simplify the code. PR: 274968 MFC after: 2 weeks Sponsored by: Axcient Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D42597 --- include/rpc/rpc_com.h | 1 - lib/libc/rpc/clnt_dg.c | 153 ++++++++++++++++++++--------------------- lib/libc/rpc/clnt_vc.c | 165 +++++++++++++++++++++++---------------------- lib/libc/rpc/rpc_com.h | 1 - lib/libc/rpc/rpc_generic.c | 23 ------- sys/rpc/rpc_com.h | 1 - 6 files changed, 162 insertions(+), 182 deletions(-) diff --git a/include/rpc/rpc_com.h b/include/rpc/rpc_com.h index a98e3f73bac8..a0a8c8872efa 100644 --- a/include/rpc/rpc_com.h +++ b/include/rpc/rpc_com.h @@ -58,7 +58,6 @@ __BEGIN_DECLS extern u_int __rpc_get_a_size(int); -extern int __rpc_dtbsize(void); extern int _rpc_dtablesize(void); extern struct netconfig * __rpcgettp(int); extern int __rpc_get_default_domain(char **); diff --git a/lib/libc/rpc/clnt_dg.c b/lib/libc/rpc/clnt_dg.c index 7f741f932c42..c2a45b9d037f 100644 --- a/lib/libc/rpc/clnt_dg.c +++ b/lib/libc/rpc/clnt_dg.c @@ -48,13 +48,17 @@ static char sccsid[] = "@(#)clnt_dg.c 1.19 89/03/16 Copyr 1988 Sun Micro"; #include #include #include +#include #include #include #include +#include #include +#include #include #include #include +#include #include #include #include "un-namespace.h" @@ -89,26 +93,60 @@ static void clnt_dg_destroy(CLIENT *); * This machinery implements per-fd locks for MT-safety. It is not * sufficient to do per-CLIENT handle locks for MT-safety because a * user may create more than one CLIENT handle with the same fd behind - * it. Therefore, we allocate an array of flags and condition variables - * (dg_fd) protected by the clnt_fd_lock mutex. dg_fd[fd].lock == 1 => a - * call is active on some CLIENT handle created for that fd. The current - * implementation holds locks across the entire RPC and reply, including - * retransmissions. Yes, this is silly, and as soon as this code is - * proven to work, this should be the first thing fixed. One step at a - * time. + * it. Therefore, we allocate an associative array of flags and condition + * variables (dg_fd). The flags and the array are protected by the + * clnt_fd_lock mutex. dg_fd[fd].lock == 1 => a call is active on some + * CLIENT handle created for that fd. The current implementation holds + * locks across the entire RPC and reply, including retransmissions. Yes, + * this is silly, and as soon as this code is proven to work, this should + * be the first thing fixed. One step at a time. */ -static struct { - int lock; - cond_t cv; -} *dg_fd; +struct dg_fd { + RB_ENTRY(dg_fd) dg_link; + int fd; + mutex_t mtx; +}; +static inline int +cmp_dg_fd(struct dg_fd *a, struct dg_fd *b) +{ + if (a->fd > b->fd) { + return (1); + } else if (a->fd < b->fd) { + return (-1); + } else { + return (0); + } +} +RB_HEAD(dg_fd_list, dg_fd); +RB_PROTOTYPE(dg_fd_list, dg_fd, dg_link, cmp_dg_fd); +RB_GENERATE(dg_fd_list, dg_fd, dg_link, cmp_dg_fd); +struct dg_fd_list dg_fd_head = RB_INITIALIZER(&dg_fd_head); + +/* + * Find the lock structure for the given file descriptor, or initialize it if + * it does not already exist. The clnt_fd_lock mutex must be held. + */ +static struct dg_fd * +dg_fd_find(int fd) +{ + struct dg_fd key, *elem; + + key.fd = fd; + elem = RB_FIND(dg_fd_list, &dg_fd_head, &key); + if (elem == NULL) { + elem = calloc(1, sizeof(*elem)); + elem->fd = fd; + mutex_init(&elem->mtx, NULL); + RB_INSERT(dg_fd_list, &dg_fd_head, elem); + } + return (elem); +} + static void -release_fd_lock(int fd, sigset_t mask) +release_fd_lock(struct dg_fd *elem, sigset_t mask) { - mutex_lock(&clnt_fd_lock); - dg_fd[fd].lock = 0; - mutex_unlock(&clnt_fd_lock); + mutex_unlock(&elem->mtx); thr_sigsetmask(SIG_SETMASK, &mask, NULL); - cond_signal(&dg_fd[fd].cv); } static const char mem_err_clnt_dg[] = "clnt_dg_create: out of memory"; @@ -171,35 +209,9 @@ clnt_dg_create(int fd, const struct netbuf *svcaddr, rpcprog_t program, struct cu_data *cu = NULL; /* private data */ struct timeval now; struct rpc_msg call_msg; - sigset_t mask; - sigset_t newmask; struct __rpc_sockinfo si; int one = 1; - sigfillset(&newmask); - thr_sigsetmask(SIG_SETMASK, &newmask, &mask); - mutex_lock(&clnt_fd_lock); - if (dg_fd == NULL) { - size_t allocsz; - int i; - int dtbsize = __rpc_dtbsize(); - - allocsz = dtbsize * sizeof (dg_fd[0]); - dg_fd = mem_alloc(allocsz); - if (dg_fd == NULL) { - mutex_unlock(&clnt_fd_lock); - thr_sigsetmask(SIG_SETMASK, &(mask), NULL); - goto err1; - } - memset(dg_fd, '\0', allocsz); - - for (i = 0; i < dtbsize; i++) - cond_init(&dg_fd[i].cv, 0, (void *) 0); - } - - mutex_unlock(&clnt_fd_lock); - thr_sigsetmask(SIG_SETMASK, &(mask), NULL); - if (svcaddr == NULL) { rpc_createerr.cf_stat = RPC_UNKNOWNADDR; return (NULL); @@ -320,25 +332,21 @@ clnt_dg_call(CLIENT *cl, rpcproc_t proc, xdrproc_t xargs, void *argsp, struct timespec ts; struct kevent kv; struct sockaddr *sa; + struct dg_fd *elem; sigset_t mask; sigset_t newmask; socklen_t salen; ssize_t recvlen = 0; - int kin_len, n, rpc_lock_value; + int kin_len, n; u_int32_t xid; outlen = 0; sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - while (dg_fd[cu->cu_fd].lock) - cond_wait(&dg_fd[cu->cu_fd].cv, &clnt_fd_lock); - if (__isthreaded) - rpc_lock_value = 1; - else - rpc_lock_value = 0; - dg_fd[cu->cu_fd].lock = rpc_lock_value; + elem = dg_fd_find(cu->cu_fd); mutex_unlock(&clnt_fd_lock); + mutex_lock(&elem->mtx); if (cu->cu_total.tv_usec == -1) { timeout = utimeout; /* use supplied timeout */ } else { @@ -592,7 +600,7 @@ out: if (cu->cu_kq >= 0) _close(cu->cu_kq); cu->cu_kq = -1; - release_fd_lock(cu->cu_fd, mask); + release_fd_lock(elem, mask); return (cu->cu_error.re_status); } @@ -608,6 +616,7 @@ static bool_t clnt_dg_freeres(CLIENT *cl, xdrproc_t xdr_res, void *res_ptr) { struct cu_data *cu = (struct cu_data *)cl->cl_private; + struct dg_fd *elem; XDR *xdrs = &(cu->cu_outxdrs); bool_t dummy; sigset_t mask; @@ -616,13 +625,12 @@ clnt_dg_freeres(CLIENT *cl, xdrproc_t xdr_res, void *res_ptr) sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - while (dg_fd[cu->cu_fd].lock) - cond_wait(&dg_fd[cu->cu_fd].cv, &clnt_fd_lock); + elem = dg_fd_find(cu->cu_fd); + mutex_lock(&elem->mtx); xdrs->x_op = XDR_FREE; dummy = (*xdr_res)(xdrs, res_ptr); mutex_unlock(&clnt_fd_lock); - thr_sigsetmask(SIG_SETMASK, &mask, NULL); - cond_signal(&dg_fd[cu->cu_fd].cv); + release_fd_lock(elem, mask); return (dummy); } @@ -637,41 +645,36 @@ clnt_dg_control(CLIENT *cl, u_int request, void *info) { struct cu_data *cu = (struct cu_data *)cl->cl_private; struct netbuf *addr; + struct dg_fd *elem; sigset_t mask; sigset_t newmask; - int rpc_lock_value; sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - while (dg_fd[cu->cu_fd].lock) - cond_wait(&dg_fd[cu->cu_fd].cv, &clnt_fd_lock); - if (__isthreaded) - rpc_lock_value = 1; - else - rpc_lock_value = 0; - dg_fd[cu->cu_fd].lock = rpc_lock_value; + elem = dg_fd_find(cu->cu_fd); mutex_unlock(&clnt_fd_lock); + mutex_lock(&elem->mtx); switch (request) { case CLSET_FD_CLOSE: cu->cu_closeit = TRUE; - release_fd_lock(cu->cu_fd, mask); + release_fd_lock(elem, mask); return (TRUE); case CLSET_FD_NCLOSE: cu->cu_closeit = FALSE; - release_fd_lock(cu->cu_fd, mask); + release_fd_lock(elem, mask); return (TRUE); } /* for other requests which use info */ if (info == NULL) { - release_fd_lock(cu->cu_fd, mask); + release_fd_lock(elem, mask); return (FALSE); } switch (request) { case CLSET_TIMEOUT: if (time_not_ok((struct timeval *)info)) { - release_fd_lock(cu->cu_fd, mask); + release_fd_lock(elem, mask); return (FALSE); } cu->cu_total = *(struct timeval *)info; @@ -685,7 +688,7 @@ clnt_dg_control(CLIENT *cl, u_int request, void *info) break; case CLSET_RETRY_TIMEOUT: if (time_not_ok((struct timeval *)info)) { - release_fd_lock(cu->cu_fd, mask); + release_fd_lock(elem, mask); return (FALSE); } cu->cu_wait = *(struct timeval *)info; @@ -705,7 +708,7 @@ clnt_dg_control(CLIENT *cl, u_int request, void *info) case CLSET_SVC_ADDR: /* set to new address */ addr = (struct netbuf *)info; if (addr->len < sizeof cu->cu_raddr) { - release_fd_lock(cu->cu_fd, mask); + release_fd_lock(elem, mask); return (FALSE); } (void) memcpy(&cu->cu_raddr, addr->buf, addr->len); @@ -768,10 +771,10 @@ clnt_dg_control(CLIENT *cl, u_int request, void *info) cu->cu_connect = *(int *)info; break; default: - release_fd_lock(cu->cu_fd, mask); + release_fd_lock(elem, mask); return (FALSE); } - release_fd_lock(cu->cu_fd, mask); + release_fd_lock(elem, mask); return (TRUE); } @@ -779,6 +782,7 @@ static void clnt_dg_destroy(CLIENT *cl) { struct cu_data *cu = (struct cu_data *)cl->cl_private; + struct dg_fd *elem; int cu_fd = cu->cu_fd; sigset_t mask; sigset_t newmask; @@ -786,8 +790,8 @@ clnt_dg_destroy(CLIENT *cl) sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - while (dg_fd[cu_fd].lock) - cond_wait(&dg_fd[cu_fd].cv, &clnt_fd_lock); + elem = dg_fd_find(cu_fd); + mutex_lock(&elem->mtx); if (cu->cu_closeit) (void)_close(cu_fd); if (cu->cu_kq >= 0) @@ -800,8 +804,7 @@ clnt_dg_destroy(CLIENT *cl) mem_free(cl->cl_tp, strlen(cl->cl_tp) +1); mem_free(cl, sizeof (CLIENT)); mutex_unlock(&clnt_fd_lock); - thr_sigsetmask(SIG_SETMASK, &mask, NULL); - cond_signal(&dg_fd[cu_fd].cv); + release_fd_lock(elem, mask); } static struct clnt_ops * diff --git a/lib/libc/rpc/clnt_vc.c b/lib/libc/rpc/clnt_vc.c index 8b0fe0dd7793..7a155d0f918b 100644 --- a/lib/libc/rpc/clnt_vc.c +++ b/lib/libc/rpc/clnt_vc.c @@ -60,6 +60,7 @@ static char sccsid3[] = "@(#)clnt_vc.c 1.19 89/03/16 Copyr 1988 Sun Micro"; #include #include #include +#include #include #include @@ -68,7 +69,9 @@ static char sccsid3[] = "@(#)clnt_vc.c 1.19 89/03/16 Copyr 1988 Sun Micro"; #include #include #include +#include #include +#include #include #include #include @@ -120,25 +123,60 @@ struct ct_data { * This machinery implements per-fd locks for MT-safety. It is not * sufficient to do per-CLIENT handle locks for MT-safety because a * user may create more than one CLIENT handle with the same fd behind - * it. Therefore, we allocate an array of flags and condition variables - * (vc_fd) protected by the clnt_fd_lock mutex. vc_fd_lock[fd] == 1 => a - * call is active on some CLIENT handle created for that fd. The current - * implementation holds locks across the entire RPC and reply. Yes, this - * is silly, and as soon as this code is proven to work, this should be - * the first thing fixed. One step at a time. + * it. Therefore, we allocate an associative array of flags and condition + * variables (vc_fd). The flags and the array are protected by the + * clnt_fd_lock mutex. vc_fd_lock[fd] == 1 => a call is active on some + * CLIENT handle created for that fd. The current implementation holds + * locks across the entire RPC and reply. Yes, this is silly, and as soon + * as this code is proven to work, this should be the first thing fixed. + * One step at a time. */ -static struct { - int lock; - cond_t cv; -} *vc_fd; +struct vc_fd { + RB_ENTRY(vc_fd) vc_link; + int fd; + mutex_t mtx; +}; +static inline int +cmp_vc_fd(struct vc_fd *a, struct vc_fd *b) +{ + if (a->fd > b->fd) { + return (1); + } else if (a->fd < b->fd) { + return (-1); + } else { + return (0); + } +} +RB_HEAD(vc_fd_list, vc_fd); +RB_PROTOTYPE(vc_fd_list, vc_fd, vc_link, cmp_vc_fd); +RB_GENERATE(vc_fd_list, vc_fd, vc_link, cmp_vc_fd); +struct vc_fd_list vc_fd_head = RB_INITIALIZER(&vc_fd_head); + +/* + * Find the lock structure for the given file descriptor, or initialize it if + * it does not already exist. The clnt_fd_lock mutex must be held. + */ +static struct vc_fd * +vc_fd_find(int fd) +{ + struct vc_fd key, *elem; + + key.fd = fd; + elem = RB_FIND(vc_fd_list, &vc_fd_head, &key); + if (elem == NULL) { + elem = calloc(1, sizeof(*elem)); + elem->fd = fd; + mutex_init(&elem->mtx, NULL); + RB_INSERT(vc_fd_list, &vc_fd_head, elem); + } + return (elem); +} + static void -release_fd_lock(int fd, sigset_t mask) +release_fd_lock(struct vc_fd *elem, sigset_t mask) { - mutex_lock(&clnt_fd_lock); - vc_fd[fd].lock = 0; - mutex_unlock(&clnt_fd_lock); - thr_sigsetmask(SIG_SETMASK, &mask, (sigset_t *) NULL); - cond_signal(&vc_fd[fd].cv); + mutex_unlock(&elem->mtx); + thr_sigsetmask(SIG_SETMASK, &mask, NULL); } static const char clnt_vc_errstr[] = "%s : %s"; @@ -172,8 +210,6 @@ clnt_vc_create(int fd, const struct netbuf *raddr, const rpcprog_t prog, struct timeval now; struct rpc_msg call_msg; static u_int32_t disrupt; - sigset_t mask; - sigset_t newmask; struct sockaddr_storage ss; socklen_t slen; struct __rpc_sockinfo si; @@ -191,26 +227,6 @@ clnt_vc_create(int fd, const struct netbuf *raddr, const rpcprog_t prog, goto err; } ct->ct_addr.buf = NULL; - sigfillset(&newmask); - thr_sigsetmask(SIG_SETMASK, &newmask, &mask); - mutex_lock(&clnt_fd_lock); - if (vc_fd == NULL) { - size_t allocsz; - int i; - int dtbsize = __rpc_dtbsize(); - - allocsz = dtbsize * sizeof (vc_fd[0]); - vc_fd = mem_alloc(allocsz); - if (vc_fd == NULL) { - mutex_unlock(&clnt_fd_lock); - thr_sigsetmask(SIG_SETMASK, &(mask), NULL); - goto err; - } - memset(vc_fd, '\0', allocsz); - - for (i = 0; i < dtbsize; i++) - cond_init(&vc_fd[i].cv, 0, (void *) 0); - } /* * XXX - fvdl connecting while holding a mutex? @@ -221,19 +237,16 @@ clnt_vc_create(int fd, const struct netbuf *raddr, const rpcprog_t prog, rpc_createerr.cf_stat = RPC_SYSTEMERROR; rpc_createerr.cf_error.re_errno = errno; mutex_unlock(&clnt_fd_lock); - thr_sigsetmask(SIG_SETMASK, &(mask), NULL); goto err; } if (_connect(fd, (struct sockaddr *)raddr->buf, raddr->len) < 0){ rpc_createerr.cf_stat = RPC_SYSTEMERROR; rpc_createerr.cf_error.re_errno = errno; mutex_unlock(&clnt_fd_lock); - thr_sigsetmask(SIG_SETMASK, &(mask), NULL); goto err; } } mutex_unlock(&clnt_fd_lock); - thr_sigsetmask(SIG_SETMASK, &(mask), NULL); if (!__rpc_fd2sockinfo(fd, &si)) goto err; @@ -308,12 +321,12 @@ clnt_vc_call(CLIENT *cl, rpcproc_t proc, xdrproc_t xdr_args, void *args_ptr, struct ct_data *ct = (struct ct_data *) cl->cl_private; XDR *xdrs = &(ct->ct_xdrs); struct rpc_msg reply_msg; + struct vc_fd *elem; u_int32_t x_id; u_int32_t *msg_x_id = &ct->ct_u.ct_mcalli; /* yuk */ bool_t shipnow; int refreshes = 2; sigset_t mask, newmask; - int rpc_lock_value; bool_t reply_stat; assert(cl != NULL); @@ -321,14 +334,9 @@ clnt_vc_call(CLIENT *cl, rpcproc_t proc, xdrproc_t xdr_args, void *args_ptr, sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - while (vc_fd[ct->ct_fd].lock) - cond_wait(&vc_fd[ct->ct_fd].cv, &clnt_fd_lock); - if (__isthreaded) - rpc_lock_value = 1; - else - rpc_lock_value = 0; - vc_fd[ct->ct_fd].lock = rpc_lock_value; + elem = vc_fd_find(ct->ct_fd); mutex_unlock(&clnt_fd_lock); + mutex_lock(&elem->mtx); if (!ct->ct_waitset) { /* If time is not within limits, we ignore it. */ if (time_not_ok(&timeout) == FALSE) @@ -352,7 +360,7 @@ call_again: if (ct->ct_error.re_status == RPC_SUCCESS) ct->ct_error.re_status = RPC_CANTENCODEARGS; (void)xdrrec_endofrecord(xdrs, TRUE); - release_fd_lock(ct->ct_fd, mask); + release_fd_lock(elem, mask); return (ct->ct_error.re_status); } } else { @@ -363,23 +371,23 @@ call_again: if (ct->ct_error.re_status == RPC_SUCCESS) ct->ct_error.re_status = RPC_CANTENCODEARGS; (void)xdrrec_endofrecord(xdrs, TRUE); - release_fd_lock(ct->ct_fd, mask); + release_fd_lock(elem, mask); return (ct->ct_error.re_status); } } if (! xdrrec_endofrecord(xdrs, shipnow)) { - release_fd_lock(ct->ct_fd, mask); + release_fd_lock(elem, mask); return (ct->ct_error.re_status = RPC_CANTSEND); } if (! shipnow) { - release_fd_lock(ct->ct_fd, mask); + release_fd_lock(elem, mask); return (RPC_SUCCESS); } /* * Hack to provide rpc-based message passing */ if (timeout.tv_sec == 0 && timeout.tv_usec == 0) { - release_fd_lock(ct->ct_fd, mask); + release_fd_lock(elem, mask); return(ct->ct_error.re_status = RPC_TIMEDOUT); } @@ -393,14 +401,14 @@ call_again: reply_msg.acpted_rply.ar_results.where = NULL; reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void; if (! xdrrec_skiprecord(xdrs)) { - release_fd_lock(ct->ct_fd, mask); + release_fd_lock(elem, mask); return (ct->ct_error.re_status); } /* now decode and validate the response header */ if (! xdr_replymsg(xdrs, &reply_msg)) { if (ct->ct_error.re_status == RPC_SUCCESS) continue; - release_fd_lock(ct->ct_fd, mask); + release_fd_lock(elem, mask); return (ct->ct_error.re_status); } if (reply_msg.rm_xid == x_id) @@ -441,7 +449,7 @@ call_again: if (refreshes-- && AUTH_REFRESH(cl->cl_auth, &reply_msg)) goto call_again; } /* end of unsuccessful completion */ - release_fd_lock(ct->ct_fd, mask); + release_fd_lock(elem, mask); return (ct->ct_error.re_status); } @@ -461,6 +469,7 @@ static bool_t clnt_vc_freeres(CLIENT *cl, xdrproc_t xdr_res, void *res_ptr) { struct ct_data *ct; + struct vc_fd *elem; XDR *xdrs; bool_t dummy; sigset_t mask; @@ -474,14 +483,13 @@ clnt_vc_freeres(CLIENT *cl, xdrproc_t xdr_res, void *res_ptr) sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - while (vc_fd[ct->ct_fd].lock) - cond_wait(&vc_fd[ct->ct_fd].cv, &clnt_fd_lock); + elem = vc_fd_find(ct->ct_fd); + mutex_lock(&elem->mtx); xdrs->x_op = XDR_FREE; dummy = (*xdr_res)(xdrs, res_ptr); - mutex_unlock(&clnt_fd_lock); - thr_sigsetmask(SIG_SETMASK, &(mask), NULL); - cond_signal(&vc_fd[ct->ct_fd].cv); + mutex_unlock(&clnt_fd_lock); + release_fd_lock(elem, mask); return dummy; } @@ -509,10 +517,10 @@ static bool_t clnt_vc_control(CLIENT *cl, u_int request, void *info) { struct ct_data *ct; + struct vc_fd *elem; void *infop = info; sigset_t mask; sigset_t newmask; - int rpc_lock_value; assert(cl != NULL); @@ -521,23 +529,18 @@ clnt_vc_control(CLIENT *cl, u_int request, void *info) sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - while (vc_fd[ct->ct_fd].lock) - cond_wait(&vc_fd[ct->ct_fd].cv, &clnt_fd_lock); - if (__isthreaded) - rpc_lock_value = 1; - else - rpc_lock_value = 0; - vc_fd[ct->ct_fd].lock = rpc_lock_value; + elem = vc_fd_find(ct->ct_fd); mutex_unlock(&clnt_fd_lock); + mutex_lock(&elem->mtx); switch (request) { case CLSET_FD_CLOSE: ct->ct_closeit = TRUE; - release_fd_lock(ct->ct_fd, mask); + release_fd_lock(elem, mask); return (TRUE); case CLSET_FD_NCLOSE: ct->ct_closeit = FALSE; - release_fd_lock(ct->ct_fd, mask); + release_fd_lock(elem, mask); return (TRUE); default: break; @@ -545,13 +548,13 @@ clnt_vc_control(CLIENT *cl, u_int request, void *info) /* for other requests which use info */ if (info == NULL) { - release_fd_lock(ct->ct_fd, mask); + release_fd_lock(elem, mask); return (FALSE); } switch (request) { case CLSET_TIMEOUT: if (time_not_ok((struct timeval *)info)) { - release_fd_lock(ct->ct_fd, mask); + release_fd_lock(elem, mask); return (FALSE); } ct->ct_wait = *(struct timeval *)infop; @@ -571,7 +574,7 @@ clnt_vc_control(CLIENT *cl, u_int request, void *info) *(struct netbuf *)info = ct->ct_addr; break; case CLSET_SVC_ADDR: /* set to new address */ - release_fd_lock(ct->ct_fd, mask); + release_fd_lock(elem, mask); return (FALSE); case CLGET_XID: /* @@ -615,10 +618,10 @@ clnt_vc_control(CLIENT *cl, u_int request, void *info) break; default: - release_fd_lock(ct->ct_fd, mask); + release_fd_lock(elem, mask); return (FALSE); } - release_fd_lock(ct->ct_fd, mask); + release_fd_lock(elem, mask); return (TRUE); } @@ -627,6 +630,7 @@ static void clnt_vc_destroy(CLIENT *cl) { struct ct_data *ct = (struct ct_data *) cl->cl_private; + struct vc_fd *elem; int ct_fd = ct->ct_fd; sigset_t mask; sigset_t newmask; @@ -638,8 +642,8 @@ clnt_vc_destroy(CLIENT *cl) sigfillset(&newmask); thr_sigsetmask(SIG_SETMASK, &newmask, &mask); mutex_lock(&clnt_fd_lock); - while (vc_fd[ct_fd].lock) - cond_wait(&vc_fd[ct_fd].cv, &clnt_fd_lock); + elem = vc_fd_find(ct_fd); + mutex_lock(&elem->mtx); if (ct->ct_closeit && ct->ct_fd != -1) { (void)_close(ct->ct_fd); } @@ -652,8 +656,7 @@ clnt_vc_destroy(CLIENT *cl) mem_free(cl->cl_tp, strlen(cl->cl_tp) +1); mem_free(cl, sizeof(CLIENT)); mutex_unlock(&clnt_fd_lock); - thr_sigsetmask(SIG_SETMASK, &(mask), NULL); - cond_signal(&vc_fd[ct_fd].cv); + release_fd_lock(elem, mask); } /* diff --git a/lib/libc/rpc/rpc_com.h b/lib/libc/rpc/rpc_com.h index ce386e540f07..40fd81499165 100644 --- a/lib/libc/rpc/rpc_com.h +++ b/lib/libc/rpc/rpc_com.h @@ -59,7 +59,6 @@ __BEGIN_DECLS extern u_int __rpc_get_a_size(int); -extern int __rpc_dtbsize(void); extern struct netconfig * __rpcgettp(int); extern int __rpc_get_default_domain(char **); diff --git a/lib/libc/rpc/rpc_generic.c b/lib/libc/rpc/rpc_generic.c index 99e3c1263c18..5195c0dc2ac0 100644 --- a/lib/libc/rpc/rpc_generic.c +++ b/lib/libc/rpc/rpc_generic.c @@ -104,29 +104,6 @@ static char *strlocase(char *); #endif static int getnettype(const char *); -/* - * Cache the result of getrlimit(), so we don't have to do an - * expensive call every time. - */ -int -__rpc_dtbsize(void) -{ - static int tbsize; - struct rlimit rl; - - if (tbsize) { - return (tbsize); - } - if (getrlimit(RLIMIT_NOFILE, &rl) == 0) { - return (tbsize = (int)rl.rlim_max); - } - /* - * Something wrong. I'll try to save face by returning a - * pessimistic number. - */ - return (32); -} - /* * Find the appropriate buffer size diff --git a/sys/rpc/rpc_com.h b/sys/rpc/rpc_com.h index 0206971dde2a..facd36c26a39 100644 --- a/sys/rpc/rpc_com.h +++ b/sys/rpc/rpc_com.h @@ -70,7 +70,6 @@ __BEGIN_DECLS #ifndef _KERNEL extern u_int __rpc_get_a_size(int); -extern int __rpc_dtbsize(void); extern struct netconfig * __rpcgettp(int); extern int __rpc_get_default_domain(char **); From nobody Wed Nov 15 23:46:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SW0F01l9Jz50tW1; Wed, 15 Nov 2023 23:46: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 4SW0F00yNXz3W9J; Wed, 15 Nov 2023 23:46:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700092004; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YXPuieZseHIvLvFdt5w/J6sqHgi9MLTVh0ZtMKAgF60=; b=mfoyURLTGgn3nXOnsv2WKfmREhACsucFGKlFxKPn9T30mfSSoH+CX86+yjM/jcfPgfaBkx nP8A8avqTzBn4Rp9qIw3UI6cCNStcg5exKNq6lnehpaZ3g00oFqEodY1DJj0JgN/0oOnfY XJ1AqBtoQKaxrk7e2O/rSaMVynzk9JkjpFnKid2PZERpD5H1K5P2PfXWWM6YG+PA1O+/gc fhRUcEya2MSj74G06zIdXA0z6bQWwOAZ7b5t17L1XH3JYRWnMfcKaBaobnDVWpmdcP94Yu mPNI77UJCCFPmeanQj1w1APIQNp1O4nOvPd/VMYu2QoY1t1zD2UxENeJmz/UFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700092004; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YXPuieZseHIvLvFdt5w/J6sqHgi9MLTVh0ZtMKAgF60=; b=cFGEt/gGX6/P8MC/4A1rDiZ+JBpGTqb0c9yLo0eQ/ukSi96i6BZFpaGs8hdc3KKfRuLp4i STh8KIC9Ns/NoA2jIiamoRSdkWfylybePeWs7j9C2VBXCfk5UddRWzKfodkLkBTE9JpnyD R9Krqw+23p54ZtZEp6m9m77kBUU5do2mn91PlhXKt6lNUogHGMyQIuIbhXUGjxme8oNett ROoAwcvzmP+LM+K1a8Uuplqaq6qlj0T4upl8SDi/r8HCMgnPVTO4nqoM8tOMQwDpedXCL0 bgNLRt7EMJgsceyriO6SjrPKdGDdyno6xJR0GZGZMHtGx7DbROQ23oPkQCH7og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700092004; a=rsa-sha256; cv=none; b=kiXU2thXLgZQS3da5hvFS0zvJ/vEFXAkOVuDXLVG8jzIB8JVplANmeuxuCTJf6LDVQCgVB iAiLhyOzd4o2/rgfqgtJHUcU8CfsBfzoTCbSyrqYYqeXAhnFkChELhAAqPSb0M82J8zsrb Q5WOXkxTaUMPLN+CFSdVeHM+d5H+Yb8kcW26VvGmm1oiXk6PbyP+/adQqR39LMGbxwYw/Q QGIsd08xaZ976hYlwdQsWjA/LcTQiTWaWLyhlVrZhGJSKQbWOLkP139eXWjdEnZm7lPwN9 CQR8e64ONqI38ag6KPwlYqMrollE4gN5RXboWpAjh7aYVZ99sR178XwHYTj4uw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SW0Dz6sGGzd1B; Wed, 15 Nov 2023 23:46: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 3AFNkhNk031743; Wed, 15 Nov 2023 23:46:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFNkhk1031740; Wed, 15 Nov 2023 23:46:43 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:46:43 GMT Message-Id: <202311152346.3AFNkhk1031740@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: e3e9c205ff54 - main - lib{c,lzma,z}: remove -DSYMBOL_VERSIONING from CFLAGS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e3e9c205ff54aac287309e03a808d9e9ec5c49eb Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e3e9c205ff54aac287309e03a808d9e9ec5c49eb commit e3e9c205ff54aac287309e03a808d9e9ec5c49eb Author: Brooks Davis AuthorDate: 2023-11-15 23:39:46 +0000 Commit: Brooks Davis CommitDate: 2023-11-15 23:39:46 +0000 lib{c,lzma,z}: remove -DSYMBOL_VERSIONING from CFLAGS This was part of a libkse and libpthread transition aide when libc gained symbol versions in e62165c8b0f7d6452c0033127a0fd8ad1d9e34d3 (March 2006). The code that cared about this macro was removed in commit 00fb440c1a145b56b6c75fd405d80071aef2aab1 (May 2007) when symbol versioning was enabled by default and libthr became the default threading library. For unknown reasons, it stayed in libc (which seemingly never used it) and seems to have been copied to liblzma and libz. Reviewed by: imp, kib, emaste Differential Revision: https://reviews.freebsd.org/D42613 --- lib/libc/Makefile | 1 - lib/liblzma/Makefile | 1 - lib/libz/Makefile | 1 - 3 files changed, 3 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 9ab588c618cd..928477b47380 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -147,7 +147,6 @@ STATICOBJS+=${LIBC_NONSHARED_SRCS:S/.c$/.o/} VERSION_DEF=${LIBC_SRCTOP}/Versions.def SYMBOL_MAPS=${SYM_MAPS} -CFLAGS+= -DSYMBOL_VERSIONING # If there are no machine dependent sources, append all the # machine-independent sources: diff --git a/lib/liblzma/Makefile b/lib/liblzma/Makefile index 9e228d277896..85e7b87bbbf0 100644 --- a/lib/liblzma/Makefile +++ b/lib/liblzma/Makefile @@ -156,7 +156,6 @@ LIBADD+= md pthread VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map -CFLAGS+= -DSYMBOL_VERSIONING CLEANFILES+= liblzma.pc diff --git a/lib/libz/Makefile b/lib/libz/Makefile index 7dd1204c5435..6a135158e134 100644 --- a/lib/libz/Makefile +++ b/lib/libz/Makefile @@ -51,7 +51,6 @@ CFLAGS+= -DUNALIGNED_OK VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map -CFLAGS+= -DSYMBOL_VERSIONING INCS= zconf.h zlib.h From nobody Wed Nov 15 23:46:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SW0F11mSGz50t0k; Wed, 15 Nov 2023 23:46: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 4SW0F11L2nz3WB0; Wed, 15 Nov 2023 23:46:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700092005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EYbGsxXH2wgcJnh0YybxwD1oit4pJjzzMScBaSmvxk8=; b=v1GTUOk9gRR06qv7YnB9Zh26IFuSwUC3XwTdEgfw1pIBnNB9o3BJq/PoVbH55CYstYER76 BnrCF8IhDwTpwJbBS/2/RVkpxxvclCh0JALzALRWlZRe9elP8XiMz4FhI5b6dxy1doilxs 9jT+0M9ZpeH8llcyA3mmiLcsAIWEVcWiTDDWhPk/CUVOxDN4seWMqPDEGnKizoxPYYBhUJ f2oze+CNgzClgu09ZynPTV71ox5G6Q1geBbI1iIugtbUXmar2xePxXETMkl/evIBlo5ugb SGwOdjkgd8KfnVVGIBkxhEA6kNo6BysQDG+4HdapVugT17jGkWpelOP9PUrIPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700092005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EYbGsxXH2wgcJnh0YybxwD1oit4pJjzzMScBaSmvxk8=; b=kKqwV9MjK1cZlnwKWAOhHLPyTVm1NmmPODtWoVRqEEFA/ilr05OHGwMQOeXG0ScD8eAbWx ADlca+jgymYBWeex2Ufxv0fiVcL2SjCh7sCAKi2PhZs73FSRdBYd043gN22exE7gP8V+9v qG4mAO75DT3BSzEKWFhmTgbZDmlnlqu/tx40iWkdAsrZIu/qX+g62u66grls3nmoy9/FXj fZYPAiXekJ1bDey2U505oF5uvwMono4Ug3ZomLkU0+I/U/wTd7G+KKY9qR3zdFm65cRThZ iWaFvWlBSQ9/8sGUG1cE1WPqd5nVTSMdCQh+tt8g5BhQKfaV01k8DGmyV4Qh+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700092005; a=rsa-sha256; cv=none; b=pGk7vXjUh+cBEWIULDNZxajrHqGJ9ytv+Ex+fXRU3Mavr0v96kQVIPjp3rmzdAl9MwVnmh QaRNHf2h7liCVj0WfyTW0ATyG70D2SC2MWr4HymwX74fsTFFX5fnTdVTe/Moiat6YCiKH3 EOxylCSoQl/HJkYMQ95xYXv6BgqT8Pc/z7yfKv0uaUbW82VW5aEzw2Um2eUsO+DY1SZm8t Um/a7g5VKdNHSfxcaBVL/Q52rEFjDpHU+3pcNjSEk1+YIHDyuCwKMivJdRfssCUI3RCX8/ E86GtWxMKBXQ/eKklEwz/jAQDGtCHv4h7LcW6hNtTOcM4Ju3cl+XB0PAsXAIEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SW0F107b4zcm6; Wed, 15 Nov 2023 23:46: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 3AFNkivl031788; Wed, 15 Nov 2023 23:46:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFNki2c031785; Wed, 15 Nov 2023 23:46:44 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:46:44 GMT Message-Id: <202311152346.3AFNki2c031785@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: e4a1800f0688 - main - libc: further centralize 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: e4a1800f06884dc00931f55d0fa8cd9ce473a83e Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e4a1800f06884dc00931f55d0fa8cd9ce473a83e commit e4a1800f06884dc00931f55d0fa8cd9ce473a83e Author: Brooks Davis AuthorDate: 2023-11-15 23:40:33 +0000 Commit: Brooks Davis CommitDate: 2023-11-15 23:40:33 +0000 libc: further centralize syscall symbols All architectures necessarily implement _exit(2) and vfork(2) so declare them in sys/Symbol.map. Reviewed by: imp, kib, emaste Differential Revision: https://reviews.freebsd.org/D42614 --- lib/libc/aarch64/Symbol.map | 4 ---- lib/libc/amd64/Symbol.map | 4 ---- lib/libc/arm/Symbol.map | 4 ---- lib/libc/i386/Symbol.map | 4 ---- lib/libc/powerpc/Symbol.map | 4 ---- lib/libc/powerpc64/Symbol.map | 4 ---- lib/libc/riscv/Symbol.map | 4 ---- lib/libc/sys/Symbol.map | 2 ++ 8 files changed, 2 insertions(+), 28 deletions(-) diff --git a/lib/libc/aarch64/Symbol.map b/lib/libc/aarch64/Symbol.map index 574b5e49d106..5e71a32786b4 100644 --- a/lib/libc/aarch64/Symbol.map +++ b/lib/libc/aarch64/Symbol.map @@ -4,9 +4,6 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - /* PSEUDO syscalls */ - _exit; - .mcount; _setjmp; _longjmp; @@ -24,7 +21,6 @@ FBSD_1.0 { htons; ntohl; ntohs; - vfork; makecontext; }; diff --git a/lib/libc/amd64/Symbol.map b/lib/libc/amd64/Symbol.map index 0bd3dabdb19e..445220db11b7 100644 --- a/lib/libc/amd64/Symbol.map +++ b/lib/libc/amd64/Symbol.map @@ -4,9 +4,6 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - /* PSEUDO syscalls */ - _exit; - .mcount; _setjmp; _longjmp; @@ -37,7 +34,6 @@ FBSD_1.0 { amd64_set_gsbase; brk; sbrk; - vfork; }; FBSD_1.6 { diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map index d91e681f4478..8cb5cbe232d8 100644 --- a/lib/libc/arm/Symbol.map +++ b/lib/libc/arm/Symbol.map @@ -4,9 +4,6 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - /* PSEUDO syscalls */ - _exit; - __mcount; _setjmp; _longjmp; @@ -23,7 +20,6 @@ FBSD_1.0 { htons; ntohl; ntohs; - vfork; brk; sbrk; }; diff --git a/lib/libc/i386/Symbol.map b/lib/libc/i386/Symbol.map index d09c98487f64..1ecfb4ecda00 100644 --- a/lib/libc/i386/Symbol.map +++ b/lib/libc/i386/Symbol.map @@ -4,9 +4,6 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - /* PSEUDO syscalls */ - _exit; - .mcount; _setjmp; _longjmp; @@ -25,7 +22,6 @@ FBSD_1.0 { htons; ntohl; ntohs; - vfork; brk; i386_clr_watch; i386_get_fsbase; diff --git a/lib/libc/powerpc/Symbol.map b/lib/libc/powerpc/Symbol.map index ff99e09028db..2d883a02eeb9 100644 --- a/lib/libc/powerpc/Symbol.map +++ b/lib/libc/powerpc/Symbol.map @@ -4,9 +4,6 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - /* PSEUDO syscalls */ - _exit; - _mcount; _setjmp; _longjmp; @@ -30,7 +27,6 @@ FBSD_1.0 { ntohs; brk; sbrk; - vfork; }; FBSD_1.3 { diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map index bad72c5a6efc..2de7ffb241e7 100644 --- a/lib/libc/powerpc64/Symbol.map +++ b/lib/libc/powerpc64/Symbol.map @@ -4,9 +4,6 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - /* PSEUDO syscalls */ - _exit; - _mcount; _setjmp; _longjmp; @@ -30,7 +27,6 @@ FBSD_1.0 { ntohs; brk; sbrk; - vfork; }; FBSDprivate_1.0 { diff --git a/lib/libc/riscv/Symbol.map b/lib/libc/riscv/Symbol.map index 6726863e9b97..359a8238fb32 100644 --- a/lib/libc/riscv/Symbol.map +++ b/lib/libc/riscv/Symbol.map @@ -4,9 +4,6 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - /* PSEUDO syscalls */ - _exit; - _setjmp; _longjmp; fabs; @@ -23,7 +20,6 @@ FBSD_1.0 { htons; ntohl; ntohs; - vfork; makecontext; }; diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index 05a2f21d554e..b59ec1858ffd 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -30,6 +30,7 @@ FBSD_1.0 { __setugid; __syscall; __sysctl; + _exit; _umtx_op; abort2; accept; @@ -283,6 +284,7 @@ FBSD_1.0 { utrace; uuidgen; vadvise; + vfork; wait4; write; writev; From nobody Wed Nov 15 23:46:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SW0F22vFTz50tl7; Wed, 15 Nov 2023 23:46: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 4SW0F224Ksz3W0g; Wed, 15 Nov 2023 23:46:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700092006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ki337js/Qpc+hNE/iLUDRmVlu55BeyHrfD673G1ToKc=; b=ic8QYpJmrruS/1D32kMpbtkSyQZiuCLjtEscgP0wEbvFLqh5xmKZkO+sgqfaJf/heX5aeJ oFJCZ49e8JePFifBF3YVhKqADC/CvkhANZwgV/wR/Kq+yJCF5Loyz/nz8pDTDuJ/IkBIMK JA7JKXlL4f8hjQm4k0HTHu6rHYKdV7CIU97XpYLgeczmUGn48cqiz2aG7lZdZ8onlrmuLo 1eJwimrJTeOzHKt0y8dxR1X9kxLd91IlzwKrNrptnqEbVih/yC/rs+fuoIFlDXcK5BNfJ3 ah0W++nhH36AW6AP8My93Xgxr2LLeYQn92QimM4FbAUDhjwStWRpX6IGvUzNZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700092006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ki337js/Qpc+hNE/iLUDRmVlu55BeyHrfD673G1ToKc=; b=XIjZLN51+ApBYhpPF6U7qBDOelrhMxsDXpz/wfcTzYOGtbbNwNpYzrz919U6qy/BymS4b1 OD2tJycfjOThJVT0ZAWluigr14Cfektoo6S8HwxterseM/Aztz7q7Aef2YVRkJDl9vwV3u ZhNnMktnE2rQzi7YltRccy2gtCpk99WI375nmFHu6bOfRUbf8998yHPBtJdncpBifCZsUm lPLPIH1jdz8Y8eTxvmOS9u2kkGN5UkgoG2X6gRfMC2VjuWEaYuwLQZRL7S3ev17tsj2atO 74cnnKc8ru16Qz32uq1CvmkA4lq2ggyP4TVMmJwXHfzcCkO3GELJJevUOXmw2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700092006; a=rsa-sha256; cv=none; b=mnJnXRgp4enYOgoks1n8j8XdGyl1XTd6U+PBHjxV8FIc1CVAb3EX2w6dt7vnopWNWbSXrY dKVkcrJph4RZLF4yhdE8ptNG7b+HJXb94NKtm6fc25iRv1IH4PT3EsI5Al7vQB2wQQnstw 6AVVKaAdxYsyVSGjx28nA2HLGehW+4ephlFUprVa4UoPMsmvSK/1a+TLNpmRL6RtdYZubA u8/3UVM/J3s/lVQnx3rJscTk2WQ8Y/eNSzGVr919BaOADNoVZUTPZC1PeYOZeGF/5XtjIt UV8ekLXQ1xEK9GZ0h7Dxa3l8ugL6ZZ68k2kAmJCSRnaW4jFMUeFjTxwtRCm9KA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SW0F216FqzcTn; Wed, 15 Nov 2023 23:46:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AFNkkRM031827; Wed, 15 Nov 2023 23:46:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFNkkK3031824; Wed, 15 Nov 2023 23:46:46 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:46:46 GMT Message-Id: <202311152346.3AFNkkK3031824@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: ff3a9d8e2909 - main - libc: centralize ntoh 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: ff3a9d8e2909692c73ce9f9279cac2f15848b3f4 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=ff3a9d8e2909692c73ce9f9279cac2f15848b3f4 commit ff3a9d8e2909692c73ce9f9279cac2f15848b3f4 Author: Brooks Davis AuthorDate: 2023-11-15 23:40:54 +0000 Commit: Brooks Davis CommitDate: 2023-11-15 23:40:54 +0000 libc: centralize ntoh symbols These are implemented by net/ntoh.c via headers and compiler intrinsics so declare them in net/Symbol.map. Reviewed by: imp, kib, emaste Differential Revision: https://reviews.freebsd.org/D42615 --- lib/libc/aarch64/Symbol.map | 4 ---- lib/libc/amd64/Symbol.map | 4 ---- lib/libc/arm/Symbol.map | 4 ---- lib/libc/i386/Symbol.map | 4 ---- lib/libc/net/Symbol.map | 4 ++++ lib/libc/powerpc/Symbol.map | 4 ---- lib/libc/powerpc64/Symbol.map | 4 ---- lib/libc/riscv/Symbol.map | 4 ---- 8 files changed, 4 insertions(+), 28 deletions(-) diff --git a/lib/libc/aarch64/Symbol.map b/lib/libc/aarch64/Symbol.map index 5e71a32786b4..691c77f345b9 100644 --- a/lib/libc/aarch64/Symbol.map +++ b/lib/libc/aarch64/Symbol.map @@ -17,10 +17,6 @@ FBSD_1.0 { longjmp; sigsetjmp; siglongjmp; - htonl; - htons; - ntohl; - ntohs; makecontext; }; diff --git a/lib/libc/amd64/Symbol.map b/lib/libc/amd64/Symbol.map index 445220db11b7..3ceb1cd9682a 100644 --- a/lib/libc/amd64/Symbol.map +++ b/lib/libc/amd64/Symbol.map @@ -24,10 +24,6 @@ FBSD_1.0 { longjmp; sigsetjmp; siglongjmp; - htonl; - htons; - ntohl; - ntohs; amd64_get_fsbase; amd64_get_gsbase; amd64_set_fsbase; diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map index 8cb5cbe232d8..5a7aec7c4089 100644 --- a/lib/libc/arm/Symbol.map +++ b/lib/libc/arm/Symbol.map @@ -16,10 +16,6 @@ FBSD_1.0 { longjmp; sigsetjmp; siglongjmp; - htonl; - htons; - ntohl; - ntohs; brk; sbrk; }; diff --git a/lib/libc/i386/Symbol.map b/lib/libc/i386/Symbol.map index 1ecfb4ecda00..f2424a9b64c4 100644 --- a/lib/libc/i386/Symbol.map +++ b/lib/libc/i386/Symbol.map @@ -18,10 +18,6 @@ FBSD_1.0 { longjmp; sigsetjmp; siglongjmp; - htonl; - htons; - ntohl; - ntohs; brk; i386_clr_watch; i386_get_fsbase; diff --git a/lib/libc/net/Symbol.map b/lib/libc/net/Symbol.map index fa76adce06a1..4831868c0e55 100644 --- a/lib/libc/net/Symbol.map +++ b/lib/libc/net/Symbol.map @@ -64,6 +64,10 @@ FBSD_1.0 { hes_resolve; hes_error; hes_free; + htonl; + htons; + ntohl; + ntohs; if_indextoname; if_nameindex; if_freenameindex; diff --git a/lib/libc/powerpc/Symbol.map b/lib/libc/powerpc/Symbol.map index 2d883a02eeb9..ed5dd5884736 100644 --- a/lib/libc/powerpc/Symbol.map +++ b/lib/libc/powerpc/Symbol.map @@ -21,10 +21,6 @@ FBSD_1.0 { longjmp; sigsetjmp; siglongjmp; - htonl; - htons; - ntohl; - ntohs; brk; sbrk; }; diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map index 2de7ffb241e7..dabf6f4434c5 100644 --- a/lib/libc/powerpc64/Symbol.map +++ b/lib/libc/powerpc64/Symbol.map @@ -21,10 +21,6 @@ FBSD_1.0 { longjmp; sigsetjmp; siglongjmp; - htonl; - htons; - ntohl; - ntohs; brk; sbrk; }; diff --git a/lib/libc/riscv/Symbol.map b/lib/libc/riscv/Symbol.map index 359a8238fb32..8067ddca10cd 100644 --- a/lib/libc/riscv/Symbol.map +++ b/lib/libc/riscv/Symbol.map @@ -16,10 +16,6 @@ FBSD_1.0 { longjmp; sigsetjmp; siglongjmp; - htonl; - htons; - ntohl; - ntohs; makecontext; }; From nobody Wed Nov 15 23:46:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SW0F342FTz50tW4; Wed, 15 Nov 2023 23:46: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 4SW0F33PBpz3WKS; Wed, 15 Nov 2023 23:46:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700092007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bLiGq2WfGDg01mIGZ3Ims0q4M49wmC6eoXmhIHaLutk=; b=kh00xt/mg6SrzU3bY1lL4OewfBk/28c7bNaIN+3EhkyiDo6n5lYxxukydOYlWRQ/Qhrjan wfWOKjSw1qgKM4QoP16TtZUTclpVXSW74RWxrI9a9TCBFEkd38CkkRJLEX1bZltz0gRrPo pAUUZf4XhXgu879Ssz9nIOS40iawSM42Ea9LxlTNsNK2RD8oCzp22Pt8QHVMkTzkOf/jDr LXb3xPaBysg6z6WbfDCmXFY+iRyc6LDBqW6Z+REUYKeDlQPgLDWY4QFlMJxqtIaBhi4X7z kxRaDKJhdPD3oEz28JjWlKsW10TMJ3RYfjx9cgysRgsNLMzkouh1ZzgOsIy6/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700092007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bLiGq2WfGDg01mIGZ3Ims0q4M49wmC6eoXmhIHaLutk=; b=Kkoa8gyH4RSJ8nLcnwi5KdsDQMk6es17HExW9uE3+M8gGPA86sZUwisHacXBson1ZrGpQs BvKzU8JJh5h/p/3qwxh7mpPBOilQvQDe/7TDjxiC9OxsBdIel7HlAQ1mQJ627Kb8EKmuMe FcrvN47GfJ7wBHWFL4IZvMtQes0JThXSAM7SDA9Y0q8eGP2C8K6Hh2blGRhARwgbOjt5hy JQkcofjxUMnlyKKiFHrPT3Ejy7VH/5kCqjwXlBwDrebXZCHsVpAjHR+0eznpJH8yKFvvbD cR/WqkEX80BVIuqvN2+OZN7tzpuV0q3GwiM0zN+DBZ7YVgfH1In3+1jDKGgV2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700092007; a=rsa-sha256; cv=none; b=NRGZq9QFH0R+DPU49yDtNry/wpUlIFkHonYvsSkOz1msc9abt0iNg5+lEswQ7TyJIBqeXh 02ie9O7IM5ZDvmdOurs6pPoJ6GpqTl4aevAzFi6KWLiEhHJlpemlt/Sjmy8vx9k8UQ/tJI xl/WNvpScapiXbZlOstMkwXvnDdC6KxoO1dq9ykDb50V81ClNn4YTIFVhacjLSlalqRAVp PuEFUkl/BS6asB/lvQHBZh6QRhJZeDERLW3qVr5bRExwa54GWZp3TmZF8lUnzD8HmlvSd6 ewYMcxCyRnP3eDsbYyevwUeu9OBAWZHoHJ5ELd8TiFnPbvtfQC8unmx/tq6Uwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SW0F3244pzd1C; Wed, 15 Nov 2023 23:46: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 3AFNklmQ031873; Wed, 15 Nov 2023 23:46:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFNklCT031870; Wed, 15 Nov 2023 23:46:47 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:46:47 GMT Message-Id: <202311152346.3AFNklCT031870@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: 1c656143be73 - main - libc: centralize {_,sig,}{set,long}jmp 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: 1c656143be734de4b1e1bac27c0c48ef4d974510 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=1c656143be734de4b1e1bac27c0c48ef4d974510 commit 1c656143be734de4b1e1bac27c0c48ef4d974510 Author: Brooks Davis AuthorDate: 2023-11-15 23:41:35 +0000 Commit: Brooks Davis CommitDate: 2023-11-15 23:41:35 +0000 libc: centralize {_,sig,}{set,long}jmp symbols These symbols are universally exposed and documented so declare them centrally. Double- and triple-underscore versions exist on some platforms, but leave those alone for now. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D42616 --- lib/libc/aarch64/Symbol.map | 6 ------ lib/libc/amd64/Symbol.map | 6 ------ lib/libc/arm/Symbol.map | 6 ------ lib/libc/gen/Symbol.map | 6 ++++++ lib/libc/i386/Symbol.map | 6 ------ lib/libc/powerpc/Symbol.map | 6 ------ lib/libc/powerpc64/Symbol.map | 6 ------ lib/libc/riscv/Symbol.map | 6 ------ 8 files changed, 6 insertions(+), 42 deletions(-) diff --git a/lib/libc/aarch64/Symbol.map b/lib/libc/aarch64/Symbol.map index 691c77f345b9..a02c71c82b7d 100644 --- a/lib/libc/aarch64/Symbol.map +++ b/lib/libc/aarch64/Symbol.map @@ -5,18 +5,12 @@ */ FBSD_1.0 { .mcount; - _setjmp; - _longjmp; fabs; __flt_rounds; fpgetmask; fpsetmask; __infinity; __nan; - setjmp; - longjmp; - sigsetjmp; - siglongjmp; makecontext; }; diff --git a/lib/libc/amd64/Symbol.map b/lib/libc/amd64/Symbol.map index 3ceb1cd9682a..ea3b7866b718 100644 --- a/lib/libc/amd64/Symbol.map +++ b/lib/libc/amd64/Symbol.map @@ -5,8 +5,6 @@ */ FBSD_1.0 { .mcount; - _setjmp; - _longjmp; fabs; __flt_rounds; fpgetmask; @@ -20,10 +18,6 @@ FBSD_1.0 { __nan; makecontext; rfork_thread; - setjmp; - longjmp; - sigsetjmp; - siglongjmp; amd64_get_fsbase; amd64_get_gsbase; amd64_set_fsbase; diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map index 5a7aec7c4089..4be0a7b02964 100644 --- a/lib/libc/arm/Symbol.map +++ b/lib/libc/arm/Symbol.map @@ -5,17 +5,11 @@ */ FBSD_1.0 { __mcount; - _setjmp; - _longjmp; alloca; fabs; __infinity; __nan; makecontext; - setjmp; - longjmp; - sigsetjmp; - siglongjmp; brk; sbrk; }; diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index 1fa5478b7918..2b8195244734 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -217,6 +217,12 @@ FBSD_1.0 { group_from_gid; setdomainname; sethostname; + _setjmp; + _longjmp; + setjmp; + longjmp; + sigsetjmp; + siglongjmp; longjmperror; getmode; setmode; diff --git a/lib/libc/i386/Symbol.map b/lib/libc/i386/Symbol.map index f2424a9b64c4..3b3df6b37202 100644 --- a/lib/libc/i386/Symbol.map +++ b/lib/libc/i386/Symbol.map @@ -5,8 +5,6 @@ */ FBSD_1.0 { .mcount; - _setjmp; - _longjmp; alloca; fabs; __flt_rounds; @@ -14,10 +12,6 @@ FBSD_1.0 { __infinity; makecontext; rfork_thread; - setjmp; - longjmp; - sigsetjmp; - siglongjmp; brk; i386_clr_watch; i386_get_fsbase; diff --git a/lib/libc/powerpc/Symbol.map b/lib/libc/powerpc/Symbol.map index ed5dd5884736..93e79fe96733 100644 --- a/lib/libc/powerpc/Symbol.map +++ b/lib/libc/powerpc/Symbol.map @@ -5,8 +5,6 @@ */ FBSD_1.0 { _mcount; - _setjmp; - _longjmp; fabs; __flt_rounds; fpgetmask; @@ -17,10 +15,6 @@ FBSD_1.0 { __infinity; __nan; makecontext; - setjmp; - longjmp; - sigsetjmp; - siglongjmp; brk; sbrk; }; diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map index dabf6f4434c5..6af9a0103816 100644 --- a/lib/libc/powerpc64/Symbol.map +++ b/lib/libc/powerpc64/Symbol.map @@ -5,8 +5,6 @@ */ FBSD_1.0 { _mcount; - _setjmp; - _longjmp; fabs; __flt_rounds; fpgetmask; @@ -17,10 +15,6 @@ FBSD_1.0 { __infinity; __nan; makecontext; - setjmp; - longjmp; - sigsetjmp; - siglongjmp; brk; sbrk; }; diff --git a/lib/libc/riscv/Symbol.map b/lib/libc/riscv/Symbol.map index 8067ddca10cd..2e0467744778 100644 --- a/lib/libc/riscv/Symbol.map +++ b/lib/libc/riscv/Symbol.map @@ -4,18 +4,12 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - _setjmp; - _longjmp; fabs; __flt_rounds; fpgetmask; fpsetmask; __infinity; __nan; - setjmp; - longjmp; - sigsetjmp; - siglongjmp; makecontext; }; From nobody Wed Nov 15 23:46:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SW0F50gPDz50t0w; Wed, 15 Nov 2023 23:46: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 4SW0F44Jvqz3WYg; Wed, 15 Nov 2023 23:46:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700092008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xPv8+fv+4gauMjAtP5/2Rgs0pCcJJKSarC6y1tkp5VA=; b=IClX1UocHdYzsCE73slc0r1NKhBPb//oyi7jAjKzMQ21WFqvMqjj9hFo/lImCxf5oJWHzH cCQaJjA2Kd5QJPCCEN2kzDjquyAtJs2l3ENUKQ36UBBOOTNFCvvuFQq3EmivtxS/YH82Ox Q5PGo/qg7D5bVJy1nnkQ1ZdqXVYpLmBCHK4vENM1QdO5HOWkDFHjMIFYk6HxHFwWLDuavf X0H1xerd74C914pjMIpIDPqwPj3EnbQSoOGbk5YolUDCQI07uV1BeCLMOqqvfewNtYvYcK U4nSXqQ36kSsASoUXwANYO/ZMs8B5QWu1OMRdkYv/xvZCCV8gw5f4pY5bsJfZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700092008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xPv8+fv+4gauMjAtP5/2Rgs0pCcJJKSarC6y1tkp5VA=; b=MgHL+jJbzztXBMkzTT13O011RfRPiLOX0YGhE3Mo5LrCTU6jzt1db7CoFRIFJxrKC152d+ JkSQTGETjBgG7CFF+NIXc9hxveVXfmhn6Dbv8lwNuforOhwwjYyuE2P+11gaqxOYVDhYCi zmICvG0dP26bifNVwKIwUAR8Lrx4LYL/78nhlC+zhHtVH9F2wuB/laLT10Bg3juHEtuefY uEvlyw7sydN+azBYSGXZ+c3LCyJjhQk1pQD3RIA/VSpJdsuouN4lH6S4CIMkdozARdXo7k 28OFUORl+Fs4Gp1WOvPjBC10NJ1aXjymdHEa3JPAVUpgt70OxsUKvJp4B1rgxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700092008; a=rsa-sha256; cv=none; b=OaGZi1ZGY+oM1kNwdtt0xmSwEzJ62mF+UKVpEJbyTgBrTSKzkwP6VfXvcFKXv+5mupyEKq 8tVQFF40GpmCu6feLfAm0Sr5vPLOmGeiXZNIgyvBP22uDRvoypLzdYKtWerhpMKBmxp7eq cB1p2hQO7YjvLdcQWHkOPJU5PbpuNN5ioNYPT+H872xq+NrghmwATr9HAEGljseHbnGSi+ yFQMOJPgpQD7pAQ2+eIEL3ELoT9oDiYne1wXL8zhf+ulldbFRdJxLqlezRwBZbiRVqbU+K 5w39DlLVKhoQhsrQIvTayDHmoOVS3RDMN9/MEhO5cDyfrWYdStYU9LM4JL8XzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SW0F42w8Pzcpb; Wed, 15 Nov 2023 23:46: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 3AFNkmcM031912; Wed, 15 Nov 2023 23:46:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFNkmdg031909; Wed, 15 Nov 2023 23:46:48 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:46:48 GMT Message-Id: <202311152346.3AFNkmdg031909@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: 5d79b5445e12 - main - libc: centralize makecontext 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: 5d79b5445e12873b316a04de352d12a02bfe2d53 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=5d79b5445e12873b316a04de352d12a02bfe2d53 commit 5d79b5445e12873b316a04de352d12a02bfe2d53 Author: Brooks Davis AuthorDate: 2023-11-15 23:42:18 +0000 Commit: Brooks Davis CommitDate: 2023-11-15 23:42:18 +0000 libc: centralize makecontext symbols Declare makecontext() and __makecontext() symbols centrally as they are always implemented. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D42617 --- lib/libc/aarch64/Symbol.map | 5 ----- lib/libc/amd64/Symbol.map | 2 -- lib/libc/arm/Symbol.map | 2 -- lib/libc/gen/Symbol.map | 2 ++ lib/libc/i386/Symbol.map | 2 -- lib/libc/powerpc/Symbol.map | 2 -- lib/libc/powerpc64/Symbol.map | 2 -- lib/libc/riscv/Symbol.map | 5 ----- 8 files changed, 2 insertions(+), 20 deletions(-) diff --git a/lib/libc/aarch64/Symbol.map b/lib/libc/aarch64/Symbol.map index a02c71c82b7d..39cc43d12c26 100644 --- a/lib/libc/aarch64/Symbol.map +++ b/lib/libc/aarch64/Symbol.map @@ -11,9 +11,4 @@ FBSD_1.0 { fpsetmask; __infinity; __nan; - makecontext; -}; - -FBSDprivate_1.0 { - __makecontext; }; diff --git a/lib/libc/amd64/Symbol.map b/lib/libc/amd64/Symbol.map index ea3b7866b718..6c514097dd0e 100644 --- a/lib/libc/amd64/Symbol.map +++ b/lib/libc/amd64/Symbol.map @@ -16,7 +16,6 @@ FBSD_1.0 { fpsetround; __infinity; __nan; - makecontext; rfork_thread; amd64_get_fsbase; amd64_get_gsbase; @@ -43,7 +42,6 @@ FBSDprivate_1.0 { _getlogin; ___longjmp; - __makecontext; __longjmp; __signalcontext; signalcontext; diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map index 4be0a7b02964..5f6cc934410f 100644 --- a/lib/libc/arm/Symbol.map +++ b/lib/libc/arm/Symbol.map @@ -9,7 +9,6 @@ FBSD_1.0 { fabs; __infinity; __nan; - makecontext; brk; sbrk; }; @@ -34,7 +33,6 @@ FBSDprivate_1.0 { __aeabi_read_tp; ___longjmp; - __makecontext; __longjmp; signalcontext; _signalcontext; diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index 2b8195244734..a21bf2430846 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -196,6 +196,7 @@ FBSD_1.0 { ldexp; lockf; lrand48; + makecontext; modf; mrand48; nice; @@ -577,4 +578,5 @@ FBSDprivate_1.0 { __fillcontextx; __fillcontextx2; __getcontextx_size; + __makecontext; }; diff --git a/lib/libc/i386/Symbol.map b/lib/libc/i386/Symbol.map index 3b3df6b37202..ac2cb068d946 100644 --- a/lib/libc/i386/Symbol.map +++ b/lib/libc/i386/Symbol.map @@ -10,7 +10,6 @@ FBSD_1.0 { __flt_rounds; __nan; __infinity; - makecontext; rfork_thread; brk; i386_clr_watch; @@ -40,7 +39,6 @@ FBSDprivate_1.0 { _getlogin; ___longjmp; - __makecontext; __longjmp; __signalcontext; signalcontext; diff --git a/lib/libc/powerpc/Symbol.map b/lib/libc/powerpc/Symbol.map index 93e79fe96733..9f6f88048984 100644 --- a/lib/libc/powerpc/Symbol.map +++ b/lib/libc/powerpc/Symbol.map @@ -14,7 +14,6 @@ FBSD_1.0 { fpsetround; __infinity; __nan; - makecontext; brk; sbrk; }; @@ -28,7 +27,6 @@ FBSDprivate_1.0 { _getlogin; _fpgetsticky; - __makecontext; __longjmp; signalcontext; __signalcontext; diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map index 6af9a0103816..63638bbb8908 100644 --- a/lib/libc/powerpc64/Symbol.map +++ b/lib/libc/powerpc64/Symbol.map @@ -14,7 +14,6 @@ FBSD_1.0 { fpsetround; __infinity; __nan; - makecontext; brk; sbrk; }; @@ -24,7 +23,6 @@ FBSDprivate_1.0 { _getlogin; _fpgetsticky; - __makecontext; __longjmp; signalcontext; __signalcontext; diff --git a/lib/libc/riscv/Symbol.map b/lib/libc/riscv/Symbol.map index 2e0467744778..79ee74e81a88 100644 --- a/lib/libc/riscv/Symbol.map +++ b/lib/libc/riscv/Symbol.map @@ -10,9 +10,4 @@ FBSD_1.0 { fpsetmask; __infinity; __nan; - makecontext; -}; - -FBSDprivate_1.0 { - __makecontext; }; From nobody Wed Nov 15 23:46:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SW0F608QTz50tQZ; Wed, 15 Nov 2023 23:46: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 4SW0F54nGtz3WR7; Wed, 15 Nov 2023 23:46:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700092009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=up95Habwft8TT+tcMWj4YM7lIbNMElDtGgNEf4HXueg=; b=GiJpHqPwBEw/bRZo/OLQ7pu2u26yeuSWMAueMPSNeQOMczNSiBmhgT7zLdIUE2zHEFBIw5 nC5GliQREs5CYcFwTXn5liQI4twSC62ZneyCLbIuSQD+rBBaVYyFP0rL9537aztBWsClC+ p/hod7BwlMrwWIqSKn/YttdZ9+Xzl2QX5wORtQRoOD/fUMI+Q3FTNnt2ljbDGiOG6YIgZ3 utw4mbri21FL4YTFEwrTEauyG3bt/Z8qJlAUTYx2cwpNAUKKmWMP9WMrhKTepzqZRxhX/Z a35+wOUv4JThGzf1tL0fpY7/9CxdYxKBb5pO3ZWR/aKxtZlUMq73v9ZOmShDQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700092009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=up95Habwft8TT+tcMWj4YM7lIbNMElDtGgNEf4HXueg=; b=bdC7FwYE2Du0BMDOciZ/fSc0SjnWhfCfk+67dtffmhcBvwSZthlUQwrYkOsFUdmhRUN6hQ fY3BqRTe/oxkIoq0BZv6/zVlPK09YTtE9dvyA6FKqhIp9YP+vB8f4kaJwL7W2HI73rn9N/ dE2Wi3AMfWMR1CnZB412WjLyxl6nM+VytrJBJbwnEZ3rYcZULVkkfsB6C7yDcLwOAyQukm b89qZPZ4TulI3v6Yn5LbqzCzAim+HqC26d4lqxYgDYsy9b5LPgJHwcMrEQarP804Vv1uH0 e+TYRlP8AwPeQwNV02gN6Blgv5D6tpTvKy7uvxPINfOGbunOAN6pQwzNexJOYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700092009; a=rsa-sha256; cv=none; b=ey8+qDUoaHQGCQJFUZU3uDGPf8/E7igqpl8pL4kcHgkU8N2oG7JMIkC8/1ZzfL1TF60YeC 8IF1Wr0pvCuWXoJqI/5cc5SjPvni6804XsvRk08B/p/cyhpMD7J1IAYs6hnVQy7+E2pGqA w7kcIM7VmFEyGF3b6fS5kzsRJ76l6ejyxOY75rzlaiBpcEHsyCtwQSY6+RisneWvwq2TEp HHSPrZMDWoMMY9W8EH6NKpiNvlYeMJ9sy2OsOlrZJhPyR6OOg0E2vLnIp9zYGKF+BJDkfr vgKZ1YeBx4MGdpCKx0TXxQEifhWFItWoYZ0nGofHP1AO4+G4M0PCLsLslwxF+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 4SW0F53qTCzcJr; Wed, 15 Nov 2023 23:46: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 3AFNknPX031957; Wed, 15 Nov 2023 23:46:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFNkntk031954; Wed, 15 Nov 2023 23:46:49 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:46:49 GMT Message-Id: <202311152346.3AFNkntk031954@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: c7045186819d - main - libc: centralize a few numeric 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: c7045186819dbc64c3f005cb1138a1948868cf5a Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=c7045186819dbc64c3f005cb1138a1948868cf5a commit c7045186819dbc64c3f005cb1138a1948868cf5a Author: Brooks Davis AuthorDate: 2023-11-15 23:42:37 +0000 Commit: Brooks Davis CommitDate: 2023-11-15 23:42:37 +0000 libc: centralize a few numeric symbols fabs, __infinity, and __nan are universally implemented so declare them in gen/Symbol.map. We would also include __flt_rounds, but it's under FBSD_1.3 on arm so until that's gone we're stuck with it. Likewise, everyone but i386 implements fp[gs]etmask. Reviewed by: imp, kib, emaste Differential Revision: https://reviews.freebsd.org/D42618 --- lib/libc/aarch64/Symbol.map | 3 --- lib/libc/amd64/Symbol.map | 3 --- lib/libc/arm/Symbol.map | 3 --- lib/libc/gen/Symbol.map | 3 +++ lib/libc/i386/Symbol.map | 3 --- lib/libc/powerpc/Symbol.map | 3 --- lib/libc/powerpc64/Symbol.map | 3 --- lib/libc/riscv/Symbol.map | 3 --- 8 files changed, 3 insertions(+), 21 deletions(-) diff --git a/lib/libc/aarch64/Symbol.map b/lib/libc/aarch64/Symbol.map index 39cc43d12c26..cb4669039942 100644 --- a/lib/libc/aarch64/Symbol.map +++ b/lib/libc/aarch64/Symbol.map @@ -5,10 +5,7 @@ */ FBSD_1.0 { .mcount; - fabs; __flt_rounds; fpgetmask; fpsetmask; - __infinity; - __nan; }; diff --git a/lib/libc/amd64/Symbol.map b/lib/libc/amd64/Symbol.map index 6c514097dd0e..aa2744b15a74 100644 --- a/lib/libc/amd64/Symbol.map +++ b/lib/libc/amd64/Symbol.map @@ -5,7 +5,6 @@ */ FBSD_1.0 { .mcount; - fabs; __flt_rounds; fpgetmask; fpgetprec; @@ -14,8 +13,6 @@ FBSD_1.0 { fpsetmask; fpsetprec; fpsetround; - __infinity; - __nan; rfork_thread; amd64_get_fsbase; amd64_get_gsbase; diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map index 5f6cc934410f..6fef9598e7ef 100644 --- a/lib/libc/arm/Symbol.map +++ b/lib/libc/arm/Symbol.map @@ -6,9 +6,6 @@ FBSD_1.0 { __mcount; alloca; - fabs; - __infinity; - __nan; brk; sbrk; }; diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index a21bf2430846..559c0252c338 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -107,6 +107,7 @@ FBSD_1.0 { execv; execvp; execvP; + fabs; fmtcheck; fmtmsg; fnmatch; @@ -181,10 +182,12 @@ FBSD_1.0 { endusershell; setusershell; getvfsbyname; + __nan; __isnan; isnan; __isnanf; isnanf; + __infinity; __isinf; isinf; __isinff; diff --git a/lib/libc/i386/Symbol.map b/lib/libc/i386/Symbol.map index ac2cb068d946..66939e2eb55d 100644 --- a/lib/libc/i386/Symbol.map +++ b/lib/libc/i386/Symbol.map @@ -6,10 +6,7 @@ FBSD_1.0 { .mcount; alloca; - fabs; __flt_rounds; - __nan; - __infinity; rfork_thread; brk; i386_clr_watch; diff --git a/lib/libc/powerpc/Symbol.map b/lib/libc/powerpc/Symbol.map index 9f6f88048984..5074596b3c09 100644 --- a/lib/libc/powerpc/Symbol.map +++ b/lib/libc/powerpc/Symbol.map @@ -5,15 +5,12 @@ */ FBSD_1.0 { _mcount; - fabs; __flt_rounds; fpgetmask; fpgetround; fpgetsticky; fpsetmask; fpsetround; - __infinity; - __nan; brk; sbrk; }; diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map index 63638bbb8908..1bf990a52088 100644 --- a/lib/libc/powerpc64/Symbol.map +++ b/lib/libc/powerpc64/Symbol.map @@ -5,15 +5,12 @@ */ FBSD_1.0 { _mcount; - fabs; __flt_rounds; fpgetmask; fpgetround; fpgetsticky; fpsetmask; fpsetround; - __infinity; - __nan; brk; sbrk; }; diff --git a/lib/libc/riscv/Symbol.map b/lib/libc/riscv/Symbol.map index 79ee74e81a88..bebcecb879f4 100644 --- a/lib/libc/riscv/Symbol.map +++ b/lib/libc/riscv/Symbol.map @@ -4,10 +4,7 @@ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - fabs; __flt_rounds; fpgetmask; fpsetmask; - __infinity; - __nan; }; From nobody Wed Nov 15 23:46:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SW0F6618gz50tQf; Wed, 15 Nov 2023 23:46: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 4SW0F65V6Rz3Wf2; Wed, 15 Nov 2023 23:46:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700092010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K+0BYvvWuTGRSpZXgTiHoWyxUbQVPNMbrmD3Z2UTarU=; b=MUWm4qHNoscFGPjyi8IAl8SmVJBIjHmqbC7BZZFoiloud7Am6WhEZsj5qKLzqcuxx5vzMh bDvAcr83DQov4S+TIABsDHXpfwXQzIOsXecvaUuc9ooh0HiXHPyk8xR32aMUEJxxRcsp6C yDkB08ZFbd4JYSjR33byXzyjZN70U27LlkeMqNGt73w8HQ4noBJ6YKEfNIZAWjZBuluECF qA52W5GuKChhWVh1t3RSrekZBE7V0S4My1AupcWtDhO51bQJZoYQC39wfJOj8d8FBHhs5Q 3t67GFAVYv4qSLRmrII/HqYS8PxeuSDgymOGNJLA/AlSOg34Q4kUV4U3TADSOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700092010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K+0BYvvWuTGRSpZXgTiHoWyxUbQVPNMbrmD3Z2UTarU=; b=rU18AlusxO18AbeGOwnRkzv8SC4Zm0Y2ll/xZhCoDI7pA0LIUjn3P1Q7RaTDSqshGQiznv zxx9LCJak0QFq76xlnRku2W4HyKot3ploW1uU1md8LRJgmU6w3TBuq1BbQGFLuMvJlGws/ sNYQHXutlroHr9+FxJKYWOEq19bfKf6ctgK7fnL798VKFVX2DBfI6Ldcq3WPyVuyQOWZlS lNnxu8X5J54RG2IplTRPuJLCbvpzON1P8Jr7Bnltw20YSGfbFTLbEfNCxKcHUOhKRWxTbI PBcA/1KOHkUJ+rOVwtx2PJHSb1vuc66pcQiHD/6mhRbydwrUcMiespYihFCdtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700092010; a=rsa-sha256; cv=none; b=ND10PxiD06sp0MVNAqJKrfotbUyumRTiUdfvHPJOs8Hq61OZZq5FsRspmtUKn38SWMQdjJ BQtYKE58v26SMK3NXzzElqpPiI9eESCQI2d8qPh7ZYxY/3c4I3CdqJEfYummxk4HOjpoBo pF+Mm2byAjbq0PE98XaT0ACYoqZieQxcy3iRM4+mBw33iLzxLCh5MMV1pL6NaXrT3QJUBG g5R7PPmhFlfJIjVqZiU+Ju59hBAxxVH+TlUzBd2wL6zTbeHDGJrcw70wz2bvNUDPe57JtY XABxNGDLTNTXYZexBsy+KAewLaKduY+SJe1QufF5Nex7H7clvXAW2n7AmBNaVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SW0F64Gzhzcxl; Wed, 15 Nov 2023 23:46: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 3AFNkoSs032005; Wed, 15 Nov 2023 23:46:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AFNkoEh032002; Wed, 15 Nov 2023 23:46:50 GMT (envelope-from git) Date: Wed, 15 Nov 2023 23:46:50 GMT Message-Id: <202311152346.3AFNkoEh032002@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: 500bf0592cf1 - main - libc: remove unused stub vdso timecounter implementations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 500bf0592cf1de1d26369efe3877d812f724f5c0 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=500bf0592cf1de1d26369efe3877d812f724f5c0 commit 500bf0592cf1de1d26369efe3877d812f724f5c0 Author: Brooks Davis AuthorDate: 2023-11-15 23:43:56 +0000 Commit: Brooks Davis CommitDate: 2023-11-15 23:43:56 +0000 libc: remove unused stub vdso timecounter implementations All supported architectures have shared page support so remove this unused stub. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D42619 --- lib/libc/sys/trivial-vdso_tc.c | 45 ------------------------------------------ 1 file changed, 45 deletions(-) diff --git a/lib/libc/sys/trivial-vdso_tc.c b/lib/libc/sys/trivial-vdso_tc.c deleted file mode 100644 index 4a626b7f6cae..000000000000 --- a/lib/libc/sys/trivial-vdso_tc.c +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * Copyright (c) 2013 Konstantin Belousov - * - * 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 - -#pragma weak __vdso_gettc -int -__vdso_gettc(const struct vdso_timehands *th, u_int *tc) -{ - - return (ENOSYS); -} - -#pragma weak __vdso_gettimekeep -int -__vdso_gettimekeep(struct vdso_timekeep **tk) -{ - - return (ENOSYS); -} From nobody Thu Nov 16 00:29:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SW1Bq36FMz50wTk for ; Thu, 16 Nov 2023 00:29:55 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (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 4SW1Bp3yCzz3cll for ; Thu, 16 Nov 2023 00:29:54 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.47 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com; dmarc=none Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-32f87b1c725so194799f8f.3 for ; Wed, 15 Nov 2023 16:29:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700094592; x=1700699392; 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=z+kCnXpYkkGuNFx/pRe+FbWv7lquFswhBLv3vbpZe2E=; b=HRJCuGqTfbRTaQttre8WHc3QR/SQ12oWJyckN4F5aMIojKT6waNmMGwYjXxU8GAysL 3+J4JzQ1Z94sLnnD3NfvTAp8bQjEzJx6dR15qGDqe7ssp6IhOO4gVXS8x1P9T5/Jc+wQ WU+NgJMCesZp+ePqfgOUiVXjCow9118x3eN4QPQH/aefspDCiYn7W67dkpVAs8vWU5z4 VbYxxIhDYPryXKcnV+7NOrpN4bBz5+OP9zToa6CJfD4xgcwsg7OVo63PfytmwPJpWNgA TyPup6DWRR2gVPyJu/LfjncN96hXT6ACxGk0M044EwS79TtCp/N7gSz0w/oqi8tJEjPG benw== X-Gm-Message-State: AOJu0YxBiWDweK70C1m9oq0f7R9IbpuPpgGeLFicVgSGM0EF1f2lBHTi Un7TpsK474DC9/gGBX1Y5gRnaw== X-Google-Smtp-Source: AGHT+IHs/VUYkBcYBz0AzEv/+jpA+gVrIZgn9HKcBF/L7tYDadW8fyl75AJF9A1b3J9XpzRKeDclyw== X-Received: by 2002:adf:d1c7:0:b0:32d:a10d:90dd with SMTP id b7-20020adfd1c7000000b0032da10d90ddmr12062427wrd.50.1700094592066; Wed, 15 Nov 2023 16:29:52 -0800 (PST) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id u25-20020adfa199000000b0032fb46812c2sm11951616wru.12.2023.11.15.16.29.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Nov 2023 16:29:51 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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: 9eecef052155 - main - Add an Armv8 rndr random number provider From: Jessica Clarke In-Reply-To: Date: Thu, 16 Nov 2023 00:29:41 +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: <2423E245-0F1B-4195-A766-166183774421@freebsd.org> References: <202311151812.3AFICLIs077567@gitrepo.freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Spamd-Result: default: False [-2.49 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.992]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; TO_DN_EQ_ADDR_SOME(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[freebsd.org]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.47:from]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.47:from]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; R_DKIM_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4SW1Bp3yCzz3cll X-Spamd-Bar: -- On 15 Nov 2023, at 18:27, Jessica Clarke wrote: >=20 > On 15 Nov 2023, at 18:12, Andrew Turner wrote: >>=20 >> The branch main has been updated by andrew: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D9eecef052155646fbc5f8f533b952b37= 2572d06a >>=20 >> commit 9eecef052155646fbc5f8f533b952b372572d06a >> Author: Andrew Turner >> AuthorDate: 2023-11-15 17:42:02 +0000 >> Commit: Andrew Turner >> CommitDate: 2023-11-15 18:05:08 +0000 >>=20 >> Add an Armv8 rndr random number provider >>=20 >> Armv8.5 adds an optional random number generator. This is = implemented >> as two special registers one to read a random number, the other to >> re-seed the entropy pool before reading a random number. Both = registers >> will set the condition flags to tell the caller they can't produce = a >> random number in a reasonable amount of time. >>=20 >> Without a signal to reseed the entropy pool use the latter register >> to provide random numbers to the kernel pool. If at a later time we >> had a way to tell the provider if it needs to reseed or not we = could >> use the former. >>=20 >> On an Amazon AWS Graviton3 VM this never failed, however this may = not >> be the case on low end CPUs so retry reading the random number 10 = times >> before returning an error. >>=20 >> Reviewed by: imp, delphij (csprng) >> Sponsored by: The FreeBSD Foundation >> Sponsored by: Arm Ltd >> Differential Revision: https://reviews.freebsd.org/D35411 >> --- >> sys/arm64/conf/std.dev | 1 + >> sys/conf/files.arm64 | 2 + >> sys/dev/random/armv8rng.c | 135 = +++++++++++++++++++++++++++++++++++++++ >> sys/dev/random/random_harvestq.c | 1 + >> sys/modules/Makefile | 2 + >> sys/modules/armv8_rng/Makefile | 11 ++++ >> sys/sys/random.h | 1 + >> 7 files changed, 153 insertions(+) >>=20 >> diff --git a/sys/arm64/conf/std.dev b/sys/arm64/conf/std.dev >> index 74d2407e0aec..0ebf2e775b11 100644 >> --- a/sys/arm64/conf/std.dev >> +++ b/sys/arm64/conf/std.dev >> @@ -53,6 +53,7 @@ device vt_simplefb >>=20 >> # Pseudo devices. >> device crypto # core crypto support >> +device armv8_rng # Armv8.5 rndr RNG >> device loop # Network loopback >> device ether # Ethernet support >> device vlan # 802.1Q VLAN support >> diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 >> index 38b9e40463eb..9ccead6a98e1 100644 >> --- a/sys/conf/files.arm64 >> +++ b/sys/conf/files.arm64 >> @@ -379,6 +379,8 @@ dev/psci/psci.c standard >> dev/psci/smccc_arm64.S standard >> dev/psci/smccc.c standard >>=20 >> +dev/random/armv8rng.c optional armv8_rng !random_loadable >> + >> dev/safexcel/safexcel.c optional safexcel fdt >>=20 >> dev/sdhci/sdhci_xenon.c optional sdhci_xenon sdhci >> diff --git a/sys/dev/random/armv8rng.c b/sys/dev/random/armv8rng.c >> new file mode 100644 >> index 000000000000..3cca42a5bbf3 >> --- /dev/null >> +++ b/sys/dev/random/armv8rng.c >> @@ -0,0 +1,135 @@ >> +/*- >> + * Copyright (c) 2022 The FreeBSD Foundation >> + * >> + * This software was developed by Andrew Turner 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 >> + * 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 >> +#include >> + >> +#include >> + >> +#include >> + >> +static u_int random_rndr_read(void *, u_int); >> + >> +static bool has_rndr; >> +static struct random_source random_armv8_rndr =3D { >> + .rs_ident =3D "Armv8 rndr RNG", >> + .rs_source =3D RANDOM_PURE_ARMV8, >> + .rs_read =3D random_rndr_read, >> +}; >> + >> +static inline int >> +random_rndr_read_one(u_long *buf) >> +{ >> + u_long val; >> + int loop, ret; >> + >> + loop =3D 10; >> + do { >> + __asm __volatile( >> + ".arch_extension rng \n" >> + "mrs %0, rndrrs \n" /* Read the random number */ >> + "cset %w1, ne \n" /* 1 on success, 0 on failure */ >> + ".arch_extension norng \n" >> + : "=3D&r" (val), "=3D&r"(ret) :: "cc"); >=20 > Early clobber doesn=E2=80=99t make sense with no inputs. This also breaks the aarch64 ubuntu-20.04 GitHub build, as its LLVM doesn=E2=80=99t know about the RNG extension. Can you please stop = breaking the arm64 kernel build with older LLVM, this is far from the first time it=E2=80=99s happened, and some of those never got fixed upstream, we = just had to hack around them downstream. Jess From nobody Thu Nov 16 00:53:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SW1k01YZWz50xdt; Thu, 16 Nov 2023 00:53: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 4SW1k013XGz4FTJ; Thu, 16 Nov 2023 00:53:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700096008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zz9YKUx3M/oaPrmnWmAEm3tUdvDE5tnCDUfnolnj+d8=; b=XhGcP/mYQ3DPx80FGWqaB2QosWmfeuzJ2lQa+2EyGH9DXsOQjnuPg4fRxZ35TXMcA27fVj Cd+DUYjNsH7824oeD2gZmyOji4tkWUGvuszbkLKAl8rKkRFGBZitOrz/eYHR1PERkRzFM0 RdYkhjncBIlz/mYdlO2DQ1XxG43j5M8r7ZFuh/pJFVbQLf4qj7lAxTZCzNn4r4s0ck6hQE kzrFSnr+Rr5q9mcNS8x9iyGUPuip7jYosVqgd0BoM51Pj0sXqyjE1IVhF+YIEZL1I4sZ45 hjGQsc7MLjiUL3kwBHyUN3wF/hZG5pHGzE6kiGFMEcIrhwciyvYRL8C+lv9NMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700096008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zz9YKUx3M/oaPrmnWmAEm3tUdvDE5tnCDUfnolnj+d8=; b=LMXwHtBXHtZcqvinv3OuJ3TnGBRGGSMsfw4oqICXFUJrTg2NMAbEzkJo5ZDrkkNo50itUP 3ZBLcoI30VjRbkroTHm3Lz/jJlAuAydGYkMl5QGUqK0iMp6o+wDIrcre3NFD4Sxz35PDS9 iSIVN+LV5VWgs0XSv2fV0nHh3WA4sSEOMLo2ceV75Km08S6fPm4+j/HKk8YVoMBz7nbyuY 8WCgvo5aTgaJgg7hLa9gidcRpdvNZBhDOrZE3Umrnh1G8zxMEIh3ijC1WAAk2FmqTXHPZ3 JfHf/Is5WWsA7d0Zqybv8VUp7JCTzLOPAneeUSxYiUIEJtVsFFUckEYofUdu+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700096008; a=rsa-sha256; cv=none; b=vDjNP5+mOebyQU3+RpAZ0gnpFb3u0UDk9BLuOF3F1rAIwUEwh2c94Uk7nKRdUMxfqHCXqB cSxGMNOClr9qw/O0yYrwv9HJOUSZxoM0fJTuhZCCWaHU5TjwzVJj0s4dV0f1KFlmjbEuy7 RUrTLrSYfu3/pQVscG7Y5kAdCdohsvnbHdUFTaExHtchJxBv57xkowf8KXFJn8QPd7H37l RSrGafgwibGSJBo2c3J5Jr8UW10qI5zPP1Ei0BcV/qBqz0V4x4QuLagiTZpiVYlv8OZuVJ A7QJ6OYQt2JxNLfqCzTZNTcN4nJmpSE0N22lPbAwH/+SyqOQ+IG4Kqp94NfIEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SW1k005xHzdV4; Thu, 16 Nov 2023 00:53: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 3AG0rRgc048678; Thu, 16 Nov 2023 00:53:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AG0rRuv048675; Thu, 16 Nov 2023 00:53:27 GMT (envelope-from git) Date: Thu, 16 Nov 2023 00:53:27 GMT Message-Id: <202311160053.3AG0rRuv048675@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: 5972ffde919a - main - ig4(4): Add an EMAG device type List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 5972ffde919ab65ba29d4d51ccf735da18d52719 Auto-Submitted: auto-generated The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=5972ffde919ab65ba29d4d51ccf735da18d52719 commit 5972ffde919ab65ba29d4d51ccf735da18d52719 Author: Andrew Gallatin AuthorDate: 2023-11-16 00:51:28 +0000 Commit: Andrew Gallatin CommitDate: 2023-11-16 00:53:21 +0000 ig4(4): Add an EMAG device type Sponsored by: Ampere Computing LLC, Netflix Submitted by: allanjude Differential Revision: https://reviews.freebsd.org/D28746 Reviewed by: imp --- sys/dev/ichiic/ig4_acpi.c | 12 ++++++++++-- sys/dev/ichiic/ig4_iic.c | 3 +++ sys/dev/ichiic/ig4_var.h | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/dev/ichiic/ig4_acpi.c b/sys/dev/ichiic/ig4_acpi.c index f88cca6cf13d..3f370ae7abb9 100644 --- a/sys/dev/ichiic/ig4_acpi.c +++ b/sys/dev/ichiic/ig4_acpi.c @@ -83,13 +83,21 @@ static int ig4iic_acpi_attach(device_t dev) { ig4iic_softc_t *sc; + char *str; int error; sc = device_get_softc(dev); sc->dev = dev; - /* All the HIDs matched are Atom SOCs. */ - sc->version = IG4_ATOM; + error = ACPI_ID_PROBE(device_get_parent(dev), dev, ig4iic_ids, &str); + if (error > 0) + return (error); + if (strcmp(str, "APMC0D0F") == 0) { + sc->version = IG4_EMAG; + } else { + /* All the other HIDs matched are Atom SOCs. */ + sc->version = IG4_ATOM; + } sc->regs_rid = 0; sc->regs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->regs_rid, RF_ACTIVE); diff --git a/sys/dev/ichiic/ig4_iic.c b/sys/dev/ichiic/ig4_iic.c index 195bca62928a..3dc72c458b24 100644 --- a/sys/dev/ichiic/ig4_iic.c +++ b/sys/dev/ichiic/ig4_iic.c @@ -89,6 +89,9 @@ * Ig4 hardware parameters except Haswell are taken from intel_lpss driver */ static const struct ig4_hw ig4iic_hw[] = { + [IG4_EMAG] = { + .ic_clock_rate = 100, /* MHz */ + }, [IG4_HASWELL] = { .ic_clock_rate = 100, /* MHz */ .sda_hold_time = 90, /* nsec */ diff --git a/sys/dev/ichiic/ig4_var.h b/sys/dev/ichiic/ig4_var.h index 964a610e7408..989cf23779a2 100644 --- a/sys/dev/ichiic/ig4_var.h +++ b/sys/dev/ichiic/ig4_var.h @@ -42,6 +42,7 @@ #include "iicbus_if.h" enum ig4_vers { + IG4_EMAG, IG4_HASWELL, IG4_ATOM, IG4_SKYLAKE, From nobody Thu Nov 16 00:54:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SW1lZ6RqVz50xQ9; Thu, 16 Nov 2023 00:54: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 4SW1lZ5sTwz4FpZ; Thu, 16 Nov 2023 00:54:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700096090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rA4iRH9anapwsnEEi2R3O2lKYCH2+U+tvilE3NVo+RI=; b=rY4iRO2baQEQ572GfkYQJ6f92mEH2C06/hmZFfuKtC4rgu2iAOX1PFV0N7nzN46g/2npwr XF7+9tSJL6KPKr5hq+dJr3pqvBmQTZxhWZXtKD83pG95MsObDNwLH1VtuHblTk5i//no90 biQO8hSmD+kRjGg11aLpsciEMQ+kGNH044tHD/Ne77AdR2UkKMI2wusRjOwK2yTGtAud50 /1yjfariQ1+2CFvKIlWjBlZhhI+bQjXCWt8mrqHCUJc7dwccw56lSMAre6sXasNWP2plr1 d/QfgCnrNCtFEQaicZZA/Wum9sMO3tkv04LT624frKD5KpCbM7BjCqYneP683Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700096090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rA4iRH9anapwsnEEi2R3O2lKYCH2+U+tvilE3NVo+RI=; b=T4GESOUvUDD2dii2ELNsNnaPOY1IZAD8B2bNmul/btYTZ2XrgPHNPS9KHR5IdF+NWPx2YP ToERhFP61Ginrg5qQ5T0FR9/i5WzB+SkhUgf2VQ68ROI77V+6ERkK5fyxLDTl61WGho/mi 2Gf8x1VanRHD6Wuv4M5L8PXKWmK/ByMkXEhqLYhNk0DdlZAKrYw+yPKIhfbLWnM65QTVOE Cv+2Q7J2UEW1HkahR8QcwfaV4XzUoQJ51NrkROwc8GvTG/ci8YHQJfxMgjDPNpyIB1xx5L DiboDFBIgG0P4+q12xcnaGRkQ+OaVAkxlKoyEeEjtRuvRPO0NR6TrbMa9OONTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700096090; a=rsa-sha256; cv=none; b=D0CYs/dojZoCU5HyJkXui5jCxiWX3bX2yJsvOoXW4uEyFfv7boBSK0h0zHo/hrT/BTNibt FJNYi9JTMCU029dUfpH6jR3VMwfNaT0lzoG3LkX6QFvbYBr0Fx+MDkuTiEWEuWX1TRKk75 6ILd2E88qb7LjLvgXFZJ+GttKt8iJ6CI3LPuUyaT5RTsfs5lKdsXMyQCC8HDGJSVwOhTVt kighF2g0c7wDmy39VTiyhqbej191wicOpjhHGuH1kUZ8Yb/UqIBzOV6VqtLDeAYWsh6V/2 jeFG1FyBc/8lijAhIRbNvutM/Ml2/xoLlQkLdnm5WGyR4JhBtMsztSk5FI8nug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SW1lZ4y0ZzfMw; Thu, 16 Nov 2023 00:54: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 3AG0soGB049004; Thu, 16 Nov 2023 00:54:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AG0somJ049001; Thu, 16 Nov 2023 00:54:50 GMT (envelope-from git) Date: Thu, 16 Nov 2023 00:54:50 GMT Message-Id: <202311160054.3AG0somJ049001@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: fd9ae9ac04ed - main - pkg: Allocate a suitably-sized string for the local ABI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: fd9ae9ac04edf9acef4a2ffbf663698a2b8e7ced Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fd9ae9ac04edf9acef4a2ffbf663698a2b8e7ced commit fd9ae9ac04edf9acef4a2ffbf663698a2b8e7ced Author: John Baldwin AuthorDate: 2023-11-16 00:53:53 +0000 Commit: John Baldwin CommitDate: 2023-11-16 00:53:53 +0000 pkg: Allocate a suitably-sized string for the local ABI Previously the local ABI string was written to an on-stack buffer and the pointer to that buffer was saved in a global before the function returned. This had two issues: c[ABI].val pointed to a no-longer-valid on-stack buffer after config_init returned, and the string could potentially be truncated. Fix both of those by changing pkg_get_myabi to return a pointer to a string allocated by asprintf. Note that the allocated string is left in the global config array until it is implicitly freed on process exit. Reported by: GCC 13 -Wdangling-pointer Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42623 --- usr.sbin/pkg/config.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/usr.sbin/pkg/config.c b/usr.sbin/pkg/config.c index a2b005eca835..ce3a11cf8c81 100644 --- a/usr.sbin/pkg/config.c +++ b/usr.sbin/pkg/config.c @@ -144,32 +144,35 @@ static struct config_entry c[] = { } }; -static int -pkg_get_myabi(char *dest, size_t sz) +static char * +pkg_get_myabi(void) { struct utsname uts; char machine_arch[255]; + char *abi; size_t len; int error; error = uname(&uts); if (error) - return (errno); + return (NULL); len = sizeof(machine_arch); error = sysctlbyname("hw.machine_arch", machine_arch, &len, NULL, 0); if (error) - return (errno); + return (NULL); machine_arch[len] = '\0'; /* * Use __FreeBSD_version rather than kernel version (uts.release) for * use in jails. This is equivalent to the value of uname -U. */ - snprintf(dest, sz, "%s:%d:%s", uts.sysname, __FreeBSD_version/100000, + error = asprintf(&abi, "%s:%d:%s", uts.sysname, __FreeBSD_version/100000, machine_arch); + if (error < 0) + return (NULL); - return (error); + return (abi); } static void @@ -453,10 +456,9 @@ config_init(const char *requested_repo) char *val; int i; const char *localbase; - char *env_list_item; + char *abi, *env_list_item; char confpath[MAXPATHLEN]; struct config_value *cv; - char abi[BUFSIZ]; for (i = 0; i < CONFIG_SIZE; i++) { val = getenv(c[i].key); @@ -512,7 +514,8 @@ config_init(const char *requested_repo) finalize: if (c[ABI].val == NULL && c[ABI].value == NULL) { - if (pkg_get_myabi(abi, BUFSIZ) != 0) + abi = pkg_get_myabi(); + if (abi == NULL) errx(EXIT_FAILURE, "Failed to determine the system " "ABI"); c[ABI].val = abi; From nobody Thu Nov 16 03:59:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SW5rr0Hhvz516N1; Thu, 16 Nov 2023 03:59: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 4SW5rq6kN4z4XfM; Thu, 16 Nov 2023 03:59:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700107179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cifpINs0t6oR5xmHPNTLA1eQeXuptYzwTF2K3vfvheE=; b=oaBI1tmquJEqDsQ0x/BdnEvmaYMXvfrMTavUUbR4j0yhomoBaPhsT8XU5j83A2FK0T917P +RVxoQxCzTP7+P6c4pzBHE9Owr0SHpbrgYGA5hZ7fcCzLj8vNhP4y6lq6LoWraKoebiZ4b qRQbJi4fZreD+F1C/TmsW2XTV7qK2JJw1RkaEGb19YPAPRHS88lEcKFomfLcQYu8ZzfPPQ AmPl606gcralvrsizJ4s6soiJ7pJvcgRTH0vZGX+jDUwVX+Hs+ODYCbFEQQyoEnZePBzv+ 6TSntH2+gaSWNM7UTdNnLziNQRFWJvZZHImm8723762pnEXE1EDo/TZA3daLng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700107179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cifpINs0t6oR5xmHPNTLA1eQeXuptYzwTF2K3vfvheE=; b=jz4eQqo1z7UUXkGDaP99H/4Wt7jeymBfMdX6nMgbrTKGUxZSVx099Is7rGNzHF3MRp84/A sYJQMv0Q6SVP0/PYFzLHsxNuenBgx15JjZ61qEqJucVzaPV0V8zwdm6pjAtQgFatt9od8F 6ChsEbGruZxEG9effSf2kGdxihYQmeERjxXHZg0VhbTUdc5QHUIgB9A6agGlpL2UlliCGp ach2i+WgLEcC7rrYUHDRMhPVh8rlfajSUqsvPg97IlDTze/f+ITTkY9W+pCE94xeyFiRYD u0Z59wTooGYqg9PjXBTq9YCFgmwCyTIC8icsYaW25D7UbrAU0KzQNhx4V9nlgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700107179; a=rsa-sha256; cv=none; b=Mc4XZ4C3/od3TTHekItD2m13dE1xfE5+LVbGxnjcDNVF09mkJ7dRxMTzV5DgUSxNpJGtH0 40WVg9lUHphNtJy2jFRvX7L77KccVWaZTBUWisw1F6ZpLMCMzQ9GyuDwPzwwMffooXHoRD 03SmG4+yNlqtfMKTTiSxkpFNDv0z6/y0/qmkfBbwRJ2DkucuIfFNv0k/+hJIslvwSXHB2g mDJduWl1n+HtsTg0g/vNw7oPDuE1ssr7YlRf5/3RLrFT/KwCj8lN4E31MfXHPtSMPr95hB IIW7vYN4s5ch4KA9sfwtq09tBSWOWx01PbbrQhW9/FVc04vjHd3lbb7N7DqLLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SW5rq5blVzkw0; Thu, 16 Nov 2023 03:59: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 3AG3xdqR050831; Thu, 16 Nov 2023 03:59:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AG3xdrR050828; Thu, 16 Nov 2023 03:59:39 GMT (envelope-from git) Date: Thu, 16 Nov 2023 03:59:39 GMT Message-Id: <202311160359.3AG3xdrR050828@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 7b21c447fb7b - main - vmstat: Make disks reporting some more reasonable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b21c447fb7b761f094c3c2ce2e6d6e2c91c285c Auto-Submitted: auto-generated The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=7b21c447fb7b761f094c3c2ce2e6d6e2c91c285c commit 7b21c447fb7b761f094c3c2ce2e6d6e2c91c285c Author: Alexander Motin AuthorDate: 2023-11-16 03:56:51 +0000 Commit: Alexander Motin CommitDate: 2023-11-16 03:56:51 +0000 vmstat: Make disks reporting some more reasonable MFC after: 1 month --- usr.bin/vmstat/vmstat.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index a03c28f19d00..338d7b15bd84 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -221,12 +221,13 @@ main(int argc, char *argv[]) memf = nlistf = NULL; interval = reps = todo = 0; maxshowdevs = 2; - hflag = isatty(1); argc = xo_parse_args(argc, argv); if (argc < 0) return (argc); + hflag = (xo_get_style(NULL) == XO_STYLE_TEXT) && isatty(1); + while ((c = getopt(argc, argv, "ac:fhHiM:mN:n:oPp:sw:z")) != -1) { switch (c) { case 'a': @@ -818,28 +819,30 @@ dovmstat(unsigned int interval, int reps) rate(sum.v_tfree - osum.v_tfree), 5, 0); prthuman("scanned", rate(sum.v_pdpages - osum.v_pdpages), 5, 0); - xo_emit(" "); } else { xo_emit(" "); xo_emit("{:freed/%5lu} ", rate(sum.v_tfree - osum.v_tfree)); - xo_emit("{:scanned/%4lu} ", + xo_emit("{:scanned/%4lu}", rate(sum.v_pdpages - osum.v_pdpages)); } xo_close_container("paging-rates"); devstats(); xo_open_container("fault-rates"); - xo_emit("{:interrupts/%4lu}", rate(sum.v_intr - osum.v_intr)); if (hflag) { + prthuman("interrupts", + rate(sum.v_intr - osum.v_intr), 5, 0); prthuman("system-calls", rate(sum.v_syscall - osum.v_syscall), 5, 0); prthuman("context-switches", rate(sum.v_swtch - osum.v_swtch), 5, 0); } else { xo_emit(" "); - xo_emit("{:system-calls/%5lu} " + xo_emit("{:interrupts/%4lu} " + "{:system-calls/%5lu} " "{:context-switches/%5lu}", + rate(sum.v_intr - osum.v_intr), rate(sum.v_syscall - osum.v_syscall), rate(sum.v_swtch - osum.v_swtch)); } @@ -878,9 +881,9 @@ printhdr(int maxid, u_long cpumask) else xo_emit("{T:procs} {T:memory} {T:/page%*s}", 19, ""); if (num_shown > 1) - xo_emit(" {T:/disks %*s} ", num_shown * 4 - 7, ""); + xo_emit(" {T:/disks %*s} ", num_shown * 5 - 7, ""); else if (num_shown == 1) - xo_emit(" {T:disks}"); + xo_emit(" {T:disks} "); xo_emit(" {T:faults} "); if (Pflag) { for (i = 0; i <= maxid; i++) { @@ -900,8 +903,7 @@ printhdr(int maxid, u_long cpumask) for (i = 0; i < num_devices; i++) if ((dev_select[i].selected) && (dev_select[i].selected <= maxshowdevs)) - xo_emit("{T:/%c%c%d} ", dev_select[i].device_name[0], - dev_select[i].device_name[1], + xo_emit("{T:/%3.3s%d} ", dev_select[i].device_name, dev_select[i].unit_number); xo_emit(" {T:in} {T:sy} {T:cs}"); if (Pflag) { @@ -1154,11 +1156,15 @@ devstats(void) xo_errx(1, "%s", devstat_errbuf); xo_open_instance("device"); - xo_emit("{ekq:name/%c%c%d}{:transfers/%3.0Lf} ", - dev_select[dn].device_name[0], - dev_select[dn].device_name[1], - dev_select[dn].unit_number, - transfers_per_second); + xo_emit("{ekq:name/%s%d}", + dev_select[dn].device_name, + dev_select[dn].unit_number); + if (hflag) { + prthuman("transfers", (uint64_t)transfers_per_second, + 5, HN_DIVISOR_1000); + } else { + xo_emit("{:transfers/%3.0Lf}", transfers_per_second); + } xo_close_instance("device"); } xo_close_list("device"); From nobody Thu Nov 16 04:14:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SW69X2nWQz517Tg; Thu, 16 Nov 2023 04:14: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 4SW69X0H5zz4bMR; Thu, 16 Nov 2023 04:14:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700108048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sjZi1W0bwjHrVu5YebgJO268DgAE5bDbJ++4PV+97/M=; b=mU1oqBDlxtfuwGVR0DM1e/SaQ7vBK1IzgVn9WfokMiU2n85NcL5TkqQNAqqGpbAXw5ogzf Uv8/UkjZLwfajF2nWCWuAJtPU437nsvxf5JpNykEkwslgtvX/E6uSaDXLSzLZhR6SpuKdH VPReOK24x+ip2zyqvw7OgGCfTgoWnkLLHWIRIFyxbzXKYlRbf/KqN0ds3P13v2tAMOMUKX u+VWhungzpeJUrqYcZgMdDNLcS4TSAhX8OivGus2CHfjo+TBkYEucE+H5eVSRglyoTpavw FEm6643iwZAMxCoZAb/uBk/QpHgh1ypeU68CsdesC/3+cXpQwhoiRytilVwuww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700108048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sjZi1W0bwjHrVu5YebgJO268DgAE5bDbJ++4PV+97/M=; b=A0pgtzAZMtUxsHbvP+CjNp+gKbE4+w411j8bkjEjlI+QbsmVGuWSI0PXfd1AUVZ4iUHd7u RuGdkKtDFYqu+v6tQZKtkOfYuuSJo4/AO5I/q4nYZLHe2uWSgrrLyCyFPP5eL/cAy1pNHR WODTL6x/pu9xgp5Usu9iGbxxIaHOUPfY77zVXwUz3CRyz8fAZ1MT6J3Pm8DvvkE4vlUsoa jb/DGhMaDkuQ/a2ajxKJ4veTkCCdeckMqi6EvHRvckkpjcC6AhC18K+heZmHVFChaKpJm0 Kwx9tvCMOHpXzqqTEBJfkbE6wYKTr2VCsi0bKjjskJDjUjdor3Hg3YOdjeLckA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700108048; a=rsa-sha256; cv=none; b=kSWt5az/v7E4KKw8glEiPaXlURVc961UYFrK5OXmNv0YJAu/1ZO+WBTDkJvR2d+ojBZP9/ n81aaHPCUfL8XyfDDKULQtr6fwbEZksXNqeraL1NnqfjrqP0HFzTsfAc06p3INVB55YNVi OQTlqmpK8+sQufUD4dZUTT00P069tuavZAmU+w7cqaSr7kVUlWV1h3lM+pFk50Is4nWDHS oujZG8kP63G5MlXgfk+LCywiJpFG6tY4QZ1LBaNBf+BBnLFMqMLEjVKVyjKBHjcEhMNuSs 2aQarYShcEXk8jbNLx+mG90Sw7bvMyAVRZiCTDrsjMF9UcQGg3fT0pjBJkSlfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SW69W6NDDzlfv; Thu, 16 Nov 2023 04:14: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 3AG4E7gi083507; Thu, 16 Nov 2023 04:14:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AG4E7fD083504; Thu, 16 Nov 2023 04:14:07 GMT (envelope-from git) Date: Thu, 16 Nov 2023 04:14:07 GMT Message-Id: <202311160414.3AG4E7fD083504@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: d282baddb0b0 - main - Add interface NVME to devstat List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d282baddb0b029ca8466d23ac51e95c918442535 Auto-Submitted: auto-generated The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=d282baddb0b029ca8466d23ac51e95c918442535 commit d282baddb0b029ca8466d23ac51e95c918442535 Author: Alexander Motin AuthorDate: 2023-11-16 04:03:40 +0000 Commit: Alexander Motin CommitDate: 2023-11-16 04:03:40 +0000 Add interface NVME to devstat This allows to list only NVMe devices in systat, iostat, vmstat, etc. Previously those were counted as OTHER. --- cddl/lib/libdtrace/io.d | 3 +++ lib/libdevstat/devstat.3 | 2 ++ lib/libdevstat/devstat.c | 1 + share/man/man9/devstat.9 | 1 + sys/cam/cam_ccb.h | 1 + sys/dev/nvd/nvd.c | 5 +++++ sys/sys/devicestat.h | 1 + usr.bin/vmstat/vmstat.8 | 2 ++ usr.sbin/iostat/iostat.8 | 2 ++ 9 files changed, 18 insertions(+) diff --git a/cddl/lib/libdtrace/io.d b/cddl/lib/libdtrace/io.d index fbce09e2fcf7..043291244a50 100644 --- a/cddl/lib/libdtrace/io.d +++ b/cddl/lib/libdtrace/io.d @@ -194,6 +194,8 @@ inline int DEVSTAT_TYPE_IF_IDE = 0x020; #pragma D binding "1.13" DEVSTAT_TYPE_IF_IDE inline int DEVSTAT_TYPE_IF_OTHER = 0x030; #pragma D binding "1.13" DEVSTAT_TYPE_IF_OTHER +inline int DEVSTAT_TYPE_IF_NVM = 0x040; +#pragma D binding "1.13" DEVSTAT_TYPE_IF_NVME inline int DEVSTAT_TYPE_IF_MASK = 0x0f0; #pragma D binding "1.13" DEVSTAT_TYPE_IF_MASK inline int DEVSTAT_TYPE_PASS = 0x100; @@ -228,6 +230,7 @@ inline string device_if_string[int type] = type == DEVSTAT_TYPE_IF_SCSI ? "SCSI" : type == DEVSTAT_TYPE_IF_IDE ? "IDE" : type == DEVSTAT_TYPE_IF_OTHER ? "OTHER" : + type == DEVSTAT_TYPE_IF_NVME ? "NVME" : strjoin("UNKNOWN(", strjoin(lltostr(type), ")")); #pragma D binding "1.13" device_if diff --git a/lib/libdevstat/devstat.3 b/lib/libdevstat/devstat.3 index 20f5fdd5649c..d0eaff359e15 100644 --- a/lib/libdevstat/devstat.3 +++ b/lib/libdevstat/devstat.3 @@ -428,6 +428,8 @@ Floppy devices Integrated Drive Electronics devices .It Li SCSI Small Computer System Interface devices +.It Li NVME +NVM Express Interface devices .It Li other Any other device interface .El diff --git a/lib/libdevstat/devstat.c b/lib/libdevstat/devstat.c index 7465613da4f1..7aca8c5733d0 100644 --- a/lib/libdevstat/devstat.c +++ b/lib/libdevstat/devstat.c @@ -75,6 +75,7 @@ struct devstat_match_table match_table[] = { {"scsi", DEVSTAT_TYPE_IF_SCSI, DEVSTAT_MATCH_IF}, {"ide", DEVSTAT_TYPE_IF_IDE, DEVSTAT_MATCH_IF}, {"other", DEVSTAT_TYPE_IF_OTHER, DEVSTAT_MATCH_IF}, + {"nvme", DEVSTAT_TYPE_IF_NVME, DEVSTAT_MATCH_IF}, {"worm", DEVSTAT_TYPE_WORM, DEVSTAT_MATCH_TYPE}, {"sa", DEVSTAT_TYPE_SEQUENTIAL,DEVSTAT_MATCH_TYPE}, {"pass", DEVSTAT_TYPE_PASS, DEVSTAT_MATCH_PASS}, diff --git a/share/man/man9/devstat.9 b/share/man/man9/devstat.9 index e474e3119418..3682ad024eae 100644 --- a/share/man/man9/devstat.9 +++ b/share/man/man9/devstat.9 @@ -414,6 +414,7 @@ typedef enum { DEVSTAT_TYPE_IF_SCSI = 0x010, DEVSTAT_TYPE_IF_IDE = 0x020, DEVSTAT_TYPE_IF_OTHER = 0x030, + DEVSTAT_TYPE_IF_NVME = 0x040, DEVSTAT_TYPE_IF_MASK = 0x0f0, DEVSTAT_TYPE_PASS = 0x100 } devstat_type_flags; diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h index 9d52213e3952..66b374008aa5 100644 --- a/sys/cam/cam_ccb.h +++ b/sys/cam/cam_ccb.h @@ -306,6 +306,7 @@ typedef enum { !XPORT_IS_ATA(t) && !XPORT_IS_NVME(t)) #define XPORT_DEVSTAT_TYPE(t) (XPORT_IS_ATA(t) ? DEVSTAT_TYPE_IF_IDE : \ XPORT_IS_SCSI(t) ? DEVSTAT_TYPE_IF_SCSI : \ + XPORT_IS_NVME(t) ? DEVSTAT_TYPE_IF_NVME : \ DEVSTAT_TYPE_IF_OTHER) #define PROTO_VERSION_UNKNOWN (UINT_MAX - 1) diff --git a/sys/dev/nvd/nvd.c b/sys/dev/nvd/nvd.c index 6b83757aa938..26bc4ee36d50 100644 --- a/sys/dev/nvd/nvd.c +++ b/sys/dev/nvd/nvd.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -471,6 +472,10 @@ nvd_new_disk(struct nvme_namespace *ns, void *ctrlr_arg) disk->d_flags |= DISKFLAG_CANDELETE; if (nvme_ns_get_flags(ns) & NVME_NS_FLUSH_SUPPORTED) disk->d_flags |= DISKFLAG_CANFLUSHCACHE; + disk->d_devstat = devstat_new_entry(disk->d_name, disk->d_unit, + disk->d_sectorsize, DEVSTAT_ALL_SUPPORTED, + DEVSTAT_TYPE_DIRECT | DEVSTAT_TYPE_IF_NVME, + DEVSTAT_PRIORITY_DISK); /* * d_ident and d_descr are both far bigger than the length of either diff --git a/sys/sys/devicestat.h b/sys/sys/devicestat.h index 1b8db6f100c9..2583697f7515 100644 --- a/sys/sys/devicestat.h +++ b/sys/sys/devicestat.h @@ -125,6 +125,7 @@ typedef enum { DEVSTAT_TYPE_IF_SCSI = 0x010, DEVSTAT_TYPE_IF_IDE = 0x020, DEVSTAT_TYPE_IF_OTHER = 0x030, + DEVSTAT_TYPE_IF_NVME = 0x040, DEVSTAT_TYPE_IF_MASK = 0x0f0, DEVSTAT_TYPE_PASS = 0x100 } devstat_type_flags; diff --git a/usr.bin/vmstat/vmstat.8 b/usr.bin/vmstat/vmstat.8 index d1f0d4d60bcc..eead7a7ef9c3 100644 --- a/usr.bin/vmstat/vmstat.8 +++ b/usr.bin/vmstat/vmstat.8 @@ -173,6 +173,8 @@ Floppy devices Integrated Drive Electronics devices .It SCSI Small Computer System Interface devices +.It NVME +NVM Express Interface devices .It other Any other device interface .El diff --git a/usr.sbin/iostat/iostat.8 b/usr.sbin/iostat/iostat.8 index 863f8ab8466c..a08a62dc694d 100644 --- a/usr.sbin/iostat/iostat.8 +++ b/usr.sbin/iostat/iostat.8 @@ -206,6 +206,8 @@ Floppy devices Integrated Drive Electronics devices .It SCSI Small Computer System Interface devices +.It NVME +NVM Express Interface devices .It other Any other device interface .El From nobody Thu Nov 16 04:46:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SW6tl5rvmz51981; Thu, 16 Nov 2023 04:46: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 4SW6tl4Rtfz4gGv; Thu, 16 Nov 2023 04:46:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700109983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bkME7htocofm096zvPmijoBzfZYJnAJVr8Ek0h8OHrA=; b=ZcvSBeYZkq3vsBr3T7s1s/M4KN1oJfUJydVXA5w6BA9kxJJ15o9LbVdMCb29a+AsxZyBeR rPJAyNmsy1Z7Uph5sLKIpHkfWmXV/tRaHZmbz0mi3zh1gZC2Vw0xVTPlDaHyzgYF9+D5s6 m4CTyudOiVFDEkMKDi2Dlr7Dyx9zDU6gx6azTxg+QTdhQ0zySu7NDGobu5wcwE6rgxSaJF WQiy9Tz27AaMF0ij0xKmdmwEIQAs6L5L89KMx1Xo24YgcV+8m4iWypVT4Ssnj/+A2zlsO+ W3ONuDic10EINrozVWGpL6e98/H877R0FskWVrET/EZiGv+qULFVdor4919D9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700109983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bkME7htocofm096zvPmijoBzfZYJnAJVr8Ek0h8OHrA=; b=wL72S2FU1RUT937mCfld1O/RA6Z1lHx+FsyVaIhmisZLx3VAWj8waErFj9yBNkPDCrNCYm UIKDcuqz+hT+S0vvxoorKFxp66eNOXcXAWjNXWaMVSssm7zZH6kNAIz17PuJQMtZJJoBMh FlMSyZFeq8SwoLOAW197uWOvbxjnyYKBJvOu68DEgko6XuBM30FmdkEiUyK/qm+5ZHoHPo ZRZS7MW6vR6swGejyFW1dWQWCmMwRsqrqoN4f2EY3ZtsXWB0GlatgYRt3mzkzz18JobaC8 N7k+p9yS/HQlj9zY+kmdM9E4/fIYvv2vqAqjbavzWWklJ+0CJDsrvAMZcrcboA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700109983; a=rsa-sha256; cv=none; b=ZXHyvueFr/oqlkRaBPttRA5JHZ6FO1FEODtc1wLzCyTg0BhOnBrj2vormgpiFLhOWcuJP8 UxHq02V4SxgePeKi7CzHBm8A87g3JBykUDopkTBe2n70HTaTP2I0PHphB0SNiJKnH10gqq faCqV5WrVWckjwRUiOgsAhgJs8/uGnis5qJHdvX2WyaPLlg2+Zbo8w1VD4RG0UBy8lkZop 1IwZYOSNh0r798Ge4kcuozdhHmUoyWTjVq4K2OIlOoyDEN11c9uzuk6MG1UW0Y7Ss1afae xDrJMSPFxJJVzbP2zm1rGaSrneVeIEwqiwOe1HPG33cRw51oPC1rCWKXvvjaQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SW6tl3PsRzlyG; Thu, 16 Nov 2023 04:46: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 3AG4kNnJ033830; Thu, 16 Nov 2023 04: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 3AG4kNW5033827; Thu, 16 Nov 2023 04:46:23 GMT (envelope-from git) Date: Thu, 16 Nov 2023 04:46:23 GMT Message-Id: <202311160446.3AG4kNW5033827@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 3aebcb9ecba7 - main - iostat: Restore lost spaces after tout List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3aebcb9ecba73805546b64f45e9a7ea2ba99ebb0 Auto-Submitted: auto-generated The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=3aebcb9ecba73805546b64f45e9a7ea2ba99ebb0 commit 3aebcb9ecba73805546b64f45e9a7ea2ba99ebb0 Author: Alexander Motin AuthorDate: 2023-11-16 04:45:22 +0000 Commit: Alexander Motin CommitDate: 2023-11-16 04:45:22 +0000 iostat: Restore lost spaces after tout MFC after: 2 weeks --- usr.sbin/iostat/iostat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c index c6ba6aa8a7a2..ec18f4fd35b3 100644 --- a/usr.sbin/iostat/iostat.c +++ b/usr.sbin/iostat/iostat.c @@ -612,7 +612,7 @@ main(int argc, char **argv) } if (xflag == 0 && Tflag > 0) - printf("%4.0Lf %5.0Lf", cur.tk_nin / etime, + printf("%4.0Lf %5.0Lf ", cur.tk_nin / etime, cur.tk_nout / etime); devstats(hflag, etime, havelast); @@ -731,7 +731,7 @@ phdr(void) return; if (Tflag > 0) - (void)printf(" tty"); + (void)printf(" tty "); for (i = 0, printed=0;(i < num_devices) && (printed < maxshowdevs);i++){ int di; if ((dev_select[i].selected != 0) @@ -753,7 +753,7 @@ phdr(void) (void)printf("\n"); if (Tflag > 0) - (void)printf(" tin tout"); + (void)printf(" tin tout "); for (i=0, printed = 0;(i < num_devices) && (printed < maxshowdevs);i++){ if ((dev_select[i].selected != 0) From nobody Thu Nov 16 08:21:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWCgL1VWfz51LJP; Thu, 16 Nov 2023 08:21: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 4SWCgK5LGfz3bFY; Thu, 16 Nov 2023 08:21:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700122909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CMHibndZiazxDBp3kOrBNDcYuFO/qYmwH7OZbfmAViY=; b=l8qX5WXPrfEpODTXTL2nUJkJOaPo9x+iazE1Hh1VwqNRzpFEUY3+qHA9tQKeHrUdIgyLU1 gppQtV4F3fT5Y1Z1tAj0e0H35XsD4prB/0RwmRWG+PVWsoe4CUypkuwG8oPaMowbRW/5Rs 4e4Ycx0UtPrYpVVN6f2/9FBRJhjramYvbSxtIj1WAx2UxA+0g4GBzfO1O9aoKy/8+rOqAX R5JOtkSBB2DDCI1MaP8c1P8ceUGeWhS1a+H89XjI677FXe+gWcGtHXa3u0Epgu2+SIHu8F 5/t3k4YEbrRl1IBuLyqNq5H8E/emylwfgaxp9VfmXrPtBm0iOySb+SC06ZaNlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700122909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CMHibndZiazxDBp3kOrBNDcYuFO/qYmwH7OZbfmAViY=; b=MZ4Y6hmaUBMcP55yUqiGGNSUInfslxTc7pxnq4ysWEf++NKjoEgVmPzpnC5epVZ5gHs5n1 bE/0xd/QazRYoxMsXJmZOhTegtz5y9TeTupVlRcMRalSoOVmN+IYBWmeSFTvIMElMR/DbR 2BiRYQ5dKVlYJ5xrHUgFjEQofaZ/aGvg18g6Q6/j/xDO7imI9QGVZeqJSeMhlA9+uWmVnD ds880IwzduYdzqd3KyW7Rv1JeK3IGZKEH+Ol8Q1gcASUCYXNlLKkAaVUYlD5GTp/YwSBCH Jc7JQgNeXK1ruh+8nm7MKUYj1osJkL13eWHwdlbvCmwoSffC7a/93mBeej69uA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700122909; a=rsa-sha256; cv=none; b=cmAmR+TaGN4L/QtvPKhDtoMn4hgau+xzlBQQMo2K1/JFC2f7tly8uaI2XLaRoJ0dGTzLpb wGl3bu5HyQSN025CNmNR43udCLvnc9iJ0H/VUcMMKxnzdZmdhc6IGUkimI/5DKQol6xg+4 z2LSXciGdYFlCmAfJb0H54jY+k0bIBx+hBAG1zAML23crsxjNJq4fEV7QsIbwxCfdE+R8r KyA1EF7eNn03q/5mIEYwrcS8tBIVLgc2kGWAdoKuRNKJyUkH+o4iP2OL85SWsj30VS8fZ8 QWNvnrzhWN+CEN2r1QtU3pfDaLbcK+1mGFCwnvpNp75Rs5fK/fPEi22VydbJsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWCgK47Gfzspd; Thu, 16 Nov 2023 08:21: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 3AG8LnRQ098790; Thu, 16 Nov 2023 08:21:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AG8Lnr9098787; Thu, 16 Nov 2023 08:21:49 GMT (envelope-from git) Date: Thu, 16 Nov 2023 08:21:49 GMT Message-Id: <202311160821.3AG8Lnr9098787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 55141f2c8991 - main - Add tests for gunion(8) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 55141f2c8991b2a6adbf30bb0fe3e6cbc303f06d Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=55141f2c8991b2a6adbf30bb0fe3e6cbc303f06d commit 55141f2c8991b2a6adbf30bb0fe3e6cbc303f06d Author: Yan-Hao Wang AuthorDate: 2023-11-16 07:58:49 +0000 Commit: Li-Wen Hsu CommitDate: 2023-11-16 08:15:33 +0000 Add tests for gunion(8) Reviewed by: mckusick (earlier version) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41645 --- etc/mtree/BSD.tests.dist | 2 + tests/sys/geom/class/Makefile | 1 + tests/sys/geom/class/union/Makefile | 9 + tests/sys/geom/class/union/conf.sh | 40 ++++ tests/sys/geom/class/union/union_test.sh | 338 +++++++++++++++++++++++++++++++ 5 files changed, 390 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index f6f55276284a..e216767170ab 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -795,6 +795,8 @@ .. stripe .. + union + .. uzip etalon .. diff --git a/tests/sys/geom/class/Makefile b/tests/sys/geom/class/Makefile index 4a21e039f185..10b01a043ddf 100644 --- a/tests/sys/geom/class/Makefile +++ b/tests/sys/geom/class/Makefile @@ -17,6 +17,7 @@ TESTS_SUBDIRS+= part TESTS_SUBDIRS+= raid3 TESTS_SUBDIRS+= shsec TESTS_SUBDIRS+= stripe +TESTS_SUBDIRS+= union TESTS_SUBDIRS+= uzip ${PACKAGE}FILES+= geom_subr.sh diff --git a/tests/sys/geom/class/union/Makefile b/tests/sys/geom/class/union/Makefile new file mode 100644 index 000000000000..5ab8055fd84c --- /dev/null +++ b/tests/sys/geom/class/union/Makefile @@ -0,0 +1,9 @@ +PACKAGE= tests + +TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} + +ATF_TESTS_SH+= union_test + +${PACKAGE}FILES+= conf.sh + +.include diff --git a/tests/sys/geom/class/union/conf.sh b/tests/sys/geom/class/union/conf.sh new file mode 100644 index 000000000000..1150c7204ad3 --- /dev/null +++ b/tests/sys/geom/class/union/conf.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +class="union" +base=$(atf_get ident) + +attach_md() +{ + local test_md + + test_md=$(mdconfig -a "$@") || atf_fail "failed to allocate md(4)" + echo $test_md >> $TEST_MDS_FILE || exit + echo $test_md +} + +gunion_test_cleanup() +{ + if mount | grep -q "/gunionmnt"; then + umount gunionmnt + fi + if mount | grep -q "/uppermnt"; then + umount uppermnt + fi + if mount | grep -q "/lowermnt"; then + umount lowermnt + fi + + if [ -e "guniondev" ]; then + gunion destroy "$(cat guniondev)" + fi + + geom_test_cleanup +} + +gunion_test_setup() +{ + geom_atf_test_setup +} + +ATF_TEST=true +. `dirname $0`/../geom_subr.sh diff --git a/tests/sys/geom/class/union/union_test.sh b/tests/sys/geom/class/union/union_test.sh new file mode 100644 index 000000000000..1872847bdf58 --- /dev/null +++ b/tests/sys/geom/class/union/union_test.sh @@ -0,0 +1,338 @@ +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2023 The FreeBSD Foundation +# +# This software was developed1 by Yan-Hao Wang +# 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 +# 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. +# + +. $(atf_get_srcdir)/conf.sh + +atf_test_case create cleanup +create_head() +{ + atf_set "descr" "Test gunion create and destroy" + atf_set "require.user" "root" +} +create_body() +{ + gunion_test_setup + + upperdev="$(attach_md -s 1m)" + lowerdev="$(attach_md -s 1m)" + newfs -U "/dev/${lowerdev}" + + atf_check gunion create "$upperdev" "$lowerdev" + guniondev="${upperdev}-${lowerdev}.union" + atf_check -o inline:"/dev/${guniondev}\n" ls "/dev/${guniondev}" + atf_check -o ignore fsck -p -f "/dev/${guniondev}" + + atf_check gunion destroy "$guniondev" + atf_check -s not-exit:0 -o ignore -e ignore ls "/dev/${guniondev}" +} +create_cleanup() +{ + gunion_test_cleanup +} + +atf_test_case basic cleanup +basic_head() +{ + atf_set "descr" "Check gunion doesn't affect lowerdev status and lowerdev can't be mounted when being in a gunion" + atf_set "require.user" "root" +} +basic_body() +{ + gunion_test_setup + + upperdev="$(attach_md -s 1m)" + lowerdev="$(attach_md -s 1m)" + newfs -U "/dev/${lowerdev}" + mkdir lowermnt + mkdir gunionmnt + + mount "/dev/${lowerdev}" lowermnt + echo "lower file" > lower_file + cp lower_file lowermnt/lower_file + sync + umount lowermnt + + gunion create "$upperdev" "$lowerdev" + guniondev="${upperdev}-${lowerdev}.union" + atf_check -s not-exit:0 -o ignore -e ignore mount "/dev/${lowerdev}" lowermnt + + mount "/dev/${guniondev}" gunionmnt + echo "update lower file" >> gunionmnt/lower_file + echo "gunion file" > gunion_file + cp gunion_file gunionmnt/gunion_file + sync + umount gunionmnt + + gunion destroy "$guniondev" + mount "/dev/${lowerdev}" lowermnt + checksum lowermnt/lower_file lower_file + atf_check -s not-exit:0 -o ignore -e ignore ls lowermnt/gunion_file +} +basic_cleanup() +{ + gunion_test_cleanup +} + +atf_test_case commit cleanup +commit_head() +{ + atf_set "descr" "Test basic gunion commit without option" + atf_set "require.user" "root" +} +commit_body() +{ + gunion_test_setup + + upperdev="$(attach_md -s 1m)" + lowerdev="$(attach_md -s 1m)" + newfs -U "/dev/${lowerdev}" + mkdir lowermnt + mkdir gunionmnt + + mount "/dev/${lowerdev}" lowermnt + echo "lower file" > lower_file + cp lower_file lowermnt/lower_file + sync + umount lowermnt + + gunion create "$upperdev" "$lowerdev" + guniondev="${upperdev}-${lowerdev}.union" + mount "/dev/${guniondev}" gunionmnt + checksum gunionmnt/lower_file lower_file + + echo "update lower file" >> lower_file + cp -f lower_file gunionmnt/lower_file + echo "gunion file" > gunion_file + cp gunion_file gunionmnt/gunion_file + sync + umount gunionmnt + atf_check gunion commit "$guniondev" + gunion destroy "$guniondev" + + atf_check -o ignore fsck -p -f "/dev/${lowerdev}" + mount "/dev/${lowerdev}" lowermnt + checksum lowermnt/lower_file lower_file + checksum lowermnt/gunion_file gunion_file +} +commit_cleanup() +{ + gunion_test_cleanup +} + +atf_test_case offset cleanup +offset_head() +{ + atf_set "descr" "Test gunion create with -o offset option" + atf_set "require.user" "root" +} +offset_body() +{ + gunion_test_setup + + upperdev="$(attach_md -s 1m)" + lowerdev="$(attach_md -s 1m)" + gpart create -s GPT "/dev/${lowerdev}" + gpart add -t freebsd-ufs "$lowerdev" + newfs "/dev/${lowerdev}p1" + gpt_entry_1=$(gpart show "/dev/${lowerdev}") + mkdir gunionmnt + + secsize="$(diskinfo "/dev/${lowerdev}" | awk '{print $2}')" + p1_start_sector="$(gpart show -p "/dev/${lowerdev}" | grep ${lowerdev}p1 | awk '{print $1}')" + offset_size="$((secsize * p1_start_sector))" + + gunion create -o "$offset_size" "$upperdev" "$lowerdev" + guniondev="${upperdev}-${lowerdev}.union" + + atf_check -o ignore fsck -p -f "/dev/${guniondev}" + atf_check mount "/dev/${guniondev}" gunionmnt + umount gunionmnt + gunion destroy "$guniondev" + + gpt_entry_2=$(gpart show "/dev/${lowerdev}") + atf_check_equal "$gpt_entry_1" "$gpt_entry_2" +} +offset_cleanup() +{ + gunion_test_cleanup +} + +atf_test_case size cleanup +size_head() +{ + atf_set "descr" "Test gunion create with -s size option" + atf_set "require.user" "root" +} +size_body() +{ + gunion_test_setup + + upperdev="$(attach_md -s 2m)" + lowerdev="$(attach_md -s 1m)" + newfs -U "/dev/${lowerdev}" + + gunion create -s 2m "$upperdev" "$lowerdev" + guniondev="${upperdev}-${lowerdev}.union" + echo "$guniondev" > guniondev + + size="$(diskinfo "/dev/$guniondev" | awk '{print $3}')" + atf_check_equal "2097152" "$size" # 2 MB = 2097152 bytes +} +size_cleanup() +{ + gunion_test_cleanup +} + +atf_test_case secsize cleanup +secsize_head() +{ + atf_set "descr" "Test gunion create with -S secsize option" + atf_set "require.user" "root" +} +secsize_body() +{ + gunion_test_setup + + upperdev="$(attach_md -s 1m)" + lowerdev="$(attach_md -s 1m)" + newfs -S 512 -U "/dev/${lowerdev}" + lower_secsize="$(diskinfo "/dev/${lowerdev}" | awk '{print $2}')" + atf_check_equal "512" "$lower_secsize" + + gunion create -S 1024 "$upperdev" "$lowerdev" + guniondev="${upperdev}-${lowerdev}.union" + echo "$guniondev" > guniondev + + secsize="$(diskinfo "/dev/${guniondev}" | awk '{print $2}')" + atf_check_equal "1024" "$secsize" +} +secsize_cleanup() +{ + gunion_test_cleanup +} + +atf_test_case gunionname cleanup +gunionname_head() +{ + atf_set "descr" "Test gunion create with -Z gunionname option" + atf_set "require.user" "root" +} +gunionname_body() +{ + gunion_test_setup + + upperdev="$(attach_md -s 1m)" + lowerdev="$(attach_md -s 1m)" + newfs -U "/dev/${lowerdev}" + + gunion create -Z gunion1 "$upperdev" "$lowerdev" + echo "gunion1.union" > guniondev + atf_check -o inline:"/dev/gunion1.union\n" ls /dev/gunion1.union +} +gunionname_cleanup() +{ + gunion_test_cleanup +} + +atf_test_case revert cleanup +revert_head() +{ + atf_set "descr" "Test gunion revert" + atf_set "require.user" "root" +} +revert_body() +{ + gunion_test_setup + + upperdev="$(attach_md -s 1m)" + lowerdev="$(attach_md -s 1m)" + newfs -U "/dev/${lowerdev}" + mkdir lowermnt + mkdir gunionmnt + + mount "/dev/${lowerdev}" lowermnt + echo "lower file" > lower_file + cp lower_file lowermnt/lower_file + sync + umount lowermnt + + atf_check gunion create "$upperdev" "$lowerdev" + guniondev="${upperdev}-${lowerdev}.union" + mount "/dev/${guniondev}" gunionmnt + + echo "update lower file" >> gunionmnt/lower_file + echo "gunion file" > gunion_file + cp gunion_file gunionmnt/gunion_file + sync + umount gunionmnt + atf_check gunion revert "$guniondev" + + mount "/dev/${guniondev}" gunionmnt + checksum gunionmnt/lower_file lower_file + atf_check -s not-exit:0 -o ignore -e ignore ls gunionmnt/gunion_file + + umount gunionmnt + gunion destroy "$guniondev" +} +revert_cleanup() +{ + gunion_test_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case create + atf_add_test_case basic + atf_add_test_case commit + atf_add_test_case offset + atf_add_test_case size + atf_add_test_case secsize + atf_add_test_case gunionname + atf_add_test_case revert +} + +checksum() +{ + src=$1 + work=$2 + + if [ ! -e "$src" ]; then + atf_fail "file not exist" + fi + if [ ! -e "$work" ]; then + atf_fail "file not exist" + fi + + src_checksum=$(md5 -q "$src") + work_checksum=$(md5 -q "$work") + + if [ "$work_checksum" != "$src_checksum" ]; then + atf_fail "md5 checksum didn't match with ${src} and ${work}" + fi +} From nobody Thu Nov 16 08:22:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWCgr5Ydbz51LNt; Thu, 16 Nov 2023 08:22: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 4SWCgr13M6z3bj8; Thu, 16 Nov 2023 08:22:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700122936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/JJk2XV9tgP4hBjPphJk7WNYhHeRq4o8Bf5peY6eu34=; b=FHtHpzOG9By3U1USDhYZXF4uQ0DJCiymF5GB1OBB6C/fSIG/w8v1lJKMPsCqmOHkzmrQW6 u2UOU5ODx7DTaIZMMKEjdNbkSRMDuQ9kdcVnbA4z266ZZL2ffudWwztbNVkXGBtPGNmIom I7ywTA+6kbWJB8NAtu5KEQleczo/KE2PXe+/oQHT+pLtDmAlYtXds1fB2GJLCH328sItm8 LxKzcRew040O1Qp4Gf2G1DRUF9o90tevgV2WKpWsZ0b9X6Z3ROz+ExgGxedIacCAXPTwlq c67nMoTGMXTE6DRM77+tdDgEIWHVZmmuzzPrifFHeAKzZRgdrgdsBfLuuSk9TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700122936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/JJk2XV9tgP4hBjPphJk7WNYhHeRq4o8Bf5peY6eu34=; b=ZQkbUt33PLalv+XCGdhP7JXTGm/6zY+a//ToDm2oApZqq4kSw6oNoUwJUpC1JM67PmHrYP YHhbEzztD5/jDIGwQnUScnGBKhp8erp/1K5A+lQzlAcxgeYQhpqB+WZk0xbFw96azNXD+y SxPBh7/X1zv1j/w+HZ6cpZm62l/jJOxviDAn0N8Ddsnxzgf5WtKV/ZAiUimgz2jIW1N2pk 1hsRJfpsoOhraFBoiEGnSJsQ10oOz/DEEVn0oi8KBdjbNzcyq1p0qYWVmYb8dc7My5gqFl qG3B3qRS44vgc7WZNcvH6knrwu/CKZl6GcSRtrOqrrfFtr9t8+tKZJITeQdF9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700122936; a=rsa-sha256; cv=none; b=que/nIJZCP/xy+PEFvRJpuo4gbrw02ZXrYqOwR7h+K6ljKa8x7Rf4OeAaQhT35v4HsWuQr /hMgpWr8nhdIk3abDPVUhd6SV5krIa8S+hhh9WAVjMf0LAjZayR5RrfhD2sLRILuPUXKIV FI+6FFHAbpdQ7FlomhF4VPcNS9g6FPbXW/G/CIlluPrwHQliQC+c8B1BvEUQ+fbrCwBQcR Bhv/WuaU3U7DRnepfhCcNCFBoKeBb2Fa3zGpB5Aro2u9e2Lq5LnobL+0Ot8dEmC35r5Wmp Eb/XSD7jvHamZiQpIG60crvm2RYNZtby9dpWzxXhmCUVjVtoADk6NcDtOvBjhw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWCgr06P4zsRq; Thu, 16 Nov 2023 08:22: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 3AG8MFWh099907; Thu, 16 Nov 2023 08:22:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AG8MF0p099904; Thu, 16 Nov 2023 08:22:15 GMT (envelope-from git) Date: Thu, 16 Nov 2023 08:22:15 GMT Message-Id: <202311160822.3AG8MF0p099904@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Doug Rabson Subject: git: da7e9601a99a - stable/14 - pkgbase: use . format for alpha, beta and release package versions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dfr X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: da7e9601a99afd3f8777f6ae62fd51e601e15085 Auto-Submitted: auto-generated The branch stable/14 has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=da7e9601a99afd3f8777f6ae62fd51e601e15085 commit da7e9601a99afd3f8777f6ae62fd51e601e15085 Author: Doug Rabson AuthorDate: 2023-11-13 13:04:26 +0000 Commit: Doug Rabson CommitDate: 2023-11-16 08:19:08 +0000 pkgbase: use . format for alpha, beta and release package versions This is consistent with version numbers used in releng/13.2. PR: 275051 Reviewed by: bapt MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42562 (cherry picked from commit 21e9018ae19662db643a21064150da866bc7beb4) --- Makefile.inc1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 4f564547bc84..46663e72750b 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -547,9 +547,11 @@ VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDA MAJOR_REVISION= ${_REVISION:R} .if !defined(PKG_VERSION) +_PKG_REVISION= ${_REVISION} _STRTIMENOW= %Y%m%d%H%M%S _TIMENOW= ${_STRTIMENOW:gmtime} .if ${_BRANCH:MCURRENT*} || ${_BRANCH:MSTABLE*} || ${_BRANCH:MPRERELEASE*} +_PKG_REVISION= ${MAJOR_REVISION} EXTRA_REVISION= .snap${_TIMENOW} .elif ${_BRANCH:MALPHA*} EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/}.${_TIMENOW} @@ -560,7 +562,7 @@ EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/}.${_TIMENOW} .elif ${_BRANCH:M*-p*} EXTRA_REVISION= p${_BRANCH:C/.*-p([0-9]+$)/\1/} .endif -PKG_VERSION:= ${MAJOR_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} +PKG_VERSION:= ${_PKG_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} .endif .endif # !defined(PKG_VERSION) From nobody Thu Nov 16 09:48:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWFbr0SjPz50R2k; Thu, 16 Nov 2023 09:48: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 4SWFbq70prz4Gsn; Thu, 16 Nov 2023 09:48:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700128136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e1frLxZzAyX9wtSKjNqThvTPaWZco6lVfvnlDlay68o=; b=k5YH6d3/Rd5bqafzv/tfYBPUzcYKDrqKzNE5drSE3wm7cKHW5yszy1DGbBpehXHO2oBkcO p0hTcX7nVGxrV8IFdpHGKYZ6H57sOcT2yQXBJda7xyhdwtlHvpDJvu9bS0cl7Jyj+APtcj wOqyJkMigcoptQF/zynGlv8k9v0/12uk00sHdIdvp4HUqbrNkh7y0vIY/8reV5tRVOoWoD V7JEq8W4RY7iQHhjzq/jcyxwiehc8fY9x69MdD3DpWloPZClYuLyhgY+CrLZkVQeYXVhCX TRjrOIVuXzFj4o/0NSpVGFzP9to1wBofjnLzf0jJIR7Flhp3NgHXcpZw9LpvxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700128136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e1frLxZzAyX9wtSKjNqThvTPaWZco6lVfvnlDlay68o=; b=sStVWvxv/EhPCCmIqXzpU+pEaZDHX1fOQDMGqXiV0XmLtbYnzuuh4svu3poWMiz1OKJ0SX Ss+rX6rlTUzfRrTsfEi6fuiS9NJoHp654TDRJ00n6OPE/B9iyfW0xMofSRnklMoxiEBxuf 441SnSgcIkKH+zcJz3x0N6pA26xot/rtwwV7/9/7l8obObX2B07AEZYqZIzCy/rEax1zYV tseGv8Ogq+UZk66TmydILy/rzM3/GALN0r9dAdGm5DS4df956qT/1BWCjlJNZa1R4qIfvK Bf4fjI1dELIp9We50eLBCU+iXTdSByR31bcNyEIntOII9OHOwDzVJ+YA6PNdGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700128136; a=rsa-sha256; cv=none; b=yfJAEjRaTQnLv0Uj4S26g2nYZNUcKJlwdFjP4v4kao7sPAmXQ4c99Ulx5W+ISNWiNMIZvO /c34VjU0bfHLJp5m4VeQEVmx9UaTUB7MYB2hxdp+2HX7FjHC5zb6KDTqSNZz6ZLZ2Of/bI vhd8ElMRmgoy5tJ5AW3wsbe0QCaRNCRXeaHKLjCLJJDFP1sANsUmgiKaU/QVjaK4Y1Q13C 4d/f6KuWOqCAtQrhPAHUeKB1U5BGo82hCYCNV5hBUrb83gAmFkUVRY8phWdb1Q1YNrfdMc eWs7oCzjJrz0NfMiLfVpTJd0rL+SN53lhZjHwN2Mqoe1HrwDkM4j2X9FxPxVSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWFbq5jM2zv9k; Thu, 16 Nov 2023 09:48: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 3AG9mtoX035430; Thu, 16 Nov 2023 09:48:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AG9mtoU035427; Thu, 16 Nov 2023 09:48:55 GMT (envelope-from git) Date: Thu, 16 Nov 2023 09:48:55 GMT Message-Id: <202311160948.3AG9mtoU035427@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 54611b7cc69c - main - Document library types in the intro(3) manual 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 54611b7cc69cee34e7bcdc2324a9159e7543a125 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=54611b7cc69cee34e7bcdc2324a9159e7543a125 commit 54611b7cc69cee34e7bcdc2324a9159e7543a125 Author: Gordon Bergling AuthorDate: 2023-11-16 09:48:09 +0000 Commit: Gordon Bergling CommitDate: 2023-11-16 09:48:09 +0000 Document library types in the intro(3) manual page Add a paragraph about library types to the intro(3) manual page. Document library types, locations and versioning. Reviewed by: emaste, jilles, mhorne, pauamma_gundo.com Obtained from: OpenBSD (partial) MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D36594 --- share/man/man3/intro.3 | 97 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 94 insertions(+), 3 deletions(-) diff --git a/share/man/man3/intro.3 b/share/man/man3/intro.3 index c36ab620bed3..bfae9093af93 100644 --- a/share/man/man3/intro.3 +++ b/share/man/man3/intro.3 @@ -26,8 +26,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)intro.3 8.1 (Berkeley) 6/5/93 -.\" -.Dd November 7, 2022 +.Dd November 16, 2023 .Dt INTRO 3 .Os .Sh NAME @@ -278,13 +277,105 @@ the math library .It Pa /usr/lib/libm_p.a the math library compiled for profiling .El +.Sh LIBRARY TYPES +The system libraries are located in +.Pa /lib +and +.Pa /usr/lib . +A library has the following naming convention: +.Bd -unfilled -offset indent +libc.so.7 +.Ed +.Pp +Libraries with an +.Sq .a +suffix are static. +When a program is linked against a static library, all necessary library code +will be included in the binary. +This means the binary can be run even when the libraries are unavailable. +However, it can be inefficient with both disk space and memory usage +during execution. +The C compiler, +.Xr cc 1 , +can be instructed to link statically by specifying the +.Fl static +flag. +.Pp +Libraries with a +.Sq .so.X +suffix are dynamic libraries. +When code is linked dynamically, the library code that the application needs +is not included in the binary. +Instead, data structures are added containing information about which dynamic +libraries to link with. +When the binary is executed, the run-time linker +.Xr ld.so 1 +reads these data structures and loads them into the +process virtual address space. +.Xr rtld 1 +loads the shared libraries when the program is executed. +.Pp +.Sq X +represents the library version number of the library. +In the example above, a binary linked with +.Pa libc.so.8 +would not be usable on a system where only +.Pa libc.so.7 +is available. +.Pp +The advantages of dynamic libraries are that multiple instances of the same +library can share address space, and the physical size of the binary is +smaller. +A namespace per shared library is available via hidden visibility, +allowing multiple compilation units in a library to share things without +making them available to other libraries. +It is possible to load libraries dynamically via +.Xr dlopen 3 . +The disadvantage is the added complexity that comes with loading the +libraries dynamically, and the extra time taken to load the libraries. +Of course, if the libraries are not available, the binary will be unable +to execute. +Calls across shared libraries are also slightly slower and cannot be +inlined, not even with link time optimization. +The C compiler, +.Xr cc 1 , +can be instructed to link dynamically by specifying the +.Fl shared +flag. +.Pp +Shared libraries, as well as static libraries on architectures which produce +position-independent executables +.Pq PIEs +by default, contain position-independent code +.Pq PIC . +Normally, compilers produce relocatable code. +Relocatable code needs to be modified at run-time, depending on where in +memory it is to be run. +The C compiler, +.Xr cc 1 , +can be instructed to generate PIC code by specifying the +.Fl fPIC +flag. +.Pp +Static libraries are generated using the +.Xr ar 1 +utility. +The libraries contain an index to the contents of the library, +stored within the library itself. +The index lists each symbol defined by a member of a library that is a +relocatable object file. +This speeds up linking to the library, and allows routines in the library +to call each other regardless of their placement within the library. .Sh SEE ALSO +.Xr ar 1 , .Xr cc 1 , .Xr ld 1 , .Xr nm 1 , .Xr intro 2 , .Xr math 3 , -.Xr stdio 3 +.Xr stdio 3 , +.Xr make.conf 5 , +.Xr src.conf 5 .Sh HISTORY An .Nm From nobody Thu Nov 16 10:00:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWFrs0yf5z50Rcr; Thu, 16 Nov 2023 10:00: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 4SWFrs0Ss2z4HLb; Thu, 16 Nov 2023 10:00:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700128813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iK4aOEz3uuAtXVlAOnorQcqeE9God047X90wiCdwN78=; b=ZoQVY+f7gTZCcxL6T0u/GuFRBFEprU6pHJnPpMubZiunpVlnP6HyYfBbjEXnnGkEQ96Pa6 Y3/exuCoPeccAJu1araa1Nbbi4E2rMAHT2xD+jLkktVWhvAH5z8iki+aw5pG6W80gUShiv T/IzwEv8JOFmkUJjpfqWtYuhHfvgCRZk+rjesRRgUHH2fe+MKQm3r+/XMr4jCxvIXgFqnh xhMNsGZKVZvQRGB62Qaz3dSi8hIfOgoUyA504ctxI6hnI0UdpoNIQ3jLlQjtiBKHOPx9bE 0RzNL2KjSLmzn+zyYrQXLAwzrhdfTjS/q2pLCD4D0jJiVAYFmKMYR3rRIVbQGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700128813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iK4aOEz3uuAtXVlAOnorQcqeE9God047X90wiCdwN78=; b=j+k/g2T6tA7av2SZir3pLNY/7PqlGZ1n8gHaZ+shWgO/8SSuO46oz1GPKuBHuFeVqQHg2z T4EKSRojz288nNCtSWXJukhdk8Zzbd3KQUkkbMEC7mHFEo1b4Pg4ua+VYeWSYVkSv6j9kb 1tSpM+nb/SefffM7AmELPEZSWC5Yl4mYqN/ZgkfDS5180mG3nmsNFZRryI/V92bjLjSbBs pLDUAkR7QtoPctaRKX5QNSmXitCzADgU79zf5LeHkVb0ZHwfs+h2qH19Q5+0NI9+h0L5Ls hoDUwpV7OcHStV/ouLHyIdKkoF3QfQqLBeOBdRlcNgvkPQrluOcgZw1xk0FVWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700128813; a=rsa-sha256; cv=none; b=IleLfy2Y5cyb0JIoc9ZMqwJXT3wezyadhgX+XVdj2pi/MnDs/1GZdclyzUy7LPXM+FRiNi Zu+ZZLbRGZ83oYDe68g6o8gWSghE4ddbxd0dwrTtjkeuuv4vSX/6bN6EG6pn28Q/PxVhK6 l90FizkNgcYmi5514e820IM8IW/HOm9c/7LuCP7TXc4hgXFwiVD/X/wUfQHvobjWwmOtq/ jfvtjR4WR1QPaXJlc2nGzzmNVednkg+4x1DKu+z2REEtC4WoBt3rmFYgL7PjUzVZZPGtOp R693A0ZvOyUa/oiSnmUE3iHcnDNa7lcL6+6X/pO1yZEZ6y9ppvj+8icWC1bodA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWFrr6fWyzvqq; Thu, 16 Nov 2023 10:00: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 3AGA0CRn058524; Thu, 16 Nov 2023 10:00:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGA0Cxc058517; Thu, 16 Nov 2023 10:00:12 GMT (envelope-from git) Date: Thu, 16 Nov 2023 10:00:12 GMT Message-Id: <202311161000.3AGA0Cxc058517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: a6ed8c959303 - main - Fix /root permissions after 'make installworld' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a6ed8c9593031abf6fa73661be55c226caa362d6 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=a6ed8c9593031abf6fa73661be55c226caa362d6 commit a6ed8c9593031abf6fa73661be55c226caa362d6 Author: Thomas Eberhardt AuthorDate: 2023-11-16 09:59:38 +0000 Commit: Gordon Bergling CommitDate: 2023-11-16 09:59:38 +0000 Fix /root permissions after 'make installworld' According to /etc/mtree/BSD.root.dist /root should have 0750 permissions, but the build target 'make installworld' changes these to 0755. This is caused by the installation of the configuration files of sh(1) and csh(1). Correct this by specifying the correct default /root permissions. PR: 273342 Reviewed by: jilles Approved by: jilles MFC after: 2 weeks Differential Revision:https://reviews.freebsd.org/D42395 --- bin/csh/Makefile | 1 + bin/sh/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/bin/csh/Makefile b/bin/csh/Makefile index 1f996df3999b..94e1ba763d6e 100644 --- a/bin/csh/Makefile +++ b/bin/csh/Makefile @@ -15,6 +15,7 @@ ROOTPACKAGE= csh ETC= csh.cshrc csh.login csh.logout ROOT= dot.cshrc dot.login ROOTDIR= /root +ROOTDIR_MODE= 0750 ROOTNAME_dot.cshrc= .cshrc ROOTNAME_dot.login= .login TCSHDIR= ${SRCTOP}/contrib/tcsh diff --git a/bin/sh/Makefile b/bin/sh/Makefile index f8c853cec6c7..48b6d2852444 100644 --- a/bin/sh/Makefile +++ b/bin/sh/Makefile @@ -6,6 +6,7 @@ CONFGROUPS= ETC ROOT ETC= profile ROOT= dot.shrc dot.profile ROOTDIR= /root +ROOTDIR_MODE= 0750 ROOTNAME_dot.shrc= .shrc ROOTNAME_dot.profile= .profile PACKAGE=runtime From nobody Thu Nov 16 10:17:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWGDP5NyKz50STW; Thu, 16 Nov 2023 10:17: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 4SWGDP4gwXz4JtT; Thu, 16 Nov 2023 10:17:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700129829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JvcCq2ERAIUrAXewqtb0uivL3ZSqizaNz0xCqy5Bvzc=; b=gezkx8QgT1pZvwlN8JlnPNyz4k1ONX4Ry1CqlIYNgsueR1s/7fwZlUfz9c5QqGtXEz/1Ca jzEW2AUkhR5pO58OO7AHLW5DpZv1AISIr9Aw6J2D0tA09uyJVxRQGza46lkdGxI1Ds+NKu 0bWe75PdZfjg6v9/+K7o3hry6XRpGXGITGmZIyQ/rR5znqgd2zsfOP2ebWiiiVYvRDu/aP 1adk4SCHkVGa0qrXaPLtV2lmDKNs1UBUDr7PfvOnYudlGTvCNwqzfwjgxn+jqxQ9ajQu1U d5QX6FJdZOERBZJaq3Ghake40vtQFSau/ojceiCvRRG3Na7676GmhO4kvdKMyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700129829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JvcCq2ERAIUrAXewqtb0uivL3ZSqizaNz0xCqy5Bvzc=; b=xkzY7Tu3Q0ZTjkyPzERARlul6aKHwR3CLdDMx1aXDejsLFn36ENDs2/a5aDqH7QDpgCt9o O5u5dutezJxwlzAtHaBqQhhK1ZklmQGrirmSxtuTO8eY723uISL3SjooEU5hmF4Ktk40Lh hdzYY/Ftbqg5XsVK8e/6AyqfAaNlYfAK21zU6ohG0aRRl1cpLmT7/OBdhINHcKrQoo3rIW ldgb8bqZBmHMxDSiezMNWuC28t8+JrXKVnAF+5LcDpC7rmOZHU72ppmK0EwMXiglbMZZSf 15BfZ5o9Vo08h0mO7sch7UGi7RIsfyKDJQUQ4TdJjj3kfaAOU4oskZ4Czyybtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700129829; a=rsa-sha256; cv=none; b=B7eyVYLVzsYCPUDItDqz2E2pTSGw9ux+R8cFHBlBVSF6YS+Xye6grpvUyr4nPo4NeooDjA +RXobOZa2lze4fOD1T9VWUhHg/TGONYFqZCLEo03NPUi0jMTc1h7Be79jo6u5isTH4C4ZT GjWICv9R2vhcOO2RIQHVA/pqubQ52EV5154wgNv6UQW+u0j26joCBtJxtsHHSx8ZwcS9QK gRTQy3f4a/AdS60lPvZVhxzBqXzMxA/RjPWTuB57YywuaFo149ZwPJhzKwbS9D0lucean4 Ch3vI3bMoAlY2GXePGDVHxB/inJHv5/z2dV3G/xH07Om9ubxoqylUtPWWKbgmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWGDP3l1wzwfK; Thu, 16 Nov 2023 10:17: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 3AGAH9Fh085459; Thu, 16 Nov 2023 10:17:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGAH9QE085456; Thu, 16 Nov 2023 10:17:09 GMT (envelope-from git) Date: Thu, 16 Nov 2023 10:17:09 GMT Message-Id: <202311161017.3AGAH9QE085456@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: c1f3f795d80d - stable/14 - pf: add hashtable row count SDT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c1f3f795d80dab4d0ab1ea213252a96735d99a24 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c1f3f795d80dab4d0ab1ea213252a96735d99a24 commit c1f3f795d80dab4d0ab1ea213252a96735d99a24 Author: Kristof Provost AuthorDate: 2023-11-09 12:39:56 +0000 Commit: Kristof Provost CommitDate: 2023-11-16 08:39:45 +0000 pf: add hashtable row count SDT This allows us to figure out how many states each hashrow contains. That can be important to know when debugging performance issues. A simple probe could be: dtrace -n 'pf:purge:state:rowcount { @counts["states per row"] = quantize(arg1); }' dtrace: description 'pf:purge:state:rowcount ' matched 1 probe ^C states per row value ------------- Distribution ------------- count -1 | 0 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 8257624 1 | 14321 2 | 0 MFC after: 1 week Sponsored by: Modirum MDPay (cherry picked from commit 0d2ab4a4ced0f153a6b6a58ca3cfa6efbeeec7a2) --- sys/netpfil/pf/pf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 4990dce653b1..d5a9583d83f8 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -137,6 +137,7 @@ SDT_PROBE_DEFINE3(pf, eth, test_rule, mismatch, SDT_PROBE_DEFINE2(pf, eth, test_rule, match, "int", "struct pf_keth_rule *"); SDT_PROBE_DEFINE2(pf, eth, test_rule, final_match, "int", "struct pf_keth_rule *"); +SDT_PROBE_DEFINE2(pf, purge, state, rowcount, "int", "size_t"); /* * Global variables @@ -2174,6 +2175,7 @@ pf_purge_expired_states(u_int i, int maxcheck) struct pf_idhash *ih; struct pf_kstate *s; struct pf_krule_item *mrm; + size_t count; V_pf_status.states = uma_zone_get_cur(V_pf_state_z); @@ -2181,6 +2183,7 @@ pf_purge_expired_states(u_int i, int maxcheck) * Go through hash and unlink states that expire now. */ while (maxcheck > 0) { + count = 0; ih = &V_pf_idhash[i]; /* only take the lock if we expect to do work */ @@ -2203,10 +2206,13 @@ relock: mrm->r->rule_ref |= PFRULE_REFS; if (s->rt_kif) s->rt_kif->pfik_flags |= PFI_IFLAG_REFS; + count++; } PF_HASHROW_UNLOCK(ih); } + SDT_PROBE2(pf, purge, state, rowcount, i, count); + /* Return when we hit end of hash. */ if (++i > pf_hashmask) { V_pf_status.states = uma_zone_get_cur(V_pf_state_z); From nobody Thu Nov 16 10:17:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWGDm5p6Kz50SG0; Thu, 16 Nov 2023 10:17: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 4SWGDm4xKkz4KbJ; Thu, 16 Nov 2023 10:17:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700129848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ziEMbxzMS4eztbPOgiixgm/5Il7+nDPa49IBictJ970=; b=yzFophipWA2UfX8xys/PNG8QHVK7EVcQ40mO8s7DsmXnrr2E/2/ZTD815ObfjLmRkE9A7w 2PbkA4pp0JOWR91zXcwJVxzAjcovuKVFSNNB7XHwAwzvCaBF2HcuacQvsSOubB3YhRJBQd eyu2+rTVaYZiKzZNy4+wvuxldfBwJWZzSD1dFXXJllikpCNa/aRRp0Iohwr6JI7BeHaHVB 9XSR0umzMGoGyQ4Br0889RmJ2jYnGCu1mVn7BVYyeerxdQhkSZw10tSnISBQHZlcOaIAsx 9o8uTTe2azd1+ZoAgO1nat+eJLyKZJRxX2iGZttdqKPlhaKSFl7yxggEsvbk+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700129848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ziEMbxzMS4eztbPOgiixgm/5Il7+nDPa49IBictJ970=; b=qvhpAtZNx8T8Es5Y+GAPV7/5XGJhH8+9oyZlS/Ft6yhi2FLUpka2P/fRldDD0WgR2+goK+ e68Wl79g59oqPC6CVFPvdaC8NGUj/ONzlrv+bVpp8t0MEAIjBIeM8lZaiZ2cn8gVlpPzd6 fFpNbCkYN4s9bjDCt4uHb/HOwauf+mzo4PVZTEYTYYJx6eSQX8Sq5+mnM4btDNHvKAmlW6 T+M8CdBPeW3MNQfuLEZmQJzqjnWrAdQAaDvNqv/WRzLSjIQAChTYlIjTy/GUnfkZqofVGs lyFwu3qy8YD2QGe53zHlhRNKjhSVuQinNt/KDP+eaNlEdnFnTlS8WObRUJqC+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700129848; a=rsa-sha256; cv=none; b=TVVh2/yG3+r62q5ejkf+OvCCxQPEglufqYJ5YvXKRVtPgFpUSu0YBFWwRJwqORydcom6T3 XWFUxIUIGTspy0DoAXVjXRiYLY5n/mj+PtLEJ6BX8wgAUshblGcA3mhwP1q/xAtlgeuIwM KkEYuKY1T0yNdNWqtx43mNkm+NyEgw1M4E7ry4XHub/4SJhfYYSgOmAAzVMI6XyMUduSN/ bYNewQhbQ7fxVoSqk+ZF1WTXRUXuLwl/FrXB5DpP93rF9R+pBT71z4x70xZyHdxQPwJwYe t5w9Gic1HvCGnvHgK/098f8vCtgb51KtRMD2NgfVbdLdNdZ5u0ptb2JwMl+a7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWGDm3zFTzvx0; Thu, 16 Nov 2023 10:17: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 3AGAHShK085632; Thu, 16 Nov 2023 10:17:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGAHSnl085629; Thu, 16 Nov 2023 10:17:28 GMT (envelope-from git) Date: Thu, 16 Nov 2023 10:17:28 GMT Message-Id: <202311161017.3AGAHSnl085629@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: d9e3f1a5da21 - stable/13 - pf: add hashtable row count SDT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d9e3f1a5da21b905c3e904643dc45e794eb842e6 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d9e3f1a5da21b905c3e904643dc45e794eb842e6 commit d9e3f1a5da21b905c3e904643dc45e794eb842e6 Author: Kristof Provost AuthorDate: 2023-11-09 12:39:56 +0000 Commit: Kristof Provost CommitDate: 2023-11-16 08:40:14 +0000 pf: add hashtable row count SDT This allows us to figure out how many states each hashrow contains. That can be important to know when debugging performance issues. A simple probe could be: dtrace -n 'pf:purge:state:rowcount { @counts["states per row"] = quantize(arg1); }' dtrace: description 'pf:purge:state:rowcount ' matched 1 probe ^C states per row value ------------- Distribution ------------- count -1 | 0 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 8257624 1 | 14321 2 | 0 MFC after: 1 week Sponsored by: Modirum MDPay (cherry picked from commit 0d2ab4a4ced0f153a6b6a58ca3cfa6efbeeec7a2) --- sys/netpfil/pf/pf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 7bac94f77a32..80f4a8fa0626 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -120,6 +120,7 @@ SDT_PROBE_DEFINE5(pf, ip, state, lookup, "struct pfi_kkif *", "struct pf_kstate *"); SDT_PROBE_DEFINE4(pf, sctp, multihome, test, "struct pfi_kkif *", "struct pf_krule *", "struct mbuf *", "int"); +SDT_PROBE_DEFINE2(pf, purge, state, rowcount, "int", "size_t"); /* * Global variables @@ -2130,6 +2131,7 @@ pf_purge_expired_states(u_int i, int maxcheck) { struct pf_idhash *ih; struct pf_kstate *s; + size_t count; V_pf_status.states = uma_zone_get_cur(V_pf_state_z); @@ -2137,6 +2139,7 @@ pf_purge_expired_states(u_int i, int maxcheck) * Go through hash and unlink states that expire now. */ while (maxcheck > 0) { + count = 0; ih = &V_pf_idhash[i]; /* only take the lock if we expect to do work */ @@ -2157,10 +2160,13 @@ relock: s->kif->pfik_flags |= PFI_IFLAG_REFS; if (s->rt_kif) s->rt_kif->pfik_flags |= PFI_IFLAG_REFS; + count++; } PF_HASHROW_UNLOCK(ih); } + SDT_PROBE2(pf, purge, state, rowcount, i, count); + /* Return when we hit end of hash. */ if (++i > pf_hashmask) { V_pf_status.states = uma_zone_get_cur(V_pf_state_z); From nobody Thu Nov 16 11:17:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWHZR2P5mz50WZM; Thu, 16 Nov 2023 11:17: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 4SWHZR1p87z4PjX; Thu, 16 Nov 2023 11:17:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700133471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dxTBRupgADc92H4j5gvEn41ACkAsmsC9TrzyzSEOHSQ=; b=KPJBFh9ESHW8s3oZzHWZuaMrlV0vbCYW7iBiRn3HlMrzLEZEjfN+1CBFQqL1X1G2ciOdpI zpDjxVspSNSsk92cgz7VU7JsJqaDFKU1QRwNXwgrUWzdbP5yWF/1+qm3wpcgz5MxY5HLST T1b+PiCLjsPaN6qIvgmTufzywFsLppx2rcJZv5hxRYPmybEUwo1FWPGJK42AwQJOuXGvqn 4so/1EE1Ej0Lp503daWhnyfCXJspW3bhNzeVuxQ5LEe8yV2ya8F0cMrQ0mCD7qmJYDnbNm DZjSnEvlF/GUE+HztzZTgHJjyP3yz8wgJsPXSskDdPSM5J9Axt7v06jwMUgNCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700133471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dxTBRupgADc92H4j5gvEn41ACkAsmsC9TrzyzSEOHSQ=; b=VM5fOVgKchIivDy0cOWNVPwFYhGIx5r1O8AdClGU0ka3LntMKtPjIvjgUu0jW6topWWGqE fJ1DX6O/RzohKeisy3L+3S0uPvhprcZFAas2Y4rYp1BaU5jZBvnvXflMw1x2wOLfwRRrIT qedfwpJxEUSM/Sjdz1bV505QlWIyvuVTDa8+vXpgvg4RSEN6wpP7JcATUJpVQLoBk7Kqd0 EeoRYkiGPw7a+yRpc+RM+pdJ6xTbpoAJa9B/k0za7eOloWbMkm20jv7Tz9KP/Fd7HT8smR 8Go88mbHF1nnXzbnvSYurflvJLgVsmMo3JvgMsRDXSSjB4rWePRlpFm5H8fRPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700133471; a=rsa-sha256; cv=none; b=LoLANejH988XRzlKzKVsHiwYg5Dbq8QAW4eker5Wio16M0I2zWeIob+CGSGtOBBX5gyr7Z 8yhJU+GNsph26RyAaKyRJ32Vg4wO4TxQP9Txwoi/bHifY45WHEGp8A4mGoAGD40TE6umiE GN82vuMJWqTQ99cMnOKbVutUHlizYbYlSKZ7W/KrWyM+gD96miVVHQVc9aodtnj1cpJA1s OO0ZJlM6r8TJB9WQ+pVTeWhcih1uTWMMnLiijuVjCs3K50VB+sC4xuPeoslMEYkfPTgy8L dQJumiUpdiAldd/qYCADrZKj55qp8kAbbQ2ww2wHlHJwvp3T8wW4lD4qFbApBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWHZR0mpMzxcx; Thu, 16 Nov 2023 11:17: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 3AGBHooZ085689; Thu, 16 Nov 2023 11:17:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGBHoeN085686; Thu, 16 Nov 2023 11:17:50 GMT (envelope-from git) Date: Thu, 16 Nov 2023 11:17:50 GMT Message-Id: <202311161117.3AGBHoeN085686@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: a592812327de - main - mlx5_core: fix deadlock when using RXTLS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a592812327deaf69ab226afc5c8a01af43dc03c2 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=a592812327deaf69ab226afc5c8a01af43dc03c2 commit a592812327deaf69ab226afc5c8a01af43dc03c2 Author: Martin Matuska AuthorDate: 2023-11-13 13:29:27 +0000 Commit: Martin Matuska CommitDate: 2023-11-16 11:17:41 +0000 mlx5_core: fix deadlock when using RXTLS If removing a node of type FS_TYPE_FLOW_DEST we lock the flow group too late. This can lead to a deadlock with fs_add_dst_fg(). PR: 274715 MFC after: 1 week Reviewed by: kib Tested by: mm Differential Revision: https://reviews.freebsd.org/D42368 --- sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c index 5966a73c58d1..b76ea7b60582 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c @@ -229,14 +229,19 @@ static void __fs_remove_node(struct kref *kref) { struct fs_base *node = container_of(kref, struct fs_base, refcount); - if (node->parent) + if (node->parent) { + if (node->type == FS_TYPE_FLOW_DEST) + mutex_lock(&node->parent->parent->lock); mutex_lock(&node->parent->lock); + } mutex_lock(&node->lock); cmd_remove_node(node); mutex_unlock(&node->lock); complete(&node->complete); if (node->parent) { mutex_unlock(&node->parent->lock); + if (node->type == FS_TYPE_FLOW_DEST) + mutex_unlock(&node->parent->parent->lock); _fs_put(node->parent, _fs_remove_node, false); } } @@ -1719,7 +1724,7 @@ static void fs_del_dst(struct mlx5_flow_rule *dst) fs_get_parent(fte, dst); fs_get_parent(fg, fte); - mutex_lock(&fg->base.lock); + sx_assert(&fg->base.lock.sx, SX_XLOCKED); memcpy(match_value, fte->val, sizeof(fte->val)); /* ft can't be changed as fg is locked */ fs_get_parent(ft, fg); @@ -1739,7 +1744,6 @@ static void fs_del_dst(struct mlx5_flow_rule *dst) } call_to_del_rule_notifiers(dst, fte); err: - mutex_unlock(&fg->base.lock); kvfree(match_value); } From nobody Thu Nov 16 12:44:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWKVc57lyz50cy6; Thu, 16 Nov 2023 12:44:40 +0000 (UTC) (envelope-from fluffy@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 4SWKVc4ftzz4dGh; Thu, 16 Nov 2023 12:44:40 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700138680; 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=NS8INaS2jcVbsOdDRB+qW1s902d2R28T5wYXY2vIYfk=; b=QpN9QI2zeMw9mcxho66eA3drc+LaSZhOAroxuClo6lFEvK5VvWfe9iiE5yCVg4YvkYzeIh pgEjnwimM3wRCaHliQ/uysLq2n0dKZUERWsJMrRAEeUcWyzYUzmXGMKpQVHf6620lYy+hh rwe6UMXGV1TvGEkYCZT63IiJKbxYrB6XSCdb5NtsSQi7vGRSFgrrDhgzabGMo9b0m7xlmE aiVN5NibeSchK+9negK+9mA3rK13jj2DMBb05sYZP5CqSHA02wQLdWSwPrEsdxSBLLUTTW bG2yZkDrLeXvIlT9QGHtXx2cV13rMBTDwoqm0jOdmwLEdYdBRr//5RcWEj7rVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700138680; 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=NS8INaS2jcVbsOdDRB+qW1s902d2R28T5wYXY2vIYfk=; b=X6rCukOat+orDzCraM0Gj4hj2pTlYLUqBLO9u8kecr9JtMAE/Tj+7DMZqpbAHKsxplp7H9 +dGttnkWGnO0UJODc3a5Lgskkx5apBoy2UcQ0e1IfuOxlkgcXC2ssrXiHEvZNgdfrKuFPW ZfzkQi/YLfsvrMlibwp+5AbmBk2EZSstmdB/zM8hx9FFxYgrKCpAAo/XFYZVav9kvr40mC s+q+tVNuJS2uQ7ffzqBYbMJkt8svsrIttj6L++cHTzn7eXKXqLiEFwijWhEyPKWLhPrmZq LCvUt7u2DH+rW+LMUhrhxxsyjmL+feIPQfMB6IHM8ujZ2e57dQdP09Flo8kdDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700138680; a=rsa-sha256; cv=none; b=NcBkJkGz87CsZPVhNtZbSL8rPeSV43IONtzQRb57y6OKzCNX9DzjamsdurPnzxvRppjhp2 tT5YEP/dnkVN6htN2C4JClA1q7Se9cqbakrgZV7ksdZqc4nYb8GEn004IMDlFjE2bEJldH Wo0RHGazv3YOlfQt8XIyG1bnBMb/l/MMCSajKdZUn5O3wiVCHWIcwS03J6uN5T5ySwJGRU rRV072a7jC6zoeKnfcDZgpvX95wVb0eUhx+PkigX7xfYVdmqkG0aEOJuwhxLdgfAQJPcyf UiMF5F5EtGbhpU5d/J1c7la8zk+GaaKImfroX6/rSBI4wzr9jM4uKhxkoIozJw== Received: from [10.216.0.102] (unknown [188.243.165.67]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SWKVb24b6zwX0; Thu, 16 Nov 2023 12:44:39 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Message-ID: Date: Thu, 16 Nov 2023 15:44:36 +0300 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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: 99132daf6f70 - main - rc.d/ldconfig: Prepend rtld stdlib paths to ldconfig(32)_paths Content-Language: ru, en-GB, en-US To: Konstantin Belousov , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202311132339.3ADNdZKF081019@gitrepo.freebsd.org> From: Dima Panov Organization: FreeBSD.org In-Reply-To: <202311132339.3ADNdZKF081019@gitrepo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------wwMjlBftZha0aJZbRxVPfsA3" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------wwMjlBftZha0aJZbRxVPfsA3 Content-Type: multipart/mixed; boundary="------------76SgEJlSADMVLVeUMUwFBe8r"; protected-headers="v1" From: Dima Panov To: Konstantin Belousov , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Message-ID: Subject: Re: git: 99132daf6f70 - main - rc.d/ldconfig: Prepend rtld stdlib paths to ldconfig(32)_paths References: <202311132339.3ADNdZKF081019@gitrepo.freebsd.org> In-Reply-To: <202311132339.3ADNdZKF081019@gitrepo.freebsd.org> --------------76SgEJlSADMVLVeUMUwFBe8r Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 TW9pbi1tb2luIQ0KDQoNClRoaXMgY2F1c2Ugc29tZSBlcnJvcnMgd2hpbGUgcnVubmluZywg YXQgbGVhc3Qgb24gYWFyY2g2NCwgaG9zdCBhbmQgcG91ZHJpZXJlIGphaWwNCg0KDQojIHNl cnZpY2UgbGRjb25maWcgcmVzdGFydA0KRUxGIGxkY29uZmlnIHBhdGg6IC9saWIgL3Vzci9s aWIgL3Vzci9saWIvY29tcGF0IC91c3IvbG9jYWwvbGliIC91c3IvbG9jYWwvbGliL2NvbXBh dC9wa2cgL3Vzci9sb2NhbC9saWIvY29tcGF0L3BrZyAvdXNyL2xvY2FsL2xpYi9lMmZzcHJv Z3MgL3Vzci9sb2NhbC9saWIvbXlzcWwgL3Vzci9sb2NhbC9saWIvcGVybDUvNS4zOC9tYWNo L0NPUkUgL3Vzci9sb2NhbC9sbHZtMTYvbGliDQpFTEYgYmluYXJ5IHR5cGUgIjkiIG5vdCBr bm93bi4NCmV2YWw6IC9saWJleGVjL2xkLWVsZjMyLnNvLjE6IEV4ZWMgZm9ybWF0IGVycm9y DQozMi1iaXQgY29tcGF0aWJpbGl0eSBsZGNvbmZpZyBwYXRoOiAvdXNyL2xpYjMyDQoNCg0K DQoNCk9uIDE0LjExLjIwMjMgMDI6MzksIEtvbnN0YW50aW4gQmVsb3Vzb3Ygd3JvdGU6DQo+ IFRoZSBicmFuY2ggbWFpbiBoYXMgYmVlbiB1cGRhdGVkIGJ5IGtpYjoNCj4gDQo+IFVSTDog aHR0cHM6Ly9jZ2l0LkZyZWVCU0Qub3JnL3NyYy9jb21taXQvP2lkPTk5MTMyZGFmNmY3MGNi MGNjOTY5YzU1NWQzNjEyNTQ3ZmEzY2YxZGINCj4gDQo+IGNvbW1pdCA5OTEzMmRhZjZmNzBj YjBjYzk2OWM1NTVkMzYxMjU0N2ZhM2NmMWRiDQo+IEF1dGhvcjogICAgIEpvaG4gVy4gTydC cmllbiA8am9obkBzYWx0YW50LmNvbT4NCj4gQXV0aG9yRGF0ZTogMjAyMy0xMS0xMiAyMjo0 NToyNyArMDAwMA0KPiBDb21taXQ6ICAgICBLb25zdGFudGluIEJlbG91c292IDxraWJARnJl ZUJTRC5vcmc+DQo+IENvbW1pdERhdGU6IDIwMjMtMTEtMTMgMjM6Mzk6MTcgKzAwMDANCj4g DQo+ICAgICAgcmMuZC9sZGNvbmZpZzogUHJlcGVuZCBydGxkIHN0ZGxpYiBwYXRocyB0byBs ZGNvbmZpZygzMilfcGF0aHMNCj4gICAgICANCj4gICAgICBFbnN1cmUgdGhhdCBsZGNvbmZp Zy1tYW5hZ2VkIGVsZiBhbmQgZWxmMzIgaGludHMgYWx3YXlzIGluY2x1ZGUNCj4gICAgICB0 aGUgc3RhbmRhcmQgbGlicmFyeSBwYXRocyB0aGF0IGFyZSBrbm93biBpbmRlcGVuZGVudGx5 IHRvIHJ0bGQuDQo+ICAgICAgDQo+ICAgICAgUFI6ICAgICAgICAgICAgICAgICAgICAgMjc1 MDMxDQo+ICAgICAgUmV2aWV3ZWQgYnk6ICAgICAgICAgICAga2liDQo+ICAgICAgTUZDIGFm dGVyOiAgICAgICAgICAgICAgMiB3ZWVrcw0KPiAgICAgIFNwb25zb3JlZCBieTogICAgICAg ICAgIFNhbHRhbnQgU29sdXRpb25zIExMQw0KPiAgICAgIERpZmZlcmVudGlhbCBSZXZpc2lv bjogIGh0dHBzOi8vcmV2aWV3cy5mcmVlYnNkLm9yZy9ENDI1NTcNCj4gLS0tDQo+ICAgbGli ZXhlYy9yYy9yYy5kL2xkY29uZmlnIHwgNSArKysrLQ0KPiAgIDEgZmlsZSBjaGFuZ2VkLCA0 IGluc2VydGlvbnMoKyksIDEgZGVsZXRpb24oLSkNCj4gDQo+IGRpZmYgLS1naXQgYS9saWJl eGVjL3JjL3JjLmQvbGRjb25maWcgYi9saWJleGVjL3JjL3JjLmQvbGRjb25maWcNCj4gaW5k ZXggMTc4YThhOTg3YmU0Li5lY2JiY2EyMTBlYTAgMTAwNzU1DQo+IC0tLSBhL2xpYmV4ZWMv cmMvcmMuZC9sZGNvbmZpZw0KPiArKysgYi9saWJleGVjL3JjL3JjLmQvbGRjb25maWcNCj4g QEAgLTIyLDcgKzIyLDcgQEAgbGRjb25maWdfc3RhcnQoKQ0KPiAgIAlsZGNvbmZpZz0ke2xk Y29uZmlnX2NvbW1hbmR9DQo+ICAgCWNoZWNreWVzbm8gbGRjb25maWdfaW5zZWN1cmUgJiYg X2lucz0iLWkiDQo+ICAgCWlmIFsgLXggIiR7bGRjb25maWdfY29tbWFuZH0iIF07IHRoZW4N Cj4gLQkJX0xEQz0iL2xpYiAvdXNyL2xpYiINCj4gKwkJX0xEQz0kKC9saWJleGVjL2xkLWVs Zi5zby4xIC12IHwgc2VkIC1uIC1lICcvXkRlZmF1bHQgbGliIHBhdGggL3MvLy9wJyB8IHRy IDogJyAnKQ0KPiAgIAkJZm9yIGkgaW4gJHtsZGNvbmZpZ19sb2NhbF9kaXJzfTsgZG8NCj4g ICAJCQlpZiBbIC1kICIke2l9IiBdOyB0aGVuDQo+ICAgCQkJCV9maWxlcz1gZmluZCAke2l9 IC10eXBlIGZgDQo+IEBAIC01Miw2ICs1Miw5IEBAIGxkY29uZmlnX3N0YXJ0KCkNCj4gICAJ CQkJZmkNCj4gICAJCQlkb25lDQo+ICAgCQkJX0xEQz0iIg0KPiArCQkJaWYgWyAteCAvbGli ZXhlYy9sZC1lbGYzMi5zby4xIF07IHRoZW4NCj4gKwkJCQlfTERDPSQoL2xpYmV4ZWMvbGQt ZWxmMzIuc28uMSAtdiB8IHNlZCAtbiAtZSAnL15EZWZhdWx0IGxpYiBwYXRoIC9zLy8vcCcg fCB0ciA6ICcgJykNCj4gKwkJCWZpDQo+ICAgCQkJZm9yIGkgaW4gJHtsZGNvbmZpZzMyX3Bh dGhzfTsgZG8NCj4gICAJCQkJaWYgWyAtciAiJHtpfSIgXTsgdGhlbg0KPiAgIAkJCQkJX0xE Qz0iJHtfTERDfSAke2l9Ig0KPiANCg0KLS0gDQpTaW5jZXJlbHksDQpEaW1hIChmbHVmZnlA RnJlZUJTRC5vcmcsIGh0dHBzOi8vdC5tZS9GbHVmZnlCU0QpDQooZGVza3RvcCwga2RlLCB4 MTEsIG9mZmljZSwgcG9ydHMtc2VjdGVhbSlARnJlZUJTRCB0ZWFtDQo= --------------76SgEJlSADMVLVeUMUwFBe8r-- --------------wwMjlBftZha0aJZbRxVPfsA3 Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEELTAsy5mEEwxvh7r8+4ugndU5jykFAmVWDrQFAwAAAAAACgkQ+4ugndU5jyl8 5xAA4GdwWOZ9RrfGnWV1hJWSw5gMaaDuiGyiaft5wznMpsct82um1kJBUsci/dNBZeh7mcOVEQ3V 3dWNcW+Ahjus6WJ3Oc1ZpZu3IPKMnBWEWcHVJei3VJHi2YrcjOMuefWIYv7MGzB60WJCRnRLOyZO DebO9hMfAZfs45Fr0UwhIS24UXx4im8ENibAxcnwuJANS6EQ7ifCLNIklqnlgsqzEaOMKMCa+58v pleopf4YnpTWzID6KX2EVM8OKVrs9Yykdr32Y08KyaaBgWArZPEElt/qJvC4kM5GlmW8Sb15sVdF KvYWFoSjJNqmX+YV46pn4omdF4MRg9+w2aQF+A1I3eQzM0yfl+It3T9eSfipmYNJde15yekyoLqQ A3ZHMSW2j7GVd9AlqVD0wC4ns4/6LsOORdfsbYzmRdA3nU5dc/3XpKFpLJXzt8QaRKL4baQNhOsc mg61LwsW2lFCvXD1P6FmxDaUY2gXlxHgR6GZYUmfDeWypFeYnTzSN/H2+EwjM/j4WfECpt8G3+QL +3u8j9WllCljsJktOF59a3s5F2savT3XNgiaMyc9IEHEaojgK+m6GwwolB/uSTozXaUMsY3zKnsr 6Sj2cyeh2lqMh1h96GLVp9dn4yNkiUL3IKgnIby2IKxGnwZlyaltg5WACfVDWIJyp2kNdCYN03nP Bvw= =9f3r -----END PGP SIGNATURE----- --------------wwMjlBftZha0aJZbRxVPfsA3-- From nobody Thu Nov 16 13:21:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWLKc5Yrcz50fhQ; Thu, 16 Nov 2023 13:21:56 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) (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 4SWLKc3XF1z4kYC; Thu, 16 Nov 2023 13:21:56 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-6ce37683cf6so418257a34.3; Thu, 16 Nov 2023 05:21:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700140914; x=1700745714; 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=84Z0dE+P9AXOaROUAZypHkMJkhVxKWs8enOBPQ2E/ug=; b=VYxxBfjhUUOGf1ijZK79VWoJCrzugqVEUtGkanTaR8ncASfEJ988T/bRr1f+4zLG98 67tzpfnqhdlB9lLMPUgSvSFHVhr86KGBjOqoGSUGKdfPsVhk26qC4xa+V1jfIm2ruxLm OJOlBJCOfwLgy0y0UU/uFo6XfhxmSjSNvYEiM/XQ2ru0PoX2YDSVdfKDiW0d0p59W3lz 4numWs9ufs9u3RLbglm8Q9hYVla6GLTMSFM3RrUVQp5wTm2EpNSTsDwHjY20INV31Tcp JeID5Q9lItFnX17AgTHMzArxbxUSPOGikECeep3tMyAgqAQywox0Jje/6ooscZ/DohOv oIzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700140914; x=1700745714; 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=84Z0dE+P9AXOaROUAZypHkMJkhVxKWs8enOBPQ2E/ug=; b=e9qbO6ivTrVOjVlI9m3bYtPcb38o3RRAcy/SW5bmFCu5ECUDXXyhsdkhkP0sn9/ejR cWPJXeN4ryg3pPGfYY9qjXzS8/HE2sFrTfklZ3kYl3HJLDpxF7pGjO0OfdlhhdxHiP6m 8G42iskoTpg5Oli8FEmVZPHVSm/xPrcqTluzOG4ht1BWOaLrNa48wcu/ThyPuVc5THsO bViX1kcarLeYJazoaKDZxMNsQhGo3XfDhlatqyprTPsEz7fj9N9tp+FSR+w9WRrOBEoh Q9LPm4I5hFI/60eDaAQ7WXMG6w4UNgdQvmD3RuOU1kz2wWL3YDDVo5QmKfKcyG8ELaiV AdRA== X-Gm-Message-State: AOJu0YypHcfeTLhIemDdqlzyx8VXRu7QalNU19Idgu2DKEiiPx4UX+W4 JOMi6cEPI3wtKfcLKmjzw7TSA4byxoUF/mvKurARlCgN X-Google-Smtp-Source: AGHT+IFI2A9tF3oSSChBEbe1ZdwNdRftrYiiJhqnocByS8mUHlmMyeYQeWEv7P9HwGjfkA1wVa3k/ZxzV/4g6ZaSTEY= X-Received: by 2002:a05:6830:410a:b0:6be:c1b:ded4 with SMTP id w10-20020a056830410a00b006be0c1bded4mr13665993ott.3.1700140914064; Thu, 16 Nov 2023 05:21:54 -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:c5:0:b0:4f0:1250:dd51 with HTTP; Thu, 16 Nov 2023 05:21:53 -0800 (PST) In-Reply-To: <202311161000.3AGA0Cxc058517@gitrepo.freebsd.org> References: <202311161000.3AGA0Cxc058517@gitrepo.freebsd.org> From: Mateusz Guzik Date: Thu, 16 Nov 2023 14:21:53 +0100 Message-ID: Subject: Re: git: a6ed8c959303 - main - Fix /root permissions after 'make installworld' To: Gordon Bergling 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-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4SWLKc3XF1z4kYC On 11/16/23, Gordon Bergling wrote: > The branch main has been updated by gbe: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=a6ed8c9593031abf6fa73661be55c226caa362d6 > > commit a6ed8c9593031abf6fa73661be55c226caa362d6 > Author: Thomas Eberhardt > AuthorDate: 2023-11-16 09:59:38 +0000 > Commit: Gordon Bergling > CommitDate: 2023-11-16 09:59:38 +0000 > > Fix /root permissions after 'make installworld' > > According to /etc/mtree/BSD.root.dist /root should have > 0750 permissions, but the build target 'make installworld' > changes these to 0755. > > This is caused by the installation of the configuration > files of sh(1) and csh(1). > > Correct this by specifying the correct default /root permissions. > > PR: 273342 > Reviewed by: jilles > Approved by: jilles > MFC after: 2 weeks > Differential Revision:https://reviews.freebsd.org/D42395 > --- > bin/csh/Makefile | 1 + > bin/sh/Makefile | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/bin/csh/Makefile b/bin/csh/Makefile > index 1f996df3999b..94e1ba763d6e 100644 > --- a/bin/csh/Makefile > +++ b/bin/csh/Makefile > @@ -15,6 +15,7 @@ ROOTPACKAGE= csh > ETC= csh.cshrc csh.login csh.logout > ROOT= dot.cshrc dot.login > ROOTDIR= /root > +ROOTDIR_MODE= 0750 This is at best a total workaround, the real bug is that root dir gets modified to begin with and there will be other cases prone to cause the same problem. More importantly, is not this a regression from security pov? -- Mateusz Guzik From nobody Thu Nov 16 13:33:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWLZs5sp8z50fh4 for ; Thu, 16 Nov 2023 13:33:25 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 4SWLZs3Zr8z4l5C for ; Thu, 16 Nov 2023 13:33:25 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4083f61322fso6083565e9.1 for ; Thu, 16 Nov 2023 05:33:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700141604; x=1700746404; 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=lW96j/wKf8sJlnRNt3IPBAjbstp+BCI9bk2arSwTpwM=; b=Vmt2oQ5geUZ2nVtb2EiInR9XK9kYqFkVaRHeCTvF0EriQGk9f+NXjBdGontALV5/5G 4bikqEiazKKJWSefu+9v7rDq3QK8CeAaIBlz6igdD9Z8aAfu1rcDh7OoUznCKWzQ/H5d FcAeKxFtat3aUvHzto+OpsREm6KIDXEQLsUa9Nt2Z/l6wKwOjOQHi1iljQ02B6aGerq5 mSwMwM4yOBeREC/GElz0A+7MGPBS9BNMQPZ4JsDacWsahKDXQFGihNyMlkUKSyFSwvUK ht9i7URf2DL4MTBX3tfvGea6q7LXHSozBlLzj50nlSMCY1ljcYu9v9CAnH6L9+NCpyZ8 rS8A== X-Gm-Message-State: AOJu0YzAHAy6ILgLa6S1mA2yIuN9h2HQtuzMUNp3U01oyPNV2TW9CeXz 3UcSsit4WrggYHKtcSSjVhx2eQ== X-Google-Smtp-Source: AGHT+IHBPM2EagtiBuijXR0ISpIWolDceSiG9NLByBjiW1j9FeDw+JRrkVu3QJUBft40JKOJfMWqXA== X-Received: by 2002:a05:600c:4f0e:b0:406:5359:769f with SMTP id l14-20020a05600c4f0e00b004065359769fmr13739294wmq.0.1700141603727; Thu, 16 Nov 2023 05:33:23 -0800 (PST) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id t14-20020a05600c450e00b003fee567235bsm3764369wmo.1.2023.11.16.05.33.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Nov 2023 05:33:23 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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: 99132daf6f70 - main - rc.d/ldconfig: Prepend rtld stdlib paths to ldconfig(32)_paths From: Jessica Clarke In-Reply-To: Date: Thu, 16 Nov 2023 13:33:12 +0000 Cc: Konstantin Belousov , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <7E6896FA-85A3-41DC-9ECA-1D12B78BDA2E@freebsd.org> References: <202311132339.3ADNdZKF081019@gitrepo.freebsd.org> To: Dima Panov X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4SWLZs3Zr8z4l5C On 16 Nov 2023, at 12:44, Dima Panov wrote: >=20 > Moin-moin! >=20 >=20 > This cause some errors while running, at least on aarch64, host and = poudriere jail >=20 >=20 > # service ldconfig restart > ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib = /usr/local/lib/compat/pkg /usr/local/lib/compat/pkg = /usr/local/lib/e2fsprogs /usr/local/lib/mysql = /usr/local/lib/perl5/5.38/mach/CORE /usr/local/llvm16/lib > ELF binary type "9" not known. > eval: /libexec/ld-elf32.so.1: Exec format error > 32-bit compatibility ldconfig path: /usr/lib32 Yeah this breaks if the kernel and/or hardware don=E2=80=99t support = 32-bit compat (not uncommon on modern Arm hardware). Also, parsing the human-readable output of ld-elf.so.1 -v to determine the path seems wrong and fragile. Given the above problem I think this should just be reverted, but if we instead want to press ahead with something like this (with suitable handling of this case) then we should really have ld-elf.so.1 produce machine-readable output (which could just be the space-separated string) for use the rc script, not go mangling -v=E2=80=99s output. But I really don=E2=80=99t see the issue = with putting the paths in the script... Jess > On 14.11.2023 02:39, Konstantin Belousov wrote: >> The branch main has been updated by kib: >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D99132daf6f70cb0cc969c555d3612547= fa3cf1db >> commit 99132daf6f70cb0cc969c555d3612547fa3cf1db >> Author: John W. O'Brien >> AuthorDate: 2023-11-12 22:45:27 +0000 >> Commit: Konstantin Belousov >> CommitDate: 2023-11-13 23:39:17 +0000 >> rc.d/ldconfig: Prepend rtld stdlib paths to ldconfig(32)_paths >> Ensure that ldconfig-managed elf and elf32 hints always = include >> the standard library paths that are known independently to rtld. >> PR: 275031 >> Reviewed by: kib >> MFC after: 2 weeks >> Sponsored by: Saltant Solutions LLC >> Differential Revision: https://reviews.freebsd.org/D42557 >> --- >> libexec/rc/rc.d/ldconfig | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> diff --git a/libexec/rc/rc.d/ldconfig b/libexec/rc/rc.d/ldconfig >> index 178a8a987be4..ecbbca210ea0 100755 >> --- a/libexec/rc/rc.d/ldconfig >> +++ b/libexec/rc/rc.d/ldconfig >> @@ -22,7 +22,7 @@ ldconfig_start() >> ldconfig=3D${ldconfig_command} >> checkyesno ldconfig_insecure && _ins=3D"-i" >> if [ -x "${ldconfig_command}" ]; then >> - _LDC=3D"/lib /usr/lib" >> + _LDC=3D$(/libexec/ld-elf.so.1 -v | sed -n -e '/^Default lib path = /s///p' | tr : ' ') >> for i in ${ldconfig_local_dirs}; do >> if [ -d "${i}" ]; then >> _files=3D`find ${i} -type f` >> @@ -52,6 +52,9 @@ ldconfig_start() >> fi >> done >> _LDC=3D"" >> + if [ -x /libexec/ld-elf32.so.1 ]; then >> + _LDC=3D$(/libexec/ld-elf32.so.1 -v | sed -n -e '/^Default lib path = /s///p' | tr : ' ') >> + fi >> for i in ${ldconfig32_paths}; do >> if [ -r "${i}" ]; then >> _LDC=3D"${_LDC} ${i}" >=20 > --=20 > Sincerely, > Dima (fluffy@FreeBSD.org, https://t.me/FluffyBSD) > (desktop, kde, x11, office, ports-secteam)@FreeBSD team From nobody Thu Nov 16 15:07:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWNgl0B6nz50lsR; Thu, 16 Nov 2023 15:07: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 4SWNgk6VLlz4stx; Thu, 16 Nov 2023 15:07:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700147266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6NChioyr9W3so5Ub8WTwB1nK95PGtjrjS+FNoii+yHs=; b=EQjjQJSGU+TxamC0VVJorLt6pp/euPZxLJmHyhvZaHWQlJ0CqCCmx2uI7Ri0cZZpB+qH1o Wc0a6A1QyOlQJZnJ+uRlARQx5Jo98qMseEu7wQjIfcP4W+CkaXKgZO0AJJ4n5z0FgOZEEj qOtx/CKnSchbT6jtoLrm7DlzmdoCqUNq0I3UNG4EVkEcSssjJYXEJFagIa49xNgiSPO5z8 vvGfO40w4+7WQqDJCVsW6RXYVjeU+VnrP41IH4gv/S1R5VRYOGBZuEAcVamUibSxFaXVWZ IU/Sb86kmbhxxbjg2zrj4LCpPM6ostCaNylpBbgHWfPBtWr8S5FP5jpCKajBqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700147266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6NChioyr9W3so5Ub8WTwB1nK95PGtjrjS+FNoii+yHs=; b=Txv6CIiVhZcOtYtz3fowH5/htrOkrEUL6ePRw1tIyKvGFeidYLqNBmKH+/bYsRp8CUi2NU SG1it022t5+lRIKJ58b3E+p+PlCy/dXokZy3DlgIWO7rVMUnSL6vUox/ZtRG8vB+lO4WfH MttjGbZDaBiJZYQiTfJCcwoE/Wnuzyx7WhfxYehOYxekrhMRgH8EDsXZ0oIJVmmCdjeOC0 y1SRqqJZo0qdhoXIKeCgKlGOmsbbz/QXDERkOqlVO9aA/QTRnmrWzUAY8CU+KPnsN+UWmm pVtmIzK+DoAsLA8nM6uojwCJV6R6mTHg2QA+qOfZ4Gl+qHEGNzkjgeHmwWwgtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700147266; a=rsa-sha256; cv=none; b=kvT0SrwlDezCLjdM9EgZ41XOioA7zajqjAVYphIeed5G/m2bTmqmu9bJp7EtInAXACVqgW jXRqgBdBDTdD28GivHonrDq1/7t6cw4DDAbW4njvKknsnZbHCSY0l8v/44rucUKcYBuCad 5PucDy7t+b4FvSE8KjXkNv18pZQza18xlQ3UXCgdpYOM5XymMzco0HFqmH2qUAgGKCSdTu Dz7E59ZZxz/xtvrE2btfQNhDXYHn0QoykvjnAArfdxD5axsT+kH3LlJW1pqVnunlG2Qql2 hyWm//vxbOr91ORfs2qlpJN4V727Si3ndZA01TaEQXpvceFAn1sYDWBPyIEjdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWNgk5Vqpz14FJ; Thu, 16 Nov 2023 15:07:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AGF7klS070204; Thu, 16 Nov 2023 15:07:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGF7kgx070201; Thu, 16 Nov 2023 15:07:46 GMT (envelope-from git) Date: Thu, 16 Nov 2023 15:07:46 GMT Message-Id: <202311161507.3AGF7kgx070201@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jonathan T. Looney" Subject: git: accfb4cc9346 - main - genoffset.sh: stop using a temporary file List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jtl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: accfb4cc9346b23f6d6383dfc98d2c97ae18ce0d Auto-Submitted: auto-generated The branch main has been updated by jtl: URL: https://cgit.FreeBSD.org/src/commit/?id=accfb4cc9346b23f6d6383dfc98d2c97ae18ce0d commit accfb4cc9346b23f6d6383dfc98d2c97ae18ce0d Author: Jonathan T. Looney AuthorDate: 2023-11-16 15:02:32 +0000 Commit: Jonathan T. Looney CommitDate: 2023-11-16 15:02:32 +0000 genoffset.sh: stop using a temporary file Instead, use a here document for the input. This allows us to run the while loop in the main script so we can build the list of asserts in a shell variable. We then print out the list of asserts at the end of the loop. Reviewed by: imp Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42407 --- sys/kern/genoffset.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/sys/kern/genoffset.sh b/sys/kern/genoffset.sh index fda27998ca79..c974a7d52e8c 100644 --- a/sys/kern/genoffset.sh +++ b/sys/kern/genoffset.sh @@ -35,16 +35,13 @@ usage() work() ( - local last off x1 x2 x3 struct field type lastoff lasttype + local last off x1 x2 x3 struct field type lastoff lasttype asserts echo "#ifndef _OFFSET_INC_" echo "#define _OFFSET_INC_" echo "#if !defined(GENOFFSET) && (!defined(KLD_MODULE) || defined(KLD_TIED))" last= - temp=$(mktemp -d genoffset.XXXXXXXXXX) - trap "rm -rf ${temp}" EXIT - # Note: we need to print symbol values in decimal so the numeric sort works - ${NM:='nm'} ${NMFLAGS} -t d "$1" | grep __assym_offset__ | sed -e 's/__/ /g' | sort -k 4 -k 1 -n | + asserts= while read off x1 x2 struct field type x3; do off=$(echo "$off" | sed -E 's/^0+//') if [ "$last" != "$struct" ]; then @@ -60,12 +57,14 @@ work() printf "%b" "\t${type}\t${field};\n" lastoff="$off" lasttype="$type" - echo "_SA(${struct}, ${field}, ${off});" >> "$temp/asserts" - done + asserts="${asserts}_SA(${struct}, ${field}, ${off});\n" + done <; Thu, 16 Nov 2023 16:07:54 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (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 4SWQ155b7xz3CT9 for ; Thu, 16 Nov 2023 16:07:53 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2c50ec238aeso14306531fa.0 for ; Thu, 16 Nov 2023 08:07:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700150872; x=1700755672; 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=2Tb0VtYpHRDTd1GkP3GjyXn2Jgn+vl1QcPmZMEVwpO4=; b=xG8zWZBwqBLF5hM5NWnG9ruUv6MaCr/eR5wGCxGygVgj8i6nx6qoKBb3Ufxmnwlh5U ACU3BdP2Yp3OJtdR5SqyafgDtABJob41HSvl1DB+5nBWcjTnxjE9ktBT9s4UB9ByyXYr 5csgFp4kHOYU5VPijNrQUuVUFu5BuJSkZqqFQg+dJuA3FZmtF1VB+U6zcZnTqlMOzzqE 0+gWr7cVt2bmyZfxw/P5DP9vHBiUVK7K5cnN7DwtEqKfP1OTrxWuf3sPO+kVEIOO4/Me lJlOEGuP1te2E1XannsvM5Ai/mvIPib+Ohw8drcnyXBYIGFtDPyzRO6pvToLxQYY5+ql HN0g== X-Gm-Message-State: AOJu0Yx9aOsAJIlh2EDxrbH6wQAxDDDb0qDq1gSfMi30KBpcmDdR1AfX DAIAXaG1sIfASP6qPyIl1TihfA== X-Google-Smtp-Source: AGHT+IGB4qDEKmKZ6YcvJiL81QvieG51PyAHVG9h161n09Nn/EU8h2IxJNAL6nC1g6gHIA6BivQe4Q== X-Received: by 2002:a2e:b55a:0:b0:2c5:2298:d44e with SMTP id a26-20020a2eb55a000000b002c52298d44emr6419874ljn.5.1700150871649; Thu, 16 Nov 2023 08:07:51 -0800 (PST) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id d1-20020adfe841000000b0032dba85ea1bsm14110131wrn.75.2023.11.16.08.07.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Nov 2023 08:07:51 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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: accfb4cc9346 - main - genoffset.sh: stop using a temporary file From: Jessica Clarke In-Reply-To: <202311161507.3AGF7kgx070201@gitrepo.freebsd.org> Date: Thu, 16 Nov 2023 16:07:40 +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: <39921E4A-4C15-4D8F-BA9F-D0C53AD62CD1@freebsd.org> References: <202311161507.3AGF7kgx070201@gitrepo.freebsd.org> To: "Jonathan T. Looney" X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4SWQ155b7xz3CT9 On 16 Nov 2023, at 15:07, Jonathan T. Looney wrote: >=20 > The branch main has been updated by jtl: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Daccfb4cc9346b23f6d6383dfc98d2c97= ae18ce0d >=20 > commit accfb4cc9346b23f6d6383dfc98d2c97ae18ce0d > Author: Jonathan T. Looney > AuthorDate: 2023-11-16 15:02:32 +0000 > Commit: Jonathan T. Looney > CommitDate: 2023-11-16 15:02:32 +0000 >=20 > genoffset.sh: stop using a temporary file >=20 > Instead, use a here document for the input. This allows us to run = the > while loop in the main script so we can build the list of asserts = in > a shell variable. We then print out the list of asserts at the end = of > the loop. >=20 > Reviewed by: imp > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D42407 > --- > sys/kern/genoffset.sh | 15 +++++++-------- > 1 file changed, 7 insertions(+), 8 deletions(-) >=20 > diff --git a/sys/kern/genoffset.sh b/sys/kern/genoffset.sh > index fda27998ca79..c974a7d52e8c 100644 > --- a/sys/kern/genoffset.sh > +++ b/sys/kern/genoffset.sh > @@ -35,16 +35,13 @@ usage() >=20 > work() > ( > - local last off x1 x2 x3 struct field type lastoff lasttype > + local last off x1 x2 x3 struct field type lastoff lasttype = asserts >=20 > echo "#ifndef _OFFSET_INC_" > echo "#define _OFFSET_INC_" > echo "#if !defined(GENOFFSET) && (!defined(KLD_MODULE) || = defined(KLD_TIED))" > last=3D > - temp=3D$(mktemp -d genoffset.XXXXXXXXXX) > - trap "rm -rf ${temp}" EXIT > - # Note: we need to print symbol values in decimal so the numeric = sort works > - ${NM:=3D'nm'} ${NMFLAGS} -t d "$1" | grep __assym_offset__ | sed = -e 's/__/ /g' | sort -k 4 -k 1 -n | > + asserts=3D > while read off x1 x2 struct field type x3; do > off=3D$(echo "$off" | sed -E 's/^0+//') > if [ "$last" !=3D "$struct" ]; then > @@ -60,12 +57,14 @@ work() > printf "%b" "\t${type}\t${field};\n" > lastoff=3D"$off" > lasttype=3D"$type" > - echo "_SA(${struct}, ${field}, ${off});" >> "$temp/asserts" > - done > + asserts=3D"${asserts}_SA(${struct}, ${field}, ${off});\n" > + done < +$(${NM:=3D'nm'} ${NMFLAGS} -t d "$1" | grep __assym_offset__ | sed -e = 's/__/ /g' | sort -k 4 -k 1 -n) > +EOT > echo "};" > echo "#define _SA(s,f,o) _Static_assert(__builtin_offsetof(struct = s ## _lite, f) =3D=3D o, \\" > printf '\t"struct "#s"_lite field "#f" not at offset "#o)\n' > - cat "$temp/asserts" > + echo -e "${asserts}\c" This isn=E2=80=99t POSIX, and isn=E2=80=99t supported by macOS=E2=80=99s = sh, so breaks the build there. Please fix or revert promptly. Jess > echo "#undef _SA" > echo "#endif" > echo "#endif" From nobody Thu Nov 16 16:23:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWQMd0zy0z50qBV for ; Thu, 16 Nov 2023 16:23:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (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 4SWQMc6QC9z3FN3 for ; Thu, 16 Nov 2023 16:23:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-53db360294fso1552965a12.3 for ; Thu, 16 Nov 2023 08:23:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1700151835; x=1700756635; 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=Ul71DMB38dRb2fdMdYU8/uCEP5/5Cd8NQv+fxz7R6uI=; b=U19zhW5zEwKt0nnMOHpN9PnC9/2qyfQG4uk+1PvvK9odvU8SEoMaifz0voqebycUsQ wncTpnF16w6C1peQAuL7NPY6aAm0O4Mpb2XVof+fF1gg2duMzf9fH2B2DZGxv1VtJPKy r8HDbRPvJ3Wpa5L05GylSenwfWkJOOLpX2gAW/yQUHc3i99KR/46Mo3xm629sAZzbVwg HdO5/vqOB24Y8BUWCu/TN0HavtNzRTUaOUVGUYmg9xa/XCPIngk3dmjjd3Xrl74PNSFB hBUTYSC+Myo+xhvRi6jjqcnGX+NmBeppmpN4FVAz3nhJgenHnT9QyqqbMuLTXAHNDgR4 wSrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700151835; x=1700756635; 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=Ul71DMB38dRb2fdMdYU8/uCEP5/5Cd8NQv+fxz7R6uI=; b=iyrXHLEZGdc9rnC2soAu5QsCYWo+v6dPd6A79cJX3Nf1G2FS8I1q2ULH/O+KNnmefk iPsPqeC0gMosZgoK3tGmz9pqfljJK2zLt886NLsbGQfdVNGtz2fqFh7iyGrDrySozRhu o3/Ee8fnTaDyfpefnPW4W7z3kIV0h2Wf02o60t2R1SsqFTeli2Iag7gEygBIi6n212X+ f4ZPSAEwUZIzvpvpmbMeLFgAC7kvodBBC7z7mVod5XeQsMRLPopoStDZMxbUY9boiOST 2a1G8l24FTO62jxiQglru7J7BA044lmQfvkpuKchYFIggbA7+GbB+HTHBEEH9FTXT9tX gUcQ== X-Gm-Message-State: AOJu0YwjuLNuksuiR0WSATEA0pQidMj8CxCIJ07+3NQvQTK146dga4Pc fqCWv7rmzMczDAMZ5/m3QtxyHAi0HaFe8tCxI+vsmg== X-Google-Smtp-Source: AGHT+IFD4ex9VvUz7TsWeekIb7MbWqovjW4D7XuSBknRME9BpEsjDac2vKbTTqKJvBWWLkfqQm96dkpU2Rz0bguZbTM= X-Received: by 2002:a05:6402:4416:b0:547:6601:d46 with SMTP id y22-20020a056402441600b0054766010d46mr11022810eda.30.1700151835027; Thu, 16 Nov 2023 08:23:55 -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: <202311161507.3AGF7kgx070201@gitrepo.freebsd.org> <39921E4A-4C15-4D8F-BA9F-D0C53AD62CD1@freebsd.org> In-Reply-To: <39921E4A-4C15-4D8F-BA9F-D0C53AD62CD1@freebsd.org> From: Warner Losh Date: Thu, 16 Nov 2023 09:23:43 -0700 Message-ID: Subject: Re: git: accfb4cc9346 - main - genoffset.sh: stop using a temporary file To: Jessica Clarke Cc: "Jonathan T. Looney" , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="00000000000030fa20060a477232" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4SWQMc6QC9z3FN3 --00000000000030fa20060a477232 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Nov 16, 2023 at 9:07=E2=80=AFAM Jessica Clarke = wrote: > On 16 Nov 2023, at 15:07, Jonathan T. Looney wrote: > > > > The branch main has been updated by jtl: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3Daccfb4cc9346b23f6d6383dfc98d2c9= 7ae18ce0d > > > > commit accfb4cc9346b23f6d6383dfc98d2c97ae18ce0d > > Author: Jonathan T. Looney > > AuthorDate: 2023-11-16 15:02:32 +0000 > > Commit: Jonathan T. Looney > > CommitDate: 2023-11-16 15:02:32 +0000 > > > > genoffset.sh: stop using a temporary file > > > > Instead, use a here document for the input. This allows us to run th= e > > while loop in the main script so we can build the list of asserts in > > a shell variable. We then print out the list of asserts at the end o= f > > the loop. > > > > Reviewed by: imp > > Sponsored by: Netflix > > Differential Revision: https://reviews.freebsd.org/D42407 > > --- > > sys/kern/genoffset.sh | 15 +++++++-------- > > 1 file changed, 7 insertions(+), 8 deletions(-) > > > > diff --git a/sys/kern/genoffset.sh b/sys/kern/genoffset.sh > > index fda27998ca79..c974a7d52e8c 100644 > > --- a/sys/kern/genoffset.sh > > +++ b/sys/kern/genoffset.sh > > @@ -35,16 +35,13 @@ usage() > > > > work() > > ( > > - local last off x1 x2 x3 struct field type lastoff lasttype > > + local last off x1 x2 x3 struct field type lastoff lasttype asserts > > > > echo "#ifndef _OFFSET_INC_" > > echo "#define _OFFSET_INC_" > > echo "#if !defined(GENOFFSET) && (!defined(KLD_MODULE) || > defined(KLD_TIED))" > > last=3D > > - temp=3D$(mktemp -d genoffset.XXXXXXXXXX) > > - trap "rm -rf ${temp}" EXIT > > - # Note: we need to print symbol values in decimal so the numeric > sort works > > - ${NM:=3D'nm'} ${NMFLAGS} -t d "$1" | grep __assym_offset__ | sed -= e > 's/__/ /g' | sort -k 4 -k 1 -n | > > + asserts=3D > > while read off x1 x2 struct field type x3; do > > off=3D$(echo "$off" | sed -E 's/^0+//') > > if [ "$last" !=3D "$struct" ]; then > > @@ -60,12 +57,14 @@ work() > > printf "%b" "\t${type}\t${field};\n" > > lastoff=3D"$off" > > lasttype=3D"$type" > > - echo "_SA(${struct}, ${field}, ${off});" >> "$temp/asserts" > > - done > > + asserts=3D"${asserts}_SA(${struct}, ${field}, ${off});\n" > > + done < > +$(${NM:=3D'nm'} ${NMFLAGS} -t d "$1" | grep __assym_offset__ | sed -e > 's/__/ /g' | sort -k 4 -k 1 -n) > > +EOT > > echo "};" > > echo "#define _SA(s,f,o) _Static_assert(__builtin_offsetof(struct s > ## _lite, f) =3D=3D o, \\" > > printf '\t"struct "#s"_lite field "#f" not at offset "#o)\n' > > - cat "$temp/asserts" > > + echo -e "${asserts}\c" > > This isn=E2=80=99t POSIX, and isn=E2=80=99t supported by macOS=E2=80=99s = sh, so breaks the > build there. Please fix or revert promptly. > echo "${asserts}" is semantically the same for C. A stray newline doesn't matter in this context. It's not worth the effort to remove it. Sadly, echo -n doesn't work (it's not posix, and posix defines it specifically as implementation defined). `echo "fred\c"' works on macos, but not FreeBSD's shell echo built-in (but somehow does for /bin/echo). macos doesn't implement -e at all (it's also not posix). FreeBSD's shell echo build-in is not posix compliant. So, to be portable, just echo it, and cope with the extra newline. That's what I'd do :) Warner > Jess > > > echo "#undef _SA" > > echo "#endif" > > echo "#endif" > > --00000000000030fa20060a477232 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Nov 16, 2023 at 9:07=E2=80=AF= AM Jessica Clarke <jrtc27@freebsd.= org> wrote:
On 16 Nov 2023, at 15:07, Jonathan T. Looney <jtl@FreeBSD.org> wro= te:
>
> The branch main has been updated by jtl:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3Daccfb4cc9346b23f6d6383dfc98d2c97ae18ce0d<= /a>
>
> commit accfb4cc9346b23f6d6383dfc98d2c97ae18ce0d
> Author:=C2=A0 =C2=A0 =C2=A0Jonathan T. Looney <jtl@FreeBSD.org><= br> > AuthorDate: 2023-11-16 15:02:32 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Jonathan T. Looney <jtl@FreeBSD.org><= br> > CommitDate: 2023-11-16 15:02:32 +0000
>
>=C2=A0 =C2=A0 genoffset.sh: stop using a temporary file
>
>=C2=A0 =C2=A0 Instead, use a here document for the input. This allows u= s to run the
>=C2=A0 =C2=A0 while loop in the main script so we can build the list of= asserts in
>=C2=A0 =C2=A0 a shell variable. We then print out the list of asserts a= t the end of
>=C2=A0 =C2=A0 the loop.
>
>=C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 imp
>=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0Netflix
>=C2=A0 =C2=A0 Differential Revision:=C2=A0
https://reviews.fre= ebsd.org/D42407
> ---
> sys/kern/genoffset.sh | 15 +++++++--------
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/sys/kern/genoffset.sh b/sys/kern/genoffset.sh
> index fda27998ca79..c974a7d52e8c 100644
> --- a/sys/kern/genoffset.sh
> +++ b/sys/kern/genoffset.sh
> @@ -35,16 +35,13 @@ usage()
>
> work()
> (
> -=C2=A0 =C2=A0 local last off x1 x2 x3 struct field type lastoff lastt= ype
> +=C2=A0 =C2=A0 local last off x1 x2 x3 struct field type lastoff lastt= ype asserts
>
>=C2=A0 =C2=A0 =C2=A0echo "#ifndef _OFFSET_INC_"
>=C2=A0 =C2=A0 =C2=A0echo "#define _OFFSET_INC_"
>=C2=A0 =C2=A0 =C2=A0echo "#if !defined(GENOFFSET) && (!def= ined(KLD_MODULE) || defined(KLD_TIED))"
>=C2=A0 =C2=A0 =C2=A0last=3D
> -=C2=A0 =C2=A0 temp=3D$(mktemp -d genoffset.XXXXXXXXXX)
> -=C2=A0 =C2=A0 trap "rm -rf ${temp}" EXIT
> -=C2=A0 =C2=A0 # Note: we need to print symbol values in decimal so th= e numeric sort works
> -=C2=A0 =C2=A0 ${NM:=3D'nm'} ${NMFLAGS} -t d "$1" | = grep __assym_offset__ | sed -e 's/__/ /g' | sort -k 4 -k 1 -n |
> +=C2=A0 =C2=A0 asserts=3D
>=C2=A0 =C2=A0 =C2=A0while read off x1 x2 struct field type x3; do
> off=3D$(echo "$off" | sed -E 's/^0+//')
> if [ "$last" !=3D "$struct" ]; then
> @@ -60,12 +57,14 @@ work()
> printf "%b" "\t${type}\t${field};\n"
> lastoff=3D"$off"
> lasttype=3D"$type"
> - echo "_SA(${struct}, ${field}, ${off});" >> "$t= emp/asserts"
> -=C2=A0 =C2=A0 done
> + asserts=3D"${asserts}_SA(${struct}, ${field}, ${off});\n"<= br> > +=C2=A0 =C2=A0 done <<EOT
> +$(${NM:=3D'nm'} ${NMFLAGS} -t d "$1" | grep __assym= _offset__ | sed -e 's/__/ /g' | sort -k 4 -k 1 -n)
> +EOT
>=C2=A0 =C2=A0 =C2=A0echo "};"
>=C2=A0 =C2=A0 =C2=A0echo "#define _SA(s,f,o) _Static_assert(__buil= tin_offsetof(struct s ## _lite, f) =3D=3D o, \\"
>=C2=A0 =C2=A0 =C2=A0printf '\t"struct "#s"_lite fiel= d "#f" not at offset "#o)\n'
> -=C2=A0 =C2=A0 cat "$temp/asserts"
> +=C2=A0 =C2=A0 echo -e "${asserts}\c"

This isn=E2=80=99t POSIX, and isn=E2=80=99t supported by macOS=E2=80=99s sh= , so breaks the
build there. Please fix or revert promptly.

=
echo "${asserts}"

is semantically t= he same for C. A stray newline doesn't matter in this context. It's= not worth the effort to remove it.

Sadly, echo -n= doesn't work (it's not posix, and posix defines it specifically as= implementation defined). `echo "fred\c"' works on macos, but= not FreeBSD's shell echo built-in (but somehow does for /bin/echo). ma= cos doesn't implement -e at all (it's also not posix). FreeBSD'= s shell echo build-in is not posix compliant. So, to be portable, just echo= it, and cope with the extra newline.

That's w= hat I'd do :)

Warner
=C2=A0
Jess

>=C2=A0 =C2=A0 =C2=A0echo "#undef _SA"
>=C2=A0 =C2=A0 =C2=A0echo "#endif"
>=C2=A0 =C2=A0 =C2=A0echo "#endif"

--00000000000030fa20060a477232-- From nobody Thu Nov 16 16:24:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWQNW0q56z50qHy; Thu, 16 Nov 2023 16:24: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 4SWQNW0MTzz3Fg1; Thu, 16 Nov 2023 16:24:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700151883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N8sxdNi5ZHOk2enD/70dhX0JT4UCZ/SwvUK9leadrEg=; b=LN0WVL3LxlpyvTSU4VuMmEDlG1mzUBpjZuegUzoBaFOCvGsv1vjRVNZrxuYOGs9dmelEz2 RugmLdXTsp5kQPYsZ+l0C1Mf4CQsWnGl4ZpluoknAUVZn8jBthyfRKGDruWwcFDGHbwFzy j9hAtcXtRm7Zid09O08wOxAOVQ83pxXH+c4JCGzaDqSFs4mSoEA5yV2dJDgKqHtSERCsQ4 0sQaDa7cnTmYh3hM3J92miNHSyV2aA0d1W4SlkL/crWCWP4G9Pl2oYEg7G1wzn/M7FXR3+ CkLQkaT83OuVwhI64pNImb2GwOYzqdLhd2d3i+K9OWTJqi5Nf9EbH1m7kIDsZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700151883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N8sxdNi5ZHOk2enD/70dhX0JT4UCZ/SwvUK9leadrEg=; b=S5iJsQ7i31lFb8v+l75F5ZlgBYYmgfqskxyW6wZ6RgaDNJaxlcIx+vmFaxIYt8RRc4xHgG sd0utocd8j4vURnVFdoEZ6scdsoYnG9GL0Uc/dEI2ZROPtilQs1LdqINEK6/72Ruu5vEjK tNxAJt5kYvAQd0Wh3z40SoHBt+YnymK/aGKd2YgIHmzMX5kV06SvNLHVrGTiQvubfiunuW UZhI/gVSjSBs10kWKLrDHEKUM9vplU2pBl37ns4+7W9p2KIoNDBi8R98xY+D5uJkp/kVSg wc43ERYWPrZaXWQlDm1/Tf7/tJM7k6gH6RWnyMGgMNMYYgckCC8sjHQdpC4Mbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700151883; a=rsa-sha256; cv=none; b=Dm7VzZ+sJjXTNPZS6WZkvDodMLvMDKPc/CtaAOHr6W6arR5gSpKSx14DI5LDvxj+xeEK3p +siS1Xndi+9vVZMqv6/nEnV1dv5plzppYwybzGWfnCHQB2hb4EtLGvxpUfzTy0VX6NvyeJ VhFW6xEiMx48ANFKkVFCvy/Pn+8gvoiK9vGJ0U4Z3eeVxOpb/NG2BA2GmFF6CcMNU9HE2S HVOuxrS4jUghnuGkDtTu9/dqFrAIY4Z4X4OixC9dSH0SuUE+uPFy+e1lkKRt+k9kCXmSO1 Oh28iUbmxqX17eVzQr5QgqzQSb6ywIeDuNS0JEqfliegqwMeXJLVgQHJt+G+tQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWQNV6Xhzz16cn; Thu, 16 Nov 2023 16:24: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 3AGGOgHV002468; Thu, 16 Nov 2023 16:24:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGGOgUE002465; Thu, 16 Nov 2023 16:24:42 GMT (envelope-from git) Date: Thu, 16 Nov 2023 16:24:42 GMT Message-Id: <202311161624.3AGGOgUE002465@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: 070d9e3540e6 - main - socket tests: add socket_accept List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 070d9e3540e63540e09c915963c2fc0cc55d3b2a Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=070d9e3540e63540e09c915963c2fc0cc55d3b2a commit 070d9e3540e63540e09c915963c2fc0cc55d3b2a Author: Gleb Smirnoff AuthorDate: 2023-11-16 16:23:48 +0000 Commit: Gleb Smirnoff CommitDate: 2023-11-16 16:23:48 +0000 socket tests: add socket_accept Start with most basic functionality on a TCP socket. --- tests/sys/kern/Makefile | 1 + tests/sys/kern/socket_accept.c | 130 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index e449d9deeed1..308cfd22a0ec 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -28,6 +28,7 @@ ATF_TESTS_C+= reaper ATF_TESTS_C+= sched_affinity ATF_TESTS_C+= sigaltstack ATF_TESTS_C+= sigwait +ATF_TESTS_C+= socket_accept ATF_TESTS_C+= socket_accf ATF_TESTS_C+= socket_msg_trunc ATF_TESTS_C+= socket_msg_waitall diff --git a/tests/sys/kern/socket_accept.c b/tests/sys/kern/socket_accept.c new file mode 100644 index 000000000000..278eb2fb9853 --- /dev/null +++ b/tests/sys/kern/socket_accept.c @@ -0,0 +1,130 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 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 + +static int +tcp4_listensock(struct sockaddr_in *sin) +{ + int l; + + ATF_REQUIRE((l = socket(PF_INET, SOCK_STREAM, 0)) > 0); + ATF_REQUIRE(setsockopt(l, SOL_SOCKET, SO_REUSEADDR, &(socklen_t){1}, + sizeof(int)) == 0); + *sin = (struct sockaddr_in){ + .sin_len = sizeof(sin), + .sin_family = AF_INET, + .sin_addr.s_addr = htonl(INADDR_LOOPBACK), + }; + ATF_REQUIRE(bind(l, (struct sockaddr *)sin, sizeof(*sin)) == 0); + ATF_REQUIRE(getsockname(l, (struct sockaddr *)sin, + &(socklen_t){ sizeof(*sin) }) == 0); + ATF_REQUIRE(listen(l, -1) == 0); + + return (l); +} + +static int +tcp4_clientsock(struct sockaddr_in *sin) +{ + int s; + + ATF_REQUIRE((s = socket(PF_INET, SOCK_STREAM, 0)) > 0); + ATF_REQUIRE(connect(s, (struct sockaddr *)sin, sizeof(*sin)) == 0); + + return (s); +} + +ATF_TC_WITHOUT_HEAD(tcp4_zerolen); +ATF_TC_BODY(tcp4_zerolen, tc) +{ + static char canary[sizeof(struct sockaddr_in)] = + { [0 ... sizeof(struct sockaddr_in) - 1] = 0xa }; + struct sockaddr_in sin, ret; + socklen_t salen; + int l; + + l = tcp4_listensock(&sin); + (void )tcp4_clientsock(&sin); + + memcpy(&ret, &canary, sizeof(ret)); + salen = 0; + ATF_REQUIRE(accept(l, (struct sockaddr *)&ret, &salen) > 0); + ATF_REQUIRE(memcmp(&ret, &canary, sizeof(ret)) == 0); +#if 0 + /* Linux behavior. Matches my reading of accept(2) and POSIX. */ + ATF_REQUIRE(salen == sizeof(struct sockaddr_in)); +#endif + /* Note: Linux will block for connection here, we fail immediately. */ + ATF_REQUIRE(accept(l, (struct sockaddr *)&ret, NULL) == -1); + ATF_REQUIRE(errno == EFAULT); +} + +ATF_TC_WITHOUT_HEAD(tcp4); +ATF_TC_BODY(tcp4, tc) +{ + struct sockaddr_in sin, ret; + socklen_t salen; + int l, s; + + l = tcp4_listensock(&sin); + s = tcp4_clientsock(&sin); + + salen = sizeof(struct sockaddr_in) + 2; + ATF_REQUIRE(accept(l, (struct sockaddr *)&ret, &salen) > 0); + ATF_REQUIRE(salen == sizeof(struct sockaddr_in)); + ATF_REQUIRE(getsockname(s, (struct sockaddr *)&sin, + &(socklen_t){ sizeof(sin) }) == 0); + ATF_REQUIRE(memcmp(&ret, &sin, sizeof(sin)) == 0); +} + +ATF_TC_WITHOUT_HEAD(tcp4_noaddr); +ATF_TC_BODY(tcp4_noaddr, tc) +{ + struct sockaddr_in sin; + int l; + + l = tcp4_listensock(&sin); + (void )tcp4_clientsock(&sin); + + ATF_REQUIRE(accept(l, NULL, NULL) > 0); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, tcp4); + ATF_TP_ADD_TC(tp, tcp4_noaddr); + ATF_TP_ADD_TC(tp, tcp4_zerolen); + + return (atf_no_error()); +} From nobody Thu Nov 16 16:47:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWQtn5Gh7z50rBF for ; Thu, 16 Nov 2023 16:47:29 +0000 (UTC) (envelope-from matthew@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 4SWQtn3gyNz3H8f for ; Thu, 16 Nov 2023 16:47:29 +0000 (UTC) (envelope-from matthew@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700153249; h=from:from:reply-to:subject: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:autocrypt:autocrypt; bh=GE5DLn+Q9dcgREL+UWDIHDcdAr2A2jaHUUmTrqQhhNw=; b=v7U8qobDBdD97z6vhd2Hri9I20TX7e/w8tmgAq+EP+8acZDJZzUUDDBio5R4mNbhKODFDo qpxDGamDfjn2r2a7ATFjdsK926tvkGxWKMS1C4wslaJ91PcnnlC9fIm0Fw2W/hLImH0EDg ckErRpXFd0XgWXReNCl5kXrBdp/npGVTbrUaFUdr8roHAAIJMhSS/j49i4TCMjLk4LFqka PBNkB7nci/s5liP25KYm6+76k89mT2WrS85ggsEphuq2bNziGLn3wntKudzmJa8vtTFTyj vyrIh8eI0/u/GSbGE/BgaaPXXWSrvXrJetkaX9uf5rA2WiNkGEM9VLahufztIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700153249; h=from:from:reply-to:subject: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:autocrypt:autocrypt; bh=GE5DLn+Q9dcgREL+UWDIHDcdAr2A2jaHUUmTrqQhhNw=; b=jNmQrbnBztxGSG2P49XaXLAINJay5pwmMvJ29333/tRnKxCrdpPhhpGk5ci0lfNts6SE5Y MdYZxMvzw95k1UI8NWfvblHzrW5yVqddy8SkH678stDVb7lw1yvZeWOYeXyDkoblHsdj9Y T8/paQDOyMjP3wa8CJdMqBJ2ChQlAlHd23nT5N0EdgJqBdEb2htiiduCjbSnLTP0wrpcFs tySj5pWhuJg3dC6j3QTubAGuNkQZ6MFCAZLbSwArN5oI1aPm8hIPkDeaumUmpUC55zN6Ac VD58EPT7QxQ3SJ2ty+dR6LFcxwtFoA/zA1BNfN73Uxl90pSnFXE7U1TMnKWI2w== ARC-Authentication-Results: i=1; smtp.infracaninophile.co.uk; dmarc=none (p=none dis=none) header.from=FreeBSD.org ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700153249; a=rsa-sha256; cv=none; b=VvyVPTM2zSmCyXUyIDByJFwEAGNggsDUpFOQGNF4U8z1DDUWto4LoL9R+KijMKxCFyDQog 9NFhsadDV/0dDLImp5HzchQszkh6zOj+rszHrxR7NQB8+Cv2YXdTHQYi837tKrqh0mLhrN i7Kk/sochHZhpSpJs1lhM2KT8EjyAow6nNzNGpMhARCSUQU2y+6qiiUHNPKBdi08mE6/Sa XggPZf0rWF7ZncolvqcVnYU3N+ElZ1JG+iiqv9Czc0klnlLrx/k0QxCo5qGGmbfOeZu9t2 7B+NphRiutOXoW95ArDZT/FIwpgN5aqtkxEARhQgqBKn1xD8QIsaoh0DQWRY7A== Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:c4ea:bd49:619b:6cb3]) (using TLSv1.3 with cipher TLS_AES_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: matthew/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SWQtn0lTgz12Nc for ; Thu, 16 Nov 2023 16:47:29 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from [IPV6:2001:8b0:151:1:d14b:641e:6160:9c16] (unknown [IPv6:2001:8b0:151:1:d14b:641e:6160:9c16]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 383B31E11F for ; Thu, 16 Nov 2023 16:47:23 +0000 (GMT) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none (p=none dis=none) header.from=FreeBSD.org Message-ID: <514d9136-e169-47a2-9279-d9ef56697e9e@FreeBSD.org> Date: Thu, 16 Nov 2023 16:47:22 +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 User-Agent: Mozilla Thunderbird Subject: Re: git: accfb4cc9346 - main - genoffset.sh: stop using a temporary file To: dev-commits-src-all@freebsd.org References: <202311161507.3AGF7kgx070201@gitrepo.freebsd.org> <39921E4A-4C15-4D8F-BA9F-D0C53AD62CD1@freebsd.org> Content-Language: en-GB From: Matthew Seaman Autocrypt: addr=m.seaman@infracaninophile.co.uk; keydata= xsFNBFJIL80BEADi7/VbnnErDU6pjEhI/SzEZ/HbDRkJ5g7HroAtqIRm6nj8ZwOAgZ/2ZnWn 5F+fXTuLsG0FLNtkd17FoVcuCi5e/GPliXI5cmamV7E1Yz4T8UsJ7RQolimyxVexccKd16Tc AA7B9bFlJSKkBUSD0buj7VjT07xWhRzu6Vgi5r0UjLALYJz977uZA0F1aOGOXREDEAOhdcNc kSNjynqAwDA6dCT1Elpi4key1fYjv4jyDF+GU/YXul2Y/rguA8FCkHd9vyym5eAsLQ5mG00V V9fkEHIpH5KorNVnl/ufHXnkZqmHAZVpFDcrshb7aZ/pL45PXyWgLj+e6etelgj3a2bZi0JF cVdXCnBZVP2oIyYblM11ugTbfCwodORU8a5KfPeztMdAtDr4e+32NTrPdPi5rLT+GUsYz+PL 3A3m3u8bdsFp40DlIrBtSByVjqERxcfhphrEB4J8BXHUG7OAtXkZMlW/PGKDwXJq0O6Z5Tcg YHAoEiSWbXiexHgXNJyP+sqnIlhLWhSJGeJ+C83wqI6oYlZUCW00NkPxcIHnQPV/z+5wQVci TMyaWC2YCIHz4Ljs+TnwWMz0E8PNFDfHVbQ0W4PRGV7gRAqxfL+yKufauIEGbEq8rNDbSwL3 bcUCxR4ZDlaUEUwT4J8naf7rjdgiEYHs2Ig3jeK1+ER4FPG1sQARAQABzTBNYXR0aGV3IFNl YW1hbiA8bS5zZWFtYW5AaW5mcmFjYW5pbm9waGlsZS5jby51az7CwZcEEwEKAEECGwMFCwkI BwMFFQoJCAsFFgIDAQACHgECF4ACGQEWIQRyz6whebywJLW1RZADb2ye5/OevwUCZEZBFAUJ E99ExwAKCRADb2ye5/Oev/3gD/94LcABf5vo1cmkObEPvPow5qn/MvhIo2E5LKBbFX4I3xd5 H436rSRvaRcyVXLBlz3salqsPeIHHfB1QDpMHJo6uMLunkiEg4JSLWk9mSFh/YxgdIjjOpjE xndpLwJo/dphwVD6ZSDz6iWN1hf2cDWVPBR+c7LaGmYIHY6sMHkFj7TA3SgnYpWA5yjUtQqs +sETL9MD5IKgbmcICQtonmK6PydyLosTDKNcTAxZvaMZ2Oj1OfHxUQBSeUtDuLPP/MUwYPwu wamlVVYosdGQg8IIPVNkloDYYgGgXxGuq1x7qe0f2grHqQdjFWs/7+xnju1yHNIrtOv7LC+8 qABvkjcjnOWgVQFUj/390MGULNf86g7MMUw1xh5RxwGCeZS1oP8WBjEFFTTRtkX/EC1LZ/qJ 35dfaYVcRMhrSo1GTL3fNfhOSMYyrMQfSMPRMgCsJo+5/f6TCXgYpiZ3bfKzxpylkr10zAoX /v7ZqLpaEVLm0rpYyKByL3hTt3WgoeS/PlI2HXZX+f+0XivBoeEr3RqVcxGd2V+fab5JDMeI 9Gcuj0lF7MWT5ffXpezkbsif7DruB3ULD5cyvg5upxYD3lzkL4vBCltMH1sBwV104zr/65KQ pxlNlJbMVP2KnqO01sRhGoOa7F8oKflFrxD610Sbn4Ib/r396gFoswv8fE3clc7BTQRSUUK4 ARAA1FhWoOejtwmsnGshoIbda2FmM+z/f97OzpagLhACHfP5Es/I18wG/0G+rdNuO2tjA9IM Z44GUMtjokDrDk63N9S+rVKy1QEy+UN6CiIfYTpTTAPnEY7IGN1JjGksPhn7aeuBCQwUMAV1 k+wklBCcOD6s8DD4kx0ZJqkH83XzWoBSVamdHvnM56C8yPVr5HHMC1tZInAWBMrF+cjl1EPf z3CqkVnG8Sxc5ydeibMS9Q3lHLeVkVlMRAmNqzNLfgJDUWtzac7JIjFEsxYYhpiaPcsstUUu Ha4zIRJ/yHDNbDttWRf1lrlFZLpeuap4BZ2hQw0UOZVNwGoFoS4ZqaZiv8mm0lX6s9/AdQD6 AVrpXWKa7JU2wDiay9sRbYh+5vVWGz9mhncK/Vfwtu5IjVp5v5WMz/WfnUxZMcNlfgTo4i1s www+qRBO2A4Yj8qKKWnTsl7aCX92itTiPgwbt6YgQPwgww72r67jPt5o8VMXDqPMPKzGicw1 AyxtMjsoSlnn91FuZctwil3vPpvzGXtBmrzQSbdDmy0KT5p5/W9pD/8UtLLLM6PLs5X0jIho vQHnQKEUO7xV3yNDAW9DPICeh7f/o9W+QJfQAXngNz0brvmgScAUXRaeAFeQbAmtEG92qlSV D7gb7WOemllgfbEn0Nanrv5aEcZCWx4WjybMLHEAEQEAAcLBfAQYAQoAJgIbDBYhBHLPrCF5 vLAktbVFkANvbJ7n856/BQJkRkFyBQkT1jI6AAoJEANvbJ7n856/r6AQANucYy3bVJ0obU75 5AXMVIMj1nRA6LU9u+lAnYb+wMSVHXkNrW8GssqmiUGL0hJ0HNRXJLeI85YMhvXTmVYk0JqF LRp0Kj3aMbtaouCIbYTn2aaczwGViu3aQmgQe2ki+KrzxwYyG8FkHRp43+FTuBeYs6wbA36F g3eCp+Icx6X9evEeOajrgsaDr2badP9nHCYb/If1E57VC0pgx2R2/eBAtN5dlCWfgg5wJ0cI JUg3TJT4GPnumk7kLUN7U3ORQSQldiSvOBi6gpY0i8UCbmG6R5qs363J1cY7ry/enjg7GVA8 glu2Z+EHcZrEFAhvpmI+pkoyKCR0/KCv+s0rqQ5t606uquS15sr8NW2YejbeOOaEvNscKx8L QAFMaPxS/6DX+BsFAFXVWLwW/9wdaETDURf7i0EnT4xklmyyWeYMEF7mZ1x5OXdV/hAE1SFS nyuqs2SAYnpa81QQ4Eo1yehyntgdHSaOdSz3Fw7dFIiAXHvwBYf6rvTwF2MG6v3iQ+dgRv1N r+okN0LLmBjh1aYS43fvPXbwB0aBzVJZYO+a5AkPkabvblLaA1pl+V+BMUpAQhuxrDM7wsf0 6i8RpF5MjrZr12DsU2moFR2oYOmwtWBt+yI8zuYbbZ1uLR5bmyU7QquRPmQHPHrHp6mHCJfu zOyJzcEbUOrc6WHFOLbe In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 16/11/2023 16:23, Warner Losh wrote: > On Thu, Nov 16, 2023 at 9:07 AM Jessica Clarke wrote: > >> On 16 Nov 2023, at 15:07, Jonathan T. Looney wrote: >>> printf '\t"struct "#s"_lite field "#f" not at offset "#o)\n' >>> - cat "$temp/asserts" >>> + echo -e "${asserts}\c" >> >> This isn’t POSIX, and isn’t supported by macOS’s sh, so breaks the >> build there. Please fix or revert promptly. >> > > echo "${asserts}" > > is semantically the same for C. A stray newline doesn't matter in this > context. It's not worth the effort to remove it. > > Sadly, echo -n doesn't work (it's not posix, and posix defines it > specifically as implementation defined). `echo "fred\c"' works on macos, > but not FreeBSD's shell echo built-in (but somehow does for /bin/echo). > macos doesn't implement -e at all (it's also not posix). FreeBSD's shell > echo build-in is not posix compliant. So, to be portable, just echo it, and > cope with the extra newline. > > That's what I'd do :) > Why not just use printf(1) like in the preceeding line of code? printf "%s" "${asserts}" will avoid adding any extra newline characters to the output. Matthew From nobody Thu Nov 16 17:56:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWSQN3nF2z50vvR; Thu, 16 Nov 2023 17:56: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 4SWSQN3GJVz3Nmj; Thu, 16 Nov 2023 17:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700157388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t966AiR7dyWaekkIhrKGqvaoP+LLY/SuVUsSXScK5YI=; b=x144Zl6vT/0baq+ogh2NWfYHOOcbh38Maa1UVRUZ4n5pxMlQGFjHK75MXV294S9NoOOed0 0SWhNVBL/ndbZL8pdo0uwIWemAAHoTf6BoR5grEkoZ+bXzEAkSM+X/2g/LXHDgmu0jpjFV cHz6+jINMO8FUmqYyp9OLjI7UXtNTReqqL4vvv6fPwRAQ0HMefBKl7+pJja3niqoaP309J JO8dfyY6FB9kuefCwJuAxqWShjBQz+69jUlQccolxBhZSiTGWH/sThCBSrejtcmlLPVbXJ 7lcCUeLrbwIR994uUJBeW53K8wz7egA8KvXqM8RRSstcbviwgPHV91+Kod8Jzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700157388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t966AiR7dyWaekkIhrKGqvaoP+LLY/SuVUsSXScK5YI=; b=hQQOh5non4n5YOCcQQwmRl1SG3vuWZdBU4NiV3CFCB6cOArctonWg+CDRnF7365IuMRZxh 1e407t0MfB2XCj+KXCVeUoxRq9tckX+2kuYEkMnykCszPhdA329Jj7vBnEqUHdAFci3ugs 71UiNY6phEM4udBa1uBP1bpp+iEL63U7nTAV3IkynobefjIUmJCqG1yMBeZVU+8ABohU24 4C/yj+CC0ew/sfulmsZ8tgf4HqHUzw7OAZyBX0YrJ6myLQdd7LJnSI1G0kqyUbTKebqRp4 ZiWBqPv581BV9l0p/4BhZn3IX8Mtyf3RpbpQ7AXBpEhWr0eFpNaFByilaV1sdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700157388; a=rsa-sha256; cv=none; b=bBdayy339bgsrMWV25G4CCUNEW84idcMHPanyUSS45M39usI/WpkYEn1lKl8685bfpT9uO Ik3ZbPxXGiB+0XepMuSzUsP3f/OgwEGtMe1ilHcv9kK3hSHV/yvmp6fH/A3WPfCSzvDVnR OyoEYIR9C1Gc/wl0wj3m48rBgEBomSab8XOwZasw13n3iGE/Nk/5a//DAj7mpEc3sscg9r x+pz7S7vhYqxtbfMTmf237TVihXza7ifp0tJCzbg9HTTUmpGOzEwTjY47Ahy/ogmQauWBp 3IO5fetf9izjIOohUk+DhVYypoX0LWjvMmJa0oJcAJHbgSZhPbhQ2ohyN5hCJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWSQN2Kssz18wh; Thu, 16 Nov 2023 17:56: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 3AGHuS6m052731; Thu, 16 Nov 2023 17:56:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGHuSVQ052728; Thu, 16 Nov 2023 17:56:28 GMT (envelope-from git) Date: Thu, 16 Nov 2023 17:56:28 GMT Message-Id: <202311161756.3AGHuSVQ052728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jonathan T. Looney" Subject: git: 884eeff20ce9 - main - genoffset.sh: fix build break on MacOS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jtl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 884eeff20ce91ff9fd5cd0a1766e094dcb15b463 Auto-Submitted: auto-generated The branch main has been updated by jtl: URL: https://cgit.FreeBSD.org/src/commit/?id=884eeff20ce91ff9fd5cd0a1766e094dcb15b463 commit 884eeff20ce91ff9fd5cd0a1766e094dcb15b463 Author: Jonathan T. Looney AuthorDate: 2023-11-16 17:45:02 +0000 Commit: Jonathan T. Looney CommitDate: 2023-11-16 17:54:28 +0000 genoffset.sh: fix build break on MacOS Switch from using the shell's builtin echo command to using the builtin printf command to print the asserts. Reported by: jrtc27 Suggested by: imp Fixes: accfb4cc9346 Sponsored by: Netflix --- sys/kern/genoffset.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/genoffset.sh b/sys/kern/genoffset.sh index c974a7d52e8c..25ed6ac7cb73 100644 --- a/sys/kern/genoffset.sh +++ b/sys/kern/genoffset.sh @@ -64,7 +64,7 @@ EOT echo "};" echo "#define _SA(s,f,o) _Static_assert(__builtin_offsetof(struct s ## _lite, f) == o, \\" printf '\t"struct "#s"_lite field "#f" not at offset "#o)\n' - echo -e "${asserts}\c" + printf "${asserts}" echo "#undef _SA" echo "#endif" echo "#endif" From nobody Thu Nov 16 17:59:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWSVM0n9jz50vvm; Thu, 16 Nov 2023 17:59:55 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) (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 4SWSVL6F63z3PHf; Thu, 16 Nov 2023 17:59:54 +0000 (UTC) (envelope-from jonlooney@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-d9abc069c8bso1087080276.3; Thu, 16 Nov 2023 09:59:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700157593; x=1700762393; 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=dPvpKWADqpUjd+uefC7us9E1pXuEToV+zjE8TAIXguk=; b=fgXDClHFt7/9EW58OYOzYCOdHWKUjfe5wj+dlqNisidIKYU1zfqxZA8AVW9a7tQGU1 ElZKjr2rk3mJRKy1hGdudmsRql5BRptlMTaDFbkk//08YBmrVcWCMSvCwWriTc7RdsG3 xr5BAuKLBtdFr6AOYAMwX4/gjbDH618fgWbW6bu1f3BTJI3C9h+H61qrsha81ZFKff1v zcjH2vmjZgAg++dQT5Ac2tdKzW7dKl+kAQgMdviXWZB6WpCmc5hC2a1zXiaI02B8eBDr YVZcFX032s157bZhoDaR/5yIiqnL3mN76Oxnwf/CGQLpOH/SJqYpgeMhb8qwumjUCmEi vfEQ== X-Gm-Message-State: AOJu0YwkcKAim7+mK1S01v4LzZpLZz7xwELDk8YYVT9Gzbz2gjFvuWvC oFMVKwdGDqIi8+PWQY7uRNjv8TgFmRSQ0w== X-Google-Smtp-Source: AGHT+IHqFK6zqBG8sQBRxLQUILuQFgdA7Rk5s2v63Cxm6sOGqrI98RJ2WZPkXgv/TWvYkbNbDd/Pbw== X-Received: by 2002:a25:abb0:0:b0:d9c:66d1:958f with SMTP id v45-20020a25abb0000000b00d9c66d1958fmr14115334ybi.55.1700157593216; Thu, 16 Nov 2023 09:59:53 -0800 (PST) Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com. [209.85.219.172]) by smtp.gmail.com with ESMTPSA id q15-20020a258e8f000000b00daf198ef6fbsm967165ybl.21.2023.11.16.09.59.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Nov 2023 09:59:52 -0800 (PST) Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-daead9cde1eso1089396276.2; Thu, 16 Nov 2023 09:59:52 -0800 (PST) X-Received: by 2002:a25:3585:0:b0:da0:6734:8b76 with SMTP id c127-20020a253585000000b00da067348b76mr14438019yba.30.1700157592437; Thu, 16 Nov 2023 09:59:52 -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: <202311161507.3AGF7kgx070201@gitrepo.freebsd.org> <39921E4A-4C15-4D8F-BA9F-D0C53AD62CD1@freebsd.org> In-Reply-To: From: "Jonathan T. Looney" Date: Thu, 16 Nov 2023 12:59:41 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: accfb4cc9346 - main - genoffset.sh: stop using a temporary file To: Warner Losh , Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="0000000000005c148f060a48c906" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4SWSVL6F63z3PHf --0000000000005c148f060a48c906 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Nov 16, 2023 at 11:23=E2=80=AFAM Warner Losh wrote= : > > > On Thu, Nov 16, 2023 at 9:07=E2=80=AFAM Jessica Clarke wrote: > >> On 16 Nov 2023, at 15:07, Jonathan T. Looney wrote: >> >> > - cat "$temp/asserts" >> > + echo -e "${asserts}\c" >> >> This isn=E2=80=99t POSIX, and isn=E2=80=99t supported by macOS=E2=80=99s= sh, so breaks the >> build there. Please fix or revert promptly. >> > > echo "${asserts}" > > is semantically the same for C. A stray newline doesn't matter in this > context. It's not worth the effort to remove it. > > Sadly, echo -n doesn't work (it's not posix, and posix defines it > specifically as implementation defined). `echo "fred\c"' works on macos, > but not FreeBSD's shell echo built-in (but somehow does for /bin/echo). > macos doesn't implement -e at all (it's also not posix). FreeBSD's shell > echo build-in is not posix compliant. So, to be portable, just echo it, a= nd > cope with the extra newline. > > That's what I'd do :) > Thanks for the report and suggestions. I've committed a fix in 884eeff20ce9. Please let me know if there are further concerns which I should address. Jonathan --0000000000005c148f060a48c906 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Nov 16, 2023 at 11:23=E2=80=AFAM = Warner Losh <imp@bsdimp.com> wr= ote:


On Thu, Nov 16, 2023= at 9:07=E2=80=AFAM Jessica Clarke <jrtc27@freebsd.org> wrote:
On 16 Nov 2023, at 15:07, Jonathan T.= Looney <jtl@FreeBSD.org> wrote:

> -=C2=A0 =C2=A0 cat "$temp/asserts"
> +=C2=A0 =C2=A0 echo -e "${asserts}\c"

This isn=E2=80=99t POSIX, and isn=E2=80=99t supported by macOS=E2=80=99s sh= , so breaks the
build there. Please fix or revert promptly.

=
echo "${asserts}"

is semantically t= he same for C. A stray newline doesn't matter in this context. It's= not worth the effort to remove it.

Sadly, echo -n= doesn't work (it's not posix, and posix defines it specifically as= implementation defined). `echo "fred\c"' works on macos, but= not FreeBSD's shell echo built-in (but somehow does for /bin/echo). ma= cos doesn't implement -e at all (it's also not posix). FreeBSD'= s shell echo build-in is not posix compliant. So, to be portable, just echo= it, and cope with the extra newline.

That's w= hat I'd do :)

Thanks for the rep= ort and suggestions. I've committed a fix in=C2=A0884eeff20ce9. Please = let me know if there are further concerns which I should address.

Jonathan=C2=A0
--0000000000005c148f060a48c906-- From nobody Thu Nov 16 18:19:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWSxJ4SMrz50x0f for ; Thu, 16 Nov 2023 18:19: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 4SWSxJ3yzgz3S3K; Thu, 16 Nov 2023 18:19:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700158788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=74rMxqDyDb4drE/syT0ZmjxL2BMCj3ZBIbVqy9evdAo=; b=ZLraprZBvJTDLTaRnFfR14wmI076vt53p74i5ouQ/mUXhR9Ny+gnZts+cKyY1b+L8cGXV6 iI6nc3+LyeIEa0uM3LqxO388HTgiv2mI0qzD9Ap5njec0LrHI3zDBzA/zKiy1w/M66b2lJ duGIuJPCDfN8AnopGyQIafHmCAxgfeIBMuJ6wXTzzu4dd5HiTYAemL8HaMs4QZkqDgxVZN ECGwIflBa+4uGX65F9mT05ckvYwg20AHj8GOAm1Gd0D1z/iqAr5Bk/eRBz9B12LcVCVeAx 9SyGQ1VifjR8E2z85ti+lMwVSS4Z4Y5l5OYqRzWLEWkGmqS5jYEJcnaXwFBA1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700158788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=74rMxqDyDb4drE/syT0ZmjxL2BMCj3ZBIbVqy9evdAo=; b=guSf5evyoKDWSgUJVtiLTuPqK9HETf+KqGWdZZvkhnDEqx0TUM0UUs4z0jRxsgBRiWVKPq /1FeYBUYtFa/fW7oV8rYaVSEoL/CpSBmfLVO9egr2diXoUS0rzkrzUSnlIKcaYdIlVDl0K n5mJIDnDQDkSqTMENH0NRCvTIWfmbzI0XBFI2sYhv4MxgiwdHjA7RcCStu2koJqsyPw2vf E2OyfRIPZUi+HKiLk5SbPj/tg6G0BiRgt41exse32B4I72+HQjlx88Wvf1kiIS/dxHJPXT GI3fUEx9ePgDaL4fCggV6Yeq6a3tat7lIZmyZo1AyZLhy4vQfBO0kw65KK9fUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700158788; a=rsa-sha256; cv=none; b=yWtooZw+JPBX/8i4XXdye+Juyqe3UgS/DHYaZIRzG55j7hGW83Sj4eHq93ad2oOAHz61H3 ECl2sm34DbOmjBxTjZ2kCqpXgrPthHxXZxOQERrhU1fT9oSU9GxLiJg29FjLpf6xf1YuVe Zp/4oH5L8ySgNV5/jFqOuFD1fFKPonWaOUbWG5g/YYgn8NAQOGmsgT5Guq3lTdzhnndJb1 0nXQ6UjuBsY0BSdqdjdROVWz2zv2fZzuyDoxlB/bSjSRdJVxHF1a2nYFRkFIUgYvvZcDmY zcLZrUhC/ljf/K0gD+lPr3WM+Cdp5NIKjieOLkvSRuo2kF7THtGsT9nYglRm3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWSxJ32fQz19NZ; Thu, 16 Nov 2023 18:19: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 3AGIJm7j087020; Thu, 16 Nov 2023 18:19:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGIJmvf087017; Thu, 16 Nov 2023 18:19:48 GMT (envelope-from git) Date: Thu, 16 Nov 2023 18:19:48 GMT Message-Id: <202311161819.3AGIJmvf087017@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Colin Percival Subject: git: 8731c8eed02a - internal/admin - Add Arthur Kiyanovski List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/internal/admin X-Git-Reftype: branch X-Git-Commit: 8731c8eed02a6add87d3360a06afe1c68919b108 Auto-Submitted: auto-generated The branch internal/admin has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=8731c8eed02a6add87d3360a06afe1c68919b108 commit 8731c8eed02a6add87d3360a06afe1c68919b108 Author: Colin Percival AuthorDate: 2023-11-16 07:16:21 +0000 Commit: Colin Percival CommitDate: 2023-11-16 18:19:38 +0000 Add Arthur Kiyanovski Arthur will be maintaining the Elastic Network Adapter driver for Amazon Web Services. I will be mentoring him. Approved by: core --- access | 1 + mentors | 1 + 2 files changed, 2 insertions(+) diff --git a/access b/access index 8673b6902134..f438c6831f39 100644 --- a/access +++ b/access @@ -18,6 +18,7 @@ adrian ae afedorov +akiyano alc alfredo allanjude diff --git a/mentors b/mentors index 3d56a29ab2b9..95dd93e40d50 100644 --- a/mentors +++ b/mentors @@ -11,6 +11,7 @@ # Mentee Mentor Optional comment afedorov vmaffione Co-mentor: jhb +akiyano cperciva anish jhb brd allanjude Co-mentor: bapt bryanv grehan From nobody Thu Nov 16 18:36:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWTJx4PJzz50y8T for ; Thu, 16 Nov 2023 18:36: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 4SWTJx3s1fz3VDM; Thu, 16 Nov 2023 18:36:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700159809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DyGiGBl9EuwuOmUPojJo/ZADd+0WmyXdadb6Hp00n+w=; b=mZKCe3qzy/gTkR9tk7RT8725ahDUMnXGbdWPXSE+tQXi4j2B2t3tb8anvIj3BEMKq/zfUe c1z7VKRePMt6AB5xC6Yd7SFL0XJfXsPJ4+2Pe3otqbL7w/TpswaV6q9NK5p+rnuRTI87yO u0+2YazgYK2wed9VaPDF20kRl95sZLrZPB7UlMuftNVjqSSlelj3w/wJDHLS0yED5pmP7e nrk13rIachLGCpgOoxAlwAeZTElrMC2iMXn30Be0xUJYVkPbCOJLDksoAUd02XIIwltvQh BowoHehHAzrA6/izmVRFCtfMljM1IFQCdryhuoRbspnhqx28LfImxMfZQzpTgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700159809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DyGiGBl9EuwuOmUPojJo/ZADd+0WmyXdadb6Hp00n+w=; b=xL5skS1AcUosUVqZpvu33n7mZVXk3pVJiSQXfuOtetkGIYqAThx8ds5qbkaWBrsPM8cIib 1tiOV9Gcy4fdUyX/APXpdAWoaN/K0Z1aFxJnRl8BhmD6xBbkT2vzKiOkb4WUBfI5gIitFg NjGdvtHNXpGkYD72t64gVCu3CPU3m8FVf8fIFUqh+/81JRSvsZdfr8O3YrBIsae5dvMG0i 9vJhrqgyrqbRgRB65WrQpLpjjCTxiGm2FOk1kalffmPUJ6AfQLxucMMsHh7+X4hv5bj8N1 FPqCKCrev8dBHjOxivUrf6rLZXy9PtECpayXxpRM9W/+igRwLLJEgP/2sSI6LA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700159809; a=rsa-sha256; cv=none; b=HDQEi3FuXbRsmdxTfMxC63Tzez5oFpoKbRQS1ElXYtoDf4HCByJxke7K/ZzyyOTTYJocRi cApnCZVl5v10IQPH+wz600iKnzIpiIfCZ9+3Lmj1MGpftqKjd8N5i6NGeWvVGGUdlwdZyb 6RpuSWdjWY9o55nb1iCCuhPx5S9rw95lx7lANvhrB8Nzxi4kbGwrAhSWOC6MNjDZghuzq4 njUYvUTdtccPIs9BzIJZ7st4p/mrqfrvAm/EeAqxm7G5dSMzqiAYweHlFbPD7Go6VQVmhM dR3UzYmihTFbfj/2VCEwpZZlv2+XIK3Rg41hDhrZMjAS70hnuOVK29NPtnEiUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWTJx2cCLz19Bv; Thu, 16 Nov 2023 18:36: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 3AGIanmO019956; Thu, 16 Nov 2023 18:36:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGIanoQ019955; Thu, 16 Nov 2023 18:36:49 GMT (envelope-from git) Date: Thu, 16 Nov 2023 18:36:49 GMT Message-Id: <202311161836.3AGIanoQ019955@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: cd255c5cf244..fc0a8108a55a - vendor/llvm-project/release-17.x - 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/release-17.x X-Git-Reftype: branch X-Git-Commit: fc0a8108a55ae5db3aa0e71a9877bd56f0581728 X-Git-Oldrev: cd255c5cf2441442b46200d298c0cbccf83caba5 X-Git-Newrev: fc0a8108a55ae5db3aa0e71a9877bd56f0581728 Auto-Submitted: auto-generated The branch vendor/llvm-project/release-17.x has been updated by dim: URL: https://cgit.FreeBSD.org/src/log/?id=cd255c5cf244..fc0a8108a55a fc0a8108a55a Vendor import of llvm-project branch release/17.x llvmorg-17.0.5-0-g98bfdac5ce82. From nobody Thu Nov 16 18:36:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWTJx4csGz50y8V for ; Thu, 16 Nov 2023 18:36: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 4SWTJx4BwLz3V84; Thu, 16 Nov 2023 18:36:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700159809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RFSh4JK4YQtdcfNr8LFHQFwnoJRE5Tx/Y8RWzjqKrfs=; b=mEg+OMyzBVS1lctV6/wGSatNm73Ei1DUO2uCDNyWlwEWzWecQAqgNNbIDsu/QJffFYA9QD G6JfunpHMIVNQzgpG27+8agOIsSrti3/qyow+bnPV0ts1TVs3NsiFN0D9qeq9hhdtjwKaz srgo+++ZlwvP6ociihBSxXKIbqVmnWKov6mll7zLLT2Ydiaa0xAdUSsdfRNEjB3ggLKBuE eBS5BfsY216N0eaZJL/zVbd6CfUJirNtocRkpwhj4HOQNDxjojcjxM2Upb+XG4kzaxuI3p Gyx6TjIF0PsvG3I4+9oLyIxYHFQTll0JLrP75yxyXhbYXI+6XmZVxf+Nzm6PvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700159809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RFSh4JK4YQtdcfNr8LFHQFwnoJRE5Tx/Y8RWzjqKrfs=; b=wqZlndxZ5J8PIj24k50LoF27MBb98aEOd9ly8NujfXr9/mCFtTkhHQ5BgrAgTjSQfKhzW4 azYBcR2gl86mDTuy/wZ+YRg/2paCEq5K5gBRGQ/+GGqqPA5UIJf95JMS1WdhFPXQGqNewx XgZ8MSP3QKOLQM/HPk3VSR902gRc7TzuUU/tjA+0kHmrCnA6x4SEFDaUgDXpkMHJe2/tg0 u0bW8sXZosxSt5nAa7t4mj/o5bI8wwzZ7Vnipq/55d+bzIm60+oZaR2EGZ3LjiRVayBz5P rMnVLBvGnIjtyGMfbb48h3y4CsyI3fWs0lSnsDe4JGg+gzPD56anqT0KVbfesw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700159809; a=rsa-sha256; cv=none; b=QuyjBozpJutdaWWJGfdg1ed0MZkL11W15gaGrJ33scbKYRR1bOxN/eNatnWVh0UjNU4J3K 4FQOVF+C+gSXcD3M+Jq+VsV0xQNVguk/trnUln9xt3ZebTTBuwltGYJ2KTr5lZ415mlRn9 QqSYK+1c5y2TTON4fVRfPoXF9atPC6VwkOXy5RukqAhaK2NhVtse0H+39vRyal7xQnyKFv uUlT2TGJmACZgjEYIGQ8wrjV0VrlmVleP7GI8g8GL1wfTiG957EX6SZa9yjwIal/wPCNKX eg4e3OWqw0V96avSEa8RRYX63tjTucGqXBCyy6INfgo7NsPV4l9xUkPofn0+NA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWTJx3GB5z19Bw; Thu, 16 Nov 2023 18:36: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 3AGIanj7019975; Thu, 16 Nov 2023 18:36:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGIannk019974; Thu, 16 Nov 2023 18:36:49 GMT (envelope-from git) Date: Thu, 16 Nov 2023 18:36:49 GMT Message-Id: <202311161836.3AGIannk019974@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 968e3430d207 - Create tag vendor/llvm-project/llvmorg-17.0.5-0-g98bfdac5ce82 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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-17.0.5-0-g98bfdac5ce82 X-Git-Reftype: annotated tag X-Git-Commit: 968e3430d207ce6901e0bb612dd2ac8261a5df5e Auto-Submitted: auto-generated The annotated tag vendor/llvm-project/llvmorg-17.0.5-0-g98bfdac5ce82 has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/llvm-project/llvmorg-17.0.5-0-g98bfdac5ce82 tag vendor/llvm-project/llvmorg-17.0.5-0-g98bfdac5ce82 Tagger: Dimitry Andric TaggerDate: 2023-11-16 18:36:17 +0000 Tag llvm-project branch release/17.x llvmorg-17.0.5-0-g98bfdac5ce82. commit fc0a8108a55ae5db3aa0e71a9877bd56f0581728 Author: Dimitry Andric AuthorDate: 2023-11-16 18:35:55 +0000 Commit: Dimitry Andric CommitDate: 2023-11-16 18:35:55 +0000 Vendor import of llvm-project branch release/17.x llvmorg-17.0.5-0-g98bfdac5ce82. From nobody Thu Nov 16 19:41:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWVlH684Yz511kT; Thu, 16 Nov 2023 19:41:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4SWVlH0FJfz3bk5; Thu, 16 Nov 2023 19:41:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.17.1/8.17.1) with ESMTP id 3AGJf7wD025401; Thu, 16 Nov 2023 21:41:10 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 3AGJf7wD025401 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 3AGJf7wB025400; Thu, 16 Nov 2023 21:41:07 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 16 Nov 2023 21:41:06 +0200 From: Konstantin Belousov To: Jessica Clarke Cc: Dima Panov , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 99132daf6f70 - main - rc.d/ldconfig: Prepend rtld stdlib paths to ldconfig(32)_paths Message-ID: References: <202311132339.3ADNdZKF081019@gitrepo.freebsd.org> <7E6896FA-85A3-41DC-9ECA-1D12B78BDA2E@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: <7E6896FA-85A3-41DC-9ECA-1D12B78BDA2E@freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4SWVlH0FJfz3bk5 On Thu, Nov 16, 2023 at 01:33:12PM +0000, Jessica Clarke wrote: > On 16 Nov 2023, at 12:44, Dima Panov wrote: > > > > Moin-moin! > > > > > > This cause some errors while running, at least on aarch64, host and poudriere jail > > > > > > # service ldconfig restart > > ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/compat/pkg /usr/local/lib/compat/pkg /usr/local/lib/e2fsprogs /usr/local/lib/mysql /usr/local/lib/perl5/5.38/mach/CORE /usr/local/llvm16/lib > > ELF binary type "9" not known. > > eval: /libexec/ld-elf32.so.1: Exec format error > > 32-bit compatibility ldconfig path: /usr/lib32 > > Yeah this breaks if the kernel and/or hardware don’t support 32-bit > compat (not uncommon on modern Arm hardware). Interestingly, it seems to be impossible to detect that arm64 hardware does not support executing in aarch32 mode, except trying to run a binary. Am I missing something? Would it be better to not register 32bit elf brand at all if hardware is not capable? > > Also, parsing the human-readable output of ld-elf.so.1 -v to determine > the path seems wrong and fragile. Given the above problem I think this > should just be reverted, but if we instead want to press ahead with > something like this (with suitable handling of this case) then we > should really have ld-elf.so.1 produce machine-readable output (which > could just be the space-separated string) for use the rc script, not go > mangling -v’s output. But I really don’t see the issue with putting the > paths in the script... Would would you qualify as machine-readable output from ld-elf.so.1 -v? Are you against spaces in the item key names? From nobody Thu Nov 16 20:11:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWWQZ1TMBz513Hq; Thu, 16 Nov 2023 20:11: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 4SWWQZ0Yjyz3dt8; Thu, 16 Nov 2023 20:11:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700165510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YUwEJbxn7ttaty9UzVgjVrjD6k98SsZXaBRu8UODi0A=; b=nd7fwZ1zRunXBOiySHjrvZI10g2kViFPt0Jy0Eem5vso3Vm487XJemPm1qE6u9fkOFyPK3 HKfMscAKl4Iwm6uiumsSUTzWKKmyc9AHf5XyRRMxnJb5YK5VHefvg96Y4zOqd8iqPpk3i6 ++pZ2MldhVhla9TBBeM0iER++gkRVSzQJjrXMHI8zbZ0ZWfqPSVBKUZW/NcGHnfYSyScEc LInMSGbLGKpMJqUAO66CtfUZtTE6QPHSguXN5cMYWQ+F9grvP03f6Dlrv2NuGdUaQ5wRYN eZGOpsJzSmCmVYLGMcI+GkUsf0GmztZN9WA6w6cXqITXzz3nj3UAXb1R9ARBcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700165510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YUwEJbxn7ttaty9UzVgjVrjD6k98SsZXaBRu8UODi0A=; b=gvqDVDbOeOh7vKt9rEQ8maxOdWFrz5tFpDmP6XyBqc8FhVmLZ4vGDZAoURXM8PN83Ztb8D EK9GBEo6mkUD3XYUkuDsCSVa0UD3xN99C6rWoWGyKeu1I55+qnLAKRmycNWrUTj0Ow+7d8 FXPtTstUe9PiHm4TIhRn4/dag+PqFVwrDWSBkp6FK79m0wlb6+OFSLdOUyk8ahcrlufeA3 /IOVyZ0dfZx67ntAGSOubjWCOHyxZkhCEC8MTnzCm3dGyApLGeNnCn346foB3qOFtSuWr8 Ci+Gs+jF4nSO3TGJ5lPQqL+U6V3PXGx0339ORJHZiD0WvKjfY6yintRvpM2gmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700165510; a=rsa-sha256; cv=none; b=LEL4k0C/d4UOAuXca7HQhMWLUdC+hxp+PQbf7mp1MaWhEsZZCPAdljCnbVJNOMocz1CvOs 8BP1r4OouZ9VStgRdviXg+v6vntxfEWNCOwR092QHYUeIUE2AGt+mQYs6dMy2f8ATQXnSJ zt/PiT6u/RDiHu5AK5f5uo5/J3mxJSq0+V9O+kzT5cdTiX3PyNP2xYHGElAlvvMatNDaqF sSONghuqVAF9CKHMMT2oxcsxr/fcfT2UJuKlDAgC2rK6WHwnsf+tVFgVNbvBJM+qSCKUES AMtIHXUPE9IaIPALAp3ucMicO8j3uUq7AetmxGxv3eSPNay7VOnd62hvmnB2bQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWWQY6kSfz1Cjk; Thu, 16 Nov 2023 20:11: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 3AGKBnhG082624; Thu, 16 Nov 2023 20:11:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGKBnLY082621; Thu, 16 Nov 2023 20:11:49 GMT (envelope-from git) Date: Thu, 16 Nov 2023 20:11:49 GMT Message-Id: <202311162011.3AGKBnLY082621@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: 318c56714aa8 - main - fuse_vnop_copy_file_range(): use vn_lock_pair() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 318c56714aa8c170132ebe008f52904e0f119b5f Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=318c56714aa8c170132ebe008f52904e0f119b5f commit 318c56714aa8c170132ebe008f52904e0f119b5f Author: Konstantin Belousov AuthorDate: 2023-11-14 22:48:47 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-16 20:10:30 +0000 fuse_vnop_copy_file_range(): use vn_lock_pair() Reviewed by: asomers, jah Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42625 --- sys/fs/fuse/fuse_vnops.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 3249e5988801..aead188276ec 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -879,23 +879,11 @@ fuse_vnop_copy_file_range(struct vop_copy_file_range_args *ap) td = ap->a_fsizetd; pid = td->td_proc->p_pid; - /* Lock both vnodes, avoiding risk of deadlock. */ - do { - err = vn_lock(outvp, LK_EXCLUSIVE); - if (invp == outvp) - break; - if (err == 0) { - err = vn_lock(invp, LK_SHARED | LK_NOWAIT); - if (err == 0) - break; - VOP_UNLOCK(outvp); - err = vn_lock(invp, LK_SHARED); - if (err == 0) - VOP_UNLOCK(invp); - } - } while (err == 0); - if (err != 0) - return (err); + vn_lock_pair(invp, false, LK_SHARED, outvp, false, LK_EXCLUSIVE); + if (invp->v_data == NULL || outvp->v_data == NULL) { + err = EBADF; + goto unlock; + } err = fuse_filehandle_getrw(invp, FREAD, &infufh, incred, pid); if (err) From nobody Thu Nov 16 20:11:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWWQb1gjpz5133g; Thu, 16 Nov 2023 20:11: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 4SWWQb13fhz3fY9; Thu, 16 Nov 2023 20:11:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700165511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Di5ro+W+yvrzRMOf6D/RWxgZNcOgZ+Q6+M1L/Z91IGo=; b=lwCafAFkIrVaJCHXFCSbvBQal0uQP6Iiq0BPTBcre6b+PF1+qDtzycTPwCgYY0cu2ZWXu9 C+V+agNC0oHI8ghC2kafL2zGZ8BG+KzxIqsYL8EHO6Hs/+fV4dy7EIu6DVZZFzsbzdrc0z Gd05mn3mSlWyE+tvHzAQ5p61fdNOpc5SEUSe9yrHCFkUqVC8kkMCM6XJuXJF57ivh+Cv9X BSJ5YaYw5yrisum0dUKzaRiWHQVN9HKGUTFiTHdH2G2+vNGxHmdUzryWlPH4gDkbuZU+mp JA2imX5Ww90UovFYh6XpPteOlETXADbndsf724kM1hJKMriJPZhPUdIFm2fYWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700165511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Di5ro+W+yvrzRMOf6D/RWxgZNcOgZ+Q6+M1L/Z91IGo=; b=XxePuxcuBeJnQd1Ww2oK+7kye3FL3/vE4A8fJ7Jeevf1F9jhx6aX/ESMJO3uFvkDaX5EC+ 55skBzkow4SsSzZSdpUBw1TJ9kStj816LG16BMMo/rv8+JR5X9Zpm1KynmFUOIXSOUUXxa O7v/qhfzJBC8psD3FmupbUxHRNyoTzWfRqcfIjOT3fh7QzAX4m3EpefRSRmJIRJUjxcKPK dyxDVaAj2DQ+Mvw6/V7lbr4TmOk7ESQ/1BZNfZ+lEVyaYSAKswgcUOVDMvkVCpJIe+AagI rdM6qBm9jsB6QVJBd4dH8cesVBAS1RTovcD3D2KBOzbMxnH73Vv9suuoVzsPIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700165511; a=rsa-sha256; cv=none; b=NK6mraJNIB2/hU4x4cXIU+jKsZY1yWp3lpPzndFKrOoaPxucUcvrRUY0WwrMJmcb/t3qFc scmTRgGcJ1c942xJ2iLptsDVzUwL9Kq7t22c2BuJqRQNnebBQEGsixx1xLyqE6IDsZIUw9 qx6KMP3m6Rik+VMxo10tsrGNBBpGjpmttBD7Ajvn+9vVe6BvwjytZ8F8DuoRP+N8Z48pP8 3Q2g5qUqd2NmYTDSY1XWdOhZTqGWJeheLZwxT174++FrRwEV8eQod2NMw8zmlppUp6oehL ipHin1qudkZ6zDqNL57OIUS9Ga9c5hohVom8nNOkXgnz/wvpYFPBmDG9kiFAhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWWQb04z8z6P; Thu, 16 Nov 2023 20:11: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 3AGKBoHL082660; Thu, 16 Nov 2023 20:11:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGKBoJf082657; Thu, 16 Nov 2023 20:11:50 GMT (envelope-from git) Date: Thu, 16 Nov 2023 20:11:50 GMT Message-Id: <202311162011.3AGKBoJf082657@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: 4c6cded21661 - main - fuse_vnop_copy_file_range(): add safety List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4c6cded2166111079c6b5e8b2353171dcc7ed0c4 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4c6cded2166111079c6b5e8b2353171dcc7ed0c4 commit 4c6cded2166111079c6b5e8b2353171dcc7ed0c4 Author: Konstantin Belousov AuthorDate: 2023-11-14 22:49:35 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-16 20:10:31 +0000 fuse_vnop_copy_file_range(): add safety v_mount for unlocked vnode could be NULL, check for it. Explain why it is safe to access fs-specific data for mp if it is read as non-NULL. Reviewed by: asomers, jah Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42625 --- sys/fs/fuse/fuse_vnops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index aead188276ec..b9e4e48e6dbd 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -861,7 +861,7 @@ fuse_vnop_copy_file_range(struct vop_copy_file_range_args *ap) pid_t pid; int err; - if (mp != vnode_mount(outvp)) + if (mp == NULL || mp != vnode_mount(outvp)) goto fallback; if (incred->cr_uid != outcred->cr_uid) @@ -870,6 +870,7 @@ fuse_vnop_copy_file_range(struct vop_copy_file_range_args *ap) if (incred->cr_groups[0] != outcred->cr_groups[0]) goto fallback; + /* Caller busied mp, mnt_data can be safely accessed. */ if (fsess_not_impl(mp, FUSE_COPY_FILE_RANGE)) goto fallback; From nobody Thu Nov 16 20:54:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWXMz5cNRz5153J; Thu, 16 Nov 2023 20:54: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 4SWXMz55GZz4H31; Thu, 16 Nov 2023 20:54:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pMSoyfx5zBF7skCOWNoEostrjVxaep1GvEj3mHwIebw=; b=Nh2yVNYTRmBweUCJAyWDKWvESjHfzL+UqR6FbnRcUyBzyi/hi0in8N3uFELTg+Ng0oC0J0 AULugQiTomh0aElgTE+KJkIHG13sw5WSQOjBR6glPvD5Gznu9pxx3W2ImCpMCUFfGSxOVv NGV7Wt77glbnfQ1FkJFIr6744xQOBVpiKAnC1weckkYw7B7qW31pi2rAfnjWuVozt1SSqy lMpudNa6jQ+wlpxEJBut+jnHr88+Lum9GsgRMfQZpXO2RbeBs976eUEOPwN/dwHqjY7kye hWUMCMPeJk2RIqKTVmMjCt3r7nwFQWSF56PiowGTx5+SvqudNX0c2cx2j2T14Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pMSoyfx5zBF7skCOWNoEostrjVxaep1GvEj3mHwIebw=; b=eaXk1aC8bifhZejTkH2SAgtZ9LQ4hxwrx5+Wa9ozJBAeR4DyASJWjTUNEoo2hXatMP382/ sXm97QCHaiQO/9sgCHA9D8YHNI6VF1ra7z3L0OLq9/bvGmKp2ozdWTFxrvjSrPr1XdCmim cjNnOHg2Ig67SrhZ70uXR2qUHESIK3KFDENYr/+kO93ntWL0QcbEJixjVWqT3HDXhNaE7l nBixmir5mlo6HYmct2sWKSmgjFu63OA66B42NZtgW5F7XKG02BhizW9+ydYd1ce8vMqgVJ MYz/5RIGVsHGz5vMyCWMHW9GBedtqwgu+JkvLWxU7pvKHGGVmeWe3C9uuuLNDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700168079; a=rsa-sha256; cv=none; b=TEJYxI1n4fnUAPolwvnG61djl69Vv95oq8LtR3dqFmpEgiXD5gAiwEY9DJlvot7XwFWt5w ighkeujFsN8r3fE0T8Cl80JtIWwmmcQr/h9g8Wk5cTCccFXd9dPLt6cHlxL/9dnlgqPCIO s5DhOW5k5xkHymDneD/iBzDS/lg0oA1TwcTl8rxwHURgaoo27Bvp+7pOJs9dd5s51aRGpZ GlkoqFiJjdAZMx1t1j/aX6SGtX2jEVeNOppRR1JiTr1GEZUbqM/TjCft8ivgzzu9kP7Se+ D4imghp6PZOF4LZv63IbqYgVEo1Pavgw+ZQxgUMtJlGQLv4V0pPk8xAO9Tm+Uw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWXMz47q6zcV; Thu, 16 Nov 2023 20:54: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 3AGKsd0F053653; Thu, 16 Nov 2023 20:54:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGKsd9U053650; Thu, 16 Nov 2023 20:54:39 GMT (envelope-from git) Date: Thu, 16 Nov 2023 20:54:39 GMT Message-Id: <202311162054.3AGKsd9U053650@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: 4587326893d2 - stable/14 - uma: Hide 'uma_align_cache'; Create/rename accessors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4587326893d2c7720cd292946d96302a2653b77b Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4587326893d2c7720cd292946d96302a2653b77b commit 4587326893d2c7720cd292946d96302a2653b77b Author: Olivier Certner AuthorDate: 2023-10-13 09:52:28 +0000 Commit: Mark Johnston CommitDate: 2023-11-16 15:07:07 +0000 uma: Hide 'uma_align_cache'; Create/rename accessors Create the uma_get_cache_align_mask() accessor and put it in a separate private header so as to minimize namespace pollution in header/source files that need only this function and not the whole 'uma.h' header. Make sure the accessors have '_mask' as a suffix, so that callers are aware that the real alignment is the power of two that is the mask plus one. Rename the stem to something more explicit. Rename uma_set_cache_align_mask()'s single parameter to 'mask'. Hide 'uma_align_cache' to ensure that it cannot be set in any other way then by a call to uma_set_cache_align_mask(), which will perform sanity checks in a further commit. While here, rename it to 'uma_cache_align_mask'. This is also in preparation for some further changes, such as improving the sanity checks, eliminating internal resolving of UMA_ALIGN_CACHE and changing the type of the 'uma_cache_align_mask' variable. Reviewed by: markj, kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42258 (cherry picked from commit dc8f7692fd1de628814f4eaf4a233dccf4c92199) --- sys/arm/arm/cpufunc.c | 2 +- .../linuxkpi/common/include/linux/dma-mapping.h | 4 +-- sys/vm/uma.h | 6 ++-- sys/vm/uma_align_mask.h | 36 ++++++++++++++++++++++ sys/vm/uma_core.c | 18 ++++++++--- 5 files changed, 56 insertions(+), 10 deletions(-) diff --git a/sys/arm/arm/cpufunc.c b/sys/arm/arm/cpufunc.c index 32b3d2f869c9..f2845eb80f3b 100644 --- a/sys/arm/arm/cpufunc.c +++ b/sys/arm/arm/cpufunc.c @@ -254,7 +254,7 @@ set_cpufuncs(void) panic("No support for this CPU type (%08x) in kernel", cputype); return(ARCHITECTURE_NOT_PRESENT); out: - uma_set_align(arm_dcache_align_mask); + uma_set_cache_align_mask(arm_dcache_align_mask); return (0); } diff --git a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h index 330babf761f9..53c59bea8ef2 100644 --- a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h +++ b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h @@ -43,6 +43,7 @@ #include #include +#include #include #include @@ -350,8 +351,7 @@ dma_max_mapping_size(struct device *dev) #define dma_unmap_len(p, name) ((p)->name) #define dma_unmap_len_set(p, name, v) (((p)->name) = (v)) -extern int uma_align_cache; -#define dma_get_cache_alignment() uma_align_cache +#define dma_get_cache_alignment() uma_get_cache_align_mask() static inline int diff --git a/sys/vm/uma.h b/sys/vm/uma.h index 76f30efc94d1..793f9af3dace 100644 --- a/sys/vm/uma.h +++ b/sys/vm/uma.h @@ -470,12 +470,14 @@ void uma_zone_reclaim_domain(uma_zone_t, int req, int domain); * alignment. Should be called by MD boot code prior to starting VM/UMA. * * Arguments: - * align The alignment mask + * mask The alignment mask * * Returns: * Nothing */ -void uma_set_align(int align); +void uma_set_cache_align_mask(int mask); + +#include /* * Set a reserved number of items to hold for M_USE_RESERVE allocations. All diff --git a/sys/vm/uma_align_mask.h b/sys/vm/uma_align_mask.h new file mode 100644 index 000000000000..666633350b9d --- /dev/null +++ b/sys/vm/uma_align_mask.h @@ -0,0 +1,36 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Olivier Certner + * at Kumacom SAS 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 are + * met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _VM_UMA_ALIGN_MASK_H_ +#define _VM_UMA_ALIGN_MASK_H_ + +int uma_get_cache_align_mask(void) __pure; + +#endif /* !_VM_UMA_ALIGN_MASK_H_ */ diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index de0ab48b0f9b..6e83a27bab27 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -150,7 +150,7 @@ static uma_zone_t slabzones[2]; static uma_zone_t hashzone; /* The boot-time adjusted value for cache line alignment. */ -int uma_align_cache = 64 - 1; +static int uma_cache_align_mask = 64 - 1; static MALLOC_DEFINE(M_UMAHASH, "UMAHash", "UMA Hash Buckets"); static MALLOC_DEFINE(M_UMA, "UMA", "UMA Misc"); @@ -3243,7 +3243,7 @@ uma_kcreate(uma_zone_t zone, size_t size, uma_init uminit, uma_fini fini, args.size = size; args.uminit = uminit; args.fini = fini; - args.align = (align == UMA_ALIGN_CACHE) ? uma_align_cache : align; + args.align = (align == UMA_ALIGN_CACHE) ? uma_cache_align_mask : align; args.flags = flags; args.zone = zone; return (zone_alloc_item(kegs, &args, UMA_ANYDOMAIN, M_WAITOK)); @@ -3252,11 +3252,19 @@ uma_kcreate(uma_zone_t zone, size_t size, uma_init uminit, uma_fini fini, /* Public functions */ /* See uma.h */ void -uma_set_align(int align) +uma_set_cache_align_mask(int mask) { - if (align != UMA_ALIGN_CACHE) - uma_align_cache = align; + if (mask >= 0) + /* UMA_ALIGN_CACHE is also not permitted here. */ + uma_cache_align_mask = mask; +} + +/* Returns the alignment mask to use to request cache alignment. */ +int +uma_get_cache_align_mask(void) +{ + return (uma_cache_align_mask); } /* See uma.h */ From nobody Thu Nov 16 20:54:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWXN109mNz5155Q; Thu, 16 Nov 2023 20:54: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 4SWXN064Cgz4Ghs; Thu, 16 Nov 2023 20:54:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6fZRV5PDWZD4jNvCtMuvu+b2E6mo+CnkckhxktXNeEQ=; b=cWrWqonstbZMpNmLv4CxFuTSucxQAlSXsgVT7q+5OnEzgEBLhLG0nEvbcEan0egGIMoFhL P9UBO3tX8geypBC6erzHayJgs9KxlRn2bvjCY6urCYJTzfHITm3BZPETv8VXV2TKt4qsrY oluYK9C5/yBbOZFkNLE1uDgWDhxXehQ5h0E4w681lV4RkzyVQfpJw7iwng4Gqe5FQjR2h0 AZInzuf8LETTLif1rB5kfuGOYwr7dSRy2RryYPq9n9AF/xUrFUjrzdYIv7RHIrLXa+zFty v5g1sPqTNwRUHIe5W9QW3N+UrE0d/JN1lxRfHavnntQm3GhL9vE9ezG+juHXdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6fZRV5PDWZD4jNvCtMuvu+b2E6mo+CnkckhxktXNeEQ=; b=AaB54JVDfrNUUGnCngkCcjPytSwz3tp95flNB1kEkGazb401Y8Jx4mSukvIN2pw35ntl2F Fky6RwVlzzGI5fSHPh251nFGnopcq9VnxIUBC9V2S7ByeQG/saaZt6xgVdIuiIGJyQAvpP eSYh1ExYJz5NrYqJg2XrUa8jo14fq/rolqaQ5WDGjiDLnnEqddniMNDH7OG0fA9EOCHwTY iwW/KhN9xDw+KEjJnfAKX++7ZLSd03tBT9B8oBgfF136m86B+5ekoGYu17TDfJyomuCjjo n/5XDELNhNclcKMmGuszDjsROb3MXf8LJZHHs0+cnMrq47gozIGZaip10NEMAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700168080; a=rsa-sha256; cv=none; b=TGzOuM0Mn1w+46C9wTgF6/TNjoCQ8qjHpz6xEQcAPpyI9sf8YK4q/Frvq9AF8q7QwDekv9 Mwabr1H4nK4o+le1mB6u7Mr+yWJFy9y/DilmSEqE62yYBAji+jiawvHBtt6sNjBr2aog+x 5rZ7/GGfjPZ1qxwG4wrXt3H2XQ1caFanV0miqgGUtWxpHgy+AEoUgmB5uZerKgRNi2/PfX +lJ4PBVw+NJJk5HiJB4l10jHzllmEuGnCWpkgFa8UwfIymPZZFbppzmz8jRFn0BtbN06Bv 2/UlNYPKH535Izka8iQk0fgT/6cS36ndRIODnGnIM3ydZes2DrjhguCTAkSuvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWXN059fyz1NK; Thu, 16 Nov 2023 20:54: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 3AGKseBe053711; Thu, 16 Nov 2023 20:54:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGKseNQ053708; Thu, 16 Nov 2023 20:54:40 GMT (envelope-from git) Date: Thu, 16 Nov 2023 20:54:40 GMT Message-Id: <202311162054.3AGKseNQ053708@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: c98dded0c762 - stable/14 - uma: UMA_ALIGN_CACHE: Resolve the proper value at use point List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: c98dded0c76266740e94ac53e8a2f02be1d61e4f Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c98dded0c76266740e94ac53e8a2f02be1d61e4f commit c98dded0c76266740e94ac53e8a2f02be1d61e4f Author: Olivier Certner AuthorDate: 2023-10-13 12:13:30 +0000 Commit: Mark Johnston CommitDate: 2023-11-16 15:07:11 +0000 uma: UMA_ALIGN_CACHE: Resolve the proper value at use point Having a special value of -1 that is resolved internally to 'uma_align_cache' provides no significant advantages and prevents changing that variable to an unsigned type, which is natural for an alignment mask. So suppress it and replace its use with a call to uma_get_align_mask(). The small overhead of the added function call is irrelevant since UMA_ALIGN_CACHE is only used when creating new zones, which is not performance critical. Reviewed by: markj, kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42259 (cherry picked from commit e557eafe7233f8231c1f5f5b098e4bab8e818645) --- sys/vm/uma.h | 2 +- sys/vm/uma_core.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/vm/uma.h b/sys/vm/uma.h index 793f9af3dace..4bf23534ed27 100644 --- a/sys/vm/uma.h +++ b/sys/vm/uma.h @@ -301,7 +301,7 @@ uma_zone_t uma_zcache_create(const char *name, int size, uma_ctor ctor, #define UMA_ALIGN_INT (sizeof(int) - 1) /* "" int */ #define UMA_ALIGN_SHORT (sizeof(short) - 1) /* "" short */ #define UMA_ALIGN_CHAR (sizeof(char) - 1) /* "" char */ -#define UMA_ALIGN_CACHE (0 - 1) /* Cache line size align */ +#define UMA_ALIGN_CACHE (uma_get_cache_align_mask()) /* Cache line size align */ #define UMA_ALIGNOF(type) (_Alignof(type) - 1) /* Alignment fit for 'type' */ #define UMA_ANYDOMAIN -1 /* Special value for domain search. */ diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 6e83a27bab27..b74fbd57e77f 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -3243,7 +3243,7 @@ uma_kcreate(uma_zone_t zone, size_t size, uma_init uminit, uma_fini fini, args.size = size; args.uminit = uminit; args.fini = fini; - args.align = (align == UMA_ALIGN_CACHE) ? uma_cache_align_mask : align; + args.align = align; args.flags = flags; args.zone = zone; return (zone_alloc_item(kegs, &args, UMA_ANYDOMAIN, M_WAITOK)); @@ -3256,7 +3256,6 @@ uma_set_cache_align_mask(int mask) { if (mask >= 0) - /* UMA_ALIGN_CACHE is also not permitted here. */ uma_cache_align_mask = mask; } From nobody Thu Nov 16 20:54:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWXN20QvMz5155S; Thu, 16 Nov 2023 20:54: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 4SWXN174cLz4GrD; Thu, 16 Nov 2023 20:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y/L2vCGMLpYVq493T9/gFbMjIh7lgF2HZbtCjz1k8AI=; b=TnwHURTkFe4wWpf4/CzCph4kzKtftbN9SaL2czaYwC9T7cgfkF/j0lEIz6OAUtJVeG6JO7 nXrVI6fNUIBGEA+7t0XUx67pmwug5BRK6Kg3EN7IKdoi6vKDzpGFjyCjP2/67d56GaEBAR j3KzkgGLcYZA0wf4v4uRgbWLj57W9UuNBFmvJPsyQMP8S8iODghdk5qIi//0pAf47p/50u 9TL0XmDWm793nZzLxAlx8A3SwahRT84O9r0cuFIym/GHaCU/MHmZKrVp5bO22TUXSdHlvQ uhpuDX5uYDVqT8f/dBOdHAZ8utbOrDlnTCxB9Kd8aql/GB0qhNpe/Dqw3zEPHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y/L2vCGMLpYVq493T9/gFbMjIh7lgF2HZbtCjz1k8AI=; b=L04nFWsIAf2OwyidcI5IWP4VPGtWf6cVbdEmbrnmHpGhMBJSILzoGUvwCKp0RgX5OKietF PMpNaC00YYBl26PbpREoL1M2wmdLZdsduZMJ3tUj5Q6tnt3/wR91aq+TX11ft7L7oxQRd2 S+DhYEHlKRcAXqQ8iiYMaXneCT8wy2hHA61a2EhBTKtldb5TXH4jA1obDgN+gXEttIGu5h Mco7aM+5ZVbW4NKeoBCKm0VO/H0dgfRvgsRWnOquuNW8C+d1wI40zfEubwJZfJK/a+djKm u7jFshDplOxiDxSEJ5Tu0j+9o8UNsCU2C8Fly1GpdlI0v7tMPiQfJ4OEpwHNFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700168082; a=rsa-sha256; cv=none; b=FBs+/g4sZoDGkb2TPlxua2iFoHmzLqZtKhulHoNVTH1v7z8rDMZLxzfI4+WmLpuogvqnvh V/YSM8vX/2tAQfElFCa0lGACXFTrjESSfOq0XLcZh5KmxGk5VKpNHq5xl84JwFactl9Pdp KeJzK3MAT/3+jO5FMnJYdvW8a5n01cw5kOSDJl6QjjXI+xarL8ZwR5BCQV8PnLqaXW/pjB NQ1JGuif6NwTl6LZjvk8QLhKaeuWzm+4Ckn+CpQG6bHtLQpH00y9sSn/qEqoTdibQ9Ew52 VyfT3xTgIRtEpfsmTtZDI0KP7Nu3L4Mjh4bxiZ/GEgWGHLJLdvqMv91iakJjeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWXN1696Zz1KX; Thu, 16 Nov 2023 20:54: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 3AGKsfLh053753; Thu, 16 Nov 2023 20:54:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGKsfEr053750; Thu, 16 Nov 2023 20:54:41 GMT (envelope-from git) Date: Thu, 16 Nov 2023 20:54:41 GMT Message-Id: <202311162054.3AGKsfEr053750@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: 0c7a1e66f137 - stable/14 - arm: Simplify get_cachetype_cp15() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0c7a1e66f1376bf8ffb507a674396e4d221fe797 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0c7a1e66f1376bf8ffb507a674396e4d221fe797 commit 0c7a1e66f1376bf8ffb507a674396e4d221fe797 Author: Olivier Certner AuthorDate: 2023-10-13 12:22:14 +0000 Commit: Mark Johnston CommitDate: 2023-11-16 15:07:13 +0000 arm: Simplify get_cachetype_cp15() There's no point in setting 'arm_dcache_align_mask' before the function's end. Reviewed by: markj, kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42261 (cherry picked from commit 1bce6f951a902f03bfb354f5b11473a0d12b3d7d) --- sys/arm/arm/cpufunc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/arm/arm/cpufunc.c b/sys/arm/arm/cpufunc.c index f2845eb80f3b..42f718b9773e 100644 --- a/sys/arm/arm/cpufunc.c +++ b/sys/arm/arm/cpufunc.c @@ -172,7 +172,6 @@ get_cachetype_cp15(void) : "=r" (csize)); arm_dcache_align = 1 << (CPUV7_CT_xSIZE_LEN(csize) + 4); - arm_dcache_align_mask = arm_dcache_align - 1; } if (type == CACHE_ICACHE || type == CACHE_SEP_CACHE) { sel = (i << 1) | 1; @@ -195,10 +194,10 @@ get_cachetype_cp15(void) if (dsize & CPU_CT_xSIZE_M) arm_dcache_align = 0; /* not present */ } - - out: - arm_dcache_align_mask = arm_dcache_align - 1; } + +out: + arm_dcache_align_mask = arm_dcache_align - 1; } /* From nobody Thu Nov 16 20:54:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWXN31Yfvz515DF; Thu, 16 Nov 2023 20:54: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 4SWXN313M6z4Grr; Thu, 16 Nov 2023 20:54:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vAoMqvuRn33xpmVXhiDqHDXQrSJlG3CltfFnjDb0awE=; b=S0bDXqqRA3OK5oWFFz9r3hN7IF6wZ+DtHA9USKvhIF+KovnZQSNVYsrbQ9FbAJXabFOudd HU133W8Ihm4T/b82i4klx4SnVq0kTBSRgFJTVojhgE2s0YZlmYz2m5STow6iZGBVKjuLFw rX2d5hcHNCsXXSucHu8+Lu1c2se06l6xXwTluDpIbFR4UsfCY4ybO186Ds30mHiqpMyeRY rYQh0yPlTGIna3rUeXeWI6RjbqQox2MkrG6H3jcCAjGX+bUyH18Q27Y6X9cVuZMzBAo/lz FJbkajWrumYLettdKmeIMYru3TgQlQtM/j1Y+JUXoZfKcgwuvi6MxXn+aWLmDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vAoMqvuRn33xpmVXhiDqHDXQrSJlG3CltfFnjDb0awE=; b=ZeB2Qc9/PCv4jedk6kzlIvEXob7OP/wm7vu+7xyQsfbHfFl2wVYQOPPWuzQAKQKyO0UlWQ taUJ6JAcxIEyTZ/J3V4z2bAzBlE5U3s2X4xhICpnSsxdCC/jQyibNwRsQpj9kaSy5lYYG5 WnqXSufjfNzAYw8uiaPNCzaIY5jcQ4VEaaThgCnWdGrALhkBtwG3IFH3kxoV7ZMGCHYTWQ gKTpamltCYxUJANQrvbv0F6KaCwMdDE7qbYeJy9KocXfIVGSYWmDGGEywol5sfCKgzc7jj 3CZaXmOQEbgeWQ49pDRUz8aAk8Jsc0h/2rD42jJW6ylxMQX7P/EMKhmZvGEJ/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700168083; a=rsa-sha256; cv=none; b=KvzAk/cfPbMdcFapVsXvMsBKV/xobYKL+RKZdjuUeaCptu9Zq6gy3LaZcGP2AG38SqL/Xi miYagvqjIBNXoJrImYIyCW76HkWq61WoPH4PDyuv1+Ip9ubkTlY4ns4l/ZmhnD/dlE/Yjf uuN65L0o+Qmr0DooOFHYAu7LdhNjKChgUA8tXmsVqc+k1PpOk7J0ac/GRNA+VS8baoLK+Y lJzs23hIMuTpCUbDN8NxWoDpqaglpSTt1ViKHR2AbV1ZJOUw8kJ/XtpwDccces/uyj008j ELKYWzq5zpg8GchZrtVvcvMmcRCJ66aj32U/6Zv5AGUG9GGoRBvREUUvaHF8ZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWXN30690z1NL; Thu, 16 Nov 2023 20:54: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 3AGKsgBw053801; Thu, 16 Nov 2023 20:54:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGKsgcT053798; Thu, 16 Nov 2023 20:54:42 GMT (envelope-from git) Date: Thu, 16 Nov 2023 20:54:42 GMT Message-Id: <202311162054.3AGKsgcT053798@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: 690ca45aeb8c - stable/14 - uma: Make the cache alignment mask unsigned List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 690ca45aeb8c3f521d43246159bd24e15d31500c Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=690ca45aeb8c3f521d43246159bd24e15d31500c commit 690ca45aeb8c3f521d43246159bd24e15d31500c Author: Olivier Certner AuthorDate: 2023-10-13 12:49:11 +0000 Commit: Mark Johnston CommitDate: 2023-11-16 15:07:16 +0000 uma: Make the cache alignment mask unsigned In uma_set_align_mask(), ensure that the passed value doesn't have its highest bit set, which would lead to problems since keg/zone alignment is internally stored as signed integers. Such big values do not make sense anyway and indicate some programming error. A future commit will introduce checks for this case and other ones. Reviewed by: kib, markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42262 (cherry picked from commit 3d8f548b9e5772ff6890bdc01f7ba7b76203857d) --- sys/arm/arm/cpufunc.c | 6 +++--- sys/vm/uma.h | 2 +- sys/vm/uma_align_mask.h | 2 +- sys/vm/uma_core.c | 15 ++++++++++----- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/sys/arm/arm/cpufunc.c b/sys/arm/arm/cpufunc.c index 42f718b9773e..e94565cdc61f 100644 --- a/sys/arm/arm/cpufunc.c +++ b/sys/arm/arm/cpufunc.c @@ -61,8 +61,8 @@ /* PRIMARY CACHE VARIABLES */ -int arm_dcache_align; -int arm_dcache_align_mask; +unsigned int arm_dcache_align; +unsigned int arm_dcache_align_mask; #ifdef CPU_MV_PJ4B static void pj4bv7_setup(void); @@ -170,7 +170,7 @@ get_cachetype_cp15(void) : : "r" (sel)); __asm __volatile("mrc p15, 1, %0, c0, c0, 0" : "=r" (csize)); - arm_dcache_align = 1 << + arm_dcache_align = 1U << (CPUV7_CT_xSIZE_LEN(csize) + 4); } if (type == CACHE_ICACHE || type == CACHE_SEP_CACHE) { diff --git a/sys/vm/uma.h b/sys/vm/uma.h index 4bf23534ed27..8193df16b904 100644 --- a/sys/vm/uma.h +++ b/sys/vm/uma.h @@ -475,7 +475,7 @@ void uma_zone_reclaim_domain(uma_zone_t, int req, int domain); * Returns: * Nothing */ -void uma_set_cache_align_mask(int mask); +void uma_set_cache_align_mask(unsigned int mask); #include diff --git a/sys/vm/uma_align_mask.h b/sys/vm/uma_align_mask.h index 666633350b9d..b4e9ac835d93 100644 --- a/sys/vm/uma_align_mask.h +++ b/sys/vm/uma_align_mask.h @@ -31,6 +31,6 @@ #ifndef _VM_UMA_ALIGN_MASK_H_ #define _VM_UMA_ALIGN_MASK_H_ -int uma_get_cache_align_mask(void) __pure; +unsigned int uma_get_cache_align_mask(void) __pure; #endif /* !_VM_UMA_ALIGN_MASK_H_ */ diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index b74fbd57e77f..a27dba4b01f1 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -150,7 +150,7 @@ static uma_zone_t slabzones[2]; static uma_zone_t hashzone; /* The boot-time adjusted value for cache line alignment. */ -static int uma_cache_align_mask = 64 - 1; +static unsigned int uma_cache_align_mask = 64 - 1; static MALLOC_DEFINE(M_UMAHASH, "UMAHash", "UMA Hash Buckets"); static MALLOC_DEFINE(M_UMA, "UMA", "UMA Misc"); @@ -3252,15 +3252,20 @@ uma_kcreate(uma_zone_t zone, size_t size, uma_init uminit, uma_fini fini, /* Public functions */ /* See uma.h */ void -uma_set_cache_align_mask(int mask) +uma_set_cache_align_mask(unsigned int mask) { - if (mask >= 0) - uma_cache_align_mask = mask; + /* + * Make sure the stored align mask doesn't have its highest bit set, + * which would cause implementation-defined behavior when passing it as + * the 'align' argument of uma_zcreate(). Such very large alignments do + * not make sense anyway. + */ + uma_cache_align_mask = mask & ~(1U << 31); } /* Returns the alignment mask to use to request cache alignment. */ -int +unsigned int uma_get_cache_align_mask(void) { return (uma_cache_align_mask); From nobody Thu Nov 16 20:54:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWXN42J9Tz5155Z; Thu, 16 Nov 2023 20:54: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 4SWXN41nPLz4H9y; Thu, 16 Nov 2023 20:54:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tG1pH6KoOXoWkdR953iLeq07q80BbUKEx7bUc11pHls=; b=BnZEcfwf/iL+TvrLdhhmVPCJ3SvpPryfxRgk58gGW1v8wdopxi1gZwGAACHs3Vcz5zIy3s bOiROSm0Tugi4sh1F3/yxNRV8/wPqAtqINgdqZGNwxQwd2SJ2WRI2R05eaAyLruDIl8eoS 0NxGgT9ppOIVVgxZ5adFedlL0PCsQQNmtXCFmpKvNo+x6lWk7q3dmI0V9HellyCj878mlv +4rgF+KcH5RdpR/AhDT8VCXx21zu/Kin9ad6Igh7pDigpGL9uPZdlx5D0gI6PGq1fEGrav W2qvDQMdozyHIR/tl1kTG2mTRcodbcGCLI66fMCEGNltgl/ZmnQ3KnxsdfVqtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tG1pH6KoOXoWkdR953iLeq07q80BbUKEx7bUc11pHls=; b=NNRRY1NLhk/3wmoL6jsUnZSrCdWX0awaniTvZSiRBLo/vitNrVhFcQHJgbPYo1of0WAPMi ckrbRXM4jUH1tExL+UCWhNb9et2xSIGahYl+OWxUB1ayO6TV3V+U/zJXFU+S8jGzp9dBAT vfNP3hUG9rJjJIkNyMI/qEFeVettcWiDZt6ioZpUaGzhrc26RDyba3K2fLOgap5ng7VP3z +4nKgfaqeALtlHq16Va5te800qfAUcKTI5Hk2+06JFC3M3K5XOjUzX0X4WM0whbj/71pks KLnl+J+spCEMxDpSqh6aFENKPwDLHi317iDH9h7etqCouAXVHYGUKX14eRZUaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700168084; a=rsa-sha256; cv=none; b=GShrYENYPqzbTJGMT1cu+cV7bSdbOLJzNr4aySTIrt1qnxdVqIT0+BDcRAnn5gyuFjcrTc u3SZXfaoS6OJ0dttdoo31HkBfTvwcZEykVLkUWvNyKKIMcZXYQSsw+GjeCPfz+0as2FFeb nNkRhD6QGbHzIWxvmsUPwBNPBUcRRMRISSj6LSBpPBLmUF40+ZdkRlohVQsZ38hi5fiIui 2xNtku8sIfK3sWfFTbwInPMAysM11nRpVMoulvV18I0n0S9av8awJ3Gj7oMqCM7XaW1aaT MgHdlXvu+bd/55Zp4pyKmsNeWKx7pk9lTXW61gpngak0eWeO2Rd56HlzufKLbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWXN40tpVz1Wr; Thu, 16 Nov 2023 20:54: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 3AGKsijv053846; Thu, 16 Nov 2023 20:54:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGKsijf053843; Thu, 16 Nov 2023 20:54:44 GMT (envelope-from git) Date: Thu, 16 Nov 2023 20:54:44 GMT Message-Id: <202311162054.3AGKsijf053843@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: 7deedba4e586 - stable/14 - uma: New check_align_mask(): Validate alignments (INVARIANTS) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7deedba4e58686ad870767bb29c45235c255937a Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7deedba4e58686ad870767bb29c45235c255937a commit 7deedba4e58686ad870767bb29c45235c255937a Author: Olivier Certner AuthorDate: 2023-10-13 14:09:51 +0000 Commit: Mark Johnston CommitDate: 2023-11-16 15:07:17 +0000 uma: New check_align_mask(): Validate alignments (INVARIANTS) New function check_align_mask() asserts (under INVARIANTS) that the mask fits in a (signed) integer (see the comment) and that the corresponding alignment is a power of two. Use check_align_mask() in uma_set_align_mask() and also in uma_zcreate() to replace the KASSERT() there (that was checking only for a power of 2). Reviewed by: kib, markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42263 (cherry picked from commit 87090f5e5a7b927a2ab30878435f6dcba0705a1d) --- sys/vm/uma_core.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index a27dba4b01f1..661c98b272da 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -3249,19 +3249,31 @@ uma_kcreate(uma_zone_t zone, size_t size, uma_init uminit, uma_fini fini, return (zone_alloc_item(kegs, &args, UMA_ANYDOMAIN, M_WAITOK)); } -/* Public functions */ -/* See uma.h */ -void -uma_set_cache_align_mask(unsigned int mask) + +static void +check_align_mask(unsigned int mask) { + KASSERT(powerof2(mask + 1), + ("UMA: %s: Not the mask of a power of 2 (%#x)", __func__, mask)); /* * Make sure the stored align mask doesn't have its highest bit set, * which would cause implementation-defined behavior when passing it as * the 'align' argument of uma_zcreate(). Such very large alignments do * not make sense anyway. */ - uma_cache_align_mask = mask & ~(1U << 31); + KASSERT(mask <= INT_MAX, + ("UMA: %s: Mask too big (%#x)", __func__, mask)); +} + +/* Public functions */ +/* See uma.h */ +void +uma_set_cache_align_mask(unsigned int mask) +{ + + check_align_mask(mask); + uma_cache_align_mask = mask; } /* Returns the alignment mask to use to request cache alignment. */ @@ -3280,8 +3292,7 @@ uma_zcreate(const char *name, size_t size, uma_ctor ctor, uma_dtor dtor, struct uma_zctor_args args; uma_zone_t res; - KASSERT(powerof2(align + 1), ("invalid zone alignment %d for \"%s\"", - align, name)); + check_align_mask(align); /* This stuff is essential for the zone ctor */ memset(&args, 0, sizeof(args)); From nobody Thu Nov 16 20:54:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWXN53zNKz5150H; Thu, 16 Nov 2023 20:54: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 4SWXN52QG6z4HQb; Thu, 16 Nov 2023 20:54:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8lo4k/wMrU+eCWPI8nBj1FBu+ujLp4ooHoCvry28Kv4=; b=L69/LbaFUc6V7kvKGxnBE1bQcCva3kEHtApZFy5fCdMV6l6rkQeJQn6LPeFEeVd2gI1j+P otWxg8q+mhl1IC0Msl32puxYorFCC+TF3SIWOPTVZdvRIfdfF6AjwFtMbG1BryNhmdoNs5 8SpbJgdPiLt8gBVWa5xyzSluLpD2rOXGLkHdy2LtXWIBMvoSPaCUIxs4S86fTPqbMEwR8x f+oJmd6wUzOhDVvgIaMVfcUagnxibsjSct+VKcORmzUqCOrDC7Vl7gtcfjyj2izM7EcxTj +ojCzgaH7qVWS8jJm5Nsolqm11YIDkn7A1LsbsVGzxcIr2r+RrmCDX+tsSSRXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8lo4k/wMrU+eCWPI8nBj1FBu+ujLp4ooHoCvry28Kv4=; b=H2N0nRmB779z8RiGgG+d7Az6ldag6hh2IOMhf2P3HBrIW0BxIL8YRkyyh3JBkQmq59n4VQ p8xCq26ulcJ/n8MHo9vXbzVwq25CNrWM/GaAeQGRvBBmByHFw8dEPEeUsibkAD1ZtSgd57 s+CRfFJ+9CHpUUGbVYeCIahnOLhlErKsWK+WiUyzNnmRn28hQqfHeUwlmVelG+FmEUdoA+ SfXxmCFFPRZqoZOOUPtxV92jEQqaohfCxzk0Q7yYEaoWfcR+cmaOnVnWmbFuauFd4b1OlW 1Nu828FxOZ6dAa6HoAS0JS0+PN4A9oAajA20wbcfA81Tvdu2cQRvStFr1SGRjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700168085; a=rsa-sha256; cv=none; b=r41LXaWxDakGoEmxtUmFho/i756jARLGKVCEdlgkjkM9agEKGrAknpkkkSlW+PuPLOOm47 o/vmvXesY6m09ExVLH3o9lF/7ZkFKjmNjo22Vek7KjvsMG4z8+et//UI38tnYgo2Duo+Ff 2fyZGw1CtIyCFoG0UZI5ILeIWGuNHlznNtY8kL8uvpjsx6ZIekxCY5+UVIYf8RiW3FLfwG pe0yUsSTgHZrHKRD9xZ5F4mTFxO3oPVfn/roG3FK1T7CPScPE54bWr1bgdNuoya9SIvBId fs06P372ECFTlkwishd4oP93t9024TwSf0+RMRTerAJrad0AJEKugp420N+QGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWXN51XP1z1Ws; Thu, 16 Nov 2023 20:54: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 3AGKsjqg053892; Thu, 16 Nov 2023 20:54:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGKsjOB053889; Thu, 16 Nov 2023 20:54:45 GMT (envelope-from git) Date: Thu, 16 Nov 2023 20:54:45 GMT Message-Id: <202311162054.3AGKsjOB053889@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: f946a5ec9692 - stable/14 - linuxkpi: dma_get_cache_alignment(): Fix off-by-one result List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f946a5ec9692973831db93691ad06a93240d5937 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f946a5ec9692973831db93691ad06a93240d5937 commit f946a5ec9692973831db93691ad06a93240d5937 Author: Olivier Certner AuthorDate: 2023-10-13 15:13:28 +0000 Commit: Mark Johnston CommitDate: 2023-11-16 15:07:18 +0000 linuxkpi: dma_get_cache_alignment(): Fix off-by-one result Substituting 'uma_align_cache' by the appropriately named accessor uma_get_cache_align_mask() made apparent that dma_get_cache_alignment() was off by one, since it was defined to be the mask derived from the alignment value. Reviewed by: markj, bz MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42264 (cherry picked from commit 2c7dd66d09a1b92a4698232996cded6e5315b3bd) --- sys/compat/linuxkpi/common/include/linux/dma-mapping.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h index 53c59bea8ef2..84f0361de765 100644 --- a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h +++ b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h @@ -351,7 +351,7 @@ dma_max_mapping_size(struct device *dev) #define dma_unmap_len(p, name) ((p)->name) #define dma_unmap_len_set(p, name, v) (((p)->name) = (v)) -#define dma_get_cache_alignment() uma_get_cache_align_mask() +#define dma_get_cache_alignment() (uma_get_cache_align_mask() + 1) static inline int From nobody Thu Nov 16 20:54:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWXN65FSxz5150K; Thu, 16 Nov 2023 20:54: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 4SWXN63qXHz4HL6; Thu, 16 Nov 2023 20:54:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m+iwurGJpcsMmfftVYr3JD/P7JSe7fj00cJ+l6agr54=; b=jZzh+cdTx+C0X9TTQ33js35NTMWGuv02nXsdP9NVq67gmtwWxNEL1no01savojVx9Rm36D TFGBbytptxC8kADn0uTfwst5HuEZhmNpspGtTvDnQVkQ+vKsZpDaF3XUeDpR6x3/hdpckf LKn0xK2/4JKTLEfUkGk3fG7XmoZO76DFMR92JdwCpK0BtUXq7hlcwUs2ZpZuAj8+siWzrc mCsOV4R3PySg8j03ap+5tnqX5mHzuZTM0FybeIslV22qHguEFEj1CAu4lDnsSLzyVWw9NR xXN84UE4TAfXmBup5ITuayiRCZsr/flsqhWDLmnjuIL7O/5OcWUjdkd0OUJwxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m+iwurGJpcsMmfftVYr3JD/P7JSe7fj00cJ+l6agr54=; b=PwkFTM8/pdauIqf6FI6c/1GEIc9EtZKxniaKl/8xDT6hGtJE29SUITU8PXUz8IFIqBXPXL /t6tOwmMZgVOycq2zq7K230+uiTpjt7F/3js6ZdUN7sZcuguXC1FfIZI0HfDn1XvAOzS5E lBdzSu6jWB9bhYT1jDbYuanBnOSwTPWv85hJc8SRUEMaWXiHHuuo2S/JFokv79XoXsQgs+ mU6s2BYbbPky2Khpg5oNEF5g/6b3NZi9zU0LtNum3Rabmj4rxJeODpsAGT3O0oF30qSL4M B0wYlMm7L6dBXXJ3CgNN9mw1sOfEJel1myet+NGoZb+GlDzGI0jTX+XPqiSLFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700168086; a=rsa-sha256; cv=none; b=MuVE3rghP8OSgPouVu9wgm5zGI2Gr0EwD7OXmOMz4ChraSDjQvOOjRtrXgCyHkH/stwdNd OHLZ+so68eFTsq1rSgBL4PaNzG10JFYNzvgtwMAaHCCd477JB0GBe9IomZWuztlX/ajOI0 9o/1tzIosnttSkUDgFQnFh9UrQJhBrlTxGACcg2vd9HzYvkuDmeQF5ymKJoC+qXt76bGM9 G00yM69U/U89g3yUFi8mog0yOUlaP6kYL28nfxMKOTzgBCTW4EECei/VnNBvKRuNAbfzod RsBG7P8tv4UYEUSf7I8BFn2y1Bws7Dp5YUouebzJ50BGV2Aplr2VwelEaxh/yQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWXN62jCqz1Wt; Thu, 16 Nov 2023 20:54:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AGKskKO053952; Thu, 16 Nov 2023 20:54:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGKsk8I053949; Thu, 16 Nov 2023 20:54:46 GMT (envelope-from git) Date: Thu, 16 Nov 2023 20:54:46 GMT Message-Id: <202311162054.3AGKsk8I053949@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: 25e0e25afd29 - stable/14 - uma: Permit specifying max of cache line and some custom alignment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 25e0e25afd29d029da6ec21e6b7890310ffc25bd Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=25e0e25afd29d029da6ec21e6b7890310ffc25bd commit 25e0e25afd29d029da6ec21e6b7890310ffc25bd Author: Olivier Certner AuthorDate: 2023-10-13 15:05:34 +0000 Commit: Mark Johnston CommitDate: 2023-11-16 15:07:18 +0000 uma: Permit specifying max of cache line and some custom alignment To be used for structures for which we want to enforce that pointers to them have some number of lower bits always set to 0, while still ensuring we benefit from cache line alignment to avoid false sharing between structures and fields within the structures (provided they are properly ordered). First candidate consumer that comes to mind is 'struct thread', see next commit. Reviewed by: markj, kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42265 (cherry picked from commit 733e0abd2897289e2acf70f7c72e31a5a560394a) --- sys/vm/uma.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/vm/uma.h b/sys/vm/uma.h index 8193df16b904..38865df7ae02 100644 --- a/sys/vm/uma.h +++ b/sys/vm/uma.h @@ -302,6 +302,8 @@ uma_zone_t uma_zcache_create(const char *name, int size, uma_ctor ctor, #define UMA_ALIGN_SHORT (sizeof(short) - 1) /* "" short */ #define UMA_ALIGN_CHAR (sizeof(char) - 1) /* "" char */ #define UMA_ALIGN_CACHE (uma_get_cache_align_mask()) /* Cache line size align */ +/* Align both to cache line size and an explicit alignment (through mask). */ +#define UMA_ALIGN_CACHE_AND_MASK(mask) (uma_get_cache_align_mask() | (mask)) #define UMA_ALIGNOF(type) (_Alignof(type) - 1) /* Alignment fit for 'type' */ #define UMA_ANYDOMAIN -1 /* Special value for domain search. */ From nobody Thu Nov 16 20:54:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWXN75X0Gz515DJ; Thu, 16 Nov 2023 20:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SWXN74tw7z4HFY; Thu, 16 Nov 2023 20:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bnT9SfnZ6kPP3YtrajdKGaR6ejoyCffTqgOCCCGsTDk=; b=A1VXHhukwgbRQrAuV+DO3d5OxC1zkyBg2PcVtl/V0wBqGYnRPSrxBsftQsVnedVHPqeLD2 rOdCFf3mM4wQSL8HJgv0JKHXIr+UUFvT2Ow8Pyg7PL6J4znzl3x5duhYRlA69rEEPMWdvG DzKn42xo5qd8AdZJnZ0TTzCI3LCVLGwdmLceytK5r+WQAqHB8wSd7PIfObnpo3XMY6+Cse KViI5Z66N32OqvUsYufZ+Dakk5ZVxILlMCo0K5A2pEw1H91UGj3ezzcOYACcGke6bEg9Jv haheuUOgq7XowtPZBUZxBfz6Axd/E1ZrXFW+lpKEu33Cm0LIvY5GfzpMpkr/tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bnT9SfnZ6kPP3YtrajdKGaR6ejoyCffTqgOCCCGsTDk=; b=b9gSEJu7cDkuPXitjE2n4whSlh2LfD9cI4M3KNUWzuwWajbq9Q4lO9681/Hvb9PpLsmjzL FVX1FeYzOBIW+OxjhRCt/xqdF51dK7/o4r+hSSEVqkO+sF41gZKytynGvum3mV1Kud5WPk 2nOVeUtr86K3OEiG8aLzuEM0JfIdu43nKeo/JpTKTYmmckJiIoUfq2Be3dqctLC30JlR7J mVrstITk57h4t0vXYC7DCwVtEAvvMIo/T/uonUqbCPvLi+74gEpVTS/cFL8r98UBPAbHIP GgaYFOcs8xh7MsV+09WscoScZSznXFJFi4beAJ20+iHHnr5zg9nvGfmsTuN50w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700168087; a=rsa-sha256; cv=none; b=UeXpsNKgact81VhI0pwW2aBceTR/Nzi7VopdcQ8uWH+g066XQwFhrVwWQ1Fj7hKjx1Uz2U NAyqkLPa4nJ1mzsOQoI8EFtKyBChoTuRcC/CKLpHbt2sbu2UyxAf34xR/mKp24OXN53+Id cdaJtDIHhK6tBN9lkhaNT7OqkqnE7BlpLwz1IE5VZ+HW69+sjTLiuA/G8rp4GN8Akwzzav zyZwDfxcOhW7k5/aRCRDE11hrvpjqyaCpzOveTc5STzIiTasg/Eg6Rlizy3ZjdMIWSBD6G oaKEOM/aEur7umHxcxnVt5S1tOHJAKOomFqUegnQPPegNJg3sysJbNunCnHyhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWXN740PNz1Wv; Thu, 16 Nov 2023 20:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AGKslPg054003; Thu, 16 Nov 2023 20:54:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGKslhp054000; Thu, 16 Nov 2023 20:54:47 GMT (envelope-from git) Date: Thu, 16 Nov 2023 20:54:47 GMT Message-Id: <202311162054.3AGKslhp054000@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: 7cb0bacf53f2 - stable/14 - arm: Update declarations for arm_dcache_align{,_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: 7cb0bacf53f2507394d8aa1fc3abbe3ca02f61cd Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7cb0bacf53f2507394d8aa1fc3abbe3ca02f61cd commit 7cb0bacf53f2507394d8aa1fc3abbe3ca02f61cd Author: Mark Johnston AuthorDate: 2023-11-02 16:23:51 +0000 Commit: Mark Johnston CommitDate: 2023-11-16 15:07:27 +0000 arm: Update declarations for arm_dcache_align{,_mask} Reported by: Jenkins Fixes: 3d8f548b9e57 ("uma: Make the cache alignment mask unsigned") (cherry picked from commit 185aa8c9c3d7a01d616cfaafd492f61b37ed2551) --- sys/arm/include/cpufunc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm/include/cpufunc.h b/sys/arm/include/cpufunc.h index 0b54b59a7711..6562042dac0c 100644 --- a/sys/arm/include/cpufunc.h +++ b/sys/arm/include/cpufunc.h @@ -178,8 +178,8 @@ void cpu_reset (void) __attribute__((__noreturn__)); */ /* PRIMARY CACHE VARIABLES */ -extern int arm_dcache_align; -extern int arm_dcache_align_mask; +extern unsigned int arm_dcache_align; +extern unsigned int arm_dcache_align_mask; #else /* !_KERNEL */ From nobody Thu Nov 16 20:54:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWXN86k2Hz515Nn; Thu, 16 Nov 2023 20:54: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 4SWXN866kHz4HWQ; Thu, 16 Nov 2023 20:54:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DqTdFHTzU/OpV2MK0MilK3l5JuOyPEO1oLJz29hyZnQ=; b=IAxqGlwNl6KZxPZ7/sh4sTyeh3o590XwWy1niIuI35MTzpR4ZvWBANVMUVNg7deTOz2Out CvdN9Zp8f3JtpsFcgfkyXidzZFKSVIj93I3pLwsOJDU47bS2TufPBszIfDYkf0Kr32rxTM qf7oNwfcvJsa2cReU4C1YV6tOm1PjA/qL0Hpz8N2TlMHMBybUbhy0HsBg8qooDZj+jDhVw xMj7XsoCkVx3OVYfGNx6g9IOe0i93sS1ZCXMvnnFwAavLITQlzcqYWi46SW3liyhpEQP3g yUvX3xe/kbcyEAT74kmHuwnR3FIE+iJtEaMyuAFx7wr5DSaSqOBRqj073OWIEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DqTdFHTzU/OpV2MK0MilK3l5JuOyPEO1oLJz29hyZnQ=; b=KvkrQWUAkAKFqe+2I58bWIT/TMfEQbgS6FNsbg2+z0JPleGzwt7SyXSc70wEnPA1iZ9rh7 /l1OtdqpimT3SkuV4njMrTRPUzchjhvAM255fZU3/wCkwW7atoIPewNsygFoh6GF66UJn9 up1KwUYOe1qoeGNSOPumP9qVBxQH5RGhrNF0WpnygC1nnqi6/vPdm+N6hQadAbJTQKph/o E5v+cE8uKL6ne2eE+3WZr+2q3cpwZE2ikA2GzGtapcjgpyV80lmfwSBhwCp2SI4MJiF/pp HpYxmT8IpGDgD3iVtpEqhceC0qFdGGO1wEBS+Vbcdxv6CJIzdqW/okstBmZyIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700168088; a=rsa-sha256; cv=none; b=rRnIbt9P2Erig5H/ht0FJa+fvIGDuZi+FsVhOGaTO5htAznnYcrUJ+sVIuRbXLkoYh6xoT rNdSdTqLGHTb5tbrBB60Njx/uzKAPDmy1AxoXwpTldkrsk3NU5QxzJfVludj7ebddY1hTs lfYQXiOOp5Q04EQA6TUFhdJeGJoutY+JelJI/osoiiseRYZIMTLkdOA/JSwA0EsWmmvgus fCutiFHad6uhQi9l5TRWJRKkyRMjfr0te7NtzBsJ/nyAw+HITEgSzNUENpw+HpSQTaD27e IApyhU2wZ0v5ysFI7635n2UxMPmwNhaTv3x4tOplci43yUUGGR9+kGdeo9pAlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWXN85C4pzrT; Thu, 16 Nov 2023 20:54: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 3AGKsmBA054057; Thu, 16 Nov 2023 20:54:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGKsm9v054054; Thu, 16 Nov 2023 20:54:48 GMT (envelope-from git) Date: Thu, 16 Nov 2023 20:54:48 GMT Message-Id: <202311162054.3AGKsm9v054054@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: e191c0283e86 - stable/14 - Ensure 'struct thread' is aligned to a cache line List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e191c0283e8640d46ed6b725e3311d0f37f3620c Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e191c0283e8640d46ed6b725e3311d0f37f3620c commit e191c0283e8640d46ed6b725e3311d0f37f3620c Author: Olivier Certner AuthorDate: 2023-10-13 08:52:31 +0000 Commit: Mark Johnston CommitDate: 2023-11-16 15:07:30 +0000 Ensure 'struct thread' is aligned to a cache line Using the new UMA_ALIGN_CACHE_AND_MASK() facility, which allows to simultaneously guarantee a minimum of 32 bytes of alignment (the 5 lower bits are always 0). For the record, to this day, here's a (possibly non-exhaustive) list of synchronization primitives using lower bits to store flags in pointers to thread structures: - lockmgr, rwlock and sx all use the 5 bits directly. - rmlock indirectly relies on sx, so can use the 5 bits. - mtx (non-spin) relies on the 3 lower bits. Reviewed by: markj, kib MFC after: 2 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42266 (cherry picked from commit 7d1469e555bdce32b3dfc898478ae5564d5072b1) --- sys/kern/kern_thread.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 4175d1594af4..d8ba94925fec 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -568,9 +568,15 @@ threadinit(void) if (tid0 != THREAD0_TID) panic("tid0 %d != %d\n", tid0, THREAD0_TID); + /* + * Thread structures are specially aligned so that (at least) the + * 5 lower bits of a pointer to 'struct thead' must be 0. These bits + * are used by synchronization primitives to store flags in pointers to + * such structures. + */ thread_zone = uma_zcreate("THREAD", sched_sizeof_thread(), thread_ctor, thread_dtor, thread_init, thread_fini, - 32 - 1, UMA_ZONE_NOFREE); + UMA_ALIGN_CACHE_AND_MASK(32 - 1), UMA_ZONE_NOFREE); tidhashtbl = hashinit(maxproc / 2, M_TIDHASH, &tidhash); tidhashlock = (tidhash + 1) / 64; if (tidhashlock > 0) From nobody Thu Nov 16 20:54:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWXNB3jdmz5155k; Thu, 16 Nov 2023 20:54: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 4SWXN970KFz4HGZ; Thu, 16 Nov 2023 20:54:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YjiCwMKHx8lTdJPD4RWu2RwTKSbqoonFZ13c0OcHTVw=; b=l8yPJWA/Iy+kSGF1JszVf4ysDZd3FDgHp/4oxTVtItT2GFZ9Zm+hPi9q1iVz629vcLvMwu tYy6EJ6L3+N1ENGKznNeZ1PYZcK8blx04FH1JYRGmNaN58H4Jp2laf5VHfZfOKdl9y4bHV VozwHw6FMqmQ2r/pXrSSTX7vFXZy4EbO3dUn2Mw2aHq6mLyKRDQ5lk6CEfbNpnGs5szrQc DlHezZ6Rj8cWCzg2sxO7mQ60dkrOFN4Vj8ZtA9d15ZsVVNp3HEOJHWpmTau0+Q3wwLyPpy S0vYZcWSmpkVf5z8A21Gxc2+Etbm/mRFDhiYVT0x3F0ZjnRV341VJTsljm2s3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YjiCwMKHx8lTdJPD4RWu2RwTKSbqoonFZ13c0OcHTVw=; b=fKaadZbEdyE1Q6qu/z2xz0WCfVezwXJ8JUTmXy1O7HmoDrhuNHlwrz0Bg1q87ts6OiYxNJ DREG7TL8ZsLKLLSrDjwsuRHqvr1UcV07WQpZu3lNavJCgqnzrv1rMlLY7QtW1QFNxHmVWr CoM6j3Y7/udfy/unB9LtDwHTeCdf6TJCLsaLvKj27QhHDBjR0NivjlwSNgnbocixM0zn/W COdVfVJrCXWjS3zLaoYz0aAhUsTjYPLyQmhoNjtD2t2OmFRDqYYJy+nzME4KARIDPc8xNj 9NF48puPtLHOg2Z4Z51KlugHZtBUoR1Zoj9+vfKvzIKKcOp17mVeHx0ITkqaaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700168090; a=rsa-sha256; cv=none; b=mXz77m2AswDatJxWLD6NlT1BtNBcpUdR2zgtlEIcaQXkOQqZfF0cX6Y7Glrj0Rw2zN9AEg cvrxbRVgDdiAB06FcLTsbGGBDVBxzCigEgDSIbH3+IV2WGZ9rlKzme6MZ4ZbSiBWMST3Qq Q4mcyHKWzQC7E/wnUg9EmCPNY+oMyNS3W8Fp5OMjvjN2wz73oOUQsp7XB7cQy9tooI+wEM 2mdcQM94ZkUfzYxSjQCsObtfINg0SuxJbmPt24srxzoa09iQ3ZsVSUSIlFI398SN7WSAOs TY3VtiHRSxI/lVBILV+o0B6OLXleEW2UjGwoQveb1qTRLHHTcBQTM8dvBA7lGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWXN964rcz1KY; Thu, 16 Nov 2023 20:54: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 3AGKsn43054099; Thu, 16 Nov 2023 20:54:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGKsnDp054096; Thu, 16 Nov 2023 20:54:49 GMT (envelope-from git) Date: Thu, 16 Nov 2023 20:54:49 GMT Message-Id: <202311162054.3AGKsnDp054096@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: 7d1321288ad9 - stable/14 - stand: Rename LIBFDT to LIBSAFDT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7d1321288ad980182b188834c6e81b568058190a Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7d1321288ad980182b188834c6e81b568058190a commit 7d1321288ad980182b188834c6e81b568058190a Author: Mark Johnston AuthorDate: 2023-11-07 14:57:32 +0000 Commit: Mark Johnston CommitDate: 2023-11-16 15:18:58 +0000 stand: Rename LIBFDT to LIBSAFDT Preemptively address a collision with LIBFDT (to be added in the future) from src.libnames.mk, which gets included via bsd.progs.mk. No functional change intended. Reviewed by: imp MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D42486 (cherry picked from commit b247ff70e8f1b4bf184b9fc85d2908ec4db2d1ab) --- stand/efi/loader/Makefile | 4 ++-- stand/fdt.mk | 2 +- stand/kboot/Makefile | 4 ++-- stand/powerpc/ofw/Makefile | 4 ++-- stand/uboot/Makefile | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/stand/efi/loader/Makefile b/stand/efi/loader/Makefile index 3ce9ac169bd1..5a755c1d329f 100644 --- a/stand/efi/loader/Makefile +++ b/stand/efi/loader/Makefile @@ -122,7 +122,7 @@ ${LOADER}.efi: ${PROG} LIBEFI= ${BOOTOBJ}/efi/libefi/libefi.a -DPADD= ${LDR_INTERP} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSA} ${LDSCRIPT} -LDADD= ${LDR_INTERP} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSA} +DPADD= ${LDR_INTERP} ${LIBEFI} ${LIBSAFDT} ${LIBEFI_FDT} ${LIBSA} ${LDSCRIPT} +LDADD= ${LDR_INTERP} ${LIBEFI} ${LIBSAFDT} ${LIBEFI_FDT} ${LIBSA} .include diff --git a/stand/fdt.mk b/stand/fdt.mk index 56c9ff95b5ad..1b3df587d0db 100644 --- a/stand/fdt.mk +++ b/stand/fdt.mk @@ -4,5 +4,5 @@ CFLAGS+= -I${FDTSRC} CFLAGS+= -I${BOOTOBJ}/fdt CFLAGS+= -I${SYSDIR}/contrib/libfdt CFLAGS+= -DLOADER_FDT_SUPPORT -LIBFDT= ${BOOTOBJ}/fdt/libfdt.a +LIBSAFDT= ${BOOTOBJ}/fdt/libfdt.a .endif diff --git a/stand/kboot/Makefile b/stand/kboot/Makefile index f5049a1c19c0..b9d68cddf97d 100644 --- a/stand/kboot/Makefile +++ b/stand/kboot/Makefile @@ -63,7 +63,7 @@ CFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} CFLAGS+= -Wall -DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} -LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} +DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} +LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} .include diff --git a/stand/powerpc/ofw/Makefile b/stand/powerpc/ofw/Makefile index 2beb315a4d41..3e4c92220fac 100644 --- a/stand/powerpc/ofw/Makefile +++ b/stand/powerpc/ofw/Makefile @@ -59,8 +59,8 @@ LDFLAGS+= -T ${.CURDIR}/ldscript.powerpc LIBOFW= ${BOOTOBJ}/libofw/libofw.a CFLAGS+= -I${BOOTSRC}/libofw -DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} -LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} +DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} +LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} MK_PIE= no diff --git a/stand/uboot/Makefile b/stand/uboot/Makefile index 1cc4abe86d9b..83ac5949cbb3 100644 --- a/stand/uboot/Makefile +++ b/stand/uboot/Makefile @@ -78,7 +78,7 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ubldr ubldr.bin ubldr.pie: ${OBJS} .endif -DPADD= ${LDR_INTERP} ${LIBFDT} ${LIBSA} -LDADD= ${LDR_INTERP} ${LIBFDT} ${LIBSA} +DPADD= ${LDR_INTERP} ${LIBSAFDT} ${LIBSA} +LDADD= ${LDR_INTERP} ${LIBSAFDT} ${LIBSA} .include From nobody Thu Nov 16 22:06:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWYyV4KSdz518Yd; Thu, 16 Nov 2023 22:06: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 4SWYyV1yBcz4XmJ; Thu, 16 Nov 2023 22:06:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700172370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wByEWGuu3KdWc76lKdFVXeIljtMkiLGB/Ev3HGw0Re8=; b=eUzy5B2GHPonuVKFn+wghYT/DFsfz1rQVbYAhdpzvk6g/yQejfoKeGQZn2QOrWUxRQYh7k 9JQjuaWtJ5+XgDrq3wzP+3fFXb/zk+pDU6b7428d0OswBIHOJWAlkta3aiqENgg+C6Nr1n v7H+HqE34zUBWhEwUDPhENPMhKpeFKqjlShNIdPhVUfkp3OcA8MC2QShYLSzGFZn5FZU7q CmJI+TWMBcThdn5OwCAwuV+XH+I0jLWKMwVKA1JbaVEeYNF9dfXXkUHqaKoCzPQGKTRiia VHoRnEvh/mge8RkppK3aREXXwPR8+sSf4hLXJbaq+m/tGnx/1O2AU9wrPtXeOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700172370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wByEWGuu3KdWc76lKdFVXeIljtMkiLGB/Ev3HGw0Re8=; b=DTIwd1WQiCYcPaY8DPLsiliA35VQWNT3dg1AOmgJhLdGpz6cbTXHr5okbxlMt7K5LIp1pg Domu4eMOz1I6PfKYL95vlyLhV9v0jaF0NB4Pv97rxUr/0CWsxoKD2mfIcYuPLn2gxmyLak rCAx+6qO6Q1Y2CBQSMYY3AbSa8K10cZuPzWB8z4mrEupn99XKgk6RAkwbgOSELnOT4jAnJ n+3NoeVKoXc9Yxx+/00uL4/NNNxR2ZMOudoxBWjPFsNVeDN7CQdgXkr/5UZ/Glgnj1sPdk oWJVCaBo+hgiSn/kvjcKcSgVCyw1gGgLwv8sIdowyhTdqMCWoIuRQcGxDZ7FMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700172370; a=rsa-sha256; cv=none; b=qYrFOk2fy5Bz/qC2luvxN1LzItkElaItv+Y6nLBdOo8jzNCkpKOAlDg5OoLgRZyyq5FFse MQmYtmNPItmXGxRtBatRddgKRAGzIbI04fsYwyIbVIRXsmn643np0vH4hnHi/7k2G77XFw 7OTpIlLeGrHA4zb6t1F5gTwghEiCDM+Q7sRDFML5qUaewCfiSMYhYSNv3gjpq+o237Y2Mv Vz2Rf4zsgk/A/DWNN6V81y6j44VlDD1Ii8lvkGG7ENruuFDU3ylCyG0Gm0eq0INWviX89+ SS+6BrDe44M50q/kgbTKvXJwAho+uyM67/g/czvnrfDBA3bcREv/1P4nzDbIKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWYyV0xvYz3BJ; Thu, 16 Nov 2023 22:06: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 3AGM6Ad1071521; Thu, 16 Nov 2023 22:06:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGM6APE071518; Thu, 16 Nov 2023 22:06:10 GMT (envelope-from git) Date: Thu, 16 Nov 2023 22:06:10 GMT Message-Id: <202311162206.3AGM6APE071518@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: 0aa93010c571 - main - arm64: do not register elf32 brand if hardware cannot exec aarch32 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0aa93010c571b88a6402405be22745fa05a5baab Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0aa93010c571b88a6402405be22745fa05a5baab commit 0aa93010c571b88a6402405be22745fa05a5baab Author: Konstantin Belousov AuthorDate: 2023-11-16 19:45:52 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-16 22:04:40 +0000 arm64: do not register elf32 brand if hardware cannot exec aarch32 Reviewed by: imp, jrtc27 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42639 --- sys/arm64/arm64/elf32_machdep.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c index 26aa2cddfdb2..4acb68b09108 100644 --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -153,8 +153,16 @@ static Elf32_Brandinfo freebsd32_brand_info = { .header_supported= elf32_arm_abi_supported, }; -SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, - (sysinit_cfunc_t)elf32_insert_brand_entry, &freebsd32_brand_info); +static void +register_elf32_brand(void *arg) +{ + /* Check if we support AArch32 */ + if (ID_AA64PFR0_EL0_VAL(READ_SPECIALREG(id_aa64pfr0_el1)) == + ID_AA64PFR0_EL0_64_32) { + elf32_insert_brand_entry(&freebsd32_brand_info); + } +} +SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, register_elf32_brand, NULL); static bool elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, @@ -162,11 +170,6 @@ elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, { const Elf32_Ehdr *hdr; - /* Check if we support AArch32 */ - if (ID_AA64PFR0_EL0_VAL(READ_SPECIALREG(id_aa64pfr0_el1)) != - ID_AA64PFR0_EL0_64_32) - return (false); - #define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4 hdr = (const Elf32_Ehdr *)imgp->image_header; if (EF_ARM_EABI_VERSION(hdr->e_flags) < EF_ARM_EABI_FREEBSD_MIN) { From nobody Thu Nov 16 22:06:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWYyW5GbMz518ng; Thu, 16 Nov 2023 22:06: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 4SWYyW2rlkz4XmM; Thu, 16 Nov 2023 22:06:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700172371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d2p3b/NeuQI3DfTM3ioOWyAihOctNS3Z5svgWCwvWuw=; b=sfiOJmyQ5AbThzPMBepacjvjIqNX0x1QUBs2MxP3n8mnnltWU6dvrAVldray3aI5F7o4BQ slFOUMyHPVUJZmoWnP9h1p4QuM2f1Bgo/IBgLvex/7UqUKxBjqjAPw6xpi/LWAvkvE6Q31 31qJFce/6JO92MyCmodbbFr5jCJA+tycDj3wOR6mYHGzllKd7I14aFWrXqe8hforkalowz plyB3GiXwK2fUsQEia8XlBZQ29dGQOXzwYjOcliItIzz28NQ87z0tQIXDSlGEwdyfymaa6 UD745MPOf70AxcMpL5OlI5j69gtXgHCDU6rlNnF1sW+d+kB7npUXRqd8nuXGFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700172371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d2p3b/NeuQI3DfTM3ioOWyAihOctNS3Z5svgWCwvWuw=; b=aS/7JfJ5HWQwQN0E1NRftlsbA2z99Z575lEkOq9XdPJsAWhq5vq0jVjsZxCE000vx+iMIz Ofy26SOWSJUy9bBEuRaa2+2ugqv/w00KiWkxyETOk/tuj1T3SqzSCCC9sJiky2Xr008rqf E97sCp6Q7W1+WOYZ0EYsAQVWxKibfP0o1PHRbVelbxFxoEeILz9kjD8/wHEI5bc8MsJsOF lEtBDSbZWTeFM+1G8hnIOmJ/dYjEObgoDheVugdLdJSY02AMGwMHYebgRLzdndGDUkBleu kvTmhR/6aPA/LhK+2mQFy0ZIw8dUu0KhL0Pg96+8mhS68KJ5dKCmKzvc3MxYqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700172371; a=rsa-sha256; cv=none; b=MaVrem1d6BoEY0YwnkJ8hmY+FCBTfAgPGVGeDbXhw6rKRuaGRjyDeJDqsgHOeavuV07+VT ak5WxXgIMfaeYvnvZwEivflwA6LdGPgCfpKEaeaf9GXI6E0+LdszESMVdO7kxcfzyoheBh gVhU+N99yjDask974lxRr6Fwya2Arfu/Wq9187L6c1pdHULE+qLYYlr7UBeb5XTUkgjbky LenOfAc8E06YrGDY0pYyjmzmK71OdrXE3gDGlOUYJ/QOL2pxNdrhYzF2mfnkxhdzBlRX8m jDk2rmJbmz0ZfIGkmRgp26XYCEuk2MOk0psE+CRIaZT2pqYULDrzZ5mBdIPWgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWYyW1wJ5z3Dx; Thu, 16 Nov 2023 22:06: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 3AGM6BG7071574; Thu, 16 Nov 2023 22:06:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGM6BWh071571; Thu, 16 Nov 2023 22:06:11 GMT (envelope-from git) Date: Thu, 16 Nov 2023 22:06:11 GMT Message-Id: <202311162206.3AGM6BWh071571@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: e256f71389fb - main - kernel: add missed FEATUREs compat_freebsd 8-14 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e256f71389fbf0ef6cf8f547342d5f789e69f918 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e256f71389fbf0ef6cf8f547342d5f789e69f918 commit e256f71389fbf0ef6cf8f547342d5f789e69f918 Author: Konstantin Belousov AuthorDate: 2023-11-16 20:47:18 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-16 22:04:55 +0000 kernel: add missed FEATUREs compat_freebsd 8-14 Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/kern_mib.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index 2298f942da6b..b60c3c689449 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -630,6 +630,34 @@ FEATURE(compat_freebsd6, "Compatible with FreeBSD 6"); FEATURE(compat_freebsd7, "Compatible with FreeBSD 7"); #endif +#ifdef COMPAT_FREEBSD8 +FEATURE(compat_freebsd8, "Compatible with FreeBSD 8"); +#endif + +#ifdef COMPAT_FREEBSD9 +FEATURE(compat_freebsd9, "Compatible with FreeBSD 9"); +#endif + +#ifdef COMPAT_FREEBSD10 +FEATURE(compat_freebsd10, "Compatible with FreeBSD 10"); +#endif + +#ifdef COMPAT_FREEBSD11 +FEATURE(compat_freebsd11, "Compatible with FreeBSD 11"); +#endif + +#ifdef COMPAT_FREEBSD12 +FEATURE(compat_freebsd12, "Compatible with FreeBSD 12"); +#endif + +#ifdef COMPAT_FREEBSD13 +FEATURE(compat_freebsd13, "Compatible with FreeBSD 13"); +#endif + +#ifdef COMPAT_FREEBSD14 +FEATURE(compat_freebsd14, "Compatible with FreeBSD 14"); +#endif + /* * This is really cheating. These actually live in the libc, something * which I'm not quite sure is a good idea anyway, but in order for From nobody Thu Nov 16 23:48:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWcDC3yVGz51FSL; Thu, 16 Nov 2023 23:48: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 4SWcDC3VZcz3LW3; Thu, 16 Nov 2023 23:48:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700178491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dRGTGGsYJrv3BC0/Fc+KbPF5xK4pN7sW3KXr+6/Wrvc=; b=ZQFnxJKfLmh/cJGe06Zpf9Vdj3VXvb55hBH5cQrkLJq6z3keSu6fp/xNiqKEREKNSbkhCl lkql6OxLgr72Vd6JXnjO/TFlt6Jkwbp7F6hX9zvx2+Gd+53G+4jvCDctrBqe7pFBlJcTnl A/0eKaBiOdWLwvI0JorjJ2zPx/7iGbTzdr3Koliq7sG9U7aAviqkChX4mf/WXSZHwQy2A9 pm3pe6KkFQMJQ1KD44X3uv1aj88X8DKouG4TL9XzwSfHtqQAeoHW/jPTPqaQ71Oix2Ot08 vuI10KmhVxUVB61bee/GpbRoxmANkZ26pB9w1T3BOZJD/UpyjEmc71fJocrN/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700178491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dRGTGGsYJrv3BC0/Fc+KbPF5xK4pN7sW3KXr+6/Wrvc=; b=I5SbFLb4OgUlrx/To0GI2UuHxxl2sMm545t2VIXPeJIHmltp8AzXkaMTwtJU1wITm+tRRJ f3oFh6wTZ6xpqNj3vi026SdcgZp9TGLzCmcQtdKwwQPm4HHl2JoSDIJnXUMcj7R/YYnneO xfD5JRsjBVYvvHiWA3+wddTsFE5X523rYswniWp8QdxSKH6818HPYuSGGChuL4eTbRhaaO OLtBKmLoo5c9enCx2SSax2n1gZNM5wbVo/2GGFVickYfGjRF+FthpeB1faoHs+2p3RL8AT uM0bzZXJfH6L8/+Cd7UFleSgSta8O7xJXUfWQhEiR4Hw+I1w32mgBKuVyy54+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700178491; a=rsa-sha256; cv=none; b=o8yJgiQSF+xvtspP4rzxhtkubh9OpyvP/rkLYNth6FsiNGhLSuOP0VjJPA1utJogpJ8vjJ GaeMY9ecxaWLSIzmEg+d7madHhZBEBYB5xX1ppTs6Srl9UaqnwUY5DrBTbtEjB3jdW2uF7 3GJ5jGNYuU7X0JenSUH5g99qE+qQtTaByheKWryo182yPIeGJMnH6yjR8imDndSdddjho3 ieinJ8EDSNxFvPG1NoXe5139TMcI5u8IdPV2GV5MxutAtBHO6x2cqOzvCRqIxIvsK/flP2 SW5dW5R0QYaChyrR8ni00XVb7sFIvo5CxGRcSxCdT1760zkayExhKLRFCiqXPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWcDC2ZxRz53M; Thu, 16 Nov 2023 23:48: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 3AGNmBl9037245; Thu, 16 Nov 2023 23:48:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGNmBfG037242; Thu, 16 Nov 2023 23:48:11 GMT (envelope-from git) Date: Thu, 16 Nov 2023 23:48:11 GMT Message-Id: <202311162348.3AGNmBfG037242@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: f40c9502c438 - stable/14 - nfsd: Avoid acquiring a vnode for some NFSv4 Readdir operations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f40c9502c438d230a06157ec7f9be1c21ae46541 Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=f40c9502c438d230a06157ec7f9be1c21ae46541 commit f40c9502c438d230a06157ec7f9be1c21ae46541 Author: Rick Macklem AuthorDate: 2023-10-17 20:55:48 +0000 Commit: Rick Macklem CommitDate: 2023-11-16 23:46:17 +0000 nfsd: Avoid acquiring a vnode for some NFSv4 Readdir operations Without this patch, a NFSv4 Readdir operation acquires the vnode for each entry in the directory. If only the Type, Fileid, Mounted_on_fileid and ReaddirError attributes are requested by a client, acquiring the vnode is not necessary for non-directories. Directory vnodes must be acquired to check for server file system mount points. This patch avoids acquiring the vnode, as above, resulting in a 3-8% improvement in Readdir RPC RTT for some simple tests I did. Note that only non-rdirplus NFSv4 mounts will benefit from this change. Tested during a recent IETF NFSv4 Bakeathon testing event. (cherry picked from commit cd5edc7db261fb228be4044e6fdd38850eb4e9c4) --- sys/fs/nfsserver/nfs_nfsdport.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 570ae653e06c..776d5c50861c 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -117,6 +117,11 @@ extern int nfsrv_issuedelegs; extern int nfsrv_dolocallocks; extern struct nfsdevicehead nfsrv_devidhead; +/* Map d_type to vnode type. */ +static uint8_t dtype_to_vnode[DT_WHT + 1] = { VNON, VFIFO, VCHR, VNON, VDIR, + VNON, VBLK, VNON, VREG, VNON, VLNK, VNON, VSOCK, VNON, VNON }; +#define NFS_DTYPETOVTYPE(t) ((t) <= DT_WHT ? dtype_to_vnode[(t)] : VNON) + static int nfsrv_createiovec(int, struct mbuf **, struct mbuf **, struct iovec **); static int nfsrv_createiovec_extpgs(int, int, struct mbuf **, @@ -2310,7 +2315,7 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdgram, caddr_t bpos0, bpos1; u_int64_t off, toff, verf __unused; uint64_t *cookies = NULL, *cookiep; - nfsattrbit_t attrbits, rderrbits, savbits; + nfsattrbit_t attrbits, rderrbits, savbits, refbits; struct uio io; struct iovec iv; struct componentname cn; @@ -2361,9 +2366,20 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdgram, if (error) goto nfsmout; NFSSET_ATTRBIT(&savbits, &attrbits); + NFSSET_ATTRBIT(&refbits, &attrbits); NFSCLRNOTFILLABLE_ATTRBIT(&attrbits, nd); NFSZERO_ATTRBIT(&rderrbits); NFSSETBIT_ATTRBIT(&rderrbits, NFSATTRBIT_RDATTRERROR); + /* + * If these 4 bits are the only attributes requested by the + * client, they can be satisfied without acquiring the vnode + * for the file object unless it is a directory. + * This will be indicated by savbits being all 0s. + */ + NFSCLRBIT_ATTRBIT(&savbits, NFSATTRBIT_TYPE); + NFSCLRBIT_ATTRBIT(&savbits, NFSATTRBIT_FILEID); + NFSCLRBIT_ATTRBIT(&savbits, NFSATTRBIT_MOUNTEDONFILEID); + NFSCLRBIT_ATTRBIT(&savbits, NFSATTRBIT_RDATTRERROR); } else { NFSZERO_ATTRBIT(&attrbits); } @@ -2606,7 +2622,10 @@ again: new_mp = mp; mounted_on_fileno = (uint64_t)dp->d_fileno; if ((nd->nd_flag & ND_NFSV3) || - NFSNONZERO_ATTRBIT(&savbits)) { + NFSNONZERO_ATTRBIT(&savbits) || + dp->d_type == DT_UNKNOWN || + (dp->d_type == DT_DIR && + nfsrv_enable_crossmntpt != 0)) { if (nd->nd_flag & ND_NFSV4) refp = nfsv4root_getreferral(NULL, vp, dp->d_fileno); @@ -2743,6 +2762,11 @@ again: break; } } + } else if (NFSNONZERO_ATTRBIT(&attrbits)) { + /* Only need Type and/or Fileid. */ + VATTR_NULL(&nvap->na_vattr); + nvap->na_fileid = dp->d_fileno; + nvap->na_type = NFS_DTYPETOVTYPE(dp->d_type); } /* @@ -2774,7 +2798,7 @@ again: supports_nfsv4acls = 0; if (refp != NULL) { dirlen += nfsrv_putreferralattr(nd, - &savbits, refp, 0, + &refbits, refp, 0, &nd->nd_repstat); if (nd->nd_repstat) { if (nvp != NULL) From nobody Thu Nov 16 23:56:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWcPP0Mjxz51G0S; Thu, 16 Nov 2023 23:56: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 4SWcPN6r02z3M6H; Thu, 16 Nov 2023 23:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700178969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1zbXskylFwGKwTo0IqNAwDum12aBFI0knWjGIYxtftA=; b=CPGD/tkx0pWtbRseR30fgVb6pmd8s1eRTOWi4qaui76KnTjTtvUHRPMUAlVGoq7lID40m/ ZAeY2qdT8cKnSN0Nl7YfX8jB3qJoB++0+pRtdZfkARTu9FMwfYUf4FdQRkkUrE+DFU47oV H2o2C3L+GJ/a29o7qHWCCPY4mDMk/PQHONdrSFbk+OC5hHTzO3HdZyLUS9pWn2wr8+TBlV amX2a0TK8ZxIooYPKbiptuZP5wmqtea3IvypL58EFC8TyZ0ynDqYqnbcaY3daVMF20yKat aqci+EmG1+zloFCmytr0B5PR41iKvq6Ptgpe0OAqKe/iD+FwRI+HxTxJaWvXRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700178969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1zbXskylFwGKwTo0IqNAwDum12aBFI0knWjGIYxtftA=; b=ML2/8hqSW0tSQ8gpYz4xwfB8Kh/EmEzVjJPlTUFMX8lSTSa45qgf4u31JSLo5kDjjgFUfQ EIhs9+hfRU5gPBeagc0+v69g3OEFewdnzzkbzQIO6Q/F6cfChUXkgnArsaG8RX5siqvFnh 2bD5bYmOfwNA7YYVgAkdJHsvckzReadUEBhJMwBK/cD5Jh+KiXwuNS1TMiKXvdBt/u337K zoTVv24bLJMH7VyFyfmA3+bifEWHkDgTKZF9it0UapJ026ExpAcq2278wyIGrq9TkRb4aG coi3X7s/hijXWv9wXdOQOepSr1tIS/xgP8wCbLuyk/AKUO3ebJgvZKzRJlflcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700178969; a=rsa-sha256; cv=none; b=no1IFgBN4Vv3Ty32umcc6lKtfK2L3+FOJVWsosrBkVPzevzMeaVQBEP2o9UCDkNEgXgNwP Nhs81bbbKPlHvLTjKAtuYQGnLpQMO9GX1VvnJKsP1Ne/EZ20rv3bBG5iSDrfcLGu8BZj9p kjYeomWmkN0DbumvixCEiL554bzGTlwph5dUOJWr7QbjBQSNPf/m4ra0MFJxVzhc+/DkPk looqBqErGOunDPvfJPzytPhHw5cluUr1nD6Zz9ohXMdpO/06H4z5TQVTtIvOmxxqDqlpVh smDYXtxt3QFF1QIpXhVpDlP6vBCel8G4pGYwgXluFmz12anzzofliFbvTas3Gw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWcPN5wmDz5sP; Thu, 16 Nov 2023 23:56: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 3AGNu8YF054314; Thu, 16 Nov 2023 23:56:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGNu87Z054311; Thu, 16 Nov 2023 23:56:08 GMT (envelope-from git) Date: Thu, 16 Nov 2023 23:56:08 GMT Message-Id: <202311162356.3AGNu87Z054311@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: 0948d2a9cfea - stable/13 - nfsd: Avoid acquiring a vnode for some NFSv4 Readdir operations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0948d2a9cfea5a469a9505fb314a6f9af38bb6fa Auto-Submitted: auto-generated The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=0948d2a9cfea5a469a9505fb314a6f9af38bb6fa commit 0948d2a9cfea5a469a9505fb314a6f9af38bb6fa Author: Rick Macklem AuthorDate: 2023-10-17 20:55:48 +0000 Commit: Rick Macklem CommitDate: 2023-11-16 23:54:20 +0000 nfsd: Avoid acquiring a vnode for some NFSv4 Readdir operations Without this patch, a NFSv4 Readdir operation acquires the vnode for each entry in the directory. If only the Type, Fileid, Mounted_on_fileid and ReaddirError attributes are requested by a client, acquiring the vnode is not necessary for non-directories. Directory vnodes must be acquired to check for server file system mount points. This patch avoids acquiring the vnode, as above, resulting in a 3-8% improvement in Readdir RPC RTT for some simple tests I did. Note that only non-rdirplus NFSv4 mounts will benefit from this change. Tested during a recent IETF NFSv4 Bakeathon testing event. (cherry picked from commit cd5edc7db261fb228be4044e6fdd38850eb4e9c4) --- sys/fs/nfsserver/nfs_nfsdport.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index e2a3ff7e3b93..05cebdd13f7d 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -117,6 +117,11 @@ extern int nfsrv_issuedelegs; extern int nfsrv_dolocallocks; extern struct nfsdevicehead nfsrv_devidhead; +/* Map d_type to vnode type. */ +static uint8_t dtype_to_vnode[DT_WHT + 1] = { VNON, VFIFO, VCHR, VNON, VDIR, + VNON, VBLK, VNON, VREG, VNON, VLNK, VNON, VSOCK, VNON, VNON }; +#define NFS_DTYPETOVTYPE(t) ((t) <= DT_WHT ? dtype_to_vnode[(t)] : VNON) + static int nfsrv_createiovec(int, struct mbuf **, struct mbuf **, struct iovec **); static int nfsrv_createiovec_extpgs(int, int, struct mbuf **, @@ -2319,7 +2324,7 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdgram, caddr_t bpos0, bpos1; u_int64_t off, toff, verf; u_long *cookies = NULL, *cookiep; - nfsattrbit_t attrbits, rderrbits, savbits; + nfsattrbit_t attrbits, rderrbits, savbits, refbits; struct uio io; struct iovec iv; struct componentname cn; @@ -2370,9 +2375,20 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdgram, if (error) goto nfsmout; NFSSET_ATTRBIT(&savbits, &attrbits); + NFSSET_ATTRBIT(&refbits, &attrbits); NFSCLRNOTFILLABLE_ATTRBIT(&attrbits, nd); NFSZERO_ATTRBIT(&rderrbits); NFSSETBIT_ATTRBIT(&rderrbits, NFSATTRBIT_RDATTRERROR); + /* + * If these 4 bits are the only attributes requested by the + * client, they can be satisfied without acquiring the vnode + * for the file object unless it is a directory. + * This will be indicated by savbits being all 0s. + */ + NFSCLRBIT_ATTRBIT(&savbits, NFSATTRBIT_TYPE); + NFSCLRBIT_ATTRBIT(&savbits, NFSATTRBIT_FILEID); + NFSCLRBIT_ATTRBIT(&savbits, NFSATTRBIT_MOUNTEDONFILEID); + NFSCLRBIT_ATTRBIT(&savbits, NFSATTRBIT_RDATTRERROR); } else { NFSZERO_ATTRBIT(&attrbits); } @@ -2616,7 +2632,10 @@ again: new_mp = mp; mounted_on_fileno = (uint64_t)dp->d_fileno; if ((nd->nd_flag & ND_NFSV3) || - NFSNONZERO_ATTRBIT(&savbits)) { + NFSNONZERO_ATTRBIT(&savbits) || + dp->d_type == DT_UNKNOWN || + (dp->d_type == DT_DIR && + nfsrv_enable_crossmntpt != 0)) { if (nd->nd_flag & ND_NFSV4) refp = nfsv4root_getreferral(NULL, vp, dp->d_fileno); @@ -2754,6 +2773,11 @@ again: break; } } + } else if (NFSNONZERO_ATTRBIT(&attrbits)) { + /* Only need Type and/or Fileid. */ + VATTR_NULL(&nvap->na_vattr); + nvap->na_fileid = dp->d_fileno; + nvap->na_type = NFS_DTYPETOVTYPE(dp->d_type); } /* @@ -2785,7 +2809,7 @@ again: supports_nfsv4acls = 0; if (refp != NULL) { dirlen += nfsrv_putreferralattr(nd, - &savbits, refp, 0, + &refbits, refp, 0, &nd->nd_repstat); if (nd->nd_repstat) { if (nvp != NULL) From nobody Fri Nov 17 00:13:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWcmv5p4Fz51GtS; Fri, 17 Nov 2023 00:13:03 +0000 (UTC) (envelope-from jhb@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 4SWcmv5KcQz3NSS; Fri, 17 Nov 2023 00:13:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700179983; h=from:from:reply-to:subject: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=WSFBiOfhgxM5L8f80vp6S05eht0sNKAo2Y2v0zLsjB8=; b=XP/sFip363nUR03zoiD1qEPdB6NT41Sq9bwUzgHbLZsmnv3SrVbF3IyEzDXTGkEz95YexM rOAPuVlX/jbOrgDyjinL4ti8xRNr6aTqtQpurxyhoYHNqCnU3hQ5cqhfuB24tdY0z+y1bh Imz/rdCPUSGYybILpORfcRqE4KjpHybrT8+L8xSkyVczaj7IZKcbgXXGFnw0icu5tPvORy fMpXvlP7WdpkYS3VNso+kjM0bQ14G2IpKdRDsVZd/WZgGQgW9Kj2xwpCpp13cKM1qNNhNJ FJJGACJEUhpqk9elAXESWOCcZnykPJy509ebqUFjENrjuFcwo1iZ6ySzlWYfCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700179983; h=from:from:reply-to:subject: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=WSFBiOfhgxM5L8f80vp6S05eht0sNKAo2Y2v0zLsjB8=; b=DIzfmSGi7sDQxEsruoaE15m+AfEl0rdnr7BGraduGcH726D8SkPlXffUSu8YnoXzs8KV4A Ju6p22I6soSj/6dRLPtB+BxbIIEzRF/j3h/DauqK8Zre/ewFAXzCQyps0n07MmuhebQ6zF Pd5IFhUm20JxrzkEfNflKYmtnXjH+ldBIK+jcRRmdRX38Rov1aueXzG7CBIWGxkJCE9j44 dunpX+MLFSx0ud7XNNVtdK6C1gXc2Ck2FLNYXlwU+U3YTpgVx8ED/uCbfx4Mx0RWXIQjOV AeHB8huE+vMkct4Fl9Qn7ODdRV8SDShRRJCJEW+OQJlw8YIymDwghq64zNbDjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700179983; a=rsa-sha256; cv=none; b=pWkAzdu6aQKOxS9kEZuxzVOqsDYVCXXe66+i48ogWQGhSy+V+2TEZ5EORDsBE69KeiWaY1 gjeeDbJxko0SV70Mgm3txuYSuMPs7VEo1aRvaEtQebclA9JigoSO5eOQmCZ0ZRqaKjQwrX TCAbMGJ3q7xKR2kVoNgGzmNGXRETvRCe6TnTeE+PGXSkuWey1lN8XhlKf6EF2t0jrr5+/G 6f4UBwhWqH0PSh8zxGoErCP0zoJkK5S2Slsxoqtq3zVevBWqqCenA0B9pxdTM0S9tNFA0j VnTE5YFBCloR/7Q6ekhVk754u8VNgp/zVKTbOvP/SExVHfmBiuf7kcJpx1SLhQ== Received: from [IPV6:2601:648:8384:fd00:4878:c61e:b5b1:ef36] (unknown [IPv6:2601:648:8384:fd00:4878:c61e:b5b1:ef36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SWcmv1tmkz19WX; Fri, 17 Nov 2023 00:13:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <681da086-e250-4e7b-9baa-6b366742312e@FreeBSD.org> Date: Thu, 16 Nov 2023 16:13:02 -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 User-Agent: Mozilla Thunderbird Subject: Re: git: fd9ae9ac04ed - main - pkg: Allocate a suitably-sized string for the local ABI Content-Language: en-US From: John Baldwin To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202311160054.3AG0somJ049001@gitrepo.freebsd.org> In-Reply-To: <202311160054.3AG0somJ049001@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/15/23 4:54 PM, John Baldwin wrote: > The branch main has been updated by jhb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=fd9ae9ac04edf9acef4a2ffbf663698a2b8e7ced > > commit fd9ae9ac04edf9acef4a2ffbf663698a2b8e7ced > Author: John Baldwin > AuthorDate: 2023-11-16 00:53:53 +0000 > Commit: John Baldwin > CommitDate: 2023-11-16 00:53:53 +0000 > > pkg: Allocate a suitably-sized string for the local ABI > > Previously the local ABI string was written to an on-stack buffer and > the pointer to that buffer was saved in a global before the function > returned. This had two issues: c[ABI].val pointed to a > no-longer-valid on-stack buffer after config_init returned, and the > string could potentially be truncated. Fix both of those by changing > pkg_get_myabi to return a pointer to a string allocated by asprintf. > > Note that the allocated string is left in the global config array > until it is implicitly freed on process exit. > > Reported by: GCC 13 -Wdangling-pointer > Reviewed by: emaste > Differential Revision: https://reviews.freebsd.org/D42623 With this (and earlier fixes), I'm able to build amd64 world + GENERIC with GCC 13.2. The review for the port for that is still in review, but once the port lands I have a change against freebsd-ci to add GCC 13 jobs to Jenkins for main. -- John Baldwin From nobody Fri Nov 17 01:52:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWfz85S5kz51LWn; Fri, 17 Nov 2023 01:52: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 4SWfz8511Yz3Tnd; Fri, 17 Nov 2023 01:52:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700185924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8AAMuFeuQvRI2QerCadM8adqOFDxMZYuK/cgoHc6sNU=; b=reGn0Y8oTkzrIFfHAuwHpQIo5jH8eQbzkuHit8TAnQZeLc1i4PLE2wKfltcobkexX7RF0h Xa4QaowKM9e26erBwaJiDVuYEo8xF2ilCktipnDriX1YlUtACWrXrTl89wdFT/9n3RRVYw m0YMmU4TtXcF6XwCV4oQyW5uFg+c+th8DsKsmemZAeKyE1bliHKJJUHTz3Pg7q5Bs2UP1N j2i2qteCct7kTBO2Ky0FaNpmdq4GxGDSAw+OMuptRl/YleuMMSsgsitIWoVHAOfJLiQ//X YttapuNADKZYGviszr9ZoKztX49J2+WcCwSBUH57y8FLp7KCFwPMbdBKgutppg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700185924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8AAMuFeuQvRI2QerCadM8adqOFDxMZYuK/cgoHc6sNU=; b=NzO+VTfBEOGQyPFNmKZluE+awA32rIT5n0yOa5GYMdXdVMGQsSd8RyyrmEN0lZPwVSKHbx mHXVUv2XKZ/CXFSZDcOQCZsr5poOUU5qR1U5B72PbUAm6/zS6HRaJ1r1V8sAIHzrplzeeK KX/uBzUlLAXL+dDE+9yczrgdxDdtvICwc1LHhF+F8Ql2luOXbmdZtGgsSTDEDyHBE0VUuM sKI9k2VK62oycLFLJydgbXP8qN1F3e/EZlbmWsg8hmJEe3ooIpHYkZ5ecJxsRB9yNllTyY KuIvvstpM5GHe2k5/+nRTSUXGaNfJUGjiWOgaAUMjaKegC2fBLG5iZlYL9AfrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700185924; a=rsa-sha256; cv=none; b=A98bxeJfBRsuoiEF6oX7oKz+Eb/HBqjAUBWlocdGzgIP6Eq4CdZQnshV9sBQWiq551sHzV h5o35ifCrsAw93OzSQrmP/y3Wz62QJsyswNRFMotl/TmBpnd3h1CM7v+xtcGWCACtU+ubS ycGanWd3L1xXfQwC8lLb53WV5EToqWTQK5h4q3lVxH3g76kMGndmxZZNf8uZrwP1NdQcMd Wj8kBHGMGR0ryYpvikxTSBZU2r0YdHP6cOGAWnavDbQEoxjW2u6So+0AvwURAsUax5pJ6G BZVrBFoyAZb/dMkAS5y/OxpDNs+ECuzp3I+iA0Bv2KpCSZF3t0vlZa25JYyrzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWfz844m2z8X9; Fri, 17 Nov 2023 01:52: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 3AH1q4xV047930; Fri, 17 Nov 2023 01:52:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AH1q4hl047927; Fri, 17 Nov 2023 01:52:04 GMT (envelope-from git) Date: Fri, 17 Nov 2023 01:52:04 GMT Message-Id: <202311170152.3AH1q4hl047927@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: 22bac49b09a9 - main - vn_lock_pair(): reasonably handle vp1 == vp2 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22bac49b09a9f975330dc0d811436599ce740890 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=22bac49b09a9f975330dc0d811436599ce740890 commit 22bac49b09a9f975330dc0d811436599ce740890 Author: Konstantin Belousov AuthorDate: 2023-11-16 22:42:25 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-17 01:51:41 +0000 vn_lock_pair(): reasonably handle vp1 == vp2 case Lock the vnode in the most exclusive lock mode requested, once. All callers already ensure that vp1 != vp2 or are careful enough to only unlock once otherwise. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42642 --- sys/kern/vfs_vnops.c | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 27ce5401f15f..f81516608eeb 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -4042,10 +4042,10 @@ vn_lock_pair_pause(const char *wmesg) } /* - * Lock pair of vnodes vp1, vp2, avoiding lock order reversal. - * vp1_locked indicates whether vp1 is locked; if not, vp1 must be - * unlocked. Same for vp2 and vp2_locked. One of the vnodes can be - * NULL. + * Lock pair of (possibly same) vnodes vp1, vp2, avoiding lock order + * reversal. vp1_locked indicates whether vp1 is locked; if not, vp1 + * must be unlocked. Same for vp2 and vp2_locked. One of the vnodes + * can be NULL. * * The function returns with both vnodes exclusively or shared locked, * according to corresponding lkflags, and guarantees that it does not @@ -4056,12 +4056,14 @@ vn_lock_pair_pause(const char *wmesg) * * Only one of LK_SHARED and LK_EXCLUSIVE must be specified. * LK_NODDLKTREAT can be optionally passed. + * + * If vp1 == vp2, only one, most exclusive, lock is obtained on it. */ void vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, struct vnode *vp2, bool vp2_locked, int lkflags2) { - int error; + int error, locked1; MPASS(((lkflags1 & LK_SHARED) != 0) ^ ((lkflags1 & LK_EXCLUSIVE) != 0)); MPASS((lkflags1 & ~(LK_SHARED | LK_EXCLUSIVE | LK_NODDLKTREAT)) == 0); @@ -4071,6 +4073,35 @@ vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, if (vp1 == NULL && vp2 == NULL) return; + if (vp1 == vp2) { + MPASS(vp1_locked == vp2_locked); + + /* Select the most exclusive mode for lock. */ + if ((lkflags1 & LK_TYPE_MASK) != (lkflags2 & LK_TYPE_MASK)) + lkflags1 = (lkflags1 & ~LK_SHARED) | LK_EXCLUSIVE; + + if (vp1_locked) { + ASSERT_VOP_LOCKED(vp1, "vp1"); + + /* No need to relock if any lock is exclusive. */ + if ((vp1->v_vnlock->lock_object.lo_flags & + LK_NOSHARE) != 0) + return; + + locked1 = VOP_ISLOCKED(vp1); + if (((lkflags1 & LK_SHARED) != 0 && + locked1 != LK_EXCLUSIVE) || + ((lkflags1 & LK_EXCLUSIVE) != 0 && + locked1 == LK_EXCLUSIVE)) + return; + VOP_UNLOCK(vp1); + } + + ASSERT_VOP_UNLOCKED(vp1, "vp1"); + vn_lock(vp1, lkflags1 | LK_RETRY); + return; + } + if (vp1 != NULL) { if ((lkflags1 & LK_SHARED) != 0 && (vp1->v_vnlock->lock_object.lo_flags & LK_NOSHARE) != 0) From nobody Fri Nov 17 02:29:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWgnt1nHBz51NYg; Fri, 17 Nov 2023 02:29: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 4SWgnt1JySz3WRB; Fri, 17 Nov 2023 02:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700188146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PlV5qNrzvpnFUxlX4mZJNKZVZiNWLvNPjIo36vhKWVQ=; b=JWi9uKrT33sprhiFy8zYBVinY7vw45Iv635GHJz0/GbwC+cS6NEeFRaCrJEfuQlSaAsfYR zDinlVvhZX4yBaPRbyt235sjN7dtdhDIlYLe8i1oXYYWXwdmANUcGZvkIEJFa3FAUxCxa6 uuhRRzshtyBN2Szy52J0fySJSHDgl0NI+6vSbcFybLXDQ41N8VKl/BnHV+L/StefRt4QhJ ICPB4VCp5EOnq36RHktVxS1MENZ/Yo6rHzQcEDSMvs2xFoQxvxcB+Eb7eOupvK5DS8AYU4 B5bT706QB7YlwrDJxo2uj85V4Dbub/kH5WowuMJ7M51zSdJqZ12/7fuJljiphQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700188146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PlV5qNrzvpnFUxlX4mZJNKZVZiNWLvNPjIo36vhKWVQ=; b=HNo8rOsVtRWKOy7pwzb1fP7fWXgPjSNJo2kS1RDRbxFyLSon/3ydAk6hGIpVTagtR9MhJK 6EI6hpgQDxHHEe8Eqv1bokN5Gf/Ueew0CmbC2TwluIJPnZkdu1gdPHEDd5DBZD3t1fAuef Cn/QJSiM9fjZ2YQTKJsFe9GXOxj+lOYYBHzd6Zg1HtV+yMWz9Ad3fV1pa9nf97XpOrFh3b WK7RLkukK2S3EKYHPHVmvqFOZLkB2nQA2KPaiyxKmcArhs4Vn97hTb9OEcohy3YqtxnJs7 Kw+HKsiGWeksrBoVc/8BrHfBBUNfvbe+p2+xDxTeeo4mM9YXqaj4pmVcm1Lt+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700188146; a=rsa-sha256; cv=none; b=CwviU+997p5z+727cYJ6AUR6ROPBvaziSE72z1EAemcFf45/Ukme6O/yxVVs8BPJOoWk/4 U1OadGaIkWrCHCIRp6olUxLFa4k5yXH+pUL2vH0RMCztOBpFvPSxLJkfjKWNijSenBhk8o LyxVaTgylDZXZPaVTuaAakxYOtV6rf2aSEpgYOSYb65OZKl7gXGzMEU9Uq300PLZ9RTWI3 Vak3uiGdDkR4cjYR25552bZiRYJ49FFnChrd+dDDwWNftmOLqadQVVRJv9lSTPoFEB0G5n jtYajRM2tod3rJh5OeLVFjWpi2p6BhtE4SSMcjXlGmogLbs++35eNM7SuRznFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWgnt0NbPz9Vx; Fri, 17 Nov 2023 02:29: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 3AH2T51V004692; Fri, 17 Nov 2023 02:29:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AH2T5Be004689; Fri, 17 Nov 2023 02:29:05 GMT (envelope-from git) Date: Fri, 17 Nov 2023 02:29:05 GMT Message-Id: <202311170229.3AH2T5Be004689@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: b7a01b663a45 - stable/14 - pf_purge_expired_states(): fix build without SDT probes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b7a01b663a45d8506f3862392b1ce8d54a303efa Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b7a01b663a45d8506f3862392b1ce8d54a303efa commit b7a01b663a45d8506f3862392b1ce8d54a303efa Author: Konstantin Belousov AuthorDate: 2023-11-09 20:17:53 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-17 02:28:36 +0000 pf_purge_expired_states(): fix build without SDT probes (cherry picked from commit af21145f33d75c8d754b2371d03c181cd0c730e7) --- sys/netpfil/pf/pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index d5a9583d83f8..6e6b0b20130d 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -2175,7 +2175,7 @@ pf_purge_expired_states(u_int i, int maxcheck) struct pf_idhash *ih; struct pf_kstate *s; struct pf_krule_item *mrm; - size_t count; + size_t count __unused; V_pf_status.states = uma_zone_get_cur(V_pf_state_z); From nobody Fri Nov 17 02:31:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWgrM3JWYz51NZD; Fri, 17 Nov 2023 02:31: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 4SWgrM2Nnfz3XQj; Fri, 17 Nov 2023 02:31:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700188275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6IGU1WkM3e/n2LSi1kL2QWPN9wsl9ArJ0IU5MVr+nBs=; b=a8Tj7VofvpIl3R9uxXKq0S78cpcc7DHdXMsZ6JBePq+Nja8eVYwFJZvVaBpQB2GGWQ9VFv pHshpgvQWmI+V+fbzIqxxF9xxRZ+OyZXaoalLmRwzvB/nW9SPEQUihMUWnNx+ynytgRugA +JAS+hHlrC6gj5w9XsTfGt8NtWXPx93om2qdHvQL7OvOAEHW3tbeaEkaWGR3Mg1jlwFYNs H14gjmR78BYzidxUvDRtszBPTfe4Z9tgMZvYWtjycMyYYY3T/vcpfc8MPF9C6HG2WF13md t9fCMteqVvairC3PaZ5iVjDuJMl2n5vXGQz8ZbbadxkeCLNFLBqhOt/lYqBU8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700188275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6IGU1WkM3e/n2LSi1kL2QWPN9wsl9ArJ0IU5MVr+nBs=; b=Nj6HXxzJElhU7PiGHcwKp8xNaOsIqxQBbem9cD4Q+PUxlaRpKVyFwRRn8v4u74HP7JEahH ergDE4IpLtAc/Yctj+X4PMDKI6szWsRyvUmjSSg3wt5/N4JDIcn8Zf9BQi1+WuDL8gxLiV mwy0K78+I/MzYBxg7MIGQB4Bvmgp1dfDA/3tCyU062qLYAFZRAgQqFzrTf78qsOirC8GUQ 1zhvyJGLs5wsnz5xdkCM1eTuMuiFniDFIovszMs2KTJWLIA4Mvkm/0HzTQ58b8niC4z+5L BOEAJ65xTFyFfqEc/NLJrABafpfJxrJreDHJKcfaP5QcBApyW58qnrbvAZaFAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700188275; a=rsa-sha256; cv=none; b=qwheAC13viS7utNk0094Gi8yhJbvKLym1BTCDATbDE2U+1BbhZL2mb6OdK03y/pIcgEy5D Q1i6Mc21HCt0YMcmxBnaHxZqm0u5CwC81uwqsWFrmVp1UvHfi09z/3zMcNmm/6/mEdi/+7 Hg6tqdZn3wHCT2rPUwZ4jljzaT8sSCCXnk1+UUOxAKWj/MwPu3FsD0mFgiI0vMbFFaCUHL mJYmQuO5YsYkSRBdIyIWV3v9po1SBgi2Ht0avo3EDZBODGP1f0KFFRZRtlB2NMton59DyA krMgqhRbtwo5QNiq9VuNmrr5NA/8ldscHfYFFfcy+6bSZ8MY41eajiGOEwufOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWgrM1RqLz9g6; Fri, 17 Nov 2023 02:31: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 3AH2VFTk017115; Fri, 17 Nov 2023 02:31:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AH2VFWq017112; Fri, 17 Nov 2023 02:31:15 GMT (envelope-from git) Date: Fri, 17 Nov 2023 02:31:15 GMT Message-Id: <202311170231.3AH2VFWq017112@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: 70e30addafe4 - main - tcp: remove extraneous network epoch entry List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 70e30addafe406e01db4a6643932b73082886241 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=70e30addafe406e01db4a6643932b73082886241 commit 70e30addafe406e01db4a6643932b73082886241 Author: Gleb Smirnoff AuthorDate: 2023-11-17 02:30:35 +0000 Commit: Gleb Smirnoff CommitDate: 2023-11-17 02:30:35 +0000 tcp: remove extraneous network epoch entry accept(2) on IPv6 TCP doesn't need epoch. Some leaf functions may need it, but they will enter accordingly, see sa6_recoverscope(). Reviewed by: rscheff, tuexen (implicitly, see deleted XXXMT) Differential Revision: https://reviews.freebsd.org/D42634 --- sys/netinet/tcp_usrreq.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 8b0b3c296c62..8e5ef0fd4bf7 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -767,17 +767,14 @@ tcp6_usr_accept(struct socket *so, struct sockaddr **nam) struct tcpcb *tp; struct in_addr addr; struct in6_addr addr6; - struct epoch_tracker et; in_port_t port = 0; int v4 = 0; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp6_usr_accept: inp == NULL")); - NET_EPOCH_ENTER(et); /* XXXMT Why is this needed? */ INP_WLOCK(inp); if (inp->inp_flags & INP_DROPPED) { INP_WUNLOCK(inp); - NET_EPOCH_EXIT(et); return (ECONNABORTED); } tp = intotcpcb(inp); @@ -804,7 +801,6 @@ out: tcp_bblog_pru(tp, PRU_ACCEPT, error); TCP_PROBE2(debug__user, tp, PRU_ACCEPT); INP_WUNLOCK(inp); - NET_EPOCH_EXIT(et); if (error == 0) { if (v4) *nam = in6_v4mapsin6_sockaddr(port, &addr); From nobody Fri Nov 17 07:14:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWp894MZfz51cDS; Fri, 17 Nov 2023 07:15:21 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from mailgate.Leidinger.net (mailgate.leidinger.net [IPv6:2a00:1828:2000:313::1:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-256) client-digest SHA256) (Client CN "mailgate.leidinger.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SWp881vTDz4Qt7; Fri, 17 Nov 2023 07:15:20 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Authentication-Results: mx1.freebsd.org; none List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leidinger.net; s=outgoing-alex; t=1700205301; 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=Ritb6KWQfzctJrfWXZZkKNmNVQ9f/xaWuXy6deW4tFY=; b=tG8fwpuTZB94Tjem6hlQ3SuimbaEfjoLneiAvZ7aEQBQiYrP3pK5BrhpokSRHJt/vi61Yv z7M3KTuif6h5BO1325vZQXmTN50PhFcC3ClzRazRp9nEvRvHi/qId4sFjDVsispcLG6XIX 1rbCmPfcOIGJ7xuUQ5ZKH60QW70QC/beV++Ocs1urr0RYBftkM30T/MxQSuKB5AToRNN23 OP01ymQHRPi4BkM7bi93NfIdheS/uwSEL7mYtr88TM/UiX07NtIqpB5yMO5U71KwSsINg5 e03Jl+SxEgtXPhXwvejJ0xsL1i2hvBvWu5PxkiKvM462lGszbWh0DjJE5sC4vQ== Date: Fri, 17 Nov 2023 08:14:13 +0100 From: Alexander Leidinger To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0aa93010c571 - main - arm64: do not register elf32 brand if hardware cannot exec aarch32 In-Reply-To: <202311162206.3AGM6APE071518@gitrepo.freebsd.org> References: <202311162206.3AGM6APE071518@gitrepo.freebsd.org> Message-ID: X-Sender: Alexander@Leidinger.net Organization: No organization, this is a private message. Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=_878a4116d5e16ee44216c3e20d54e2fb"; micalg=pgp-sha256 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:34240, ipnet:2a00:1828::/32, country:DE] X-Rspamd-Queue-Id: 4SWp881vTDz4Qt7 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --=_878a4116d5e16ee44216c3e20d54e2fb Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Am 2023-11-16 23:06, schrieb Konstantin Belousov: > commit 0aa93010c571b88a6402405be22745fa05a5baab > Commit: Konstantin Belousov > CommitDate: 2023-11-16 22:04:40 +0000 > > arm64: do not register elf32 brand if hardware cannot exec aarch32 Would it make sense to add FEATURE(elf32, "...") and FEATURE(elf64, "...") to be able to query for it from userland? Bye, Alexander. -- http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_878a4116d5e16ee44216c3e20d54e2fb Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc; size=833 Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmVXEtIACgkQEg2wmwP4 2IaI7BAApQKtesj2tQnfquvqTEUqqr0G7AdNxNurpD763lsHDo9WBmLv8CQhHbnR PAg/MKYt2ZhcxpUdKWcEJftvom0xdab7K5PHcCjRviMUp8WTSZtpUWYmjJ1LrTxU PsEdOP9PYl15Xg8d9MkUUBfJtPTcb7kCpZv4cXEApcJVmA2u7iwVOoxv1oFD/3hK 5vCIzRJ7wTUINe5cxdcQ53HyuSECwHJGEwHb6dTyJ45em7kNoWhN+BYzSzOV6P3g VRmjg8dH82soaXNX7OqusGuTVLPKCpqK5+nhuWbZNrmnpScTdvNJV5+EhC846QUi 8Qd6ber20HUQVfi3ORBw3y8fNQ94x++YNdqVXSdaioyUgnwnBEH79WLwuwGVhCZ1 wB7TmaIqJpL6+krJBsRdrpfdZUHrq63Vwbg2LfQsmCMiUZVAGnMSAuSvm40Rt41y yVGdL5s4UHytFjAYbFuQj9xiaAG8dzGthSqhwKwdSl8PqBhlVkOCrBia4NWrpIdR ouoUyQgFcw3+5zN2oY7Fp6tL0AoJKFAqHg7gl7T1pgindJpmM6137JV3GMtAmIRB kQtbaMeHdz9acz3IQAqCw0LVdlczODXOi9XbWzNfsF58KkvfmQs2C3onI2W+/cj4 q0fsBKWuQji78GUdf9w7rzbibYVA3yuA5nTiCqSXyHAtoZIEN10= =Cy1u -----END PGP SIGNATURE----- --=_878a4116d5e16ee44216c3e20d54e2fb-- From nobody Fri Nov 17 07:29:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWpSz5bxlz51cd2; Fri, 17 Nov 2023 07:29:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4SWpSz2dPzz4SMK; Fri, 17 Nov 2023 07:29:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.17.1/8.17.1) with ESMTP id 3AH7Tf9F001847; Fri, 17 Nov 2023 09:29:44 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 3AH7Tf9F001847 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 3AH7Tfme001846; Fri, 17 Nov 2023 09:29:41 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 17 Nov 2023 09:29:41 +0200 From: Konstantin Belousov To: Alexander Leidinger Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0aa93010c571 - main - arm64: do not register elf32 brand if hardware cannot exec aarch32 Message-ID: References: <202311162206.3AGM6APE071518@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=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4SWpSz2dPzz4SMK On Fri, Nov 17, 2023 at 08:14:13AM +0100, Alexander Leidinger wrote: > Am 2023-11-16 23:06, schrieb Konstantin Belousov: > > > commit 0aa93010c571b88a6402405be22745fa05a5baab > > > Commit: Konstantin Belousov > > CommitDate: 2023-11-16 22:04:40 +0000 > > > > arm64: do not register elf32 brand if hardware cannot exec aarch32 > > Would it make sense to add FEATURE(elf32, "...") and FEATURE(elf64, "...") > to be able to query for it from userland? https://reviews.freebsd.org/D42641 From nobody Fri Nov 17 08:39:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWr0l34jMz50gyr for ; Fri, 17 Nov 2023 08:39: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 4SWr0l2ZxZz4Xpj; Fri, 17 Nov 2023 08:39:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700210343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lq84iHr3YVlfTAAKGNmquU48QNdNsSuPz2a+Sq0axjc=; b=AJTW9u2DSQcobU2vpMSdXMIGkWK6Y6IGGtJCS6myBboVFrMMJ+Fc7mCweufi4lNf0mLv/r W5oghe5OoOocLmmc91bgj71e5OgG4BRYiUdlB797VyInD/ZWzQdU3bQzlganvt79jVrDli 95QEZdOrctvbyhM4gesSdkJvf6Z8Ou2l+m5fR5DuxQpdG+leKpgnUPomozTsisinEkhSid WIeIRqWEYi7vCEuFVOTO/MP1YboPunjuw1BDjaKzVg9ycH6bFr5uYw8qGPdiJFlluBEZXp OUCcY9Tf+daBTy57HEYy4zgddpyosFsbGvlwE70RGvXiY7xOAI97/Gq9kHpZEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700210343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lq84iHr3YVlfTAAKGNmquU48QNdNsSuPz2a+Sq0axjc=; b=U/P32ETyZeniYyoQ1MxwbaR7eyMSX0ZSz5uQnP4QVlpsrJDUEdweWLlJESVoiQdxpqHAEE DgkIbd7IyvHtjPIjPyHkjw9nvOZUmVhCxfxEhI8CalMzHZV93Jz/s6cgon6sMW+Gvvikek 40jdQ82Oe9tgbAA+BwKHk9puWrmB5NtHpBUbegcDZUhJTXJYKN8ENLp+WmFbedWbuFT+75 nBFgLBpzkLYy0+eoyb1i42mXHwKkto1AbIpPyjv5vu1pABbPd38qGAYMl97sbBkK2GHSXR KQHV2bjvZqMOhWgsWVvdD3M6rJLkeYFYGxHoYLgQx7glLNjef4qcJmMFmA2/bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700210343; a=rsa-sha256; cv=none; b=U09K8iwpu7l9bmhyqxY9DiGqqKDQohxYcHqnOGOnGAw27Lh3gluwYq2XfD0T4ORQ6EiO/s lLV2HL3MTYBLpyPlRaKbYUraGh/UmeNmyvK/UW2aSoZ3cF552bsHcSvhdudzYHTu29xcJY xbfsV90JWw6NTYVP261/L6n0+TwWIHOfRXc+VfTItngTInURvl1gI2mlAk29gMIY6AASKp 0Cgy3rGf/HE4FLqH6r1au8heZuukGWitCsWAhjMBTyGPtcAd8Jks1SokTyupiMjnvmFm2Z PJ0GrVL3Te/S1/VoLrBh6lXd+xmkBUtGdZUITT1/lZ1V5mU1N44kb6tqn3nNuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWr0l1fNSzbxk; Fri, 17 Nov 2023 08:39: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 3AH8d3pa022584; Fri, 17 Nov 2023 08:39:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AH8d3Hc022583; Fri, 17 Nov 2023 08:39:03 GMT (envelope-from git) Date: Fri, 17 Nov 2023 08:39:03 GMT Message-Id: <202311170839.3AH8d3Hc022583@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 887a3c533b94..03e9caaec006 - 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: 03e9caaec006134b3db9d02ac40fe9369ee78b03 X-Git-Oldrev: 887a3c533b94a4b70075e310f15c45b9dee19410 X-Git-Newrev: 03e9caaec006134b3db9d02ac40fe9369ee78b03 Auto-Submitted: auto-generated The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=887a3c533b94..03e9caaec006 15a8fa76b2da Update zpool-features.7 for grub2 compatibility list updates 40fccc423a87 ZTS: Test for all known zpool feature sets 3a8d9b848723 Linux: Reclaim unused spl_kmem_cache_reclaim 786641dcf9a7 Workaround UBSAN errors for variable arrays 231965680200 Linux 6.6 compat: META da51bd17e5c3 Fix snap_obj_array memory leak in check_filesystem() 35da34516074 L2ARC: Restrict write size to 1/4 of the device 5796e3a74265 Packaging: Auto-generate changelog during configure (#15528) 03e9caaec006 Add a tunable to disable BRT support. From nobody Fri Nov 17 08:57:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWrPT2R88z50jq3; Fri, 17 Nov 2023 08:57: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 4SWrPT1tLdz4ZKV; Fri, 17 Nov 2023 08:57:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700211421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VMwMMRv0eerrx2OEvwZhDBxIfZ9HhH7wuGHZcOu01Uc=; b=j5hh8JnWbthddD65LQZXR5v+Am/ca2DqS1+K3h2wQADrdTKe7exSQF1w56pz2/IZam2CHY gBJLl4eM5kWK2Z1lD4v+tB6cnRU1gjK2xBlvd2LVbjilZn1HV2FSITMJpAJJpXa6nDisxb R3x49YFx/QCeSal4EP9POf3abiwXpbKUJXojZ2p1IfTT1V/8ToT2bZGLobNPlBHVVXeV3b WyoUjuCsQHJRxrYznIaYZAmOcnb8rruJHXIHg/0zIx61wb5lopLRlilzpRNlE+BRlYTerv wNez9sXPWE7ltnC1KEbqIOVFPXsWiHpQpF5iNr1VZd91/SUca2gx0L5Kgzz4pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700211421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VMwMMRv0eerrx2OEvwZhDBxIfZ9HhH7wuGHZcOu01Uc=; b=RCeaQeLn8z2fch3jMccVYgxJMQovnGwjiMNZeC67l1Q2+e9meQWJWtOoPk2EHxcL7Ic9oj 0T8Ernzfbu46eJnh9MIP1PUIA/CBfKO3CwmJYxDZNV2dSKxb0x3SBemtwaRmpH7IQBczzR ILI1O2sDn4+TY9LK3kArnIRtkghwoACrWlU4Vu+DovOuU/1DCFtEss1LODn7j/PwFgbFyr icRuK7QP7BUenpcaLuwVsAl7HeQGXeLDLbxI2QBxfzszvH92eemDJsofnLfTHMFgS8t/mU MwUPz0HUlYHaa9u5qLMveRcT5R1Joz7XJYYNbN6KO4QRViAsdeL22WxEGDQGUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700211421; a=rsa-sha256; cv=none; b=XpFVd9+aed5lsJZwDNvJ8koIYFxjZSwZy3K6sIojTe9dGKJ2k2+eBxwHy0hoDiEJ4usqTe znJZWOnCSdyz/vrrIwxq8kDYdTjpJZHRyJRWoN80cW3hVtgb4u+lImzBNH5jNH21vUWt+S XVUQPcizZvZTf6H36uVvKOa/JBZ1Po/Y2CQxQENV2NbrdGpUjSEhgQwWgcpYcYbI07yHbM 1YuynmZ6NVi9i1ksz67H9iRMfaFBY5gBSN371qSVjAvRYSijIIso3VxL58Oc4IN8tE1ois zUVm8q7ojzeQ0358JEvchdWBepZsfeiq4yENt/fVUZDGnTVGa+/FdauU6C5z2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWrPT0xw8zck7; Fri, 17 Nov 2023 08:57: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 3AH8v1eO055790; Fri, 17 Nov 2023 08:57:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AH8v0qF055788; Fri, 17 Nov 2023 08:57:00 GMT (envelope-from git) Date: Fri, 17 Nov 2023 08:57:00 GMT Message-Id: <202311170857.3AH8v0qF055788@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: 47bb16f8f092 - main - zfs: merge openzfs/zfs@03e9caaec List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 47bb16f8f09238e8d46e9e441a837e4bb28f6a00 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=47bb16f8f09238e8d46e9e441a837e4bb28f6a00 commit 47bb16f8f09238e8d46e9e441a837e4bb28f6a00 Merge: 70e30addafe4 03e9caaec006 Author: Martin Matuska AuthorDate: 2023-11-17 08:39:42 +0000 Commit: Martin Matuska CommitDate: 2023-11-17 08:39:42 +0000 zfs: merge openzfs/zfs@03e9caaec Notable upstream pull request merges: #15516 da51bd17e Fix snap_obj_array memory leak in check_filesystem() #15519 35da34516 L2ARC: Restrict write size to 1/4 of the device #15529 03e9caaec Add a tunable to disable BRT support Obtained from: OpenZFS OpenZFS commit: 03e9caaec006134b3db9d02ac40fe9369ee78b03 sys/contrib/openzfs/.gitignore | 1 + sys/contrib/openzfs/META | 2 +- .../cmd/zpool/compatibility.d/openzfsonosx-1.8.1 | 1 - sys/contrib/openzfs/configure.ac | 1 + .../contrib/debian/{changelog => changelog.in} | 6 +++++ .../openzfs/include/os/linux/spl/sys/kmem_cache.h | 4 +-- .../include/os/linux/zfs/sys/zfs_vfsops_os.h | 2 ++ sys/contrib/openzfs/include/sys/vdev_raidz_impl.h | 4 +-- sys/contrib/openzfs/man/man4/spl.4 | 8 ------ sys/contrib/openzfs/man/man4/zfs.4 | 5 ++++ sys/contrib/openzfs/man/man7/zpool-features.7 | 9 +++++++ sys/contrib/openzfs/module/Kbuild.in | 4 +++ .../openzfs/module/os/linux/spl/spl-kmem-cache.c | 11 -------- .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 4 +++ .../openzfs/module/os/linux/zfs/zpl_file_range.c | 5 ++++ sys/contrib/openzfs/module/zfs/arc.c | 30 +++------------------- sys/contrib/openzfs/module/zfs/spa_errlog.c | 6 +++-- .../openzfs/tests/zfs-tests/include/libtest.shlib | 15 +++++++++++ .../openzfs/tests/zfs-tests/include/tunables.cfg | 1 + .../tests/functional/block_cloning/cleanup.ksh | 4 +++ .../tests/functional/block_cloning/setup.ksh | 5 ++++ .../tests/functional/cache/cache_012_pos.ksh | 20 +++++---------- .../zpool_create/zpool_create_features_007_pos.ksh | 10 +++++--- 23 files changed, 87 insertions(+), 71 deletions(-) diff --cc sys/contrib/openzfs/.gitignore index 47d17ae16d34,000000000000..a2cb92dd5406 mode 100644,000000..100644 --- a/sys/contrib/openzfs/.gitignore +++ b/sys/contrib/openzfs/.gitignore @@@ -1,89 -1,0 +1,90 @@@ +# +# This is the top-level .gitignore file: +# ignore everything except a list of allowed files. +# +# This is not the place for entries that are specific to +# a subdirectory. Instead add those files to the +# .gitignore file in that subdirectory. +# +# N.B. +# Please use 'git ls-files -i --exclude-standard' +# command after changing this file, to see if there are +# any tracked files which get ignored after the change. + +* + +!.github +!cmd +!config +!contrib +!etc +!include +!lib +!man +!module +!rpm +!scripts +!tests +!udev + +!.github/** +!cmd/** +!config/** +!contrib/** +!etc/** +!include/** +!lib/** +!man/** +!module/** +!rpm/** +!scripts/** +!tests/** +!udev/** + +!.editorconfig +!.cirrus.yml +!.gitignore +!.gitmodules +!.mailmap +!AUTHORS +!autogen.sh +!CODE_OF_CONDUCT.md +!configure.ac +!copy-builtin +!COPYRIGHT +!LICENSE +!Makefile.am +!META +!NEWS +!NOTICE +!README.md +!RELEASES.md +!TEST +!zfs.release.in + +# +# Normal rules +# +*.[oa] +*.o.ur-safe +*.lo +*.la +*.mod.c +*~ +*.swp +*.gcno +*.gcda +*.pyc +*.pyo +.deps +.libs +.dirstamp +.DS_Store +modules.order +Makefile +Makefile.in ++changelog +*.patch +*.orig +*.tmp +*.log From nobody Fri Nov 17 09:00:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWrTh0zvmz50jmy; Fri, 17 Nov 2023 09:00: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 4SWrTh0HK4z4Zx4; Fri, 17 Nov 2023 09:00:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700211640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1LH4koiX+DN7shP5WskBSrpqxRvJokwLuMyA+JU7+2c=; b=hZ99E61paZ/lB/MVn+hnF8REKbbWde5xpbF5FeASSu4yzl90hscGgQqoOFlZhrWMJRbQ5e +SN9blt7YPeYhgBtuxN/UKE9hZ90LMn2bMGpLaW97yQg/qS4XSc3XFBZ4+NQ/KzG1fPiUl tXI3xAbv3DrIlG+gPc3YjycwkXKB10OV8AyITgsX7FZ7YgGMSMj18rbE1UjFqRbSa9L9WJ dHrDtfv5D3KliEiuIbEmtIBiOXnTxjlABATSJOXxI7xXe7GPH3lsxfT1VaSsZy4vzhwNnp aOApMgJrQAyWuZIEjp1q1XuG29FVcsS/wY5iA1huXg9XHDga8a2Etauru3gBSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700211640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1LH4koiX+DN7shP5WskBSrpqxRvJokwLuMyA+JU7+2c=; b=tAYfKhwFoLhqOVH0ctf64lqcLUkuqiyf4A/82+fYdpCUMiT76p0MnUgRi+2rH6OqIYKgV6 DnrpQ4yZqsZYMhVpWBdFbD36nWnHnYUHOVcxDcs3NKvr8Kss7klS6AJmZbtALkzTmGjTuS ZJHy7TxPs5KYj40ijIxbRTjAmq9pIpNsHG3CrV5uixrlPpMLsinBobMOiUFt6SQnc0gPrh aBPfbNJn5xtFZoD321zll2Pvyky3uzVKPWJZO8BrhEvTg9nru9I0CULJX/YXCu488AF1eR sWuk6CQLpv9NgmwWm0N/iABI/o2yM0qkjGveQpCyIvk+KkPn0gS2lXqWfD3+5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700211640; a=rsa-sha256; cv=none; b=Q7xeou8O+XtxWjE7v/5b+2Nvy6AVQ+O7QT1gEOTCM+5ZjYy0M9Te4VlQOd/ajDCwNTlyGH TtTDoqkxXAyMZDMhFXmHkoyaJO8bk+61EvLzWp0qPr8VnibqmqsSyH5JfUGSroPodQkLGO j2js4aUBW9uAmUwv8ha6gmbhG39qZP/wJwuNT+WIDMDaptN/U0lA6Lt5l99obCKwd26w1U ljoQaAYbAwefjOECUPIWodFiizVsEd3Jc9uuIK+WLNcM3Q5ePhchGLKYBS2MQ2pkteAW2D uD6/drgMsVs8tXrGT3R6A6Sb84tF9UUGZLdhy+t0QQL5HoLEyESoShpq+n42nA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWrTg6TJ5zckB; Fri, 17 Nov 2023 09:00: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 3AH90dHC065929; Fri, 17 Nov 2023 09:00:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AH90dbT065926; Fri, 17 Nov 2023 09:00:39 GMT (envelope-from git) Date: Fri, 17 Nov 2023 09:00:39 GMT Message-Id: <202311170900.3AH90dbT065926@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 51a024c42c46 - stable/14 - pfsync: Document the transport over IPv6 feature List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 51a024c42c4698da1616f1126fb0af4660a3155d Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=51a024c42c4698da1616f1126fb0af4660a3155d commit 51a024c42c4698da1616f1126fb0af4660a3155d Author: Luiz Amaral AuthorDate: 2023-11-10 15:40:02 +0000 Commit: Kristof Provost CommitDate: 2023-11-17 09:00:22 +0000 pfsync: Document the transport over IPv6 feature On D40102 we implemented support for transport over IPv6 but the documentation was not updated to reflect the new feature. Clarify what is available and how it can be used. MFC after: 1 week Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D42505 (cherry picked from commit 81d4c786209bfa3752c25b2564eb363027f5d914) --- sbin/ifconfig/ifconfig.8 | 24 ++++++++++++++++++------ share/man/man4/pfsync.4 | 21 ++++++++++++++++++++- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index bd6cbd05210e..3b1774606b21 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -27,7 +27,7 @@ .\" .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" -.Dd October 17, 2023 +.Dd November 08, 2023 .Dt IFCONFIG 8 .Os .Sh NAME @@ -2870,12 +2870,24 @@ to send and receive pfsync state synchronisation messages. .It Fl syncdev Stop sending pfsync state synchronisation messages over the network. .It Cm syncpeer Ar peer_address -Make the pfsync link point-to-point rather than using -multicast to broadcast the state synchronisation messages. -The peer_address is the IP address of the other host taking part in -the pfsync cluster. +Set the destination address for the state synchronization messages sent. +The +.Ar peer_address +is normally the IPv4 or IPv6 address of the other host taking +part in the pfsync cluster. +.Pp +When the +.Ar peer_address +is set to a unicast IP address, the pfsync link will behave +as point-to-point rather than using multicast to broadcast the messages. +.Pp +When the +.Ar peer_address +is set to ff12::f0, the state synchronization +messages will be broadcast using multicast over IPv6. .It Fl syncpeer -Broadcast the packets using multicast. +Unset the syncpeer. +Packets will then be broadcast using multicast over IPv4. .It Cm maxupd Ar n Set the maximum number of updates for a single state which can be collapsed into one. diff --git a/share/man/man4/pfsync.4 b/share/man/man4/pfsync.4 index 4decb50feb7b..b3603c48316e 100644 --- a/share/man/man4/pfsync.4 +++ b/share/man/man4/pfsync.4 @@ -24,7 +24,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 17, 2023 +.Dd November 08, 2023 .Dt PFSYNC 4 .Os .Sh NAME @@ -113,6 +113,25 @@ dedicated to pfsync messages such as a crossover cable between two firewalls, or specify a peer address and protect the traffic with .Xr ipsec 4 . .Pp +Support for +.Nm +transport over IPv6 was introduced in +.Fx 14.0 . +To set up +.Nm +using multicast with IPv6 link-local addresses, the +.Ic syncpeer +must be set to the +.Nm +multicast address and the +.Ic syncdev +to the interface where +.Nm +traffic is expected. +.Bd -literal -offset indent +# ifconfig pfsync0 syncpeer ff12::f0 syncdev vtnet0 +.Ed +.Pp When new features are introduced to .Xr pf 4 the format of messages used by From nobody Fri Nov 17 09:00:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWrTy3HM0z50k1w; Fri, 17 Nov 2023 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 4SWrTy2rfxz4bL8; Fri, 17 Nov 2023 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=1700211654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zotkTLVVF86blhX0UUKL3YorN6WmY1ncAMpDd+67Fvg=; b=AnyYcDa+FAky/x0K3TvihPBhu0sI7JQhZl7MNnRtJFNeoPSMGtBbATIOuqzgvw3ZxhIlXw GjjNbIW73JC2VETVxKAyBmuOlO6mroOEy5jJ7odJXfUK0PQEghPScqFnjOfMJla+8HGzAh eEUkV5L3mKkf0yuU/KDIpGha9evjHbuYEX+e5qXB44fFTt1aUFBGzzucdNHQOrFVawrlYG d+i6yVYADg7poBl4Q+fStJGMiaACIUgwKWA2IXdI7SIMjF1Ricowp3k3ELGigUnvFCVJBf jFnbUv5KUa9xCG5F9M7bASg8V62ssf94N/qOfE1D3121tIabYcet+imn7T6EWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700211654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zotkTLVVF86blhX0UUKL3YorN6WmY1ncAMpDd+67Fvg=; b=aPAk8GCRV9mOp0orVavhgOE4PnG7acMZWDXsCtfT8hKrSRKmfAj3mA56YWIpVnboBftaYj M3/y0ZXMVz2mkfsgISL+zUGaAL+8phKrjp/oEDCeLEg8VVVHGZs6xkzYdy3/oXtTpNhzSd IPmnvTBYOJmMDdUvwD8jbBhlnsnFpn0YpQciY8WTh0izzc0s+ECmE+21+ag+6XrEVuzKUB 8N/67/gN3f0Y5Kz++DaLrv1rTptYNxK140ShgnD0hY/zyXpOTdVwJIUaMUlRIVqxPe1vau YvMWVna7qBEYtgDF7tR2uXYzSA6TSu9lNJCp1XspKD2qZKG1318zFzRHIrVTxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700211654; a=rsa-sha256; cv=none; b=kVIkfsrOZW7jwSVarTxBhp1rLSdyWBr8qsLXwMtw/7aOt2O8I+KKyB9eNFGllBY99OjPee LX1bxC4oF+hNDT9TzSUKvjw4QDWviLyyiskJ21uojjLnVOzHH+WfEyNX5I/3140VwN2w2K wPTWkSzhBqQq34ip4BiUdXHzYa68Igoa8Wl4m/h5GVU9dOLF2/4bhippadh39sG+XGd3SM 1/c5w5XbXQjrCcCyX9nGRvhT1yWO4xwdbWrjEt4UyQgDapyVGOQSXqngEdOPMrzmFAA8h+ zrqO9LAu6pEBsRHV6OBHyExTDDETf9UvUMbea0vwtOgWYkL4CdrslJzh5uZBOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWrTy1vRSzcy0; Fri, 17 Nov 2023 09:00: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 3AH90set066088; Fri, 17 Nov 2023 09:00:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AH90sR1066085; Fri, 17 Nov 2023 09:00:54 GMT (envelope-from git) Date: Fri, 17 Nov 2023 09:00:54 GMT Message-Id: <202311170900.3AH90sR1066085@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: cf0ad6fd642d - main - zfs: update zfs_config.h and zfs_gitrev.h missed in 47bb16f8f0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: cf0ad6fd642d0d6ab0c3b164677a26030df39618 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=cf0ad6fd642d0d6ab0c3b164677a26030df39618 commit cf0ad6fd642d0d6ab0c3b164677a26030df39618 Author: Martin Matuska AuthorDate: 2023-11-17 09:00:16 +0000 Commit: Martin Matuska CommitDate: 2023-11-17 09:00:16 +0000 zfs: update zfs_config.h and zfs_gitrev.h missed in 47bb16f8f0 --- sys/modules/zfs/zfs_config.h | 6 +++--- sys/modules/zfs/zfs_gitrev.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/modules/zfs/zfs_config.h b/sys/modules/zfs/zfs_config.h index 686ab2e3f80d..3fb946f3de98 100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@ -1110,7 +1110,7 @@ /* #undef ZFS_IS_GPL_COMPATIBLE */ /* Define the project alias string. */ -#define ZFS_META_ALIAS "zfs-2.2.99-202-FreeBSD_g887a3c533" +#define ZFS_META_ALIAS "zfs-2.2.99-211-FreeBSD_g03e9caaec" /* Define the project author. */ #define ZFS_META_AUTHOR "OpenZFS" @@ -1119,7 +1119,7 @@ /* #undef ZFS_META_DATA */ /* Define the maximum compatible kernel version. */ -#define ZFS_META_KVER_MAX "6.5" +#define ZFS_META_KVER_MAX "6.6" /* Define the minimum compatible kernel version. */ #define ZFS_META_KVER_MIN "3.10" @@ -1140,7 +1140,7 @@ #define ZFS_META_NAME "zfs" /* Define the project release. */ -#define ZFS_META_RELEASE "202-FreeBSD_g887a3c533" +#define ZFS_META_RELEASE "211-FreeBSD_g03e9caaec" /* Define the project version. */ #define ZFS_META_VERSION "2.2.99" diff --git a/sys/modules/zfs/zfs_gitrev.h b/sys/modules/zfs/zfs_gitrev.h index d2aeef5edc18..5924053674c3 100644 --- a/sys/modules/zfs/zfs_gitrev.h +++ b/sys/modules/zfs/zfs_gitrev.h @@ -1 +1 @@ -#define ZFS_META_GITREV "zfs-2.2.99-202-g887a3c533" +#define ZFS_META_GITREV "zfs-2.2.99-211-g03e9caaec" From nobody Fri Nov 17 11:08:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWvKX5vggz50r53; Fri, 17 Nov 2023 11:08: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 4SWvKX4W8rz3GP2; Fri, 17 Nov 2023 11:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700219328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a/E2kMGc0Pd+sFCYtSrHuXjAHFQQt5k1EGrMFuJo6tI=; b=VVTcQ8T51gbb6K2/eZI8TlAr0zys4H163IViUsqSdfWrC9iP+pL79wdJA7j7/8G2+4qfBa CHV63m5sLymKqu90Ygg5HoKx6BxAsEawvZhhE8r4gytc/qcl9NTK1ssYbcf/Uml26MERyE 2qCcZNxUBWbMIuInQc40oiKRR8ooBYcigkYJNS2Hmpw0meCXLmXSCQbNGof25kOx8KwTuz j+0Poth4ggP5a7qerHQq8z8VoYGkwbJjgmGaBSacWw/74hYSILsKBIIy4ZaUffhaK7dUE5 wWsIf1M+vac7oPqGAQs5m2LjTRgiiM1BxZo6t7nTQy6zjWRB95df9mWXrbH/7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700219328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a/E2kMGc0Pd+sFCYtSrHuXjAHFQQt5k1EGrMFuJo6tI=; b=STXImLSO4z8gcATsShWidna247ypU/5bW/R6uLHNONqGlVF+7ANaITkraXr2cR0DWXVkU4 XFFZ47u6JWQiF0kmcp5i4eO5h7WwuZ4EIfY5opmkRdXU5bWyFlGkxbdIFgd0lxvaJmkwF0 u4Wm30ZXOhJF3c2NBplkNpYDczjNy1VqcJR+Wk6VIgWZTbgsA9KrJZEczrRSHE6kvbADKh cQ3mQM7EcsQJPjwXPj4V9Wr0eHpnL7sAw5mthRJ00DoNeR/4E1yRTtbv6moF/5wyy9kQZM KQmRFFxc3YgGdsxdqStiHdJN5gnqe7qgOTG57Ho3qHBdVWpG+3w5sh2eegzqAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700219328; a=rsa-sha256; cv=none; b=h8TqiffljcFBMJjGa6Ug8Kp+Z1aXuhXk7X34cmYzV1A4dyuim5p3Dbr8W/idktTTvrMX6b ab5E5pGFePDpR3mhrlO3WfKtvXlp/fMCe9F8oY8dK2yCwRncj/RVEL0WDzpJBOA9mhge7C mEQ9X5th8X00vK0/mOTI1eYRlnfXwGyXilZ10Xq3IYo0NJXZY25AaH6cjfKjOeO5ACwLMK Tx1eQdLw2Cp6kvoQiu11p91XniVA13GfZ3fR2KrlUuv88UNOLAurgV3ybmX/9u/u5CwwL4 5GVf13l+c5n7bFDFC0EeR1wfSl6Y64bVy0VOGqExun1QJIEOt/lh7spljlQtBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWvKX3MJTzgcy; Fri, 17 Nov 2023 11:08: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 3AHB8mb4073426; Fri, 17 Nov 2023 11:08:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHB8mYJ073423; Fri, 17 Nov 2023 11:08:48 GMT (envelope-from git) Date: Fri, 17 Nov 2023 11:08:48 GMT Message-Id: <202311171108.3AHB8mYJ073423@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: 49a6fbe38728 - main - [tcp] add PRR 6937bis heuristic and retire prr_conservative 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: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49a6fbe38728173da74d5b497f700178e2a6c830 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=49a6fbe38728173da74d5b497f700178e2a6c830 commit 49a6fbe38728173da74d5b497f700178e2a6c830 Author: Richard Scheffenegger AuthorDate: 2023-11-15 21:37:42 +0000 Commit: Richard Scheffenegger CommitDate: 2023-11-15 22:10:29 +0000 [tcp] add PRR 6937bis heuristic and retire prr_conservative sysctl Improve Proportional Rate Reduction (RFC6937) by using a heuristic, which automatically chooses between conservative CRB and more aggressive SSRB modes. Only when snd_una advances (a partial ACK), SSRB may be used. Also, that ACK must not have any indication of ongoing loss - using the addition of new holes into the scoreboard as proxy for such an event. MFC after: 4 weeks Reviewed By: #transport, kbowling, rrs Sponsored By: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28822 --- share/man/man4/tcp.4 | 8 +------- sys/netinet/tcp_input.c | 47 +++++++++++++++++++++++++++++++---------------- sys/netinet/tcp_sack.c | 32 ++++++++++++++++++++------------ sys/netinet/tcp_var.h | 13 ++++++++++--- 4 files changed, 62 insertions(+), 38 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 0ee57dcb0594..16c9e0ce84df 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -33,7 +33,7 @@ .\" .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" -.Dd June 29, 2023 +.Dd November 17, 2023 .Dt TCP 4 .Os .Sh NAME @@ -480,12 +480,6 @@ This improves the effectiveness of retransmissions particular in environments with ACK thinning or burst loss events, as chances to run out of the ACK clock are reduced, preventing lengthy and performance reducing RTO based loss recovery (default is true). -.It Va do_prr_conservative -While doing Proportional Rate Reduction, remain strictly in a packet conserving -mode, sending only one new packet for each ACK received. -Helpful when a misconfigured token bucket traffic policer causes persistent -high losses leading to RTO, but reduces PRR effectiveness in more common settings -(default is false). .It Va do_tcpdrain Flush packets in the .Tn TCP diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index ba11503955dc..3673bc1e0b98 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -159,11 +159,6 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, drop_synfin, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(drop_synfin), 0, "Drop TCP packets with SYN+FIN set"); -VNET_DEFINE(int, tcp_do_prr_conservative) = 0; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_prr_conservative, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(tcp_do_prr_conservative), 0, - "Do conservative Proportional Rate Reduction"); - VNET_DEFINE(int, tcp_do_prr) = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_prr, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_do_prr), 1, @@ -1524,7 +1519,8 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, int drop_hdrlen, int tlen, uint8_t iptos) { uint16_t thflags; - int acked, ourfinisacked, needoutput = 0, sack_changed; + int acked, ourfinisacked, needoutput = 0; + sackstatus_t sack_changed; int rstreason, todrop, win, incforsyn = 0; uint32_t tiwin; uint16_t nsegs; @@ -1539,7 +1535,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, thflags = tcp_get_flags(th); tp->sackhint.last_sack_ack = 0; - sack_changed = 0; + sack_changed = SACK_NOCHANGE; nsegs = max(1, m->m_pkthdr.lro_nsegs); NET_EPOCH_ASSERT(); @@ -2582,7 +2578,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, */ if (th->th_ack != tp->snd_una || (tcp_is_sack_recovery(tp, &to) && - !sack_changed)) + (sack_changed == SACK_NOCHANGE))) break; else if (!tcp_timer_active(tp, TT_REXMT)) tp->t_dupacks = 0; @@ -2591,8 +2587,9 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, cc_ack_received(tp, th, nsegs, CC_DUPACK); if (V_tcp_do_prr && - IN_FASTRECOVERY(tp->t_flags)) { - tcp_do_prr_ack(tp, th, &to); + IN_FASTRECOVERY(tp->t_flags) && + (tp->t_flags & TF_SACK_PERMIT)) { + tcp_do_prr_ack(tp, th, &to, sack_changed); } else if (tcp_is_sack_recovery(tp, &to) && IN_FASTRECOVERY(tp->t_flags)) { int awnd; @@ -2667,8 +2664,12 @@ enter_recovery: * cc_cong_signal. */ if (tcp_is_sack_recovery(tp, &to)) { + /* + * Exclude Limited Transmit + * segments here + */ tp->sackhint.prr_delivered = - tp->sackhint.sacked_bytes; + maxseg; } else { tp->sackhint.prr_delivered = imin(tp->snd_max - tp->snd_una, @@ -2771,7 +2772,7 @@ enter_recovery: * counted as dupacks here. */ if (tcp_is_sack_recovery(tp, &to) && - sack_changed) { + (sack_changed != SACK_NOCHANGE)) { tp->t_dupacks++; /* limit overhead by setting maxseg last */ if (!IN_FASTRECOVERY(tp->t_flags) && @@ -2797,7 +2798,7 @@ resume_partialack: if (V_tcp_do_prr && to.to_flags & TOF_SACK) { tcp_timer_activate(tp, TT_REXMT, 0); tp->t_rtttime = 0; - tcp_do_prr_ack(tp, th, &to); + tcp_do_prr_ack(tp, th, &to, sack_changed); tp->t_flags |= TF_ACKNOW; (void) tcp_output(tp); } else @@ -2811,7 +2812,11 @@ resume_partialack: if (V_tcp_do_prr) { tp->sackhint.delivered_data = BYTES_THIS_ACK(tp, th); tp->snd_fack = th->th_ack; - tcp_do_prr_ack(tp, th, &to); + /* + * During ECN cwnd reduction + * always use PRR-SSRB + */ + tcp_do_prr_ack(tp, th, &to, SACK_CHANGE); (void) tcp_output(tp); } } else @@ -3934,7 +3939,7 @@ tcp_mssopt(struct in_conninfo *inc) } void -tcp_do_prr_ack(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to) +tcp_do_prr_ack(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to, sackstatus_t sack_changed) { int snd_cnt = 0, limit = 0, del_data = 0, pipe = 0; int maxseg = tcp_maxseg(tp); @@ -3974,7 +3979,17 @@ tcp_do_prr_ack(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to) tp->snd_ssthresh, tp->sackhint.recover_fs) - tp->sackhint.prr_out; } else { - if (V_tcp_do_prr_conservative || (del_data == 0)) + /* + * PRR 6937bis heuristic: + * - A partial ack without SACK block beneath snd_recover + * indicates further loss. + * - An SACK scoreboard update adding a new hole indicates + * further loss, so be conservative and send at most one + * segment. + * - Prevent ACK splitting attacks, by being conservative + * when no new data is acked. + */ + if ((sack_changed == SACK_NEWLOSS) || (del_data == 0)) limit = tp->sackhint.prr_delivered - tp->sackhint.prr_out; else diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index 589b0c424acb..891053c872dd 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -544,15 +544,17 @@ tcp_sackhole_remove(struct tcpcb *tp, struct sackhole *hole) * Process cumulative ACK and the TCP SACK option to update the scoreboard. * tp->snd_holes is an ordered list of holes (oldest to newest, in terms of * the sequence space). - * Returns 1 if incoming ACK has previously unknown SACK information, - * 0 otherwise. + * Returns SACK_NEWLOSS if incoming ACK indicates ongoing loss (hole split, new hole), + * SACK_CHANGE if incoming ACK has previously unknown SACK information, + * SACK_NOCHANGE otherwise. */ -int +sackstatus_t tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) { struct sackhole *cur, *temp; struct sackblk sack, sack_blocks[TCP_MAX_SACK + 1], *sblkp; - int i, j, num_sack_blks, sack_changed; + int i, j, num_sack_blks; + sackstatus_t sack_changed; int delivered_data, left_edge_delta; tcp_seq loss_hiack = 0; @@ -563,7 +565,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) INP_WLOCK_ASSERT(tptoinpcb(tp)); num_sack_blks = 0; - sack_changed = 0; + sack_changed = SACK_NOCHANGE; delivered_data = 0; left_edge_delta = 0; /* @@ -582,7 +584,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) if (SEQ_LT(tp->snd_fack, th_ack)) { delivered_data += th_ack - tp->snd_una; tp->snd_fack = th_ack; - sack_changed = 1; + sack_changed = SACK_CHANGE; } } /* @@ -676,8 +678,8 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) KASSERT(tp->sackhint.hole_bytes >= 0, ("sackhint hole bytes >= 0")); tp->snd_fack = sblkp->end; - sack_changed = 1; sblkp--; + sack_changed = SACK_NEWLOSS; } else { /* * Append a new SACK hole at the tail. If the @@ -690,9 +692,9 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) delivered_data += sblkp->end - sblkp->start; tp->sackhint.hole_bytes += temp->end - temp->start; tp->snd_fack = sblkp->end; - sack_changed = 1; /* Go to the previous sack block. */ sblkp--; + sack_changed = SACK_CHANGE; } else { /* * We failed to add a new hole based on the current @@ -709,7 +711,12 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) SEQ_LT(tp->snd_fack, sblkp->end)) { delivered_data += sblkp->end - tp->snd_fack; tp->snd_fack = sblkp->end; - sack_changed = 1; + /* + * While the Scoreboard didn't change in + * size, we only ended up here because + * some SACK data had to be dismissed. + */ + sack_changed = SACK_NEWLOSS; } } } @@ -717,7 +724,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) /* fack is advanced. */ delivered_data += sblkp->end - tp->snd_fack; tp->snd_fack = sblkp->end; - sack_changed = 1; + sack_changed = SACK_CHANGE; } cur = TAILQ_LAST(&tp->snd_holes, sackhole_head); /* Last SACK hole. */ loss_hiack = tp->snd_fack; @@ -769,7 +776,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) (SEQ_MIN(cur->rxmit, cur->end) - cur->start); KASSERT(tp->sackhint.sack_bytes_rexmit >= 0, ("sackhint bytes rtx >= 0")); - sack_changed = 1; + sack_changed = SACK_CHANGE; if (SEQ_LEQ(sblkp->start, cur->start)) { /* Data acks at least the beginning of hole. */ if (SEQ_GEQ(sblkp->end, cur->end)) { @@ -809,6 +816,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) */ temp = tcp_sackhole_insert(tp, sblkp->end, cur->end, cur); + sack_changed = SACK_NEWLOSS; if (temp != NULL) { if (SEQ_GT(cur->rxmit, temp->rxmit)) { temp->rxmit = cur->rxmit; @@ -867,7 +875,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) * DupAck for this. Also required * for RFC6675 rescue retransmission. */ - sack_changed = 0; + sack_changed = SACK_NOCHANGE; tp->sackhint.delivered_data = delivered_data; tp->sackhint.sacked_bytes += delivered_data - left_edge_delta; tp->sackhint.lost_bytes = tp->sackhint.hole_bytes - notlost_bytes; diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index c6e24b187e0f..2236a1385b44 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -504,6 +504,13 @@ struct tcptemp { struct tcphdr tt_t; }; +/* SACK scoreboard update status */ +typedef enum { + SACK_NOCHANGE = 0, + SACK_CHANGE, + SACK_NEWLOSS +} sackstatus_t; + /* Enable TCP/UDP tunneling port */ #define TCP_TUNNELING_PORT_MIN 0 #define TCP_TUNNELING_PORT_MAX 65535 @@ -1303,7 +1310,6 @@ VNET_DECLARE(struct inpcbinfo, tcbinfo); #define V_tcp_do_lrd VNET(tcp_do_lrd) #define V_tcp_do_prr VNET(tcp_do_prr) -#define V_tcp_do_prr_conservative VNET(tcp_do_prr_conservative) #define V_tcp_do_newcwv VNET(tcp_do_newcwv) #define V_drop_synfin VNET(drop_synfin) #define V_path_mtu_discovery VNET(path_mtu_discovery) @@ -1483,7 +1489,8 @@ extern struct protosw tcp6_protosw; /* shared for TOE */ uint32_t tcp_new_ts_offset(struct in_conninfo *); tcp_seq tcp_new_isn(struct in_conninfo *); -int tcp_sack_doack(struct tcpcb *, struct tcpopt *, tcp_seq); +sackstatus_t + tcp_sack_doack(struct tcpcb *, struct tcpopt *, tcp_seq); int tcp_dsack_block_exists(struct tcpcb *); void tcp_update_dsack_list(struct tcpcb *, tcp_seq, tcp_seq); void tcp_update_sack_list(struct tcpcb *tp, tcp_seq rcv_laststart, tcp_seq rcv_lastend); @@ -1491,7 +1498,7 @@ void tcp_clean_dsack_blocks(struct tcpcb *tp); void tcp_clean_sackreport(struct tcpcb *tp); void tcp_sack_adjust(struct tcpcb *tp); struct sackhole *tcp_sack_output(struct tcpcb *tp, int *sack_bytes_rexmt); -void tcp_do_prr_ack(struct tcpcb *, struct tcphdr *, struct tcpopt *); +void tcp_do_prr_ack(struct tcpcb *, struct tcphdr *, struct tcpopt *, sackstatus_t); void tcp_lost_retransmission(struct tcpcb *, struct tcphdr *); void tcp_sack_partialack(struct tcpcb *, struct tcphdr *); void tcp_free_sackholes(struct tcpcb *tp); From nobody Fri Nov 17 12:20:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWwwJ189Sz50vPc; Fri, 17 Nov 2023 12:20: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 4SWwwJ0XR5z3Mp0; Fri, 17 Nov 2023 12:20:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700223632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Vy5iCMvFXUKjtgjLCj/9MnMPyv6qDUKLUTHlzcOYGQ=; b=pdxHDOuwS+BKhHl4L58EtgQ7jq3sJn34pDYhiClJVal2ILNutLRcRkDOx8NTB+mdIGWgWy U0sM0btDXnvn/Lx3S6louy4/V/155UndgZ/I8OOLftgYgpnqRxpr+o53JeODBpK0GEOpwv OiUE65r0fwnIiGufwxgxl406E0x8FxCaF3hC+TrJNIAo27mqnVxezKFf2OU5/yG/M5DZb0 fna3XAlqvkDS1m00Vv8qhKz7X+SADwKkcUiju1SvV3AOISsDQhp4SDatsfZX0QbUrl7hTu ir9pyiqtr3qE6SeS/gbHj/TDiLYs+VBDPioqrrzg1pMx+cJdBZwFCs9fRLoyng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700223632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Vy5iCMvFXUKjtgjLCj/9MnMPyv6qDUKLUTHlzcOYGQ=; b=NX4pdZWbD1r5ovztd99cmaI+lqe9VYhHo+VhpBFmULmypK913GESyK1nx6YU7CVcm++SYt N12WnRTcTmI0UesaYPg6hqW+kgQo67MIqFIkqzleBsxCQAm+x3lYw8qnenh1ehL1b0Nt5g 0Tr56zzutJycUDi/9zUS8vAvog92+DI7+TTqWWw9//7Jeo3t5w8abHGy3DnoGzWB02EkgK BFsHi98HTCpDEZog69Y7DBSHTTpuIF4GdQN2aNYS04/H22UwIt7c69Bd3K6rvpfbinwDQb ZNPTOHxEcmwd0bND0BRhxs8OhOSCP2nn/V7WG1YeHKHBld+7tbUVBEkwMVE6Pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700223632; a=rsa-sha256; cv=none; b=xCtAWp8/XlcEtpvv/oyMC9nqwMPX84QiB3300ddNRUvAUilVSv2YQ9Sg3S6qj1e7lGusow omYcoEeCT9o2UlTSRxv2Y43MTH3fXXxvQResygPXkKZTCn3FLAMhEFecFpFmjJT2sB33pB +TUNunn5nFT6ShIFLNoGmaZPMhKECiDpgUxQnAP7c3fqmWDJA2rQYixpiPekGdZyM9RYth HhzRJa+3OSGrgdBOcY/FBdvnCimOq3z2b5uQj5Dx7UvIusZ/P3bGuDz2Qp6xhKddKDNO6K oSUPJe7yxrWKTqlDo11IMRpwb1vI+On6A7tadsPfIp/qOaaNrKUo+yqlf34p0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWwwH6ZSpzjPN; Fri, 17 Nov 2023 12:20: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 3AHCKVnG099816; Fri, 17 Nov 2023 12:20:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHCKVEk099813; Fri, 17 Nov 2023 12:20:31 GMT (envelope-from git) Date: Fri, 17 Nov 2023 12:20:31 GMT Message-Id: <202311171220.3AHCKVEk099813@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: 0480dccd3f34 - main - dpaa2: make software VLANs usable on dpni List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0480dccd3f347da0dbccf5917633435d5ce6cb86 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0480dccd3f347da0dbccf5917633435d5ce6cb86 commit 0480dccd3f347da0dbccf5917633435d5ce6cb86 Author: Bjoern A. Zeeb AuthorDate: 2023-11-15 11:46:44 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-11-17 12:17:54 +0000 dpaa2: make software VLANs usable on dpni dpni announces IFCAP_VLAN_MTU but internally does not increase the maximum frame length. Createing a vlan interface on top of a dpni interface will result in full-sized frames not passing. Extend the maximum frame length by ETHER_VLAN_ENCAP_LEN to allow at least for one layer of (software) vlans for now MFC after: 3 days GH-Issue: https://github.com/mcusim/freebsd-src/issues/22 Reviewed by: dsl Differential Revision: https://reviews.freebsd.org/D42645 --- sys/dev/dpaa2/dpaa2_ni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index 7cb472f45ee4..b274d5670d5f 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -2556,7 +2556,7 @@ dpaa2_ni_ioctl(if_t ifp, u_long c, caddr_t data) /* Update maximum frame length. */ error = DPAA2_CMD_NI_SET_MFL(dev, child, &cmd, - mtu + ETHER_HDR_LEN); + mtu + ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); if (error) { device_printf(dev, "%s: failed to update maximum frame " "length: error=%d\n", __func__, error); From nobody Fri Nov 17 12:20:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWwwK24gMz50vNl; Fri, 17 Nov 2023 12:20: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 4SWwwK1Nghz3Mrg; Fri, 17 Nov 2023 12:20:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700223633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j4lg63kVA+SaQMNkW5O1yCaG+g8mJW6c5AnyDQGcJv0=; b=SsF0bpd+H8UUbGysaLK1yHjGFu4cYtOVdoGvLgQLGRr233tPNGHBM9jWLOy8XpwFV2UoUX zA0gsjxJDEXBgU3dmOlAE3R9I+4SoLHSPMKq9crFCCZxiUdAdqBlHlLQ3rPbpIDlvyc3gW tvtg1NXZfAWT7I8xBDisoohnkqmA98SVgxfocVF151MYj88D2ZpthUMCQrvW5XAAMDg4vW Yidm6Rj/BS/dt1rIw+8MJzpbw5Y9vqNiyD3mz1V6ZGwKn9T+l6UX8CRsD21pzwy4dxa1gs SwU8ew3pvftNnCXZPBJ5+Dj42OTJrjJpR1sCr5PMNHLJnYsquYGdx9KC2yF2LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700223633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j4lg63kVA+SaQMNkW5O1yCaG+g8mJW6c5AnyDQGcJv0=; b=RxKo5YZz8LdLBDW3ZD6F/gakrDlAc6SeW0QSoR3thm2CCkcZU439VyOrumtBcNlxvAyKvR Gw9QoJR0+YlpYqtTwjN3iCaQNkYTMznWxu9DhU/Y6lJI6Zdb7yhWCu8XgaIcSVcvcAHDgs mxtykk/bDw6yBF90nJizeVN3T1Jq4cqwXWyi8mWB4V6L4HdUbPf4HgCRfNKAJ52ur55DXw 2CUmCrGWrmx78/ODGhYQcf6ApjNEJhpLnKfnKj9pavVYlhmMvJ+hesyvu7FY2ClBsXJApK 64ugNsJNSBT5GPcWoO14OXD9F5xDm9S82hp8RHJRrdtRchsuMcim7lzbCVfVDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700223633; a=rsa-sha256; cv=none; b=VlA9eeAI7LwyxvW/O5Mc93HsJuV5VpE6F7Mo0+ZyyixJns+AfZiLVNsSw0WIaMKFjVEemJ LnTrYNQLdZf776hTD3IuDamp1CrkktbMkuALHm5ejw8jxH/NzViigYO+EgnpRayXP6dBuE PJZBIWcXG9CffwWdU6AbWXLuZe59nQ5oWcbdfctpPSqGt7A8uidA3+6jP9jsm1Y+Co4OCD qg6BVfhT6olX27j0sWj06zSAgjPdM3A1Kkk2gc09+FZomDxqH1HwstxY5+HhRVz0VvzU+a K0nJfM7O4aLWjFI2XOCklU+nl+bEct9D66Z1j0p5QW+95yOGBsaT4fhocQTVTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWwwK0CJ4zjb8; Fri, 17 Nov 2023 12:20: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 3AHCKWaE000226; Fri, 17 Nov 2023 12:20:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHCKWvH000210; Fri, 17 Nov 2023 12:20:32 GMT (envelope-from git) Date: Fri, 17 Nov 2023 12:20:32 GMT Message-Id: <202311171220.3AHCKWvH000210@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: 964b3408fa87 - main - dpaa2: defer link_state updates until we are up List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 964b3408fa872178aacf58f2d84dc43564ec0aa7 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=964b3408fa872178aacf58f2d84dc43564ec0aa7 commit 964b3408fa872178aacf58f2d84dc43564ec0aa7 Author: Bjoern A. Zeeb AuthorDate: 2023-11-17 00:47:11 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-11-17 12:20:03 +0000 dpaa2: defer link_state updates until we are up dpaa2_ni_media_change() was called in early setup stages, before we were fully setup. That lead to internal driver state being all synched and fine but hardware state was lost/never setup corrently. Introduce dpaa2_ni_media_change_locked() so we can avoid reccursive locking and call "dpaa2_ni_media_change()" instead of mii_mediachg() as the latter does not setup our state there either. In order for this all to work, call if_setdrvflagbits() just before rather than after the above. Also remove an unecessary direct call to dpaa2_ni_miibus_statchg() which mii_mediachg() will trigger anyway. This all fixes a problem [1] that one had to lose the link (either unplugging/replugging the cable or using ifconfig media none; ifconfig media auto) to re-trigger the all updates and get the full state programmed when hardware expected. MFC after: 3 days GH-Issue: https://github.com/mcusim/freebsd-src/issues/21 [1] Reviewed by: dsl, dch Differential Revision: https://reviews.freebsd.org/D42643 --- sys/dev/dpaa2/dpaa2_ni.c | 46 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index b274d5670d5f..a9e6aa120549 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -116,6 +116,9 @@ mtx_assert(&(__sc)->lock, MA_OWNED); \ mtx_unlock(&(__sc)->lock); \ } while (0) +#define DPNI_LOCK_ASSERT(__sc) do { \ + mtx_assert(&(__sc)->lock, MA_OWNED); \ +} while (0) #define DPAA2_TX_RING(sc, chan, tc) \ (&(sc)->channels[(chan)]->txc_queue.tx_rings[(tc)]) @@ -2269,6 +2272,16 @@ dpaa2_ni_miibus_statchg(device_t dev) if (sc->fixed_link || sc->mii == NULL) { return; } + if ((if_getdrvflags(sc->ifp) & IFF_DRV_RUNNING) == 0) { + /* + * We will receive calls and adjust the changes but + * not have setup everything (called before dpaa2_ni_init() + * really). This will then setup the link and internal + * sc->link_state and not trigger the update once needed, + * so basically dpmac never knows about it. + */ + return; + } /* * Note: ifp link state will only be changed AFTER we are called so we @@ -2344,23 +2357,33 @@ err_exit: * @brief Callback function to process media change request. */ static int -dpaa2_ni_media_change(if_t ifp) +dpaa2_ni_media_change_locked(struct dpaa2_ni_softc *sc) { - struct dpaa2_ni_softc *sc = if_getsoftc(ifp); - DPNI_LOCK(sc); + DPNI_LOCK_ASSERT(sc); if (sc->mii) { mii_mediachg(sc->mii); sc->media_status = sc->mii->mii_media.ifm_media; } else if (sc->fixed_link) { - if_printf(ifp, "%s: can't change media in fixed mode\n", + if_printf(sc->ifp, "%s: can't change media in fixed mode\n", __func__); } - DPNI_UNLOCK(sc); return (0); } +static int +dpaa2_ni_media_change(if_t ifp) +{ + struct dpaa2_ni_softc *sc = if_getsoftc(ifp); + int error; + + DPNI_LOCK(sc); + error = dpaa2_ni_media_change_locked(sc); + DPNI_UNLOCK(sc); + return (error); +} + /** * @brief Callback function to process media status request. */ @@ -2443,17 +2466,20 @@ dpaa2_ni_init(void *arg) } DPNI_LOCK(sc); + /* Announce we are up and running and can queue packets. */ + if_setdrvflagbits(ifp, IFF_DRV_RUNNING, IFF_DRV_OACTIVE); + if (sc->mii) { - mii_mediachg(sc->mii); + /* + * mii_mediachg() will trigger a call into + * dpaa2_ni_miibus_statchg() to setup link state. + */ + dpaa2_ni_media_change_locked(sc); } callout_reset(&sc->mii_callout, hz, dpaa2_ni_media_tick, sc); - if_setdrvflagbits(ifp, IFF_DRV_RUNNING, IFF_DRV_OACTIVE); DPNI_UNLOCK(sc); - /* Force link-state update to initilize things. */ - dpaa2_ni_miibus_statchg(dev); - (void)DPAA2_CMD_NI_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, ni_token)); (void)DPAA2_CMD_RC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, rc_token)); return; From nobody Fri Nov 17 12:20:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWwwL39pCz50vZq; Fri, 17 Nov 2023 12:20: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 4SWwwL2CsGz3N51; Fri, 17 Nov 2023 12:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700223634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tEnn9oXG2Ko0Aa1m0OKq2gscxdb4mZjg7BHcW1ISvaQ=; b=A2LC+q3obKAyOhM9cM51Q8+yz/nT2AGaHI6m2z+nDUFmFNdo3sCmc50gYuG/tRDpo2Ti2L YJYpT6zl4NwzspneSqCG4AFquHhmxZvM0PHFJGmT/sCJXFkq+NtUXdLvhdIe32p9XKlnlF bMtV4tje7b7aweVS3RguLsFfqS7QZKKuldBbw4ag+qpclENGhbapeoHJiSWcYFOti2keg2 5cpCeAJNC4byA57/WNNq5AfwaFSxqfnoGJhW4Pwnlc/Bl3p3utPyhyMiq+k5oLJzr67JzD TRR76AutK8KeoLQ8+I8VAunMFpdy2Exp+eli8eDfth8UAvOV9phkpTH6yLm2GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700223634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tEnn9oXG2Ko0Aa1m0OKq2gscxdb4mZjg7BHcW1ISvaQ=; b=rQ1lZrL0ZnQlhvvERbGXgJjIvpK3O40HxFL1nrgQirZKlElemVZMG5N0vnsHgPkH6ck7Nw xnUx6kRlVF7iJPgxi52FRz6Wgw04fBIK0PXRtWSfbJzkoDFuPHfw+XCBYpyzXIjW6VV3qo rYThcavfoDOaeV0q0/eOIHRg0IdT35mEAnrOusIsWBQfprcn7Gra+5A0qIxiWz3NhrnvNi UfgE4+8OEN4R4lc54z/FTwXB6g41Z0hrrw5Jz2i2D/SDj3Ym+nB71xFVz5n1eezag3KvSs 8lcYlvHLXho3E1IeYv+lGSq+47eVcVtMeoPxn45e46XAY2RDwxGcHbfct1l8lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700223634; a=rsa-sha256; cv=none; b=KxQ+HlKKDqsV+YkiDQu+oLX5vDyxfaTZEktqDXQPNZPHfF8WmWns3lYVmc3E8x1ECpvoxi WCXCJXjmLM1ZbbUfcJP62pvJz1za8VqW2P2pATyHgXJOlZiYbo5lX4M2xP86XYbi6cG0/W wS0iCjZsNrqI9rfevT5VOFCxc5hNmYRjGGwQsk9D79Hrv0wDa5PtyxuuwIcc/X94cTJ6y6 gqEDP9z7bO3vf6Vz97EliJyqskkKHGL6f+VRu+sc4Xc5opWmwtNWaTsbQSRCgJe0znmcJ3 HrhXGfuEqEDYMzzIfnzpPaWBrZEUH5wmV3mwowFUudf7zrSKKEzK7YlSvanyAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWwwL1DZZzjLx; Fri, 17 Nov 2023 12:20: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 3AHCKYiG000839; Fri, 17 Nov 2023 12:20:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHCKYJJ000836; Fri, 17 Nov 2023 12:20:34 GMT (envelope-from git) Date: Fri, 17 Nov 2023 12:20:34 GMT Message-Id: <202311171220.3AHCKYJJ000836@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: 6c46ebb05dcc - main - dpaa2: fdt improve detection for dpmac/phys List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 6c46ebb05dccdcee18f64dc122e6685c05180217 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6c46ebb05dccdcee18f64dc122e6685c05180217 commit 6c46ebb05dccdcee18f64dc122e6685c05180217 Author: Bjoern A. Zeeb AuthorDate: 2023-11-15 13:13:22 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-11-17 12:20:11 +0000 dpaa2: fdt improve detection for dpmac/phys 'pcs-handles' are not mandatory in the device tree here so do not enforce them. This allows us to find dpmac entries needed for phys on the WHLE-LS1 as well. MFC after: 3 days Reviewed by: jceel, dsl Differential Revision: https://reviews.freebsd.org/D42644 --- sys/dev/dpaa2/dpaa2_mc_fdt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_mc_fdt.c b/sys/dev/dpaa2/dpaa2_mc_fdt.c index 24b92e68e2b7..8e9ab10dec9d 100644 --- a/sys/dev/dpaa2/dpaa2_mc_fdt.c +++ b/sys/dev/dpaa2/dpaa2_mc_fdt.c @@ -272,8 +272,6 @@ dpaa2_mc_fdt_attach(device_t dev) continue; if (!OF_hasprop(child, "reg")) continue; - if (!OF_hasprop(child, "pcs-handle")) - continue; if (dpaa2_mc_fdt_probe_child(dev, child) != 0) continue; } From nobody Fri Nov 17 12:21:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWwxL2q42z50vXy; Fri, 17 Nov 2023 12:21: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 4SWwxL0brCz3P6F; Fri, 17 Nov 2023 12:21:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700223686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sSvrsWZc5H/V1ffDXpwZLOG6X8QHdUqzS+jeFUBlOUo=; b=CDgxeRpLVrNDGqZm7jKxCE4zVFFiLQ7nSzK3f4UoEK8t9pVuIwAX4pdIwaT8evyzXnwGIV Hc1y1urN39AXt6YzYd5X6PHDpRyMDj67DOPpxi+OGc8nEgOYSyyRIL9TojLS6gEhudGu35 7fwfBZhD1Kbo9GK6INmm5LfnH+aKB4ceF4sB4QwKCnOYD3xAdKrSVND/JUcU8LVmzeHSoG dAgDy3th50mz8oOGaV5gZ6N8IkN9UnjBZM7Z9EFvKUX1hkZ6ZrqR/SGAd4LLfkej556wA8 lABzHSy40W57w/pyFwnCPn2K9FaZhPWD9I9dSnZf5zuTA19+icsoC5olTewGtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700223686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sSvrsWZc5H/V1ffDXpwZLOG6X8QHdUqzS+jeFUBlOUo=; b=gMSiuP8zCNbgunN2aIt7/2oHYRrAx6oX/DfzEjg4w3sByEwR4ZSpP97Bv4/xHCkmtPQjXi 0TXXYK9tKmMWcxxzEHySPPz6NvkScKo/yNAq0HtK4DoCeQqNw/G11+ci6V/ZvlA3npdt7y 5ZRZNbz8ftgsR0l76YTBvC+I/JS2zYHN90HJEUC3mwf9YRF5o+r8E/yBPmXVUdTRT9NHei JSZgMphGRehLfK9KX6Gpiz0cGby8PUjLmlY6t/U+4uGb48C0LM68ZbvfHG+yrJcOr7x01a neH0lfn/hFeMRC/+TCrGBQhIe6WyQp6kbBbUCyJjV0HQjXhhh+xmbkxyyNUHgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700223686; a=rsa-sha256; cv=none; b=g9RK3c2BKIGAXWaO6pH1Iv3bc3PoPzcFqO76DiDONlxC/KlNlEIP2jckVE9ynZUsm4YDDH bAngfVTeMWOT2GcsK7VDHhHRB+zQelvKmrzW1+5Xdv3YuV59XKD6+7FtyMIuUZT+MTnI07 xCf0HnGIlASLsTSvGCQKL641F36+lbA3AdNgb56yoBA9VVngEbRRepV7kK92URaoYgfKQW g6r1mG89xVz+8IU9LsWoo3v0BFJIZozTHjLlWlFPvjxcKUKF5CkLuI5pcktrSt3Xh0gde7 kHWuCtlHb3xCNYHjuhRW+yIY5Lfk6CJD6zCn12lr1h72CC6vGhrIqSu7yRtoNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWwxK6pBdzjf5; Fri, 17 Nov 2023 12:21: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 3AHCLPNF002157; Fri, 17 Nov 2023 12:21:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHCLPR9002154; Fri, 17 Nov 2023 12:21:25 GMT (envelope-from git) Date: Fri, 17 Nov 2023 12:21:25 GMT Message-Id: <202311171221.3AHCLPR9002154@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 33d55d0d0f33 - main - libpfctl: handle allocation failure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 33d55d0d0f33787e9e2796b5000be73af42573bc Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=33d55d0d0f33787e9e2796b5000be73af42573bc commit 33d55d0d0f33787e9e2796b5000be73af42573bc Author: Kristof Provost AuthorDate: 2023-11-17 09:14:59 +0000 Commit: Kristof Provost CommitDate: 2023-11-17 12:21:14 +0000 libpfctl: handle allocation failure While it's unlikely for userspace to fail to allocate memory it is still possible. Handle malloc() returning NULL. Reported by: Bill Meeks MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 41ac2892a5a6..be794c6d3f34 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -78,6 +78,11 @@ pfctl_do_ioctl(int dev, uint cmd, size_t size, nvlist_t **nvl) retry: nv.data = malloc(size); + if (nv.data == NULL) { + ret = ENOMEM; + goto out; + } + memcpy(nv.data, data, nvlen); nv.len = nvlen; @@ -229,6 +234,8 @@ _pfctl_get_status_counters(const nvlist_t *nvl, struct pfctl_status_counter *c; c = malloc(sizeof(*c)); + if (c == NULL) + continue; c->id = ids[i]; c->counter = counts[i]; From nobody Fri Nov 17 12:21:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWwxM3FP6z50vQ6; Fri, 17 Nov 2023 12:21: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 4SWwxM1bF6z3Ny5; Fri, 17 Nov 2023 12:21:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700223687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DGn6kLNvwv6THDn1WX1KAmpxHY11LTEsOq9g3ieXLt0=; b=B9GZTbSg1O0gnxPk3ZZabgcr742HjFYH+yx7z25rdsw5VNPWXOoMO2XBL/kgGfqScZ9H/M 0DmH+QpcVhvXXXneuHv45k741Es8m3H7M03KtvsEt77+4Nm5NfHpzNEmIiLisvSGE2+VnO TGrcP6+8izJqzFRmKiCo2GjaHQDuhhCA+XvXkjB1bjrObkZ7Ths0Gjm7H4qYvRnlkW25Hv tchd3VXQhMZG8FmqYimOV6/SgNCaGV+2Nx7VXzAhjIU2BWpb3AQxKEP1iUSiY3v7fXVC3V z9pQu9UnwEPcdBsuP0W6B53gh97hrnSO9KBj41opYVXD1b+JDkWpXQLHhGGD7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700223687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DGn6kLNvwv6THDn1WX1KAmpxHY11LTEsOq9g3ieXLt0=; b=XujHh+OGG4eZxgYfFejVL35qfdfEaTIC+uG71dDbbt5J6j9DvAYuvGsB+1Gg++mzmE0mi/ J469XgHUeSkC+aLfGAhNYOZ2Zn3SHkt9Ul+QBKfccVz+wX7oMl9PsMvWa+/C3XSMs+DBP2 t4Y2M5vfjOHkEoApJnmRnJPK57Tj3EtSp6h8loUoM+uw3YiDZcuaqtoXg+2dln3+c0hayY KeonuRZGA6C1wLQ57FIRyB50B+8v5uA8jy5BYNVKbHQrwQ3+qQ/SA68MEHnDTXXvAFSQlt Dhw27JgRZ4el8PCtVbuDIFMb6NifjkIyREVFkkndrOAH4HMI+alKe4v687fYZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700223687; a=rsa-sha256; cv=none; b=VXqjnSdBK+VVVs5AaTx62I9jsm8JdYsl20IU51VdD+DSTFtyaqdTVirTqyvD+2DzAXxUpK C9O3nsrktOPYKMpN6fuhp7ZdlAr68lTPelX+ke6n4olcZnHEBd4pJFOP/bxHehqoeSAF7O 07q/qtgvlmfGFXKIz5VZRaq1sI/2sb1yqIJGECDu9P2m8THpIFBLggLyFx+MUeF63ZHI/V 3EVpg4UwJcpgQ0OMbP855bL/7cP+j9ZBqjJQNkwMTqlrtm1lmf5HDX9gYYpeX5OmYpHKw2 ZFTylSYSriDkic1PInVvV/7/z89rbiqwikoAUGz4v0tC1gQJ37E1EoCsFDwDcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWwxM0hBPzjbN; Fri, 17 Nov 2023 12:21: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 3AHCLR2N002199; Fri, 17 Nov 2023 12:21:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHCLQma002196; Fri, 17 Nov 2023 12:21:26 GMT (envelope-from git) Date: Fri, 17 Nov 2023 12:21:26 GMT Message-Id: <202311171221.3AHCLQma002196@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 498934c5ff51 - main - libpfctl: handle pfctl_do_ioctl() failures better List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 498934c5ff51e6b0d3199db5d27ed11b1e8b9582 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=498934c5ff51e6b0d3199db5d27ed11b1e8b9582 commit 498934c5ff51e6b0d3199db5d27ed11b1e8b9582 Author: Kristof Provost AuthorDate: 2023-11-17 09:19:38 +0000 Commit: Kristof Provost CommitDate: 2023-11-17 12:21:14 +0000 libpfctl: handle pfctl_do_ioctl() failures better Ensure that we free nvlists and other allocations if pfctl_do_ioctl() fails. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index be794c6d3f34..a600031ec0a9 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -260,6 +260,7 @@ pfctl_get_status(int dev) nvl = nvlist_create(0); if (pfctl_do_ioctl(dev, DIOCGETSTATUSNV, 4096, &nvl)) { + nvlist_destroy(nvl); free(status); return (NULL); } @@ -717,12 +718,13 @@ pfctl_get_eth_rulesets_info(int dev, struct pfctl_eth_rulesets_info *ri, nvlist_add_string(nvl, "path", path); if ((ret = pfctl_do_ioctl(dev, DIOCGETETHRULESETS, 256, &nvl)) != 0) - return (ret); + goto out; ri->nr = nvlist_get_number(nvl, "nr"); +out: nvlist_destroy(nvl); - return (0); + return (ret); } int @@ -739,16 +741,16 @@ pfctl_get_eth_ruleset(int dev, const char *path, int nr, nvlist_add_number(nvl, "nr", nr); if ((ret = pfctl_do_ioctl(dev, DIOCGETETHRULESET, 1024, &nvl)) != 0) - return (ret); + goto out; ri->nr = nvlist_get_number(nvl, "nr"); strlcpy(ri->path, nvlist_get_string(nvl, "path"), MAXPATHLEN); strlcpy(ri->name, nvlist_get_string(nvl, "name"), PF_ANCHOR_NAME_SIZE); +out: nvlist_destroy(nvl); - - return (0); + return (ret); } int @@ -764,13 +766,14 @@ pfctl_get_eth_rules_info(int dev, struct pfctl_eth_rules_info *rules, nvlist_add_string(nvl, "anchor", path); if ((ret = pfctl_do_ioctl(dev, DIOCGETETHRULES, 1024, &nvl)) != 0) - return (ret); + goto out; rules->nr = nvlist_get_number(nvl, "nr"); rules->ticket = nvlist_get_number(nvl, "ticket"); +out: nvlist_destroy(nvl); - return (0); + return (ret); } int @@ -789,7 +792,7 @@ pfctl_get_eth_rule(int dev, uint32_t nr, uint32_t ticket, nvlist_add_bool(nvl, "clear", clear); if ((ret = pfctl_do_ioctl(dev, DIOCGETETHRULE, 4096, &nvl)) != 0) - return (ret); + goto out; pfctl_nveth_rule_to_eth_rule(nvl, rule); @@ -797,8 +800,9 @@ pfctl_get_eth_rule(int dev, uint32_t nr, uint32_t ticket, strlcpy(anchor_call, nvlist_get_string(nvl, "anchor_call"), MAXPATHLEN); +out: nvlist_destroy(nvl); - return (0); + return (ret); } int @@ -1165,7 +1169,7 @@ int pfctl_get_clear_rule(int dev, uint32_t nr, uint32_t ticket, nvlist_add_bool(nvl, "clear_counter", true); if ((ret = pfctl_do_ioctl(dev, DIOCGETRULENV, 8192, &nvl)) != 0) - return (ret); + goto out; pf_nvrule_to_rule(nvlist_get_nvlist(nvl, "rule"), rule); @@ -1173,9 +1177,9 @@ int pfctl_get_clear_rule(int dev, uint32_t nr, uint32_t ticket, strlcpy(anchor_call, nvlist_get_string(nvl, "anchor_call"), MAXPATHLEN); +out: nvlist_destroy(nvl); - - return (0); + return (ret); } int @@ -1502,13 +1506,13 @@ _pfctl_clear_states(int dev, const struct pfctl_kill *kill, nvlist_add_bool(nvl, "nat", kill->nat); if ((ret = pfctl_do_ioctl(dev, ioctlval, 1024, &nvl)) != 0) - return (ret); + goto out; if (killed) *killed = nvlist_get_number(nvl, "killed"); +out: nvlist_destroy(nvl); - return (ret); } @@ -1684,8 +1688,10 @@ pfctl_get_syncookies(int dev, struct pfctl_syncookies *s) nvl = nvlist_create(0); - if ((ret = pfctl_do_ioctl(dev, DIOCGETSYNCOOKIES, 256, &nvl)) != 0) - return (errno); + if ((ret = pfctl_do_ioctl(dev, DIOCGETSYNCOOKIES, 256, &nvl)) != 0) { + ret = errno; + goto out; + } enabled = nvlist_get_bool(nvl, "enabled"); adaptive = nvlist_get_bool(nvl, "adaptive"); @@ -1703,9 +1709,9 @@ pfctl_get_syncookies(int dev, struct pfctl_syncookies *s) s->lowwater = nvlist_get_number(nvl, "lowwater") * 100 / state_limit; s->halfopen_states = nvlist_get_number(nvl, "halfopen_states"); +out: nvlist_destroy(nvl); - - return (0); + return (ret); } int From nobody Fri Nov 17 12:38:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWxKF4fd0z50wJm; Fri, 17 Nov 2023 12:38: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 4SWxKF47x8z3Q8Y; Fri, 17 Nov 2023 12:38:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700224721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hcEIQFRPZSfK22sX/f//f2H8ICOTGw16y/ud0A577Xk=; b=AxZvn/jAmRge32QKFvWWydIq9/wyHCZltCbhGCZcyn2LJLIm5pLeG7xyDhkiR9c5t1KVjT guBOxNDhDQSASwzkZT2Aq61vuKEghnqiCJ3Nak2Mtb5oUaBG3sWZWtLvLMeMAcQxU1lAaL rYxT92LwN0gsboB2D3KwQHJbhoCLeikur28RuyOBa0vqcQ7LRiaug/y2X5EABQEf1DU8RL wJnsBllT7cjTEr1sRtG7xoItgZ73+RstA4BjhXzMTiGeh5D3BY4as4287w+RArNvxgpkMQ tBPGLNNGhxeqvoiI1QmBYQKcr2E/GBfDxXWzK2B5znIrDbja5LlBpCe4fpZmKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700224721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hcEIQFRPZSfK22sX/f//f2H8ICOTGw16y/ud0A577Xk=; b=IZPa2MIhtxBRNbc+xKqD5rFVEthyl9TkwBdJEP5r+jAoj7nEHOI6Sv+JMZlZF0cSODawwr klT9Q7RblhtzByYmTBhN1OKKEdOsNRYlxZABRYSwB1sfMFB1GhiuM77t85H4V+cfNGDoFM /n5D0nuISCEGo5hcMBgj1RP02SE1qf1ycIUSKc2GkyvQ27c62usSkEzJaTUbLa6d23EYR/ sDKUkjiek+xfj24xmWP7TL0hFSYI1E8nHlJ/5z4ESHLqfOXdNS2CKL1udO8kBdR6bSOyaL xXzdzVWKfXvsm9NpkQuZ/06IU9EKO+6jm8AfU0A337P2DfG0np8gO5T9V5P2Ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700224721; a=rsa-sha256; cv=none; b=BAdcpA8bEmwa2bae6tVkPKnvlSR06iGppHvI4WMhzzah9xIkdLjbWb5f5Q1o88smY6OROY gBCdT8J55+aM1Pmpucr+gVr/ALAAOnRMsfBFH+bWIIYt5rb8BeLmTaAtN7Ea1u/w2C/7G5 dXxRocHtCzUtC7DWnujwadC0VN6uQy4JiQwHNIS2L6iRMOTuMbl4+hP2KBFBVfCU/KVymK nY3qja9AuTx7I5t8LVX8rBHAOkPwCCcsfI/Wop2BVo2hl38UhbYZtCiJZoAhNX0y4dEZux wRFHydOqcxzOBIGnFHeMQPDw9UAN7FndquLmc2m9EYlH+ha1LxnUMVr1ePaEtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWxKF3BMHzjcG; Fri, 17 Nov 2023 12:38: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 3AHCcfPv024434; Fri, 17 Nov 2023 12:38:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHCcfdV024431; Fri, 17 Nov 2023 12:38:41 GMT (envelope-from git) Date: Fri, 17 Nov 2023 12:38:41 GMT Message-Id: <202311171238.3AHCcfdV024431@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: 43324ec770f6 - main - mii: resort VSC8641 entry in miidevs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 43324ec770f6b598f0ce25487f69a64b3c9822bd Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=43324ec770f6b598f0ce25487f69a64b3c9822bd commit 43324ec770f6b598f0ce25487f69a64b3c9822bd Author: Bjoern A. Zeeb AuthorDate: 2023-11-17 12:26:28 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-11-17 12:38:07 +0000 mii: resort VSC8641 entry in miidevs VSC8641 is a ciphy not a vscphy. Sort it with the other entries of ciphy to avoid confusion. MFC after: 3 days --- sys/dev/mii/miidevs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mii/miidevs b/sys/dev/mii/miidevs index 900fa80546b2..a3776fc5553d 100644 --- a/sys/dev/mii/miidevs +++ b/sys/dev/mii/miidevs @@ -211,6 +211,7 @@ model xxCICADA CS8201A 0x0020 Cicada CS8201 10/100/1000TX PHY model xxCICADA CS8201B 0x0021 Cicada CS8201 10/100/1000TX PHY model xxCICADA CS8244 0x002c Cicada CS8244 10/100/1000TX PHY model xxVITESSE VSC8601 0x0002 Vitesse VSC8601 10/100/1000TX PHY +model xxVITESSE VSC8641 0x0003 Vitesse VSC8641 10/100/1000TX PHY /* Davicom Semiconductor PHYs */ /* AMD Am79C873 seems to be a relabeled DM9101 */ @@ -352,7 +353,6 @@ model xxTSC 78Q2121 0x0015 78Q2121 100BASE-TX media interface /* Vitesse Semiconductor (now Microsemi) */ model xxVITESSE VSC8501 0x0013 Vitesse VSC8501 10/100/1000TX PHY model xxVITESSE VSC8504 0x000c Vitesse VSC8504 10/100/1000TX PHY -model xxVITESSE VSC8641 0x0003 Vitesse VSC8641 10/100/1000TX PHY /* XaQti Corp. PHYs */ model xxXAQTI XMACII 0x0000 XaQti Corp. XMAC II gigabit interface From nobody Fri Nov 17 12:38:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWxKG5tP4z50wJn; Fri, 17 Nov 2023 12:38: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 4SWxKG5KWRz3QWx; Fri, 17 Nov 2023 12:38:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700224722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=50hk73IeYVOMz6PAPrgBAuxYjl/m6iwDKyMg12wYEdk=; b=Fgi3z+caGFzo7ZtjXUL60aKtFLD9Np+mI4lVdwo2Kqn4sCh8wEz6mICsKYGXhjT38I8tUY QbOjlXS3MoyoZY3fOoN0DlOTMx4NJoB8jRH8Np299R3diu/lHuQih86YRiE8bl1k6AMWjh bPgYZF3mS7EgET5Ws4UyvxrmAf08SdZ+IgWF5Lt8AeRb2h/3XBvf+VJYmFSr9FYAqmetjK imAviy4r+GMzs4e1wPJOYmH6YfqeabvQRpngj5H+sZwX0qjEP5H4z4oKN5yVnXM+/BqXzz P6V7qKr55AfbxEnknjZ8blcYo7gT13iPsvwvspNwsZ9iJE7iHAGSs6DnKarTlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700224722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=50hk73IeYVOMz6PAPrgBAuxYjl/m6iwDKyMg12wYEdk=; b=uZF+ltuOLHAoMDjRRSz8UX/rUSjn4TbcWrN/62LcP6ScouDhc6pz59oJqkCbhTO0Es/u53 4ZnU9DwMbAya6mFX7Jq2x4TzXq1yjjwmUxJbHWhjPDZSLyDfg01nM6N9K4O4KREeQV9b5n W2ZrCWG3LV6GVqH5+6kEfbS8z7GGXX2ztc/R+UwNhfJPy9Kvmir/pzBhtlBG7HKV95mqXp Ag6dE0tqLOeMEkEQ3FMcQfdREa2atkBuoCTvcqMMARhyojlVfwLQ4WNxnOywdgsALdhMG4 LJB39gEq7ydR0F7HVOqyGpKopTvHjTfeCiDyO+5QJGDoITZHyfCOjmTIIZI6gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700224722; a=rsa-sha256; cv=none; b=ey3/ZkCzI3qxaemQ8bLGXcinvJqVLy/CiKEPzaGx+wwY80qHG0DVR+d3vFl2pvK12RdMub a2P6CmHjgYR6L7lYLnRAgPpTIymiECG8JbXjGXkQhHZhr5hCcfHFuQBSa9+Ak2d7dlOe4d 59+T49vSnuSpX6jH7qE15d7yu2kWWzvlAhEmQzlptYq8UzeEvpf8q8xfYPuoMo/Q5E0lVB tBE2BI304JJeGz66cjTN5a7OZk0WyUWY47G4WipJfjV9+gkKqUPpdEwCvSilpo1KxCcf/G loQAP2D209llHHzn3fAAdInoIfefehN+Mog2OYy7INZCEhj3Uwrkv6dq0uEjoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWxKG4B9VzjcH; Fri, 17 Nov 2023 12:38: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 3AHCcgvE024476; Fri, 17 Nov 2023 12:38:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHCcgG1024473; Fri, 17 Nov 2023 12:38:42 GMT (envelope-from git) Date: Fri, 17 Nov 2023 12:38:42 GMT Message-Id: <202311171238.3AHCcgG1024473@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: 1965dd85c3b3 - main - mii: add Vitesse/Microsemi VSC8514 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1965dd85c3b33ed99cb8ef164dd7c5b20425a85e Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1965dd85c3b33ed99cb8ef164dd7c5b20425a85e commit 1965dd85c3b33ed99cb8ef164dd7c5b20425a85e Author: Bjoern A. Zeeb AuthorDate: 2023-11-17 12:31:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-11-17 12:38:07 +0000 mii: add Vitesse/Microsemi VSC8514 The VSC8514 Quad-Port 10/100/1000BASE-T PHY seems to match the handling for the VSC8504 (for the little we support of what we could) and while it works with our generic ukphy add it as vscphy for porper display of names in the system message buffer and the like (or in case we decide to implement some extra features). Tested on: Ten64 MFC after: 3 days --- sys/dev/mii/miidevs | 1 + sys/dev/mii/vscphy.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/mii/miidevs b/sys/dev/mii/miidevs index a3776fc5553d..78d1dddba59f 100644 --- a/sys/dev/mii/miidevs +++ b/sys/dev/mii/miidevs @@ -353,6 +353,7 @@ model xxTSC 78Q2121 0x0015 78Q2121 100BASE-TX media interface /* Vitesse Semiconductor (now Microsemi) */ model xxVITESSE VSC8501 0x0013 Vitesse VSC8501 10/100/1000TX PHY model xxVITESSE VSC8504 0x000c Vitesse VSC8504 10/100/1000TX PHY +model xxVITESSE VSC8514 0x0027 Vitesse VSC8514 10/100/1000TX PHY /* XaQti Corp. PHYs */ model xxXAQTI XMACII 0x0000 XaQti Corp. XMAC II gigabit interface diff --git a/sys/dev/mii/vscphy.c b/sys/dev/mii/vscphy.c index 7d4e7fb591f4..1fdee688d70b 100644 --- a/sys/dev/mii/vscphy.c +++ b/sys/dev/mii/vscphy.c @@ -104,6 +104,7 @@ static int vscphy_service(struct mii_softc *, struct mii_data *, int); static const struct mii_phydesc vscphys[] = { MII_PHY_DESC(xxVITESSE, VSC8501), MII_PHY_DESC(xxVITESSE, VSC8504), + MII_PHY_DESC(xxVITESSE, VSC8514), MII_PHY_END }; From nobody Fri Nov 17 14:32:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWzs5291Qz512rd; Fri, 17 Nov 2023 14:32: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 4SWzs51VwSz4Cp7; Fri, 17 Nov 2023 14: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=1700231577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dvRu8TcT0FRJUoMXY+Gv58n1y7LEVbWSJ2ywG4ULWB0=; b=fIlwmubU8HqPWFHOGBDYALSTZhyuQq0RoHVsFUUZSstFY7cBqz+Fg3R1Fl8/I625cOhGdY M1CmxixroofiHwzYBc/KebG+6I0O3EaAzy9ymdMrNClJRqq/tGwGmL23J7g7Wb6drYWW8o ahngUvF4HtAgCjO6kGUet7xHoyV/hI/WIeJdLzDn4XU6kPK0Qnc6AeAX9WXlGdTUlIBIKs zqkNj0RPZdnV9dEPc/xYpVjP62+hiP7Vi91dQZpaRBrFOsNEpSxD+qPTKQO5b7JU1PjCv0 0ZZ4zuDrZjGEXH4dhgCRqBmwxgGneDN+iN8wlChajhETbz43KMIq3TPapFebHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700231577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dvRu8TcT0FRJUoMXY+Gv58n1y7LEVbWSJ2ywG4ULWB0=; b=o4dw2jNah/3TVtvKaqYDdT3rvpL7GOT6q8YJ2DPA6qsag2XPM7yX4SiSCtl9RI6LVpjDcc efrDqCADqs95hlk8zsEN4Tm0Z2Ipu2PbcauTEQgr9x9+eFPlXboESFz0T6jowcwszfvyaK pgB6oQxTS7/wJ9FY/GcmgaENS3BHRkiIIBqADdXdrZ/gq0v/IsbGUw27UUCFFmIR32jtNH iQNuuFELGsgv0fY6y8vFYtq2z7GA3ZdplPN0yQW3sIrP1OtNAbEh7zoH0+32Nca52jI+YU ekkn1F7iV3ma9YTKw5wbfYucVHzWjFZr0wBA9UF/9mUvoWL7u6MLNZzUn9WpuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700231577; a=rsa-sha256; cv=none; b=GwZqkvb7tXwHYQkjm4NMYlMi+BLZXBVYotzlHxPAXJTZPQ7MyE9qxWdFNbKJFlLfPCpPbe f2BBbELsVkH39fLtagVuz9AMMjeHJqtWc98UQsDj8lTWhYv+SlM6hn9UVDHy2C79BmPH3h auwJOd4LTxgbysdbZmVP9Lcui1OzHiBhuRE84DWZrEyfUWDaOSiawMGVLmse4pkWNZw0Bv 5OJQkvbSxglXhZbfiPMyj4/upI9mhVrCYn3EtZ/bVQvt60PrfDLum22olT9jd8tTsM3/yO K351v5/RUkOSRkwHn0QJnZq96TR2U2/qhJE62CxQv7LK3LcwZFR2Ql/KMsBZBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SWzs50J7wzmrD; Fri, 17 Nov 2023 14: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 3AHEWu0E023504; Fri, 17 Nov 2023 14: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 3AHEWuPc023501; Fri, 17 Nov 2023 14:32:56 GMT (envelope-from git) Date: Fri, 17 Nov 2023 14:32:56 GMT Message-Id: <202311171432.3AHEWuPc023501@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: b08a9b86f581 - main - ktls tests: Relax error checking for shutdown(2) a bit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b08a9b86f581edf09c5a2729d877a0204499685b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b08a9b86f581edf09c5a2729d877a0204499685b commit b08a9b86f581edf09c5a2729d877a0204499685b Author: Mark Johnston AuthorDate: 2023-11-17 14:29:28 +0000 Commit: Mark Johnston CommitDate: 2023-11-17 14:31:21 +0000 ktls tests: Relax error checking for shutdown(2) a bit In my test suite runs I occasionally see shutdown(2) fail with ECONNRESET rather than ENOTCONN. soshutdown(2) will return ENOTCONN if the socket has been disconnected (synchronized by the socket lock), and tcp_usr_shutdown() will return ECONNRESET if the inpcb has been dropped (synchronized by the inpcb lock). I think it's possible to pass the first check in soshutdown() but fail the second check in tcp_usr_shutdown(), so modify the KTLS tests to permit this. Reviewed by: jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42277 --- tests/sys/kern/ktls_test.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index a3d0c17d6d62..f57ae74112a2 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -1904,10 +1904,13 @@ test_ktls_receive_bad_size(const atf_tc_t *tc, struct tls_enable *en, /* * The other end may notice the error and drop the connection * before this executes resulting in shutdown() failing with - * ENOTCONN. Ignore this error if it occurs. + * either ENOTCONN or ECONNRESET. Ignore this error if it + * occurs. */ - if (shutdown(sockets[1], SHUT_WR) != 0) - ATF_REQUIRE_ERRNO(ENOTCONN, true); + if (shutdown(sockets[1], SHUT_WR) != 0) { + ATF_REQUIRE_MSG(errno == ENOTCONN || errno == ECONNRESET, + "shutdown() failed: %s", strerror(errno)); + } ktls_receive_tls_error(sockets[0], EMSGSIZE); From nobody Fri Nov 17 16:35:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SX2Zf2Gc8z51870; Fri, 17 Nov 2023 16:35: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 4SX2Zf1lmVz4Ntq; Fri, 17 Nov 2023 16:35:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700238938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LJxI3v7EOIpWkONXVqhw2Mn0lCAwjUjkQ1rVYEQhEpg=; b=RVF8QIL0dUC3MvIK8eTpw/k8EuaOjQ1Iu5SkT269mEjiq1q/UVLiE5dd8hkOW8s9J7liw4 gG9VEKosOjFgInYc8/fpThL3us+Y7mFtsxAQvEL+wWwhRhfhe9nV+gwuVG9VJ4C9vf7R4h G4cjvgXoKJl50ZboX338xGwMjG92HbNWZ1py8pXX6VBRT8BVh5+ZmuPHoa05gDDKG9hK0y EJXM6I6Rg6r52e82gRrdZkdjrNYZUh75UFs4Maas4DI8U3Qfw7qtWFjJRArQhWsen7H1op h06nRAt5uDdk6nQ5HL4oYU7+ERFeeEExtk0OBHHvkiVHz6P37JBpSvPPgbircg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700238938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LJxI3v7EOIpWkONXVqhw2Mn0lCAwjUjkQ1rVYEQhEpg=; b=L5MVIfin1wyyJ6mlK0S2IMZOKQM2ow7Gx29/DisQziyrqeNcpv7dpNKIrX6N8m13/tGlpf TuF8oKmL0x4AFCp5hl8vSUyYgFw+h0+OhYy4CAA17KQE4xDlNwCo5KXTdHx/hExgTmbHfW 8lTkdtQrZaMCStbwEKCP6XqbfbULbEO5yaubc7o9ZKHQSvOkIbwIFFF/AeEyEre7zjIFFT iSBDMUtPPru7MMuUVpGIbB1Or0+yuqEmUvHd6tw+6bu55bNixi8oE7A/qNwFkfb+d0dJtG kUu0P/gSHWRlTtQb5nliEgjTqYSvCislSi6/7NwfOa7q+qx379L6zFx8fhGQAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700238938; a=rsa-sha256; cv=none; b=kT208fj4Q07gyYspVeRCgPMBm7XvFIHlTYO1YotX56zbb33nXcbmLwiFn1ukfDPysQG5My 7IEnOJpCfKdm3bwpBmHJwOPTIU5p14xM0wYMchqn+Eo2y4db4V0bHBdJwRzIJ3+1+EO4i1 b9n3UbJOnvb7A9x5iYd6z4zkdlS/7eMHEijbi+jHnLkwH67pzwvM+EmAxIQuIo+9ONPHnD NLh8gltKrBdTx4X8EMCXgufrM8jeAEDcN+Fbm/6c0ug5N54bsH5cfmtOKH6jVAtyQls8DT EXwbkJuvTGY/E47y0+FyGckzt6UAYwFe79y1jRJsCq8hFugVQUpImwlnDZCQIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SX2Zf0pJczr1b; Fri, 17 Nov 2023 16:35: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 3AHGZc2K024416; Fri, 17 Nov 2023 16:35:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHGZcRk024413; Fri, 17 Nov 2023 16:35:38 GMT (envelope-from git) Date: Fri, 17 Nov 2023 16:35:38 GMT Message-Id: <202311171635.3AHGZcRk024413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: b1538e8fc488 - main - dirdeps: Fix libpcap Makefile.depend.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: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b1538e8fc488409113b833dd1c53aab1057b0568 Auto-Submitted: auto-generated The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=b1538e8fc488409113b833dd1c53aab1057b0568 commit b1538e8fc488409113b833dd1c53aab1057b0568 Author: Ka Ho Ng AuthorDate: 2023-11-17 16:34:57 +0000 Commit: Ka Ho Ng CommitDate: 2023-11-17 16:34:57 +0000 dirdeps: Fix libpcap Makefile.depend.options This prevents libpcap's Makefile.depend from flip-flopping when OFED is enabled. Sponsored by : Juniper Networks, Inc. MFC after: 7 days Reviewed by: sjg Differential Revision: https://reviews.freebsd.org/D42649 --- lib/libpcap/Makefile.depend | 1 - lib/libpcap/Makefile.depend.options | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/libpcap/Makefile.depend b/lib/libpcap/Makefile.depend index 59966dc1a8ec..12b15914f2b6 100644 --- a/lib/libpcap/Makefile.depend +++ b/lib/libpcap/Makefile.depend @@ -7,7 +7,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/ofed/include \ usr.bin/yacc.host \ diff --git a/lib/libpcap/Makefile.depend.options b/lib/libpcap/Makefile.depend.options index 1c4c26ed4a5a..b02b812e2267 100644 --- a/lib/libpcap/Makefile.depend.options +++ b/lib/libpcap/Makefile.depend.options @@ -2,6 +2,6 @@ DIRDEPS_OPTIONS= OFED -DIRDEPS.OFED.yes= lib/ofed/libibverbs lib/ofed/libmlx5 +DIRDEPS.OFED.yes= lib/ofed/include lib/ofed/libibverbs lib/ofed/libmlx5 .include From nobody Fri Nov 17 17:06:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SX3Gl2zFbz519Q3; Fri, 17 Nov 2023 17:06: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 4SX3Gl2QtBz4RTQ; Fri, 17 Nov 2023 17:06:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700240815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=734hUtxsh9u2s4iRgDwT4PHAWXsY8tg3IRimyy4ZXsw=; b=AoG2KR90r2EAR+HZHITDfd7GWfPrN3JFdw2wjbZU0UIGYW56qw72WfMid3xapyStyYrB/e wgaeQsTaYCiCAkuW7nlYjQ59ty6V1G6ohlmYfWRONJoqjZ0CypcA4rVah8KOR/lXFZqcNu 3iMhP7BTA+earYeV/E4oLJoun9Rt/deeNmVexVEgLpRFryHtgaclc465rmPvSLp6/IhCbg VLtRpZAIkYxy1ChvJ1RPcTHGgJgkd/uzuHx/RCHlmyY2RFDtLNBELp4/d0ZSq9MQljjiaE b3IjegTyag6LbJvswtYkUlukb8dJ2EoouFj/vKtOm3b2td/0eI2zZMfywBWBSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700240815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=734hUtxsh9u2s4iRgDwT4PHAWXsY8tg3IRimyy4ZXsw=; b=MuGqY1DdEiPB7dty4Pm92d4CX8fQHpNvPx+N4JKFPjmcjKtGFemItmyxwzf3uIIfI6itQR YkJLQY0F7TD2mMTvjiHdxaJh+RQ3CGh3EUQT7o+oY2wdiy/k51P/XVpqBH3Jcp+wfifXH6 ZmouuxAtTjo/QxoAo1016TD1xtHBhQWAW/rBq7x7756z4gNdcJkB7y5o5s2Crk2aH8B8XO mzXM+sTAVQehFs2bimYc5vidD9EqruQ5PuQ24JqGz3CP96OOC/+furzo/yLVzqJiGC7Blj rLGTzSwc+/xfyYHXAU0B5jkbncJZq8Cc4tzbbhWTEZuMjioRYTPAwNjbYxXNWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700240815; a=rsa-sha256; cv=none; b=gZTDT0ntmgTTpE9zSQ2aFXVquvO48xP6GrTkYuIuZUmqYZSpYVar1wDkwa3Tmv5mc17gbo 5fH7Oyxjo11wQpHDRNmgLqvxOgVWYHqzBeam7RYBBIYtfpD4zAuzwofyqK9J8j2Xw0m3QH oNl7mef+vZ9R1p8VPYncmh0+2v6D7UrowYN//mGf9gmXWniEmLFqBV2QCQQ7Gz1jdoO3PY Q3vPLOhA+z2KRmQqYobTd3ojnR9o5RkJa/9QPsAqYr0G7y5+YJ6HCYkr4zGKP++AnpA8CM QK93MjGF1XXy+8CkxDB+8car4nOV6zkd0wbS1GoMRzJN66VqxnSDabiZGri9aQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SX3Gl1GqLzr4Q; Fri, 17 Nov 2023 17:06: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 3AHH6tBi075208; Fri, 17 Nov 2023 17:06:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHH6taE075205; Fri, 17 Nov 2023 17:06:55 GMT (envelope-from git) Date: Fri, 17 Nov 2023 17:06:55 GMT Message-Id: <202311171706.3AHH6taE075205@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: fe3bb40b9e80 - main - pf: fix dummynet + ipdivert use 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fe3bb40b9e807d4010617de1ef040ba3aa623487 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=fe3bb40b9e807d4010617de1ef040ba3aa623487 commit fe3bb40b9e807d4010617de1ef040ba3aa623487 Author: Igor Ostapenko AuthorDate: 2023-11-17 16:04:01 +0000 Commit: Kristof Provost CommitDate: 2023-11-17 16:06:16 +0000 pf: fix dummynet + ipdivert use case Dummynet re-injects an mbuf with MTAG_IPFW_RULE added, and the same mtag is used by divert(4) as parameters for packet diversion. If according to pf rule set a packet should go through dummynet first and through ipdivert after then mentioned mtag must be removed after dummynet not to make ipdivert think that this is its input parameters. At the very beginning ipfw consumes this mtag what means the same behavior with tag clearing after dummynet. And after fabf705f4b5a pf passes parameters to ipdivert using its personal MTAG_PF_DIVERT mtag. PR: 274850 Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D42609 --- sys/netpfil/pf/pf.c | 27 +++++++-- tests/sys/netpfil/pf/divert-to.sh | 118 +++++++++++++++++++++++++++++++++++++- 2 files changed, 139 insertions(+), 6 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 6e6b0b20130d..9cb5fe03b5c2 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -303,6 +303,8 @@ static int pf_state_key_attach(struct pf_state_key *, static void pf_state_key_detach(struct pf_kstate *, int); static int pf_state_key_ctor(void *, int, void *, int); static u_int32_t pf_tcp_iss(struct pf_pdesc *); +static __inline void pf_dummynet_flag_remove(struct mbuf *m, + struct pf_mtag *pf_mtag); static int pf_dummynet(struct pf_pdesc *, struct pf_kstate *, struct pf_krule *, struct mbuf **); static int pf_dummynet_route(struct pf_pdesc *, @@ -4140,7 +4142,7 @@ pf_test_eth_rule(int dir, struct pfi_kkif *kif, struct mbuf **m0) /* But only once. We may see the packet multiple times (e.g. * PFIL_IN/PFIL_OUT). */ - mtag->flags &= ~PF_MTAG_FLAG_DUMMYNET; + pf_dummynet_flag_remove(m, mtag); return (PF_PASS); } @@ -4361,7 +4363,7 @@ pf_test_eth_rule(int dir, struct pfi_kkif *kif, struct mbuf **m0) mtag->flags |= PF_MTAG_FLAG_DUMMYNET; ip_dn_io_ptr(m0, &dnflow); if (*m0 != NULL) - mtag->flags &= ~PF_MTAG_FLAG_DUMMYNET; + pf_dummynet_flag_remove(m, mtag); } else { PF_RULES_RUNLOCK(); } @@ -7794,6 +7796,21 @@ pf_test_eth(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, return (pf_test_eth_rule(dir, kif, m0)); } +static __inline void +pf_dummynet_flag_remove(struct mbuf *m, struct pf_mtag *pf_mtag) +{ + struct m_tag *mtag; + + pf_mtag->flags &= ~PF_MTAG_FLAG_DUMMYNET; + + /* dummynet adds this tag, but pf does not need it, + * and keeping it creates unexpected behavior, + * e.g. in case of divert(4) usage right after dummynet. */ + mtag = m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL); + if (mtag != NULL) + m_tag_delete(m, mtag); +} + static int pf_dummynet(struct pf_pdesc *pd, struct pf_kstate *s, struct pf_krule *r, struct mbuf **m0) @@ -7844,7 +7861,7 @@ pf_dummynet_route(struct pf_pdesc *pd, struct pf_kstate *s, ip_dn_io_ptr(m0, &dnflow); if (*m0 != NULL) { pd->pf_mtag->flags &= ~PF_MTAG_FLAG_ROUTE_TO; - pd->pf_mtag->flags &= ~PF_MTAG_FLAG_DUMMYNET; + pf_dummynet_flag_remove(*m0, pd->pf_mtag); } } } @@ -7933,7 +7950,7 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, /* But only once. We may see the packet multiple times (e.g. * PFIL_IN/PFIL_OUT). */ - pd.pf_mtag->flags &= ~PF_MTAG_FLAG_DUMMYNET; + pf_dummynet_flag_remove(m, pd.pf_mtag); PF_RULES_RUNLOCK(); return (PF_PASS); @@ -8494,7 +8511,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb if (ip_dn_io_ptr != NULL && pd.pf_mtag != NULL && pd.pf_mtag->flags & PF_MTAG_FLAG_DUMMYNET) { - pd.pf_mtag->flags &= ~PF_MTAG_FLAG_DUMMYNET; + pf_dummynet_flag_remove(m, pd.pf_mtag); /* Dummynet re-injects packets after they've * completed their delay. We've already * processed them, so pass unconditionally. */ diff --git a/tests/sys/netpfil/pf/divert-to.sh b/tests/sys/netpfil/pf/divert-to.sh index 0a37cea78ad3..965464b35810 100644 --- a/tests/sys/netpfil/pf/divert-to.sh +++ b/tests/sys/netpfil/pf/divert-to.sh @@ -51,11 +51,13 @@ # > outbound > diverted > outbound | network terminated # # Test case naming legend: +# ipfwon - with ipfw enabled +# ipfwoff - with ipfw disabled # in - inbound # div - diverted # out - outbound # fwd - forwarded -# ipfwon - with ipfw enabled, which allows all +# dn - delayed by dummynet # . $(atf_get_srcdir)/utils.subr @@ -67,6 +69,13 @@ divert_init() fi } +dummynet_init() +{ + if ! kldstat -q -m dummynet; then + atf_skip "This test requires dummynet" + fi +} + ipfw_init() { if ! kldstat -q -m ipfw; then @@ -396,6 +405,110 @@ ipfwon_in_div_in_fwd_out_div_out_cleanup() pft_cleanup } +atf_test_case "ipfwoff_in_dn_in_div_in_out_dn_out_div_out" "cleanup" +ipfwoff_in_dn_in_div_in_out_dn_out_div_out_head() +{ + atf_set descr 'Test inbound > delayed+diverted > outbound > delayed+diverted > outbound | network terminated' + atf_set require.user root +} +ipfwoff_in_dn_in_div_in_out_dn_out_div_out_body() +{ + local ipfwon + + pft_init + divert_init + dummynet_init + test "$1" == "ipfwon" && ipfwon="yes" + test $ipfwon && ipfw_init || assert_ipfw_is_off + + epair=$(vnet_mkepair) + vnet_mkjail alcatraz ${epair}b + ifconfig ${epair}a 192.0.2.1/24 up + ifconfig ${epair}a ether 02:00:00:00:00:01 + jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up + test $ipfwon && jexec alcatraz ipfw add 65534 allow all from any to any + + # Sanity check + atf_check -s exit:0 -o ignore ping -c3 192.0.2.2 + + # a) ping should time out due to very narrow dummynet pipes { + + jexec alcatraz dnctl pipe 1001 config bw 1Byte/s + jexec alcatraz dnctl pipe 1002 config bw 1Byte/s + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "ether pass in from 02:00:00:00:00:01 l3 all dnpipe 1001" \ + "ether pass out to 02:00:00:00:00:01 l3 all dnpipe 1002 " \ + "pass all" \ + "pass in inet proto icmp icmp-type echoreq divert-to 127.0.0.1 port 1001 no state" \ + "pass out inet proto icmp icmp-type echorep divert-to 127.0.0.1 port 1002 no state" + + jexec alcatraz $(atf_get_srcdir)/divapp 1001 divert-back & + indivapp_pid=$! + jexec alcatraz $(atf_get_srcdir)/divapp 1002 divert-back & + outdivapp_pid=$! + # Wait for the divappS to be ready + sleep 1 + + atf_check -s not-exit:0 -o ignore ping -c1 -s56 -t1 192.0.2.2 + + wait $indivapp_pid + atf_check_not_equal 0 $? + wait $outdivapp_pid + atf_check_not_equal 0 $? + + # } + + # b) ping should NOT time out due to wide enough dummynet pipes { + + jexec alcatraz dnctl pipe 2001 config bw 100KByte/s + jexec alcatraz dnctl pipe 2002 config bw 100KByte/s + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "ether pass in from 02:00:00:00:00:01 l3 all dnpipe 2001" \ + "ether pass out to 02:00:00:00:00:01 l3 all dnpipe 2002 " \ + "pass all" \ + "pass in inet proto icmp icmp-type echoreq divert-to 127.0.0.1 port 2001 no state" \ + "pass out inet proto icmp icmp-type echorep divert-to 127.0.0.1 port 2002 no state" + + jexec alcatraz $(atf_get_srcdir)/divapp 2001 divert-back & + indivapp_pid=$! + jexec alcatraz $(atf_get_srcdir)/divapp 2002 divert-back & + outdivapp_pid=$! + # Wait for the divappS to be ready + sleep 1 + + atf_check -s exit:0 -o ignore ping -c1 -s56 -t1 192.0.2.2 + + wait $indivapp_pid + atf_check_equal 0 $? + wait $outdivapp_pid + atf_check_equal 0 $? + + # } +} +ipfwoff_in_dn_in_div_in_out_dn_out_div_out_cleanup() +{ + pft_cleanup +} + +atf_test_case "ipfwon_in_dn_in_div_in_out_dn_out_div_out" "cleanup" +ipfwon_in_dn_in_div_in_out_dn_out_div_out_head() +{ + atf_set descr 'Test inbound > delayed+diverted > outbound > delayed+diverted > outbound | network terminated, with ipfw enabled' + atf_set require.user root +} +ipfwon_in_dn_in_div_in_out_dn_out_div_out_body() +{ + ipfwoff_in_dn_in_div_in_out_dn_out_div_out_body "ipfwon" +} +ipfwon_in_dn_in_div_in_out_dn_out_div_out_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "ipfwoff_in_div" @@ -410,4 +523,7 @@ atf_init_test_cases() atf_add_test_case "ipfwoff_in_div_in_fwd_out_div_out" atf_add_test_case "ipfwon_in_div_in_fwd_out_div_out" + + atf_add_test_case "ipfwoff_in_dn_in_div_in_out_dn_out_div_out" + atf_add_test_case "ipfwon_in_dn_in_div_in_out_dn_out_div_out" } From nobody Fri Nov 17 17:08:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SX3Jm0jFXz519MW; Fri, 17 Nov 2023 17:08: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 4SX3Jm08L2z4SB0; Fri, 17 Nov 2023 17:08:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700240920; h=from:from:reply-to:subject:subject: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/cIjRZYkfWDgq89JPX0fsj4xlbSMcBfLGUzIqOZ5PA=; b=jRgZwtBfQUJHBt2NagFgklxuGBHvAF4cyu1U0bj6NENtI6Ior0zrxFM77Qc1u3hdlLW2zc /CcVGG7tKck+0YfrZ0sgNnMqwwzq152Xxs6WSMkjnZiGj9bUj0xE34qH/U4tJ1YV6e0alX nCNfAHybT0hKDeiBedFspws6iQ7IRNY0+pZcKBpGsgUH2rYZ656zyTpiTxgof4etLvVEft bAQZkCoZTmffDKcM/J6Wg/0S1IWdkPPM3+1tNgZY0An10G9A4xWxhmC5q+Xz0gm6UYkt8f Eo1Gkel2pDdLQsvYdo9Rltga82b7y/Jy0iHu78zBcZdLjmxpfsTLH3z4RhhaiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700240920; h=from:from:reply-to:subject:subject: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/cIjRZYkfWDgq89JPX0fsj4xlbSMcBfLGUzIqOZ5PA=; b=IQo3RMKyxZ9syByoN/WR7fGRCHqIUoVPQO5HK5+J7w2BAFGsNklo/Kj28iEfiIowm16+Gq c9vutd3+QR3a70WA2cVTfrknUGgEPu4OFgd9GjlkInSJtOo4tYuTG2VeQn0ubQ4jFEsyS8 iZPk2Te0Idu8qUvux3iJhIqcBxwuEqgOu+cDRNhZueBwUsCI2RkBS+5AtsZfV+UXn971VA WSNSj8+L9MbmNCmRYUNy/6j1zNba9N8EGxjw/XnADjRDO0NuSeCUuYhkxvWYqGgKvVC5qf zJOHT0DQdbs8Elb7Zr47cvRTJmn3GzZvtvCouUPPwHj68tfQv7Opgm78YpjZXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700240920; a=rsa-sha256; cv=none; b=MgrCjQ09XL8a9gxhDGB8eZDDoQWkYttqvY6DKAOD9PbR6GzEemkepZK3E7g6/LSppCqK6P N2ateOqofUy2s3b483Va/vHMls9V/WF8a/lor98GCVIJI/nVjeFNRlM9WcPy33P00cIH8X rW2OoRVHlC4NxV74GKJx+5ZWzfYcgKbtwKHBYtLKxP4WyFJdD1h2N7Jy2cLovcU0nQgUpZ ICIqUuHdpAoQv+8hhSro+Zg7v+2AuvAemtfbh9iJ9kLLbtN8lv968xv7d6AFPWHfxKfbTF L5UXt8YKfrhvMKtnmW4pyYCRB2rR29CYZBUI8wfj0RsPIFMXbJY+xpqU6iTw4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SX3Jl6H87zrP9; Fri, 17 Nov 2023 17:08: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 3AHH8dAt075569; Fri, 17 Nov 2023 17:08:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHH8dwC075566; Fri, 17 Nov 2023 17:08:39 GMT (envelope-from git) Date: Fri, 17 Nov 2023 17:08:39 GMT Message-Id: <202311171708.3AHH8dwC075566@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brad Davis Subject: git: 5bcd2d5a43c0 - main - Fix a comment typo. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5bcd2d5a43c0eef256f932d726c0ed764945b17f Auto-Submitted: auto-generated The branch main has been updated by brd: URL: https://cgit.FreeBSD.org/src/commit/?id=5bcd2d5a43c0eef256f932d726c0ed764945b17f commit 5bcd2d5a43c0eef256f932d726c0ed764945b17f Author: Brad Davis AuthorDate: 2023-11-17 17:06:36 +0000 Commit: Brad Davis CommitDate: 2023-11-17 17:08:24 +0000 Fix a comment typo. --- share/examples/modules/skel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/examples/modules/skel.c b/share/examples/modules/skel.c index 407cbee32e8a..beb461720dfa 100644 --- a/share/examples/modules/skel.c +++ b/share/examples/modules/skel.c @@ -44,7 +44,7 @@ #include /* - * Every module can hav ea module specific piece of code that is + * Every module can have a module specific piece of code that is * executed whenever the module is loaded or unloaded. The following * is a trivial example that prints a message on the console whenever * the module is loaded or unloaded. From nobody Fri Nov 17 17:24:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SX3gS432Gz51B93; Fri, 17 Nov 2023 17:24: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 4SX3gS3bysz4Th2; Fri, 17 Nov 2023 17:24:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700241892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h4f/ubEIQg4T4FYF+RM1iBT7Syt5a5yqpdmoLoJ0/jI=; b=qIIcNsMkjWlmeXbWAhorFsw8rBdOhhlA+T+bN2cWj+OXtxggjHEaA99X382YkXgHQdtzzy LjgEWx2iK/pl0197wBv34CsyDHfMwJgGM+3/qiHSDM7oNFDR7M/nNZQTEjHE9IXM+1WZfx 5ITfkkzyeRalxHRx7KRyIS9ycCA5oIdUzSht9Ok41ir7M2aEGtzONnV9Vm9UqsbBWqhyZz iJngaEfi0t6FAZ6qFQKs50vw8MqzBtCDCiic4sgNq2l0phpKEpkiXzzXFUsHQPIcl74iXe 3xU6gWG3haJmr9nZrIApjTsxCTY6bkpSvL06x/ErIjqtReJk/MyBrIe84sfrug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700241892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h4f/ubEIQg4T4FYF+RM1iBT7Syt5a5yqpdmoLoJ0/jI=; b=I3Biq3aPYcAhRCcp++47wS5bO///GP8yi9tfYK5eZ/E0TyXqnLsbMe08i+xxmDrgwjlttE Oc+hr16js9GIr+VdDD6wqkiaPKrCv99LV9E0nJIKa8dLogtDBLYj0+/pl0PIbwfagWFcue zbUxqzzp0NsQyV2fJpqeAq1woEjE6Ti7ujNozN4sM1YlT98hmYSaGCotJYESYFEwO8j/b8 eniyhnP9BttH0YedOP41YkCh6dbrGErwPJY94K6AEzrO80x2TDsNUl8A/0VbCwPvbzu1ro dxNM3KfpQcUHKbyTPc5pfN44HLIpGk0tGvAfK1TmL80V9KagssDyVovE9uuucA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700241892; a=rsa-sha256; cv=none; b=bRUCVrgdfTfLCuEribG+AXh2cNrHmYzBeXTlOTNOmxEbVWI0xDPT9eJZP5De/vIN5j46+S SsU8qL6oB6Q4z66wYr7N8q2nF1dpPwviMzpWWOyIGZdbiPDD4nThJZoLNPAypjGmf0015w yzSiF4i+oxLUT0jo4fPuCTaJgFhZqqRm2OIaJunfCej0oqyX8+J9Cgr5v2/ygE2O6XtoJL YaFhbGmWKqUKh5BbyQ+IKm4dOz9/q/U/qnJ/21z3Xb4C/CxF9whu0ymMAEnlO1SVQ3oskY LxX0oFDzVNWs+hNg6PsX/VDdiN+bJQZpFxsiWlNTnbmh0LdT8vhjoTRn9j9geQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SX3gS2WW4zryd; Fri, 17 Nov 2023 17:24: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 3AHHOqg6008225; Fri, 17 Nov 2023 17:24:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHHOqxh008222; Fri, 17 Nov 2023 17:24:52 GMT (envelope-from git) Date: Fri, 17 Nov 2023 17:24:52 GMT Message-Id: <202311171724.3AHHOqxh008222@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: efad7cbfdc06 - main - ng_ksocket: fix upcall clearing on node shutdown List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: efad7cbfdc06e92bcc589a6c0cae2f3bea0d5cb9 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=efad7cbfdc06e92bcc589a6c0cae2f3bea0d5cb9 commit efad7cbfdc06e92bcc589a6c0cae2f3bea0d5cb9 Author: Gleb Smirnoff AuthorDate: 2023-11-17 17:23:58 +0000 Commit: Gleb Smirnoff CommitDate: 2023-11-17 17:23:58 +0000 ng_ksocket: fix upcall clearing on node shutdown Note: imho, the proper solution would be to guarantee that upcalls won't ever be called after soclose(), but this isn't the case, yet. This change at least makes the node work the way it always worked. Reviewed by: afedorov Differential Revision: https://reviews.freebsd.org/D42636 PR: 272319 PR: 275106 Fixes: 779f106aa169256b7010a1d8f963ff656b881e92 --- sys/netgraph/ng_ksocket.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/sys/netgraph/ng_ksocket.c b/sys/netgraph/ng_ksocket.c index 7e5be8c211ae..337248789473 100644 --- a/sys/netgraph/ng_ksocket.c +++ b/sys/netgraph/ng_ksocket.c @@ -929,17 +929,24 @@ static int ng_ksocket_shutdown(node_p node) { const priv_p priv = NG_NODE_PRIVATE(node); + struct socket *so = priv->so; priv_p embryo; /* Close our socket (if any) */ if (priv->so != NULL) { - SOCKBUF_LOCK(&priv->so->so_rcv); - soupcall_clear(priv->so, SO_RCV); - SOCKBUF_UNLOCK(&priv->so->so_rcv); - SOCKBUF_LOCK(&priv->so->so_snd); - soupcall_clear(priv->so, SO_SND); - SOCKBUF_UNLOCK(&priv->so->so_snd); - soclose(priv->so); + if (SOLISTENING(so)) { + SOLISTEN_LOCK(so); + solisten_upcall_set(so, NULL, NULL); + SOLISTEN_UNLOCK(so); + } else { + SOCK_RECVBUF_LOCK(so); + soupcall_clear(so, SO_RCV); + SOCK_RECVBUF_UNLOCK(so); + SOCK_SENDBUF_LOCK(so); + soupcall_clear(so, SO_SND); + SOCK_SENDBUF_UNLOCK(so); + } + soclose(so); priv->so = NULL; } From nobody Fri Nov 17 17:24:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SX3gT5WCXz51BHD; Fri, 17 Nov 2023 17:24: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 4SX3gT51mkz4ThQ; Fri, 17 Nov 2023 17:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700241893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rkvCpyMAwE+Gk4xbiCMnLmmC9WBdhiwayVRLL65pYzM=; b=iWuqhIZZxumbAW1X9Z5SVC6sMAFjuX1aDbMT5BL36wvv5sSkcRz771jOoZbeRcc701/A0v vO/gtd1UdXfmIHwMidJXvGwsOp+L0l3EzOWbabIG+EteHfpdwoJkBPi+y8qdBWe50RqU7Y h4zqBQY1tuzpbLet0G+RGhCFL39Hs4LkeYrcEitdiI5r6acE7YHmA3mqZR2enqQlkeZwSP +DwYnqgVG9pdfsZBS9Jj6/5P85WiPzi4N96+WjYNH99iZ3jiL8dlkAZsgMgTlBxgSp6sCv lguU8Mkn0iAqe6xYB4BnLcoY5txyXyQabm2/YQO70tHoCkY1Aii7TpnWA3we7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700241893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rkvCpyMAwE+Gk4xbiCMnLmmC9WBdhiwayVRLL65pYzM=; b=vL5RLCvYjpj9Oxr9/ovBiXSY4D4HnOUG2fvztVl2NBk+9Z5Wlz04J0q5ZRFMh1xyr9IIpB q6+ynSqQyRuvDy4aRhmTRLLB5N3846aWnunXIlZPi3T3YM5CuyM3lMx1E1T95qKUgVRTF8 RiqFI4DwXO176DIORlVhVz/iW9h3J2v++wq6Qhf8DG8rHYHwWgRTPfRHrLHM3SPy4gBU62 UUUZu4LmsqVKmrwbL1Z0zne6QcLzIufntsh5hmYtVKl4IHGmns0R9lbQ9IGGtkpoLOTdL9 372QvVsasoFV82E5vY6Q/Vhmh6uY2f1A71DZyWuFZymXbEfFexvQM5cwLINVHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700241893; a=rsa-sha256; cv=none; b=TJfwqXXzRgopABmDyu2f38Leed0HsZYatH80RRRg+qGON/PkuNU0A1tDkkSIZY3OqQ/CKF Q+ykH7T1Khe0RbHqQ90VX451is0Kxak6SpZv/7uH/hSyp5aoThXosyXF2dl12TXgR7+ZCR WEaUXj35t4EqUdvK98IQRWZy5iL2FqnHyp59ALHbmVdAR05MQ6zBuQljUdJgbBL/vKQwRq nbia+dffsykF46X0gbH5NsoyZDs7cx0I+9i48+wOfsqgrrKzsYaWDu4WUxAAEnlSB3F2YY 8WdQCXS04IzoB590dN2KwJuJbbDEjsWvOKp4v9mhrRQyE4Cq29vg6xDm+ne5Ig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SX3gT3kYbzsGY; Fri, 17 Nov 2023 17:24: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 3AHHOrGM008262; Fri, 17 Nov 2023 17:24:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHHOr9Z008259; Fri, 17 Nov 2023 17:24:53 GMT (envelope-from git) Date: Fri, 17 Nov 2023 17:24:53 GMT Message-Id: <202311171724.3AHHOr9Z008259@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: 43f7e2166810 - main - ng_ksocket: fix accept(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: 43f7e21668105cc5a3c66eae5ecef0203c2df62f Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=43f7e21668105cc5a3c66eae5ecef0203c2df62f commit 43f7e21668105cc5a3c66eae5ecef0203c2df62f Author: Gleb Smirnoff AuthorDate: 2023-11-17 17:24:30 +0000 Commit: Gleb Smirnoff CommitDate: 2023-11-17 17:24:30 +0000 ng_ksocket: fix accept(2) - Provide listen upcall and set it on NGM_KSOCKET_LISTEN - Mask EWOULDBLOCK on NGM_KSOCKET_ACCEPT Reviewed by: afedorov Differential Revision: https://reviews.freebsd.org/D42637 PR: 272319 PR: 275106 Fixes: 779f106aa169256b7010a1d8f963ff656b881e92 --- sys/netgraph/ng_ksocket.c | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/sys/netgraph/ng_ksocket.c b/sys/netgraph/ng_ksocket.c index 337248789473..777f3261356d 100644 --- a/sys/netgraph/ng_ksocket.c +++ b/sys/netgraph/ng_ksocket.c @@ -152,6 +152,10 @@ static const struct ng_ksocket_alias ng_ksocket_protos[] = { /* Helper functions */ static int ng_ksocket_accept(priv_p); +static int ng_ksocket_listen_upcall(struct socket *so, void *arg, + int waitflag); +static void ng_ksocket_listen_upcall2(node_p node, hook_p hook, + void *arg1, int arg2); static int ng_ksocket_incoming(struct socket *so, void *arg, int waitflag); static int ng_ksocket_parse(const struct ng_ksocket_alias *aliases, const char *s, int family); @@ -695,6 +699,12 @@ ng_ksocket_rcvmsg(node_p node, item_p item, hook_p lasthook) /* Listen */ so->so_state |= SS_NBIO; error = solisten(so, *((int32_t *)msg->data), td); + if (error == 0) { + SOLISTEN_LOCK(so); + solisten_upcall_set(so, + ng_ksocket_listen_upcall, priv); + SOLISTEN_UNLOCK(so); + } break; } @@ -715,11 +725,15 @@ ng_ksocket_rcvmsg(node_p node, item_p item, hook_p lasthook) /* * If a connection is already complete, take it. * Otherwise let the upcall function deal with - * the connection when it comes in. + * the connection when it comes in. Don't return + * EWOULDBLOCK, per ng_ksocket(4) documentation. */ error = ng_ksocket_accept(priv); - if (error != 0 && error != EWOULDBLOCK) + if (error == EWOULDBLOCK) + error = 0; + if (error != 0) ERROUT(error); + priv->response_token = msg->header.token; priv->response_addr = NGI_RETADDR(item); break; @@ -1064,10 +1078,6 @@ ng_ksocket_incoming2(node_p node, hook_p hook, void *arg1, int arg2) } } - /* Check whether a pending accept operation has completed */ - if (priv->flags & KSF_ACCEPTING) - (void )ng_ksocket_accept(priv); - /* * If we don't have a hook, we must handle data events later. When * the hook gets created and is connected, this upcall function @@ -1250,6 +1260,25 @@ out: return (0); } +static int +ng_ksocket_listen_upcall(struct socket *so, void *arg, int waitflag) +{ + priv_p priv = arg; + int wait = ((waitflag & M_WAITOK) ? NG_WAITOK : 0) | NG_QUEUE; + + ng_send_fn1(priv->node, NULL, &ng_ksocket_listen_upcall2, priv, 0, + wait); + return (SU_OK); +} + +static void +ng_ksocket_listen_upcall2(node_p node, hook_p hook, void *arg1, int arg2) +{ + const priv_p priv = NG_NODE_PRIVATE(node); + + (void )ng_ksocket_accept(priv); +} + /* * Parse out either an integer value or an alias. */ From nobody Fri Nov 17 17:35:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SX3vw390Nz51BlC for ; Fri, 17 Nov 2023 17:35: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 4SX3vw2gj7z4VQs; Fri, 17 Nov 2023 17:35:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700242540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LiLH5DhOg04+KqXZzIZ0S1peV52rPbWtBetpWhq9ajk=; b=f6Jd/yiKGTdRKMKlBr7fv+j4OELN0D2PK5N618uxLCHkQuMoZJ87kxapHaCoFBDQc5Avwb gvYDWtO/Ie4dsJxNV5zM9Aa3ouQGivyq7j7ZftJfDqc4VUBI7JhXf+L0ifnSSGQwwECDfb 6etceVpxxz8aT9Dgz+a/jAFxahEcVG6XnBoIWnX8nb6bIpnD6DRqSaFEpgmB+MM1IEjthG XDb01Bc4mMYms6lZTwtFJcfyZwoqaFCKtoXtoDYgdUcr2np9VTXL6wKAL4TH5Ue+ZBHGdb 8YdrtEOd8rMfZo9kNfCC+Wk0sY9qiwSgbhEw0MZSIRaeepd0Ig30G8ZfoUcQyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700242540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LiLH5DhOg04+KqXZzIZ0S1peV52rPbWtBetpWhq9ajk=; b=Fngit5Z7cHMTqbeHXBnzEUo3KWZfXnEAt4tbI7lajwl38IO0cn3yqjfU6A99ZRgcV9GBZ5 IhiyzVyuoFcJMLgZQ25kEszbrHsUsR0iYFeei8yURe0HA1hsOKMNCOiGQqNyvUKb/oKOHx H1PcRP4rhRJWI55G1Grnb/ZOfRbbUmNy2yu+kaL4qrrFpo5vlxamAVuvDo8JSdyMoSjFAq MYZStC3f/V9/krD0se79Pzwd2f+sq3GtMNksr4bFv/YFrATPpce0CgI7WsOyglfj+LgLVF Q4D2BsR1LUpwpW0FBRspqkm/FSxTq9GZhEoNf2dEYiS7qvyVN9RbGIOEQWZj+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700242540; a=rsa-sha256; cv=none; b=cfBQSKeb4GwbNIsUpU/2b/ODhi+laRhrNo1QIBcP7lfZi4S1+MpINwsDIaHOuHlLUQF+hj 9OECj/UCvD5LbcC8KhC1pRvxMkrcH0ODrpxiZ0ToJu8jxmMaZXJ3eUBRDDL2sB/kkYB/VJ gpMb4wg1IzmCom9nrLPPHXJIedWevdaGWXLn9BRvcyfLYa0EP1WEJa8/zaOIH5TjiHEGXM gbRdPr+xnN0opPh/5PyPhUmiWmo9DJUCSKTgWB5vkdm0icbn/RM2zTUV1fT4T1Y1Z95X/e L3BBn6LopBzwFeZdG9yz32lieGW8BqbnPEgb+a/1P/LxfEQm/NTmo8S06cI+gQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SX3vw1jxgzsd5; Fri, 17 Nov 2023 17:35: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 3AHHZeLW024525; Fri, 17 Nov 2023 17:35:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHHZe9L024522; Fri, 17 Nov 2023 17:35:40 GMT (envelope-from git) Date: Fri, 17 Nov 2023 17:35:40 GMT Message-Id: <202311171735.3AHHZe9L024522@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Kristof Provost Subject: git: 03590e17c958 - internal/admin - Welcome R. Christian McDonald (rcm) as a src committer. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/internal/admin X-Git-Reftype: branch X-Git-Commit: 03590e17c958a02450c2921f84fbcdaa876f0ded Auto-Submitted: auto-generated The branch internal/admin has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=03590e17c958a02450c2921f84fbcdaa876f0ded commit 03590e17c958a02450c2921f84fbcdaa876f0ded Author: Kristof Provost AuthorDate: 2023-11-17 17:32:26 +0000 Commit: Kristof Provost CommitDate: 2023-11-17 17:34:20 +0000 Welcome R. Christian McDonald (rcm) as a src committer. Christian's been doing good work in the network stack in general, and specifically dealing with netlink issues. Punish him with a commit bit. kp will be his mentor. Approved by: core --- access | 1 + mentors | 1 + 2 files changed, 2 insertions(+) diff --git a/access b/access index f438c6831f39..4a239636673e 100644 --- a/access +++ b/access @@ -132,6 +132,7 @@ pho pjd pstef ram +rcm rew rmacklem royger diff --git a/mentors b/mentors index 95dd93e40d50..ef088a260558 100644 --- a/mentors +++ b/mentors @@ -28,6 +28,7 @@ oh manu pjd allanjude Co-mentor: oshogbo rajeshasp gallatin Co-mentor: vmaffione ram ken Co-mentor: mav +rcm kp sam emaste ssaxena imp theraven markj From nobody Fri Nov 17 17:42:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SX4466w1Fz51ChN; Fri, 17 Nov 2023 17:42: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 4SX4466BSyz4WgY; Fri, 17 Nov 2023 17:42:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700242966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ujJ7IMzliAFJAg6ONjzQyMfipaMaAgLpuNZs6AYA5gM=; b=uwYwvRUCkyrwyja1i8r1jklgJpmlbHAewG4upQJQH9lpNs6GKeC0RFbR4ktDJAub4KFsz9 ANzlT9j/5BCD5FJ1em7uss5Wx/4rreUFhb9pp9yYWGY4HW6vuZvwAhWRbkDwRX0WxhEFOV g8dnMju5JMT/VK4tJbGH2C9dC4iRdcPhNFqHDxgWzXsJaTxJq7GsgVRjbc4viQfhNKXFVp /vaTkTA3Ux5CfmqFIs9GpQgoLMQNdg5GEko3bFSHqvyP/at8/bZOBhf0rVjnc7iBlxGdBb ucCpNKFXEBhs6VNhHeOPY+S9DxzY8aJgAKaFf7XUGlbMUfc0qPcuhTpvw50MDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700242966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ujJ7IMzliAFJAg6ONjzQyMfipaMaAgLpuNZs6AYA5gM=; b=lbWVmcW1+wijDHV1h0ca6hpVv72AlJuPfzBv5sp9XNZbnhOnDkffy6FJ5JIcDjvxU9Kk/v UxWDapCJd39FC0PpSGM2fcKcHaCq/oA5pLt6GxpNJctYP4g4VR+swmR2QRL3lsZ59P1ovo 2SNkKjZCfjXfQZULm6cyfWupmzyASL3X17lzM9f9p0TcwUAOOHbA1TKsxzyPtZLZ+5+JFi EiM44PJGQSVr0+mrFOIJTT6vVhlxvWye6AznaqdaCS2IqNr5m8sT12Fqt/B53dmSDB58WZ niOki5Z6WMBOknRYMOipQh5XhYeMpGaaGUor2jImrNb+iZRhGwXdberZCArhXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700242966; a=rsa-sha256; cv=none; b=vZARHogebVV6DxN0EDPSGFWT+L82Y4IiTSDrZr3auIILd5os8l1tcp37Fri2hw8h1W+kFd jhbF5TPkDUGSLFIYn1ptK+OcFnlOFJ3dZZM0jpU4gSbeCCVFTkUhfXaiorXoW3BzbbJ8fZ aiuP9Ul6UoGCDWM+NCgrql+wCNyopz2FHBgYIsS+MoZB9LTw3Haukz5r6iO8x62mXmSpwx NKIb8N3AiRYJM69O4SPTNRwr2F0ZX0SsEgnNpCp2rQ9cSIKbzGn1M7YzmdU/HFqoQ/9GIV VwApzlkhJwbJ7x5Og0HEF0XmWPGcV/3whHfT5bIFsYL+0rc6GTTnDOo9RBA6zw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SX4465FYLzsRM; Fri, 17 Nov 2023 17:42:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AHHgkKv040909; Fri, 17 Nov 2023 17:42:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHHgkbL040906; Fri, 17 Nov 2023 17:42:46 GMT (envelope-from git) Date: Fri, 17 Nov 2023 17:42:46 GMT Message-Id: <202311171742.3AHHgkbL040906@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 2ac9cecac6ad - main - Fix typo in previous d282baddb0b02, breaking DTrace. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ac9cecac6add7de497d85b072b727d82f1e8ee6 Auto-Submitted: auto-generated The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=2ac9cecac6add7de497d85b072b727d82f1e8ee6 commit 2ac9cecac6add7de497d85b072b727d82f1e8ee6 Author: Alexander Motin AuthorDate: 2023-11-17 17:41:41 +0000 Commit: Alexander Motin CommitDate: 2023-11-17 17:42:33 +0000 Fix typo in previous d282baddb0b02, breaking DTrace. --- cddl/lib/libdtrace/io.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/lib/libdtrace/io.d b/cddl/lib/libdtrace/io.d index 043291244a50..d576f57476ce 100644 --- a/cddl/lib/libdtrace/io.d +++ b/cddl/lib/libdtrace/io.d @@ -194,7 +194,7 @@ inline int DEVSTAT_TYPE_IF_IDE = 0x020; #pragma D binding "1.13" DEVSTAT_TYPE_IF_IDE inline int DEVSTAT_TYPE_IF_OTHER = 0x030; #pragma D binding "1.13" DEVSTAT_TYPE_IF_OTHER -inline int DEVSTAT_TYPE_IF_NVM = 0x040; +inline int DEVSTAT_TYPE_IF_NVME = 0x040; #pragma D binding "1.13" DEVSTAT_TYPE_IF_NVME inline int DEVSTAT_TYPE_IF_MASK = 0x0f0; #pragma D binding "1.13" DEVSTAT_TYPE_IF_MASK From nobody Fri Nov 17 18:26:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SX53565npz51FFm; Fri, 17 Nov 2023 18:26: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 4SX5353zlqz4bKp; Fri, 17 Nov 2023 18:26:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700245617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q0bgyOdyj1XaLYyITLHlaVltvGHvnua5cOXLxpAOYV0=; b=SFEbmRIDxIUKEHVzYPuGwtA17QUGXYDwpY6BpzPA0KezI6PkEpcr3AjlxRh/8zTxRCsP08 RKnM5/JMvQb7q2Vi41gdUJB38UQHHhxi8PzxWt5mAqCN1SmpVrltLk9nvwBqdzWe/Uk4Rd 2tCQlmm/dr3ttHnha3RVQ6iHZoUNpdCM4dnwmFYtwzaiVMLshwE6GWofR0IewvBQzD429T dIhZTiRnCJUHOv98CtgEjQsyp6g+lv8kKeQsIdS9U6A5537CvH12nBnurFTPqusy53H8EU JX8qBFP6zYke5WvvcN48NJd8DSNDJLMQZnqsCcENBb9cwRZw04UEyUXvA7//Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700245617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q0bgyOdyj1XaLYyITLHlaVltvGHvnua5cOXLxpAOYV0=; b=wPkrsJ9gLVN8JhfqS/yb8WAGrg3bf+5YITGW1NjeDxK0URc+801P7imlZDRYYYp91mWeat cM8eZp2EsOZRIE7CQBl4M0KvbpdTK3lZiCYf8o63i/d9Tg8nC1bClFxjr17p8RdCw3fYnt rDDff5+b+FupmrvHMuxJwmuFoqdL2xHrrP1qhMGrr6fsDhp7l52n4O0EAXEiA6W7cfxwLm Lf84ZaVn8aGfEq9LaEzxf0sTmbJMYHhTeyiKgY6QZmlNDj/m+nbEAO8uUdlb9VRgkuV3ra mFmvjQB8IL7C2k2oJDhCyLCbT130ILJOWJZQARV10hI1xvvbMxpRZ48/YJ8cVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700245617; a=rsa-sha256; cv=none; b=nUgrt5psvAwT6IznLid5kGDuRRNVLt330LNF/NxspINY7BGq4CsCYjfW/0p/x/yMLZ2o8m HE1F2NSSBeXNADdP0SpuG1kSP3cLpe+bDtucL6ZZ3qZBbH7mxrVZPcklJyqvp/tHe4RCp8 teSNE5M/hnRcA6hY/ZMujpV4FDoGGH1Wb+bWaRPyiF+US+dwNzIQ1ftl6D/CtgJhrX1vgB mrV12Gt04VFkEoBSD2pbDtATYy/p9mva4U8OutwmA4UrS7IXF0VBZmiO2qIG/EehQww+It ladkKsbMOS1ulNQN2mcp4ARme/ObtFeSduz9iPs9fDzPk1HMS6McJDKhjoQH3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SX53533LdztTS; Fri, 17 Nov 2023 18:26: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 3AHIQvwG009550; Fri, 17 Nov 2023 18:26:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHIQvUY009547; Fri, 17 Nov 2023 18:26:57 GMT (envelope-from git) Date: Fri, 17 Nov 2023 18:26:57 GMT Message-Id: <202311171826.3AHIQvUY009547@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 115459be3132 - main - SEE ALSO section improvements for tuning(7), tunefs(8) and fsck_ffs(8) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 115459be3132079f38b848749d20c972fa823fbb Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=115459be3132079f38b848749d20c972fa823fbb commit 115459be3132079f38b848749d20c972fa823fbb Author: Gordon Bergling AuthorDate: 2023-11-17 18:24:22 +0000 Commit: Gordon Bergling CommitDate: 2023-11-17 18:24:22 +0000 SEE ALSO section improvements for tuning(7), tunefs(8) and fsck_ffs(8) cross-reference ffs(7) in fsck_ffs(8) cross-reference ffs(7) and tuning(7) in tunefs(8) cross-reference ffs(7) in tuning(7) PR: 263433 Reviewed by: bcr MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D42631 --- sbin/fsck_ffs/fsck_ffs.8 | 3 ++- sbin/tunefs/tunefs.8 | 4 +++- share/man/man7/tuning.7 | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sbin/fsck_ffs/fsck_ffs.8 b/sbin/fsck_ffs/fsck_ffs.8 index f100686e70e8..8288216c0681 100644 --- a/sbin/fsck_ffs/fsck_ffs.8 +++ b/sbin/fsck_ffs/fsck_ffs.8 @@ -28,7 +28,7 @@ .\" .\" @(#)fsck.8 8.4 (Berkeley) 5/9/95 .\" -.Dd May 3, 2019 +.Dd November 17, 2023 .Dt FSCK_FFS 8 .Os .Sh NAME @@ -425,6 +425,7 @@ are fully enumerated and explained in Appendix A of .Sh SEE ALSO .Xr fs 5 , .Xr fstab 5 , +.Xr ffs 7 , .Xr fsck 8 , .Xr fsdb 8 , .Xr newfs 8 , diff --git a/sbin/tunefs/tunefs.8 b/sbin/tunefs/tunefs.8 index bda39462a272..19059e335834 100644 --- a/sbin/tunefs/tunefs.8 +++ b/sbin/tunefs/tunefs.8 @@ -27,7 +27,7 @@ .\" .\" @(#)tunefs.8 8.2 (Berkeley) 12/11/93 .\" -.Dd August 16, 2022 +.Dd November 17, 2023 .Dt TUNEFS 8 .Os .Sh NAME @@ -218,6 +218,8 @@ specified mount point. .El .Sh SEE ALSO .Xr fs 5 , +.Xr ffs 7 , +.Xr tuning 7 , .Xr dumpfs 8 , .Xr gjournal 8 , .Xr growfs 8 , diff --git a/share/man/man7/tuning.7 b/share/man/man7/tuning.7 index 0756598e79e2..f04500d0f0dc 100644 --- a/share/man/man7/tuning.7 +++ b/share/man/man7/tuning.7 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 11, 2022 +.Dd November 17, 2023 .Dt TUNING 7 .Os .Sh NAME @@ -698,6 +698,7 @@ over services you export from your box (web services, email). .Xr login.conf 5 , .Xr rc.conf 5 , .Xr sysctl.conf 5 , +.Xr ffs 7 , .Xr firewall 7 , .Xr hier 7 , .Xr ports 7 , From nobody Fri Nov 17 18:51:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SX5bd1FnPz51GZK; Fri, 17 Nov 2023 18:51: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 4SX5bd0NS3z3F4v; Fri, 17 Nov 2023 18:51:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700247101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gJ0uTqvDbTlIgpAW0K9GHRlTMUHQ2HNFFQlAx0uQb2c=; b=hqEnetPx5ZJXp9aohgjWKHBMMuuusTCEDE+fK6O+sXR32OpU/Y/oI1SVB/8nxQDp8VPhXo JQBVixte/YzCPFAQiVdKQ/kMBEdK5yaXWTe7o2CjvRMSJDyO76idCrPToSG470hv/cxK2u 7DTgp5TLZ7Qhso/QLQlatx8x5qFhUTpDEjDmyDhouWoOmJoXhmRF70WnW39S3kVBRcrey3 /c4w1m8RPLN8enlHGU1BqILECX9po2rYJmyVqoNfpwbOPp0Ohizr79OErgBpF8nySZoNzi lxo+y7Wuj9qqNHqeDYUdJmZ64fpxr+n5yzRI0QRL2LnmvGP3BDTqq0mS+i4pIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700247101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gJ0uTqvDbTlIgpAW0K9GHRlTMUHQ2HNFFQlAx0uQb2c=; b=v7yekcMI1H5BYDjlAd9dCsVnUZ+c7aQrlM4xKDzmQmmp3ApHdw7cV0J+cLDMHkt5oHKGRW MaIpkK4zV6X+7j3vzXwws6sc6b3IyTA8pFA+5XjalZba/gMPkT5+f0c0CvXp7p3SuzNsAu deJAhDsTDRRYNmHgFLPVcSZOE5Vy2jUIFgusydrcRbW8w3tJL9t5FmF99iMNyWS/Njs+7A Q9BuuU6Z8YtGZjzUWcc+DbMzRe6EQnffj0fOP+ZM5zCg9HVyXu+gAN7dHgyCMjkdljcIue 0v5uC5SRDaVH2gsXmRJ5IbR+3kVjnR7i3Bm0lWmz47zA150HhZH24CTqcZ/Avw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700247101; a=rsa-sha256; cv=none; b=EsG/JcT6fDHCA/S6YMXuMAovSOMNqfUw7FQ2bQssfV2E3eiaFaIzah9kVPxCml2BFaa2lA mc/bPk/ANAP9C9zEQd/LuswEyv6rTcZ2ey6yVnw/MJ98L07tkVbDLxWnjjPOahXTKvFwtL cSYTy8/tpeSFK4b9y1eZI9L25XYa1V5Lj7XE0mZWbXcjb11QQiG4BAnPZKSUqOmSGhr1kh kyxGecUhrGUl7sit9hIDsAtRRumqfM/8Q7Tm+Cj5M3ON68Mft9JSbBrW3Fw2oY6p7y5QZ9 ZM3VKU01nRZ7iauIllsGKvaLTqts7euhp6TIYBKHfZgZgcRYOqNhEfCTgoymow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SX5bc6bJMzv1R; Fri, 17 Nov 2023 18:51: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 3AHIpeOS057645; Fri, 17 Nov 2023 18:51:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHIpe9m057642; Fri, 17 Nov 2023 18:51:40 GMT (envelope-from git) Date: Fri, 17 Nov 2023 18:51:40 GMT Message-Id: <202311171851.3AHIpe9m057642@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mike Karels Subject: git: 415c1c748d54 - main - khelp: suppress useless warning message on shutdown List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: karels X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 415c1c748d5492e41328fedf96b6bf3c9be94595 Auto-Submitted: auto-generated The branch main has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=415c1c748d5492e41328fedf96b6bf3c9be94595 commit 415c1c748d5492e41328fedf96b6bf3c9be94595 Author: Mike Karels AuthorDate: 2023-11-17 18:51:18 +0000 Commit: Mike Karels CommitDate: 2023-11-17 18:51:18 +0000 khelp: suppress useless warning message on shutdown If a module (e.g. the ertt hhook for TCP) can't clean up at shutdown, there is nothing to be done about it. In the ertt case, cleanup is just shutting down a UMA zone, which doesn't need to be done. Suppress EBUSY warnings on shutdown. PR: 271677 Reviewed by: tuexen, imp Differential Revision: https://reviews.freebsd.org/D42650 --- sys/kern/kern_khelp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_khelp.c b/sys/kern/kern_khelp.c index 3d75da141b48..f8a6f3e749da 100644 --- a/sys/kern/kern_khelp.c +++ b/sys/kern/kern_khelp.c @@ -357,7 +357,7 @@ khelp_modevent(module_t mod, int event_type, void *data) } else if (error == ENOENT) /* Do nothing and allow unload if helper not in list. */ error = 0; - else if (error == EBUSY) + else if (error == EBUSY && event_type != MOD_SHUTDOWN) printf("Khelp module \"%s\" can't unload until its " "refcount drops from %d to 0.\n", kmd->name, kmd->helper->h_refcount); From nobody Fri Nov 17 22:11:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXB2j0jzPz51RLM; Fri, 17 Nov 2023 22:11: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 4SXB2h6Mnbz4Dxk; Fri, 17 Nov 2023 22:11:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700259116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nnbb7TmKJfYh/lGBwNg+hNwofSuew21s9LfJZAiHFtY=; b=kizA0hvafKpB75d93a6CCSTJlH74jdMbaJMyN36TBYRc1R24G/v+EKc70Izm0ZwsV+JPDo uUP+Amta/tzUfx1wzzW1obJP66H0mtmF2UQZfoooRi7OjYbkZnQKOomy1qUQorfqxZStgV 9ollqeDJPcPJS/ZktpIIL4psZh5Ryys0mo8wLgdqWzF36HgBjIuToj64rkbPvFfbTIJyUz jIPy/V4AuLHDgTJMkV+WlqhlGK1+4f4Bn9HB0HVjmF6AKj0WVpk99Dfqbr+pDNQvaLdN/2 q2BPLrtmxGnu2Kq3dofyUcDQ2jI2qD3o2evE1o77Yt0fUEX4ZtmeG+0PtSGpNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700259116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nnbb7TmKJfYh/lGBwNg+hNwofSuew21s9LfJZAiHFtY=; b=Hzb9UE+gOY49YjKPRguUnTHFkYW7NM6yCdbrA+KogiZDahIstx6QuYYlTUK7OIf8a2GtAq BLvLHPWMNp6B6ur1F5eE5fWALA457JZiD+NRVVWm7wzv5bvpytWuHadcDax2qxEW0o1dut elsuyRj7SyErVh0VHQyBXPFJOA1zEeZW8cyVY9ZswRQnBS92siiv0D9PmR5VAE2w0Xfw3p n5qXrMCdFuwx7QQ1oOuqs0Rde2ugjIqYcjnTyy3GuUE5HT0rsKjtOZ0UO3CKMP6aVJq1cY pvDXF2L2l0A8o5ZtgxIO2mkEFCTbf76iNKLCbZ9TOtznM2m3N9FVKq9qmYPR4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700259116; a=rsa-sha256; cv=none; b=iL9SuqEBHQ2t8h0GZ/CXGH28sywYUB18tJ/AsHtftW5lVxzFyKkjL8f4H6CcPlgpwQvpaW S5xvP7fJ9Kr2/WQbQXw8v8AnSwASiYvQ1t6+iUcckOC5COCtIFQecU2DVD7KxpROqdFMY2 8b4QDvOF+HA/1pG4DpGeGYQrih3pU+TL//3tDP1wsX9vfvzKxOipPHECagcX/sgfKnxBbd 8+zKewhnkKrIIES+WF10UnT0kfJPJGBoJo8V64jzn852plFKCLp3ZcEwTu16fOrunwwUKK TZLdaLYgve4HJkCP8GvQt4aj1DUWTZdYQ7XgvstXVY3URbgq0h1TS6xjsHDHiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXB2h5SMCz11PT; Fri, 17 Nov 2023 22:11: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 3AHMBuIq089896; Fri, 17 Nov 2023 22:11:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHMButU089893; Fri, 17 Nov 2023 22:11:56 GMT (envelope-from git) Date: Fri, 17 Nov 2023 22:11:56 GMT Message-Id: <202311172211.3AHMButU089893@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 772430dd6795 - main - Ensure I/O buffers in libufs(3) are 128-byte aligned. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 772430dd67955850942d689714ab982da24257ba Auto-Submitted: auto-generated The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=772430dd67955850942d689714ab982da24257ba commit 772430dd67955850942d689714ab982da24257ba Author: Kirk McKusick AuthorDate: 2023-11-17 22:10:29 +0000 Commit: Kirk McKusick CommitDate: 2023-11-17 22:11:24 +0000 Ensure I/O buffers in libufs(3) are 128-byte aligned. Various disk controllers require their buffers to be aligned to a cache-line size (128 bytes). For buffers allocated in structures, ensure that they are 128-byte aligned. Use aligned_malloc to allocate memory to ensure that the returned memory is 128-byte aligned. While we are here, we replace the dynamically allocated inode buffer with a buffer allocated in the uufsd structure just as the superblock and cylinder group buffers do. This can be removed if/when the kernel is fixed. Because this problem has existed on one I/O subsystem or another since the 1990's, we are probably stuck with dealing with it forever. The problem most recent showed up in Azure, see: https://reviews.freebsd.org/D41728 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267654 Before these fixes were applied, it was confirmed that the changes in this commit also fixed the issue in Azure. Reviewed-by: Warner Losh, kib Tested-by: Souradeep Chakrabarti of Microsoft (earlier version) PR: 267654 Differential Revision: https://reviews.freebsd.org/D41724 --- lib/libufs/Makefile | 2 +- lib/libufs/block.c | 45 +++++++++++------------------------ lib/libufs/inode.c | 16 ++----------- lib/libufs/libufs.h | 57 ++++++++++++++++++++++++++++++--------------- lib/libufs/sblock.c | 3 ++- lib/libufs/type.c | 12 ++++++---- lib/libufs/ufs_disk_close.3 | 9 ++++++- sbin/fsck_ffs/fsck.h | 15 ++++++++++++ sbin/fsck_ffs/fsutil.c | 11 ++++----- sbin/fsck_ffs/inode.c | 3 +-- sbin/fsck_ffs/main.c | 1 - sbin/fsck_ffs/pass5.c | 1 - sbin/fsck_ffs/setup.c | 11 ++++----- sbin/fsck_ffs/suj.c | 3 +-- 14 files changed, 98 insertions(+), 91 deletions(-) diff --git a/lib/libufs/Makefile b/lib/libufs/Makefile index e37a285bb509..42d76c6061d2 100644 --- a/lib/libufs/Makefile +++ b/lib/libufs/Makefile @@ -2,7 +2,7 @@ PACKAGE= ufs LIB= ufs SHLIBDIR?= /lib -SHLIB_MAJOR= 7 +SHLIB_MAJOR= 8 SRCS= block.c cgroup.c gsb_crc32.c inode.c sblock.c type.c ffs_subr.c SRCS+= ffs_tables.c diff --git a/lib/libufs/block.c b/lib/libufs/block.c index 20002fc4df1b..e15216aefa8d 100644 --- a/lib/libufs/block.c +++ b/lib/libufs/block.c @@ -57,19 +57,10 @@ bread(struct uufsd *disk, ufs2_daddr_t blockno, void *data, size_t size) ERROR(disk, NULL); - p2 = data; - /* - * XXX: various disk controllers require alignment of our buffer - * XXX: which is stricter than struct alignment. - * XXX: Bounce the buffer if not 64 byte aligned. - * XXX: this can be removed if/when the kernel is fixed - */ - if (((intptr_t)data) & 0x3f) { - p2 = malloc(size); - if (p2 == NULL) { - ERROR(disk, "allocate bounce buffer"); - goto fail; - } + BUF_MALLOC(&p2, data, size); + if (p2 == NULL) { + ERROR(disk, "allocate bounce buffer"); + goto fail; } cnt = pread(disk->d_fd, p2, size, (off_t)(blockno * disk->d_bsize)); if (cnt == -1) { @@ -101,7 +92,7 @@ bwrite(struct uufsd *disk, ufs2_daddr_t blockno, const void *data, size_t size) { ssize_t cnt; int rv; - void *p2 = NULL; + void *p2; ERROR(disk, NULL); @@ -110,24 +101,15 @@ bwrite(struct uufsd *disk, ufs2_daddr_t blockno, const void *data, size_t size) ERROR(disk, "failed to open disk for writing"); return (-1); } - - /* - * XXX: various disk controllers require alignment of our buffer - * XXX: which is stricter than struct alignment. - * XXX: Bounce the buffer if not 64 byte aligned. - * XXX: this can be removed if/when the kernel is fixed - */ - if (((intptr_t)data) & 0x3f) { - p2 = malloc(size); - if (p2 == NULL) { - ERROR(disk, "allocate bounce buffer"); - return (-1); - } - memcpy(p2, data, size); - data = p2; + BUF_MALLOC(&p2, data, size); + if (p2 == NULL) { + ERROR(disk, "allocate bounce buffer"); + return (-1); } - cnt = pwrite(disk->d_fd, data, size, (off_t)(blockno * disk->d_bsize)); - if (p2 != NULL) + if (p2 != data) + memcpy(p2, data, size); + cnt = pwrite(disk->d_fd, p2, size, (off_t)(blockno * disk->d_bsize)); + if (p2 != data) free(p2); if (cnt == -1) { ERROR(disk, "write error to block device"); @@ -137,7 +119,6 @@ bwrite(struct uufsd *disk, ufs2_daddr_t blockno, const void *data, size_t size) ERROR(disk, "short write to block device"); return (-1); } - return (cnt); } diff --git a/lib/libufs/inode.c b/lib/libufs/inode.c index fe34fd45b815..3865e50591de 100644 --- a/lib/libufs/inode.c +++ b/lib/libufs/inode.c @@ -62,18 +62,10 @@ getinode(struct uufsd *disk, union dinodep *dp, ino_t inum) ERROR(disk, "inode number out of range"); return (-1); } - inoblock = disk->d_inoblock; + inoblock = (caddr_t)&disk->d_inos[0]; min = disk->d_inomin; max = disk->d_inomax; - if (inoblock == NULL) { - inoblock = malloc(fs->fs_bsize); - if (inoblock == NULL) { - ERROR(disk, "unable to allocate inode block"); - return (-1); - } - disk->d_inoblock = inoblock; - } if (inum >= min && inum < max) goto gotit; bread(disk, fsbtodb(fs, ino_to_fsba(fs, inum)), inoblock, @@ -107,14 +99,10 @@ putinode(struct uufsd *disk) struct fs *fs; fs = &disk->d_fs; - if (disk->d_inoblock == NULL) { - ERROR(disk, "No inode block allocated"); - return (-1); - } if (disk->d_ufs == 2) ffs_update_dinode_ckhash(fs, disk->d_dp.dp2); if (bwrite(disk, fsbtodb(fs, ino_to_fsba(&disk->d_fs, disk->d_inomin)), - disk->d_inoblock, disk->d_fs.fs_bsize) <= 0) + (caddr_t)&disk->d_inos[0], disk->d_fs.fs_bsize) <= 0) return (-1); return (0); } diff --git a/lib/libufs/libufs.h b/lib/libufs/libufs.h index 4c6242e9daef..45ac97f43c06 100644 --- a/lib/libufs/libufs.h +++ b/lib/libufs/libufs.h @@ -30,6 +30,13 @@ #ifndef __LIBUFS_H__ #define __LIBUFS_H__ +/* + * Various disk controllers require their buffers to be aligned to the size + * of a cache line. The LIBUFS_BUFALIGN defines the required alignment size. + * The alignment must be a power of 2. + */ +#define LIBUFS_BUFALIGN 128 + /* * libufs structures. */ @@ -42,39 +49,51 @@ union dinodep { * userland ufs disk. */ struct uufsd { - const char *d_name; /* disk name */ - int d_ufs; /* decimal UFS version */ - int d_fd; /* raw device file descriptor */ - long d_bsize; /* device bsize */ - ufs2_daddr_t d_sblock; /* superblock location */ - struct fs_summary_info *d_si; /* Superblock summary info */ - caddr_t d_inoblock; /* inode block */ - uint32_t d_inomin; /* low ino, not ino_t for ABI compat */ - uint32_t d_inomax; /* high ino, not ino_t for ABI compat */ - union dinodep d_dp; /* pointer to currently active inode */ union { struct fs d_fs; /* filesystem information */ - char d_sb[MAXBSIZE]; /* superblock as buffer */ - } d_sbunion; + char d_sb[SBLOCKSIZE]; /* superblock as buffer */ + } d_sbunion __aligned(LIBUFS_BUFALIGN); union { struct cg d_cg; /* cylinder group */ char d_buf[MAXBSIZE]; /* cylinder group storage */ - } d_cgunion; - int d_ccg; /* current cylinder group */ - int d_lcg; /* last cylinder group (in d_cg) */ + } d_cgunion __aligned(LIBUFS_BUFALIGN); + union { + union dinodep d_ino[1]; /* inode block */ + char d_inos[MAXBSIZE]; /* inode block as buffer */ + } d_inosunion __aligned(LIBUFS_BUFALIGN); + const char *d_name; /* disk name */ const char *d_error; /* human readable disk error */ + ufs2_daddr_t d_sblock; /* superblock location */ + struct fs_summary_info *d_si; /* Superblock summary info */ + union dinodep d_dp; /* pointer to currently active inode */ + ino_t d_inomin; /* low ino */ + ino_t d_inomax; /* high ino */ off_t d_sblockloc; /* where to look for the superblock */ - int d_lookupflags; /* flags to superblock lookup */ - int d_mine; /* internal flags */ + int64_t d_bsize; /* device bsize */ + int64_t d_lookupflags; /* flags to superblock lookup */ + int64_t d_mine; /* internal flags */ + int32_t d_ccg; /* current cylinder group */ + int32_t d_ufs; /* decimal UFS version */ + int32_t d_fd; /* raw device file descriptor */ + int32_t d_lcg; /* last cylinder group (in d_cg) */ +}; +#define d_inos d_inosunion.d_inos #define d_fs d_sbunion.d_fs -#define d_sb d_sbunion.d_sb #define d_cg d_cgunion.d_cg -}; /* * libufs macros (internal, non-exported). */ #ifdef _LIBUFS +/* + * Ensure that the buffer is aligned to the I/O subsystem requirements. + */ +#define BUF_MALLOC(newbufpp, data, size) { \ + if (data != NULL && (((intptr_t)data) & (LIBUFS_BUFALIGN - 1)) == 0) \ + *newbufpp = (void *)data; \ + else \ + *newbufpp = aligned_alloc(LIBUFS_BUFALIGN, size); \ +} /* * Trace steps through libufs, to be used at entry and erroneous return. */ diff --git a/lib/libufs/sblock.c b/lib/libufs/sblock.c index 9f1d8a2485bd..59cd44de04ab 100644 --- a/lib/libufs/sblock.c +++ b/lib/libufs/sblock.c @@ -228,7 +228,8 @@ use_pread(void *devfd, off_t loc, void **bufp, int size) int fd; fd = *(int *)devfd; - if ((*bufp = malloc(size)) == NULL) + BUF_MALLOC(bufp, NULL, size); + if (*bufp == NULL) return (ENOSPC); if (pread(fd, *bufp, size, loc) != size) return (EIO); diff --git a/lib/libufs/type.c b/lib/libufs/type.c index 1d0c4c0200eb..99aec0a57e9a 100644 --- a/lib/libufs/type.c +++ b/lib/libufs/type.c @@ -61,10 +61,6 @@ ufs_disk_close(struct uufsd *disk) ERROR(disk, NULL); close(disk->d_fd); disk->d_fd = -1; - if (disk->d_inoblock != NULL) { - free(disk->d_inoblock); - disk->d_inoblock = NULL; - } if (disk->d_mine & MINE_NAME) { free((char *)(uintptr_t)disk->d_name); disk->d_name = NULL; @@ -155,10 +151,16 @@ again: if ((ret = stat(name, &st)) < 0) { return (-1); } + if (((uintptr_t)disk & ~(LIBUFS_BUFALIGN - 1)) != (uintptr_t)disk) { + ERROR(disk, "uufsd structure must be aligned to " + "LIBUFS_BUFALIGN byte boundry, see ufs_disk_fillout(3)"); + close(fd); + return (-1); + } + disk->d_bsize = 1; disk->d_ccg = 0; disk->d_fd = fd; - disk->d_inoblock = NULL; disk->d_inomin = 0; disk->d_inomax = 0; disk->d_lcg = 0; diff --git a/lib/libufs/ufs_disk_close.3 b/lib/libufs/ufs_disk_close.3 index d0d93d05838c..f332a9bb5de9 100644 --- a/lib/libufs/ufs_disk_close.3 +++ b/lib/libufs/ufs_disk_close.3 @@ -9,7 +9,7 @@ .\" .\" This file is in the public domain. .\" -.Dd June 4, 2003 +.Dd November 17, 2023 .Dt UFS_DISK_CLOSE 3 .Os .Sh NAME @@ -51,6 +51,13 @@ functions open a disk specified by .Fa name and populate the structure pointed to by .Fa disk . +The structure referenced by the +.Fa disk +pointer must be aligned to at least the alignment specified by +.Dv LIBUFS_ALIGN +that is defined in the +.Lb libufs.h +header file. The disk is opened read-only. The specified .Fa name diff --git a/sbin/fsck_ffs/fsck.h b/sbin/fsck_ffs/fsck.h index 3b795783f39c..827336a77d67 100644 --- a/sbin/fsck_ffs/fsck.h +++ b/sbin/fsck_ffs/fsck.h @@ -67,6 +67,7 @@ #include #include #include +#include #include @@ -424,6 +425,20 @@ Malloc(size_t size) break; return (retval); } +/* + * Allocate a block of memory to be used as an I/O buffer. + * Ensure that the buffer is aligned to the I/O subsystem requirements. + */ +static inline void* +Balloc(size_t size) +{ + void *retval; + + while ((retval = aligned_alloc(LIBUFS_BUFALIGN, size)) == NULL) + if (flushentry() == 0) + break; + return (retval); +} /* * Wrapper for calloc() that flushes the cylinder group cache to try diff --git a/sbin/fsck_ffs/fsutil.c b/sbin/fsck_ffs/fsutil.c index 2583e324e94c..05f83789236e 100644 --- a/sbin/fsck_ffs/fsutil.c +++ b/sbin/fsck_ffs/fsutil.c @@ -58,7 +58,6 @@ static const char sccsid[] = "@(#)utilities.c 8.6 (Berkeley) 5/19/95"; #include #include #include -#include #include "fsck.h" @@ -189,7 +188,7 @@ bufinit(void) initbarea(&failedbuf, BT_UNKNOWN); failedbuf.b_errs = -1; failedbuf.b_un.b_buf = NULL; - if ((cgblk.b_un.b_buf = Malloc((unsigned int)sblock.fs_bsize)) == NULL) + if ((cgblk.b_un.b_buf = Balloc((unsigned int)sblock.fs_bsize)) == NULL) errx(EEXIT, "Initial malloc(%d) failed", sblock.fs_bsize); initbarea(&cgblk, BT_CYLGRP); numbufs = cachelookups = cachereads = 0; @@ -211,7 +210,7 @@ allocbuf(const char *failreason) char *bufp; bp = (struct bufarea *)Malloc(sizeof(struct bufarea)); - bufp = Malloc((unsigned int)sblock.fs_bsize); + bufp = Balloc((unsigned int)sblock.fs_bsize); if (bp == NULL || bufp == NULL) { errx(EEXIT, "%s", failreason); /* NOTREACHED */ @@ -241,7 +240,7 @@ cglookup(int cg) if ((unsigned) cg >= sblock.fs_ncg) errx(EEXIT, "cglookup: out of range cylinder group %d", cg); if (cgbufs == NULL) { - cgbufs = calloc(sblock.fs_ncg, sizeof(struct bufarea)); + cgbufs = Calloc(sblock.fs_ncg, sizeof(struct bufarea)); if (cgbufs == NULL) errx(EEXIT, "Cannot allocate cylinder group buffers"); } @@ -250,7 +249,7 @@ cglookup(int cg) return (cgbp); cgp = NULL; if (flushtries == 0) - cgp = Malloc((unsigned int)sblock.fs_cgsize); + cgp = Balloc((unsigned int)sblock.fs_cgsize); if (cgp == NULL) { if (sujrecovery) errx(EEXIT,"Ran out of memory during journal recovery"); @@ -966,7 +965,7 @@ blzero(int fd, ufs2_daddr_t blk, long size) if (fd < 0) return; if (zero == NULL) { - zero = calloc(ZEROBUFSIZE, 1); + zero = Balloc(ZEROBUFSIZE); if (zero == NULL) errx(EEXIT, "cannot allocate buffer pool"); } diff --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c index 3db8a5e5c23d..e4349ff97088 100644 --- a/sbin/fsck_ffs/inode.c +++ b/sbin/fsck_ffs/inode.c @@ -48,7 +48,6 @@ static const char sccsid[] = "@(#)inode.c 8.8 (Berkeley) 4/28/95"; #include #include #include -#include #include "fsck.h" @@ -646,7 +645,7 @@ setinodebuf(int cg, ino_t inosused) inobufsize = blkroundup(&sblock, MAX(INOBUFSIZE, sblock.fs_bsize)); initbarea(&inobuf, BT_INODES); - if ((inobuf.b_un.b_buf = Malloc((unsigned)inobufsize)) == NULL) + if ((inobuf.b_un.b_buf = Balloc((unsigned)inobufsize)) == NULL) errx(EEXIT, "cannot allocate space for inode buffer"); } fullcnt = inobufsize / ((sblock.fs_magic == FS_UFS1_MAGIC) ? diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index ee39760f4dd2..4189af1ba517 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -59,7 +59,6 @@ static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95"; #include #include #include -#include #include #include #include diff --git a/sbin/fsck_ffs/pass5.c b/sbin/fsck_ffs/pass5.c index 58de6791903f..8980ba60e03a 100644 --- a/sbin/fsck_ffs/pass5.c +++ b/sbin/fsck_ffs/pass5.c @@ -45,7 +45,6 @@ static const char sccsid[] = "@(#)pass5.c 8.9 (Berkeley) 4/28/95"; #include #include #include -#include #include "fsck.h" diff --git a/sbin/fsck_ffs/setup.c b/sbin/fsck_ffs/setup.c index c9aa19c7eded..b3d58749015e 100644 --- a/sbin/fsck_ffs/setup.c +++ b/sbin/fsck_ffs/setup.c @@ -52,7 +52,6 @@ static const char sccsid[] = "@(#)setup.c 8.10 (Berkeley) 5/9/95"; #include #include #include -#include #include "fsck.h" @@ -214,7 +213,7 @@ setup(char *dev) sbdirty(); } if (snapcnt > 0 && copybuf == NULL) { - copybuf = Malloc(sblock.fs_bsize); + copybuf = Balloc(sblock.fs_bsize); if (copybuf == NULL) errx(EEXIT, "cannot allocate space for snapshot " "copy buffer"); @@ -501,7 +500,7 @@ sblock_init(void) fsmodified = 0; lfdir = 0; initbarea(&sblk, BT_SUPERBLK); - sblk.b_un.b_buf = Malloc(SBLOCKSIZE); + sblk.b_un.b_buf = Balloc(SBLOCKSIZE); if (sblk.b_un.b_buf == NULL) errx(EEXIT, "cannot allocate space for superblock"); dev_bsize = secsize = DEV_BSIZE; @@ -530,7 +529,7 @@ calcsb(char *dev, int devfd, struct fs *fs) */ if (ioctl(devfd, DIOCGSECTORSIZE, &secsize) == -1) return (0); - fsrbuf = Malloc(secsize); + fsrbuf = Balloc(secsize); if (fsrbuf == NULL) errx(EEXIT, "calcsb: cannot allocate recovery buffer"); if (blread(devfd, fsrbuf, @@ -573,7 +572,7 @@ chkrecovery(int devfd) rdsize = sblock.fs_fsize; if (ioctl(devfd, DIOCGSECTORSIZE, &secsize) == -1 || rdsize % secsize != 0 || - (fsrbuf = Malloc(rdsize)) == NULL || + (fsrbuf = Balloc(rdsize)) == NULL || blread(devfd, fsrbuf, (SBLOCK_UFS2 - rdsize) / dev_bsize, rdsize) != 0) { free(fsrbuf); @@ -612,7 +611,7 @@ saverecovery(int readfd, int writefd) if (sblock.fs_magic != FS_UFS2_MAGIC || ioctl(readfd, DIOCGSECTORSIZE, &secsize) == -1 || rdsize % secsize != 0 || - (fsrbuf = Malloc(rdsize)) == NULL || + (fsrbuf = Balloc(rdsize)) == NULL || blread(readfd, fsrbuf, (SBLOCK_UFS2 - rdsize) / dev_bsize, rdsize) != 0) { printf("RECOVERY DATA COULD NOT BE CREATED\n"); diff --git a/sbin/fsck_ffs/suj.c b/sbin/fsck_ffs/suj.c index c66b605bd69d..e1fd54229d69 100644 --- a/sbin/fsck_ffs/suj.c +++ b/sbin/fsck_ffs/suj.c @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include @@ -2274,7 +2273,7 @@ suj_add_block(ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t blk, int frags) static void suj_read(void) { - uint8_t block[1 * 1024 * 1024]; + uint8_t block[1 * 1024 * 1024] __aligned(LIBUFS_BUFALIGN); struct suj_seg *seg; struct jsegrec *recn; struct jsegrec *rec; From nobody Fri Nov 17 22:33:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXBX60K8vz51RdS; Fri, 17 Nov 2023 22:33:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SXBX56nDZz4Gb5; Fri, 17 Nov 2023 22:33:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700260438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HNecXuL3TZs7jefgwboLriYYjPAKHMSqhSqlPUpQX6w=; b=WKvqkqqbwiRH/jmnsJsuAZ/IV663JEI8Zxt0FZuaZ5rJkkjxmotw/u8Adwj11mSJg1ywjZ EezC5CGoDxjyakZgFDMJS/qZTc4hP3bLj25i+a70oyZIQzTv2eXea5rNiZoKoyq6sVb87w JglZ8OJC8nRd0CW4ZioVeh2DOwAKLidIb5xqpb9/pEAtGCft3yLl6hYdak7AFpzQAdOYTI dYZY7xCdbRzNfktavn29eZ1BgmoIE1ndb/tAuUxdw2fkCg6mUJmLszwrWDXL3HKmgTBM2U JkybbXrTf7kX9lFnmdd32yoynZgLU5SJgsOwDC15jTsFhhBi2WESPR9HjSNDRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700260438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HNecXuL3TZs7jefgwboLriYYjPAKHMSqhSqlPUpQX6w=; b=VZ5vCeHnzHnwnum1DYfo+q/vEYFjKIF1WJflet8yGCoqbnkcDB9VbXVf6VghZJCEBWbgZ9 r2pH2FvU37VzfOl9DnpCln9WdBPqLUjqCR0+lpmVzXa30ZP2w7bv7ggz4WeLTBBe4Q/RJg yRG8hFBQbuRVpK+rfNfrGLJz1bcPSwu8pyLBUqCvUXf4jkZKgOCbI73FuylXNMLSOpsbnM M6Ym7AQyA0fiiFZGoD8heR83n/YpDue0a/RQULP2d/RRM+ERWPoH5Amfwdk+tr00FWPNnw b4R0lhPUvRbQtBOVBU+bYHf+Yg1RqO6SB+F8Z1EYZ45fLETtMEy0V4InCoR3zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700260438; a=rsa-sha256; cv=none; b=TSK62SuEyJth+gaVdh8ATH/75TNAp4uGfbMW1ncd/3+cZzdLN+3q20bNI95iduXYIjnc0a cM9QANYvEpqxx7wzKPDW4BcLKTh8Xa+DGC/7pvZcPo38LP/nJcSuR1UI3NWmYGEfGYu49a naTqUU/TyqIOMWQNtKntRHaXK+AhZ9rNQxe0B+YfPOIhwfniTv7FoHPEpCfKhYYfuowbTV 5ZEb9IXb99IWfc/8pci25vS+23FStk+YKlYbE3qcQ/SBYEx/z31ljXnQf3KgNWiXL1sHH8 OC9izo01vi25uHHOzwqmqlSfxwpAyqgIVN17yuFrKDH33ajDToLcqA2gYuEkRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXBX55rSjz11gn; Fri, 17 Nov 2023 22:33: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 3AHMXvb0027407; Fri, 17 Nov 2023 22:33:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHMXvYj027404; Fri, 17 Nov 2023 22:33:57 GMT (envelope-from git) Date: Fri, 17 Nov 2023 22:33:57 GMT Message-Id: <202311172233.3AHMXvYj027404@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 0fe663b2a815 - main - pf: always create multihomed states as floating List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0fe663b2a815dcb41431543940ec51408f418392 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0fe663b2a815dcb41431543940ec51408f418392 commit 0fe663b2a815dcb41431543940ec51408f418392 Author: Kristof Provost AuthorDate: 2023-11-16 16:06:29 +0000 Commit: Kristof Provost CommitDate: 2023-11-17 22:33:43 +0000 pf: always create multihomed states as floating When we create a new state for multihomed sctp connections (i.e. based on INIT/INIT_ACK or ASCONF parameters) we cannot know what interfaces we'll be seeing that traffic on. Make those states floating, irrespective of state policy. MFC after: 1 week Sponsored by: Orange Business Services --- sys/netpfil/pf/pf.c | 8 ++++++-- tests/sys/netpfil/pf/sctp.py | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 9cb5fe03b5c2..a9870ebe166b 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6131,8 +6131,12 @@ again: j->pd.sctp_flags |= PFDESC_SCTP_ADD_IP; PF_RULES_RLOCK(); sm = NULL; - /* XXX: May generated unwanted abort if we try to insert a duplicate state. */ - ret = pf_test_rule(&r, &sm, kif, + /* + * New connections need to be floating, because + * we cannot know what interfaces it will use. + * That's why we pass V_pfi_all rather than kif. + */ + ret = pf_test_rule(&r, &sm, V_pfi_all, j->m, off, &j->pd, &ra, &rs, NULL); PF_RULES_RUNLOCK(); SDT_PROBE4(pf, sctp, multihome, test, kif, r, j->m, ret); diff --git a/tests/sys/netpfil/pf/sctp.py b/tests/sys/netpfil/pf/sctp.py index 5db52dd993f2..6042badffb64 100644 --- a/tests/sys/netpfil/pf/sctp.py +++ b/tests/sys/netpfil/pf/sctp.py @@ -372,6 +372,7 @@ class TestSCTP(VnetTestTemplate): ToolsHelper.print_output("/sbin/pfctl -e") ToolsHelper.pf_rules([ + "set state-policy if-bound", "block proto sctp", "pass inet proto sctp to 192.0.2.0/24"]) @@ -386,9 +387,9 @@ class TestSCTP(VnetTestTemplate): # Check that we have a state for 192.0.2.3 and 192.0.2.2 to 192.0.2.1, but also to 192.0.2.4 states = ToolsHelper.get_output("/sbin/pfctl -ss") print(states) - assert re.search(r"all sctp 192.0.2.1:.*192.0.2.3:1234", states) + assert re.search(r".*sctp 192.0.2.1:.*192.0.2.3:1234", states) assert re.search(r"all sctp 192.0.2.1:.*192.0.2.2:1234", states) - assert re.search(r"all sctp 192.0.2.4:.*192.0.2.3:1234", states) + assert re.search(r".*sctp 192.0.2.4:.*192.0.2.3:1234", states) assert re.search(r"all sctp 192.0.2.4:.*192.0.2.2:1234", states) class TestSCTPv6(VnetTestTemplate): From nobody Fri Nov 17 22:33:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXBX71HHjz51Rng; Fri, 17 Nov 2023 22:33:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SXBX70ggfz4GNL; Fri, 17 Nov 2023 22:33:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700260439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BH+w6SWx7zrgxgtgwe1Rh/ANGq5OTaiqhsfwsDK0dLk=; b=AaNJIagUHVvMuHi0oqlCN6vGmOYVFCJ3GehXME8ZqSXLoYwiVOLN6p1Sin0Aa/NqiZgL6d EOHlJx7bOO2rliiZBlHii6Z+Fa7XHmyCuXYi1qd22fRtCWWsNgU5V6E+G8uj1JnFYsPwrZ WEJCtox/3+6geXxXp5uDM/2JsjMRsZKG9PPYQ+M97zovlcjkE5JxwJUVWSKJayvhIp+pPg yiYYnHPhbek7iQ7Get61b/FTanvPWJdh45OjfCodvFGsWUbvuPY42bVqAwyAHel6pzcY3r A4fyDFB8DB+PKpph8bYpTJtD/KNNfJH0H/XOiSdk3jXSFJyYTK/nCc4VYcGWqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700260439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BH+w6SWx7zrgxgtgwe1Rh/ANGq5OTaiqhsfwsDK0dLk=; b=Wg2453BI32D9utUjSgmKVzDPDgiPTZs4q7V4ytYjRS/T3vnQktvTuTjy1EC0yNBMeGjJnx UH/FSrwYjMhT+HtsHmw1K6UgFmoJT2MC12K4oFikks3liJlbsUh+B35QjKQAJ/IxJmmKMy Bw0AuNSY75MD2s7zTkK900vm6SzWktzmpqCXumgLja6Dbaq0JVsM4l7A6+mgRrggGBWvuC 1phnH52i03oreVfBL7EV8IhV+wLbIdhc/9VQ5YDRxohRpZloA2flSaa9rk2vT8jQ95MOHI +b3lUNyO0285fyYEakkgnIDf/HxIHRAoJjM5Mo23fOhuY4KWlbOpKNhYqA84aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700260439; a=rsa-sha256; cv=none; b=jxyzDjBR/uLtaQuWB7QVoQVHFHnCRpibqqWIuQ2VLwc2Um/2sp5+UBFxIK26r9xNK6a0jw mkvTJ4tdmrwyJY8brsd6mzkTvefZKxrvX0maNjCKjr+MqQXtfPiWrYuuW76iCwPJajgrKJ HK38j4CzUD+y0BQrEy1tLxqTRao4dOhkkXnL6sS5tgt5PDmEF2OCWSwInIunl51S6Ddp8t 8i3nJaPpuNLcpm3HEJmL39cBebowb/DZ1MWm3boUhjGvjSeqedzmvZGFD5zjgOdZbYXSwt bC62sJCeFcpNDZFqNp4huLcfhIB06QL/P90S2rk+dhMNP+O59dtTJ6/o+mG6ig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXBX66tgKz126L; Fri, 17 Nov 2023 22:33:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AHMXwh8027458; Fri, 17 Nov 2023 22:33:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHMXw0F027455; Fri, 17 Nov 2023 22:33:58 GMT (envelope-from git) Date: Fri, 17 Nov 2023 22:33:58 GMT Message-Id: <202311172233.3AHMXw0F027455@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: a8dbbeb1c71b - main - pf: skip urpf check for sctp multihomed states List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a8dbbeb1c71b6f302818b8e041a2b50486b90180 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a8dbbeb1c71b6f302818b8e041a2b50486b90180 commit a8dbbeb1c71b6f302818b8e041a2b50486b90180 Author: Kristof Provost AuthorDate: 2023-11-16 19:55:02 +0000 Commit: Kristof Provost CommitDate: 2023-11-17 22:33:44 +0000 pf: skip urpf check for sctp multihomed states When we create a new state for multihomed sctp connections (i.e. based on INIT/INIT_ACK or ASCONF parameters) we cannot know what interfaces we'll be seeing that traffic on. These states are floating states, i.e. on "all" interfaces. We cannot do reverse path filtering for these states, so do not do so. MFC after: 1 week Sponsored by: Orange Business Services --- sys/netpfil/pf/pf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index a9870ebe166b..082987d34b07 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -7160,6 +7160,9 @@ pf_routable(struct pf_addr *addr, sa_family_t af, struct pfi_kkif *kif, if (af != AF_INET && af != AF_INET6) return (0); + if (kif == V_pfi_all) + return (1); + /* Skip checks for ipsec interfaces */ if (kif != NULL && kif->pfik_ifp->if_type == IFT_ENC) return (1); From nobody Fri Nov 17 22:34:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXBX844XBz51RtD; Fri, 17 Nov 2023 22:34: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 4SXBX81h7Qz4Gmr; Fri, 17 Nov 2023 22:34:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700260440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GiBNMk7ogLj+FhjSV3Zw8Bf05aWZNbn7H4PO0LfuhpU=; b=mOiox2smsFvMe7ek7Mq/gWJgFVvuQ5dWj1J2n7jadl/hoTIIS/Uigw5WPYmkoP+mrC5I1M S3m3BRBBVyz1e9Hz8+dv+TqtUIef2OVo9sKPb+mR7/aRZaC2VV+Bd9BQEcSJTLAlypmbph gDutc1s0O0q6aqXWGM2fllG/v50XvUbG1OGZrLCNcexLSG3cjMy8j5Ug3/AGL7hj1plyPe JNv1MhtU8A9pVVDyv/FXjd/Li02x2BdFbG4kb+w4UGf2m3OOpXdEoT5a9YLEA+7kJGoF9F Plzf0srJVoj6jQtz1/t6ZKfovHAUzarBZ+Oyvo7D9F5JVDNMQ5E8fvfExxD3sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700260440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GiBNMk7ogLj+FhjSV3Zw8Bf05aWZNbn7H4PO0LfuhpU=; b=XG0EuLsyhiuSMo7l5mRoacuxrpuYkRJmuFtK18lBRb9X9lfLY6M7KxiemYCITW49yts225 uy8x4rmV8nTlJjogLxxmvwgbVC/TNI9YiQi75rl0wz2kunksjVer5lmQXB5OEtskYLHkwo AnznNENoZ/EsKhPHFoRyiBW+4My+Yz2ArzFE8KxqBh1h++LHseNhUWng/x1lNNyqSw5uXM UH7ngxB3oSRo0LoWTl9xf0u/X8Y0X22R9aMSthuJBUP0EEzXoU90PhULTrz74vjAj8NBXe h2CTMZBA5pWyfDLph5c7JGleOIC5+/qbv56N8KXsmsxT3O3ZWbcuOiLLkcLLPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700260440; a=rsa-sha256; cv=none; b=Bs6vLVY29KDVE9CpgOV53ykNdeYgLjiYWATPnSD4qcaOcjiID5+iPo3AXYb9s1kBLdKK/b nb77COaJa94ENCBox/2SREi+BnBgi1RwQM2RFIy43sDsABQcV9995utjiVAspQlTeO6tim XbaxM0AjzJ2U3OZQRVPB8PkZbG52F+AQxF4FXbltkm2t74QIWT/WFgraYUbJ8nY1LI1kFu FbjHpGI1KcNfwvXdWYqc6gYMhbyKS+dNo8n/mct4/k06nhQYHmDyaSsfwosBxvCane934q GHFw8CbBFJtYW/cl9dbPss3NTR6lWsMPEThC0w4Jwryt/cWjPD57cEFseiDIhw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXBX80pDVz11xP; Fri, 17 Nov 2023 22:34: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 3AHMY0Ki027512; Fri, 17 Nov 2023 22:34:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHMY0Fq027502; Fri, 17 Nov 2023 22:34:00 GMT (envelope-from git) Date: Fri, 17 Nov 2023 22:34:00 GMT Message-Id: <202311172234.3AHMY0Fq027502@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 7093414c63b0 - main - pf: sctp heartbeats confirm a connection List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7093414c63b08864dd9348f63e67b39a70c8b1be Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7093414c63b08864dd9348f63e67b39a70c8b1be commit 7093414c63b08864dd9348f63e67b39a70c8b1be Author: Kristof Provost AuthorDate: 2023-11-17 12:52:34 +0000 Commit: Kristof Provost CommitDate: 2023-11-17 22:33:44 +0000 pf: sctp heartbeats confirm a connection When we create a new state for multihomed sctp connections (i.e. based on INIT/INIT_ACK or ASCONF parameters) the new connection will never see a COOKIE/COOKIE_ACK exchange. We should consider HEARTBEAT_ACK to be a confirmation that the connection is established. This ensures that such connections do not time out earlier than expected. MFC after: 1 week Sponsored by: Orange Business Services --- sys/net/pfvar.h | 17 ++++++++++------- sys/netpfil/pf/pf.c | 2 +- sys/netpfil/pf/pf_norm.c | 10 +++++++++- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 27992864c899..4b10190bf9ea 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1580,13 +1580,16 @@ struct pf_pdesc { #define PFDESC_SCTP_INIT 0x0001 #define PFDESC_SCTP_INIT_ACK 0x0002 #define PFDESC_SCTP_COOKIE 0x0004 -#define PFDESC_SCTP_ABORT 0x0008 -#define PFDESC_SCTP_SHUTDOWN 0x0010 -#define PFDESC_SCTP_SHUTDOWN_COMPLETE 0x0020 -#define PFDESC_SCTP_DATA 0x0040 -#define PFDESC_SCTP_ASCONF 0x0080 -#define PFDESC_SCTP_OTHER 0x0100 -#define PFDESC_SCTP_ADD_IP 0x0200 +#define PFDESC_SCTP_COOKIE_ACK 0x0008 +#define PFDESC_SCTP_ABORT 0x0010 +#define PFDESC_SCTP_SHUTDOWN 0x0020 +#define PFDESC_SCTP_SHUTDOWN_COMPLETE 0x0040 +#define PFDESC_SCTP_DATA 0x0080 +#define PFDESC_SCTP_ASCONF 0x0100 +#define PFDESC_SCTP_HEARTBEAT 0x0200 +#define PFDESC_SCTP_HEARTBEAT_ACK 0x0400 +#define PFDESC_SCTP_OTHER 0x0800 +#define PFDESC_SCTP_ADD_IP 0x1000 u_int16_t sctp_flags; u_int32_t sctp_initiate_tag; diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 082987d34b07..84bd75276af7 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5932,7 +5932,7 @@ pf_test_state_sctp(struct pf_kstate **state, struct pfi_kkif *kif, dst->scrub->pfss_v_tag = pd->sctp_initiate_tag; } - if (pd->sctp_flags & PFDESC_SCTP_COOKIE) { + if (pd->sctp_flags & (PFDESC_SCTP_COOKIE | PFDESC_SCTP_HEARTBEAT_ACK)) { if (src->state < SCTP_ESTABLISHED) { pf_set_protostate(*state, psrc, SCTP_ESTABLISHED); (*state)->timeout = PFTM_SCTP_ESTABLISHED; diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index fb165cf548b0..a92462c53f15 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -2126,12 +2126,20 @@ pf_scan_sctp(struct mbuf *m, int ipoff, int off, struct pf_pdesc *pd, pd->sctp_flags |= PFDESC_SCTP_SHUTDOWN_COMPLETE; break; case SCTP_COOKIE_ECHO: - case SCTP_COOKIE_ACK: pd->sctp_flags |= PFDESC_SCTP_COOKIE; break; + case SCTP_COOKIE_ACK: + pd->sctp_flags |= PFDESC_SCTP_COOKIE_ACK; + break; case SCTP_DATA: pd->sctp_flags |= PFDESC_SCTP_DATA; break; + case SCTP_HEARTBEAT_REQUEST: + pd->sctp_flags |= PFDESC_SCTP_HEARTBEAT; + break; + case SCTP_HEARTBEAT_ACK: + pd->sctp_flags |= PFDESC_SCTP_HEARTBEAT_ACK; + break; case SCTP_ASCONF: pd->sctp_flags |= PFDESC_SCTP_ASCONF; From nobody Fri Nov 17 22:40:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXBgM5RnJz51S8D; Fri, 17 Nov 2023 22:40: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 4SXBgM4WK4z4JVn; Fri, 17 Nov 2023 22:40:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700260815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K3gsw1cEmb/JYfy/UAM/dmEKsnwSI7Q4IjbnewScCyU=; b=YcWbnPjmzNkh2ubxc5ybXRTW/WmMjNcN2Pc1Oj+Nl7tzcV+DcfMHStzvNeqc4lOqpFaqvi uP2its8QqZqmD94321dFyo+Z0uh5JlbCaVrViMAGSRa85wV1Y9aYSWpe6pNmYZpbNfZ5Ng NTHJIEvpSpAqFg73j4Ey4TtGTWetJ3vkxciBPybvDIDFXn88SxzvsSlE1QRUGV9DGIpp69 vHy+lLf8es3TmJMDlCZFJakn+ON6TvTq9WOF0EZphEbh+pGwUeMcJL3bIen17z062cWi9/ KSxbV4dY3HXfrvgbUKuMGoliPH/+gYQ59/sV7J950TWpGJWBUMPAAZo+MHx2nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700260815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K3gsw1cEmb/JYfy/UAM/dmEKsnwSI7Q4IjbnewScCyU=; b=tKEVpKHL2RbUN4DWiSqUzTk3CkcpAs8e/KDSdR9MxsL/tmIH4ptv1nUgkJO6wmfbl3BD9H EGESO0LYjLEcKADhy9tlVENENU4ngCdRluhHP+R8xCWGI1ktn/ZSBp2Bx9+HuXrdSYEqAJ 1hcVdes8Zsf+0j8uw4hD9cml80EXR4TeldQqFM9lWzwMUTAziyYvg3mBzsmRAL9BHhlhbV bBPAbt7p68rh+4EA/cclsMfXpTeVOPnf+H/hfyLrkdytBGrdh2l4V/1lrrIC2NrsS4LTNV NtpGF+8cV+ycmQy++CqeTiXeVaEiZQVTmD3JKHMhri0GeCXPYLNg/JwV0zZ+5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700260815; a=rsa-sha256; cv=none; b=VUGZX1rWMnLU+Kz/iDuRzJj31YHDrL5IvmnRrBs1oRnvmSve2QnUnlDDcRD1YBSJlpOukc 0DmnNQv96IXHC6YYy2myLWtT2QbCm36BLMg6bHn4NXT5I0Wu4w/jZllbR4C9XpqLGTjFC6 uehtWc9um7TJMIIzX+qzf6PtcJf4J4UwWuRRngVBL/6LFhrbGFqtXvzffFxCxrnL9U2dsI JQhmemGpHdOG5Zwyo6Tr149cBxDsLwYwkbgfeNfrh2ZGPiOpMn5D1J1W9zYLy1t3+O45fJ 0sGZirXUVcdXAcxLfcm/uvT+/PTqstay9s7lHOQLTHiavep7jHNttm39vQMkHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXBgM3d79z11tb; Fri, 17 Nov 2023 22:40: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 3AHMeFDb035576; Fri, 17 Nov 2023 22:40:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHMeFHT035565; Fri, 17 Nov 2023 22:40:15 GMT (envelope-from git) Date: Fri, 17 Nov 2023 22:40:15 GMT Message-Id: <202311172240.3AHMeFHT035565@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: bde3cdf18d98 - main - Spacing and alignment cleanups. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bde3cdf18d9881abfbe45337020e996dbeabca76 Auto-Submitted: auto-generated The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=bde3cdf18d9881abfbe45337020e996dbeabca76 commit bde3cdf18d9881abfbe45337020e996dbeabca76 Author: Kirk McKusick AuthorDate: 2023-11-17 22:39:13 +0000 Commit: Kirk McKusick CommitDate: 2023-11-17 22:40:09 +0000 Spacing and alignment cleanups. No functional change. MFC-after: 1 week --- sys/ufs/ufs/inode.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/ufs/ufs/inode.h b/sys/ufs/ufs/inode.h index 454dc725386b..81500e10ebb1 100644 --- a/sys/ufs/ufs/inode.h +++ b/sys/ufs/ufs/inode.h @@ -79,10 +79,10 @@ struct iown_tracker { * exclusive. */ struct inode { - TAILQ_ENTRY(inode) i_nextsnap; /* snapshot file list. */ - struct vnode *i_vnode;/* Vnode associated with this inode. */ - struct ufsmount *i_ump;/* Ufsmount point associated with this inode. */ - struct dquot *i_dquot[MAXQUOTAS]; /* Dquot structures. */ + TAILQ_ENTRY(inode) i_nextsnap; /* Snapshot file list. */ + struct vnode *i_vnode; /* Vnode associated with this inode. */ + struct ufsmount *i_ump; /* Ufsmount point associated with this inode. */ + struct dquot *i_dquot[MAXQUOTAS]; /* Dquot structures. */ union { struct dirhash *dirhash; /* Hashing for large directories. */ daddr_t *snapblklist; /* Collect expunged snapshot blocks. */ @@ -96,7 +96,7 @@ struct inode { } dinode_u; ino_t i_number; /* The identity of the inode. */ - uint32_t i_flag; /* flags, see below */ + uint32_t i_flag; /* flags, see below */ int i_effnlink; /* i_nlink when I/O completes */ /* @@ -129,12 +129,12 @@ struct inode { * Copies from the on-disk dinode itself. */ uint64_t i_size; /* File byte count. */ - uint64_t i_gen; /* Generation number. */ + uint64_t i_gen; /* Generation number. */ uint32_t i_flags; /* Status flags (chflags). */ - uint32_t i_uid; /* File owner. */ - uint32_t i_gid; /* File group. */ + uint32_t i_uid; /* File owner. */ + uint32_t i_gid; /* File group. */ + int16_t i_nlink; /* File link count. */ uint16_t i_mode; /* IFMT, permissions; see below. */ - int16_t i_nlink; /* File link count. */ }; /* * These flags are kept in i_flag. From nobody Fri Nov 17 23:24:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXCds5FZHz51V9M; Fri, 17 Nov 2023 23:24:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SXCds4jFsz4Pkw; Fri, 17 Nov 2023 23:24:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700263441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WPL0xRD/MxK13IycQSOIs1/GeshbsE31ReFLjZrH/fA=; b=Xd8v5bgG9jMJgDuyrQaI5BEMIjIhWdBAKVdNUdOuevPJfweqHycmkHIVO8eyaC67k6XTbp ZfLnDSMaa70asTUlmyOqmrf/CsGM6PnYF/uaMXGz5sSW6hH0NFo7WFsPx+itC806VX8cVv Vbd088oaQ4yFkNWe63N/OdfaDNAKgiUA9U1j8Bbg2PMuixFI/YSMkGYotPgubnd5jnZ9hk zgOaPpv2eSZ6r4FUoL0v3Gg2RoYFOm7gUSgqtNn9PXcH5dIkBNJHC1wSh20y1QMkzk/PsM rOpCYzHmnIO3SQXF+L1D/gJ0XJBw+q/fmL22aW3Z8shUe9XsrfVICSB6cF1pyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700263441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WPL0xRD/MxK13IycQSOIs1/GeshbsE31ReFLjZrH/fA=; b=vR2r4KeZN+H1wY8oPcow1+264ZuIjewLS1dJTcQGd+yeovrMz0JgJhCSnuv/CIXW3SdGhM fA6KY3lhhNMzL1EuKOZgugnaZ1GcamoLPm5pERS818vpv3IzkGhJeUBveGjRz9d57NgBWF Sa597g2cMzgeaBvK3hdkaQHVjoo3d+Gho5yewwXXrdSIppNSSXcOfh9j7Sa5LwG4oUhd1u 7Hq5JIDndAFkacgxZSzTiajLEQNPU+mcsmeVF0JA/ALrEf1SqaJYGOiC8m+mjDuZaRPJVK +O1WQqh6CHaDlV3g30PnL+C4a6B+Grjl+pXXgHLmLuz+6qMZF8aKE5YVHga5iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700263441; a=rsa-sha256; cv=none; b=sddY8TMZuRC5cRg3JbqiCl4c9LMfU0iWSPRVL6X7C95JZi4kRk11n/0MGjPXpzoJWDm6AF LnKsxuISFIWwzMCjFM1OdECm+x3T/mHTWJFG0Gog99UrgWmkoJlMgBhLDfC0eWoHpbKjjt bUS3Bt5asQNsKkbqxPNl/95qcI87dO9v91qzJnV6fxXNoHHQD6s8nfUZFq8fpdrpsEDIpX mTzvlK11eD5N6mbmgPW36FCDelUZ+WdNajj8QCZ064uYoesfeUQCgPNkAmdwpHiSASv1Fi a3YDIzFh2FZa805xqqlajxEU2RmRi0QcxhnnvG5bbZhOseLCx+vK24UIiI4mEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXCds3m85z13Q0; Fri, 17 Nov 2023 23:24:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AHNO1SI011539; Fri, 17 Nov 2023 23:24:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHNO1KJ011538; Fri, 17 Nov 2023 23:24:01 GMT (envelope-from git) Date: Fri, 17 Nov 2023 23:24:01 GMT Message-Id: <202311172324.3AHNO1KJ011538@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: ecb97bc5eca9 - Create tag release/14.0.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: gjb X-Git-Repository: src X-Git-Refname: refs/tags/release/14.0.0 X-Git-Reftype: annotated tag X-Git-Commit: ecb97bc5eca946f0fdf0d35a169ce246aa263d84 Auto-Submitted: auto-generated The annotated tag release/14.0.0 has been created by gjb: URL: https://cgit.FreeBSD.org/src/tag/?h=release/14.0.0 tag release/14.0.0 Tagger: Glen Barber TaggerDate: 2023-11-17 23:23:38 +0000 release: tag 14.0-RELEASE Approved by: re (implicit) -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAmVX9gsACgkQAxRYpUeP 4pOh2Q//QE7d6Z7bPIMiWLOrVx7SkQ8LBjAgH/Wb4FqmkVzF59ftZkXd3uw5k+1w 8fuCNdQmYILF2xZaAyL+J8UgB9uQq0bhlUdW202Z4enuS4fad5t2MuoY980CA1tz nOaUCfAR6Y0xmm8y0phfLsq+/Q9b5R2Ba9I/RGI5SVb/Rlm0FKpNCDr3+Gf45tZf niRqnVAyeaYrXyfPhUfBEXadR7mK5dN0UuGVC9LJLnIYj7wM7bG+hB16qiTxT2Lq G4DjJxGH8Pj6/SGfkBcnn92ZydE7NNp7AjV4ffEGadKOZi7uEiM2M3s5cYhTpFIG Rm++KQ13fTWFM4lB54sXrvNVqOQZA3efQPhz2VPXuoF6QlVdhkvn+K1GW0OH+Hs1 63i1PKcEiBRMjJvzUO4TvHxKmEVDtEuzB0C01nYvCCpSW5gWT+KNyEW9CJqRAFnL tn7Rt9yeQ/GVTapRJYyU928f79pNXF86IqYzJHTgLEBbA4rQhvGPqr76K0o6DneQ B7Noa0VRHJ7wcWmU57K6K5yak+SMr2WXnSC7whaEtEHpfXn7iQBj49oXquceYXjL oWRbBrYZ35ZJ7gdMn+FD9950SZug6YZgv/oLzKXGcZbK8WDZ6nS/Q7NgwhFTrZjV phYb3y5DntIoLThAtJq7t9lyRBqFRBjhuLEDQS1jjwCkrwz+hLU= =FDyV -----END PGP SIGNATURE----- commit f9716eee8ab45ad906d9b5c5233ca20c10226ca7 Author: Glen Barber AuthorDate: 2023-11-09 23:38:09 +0000 Commit: Glen Barber CommitDate: 2023-11-09 23:38:09 +0000 release: update releng/14.0 to -RELEASE - Add UPDATING entry anticipating the announcement date. - Set a static __FreeBSD_version in crtbrand.S. - Update BRANCH to reflect RELEASE. Approved by: re (implicit) Sponsored by: GoFundMe https://www.gofundme.com/f/gjbbsd Sponsored by: PayPal https://paypal.me/gjbbsd From nobody Sat Nov 18 00:48:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXFWw2CGRz51YLl; Sat, 18 Nov 2023 00:49: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 4SXFWw0CtQz4bf9; Sat, 18 Nov 2023 00:49:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700268540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DhIFL5C8JqR0QtYeiBYQ8or8LUJb9vxAoeX0+y0jKKE=; b=Ni2K5r7F/E1zLlv+Y0PDTJrmwSgqtBGGPHuvbigA8f/0O9xwpczhw/1jzJdZy5xZXceNyH zd0AW3DQea8cz53xK/8yjP0jrqQXgBONIIFbMnz9vgE64p9ru0/uKiuI2D8APav6Qikihz 0/j1Hov5ss34xAFPRbNvIDbAK0a5pubrPuUlE517TmnTmIHWxqu17QVRx1EFlTeuvceyAM f2fe0/rLnCeKWCOkIwisgDK2MGLHId4pMS6sClyb008t8md9Zs3Cf2NVS7qbJiy8QKXPwS +V0ugLnAEAmQyEn+B7wwHFfk4StlWJM1ZrzMKZzWXSVC7iCizYjdX9jQnQFpSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700268540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DhIFL5C8JqR0QtYeiBYQ8or8LUJb9vxAoeX0+y0jKKE=; b=NCIrCLP75IiT0/7lJ2mrZE0YG36JHCwt8hZZO5WKqlCtnZjlDop88j+W4O8WtTNGZfev9z EfoKA1lXCl50AENRqDVePpC+HLiaKljfXKennFwjD1In3aZmBxs2Ml9jjoNwq4F3Y8f911 taI2orjdZn7TdXkyufqqz465Jas64sdGZxIr3MF8WuAf6GrjXUhbddGnoE13iV4FOtfIUl vKsS8QzCnU9GNM0qgSYqbq5D7Y5wAi//kPGOHqQ9mLh0m3DK05Bg7EsO2CI7M6f8Aoj1ez cOTLAb7Pd9n+OfWCrU7NXNzsJRu34eNGsGRxuHDum7TUQ+NGt/66oIXHwcecbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700268540; a=rsa-sha256; cv=none; b=Es5jYZUOABn3v8DYIgyX7Ucs7mwFors2izAqLvMHjYhdC3FPr/GUOzXb7w4ks0KURc7mwt bjE0TunwmE7knVke+HkM4OtVB7awWRLOSPIP0lKvCdXIty0i714hkrTt5UoTV24xd1Gv6A a+guGb8SQcUq+n53KtUEI7l2ZhfVNa7R3SEJ4D6fa2q1fW9Ypr/VCycArL18/NQSLsCQkO i5HuGan4XBSEZh7Gbma1doIoRPv2e7p6o0Zbwg6BO3wn5t7DTb2fGL9t3EK5knLUrfKXT+ VcuWcCVPIKRwjQ5PRl3tAN260iYjdXT8hFh5lyb5gCjegwGK6YQn7giGXqm6kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXFWv6QMgz153B; Sat, 18 Nov 2023 00:48:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AI0mxZ6045294; Sat, 18 Nov 2023 00:48:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AI0mxt0045291; Sat, 18 Nov 2023 00:48:59 GMT (envelope-from git) Date: Sat, 18 Nov 2023 00:48:59 GMT Message-Id: <202311180048.3AI0mxt0045291@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: 54d487c4d01d - main - makesyscalls: don't make syscall.mk by default List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 54d487c4d01d68ef0ac03eae1fc574f7533d46f6 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=54d487c4d01d68ef0ac03eae1fc574f7533d46f6 commit 54d487c4d01d68ef0ac03eae1fc574f7533d46f6 Author: Brooks Davis AuthorDate: 2023-11-18 00:48:14 +0000 Commit: Brooks Davis CommitDate: 2023-11-18 00:48:14 +0000 makesyscalls: don't make syscall.mk by default We only want to produce syscall.mk for the main syscall table so default to not producing it (send it to /dev/null) and add a syscalls.conf to sys/kern to trigger the creation of sys/sys/syscall.mk. This eliminates the need for entries in other syscalls.conf files and is a cleaner pattern going forward. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D42663 --- sys/amd64/linux/syscalls.conf | 1 - sys/amd64/linux32/syscalls.conf | 1 - sys/arm64/linux/syscalls.conf | 1 - sys/compat/freebsd32/syscalls.conf | 1 - sys/i386/linux/syscalls.conf | 1 - sys/kern/Makefile | 1 - sys/kern/syscalls.conf | 1 + sys/tools/makesyscalls.lua | 2 +- 8 files changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/amd64/linux/syscalls.conf b/sys/amd64/linux/syscalls.conf index b46b9e500553..2c6c1e45f8d9 100644 --- a/sys/amd64/linux/syscalls.conf +++ b/sys/amd64/linux/syscalls.conf @@ -3,7 +3,6 @@ sysproto="linux_proto.h" sysproto_h=_LINUX_SYSPROTO_H_ syshdr="linux_syscall.h" syssw="linux_sysent.c" -sysmk="/dev/null" syscallprefix="LINUX_SYS_" switchname="linux_sysent" namesname="linux_syscallnames" diff --git a/sys/amd64/linux32/syscalls.conf b/sys/amd64/linux32/syscalls.conf index 82ffa49fdbb8..e1b92f011d21 100644 --- a/sys/amd64/linux32/syscalls.conf +++ b/sys/amd64/linux32/syscalls.conf @@ -3,7 +3,6 @@ sysproto="linux32_proto.h" sysproto_h=_LINUX32_SYSPROTO_H_ syshdr="linux32_syscall.h" syssw="linux32_sysent.c" -sysmk="/dev/null" syscallprefix="LINUX32_SYS_" switchname="linux32_sysent" namesname="linux32_syscallnames" diff --git a/sys/arm64/linux/syscalls.conf b/sys/arm64/linux/syscalls.conf index b46b9e500553..2c6c1e45f8d9 100644 --- a/sys/arm64/linux/syscalls.conf +++ b/sys/arm64/linux/syscalls.conf @@ -3,7 +3,6 @@ sysproto="linux_proto.h" sysproto_h=_LINUX_SYSPROTO_H_ syshdr="linux_syscall.h" syssw="linux_sysent.c" -sysmk="/dev/null" syscallprefix="LINUX_SYS_" switchname="linux_sysent" namesname="linux_syscallnames" diff --git a/sys/compat/freebsd32/syscalls.conf b/sys/compat/freebsd32/syscalls.conf index af0409d8b3f1..055a041cf72a 100644 --- a/sys/compat/freebsd32/syscalls.conf +++ b/sys/compat/freebsd32/syscalls.conf @@ -3,7 +3,6 @@ sysproto="freebsd32_proto.h" sysproto_h=_FREEBSD32_SYSPROTO_H_ syshdr="freebsd32_syscall.h" syssw="freebsd32_sysent.c" -sysmk="/dev/null" syscallprefix="FREEBSD32_SYS_" switchname="freebsd32_sysent" namesname="freebsd32_syscallnames" diff --git a/sys/i386/linux/syscalls.conf b/sys/i386/linux/syscalls.conf index b46b9e500553..2c6c1e45f8d9 100644 --- a/sys/i386/linux/syscalls.conf +++ b/sys/i386/linux/syscalls.conf @@ -3,7 +3,6 @@ sysproto="linux_proto.h" sysproto_h=_LINUX_SYSPROTO_H_ syshdr="linux_syscall.h" syssw="linux_sysent.c" -sysmk="/dev/null" syscallprefix="LINUX_SYS_" switchname="linux_sysent" namesname="linux_syscallnames" diff --git a/sys/kern/Makefile b/sys/kern/Makefile index 839ad83b02e4..505175412661 100644 --- a/sys/kern/Makefile +++ b/sys/kern/Makefile @@ -2,7 +2,6 @@ # # Makefile for init_sysent -SYSENT_CONF= GENERATED= init_sysent.c \ syscalls.c \ systrace_args.c \ diff --git a/sys/kern/syscalls.conf b/sys/kern/syscalls.conf new file mode 100644 index 000000000000..d328b992a45d --- /dev/null +++ b/sys/kern/syscalls.conf @@ -0,0 +1 @@ +sysmk="../sys/syscall.mk" diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index f2d8f1a609b6..bf631ac2ffdd 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -46,7 +46,7 @@ local config = { sysproto = "../sys/sysproto.h", sysproto_h = "_SYS_SYSPROTO_H_", syshdr = "../sys/syscall.h", - sysmk = "../sys/syscall.mk", + sysmk = "/dev/null", syssw = "init_sysent.c", syscallprefix = "SYS_", switchname = "sysent", From nobody Sat Nov 18 04:06:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXKvd3shWz51kFT; Sat, 18 Nov 2023 04:06: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 4SXKvd32y5z4sw2; Sat, 18 Nov 2023 04:06:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700280381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=43MoHvZtMrKZRnshYmzRuAsyfC8wVVPADsDRQtZKyNs=; b=ArJRCy4ZozcLmALilqkMTMuz193uKibeMSDVL6y+BKwxs0N1c0Uay5zeQWSscmnZTIP4pl nSS7XUXS2K7aL0KWRdECX/GqeNflwF9vZc2nrk/SrsES3vehhfivc6StrA+a/nytz07XAw U6T8t9nor9PuiX4faw+tHF5CYuvUPubrIAIkAme6BSt8ymYPbnvK+x14HLJwNu1aWu6Gwb AXsJtbR3bozYWrfiVUyeEwkmUoP9154UAx2aKDPd/QWL48+U51k0PTwrx6+u0lZ+HKT8rv N8J6xnFxjBKPuF8x8VjTM5mkzn2Tl82XHQfu2Phd4odhPonSWy0sXHtD7XSwkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700280381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=43MoHvZtMrKZRnshYmzRuAsyfC8wVVPADsDRQtZKyNs=; b=oVku5oe0EMGYWsHLvWGIf6Z+HarraTmyr2E+O9MIa1O6Fvb8ixlU0IInbAIhJiqNUMBN9Z 4jLJzCRkKJuX5gBBINd3lIN/cYY9u/UHIVx4Jj3Kv6J3L7XBBShtzyazS2JgI1Anf6ML2N TNEawWaVJMK7DZNPB3KnpVG14a44NQZRUSgzOuRIm7ZM8nxmDjgXT/B8nV4n73VftgYP94 C7gnwlwATZ9Xe4VTiugMPB2yQBhNFQ2z31fX5pYaG164ldYklEwZUfY6x8bxFzxszZSh/J 9wIgN5780bsTsW1ZPG1ESeELroEmP4PgmfGArPTEEaX6+AnpTcDw8nscAqHwSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700280381; a=rsa-sha256; cv=none; b=eOsAveZWAfhWK1h4F2RMb1+ugzehvBxWTO/W4jPNuuzIlKoTbC2aAqFOpQCVcQIAdIm4kZ m2SBaxv2n4mRsowFLbUCn12h08q6hpm6HjrbHWcP1FvKjxAA5miDi5x5do+Es3IULHC4G2 FvrsvoB2UAVJIUZslrHpfvtGWDRr8OVy6OhFd+ZtnibK/++hfhZo6MUyPJggA0YtYLI/pu FrVZv1061aWiEmK5b7gHkkkpPdLIZrtG7Nc7vUFq/vj97cz/AU618JBFbso4k4TMxOgi0r TUyBjk9c5NI7cggxalBT6829cyN/WDi9K9drhxwcTaOTpG9cdplIF7chRfN8AA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXKvd1qKQz19lT; Sat, 18 Nov 2023 04:06: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 3AI46LjI081492; Sat, 18 Nov 2023 04:06:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AI46Luw081489; Sat, 18 Nov 2023 04:06:21 GMT (envelope-from git) Date: Sat, 18 Nov 2023 04:06:21 GMT Message-Id: <202311180406.3AI46Luw081489@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: f863f39636dc - main - pnpinfo: Remove __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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f863f39636dcb007e977840b0a8d0e796de50007 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f863f39636dcb007e977840b0a8d0e796de50007 commit f863f39636dcb007e977840b0a8d0e796de50007 Author: Warner Losh AuthorDate: 2023-11-18 03:46:20 +0000 Commit: Warner Losh CommitDate: 2023-11-18 04:04:59 +0000 pnpinfo: Remove __P We don't need to compile on a K&R compiler (and we've long ago lost the ability to do so). It's not even clear if it ever worked with a pure K&R compiler, but maybe it once did... Sponsored by: Netflix --- contrib/pnpinfo/pnpinfo.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/pnpinfo/pnpinfo.c b/contrib/pnpinfo/pnpinfo.c index e13ea0d99f57..4ec99b3b27e1 100644 --- a/contrib/pnpinfo/pnpinfo.c +++ b/contrib/pnpinfo/pnpinfo.c @@ -50,8 +50,8 @@ __FBSDID("$FreeBSD$"); void pnp_write(int d, u_char r) { - outb (_PNP_ADDRESS, d); - outb (_PNP_WRITE_DATA, r); + outb(_PNP_ADDRESS, d); + outb(_PNP_WRITE_DATA, r); } /* The READ_DATA port that we are using currently */ @@ -74,14 +74,14 @@ pnp_readw(int d) int logdevs=0; -void DELAY __P((int i)); -void send_Initiation_LFSR(); -int get_serial __P((u_char *data)); -int get_resource_info __P((u_char *buffer, int len)); -int handle_small_res __P((u_char *resinfo, int item, int len)); -void handle_large_res __P((u_char *resinfo, int item, int len)); -void dump_resdata __P((u_char *data, int csn)); -int isolation_protocol(); +void DELAY(int i); +void send_Initiation_LFSR(void); +int get_serial(u_char *data); +int get_resource_info(u_char *buffer, int len); +int handle_small_res(u_char *resinfo, int item, int len); +void handle_large_res(u_char *resinfo, int item, int len); +void dump_resdata(u_char *data, int csn); +int isolation_protocol(void); /* @@ -89,7 +89,7 @@ int isolation_protocol(); * This function busy-waits. */ void -DELAY (int i) +DELAY(int i) { struct timeval t; long start, stop; @@ -235,7 +235,7 @@ report_dma_info(int x) void -report_memory_info (int x) +report_memory_info(int x) { if (x & 0x1) printf ("Memory Range: Writeable\n"); From nobody Sat Nov 18 04:06:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXKvf4QP4z51kTB; Sat, 18 Nov 2023 04:06: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 4SXKvf3vjkz4tKR; Sat, 18 Nov 2023 04:06:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700280382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=szqBaeJbowha60DXrT+rAzrLOozSSMZ0jXDdQoghF4I=; b=M6SU5XjQnT899mw4JxgxE+2GqwVZdbK7crWDg76LS1sDm8FvPGmELpfs/7AvZtQMzs8vDX mLcnZA1MDP7IOTrA34UhYv8oXHKC1RYOXEEifZ9+1wN24OITetem9+w3i/cbXiQb61B7Vc o4L2vW/Wl4iU1ngv45DpgStOETeiW2QOFHUY7j4SZGdWtCKfVzc9g4xfVUS0r8cnbGKK1a UPfcKxibZtlEbuGyPtJoyeSkkn4XqlIP4uTfyUloPsB3kHO6fq+Ce/NYMXhLDQa0El+2HV a6evb5ChwdlpoJm52MF8JFULf3gf3JVlA+iFZ8C33YXbpOPWd5wpjsHk5V80oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700280382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=szqBaeJbowha60DXrT+rAzrLOozSSMZ0jXDdQoghF4I=; b=JBL8fpty12YwweIs9UZ8bL5BqoiF0xvJMe72tpc65FHg0b48+DAoY/8wImxVLB+3gL3uIs GZKLkj3SDwJwSxyWvftvVzNoCAcwNdz9YW8WrqcExT45dBlu0zvtCtqDQMCKeqPccoOXl9 WUwVaXa5BJI4jGf7vqsIcKWeOVCr9oem/S+gn8rqqbXn6U2sXiQLAP7BcB2kR3JuWjfh6y 0KMsctDcVQTp6zJYmnS1uZ9viy/GQZf/MzcMCItrC3U7MvEO5Zy7BV/1ukR8jqfPBOxnYe qprRPtV3Qy0IXLfxkc3D5nf8KosSu65VCyAsxyBsETX8fwGYcnTh8e4l7lPOlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700280382; a=rsa-sha256; cv=none; b=iCBAYQ3vZvRT/GTesHODtwrC7uw5SSaLtvrK9GBH6/1rGblW0kXLeIgTbIg+uUg2V+IrFe eWBDiJA6w9XdY+px2RQ1UHJXWXSBIx0O4O+M6QNHfgMNtTEE3SpPYfzIeKarMogVPu4G9w EKCrmXSXMD1yT0fb1T0fukBXkd+Tzwxke2x9wUqPIXeu69wOhUqzU4hVGBb/gIwQkbzYde RayLuxK54N1e0chNfFFe1LfsMmv7EZ7r+8O+QlqH/x2aJeRxRXyYvgAln5m3JEU2FfyQ7b Zy6yzF7S3QJiyUCXjloiYrzM5dZy6r7CKTGEJiedmGvv4RYSXP5RsS9BNePk/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 4SXKvf306Qz19t7; Sat, 18 Nov 2023 04:06: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 3AI46MDB081535; Sat, 18 Nov 2023 04:06:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AI46MU7081532; Sat, 18 Nov 2023 04:06:22 GMT (envelope-from git) Date: Sat, 18 Nov 2023 04:06:22 GMT Message-Id: <202311180406.3AI46MU7081532@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: 4ac3cfa939e4 - main - traceroute: Remove stray __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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ac3cfa939e458560705713335764ae64c1b8a7f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4ac3cfa939e458560705713335764ae64c1b8a7f commit 4ac3cfa939e458560705713335764ae64c1b8a7f Author: Warner Losh AuthorDate: 2023-11-18 03:48:48 +0000 Commit: Warner Losh CommitDate: 2023-11-18 04:05:00 +0000 traceroute: Remove stray __P Remove stray __P(). It's no longer needed, and since the whole rest of the file lacks them, it's not very useful. Sponsored by: Netflix --- contrib/traceroute/traceroute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/traceroute/traceroute.c b/contrib/traceroute/traceroute.c index 48ad8fdc9104..38fd812b17f6 100644 --- a/contrib/traceroute/traceroute.c +++ b/contrib/traceroute/traceroute.c @@ -388,7 +388,7 @@ int packet_ok(u_char *, int, struct sockaddr_in *, int); char *pr_type(u_char); void print(u_char *, int, struct sockaddr_in *); #ifdef IPSEC -int setpolicy __P((int so, char *policy)); +int setpolicy(int so, char *policy); #endif void send_probe(int, int); struct outproto *setproto(char *); From nobody Sat Nov 18 04:32:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXLTH5KHkz51lL0; Sat, 18 Nov 2023 04:32:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SXLTH4T3mz3CYb; Sat, 18 Nov 2023 04:32:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700281923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2tGGLQqCrTHZSnrwMpOaIK/1mecsgSWOyObIgeQMKog=; b=orUOY/2QZsAVKPdFeUwEqQTRgQXXI3lAxESPUiOlq4ywTbJ6tkA62lU2ja/kfV1mm4q2I9 KsEfnwtJBkkBwYUavmauZGkEOEXef1zXtPDInh7FqNVYHYtQ+3fsVNB3cAR7C+H1HChnbn 64bf+Im80eptElwMpH238Mz6iTWmSptA3QPgWkQd0L0vKvbf8oQhZtuWQkHPgHGyMwzuEk T2zXvbJbSXDQCSqNUTtAJaOwxLUAKh6oEmMU/wl09Ig8GsRn8mRrtxZdtRFaV6Jeztp4Oc dF144K8WoHr9MTGbcv/H2cNBQHoHGas8zd2oOozYgiY+dZzO3xksp5o1rXjpNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700281923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2tGGLQqCrTHZSnrwMpOaIK/1mecsgSWOyObIgeQMKog=; b=VoYytop7pf+YS13EH4WMss++qHMqXYsp3bJ8GiBe0p8GjIfqrWEyRtaG8xoAe2Dgis8bDI vexrIHVMsxsNrAbR8z49/jJ/ie+IfKtHYWGHtI/eh7ovr2vCxCnRGJGt4GqMZXuuhp7j4q JB77jQmuEdlINU1zE6RWWE5ByNiZKTHIY3wXX4gh69eiQXESGZY7wbK9lDXjsZHC9fqsGn tVhRoL7xkkyh6vFy56hWVYo7fM7QuGxpPmIUW7lRluykNzElcuRos5WyuIdJcD+SGqo3rD XpUpSylfIKzGNOVFXhNh2aW9OlI77pOTdayfKuk8liNt7hAyOcFt6h8tScx5Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700281923; a=rsa-sha256; cv=none; b=sx2dD/g6trV26StoqqZbLoWhMJRXAPF/faXSKJmKBuJz2FfyFD1zrZeAMvkdv8j+k7SAjc JP5n3Fh6KqiPMDhUsP3gl2NOqmrS3RG7NL3/wr4nxKuLysfnARy6WgnQFV0ztICpisEqHp TPlbzmmJXvKfpcSAnIf3lRiZO88PwCUE4GzhWcw4NlCcGtXoMXZqUVU+lB2hmKo8jhuPEM vcnPs6IR4vz6ZOlGvwoeZ7uf+t+c2HumUDsdaPgifQfpnktwtQcpS0xl+UVJNZjixcJ9SC Ivh7VgmRUpCWcFAR3GcdhD2jwhtfdBoVWU+zy67wQ13YpHNA+5IV84/BZw6xAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXLTH3ZMsz1Bt6; Sat, 18 Nov 2023 04:32: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 3AI4W3Vg029179; Sat, 18 Nov 2023 04:32:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AI4W3YM029176; Sat, 18 Nov 2023 04:32:03 GMT (envelope-from git) Date: Sat, 18 Nov 2023 04:32:03 GMT Message-Id: <202311180432.3AI4W3YM029176@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: 34a6ad848fbf - main - nvme: Don't use version to listen for events for ns and fw 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 34a6ad848fbf471773a430a7e457bf49816e756e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=34a6ad848fbf471773a430a7e457bf49816e756e commit 34a6ad848fbf471773a430a7e457bf49816e756e Author: Warner Losh AuthorDate: 2023-11-18 04:24:00 +0000 Commit: Warner Losh CommitDate: 2023-11-18 04:25:57 +0000 nvme: Don't use version to listen for events for ns and fw changes Instead, use the attribtue bits from the identification data to determine if we should listen to namespace changes and firmware activation. Should have no functional change, though we may stop listening for events that will never happen. Sponsored by: Netflix --- sys/dev/nvme/nvme_ctrlr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 5d72f707d3b1..836d13eaa16d 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -826,8 +826,9 @@ nvme_ctrlr_configure_aer(struct nvme_controller *ctrlr) NVME_CRIT_WARN_ST_READ_ONLY | NVME_CRIT_WARN_ST_VOLATILE_MEMORY_BACKUP; if (ctrlr->cdata.ver >= NVME_REV(1, 2)) - ctrlr->async_event_config |= NVME_ASYNC_EVENT_NS_ATTRIBUTE | - NVME_ASYNC_EVENT_FW_ACTIVATE; + ctrlr->async_event_config |= + ctrlr->cdata.oaes & (NVME_ASYNC_EVENT_NS_ATTRIBUTE | + NVME_ASYNC_EVENT_FW_ACTIVATE); status.done = 0; nvme_ctrlr_cmd_get_feature(ctrlr, NVME_FEAT_TEMPERATURE_THRESHOLD, From nobody Sat Nov 18 04:52:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXLxP4w69z51m5J; Sat, 18 Nov 2023 04:52:57 +0000 (UTC) (envelope-from yuri@aetern.org) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.3 with cipher TLS_AES_256_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 4SXLxP2sQqz3F3b; Sat, 18 Nov 2023 04:52:57 +0000 (UTC) (envelope-from yuri@aetern.org) Authentication-Results: mx1.freebsd.org; none Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 247F73200786; Fri, 17 Nov 2023 23:52:56 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 17 Nov 2023 23:52:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aetern.org; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1700283175; x=1700369575; bh=IadZyhx+oEECbm5cD3Me6/XVlmwE3k354C2 7ZLSO3XY=; b=83eIVZ3xO/AFeANqGZrIR2omhM6QGA8LwvGN9i6iTC3LBtd+otC tDAFRNbdF+nh9rWW9scjLaUIAD3PdyZS286KuKAH99SrivCVV2F+6O20LXDkUiz7 +E0AsdfcUB35VLNv2XhRFJWS3emQldKESZLTFRWF+NKEixvZfVsqIX2qYR+b93sO jPHopoGH71AELsy9/2a/3CFzv1/hcfKlC6Bmqzu8/tI7dqHVhgwYV3K10mLEuY3u im5VKhe3p8fjASkfuRqx+VzwUpI6xhDDLrcJ6w++dw1If73jJqr6+1q9XhRSGC9q zOJLGDmMfTykjTYTHuajtW11S83zh0/6APw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1700283175; x= 1700369575; bh=IadZyhx+oEECbm5cD3Me6/XVlmwE3k354C27ZLSO3XY=; b=L MkbPGFR9IVGuUlWAElNweDqULPAwwdx4Zoy5CPHz0iY4Eb/htjlXIGQvN5XpfYRh Wzt6YLDUrXi9OEvG+s6GEZu65L3MDgy2nRRwNVJcKYTArtguZstXsl1aXs7APnn3 TSyKAS60WzaAubKa3Ey/1/W6cvOitAaZBvtKlfpH7fhb6PRtm7qx6axasNuyjuB/ UGIlj+Tn6oHmOhQMdPa4FpCoG4B4uc1XPfHYCFpNTy6RewWZ9zO+cD0Hhnhc7bPs RAx/v9gjRtu4+nWWoGFgsz8Jn2zRx2hlh49DLPKMu+W4KEu7GuKFcGJTEXpbOihZ Ra/7gWAHegwUH0lhpItzA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeguddgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtje ertddtvdejnecuhfhrohhmpegjuhhrihcuoeihuhhrihesrggvthgvrhhnrdhorhhgqeen ucggtffrrghtthgvrhhnpeevkefhfeffgefhheelgeelhfekgedtlefgvdelvdeufeehhf etjeeikeefgfffleenucffohhmrghinhepfhhrvggvsghsugdrohhrghenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeihuhhrihesrggvthgvrh hnrdhorhhg X-ME-Proxy: Feedback-ID: i0d79475b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 17 Nov 2023 23:52:53 -0500 (EST) Message-ID: <71162369-66f6-4f08-9ba7-e87236151fee@aetern.org> Date: Sat, 18 Nov 2023 11:52:49 +0700 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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: 34a6ad848fbf - main - nvme: Don't use version to listen for events for ns and fw changes To: Warner Losh , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202311180432.3AI4W3YM029176@gitrepo.freebsd.org> Content-Language: en-US From: Yuri In-Reply-To: <202311180432.3AI4W3YM029176@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US] X-Rspamd-Queue-Id: 4SXLxP2sQqz3F3b Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=34a6ad848fbf471773a430a7e457bf49816e756e > > commit 34a6ad848fbf471773a430a7e457bf49816e756e > Author: Warner Losh > AuthorDate: 2023-11-18 04:24:00 +0000 > Commit: Warner Losh > CommitDate: 2023-11-18 04:25:57 +0000 > > nvme: Don't use version to listen for events for ns and fw changes > > Instead, use the attribtue bits from the identification data to > determine if we should listen to namespace changes and firmware > activation. Should have no functional change, though we may stop > listening for events that will never happen. > > Sponsored by: Netflix > --- > sys/dev/nvme/nvme_ctrlr.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c > index 5d72f707d3b1..836d13eaa16d 100644 > --- a/sys/dev/nvme/nvme_ctrlr.c > +++ b/sys/dev/nvme/nvme_ctrlr.c > @@ -826,8 +826,9 @@ nvme_ctrlr_configure_aer(struct nvme_controller *ctrlr) > NVME_CRIT_WARN_ST_READ_ONLY | > NVME_CRIT_WARN_ST_VOLATILE_MEMORY_BACKUP; > if (ctrlr->cdata.ver >= NVME_REV(1, 2)) It seems to be under version check still? Or am I misreading the commit message? > - ctrlr->async_event_config |= NVME_ASYNC_EVENT_NS_ATTRIBUTE | > - NVME_ASYNC_EVENT_FW_ACTIVATE; > + ctrlr->async_event_config |= > + ctrlr->cdata.oaes & (NVME_ASYNC_EVENT_NS_ATTRIBUTE | > + NVME_ASYNC_EVENT_FW_ACTIVATE); > > status.done = 0; > nvme_ctrlr_cmd_get_feature(ctrlr, NVME_FEAT_TEMPERATURE_THRESHOLD, From nobody Sat Nov 18 09:02:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXSTZ6Wjrz50lK5; Sat, 18 Nov 2023 09:02: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 4SXSTZ3vKgz3Xyg; Sat, 18 Nov 2023 09:02:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700298162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r6HQPRxh3ZEjM9Kthk889hF/0jD22uJD/RJMaITnDOI=; b=AIypVRu/w1XqUdik45DO7DTr0sGG3X3NeVLXr1aBBiamu6OQ2vM50p9DtB+J9F2sRhzlnY qq4/8m4HbLOm1G/z3KQ/0LiZiV82SmBs63cEnKGStmOPuTa0aQ9hRWoSxussLPXSHJaGnE mS7yBzqNpCHR69HpBX8dImHuRrk/OW98b9iF/jFxYadk6kkxwqrAG9XPQyFIMgc5BSFp7T GJ4bJulkbuV5/I+04mDUrDeTyiioBgIVWT7XQUZc1FVoV9SOjgr/sr54BDT3/0eFzxDC9E Tq/3GShW9Z0ZWJCmV78HNmPBcHd32/7YpsK3sOyZ7BjBZ0apqvgu9YNSMsbO0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700298162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r6HQPRxh3ZEjM9Kthk889hF/0jD22uJD/RJMaITnDOI=; b=VpKMFPl8oPUG2Yxx9hO6CRgbyX6XrSDGGkYn18DgOadvUBNhj9Voqk+vfcmizog+JG76yc Ryru0rbtG0YQ0mLQlrrCC14VDWDED06HXfrDgpVEAv/bV6pHaqXLitI+NDPUN0k05mokOB AGJeSOV5DGs0ESNd0jl6DTeabxlFK52aJgw5jwZZTe44XGzmblLnbWodS4obX4uSni4ycf R+lEnuRKsAlLzNGT9morJDu6DY/HhJmv/xMhmGECOKzasQcIuLBKQgzH7l1YGtwZ2yHfMO B3VqmB/3wd/DEVvKc8WF2Ngi/SLSJfTNAcFoUwF6QT42TkPYtbL7eKxKXm7ttg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700298162; a=rsa-sha256; cv=none; b=rxoXQ3PyZf8swFTvGEJyXCB2CO2hDqkuqeHC8N2BIPNROYCoDyTlxljXIcqhEIipsZKv47 1aZZZ2h0xe39XXJaoTA58DhzeAKBAavGIC00D9L5irT67Yc9NUUtKQlG9tmuWccM5RRE2p HhSJ9+AixNKxEVg81WGYo4/DkUjfVBLH2OlX/OiQ1WmPwk47Jn/55PfPrDt+WslyGNSXSI O8saPu8Sg0/YbUAKdghZGX7RrtVu8MxVq+3R8GWMqCVAClJCclsCCytas8jHNVplZNTeZy 4YuZO5RZTtUXZEc5YTcQtRzPklflVk682TOJsXuxrCxbizJpuuHZS82XO2R4Zw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXSTZ304Tz5XB; Sat, 18 Nov 2023 09:02: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 3AI92gD0080161; Sat, 18 Nov 2023 09:02:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AI92g3o080158; Sat, 18 Nov 2023 09:02:42 GMT (envelope-from git) Date: Sat, 18 Nov 2023 09:02:42 GMT Message-Id: <202311180902.3AI92g3o080158@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: fa9f74220146 - main - getpeerid.3: Clarify the 's' argument List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa9f74220146233b7224da7c94870540dc39ae68 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=fa9f74220146233b7224da7c94870540dc39ae68 commit fa9f74220146233b7224da7c94870540dc39ae68 Author: Gordon Bergling AuthorDate: 2023-11-18 09:02:12 +0000 Commit: Gordon Bergling CommitDate: 2023-11-18 09:02:12 +0000 getpeerid.3: Clarify the 's' argument The argument 's' of getpeerid(3) must be a connected UNIX-domain socket, so document it. PR: 248614 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42629 --- lib/libc/gen/getpeereid.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/getpeereid.3 b/lib/libc/gen/getpeereid.3 index 204dec041d8f..8e3b763f716a 100644 --- a/lib/libc/gen/getpeereid.3 +++ b/lib/libc/gen/getpeereid.3 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 28, 2022 +.Dd November 16, 2023 .Dt GETPEEREID 3 .Os .Sh NAME @@ -44,7 +44,7 @@ peer connected to a socket. The argument .Fa s -must be a +must be a connected .Ux Ns -domain socket .Pq Xr unix 4 From nobody Sat Nov 18 09:09:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXSdv3675z50m2C; Sat, 18 Nov 2023 09:09: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 4SXSdv2Yvfz3ZSr; Sat, 18 Nov 2023 09:09:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700298595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rMk88E4UpFtDolcJ1591VrziYk1XvuYDzcVvmdQ1LrI=; b=TX645SCRW5Fh5D+RymSvRCCsdjFXhZjlaXSr362Xg+RxoKQ2N+o8lpS9RtHBUA+4/O0Bde 58uqZgDGjvyuLtATsYav5+8vRYUF00CPmQZJb/wpjch0Kgi1egkAL5PGJjIfGg3R9xVopy J2hqjvrGSdZ3pCac2oQWyhfE9KiwV3MvGPUdUb8Hc+UC8ppHts1HKT85aAYim6IBmDcd9z 1eKKeo0sauBHoix4ZDHZbin8qsWkCH7pjWA3ixhc8e/zDE4Zn3zNtnvAEG6IuGHCqQ5Bl9 0eLhYbo5+h/L7Tb/F0IqwdCVyNqrYLl/GFdQrOpdbes/Ll0eCHc3ZYm3Nnf7Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700298595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rMk88E4UpFtDolcJ1591VrziYk1XvuYDzcVvmdQ1LrI=; b=gdD7nJ1IPCho3MwbZubRfJahGC9RBPnfmbFmbgCj3peWydgY1ly2TsREDCck7a3ekOYHLE yLU1DElXCXEZE5yO5Gc1jPCTMNQroRoDc42EB4p7tELdzoNvb3cfi94blKa2Y9JQy3piiF rr8h7CQoNqBN3RRPayrDWqHMSd1T8dyZ6yz+U7pasGQ1Tjg0M2/EvhRnr04i4LJxUgZSBQ A3U0WzKu7WL/gKc42pyp/wW6pptrhdNP7hIodG6d22v/gfc/mwXVn+d2B0r6f94azSKmr9 Tg3gtpCglgVWE1OT6md4nS/1g1lp74IF9EN19Rmpr0N4FerjRRx9unKkDvSJUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700298595; a=rsa-sha256; cv=none; b=f4OQ8HlnTh4VO5M3RpCkEAIckADYSUAB9VrNyaBdO2At/Q8dWXcv8DLdhOTWbVfBuB3ov8 +wZMFg+eNI9ZE5z5bL3Hr8L9XPMmRlfc+StFyEVm7N4SqvcYPV4Cv+vR7pngg42edpe4lp 2Ikb/7j3vL58iq8Q2GhxvkCQrWosZmOk2DJp4G5aWWwE9tjo0q6rrGv6lginlnAW4Ai0BW rz0wzyertEnV3rwhIBSPHmGpkXuh0Pw312NMvEA3G9jghvQiZB9aHjbZRtJ114s3FlrpgI 7pHaPHOlU16y7MBvoCSCCXIUTr+zB/CuQ7fpCzGTD3a7MgSGrz5o/oi1lVzdeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXSdv1Yngz5mC; Sat, 18 Nov 2023 09:09: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 3AI99tdw081192; Sat, 18 Nov 2023 09:09:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AI99tZN081189; Sat, 18 Nov 2023 09:09:55 GMT (envelope-from git) Date: Sat, 18 Nov 2023 09:09:55 GMT Message-Id: <202311180909.3AI99tZN081189@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 8c8ffe541eab - main - Add a HISTORY section for memcpy(3) and mempcpy(3) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c8ffe541eabb23e21ddffb534ecda7ac6d7e04a Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=8c8ffe541eabb23e21ddffb534ecda7ac6d7e04a commit 8c8ffe541eabb23e21ddffb534ecda7ac6d7e04a Author: Gordon Bergling AuthorDate: 2023-11-18 09:09:40 +0000 Commit: Gordon Bergling CommitDate: 2023-11-18 09:09:40 +0000 Add a HISTORY section for memcpy(3) and mempcpy(3) The memcpy() function first appeared in AT&T System V UNIX and was reimplemented for 4.3BSD-Tahoe. The mempcpy() function first appeared in FreeBSD 13.1. PR: 272227 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42630 --- lib/libc/string/memcpy.3 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/libc/string/memcpy.3 b/lib/libc/string/memcpy.3 index 5ce43d5dfe75..4207ccb018c1 100644 --- a/lib/libc/string/memcpy.3 +++ b/lib/libc/string/memcpy.3 @@ -31,7 +31,7 @@ .\" .\" @(#)memcpy.3 8.1 (Berkeley) 6/4/93 .\" -.Dd July 14, 2021 +.Dd November 18, 2023 .Dt MEMCPY 3 .Os .Sh NAME @@ -77,7 +77,7 @@ function returns a pointer to the byte after the last written byte. .Xr memccpy 3 , .Xr memmove 3 , .Xr strcpy 3 , -.Xr wmemcpy 3 +.Xr wmemcpy 3 , .Xr wmempcpy 3 .Sh STANDARDS The @@ -85,3 +85,14 @@ The function conforms to .St -isoC . +.Sh HISTORY +The +.Fn memcpy +function first appeared in +.At V +and was reimplemented for +.Bx 4.3 Tahoe . +The +.Fn mempcpy +function first appeared in +.Fx 13.1 . From nobody Sat Nov 18 10:44:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXVlH2bTLz50vwH; Sat, 18 Nov 2023 10:44: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 4SXVlH2356z4K7d; Sat, 18 Nov 2023 10:44:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700304283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pw+jN12eG0ynA9+XBE1qQvoo1gb7w7ixX2v9MpT4Uvw=; b=d2ziZ/b8n2YzxV+ksWm3m2lgEmDU6a+zJhsHJWr8Nkbgco0fq5AmT83dsOJlgwhaLom4/W NRNfemP2Zs6GU+XHn77rkPFq+0DgFGdTrGBMyQB4JxOnzr9p9DvMGyOQt6gEhAhw5On1b0 poPrursqOpjCVf+Bh8y2yugergvaiG2LwuIu2gn8JG5yD0W53xmGfLRfu9b48m2itzd3Mr nfA7ur5Vj3xQQSMDAq+Zldcp/M5TxNSsbPfF6JiPLgwZ3Ga+lU9t7tE7wgj+h3T3kI793a 3Sm6YXVRYIYG+6Jf8Fej3i4ud7U8fGS3d5HcS7c/wPiWRgsXmyIwhpgJNMz/vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700304283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pw+jN12eG0ynA9+XBE1qQvoo1gb7w7ixX2v9MpT4Uvw=; b=cMs7dJjx2fjdhcrd4oySIdSctPMUfDtw+7aVqyGeWs6VLJpgJNuGOHrvDwcBFxOnWldv86 sqj6xcv4VjDndvpIc4S5CgKqlRd/wuEqp16/qZ52mAk6B6hIrawm2NGq+lSpbpHtFenDug ScNr/9wERPbybvpY/a40xKJeD0CfwNrlv3kuWgkxlIFCMAuEYZFxgQa9hJXoMu/1vsvSW7 KwdOAUgsqvfxBLa4pC+05Iq0MrWtb7QLwVkC4T8yiGJwIXpx++Ivqgt2ZCARcosQFT40eT Pv/CoqJkHnkhih45R8w3ZGgXw6J8h/a2anx62HUi5HITDsN0TV4X2ZxdawmxQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700304283; a=rsa-sha256; cv=none; b=j4ZiO35KQGdcIIlajk45iOimHkaJa/2iM+aohHGpKTdqLAoU803WEJhMb03Ulrdud1kn9z LprrIhQyMZpZhVWs8HsixjZG8XWHXLa2AyOTPoSXoT929+0AypMqTQvEZTb3PUyeyXvdel 1Uanf0JvSqnQ3kUPwKyyRD1pyUU07CRx4gaeVk2OOqWXu8b1qEHVltzPN/giQEdQE87int xcGqqsIUs3lrcfm2wg+/PFfdp9ph4coJB8ET7QkGzHOVvl10I1q2fcWjhpD/gk63IrwF1p pDq3XTfT98u0b7R+/cyo/mpzl5ycVk8vphbjc0dgFtq92qjyXaKG3omf30jSFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXVlH0fSlz8Gw; Sat, 18 Nov 2023 10:44:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AIAig4o047280; Sat, 18 Nov 2023 10:44:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AIAigtH047278; Sat, 18 Nov 2023 10:44:42 GMT (envelope-from git) Date: Sat, 18 Nov 2023 10:44:42 GMT Message-Id: <202311181044.3AIAigtH047278@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: e23e0e3c9cbf - stable/13 - pf_purge_expired_states(): fix build without SDT probes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e23e0e3c9cbf1ca79e1029c89b19c88a28c18e9f Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e23e0e3c9cbf1ca79e1029c89b19c88a28c18e9f commit e23e0e3c9cbf1ca79e1029c89b19c88a28c18e9f Author: Konstantin Belousov AuthorDate: 2023-11-09 20:17:53 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-18 10:43:51 +0000 pf_purge_expired_states(): fix build without SDT probes Sponsored by: The FreeBSD Foundation (cherry picked from commit af21145f33d75c8d754b2371d03c181cd0c730e7) --- sys/netpfil/pf/pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 80f4a8fa0626..1323a1003af8 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -2131,7 +2131,7 @@ pf_purge_expired_states(u_int i, int maxcheck) { struct pf_idhash *ih; struct pf_kstate *s; - size_t count; + size_t count __unused; V_pf_status.states = uma_zone_get_cur(V_pf_state_z); From nobody Sat Nov 18 11:01:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXW7744NMz50wv1; Sat, 18 Nov 2023 11: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 4SXW76733cz4MYC; Sat, 18 Nov 2023 11:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700305315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y5pMw/lM22NKiLzNbs52wd9Y1331Zrsxjpxq08s6itc=; b=gGXS7MmqLIOqIeNmAmo3GIumWGvzBEoxockeyOWJelCrwDpcGn3imSiiedzbGNbJEzOxyl 81GTCXoOzSLvKS9620Vhisn+z88yl2LxvjMlfXi7yaJDiahQygRU84nSvjg/KxTH7b0gZz fRyNuOhihvzGcgZyoPB1eOJ9zPYF9SzJfeLHcYnma/yIZ42KmTzeLIUmNHyqzdiPojPAXB rHYf5QEeZ6gEvlzkpf4rgkduH9eFG3gwZzXQUNDMRj+3tI7sDywH+4A5gAlDqI6rooMKjW 3nl8EF7HJqeguAMFEI1CN4k+rfcpz0m1+N3a9R+RsXhjKJtv7haZih5oxIphxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700305315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y5pMw/lM22NKiLzNbs52wd9Y1331Zrsxjpxq08s6itc=; b=SEqM698H4YsDvUPpjGaqL6DepIEwTH6uE/YKdvYb3+Z7ALlpEZm5JB6V0AOyLJ7Xk9MmpS hzdbf7KRRG6hew92u8cWZdqbYoUsqtYw/8jZ8Bu+KjEvVHYPQlm35EWvWnj3cnCu7pbNlH clVkkprtlc2pmkza4LF164fWeGqseNDUdLsveBnRtAOmilfGsD2VgvsN82y781EDWL66Va 75mi7fUnedbza9CrLr1DSh7b4pZjHftqW4na3V7+BN0CnGliGgSdvzRu5/pqtfMrhHwOvX 66cT8a8I+38uo+XcVod5Xjt+V3CVk2EPJcGqu4st9WFBL0wDSH7RrcOFvUZFyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700305315; a=rsa-sha256; cv=none; b=J9eyJPnuTydG16RUMCoN23SpZzeyonjOCXyu0H6wj+tdMPA8LgMo55Tvw3ge1EID0qb7HV THSzDOLJ9JsE2J1Rhx6BuexEkhShrvqCYNFOvrGeM37VQLkxWd4DCdoiTG0WLUqB53UKv8 /qeLNNFgtWxsaqYT4SziIQi0rD8BvffoQ2h1gB8QwFKZ8R3u0YpFxLRj4sDV2+05QJl6DC 7ApmARIQjXL/rZ9T5PJFAj4UhdVJ9VYt2EZfBFpM8v0qZ8kAmyvrMtQWTaAwX5zYljIphz 4imA3yDXpmSrulGgSWeGDptnfro1x4JldgJL/9PyXfgXtqFsTcK5wI/JzMA5qQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXW7665p2z92P; Sat, 18 Nov 2023 11:01: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 3AIB1s5Z080587; Sat, 18 Nov 2023 11: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 3AIB1spv080584; Sat, 18 Nov 2023 11:01:54 GMT (envelope-from git) Date: Sat, 18 Nov 2023 11:01:54 GMT Message-Id: <202311181101.3AIB1spv080584@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jens Schweikhardt Subject: git: 8703e04009f0 - main - Apply non-abrasive script-cleaning fluid. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: schweikh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8703e04009f0a0c229058c9f7c872878b6675fb2 Auto-Submitted: auto-generated The branch main has been updated by schweikh: URL: https://cgit.FreeBSD.org/src/commit/?id=8703e04009f0a0c229058c9f7c872878b6675fb2 commit 8703e04009f0a0c229058c9f7c872878b6675fb2 Author: Jens Schweikhardt AuthorDate: 2023-11-18 10:58:26 +0000 Commit: Jens Schweikhardt CommitDate: 2023-11-18 10:58:26 +0000 Apply non-abrasive script-cleaning fluid. * consistent use of tabs * consistent quoting of parameters * if/then cosmetics to match rc.subr style --- usr.sbin/periodic/etc/weekly/310.locate | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/usr.sbin/periodic/etc/weekly/310.locate b/usr.sbin/periodic/etc/weekly/310.locate index 9ccd376074c9..84c0d69610e1 100755 --- a/usr.sbin/periodic/etc/weekly/310.locate +++ b/usr.sbin/periodic/etc/weekly/310.locate @@ -2,32 +2,31 @@ # # -# If there is a global system configuration file, suck it in. +# If there is a global system configuration file, read it. # -if [ -r /etc/defaults/periodic.conf ] -then - . /etc/defaults/periodic.conf - source_periodic_confs +if [ -r /etc/defaults/periodic.conf ]; then + . /etc/defaults/periodic.conf + source_periodic_confs fi case "$weekly_locate_enable" in - [Yy][Ee][Ss]) + [Yy][Ee][Ss]) echo "" echo "Rebuilding locate database:" - . /etc/locate.rc - : ${FCODES:="/var/db/locate.database"} - locdb="$FCODES" + . /etc/locate.rc + : "${FCODES:=/var/db/locate.database}" + locdb="$FCODES" - touch $locdb && rc=0 || rc=3 - chown nobody $locdb || rc=3 - chmod 644 $locdb || rc=3 + touch "$locdb" && rc=0 || rc=3 + chown nobody "$locdb" || rc=3 + chmod 644 "$locdb" || rc=3 cd / echo /usr/libexec/locate.updatedb | nice -n 5 su -fm nobody || rc=3 - chmod 444 $locdb || rc=3;; + chmod 444 "$locdb" || rc=3;; - *) rc=0;; + *) rc=0;; esac -exit $rc +exit "$rc" From nobody Sat Nov 18 15:06:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXcXw4Qltz51DBB; Sat, 18 Nov 2023 15:06: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 4SXcXw3t5Wz3GC1; Sat, 18 Nov 2023 15:06:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700319968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cSRJppk6QLPZKp8Ze43S0rnJWz7VlcqdeTXcbxJwOMo=; b=oCnaJkCxZNsNtxB7ME10GU3aQszEPl7i/0gV0svqQsG7+4gM9RcC9vqhln9K2tJoR53fQq 479Z7qczjyn8D08SfzJC9pTw26nVbZtFFsM0UqWlqMHpFPjWoWezXqzGT23LwdzZi/YKnp qEPNoKqNKl0wzjaMOQCQ+jOKAleB+aUmHi8XVXgOA3g9AYELxPlvszzgph7tms63dHPEr8 TqIy+k9f5a77B9phDghMHSs+dKeKXYpeKNHrBAkKkazt3Lk35vVUV/1f6PsO6GLEFM2c1J 7PVMHaVbAm7Heive1cQp7OnTaHoQuxwqgJHzWjaF4cDFRZzU31E6MzAIdX9k7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700319968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cSRJppk6QLPZKp8Ze43S0rnJWz7VlcqdeTXcbxJwOMo=; b=fbQML7q5RSvky1PyPysuvlkF4VJhJEx/7rPXPVvdphcGjp0yDjnfqOfAvcd6IHjcdrSh/X vFTrKMP0t/ciGInngWrfA4oy1D1oC62I2ghJiw1309z29NMZ/D6sa4fGSj3XpXrdSNQQdO bJYyiZvYNQKanadDMwAR6HAgjL+zBy7rSxmSRkuZnDg6phwGILmhVXinmbYQkRB0iqjGfm fzphLIp0zvUUlBXTVYrdd9dKYWIRFu1IWb777S8MoA4x+Ty6/27iXiVEhkiVpX0VYxv5hJ VLfFoU0iE4OX55koL40sqeTMzKG5y6FjDLNnKu71BqUdbTGMHQfQmOgenqSfTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700319968; a=rsa-sha256; cv=none; b=echcFeFnunCNsP5QK5vzWW4H/QxMvbdTGb4bqUyyfBUaUXC8vuDjo4qFTVANPQOJ2xyWXR r1Ae3b59NaaVvFPDXQOBl1W0K7abqxDKg4k3CDBpf6edPaWngyqBMkdXYtXH8YYtNet93M KaBmUCJHE/EELh4K1nZVWKzRn3a6v/YcQmFGdciT8bYQ1T8z8DsgZMAa/zEswVWHs5+vs+ XiGtwOMrSuUBAuvfD6i0WpnEKDJIzABE/FMQl7j62OPsLBeTqO6WhHPkoTejaDs47BUALJ dIxcLF4j9/Htd4yJwFNEN7MMaf1ulRWL6uucdN1aklB7bDJEscCnwx0DCFj87A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXcXw2xbGzWmd; Sat, 18 Nov 2023 15:06: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 3AIF68nF082126; Sat, 18 Nov 2023 15:06:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AIF68LA082123; Sat, 18 Nov 2023 15:06:08 GMT (envelope-from git) Date: Sat, 18 Nov 2023 15:06:08 GMT Message-Id: <202311181506.3AIF68LA082123@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jens Schweikhardt Subject: git: f06fda7ff147 - main - Spaces to tabs for consistency. No content change. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: schweikh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f06fda7ff14701905acb0089143ebf356c2a9b04 Auto-Submitted: auto-generated The branch main has been updated by schweikh: URL: https://cgit.FreeBSD.org/src/commit/?id=f06fda7ff14701905acb0089143ebf356c2a9b04 commit f06fda7ff14701905acb0089143ebf356c2a9b04 Author: Jens Schweikhardt AuthorDate: 2023-11-18 15:05:22 +0000 Commit: Jens Schweikhardt CommitDate: 2023-11-18 15:05:22 +0000 Spaces to tabs for consistency. No content change. --- libexec/rc/rc.subr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 332718dc6f2c..8cf812b06d45 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -218,7 +218,7 @@ stop_boot() case $1 in # "yes", "true", "on", or "1" - [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) always=true ;; *) @@ -1583,7 +1583,7 @@ load_rc_config_var() fi eval $(eval '( load_rc_config '$1' >/dev/null; - if [ -n "${'$2'}" -o "${'$2'-UNSET}" != "UNSET" ]; then + if [ -n "${'$2'}" -o "${'$2'-UNSET}" != "UNSET" ]; then echo '$2'=\'\''${'$2'}\'\''; fi )' ) From nobody Sat Nov 18 19:08:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXjx44lKnz51V1x; Sat, 18 Nov 2023 19:08: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 4SXjx449tkz4JRj; Sat, 18 Nov 2023 19:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700334536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZyirSjhyqDeboGofibNpAwCz2ztaZ/QL4evYGtSMUEc=; b=Hb5svv/osFDUyxqCSA0K5EKXHLavGaLSeIzUZ/9Ul0krI8DKSPvpQzJ0tpe6Ew/LKAzGjW Fm+keWxYLB03ZEEr5bu0v7tQPawa1MxpsFU0yB66QKmQ9bolsMtBJc2OoQW66ec/Yu2mr4 lg9dVy7JTs4yukRBCivo69E00Wl32w9tc2YZ4sj6uFZ+9EFsNcmXdDqf1p0uiCw4brGOQg NE23WD2nWK+bYBa5ALzT27MXNzcnoLCgh8O2dWBr3zgm0aprSaQfP0o90qvwDZkWRZn7+B rs4/U9v7aC2gwQDH3fsouM0/m3pbKbwZ7HB5n7a5gcJK2YGCRFxtrUPGjaiX3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700334536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZyirSjhyqDeboGofibNpAwCz2ztaZ/QL4evYGtSMUEc=; b=wJnacR2qIHhjh5FPxX9jiTQLhUopNW5mzBQEKDrvZTyYxRz3F8CfW41s8Hx8RppWWsxu/a 2Gazl/w1taCs1O28ts4xt3hAFpG4Yb/4L1RbwFkoSyTm3jdC1S6ZWLODLovGzwlwahg4zL 0XPVdOX0fxaj1nDDldBc0GWdHUt0jtObekqgkOU5EcyHb9xr2rBKVUjeWu8ki5nbO9AmV1 9bm10T+yf/lPCla80d1OJZAZvtV+7hZrUee98NjHe+XGTSp95IsdLub4dy3JKMnDJasvJ5 tvfVdycOv/Ahaj1K/BKnJkHYYZhNYv24GS2cj+wu1ZADlrDGIHyqb3Ly2ks9Hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700334536; a=rsa-sha256; cv=none; b=NLBTRD7nO5n9P3twJ7NVJ7ZsjrNvtgqKK5j5W/UuFScza8nFSVk7k2WwqafEZl0e0Gg1VI Kg1SUavVbh06oWXsfeYVgM6jGGYKSwctYF5aWI1yQKoA8VeY2D2EKibvuCrtkv/EyiKyuR MCN1qAnQU3SoJ4gbWl2FaSuqJeUxQmKTcTK4Zov+PSFqnXGyBJIVtw6sTmd6MTqcK7JkDQ HiJIdy26me539EI6DQJOgvXvEVFn1Iubiu5VfaLjl7SvKigiGOkSO3o/lYSMNET8nOGXXX QeT02MsjqZ9HvfRg86tZBt4lAtIbsHvKyklwu/LQ44mwfWg5ibIVKgBoTmZv4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXjx43FMmzdg8; Sat, 18 Nov 2023 19:08: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 3AIJ8u8B081887; Sat, 18 Nov 2023 19:08:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AIJ8ugP081884; Sat, 18 Nov 2023 19:08:56 GMT (envelope-from git) Date: Sat, 18 Nov 2023 19:08:56 GMT Message-Id: <202311181908.3AIJ8ugP081884@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: 3eed4803f943 - main - vfs mount: Consistently use ENODEV internally for an invalid fstype List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3eed4803f943e2937325e81140b88e2e8eea8deb Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3eed4803f943e2937325e81140b88e2e8eea8deb commit 3eed4803f943e2937325e81140b88e2e8eea8deb Author: John Baldwin AuthorDate: 2023-11-18 19:08:34 +0000 Commit: John Baldwin CommitDate: 2023-11-18 19:08:34 +0000 vfs mount: Consistently use ENODEV internally for an invalid fstype Change vfs_byname_kld to always return an error value of ENODEV to indicate an unsupported fstype leaving ENOENT to indicate errors such as a missing mount point or invalid path. This allows nmount(2) to better distinguish these cases and avoid treating a missing device node as an invalid fstype after commit 6e8272f317b8. While here, change mount(2) to return EINVAL instead of ENODEV for an invalid fstype to match nmount(2). PR: 274600 Reviewed by: pstef, markj Differential Revision: https://reviews.freebsd.org/D42327 --- sys/kern/vfs_init.c | 4 +++- sys/kern/vfs_mount.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c index c57e1471e356..64263caaef98 100644 --- a/sys/kern/vfs_init.c +++ b/sys/kern/vfs_init.c @@ -149,8 +149,10 @@ vfs_byname_kld(const char *fstype, struct thread *td, int *error) loaded = (*error == 0); if (*error == EEXIST) *error = 0; - if (*error) + if (*error) { + *error = ENODEV; return (NULL); + } /* Look up again to see if the VFS was loaded. */ vfsp = vfs_byname(fstype); diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 1a559bfd998e..10b29b569cc5 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -996,7 +996,7 @@ vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions) jail_export = false; error = vfs_domount(td, fstype, fspath, fsflags, jail_export, &optlist); - if (error == ENOENT) { + if (error == ENODEV) { error = EINVAL; if (errmsg != NULL) strncpy(errmsg, "Invalid fstype", errmsg_len); @@ -1086,7 +1086,7 @@ sys_mount(struct thread *td, struct mount_args *uap) vfsp = vfs_byname_kld(fstype, td, &error); free(fstype, M_TEMP); if (vfsp == NULL) - return (ENOENT); + return (EINVAL); if (((vfsp->vfc_flags & VFCF_SBDRY) != 0 && vfsp->vfc_vfsops_sd->vfs_cmount == NULL) || ((vfsp->vfc_flags & VFCF_SBDRY) == 0 && From nobody Sat Nov 18 19:21:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXkC86p2yz51VXY; Sat, 18 Nov 2023 19: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 4SXkC86M1Gz4Lv1; Sat, 18 Nov 2023 19: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=1700335268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fceUoUBRWbSD7O4JG25L9KHZKjEV+ryzczwBbpfnmFs=; b=hGpsA7E9MbfBbvcW40Z7FkNFFnBRHzWHweRbY7MzG7Jwrr+H4+5OKCKjPJ+FBl+btez2y8 nt/lJgxvwBzkGH8CZeeAAIlDJ3sJvRxjRItOfwiKtLZymXw4eFRAeBfHDQ8uCB7pI1BL07 akYzDT2QYXcF+e4TJOOxqgiNppCnra2FAB1nq/LSAmizvs2+pK3dO4ORVlYlK6BsIYcRUa jh1TR6AfHXG/SwycPD94FvBShw/1rgoEN5oxn143eJeD3dK2ePwu9zhdBa2t1SsnIRY/os MEM3iR4Rxcg4wYlzJdHf4JwcHDHD5wUtXDsv+icSG/jdWfIZ4xUxzQeyxwHb8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700335268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fceUoUBRWbSD7O4JG25L9KHZKjEV+ryzczwBbpfnmFs=; b=umButC1MoEGyxA5Qi9x3RQaSupMbBaRpqmkmoYfEoWWOyXfge09V51WqRd9ifZRyTa7y1x UmFw89/8wGX0Kl42+bPATREpHFtr/5LZeQ2fFJfhtbc5eqYqQ3bD9887+JUBmxJ4GaKffd k7mHMwbS7CXZk8Gtsqm/yMERUa8tfSPgWH+JBcrGoj7UFzGi/uhs+hAQ+sCT1l4BXbckl7 z29YQKOSaq2Mf9O9h63l/AlO7xlak7xK15m1JdN+uGzVitOS20WUSzNK5XGMCszTz6OMT6 dd3bI2AKM3MdyxaCCrMV+zFUu+Qllc+jQBB2vagQi/pbvDJ9oLGKyPgS9KiqvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700335268; a=rsa-sha256; cv=none; b=q7S+vmaEMvxnB35uaR7bt+nXCnT2hmPnyMNxcSZXQwC12pCHKLn3THFE3RHiXXdl/CLzP2 cozCLv0v77B0LQKqypOXcIUJi66YycD92ka/EQB9aK8YWVpsGClH0ooAAzJ7Gv6QmCnnqu Lh0EWOyPB+4byWr6x5tILgy6IDJogjZEmd301Cb0qwtqESAzQtS8pFxL+8D9rO7+Ez9pSm Y5Kto4CNXYcErQL+n1mlRL8E/AseVdeFuF6Wkx+9D/dttLyKg+Czy3EYXVbBA0BjjXI6uW np/COMc1o+bWHvSYNQh0pZk+5nuNkz/Av85ikMWStJC964MZN99JiLvANK59ww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXkC85LyTzf4V; Sat, 18 Nov 2023 19: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 3AIJL8O4008077; Sat, 18 Nov 2023 19: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 3AIJL8xp008058; Sat, 18 Nov 2023 19:21:08 GMT (envelope-from git) Date: Sat, 18 Nov 2023 19:21:08 GMT Message-Id: <202311181921.3AIJL8xp008058@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: de82aed11924 - main - bsdinstall zfsboot: Don't override ZFSBOOT_FORCE_4K_SECTORS if it is null. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: de82aed1192470574a08d3e479d81c4c1280487a Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=de82aed1192470574a08d3e479d81c4c1280487a commit de82aed1192470574a08d3e479d81c4c1280487a Author: John Baldwin AuthorDate: 2023-11-18 19:18:29 +0000 Commit: John Baldwin CommitDate: 2023-11-18 19:18:29 +0000 bsdinstall zfsboot: Don't override ZFSBOOT_FORCE_4K_SECTORS if it is null. Only set a default value of 1 if the shell variable is unset. This allows installer scripts to disable the variable. PR: 274513 Reported by: Albin "a12l" Otterhäll Differential Revision: https://reviews.freebsd.org/D42319 --- usr.sbin/bsdinstall/scripts/zfsboot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index 619d11c56000..1d38db2d0f15 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -71,7 +71,7 @@ f_include $BSDCFG_SHARE/variable.subr # # Should we use sysctl(8) vfs.zfs.min_auto_ashift=12 to force 4K sectors? # -: ${ZFSBOOT_FORCE_4K_SECTORS:=1} +: ${ZFSBOOT_FORCE_4K_SECTORS=1} # # Should we use geli(8) to encrypt the drives? From nobody Sat Nov 18 19:45:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXklr1BLFz51Wrv; Sat, 18 Nov 2023 19:46: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 4SXklr0hPgz4PmC; Sat, 18 Nov 2023 19:46:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700336760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I2PUVZdZXQRe6mx8RkzM3IRpkg43UmBomE/GN5d1g3o=; b=HaJYtGm2GiShG4h6LUF89OzuUW3DyNH2UVhZoRBzp5LM91KLBS1cAI5ngaWVTsIxg4Mu0e sEAJoHkOI1ZdAWOJEiyyebkxe0XfX1DVPtj/PBUdMgzJHRVTdYmKE8be53JpJ0LZc482k6 HQFxFwzutlsOJslp2QE/iMqPCYnvsQZVn9viD4FoiQsQBragm1PYr7QKo/Vx9UQ8w+0YkK NpEAY7dTh9isDD/AcaBRx7K0ZTZQcdn9ysLTCCQ5wA52KyjeIfZNiB+NsJiWl8f7EuWuBf xYe/S9Y5ItRK/beZaYUKlOtpiPxxCFsV21Pa3mC7Aj9YDViqpqlGHIHBrpUL7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700336760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I2PUVZdZXQRe6mx8RkzM3IRpkg43UmBomE/GN5d1g3o=; b=eKyB/Ummnlt2vKyN2wx6haPMud+m/03zi4ATuChKoBgTXqJmz9803XmAMiw6qLMoeYfWiW TjWxV8rRlKNSeP9RWU8c94tFv/6mj8YIUZomC/g+AiwBzhkyYQQqEalmZi0L1SfHGO4yP/ hZGsW+QIJDw118v6lmKJshoo4sqp5YWjdS2633Mw5WndQsHLfqOPv6sLgR9B0cMPqXwDEV ulcwpxf9yqTbtZto5eu83Eq/kL5sSkljpLp2Lt+Rp4loGgLq5k7jdGq3gD7GSwQIJ9DCM+ SqFzbyC5zmtsVKqv5go6X3W9pclyYoZtn6kjhGFI0nsn2aZbBsd5/yO+A7+eQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700336760; a=rsa-sha256; cv=none; b=It/mr+tGW2tYdyYCuDw0eYnLnshcz80/EptgoWsZIDFY7qNC8GeVLLTHZmzOGRN4Gkq54+ 6TOrXX9dJxvsrn92pUwnvYkCe6c36rs7SyX0cFQ2ql3T/AsEPCvT7coTrZjC1UVPCeG1KD dgEIBXzSUAq/bpkzManLROMqQMVLPFF5kHeehq+HopRlI4O4Exoib8QwdBF4w+lNIIfDrb kGwTC2wKei+Oe4HDxxQDnbL6zgyTJnr7ic500DCemB66yBeW/7AMB/eQ45yjqFBjPanEnm 9zIRLt3wyD8JNRT/k28+iWKW84aS+rf1oygIiNjcjqs5u8yCcama9rj8TRaOJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXklq6WVdzg9k; Sat, 18 Nov 2023 19:45: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 3AIJjx1G048351; Sat, 18 Nov 2023 19:45:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AIJjxeE048348; Sat, 18 Nov 2023 19:45:59 GMT (envelope-from git) Date: Sat, 18 Nov 2023 19:45:59 GMT Message-Id: <202311181945.3AIJjxeE048348@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: 84f773037ee4 - main - bsdinstall.8: Clarify the description of ZFSBOOT_FORCE_4K_SECTORS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 84f773037ee4fc78585501a2ce2f5398f0bae9f4 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=84f773037ee4fc78585501a2ce2f5398f0bae9f4 commit 84f773037ee4fc78585501a2ce2f5398f0bae9f4 Author: John Baldwin AuthorDate: 2023-11-18 19:31:07 +0000 Commit: John Baldwin CommitDate: 2023-11-18 19:45:42 +0000 bsdinstall.8: Clarify the description of ZFSBOOT_FORCE_4K_SECTORS This variable does not set the exact sector size of the pool, but controls the minimum sector size. The sector size of the underlying disks can always be larger than the minium controlled by this knob. PR: 274513 Reported by: Albin "a12l" Otterhäll --- usr.sbin/bsdinstall/bsdinstall.8 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index 77da9622d4d7..c8bf143322ae 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -23,7 +23,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 18, 2023 +.Dd November 18, 2023 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -433,8 +433,11 @@ or raidz3 (RAID-Z3 Triple Redundancy RAID). Default: .Dq stripe .It Ev ZFSBOOT_FORCE_4K_SECTORS -Indicates either the pool will use 4K or 512 sectors. -If this variable is not empty, 4K sectors will be used. +Controls the minimum sector size of the pool. +If this variable is not empty, the minimum sector size is 4K. +If this variable is empty, the minimum sector size is 512. +Note that the sector size of the pool will always be at least +the sector size of the backing disks. Default: .Dq 1 .It Ev ZFSBOOT_GELI_ENCRYPTION